rich-react-component 0.1.0 → 0.2.0

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/index.js CHANGED
@@ -1,158 +1,158 @@
1
- import { jsxs as p, jsx as a, Fragment as X } from "react/jsx-runtime";
2
- import { useRef as M, useState as T, useCallback as R, useId as P, useEffect as B, createContext as ce, useMemo as W, useContext as de } from "react";
1
+ import { jsxs as p, jsx as a, Fragment as H } from "react/jsx-runtime";
2
+ import { useRef as O, useState as M, useCallback as A, useId as F, useEffect as _, createContext as he, useMemo as ne, useContext as be } from "react";
3
3
  function f(...e) {
4
4
  return e.filter(Boolean).join(" ");
5
5
  }
6
- function ke({ htmlFor: e, required: n, className: t, children: r }) {
6
+ function $e({ htmlFor: e, required: n, className: t, children: r }) {
7
7
  return /* @__PURE__ */ p("label", { htmlFor: e, className: f("form-label", t), children: [
8
8
  r,
9
9
  n && /* @__PURE__ */ a("span", { className: "text-danger", children: " *" })
10
10
  ] });
11
11
  }
12
- function ue({ error: e, helpText: n, className: t }) {
12
+ function pe({ error: e, helpText: n, className: t }) {
13
13
  return e ? /* @__PURE__ */ a("div", { className: f("invalid-feedback d-block", t), children: e }) : n ? /* @__PURE__ */ a("div", { className: f("form-text", t), children: n }) : null;
14
14
  }
15
- function K({ id: e, label: n, required: t, error: r, helpText: l, className: s, children: c }) {
16
- return /* @__PURE__ */ p("div", { className: f("mb-3", s), children: [
17
- n && /* @__PURE__ */ a(ke, { htmlFor: e, required: t, children: n }),
18
- c,
19
- /* @__PURE__ */ a(ue, { error: r, helpText: l })
15
+ function B({ id: e, label: n, required: t, error: r, helpText: l, className: i, children: o }) {
16
+ return /* @__PURE__ */ p("div", { className: f("mb-3", i), children: [
17
+ n && /* @__PURE__ */ a($e, { htmlFor: e, required: t, children: n }),
18
+ o,
19
+ /* @__PURE__ */ a(pe, { error: r, helpText: l })
20
20
  ] });
21
21
  }
22
- function V({
22
+ function T({
23
23
  value: e,
24
24
  defaultValue: n,
25
25
  onChange: t
26
26
  }) {
27
- const r = e !== void 0, l = M(r);
27
+ const r = e !== void 0, l = O(r);
28
28
  process.env.NODE_ENV !== "production" && l.current !== r && console.error(
29
29
  "[react-components] A component switched between controlled and uncontrolled `value`. Decide between passing `value` (controlled) or `defaultValue` (uncontrolled) for the lifetime of the component, per the library's controlled/uncontrolled policy."
30
30
  );
31
- const [s, c] = T(n), o = r ? e : s, i = R(
31
+ const [i, o] = M(n), c = r ? e : i, s = A(
32
32
  (d) => {
33
- r || c(d), t == null || t(d);
33
+ r || o(d), t == null || t(d);
34
34
  },
35
35
  [r, t]
36
36
  );
37
- return [o, i];
37
+ return [c, s];
38
38
  }
39
- function Y(e) {
39
+ function Z(e) {
40
40
  const {
41
41
  id: n,
42
42
  name: t,
43
43
  disabled: r,
44
44
  readOnly: l,
45
- required: s,
46
- className: c,
47
- label: o,
48
- placeholder: i,
45
+ required: i,
46
+ className: o,
47
+ label: c,
48
+ placeholder: s,
49
49
  helpText: d,
50
50
  error: u,
51
51
  value: h,
52
52
  defaultValue: m,
53
- onChange: b,
54
- onBlur: v,
55
- type: x = "text",
56
- maxLength: N,
57
- autoFocus: g,
58
- inputProps: w,
59
- endAdornment: y
60
- } = e, [S, k] = V({
53
+ onChange: v,
54
+ onBlur: g,
55
+ type: w = "text",
56
+ maxLength: k,
57
+ autoFocus: y,
58
+ inputProps: S,
59
+ endAdornment: x
60
+ } = e, [I, b] = T({
61
61
  value: h,
62
62
  defaultValue: m ?? "",
63
- onChange: b
64
- }), C = P(), D = n ?? C, $ = /* @__PURE__ */ a(
63
+ onChange: v
64
+ }), N = F(), C = n ?? N, D = /* @__PURE__ */ a(
65
65
  "input",
66
66
  {
67
- id: D,
67
+ id: C,
68
68
  name: t,
69
69
  className: f("form-control", u && "is-invalid"),
70
70
  disabled: r,
71
71
  readOnly: l,
72
- required: s,
73
- placeholder: i,
74
- maxLength: N,
75
- autoFocus: g,
76
- value: S,
77
- onChange: (L) => k(L.target.value),
78
- onBlur: v,
79
- type: x,
80
- ...w
72
+ required: i,
73
+ placeholder: s,
74
+ maxLength: k,
75
+ autoFocus: y,
76
+ value: I,
77
+ onChange: ($) => b($.target.value),
78
+ onBlur: g,
79
+ type: w,
80
+ ...S
81
81
  }
82
82
  );
83
- return /* @__PURE__ */ a(K, { id: D, label: o, required: s, error: u, helpText: d, className: c, children: y ? /* @__PURE__ */ p("div", { className: "input-group", children: [
84
- $,
85
- y
86
- ] }) : $ });
83
+ return /* @__PURE__ */ a(B, { id: C, label: c, required: i, error: u, helpText: d, className: o, children: x ? /* @__PURE__ */ p("div", { className: "input-group", children: [
84
+ D,
85
+ x
86
+ ] }) : D });
87
87
  }
88
- function bn(e) {
88
+ function Kn(e) {
89
89
  const {
90
90
  id: n,
91
91
  name: t,
92
92
  disabled: r,
93
93
  readOnly: l,
94
- required: s,
95
- className: c,
96
- label: o,
97
- placeholder: i,
94
+ required: i,
95
+ className: o,
96
+ label: c,
97
+ placeholder: s,
98
98
  helpText: d,
99
99
  error: u,
100
100
  value: h,
101
101
  defaultValue: m,
102
- onChange: b,
103
- onBlur: v,
104
- rows: x = 3,
105
- maxLength: N
106
- } = e, [g, w] = V({
102
+ onChange: v,
103
+ onBlur: g,
104
+ rows: w = 3,
105
+ maxLength: k
106
+ } = e, [y, S] = T({
107
107
  value: h,
108
108
  defaultValue: m ?? "",
109
- onChange: b
110
- }), y = P(), S = n ?? y;
111
- return /* @__PURE__ */ a(K, { id: S, label: o, required: s, error: u, helpText: d, className: c, children: /* @__PURE__ */ a(
109
+ onChange: v
110
+ }), x = F(), I = n ?? x;
111
+ return /* @__PURE__ */ a(B, { id: I, label: c, required: i, error: u, helpText: d, className: o, children: /* @__PURE__ */ a(
112
112
  "textarea",
113
113
  {
114
- id: S,
114
+ id: I,
115
115
  name: t,
116
116
  className: f("form-control", u && "is-invalid"),
117
117
  disabled: r,
118
118
  readOnly: l,
119
- required: s,
120
- placeholder: i,
121
- rows: x,
122
- maxLength: N,
123
- value: g,
124
- onChange: (k) => w(k.target.value),
125
- onBlur: v
119
+ required: i,
120
+ placeholder: s,
121
+ rows: w,
122
+ maxLength: k,
123
+ value: y,
124
+ onChange: (b) => S(b.target.value),
125
+ onBlur: g
126
126
  }
127
127
  ) });
128
128
  }
129
- function vn({ value: e, defaultValue: n, onChange: t, min: r, max: l, step: s, ...c }) {
130
- const [o, i] = V({
129
+ function Bn({ value: e, defaultValue: n, onChange: t, min: r, max: l, step: i, ...o }) {
130
+ const [c, s] = T({
131
131
  value: e,
132
132
  defaultValue: n ?? null,
133
133
  onChange: t
134
134
  });
135
135
  return /* @__PURE__ */ a(
136
- Y,
136
+ Z,
137
137
  {
138
- ...c,
139
- value: o === null ? "" : String(o),
138
+ ...o,
139
+ value: c === null ? "" : String(c),
140
140
  onChange: (d) => {
141
141
  if (d.trim() === "") {
142
- i(null);
142
+ s(null);
143
143
  return;
144
144
  }
145
145
  const u = Number(d);
146
- Number.isNaN(u) || i(u);
146
+ Number.isNaN(u) || s(u);
147
147
  },
148
- inputProps: { inputMode: "decimal", min: r, max: l, step: s }
148
+ inputProps: { inputMode: "decimal", min: r, max: l, step: i }
149
149
  }
150
150
  );
151
151
  }
152
- function pn(e) {
153
- const [n, t] = T(!1);
152
+ function jn(e) {
153
+ const [n, t] = M(!1);
154
154
  return /* @__PURE__ */ a(
155
- Y,
155
+ Z,
156
156
  {
157
157
  ...e,
158
158
  inputProps: { type: n ? "text" : "password", autoComplete: "current-password" },
@@ -170,65 +170,65 @@ function pn(e) {
170
170
  }
171
171
  );
172
172
  }
173
- function gn({ id: e, name: n, disabled: t, required: r, className: l, label: s, helpText: c, error: o, accept: i, multiple: d, onChange: u }) {
174
- const h = P(), m = e ?? h;
175
- return /* @__PURE__ */ a(K, { id: m, label: s, required: r, error: o, helpText: c, className: l, children: /* @__PURE__ */ a(
173
+ function Hn({ id: e, name: n, disabled: t, required: r, className: l, label: i, helpText: o, error: c, accept: s, multiple: d, onChange: u }) {
174
+ const h = F(), m = e ?? h;
175
+ return /* @__PURE__ */ a(B, { id: m, label: i, required: r, error: c, helpText: o, className: l, children: /* @__PURE__ */ a(
176
176
  "input",
177
177
  {
178
178
  id: m,
179
179
  name: n,
180
180
  type: "file",
181
- className: f("form-control", o && "is-invalid"),
181
+ className: f("form-control", c && "is-invalid"),
182
182
  disabled: t,
183
183
  required: r,
184
- accept: i,
184
+ accept: s,
185
185
  multiple: d,
186
- onChange: (b) => u == null ? void 0 : u(b.target.files)
186
+ onChange: (v) => u == null ? void 0 : u(v.target.files)
187
187
  }
188
188
  ) });
189
189
  }
190
- function fe({
190
+ function ve({
191
191
  id: e,
192
192
  name: n,
193
193
  disabled: t,
194
194
  required: r,
195
195
  wrapperClassName: l,
196
- role: s,
197
- label: c,
198
- helpText: o,
199
- error: i,
196
+ role: i,
197
+ label: o,
198
+ helpText: c,
199
+ error: s,
200
200
  checked: d,
201
201
  onChange: u,
202
202
  className: h
203
203
  }) {
204
- const m = P(), b = e ?? m;
204
+ const m = F(), v = e ?? m;
205
205
  return /* @__PURE__ */ p("div", { className: f(l, h), children: [
206
206
  /* @__PURE__ */ a(
207
207
  "input",
208
208
  {
209
- id: b,
209
+ id: v,
210
210
  name: n,
211
211
  type: "checkbox",
212
- role: s,
213
- className: f("form-check-input", i && "is-invalid"),
212
+ role: i,
213
+ className: f("form-check-input", s && "is-invalid"),
214
214
  disabled: t,
215
215
  required: r,
216
216
  checked: d,
217
- onChange: (v) => u(v.target.checked)
217
+ onChange: (g) => u(g.target.checked)
218
218
  }
219
219
  ),
220
- c && /* @__PURE__ */ a("label", { htmlFor: b, className: "form-check-label", children: c }),
221
- /* @__PURE__ */ a(ue, { error: i, helpText: o })
220
+ o && /* @__PURE__ */ a("label", { htmlFor: v, className: "form-check-label", children: o }),
221
+ /* @__PURE__ */ a(pe, { error: s, helpText: c })
222
222
  ] });
223
223
  }
224
- function yn(e) {
225
- const [n, t] = V({
224
+ function _n(e) {
225
+ const [n, t] = T({
226
226
  value: e.checked,
227
227
  defaultValue: e.defaultChecked ?? !1,
228
228
  onChange: e.onChange
229
229
  });
230
230
  return /* @__PURE__ */ a(
231
- fe,
231
+ ve,
232
232
  {
233
233
  id: e.id,
234
234
  name: e.name,
@@ -244,14 +244,14 @@ function yn(e) {
244
244
  }
245
245
  );
246
246
  }
247
- function Nn(e) {
248
- const [n, t] = V({
247
+ function Un(e) {
248
+ const [n, t] = T({
249
249
  value: e.checked,
250
250
  defaultValue: e.defaultChecked ?? !1,
251
251
  onChange: e.onChange
252
252
  });
253
253
  return /* @__PURE__ */ a(
254
- fe,
254
+ ve,
255
255
  {
256
256
  id: e.id,
257
257
  name: e.name,
@@ -268,18 +268,18 @@ function Nn(e) {
268
268
  }
269
269
  );
270
270
  }
271
- function Se({
271
+ function Te({
272
272
  id: e,
273
273
  name: n,
274
274
  value: t,
275
275
  label: r,
276
276
  checked: l,
277
- disabled: s,
278
- className: c,
279
- onChange: o
277
+ disabled: i,
278
+ className: o,
279
+ onChange: c
280
280
  }) {
281
- const i = P(), d = e ?? i;
282
- return /* @__PURE__ */ p("div", { className: f("form-check", c), children: [
281
+ const s = F(), d = e ?? s;
282
+ return /* @__PURE__ */ p("div", { className: f("form-check", o), children: [
283
283
  /* @__PURE__ */ a(
284
284
  "input",
285
285
  {
@@ -289,98 +289,98 @@ function Se({
289
289
  className: "form-check-input",
290
290
  value: String(t),
291
291
  checked: l,
292
- disabled: s,
293
- onChange: () => o == null ? void 0 : o(t)
292
+ disabled: i,
293
+ onChange: () => c == null ? void 0 : c(t)
294
294
  }
295
295
  ),
296
296
  r && /* @__PURE__ */ a("label", { htmlFor: d, className: "form-check-label", children: r })
297
297
  ] });
298
298
  }
299
- function wn({
299
+ function qn({
300
300
  options: e,
301
301
  value: n,
302
302
  defaultValue: t,
303
303
  onChange: r,
304
304
  inline: l,
305
- id: s,
306
- name: c,
307
- disabled: o,
308
- required: i,
305
+ id: i,
306
+ name: o,
307
+ disabled: c,
308
+ required: s,
309
309
  className: d,
310
310
  label: u,
311
311
  helpText: h,
312
312
  error: m
313
313
  }) {
314
- const [b, v] = V({
314
+ const [v, g] = T({
315
315
  value: n,
316
316
  defaultValue: t ?? null,
317
- onChange: (g) => {
318
- g !== null && (r == null || r(g));
317
+ onChange: (y) => {
318
+ y !== null && (r == null || r(y));
319
319
  }
320
- }), x = P(), N = c ?? s ?? x;
321
- return /* @__PURE__ */ a(K, { label: u, required: i, error: m, helpText: h, className: d, children: /* @__PURE__ */ a("div", { role: "radiogroup", "aria-label": u, "aria-required": i, className: f(l && "d-flex gap-3"), children: e.map((g) => /* @__PURE__ */ a(
322
- Se,
320
+ }), w = F(), k = o ?? i ?? w;
321
+ return /* @__PURE__ */ a(B, { label: u, required: s, error: m, helpText: h, className: d, children: /* @__PURE__ */ a("div", { role: "radiogroup", "aria-label": u, "aria-required": s, className: f(l && "d-flex gap-3"), children: e.map((y) => /* @__PURE__ */ a(
322
+ Te,
323
323
  {
324
- name: N,
325
- value: g.value,
326
- label: g.label,
327
- checked: g.value === b,
328
- disabled: o || g.disabled,
329
- onChange: (w) => v(w)
324
+ name: k,
325
+ value: y.value,
326
+ label: y.label,
327
+ checked: y.value === v,
328
+ disabled: c || y.disabled,
329
+ onChange: (S) => g(S)
330
330
  },
331
- String(g.value)
331
+ String(y.value)
332
332
  )) }) });
333
333
  }
334
- function Ce({
334
+ function Ee({
335
335
  options: e,
336
336
  value: n,
337
337
  defaultValue: t,
338
338
  onChange: r,
339
339
  placeholder: l,
340
- loading: s,
341
- id: c,
342
- name: o,
343
- disabled: i,
340
+ loading: i,
341
+ id: o,
342
+ name: c,
343
+ disabled: s,
344
344
  readOnly: d,
345
345
  required: u,
346
346
  className: h,
347
347
  label: m,
348
- helpText: b,
349
- error: v
348
+ helpText: v,
349
+ error: g
350
350
  }) {
351
- const [x, N] = V({
351
+ const [w, k] = T({
352
352
  value: n,
353
353
  defaultValue: t ?? null,
354
354
  onChange: r
355
- }), g = P(), w = c ?? g;
356
- return /* @__PURE__ */ a(K, { id: w, label: m, required: u, error: v, helpText: b, className: h, children: /* @__PURE__ */ p(
355
+ }), y = F(), S = o ?? y;
356
+ return /* @__PURE__ */ a(B, { id: S, label: m, required: u, error: g, helpText: v, className: h, children: /* @__PURE__ */ p(
357
357
  "select",
358
358
  {
359
- id: w,
360
- name: o,
361
- className: f("form-select", v && "is-invalid"),
362
- disabled: i || d || s,
359
+ id: S,
360
+ name: c,
361
+ className: f("form-select", g && "is-invalid"),
362
+ disabled: s || d || i,
363
363
  required: u,
364
- value: x === null ? "" : String(x),
365
- onChange: (y) => {
366
- const S = y.target.value;
367
- if (S === "") {
368
- N(null);
364
+ value: w === null ? "" : String(w),
365
+ onChange: (x) => {
366
+ const I = x.target.value;
367
+ if (I === "") {
368
+ k(null);
369
369
  return;
370
370
  }
371
- const k = e.find((C) => String(C.value) === S);
372
- N(k ? k.value : null);
371
+ const b = e.find((N) => String(N.value) === I);
372
+ k(b ? b.value : null);
373
373
  },
374
374
  children: [
375
- s && /* @__PURE__ */ a("option", { value: "", children: "Loading…" }),
376
- !s && l && /* @__PURE__ */ a("option", { value: "", children: l }),
377
- e.map((y) => /* @__PURE__ */ a("option", { value: String(y.value), disabled: y.disabled, children: y.label }, String(y.value)))
375
+ i && /* @__PURE__ */ a("option", { value: "", children: "Loading…" }),
376
+ !i && l && /* @__PURE__ */ a("option", { value: "", children: l }),
377
+ e.map((x) => /* @__PURE__ */ a("option", { value: String(x.value), disabled: x.disabled, children: x.label }, String(x.value)))
378
378
  ]
379
379
  }
380
380
  ) });
381
381
  }
382
- function le(e, n) {
383
- B(() => {
382
+ function ie(e, n) {
383
+ _(() => {
384
384
  if (!e)
385
385
  return;
386
386
  function t(r) {
@@ -389,413 +389,413 @@ function le(e, n) {
389
389
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
390
390
  }, [e, n]);
391
391
  }
392
- function G({ open: e, onClose: n, anchorRef: t, className: r, role: l, children: s }) {
393
- const c = M(null);
394
- return le(e, n), B(() => {
392
+ function W({ open: e, onClose: n, anchorRef: t, className: r, role: l, children: i }) {
393
+ const o = O(null);
394
+ return ie(e, n), _(() => {
395
395
  if (!e)
396
396
  return;
397
- function o(i) {
397
+ function c(s) {
398
398
  var u, h;
399
- const d = i.target;
400
- (u = c.current) != null && u.contains(d) || (h = t.current) != null && h.contains(d) || n();
399
+ const d = s.target;
400
+ (u = o.current) != null && u.contains(d) || (h = t.current) != null && h.contains(d) || n();
401
401
  }
402
- return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
403
- }, [e, n, t]), e ? /* @__PURE__ */ a("div", { ref: c, className: f("show", r), role: l, children: s }) : null;
402
+ return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
403
+ }, [e, n, t]), e ? /* @__PURE__ */ a("div", { ref: o, className: f("show", r), role: l, children: i }) : null;
404
404
  }
405
- function ee({
405
+ function re({
406
406
  itemCount: e,
407
407
  isOpen: n,
408
408
  onSelect: t,
409
409
  onClose: r
410
410
  }) {
411
- const [l, s] = T(-1);
412
- B(() => {
413
- n || s(-1);
414
- }, [n]), le(n, r);
415
- const c = R(
416
- (o) => {
411
+ const [l, i] = M(-1);
412
+ _(() => {
413
+ n || i(-1);
414
+ }, [n]), ie(n, r);
415
+ const o = A(
416
+ (c) => {
417
417
  if (!n) {
418
- (o.key === "ArrowDown" || o.key === "Enter") && o.preventDefault();
418
+ (c.key === "ArrowDown" || c.key === "Enter") && c.preventDefault();
419
419
  return;
420
420
  }
421
- switch (o.key) {
421
+ switch (c.key) {
422
422
  case "ArrowDown":
423
- o.preventDefault(), s((i) => e === 0 ? -1 : (i + 1) % e);
423
+ c.preventDefault(), i((s) => e === 0 ? -1 : (s + 1) % e);
424
424
  break;
425
425
  case "ArrowUp":
426
- o.preventDefault(), s((i) => e === 0 ? -1 : (i - 1 + e) % e);
426
+ c.preventDefault(), i((s) => e === 0 ? -1 : (s - 1 + e) % e);
427
427
  break;
428
428
  case "Home":
429
- o.preventDefault(), s(e === 0 ? -1 : 0);
429
+ c.preventDefault(), i(e === 0 ? -1 : 0);
430
430
  break;
431
431
  case "End":
432
- o.preventDefault(), s(e === 0 ? -1 : e - 1);
432
+ c.preventDefault(), i(e === 0 ? -1 : e - 1);
433
433
  break;
434
434
  case "Enter":
435
- l >= 0 && (o.preventDefault(), t(l));
435
+ l >= 0 && (c.preventDefault(), t(l));
436
436
  break;
437
437
  }
438
438
  },
439
439
  [n, e, l, t]
440
440
  );
441
- return { activeIndex: l, setActiveIndex: s, handleKeyDown: c };
441
+ return { activeIndex: l, setActiveIndex: i, handleKeyDown: o };
442
442
  }
443
- function Ie({
443
+ function Me({
444
444
  options: e,
445
445
  values: n,
446
446
  defaultValues: t,
447
447
  onChange: r,
448
448
  loading: l,
449
- emptyText: s = "No options",
450
- id: c,
451
- name: o,
452
- disabled: i,
449
+ emptyText: i = "No options",
450
+ id: o,
451
+ name: c,
452
+ disabled: s,
453
453
  readOnly: d,
454
454
  required: u,
455
455
  className: h,
456
456
  label: m,
457
- placeholder: b = "Select...",
458
- helpText: v,
459
- error: x
457
+ placeholder: v = "Select...",
458
+ helpText: g,
459
+ error: w
460
460
  }) {
461
- const [N, g] = V({
461
+ const [k, y] = T({
462
462
  value: n,
463
463
  defaultValue: t ?? [],
464
464
  onChange: r
465
- }), [w, y] = T(!1), S = M(null), k = P(), C = c ?? k, D = new Set(N), $ = R(() => y(!1), []), L = R(
466
- (I) => {
467
- const F = e[I];
468
- if (!F || F.disabled)
465
+ }), [S, x] = M(!1), I = O(null), b = F(), N = o ?? b, C = new Set(k), D = A(() => x(!1), []), $ = A(
466
+ (V) => {
467
+ const K = e[V];
468
+ if (!K || K.disabled)
469
469
  return;
470
- const J = D.has(F.value) ? N.filter((te) => te !== F.value) : [...N, F.value];
471
- g(J);
470
+ const J = C.has(K.value) ? k.filter((ae) => ae !== K.value) : [...k, K.value];
471
+ y(J);
472
472
  },
473
- [e, N, D, g]
474
- ), { activeIndex: q, setActiveIndex: _, handleKeyDown: U } = ee({
473
+ [e, k, C, y]
474
+ ), { activeIndex: E, setActiveIndex: U, handleKeyDown: G } = re({
475
475
  itemCount: e.length,
476
- isOpen: w,
477
- onSelect: L,
478
- onClose: $
479
- }), E = e.filter((I) => D.has(I.value)).map((I) => I.label).join(", ");
480
- return /* @__PURE__ */ a(K, { id: C, label: m, required: u, error: x, helpText: v, className: h, children: /* @__PURE__ */ p("div", { className: "position-relative", children: [
476
+ isOpen: S,
477
+ onSelect: $,
478
+ onClose: D
479
+ }), R = e.filter((V) => C.has(V.value)).map((V) => V.label).join(", ");
480
+ return /* @__PURE__ */ a(B, { id: N, label: m, required: u, error: w, helpText: g, className: h, children: /* @__PURE__ */ p("div", { className: "position-relative", children: [
481
481
  /* @__PURE__ */ a(
482
482
  "button",
483
483
  {
484
- ref: S,
485
- id: C,
484
+ ref: I,
485
+ id: N,
486
486
  type: "button",
487
- name: o,
488
- className: f("form-select text-start", x && "is-invalid"),
489
- disabled: i || d,
487
+ name: c,
488
+ className: f("form-select text-start", w && "is-invalid"),
489
+ disabled: s || d,
490
490
  "aria-haspopup": "listbox",
491
- "aria-expanded": w,
492
- onClick: () => y((I) => !I),
493
- onKeyDown: U,
494
- children: E || /* @__PURE__ */ a("span", { className: "text-body-secondary", children: b })
491
+ "aria-expanded": S,
492
+ onClick: () => x((V) => !V),
493
+ onKeyDown: G,
494
+ children: R || /* @__PURE__ */ a("span", { className: "text-body-secondary", children: v })
495
495
  }
496
496
  ),
497
- /* @__PURE__ */ a(G, { open: w, onClose: $, anchorRef: S, className: "dropdown-menu w-100", role: "listbox", children: l ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: "Loading…" }) : e.length === 0 ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: s }) : e.map((I, F) => /* @__PURE__ */ p(
497
+ /* @__PURE__ */ a(W, { open: S, onClose: D, anchorRef: I, className: "dropdown-menu w-100", role: "listbox", children: l ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: "Loading…" }) : e.length === 0 ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: i }) : e.map((V, K) => /* @__PURE__ */ p(
498
498
  "div",
499
499
  {
500
500
  role: "option",
501
- "aria-selected": D.has(I.value),
501
+ "aria-selected": C.has(V.value),
502
502
  className: f(
503
503
  "dropdown-item d-flex align-items-center gap-2",
504
- F === q && "active",
505
- I.disabled && "disabled"
504
+ K === E && "active",
505
+ V.disabled && "disabled"
506
506
  ),
507
- onMouseEnter: () => _(F),
507
+ onMouseEnter: () => U(K),
508
508
  onMouseDown: (J) => {
509
- J.preventDefault(), I.disabled || L(F);
509
+ J.preventDefault(), V.disabled || $(K);
510
510
  },
511
511
  children: [
512
- /* @__PURE__ */ a("input", { type: "checkbox", className: "form-check-input m-0", checked: D.has(I.value), readOnly: !0, tabIndex: -1 }),
513
- I.label
512
+ /* @__PURE__ */ a("input", { type: "checkbox", className: "form-check-input m-0", checked: C.has(V.value), readOnly: !0, tabIndex: -1 }),
513
+ V.label
514
514
  ]
515
515
  },
516
- String(I.value)
516
+ String(V.value)
517
517
  )) })
518
518
  ] }) });
519
519
  }
520
- function H(e) {
520
+ function z(e) {
521
521
  if (!e)
522
522
  return "";
523
523
  const n = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getDate()).padStart(2, "0");
524
524
  return `${n}-${t}-${r}`;
525
525
  }
526
- function me(e) {
526
+ function ge(e) {
527
527
  if (!e)
528
528
  return null;
529
529
  const n = e.split("-").map(Number), [t, r, l] = n;
530
530
  return !t || !r || !l ? null : new Date(t, r - 1, l);
531
531
  }
532
- function De({ value: e, defaultValue: n, onChange: t, min: r, max: l, ...s }) {
533
- const [c, o] = V({
532
+ function Oe({ value: e, defaultValue: n, onChange: t, min: r, max: l, ...i }) {
533
+ const [o, c] = T({
534
534
  value: e,
535
535
  defaultValue: n ?? null,
536
536
  onChange: t
537
537
  });
538
538
  return /* @__PURE__ */ a(
539
- Y,
539
+ Z,
540
540
  {
541
- ...s,
542
- value: H(c),
543
- onChange: (i) => o(me(i)),
541
+ ...i,
542
+ value: z(o),
543
+ onChange: (s) => c(ge(s)),
544
544
  inputProps: {
545
545
  type: "date",
546
- min: r ? H(r) : void 0,
547
- max: l ? H(l) : void 0
546
+ min: r ? z(r) : void 0,
547
+ max: l ? z(l) : void 0
548
548
  }
549
549
  }
550
550
  );
551
551
  }
552
- function he(e) {
552
+ function ye(e) {
553
553
  if (!e)
554
554
  return "";
555
555
  const n = String(e.getHours()).padStart(2, "0"), t = String(e.getMinutes()).padStart(2, "0");
556
556
  return `${n}:${t}`;
557
557
  }
558
- function be(e) {
558
+ function Ne(e) {
559
559
  if (!e)
560
560
  return null;
561
561
  const [n, t] = e.split(":").map(Number);
562
562
  return n === void 0 || t === void 0 || Number.isNaN(n) || Number.isNaN(t) ? null : new Date(1970, 0, 1, n, t, 0, 0);
563
563
  }
564
- function xn({ value: e, defaultValue: n, onChange: t, step: r, ...l }) {
565
- const [s, c] = V({
564
+ function zn({ value: e, defaultValue: n, onChange: t, step: r, ...l }) {
565
+ const [i, o] = T({
566
566
  value: e,
567
567
  defaultValue: n ?? null,
568
568
  onChange: t
569
569
  });
570
570
  return /* @__PURE__ */ a(
571
- Y,
571
+ Z,
572
572
  {
573
573
  ...l,
574
- value: he(s),
575
- onChange: (o) => c(be(o)),
574
+ value: ye(i),
575
+ onChange: (c) => o(Ne(c)),
576
576
  inputProps: { type: "time", step: r }
577
577
  }
578
578
  );
579
579
  }
580
- function ae(e, n) {
581
- const t = me(e);
580
+ function oe(e, n) {
581
+ const t = ge(e);
582
582
  if (!t)
583
583
  return null;
584
- const r = be(n || "00:00");
584
+ const r = Ne(n || "00:00");
585
585
  return r && t.setHours(r.getHours(), r.getMinutes(), 0, 0), t;
586
586
  }
587
- function kn({
587
+ function Gn({
588
588
  value: e,
589
589
  defaultValue: n,
590
590
  onChange: t,
591
591
  min: r,
592
592
  max: l,
593
- id: s,
594
- name: c,
595
- disabled: o,
596
- readOnly: i,
593
+ id: i,
594
+ name: o,
595
+ disabled: c,
596
+ readOnly: s,
597
597
  required: d,
598
598
  className: u,
599
599
  label: h,
600
600
  helpText: m,
601
- error: b
601
+ error: v
602
602
  }) {
603
- const [v, x] = V({
603
+ const [g, w] = T({
604
604
  value: e,
605
605
  defaultValue: n ?? null,
606
606
  onChange: t
607
- }), N = P(), g = s ?? N, w = H(v), y = he(v);
608
- return /* @__PURE__ */ a(K, { id: g, label: h, required: d, error: b, helpText: m, className: u, children: /* @__PURE__ */ p("div", { className: "d-flex gap-2", children: [
607
+ }), k = F(), y = i ?? k, S = z(g), x = ye(g);
608
+ return /* @__PURE__ */ a(B, { id: y, label: h, required: d, error: v, helpText: m, className: u, children: /* @__PURE__ */ p("div", { className: "d-flex gap-2", children: [
609
609
  /* @__PURE__ */ a(
610
610
  "input",
611
611
  {
612
- id: g,
613
- name: c ? `${c}-date` : void 0,
612
+ id: y,
613
+ name: o ? `${o}-date` : void 0,
614
614
  type: "date",
615
- className: f("form-control", b && "is-invalid"),
616
- disabled: o,
617
- readOnly: i,
615
+ className: f("form-control", v && "is-invalid"),
616
+ disabled: c,
617
+ readOnly: s,
618
618
  required: d,
619
- min: r ? H(r) : void 0,
620
- max: l ? H(l) : void 0,
621
- value: w,
622
- onChange: (S) => x(ae(S.target.value, y))
619
+ min: r ? z(r) : void 0,
620
+ max: l ? z(l) : void 0,
621
+ value: S,
622
+ onChange: (I) => w(oe(I.target.value, x))
623
623
  }
624
624
  ),
625
625
  /* @__PURE__ */ a(
626
626
  "input",
627
627
  {
628
- name: c ? `${c}-time` : void 0,
628
+ name: o ? `${o}-time` : void 0,
629
629
  type: "time",
630
- className: f("form-control", b && "is-invalid"),
631
- disabled: o,
632
- readOnly: i,
630
+ className: f("form-control", v && "is-invalid"),
631
+ disabled: c,
632
+ readOnly: s,
633
633
  required: d,
634
- value: y,
635
- onChange: (S) => x(ae(w || H(/* @__PURE__ */ new Date()), S.target.value))
634
+ value: x,
635
+ onChange: (I) => w(oe(S || z(/* @__PURE__ */ new Date()), I.target.value))
636
636
  }
637
637
  )
638
638
  ] }) });
639
639
  }
640
- function Ve({
640
+ function Re({
641
641
  options: e,
642
642
  value: n,
643
643
  defaultValue: t,
644
644
  onChange: r,
645
645
  loading: l,
646
- emptyText: s = "No options",
647
- id: c,
648
- name: o,
649
- disabled: i,
646
+ emptyText: i = "No options",
647
+ id: o,
648
+ name: c,
649
+ disabled: s,
650
650
  readOnly: d,
651
651
  required: u,
652
652
  className: h,
653
653
  label: m,
654
- placeholder: b = "Select...",
655
- helpText: v,
656
- error: x
654
+ placeholder: v = "Select...",
655
+ helpText: g,
656
+ error: w
657
657
  }) {
658
- const [N, g] = V({
658
+ const [k, y] = T({
659
659
  value: n,
660
660
  defaultValue: t ?? null,
661
661
  onChange: r
662
- }), [w, y] = T(!1), S = M(null), k = P(), C = c ?? k, D = e.find((O) => O.value === N) ?? null, $ = R(() => y(!1), []), L = R(
663
- (O) => {
664
- const E = e[O];
665
- !E || E.disabled || (g(E.value), $());
662
+ }), [S, x] = M(!1), I = O(null), b = F(), N = o ?? b, C = e.find((L) => L.value === k) ?? null, D = A(() => x(!1), []), $ = A(
663
+ (L) => {
664
+ const R = e[L];
665
+ !R || R.disabled || (y(R.value), D());
666
666
  },
667
- [e, g, $]
668
- ), { activeIndex: q, setActiveIndex: _, handleKeyDown: U } = ee({
667
+ [e, y, D]
668
+ ), { activeIndex: E, setActiveIndex: U, handleKeyDown: G } = re({
669
669
  itemCount: e.length,
670
- isOpen: w,
671
- onSelect: L,
672
- onClose: $
670
+ isOpen: S,
671
+ onSelect: $,
672
+ onClose: D
673
673
  });
674
- return /* @__PURE__ */ a(K, { id: C, label: m, required: u, error: x, helpText: v, className: h, children: /* @__PURE__ */ p("div", { className: "position-relative", children: [
674
+ return /* @__PURE__ */ a(B, { id: N, label: m, required: u, error: w, helpText: g, className: h, children: /* @__PURE__ */ p("div", { className: "position-relative", children: [
675
675
  /* @__PURE__ */ a(
676
676
  "button",
677
677
  {
678
- ref: S,
679
- id: C,
678
+ ref: I,
679
+ id: N,
680
680
  type: "button",
681
- name: o,
682
- className: f("form-select text-start", x && "is-invalid"),
683
- disabled: i || d,
681
+ name: c,
682
+ className: f("form-select text-start", w && "is-invalid"),
683
+ disabled: s || d,
684
684
  "aria-haspopup": "listbox",
685
- "aria-expanded": w,
686
- onClick: () => y((O) => !O),
687
- onKeyDown: U,
688
- children: D ? D.label : /* @__PURE__ */ a("span", { className: "text-body-secondary", children: b })
685
+ "aria-expanded": S,
686
+ onClick: () => x((L) => !L),
687
+ onKeyDown: G,
688
+ children: C ? C.label : /* @__PURE__ */ a("span", { className: "text-body-secondary", children: v })
689
689
  }
690
690
  ),
691
- /* @__PURE__ */ a(G, { open: w, onClose: $, anchorRef: S, className: "dropdown-menu w-100", role: "listbox", children: l ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: "Loading…" }) : e.length === 0 ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: s }) : e.map((O, E) => /* @__PURE__ */ a(
691
+ /* @__PURE__ */ a(W, { open: S, onClose: D, anchorRef: I, className: "dropdown-menu w-100", role: "listbox", children: l ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: "Loading…" }) : e.length === 0 ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: i }) : e.map((L, R) => /* @__PURE__ */ a(
692
692
  "div",
693
693
  {
694
694
  role: "option",
695
- "aria-selected": O.value === N,
696
- className: f("dropdown-item", E === q && "active", O.disabled && "disabled"),
697
- onMouseEnter: () => _(E),
698
- onMouseDown: (I) => {
699
- I.preventDefault(), O.disabled || L(E);
695
+ "aria-selected": L.value === k,
696
+ className: f("dropdown-item", R === E && "active", L.disabled && "disabled"),
697
+ onMouseEnter: () => U(R),
698
+ onMouseDown: (V) => {
699
+ V.preventDefault(), L.disabled || $(R);
700
700
  },
701
- children: O.label
701
+ children: L.label
702
702
  },
703
- String(O.value)
703
+ String(L.value)
704
704
  )) })
705
705
  ] }) });
706
706
  }
707
- function Te(e, n) {
707
+ function Ae(e, n) {
708
708
  return n ? e.label.toLowerCase().includes(n.toLowerCase()) : !0;
709
709
  }
710
- function Me({
710
+ function Le({
711
711
  options: e,
712
712
  value: n,
713
713
  defaultValue: t,
714
714
  onChange: r,
715
715
  inputValue: l,
716
- onInputValueChange: s,
717
- loading: c,
718
- emptyText: o = "No results",
719
- filter: i,
716
+ onInputValueChange: i,
717
+ loading: o,
718
+ emptyText: c = "No results",
719
+ filter: s,
720
720
  id: d,
721
721
  name: u,
722
722
  disabled: h,
723
723
  readOnly: m,
724
- required: b,
725
- className: v,
726
- label: x,
727
- placeholder: N,
728
- helpText: g,
729
- error: w
724
+ required: v,
725
+ className: g,
726
+ label: w,
727
+ placeholder: k,
728
+ helpText: y,
729
+ error: S
730
730
  }) {
731
- const [y, S] = V({
731
+ const [x, I] = T({
732
732
  value: n,
733
733
  defaultValue: t ?? null,
734
734
  onChange: r
735
- }), k = e.find((A) => A.value === y) ?? null, [C, D] = V({
735
+ }), b = e.find((P) => P.value === x) ?? null, [N, C] = T({
736
736
  value: l,
737
- defaultValue: (k == null ? void 0 : k.label) ?? "",
738
- onChange: s
739
- }), [$, L] = T(!1), q = M(null), _ = P(), U = d ?? _, O = i ?? Te, E = e.filter((A) => O(A, C)), I = R(() => L(!1), []), F = R(
740
- (A) => {
741
- const j = E[A];
742
- !j || j.disabled || (S(j.value), D(j.label), I());
737
+ defaultValue: (b == null ? void 0 : b.label) ?? "",
738
+ onChange: i
739
+ }), [D, $] = M(!1), E = O(null), U = F(), G = d ?? U, L = s ?? Ae, R = e.filter((P) => L(P, N)), V = A(() => $(!1), []), K = A(
740
+ (P) => {
741
+ const j = R[P];
742
+ !j || j.disabled || (I(j.value), C(j.label), V());
743
743
  },
744
- [E, S, D, I]
745
- ), { activeIndex: J, setActiveIndex: te, handleKeyDown: we } = ee({
746
- itemCount: E.length,
747
- isOpen: $,
748
- onSelect: F,
749
- onClose: I
744
+ [R, I, C, V]
745
+ ), { activeIndex: J, setActiveIndex: ae, handleKeyDown: De } = re({
746
+ itemCount: R.length,
747
+ isOpen: D,
748
+ onSelect: K,
749
+ onClose: V
750
750
  });
751
- return /* @__PURE__ */ a(K, { id: U, label: x, required: b, error: w, helpText: g, className: v, children: /* @__PURE__ */ p("div", { className: "position-relative", children: [
751
+ return /* @__PURE__ */ a(B, { id: G, label: w, required: v, error: S, helpText: y, className: g, children: /* @__PURE__ */ p("div", { className: "position-relative", children: [
752
752
  /* @__PURE__ */ a(
753
753
  "input",
754
754
  {
755
- ref: q,
756
- id: U,
755
+ ref: E,
756
+ id: G,
757
757
  name: u,
758
758
  type: "text",
759
- className: f("form-control", w && "is-invalid"),
759
+ className: f("form-control", S && "is-invalid"),
760
760
  disabled: h,
761
761
  readOnly: m,
762
- required: b,
763
- placeholder: N,
762
+ required: v,
763
+ placeholder: k,
764
764
  autoComplete: "off",
765
765
  role: "combobox",
766
- "aria-expanded": $,
766
+ "aria-expanded": D,
767
767
  "aria-haspopup": "listbox",
768
- value: C,
769
- onFocus: () => L(!0),
770
- onChange: (A) => {
771
- const j = A.target.value;
772
- D(j), L(!0), y !== null && S(null);
768
+ value: N,
769
+ onFocus: () => $(!0),
770
+ onChange: (P) => {
771
+ const j = P.target.value;
772
+ C(j), $(!0), x !== null && I(null);
773
773
  },
774
- onKeyDown: we
774
+ onKeyDown: De
775
775
  }
776
776
  ),
777
- /* @__PURE__ */ a(G, { open: $, onClose: I, anchorRef: q, className: "dropdown-menu w-100", role: "listbox", children: c ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: "Loading…" }) : E.length === 0 ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: o }) : E.map((A, j) => /* @__PURE__ */ a(
777
+ /* @__PURE__ */ a(W, { open: D, onClose: V, anchorRef: E, className: "dropdown-menu w-100", role: "listbox", children: o ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: "Loading…" }) : R.length === 0 ? /* @__PURE__ */ a("div", { className: "px-3 py-2 text-body-secondary", children: c }) : R.map((P, j) => /* @__PURE__ */ a(
778
778
  "div",
779
779
  {
780
780
  role: "option",
781
- "aria-selected": A.value === y,
782
- className: f("dropdown-item", j === J && "active", A.disabled && "disabled"),
783
- onMouseEnter: () => te(j),
784
- onMouseDown: (xe) => {
785
- xe.preventDefault(), A.disabled || F(j);
781
+ "aria-selected": P.value === x,
782
+ className: f("dropdown-item", j === J && "active", P.disabled && "disabled"),
783
+ onMouseEnter: () => ae(j),
784
+ onMouseDown: (Ve) => {
785
+ Ve.preventDefault(), P.disabled || K(j);
786
786
  },
787
- children: A.label
787
+ children: P.label
788
788
  },
789
- String(A.value)
789
+ String(P.value)
790
790
  )) })
791
791
  ] }) });
792
792
  }
793
- function Sn(e) {
794
- return /* @__PURE__ */ a(K, { ...e });
793
+ function Wn(e) {
794
+ return /* @__PURE__ */ a(B, { ...e });
795
795
  }
796
- function Ee({ open: e, onClose: n, title: t, children: r, footer: l, className: s }) {
797
- return le(e, n), e ? /* @__PURE__ */ p(X, { children: [
798
- /* @__PURE__ */ a("div", { className: "modal d-block", tabIndex: -1, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ a("div", { className: f("modal-dialog", s), role: "document", children: /* @__PURE__ */ p("div", { className: "modal-content", children: [
796
+ function Pe({ open: e, onClose: n, title: t, children: r, footer: l, className: i }) {
797
+ return ie(e, n), e ? /* @__PURE__ */ p(H, { children: [
798
+ /* @__PURE__ */ a("div", { className: "modal d-block", tabIndex: -1, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ a("div", { className: f("modal-dialog", i), role: "document", children: /* @__PURE__ */ p("div", { className: "modal-content", children: [
799
799
  /* @__PURE__ */ p("div", { className: "modal-header", children: [
800
800
  t && /* @__PURE__ */ a("h5", { className: "modal-title", children: t }),
801
801
  /* @__PURE__ */ a("button", { type: "button", className: "btn-close", "aria-label": "Close", onClick: n })
@@ -806,16 +806,16 @@ function Ee({ open: e, onClose: n, title: t, children: r, footer: l, className:
806
806
  /* @__PURE__ */ a("div", { className: "modal-backdrop show", onClick: n })
807
807
  ] }) : null;
808
808
  }
809
- function Re(e, n, t) {
810
- const r = [], l = Math.max(1, e - t), s = Math.min(n, e + t);
809
+ function Fe(e, n, t) {
810
+ const r = [], l = Math.max(1, e - t), i = Math.min(n, e + t);
811
811
  l > 1 && (r.push(1), l > 2 && r.push("ellipsis"));
812
- for (let c = l; c <= s; c++)
813
- r.push(c);
814
- return s < n && (s < n - 1 && r.push("ellipsis"), r.push(n)), r;
812
+ for (let o = l; o <= i; o++)
813
+ r.push(o);
814
+ return i < n && (i < n - 1 && r.push("ellipsis"), r.push(n)), r;
815
815
  }
816
- function $e({ currentPage: e, pageSize: n, totalItems: t, onPageChange: r, siblingCount: l = 1, className: s }) {
817
- const c = Math.max(1, Math.ceil(t / n)), o = Re(e, c, l);
818
- return /* @__PURE__ */ a("nav", { "aria-label": "Pagination", className: s, children: /* @__PURE__ */ p("ul", { className: "pagination mb-0", children: [
816
+ function Ke({ currentPage: e, pageSize: n, totalItems: t, onPageChange: r, siblingCount: l = 1, className: i }) {
817
+ const o = Math.max(1, Math.ceil(t / n)), c = Fe(e, o, l);
818
+ return /* @__PURE__ */ a("nav", { "aria-label": "Pagination", className: i, children: /* @__PURE__ */ p("ul", { className: "pagination mb-0", children: [
819
819
  /* @__PURE__ */ a("li", { className: f("page-item", e <= 1 && "disabled"), children: /* @__PURE__ */ a(
820
820
  "button",
821
821
  {
@@ -826,122 +826,156 @@ function $e({ currentPage: e, pageSize: n, totalItems: t, onPageChange: r, sibli
826
826
  children: "Previous"
827
827
  }
828
828
  ) }),
829
- o.map(
830
- (i, d) => i === "ellipsis" ? /* @__PURE__ */ a("li", { className: "page-item disabled", children: /* @__PURE__ */ a("span", { className: "page-link", children: "…" }) }, `ellipsis-${d}`) : /* @__PURE__ */ a("li", { className: f("page-item", i === e && "active"), children: /* @__PURE__ */ a(
829
+ c.map(
830
+ (s, d) => s === "ellipsis" ? /* @__PURE__ */ a("li", { className: "page-item disabled", children: /* @__PURE__ */ a("span", { className: "page-link", children: "…" }) }, `ellipsis-${d}`) : /* @__PURE__ */ a("li", { className: f("page-item", s === e && "active"), children: /* @__PURE__ */ a(
831
831
  "button",
832
832
  {
833
833
  type: "button",
834
834
  className: "page-link",
835
- "aria-current": i === e ? "page" : void 0,
836
- onClick: () => r(i),
837
- children: i
835
+ "aria-current": s === e ? "page" : void 0,
836
+ onClick: () => r(s),
837
+ children: s
838
838
  }
839
- ) }, i)
839
+ ) }, s)
840
840
  ),
841
- /* @__PURE__ */ a("li", { className: f("page-item", e >= c && "disabled"), children: /* @__PURE__ */ a(
841
+ /* @__PURE__ */ a("li", { className: f("page-item", e >= o && "disabled"), children: /* @__PURE__ */ a(
842
842
  "button",
843
843
  {
844
844
  type: "button",
845
845
  className: "page-link",
846
- disabled: e >= c,
846
+ disabled: e >= o,
847
847
  onClick: () => r(e + 1),
848
848
  children: "Next"
849
849
  }
850
850
  ) })
851
851
  ] }) });
852
852
  }
853
- function Oe(e, n) {
853
+ const Be = {
854
+ text: (e) => e == null ? "" : String(e),
855
+ boolean: (e) => e ? "Yes" : "No",
856
+ date: (e) => {
857
+ if (e == null || e === "")
858
+ return "";
859
+ const n = e instanceof Date ? e : new Date(String(e));
860
+ return Number.isNaN(n.getTime()) ? String(e) : n.toLocaleDateString();
861
+ },
862
+ currency: (e) => {
863
+ const n = Number(e);
864
+ return Number.isFinite(n) ? n.toLocaleString(void 0, { style: "currency", currency: "USD" }) : String(e ?? "");
865
+ }
866
+ };
867
+ function je(e, n) {
854
868
  return !e || e.key !== n ? { key: n, direction: "asc" } : e.direction === "asc" ? { key: n, direction: "desc" } : null;
855
869
  }
856
- function Ae({
870
+ function ce(e) {
871
+ return e.key ?? e.field ?? e.header;
872
+ }
873
+ function He(e, n) {
874
+ const t = e.field ?? e.key;
875
+ return t ? n[t] : void 0;
876
+ }
877
+ function _e(e, n) {
878
+ if (e.render)
879
+ return e.render(n);
880
+ const t = He(e, n);
881
+ return e.formatter ? e.formatter(t, n) : e.format ? Be[e.format](t) : t == null ? "" : String(t);
882
+ }
883
+ function de(e) {
884
+ return e && `text-${e}`;
885
+ }
886
+ function Ue({
857
887
  columns: e,
858
888
  rows: n,
859
889
  rowKey: t,
860
890
  loading: r,
861
891
  error: l,
862
- emptyText: s = "No data",
863
- className: c,
864
- selectedRowKeys: o,
865
- onSelectionChange: i,
892
+ emptyText: i = "No data",
893
+ className: o,
894
+ selectedRowKeys: c,
895
+ onSelectionChange: s,
866
896
  sort: d,
867
897
  onSortChange: u,
868
898
  page: h,
869
899
  pageSize: m,
870
- totalCount: b,
871
- onPageChange: v
900
+ totalCount: v,
901
+ onPageChange: g
872
902
  }) {
873
- const x = !!i, N = new Set(o ?? []), g = h !== void 0 && m !== void 0 && b !== void 0, w = g ? Math.max(1, Math.ceil(b / m)) : 1;
874
- function y() {
875
- i && (N.size === n.length ? i([]) : i(n.map(t)));
903
+ const w = !!s, k = new Set(c ?? []), y = h !== void 0 && m !== void 0 && v !== void 0, S = y ? Math.max(1, Math.ceil(v / m)) : 1;
904
+ function x() {
905
+ s && (k.size === n.length ? s([]) : s(n.map(t)));
876
906
  }
877
- function S(k) {
878
- if (!i)
907
+ function I(b) {
908
+ if (!s)
879
909
  return;
880
- const C = new Set(N);
881
- C.has(k) ? C.delete(k) : C.add(k), i(Array.from(C));
910
+ const N = new Set(k);
911
+ N.has(b) ? N.delete(b) : N.add(b), s(Array.from(N));
882
912
  }
883
- return /* @__PURE__ */ p("div", { className: f("table-responsive", c), children: [
913
+ return /* @__PURE__ */ p("div", { className: f("table-responsive", o), children: [
884
914
  /* @__PURE__ */ p("table", { className: "table table-hover align-middle", children: [
885
915
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ p("tr", { children: [
886
- x && /* @__PURE__ */ a("th", { style: { width: "2.5rem" }, children: /* @__PURE__ */ a(
916
+ w && /* @__PURE__ */ a("th", { style: { width: "2.5rem" }, children: /* @__PURE__ */ a(
887
917
  "input",
888
918
  {
889
919
  type: "checkbox",
890
920
  className: "form-check-input",
891
- checked: n.length > 0 && N.size === n.length,
892
- onChange: y,
921
+ checked: n.length > 0 && k.size === n.length,
922
+ onChange: x,
893
923
  "aria-label": "Select all rows"
894
924
  }
895
925
  ) }),
896
- e.map((k) => /* @__PURE__ */ p(
897
- "th",
898
- {
899
- style: { width: k.width },
900
- role: k.sortable ? "button" : void 0,
901
- onClick: k.sortable && u ? () => u(Oe(d, k.key)) : void 0,
902
- children: [
903
- k.header,
904
- k.sortable && (d == null ? void 0 : d.key) === k.key && /* @__PURE__ */ p("span", { "aria-hidden": "true", children: [
905
- " ",
906
- d.direction === "asc" ? "▲" : "▼"
907
- ] })
908
- ]
909
- },
910
- k.key
911
- ))
926
+ e.map((b) => {
927
+ const N = ce(b);
928
+ return /* @__PURE__ */ p(
929
+ "th",
930
+ {
931
+ className: de(b.headerAlign ?? b.align),
932
+ style: { width: b.width, minWidth: b.minWidth, maxWidth: b.maxWidth },
933
+ role: b.sortable ? "button" : void 0,
934
+ onClick: b.sortable && u ? () => u(je(d, N)) : void 0,
935
+ children: [
936
+ b.header,
937
+ b.sortable && (d == null ? void 0 : d.key) === N && /* @__PURE__ */ p("span", { "aria-hidden": "true", children: [
938
+ " ",
939
+ d.direction === "asc" ? "▲" : "▼"
940
+ ] })
941
+ ]
942
+ },
943
+ N
944
+ );
945
+ })
912
946
  ] }) }),
913
- /* @__PURE__ */ a("tbody", { children: r ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: e.length + (x ? 1 : 0), className: "text-center text-body-secondary py-4", children: "Loading…" }) }) : l ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: e.length + (x ? 1 : 0), className: "text-center text-danger py-4", children: l }) }) : n.length === 0 ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: e.length + (x ? 1 : 0), className: "text-center text-body-secondary py-4", children: s }) }) : n.map((k) => {
914
- const C = t(k);
947
+ /* @__PURE__ */ a("tbody", { children: r ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: e.length + (w ? 1 : 0), className: "text-center text-body-secondary py-4", children: "Loading…" }) }) : l ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: e.length + (w ? 1 : 0), className: "text-center text-danger py-4", children: l }) }) : n.length === 0 ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: e.length + (w ? 1 : 0), className: "text-center text-body-secondary py-4", children: i }) }) : n.map((b) => {
948
+ const N = t(b);
915
949
  return /* @__PURE__ */ p("tr", { children: [
916
- x && /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(
950
+ w && /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(
917
951
  "input",
918
952
  {
919
953
  type: "checkbox",
920
954
  className: "form-check-input",
921
- checked: N.has(C),
922
- onChange: () => S(C),
955
+ checked: k.has(N),
956
+ onChange: () => I(N),
923
957
  "aria-label": "Select row"
924
958
  }
925
959
  ) }),
926
- e.map((D) => /* @__PURE__ */ a("td", { children: D.render ? D.render(k) : String(k[D.key] ?? "") }, D.key))
927
- ] }, C);
960
+ e.map((C) => /* @__PURE__ */ a("td", { className: de(C.align), children: _e(C, b) }, ce(C)))
961
+ ] }, N);
928
962
  }) })
929
963
  ] }),
930
- g && /* @__PURE__ */ p("div", { className: "d-flex justify-content-between align-items-center mt-2", children: [
964
+ y && /* @__PURE__ */ p("div", { className: "d-flex justify-content-between align-items-center mt-2", children: [
931
965
  /* @__PURE__ */ p("span", { className: "text-body-secondary small", children: [
932
966
  "Page ",
933
967
  h,
934
968
  " of ",
935
- w,
969
+ S,
936
970
  " (",
937
- b,
971
+ v,
938
972
  " rows)"
939
973
  ] }),
940
- /* @__PURE__ */ a($e, { currentPage: h, pageSize: m, totalItems: b, onPageChange: v })
974
+ /* @__PURE__ */ a(Ke, { currentPage: h, pageSize: m, totalItems: v, onPageChange: g })
941
975
  ] })
942
976
  ] });
943
977
  }
944
- function Pe({ size: e = "md", variant: n, className: t, label: r = "Loading..." }) {
978
+ function qe({ size: e = "md", variant: n, className: t, label: r = "Loading..." }) {
945
979
  return /* @__PURE__ */ a(
946
980
  "span",
947
981
  {
@@ -951,153 +985,254 @@ function Pe({ size: e = "md", variant: n, className: t, label: r = "Loading..."
951
985
  }
952
986
  );
953
987
  }
954
- function re({
988
+ function te({
955
989
  variant: e = "primary",
956
990
  size: n,
957
991
  disabled: t,
958
992
  loading: r,
959
993
  type: l = "button",
960
- className: s,
961
- children: c,
962
- onClick: o,
963
- ...i
994
+ className: i,
995
+ children: o,
996
+ onClick: c,
997
+ ...s
964
998
  }) {
965
999
  const d = t || r;
966
1000
  return /* @__PURE__ */ p(
967
1001
  "button",
968
1002
  {
969
1003
  type: l,
970
- className: f("btn", `btn-${e}`, n && `btn-${n}`, s),
1004
+ className: f("btn", `btn-${e}`, n && `btn-${n}`, i),
971
1005
  disabled: d,
972
1006
  "aria-busy": r || void 0,
973
- onClick: d ? void 0 : o,
974
- ...i,
1007
+ onClick: d ? void 0 : c,
1008
+ ...s,
975
1009
  children: [
976
- r && /* @__PURE__ */ a(Pe, { size: "sm", className: "me-2", label: "" }),
977
- c
1010
+ r && /* @__PURE__ */ a(qe, { size: "sm", className: "me-2", label: "" }),
1011
+ o
978
1012
  ]
979
1013
  }
980
1014
  );
981
1015
  }
982
- function ve({ variant: e = "info", dismissible: n, onDismiss: t, className: r, children: l }) {
1016
+ function xe({ variant: e = "info", dismissible: n, onDismiss: t, className: r, children: l }) {
983
1017
  return /* @__PURE__ */ p("div", { className: f("alert", `alert-${e}`, n && "alert-dismissible", r), role: "alert", children: [
984
1018
  l,
985
1019
  n && /* @__PURE__ */ a("button", { type: "button", className: "btn-close", "aria-label": "Close", onClick: t })
986
1020
  ] });
987
1021
  }
988
- const pe = ce(null), Fe = 4e3;
989
- function Cn({ children: e }) {
990
- const [n, t] = T([]), r = M(0), l = M(/* @__PURE__ */ new Map());
991
- B(() => {
992
- const i = l.current;
1022
+ const we = he(null), ze = 4e3;
1023
+ function Jn({ children: e }) {
1024
+ const [n, t] = M([]), r = O(0), l = O(/* @__PURE__ */ new Map());
1025
+ _(() => {
1026
+ const s = l.current;
993
1027
  return () => {
994
- i.forEach(clearTimeout), i.clear();
1028
+ s.forEach(clearTimeout), s.clear();
995
1029
  };
996
1030
  }, []);
997
- const s = R((i) => {
998
- const d = l.current.get(i);
999
- d && (clearTimeout(d), l.current.delete(i)), t((u) => u.filter((h) => h.id !== i));
1000
- }, []), c = R(
1001
- (i, d) => {
1002
- const u = r.current++, h = (d == null ? void 0 : d.variant) ?? "info", m = (d == null ? void 0 : d.duration) ?? Fe;
1003
- return t((b) => [...b, { id: u, message: i, variant: h }]), m > 0 && l.current.set(
1031
+ const i = A((s) => {
1032
+ const d = l.current.get(s);
1033
+ d && (clearTimeout(d), l.current.delete(s)), t((u) => u.filter((h) => h.id !== s));
1034
+ }, []), o = A(
1035
+ (s, d) => {
1036
+ const u = r.current++, h = (d == null ? void 0 : d.variant) ?? "info", m = (d == null ? void 0 : d.duration) ?? ze;
1037
+ return t((v) => [...v, { id: u, message: s, variant: h }]), m > 0 && l.current.set(
1004
1038
  u,
1005
- setTimeout(() => s(u), m)
1039
+ setTimeout(() => i(u), m)
1006
1040
  ), u;
1007
1041
  },
1008
- [s]
1009
- ), o = W(
1042
+ [i]
1043
+ ), c = ne(
1010
1044
  () => ({
1011
- show: c,
1012
- dismiss: s,
1013
- success: (i, d) => c(i, { ...d, variant: "success" }),
1014
- error: (i, d) => c(i, { ...d, variant: "danger" }),
1015
- info: (i, d) => c(i, { ...d, variant: "info" }),
1016
- warning: (i, d) => c(i, { ...d, variant: "warning" })
1045
+ show: o,
1046
+ dismiss: i,
1047
+ success: (s, d) => o(s, { ...d, variant: "success" }),
1048
+ error: (s, d) => o(s, { ...d, variant: "danger" }),
1049
+ info: (s, d) => o(s, { ...d, variant: "info" }),
1050
+ warning: (s, d) => o(s, { ...d, variant: "warning" })
1017
1051
  }),
1018
- [c, s]
1052
+ [o, i]
1019
1053
  );
1020
- return /* @__PURE__ */ p(pe.Provider, { value: o, children: [
1054
+ return /* @__PURE__ */ p(we.Provider, { value: c, children: [
1021
1055
  e,
1022
- /* @__PURE__ */ a("div", { className: "toast-container position-fixed bottom-0 end-0 p-3", style: { zIndex: 1090 }, children: n.map((i) => /* @__PURE__ */ a(ve, { variant: i.variant, dismissible: !0, onDismiss: () => s(i.id), className: "shadow-sm", children: i.message }, i.id)) })
1056
+ /* @__PURE__ */ a("div", { className: "toast-container position-fixed bottom-0 end-0 p-3", style: { zIndex: 1090 }, children: n.map((s) => /* @__PURE__ */ a(xe, { variant: s.variant, dismissible: !0, onDismiss: () => i(s.id), className: "shadow-sm", children: s.message }, s.id)) })
1023
1057
  ] });
1024
1058
  }
1025
- function In() {
1026
- const e = de(pe);
1059
+ function Zn() {
1060
+ const e = be(we);
1027
1061
  if (!e)
1028
1062
  throw new Error("useToast must be used within a ToastProvider");
1029
1063
  return e;
1030
1064
  }
1031
- const ge = ce(null);
1032
- function Dn({ children: e }) {
1033
- const [n, t] = T(null), r = R((s) => new Promise((c) => {
1034
- t({ ...s, resolve: c });
1035
- }), []), l = R(
1036
- (s) => {
1037
- n == null || n.resolve(s), t(null);
1065
+ const ke = he(null);
1066
+ function Yn({ children: e }) {
1067
+ const [n, t] = M(null), r = A((i) => new Promise((o) => {
1068
+ t({ ...i, resolve: o });
1069
+ }), []), l = A(
1070
+ (i) => {
1071
+ n == null || n.resolve(i), t(null);
1038
1072
  },
1039
1073
  [n]
1040
1074
  );
1041
- return /* @__PURE__ */ p(ge.Provider, { value: r, children: [
1075
+ return /* @__PURE__ */ p(ke.Provider, { value: r, children: [
1042
1076
  e,
1043
1077
  /* @__PURE__ */ a(
1044
- Ee,
1078
+ Pe,
1045
1079
  {
1046
1080
  open: n !== null,
1047
1081
  onClose: () => l(!1),
1048
1082
  title: (n == null ? void 0 : n.title) ?? "Confirm",
1049
- footer: /* @__PURE__ */ p(X, { children: [
1050
- /* @__PURE__ */ a(re, { variant: "outline-secondary", onClick: () => l(!1), children: (n == null ? void 0 : n.cancelLabel) ?? "Cancel" }),
1051
- /* @__PURE__ */ a(re, { variant: (n == null ? void 0 : n.confirmVariant) ?? "danger", onClick: () => l(!0), children: (n == null ? void 0 : n.confirmLabel) ?? "Confirm" })
1083
+ footer: /* @__PURE__ */ p(H, { children: [
1084
+ /* @__PURE__ */ a(te, { variant: "outline-secondary", onClick: () => l(!1), children: (n == null ? void 0 : n.cancelLabel) ?? "Cancel" }),
1085
+ /* @__PURE__ */ a(te, { variant: (n == null ? void 0 : n.confirmVariant) ?? "danger", onClick: () => l(!0), children: (n == null ? void 0 : n.confirmLabel) ?? "Confirm" })
1052
1086
  ] }),
1053
1087
  children: n == null ? void 0 : n.message
1054
1088
  }
1055
1089
  )
1056
1090
  ] });
1057
1091
  }
1058
- function Vn() {
1059
- const e = de(ge);
1092
+ function Qn() {
1093
+ const e = be(ke);
1060
1094
  if (!e)
1061
1095
  throw new Error("useConfirm must be used within a ConfirmProvider");
1062
1096
  return e;
1063
1097
  }
1064
- function Tn({ variant: e = "primary", pill: n, className: t, children: r }) {
1098
+ function Ge({ variant: e = "primary", pill: n, className: t, children: r }) {
1065
1099
  return /* @__PURE__ */ a("span", { className: f("badge", `bg-${e}`, n && "rounded-pill", t), children: r });
1066
1100
  }
1067
- function Mn({ items: e, activeKey: n, defaultActiveKey: t, onChange: r, className: l }) {
1068
- var i;
1069
- const [s, c] = V({
1101
+ const We = {
1102
+ sm: "0.875em",
1103
+ lg: "1.5em",
1104
+ xl: "2em"
1105
+ };
1106
+ function se({ name: e, size: n, className: t, label: r }) {
1107
+ return /* @__PURE__ */ a(
1108
+ "i",
1109
+ {
1110
+ className: f(e, t),
1111
+ style: n ? { fontSize: We[n] } : void 0,
1112
+ role: r ? "img" : void 0,
1113
+ "aria-label": r,
1114
+ "aria-hidden": r ? void 0 : !0
1115
+ }
1116
+ );
1117
+ }
1118
+ function Je(e) {
1119
+ switch (e) {
1120
+ case "pill":
1121
+ return "nav-pills";
1122
+ case "underline":
1123
+ return "nav-underline";
1124
+ case "card":
1125
+ return "nav-tabs card-header-tabs";
1126
+ default:
1127
+ return "nav-tabs";
1128
+ }
1129
+ }
1130
+ const Ze = {
1131
+ sm: "small",
1132
+ lg: "fs-5"
1133
+ };
1134
+ function Xn({ items: e, activeKey: n, defaultActiveKey: t, onChange: r, variant: l = "default", orientation: i = "horizontal", size: o, stretch: c, className: s }) {
1135
+ var I;
1136
+ const [d, u] = T({
1070
1137
  value: n,
1071
- defaultValue: t ?? ((i = e[0]) == null ? void 0 : i.key) ?? "",
1138
+ defaultValue: t ?? ((I = e[0]) == null ? void 0 : I.key) ?? "",
1072
1139
  onChange: r
1073
- }), o = e.find((d) => d.key === s);
1074
- return /* @__PURE__ */ p("div", { className: l, children: [
1075
- /* @__PURE__ */ a("ul", { className: "nav nav-tabs", role: "tablist", children: e.map((d) => /* @__PURE__ */ a("li", { className: "nav-item", role: "presentation", children: /* @__PURE__ */ a(
1076
- "button",
1077
- {
1078
- type: "button",
1079
- className: f("nav-link", d.key === s && "active"),
1080
- role: "tab",
1081
- "aria-selected": d.key === s,
1082
- disabled: d.disabled,
1083
- onClick: () => c(d.key),
1084
- children: d.label
1085
- }
1086
- ) }, d.key)) }),
1087
- /* @__PURE__ */ a("div", { className: "tab-content pt-3", role: "tabpanel", children: o == null ? void 0 : o.content })
1140
+ }), h = e.find((b) => b.key === d), m = l === "button", v = i === "vertical", g = O([]);
1141
+ function w(b, N) {
1142
+ var D;
1143
+ const C = e[b];
1144
+ C && (u(C.key), N && ((D = g.current[b]) == null || D.focus()));
1145
+ }
1146
+ function k(b, N) {
1147
+ var D;
1148
+ if (e.length === 0)
1149
+ return b;
1150
+ let C = b;
1151
+ for (let $ = 0; $ < e.length; $++)
1152
+ if (C = (C + N + e.length) % e.length, !((D = e[C]) != null && D.disabled))
1153
+ return C;
1154
+ return b;
1155
+ }
1156
+ function y(b) {
1157
+ var $;
1158
+ const N = e.findIndex((E) => E.key === d), C = v ? "ArrowDown" : "ArrowRight", D = v ? "ArrowUp" : "ArrowLeft";
1159
+ if (b.key === C)
1160
+ b.preventDefault(), w(k(N, 1), !0);
1161
+ else if (b.key === D)
1162
+ b.preventDefault(), w(k(N, -1), !0);
1163
+ else if (b.key === "Home") {
1164
+ b.preventDefault();
1165
+ const E = e.findIndex((U) => !U.disabled);
1166
+ E >= 0 && w(E, !0);
1167
+ } else if (b.key === "End") {
1168
+ b.preventDefault();
1169
+ for (let E = e.length - 1; E >= 0; E--)
1170
+ if (!(($ = e[E]) != null && $.disabled)) {
1171
+ w(E, !0);
1172
+ break;
1173
+ }
1174
+ }
1175
+ }
1176
+ const S = /* @__PURE__ */ a(
1177
+ "div",
1178
+ {
1179
+ className: f(
1180
+ m ? "btn-group" : "nav",
1181
+ !m && Je(l),
1182
+ !m && v && "flex-column",
1183
+ !m && c && "nav-fill",
1184
+ !m && o && Ze[o]
1185
+ ),
1186
+ role: "tablist",
1187
+ "aria-orientation": i,
1188
+ onKeyDown: y,
1189
+ children: e.map((b, N) => {
1190
+ const C = b.key === d, D = /* @__PURE__ */ p(H, { children: [
1191
+ b.icon && /* @__PURE__ */ a(se, { name: b.icon, size: "sm", className: "me-1" }),
1192
+ b.label,
1193
+ b.badge != null && /* @__PURE__ */ a(Ge, { variant: C && !m ? "primary" : "secondary", pill: !0, className: "ms-2", children: b.badge })
1194
+ ] }), $ = /* @__PURE__ */ a(
1195
+ "button",
1196
+ {
1197
+ ref: (E) => {
1198
+ g.current[N] = E;
1199
+ },
1200
+ type: "button",
1201
+ id: `tab-${b.key}`,
1202
+ className: f(m ? f("btn", o ? `btn-${o}` : "btn-sm", C ? "btn-primary" : "btn-outline-primary") : f("nav-link", C && "active")),
1203
+ role: "tab",
1204
+ "aria-selected": C,
1205
+ "aria-controls": `tabpanel-${b.key}`,
1206
+ tabIndex: C ? 0 : -1,
1207
+ disabled: b.disabled,
1208
+ onClick: () => w(N, !1),
1209
+ children: D
1210
+ },
1211
+ b.key
1212
+ );
1213
+ return m ? $ : /* @__PURE__ */ a("div", { className: "nav-item", role: "presentation", children: $ }, b.key);
1214
+ })
1215
+ }
1216
+ ), x = (h == null ? void 0 : h.content) != null && /* @__PURE__ */ a("div", { id: `tabpanel-${h.key}`, className: f("tab-content", !v && "pt-3"), role: "tabpanel", "aria-labelledby": `tab-${h.key}`, children: h.content });
1217
+ return v ? /* @__PURE__ */ p("div", { className: f("d-flex align-items-start gap-3", s), children: [
1218
+ S,
1219
+ x && /* @__PURE__ */ a("div", { className: "flex-grow-1", children: x })
1220
+ ] }) : /* @__PURE__ */ p("div", { className: s, children: [
1221
+ S,
1222
+ x
1088
1223
  ] });
1089
1224
  }
1090
- function Le({ items: e, multiple: n = !1, openKeys: t, defaultOpenKeys: r, onChange: l, className: s }) {
1091
- const [c, o] = V({
1225
+ function Ye({ items: e, multiple: n = !1, openKeys: t, defaultOpenKeys: r, onChange: l, className: i }) {
1226
+ const [o, c] = T({
1092
1227
  value: t,
1093
1228
  defaultValue: r ?? [],
1094
1229
  onChange: l
1095
- }), i = new Set(c);
1230
+ }), s = new Set(o);
1096
1231
  function d(u) {
1097
- i.has(u) ? o(c.filter((h) => h !== u)) : o(n ? [...c, u] : [u]);
1232
+ s.has(u) ? c(o.filter((h) => h !== u)) : c(n ? [...o, u] : [u]);
1098
1233
  }
1099
- return /* @__PURE__ */ a("div", { className: f("accordion", s), children: e.map((u) => {
1100
- const h = i.has(u.key);
1234
+ return /* @__PURE__ */ a("div", { className: f("accordion", i), children: e.map((u) => {
1235
+ const h = s.has(u.key);
1101
1236
  return /* @__PURE__ */ p("div", { className: "accordion-item", children: [
1102
1237
  /* @__PURE__ */ a("h2", { className: "accordion-header", children: /* @__PURE__ */ a(
1103
1238
  "button",
@@ -1114,44 +1249,44 @@ function Le({ items: e, multiple: n = !1, openKeys: t, defaultOpenKeys: r, onCha
1114
1249
  ] }, u.key);
1115
1250
  }) });
1116
1251
  }
1117
- function En({ content: e, children: n, placement: t = "top", className: r }) {
1118
- const [l, s] = T(!1), c = M(null), o = P();
1252
+ function Qe({ content: e, children: n, placement: t = "top", className: r }) {
1253
+ const [l, i] = M(!1), o = O(null), c = F();
1119
1254
  return /* @__PURE__ */ p(
1120
1255
  "span",
1121
1256
  {
1122
- ref: c,
1257
+ ref: o,
1123
1258
  className: "position-relative d-inline-block",
1124
- onMouseEnter: () => s(!0),
1125
- onMouseLeave: () => s(!1),
1126
- onFocus: () => s(!0),
1127
- onBlur: () => s(!1),
1128
- "aria-describedby": l ? o : void 0,
1259
+ onMouseEnter: () => i(!0),
1260
+ onMouseLeave: () => i(!1),
1261
+ onFocus: () => i(!0),
1262
+ onBlur: () => i(!1),
1263
+ "aria-describedby": l ? c : void 0,
1129
1264
  children: [
1130
1265
  n,
1131
1266
  /* @__PURE__ */ a(
1132
- G,
1267
+ W,
1133
1268
  {
1134
1269
  open: l,
1135
- onClose: () => s(!1),
1136
- anchorRef: c,
1270
+ onClose: () => i(!1),
1271
+ anchorRef: o,
1137
1272
  className: f("tooltip show", `bs-tooltip-${t}`, "position-absolute", "w-auto", r),
1138
- children: /* @__PURE__ */ a("span", { id: o, role: "tooltip", className: "tooltip-inner", children: e })
1273
+ children: /* @__PURE__ */ a("span", { id: c, role: "tooltip", className: "tooltip-inner", children: e })
1139
1274
  }
1140
1275
  )
1141
1276
  ]
1142
1277
  }
1143
1278
  );
1144
1279
  }
1145
- function Rn({ title: e, content: n, children: t, placement: r = "bottom", className: l }) {
1146
- const [s, c] = T(!1), o = M(null);
1147
- return /* @__PURE__ */ p("span", { ref: o, className: "position-relative d-inline-block", onClick: () => c((i) => !i), children: [
1280
+ function et({ title: e, content: n, children: t, placement: r = "bottom", className: l }) {
1281
+ const [i, o] = M(!1), c = O(null);
1282
+ return /* @__PURE__ */ p("span", { ref: c, className: "position-relative d-inline-block", onClick: () => o((s) => !s), children: [
1148
1283
  t,
1149
1284
  /* @__PURE__ */ p(
1150
- G,
1285
+ W,
1151
1286
  {
1152
- open: s,
1153
- onClose: () => c(!1),
1154
- anchorRef: o,
1287
+ open: i,
1288
+ onClose: () => o(!1),
1289
+ anchorRef: c,
1155
1290
  className: f("popover show", `bs-popover-${r}`, "position-absolute", "w-auto", l),
1156
1291
  children: [
1157
1292
  e && /* @__PURE__ */ a("h3", { className: "popover-header", children: e }),
@@ -1161,21 +1296,10 @@ function Rn({ title: e, content: n, children: t, placement: r = "bottom", classN
1161
1296
  )
1162
1297
  ] });
1163
1298
  }
1164
- function $n({ header: e, footer: n, className: t, children: r }) {
1165
- return /* @__PURE__ */ p("div", { className: f("card", t), children: [
1166
- e && /* @__PURE__ */ a("div", { className: "card-header", children: e }),
1167
- /* @__PURE__ */ a("div", { className: "card-body", children: r }),
1168
- n && /* @__PURE__ */ a("div", { className: "card-footer", children: n })
1169
- ] });
1170
- }
1171
- function On({ className: e, vertical: n, label: t }) {
1172
- return n ? /* @__PURE__ */ a("div", { className: f("vr", e), role: "separator", "aria-orientation": "vertical" }) : t ? /* @__PURE__ */ p("div", { className: f("d-flex align-items-center gap-2 my-3", e), role: "separator", children: [
1173
- /* @__PURE__ */ a("hr", { className: "flex-grow-1 m-0" }),
1174
- /* @__PURE__ */ a("span", { className: "text-body-secondary small", children: t }),
1175
- /* @__PURE__ */ a("hr", { className: "flex-grow-1 m-0" })
1176
- ] }) : /* @__PURE__ */ a("hr", { className: f("my-3", e), role: "separator" });
1299
+ function ee({ width: e = "100%", height: n = "1rem", circle: t, className: r }) {
1300
+ return /* @__PURE__ */ a("span", { className: f("placeholder-glow d-inline-block", r), style: { width: e, height: n }, "aria-hidden": "true", children: /* @__PURE__ */ a("span", { className: f("placeholder w-100 h-100 d-block", t && "rounded-circle") }) });
1177
1301
  }
1178
- function An({ direction: e = "column", gap: n = 2, align: t, justify: r, wrap: l, className: s, children: c }) {
1302
+ function Se({ direction: e = "column", gap: n = 2, align: t, justify: r, wrap: l, className: i, children: o }) {
1179
1303
  return /* @__PURE__ */ a(
1180
1304
  "div",
1181
1305
  {
@@ -1186,19 +1310,87 @@ function An({ direction: e = "column", gap: n = 2, align: t, justify: r, wrap: l
1186
1310
  t && `align-items-${t}`,
1187
1311
  r && `justify-content-${r}`,
1188
1312
  l && "flex-wrap",
1189
- s
1313
+ i
1190
1314
  ),
1191
- children: c
1315
+ children: o
1192
1316
  }
1193
1317
  );
1194
1318
  }
1195
- function Pn({ fluid: e, className: n, children: t }) {
1319
+ const Xe = {
1320
+ xs: "0.75rem",
1321
+ sm: "0.875rem",
1322
+ md: "1rem",
1323
+ lg: "1.25rem",
1324
+ xl: "1.5rem"
1325
+ }, en = {
1326
+ normal: "fw-normal",
1327
+ medium: "fw-medium",
1328
+ semibold: "fw-semibold",
1329
+ bold: "fw-bold"
1330
+ }, nn = {
1331
+ default: void 0,
1332
+ muted: "text-body-secondary",
1333
+ primary: "text-primary",
1334
+ success: "text-success",
1335
+ danger: "text-danger",
1336
+ warning: "text-warning",
1337
+ info: "text-info"
1338
+ };
1339
+ function q({ as: e, size: n = "md", weight: t, tone: r = "default", align: l, truncate: i, wrap: o = !0, className: c, children: s }) {
1340
+ return /* @__PURE__ */ a(
1341
+ e ?? "span",
1342
+ {
1343
+ className: f(
1344
+ t && en[t],
1345
+ nn[r],
1346
+ l && `text-${l}`,
1347
+ i && "text-truncate",
1348
+ !o && !i && "text-nowrap",
1349
+ c
1350
+ ),
1351
+ style: { fontSize: Xe[n] },
1352
+ children: s
1353
+ }
1354
+ );
1355
+ }
1356
+ function tn({ title: e, subtitle: n, icon: t, avatar: r, actions: l }) {
1357
+ return /* @__PURE__ */ p("div", { className: "d-flex align-items-center justify-content-between gap-3", children: [
1358
+ /* @__PURE__ */ p("div", { className: "d-flex align-items-center gap-3", style: { minWidth: 0 }, children: [
1359
+ r || t && /* @__PURE__ */ a("span", { className: "fs-2 lh-1", children: t }),
1360
+ (e || n) && /* @__PURE__ */ p("div", { style: { minWidth: 0 }, children: [
1361
+ e && /* @__PURE__ */ a(q, { as: "div", size: "lg", weight: "semibold", truncate: !0, children: e }),
1362
+ n && /* @__PURE__ */ a(q, { as: "div", size: "sm", tone: "muted", truncate: !0, children: n })
1363
+ ] })
1364
+ ] }),
1365
+ l && /* @__PURE__ */ a("div", { className: "d-flex align-items-center gap-2 flex-shrink-0", children: l })
1366
+ ] });
1367
+ }
1368
+ function nt({ title: e, subtitle: n, icon: t, avatar: r, actions: l, header: i, footer: o, loading: c, className: s, children: d }) {
1369
+ const h = i ?? (!!(e || n || t || r || l) ? /* @__PURE__ */ a(tn, { title: e, subtitle: n, icon: t, avatar: r, actions: l }) : void 0);
1370
+ return /* @__PURE__ */ p("div", { className: f("card", s), children: [
1371
+ h && /* @__PURE__ */ a("div", { className: "card-header", children: h }),
1372
+ /* @__PURE__ */ a("div", { className: "card-body", children: c ? /* @__PURE__ */ p(Se, { gap: 2, children: [
1373
+ /* @__PURE__ */ a(ee, { height: "1rem", width: "60%" }),
1374
+ /* @__PURE__ */ a(ee, { height: "1rem" }),
1375
+ /* @__PURE__ */ a(ee, { height: "1rem", width: "80%" })
1376
+ ] }) : d }),
1377
+ o && /* @__PURE__ */ a("div", { className: "card-footer", children: o })
1378
+ ] });
1379
+ }
1380
+ function tt({ className: e, vertical: n, label: t }) {
1381
+ return n ? /* @__PURE__ */ a("div", { className: f("vr", e), role: "separator", "aria-orientation": "vertical" }) : t ? /* @__PURE__ */ p("div", { className: f("d-flex align-items-center gap-2 my-3", e), role: "separator", children: [
1382
+ /* @__PURE__ */ a("hr", { className: "flex-grow-1 m-0" }),
1383
+ /* @__PURE__ */ a("span", { className: "text-body-secondary small", children: t }),
1384
+ /* @__PURE__ */ a("hr", { className: "flex-grow-1 m-0" })
1385
+ ] }) : /* @__PURE__ */ a("hr", { className: f("my-3", e), role: "separator" });
1386
+ }
1387
+ function rt({ fluid: e, className: n, children: t }) {
1196
1388
  return /* @__PURE__ */ a("div", { className: f(e ? "container-fluid" : "container", n), children: t });
1197
1389
  }
1198
- function Fn({ className: e, children: n }) {
1390
+ function lt({ className: e, children: n }) {
1199
1391
  return /* @__PURE__ */ a("div", { className: f("row", e), children: n });
1200
1392
  }
1201
- function Ln({ span: e, sm: n, md: t, lg: r, xl: l, className: s, children: c }) {
1393
+ function at({ span: e, sm: n, md: t, lg: r, xl: l, className: i, children: o }) {
1202
1394
  return /* @__PURE__ */ a(
1203
1395
  "div",
1204
1396
  {
@@ -1208,70 +1400,70 @@ function Ln({ span: e, sm: n, md: t, lg: r, xl: l, className: s, children: c })
1208
1400
  t ? `col-md-${t}` : void 0,
1209
1401
  r ? `col-lg-${r}` : void 0,
1210
1402
  l ? `col-xl-${l}` : void 0,
1211
- s
1403
+ i
1212
1404
  ),
1213
- children: c
1405
+ children: o
1214
1406
  }
1215
1407
  );
1216
1408
  }
1217
- function Ke({ items: e, className: n }) {
1409
+ function rn({ items: e, className: n }) {
1218
1410
  return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", className: n, children: /* @__PURE__ */ a("ol", { className: "breadcrumb mb-0", children: e.map((t, r) => {
1219
- const l = r === e.length - 1, s = !l && (t.href || t.onClick);
1220
- return /* @__PURE__ */ a("li", { className: f("breadcrumb-item", l && "active"), "aria-current": l ? "page" : void 0, children: s ? /* @__PURE__ */ a(
1411
+ const l = r === e.length - 1, i = !l && (t.href || t.onClick);
1412
+ return /* @__PURE__ */ a("li", { className: f("breadcrumb-item", l && "active"), "aria-current": l ? "page" : void 0, children: i ? /* @__PURE__ */ a(
1221
1413
  "a",
1222
1414
  {
1223
1415
  href: t.href ?? "#",
1224
- onClick: (c) => {
1225
- var o;
1226
- t.href || c.preventDefault(), (o = t.onClick) == null || o.call(t);
1416
+ onClick: (o) => {
1417
+ var c;
1418
+ t.href || o.preventDefault(), (c = t.onClick) == null || c.call(t);
1227
1419
  },
1228
1420
  children: t.label
1229
1421
  }
1230
1422
  ) : t.label }, r);
1231
1423
  }) }) });
1232
1424
  }
1233
- function Kn({ items: e, children: n, placement: t = "start", className: r }) {
1234
- const [l, s] = T(!1), c = M(null), o = R(() => s(!1), []), i = R(
1425
+ function it({ items: e, children: n, placement: t = "start", className: r }) {
1426
+ const [l, i] = M(!1), o = O(null), c = A(() => i(!1), []), s = A(
1235
1427
  (m) => {
1236
- var v;
1237
- const b = e[m];
1238
- !b || b.disabled || ((v = b.onSelect) == null || v.call(b), o());
1428
+ var g;
1429
+ const v = e[m];
1430
+ !v || v.disabled || ((g = v.onSelect) == null || g.call(v), c());
1239
1431
  },
1240
- [e, o]
1241
- ), { activeIndex: d, setActiveIndex: u, handleKeyDown: h } = ee({
1432
+ [e, c]
1433
+ ), { activeIndex: d, setActiveIndex: u, handleKeyDown: h } = re({
1242
1434
  itemCount: e.length,
1243
1435
  isOpen: l,
1244
- onSelect: i,
1245
- onClose: o
1436
+ onSelect: s,
1437
+ onClose: c
1246
1438
  });
1247
1439
  return /* @__PURE__ */ p(
1248
1440
  "span",
1249
1441
  {
1250
- ref: c,
1442
+ ref: o,
1251
1443
  className: "position-relative d-inline-block",
1252
- onClick: () => s((m) => !m),
1444
+ onClick: () => i((m) => !m),
1253
1445
  onKeyDown: h,
1254
1446
  children: [
1255
1447
  n,
1256
1448
  /* @__PURE__ */ a(
1257
- G,
1449
+ W,
1258
1450
  {
1259
1451
  open: l,
1260
- onClose: o,
1261
- anchorRef: c,
1452
+ onClose: c,
1453
+ anchorRef: o,
1262
1454
  role: "menu",
1263
1455
  className: f("dropdown-menu show", t === "end" && "dropdown-menu-end", r),
1264
- children: e.map((m, b) => /* @__PURE__ */ a(
1456
+ children: e.map((m, v) => /* @__PURE__ */ a(
1265
1457
  "button",
1266
1458
  {
1267
1459
  type: "button",
1268
1460
  role: "menuitem",
1269
- className: f("dropdown-item", b === d && "active", m.disabled && "disabled", m.danger && "text-danger"),
1461
+ className: f("dropdown-item", v === d && "active", m.disabled && "disabled", m.danger && "text-danger"),
1270
1462
  disabled: m.disabled,
1271
- onMouseEnter: () => u(b),
1272
- onMouseDown: (v) => v.preventDefault(),
1273
- onClick: (v) => {
1274
- v.stopPropagation(), i(b);
1463
+ onMouseEnter: () => u(v),
1464
+ onMouseDown: (g) => g.preventDefault(),
1465
+ onClick: (g) => {
1466
+ g.stopPropagation(), s(v);
1275
1467
  },
1276
1468
  children: m.label
1277
1469
  },
@@ -1283,44 +1475,44 @@ function Kn({ items: e, children: n, placement: t = "start", className: r }) {
1283
1475
  }
1284
1476
  );
1285
1477
  }
1286
- function jn({ steps: e, currentStep: n, className: t }) {
1478
+ function st({ steps: e, currentStep: n, className: t }) {
1287
1479
  return /* @__PURE__ */ a("ol", { className: f("d-flex list-unstyled align-items-center", t), children: e.map((r, l) => {
1288
- const s = l < n ? "complete" : l === n ? "active" : "upcoming", c = l === e.length - 1;
1289
- return /* @__PURE__ */ p("li", { className: f("d-flex align-items-center", !c && "flex-grow-1"), children: [
1480
+ const i = l < n ? "complete" : l === n ? "active" : "upcoming", o = l === e.length - 1;
1481
+ return /* @__PURE__ */ p("li", { className: f("d-flex align-items-center", !o && "flex-grow-1"), children: [
1290
1482
  /* @__PURE__ */ p("div", { className: "d-flex align-items-center gap-2", children: [
1291
1483
  /* @__PURE__ */ a(
1292
1484
  "span",
1293
1485
  {
1294
1486
  className: f(
1295
1487
  "d-flex align-items-center justify-content-center rounded-circle flex-shrink-0",
1296
- s === "complete" ? "bg-primary text-white" : s === "active" ? "border border-primary text-primary" : "border text-body-secondary"
1488
+ i === "complete" ? "bg-primary text-white" : i === "active" ? "border border-primary text-primary" : "border text-body-secondary"
1297
1489
  ),
1298
1490
  style: { width: "2rem", height: "2rem" },
1299
- "aria-current": s === "active" ? "step" : void 0,
1300
- children: s === "complete" ? "✓" : l + 1
1491
+ "aria-current": i === "active" ? "step" : void 0,
1492
+ children: i === "complete" ? "✓" : l + 1
1301
1493
  }
1302
1494
  ),
1303
1495
  /* @__PURE__ */ p("div", { children: [
1304
- /* @__PURE__ */ a("div", { className: f("small fw-semibold", s === "upcoming" && "text-body-secondary"), children: r.label }),
1496
+ /* @__PURE__ */ a("div", { className: f("small fw-semibold", i === "upcoming" && "text-body-secondary"), children: r.label }),
1305
1497
  r.description && /* @__PURE__ */ a("div", { className: "small text-body-secondary", children: r.description })
1306
1498
  ] })
1307
1499
  ] }),
1308
- !c && /* @__PURE__ */ a("hr", { className: "flex-grow-1 mx-2" })
1500
+ !o && /* @__PURE__ */ a("hr", { className: "flex-grow-1 mx-2" })
1309
1501
  ] }, r.key);
1310
1502
  }) });
1311
1503
  }
1312
- function je(e) {
1313
- var l, s;
1314
- const n = e.trim().split(/\s+/), t = ((l = n[0]) == null ? void 0 : l[0]) ?? "", r = n.length > 1 ? ((s = n[n.length - 1]) == null ? void 0 : s[0]) ?? "" : "";
1504
+ function ln(e) {
1505
+ var l, i;
1506
+ const n = e.trim().split(/\s+/), t = ((l = n[0]) == null ? void 0 : l[0]) ?? "", r = n.length > 1 ? ((i = n[n.length - 1]) == null ? void 0 : i[0]) ?? "" : "";
1315
1507
  return (t + r).toUpperCase();
1316
1508
  }
1317
- const Be = {
1509
+ const an = {
1318
1510
  sm: "1.75rem",
1319
1511
  md: "2.5rem",
1320
1512
  lg: "3.5rem"
1321
1513
  };
1322
- function Bn({ src: e, name: n, size: t = "md", className: r }) {
1323
- const l = Be[t];
1514
+ function ot({ src: e, name: n, size: t = "md", className: r }) {
1515
+ const l = an[t];
1324
1516
  return e ? /* @__PURE__ */ a(
1325
1517
  "img",
1326
1518
  {
@@ -1336,11 +1528,11 @@ function Bn({ src: e, name: n, size: t = "md", className: r }) {
1336
1528
  style: { width: l, height: l, fontSize: `calc(${l} * 0.4)` },
1337
1529
  role: n ? "img" : void 0,
1338
1530
  "aria-label": n,
1339
- children: n ? je(n) : null
1531
+ children: n ? ln(n) : null
1340
1532
  }
1341
1533
  );
1342
1534
  }
1343
- function Hn({ variant: e = "secondary", onRemove: n, className: t, children: r }) {
1535
+ function ct({ variant: e = "secondary", onRemove: n, className: t, children: r }) {
1344
1536
  return /* @__PURE__ */ p("span", { className: f("badge d-inline-flex align-items-center gap-1", `bg-${e}`, t), children: [
1345
1537
  r,
1346
1538
  n && /* @__PURE__ */ a(
@@ -1355,93 +1547,73 @@ function Hn({ variant: e = "secondary", onRemove: n, className: t, children: r }
1355
1547
  )
1356
1548
  ] });
1357
1549
  }
1358
- function qn({ width: e = "100%", height: n = "1rem", circle: t, className: r }) {
1359
- return /* @__PURE__ */ a("span", { className: f("placeholder-glow d-inline-block", r), style: { width: e, height: n }, "aria-hidden": "true", children: /* @__PURE__ */ a("span", { className: f("placeholder w-100 h-100 d-block", t && "rounded-circle") }) });
1360
- }
1361
- function Un({
1550
+ function dt({
1362
1551
  value: e,
1363
1552
  defaultValue: n,
1364
1553
  onChange: t,
1365
1554
  min: r = 0,
1366
1555
  max: l = 100,
1367
- step: s = 1,
1368
- id: c,
1369
- name: o,
1370
- disabled: i,
1556
+ step: i = 1,
1557
+ id: o,
1558
+ name: c,
1559
+ disabled: s,
1371
1560
  required: d,
1372
1561
  className: u,
1373
1562
  label: h,
1374
1563
  helpText: m,
1375
- error: b
1564
+ error: v
1376
1565
  }) {
1377
- const [v, x] = V({
1566
+ const [g, w] = T({
1378
1567
  value: e,
1379
1568
  defaultValue: n ?? r,
1380
1569
  onChange: t
1381
- }), N = P(), g = c ?? N;
1382
- return /* @__PURE__ */ p(K, { id: g, label: h, required: d, error: b, helpText: m, className: u, children: [
1570
+ }), k = F(), y = o ?? k;
1571
+ return /* @__PURE__ */ p(B, { id: y, label: h, required: d, error: v, helpText: m, className: u, children: [
1383
1572
  /* @__PURE__ */ a(
1384
1573
  "input",
1385
1574
  {
1386
- id: g,
1387
- name: o,
1575
+ id: y,
1576
+ name: c,
1388
1577
  type: "range",
1389
1578
  className: "form-range",
1390
- disabled: i,
1579
+ disabled: s,
1391
1580
  required: d,
1392
1581
  min: r,
1393
1582
  max: l,
1394
- step: s,
1395
- value: v,
1396
- onChange: (w) => x(Number(w.target.value))
1583
+ step: i,
1584
+ value: g,
1585
+ onChange: (S) => w(Number(S.target.value))
1397
1586
  }
1398
1587
  ),
1399
- /* @__PURE__ */ a("div", { className: "small text-body-secondary", children: v })
1588
+ /* @__PURE__ */ a("div", { className: "small text-body-secondary", children: g })
1400
1589
  ] });
1401
1590
  }
1402
- function Gn({ value: e, defaultValue: n, onChange: t, max: r = 5, disabled: l, className: s }) {
1403
- const [c, o] = V({
1591
+ function ut({ value: e, defaultValue: n, onChange: t, max: r = 5, disabled: l, className: i }) {
1592
+ const [o, c] = T({
1404
1593
  value: e,
1405
1594
  defaultValue: n ?? 0,
1406
1595
  onChange: t
1407
1596
  });
1408
- return /* @__PURE__ */ a("div", { className: f("d-inline-flex gap-1", s), role: "radiogroup", "aria-label": "Rating", children: Array.from({ length: r }, (i, d) => d + 1).map((i) => /* @__PURE__ */ a(
1597
+ return /* @__PURE__ */ a("div", { className: f("d-inline-flex gap-1", i), role: "radiogroup", "aria-label": "Rating", children: Array.from({ length: r }, (s, d) => d + 1).map((s) => /* @__PURE__ */ a(
1409
1598
  "button",
1410
1599
  {
1411
1600
  type: "button",
1412
1601
  className: "btn btn-link p-0 border-0",
1413
1602
  disabled: l,
1414
1603
  role: "radio",
1415
- "aria-checked": i === c,
1416
- "aria-label": `${i} star${i > 1 ? "s" : ""}`,
1417
- onClick: () => o(i),
1418
- children: /* @__PURE__ */ a("span", { "aria-hidden": "true", style: { fontSize: "1.25rem", color: i <= c ? "#f5b301" : "#ced4da" }, children: "★" })
1604
+ "aria-checked": s === o,
1605
+ "aria-label": `${s} star${s > 1 ? "s" : ""}`,
1606
+ onClick: () => c(s),
1607
+ children: /* @__PURE__ */ a("span", { "aria-hidden": "true", style: { fontSize: "1.25rem", color: s <= o ? "#f5b301" : "#ced4da" }, children: "★" })
1419
1608
  },
1420
- i
1609
+ s
1421
1610
  )) });
1422
1611
  }
1423
- function _n({ value: e, variant: n = "primary", label: t, className: r }) {
1612
+ function ft({ value: e, variant: n = "primary", label: t, className: r }) {
1424
1613
  const l = Math.max(0, Math.min(100, e));
1425
1614
  return /* @__PURE__ */ a("div", { className: f("progress", r), role: "progressbar", "aria-valuenow": l, "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ a("div", { className: f("progress-bar", `bg-${n}`), style: { width: `${l}%` }, children: t ? `${Math.round(l)}%` : null }) });
1426
1615
  }
1427
- const He = {
1428
- sm: "0.875em",
1429
- lg: "1.5em",
1430
- xl: "2em"
1431
- };
1432
- function Jn({ name: e, size: n, className: t, label: r }) {
1433
- return /* @__PURE__ */ a(
1434
- "i",
1435
- {
1436
- className: f(e, t),
1437
- style: n ? { fontSize: He[n] } : void 0,
1438
- role: r ? "img" : void 0,
1439
- "aria-label": r,
1440
- "aria-hidden": r ? void 0 : !0
1441
- }
1442
- );
1443
- }
1444
- function Yn({ brand: e, start: n, end: t, variant: r = "light", className: l }) {
1616
+ function mt({ brand: e, start: n, end: t, variant: r = "light", className: l }) {
1445
1617
  return /* @__PURE__ */ a(
1446
1618
  "nav",
1447
1619
  {
@@ -1458,10 +1630,10 @@ function Yn({ brand: e, start: n, end: t, variant: r = "light", className: l })
1458
1630
  }
1459
1631
  );
1460
1632
  }
1461
- function qe(e) {
1633
+ function sn(e) {
1462
1634
  return "items" in e;
1463
1635
  }
1464
- function se({ item: e }) {
1636
+ function ue({ item: e }) {
1465
1637
  return /* @__PURE__ */ p(
1466
1638
  "a",
1467
1639
  {
@@ -1480,12 +1652,12 @@ function se({ item: e }) {
1480
1652
  }
1481
1653
  );
1482
1654
  }
1483
- function zn({ sections: e, header: n, footer: t, className: r }) {
1655
+ function ht({ sections: e, header: n, footer: t, className: r }) {
1484
1656
  return /* @__PURE__ */ p("div", { className: f("d-flex flex-column h-100", r), children: [
1485
1657
  n && /* @__PURE__ */ a("div", { className: "p-3 border-bottom", children: n }),
1486
1658
  /* @__PURE__ */ a("nav", { className: "nav flex-column flex-grow-1 p-2 gap-1", children: e.map(
1487
- (l) => qe(l) ? /* @__PURE__ */ a(
1488
- Le,
1659
+ (l) => sn(l) ? /* @__PURE__ */ a(
1660
+ Ye,
1489
1661
  {
1490
1662
  className: "border-0",
1491
1663
  defaultOpenKeys: l.defaultOpen ? [l.key] : [],
@@ -1493,19 +1665,19 @@ function zn({ sections: e, header: n, footer: t, className: r }) {
1493
1665
  {
1494
1666
  key: l.key,
1495
1667
  header: l.label,
1496
- content: /* @__PURE__ */ a("div", { className: "nav flex-column ps-2 gap-1", children: l.items.map((s) => /* @__PURE__ */ a(se, { item: s }, s.key)) })
1668
+ content: /* @__PURE__ */ a("div", { className: "nav flex-column ps-2 gap-1", children: l.items.map((i) => /* @__PURE__ */ a(ue, { item: i }, i.key)) })
1497
1669
  }
1498
1670
  ]
1499
1671
  },
1500
1672
  l.key
1501
- ) : /* @__PURE__ */ a(se, { item: l }, l.key)
1673
+ ) : /* @__PURE__ */ a(ue, { item: l }, l.key)
1502
1674
  ) }),
1503
1675
  t && /* @__PURE__ */ a("div", { className: "p-3 border-top", children: t })
1504
1676
  ] });
1505
1677
  }
1506
- function Zn({ title: e, description: n, breadcrumbItems: t, actions: r, className: l }) {
1678
+ function bt({ title: e, description: n, breadcrumbItems: t, actions: r, className: l }) {
1507
1679
  return /* @__PURE__ */ p("div", { className: f("mb-4", l), children: [
1508
- t && t.length > 0 && /* @__PURE__ */ a(Ke, { items: t, className: "mb-2" }),
1680
+ t && t.length > 0 && /* @__PURE__ */ a(rn, { items: t, className: "mb-2" }),
1509
1681
  /* @__PURE__ */ p("div", { className: "d-flex align-items-start justify-content-between gap-3 flex-wrap", children: [
1510
1682
  /* @__PURE__ */ p("div", { children: [
1511
1683
  /* @__PURE__ */ a("h1", { className: "h3 mb-1", children: e }),
@@ -1515,12 +1687,131 @@ function Zn({ title: e, description: n, breadcrumbItems: t, actions: r, classNam
1515
1687
  ] })
1516
1688
  ] });
1517
1689
  }
1518
- class Ue extends Error {
1690
+ const on = {
1691
+ xs: 1,
1692
+ sm: 2,
1693
+ md: 3,
1694
+ lg: 4,
1695
+ xl: 5
1696
+ };
1697
+ function cn(e) {
1698
+ return typeof e == "number" ? e : on[e];
1699
+ }
1700
+ function pt({ direction: e = "row", gap: n = "sm", grow: t, shrink: r, fullWidth: l, className: i, ...o }) {
1701
+ return /* @__PURE__ */ a(
1702
+ Se,
1703
+ {
1704
+ direction: e,
1705
+ gap: cn(n),
1706
+ className: f(t && "flex-grow-1", r && "flex-shrink-0", l && "w-100", i),
1707
+ ...o
1708
+ }
1709
+ );
1710
+ }
1711
+ function vt({ icon: e, "aria-label": n, iconSize: t, tooltip: r, variant: l = "light", loading: i, className: o, ...c }) {
1712
+ const s = /* @__PURE__ */ a(te, { variant: l, loading: i, className: f("btn-icon", o), "aria-label": n, ...c, children: !i && /* @__PURE__ */ a(se, { name: e, size: t }) });
1713
+ return r ? /* @__PURE__ */ a(Qe, { content: r, children: s }) : s;
1714
+ }
1715
+ function gt({ leading: e, title: n, description: t, trailing: r, onClick: l, disabled: i, dense: o, className: c }) {
1716
+ const s = /* @__PURE__ */ p(H, { children: [
1717
+ e && /* @__PURE__ */ a("span", { className: "flex-shrink-0 d-inline-flex align-items-center", children: e }),
1718
+ /* @__PURE__ */ p("span", { className: "flex-grow-1", style: { minWidth: 0 }, children: [
1719
+ /* @__PURE__ */ a("span", { className: "d-block text-truncate", children: n }),
1720
+ t && /* @__PURE__ */ a("span", { className: "d-block text-truncate small text-body-secondary", children: t })
1721
+ ] }),
1722
+ r && /* @__PURE__ */ a("span", { className: "flex-shrink-0 d-inline-flex align-items-center", children: r })
1723
+ ] }), d = f(
1724
+ "d-flex align-items-center text-start",
1725
+ o ? "gap-2 py-1" : "gap-3 py-2",
1726
+ l && "w-100 border-0 bg-transparent",
1727
+ i && "opacity-50",
1728
+ c
1729
+ );
1730
+ return l ? /* @__PURE__ */ a("button", { type: "button", className: d, onClick: l, disabled: i, children: s }) : /* @__PURE__ */ a("div", { className: d, "aria-disabled": i || void 0, children: s });
1731
+ }
1732
+ function dn(e, n, t, r) {
1733
+ if (e.length === 0)
1734
+ return [];
1735
+ const l = Math.min(...e), o = Math.max(...e) - l || 1, c = n - r * 2, s = t - r * 2, d = e.length > 1 ? c / (e.length - 1) : 0;
1736
+ return e.map((u, h) => {
1737
+ const m = r + d * h, v = r + s - (u - l) / o * s;
1738
+ return [m, v];
1739
+ });
1740
+ }
1741
+ function un({ type: e, data: n, width: t, height: r, strokeWidth: l }) {
1742
+ const i = l, o = dn(n, t, r, i);
1743
+ if (o.length === 0)
1744
+ return null;
1745
+ const c = o.map(([s, d]) => `${s},${d}`).join(" ");
1746
+ return /* @__PURE__ */ p(H, { children: [
1747
+ e === "area" && /* @__PURE__ */ a(
1748
+ "polygon",
1749
+ {
1750
+ points: `${i},${r - i} ${c} ${t - i},${r - i}`,
1751
+ fill: "currentColor",
1752
+ opacity: 0.2,
1753
+ stroke: "none"
1754
+ }
1755
+ ),
1756
+ /* @__PURE__ */ a("polyline", { points: c, fill: "none", stroke: "currentColor", strokeWidth: l, strokeLinecap: "round", strokeLinejoin: "round" })
1757
+ ] });
1758
+ }
1759
+ function fn({ data: e, width: n, height: t }) {
1760
+ if (e.length === 0)
1761
+ return null;
1762
+ const r = Math.min(0, ...e), i = Math.max(0, ...e) - r || 1, o = 2, c = Math.max((n - o * (e.length - 1)) / e.length, 1);
1763
+ return /* @__PURE__ */ a(H, { children: e.map((s, d) => {
1764
+ const u = Math.max((s - r) / i * t, 1), h = d * (c + o), m = t - u;
1765
+ return /* @__PURE__ */ a("rect", { x: h, y: m, width: c, height: u, rx: 1, fill: "currentColor" }, d);
1766
+ }) });
1767
+ }
1768
+ function yt({ type: e = "line", data: n, tone: t = "primary", width: r = 80, height: l = 28, strokeWidth: i = 2, className: o, label: c }) {
1769
+ return /* @__PURE__ */ a(
1770
+ "svg",
1771
+ {
1772
+ width: r,
1773
+ height: l,
1774
+ viewBox: `0 0 ${r} ${l}`,
1775
+ className: f(`text-${t}`, o),
1776
+ role: c ? "img" : void 0,
1777
+ "aria-label": c,
1778
+ "aria-hidden": c ? void 0 : !0,
1779
+ children: e === "bar" ? /* @__PURE__ */ a(fn, { data: n, width: r, height: l }) : /* @__PURE__ */ a(un, { type: e, data: n, width: r, height: l, strokeWidth: i })
1780
+ }
1781
+ );
1782
+ }
1783
+ const mn = {
1784
+ up: "success",
1785
+ down: "danger",
1786
+ neutral: "muted"
1787
+ }, hn = {
1788
+ up: "bi bi-arrow-up-short",
1789
+ down: "bi bi-arrow-down-short",
1790
+ neutral: "bi bi-dash"
1791
+ };
1792
+ function bn(e, n) {
1793
+ return typeof e == "number" && n != null ? e.toFixed(n) : String(e);
1794
+ }
1795
+ function Nt({ label: e, value: n, prefix: t, suffix: r, precision: l, trend: i, delta: o, loading: c, className: s }) {
1796
+ return /* @__PURE__ */ p("div", { className: f("d-flex flex-column gap-1", s), children: [
1797
+ /* @__PURE__ */ a(q, { size: "sm", tone: "muted", children: e }),
1798
+ c ? /* @__PURE__ */ a(ee, { height: "1.75rem", width: "60%" }) : /* @__PURE__ */ p("div", { className: "d-flex align-items-baseline gap-1", children: [
1799
+ t && /* @__PURE__ */ a(q, { size: "lg", weight: "semibold", children: t }),
1800
+ /* @__PURE__ */ a(q, { size: "xl", weight: "bold", children: bn(n, l) }),
1801
+ r && /* @__PURE__ */ a(q, { size: "lg", weight: "semibold", children: r })
1802
+ ] }),
1803
+ !c && (i || o != null) && /* @__PURE__ */ p(q, { size: "sm", tone: i ? mn[i] : "muted", className: "d-inline-flex align-items-center gap-1", children: [
1804
+ i && /* @__PURE__ */ a(se, { name: hn[i], size: "sm" }),
1805
+ o
1806
+ ] })
1807
+ ] });
1808
+ }
1809
+ class pn extends Error {
1519
1810
  constructor(n, t, r) {
1520
1811
  super(`HTTP ${n} ${t} for ${r}`), this.name = "HttpError", this.status = n, this.statusText = t, this.url = r;
1521
1812
  }
1522
1813
  }
1523
- function Ge(e) {
1814
+ function vn(e) {
1524
1815
  if (!e)
1525
1816
  return "";
1526
1817
  const n = new URLSearchParams();
@@ -1529,60 +1820,60 @@ function Ge(e) {
1529
1820
  const t = n.toString();
1530
1821
  return t ? `?${t}` : "";
1531
1822
  }
1532
- function _e(e = {}) {
1823
+ function gn(e = {}) {
1533
1824
  const { baseUrl: n = "", fetcher: t = fetch, buildRequestInit: r } = e;
1534
1825
  return {
1535
- async get(l, s = {}) {
1536
- const c = `${n}${l}${Ge(s.params)}`;
1537
- let o = { method: "GET", signal: s.signal };
1538
- r && (o = r(c, o));
1539
- const i = await t(c, o);
1540
- if (!i.ok)
1541
- throw new Ue(i.status, i.statusText, c);
1542
- return await i.json();
1826
+ async get(l, i = {}) {
1827
+ const o = `${n}${l}${vn(i.params)}`;
1828
+ let c = { method: "GET", signal: i.signal };
1829
+ r && (c = r(o, c));
1830
+ const s = await t(o, c);
1831
+ if (!s.ok)
1832
+ throw new pn(s.status, s.statusText, o);
1833
+ return await s.json();
1543
1834
  }
1544
1835
  };
1545
1836
  }
1546
- const Je = _e();
1547
- function Ye(e) {
1837
+ const yn = gn();
1838
+ function Nn(e) {
1548
1839
  return Object.keys(e).sort().reduce((n, t) => (n[t] = e[t], n), {});
1549
1840
  }
1550
- function z({
1551
- client: e = Je,
1841
+ function Y({
1842
+ client: e = yn,
1552
1843
  url: n,
1553
1844
  params: t,
1554
1845
  mapResponse: r,
1555
1846
  enabled: l = !0
1556
1847
  }) {
1557
- const [s, c] = T("idle"), [o, i] = T([]), [d, u] = T(null), [h, m] = T(0), b = W(() => t ? JSON.stringify(Ye(t)) : "", [t]), v = M(0), x = M(r);
1558
- x.current = r, B(() => {
1848
+ const [i, o] = M("idle"), [c, s] = M([]), [d, u] = M(null), [h, m] = M(0), v = ne(() => t ? JSON.stringify(Nn(t)) : "", [t]), g = O(0), w = O(r);
1849
+ w.current = r, _(() => {
1559
1850
  if (!l || !n) {
1560
- c("idle"), i([]), u(null);
1851
+ o("idle"), s([]), u(null);
1561
1852
  return;
1562
1853
  }
1563
- const g = ++v.current, w = new AbortController();
1564
- return c("loading"), u(null), e.get(n, { params: t, signal: w.signal }).then((y) => {
1565
- if (g !== v.current)
1854
+ const y = ++g.current, S = new AbortController();
1855
+ return o("loading"), u(null), e.get(n, { params: t, signal: S.signal }).then((x) => {
1856
+ if (y !== g.current)
1566
1857
  return;
1567
- const S = x.current(y);
1568
- i(S), c(S.length === 0 ? "empty" : "success");
1569
- }).catch((y) => {
1570
- g === v.current && (y instanceof DOMException && y.name === "AbortError" || (u(y instanceof Error ? y : new Error(String(y))), c("error")));
1858
+ const I = w.current(x);
1859
+ s(I), o(I.length === 0 ? "empty" : "success");
1860
+ }).catch((x) => {
1861
+ y === g.current && (x instanceof DOMException && x.name === "AbortError" || (u(x instanceof Error ? x : new Error(String(x))), o("error")));
1571
1862
  }), () => {
1572
- w.abort();
1863
+ S.abort();
1573
1864
  };
1574
- }, [e, n, b, l, h]);
1575
- const N = R(() => m((g) => g + 1), []);
1576
- return { state: s, items: o, error: d, reload: N };
1865
+ }, [e, n, v, l, h]);
1866
+ const k = A(() => m((y) => y + 1), []);
1867
+ return { state: i, items: c, error: d, reload: k };
1577
1868
  }
1578
- function ze(e, n) {
1579
- const [t, r] = T(e);
1580
- return B(() => {
1869
+ function xn(e, n) {
1870
+ const [t, r] = M(e);
1871
+ return _(() => {
1581
1872
  const l = setTimeout(() => r(e), n);
1582
1873
  return () => clearTimeout(l);
1583
1874
  }, [e, n]), t;
1584
1875
  }
1585
- function Z(e) {
1876
+ function Q(e) {
1586
1877
  if (Array.isArray(e))
1587
1878
  return e;
1588
1879
  if (e && typeof e == "object" && Array.isArray(e.items))
@@ -1591,7 +1882,7 @@ function Z(e) {
1591
1882
  "Unable to normalize remote response into an array. Provide an explicit `mapResponse` for this endpoint's response shape."
1592
1883
  );
1593
1884
  }
1594
- function ne(e, n, t) {
1885
+ function le(e, n, t) {
1595
1886
  if (e === null || typeof e != "object")
1596
1887
  throw new Error("Remote item is not an object; cannot read valueMember/displayMember from it.");
1597
1888
  const r = e;
@@ -1600,151 +1891,151 @@ function ne(e, n, t) {
1600
1891
  label: String(r[t] ?? "")
1601
1892
  };
1602
1893
  }
1603
- function Ze({
1894
+ function wn({
1604
1895
  url: e,
1605
1896
  params: n,
1606
1897
  valueMember: t,
1607
1898
  displayMember: r,
1608
1899
  mapResponse: l,
1609
- client: s,
1610
- enabled: c,
1611
- ...o
1900
+ client: i,
1901
+ enabled: o,
1902
+ ...c
1612
1903
  }) {
1613
- const { state: i, items: d, error: u } = z({
1614
- client: s,
1904
+ const { state: s, items: d, error: u } = Y({
1905
+ client: i,
1615
1906
  url: e,
1616
1907
  params: n,
1617
- enabled: c,
1618
- mapResponse: (m) => (l ? l(m) : Z(m)).map((v) => ne(v, t, r))
1619
- }), h = o.error ?? (i === "error" ? (u == null ? void 0 : u.message) ?? "Failed to load options" : void 0);
1620
- return /* @__PURE__ */ a(Ve, { ...o, options: d, loading: i === "loading", error: h });
1908
+ enabled: o,
1909
+ mapResponse: (m) => (l ? l(m) : Q(m)).map((g) => le(g, t, r))
1910
+ }), h = c.error ?? (s === "error" ? (u == null ? void 0 : u.message) ?? "Failed to load options" : void 0);
1911
+ return /* @__PURE__ */ a(Re, { ...c, options: d, loading: s === "loading", error: h });
1621
1912
  }
1622
- function Qn({
1913
+ function xt({
1623
1914
  url: e,
1624
1915
  params: n,
1625
1916
  searchParam: t,
1626
1917
  valueMember: r,
1627
1918
  displayMember: l,
1628
- mapResponse: s,
1629
- minSearchLength: c = 1,
1630
- debounceMs: o = 300,
1631
- client: i,
1919
+ mapResponse: i,
1920
+ minSearchLength: o = 1,
1921
+ debounceMs: c = 300,
1922
+ client: s,
1632
1923
  inputValue: d,
1633
1924
  onInputValueChange: u,
1634
1925
  ...h
1635
1926
  }) {
1636
- const [m, b] = V({
1927
+ const [m, v] = T({
1637
1928
  value: d,
1638
1929
  defaultValue: "",
1639
1930
  onChange: u
1640
- }), v = ze(m, o), x = v.length >= c, { state: N, items: g, error: w } = z({
1641
- client: i,
1931
+ }), g = xn(m, c), w = g.length >= o, { state: k, items: y, error: S } = Y({
1932
+ client: s,
1642
1933
  url: e,
1643
- enabled: x,
1644
- params: { ...n, [t]: v },
1645
- mapResponse: (S) => (s ? s(S) : Z(S)).map((C) => ne(C, r, l))
1646
- }), y = h.error ?? (N === "error" ? (w == null ? void 0 : w.message) ?? "Failed to load suggestions" : void 0);
1934
+ enabled: w,
1935
+ params: { ...n, [t]: g },
1936
+ mapResponse: (I) => (i ? i(I) : Q(I)).map((N) => le(N, r, l))
1937
+ }), x = h.error ?? (k === "error" ? (S == null ? void 0 : S.message) ?? "Failed to load suggestions" : void 0);
1647
1938
  return /* @__PURE__ */ a(
1648
- Me,
1939
+ Le,
1649
1940
  {
1650
1941
  ...h,
1651
- options: g,
1652
- loading: N === "loading",
1653
- error: y,
1942
+ options: y,
1943
+ loading: k === "loading",
1944
+ error: x,
1654
1945
  inputValue: m,
1655
- onInputValueChange: b,
1946
+ onInputValueChange: v,
1656
1947
  filter: () => !0
1657
1948
  }
1658
1949
  );
1659
1950
  }
1660
- function Qe({
1951
+ function kn({
1661
1952
  url: e,
1662
1953
  params: n,
1663
1954
  mapResponse: t,
1664
1955
  getTotalCount: r,
1665
1956
  pageSize: l = 20,
1666
- client: s,
1667
- ...c
1957
+ client: i,
1958
+ ...o
1668
1959
  }) {
1669
- const [o, i] = T(1), [d, u] = T(null), h = W(() => JSON.stringify(n ?? {}), [n]), m = M(!0);
1670
- B(() => {
1960
+ const [c, s] = M(1), [d, u] = M(null), h = ne(() => JSON.stringify(n ?? {}), [n]), m = O(!0);
1961
+ _(() => {
1671
1962
  if (m.current) {
1672
1963
  m.current = !1;
1673
1964
  return;
1674
1965
  }
1675
- i(1);
1966
+ s(1);
1676
1967
  }, [h]);
1677
- const b = W(
1968
+ const v = ne(
1678
1969
  () => ({
1679
1970
  ...n,
1680
- page: o,
1971
+ page: c,
1681
1972
  pageSize: l,
1682
1973
  ...d ? { sortKey: d.key, sortDirection: d.direction } : {}
1683
1974
  }),
1684
- [n, o, l, d]
1685
- ), v = M(void 0), { state: x, items: N, error: g } = z({
1686
- client: s,
1975
+ [n, c, l, d]
1976
+ ), g = O(void 0), { state: w, items: k, error: y } = Y({
1977
+ client: i,
1687
1978
  url: e,
1688
- params: b,
1689
- mapResponse: (C) => (v.current = C, t ? t(C) : Z(C))
1690
- }), w = v.current !== void 0 ? r == null ? void 0 : r(v.current) : void 0, S = N.length >= l && l > 0 ? o * l + 1 : (o - 1) * l + N.length, k = w ?? S;
1979
+ params: v,
1980
+ mapResponse: (N) => (g.current = N, t ? t(N) : Q(N))
1981
+ }), S = g.current !== void 0 ? r == null ? void 0 : r(g.current) : void 0, I = k.length >= l && l > 0 ? c * l + 1 : (c - 1) * l + k.length, b = S ?? I;
1691
1982
  return /* @__PURE__ */ a(
1692
- Ae,
1983
+ Ue,
1693
1984
  {
1694
- ...c,
1695
- rows: N,
1696
- loading: x === "loading",
1697
- error: g == null ? void 0 : g.message,
1698
- page: o,
1985
+ ...o,
1986
+ rows: k,
1987
+ loading: w === "loading",
1988
+ error: y == null ? void 0 : y.message,
1989
+ page: c,
1699
1990
  pageSize: l,
1700
- totalCount: k,
1701
- onPageChange: i,
1991
+ totalCount: b,
1992
+ onPageChange: s,
1702
1993
  sort: d,
1703
- onSortChange: (C) => {
1704
- u(C), i(1);
1994
+ onSortChange: (N) => {
1995
+ u(N), s(1);
1705
1996
  }
1706
1997
  }
1707
1998
  );
1708
1999
  }
1709
- function Wn({
2000
+ function wt({
1710
2001
  url: e,
1711
2002
  params: n,
1712
2003
  valueMember: t,
1713
2004
  displayMember: r,
1714
2005
  mapResponse: l,
1715
- client: s,
1716
- enabled: c,
1717
- ...o
2006
+ client: i,
2007
+ enabled: o,
2008
+ ...c
1718
2009
  }) {
1719
- const { state: i, items: d, error: u } = z({
1720
- client: s,
2010
+ const { state: s, items: d, error: u } = Y({
2011
+ client: i,
1721
2012
  url: e,
1722
2013
  params: n,
1723
- enabled: c,
1724
- mapResponse: (m) => (l ? l(m) : Z(m)).map((v) => ne(v, t, r))
1725
- }), h = o.error ?? (i === "error" ? (u == null ? void 0 : u.message) ?? "Failed to load options" : void 0);
1726
- return /* @__PURE__ */ a(Ce, { ...o, options: d, loading: i === "loading", error: h });
2014
+ enabled: o,
2015
+ mapResponse: (m) => (l ? l(m) : Q(m)).map((g) => le(g, t, r))
2016
+ }), h = c.error ?? (s === "error" ? (u == null ? void 0 : u.message) ?? "Failed to load options" : void 0);
2017
+ return /* @__PURE__ */ a(Ee, { ...c, options: d, loading: s === "loading", error: h });
1727
2018
  }
1728
- function Xn({
2019
+ function kt({
1729
2020
  url: e,
1730
2021
  params: n,
1731
2022
  valueMember: t,
1732
2023
  displayMember: r,
1733
2024
  mapResponse: l,
1734
- client: s,
1735
- enabled: c,
1736
- ...o
2025
+ client: i,
2026
+ enabled: o,
2027
+ ...c
1737
2028
  }) {
1738
- const { state: i, items: d, error: u } = z({
1739
- client: s,
2029
+ const { state: s, items: d, error: u } = Y({
2030
+ client: i,
1740
2031
  url: e,
1741
2032
  params: n,
1742
- enabled: c,
1743
- mapResponse: (m) => (l ? l(m) : Z(m)).map((v) => ne(v, t, r))
1744
- }), h = o.error ?? (i === "error" ? (u == null ? void 0 : u.message) ?? "Failed to load options" : void 0);
1745
- return /* @__PURE__ */ a(Ie, { ...o, options: d, loading: i === "loading", error: h });
2033
+ enabled: o,
2034
+ mapResponse: (m) => (l ? l(m) : Q(m)).map((g) => le(g, t, r))
2035
+ }), h = c.error ?? (s === "error" ? (u == null ? void 0 : u.message) ?? "Failed to load options" : void 0);
2036
+ return /* @__PURE__ */ a(Me, { ...c, options: d, loading: s === "loading", error: h });
1746
2037
  }
1747
- function et() {
2038
+ function St() {
1748
2039
  const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
1749
2040
  return {
1750
2041
  register(t, r) {
@@ -1761,7 +2052,7 @@ function et() {
1761
2052
  }
1762
2053
  };
1763
2054
  }
1764
- function nt(e) {
2055
+ function Ct(e) {
1765
2056
  const n = new Map(Object.entries(e ?? {}));
1766
2057
  return {
1767
2058
  register(t, r) {
@@ -1772,7 +2063,7 @@ function nt(e) {
1772
2063
  }
1773
2064
  };
1774
2065
  }
1775
- function tt() {
2066
+ function It() {
1776
2067
  const e = /* @__PURE__ */ new Map();
1777
2068
  return {
1778
2069
  register(n, t) {
@@ -1783,10 +2074,10 @@ function tt() {
1783
2074
  }
1784
2075
  };
1785
2076
  }
1786
- function We(e) {
2077
+ function Sn(e) {
1787
2078
  return "dataSource" in e;
1788
2079
  }
1789
- function Xe(e, n) {
2080
+ function Cn(e, n) {
1790
2081
  if (!e)
1791
2082
  return;
1792
2083
  const t = {};
@@ -1794,10 +2085,10 @@ function Xe(e, n) {
1794
2085
  t[r] = l.kind === "static" ? l.value : n[l.field];
1795
2086
  return t;
1796
2087
  }
1797
- function ie(e, n, t) {
2088
+ function fe(e, n, t) {
1798
2089
  return n && t ? t(n) : e;
1799
2090
  }
1800
- function Q(e, n) {
2091
+ function X(e, n) {
1801
2092
  const { values: t, translate: r } = n;
1802
2093
  return {
1803
2094
  metadata: e,
@@ -1805,39 +2096,39 @@ function Q(e, n) {
1805
2096
  readOnly: e.readOnly ?? !1,
1806
2097
  disabled: e.disabled ?? !1,
1807
2098
  required: e.required ?? !1,
1808
- label: ie(e.label, e.labelKey, r),
2099
+ label: fe(e.label, e.labelKey, r),
1809
2100
  placeholder: e.placeholder,
1810
2101
  helpText: e.helpText,
1811
- validationMessage: ie(e.validationMessage, e.validationMessageKey, r),
1812
- params: We(e) ? Xe(e.dataSource.params, t) : void 0
2102
+ validationMessage: fe(e.validationMessage, e.validationMessageKey, r),
2103
+ params: Sn(e) ? Cn(e.dataSource.params, t) : void 0
1813
2104
  };
1814
2105
  }
1815
- function rt(e, n, t) {
2106
+ function Dt(e, n, t) {
1816
2107
  const r = n == null ? void 0 : n.fields.find((l) => l.name === e);
1817
2108
  if (r)
1818
- return Q(r, t);
2109
+ return X(r, t);
1819
2110
  }
1820
- const en = [];
1821
- function nn(e, n) {
2111
+ const In = [];
2112
+ function Dn(e, n) {
1822
2113
  const t = {};
1823
2114
  for (const r of n)
1824
2115
  t[r] = e[r];
1825
2116
  return t;
1826
2117
  }
1827
- function tn(e, n, t) {
1828
- const r = e ?? en, l = nn(n, r), s = r.length === 0 ? "" : JSON.stringify(l), c = M(null), o = M(t);
1829
- o.current = t, B(() => {
2118
+ function Vn(e, n, t) {
2119
+ const r = e ?? In, l = Dn(n, r), i = r.length === 0 ? "" : JSON.stringify(l), o = O(null), c = O(t);
2120
+ c.current = t, _(() => {
1830
2121
  var d;
1831
2122
  if (r.length === 0)
1832
2123
  return;
1833
- const i = c.current;
1834
- if (i && i.key !== s)
2124
+ const s = o.current;
2125
+ if (s && s.key !== i)
1835
2126
  for (const u of r)
1836
- Object.is(i.snapshot[u], l[u]) || (d = o.current) == null || d.call(o, u);
1837
- c.current = { key: s, snapshot: l };
1838
- }, [s]);
2127
+ Object.is(s.snapshot[u], l[u]) || (d = c.current) == null || d.call(c, u);
2128
+ o.current = { key: i, snapshot: l };
2129
+ }, [i]);
1839
2130
  }
1840
- function ye(e, n) {
2131
+ function Ce(e, n) {
1841
2132
  const { actions: t, translate: r } = n, l = t.resolve(e.id);
1842
2133
  return {
1843
2134
  metadata: e,
@@ -1847,19 +2138,19 @@ function ye(e, n) {
1847
2138
  handler: l
1848
2139
  };
1849
2140
  }
1850
- function lt(e, n, t) {
2141
+ function Vt(e, n, t) {
1851
2142
  var l;
1852
- const r = (l = n == null ? void 0 : n.actions) == null ? void 0 : l.find((s) => s.id === e);
2143
+ const r = (l = n == null ? void 0 : n.actions) == null ? void 0 : l.find((i) => i.id === e);
1853
2144
  if (r)
1854
- return ye(r, t);
2145
+ return Ce(r, t);
1855
2146
  }
1856
- const rn = (e, n) => {
1857
- const t = Q(e, { values: n.values, translate: n.translate });
2147
+ const $n = (e, n) => {
2148
+ const t = X(e, { values: n.values, translate: n.translate });
1858
2149
  if (!t.visible)
1859
2150
  return null;
1860
2151
  const r = n.dataSources.resolve(e.dataSource.id);
1861
2152
  return r ? /* @__PURE__ */ a(
1862
- Ze,
2153
+ wn,
1863
2154
  {
1864
2155
  label: t.label,
1865
2156
  url: r.url,
@@ -1876,64 +2167,52 @@ const rn = (e, n) => {
1876
2167
  onChange: (l) => n.onFieldChange(e.name, l)
1877
2168
  }
1878
2169
  ) : (console.warn(`Smart: no data source registered for id "${e.dataSource.id}" (field "${e.name}"). Skipping.`), null);
1879
- }, ln = {
1880
- text: (e) => e == null ? "" : String(e),
1881
- boolean: (e, n) => n ? n(e ? "smart.boolean.true" : "smart.boolean.false") : e ? "Yes" : "No",
1882
- date: (e) => {
1883
- if (e == null || e === "")
1884
- return "";
1885
- const n = e instanceof Date ? e : new Date(String(e));
1886
- return Number.isNaN(n.getTime()) ? String(e) : n.toLocaleDateString();
1887
- },
1888
- currency: (e) => {
1889
- const n = Number(e);
1890
- return Number.isFinite(n) ? n.toLocaleString(void 0, { style: "currency", currency: "USD" }) : String(e ?? "");
1891
- }
1892
2170
  };
1893
- function an(e, n) {
2171
+ function Tn(e, n) {
1894
2172
  if (e.visible === !1)
1895
2173
  return null;
1896
- const t = e.headerKey && n ? n(e.headerKey) : e.header ?? e.key, r = e.format ? ln[e.format] : void 0;
2174
+ const t = e.headerKey && n ? n(e.headerKey) : e.header ?? e.key, r = e.format === "boolean" && !!n;
1897
2175
  return {
1898
2176
  key: e.key,
1899
2177
  header: t,
1900
2178
  sortable: e.sortable,
1901
- render: r ? (l) => r(l[e.key], n) : void 0
2179
+ format: r ? void 0 : e.format,
2180
+ formatter: r ? (l) => n(l ? "smart.boolean.true" : "smart.boolean.false") : void 0
1902
2181
  };
1903
2182
  }
1904
- const sn = (e, n) => {
1905
- const t = Q(e, { values: n.values, translate: n.translate });
2183
+ const En = (e, n) => {
2184
+ const t = X(e, { values: n.values, translate: n.translate });
1906
2185
  if (!t.visible)
1907
2186
  return null;
1908
2187
  const r = n.dataSources.resolve(e.dataSource.id);
1909
2188
  if (!r)
1910
2189
  return console.warn(`Smart: no data source registered for id "${e.dataSource.id}" (field "${e.name}"). Skipping.`), null;
1911
- const l = e.columns.map((o) => an(o, n.translate)).filter((o) => o !== null), s = e.totalCountField, c = s ? (o) => {
1912
- const i = o == null ? void 0 : o[s];
1913
- return typeof i == "number" ? i : void 0;
2190
+ const l = e.columns.map((c) => Tn(c, n.translate)).filter((c) => c !== null), i = e.totalCountField, o = i ? (c) => {
2191
+ const s = c == null ? void 0 : c[i];
2192
+ return typeof s == "number" ? s : void 0;
1914
2193
  } : void 0;
1915
2194
  return /* @__PURE__ */ a(
1916
- Qe,
2195
+ kn,
1917
2196
  {
1918
2197
  url: r.url,
1919
2198
  client: r.client,
1920
2199
  params: t.params,
1921
2200
  columns: l,
1922
- rowKey: (o) => o[e.rowKey],
1923
- getTotalCount: c
2201
+ rowKey: (c) => c[e.rowKey],
2202
+ getTotalCount: o
1924
2203
  }
1925
2204
  );
1926
2205
  };
1927
- function oe(e) {
2206
+ function me(e) {
1928
2207
  if (!e)
1929
2208
  return;
1930
2209
  const n = new Date(e);
1931
2210
  return Number.isNaN(n.getTime()) ? void 0 : n;
1932
2211
  }
1933
- const on = (e, n) => {
1934
- const t = Q(e, { values: n.values, translate: n.translate });
2212
+ const Mn = (e, n) => {
2213
+ const t = X(e, { values: n.values, translate: n.translate });
1935
2214
  return t.visible ? /* @__PURE__ */ a(
1936
- De,
2215
+ Oe,
1937
2216
  {
1938
2217
  label: t.label,
1939
2218
  required: t.required,
@@ -1941,16 +2220,16 @@ const on = (e, n) => {
1941
2220
  disabled: t.disabled,
1942
2221
  helpText: t.helpText,
1943
2222
  error: t.validationMessage,
1944
- min: oe(e.minDate),
1945
- max: oe(e.maxDate),
2223
+ min: me(e.minDate),
2224
+ max: me(e.maxDate),
1946
2225
  value: n.values[e.name] ?? null,
1947
2226
  onChange: (r) => n.onFieldChange(e.name, r)
1948
2227
  }
1949
2228
  ) : null;
1950
- }, cn = (e, n) => {
1951
- const t = Q(e, { values: n.values, translate: n.translate });
2229
+ }, On = (e, n) => {
2230
+ const t = X(e, { values: n.values, translate: n.translate });
1952
2231
  return t.visible ? /* @__PURE__ */ a(
1953
- Y,
2232
+ Z,
1954
2233
  {
1955
2234
  label: t.label,
1956
2235
  required: t.required,
@@ -1965,128 +2244,135 @@ const on = (e, n) => {
1965
2244
  }
1966
2245
  ) : null;
1967
2246
  };
1968
- function at(e) {
1969
- e.register("Input", cn), e.register("ComboBox", rn), e.register("DatePicker", on), e.register("DataGrid", sn);
2247
+ function $t(e) {
2248
+ e.register("Input", On), e.register("ComboBox", $n), e.register("DatePicker", Mn), e.register("DataGrid", En);
1970
2249
  }
1971
- function dn({ metadata: e, ctx: n }) {
2250
+ function Rn({ metadata: e, ctx: n }) {
1972
2251
  const t = n.onMetadataRefreshNeeded;
1973
- return tn(
2252
+ return Vn(
1974
2253
  e.dependsOn,
1975
2254
  n.values,
1976
2255
  t ? (r) => t(e.name, r) : void 0
1977
2256
  ), e.visible === !1 ? null : n.registry.resolve(e, n);
1978
2257
  }
1979
- const Ne = 1;
1980
- function un(e) {
2258
+ const Ie = 1;
2259
+ function An(e) {
1981
2260
  const n = Number(e.split(".")[0]);
1982
- return Number.isFinite(n) && n === Ne;
2261
+ return Number.isFinite(n) && n === Ie;
1983
2262
  }
1984
- function st({ metadata: e, ctx: n }) {
1985
- return un(e.schemaVersion) ? /* @__PURE__ */ a(X, { children: e.fields.map((t) => /* @__PURE__ */ a(dn, { metadata: t, ctx: n }, t.name)) }) : /* @__PURE__ */ p(ve, { variant: "danger", children: [
2263
+ function Tt({ metadata: e, ctx: n }) {
2264
+ return An(e.schemaVersion) ? /* @__PURE__ */ a(H, { children: e.fields.map((t) => /* @__PURE__ */ a(Rn, { metadata: t, ctx: n }, t.name)) }) : /* @__PURE__ */ p(xe, { variant: "danger", children: [
1986
2265
  'Unsupported form schema version "',
1987
2266
  e.schemaVersion,
1988
2267
  '" — this app understands schema version ',
1989
- Ne,
2268
+ Ie,
1990
2269
  ".x."
1991
2270
  ] });
1992
2271
  }
1993
- function fn({ metadata: e, ctx: n }) {
1994
- const t = ye(e, n);
1995
- return t.visible ? /* @__PURE__ */ a(re, { disabled: !t.enabled, onClick: () => {
2272
+ function Ln({ metadata: e, ctx: n }) {
2273
+ const t = Ce(e, n);
2274
+ return t.visible ? /* @__PURE__ */ a(te, { disabled: !t.enabled, onClick: () => {
1996
2275
  var r;
1997
2276
  return (r = t.handler) == null ? void 0 : r.call(t);
1998
2277
  }, children: t.label ?? e.id }) : null;
1999
2278
  }
2000
- function it({ metadata: e, ctx: n }) {
2001
- return !e.actions || e.actions.length === 0 ? null : /* @__PURE__ */ a(X, { children: e.actions.map((t) => /* @__PURE__ */ a(fn, { metadata: t, ctx: n }, t.id)) });
2279
+ function Et({ metadata: e, ctx: n }) {
2280
+ return !e.actions || e.actions.length === 0 ? null : /* @__PURE__ */ a(H, { children: e.actions.map((t) => /* @__PURE__ */ a(Ln, { metadata: t, ctx: n }, t.id)) });
2002
2281
  }
2003
2282
  export {
2004
- Le as Accordion,
2005
- ve as Alert,
2006
- Me as AutoComplete,
2007
- Bn as Avatar,
2008
- Tn as Badge,
2009
- Ke as Breadcrumb,
2010
- re as Button,
2011
- $n as Card,
2012
- yn as CheckBox,
2013
- Ln as Col,
2014
- Ve as ComboBox,
2015
- Dn as ConfirmProvider,
2016
- Pn as Container,
2017
- Ae as DataGrid,
2018
- De as DatePicker,
2019
- kn as DateTimePicker,
2020
- On as Divider,
2021
- gn as FileInput,
2022
- Sn as FormField,
2023
- Ue as HttpError,
2024
- Jn as Icon,
2025
- Y as Input,
2026
- ke as Label,
2027
- Kn as Menu,
2028
- Ee as Modal,
2029
- Ie as MultiSelect,
2030
- Yn as Navbar,
2031
- vn as NumberInput,
2032
- Zn as PageHeader,
2033
- $e as Pagination,
2034
- pn as PasswordInput,
2035
- Rn as Popover,
2036
- G as Popup,
2037
- _n as ProgressBar,
2038
- Se as RadioButton,
2039
- wn as RadioGroup,
2040
- Gn as Rating,
2041
- Qn as RemoteAutoComplete,
2042
- Ze as RemoteComboBox,
2043
- Qe as RemoteDataGrid,
2044
- Xn as RemoteMultiSelect,
2045
- Wn as RemoteSelect,
2046
- Fn as Row,
2047
- Ce as Select,
2048
- zn as Sidebar,
2049
- qn as Skeleton,
2050
- Un as Slider,
2051
- fn as SmartAction,
2052
- it as SmartActions,
2053
- dn as SmartField,
2054
- st as SmartForm,
2055
- Pe as Spinner,
2056
- An as Stack,
2057
- jn as Stepper,
2058
- Nn as Switch,
2059
- Mn as Tabs,
2060
- Hn as Tag,
2061
- bn as TextArea,
2062
- xn as TimePicker,
2063
- Cn as ToastProvider,
2064
- En as Tooltip,
2065
- ue as ValidationMessage,
2066
- rn as comboBoxResolver,
2067
- _e as createHttpClient,
2068
- tt as createSmartActionRegistry,
2069
- et as createSmartComponentRegistry,
2070
- nt as createSmartDataSourceRegistry,
2071
- sn as dataGridResolver,
2072
- on as datePickerResolver,
2073
- Z as defaultArrayNormalization,
2074
- Je as defaultHttpClient,
2075
- me as fromDateInputValue,
2076
- be as fromTimeInputValue,
2077
- cn as inputResolver,
2078
- at as registerBuiltInResolvers,
2079
- ye as resolveSmartActionMetadata,
2080
- Q as resolveSmartFieldMetadata,
2081
- H as toDateInputValue,
2082
- ne as toSelectOption,
2083
- he as toTimeInputValue,
2084
- Vn as useConfirm,
2085
- ze as useDebouncedValue,
2086
- z as useRemoteData,
2087
- lt as useSmartAction,
2088
- tn as useSmartDependencies,
2089
- rt as useSmartField,
2090
- In as useToast
2283
+ Ye as Accordion,
2284
+ xe as Alert,
2285
+ Le as AutoComplete,
2286
+ ot as Avatar,
2287
+ Ge as Badge,
2288
+ rn as Breadcrumb,
2289
+ te as Button,
2290
+ nt as Card,
2291
+ _n as CheckBox,
2292
+ at as Col,
2293
+ Re as ComboBox,
2294
+ Yn as ConfirmProvider,
2295
+ rt as Container,
2296
+ Ue as DataGrid,
2297
+ Oe as DatePicker,
2298
+ Gn as DateTimePicker,
2299
+ tt as Divider,
2300
+ Hn as FileInput,
2301
+ pt as Flex,
2302
+ Wn as FormField,
2303
+ pn as HttpError,
2304
+ se as Icon,
2305
+ vt as IconButton,
2306
+ Z as Input,
2307
+ $e as Label,
2308
+ gt as ListItem,
2309
+ it as Menu,
2310
+ Pe as Modal,
2311
+ Me as MultiSelect,
2312
+ mt as Navbar,
2313
+ Bn as NumberInput,
2314
+ bt as PageHeader,
2315
+ Ke as Pagination,
2316
+ jn as PasswordInput,
2317
+ et as Popover,
2318
+ W as Popup,
2319
+ ft as ProgressBar,
2320
+ Te as RadioButton,
2321
+ qn as RadioGroup,
2322
+ ut as Rating,
2323
+ xt as RemoteAutoComplete,
2324
+ wn as RemoteComboBox,
2325
+ kn as RemoteDataGrid,
2326
+ kt as RemoteMultiSelect,
2327
+ wt as RemoteSelect,
2328
+ lt as Row,
2329
+ Ee as Select,
2330
+ ht as Sidebar,
2331
+ ee as Skeleton,
2332
+ dt as Slider,
2333
+ Ln as SmartAction,
2334
+ Et as SmartActions,
2335
+ Rn as SmartField,
2336
+ Tt as SmartForm,
2337
+ yt as Sparkline,
2338
+ qe as Spinner,
2339
+ Se as Stack,
2340
+ Nt as Statistic,
2341
+ st as Stepper,
2342
+ Un as Switch,
2343
+ Xn as Tabs,
2344
+ ct as Tag,
2345
+ q as Text,
2346
+ Kn as TextArea,
2347
+ zn as TimePicker,
2348
+ Jn as ToastProvider,
2349
+ Qe as Tooltip,
2350
+ pe as ValidationMessage,
2351
+ $n as comboBoxResolver,
2352
+ gn as createHttpClient,
2353
+ It as createSmartActionRegistry,
2354
+ St as createSmartComponentRegistry,
2355
+ Ct as createSmartDataSourceRegistry,
2356
+ Be as dataGridFormatters,
2357
+ En as dataGridResolver,
2358
+ Mn as datePickerResolver,
2359
+ Q as defaultArrayNormalization,
2360
+ yn as defaultHttpClient,
2361
+ ge as fromDateInputValue,
2362
+ Ne as fromTimeInputValue,
2363
+ On as inputResolver,
2364
+ $t as registerBuiltInResolvers,
2365
+ Ce as resolveSmartActionMetadata,
2366
+ X as resolveSmartFieldMetadata,
2367
+ z as toDateInputValue,
2368
+ le as toSelectOption,
2369
+ ye as toTimeInputValue,
2370
+ Qn as useConfirm,
2371
+ xn as useDebouncedValue,
2372
+ Y as useRemoteData,
2373
+ Vt as useSmartAction,
2374
+ Vn as useSmartDependencies,
2375
+ Dt as useSmartField,
2376
+ Zn as useToast
2091
2377
  };
2092
2378
  //# sourceMappingURL=index.js.map