rich-react-component 0.2.0 → 0.3.1

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,141 +1,141 @@
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
- function f(...e) {
1
+ import { jsxs as y, jsx as o, Fragment as Q } from "react/jsx-runtime";
2
+ import { useRef as L, useState as M, useCallback as F, useId as W, useEffect as U, createContext as Ve, useMemo as J, useContext as we, useLayoutEffect as _r } from "react";
3
+ function h(...e) {
4
4
  return e.filter(Boolean).join(" ");
5
5
  }
6
- function $e({ htmlFor: e, required: n, className: t, children: r }) {
7
- return /* @__PURE__ */ p("label", { htmlFor: e, className: f("form-label", t), children: [
8
- r,
9
- n && /* @__PURE__ */ a("span", { className: "text-danger", children: " *" })
6
+ function xr({ htmlFor: e, required: r, className: n, children: t }) {
7
+ return /* @__PURE__ */ y("label", { htmlFor: e, className: h("form-label", "rrc-label", n), children: [
8
+ t,
9
+ r && /* @__PURE__ */ o("span", { className: "text-danger", children: " *" })
10
10
  ] });
11
11
  }
12
- function pe({ error: e, helpText: n, className: t }) {
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;
12
+ function er({ error: e, helpText: r, className: n }) {
13
+ return e ? /* @__PURE__ */ o("div", { className: h("invalid-feedback d-block", "rrc-field__error", n), children: e }) : r ? /* @__PURE__ */ o("div", { className: h("form-text", "rrc-field__help", n), children: r }) : null;
14
14
  }
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 })
15
+ function Y({ id: e, label: r, required: n, error: t, helpText: a, className: i, children: l }) {
16
+ return /* @__PURE__ */ y("div", { className: h("mb-3", "rrc-field", i), children: [
17
+ r && /* @__PURE__ */ o(xr, { htmlFor: e, required: n, children: r }),
18
+ l,
19
+ /* @__PURE__ */ o(er, { error: t, helpText: a })
20
20
  ] });
21
21
  }
22
22
  function T({
23
23
  value: e,
24
- defaultValue: n,
25
- onChange: t
24
+ defaultValue: r,
25
+ onChange: n
26
26
  }) {
27
- const r = e !== void 0, l = O(r);
28
- process.env.NODE_ENV !== "production" && l.current !== r && console.error(
27
+ const t = e !== void 0, a = L(t);
28
+ process.env.NODE_ENV !== "production" && a.current !== t && 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 [i, o] = M(n), c = r ? e : i, s = A(
31
+ const [i, l] = M(r), c = t ? e : i, s = F(
32
32
  (d) => {
33
- r || o(d), t == null || t(d);
33
+ t || l(d), n == null || n(d);
34
34
  },
35
- [r, t]
35
+ [t, n]
36
36
  );
37
37
  return [c, s];
38
38
  }
39
- function Z(e) {
39
+ function de(e) {
40
40
  const {
41
- id: n,
42
- name: t,
43
- disabled: r,
44
- readOnly: l,
41
+ id: r,
42
+ name: n,
43
+ disabled: t,
44
+ readOnly: a,
45
45
  required: i,
46
- className: o,
46
+ className: l,
47
47
  label: c,
48
48
  placeholder: s,
49
49
  helpText: d,
50
50
  error: u,
51
- value: h,
51
+ value: f,
52
52
  defaultValue: m,
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
- value: h,
53
+ onChange: p,
54
+ onBlur: k,
55
+ type: S = "text",
56
+ maxLength: x,
57
+ autoFocus: _,
58
+ inputProps: C,
59
+ endAdornment: v
60
+ } = e, [N, b] = T({
61
+ value: f,
62
62
  defaultValue: m ?? "",
63
- onChange: v
64
- }), N = F(), C = n ?? N, D = /* @__PURE__ */ a(
63
+ onChange: p
64
+ }), w = W(), g = r ?? w, I = /* @__PURE__ */ o(
65
65
  "input",
66
66
  {
67
- id: C,
68
- name: t,
69
- className: f("form-control", u && "is-invalid"),
70
- disabled: r,
71
- readOnly: l,
67
+ id: g,
68
+ name: n,
69
+ className: h("form-control", "rrc-input", u && "is-invalid"),
70
+ disabled: t,
71
+ readOnly: a,
72
72
  required: i,
73
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
74
+ maxLength: x,
75
+ autoFocus: _,
76
+ value: N,
77
+ onChange: (D) => b(D.target.value),
78
+ onBlur: k,
79
+ type: S,
80
+ ...C
81
81
  }
82
82
  );
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 });
83
+ return /* @__PURE__ */ o(Y, { id: g, label: c, required: i, error: u, helpText: d, className: l, children: v ? /* @__PURE__ */ y("div", { className: "input-group rrc-input-group", children: [
84
+ I,
85
+ v
86
+ ] }) : I });
87
87
  }
88
- function Kn(e) {
88
+ function nt(e) {
89
89
  const {
90
- id: n,
91
- name: t,
92
- disabled: r,
93
- readOnly: l,
90
+ id: r,
91
+ name: n,
92
+ disabled: t,
93
+ readOnly: a,
94
94
  required: i,
95
- className: o,
95
+ className: l,
96
96
  label: c,
97
97
  placeholder: s,
98
98
  helpText: d,
99
99
  error: u,
100
- value: h,
100
+ value: f,
101
101
  defaultValue: m,
102
- onChange: v,
103
- onBlur: g,
104
- rows: w = 3,
105
- maxLength: k
106
- } = e, [y, S] = T({
107
- value: h,
102
+ onChange: p,
103
+ onBlur: k,
104
+ rows: S = 3,
105
+ maxLength: x
106
+ } = e, [_, C] = T({
107
+ value: f,
108
108
  defaultValue: m ?? "",
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(
109
+ onChange: p
110
+ }), v = W(), N = r ?? v;
111
+ return /* @__PURE__ */ o(Y, { id: N, label: c, required: i, error: u, helpText: d, className: l, children: /* @__PURE__ */ o(
112
112
  "textarea",
113
113
  {
114
- id: I,
115
- name: t,
116
- className: f("form-control", u && "is-invalid"),
117
- disabled: r,
118
- readOnly: l,
114
+ id: N,
115
+ name: n,
116
+ className: h("form-control", "rrc-input", u && "is-invalid"),
117
+ disabled: t,
118
+ readOnly: a,
119
119
  required: i,
120
120
  placeholder: s,
121
- rows: w,
122
- maxLength: k,
123
- value: y,
124
- onChange: (b) => S(b.target.value),
125
- onBlur: g
121
+ rows: S,
122
+ maxLength: x,
123
+ value: _,
124
+ onChange: (b) => C(b.target.value),
125
+ onBlur: k
126
126
  }
127
127
  ) });
128
128
  }
129
- function Bn({ value: e, defaultValue: n, onChange: t, min: r, max: l, step: i, ...o }) {
129
+ function tt({ value: e, defaultValue: r, onChange: n, min: t, max: a, step: i, ...l }) {
130
130
  const [c, s] = T({
131
131
  value: e,
132
- defaultValue: n ?? null,
133
- onChange: t
132
+ defaultValue: r ?? null,
133
+ onChange: n
134
134
  });
135
- return /* @__PURE__ */ a(
136
- Z,
135
+ return /* @__PURE__ */ o(
136
+ de,
137
137
  {
138
- ...o,
138
+ ...l,
139
139
  value: c === null ? "" : String(c),
140
140
  onChange: (d) => {
141
141
  if (d.trim() === "") {
@@ -145,90 +145,90 @@ function Bn({ value: e, defaultValue: n, onChange: t, min: r, max: l, step: i, .
145
145
  const u = Number(d);
146
146
  Number.isNaN(u) || s(u);
147
147
  },
148
- inputProps: { inputMode: "decimal", min: r, max: l, step: i }
148
+ inputProps: { inputMode: "decimal", min: t, max: a, step: i }
149
149
  }
150
150
  );
151
151
  }
152
- function jn(e) {
153
- const [n, t] = M(!1);
154
- return /* @__PURE__ */ a(
155
- Z,
152
+ function at(e) {
153
+ const [r, n] = M(!1);
154
+ return /* @__PURE__ */ o(
155
+ de,
156
156
  {
157
157
  ...e,
158
- inputProps: { type: n ? "text" : "password", autoComplete: "current-password" },
159
- endAdornment: /* @__PURE__ */ a(
158
+ inputProps: { type: r ? "text" : "password", autoComplete: "current-password" },
159
+ endAdornment: /* @__PURE__ */ o(
160
160
  "button",
161
161
  {
162
162
  type: "button",
163
- className: "btn btn-outline-secondary",
164
- "aria-label": n ? "Hide password" : "Show password",
165
- "aria-pressed": n,
166
- onClick: () => t((r) => !r),
167
- children: n ? "Hide" : "Show"
163
+ className: "btn btn-outline-secondary rrc-btn rrc-input-group__action",
164
+ "aria-label": r ? "Hide password" : "Show password",
165
+ "aria-pressed": r,
166
+ onClick: () => n((t) => !t),
167
+ children: r ? "Hide" : "Show"
168
168
  }
169
169
  )
170
170
  }
171
171
  );
172
172
  }
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(
173
+ function ot({ id: e, name: r, disabled: n, required: t, className: a, label: i, helpText: l, error: c, accept: s, multiple: d, onChange: u }) {
174
+ const f = W(), m = e ?? f;
175
+ return /* @__PURE__ */ o(Y, { id: m, label: i, required: t, error: c, helpText: l, className: a, children: /* @__PURE__ */ o(
176
176
  "input",
177
177
  {
178
178
  id: m,
179
- name: n,
179
+ name: r,
180
180
  type: "file",
181
- className: f("form-control", c && "is-invalid"),
182
- disabled: t,
183
- required: r,
181
+ className: h("form-control", "rrc-input", c && "is-invalid"),
182
+ disabled: n,
183
+ required: t,
184
184
  accept: s,
185
185
  multiple: d,
186
- onChange: (v) => u == null ? void 0 : u(v.target.files)
186
+ onChange: (p) => u == null ? void 0 : u(p.target.files)
187
187
  }
188
188
  ) });
189
189
  }
190
- function ve({
190
+ function rr({
191
191
  id: e,
192
- name: n,
193
- disabled: t,
194
- required: r,
195
- wrapperClassName: l,
192
+ name: r,
193
+ disabled: n,
194
+ required: t,
195
+ wrapperClassName: a,
196
196
  role: i,
197
- label: o,
197
+ label: l,
198
198
  helpText: c,
199
199
  error: s,
200
200
  checked: d,
201
201
  onChange: u,
202
- className: h
202
+ className: f
203
203
  }) {
204
- const m = F(), v = e ?? m;
205
- return /* @__PURE__ */ p("div", { className: f(l, h), children: [
206
- /* @__PURE__ */ a(
204
+ const m = W(), p = e ?? m;
205
+ return /* @__PURE__ */ y("div", { className: h(a, f), children: [
206
+ /* @__PURE__ */ o(
207
207
  "input",
208
208
  {
209
- id: v,
210
- name: n,
209
+ id: p,
210
+ name: r,
211
211
  type: "checkbox",
212
212
  role: i,
213
- className: f("form-check-input", s && "is-invalid"),
214
- disabled: t,
215
- required: r,
213
+ className: h("form-check-input", "rrc-check", s && "is-invalid"),
214
+ disabled: n,
215
+ required: t,
216
216
  checked: d,
217
- onChange: (g) => u(g.target.checked)
217
+ onChange: (k) => u(k.target.checked)
218
218
  }
219
219
  ),
220
- o && /* @__PURE__ */ a("label", { htmlFor: v, className: "form-check-label", children: o }),
221
- /* @__PURE__ */ a(pe, { error: s, helpText: c })
220
+ l && /* @__PURE__ */ o("label", { htmlFor: p, className: "form-check-label rrc-check__label", children: l }),
221
+ /* @__PURE__ */ o(er, { error: s, helpText: c })
222
222
  ] });
223
223
  }
224
- function _n(e) {
225
- const [n, t] = T({
224
+ function it(e) {
225
+ const [r, n] = T({
226
226
  value: e.checked,
227
227
  defaultValue: e.defaultChecked ?? !1,
228
228
  onChange: e.onChange
229
229
  });
230
- return /* @__PURE__ */ a(
231
- ve,
230
+ return /* @__PURE__ */ o(
231
+ rr,
232
232
  {
233
233
  id: e.id,
234
234
  name: e.name,
@@ -239,19 +239,19 @@ function _n(e) {
239
239
  label: e.label,
240
240
  helpText: e.helpText,
241
241
  error: e.error,
242
- checked: n,
243
- onChange: t
242
+ checked: r,
243
+ onChange: n
244
244
  }
245
245
  );
246
246
  }
247
- function Un(e) {
248
- const [n, t] = T({
247
+ function lt(e) {
248
+ const [r, n] = T({
249
249
  value: e.checked,
250
250
  defaultValue: e.defaultChecked ?? !1,
251
251
  onChange: e.onChange
252
252
  });
253
- return /* @__PURE__ */ a(
254
- ve,
253
+ return /* @__PURE__ */ o(
254
+ rr,
255
255
  {
256
256
  id: e.id,
257
257
  name: e.name,
@@ -263,158 +263,158 @@ function Un(e) {
263
263
  label: e.label,
264
264
  helpText: e.helpText,
265
265
  error: e.error,
266
- checked: n,
267
- onChange: t
266
+ checked: r,
267
+ onChange: n
268
268
  }
269
269
  );
270
270
  }
271
- function Te({
271
+ function Sr({
272
272
  id: e,
273
- name: n,
274
- value: t,
275
- label: r,
276
- checked: l,
273
+ name: r,
274
+ value: n,
275
+ label: t,
276
+ checked: a,
277
277
  disabled: i,
278
- className: o,
278
+ className: l,
279
279
  onChange: c
280
280
  }) {
281
- const s = F(), d = e ?? s;
282
- return /* @__PURE__ */ p("div", { className: f("form-check", o), children: [
283
- /* @__PURE__ */ a(
281
+ const s = W(), d = e ?? s;
282
+ return /* @__PURE__ */ y("div", { className: h("form-check", "rrc-check-row", l), children: [
283
+ /* @__PURE__ */ o(
284
284
  "input",
285
285
  {
286
286
  id: d,
287
- name: n,
287
+ name: r,
288
288
  type: "radio",
289
- className: "form-check-input",
290
- value: String(t),
291
- checked: l,
289
+ className: "form-check-input rrc-check",
290
+ value: String(n),
291
+ checked: a,
292
292
  disabled: i,
293
- onChange: () => c == null ? void 0 : c(t)
293
+ onChange: () => c == null ? void 0 : c(n)
294
294
  }
295
295
  ),
296
- r && /* @__PURE__ */ a("label", { htmlFor: d, className: "form-check-label", children: r })
296
+ t && /* @__PURE__ */ o("label", { htmlFor: d, className: "form-check-label rrc-check__label", children: t })
297
297
  ] });
298
298
  }
299
- function qn({
299
+ function st({
300
300
  options: e,
301
- value: n,
302
- defaultValue: t,
303
- onChange: r,
304
- inline: l,
301
+ value: r,
302
+ defaultValue: n,
303
+ onChange: t,
304
+ inline: a,
305
305
  id: i,
306
- name: o,
306
+ name: l,
307
307
  disabled: c,
308
308
  required: s,
309
309
  className: d,
310
310
  label: u,
311
- helpText: h,
311
+ helpText: f,
312
312
  error: m
313
313
  }) {
314
- const [v, g] = T({
315
- value: n,
316
- defaultValue: t ?? null,
317
- onChange: (y) => {
318
- y !== null && (r == null || r(y));
314
+ const [p, k] = T({
315
+ value: r,
316
+ defaultValue: n ?? null,
317
+ onChange: (_) => {
318
+ _ !== null && (t == null || t(_));
319
319
  }
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,
320
+ }), S = W(), x = l ?? i ?? S;
321
+ return /* @__PURE__ */ o(Y, { label: u, required: s, error: m, helpText: f, className: d, children: /* @__PURE__ */ o("div", { role: "radiogroup", "aria-label": u, "aria-required": s, className: h("rrc-radio-group", a && "d-flex gap-3 rrc-radio-group--inline"), children: e.map((_) => /* @__PURE__ */ o(
322
+ Sr,
323
323
  {
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)
324
+ name: x,
325
+ value: _.value,
326
+ label: _.label,
327
+ checked: _.value === p,
328
+ disabled: c || _.disabled,
329
+ onChange: (C) => k(C)
330
330
  },
331
- String(y.value)
331
+ String(_.value)
332
332
  )) }) });
333
333
  }
334
- function Ee({
334
+ function Cr({
335
335
  options: e,
336
- value: n,
337
- defaultValue: t,
338
- onChange: r,
339
- placeholder: l,
336
+ value: r,
337
+ defaultValue: n,
338
+ onChange: t,
339
+ placeholder: a,
340
340
  loading: i,
341
- id: o,
341
+ id: l,
342
342
  name: c,
343
343
  disabled: s,
344
344
  readOnly: d,
345
345
  required: u,
346
- className: h,
346
+ className: f,
347
347
  label: m,
348
- helpText: v,
349
- error: g
348
+ helpText: p,
349
+ error: k
350
350
  }) {
351
- const [w, k] = T({
352
- value: n,
353
- defaultValue: t ?? null,
354
- onChange: r
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(
351
+ const [S, x] = T({
352
+ value: r,
353
+ defaultValue: n ?? null,
354
+ onChange: t
355
+ }), _ = W(), C = l ?? _;
356
+ return /* @__PURE__ */ o(Y, { id: C, label: m, required: u, error: k, helpText: p, className: f, children: /* @__PURE__ */ y(
357
357
  "select",
358
358
  {
359
- id: S,
359
+ id: C,
360
360
  name: c,
361
- className: f("form-select", g && "is-invalid"),
361
+ className: h("form-select", "rrc-select", k && "is-invalid"),
362
362
  disabled: s || d || i,
363
363
  required: u,
364
- value: w === null ? "" : String(w),
365
- onChange: (x) => {
366
- const I = x.target.value;
367
- if (I === "") {
368
- k(null);
364
+ value: S === null ? "" : String(S),
365
+ onChange: (v) => {
366
+ const N = v.target.value;
367
+ if (N === "") {
368
+ x(null);
369
369
  return;
370
370
  }
371
- const b = e.find((N) => String(N.value) === I);
372
- k(b ? b.value : null);
371
+ const b = e.find((w) => String(w.value) === N);
372
+ x(b ? b.value : null);
373
373
  },
374
374
  children: [
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)))
375
+ i && /* @__PURE__ */ o("option", { value: "", children: "Loading…" }),
376
+ !i && a && /* @__PURE__ */ o("option", { value: "", children: a }),
377
+ e.map((v) => /* @__PURE__ */ o("option", { value: String(v.value), disabled: v.disabled, children: v.label }, String(v.value)))
378
378
  ]
379
379
  }
380
380
  ) });
381
381
  }
382
- function ie(e, n) {
383
- _(() => {
382
+ function _e(e, r) {
383
+ U(() => {
384
384
  if (!e)
385
385
  return;
386
- function t(r) {
387
- r.key === "Escape" && n();
386
+ function n(t) {
387
+ t.key === "Escape" && r();
388
388
  }
389
- return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
390
- }, [e, n]);
389
+ return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
390
+ }, [e, r]);
391
391
  }
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), _(() => {
392
+ function oe({ open: e, onClose: r, anchorRef: n, className: t, role: a, children: i }) {
393
+ const l = L(null);
394
+ return _e(e, r), U(() => {
395
395
  if (!e)
396
396
  return;
397
397
  function c(s) {
398
- var u, h;
398
+ var u, f;
399
399
  const d = s.target;
400
- (u = o.current) != null && u.contains(d) || (h = t.current) != null && h.contains(d) || n();
400
+ (u = l.current) != null && u.contains(d) || (f = n.current) != null && f.contains(d) || r();
401
401
  }
402
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;
403
+ }, [e, r, n]), e ? /* @__PURE__ */ o("div", { ref: l, className: h("show", "rrc-popup", t), role: a, children: i }) : null;
404
404
  }
405
- function re({
405
+ function xe({
406
406
  itemCount: e,
407
- isOpen: n,
408
- onSelect: t,
409
- onClose: r
407
+ isOpen: r,
408
+ onSelect: n,
409
+ onClose: t
410
410
  }) {
411
- const [l, i] = M(-1);
412
- _(() => {
413
- n || i(-1);
414
- }, [n]), ie(n, r);
415
- const o = A(
411
+ const [a, i] = M(-1);
412
+ U(() => {
413
+ r || i(-1);
414
+ }, [r]), _e(r, t);
415
+ const l = F(
416
416
  (c) => {
417
- if (!n) {
417
+ if (!r) {
418
418
  (c.key === "ArrowDown" || c.key === "Enter") && c.preventDefault();
419
419
  return;
420
420
  }
@@ -432,690 +432,706 @@ function re({
432
432
  c.preventDefault(), i(e === 0 ? -1 : e - 1);
433
433
  break;
434
434
  case "Enter":
435
- l >= 0 && (c.preventDefault(), t(l));
435
+ a >= 0 && (c.preventDefault(), n(a));
436
436
  break;
437
437
  }
438
438
  },
439
- [n, e, l, t]
439
+ [r, e, a, n]
440
440
  );
441
- return { activeIndex: l, setActiveIndex: i, handleKeyDown: o };
441
+ return { activeIndex: a, setActiveIndex: i, handleKeyDown: l };
442
442
  }
443
- function Me({
443
+ function Ir({
444
444
  options: e,
445
- values: n,
446
- defaultValues: t,
447
- onChange: r,
448
- loading: l,
445
+ values: r,
446
+ defaultValues: n,
447
+ onChange: t,
448
+ loading: a,
449
449
  emptyText: i = "No options",
450
- id: o,
450
+ id: l,
451
451
  name: c,
452
452
  disabled: s,
453
453
  readOnly: d,
454
454
  required: u,
455
- className: h,
455
+ className: f,
456
456
  label: m,
457
- placeholder: v = "Select...",
458
- helpText: g,
459
- error: w
457
+ placeholder: p = "Select...",
458
+ helpText: k,
459
+ error: S
460
460
  }) {
461
- const [k, y] = T({
462
- value: n,
463
- defaultValue: t ?? [],
464
- onChange: r
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)
461
+ const [x, _] = T({
462
+ value: r,
463
+ defaultValue: n ?? [],
464
+ onChange: t
465
+ }), [C, v] = M(!1), N = L(null), b = W(), w = l ?? b, g = new Set(x), I = F(() => v(!1), []), D = F(
466
+ (A) => {
467
+ const H = e[A];
468
+ if (!H || H.disabled)
469
469
  return;
470
- const J = C.has(K.value) ? k.filter((ae) => ae !== K.value) : [...k, K.value];
471
- y(J);
470
+ const R = g.has(H.value) ? x.filter((Z) => Z !== H.value) : [...x, H.value];
471
+ _(R);
472
472
  },
473
- [e, k, C, y]
474
- ), { activeIndex: E, setActiveIndex: U, handleKeyDown: G } = re({
473
+ [e, x, g, _]
474
+ ), { activeIndex: O, setActiveIndex: q, handleKeyDown: G } = xe({
475
475
  itemCount: e.length,
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
- /* @__PURE__ */ a(
476
+ isOpen: C,
477
+ onSelect: D,
478
+ onClose: I
479
+ }), V = e.filter((A) => g.has(A.value)).map((A) => A.label).join(", ");
480
+ return /* @__PURE__ */ o(Y, { id: w, label: m, required: u, error: S, helpText: k, className: f, children: /* @__PURE__ */ y("div", { className: "position-relative", children: [
481
+ /* @__PURE__ */ o(
482
482
  "button",
483
483
  {
484
- ref: I,
485
- id: N,
484
+ ref: N,
485
+ id: w,
486
486
  type: "button",
487
487
  name: c,
488
- className: f("form-select text-start", w && "is-invalid"),
488
+ className: h("form-select text-start", "rrc-select", "rrc-select__trigger", S && "is-invalid"),
489
489
  disabled: s || d,
490
490
  "aria-haspopup": "listbox",
491
- "aria-expanded": S,
492
- onClick: () => x((V) => !V),
491
+ "aria-expanded": C,
492
+ onClick: () => v((A) => !A),
493
493
  onKeyDown: G,
494
- children: R || /* @__PURE__ */ a("span", { className: "text-body-secondary", children: v })
494
+ children: V || /* @__PURE__ */ o("span", { className: "text-body-secondary", children: p })
495
495
  }
496
496
  ),
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(
497
+ /* @__PURE__ */ o(oe, { open: C, onClose: I, anchorRef: N, className: "dropdown-menu w-100 rrc-menu rrc-select__menu", role: "listbox", children: a ? /* @__PURE__ */ o("div", { className: "px-3 py-2 text-body-secondary", children: "Loading…" }) : e.length === 0 ? /* @__PURE__ */ o("div", { className: "px-3 py-2 text-body-secondary", children: i }) : e.map((A, H) => /* @__PURE__ */ y(
498
498
  "div",
499
499
  {
500
500
  role: "option",
501
- "aria-selected": C.has(V.value),
502
- className: f(
501
+ "aria-selected": g.has(A.value),
502
+ className: h(
503
503
  "dropdown-item d-flex align-items-center gap-2",
504
- K === E && "active",
505
- V.disabled && "disabled"
504
+ H === O && "active",
505
+ A.disabled && "disabled"
506
506
  ),
507
- onMouseEnter: () => U(K),
508
- onMouseDown: (J) => {
509
- J.preventDefault(), V.disabled || $(K);
507
+ onMouseEnter: () => q(H),
508
+ onMouseDown: (R) => {
509
+ R.preventDefault(), A.disabled || D(H);
510
510
  },
511
511
  children: [
512
- /* @__PURE__ */ a("input", { type: "checkbox", className: "form-check-input m-0", checked: C.has(V.value), readOnly: !0, tabIndex: -1 }),
513
- V.label
512
+ /* @__PURE__ */ o("input", { type: "checkbox", className: "form-check-input m-0", checked: g.has(A.value), readOnly: !0, tabIndex: -1 }),
513
+ A.label
514
514
  ]
515
515
  },
516
- String(V.value)
516
+ String(A.value)
517
517
  )) })
518
518
  ] }) });
519
519
  }
520
- function z(e) {
520
+ function ae(e) {
521
521
  if (!e)
522
522
  return "";
523
- const n = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getDate()).padStart(2, "0");
524
- return `${n}-${t}-${r}`;
523
+ const r = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0"), t = String(e.getDate()).padStart(2, "0");
524
+ return `${r}-${n}-${t}`;
525
525
  }
526
- function ge(e) {
526
+ function nr(e) {
527
527
  if (!e)
528
528
  return null;
529
- const n = e.split("-").map(Number), [t, r, l] = n;
530
- return !t || !r || !l ? null : new Date(t, r - 1, l);
529
+ const r = e.split("-").map(Number), [n, t, a] = r;
530
+ return !n || !t || !a ? null : new Date(n, t - 1, a);
531
531
  }
532
- function Oe({ value: e, defaultValue: n, onChange: t, min: r, max: l, ...i }) {
533
- const [o, c] = T({
532
+ function Er({ value: e, defaultValue: r, onChange: n, min: t, max: a, ...i }) {
533
+ const [l, c] = T({
534
534
  value: e,
535
- defaultValue: n ?? null,
536
- onChange: t
535
+ defaultValue: r ?? null,
536
+ onChange: n
537
537
  });
538
- return /* @__PURE__ */ a(
539
- Z,
538
+ return /* @__PURE__ */ o(
539
+ de,
540
540
  {
541
541
  ...i,
542
- value: z(o),
543
- onChange: (s) => c(ge(s)),
542
+ value: ae(l),
543
+ onChange: (s) => c(nr(s)),
544
544
  inputProps: {
545
545
  type: "date",
546
- min: r ? z(r) : void 0,
547
- max: l ? z(l) : void 0
546
+ min: t ? ae(t) : void 0,
547
+ max: a ? ae(a) : void 0
548
548
  }
549
549
  }
550
550
  );
551
551
  }
552
- function ye(e) {
552
+ function tr(e) {
553
553
  if (!e)
554
554
  return "";
555
- const n = String(e.getHours()).padStart(2, "0"), t = String(e.getMinutes()).padStart(2, "0");
556
- return `${n}:${t}`;
555
+ const r = String(e.getHours()).padStart(2, "0"), n = String(e.getMinutes()).padStart(2, "0");
556
+ return `${r}:${n}`;
557
557
  }
558
- function Ne(e) {
558
+ function ar(e) {
559
559
  if (!e)
560
560
  return null;
561
- const [n, t] = e.split(":").map(Number);
562
- return n === void 0 || t === void 0 || Number.isNaN(n) || Number.isNaN(t) ? null : new Date(1970, 0, 1, n, t, 0, 0);
561
+ const [r, n] = e.split(":").map(Number);
562
+ return r === void 0 || n === void 0 || Number.isNaN(r) || Number.isNaN(n) ? null : new Date(1970, 0, 1, r, n, 0, 0);
563
563
  }
564
- function zn({ value: e, defaultValue: n, onChange: t, step: r, ...l }) {
565
- const [i, o] = T({
564
+ function ct({ value: e, defaultValue: r, onChange: n, step: t, ...a }) {
565
+ const [i, l] = T({
566
566
  value: e,
567
- defaultValue: n ?? null,
568
- onChange: t
567
+ defaultValue: r ?? null,
568
+ onChange: n
569
569
  });
570
- return /* @__PURE__ */ a(
571
- Z,
570
+ return /* @__PURE__ */ o(
571
+ de,
572
572
  {
573
- ...l,
574
- value: ye(i),
575
- onChange: (c) => o(Ne(c)),
576
- inputProps: { type: "time", step: r }
573
+ ...a,
574
+ value: tr(i),
575
+ onChange: (c) => l(ar(c)),
576
+ inputProps: { type: "time", step: t }
577
577
  }
578
578
  );
579
579
  }
580
- function oe(e, n) {
581
- const t = ge(e);
582
- if (!t)
580
+ function We(e, r) {
581
+ const n = nr(e);
582
+ if (!n)
583
583
  return null;
584
- const r = Ne(n || "00:00");
585
- return r && t.setHours(r.getHours(), r.getMinutes(), 0, 0), t;
584
+ const t = ar(r || "00:00");
585
+ return t && n.setHours(t.getHours(), t.getMinutes(), 0, 0), n;
586
586
  }
587
- function Gn({
587
+ function dt({
588
588
  value: e,
589
- defaultValue: n,
590
- onChange: t,
591
- min: r,
592
- max: l,
589
+ defaultValue: r,
590
+ onChange: n,
591
+ min: t,
592
+ max: a,
593
593
  id: i,
594
- name: o,
594
+ name: l,
595
595
  disabled: c,
596
596
  readOnly: s,
597
597
  required: d,
598
598
  className: u,
599
- label: h,
599
+ label: f,
600
600
  helpText: m,
601
- error: v
601
+ error: p
602
602
  }) {
603
- const [g, w] = T({
603
+ const [k, S] = T({
604
604
  value: e,
605
- defaultValue: n ?? null,
606
- onChange: t
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
- /* @__PURE__ */ a(
605
+ defaultValue: r ?? null,
606
+ onChange: n
607
+ }), x = W(), _ = i ?? x, C = ae(k), v = tr(k);
608
+ return /* @__PURE__ */ o(Y, { id: _, label: f, required: d, error: p, helpText: m, className: u, children: /* @__PURE__ */ y("div", { className: "d-flex gap-2", children: [
609
+ /* @__PURE__ */ o(
610
610
  "input",
611
611
  {
612
- id: y,
613
- name: o ? `${o}-date` : void 0,
612
+ id: _,
613
+ name: l ? `${l}-date` : void 0,
614
614
  type: "date",
615
- className: f("form-control", v && "is-invalid"),
615
+ className: h("form-control", "rrc-input", p && "is-invalid"),
616
616
  disabled: c,
617
617
  readOnly: s,
618
618
  required: d,
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))
619
+ min: t ? ae(t) : void 0,
620
+ max: a ? ae(a) : void 0,
621
+ value: C,
622
+ onChange: (N) => S(We(N.target.value, v))
623
623
  }
624
624
  ),
625
- /* @__PURE__ */ a(
625
+ /* @__PURE__ */ o(
626
626
  "input",
627
627
  {
628
- name: o ? `${o}-time` : void 0,
628
+ name: l ? `${l}-time` : void 0,
629
629
  type: "time",
630
- className: f("form-control", v && "is-invalid"),
630
+ className: h("form-control", "rrc-input", p && "is-invalid"),
631
631
  disabled: c,
632
632
  readOnly: s,
633
633
  required: d,
634
- value: x,
635
- onChange: (I) => w(oe(S || z(/* @__PURE__ */ new Date()), I.target.value))
634
+ value: v,
635
+ onChange: (N) => S(We(C || ae(/* @__PURE__ */ new Date()), N.target.value))
636
636
  }
637
637
  )
638
638
  ] }) });
639
639
  }
640
- function Re({
640
+ function Ar({
641
641
  options: e,
642
- value: n,
643
- defaultValue: t,
644
- onChange: r,
645
- loading: l,
642
+ value: r,
643
+ defaultValue: n,
644
+ onChange: t,
645
+ loading: a,
646
646
  emptyText: i = "No options",
647
- id: o,
647
+ id: l,
648
648
  name: c,
649
649
  disabled: s,
650
650
  readOnly: d,
651
651
  required: u,
652
- className: h,
652
+ className: f,
653
653
  label: m,
654
- placeholder: v = "Select...",
655
- helpText: g,
656
- error: w
654
+ placeholder: p = "Select...",
655
+ helpText: k,
656
+ error: S
657
657
  }) {
658
- const [k, y] = T({
659
- value: n,
660
- defaultValue: t ?? null,
661
- onChange: r
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());
658
+ const [x, _] = T({
659
+ value: r,
660
+ defaultValue: n ?? null,
661
+ onChange: t
662
+ }), [C, v] = M(!1), N = L(null), b = W(), w = l ?? b, g = e.find((P) => P.value === x) ?? null, I = F(() => v(!1), []), D = F(
663
+ (P) => {
664
+ const V = e[P];
665
+ !V || V.disabled || (_(V.value), I());
666
666
  },
667
- [e, y, D]
668
- ), { activeIndex: E, setActiveIndex: U, handleKeyDown: G } = re({
667
+ [e, _, I]
668
+ ), { activeIndex: O, setActiveIndex: q, handleKeyDown: G } = xe({
669
669
  itemCount: e.length,
670
- isOpen: S,
671
- onSelect: $,
672
- onClose: D
670
+ isOpen: C,
671
+ onSelect: D,
672
+ onClose: I
673
673
  });
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
- /* @__PURE__ */ a(
674
+ return /* @__PURE__ */ o(Y, { id: w, label: m, required: u, error: S, helpText: k, className: f, children: /* @__PURE__ */ y("div", { className: "position-relative", children: [
675
+ /* @__PURE__ */ o(
676
676
  "button",
677
677
  {
678
- ref: I,
679
- id: N,
678
+ ref: N,
679
+ id: w,
680
680
  type: "button",
681
681
  name: c,
682
- className: f("form-select text-start", w && "is-invalid"),
682
+ className: h("form-select text-start", "rrc-select", "rrc-select__trigger", S && "is-invalid"),
683
683
  disabled: s || d,
684
684
  "aria-haspopup": "listbox",
685
- "aria-expanded": S,
686
- onClick: () => x((L) => !L),
685
+ "aria-expanded": C,
686
+ onClick: () => v((P) => !P),
687
687
  onKeyDown: G,
688
- children: C ? C.label : /* @__PURE__ */ a("span", { className: "text-body-secondary", children: v })
688
+ children: g ? g.label : /* @__PURE__ */ o("span", { className: "text-body-secondary", children: p })
689
689
  }
690
690
  ),
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(
691
+ /* @__PURE__ */ o(oe, { open: C, onClose: I, anchorRef: N, className: "dropdown-menu w-100 rrc-menu rrc-select__menu", role: "listbox", children: a ? /* @__PURE__ */ o("div", { className: "px-3 py-2 text-body-secondary", children: "Loading…" }) : e.length === 0 ? /* @__PURE__ */ o("div", { className: "px-3 py-2 text-body-secondary", children: i }) : e.map((P, V) => /* @__PURE__ */ o(
692
692
  "div",
693
693
  {
694
694
  role: "option",
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);
695
+ "aria-selected": P.value === x,
696
+ className: h("dropdown-item", "rrc-menu__item", V === O && "active", P.disabled && "disabled"),
697
+ onMouseEnter: () => q(V),
698
+ onMouseDown: (A) => {
699
+ A.preventDefault(), P.disabled || D(V);
700
700
  },
701
- children: L.label
701
+ children: P.label
702
702
  },
703
- String(L.value)
703
+ String(P.value)
704
704
  )) })
705
705
  ] }) });
706
706
  }
707
- function Ae(e, n) {
708
- return n ? e.label.toLowerCase().includes(n.toLowerCase()) : !0;
707
+ function Dr(e, r) {
708
+ return r ? e.label.toLowerCase().includes(r.toLowerCase()) : !0;
709
709
  }
710
- function Le({
710
+ function Tr({
711
711
  options: e,
712
- value: n,
713
- defaultValue: t,
714
- onChange: r,
715
- inputValue: l,
712
+ value: r,
713
+ defaultValue: n,
714
+ onChange: t,
715
+ inputValue: a,
716
716
  onInputValueChange: i,
717
- loading: o,
717
+ loading: l,
718
718
  emptyText: c = "No results",
719
719
  filter: s,
720
720
  id: d,
721
721
  name: u,
722
- disabled: h,
722
+ disabled: f,
723
723
  readOnly: m,
724
- required: v,
725
- className: g,
726
- label: w,
727
- placeholder: k,
728
- helpText: y,
729
- error: S
724
+ required: p,
725
+ className: k,
726
+ label: S,
727
+ placeholder: x,
728
+ helpText: _,
729
+ error: C
730
730
  }) {
731
- const [x, I] = T({
732
- value: n,
733
- defaultValue: t ?? null,
734
- onChange: r
735
- }), b = e.find((P) => P.value === x) ?? null, [N, C] = T({
736
- value: l,
731
+ const [v, N] = T({
732
+ value: r,
733
+ defaultValue: n ?? null,
734
+ onChange: t
735
+ }), b = e.find((K) => K.value === v) ?? null, [w, g] = T({
736
+ value: a,
737
737
  defaultValue: (b == null ? void 0 : b.label) ?? "",
738
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());
739
+ }), [I, D] = M(!1), O = L(null), q = W(), G = d ?? q, P = s ?? Dr, V = e.filter((K) => P(K, w)), A = F(() => D(!1), []), H = F(
740
+ (K) => {
741
+ const j = V[K];
742
+ !j || j.disabled || (N(j.value), g(j.label), A());
743
743
  },
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
744
+ [V, N, g, A]
745
+ ), { activeIndex: R, setActiveIndex: Z, handleKeyDown: X } = xe({
746
+ itemCount: V.length,
747
+ isOpen: I,
748
+ onSelect: H,
749
+ onClose: A
750
750
  });
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
- /* @__PURE__ */ a(
751
+ return /* @__PURE__ */ o(Y, { id: G, label: S, required: p, error: C, helpText: _, className: k, children: /* @__PURE__ */ y("div", { className: "position-relative", children: [
752
+ /* @__PURE__ */ o(
753
753
  "input",
754
754
  {
755
- ref: E,
755
+ ref: O,
756
756
  id: G,
757
757
  name: u,
758
758
  type: "text",
759
- className: f("form-control", S && "is-invalid"),
760
- disabled: h,
759
+ className: h("form-control", "rrc-input", C && "is-invalid"),
760
+ disabled: f,
761
761
  readOnly: m,
762
- required: v,
763
- placeholder: k,
762
+ required: p,
763
+ placeholder: x,
764
764
  autoComplete: "off",
765
765
  role: "combobox",
766
- "aria-expanded": D,
766
+ "aria-expanded": I,
767
767
  "aria-haspopup": "listbox",
768
- value: N,
769
- onFocus: () => $(!0),
770
- onChange: (P) => {
771
- const j = P.target.value;
772
- C(j), $(!0), x !== null && I(null);
768
+ value: w,
769
+ onFocus: () => D(!0),
770
+ onChange: (K) => {
771
+ const j = K.target.value;
772
+ g(j), D(!0), v !== null && N(null);
773
773
  },
774
- onKeyDown: De
774
+ onKeyDown: X
775
775
  }
776
776
  ),
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(
777
+ /* @__PURE__ */ o(oe, { open: I, onClose: A, anchorRef: O, className: "dropdown-menu w-100 rrc-menu rrc-select__menu", role: "listbox", children: l ? /* @__PURE__ */ o("div", { className: "px-3 py-2 text-body-secondary", children: "Loading…" }) : V.length === 0 ? /* @__PURE__ */ o("div", { className: "px-3 py-2 text-body-secondary", children: c }) : V.map((K, j) => /* @__PURE__ */ o(
778
778
  "div",
779
779
  {
780
780
  role: "option",
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);
781
+ "aria-selected": K.value === v,
782
+ className: h("dropdown-item", "rrc-menu__item", j === R && "active", K.disabled && "disabled"),
783
+ onMouseEnter: () => Z(j),
784
+ onMouseDown: (E) => {
785
+ E.preventDefault(), K.disabled || H(j);
786
786
  },
787
- children: P.label
787
+ children: K.label
788
788
  },
789
- String(P.value)
789
+ String(K.value)
790
790
  )) })
791
791
  ] }) });
792
792
  }
793
- function Wn(e) {
794
- return /* @__PURE__ */ a(B, { ...e });
793
+ function ut(e) {
794
+ return /* @__PURE__ */ o(Y, { ...e });
795
795
  }
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
- /* @__PURE__ */ p("div", { className: "modal-header", children: [
800
- t && /* @__PURE__ */ a("h5", { className: "modal-title", children: t }),
801
- /* @__PURE__ */ a("button", { type: "button", className: "btn-close", "aria-label": "Close", onClick: n })
796
+ function Vr({ open: e, onClose: r, title: n, children: t, footer: a, className: i }) {
797
+ return _e(e, r), e ? /* @__PURE__ */ y(Q, { children: [
798
+ /* @__PURE__ */ o("div", { className: "modal d-block rrc-modal", tabIndex: -1, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ o("div", { className: h("modal-dialog", "rrc-modal__dialog", i), role: "document", children: /* @__PURE__ */ y("div", { className: "modal-content rrc-modal__content", children: [
799
+ /* @__PURE__ */ y("div", { className: "modal-header rrc-modal__header", children: [
800
+ n && /* @__PURE__ */ o("h5", { className: "modal-title", children: n }),
801
+ /* @__PURE__ */ o("button", { type: "button", className: "btn-close", "aria-label": "Close", onClick: r })
802
802
  ] }),
803
- /* @__PURE__ */ a("div", { className: "modal-body", children: r }),
804
- l && /* @__PURE__ */ a("div", { className: "modal-footer", children: l })
803
+ /* @__PURE__ */ o("div", { className: "modal-body rrc-modal__body", children: t }),
804
+ a && /* @__PURE__ */ o("div", { className: "modal-footer rrc-modal__footer", children: a })
805
805
  ] }) }) }),
806
- /* @__PURE__ */ a("div", { className: "modal-backdrop show", onClick: n })
806
+ /* @__PURE__ */ o("div", { className: "modal-backdrop show rrc-modal__backdrop", onClick: r })
807
807
  ] }) : null;
808
808
  }
809
- function Fe(e, n, t) {
810
- const r = [], l = Math.max(1, e - t), i = Math.min(n, e + t);
811
- l > 1 && (r.push(1), l > 2 && r.push("ellipsis"));
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
- }
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
- /* @__PURE__ */ a("li", { className: f("page-item", e <= 1 && "disabled"), children: /* @__PURE__ */ a(
809
+ function Lr(e, r, n) {
810
+ const t = [], a = Math.max(1, e - n), i = Math.min(r, e + n);
811
+ a > 1 && (t.push(1), a > 2 && t.push("ellipsis"));
812
+ for (let l = a; l <= i; l++)
813
+ t.push(l);
814
+ return i < r && (i < r - 1 && t.push("ellipsis"), t.push(r)), t;
815
+ }
816
+ function Rr({ currentPage: e, pageSize: r, totalItems: n, onPageChange: t, siblingCount: a = 1, className: i }) {
817
+ const l = Math.max(1, Math.ceil(n / r)), c = Lr(e, l, a);
818
+ return /* @__PURE__ */ o("nav", { "aria-label": "Pagination", className: i, children: /* @__PURE__ */ y("ul", { className: "pagination mb-0 rrc-pagination", children: [
819
+ /* @__PURE__ */ o("li", { className: h("page-item", e <= 1 && "disabled"), children: /* @__PURE__ */ o(
820
820
  "button",
821
821
  {
822
822
  type: "button",
823
823
  className: "page-link",
824
824
  disabled: e <= 1,
825
- onClick: () => r(e - 1),
825
+ onClick: () => t(e - 1),
826
826
  children: "Previous"
827
827
  }
828
828
  ) }),
829
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(
830
+ (s, d) => s === "ellipsis" ? /* @__PURE__ */ o("li", { className: "page-item disabled", children: /* @__PURE__ */ o("span", { className: "page-link", children: "…" }) }, `ellipsis-${d}`) : /* @__PURE__ */ o("li", { className: h("page-item", s === e && "active"), children: /* @__PURE__ */ o(
831
831
  "button",
832
832
  {
833
833
  type: "button",
834
834
  className: "page-link",
835
835
  "aria-current": s === e ? "page" : void 0,
836
- onClick: () => r(s),
836
+ onClick: () => t(s),
837
837
  children: s
838
838
  }
839
839
  ) }, s)
840
840
  ),
841
- /* @__PURE__ */ a("li", { className: f("page-item", e >= o && "disabled"), children: /* @__PURE__ */ a(
841
+ /* @__PURE__ */ o("li", { className: h("page-item", e >= l && "disabled"), children: /* @__PURE__ */ o(
842
842
  "button",
843
843
  {
844
844
  type: "button",
845
845
  className: "page-link",
846
- disabled: e >= o,
847
- onClick: () => r(e + 1),
846
+ disabled: e >= l,
847
+ onClick: () => t(e + 1),
848
848
  children: "Next"
849
849
  }
850
850
  ) })
851
851
  ] }) });
852
852
  }
853
- const Be = {
853
+ const $r = {
854
854
  text: (e) => e == null ? "" : String(e),
855
855
  boolean: (e) => e ? "Yes" : "No",
856
856
  date: (e) => {
857
857
  if (e == null || e === "")
858
858
  return "";
859
- const n = e instanceof Date ? e : new Date(String(e));
860
- return Number.isNaN(n.getTime()) ? String(e) : n.toLocaleDateString();
859
+ const r = e instanceof Date ? e : new Date(String(e));
860
+ return Number.isNaN(r.getTime()) ? String(e) : r.toLocaleDateString();
861
861
  },
862
862
  currency: (e) => {
863
- const n = Number(e);
864
- return Number.isFinite(n) ? n.toLocaleString(void 0, { style: "currency", currency: "USD" }) : String(e ?? "");
863
+ const r = Number(e);
864
+ return Number.isFinite(r) ? r.toLocaleString(void 0, { style: "currency", currency: "USD" }) : String(e ?? "");
865
865
  }
866
866
  };
867
- function je(e, n) {
868
- return !e || e.key !== n ? { key: n, direction: "asc" } : e.direction === "asc" ? { key: n, direction: "desc" } : null;
867
+ function Or(e, r) {
868
+ return !e || e.key !== r ? { key: r, direction: "asc" } : e.direction === "asc" ? { key: r, direction: "desc" } : null;
869
869
  }
870
- function ce(e) {
870
+ function Ge(e) {
871
871
  return e.key ?? e.field ?? e.header;
872
872
  }
873
- function He(e, n) {
874
- const t = e.field ?? e.key;
875
- return t ? n[t] : void 0;
873
+ function Mr(e, r) {
874
+ const n = e.field ?? e.key;
875
+ return n ? r[n] : void 0;
876
876
  }
877
- function _e(e, n) {
877
+ function Pr(e, r) {
878
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);
879
+ return e.render(r);
880
+ const n = Mr(e, r);
881
+ return e.formatter ? e.formatter(n, r) : e.format ? $r[e.format](n) : n == null ? "" : String(n);
882
882
  }
883
- function de(e) {
883
+ function Je(e) {
884
884
  return e && `text-${e}`;
885
885
  }
886
- function Ue({
886
+ function Kr({
887
887
  columns: e,
888
- rows: n,
889
- rowKey: t,
890
- loading: r,
891
- error: l,
888
+ rows: r,
889
+ rowKey: n,
890
+ loading: t,
891
+ error: a,
892
892
  emptyText: i = "No data",
893
- className: o,
893
+ className: l,
894
894
  selectedRowKeys: c,
895
895
  onSelectionChange: s,
896
896
  sort: d,
897
897
  onSortChange: u,
898
- page: h,
898
+ page: f,
899
899
  pageSize: m,
900
- totalCount: v,
901
- onPageChange: g
900
+ totalCount: p,
901
+ onPageChange: k
902
902
  }) {
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)));
903
+ const S = !!s, x = new Set(c ?? []), _ = f !== void 0 && m !== void 0 && p !== void 0, C = _ ? Math.max(1, Math.ceil(p / m)) : 1;
904
+ function v() {
905
+ s && (x.size === r.length ? s([]) : s(r.map(n)));
906
906
  }
907
- function I(b) {
907
+ function N(b) {
908
908
  if (!s)
909
909
  return;
910
- const N = new Set(k);
911
- N.has(b) ? N.delete(b) : N.add(b), s(Array.from(N));
910
+ const w = new Set(x);
911
+ w.has(b) ? w.delete(b) : w.add(b), s(Array.from(w));
912
912
  }
913
- return /* @__PURE__ */ p("div", { className: f("table-responsive", o), children: [
914
- /* @__PURE__ */ p("table", { className: "table table-hover align-middle", children: [
915
- /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ p("tr", { children: [
916
- w && /* @__PURE__ */ a("th", { style: { width: "2.5rem" }, children: /* @__PURE__ */ a(
913
+ return /* @__PURE__ */ y("div", { className: h("table-responsive", "rrc-data-grid", l), children: [
914
+ /* @__PURE__ */ y("table", { className: "table table-hover align-middle rrc-data-grid__table", children: [
915
+ /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ y("tr", { children: [
916
+ S && /* @__PURE__ */ o("th", { style: { width: "2.5rem" }, children: /* @__PURE__ */ o(
917
917
  "input",
918
918
  {
919
919
  type: "checkbox",
920
920
  className: "form-check-input",
921
- checked: n.length > 0 && k.size === n.length,
922
- onChange: x,
921
+ checked: r.length > 0 && x.size === r.length,
922
+ onChange: v,
923
923
  "aria-label": "Select all rows"
924
924
  }
925
925
  ) }),
926
926
  e.map((b) => {
927
- const N = ce(b);
928
- return /* @__PURE__ */ p(
927
+ const w = Ge(b);
928
+ return /* @__PURE__ */ y(
929
929
  "th",
930
930
  {
931
- className: de(b.headerAlign ?? b.align),
931
+ className: Je(b.headerAlign ?? b.align),
932
932
  style: { width: b.width, minWidth: b.minWidth, maxWidth: b.maxWidth },
933
933
  role: b.sortable ? "button" : void 0,
934
- onClick: b.sortable && u ? () => u(je(d, N)) : void 0,
934
+ onClick: b.sortable && u ? () => u(Or(d, w)) : void 0,
935
935
  children: [
936
936
  b.header,
937
- b.sortable && (d == null ? void 0 : d.key) === N && /* @__PURE__ */ p("span", { "aria-hidden": "true", children: [
937
+ b.sortable && (d == null ? void 0 : d.key) === w && /* @__PURE__ */ y("span", { "aria-hidden": "true", children: [
938
938
  " ",
939
939
  d.direction === "asc" ? "▲" : "▼"
940
940
  ] })
941
941
  ]
942
942
  },
943
- N
943
+ w
944
944
  );
945
945
  })
946
946
  ] }) }),
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);
949
- return /* @__PURE__ */ p("tr", { children: [
950
- w && /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(
947
+ /* @__PURE__ */ o("tbody", { children: t ? /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan: e.length + (S ? 1 : 0), className: "text-center text-body-secondary py-4", children: "Loading…" }) }) : a ? /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan: e.length + (S ? 1 : 0), className: "text-center text-danger py-4", children: a }) }) : r.length === 0 ? /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan: e.length + (S ? 1 : 0), className: "text-center text-body-secondary py-4", children: i }) }) : r.map((b) => {
948
+ const w = n(b);
949
+ return /* @__PURE__ */ y("tr", { children: [
950
+ S && /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(
951
951
  "input",
952
952
  {
953
953
  type: "checkbox",
954
954
  className: "form-check-input",
955
- checked: k.has(N),
956
- onChange: () => I(N),
955
+ checked: x.has(w),
956
+ onChange: () => N(w),
957
957
  "aria-label": "Select row"
958
958
  }
959
959
  ) }),
960
- e.map((C) => /* @__PURE__ */ a("td", { className: de(C.align), children: _e(C, b) }, ce(C)))
961
- ] }, N);
960
+ e.map((g) => /* @__PURE__ */ o("td", { className: Je(g.align), children: Pr(g, b) }, Ge(g)))
961
+ ] }, w);
962
962
  }) })
963
963
  ] }),
964
- y && /* @__PURE__ */ p("div", { className: "d-flex justify-content-between align-items-center mt-2", children: [
965
- /* @__PURE__ */ p("span", { className: "text-body-secondary small", children: [
964
+ _ && /* @__PURE__ */ y("div", { className: "d-flex justify-content-between align-items-center mt-2 rrc-data-grid__footer", children: [
965
+ /* @__PURE__ */ y("span", { className: "text-body-secondary small", children: [
966
966
  "Page ",
967
- h,
967
+ f,
968
968
  " of ",
969
- S,
969
+ C,
970
970
  " (",
971
- v,
971
+ p,
972
972
  " rows)"
973
973
  ] }),
974
- /* @__PURE__ */ a(Ke, { currentPage: h, pageSize: m, totalItems: v, onPageChange: g })
974
+ /* @__PURE__ */ o(Rr, { currentPage: f, pageSize: m, totalItems: p, onPageChange: k })
975
975
  ] })
976
976
  ] });
977
977
  }
978
- function qe({ size: e = "md", variant: n, className: t, label: r = "Loading..." }) {
979
- return /* @__PURE__ */ a(
978
+ function Br({ size: e = "md", variant: r, className: n, label: t = "Loading..." }) {
979
+ return /* @__PURE__ */ o(
980
980
  "span",
981
981
  {
982
- className: f("spinner-border", e === "sm" && "spinner-border-sm", n && `text-${n}`, t),
982
+ className: h("spinner-border", "rrc-spinner", e === "sm" && "spinner-border-sm", r && `text-${r}`, n),
983
983
  role: "status",
984
- children: /* @__PURE__ */ a("span", { className: "visually-hidden", children: r })
984
+ children: /* @__PURE__ */ o("span", { className: "visually-hidden", children: t })
985
985
  }
986
986
  );
987
987
  }
988
- function te({
988
+ function ke({
989
989
  variant: e = "primary",
990
- size: n,
991
- disabled: t,
992
- loading: r,
993
- type: l = "button",
990
+ size: r,
991
+ disabled: n,
992
+ loading: t,
993
+ type: a = "button",
994
994
  className: i,
995
- children: o,
995
+ children: l,
996
996
  onClick: c,
997
997
  ...s
998
998
  }) {
999
- const d = t || r;
1000
- return /* @__PURE__ */ p(
999
+ const d = n || t;
1000
+ return /* @__PURE__ */ y(
1001
1001
  "button",
1002
1002
  {
1003
- type: l,
1004
- className: f("btn", `btn-${e}`, n && `btn-${n}`, i),
1003
+ type: a,
1004
+ className: h("btn", `btn-${e}`, r && `btn-${r}`, "rrc-btn", `rrc-btn--${e}`, i),
1005
1005
  disabled: d,
1006
- "aria-busy": r || void 0,
1006
+ "aria-busy": t || void 0,
1007
1007
  onClick: d ? void 0 : c,
1008
1008
  ...s,
1009
1009
  children: [
1010
- r && /* @__PURE__ */ a(qe, { size: "sm", className: "me-2", label: "" }),
1011
- o
1010
+ t && /* @__PURE__ */ o(Br, { size: "sm", className: "me-2", label: "" }),
1011
+ l
1012
1012
  ]
1013
1013
  }
1014
1014
  );
1015
1015
  }
1016
- function xe({ variant: e = "info", dismissible: n, onDismiss: t, className: r, children: l }) {
1017
- return /* @__PURE__ */ p("div", { className: f("alert", `alert-${e}`, n && "alert-dismissible", r), role: "alert", children: [
1018
- l,
1019
- n && /* @__PURE__ */ a("button", { type: "button", className: "btn-close", "aria-label": "Close", onClick: t })
1016
+ function or({ variant: e = "info", dismissible: r, onDismiss: n, className: t, children: a }) {
1017
+ return /* @__PURE__ */ y("div", { className: h("alert", `alert-${e}`, r && "alert-dismissible", "rrc-alert", `rrc-alert--${e}`, t), role: "alert", children: [
1018
+ a,
1019
+ r && /* @__PURE__ */ o("button", { type: "button", className: "btn-close", "aria-label": "Close", onClick: n })
1020
1020
  ] });
1021
1021
  }
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;
1022
+ const ir = Ve(null), Fr = 4e3;
1023
+ function mt({ children: e }) {
1024
+ const [r, n] = M([]), t = L(0), a = L(/* @__PURE__ */ new Map());
1025
+ U(() => {
1026
+ const s = a.current;
1027
1027
  return () => {
1028
1028
  s.forEach(clearTimeout), s.clear();
1029
1029
  };
1030
1030
  }, []);
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(
1031
+ const i = F((s) => {
1032
+ const d = a.current.get(s);
1033
+ d && (clearTimeout(d), a.current.delete(s)), n((u) => u.filter((f) => f.id !== s));
1034
+ }, []), l = F(
1035
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(
1036
+ const u = t.current++, f = (d == null ? void 0 : d.variant) ?? "info", m = (d == null ? void 0 : d.duration) ?? Fr;
1037
+ return n((p) => [...p, { id: u, message: s, variant: f }]), m > 0 && a.current.set(
1038
1038
  u,
1039
1039
  setTimeout(() => i(u), m)
1040
1040
  ), u;
1041
1041
  },
1042
1042
  [i]
1043
- ), c = ne(
1043
+ ), c = J(
1044
1044
  () => ({
1045
- show: o,
1045
+ show: l,
1046
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" })
1047
+ success: (s, d) => l(s, { ...d, variant: "success" }),
1048
+ error: (s, d) => l(s, { ...d, variant: "danger" }),
1049
+ info: (s, d) => l(s, { ...d, variant: "info" }),
1050
+ warning: (s, d) => l(s, { ...d, variant: "warning" })
1051
1051
  }),
1052
- [o, i]
1052
+ [l, i]
1053
1053
  );
1054
- return /* @__PURE__ */ p(we.Provider, { value: c, children: [
1054
+ return /* @__PURE__ */ y(ir.Provider, { value: c, children: [
1055
1055
  e,
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)) })
1056
+ /* @__PURE__ */ o("div", { className: "toast-container position-fixed bottom-0 end-0 p-3 rrc-toast-container", style: { zIndex: 1090 }, children: r.map((s) => /* @__PURE__ */ o(or, { variant: s.variant, dismissible: !0, onDismiss: () => i(s.id), className: "shadow-sm", children: s.message }, s.id)) })
1057
1057
  ] });
1058
1058
  }
1059
- function Zn() {
1060
- const e = be(we);
1059
+ function ft() {
1060
+ const e = we(ir);
1061
1061
  if (!e)
1062
1062
  throw new Error("useToast must be used within a ToastProvider");
1063
1063
  return e;
1064
1064
  }
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(
1065
+ const lr = Ve(null);
1066
+ function ht({ children: e }) {
1067
+ const [r, n] = M(null), t = F((i) => new Promise((l) => {
1068
+ n({ ...i, resolve: l });
1069
+ }), []), a = F(
1070
1070
  (i) => {
1071
- n == null || n.resolve(i), t(null);
1071
+ r == null || r.resolve(i), n(null);
1072
1072
  },
1073
- [n]
1073
+ [r]
1074
1074
  );
1075
- return /* @__PURE__ */ p(ke.Provider, { value: r, children: [
1075
+ return /* @__PURE__ */ y(lr.Provider, { value: t, children: [
1076
1076
  e,
1077
- /* @__PURE__ */ a(
1078
- Pe,
1077
+ /* @__PURE__ */ o(
1078
+ Vr,
1079
1079
  {
1080
- open: n !== null,
1081
- onClose: () => l(!1),
1082
- title: (n == null ? void 0 : n.title) ?? "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" })
1080
+ open: r !== null,
1081
+ onClose: () => a(!1),
1082
+ title: (r == null ? void 0 : r.title) ?? "Confirm",
1083
+ footer: /* @__PURE__ */ y(Q, { children: [
1084
+ /* @__PURE__ */ o(ke, { variant: "outline-secondary", onClick: () => a(!1), children: (r == null ? void 0 : r.cancelLabel) ?? "Cancel" }),
1085
+ /* @__PURE__ */ o(ke, { variant: (r == null ? void 0 : r.confirmVariant) ?? "danger", onClick: () => a(!0), children: (r == null ? void 0 : r.confirmLabel) ?? "Confirm" })
1086
1086
  ] }),
1087
- children: n == null ? void 0 : n.message
1087
+ children: r == null ? void 0 : r.message
1088
1088
  }
1089
1089
  )
1090
1090
  ] });
1091
1091
  }
1092
- function Qn() {
1093
- const e = be(ke);
1092
+ function pt() {
1093
+ const e = we(lr);
1094
1094
  if (!e)
1095
1095
  throw new Error("useConfirm must be used within a ConfirmProvider");
1096
1096
  return e;
1097
1097
  }
1098
- function Ge({ variant: e = "primary", pill: n, className: t, children: r }) {
1099
- return /* @__PURE__ */ a("span", { className: f("badge", `bg-${e}`, n && "rounded-pill", t), children: r });
1098
+ function Hr({ variant: e = "primary", appearance: r = "solid", pill: n, className: t, children: a }) {
1099
+ return /* @__PURE__ */ o(
1100
+ "span",
1101
+ {
1102
+ className: h(
1103
+ "badge",
1104
+ // Bootstrap's own solid fill is only correct for the solid appearance;
1105
+ // the tinted forms are painted by this library's stylesheet instead.
1106
+ r === "solid" && `bg-${e}`,
1107
+ n && "rounded-pill",
1108
+ "rrc-badge",
1109
+ `rrc-badge--${e}`,
1110
+ `rrc-badge--${r}`,
1111
+ t
1112
+ ),
1113
+ children: a
1114
+ }
1115
+ );
1100
1116
  }
1101
- const We = {
1117
+ const jr = {
1102
1118
  sm: "0.875em",
1103
1119
  lg: "1.5em",
1104
1120
  xl: "2em"
1105
1121
  };
1106
- function se({ name: e, size: n, className: t, label: r }) {
1107
- return /* @__PURE__ */ a(
1122
+ function Le({ name: e, size: r, className: n, label: t }) {
1123
+ return /* @__PURE__ */ o(
1108
1124
  "i",
1109
1125
  {
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
1126
+ className: h(e, "rrc-icon", n),
1127
+ style: r ? { fontSize: jr[r] } : void 0,
1128
+ role: t ? "img" : void 0,
1129
+ "aria-label": t,
1130
+ "aria-hidden": t ? void 0 : !0
1115
1131
  }
1116
1132
  );
1117
1133
  }
1118
- function Je(e) {
1134
+ function Ur(e) {
1119
1135
  switch (e) {
1120
1136
  case "pill":
1121
1137
  return "nav-pills";
@@ -1127,207 +1143,210 @@ function Je(e) {
1127
1143
  return "nav-tabs";
1128
1144
  }
1129
1145
  }
1130
- const Ze = {
1146
+ const qr = {
1131
1147
  sm: "small",
1132
1148
  lg: "fs-5"
1133
1149
  };
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;
1150
+ function bt({ items: e, activeKey: r, defaultActiveKey: n, onChange: t, variant: a = "default", orientation: i = "horizontal", size: l, stretch: c, className: s }) {
1151
+ var N;
1136
1152
  const [d, u] = T({
1137
- value: n,
1138
- defaultValue: t ?? ((I = e[0]) == null ? void 0 : I.key) ?? "",
1139
- onChange: r
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()));
1153
+ value: r,
1154
+ defaultValue: n ?? ((N = e[0]) == null ? void 0 : N.key) ?? "",
1155
+ onChange: t
1156
+ }), f = e.find((b) => b.key === d), m = a === "button", p = i === "vertical", k = L([]);
1157
+ function S(b, w) {
1158
+ var I;
1159
+ const g = e[b];
1160
+ g && (u(g.key), w && ((I = k.current[b]) == null || I.focus()));
1145
1161
  }
1146
- function k(b, N) {
1147
- var D;
1162
+ function x(b, w) {
1163
+ var I;
1148
1164
  if (e.length === 0)
1149
1165
  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;
1166
+ let g = b;
1167
+ for (let D = 0; D < e.length; D++)
1168
+ if (g = (g + w + e.length) % e.length, !((I = e[g]) != null && I.disabled))
1169
+ return g;
1154
1170
  return b;
1155
1171
  }
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);
1172
+ function _(b) {
1173
+ var D;
1174
+ const w = e.findIndex((O) => O.key === d), g = p ? "ArrowDown" : "ArrowRight", I = p ? "ArrowUp" : "ArrowLeft";
1175
+ if (b.key === g)
1176
+ b.preventDefault(), S(x(w, 1), !0);
1177
+ else if (b.key === I)
1178
+ b.preventDefault(), S(x(w, -1), !0);
1163
1179
  else if (b.key === "Home") {
1164
1180
  b.preventDefault();
1165
- const E = e.findIndex((U) => !U.disabled);
1166
- E >= 0 && w(E, !0);
1181
+ const O = e.findIndex((q) => !q.disabled);
1182
+ O >= 0 && S(O, !0);
1167
1183
  } else if (b.key === "End") {
1168
1184
  b.preventDefault();
1169
- for (let E = e.length - 1; E >= 0; E--)
1170
- if (!(($ = e[E]) != null && $.disabled)) {
1171
- w(E, !0);
1185
+ for (let O = e.length - 1; O >= 0; O--)
1186
+ if (!((D = e[O]) != null && D.disabled)) {
1187
+ S(O, !0);
1172
1188
  break;
1173
1189
  }
1174
1190
  }
1175
1191
  }
1176
- const S = /* @__PURE__ */ a(
1192
+ const C = /* @__PURE__ */ o(
1177
1193
  "div",
1178
1194
  {
1179
- className: f(
1195
+ className: h(
1180
1196
  m ? "btn-group" : "nav",
1181
- !m && Je(l),
1182
- !m && v && "flex-column",
1197
+ "rrc-tabs__list",
1198
+ `rrc-tabs__list--${a}`,
1199
+ !m && Ur(a),
1200
+ !m && p && "flex-column",
1183
1201
  !m && c && "nav-fill",
1184
- !m && o && Ze[o]
1202
+ !m && l && qr[l]
1185
1203
  ),
1186
1204
  role: "tablist",
1187
1205
  "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" }),
1206
+ onKeyDown: _,
1207
+ children: e.map((b, w) => {
1208
+ const g = b.key === d, I = /* @__PURE__ */ y(Q, { children: [
1209
+ b.icon && /* @__PURE__ */ o(Le, { name: b.icon, size: "sm", className: "me-1" }),
1192
1210
  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(
1211
+ b.badge != null && /* @__PURE__ */ o(Hr, { variant: g && !m ? "primary" : "secondary", appearance: "light", pill: !0, className: "ms-2", children: b.badge })
1212
+ ] }), D = /* @__PURE__ */ o(
1195
1213
  "button",
1196
1214
  {
1197
- ref: (E) => {
1198
- g.current[N] = E;
1215
+ ref: (O) => {
1216
+ k.current[w] = O;
1199
1217
  },
1200
1218
  type: "button",
1201
1219
  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")),
1220
+ className: h(m ? h("btn", l ? `btn-${l}` : "btn-sm", g ? "btn-primary" : "btn-outline-primary") : h("nav-link", "rrc-tabs__link", g && "active")),
1203
1221
  role: "tab",
1204
- "aria-selected": C,
1222
+ "aria-selected": g,
1205
1223
  "aria-controls": `tabpanel-${b.key}`,
1206
- tabIndex: C ? 0 : -1,
1224
+ tabIndex: g ? 0 : -1,
1207
1225
  disabled: b.disabled,
1208
- onClick: () => w(N, !1),
1209
- children: D
1226
+ onClick: () => S(w, !1),
1227
+ children: I
1210
1228
  },
1211
1229
  b.key
1212
1230
  );
1213
- return m ? $ : /* @__PURE__ */ a("div", { className: "nav-item", role: "presentation", children: $ }, b.key);
1231
+ return m ? D : /* @__PURE__ */ o("div", { className: "nav-item", role: "presentation", children: D }, b.key);
1214
1232
  })
1215
1233
  }
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
1234
+ ), v = (f == null ? void 0 : f.content) != null && /* @__PURE__ */ o("div", { id: `tabpanel-${f.key}`, className: h("tab-content", "rrc-tabs__panel", !p && "pt-3"), role: "tabpanel", "aria-labelledby": `tab-${f.key}`, children: f.content });
1235
+ return p ? /* @__PURE__ */ y("div", { className: h("d-flex align-items-start gap-3", "rrc-tabs", "rrc-tabs--vertical", s), children: [
1236
+ C,
1237
+ v && /* @__PURE__ */ o("div", { className: "flex-grow-1", children: v })
1238
+ ] }) : /* @__PURE__ */ y("div", { className: h("rrc-tabs", s), children: [
1239
+ C,
1240
+ v
1223
1241
  ] });
1224
1242
  }
1225
- function Ye({ items: e, multiple: n = !1, openKeys: t, defaultOpenKeys: r, onChange: l, className: i }) {
1226
- const [o, c] = T({
1227
- value: t,
1228
- defaultValue: r ?? [],
1229
- onChange: l
1230
- }), s = new Set(o);
1243
+ function vt({ items: e, multiple: r = !1, openKeys: n, defaultOpenKeys: t, onChange: a, className: i }) {
1244
+ const [l, c] = T({
1245
+ value: n,
1246
+ defaultValue: t ?? [],
1247
+ onChange: a
1248
+ }), s = new Set(l);
1231
1249
  function d(u) {
1232
- s.has(u) ? c(o.filter((h) => h !== u)) : c(n ? [...o, u] : [u]);
1250
+ s.has(u) ? c(l.filter((f) => f !== u)) : c(r ? [...l, u] : [u]);
1233
1251
  }
1234
- return /* @__PURE__ */ a("div", { className: f("accordion", i), children: e.map((u) => {
1235
- const h = s.has(u.key);
1236
- return /* @__PURE__ */ p("div", { className: "accordion-item", children: [
1237
- /* @__PURE__ */ a("h2", { className: "accordion-header", children: /* @__PURE__ */ a(
1252
+ return /* @__PURE__ */ o("div", { className: h("accordion", "rrc-accordion", i), children: e.map((u) => {
1253
+ const f = s.has(u.key);
1254
+ return /* @__PURE__ */ y("div", { className: "accordion-item rrc-accordion__item", children: [
1255
+ /* @__PURE__ */ o("h2", { className: "accordion-header", children: /* @__PURE__ */ o(
1238
1256
  "button",
1239
1257
  {
1240
1258
  type: "button",
1241
- className: f("accordion-button", !h && "collapsed"),
1242
- "aria-expanded": h,
1259
+ className: h("accordion-button", "rrc-accordion__button", !f && "collapsed"),
1260
+ "aria-expanded": f,
1243
1261
  disabled: u.disabled,
1244
1262
  onClick: () => d(u.key),
1245
1263
  children: u.header
1246
1264
  }
1247
1265
  ) }),
1248
- h && /* @__PURE__ */ a("div", { className: "accordion-collapse", children: /* @__PURE__ */ a("div", { className: "accordion-body", children: u.content }) })
1266
+ f && /* @__PURE__ */ o("div", { className: "accordion-collapse", children: /* @__PURE__ */ o("div", { className: "accordion-body rrc-accordion__body", children: u.content }) })
1249
1267
  ] }, u.key);
1250
1268
  }) });
1251
1269
  }
1252
- function Qe({ content: e, children: n, placement: t = "top", className: r }) {
1253
- const [l, i] = M(!1), o = O(null), c = F();
1254
- return /* @__PURE__ */ p(
1270
+ function sr({ content: e, children: r, placement: n = "top", className: t, wrapperClassName: a }) {
1271
+ const [i, l] = M(!1), c = L(null), s = W();
1272
+ return /* @__PURE__ */ y(
1255
1273
  "span",
1256
1274
  {
1257
- ref: o,
1258
- className: "position-relative d-inline-block",
1259
- onMouseEnter: () => i(!0),
1260
- onMouseLeave: () => i(!1),
1261
- onFocus: () => i(!0),
1262
- onBlur: () => i(!1),
1263
- "aria-describedby": l ? c : void 0,
1275
+ ref: c,
1276
+ className: h("position-relative", a ?? "d-inline-block"),
1277
+ onMouseEnter: () => l(!0),
1278
+ onMouseLeave: () => l(!1),
1279
+ onFocus: () => l(!0),
1280
+ onBlur: () => l(!1),
1281
+ "aria-describedby": i ? s : void 0,
1264
1282
  children: [
1265
- n,
1266
- /* @__PURE__ */ a(
1267
- W,
1283
+ r,
1284
+ /* @__PURE__ */ o(
1285
+ oe,
1268
1286
  {
1269
- open: l,
1270
- onClose: () => i(!1),
1271
- anchorRef: o,
1272
- className: f("tooltip show", `bs-tooltip-${t}`, "position-absolute", "w-auto", r),
1273
- children: /* @__PURE__ */ a("span", { id: c, role: "tooltip", className: "tooltip-inner", children: e })
1287
+ open: i,
1288
+ onClose: () => l(!1),
1289
+ anchorRef: c,
1290
+ className: h("tooltip show", `bs-tooltip-${n}`, "position-absolute", "w-auto", "rrc-tooltip", t),
1291
+ children: /* @__PURE__ */ o("span", { id: s, role: "tooltip", className: "tooltip-inner", children: e })
1274
1292
  }
1275
1293
  )
1276
1294
  ]
1277
1295
  }
1278
1296
  );
1279
1297
  }
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: [
1283
- t,
1284
- /* @__PURE__ */ p(
1285
- W,
1298
+ function gt({ title: e, content: r, children: n, placement: t = "bottom", className: a }) {
1299
+ const [i, l] = M(!1), c = L(null);
1300
+ return /* @__PURE__ */ y("span", { ref: c, className: "position-relative d-inline-block", onClick: () => l((s) => !s), children: [
1301
+ n,
1302
+ /* @__PURE__ */ y(
1303
+ oe,
1286
1304
  {
1287
1305
  open: i,
1288
- onClose: () => o(!1),
1306
+ onClose: () => l(!1),
1289
1307
  anchorRef: c,
1290
- className: f("popover show", `bs-popover-${r}`, "position-absolute", "w-auto", l),
1308
+ className: h("popover show", `bs-popover-${t}`, "position-absolute", "w-auto", "rrc-popover", a),
1291
1309
  children: [
1292
- e && /* @__PURE__ */ a("h3", { className: "popover-header", children: e }),
1293
- /* @__PURE__ */ a("div", { className: "popover-body", children: n })
1310
+ e && /* @__PURE__ */ o("h3", { className: "popover-header rrc-popover__header", children: e }),
1311
+ /* @__PURE__ */ o("div", { className: "popover-body rrc-popover__body", children: r })
1294
1312
  ]
1295
1313
  }
1296
1314
  )
1297
1315
  ] });
1298
1316
  }
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") }) });
1317
+ function ye({ width: e = "100%", height: r = "1rem", circle: n, className: t }) {
1318
+ return /* @__PURE__ */ o("span", { className: h("placeholder-glow d-inline-block", "rrc-skeleton", t), style: { width: e, height: r }, "aria-hidden": "true", children: /* @__PURE__ */ o("span", { className: h("placeholder w-100 h-100 d-block", n && "rounded-circle") }) });
1301
1319
  }
1302
- function Se({ direction: e = "column", gap: n = 2, align: t, justify: r, wrap: l, className: i, children: o }) {
1303
- return /* @__PURE__ */ a(
1320
+ function cr({ direction: e = "column", gap: r = 2, align: n, justify: t, wrap: a, className: i, children: l }) {
1321
+ return /* @__PURE__ */ o(
1304
1322
  "div",
1305
1323
  {
1306
- className: f(
1324
+ className: h(
1307
1325
  "d-flex",
1326
+ "rrc-stack",
1308
1327
  e === "row" ? "flex-row" : "flex-column",
1309
- `gap-${n}`,
1310
- t && `align-items-${t}`,
1311
- r && `justify-content-${r}`,
1312
- l && "flex-wrap",
1328
+ `gap-${r}`,
1329
+ n && `align-items-${n}`,
1330
+ t && `justify-content-${t}`,
1331
+ a && "flex-wrap",
1313
1332
  i
1314
1333
  ),
1315
- children: o
1334
+ children: l
1316
1335
  }
1317
1336
  );
1318
1337
  }
1319
- const Xe = {
1338
+ const zr = {
1320
1339
  xs: "0.75rem",
1321
1340
  sm: "0.875rem",
1322
1341
  md: "1rem",
1323
1342
  lg: "1.25rem",
1324
1343
  xl: "1.5rem"
1325
- }, en = {
1344
+ }, Wr = {
1326
1345
  normal: "fw-normal",
1327
1346
  medium: "fw-medium",
1328
1347
  semibold: "fw-semibold",
1329
1348
  bold: "fw-bold"
1330
- }, nn = {
1349
+ }, Gr = {
1331
1350
  default: void 0,
1332
1351
  muted: "text-body-secondary",
1333
1352
  primary: "text-primary",
@@ -1336,134 +1355,136 @@ const Xe = {
1336
1355
  warning: "text-warning",
1337
1356
  info: "text-info"
1338
1357
  };
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(
1358
+ function te({ as: e, size: r = "md", weight: n, tone: t = "default", align: a, truncate: i, wrap: l = !0, className: c, children: s }) {
1359
+ return /* @__PURE__ */ o(
1341
1360
  e ?? "span",
1342
1361
  {
1343
- className: f(
1344
- t && en[t],
1345
- nn[r],
1346
- l && `text-${l}`,
1362
+ className: h(
1363
+ "rrc-text",
1364
+ n && Wr[n],
1365
+ Gr[t],
1366
+ a && `text-${a}`,
1347
1367
  i && "text-truncate",
1348
- !o && !i && "text-nowrap",
1368
+ !l && !i && "text-nowrap",
1349
1369
  c
1350
1370
  ),
1351
- style: { fontSize: Xe[n] },
1371
+ style: { fontSize: zr[r] },
1352
1372
  children: s
1353
1373
  }
1354
1374
  );
1355
1375
  }
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 })
1376
+ function Jr({ title: e, subtitle: r, icon: n, avatar: t, actions: a }) {
1377
+ return /* @__PURE__ */ y("div", { className: "d-flex align-items-center justify-content-between gap-3 rrc-card__header-row", children: [
1378
+ /* @__PURE__ */ y("div", { className: "d-flex align-items-center gap-3", style: { minWidth: 0 }, children: [
1379
+ t || n && /* @__PURE__ */ o("span", { className: "fs-2 lh-1", children: n }),
1380
+ (e || r) && /* @__PURE__ */ y("div", { style: { minWidth: 0 }, children: [
1381
+ e && /* @__PURE__ */ o(te, { as: "div", size: "lg", weight: "semibold", truncate: !0, children: e }),
1382
+ r && /* @__PURE__ */ o(te, { as: "div", size: "sm", tone: "muted", truncate: !0, children: r })
1363
1383
  ] })
1364
1384
  ] }),
1365
- l && /* @__PURE__ */ a("div", { className: "d-flex align-items-center gap-2 flex-shrink-0", children: l })
1385
+ a && /* @__PURE__ */ o("div", { className: "d-flex align-items-center gap-2 flex-shrink-0", children: a })
1366
1386
  ] });
1367
1387
  }
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%" })
1388
+ function yt({ title: e, subtitle: r, icon: n, avatar: t, actions: a, header: i, footer: l, loading: c, className: s, children: d }) {
1389
+ const f = i ?? (!!(e || r || n || t || a) ? /* @__PURE__ */ o(Jr, { title: e, subtitle: r, icon: n, avatar: t, actions: a }) : void 0);
1390
+ return /* @__PURE__ */ y("div", { className: h("card", "rrc-card", s), children: [
1391
+ f && /* @__PURE__ */ o("div", { className: "card-header rrc-card__header", children: f }),
1392
+ /* @__PURE__ */ o("div", { className: "card-body rrc-card__body", children: c ? /* @__PURE__ */ y(cr, { gap: 2, children: [
1393
+ /* @__PURE__ */ o(ye, { height: "1rem", width: "60%" }),
1394
+ /* @__PURE__ */ o(ye, { height: "1rem" }),
1395
+ /* @__PURE__ */ o(ye, { height: "1rem", width: "80%" })
1376
1396
  ] }) : d }),
1377
- o && /* @__PURE__ */ a("div", { className: "card-footer", children: o })
1397
+ l && /* @__PURE__ */ o("div", { className: "card-footer rrc-card__footer", children: l })
1378
1398
  ] });
1379
1399
  }
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" });
1400
+ function Zr({ className: e, vertical: r, label: n }) {
1401
+ return r ? /* @__PURE__ */ o("div", { className: h("vr", "rrc-divider", e), role: "separator", "aria-orientation": "vertical" }) : n ? /* @__PURE__ */ y("div", { className: h("d-flex align-items-center gap-2 my-3", "rrc-divider", "rrc-divider--labelled", e), role: "separator", children: [
1402
+ /* @__PURE__ */ o("hr", { className: "flex-grow-1 m-0" }),
1403
+ /* @__PURE__ */ o("span", { className: "text-body-secondary small", children: n }),
1404
+ /* @__PURE__ */ o("hr", { className: "flex-grow-1 m-0" })
1405
+ ] }) : /* @__PURE__ */ o("hr", { className: h("my-3", "rrc-divider", e), role: "separator" });
1386
1406
  }
1387
- function rt({ fluid: e, className: n, children: t }) {
1388
- return /* @__PURE__ */ a("div", { className: f(e ? "container-fluid" : "container", n), children: t });
1407
+ function Nt({ fluid: e, className: r, children: n }) {
1408
+ return /* @__PURE__ */ o("div", { className: h(e ? "container-fluid" : "container", "rrc-container", r), children: n });
1389
1409
  }
1390
- function lt({ className: e, children: n }) {
1391
- return /* @__PURE__ */ a("div", { className: f("row", e), children: n });
1410
+ function kt({ className: e, children: r }) {
1411
+ return /* @__PURE__ */ o("div", { className: h("row", "rrc-row", e), children: r });
1392
1412
  }
1393
- function at({ span: e, sm: n, md: t, lg: r, xl: l, className: i, children: o }) {
1394
- return /* @__PURE__ */ a(
1413
+ function wt({ span: e, sm: r, md: n, lg: t, xl: a, className: i, children: l }) {
1414
+ return /* @__PURE__ */ o(
1395
1415
  "div",
1396
1416
  {
1397
- className: f(
1417
+ className: h(
1398
1418
  e ? `col-${e}` : "col",
1399
- n ? `col-sm-${n}` : void 0,
1400
- t ? `col-md-${t}` : void 0,
1401
- r ? `col-lg-${r}` : void 0,
1402
- l ? `col-xl-${l}` : void 0,
1419
+ "rrc-col",
1420
+ r ? `col-sm-${r}` : void 0,
1421
+ n ? `col-md-${n}` : void 0,
1422
+ t ? `col-lg-${t}` : void 0,
1423
+ a ? `col-xl-${a}` : void 0,
1403
1424
  i
1404
1425
  ),
1405
- children: o
1426
+ children: l
1406
1427
  }
1407
1428
  );
1408
1429
  }
1409
- function rn({ items: e, className: n }) {
1410
- return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", className: n, children: /* @__PURE__ */ a("ol", { className: "breadcrumb mb-0", children: e.map((t, r) => {
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(
1430
+ function Yr({ items: e, className: r }) {
1431
+ return /* @__PURE__ */ o("nav", { "aria-label": "breadcrumb", className: h("rrc-breadcrumb", r), children: /* @__PURE__ */ o("ol", { className: "breadcrumb mb-0 rrc-breadcrumb__list", children: e.map((n, t) => {
1432
+ const a = t === e.length - 1, i = !a && (n.href || n.onClick);
1433
+ return /* @__PURE__ */ o("li", { className: h("breadcrumb-item", a && "active"), "aria-current": a ? "page" : void 0, children: i ? /* @__PURE__ */ o(
1413
1434
  "a",
1414
1435
  {
1415
- href: t.href ?? "#",
1416
- onClick: (o) => {
1436
+ href: n.href ?? "#",
1437
+ onClick: (l) => {
1417
1438
  var c;
1418
- t.href || o.preventDefault(), (c = t.onClick) == null || c.call(t);
1439
+ n.href || l.preventDefault(), (c = n.onClick) == null || c.call(n);
1419
1440
  },
1420
- children: t.label
1441
+ children: n.label
1421
1442
  }
1422
- ) : t.label }, r);
1443
+ ) : n.label }, t);
1423
1444
  }) }) });
1424
1445
  }
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(
1446
+ function _t({ items: e, children: r, placement: n = "start", className: t }) {
1447
+ const [a, i] = M(!1), l = L(null), c = F(() => i(!1), []), s = F(
1427
1448
  (m) => {
1428
- var g;
1429
- const v = e[m];
1430
- !v || v.disabled || ((g = v.onSelect) == null || g.call(v), c());
1449
+ var k;
1450
+ const p = e[m];
1451
+ !p || p.disabled || ((k = p.onSelect) == null || k.call(p), c());
1431
1452
  },
1432
1453
  [e, c]
1433
- ), { activeIndex: d, setActiveIndex: u, handleKeyDown: h } = re({
1454
+ ), { activeIndex: d, setActiveIndex: u, handleKeyDown: f } = xe({
1434
1455
  itemCount: e.length,
1435
- isOpen: l,
1456
+ isOpen: a,
1436
1457
  onSelect: s,
1437
1458
  onClose: c
1438
1459
  });
1439
- return /* @__PURE__ */ p(
1460
+ return /* @__PURE__ */ y(
1440
1461
  "span",
1441
1462
  {
1442
- ref: o,
1463
+ ref: l,
1443
1464
  className: "position-relative d-inline-block",
1444
1465
  onClick: () => i((m) => !m),
1445
- onKeyDown: h,
1466
+ onKeyDown: f,
1446
1467
  children: [
1447
- n,
1448
- /* @__PURE__ */ a(
1449
- W,
1468
+ r,
1469
+ /* @__PURE__ */ o(
1470
+ oe,
1450
1471
  {
1451
- open: l,
1472
+ open: a,
1452
1473
  onClose: c,
1453
- anchorRef: o,
1474
+ anchorRef: l,
1454
1475
  role: "menu",
1455
- className: f("dropdown-menu show", t === "end" && "dropdown-menu-end", r),
1456
- children: e.map((m, v) => /* @__PURE__ */ a(
1476
+ className: h("dropdown-menu show", n === "end" && "dropdown-menu-end", "rrc-menu", t),
1477
+ children: e.map((m, p) => /* @__PURE__ */ o(
1457
1478
  "button",
1458
1479
  {
1459
1480
  type: "button",
1460
1481
  role: "menuitem",
1461
- className: f("dropdown-item", v === d && "active", m.disabled && "disabled", m.danger && "text-danger"),
1482
+ className: h("dropdown-item", "rrc-menu__item", p === d && "active", m.disabled && "disabled", m.danger && "text-danger"),
1462
1483
  disabled: m.disabled,
1463
- onMouseEnter: () => u(v),
1464
- onMouseDown: (g) => g.preventDefault(),
1465
- onClick: (g) => {
1466
- g.stopPropagation(), s(v);
1484
+ onMouseEnter: () => u(p),
1485
+ onMouseDown: (k) => k.preventDefault(),
1486
+ onClick: (k) => {
1487
+ k.stopPropagation(), s(p);
1467
1488
  },
1468
1489
  children: m.label
1469
1490
  },
@@ -1475,67 +1496,67 @@ function it({ items: e, children: n, placement: t = "start", className: r }) {
1475
1496
  }
1476
1497
  );
1477
1498
  }
1478
- function st({ steps: e, currentStep: n, className: t }) {
1479
- return /* @__PURE__ */ a("ol", { className: f("d-flex list-unstyled align-items-center", t), children: e.map((r, l) => {
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: [
1482
- /* @__PURE__ */ p("div", { className: "d-flex align-items-center gap-2", children: [
1483
- /* @__PURE__ */ a(
1499
+ function xt({ steps: e, currentStep: r, className: n }) {
1500
+ return /* @__PURE__ */ o("ol", { className: h("d-flex list-unstyled align-items-center", "rrc-stepper", n), children: e.map((t, a) => {
1501
+ const i = a < r ? "complete" : a === r ? "active" : "upcoming", l = a === e.length - 1;
1502
+ return /* @__PURE__ */ y("li", { className: h("d-flex align-items-center", !l && "flex-grow-1"), children: [
1503
+ /* @__PURE__ */ y("div", { className: "d-flex align-items-center gap-2", children: [
1504
+ /* @__PURE__ */ o(
1484
1505
  "span",
1485
1506
  {
1486
- className: f(
1507
+ className: h(
1487
1508
  "d-flex align-items-center justify-content-center rounded-circle flex-shrink-0",
1488
1509
  i === "complete" ? "bg-primary text-white" : i === "active" ? "border border-primary text-primary" : "border text-body-secondary"
1489
1510
  ),
1490
1511
  style: { width: "2rem", height: "2rem" },
1491
1512
  "aria-current": i === "active" ? "step" : void 0,
1492
- children: i === "complete" ? "✓" : l + 1
1513
+ children: i === "complete" ? "✓" : a + 1
1493
1514
  }
1494
1515
  ),
1495
- /* @__PURE__ */ p("div", { children: [
1496
- /* @__PURE__ */ a("div", { className: f("small fw-semibold", i === "upcoming" && "text-body-secondary"), children: r.label }),
1497
- r.description && /* @__PURE__ */ a("div", { className: "small text-body-secondary", children: r.description })
1516
+ /* @__PURE__ */ y("div", { children: [
1517
+ /* @__PURE__ */ o("div", { className: h("small fw-semibold", i === "upcoming" && "text-body-secondary"), children: t.label }),
1518
+ t.description && /* @__PURE__ */ o("div", { className: "small text-body-secondary", children: t.description })
1498
1519
  ] })
1499
1520
  ] }),
1500
- !o && /* @__PURE__ */ a("hr", { className: "flex-grow-1 mx-2" })
1501
- ] }, r.key);
1521
+ !l && /* @__PURE__ */ o("hr", { className: "flex-grow-1 mx-2" })
1522
+ ] }, t.key);
1502
1523
  }) });
1503
1524
  }
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]) ?? "" : "";
1507
- return (t + r).toUpperCase();
1525
+ function Qr(e) {
1526
+ var a, i;
1527
+ const r = e.trim().split(/\s+/), n = ((a = r[0]) == null ? void 0 : a[0]) ?? "", t = r.length > 1 ? ((i = r[r.length - 1]) == null ? void 0 : i[0]) ?? "" : "";
1528
+ return (n + t).toUpperCase();
1508
1529
  }
1509
- const an = {
1530
+ const Xr = {
1510
1531
  sm: "1.75rem",
1511
1532
  md: "2.5rem",
1512
1533
  lg: "3.5rem"
1513
1534
  };
1514
- function ot({ src: e, name: n, size: t = "md", className: r }) {
1515
- const l = an[t];
1516
- return e ? /* @__PURE__ */ a(
1535
+ function St({ src: e, name: r, size: n = "md", className: t }) {
1536
+ const a = Xr[n];
1537
+ return e ? /* @__PURE__ */ o(
1517
1538
  "img",
1518
1539
  {
1519
1540
  src: e,
1520
- alt: n ?? "",
1521
- className: f("rounded-circle", r),
1522
- style: { width: l, height: l, objectFit: "cover" }
1541
+ alt: r ?? "",
1542
+ className: h("rounded-circle", "rrc-avatar", t),
1543
+ style: { width: a, height: a, objectFit: "cover" }
1523
1544
  }
1524
- ) : /* @__PURE__ */ a(
1545
+ ) : /* @__PURE__ */ o(
1525
1546
  "span",
1526
1547
  {
1527
- className: f("d-inline-flex align-items-center justify-content-center rounded-circle bg-secondary text-white", r),
1528
- style: { width: l, height: l, fontSize: `calc(${l} * 0.4)` },
1529
- role: n ? "img" : void 0,
1530
- "aria-label": n,
1531
- children: n ? ln(n) : null
1548
+ className: h("d-inline-flex align-items-center justify-content-center rounded-circle bg-secondary text-white", "rrc-avatar", "rrc-avatar--initials", t),
1549
+ style: { width: a, height: a, fontSize: `calc(${a} * 0.4)` },
1550
+ role: r ? "img" : void 0,
1551
+ "aria-label": r,
1552
+ children: r ? Qr(r) : null
1532
1553
  }
1533
1554
  );
1534
1555
  }
1535
- function ct({ variant: e = "secondary", onRemove: n, className: t, children: r }) {
1536
- return /* @__PURE__ */ p("span", { className: f("badge d-inline-flex align-items-center gap-1", `bg-${e}`, t), children: [
1537
- r,
1538
- n && /* @__PURE__ */ a(
1556
+ function Ct({ variant: e = "secondary", appearance: r = "solid", onRemove: n, className: t, children: a }) {
1557
+ return /* @__PURE__ */ y("span", { className: h("badge d-inline-flex align-items-center gap-1", r === "solid" && `bg-${e}`, "rrc-tag", `rrc-tag--${e}`, `rrc-tag--${r}`, t), children: [
1558
+ a,
1559
+ n && /* @__PURE__ */ o(
1539
1560
  "button",
1540
1561
  {
1541
1562
  type: "button",
@@ -1547,333 +1568,1169 @@ function ct({ variant: e = "secondary", onRemove: n, className: t, children: r }
1547
1568
  )
1548
1569
  ] });
1549
1570
  }
1550
- function dt({
1571
+ function It({
1551
1572
  value: e,
1552
- defaultValue: n,
1553
- onChange: t,
1554
- min: r = 0,
1555
- max: l = 100,
1573
+ defaultValue: r,
1574
+ onChange: n,
1575
+ min: t = 0,
1576
+ max: a = 100,
1556
1577
  step: i = 1,
1557
- id: o,
1578
+ id: l,
1558
1579
  name: c,
1559
1580
  disabled: s,
1560
1581
  required: d,
1561
1582
  className: u,
1562
- label: h,
1583
+ label: f,
1563
1584
  helpText: m,
1564
- error: v
1585
+ error: p
1565
1586
  }) {
1566
- const [g, w] = T({
1587
+ const [k, S] = T({
1567
1588
  value: e,
1568
- defaultValue: n ?? r,
1569
- onChange: t
1570
- }), k = F(), y = o ?? k;
1571
- return /* @__PURE__ */ p(B, { id: y, label: h, required: d, error: v, helpText: m, className: u, children: [
1572
- /* @__PURE__ */ a(
1589
+ defaultValue: r ?? t,
1590
+ onChange: n
1591
+ }), x = W(), _ = l ?? x;
1592
+ return /* @__PURE__ */ y(Y, { id: _, label: f, required: d, error: p, helpText: m, className: u, children: [
1593
+ /* @__PURE__ */ o(
1573
1594
  "input",
1574
1595
  {
1575
- id: y,
1596
+ id: _,
1576
1597
  name: c,
1577
1598
  type: "range",
1578
- className: "form-range",
1599
+ className: "form-range rrc-range",
1579
1600
  disabled: s,
1580
1601
  required: d,
1581
- min: r,
1582
- max: l,
1602
+ min: t,
1603
+ max: a,
1583
1604
  step: i,
1584
- value: g,
1585
- onChange: (S) => w(Number(S.target.value))
1605
+ value: k,
1606
+ onChange: (C) => S(Number(C.target.value))
1586
1607
  }
1587
1608
  ),
1588
- /* @__PURE__ */ a("div", { className: "small text-body-secondary", children: g })
1609
+ /* @__PURE__ */ o("div", { className: "small text-body-secondary", children: k })
1589
1610
  ] });
1590
1611
  }
1591
- function ut({ value: e, defaultValue: n, onChange: t, max: r = 5, disabled: l, className: i }) {
1592
- const [o, c] = T({
1612
+ function Et({ value: e, defaultValue: r, onChange: n, max: t = 5, disabled: a, className: i }) {
1613
+ const [l, c] = T({
1593
1614
  value: e,
1594
- defaultValue: n ?? 0,
1595
- onChange: t
1615
+ defaultValue: r ?? 0,
1616
+ onChange: n
1596
1617
  });
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(
1618
+ return /* @__PURE__ */ o("div", { className: h("d-inline-flex gap-1", "rrc-rating", i), role: "radiogroup", "aria-label": "Rating", children: Array.from({ length: t }, (s, d) => d + 1).map((s) => /* @__PURE__ */ o(
1598
1619
  "button",
1599
1620
  {
1600
1621
  type: "button",
1601
- className: "btn btn-link p-0 border-0",
1602
- disabled: l,
1622
+ className: "btn btn-link p-0 border-0 rrc-rating__star",
1623
+ disabled: a,
1603
1624
  role: "radio",
1604
- "aria-checked": s === o,
1625
+ "aria-checked": s === l,
1605
1626
  "aria-label": `${s} star${s > 1 ? "s" : ""}`,
1606
1627
  onClick: () => c(s),
1607
- children: /* @__PURE__ */ a("span", { "aria-hidden": "true", style: { fontSize: "1.25rem", color: s <= o ? "#f5b301" : "#ced4da" }, children: "★" })
1628
+ children: /* @__PURE__ */ o("span", { "aria-hidden": "true", style: { fontSize: "1.25rem", color: s <= l ? "#f5b301" : "#ced4da" }, children: "★" })
1608
1629
  },
1609
1630
  s
1610
1631
  )) });
1611
1632
  }
1612
- function ft({ value: e, variant: n = "primary", label: t, className: r }) {
1613
- const l = Math.max(0, Math.min(100, e));
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 }) });
1633
+ function At({ value: e, variant: r = "primary", label: n, className: t }) {
1634
+ const a = Math.max(0, Math.min(100, e));
1635
+ return /* @__PURE__ */ o("div", { className: h("progress", "rrc-progress", t), role: "progressbar", "aria-valuenow": a, "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ o("div", { className: h("progress-bar", "rrc-progress__bar", `bg-${r}`), style: { width: `${a}%` }, children: n ? `${Math.round(a)}%` : null }) });
1615
1636
  }
1616
- function mt({ brand: e, start: n, end: t, variant: r = "light", className: l }) {
1617
- return /* @__PURE__ */ a(
1637
+ function Dt({ brand: e, start: r, end: n, variant: t = "light", className: a }) {
1638
+ return /* @__PURE__ */ o(
1618
1639
  "nav",
1619
1640
  {
1620
- className: f(
1641
+ className: h(
1621
1642
  "navbar navbar-expand-lg border-bottom",
1622
- r === "dark" ? "navbar-dark bg-dark" : "navbar-light bg-light",
1623
- l
1643
+ "rrc-navbar",
1644
+ t === "dark" ? "navbar-dark bg-dark" : "navbar-light bg-light",
1645
+ a
1624
1646
  ),
1625
- children: /* @__PURE__ */ p("div", { className: "container-fluid", children: [
1626
- e && /* @__PURE__ */ a("span", { className: "navbar-brand mb-0", children: e }),
1627
- n && /* @__PURE__ */ a("div", { className: "d-flex align-items-center gap-3", children: n }),
1628
- t && /* @__PURE__ */ a("div", { className: "d-flex align-items-center gap-3 ms-auto", children: t })
1647
+ children: /* @__PURE__ */ y("div", { className: "container-fluid", children: [
1648
+ e && /* @__PURE__ */ o("span", { className: "navbar-brand mb-0", children: e }),
1649
+ r && /* @__PURE__ */ o("div", { className: "d-flex align-items-center gap-3", children: r }),
1650
+ n && /* @__PURE__ */ o("div", { className: "d-flex align-items-center gap-3 ms-auto", children: n })
1629
1651
  ] })
1630
1652
  }
1631
1653
  );
1632
1654
  }
1655
+ const dr = [
1656
+ "primary",
1657
+ "primaryActive",
1658
+ "primaryLight",
1659
+ "primaryInverse",
1660
+ "primaryRgb",
1661
+ "componentActiveColor",
1662
+ "componentActiveBg",
1663
+ "componentHoverColor",
1664
+ "componentHoverBg",
1665
+ "componentCheckedColor",
1666
+ "componentCheckedBg",
1667
+ "menuLinkColorHover",
1668
+ "menuLinkColorShow",
1669
+ "menuLinkColorHere",
1670
+ "menuLinkColorActive"
1671
+ ];
1672
+ function en(e) {
1673
+ if (typeof e != "object" || e === null)
1674
+ return !1;
1675
+ const r = e;
1676
+ if (typeof r.id != "string" || r.id.length === 0 || typeof r.tokens != "object" || r.tokens === null)
1677
+ return !1;
1678
+ const n = r.tokens;
1679
+ return dr.every((t) => typeof n[t] == "string" && n[t].length > 0);
1680
+ }
1681
+ function ve(e) {
1682
+ const { id: r, primary: n, primaryActive: t, primaryLight: a, primaryInverse: i, primaryRgb: l, swatch: c } = e;
1683
+ return {
1684
+ id: r,
1685
+ ...c !== void 0 ? { swatch: c } : {},
1686
+ tokens: {
1687
+ primary: n,
1688
+ primaryActive: t,
1689
+ primaryLight: a,
1690
+ primaryInverse: i,
1691
+ primaryRgb: l,
1692
+ componentActiveColor: i,
1693
+ componentActiveBg: n,
1694
+ componentHoverColor: t,
1695
+ componentHoverBg: a,
1696
+ componentCheckedColor: i,
1697
+ componentCheckedBg: n,
1698
+ menuLinkColorHover: t,
1699
+ menuLinkColorShow: t,
1700
+ menuLinkColorHere: t,
1701
+ menuLinkColorActive: n
1702
+ }
1703
+ };
1704
+ }
1705
+ const rn = [
1706
+ ve({
1707
+ id: "blue",
1708
+ primary: "#0d6efd",
1709
+ primaryActive: "#0a58ca",
1710
+ primaryLight: "#cfe2ff",
1711
+ primaryInverse: "#ffffff",
1712
+ primaryRgb: "13, 110, 253"
1713
+ }),
1714
+ ve({
1715
+ id: "indigo",
1716
+ primary: "#6610f2",
1717
+ primaryActive: "#520dc2",
1718
+ primaryLight: "#e0cffc",
1719
+ primaryInverse: "#ffffff",
1720
+ primaryRgb: "102, 16, 242"
1721
+ }),
1722
+ // Deliberately taken from the deeper end of Bootstrap's teal ramp: a scheme
1723
+ // must carry usable contrast values, and `--bs-teal` (#20c997) is a surface
1724
+ // color that measures ~2:1 as text on white.
1725
+ ve({
1726
+ id: "teal",
1727
+ primary: "#13795b",
1728
+ primaryActive: "#0d503c",
1729
+ primaryLight: "#d2f4ea",
1730
+ primaryInverse: "#ffffff",
1731
+ primaryRgb: "19, 121, 91",
1732
+ swatch: "#20c997"
1733
+ }),
1734
+ ve({
1735
+ id: "green",
1736
+ primary: "#198754",
1737
+ primaryActive: "#146c43",
1738
+ primaryLight: "#d1e7dd",
1739
+ primaryInverse: "#ffffff",
1740
+ primaryRgb: "25, 135, 84"
1741
+ })
1742
+ ], Re = "blue", ce = new Map(rn.map((e) => [e.id, e]));
1743
+ function Tt(e) {
1744
+ if (!en(e))
1745
+ throw new Error(
1746
+ "[react-components] registerColorScheme() requires a complete token family: " + dr.join(", ") + "."
1747
+ );
1748
+ ce.set(e.id, e);
1749
+ }
1750
+ function nn(e) {
1751
+ return ce.get(e);
1752
+ }
1753
+ function tn() {
1754
+ return [...ce.values()];
1755
+ }
1756
+ function an(e) {
1757
+ const r = e !== void 0 ? ce.get(e) : void 0;
1758
+ return r || ce.get(Re);
1759
+ }
1760
+ function on(e) {
1761
+ const r = e.tokens;
1762
+ return {
1763
+ "--bs-primary": r.primary,
1764
+ "--bs-primary-rgb": r.primaryRgb,
1765
+ "--bs-primary-active": r.primaryActive,
1766
+ "--bs-primary-light": r.primaryLight,
1767
+ "--bs-primary-inverse": r.primaryInverse,
1768
+ "--bs-component-active-color": r.componentActiveColor,
1769
+ "--bs-component-active-bg": r.componentActiveBg,
1770
+ "--bs-component-hover-color": r.componentHoverColor,
1771
+ "--bs-component-hover-bg": r.componentHoverBg,
1772
+ "--bs-component-checked-color": r.componentCheckedColor,
1773
+ "--bs-component-checked-bg": r.componentCheckedBg,
1774
+ "--bs-menu-link-color-hover": r.menuLinkColorHover,
1775
+ "--bs-menu-link-color-show": r.menuLinkColorShow,
1776
+ "--bs-menu-link-color-here": r.menuLinkColorHere,
1777
+ "--bs-menu-link-color-active": r.menuLinkColorActive,
1778
+ // This repository's own tokens. Only the theme-independent ones are
1779
+ // published here: these are applied as an inline style on the root, which
1780
+ // outranks every stylesheet rule, so a token whose value depends on the
1781
+ // light/dark theme must not be set from a scheme. The stylesheet resolves
1782
+ // those from the `--bs-*` names above in light mode and derives its own
1783
+ // values under `[data-bs-theme="dark"]`; publishing a light-mode shade here
1784
+ // pinned the dark sidebar's menu links to ~2:1.
1785
+ "--rrc-primary": r.primary,
1786
+ "--rrc-primary-rgb": r.primaryRgb,
1787
+ "--rrc-primary-active": r.primaryActive,
1788
+ "--rrc-primary-inverse": r.primaryInverse,
1789
+ "--rrc-component-active-color": r.componentActiveColor,
1790
+ "--rrc-component-active-bg": r.componentActiveBg,
1791
+ "--rrc-component-hover-bg": r.componentHoverBg,
1792
+ "--rrc-component-checked-color": r.componentCheckedColor,
1793
+ "--rrc-component-checked-bg": r.componentCheckedBg
1794
+ };
1795
+ }
1796
+ const ur = ["light", "dark", "system"], mr = ["compact", "grouped"], fr = ["light", "dark", "auto"], $e = Ve(void 0);
1797
+ function ln(e) {
1798
+ return typeof e == "string" && ur.includes(e);
1799
+ }
1633
1800
  function sn(e) {
1801
+ return typeof e == "string" && mr.includes(e);
1802
+ }
1803
+ function cn(e) {
1804
+ return typeof e == "string" && fr.includes(e);
1805
+ }
1806
+ function dn(e, r) {
1807
+ let n;
1808
+ try {
1809
+ n = e.getItem(r);
1810
+ } catch {
1811
+ return {};
1812
+ }
1813
+ if (!n)
1814
+ return {};
1815
+ let t;
1816
+ try {
1817
+ t = JSON.parse(n);
1818
+ } catch {
1819
+ return {};
1820
+ }
1821
+ if (typeof t != "object" || t === null)
1822
+ return {};
1823
+ const a = t, i = {};
1824
+ return ln(a.mode) && (i.mode = a.mode), sn(a.sidebarPresentation) && (i.sidebarPresentation = a.sidebarPresentation), cn(a.sidebarTone) && (i.sidebarTone = a.sidebarTone), typeof a.colorSchemeId == "string" && nn(a.colorSchemeId) && (i.colorSchemeId = a.colorSchemeId), i;
1825
+ }
1826
+ function Vt({
1827
+ children: e,
1828
+ mode: r,
1829
+ defaultMode: n,
1830
+ onModeChange: t,
1831
+ sidebarPresentation: a,
1832
+ defaultSidebarPresentation: i,
1833
+ onSidebarPresentationChange: l,
1834
+ sidebarTone: c,
1835
+ defaultSidebarTone: s,
1836
+ onSidebarToneChange: d,
1837
+ colorSchemeId: u,
1838
+ defaultColorSchemeId: f,
1839
+ onColorSchemeIdChange: m,
1840
+ storage: p,
1841
+ storageKey: k,
1842
+ applyTo: S = "none",
1843
+ themeAttribute: x = "data-bs-theme"
1844
+ }) {
1845
+ const [_, C] = T({
1846
+ value: r,
1847
+ defaultValue: n ?? "system",
1848
+ onChange: t
1849
+ }), [v, N] = T({
1850
+ value: a,
1851
+ defaultValue: i ?? "grouped",
1852
+ onChange: l
1853
+ }), [b, w] = T({
1854
+ value: c,
1855
+ defaultValue: s ?? "auto",
1856
+ onChange: d
1857
+ }), [g, I] = T({
1858
+ value: u,
1859
+ defaultValue: f ?? Re,
1860
+ onChange: m
1861
+ }), [D, O] = M("light");
1862
+ U(() => {
1863
+ if (typeof window > "u" || typeof window.matchMedia != "function")
1864
+ return;
1865
+ const E = window.matchMedia("(prefers-color-scheme: dark)");
1866
+ O(E.matches ? "dark" : "light");
1867
+ const B = (z) => O(z.matches ? "dark" : "light");
1868
+ if (typeof E.addEventListener == "function")
1869
+ return E.addEventListener("change", B), () => E.removeEventListener("change", B);
1870
+ if (typeof E.addListener == "function")
1871
+ return E.addListener(B), () => E.removeListener(B);
1872
+ }, []);
1873
+ const q = p !== void 0 && k !== void 0, [G, P] = M(!1), V = {
1874
+ mode: r !== void 0,
1875
+ sidebarPresentation: a !== void 0,
1876
+ sidebarTone: c !== void 0,
1877
+ colorSchemeId: u !== void 0
1878
+ }, A = L(V);
1879
+ A.current = V;
1880
+ const H = L({ setMode: C, setSidebarPresentation: N, setSidebarTone: w, setColorSchemeId: I });
1881
+ H.current = { setMode: C, setSidebarPresentation: N, setSidebarTone: w, setColorSchemeId: I }, U(() => {
1882
+ if (!q)
1883
+ return;
1884
+ const E = dn(p, k), B = A.current, z = H.current;
1885
+ E.mode !== void 0 && !B.mode && z.setMode(E.mode), E.sidebarPresentation !== void 0 && !B.sidebarPresentation && z.setSidebarPresentation(E.sidebarPresentation), E.sidebarTone !== void 0 && !B.sidebarTone && z.setSidebarTone(E.sidebarTone), E.colorSchemeId !== void 0 && !B.colorSchemeId && z.setColorSchemeId(E.colorSchemeId), P(!0);
1886
+ }, [q, p, k]), U(() => {
1887
+ if (!(!q || !G))
1888
+ try {
1889
+ p.setItem(
1890
+ k,
1891
+ JSON.stringify({
1892
+ mode: _,
1893
+ sidebarPresentation: v,
1894
+ sidebarTone: b,
1895
+ colorSchemeId: g
1896
+ })
1897
+ );
1898
+ } catch {
1899
+ }
1900
+ }, [q, G, p, k, _, v, b, g]);
1901
+ const R = _ === "system" ? D : _, Z = an(g), X = J(() => on(Z), [Z]);
1902
+ U(() => {
1903
+ if (S === "none" || typeof document > "u")
1904
+ return;
1905
+ const E = S === "body" ? document.body : document.documentElement;
1906
+ if (!E)
1907
+ return;
1908
+ const B = E.getAttribute(x);
1909
+ E.setAttribute(x, R);
1910
+ for (const [z, ie] of Object.entries(X))
1911
+ E.style.setProperty(z, ie);
1912
+ return () => {
1913
+ B === null ? E.removeAttribute(x) : E.setAttribute(x, B);
1914
+ for (const z of Object.keys(X))
1915
+ E.style.removeProperty(z);
1916
+ };
1917
+ }, [S, x, R, X]);
1918
+ const K = J(
1919
+ () => ({ "data-bs-theme": R, style: X }),
1920
+ [R, X]
1921
+ ), j = J(
1922
+ () => ({
1923
+ mode: _,
1924
+ sidebarPresentation: v,
1925
+ sidebarTone: b,
1926
+ colorSchemeId: g,
1927
+ resolvedTheme: R,
1928
+ systemTheme: D,
1929
+ colorScheme: Z,
1930
+ setMode: C,
1931
+ setSidebarPresentation: N,
1932
+ setSidebarTone: w,
1933
+ setColorSchemeId: I,
1934
+ appearanceProps: K
1935
+ }),
1936
+ [
1937
+ _,
1938
+ v,
1939
+ b,
1940
+ g,
1941
+ R,
1942
+ D,
1943
+ Z,
1944
+ C,
1945
+ N,
1946
+ w,
1947
+ I,
1948
+ K
1949
+ ]
1950
+ );
1951
+ return /* @__PURE__ */ o($e.Provider, { value: j, children: e });
1952
+ }
1953
+ function Lt() {
1954
+ const e = we($e);
1955
+ if (!e)
1956
+ throw new Error("[react-components] useAppearance() must be used inside an <AppearanceProvider>.");
1957
+ return e;
1958
+ }
1959
+ function hr() {
1960
+ return we($e);
1961
+ }
1962
+ function Rt({
1963
+ storageKey: e,
1964
+ themeAttribute: r = "data-bs-theme",
1965
+ target: n = "documentElement",
1966
+ defaultMode: t = "system"
1967
+ }) {
1968
+ const a = (d) => JSON.stringify(d).replace(/</g, "\\u003C"), i = a(e), l = a(r), c = a(t), s = n === "body" ? "document.body" : "document.documentElement";
1969
+ return "(function(){try{var raw=window.localStorage.getItem(" + i + ");var mode=" + c + ";if(raw){var parsed=JSON.parse(raw);if(parsed&&typeof parsed.mode==='string'){mode=parsed.mode;}}var dark=mode==='dark'||(mode==='system'&&window.matchMedia('(prefers-color-scheme: dark)').matches);" + s + ".setAttribute(" + l + ",dark?'dark':'light');}catch(e){}})();";
1970
+ }
1971
+ function un(e) {
1972
+ return e.type === "collapsible" || e.type === "group";
1973
+ }
1974
+ function pr(e) {
1975
+ return e.type === "collapsible" || e.type === "group" && e.collapsible === !0;
1976
+ }
1977
+ function Oe(e) {
1634
1978
  return "items" in e;
1635
1979
  }
1636
- function ue({ item: e }) {
1637
- return /* @__PURE__ */ p(
1638
- "a",
1980
+ function mn(e) {
1981
+ return e.map((r) => Oe(r) ? fn(r) : br(r));
1982
+ }
1983
+ function fn(e) {
1984
+ return {
1985
+ type: "group",
1986
+ key: e.key,
1987
+ label: e.label,
1988
+ collapsible: !0,
1989
+ children: e.items.map(br)
1990
+ };
1991
+ }
1992
+ function br(e) {
1993
+ const r = {
1994
+ key: e.key,
1995
+ label: e.label,
1996
+ ...e.icon !== void 0 ? { icon: e.icon } : {},
1997
+ ...e.disabled !== void 0 ? { disabled: e.disabled } : {}
1998
+ }, n = e.onClick ? () => {
1999
+ var t;
2000
+ return (t = e.onClick) == null ? void 0 : t.call(e);
2001
+ } : void 0;
2002
+ return e.href !== void 0 ? { ...r, type: "link", href: e.href, ...n ? { onSelect: n } : {} } : { ...r, type: "action", ...n ? { onSelect: n } : {} };
2003
+ }
2004
+ function hn(e) {
2005
+ return e.filter(Oe).filter((r) => r.defaultOpen).map((r) => r.key);
2006
+ }
2007
+ function pn(e) {
2008
+ for (const r of e)
2009
+ if (Oe(r)) {
2010
+ const n = r.items.find((t) => t.active);
2011
+ if (n)
2012
+ return n.key;
2013
+ } else if (r.active)
2014
+ return r.key;
2015
+ }
2016
+ function bn(e) {
2017
+ const r = /* @__PURE__ */ new Map(), n = [], t = [];
2018
+ function a(l, c, s) {
2019
+ const d = [];
2020
+ for (const u of l) {
2021
+ const f = { item: u, key: u.key, depth: c, ancestors: s, children: [] };
2022
+ r.has(u.key) ? t.push(u.key) : (r.set(u.key, f), n.push(u.key)), un(u) && (f.children = a(u.children, c + 1, [...s, u.key])), d.push(f);
2023
+ }
2024
+ return d;
2025
+ }
2026
+ return { roots: a(e, 0, []), byKey: r, order: n, duplicateKeys: t };
2027
+ }
2028
+ function le(e, r) {
2029
+ const n = new Set(r), t = e.filter((i) => n.has(i)), a = new Set(t);
2030
+ for (const i of n)
2031
+ a.has(i) || t.push(i);
2032
+ return t;
2033
+ }
2034
+ function vn(e, r, n, t) {
2035
+ const a = e.byKey.get(n), i = new Set(r);
2036
+ if (i.has(n)) {
2037
+ if (i.delete(n), a)
2038
+ for (const l of vr(a))
2039
+ i.delete(l);
2040
+ return le(e.order, i);
2041
+ }
2042
+ if (t === "single") {
2043
+ const l = new Set(a ? a.ancestors : []);
2044
+ return l.add(n), le(e.order, l);
2045
+ }
2046
+ if (i.add(n), a)
2047
+ for (const l of a.ancestors)
2048
+ i.add(l);
2049
+ return le(e.order, i);
2050
+ }
2051
+ function Ze(e, r, n, t) {
2052
+ if (n.length === 0)
2053
+ return le(e.order, new Set(r));
2054
+ if (t === "single")
2055
+ return le(e.order, new Set(n));
2056
+ const a = new Set(r);
2057
+ for (const i of n)
2058
+ a.add(i);
2059
+ return le(e.order, a);
2060
+ }
2061
+ function gn(e, r) {
2062
+ return e.length === r.length && e.every((n, t) => n === r[t]);
2063
+ }
2064
+ function vr(e) {
2065
+ const r = [];
2066
+ for (const n of e.children)
2067
+ r.push(n.key), r.push(...vr(n));
2068
+ return r;
2069
+ }
2070
+ function gr(e, r) {
2071
+ var n;
2072
+ return r === void 0 ? [] : ((n = e.byKey.get(r)) == null ? void 0 : n.ancestors) ?? [];
2073
+ }
2074
+ function Ye(e, r) {
2075
+ return gr(e, r).filter((n) => {
2076
+ const t = e.byKey.get(n);
2077
+ return t !== void 0 && pr(t.item);
2078
+ });
2079
+ }
2080
+ const yn = typeof document < "u" ? _r : U, Nn = Symbol("unresolved-active-key");
2081
+ function kn(e) {
2082
+ if (e.type !== "divider")
2083
+ return e.ariaLabel !== void 0 ? e.ariaLabel : typeof e.label == "string" ? e.label : void 0;
2084
+ }
2085
+ function wn(e, r) {
2086
+ return `${e}-${r.replace(/[^A-Za-z0-9_-]/g, "_")}`;
2087
+ }
2088
+ function Ae({ node: e, expandable: r }) {
2089
+ const n = e.item;
2090
+ return n.type === "divider" ? null : /* @__PURE__ */ y(Q, { children: [
2091
+ n.icon !== void 0 && /* @__PURE__ */ o("span", { className: "rrc-sidebar__icon", "aria-hidden": "true", children: n.icon }),
2092
+ /* @__PURE__ */ o("span", { className: "rrc-sidebar__label", children: n.label }),
2093
+ n.badge !== void 0 && /* @__PURE__ */ o("span", { className: "rrc-sidebar__badge", children: n.badge }),
2094
+ r && /* @__PURE__ */ o("span", { className: "rrc-sidebar__arrow", "aria-hidden": "true" })
2095
+ ] });
2096
+ }
2097
+ function De({ name: e, children: r }) {
2098
+ return e === void 0 ? /* @__PURE__ */ o(Q, { children: r }) : /* @__PURE__ */ o(sr, { content: e, placement: "bottom", wrapperClassName: "rrc-sidebar__tooltip", children: r });
2099
+ }
2100
+ function _n(e) {
2101
+ if (!e)
2102
+ return;
2103
+ const r = e.getBoundingClientRect(), n = (e.closest(".rrc-sidebar") ?? e).getBoundingClientRect(), t = getComputedStyle(e).direction === "rtl", a = document.documentElement.clientWidth;
2104
+ e.style.setProperty("--rrc-rail-tip-block-start", `${Math.round(r.top + r.height / 2)}px`), e.style.setProperty("--rrc-rail-tip-inline-start", `${Math.round(t ? a - n.left : n.right)}px`);
2105
+ }
2106
+ function Te(e) {
2107
+ if (!e)
2108
+ return {};
2109
+ const r = (n) => _n(n.currentTarget);
2110
+ return { onPointerEnter: r, onFocusCapture: r };
2111
+ }
2112
+ function Ne({ node: e, ctx: r }) {
2113
+ const n = e.item, t = L(null), [a, i] = M(!1), l = F(() => i(!1), []);
2114
+ if (yn(() => {
2115
+ const v = t.current;
2116
+ if (!a || !v)
2117
+ return;
2118
+ const N = () => {
2119
+ const b = v.getBoundingClientRect(), w = (v.closest(".rrc-sidebar") ?? v).getBoundingClientRect(), g = getComputedStyle(v).direction === "rtl", I = document.documentElement.clientWidth;
2120
+ v.style.setProperty("--rrc-flyout-block-start", `${Math.round(b.top)}px`), v.style.setProperty("--rrc-flyout-inline-start", `${Math.round(g ? I - w.left : w.right)}px`);
2121
+ };
2122
+ return N(), window.addEventListener("scroll", N, !0), window.addEventListener("resize", N), () => {
2123
+ window.removeEventListener("scroll", N, !0), window.removeEventListener("resize", N);
2124
+ };
2125
+ }, [a]), n.type === "divider")
2126
+ return /* @__PURE__ */ o("li", { role: "none", className: h("rrc-sidebar__divider", n.className), children: /* @__PURE__ */ o(Zr, { className: "my-1" }) });
2127
+ const c = { "--rrc-sidebar-depth": String(Math.max(0, e.depth - r.depthOffset)) }, s = kn(n), d = r.activeKey === n.key, u = r.activeAncestors.has(n.key), f = pr(n), m = f && r.expanded.has(n.key), p = wn(r.idPrefix, n.key), k = h(
2128
+ "rrc-sidebar__row",
2129
+ d && "rrc-sidebar__row--active",
2130
+ u && "rrc-sidebar__row--active-ancestor",
2131
+ n.disabled && "rrc-sidebar__row--disabled",
2132
+ n.className
2133
+ );
2134
+ if (n.type === "link") {
2135
+ const v = (w) => {
2136
+ if (n.disabled) {
2137
+ w.preventDefault();
2138
+ return;
2139
+ }
2140
+ r.select(n, w);
2141
+ }, N = {
2142
+ item: n,
2143
+ href: n.href,
2144
+ className: h(k, "rrc-sidebar__row--link"),
2145
+ style: c,
2146
+ children: /* @__PURE__ */ o(Ae, { node: e, expandable: !1 }),
2147
+ onClick: v,
2148
+ "aria-current": d ? "page" : void 0,
2149
+ "aria-disabled": n.disabled ? !0 : void 0,
2150
+ "aria-label": r.collapsed ? s : void 0,
2151
+ "data-active-ancestor": u ? "true" : void 0,
2152
+ target: n.target,
2153
+ rel: n.rel
2154
+ }, b = r.renderLink ? r.renderLink(N) : /* @__PURE__ */ o(
2155
+ "a",
2156
+ {
2157
+ href: N.href,
2158
+ className: N.className,
2159
+ style: N.style,
2160
+ onClick: N.onClick,
2161
+ "aria-current": N["aria-current"],
2162
+ "aria-disabled": N["aria-disabled"],
2163
+ "aria-label": N["aria-label"],
2164
+ "data-active-ancestor": N["data-active-ancestor"],
2165
+ target: N.target,
2166
+ rel: N.rel,
2167
+ children: N.children
2168
+ }
2169
+ );
2170
+ return /* @__PURE__ */ o("li", { className: "rrc-sidebar__item", ...Te(r.collapsed), children: r.collapsed ? /* @__PURE__ */ o(De, { name: s, children: b }) : b });
2171
+ }
2172
+ if (n.type === "action") {
2173
+ const v = /* @__PURE__ */ o(
2174
+ "button",
2175
+ {
2176
+ type: "button",
2177
+ className: h(k, "rrc-sidebar__row--action"),
2178
+ style: c,
2179
+ disabled: n.disabled,
2180
+ "aria-label": r.collapsed ? s : void 0,
2181
+ "data-active-ancestor": u ? "true" : void 0,
2182
+ "data-active": d ? "true" : void 0,
2183
+ onClick: (N) => r.select(n, N),
2184
+ children: /* @__PURE__ */ o(Ae, { node: e, expandable: !1 })
2185
+ }
2186
+ );
2187
+ return /* @__PURE__ */ o("li", { className: "rrc-sidebar__item", ...Te(r.collapsed), children: r.collapsed ? /* @__PURE__ */ o(De, { name: s, children: v }) : v });
2188
+ }
2189
+ if (!f) {
2190
+ const v = `${p}-title`;
2191
+ return /* @__PURE__ */ y("li", { className: h("rrc-sidebar__item", "rrc-sidebar__group", n.className), children: [
2192
+ /* @__PURE__ */ y("div", { className: "rrc-sidebar__group-title", id: v, style: c, children: [
2193
+ n.icon !== void 0 && /* @__PURE__ */ o("span", { className: "rrc-sidebar__icon", "aria-hidden": "true", children: n.icon }),
2194
+ /* @__PURE__ */ o("span", { className: "rrc-sidebar__label", children: n.label }),
2195
+ n.badge !== void 0 && /* @__PURE__ */ o("span", { className: "rrc-sidebar__badge", children: n.badge })
2196
+ ] }),
2197
+ /* @__PURE__ */ o("ul", { className: "rrc-sidebar__menu rrc-sidebar__submenu", "aria-labelledby": v, children: e.children.map((N) => /* @__PURE__ */ o(Ne, { node: N, ctx: { ...r, depthOffset: r.depthOffset + 1 } }, N.key)) })
2198
+ ] });
2199
+ }
2200
+ const S = /* @__PURE__ */ o("ul", { className: "rrc-sidebar__menu rrc-sidebar__submenu", id: p, children: e.children.map((v) => /* @__PURE__ */ o(Ne, { node: v, ctx: r }, v.key)) }), x = r.collapsed, _ = () => {
2201
+ n.disabled || (x ? i((v) => !v) : r.toggle(n.key));
2202
+ }, C = /* @__PURE__ */ o(
2203
+ "button",
1639
2204
  {
1640
- href: e.href ?? "#",
1641
- className: f("nav-link d-flex align-items-center gap-2", e.active && "active", e.disabled && "disabled"),
1642
- "aria-current": e.active ? "page" : void 0,
1643
- "aria-disabled": e.disabled,
1644
- onClick: (n) => {
1645
- var t;
1646
- e.href || n.preventDefault(), !e.disabled && ((t = e.onClick) == null || t.call(e));
1647
- },
2205
+ type: "button",
2206
+ className: h(k, "rrc-sidebar__row--toggle", n.type === "group" && "rrc-sidebar__row--group-toggle"),
2207
+ style: c,
2208
+ disabled: n.disabled,
2209
+ "aria-expanded": x ? a : m,
2210
+ "aria-controls": p,
2211
+ "aria-label": r.collapsed ? s : void 0,
2212
+ "data-active-ancestor": u ? "true" : void 0,
2213
+ onClick: _,
2214
+ children: /* @__PURE__ */ o(Ae, { node: e, expandable: !0 })
2215
+ }
2216
+ );
2217
+ return /* @__PURE__ */ y(
2218
+ "li",
2219
+ {
2220
+ ref: t,
2221
+ className: h("rrc-sidebar__item", x && "rrc-sidebar__item--flyout-anchor"),
2222
+ ...Te(r.collapsed),
1648
2223
  children: [
1649
- e.icon,
1650
- e.label
2224
+ x ? /* @__PURE__ */ o(De, { name: s, children: C }) : C,
2225
+ x ? /* @__PURE__ */ o(oe, { open: a, onClose: l, anchorRef: t, className: "rrc-sidebar__flyout", children: /* @__PURE__ */ o("ul", { className: "rrc-sidebar__menu rrc-sidebar__submenu", id: p, children: e.children.map((v) => (
2226
+ // Inside the panel the branch is fully expanded again, and its
2227
+ // rows start flush rather than inheriting the aside's indentation.
2228
+ /* @__PURE__ */ o(Ne, { node: v, ctx: { ...r, collapsed: !1, depthOffset: e.depth + 1 } }, v.key)
2229
+ )) }) }) : m && S
1651
2230
  ]
1652
2231
  }
1653
2232
  );
1654
2233
  }
1655
- function ht({ sections: e, header: n, footer: t, className: r }) {
1656
- return /* @__PURE__ */ p("div", { className: f("d-flex flex-column h-100", r), children: [
1657
- n && /* @__PURE__ */ a("div", { className: "p-3 border-bottom", children: n }),
1658
- /* @__PURE__ */ a("nav", { className: "nav flex-column flex-grow-1 p-2 gap-1", children: e.map(
1659
- (l) => sn(l) ? /* @__PURE__ */ a(
1660
- Ye,
1661
- {
1662
- className: "border-0",
1663
- defaultOpenKeys: l.defaultOpen ? [l.key] : [],
1664
- items: [
1665
- {
1666
- key: l.key,
1667
- header: l.label,
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)) })
1669
- }
1670
- ]
1671
- },
1672
- l.key
1673
- ) : /* @__PURE__ */ a(ue, { item: l }, l.key)
1674
- ) }),
1675
- t && /* @__PURE__ */ a("div", { className: "p-3 border-top", children: t })
1676
- ] });
2234
+ function xn({ collapsed: e, toggle: r, label: n }) {
2235
+ return /* @__PURE__ */ o("button", { type: "button", className: "rrc-sidebar__collapse-btn", "aria-label": n, onClick: r, children: /* @__PURE__ */ o(
2236
+ "svg",
2237
+ {
2238
+ className: h("rrc-sidebar__collapse-icon", e && "rrc-sidebar__collapse-icon--collapsed"),
2239
+ viewBox: "0 0 24 24",
2240
+ fill: "none",
2241
+ stroke: "currentColor",
2242
+ strokeWidth: "2",
2243
+ strokeLinecap: "round",
2244
+ strokeLinejoin: "round",
2245
+ "aria-hidden": "true",
2246
+ focusable: "false",
2247
+ children: /* @__PURE__ */ o("path", { d: "M14.5 6.5 9 12l5.5 5.5" })
2248
+ }
2249
+ ) });
1677
2250
  }
1678
- function bt({ title: e, description: n, breadcrumbItems: t, actions: r, className: l }) {
1679
- return /* @__PURE__ */ p("div", { className: f("mb-4", l), children: [
1680
- t && t.length > 0 && /* @__PURE__ */ a(rn, { items: t, className: "mb-2" }),
1681
- /* @__PURE__ */ p("div", { className: "d-flex align-items-start justify-content-between gap-3 flex-wrap", children: [
1682
- /* @__PURE__ */ p("div", { children: [
1683
- /* @__PURE__ */ a("h1", { className: "h3 mb-1", children: e }),
1684
- n && /* @__PURE__ */ a("p", { className: "text-body-secondary mb-0", children: n })
2251
+ function $t({
2252
+ items: e,
2253
+ sections: r,
2254
+ variant: n,
2255
+ tone: t,
2256
+ activeKey: a,
2257
+ expandActivePath: i = !1,
2258
+ activePathExpansion: l,
2259
+ expandedKeys: c,
2260
+ defaultExpandedKeys: s,
2261
+ onExpandedKeysChange: d,
2262
+ expandMode: u = "multiple",
2263
+ collapsed: f,
2264
+ defaultCollapsed: m,
2265
+ onCollapsedChange: p,
2266
+ collapsible: k = !1,
2267
+ renderCollapseControl: S,
2268
+ collapseLabel: x = "Collapse sidebar",
2269
+ expandLabel: _ = "Expand sidebar",
2270
+ mobileOpen: C,
2271
+ defaultMobileOpen: v,
2272
+ onMobileOpenChange: N,
2273
+ mobileLabel: b,
2274
+ closeMobileOnSelect: w = !0,
2275
+ header: g,
2276
+ footer: I,
2277
+ collapsedFooter: D,
2278
+ className: O,
2279
+ navLabel: q,
2280
+ onSelect: G,
2281
+ renderLink: P
2282
+ }) {
2283
+ const V = hr(), A = r ?? [], H = J(
2284
+ () => e !== void 0 ? e : mn(A),
2285
+ // `legacySections` is a fresh array only when `sections` changes.
2286
+ [e, r]
2287
+ // eslint-disable-line react-hooks/exhaustive-deps
2288
+ ), R = J(() => bn(H), [H]), Z = R.duplicateKeys.join(", ");
2289
+ U(() => {
2290
+ process.env.NODE_ENV !== "production" && Z.length > 0 && console.error(
2291
+ "[react-components] Sidebar received duplicate item keys: " + Z + ". Keys must be unique and stable: expansion and active state are keyed by them, so every duplicate shares one identity and the first occurrence in tree order defines it."
2292
+ );
2293
+ }, [Z]);
2294
+ const X = J(() => hn(A), [r]), K = a ?? (e === void 0 ? pn(A) : void 0), j = l ?? (i ? "on-active-change" : "never"), E = L(null);
2295
+ if (E.current === null) {
2296
+ const $ = s ?? X;
2297
+ E.current = j === "never" ? $ : Ze(R, $, Ye(R, K), u);
2298
+ }
2299
+ const [B, z] = T({
2300
+ value: c,
2301
+ defaultValue: E.current,
2302
+ onChange: d
2303
+ }), [ie, kr] = T({
2304
+ value: f,
2305
+ defaultValue: m ?? !1,
2306
+ onChange: p
2307
+ }), [ee, he] = T({
2308
+ value: C,
2309
+ defaultValue: v ?? !1,
2310
+ onChange: N
2311
+ }), re = K, pe = J(
2312
+ () => new Set(gr(R, re)),
2313
+ [R, re]
2314
+ ), Me = J(() => {
2315
+ const $ = new Set(B);
2316
+ if (j === "always")
2317
+ for (const ne of pe)
2318
+ $.add(ne);
2319
+ return $;
2320
+ }, [B, j, pe]), Ce = L(B);
2321
+ Ce.current = B;
2322
+ const Ie = L(Nn);
2323
+ U(() => {
2324
+ if (j !== "on-active-change") {
2325
+ Ie.current = re;
2326
+ return;
2327
+ }
2328
+ if (Ie.current === re)
2329
+ return;
2330
+ Ie.current = re;
2331
+ const $ = Ye(R, re);
2332
+ if ($.length === 0)
2333
+ return;
2334
+ const ne = Ze(R, Ce.current, $, u);
2335
+ gn(ne, Ce.current) || z(ne);
2336
+ }, [j, re, R, u, z]);
2337
+ const Pe = F(
2338
+ ($) => z(vn(R, B, $, u)),
2339
+ [R, B, u, z]
2340
+ ), Ke = F(() => he(!1), [he]);
2341
+ _e(ee, Ke);
2342
+ const Ee = L(null);
2343
+ U(() => {
2344
+ if (typeof document > "u")
2345
+ return;
2346
+ if (ee) {
2347
+ Ee.current = document.activeElement;
2348
+ return;
2349
+ }
2350
+ const $ = Ee.current;
2351
+ Ee.current = null, $ instanceof HTMLElement && $.isConnected && $.focus();
2352
+ }, [ee]);
2353
+ const Be = F(
2354
+ ($, ne) => {
2355
+ var ze;
2356
+ $.disabled || ((ze = $.onSelect) == null || ze.call($, $, ne), G == null || G($, ne), w && ee && he(!1));
2357
+ },
2358
+ [G, w, ee, he]
2359
+ ), Fe = W(), be = n ?? (V == null ? void 0 : V.sidebarPresentation) ?? "grouped", He = t ?? (V == null ? void 0 : V.sidebarTone) ?? "auto", se = ie && !ee, wr = J(
2360
+ () => ({
2361
+ variant: be,
2362
+ collapsed: se,
2363
+ expanded: Me,
2364
+ activeKey: re,
2365
+ activeAncestors: pe,
2366
+ toggle: Pe,
2367
+ select: Be,
2368
+ renderLink: P,
2369
+ idPrefix: Fe,
2370
+ depthOffset: 0
2371
+ }),
2372
+ [be, se, Me, re, pe, Pe, Be, P, Fe]
2373
+ ), je = {
2374
+ collapsed: ie,
2375
+ toggle: () => kr(!ie),
2376
+ label: ie ? _ : x
2377
+ }, Ue = se ? D : I, qe = /* @__PURE__ */ y(
2378
+ "aside",
2379
+ {
2380
+ className: h(
2381
+ "rrc-sidebar",
2382
+ `rrc-sidebar--${be}`,
2383
+ se ? "rrc-sidebar--collapsed" : "rrc-sidebar--expanded",
2384
+ ee && "rrc-sidebar--mobile-open",
2385
+ O
2386
+ ),
2387
+ "data-variant": be,
2388
+ "data-collapsed": se ? "true" : "false",
2389
+ "data-bs-theme": He === "auto" ? void 0 : He,
2390
+ ...ee ? { role: "dialog", "aria-modal": !0, "aria-label": b ?? q } : {},
2391
+ children: [
2392
+ /* @__PURE__ */ y("div", { className: "rrc-sidebar__panel", children: [
2393
+ (g !== void 0 || k) && /* @__PURE__ */ o("div", { className: "rrc-sidebar__header", children: g !== void 0 && /* @__PURE__ */ o("div", { className: "rrc-sidebar__brand", children: g }) }),
2394
+ /* @__PURE__ */ o("nav", { className: "rrc-sidebar__body", "aria-label": q, children: /* @__PURE__ */ o("ul", { className: "rrc-sidebar__menu rrc-sidebar__menu--root", children: R.roots.map(($) => /* @__PURE__ */ o(Ne, { node: $, ctx: wr }, $.key)) }) }),
2395
+ Ue !== void 0 && /* @__PURE__ */ o("div", { className: "rrc-sidebar__footer", children: Ue })
2396
+ ] }),
2397
+ k && /* @__PURE__ */ o("div", { className: "rrc-sidebar__collapse", children: S ? S(je) : /* @__PURE__ */ o(xn, { ...je }) })
2398
+ ]
2399
+ }
2400
+ );
2401
+ return ee ? /* @__PURE__ */ y("div", { className: "rrc-sidebar-drawer", children: [
2402
+ /* @__PURE__ */ o("div", { className: "rrc-sidebar-drawer__backdrop", onClick: Ke, "data-testid": "rrc-sidebar-backdrop" }),
2403
+ qe
2404
+ ] }) : qe;
2405
+ }
2406
+ function Ot({ title: e, description: r, breadcrumbItems: n, actions: t, className: a }) {
2407
+ return /* @__PURE__ */ y("div", { className: h("mb-4", "rrc-page-header", a), children: [
2408
+ n && n.length > 0 && /* @__PURE__ */ o(Yr, { items: n, className: "mb-2 rrc-page-header__breadcrumb" }),
2409
+ /* @__PURE__ */ y("div", { className: "d-flex align-items-start justify-content-between gap-3 flex-wrap rrc-page-header__row", children: [
2410
+ /* @__PURE__ */ y("div", { children: [
2411
+ /* @__PURE__ */ o("h1", { className: "h3 mb-1 rrc-page-header__title", children: e }),
2412
+ r && /* @__PURE__ */ o("p", { className: "text-body-secondary mb-0 rrc-page-header__description", children: r })
1685
2413
  ] }),
1686
- r && /* @__PURE__ */ a("div", { className: "d-flex align-items-center gap-2", children: r })
2414
+ t && /* @__PURE__ */ o("div", { className: "d-flex align-items-center gap-2 rrc-page-header__actions", children: t })
1687
2415
  ] })
1688
2416
  ] });
1689
2417
  }
1690
- const on = {
2418
+ const Sn = {
1691
2419
  xs: 1,
1692
2420
  sm: 2,
1693
2421
  md: 3,
1694
2422
  lg: 4,
1695
2423
  xl: 5
1696
2424
  };
1697
- function cn(e) {
1698
- return typeof e == "number" ? e : on[e];
2425
+ function Cn(e) {
2426
+ return typeof e == "number" ? e : Sn[e];
1699
2427
  }
1700
- function pt({ direction: e = "row", gap: n = "sm", grow: t, shrink: r, fullWidth: l, className: i, ...o }) {
1701
- return /* @__PURE__ */ a(
1702
- Se,
2428
+ function Mt({ direction: e = "row", gap: r = "sm", grow: n, shrink: t, fullWidth: a, className: i, ...l }) {
2429
+ return /* @__PURE__ */ o(
2430
+ cr,
1703
2431
  {
1704
2432
  direction: e,
1705
- gap: cn(n),
1706
- className: f(t && "flex-grow-1", r && "flex-shrink-0", l && "w-100", i),
1707
- ...o
2433
+ gap: Cn(r),
2434
+ className: h("rrc-flex", n && "flex-grow-1", t && "flex-shrink-0", a && "w-100", i),
2435
+ ...l
1708
2436
  }
1709
2437
  );
1710
2438
  }
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;
2439
+ function Pt({ icon: e, "aria-label": r, iconSize: n, tooltip: t, variant: a = "light", loading: i, className: l, ...c }) {
2440
+ const s = /* @__PURE__ */ o(ke, { variant: a, loading: i, className: h("btn-icon", "rrc-btn-icon", l), "aria-label": r, ...c, children: !i && /* @__PURE__ */ o(Le, { name: e, size: n }) });
2441
+ return t ? /* @__PURE__ */ o(sr, { content: t, children: s }) : s;
1714
2442
  }
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 })
2443
+ function Kt({ leading: e, title: r, description: n, trailing: t, onClick: a, disabled: i, dense: l, className: c }) {
2444
+ const s = /* @__PURE__ */ y(Q, { children: [
2445
+ e && /* @__PURE__ */ o("span", { className: "flex-shrink-0 d-inline-flex align-items-center rrc-list-item__leading", children: e }),
2446
+ /* @__PURE__ */ y("span", { className: "flex-grow-1", style: { minWidth: 0 }, children: [
2447
+ /* @__PURE__ */ o("span", { className: "d-block text-truncate rrc-list-item__title", children: r }),
2448
+ n && /* @__PURE__ */ o("span", { className: "d-block text-truncate small text-body-secondary rrc-list-item__description", children: n })
1721
2449
  ] }),
1722
- r && /* @__PURE__ */ a("span", { className: "flex-shrink-0 d-inline-flex align-items-center", children: r })
1723
- ] }), d = f(
2450
+ t && /* @__PURE__ */ o("span", { className: "flex-shrink-0 d-inline-flex align-items-center rrc-list-item__trailing", children: t })
2451
+ ] }), d = h(
1724
2452
  "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",
2453
+ "rrc-list-item",
2454
+ a && "rrc-list-item--interactive",
2455
+ l ? "gap-2 py-1" : "gap-3 py-2",
2456
+ a && "w-100 border-0 bg-transparent",
1727
2457
  i && "opacity-50",
1728
2458
  c
1729
2459
  );
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 });
2460
+ return a ? /* @__PURE__ */ o("button", { type: "button", className: d, onClick: a, disabled: i, children: s }) : /* @__PURE__ */ o("div", { className: d, "aria-disabled": i || void 0, children: s });
1731
2461
  }
1732
- function dn(e, n, t, r) {
2462
+ function In(e, r, n, t) {
1733
2463
  if (e.length === 0)
1734
2464
  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];
2465
+ const a = Math.min(...e), l = Math.max(...e) - a || 1, c = r - t * 2, s = n - t * 2, d = e.length > 1 ? c / (e.length - 1) : 0;
2466
+ return e.map((u, f) => {
2467
+ const m = t + d * f, p = t + s - (u - a) / l * s;
2468
+ return [m, p];
1739
2469
  });
1740
2470
  }
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)
2471
+ function En({ type: e, data: r, width: n, height: t, strokeWidth: a }) {
2472
+ const i = a, l = In(r, n, t, i);
2473
+ if (l.length === 0)
1744
2474
  return null;
1745
- const c = o.map(([s, d]) => `${s},${d}`).join(" ");
1746
- return /* @__PURE__ */ p(H, { children: [
1747
- e === "area" && /* @__PURE__ */ a(
2475
+ const c = l.map(([s, d]) => `${s},${d}`).join(" ");
2476
+ return /* @__PURE__ */ y(Q, { children: [
2477
+ e === "area" && /* @__PURE__ */ o(
1748
2478
  "polygon",
1749
2479
  {
1750
- points: `${i},${r - i} ${c} ${t - i},${r - i}`,
2480
+ points: `${i},${t - i} ${c} ${n - i},${t - i}`,
1751
2481
  fill: "currentColor",
1752
2482
  opacity: 0.2,
1753
2483
  stroke: "none"
1754
2484
  }
1755
2485
  ),
1756
- /* @__PURE__ */ a("polyline", { points: c, fill: "none", stroke: "currentColor", strokeWidth: l, strokeLinecap: "round", strokeLinejoin: "round" })
2486
+ /* @__PURE__ */ o("polyline", { points: c, fill: "none", stroke: "currentColor", strokeWidth: a, strokeLinecap: "round", strokeLinejoin: "round" })
1757
2487
  ] });
1758
2488
  }
1759
- function fn({ data: e, width: n, height: t }) {
2489
+ function An({ data: e, width: r, height: n }) {
1760
2490
  if (e.length === 0)
1761
2491
  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);
2492
+ const t = Math.min(0, ...e), i = Math.max(0, ...e) - t || 1, l = 2, c = Math.max((r - l * (e.length - 1)) / e.length, 1);
2493
+ return /* @__PURE__ */ o(Q, { children: e.map((s, d) => {
2494
+ const u = Math.max((s - t) / i * n, 1), f = d * (c + l), m = n - u;
2495
+ return /* @__PURE__ */ o("rect", { x: f, y: m, width: c, height: u, rx: 1, fill: "currentColor" }, d);
1766
2496
  }) });
1767
2497
  }
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(
2498
+ function Bt({ type: e = "line", data: r, tone: n = "primary", width: t = 80, height: a = 28, strokeWidth: i = 2, className: l, label: c }) {
2499
+ return /* @__PURE__ */ o(
1770
2500
  "svg",
1771
2501
  {
1772
- width: r,
1773
- height: l,
1774
- viewBox: `0 0 ${r} ${l}`,
1775
- className: f(`text-${t}`, o),
2502
+ width: t,
2503
+ height: a,
2504
+ viewBox: `0 0 ${t} ${a}`,
2505
+ className: h(`text-${n}`, "rrc-sparkline", l),
1776
2506
  role: c ? "img" : void 0,
1777
2507
  "aria-label": c,
1778
2508
  "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 })
2509
+ children: e === "bar" ? /* @__PURE__ */ o(An, { data: r, width: t, height: a }) : /* @__PURE__ */ o(En, { type: e, data: r, width: t, height: a, strokeWidth: i })
1780
2510
  }
1781
2511
  );
1782
2512
  }
1783
- const mn = {
2513
+ const Dn = {
1784
2514
  up: "success",
1785
2515
  down: "danger",
1786
2516
  neutral: "muted"
1787
- }, hn = {
2517
+ }, Tn = {
1788
2518
  up: "bi bi-arrow-up-short",
1789
2519
  down: "bi bi-arrow-down-short",
1790
2520
  neutral: "bi bi-dash"
1791
2521
  };
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 })
2522
+ function Vn(e, r) {
2523
+ return typeof e == "number" && r != null ? e.toFixed(r) : String(e);
2524
+ }
2525
+ function Ft({ label: e, value: r, prefix: n, suffix: t, precision: a, trend: i, delta: l, loading: c, className: s }) {
2526
+ return /* @__PURE__ */ y("div", { className: h("d-flex flex-column gap-1", "rrc-statistic", s), children: [
2527
+ /* @__PURE__ */ o(te, { size: "sm", tone: "muted", children: e }),
2528
+ c ? /* @__PURE__ */ o(ye, { height: "1.75rem", width: "60%" }) : /* @__PURE__ */ y("div", { className: "d-flex align-items-baseline gap-1", children: [
2529
+ n && /* @__PURE__ */ o(te, { size: "lg", weight: "semibold", children: n }),
2530
+ /* @__PURE__ */ o(te, { size: "xl", weight: "bold", children: Vn(r, a) }),
2531
+ t && /* @__PURE__ */ o(te, { size: "lg", weight: "semibold", children: t })
1802
2532
  ] }),
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
2533
+ !c && (i || l != null) && /* @__PURE__ */ y(te, { size: "sm", tone: i ? Dn[i] : "muted", className: "d-inline-flex align-items-center gap-1", children: [
2534
+ i && /* @__PURE__ */ o(Le, { name: Tn[i], size: "sm" }),
2535
+ l
1806
2536
  ] })
1807
2537
  ] });
1808
2538
  }
1809
- class pn extends Error {
1810
- constructor(n, t, r) {
1811
- super(`HTTP ${n} ${t} for ${r}`), this.name = "HttpError", this.status = n, this.statusText = t, this.url = r;
2539
+ function ge({
2540
+ title: e,
2541
+ options: r,
2542
+ value: n,
2543
+ onChange: t,
2544
+ className: a
2545
+ }) {
2546
+ const i = W(), l = L([]);
2547
+ function c(d, u) {
2548
+ var p;
2549
+ if (r.length === 0)
2550
+ return;
2551
+ const f = (d + u + r.length) % r.length, m = r[f];
2552
+ m && (t(m.value), (p = l.current[f]) == null || p.focus());
2553
+ }
2554
+ function s(d) {
2555
+ const u = r.findIndex((f) => f.value === n);
2556
+ d.key === "ArrowDown" || d.key === "ArrowRight" ? (d.preventDefault(), c(u, 1)) : (d.key === "ArrowUp" || d.key === "ArrowLeft") && (d.preventDefault(), c(u, -1));
2557
+ }
2558
+ return /* @__PURE__ */ y("div", { className: h("rrc-appearance__section", a), children: [
2559
+ /* @__PURE__ */ o("div", { className: "rrc-appearance__title", id: i, children: e }),
2560
+ /* @__PURE__ */ o("div", { className: "rrc-appearance__options", role: "radiogroup", "aria-labelledby": i, onKeyDown: s, children: r.map((d, u) => {
2561
+ const f = d.value === n;
2562
+ return /* @__PURE__ */ y(
2563
+ "button",
2564
+ {
2565
+ ref: (m) => {
2566
+ l.current[u] = m;
2567
+ },
2568
+ type: "button",
2569
+ role: "radio",
2570
+ "aria-checked": f,
2571
+ tabIndex: f ? 0 : -1,
2572
+ className: h("rrc-appearance__option", f && "rrc-appearance__option--selected"),
2573
+ onClick: () => t(d.value),
2574
+ children: [
2575
+ d.adornment,
2576
+ /* @__PURE__ */ o("span", { className: "rrc-appearance__option-label", children: d.label }),
2577
+ /* @__PURE__ */ o("span", { className: "rrc-appearance__check", "aria-hidden": "true" })
2578
+ ]
2579
+ },
2580
+ d.value
2581
+ );
2582
+ }) })
2583
+ ] });
2584
+ }
2585
+ function Ht({
2586
+ labels: e,
2587
+ sections: r,
2588
+ className: n,
2589
+ mode: t,
2590
+ onModeChange: a,
2591
+ sidebarPresentation: i,
2592
+ onSidebarPresentationChange: l,
2593
+ sidebarTone: c,
2594
+ onSidebarToneChange: s,
2595
+ colorSchemeId: d,
2596
+ onColorSchemeIdChange: u,
2597
+ colorSchemes: f
2598
+ }) {
2599
+ const m = hr(), p = {
2600
+ presentation: (r == null ? void 0 : r.presentation) ?? !0,
2601
+ mode: (r == null ? void 0 : r.mode) ?? !0,
2602
+ tone: (r == null ? void 0 : r.tone) ?? !0,
2603
+ colorScheme: (r == null ? void 0 : r.colorScheme) ?? !0
2604
+ }, k = t ?? (m == null ? void 0 : m.mode) ?? "system", S = i ?? (m == null ? void 0 : m.sidebarPresentation) ?? "grouped", x = c ?? (m == null ? void 0 : m.sidebarTone) ?? "auto", _ = d ?? (m == null ? void 0 : m.colorSchemeId) ?? Re, C = (g) => {
2605
+ a == null || a(g), t === void 0 && (m == null || m.setMode(g));
2606
+ }, v = (g) => {
2607
+ l == null || l(g), i === void 0 && (m == null || m.setSidebarPresentation(g));
2608
+ }, N = (g) => {
2609
+ s == null || s(g), c === void 0 && (m == null || m.setSidebarTone(g));
2610
+ }, b = (g) => {
2611
+ u == null || u(g), d === void 0 && (m == null || m.setColorSchemeId(g));
2612
+ }, w = f ?? tn();
2613
+ return /* @__PURE__ */ y("div", { className: h("rrc-appearance", n), children: [
2614
+ p.presentation && /* @__PURE__ */ o(
2615
+ ge,
2616
+ {
2617
+ title: e.presentation.title,
2618
+ value: S,
2619
+ onChange: v,
2620
+ options: mr.map((g) => ({ value: g, label: e.presentation[g] }))
2621
+ }
2622
+ ),
2623
+ p.mode && /* @__PURE__ */ o(
2624
+ ge,
2625
+ {
2626
+ title: e.mode.title,
2627
+ value: k,
2628
+ onChange: C,
2629
+ options: ur.map((g) => ({ value: g, label: e.mode[g] }))
2630
+ }
2631
+ ),
2632
+ p.tone && /* @__PURE__ */ o(
2633
+ ge,
2634
+ {
2635
+ title: e.tone.title,
2636
+ value: x,
2637
+ onChange: N,
2638
+ options: fr.map((g) => ({ value: g, label: e.tone[g] }))
2639
+ }
2640
+ ),
2641
+ p.colorScheme && /* @__PURE__ */ o(
2642
+ ge,
2643
+ {
2644
+ title: e.colorScheme.title,
2645
+ value: _,
2646
+ onChange: b,
2647
+ className: "rrc-appearance__section--schemes",
2648
+ options: w.map((g) => ({
2649
+ value: g.id,
2650
+ // Falls back to the registered identifier rather than to invented
2651
+ // English copy, so a swatch always has a real accessible name.
2652
+ label: e.colorScheme.options[g.id] ?? g.id,
2653
+ adornment: /* @__PURE__ */ o(
2654
+ "span",
2655
+ {
2656
+ className: "rrc-appearance__swatch",
2657
+ style: { backgroundColor: g.swatch ?? g.tokens.primary },
2658
+ "aria-hidden": "true"
2659
+ }
2660
+ )
2661
+ }))
2662
+ }
2663
+ )
2664
+ ] });
2665
+ }
2666
+ class Ln extends Error {
2667
+ constructor(r, n, t) {
2668
+ super(`HTTP ${r} ${n} for ${t}`), this.name = "HttpError", this.status = r, this.statusText = n, this.url = t;
1812
2669
  }
1813
2670
  }
1814
- function vn(e) {
2671
+ function Rn(e) {
1815
2672
  if (!e)
1816
2673
  return "";
1817
- const n = new URLSearchParams();
1818
- for (const [r, l] of Object.entries(e))
1819
- l != null && n.set(r, String(l));
1820
- const t = n.toString();
1821
- return t ? `?${t}` : "";
1822
- }
1823
- function gn(e = {}) {
1824
- const { baseUrl: n = "", fetcher: t = fetch, buildRequestInit: r } = e;
2674
+ const r = new URLSearchParams();
2675
+ for (const [t, a] of Object.entries(e))
2676
+ a != null && r.set(t, String(a));
2677
+ const n = r.toString();
2678
+ return n ? `?${n}` : "";
2679
+ }
2680
+ function $n(e = {}) {
2681
+ const { baseUrl: r = "", fetcher: n = fetch, buildRequestInit: t } = e;
1825
2682
  return {
1826
- async get(l, i = {}) {
1827
- const o = `${n}${l}${vn(i.params)}`;
2683
+ async get(a, i = {}) {
2684
+ const l = `${r}${a}${Rn(i.params)}`;
1828
2685
  let c = { method: "GET", signal: i.signal };
1829
- r && (c = r(o, c));
1830
- const s = await t(o, c);
2686
+ t && (c = t(l, c));
2687
+ const s = await n(l, c);
1831
2688
  if (!s.ok)
1832
- throw new pn(s.status, s.statusText, o);
2689
+ throw new Ln(s.status, s.statusText, l);
1833
2690
  return await s.json();
1834
2691
  }
1835
2692
  };
1836
2693
  }
1837
- const yn = gn();
1838
- function Nn(e) {
1839
- return Object.keys(e).sort().reduce((n, t) => (n[t] = e[t], n), {});
2694
+ const On = $n();
2695
+ function Mn(e) {
2696
+ return Object.keys(e).sort().reduce((r, n) => (r[n] = e[n], r), {});
1840
2697
  }
1841
- function Y({
1842
- client: e = yn,
1843
- url: n,
1844
- params: t,
1845
- mapResponse: r,
1846
- enabled: l = !0
2698
+ function ue({
2699
+ client: e = On,
2700
+ url: r,
2701
+ params: n,
2702
+ mapResponse: t,
2703
+ enabled: a = !0
1847
2704
  }) {
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, _(() => {
1850
- if (!l || !n) {
1851
- o("idle"), s([]), u(null);
2705
+ const [i, l] = M("idle"), [c, s] = M([]), [d, u] = M(null), [f, m] = M(0), p = J(() => n ? JSON.stringify(Mn(n)) : "", [n]), k = L(0), S = L(t);
2706
+ S.current = t, U(() => {
2707
+ if (!a || !r) {
2708
+ l("idle"), s([]), u(null);
1852
2709
  return;
1853
2710
  }
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)
2711
+ const _ = ++k.current, C = new AbortController();
2712
+ return l("loading"), u(null), e.get(r, { params: n, signal: C.signal }).then((v) => {
2713
+ if (_ !== k.current)
1857
2714
  return;
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")));
2715
+ const N = S.current(v);
2716
+ s(N), l(N.length === 0 ? "empty" : "success");
2717
+ }).catch((v) => {
2718
+ _ === k.current && (v instanceof DOMException && v.name === "AbortError" || (u(v instanceof Error ? v : new Error(String(v))), l("error")));
1862
2719
  }), () => {
1863
- S.abort();
2720
+ C.abort();
1864
2721
  };
1865
- }, [e, n, v, l, h]);
1866
- const k = A(() => m((y) => y + 1), []);
1867
- return { state: i, items: c, error: d, reload: k };
1868
- }
1869
- function xn(e, n) {
1870
- const [t, r] = M(e);
1871
- return _(() => {
1872
- const l = setTimeout(() => r(e), n);
1873
- return () => clearTimeout(l);
1874
- }, [e, n]), t;
1875
- }
1876
- function Q(e) {
2722
+ }, [e, r, p, a, f]);
2723
+ const x = F(() => m((_) => _ + 1), []);
2724
+ return { state: i, items: c, error: d, reload: x };
2725
+ }
2726
+ function Pn(e, r) {
2727
+ const [n, t] = M(e);
2728
+ return U(() => {
2729
+ const a = setTimeout(() => t(e), r);
2730
+ return () => clearTimeout(a);
2731
+ }, [e, r]), n;
2732
+ }
2733
+ function me(e) {
1877
2734
  if (Array.isArray(e))
1878
2735
  return e;
1879
2736
  if (e && typeof e == "object" && Array.isArray(e.items))
@@ -1882,497 +2739,518 @@ function Q(e) {
1882
2739
  "Unable to normalize remote response into an array. Provide an explicit `mapResponse` for this endpoint's response shape."
1883
2740
  );
1884
2741
  }
1885
- function le(e, n, t) {
2742
+ function Se(e, r, n) {
1886
2743
  if (e === null || typeof e != "object")
1887
2744
  throw new Error("Remote item is not an object; cannot read valueMember/displayMember from it.");
1888
- const r = e;
2745
+ const t = e;
1889
2746
  return {
1890
- value: r[n],
1891
- label: String(r[t] ?? "")
2747
+ value: t[r],
2748
+ label: String(t[n] ?? "")
1892
2749
  };
1893
2750
  }
1894
- function wn({
2751
+ function Kn({
1895
2752
  url: e,
1896
- params: n,
1897
- valueMember: t,
1898
- displayMember: r,
1899
- mapResponse: l,
2753
+ params: r,
2754
+ valueMember: n,
2755
+ displayMember: t,
2756
+ mapResponse: a,
1900
2757
  client: i,
1901
- enabled: o,
2758
+ enabled: l,
1902
2759
  ...c
1903
2760
  }) {
1904
- const { state: s, items: d, error: u } = Y({
2761
+ const { state: s, items: d, error: u } = ue({
1905
2762
  client: i,
1906
2763
  url: e,
1907
- params: n,
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 });
2764
+ params: r,
2765
+ enabled: l,
2766
+ mapResponse: (m) => (a ? a(m) : me(m)).map((k) => Se(k, n, t))
2767
+ }), f = c.error ?? (s === "error" ? (u == null ? void 0 : u.message) ?? "Failed to load options" : void 0);
2768
+ return /* @__PURE__ */ o(Ar, { ...c, options: d, loading: s === "loading", error: f });
1912
2769
  }
1913
- function xt({
2770
+ function jt({
1914
2771
  url: e,
1915
- params: n,
1916
- searchParam: t,
1917
- valueMember: r,
1918
- displayMember: l,
2772
+ params: r,
2773
+ searchParam: n,
2774
+ valueMember: t,
2775
+ displayMember: a,
1919
2776
  mapResponse: i,
1920
- minSearchLength: o = 1,
2777
+ minSearchLength: l = 1,
1921
2778
  debounceMs: c = 300,
1922
2779
  client: s,
1923
2780
  inputValue: d,
1924
2781
  onInputValueChange: u,
1925
- ...h
2782
+ ...f
1926
2783
  }) {
1927
- const [m, v] = T({
2784
+ const [m, p] = T({
1928
2785
  value: d,
1929
2786
  defaultValue: "",
1930
2787
  onChange: u
1931
- }), g = xn(m, c), w = g.length >= o, { state: k, items: y, error: S } = Y({
2788
+ }), k = Pn(m, c), S = k.length >= l, { state: x, items: _, error: C } = ue({
1932
2789
  client: s,
1933
2790
  url: e,
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);
1938
- return /* @__PURE__ */ a(
1939
- Le,
2791
+ enabled: S,
2792
+ params: { ...r, [n]: k },
2793
+ mapResponse: (N) => (i ? i(N) : me(N)).map((w) => Se(w, t, a))
2794
+ }), v = f.error ?? (x === "error" ? (C == null ? void 0 : C.message) ?? "Failed to load suggestions" : void 0);
2795
+ return /* @__PURE__ */ o(
2796
+ Tr,
1940
2797
  {
1941
- ...h,
1942
- options: y,
1943
- loading: k === "loading",
1944
- error: x,
2798
+ ...f,
2799
+ options: _,
2800
+ loading: x === "loading",
2801
+ error: v,
1945
2802
  inputValue: m,
1946
- onInputValueChange: v,
2803
+ onInputValueChange: p,
1947
2804
  filter: () => !0
1948
2805
  }
1949
2806
  );
1950
2807
  }
1951
- function kn({
2808
+ function Bn({
1952
2809
  url: e,
1953
- params: n,
1954
- mapResponse: t,
1955
- getTotalCount: r,
1956
- pageSize: l = 20,
2810
+ params: r,
2811
+ mapResponse: n,
2812
+ getTotalCount: t,
2813
+ pageSize: a = 20,
1957
2814
  client: i,
1958
- ...o
2815
+ ...l
1959
2816
  }) {
1960
- const [c, s] = M(1), [d, u] = M(null), h = ne(() => JSON.stringify(n ?? {}), [n]), m = O(!0);
1961
- _(() => {
2817
+ const [c, s] = M(1), [d, u] = M(null), f = J(() => JSON.stringify(r ?? {}), [r]), m = L(!0);
2818
+ U(() => {
1962
2819
  if (m.current) {
1963
2820
  m.current = !1;
1964
2821
  return;
1965
2822
  }
1966
2823
  s(1);
1967
- }, [h]);
1968
- const v = ne(
2824
+ }, [f]);
2825
+ const p = J(
1969
2826
  () => ({
1970
- ...n,
2827
+ ...r,
1971
2828
  page: c,
1972
- pageSize: l,
2829
+ pageSize: a,
1973
2830
  ...d ? { sortKey: d.key, sortDirection: d.direction } : {}
1974
2831
  }),
1975
- [n, c, l, d]
1976
- ), g = O(void 0), { state: w, items: k, error: y } = Y({
2832
+ [r, c, a, d]
2833
+ ), k = L(void 0), { state: S, items: x, error: _ } = ue({
1977
2834
  client: i,
1978
2835
  url: e,
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;
1982
- return /* @__PURE__ */ a(
1983
- Ue,
2836
+ params: p,
2837
+ mapResponse: (w) => (k.current = w, n ? n(w) : me(w))
2838
+ }), C = k.current !== void 0 ? t == null ? void 0 : t(k.current) : void 0, N = x.length >= a && a > 0 ? c * a + 1 : (c - 1) * a + x.length, b = C ?? N;
2839
+ return /* @__PURE__ */ o(
2840
+ Kr,
1984
2841
  {
1985
- ...o,
1986
- rows: k,
1987
- loading: w === "loading",
1988
- error: y == null ? void 0 : y.message,
2842
+ ...l,
2843
+ rows: x,
2844
+ loading: S === "loading",
2845
+ error: _ == null ? void 0 : _.message,
1989
2846
  page: c,
1990
- pageSize: l,
2847
+ pageSize: a,
1991
2848
  totalCount: b,
1992
2849
  onPageChange: s,
1993
2850
  sort: d,
1994
- onSortChange: (N) => {
1995
- u(N), s(1);
2851
+ onSortChange: (w) => {
2852
+ u(w), s(1);
1996
2853
  }
1997
2854
  }
1998
2855
  );
1999
2856
  }
2000
- function wt({
2857
+ function Ut({
2001
2858
  url: e,
2002
- params: n,
2003
- valueMember: t,
2004
- displayMember: r,
2005
- mapResponse: l,
2859
+ params: r,
2860
+ valueMember: n,
2861
+ displayMember: t,
2862
+ mapResponse: a,
2006
2863
  client: i,
2007
- enabled: o,
2864
+ enabled: l,
2008
2865
  ...c
2009
2866
  }) {
2010
- const { state: s, items: d, error: u } = Y({
2867
+ const { state: s, items: d, error: u } = ue({
2011
2868
  client: i,
2012
2869
  url: e,
2013
- params: n,
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 });
2870
+ params: r,
2871
+ enabled: l,
2872
+ mapResponse: (m) => (a ? a(m) : me(m)).map((k) => Se(k, n, t))
2873
+ }), f = c.error ?? (s === "error" ? (u == null ? void 0 : u.message) ?? "Failed to load options" : void 0);
2874
+ return /* @__PURE__ */ o(Cr, { ...c, options: d, loading: s === "loading", error: f });
2018
2875
  }
2019
- function kt({
2876
+ function qt({
2020
2877
  url: e,
2021
- params: n,
2022
- valueMember: t,
2023
- displayMember: r,
2024
- mapResponse: l,
2878
+ params: r,
2879
+ valueMember: n,
2880
+ displayMember: t,
2881
+ mapResponse: a,
2025
2882
  client: i,
2026
- enabled: o,
2883
+ enabled: l,
2027
2884
  ...c
2028
2885
  }) {
2029
- const { state: s, items: d, error: u } = Y({
2886
+ const { state: s, items: d, error: u } = ue({
2030
2887
  client: i,
2031
2888
  url: e,
2032
- params: n,
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 });
2037
- }
2038
- function St() {
2039
- const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
2889
+ params: r,
2890
+ enabled: l,
2891
+ mapResponse: (m) => (a ? a(m) : me(m)).map((k) => Se(k, n, t))
2892
+ }), f = c.error ?? (s === "error" ? (u == null ? void 0 : u.message) ?? "Failed to load options" : void 0);
2893
+ return /* @__PURE__ */ o(Ir, { ...c, options: d, loading: s === "loading", error: f });
2894
+ }
2895
+ function zt() {
2896
+ const e = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set();
2040
2897
  return {
2041
- register(t, r) {
2042
- e.set(t, r);
2898
+ register(n, t) {
2899
+ e.set(n, t);
2043
2900
  },
2044
- resolve(t, r) {
2045
- const l = e.get(t.component);
2046
- return l ? l(t, r) : (n.has(t.component) || (n.add(t.component), console.warn(
2047
- `Smart: no resolver registered for component "${t.component}" (field "${t.name}"). Skipping.`
2901
+ resolve(n, t) {
2902
+ const a = e.get(n.component);
2903
+ return a ? a(n, t) : (r.has(n.component) || (r.add(n.component), console.warn(
2904
+ `Smart: no resolver registered for component "${n.component}" (field "${n.name}"). Skipping.`
2048
2905
  )), null);
2049
2906
  },
2050
- has(t) {
2051
- return e.has(t);
2907
+ has(n) {
2908
+ return e.has(n);
2052
2909
  }
2053
2910
  };
2054
2911
  }
2055
- function Ct(e) {
2056
- const n = new Map(Object.entries(e ?? {}));
2912
+ function Wt(e) {
2913
+ const r = new Map(Object.entries(e ?? {}));
2057
2914
  return {
2058
- register(t, r) {
2059
- n.set(t, r);
2915
+ register(n, t) {
2916
+ r.set(n, t);
2060
2917
  },
2061
- resolve(t) {
2062
- return n.get(t);
2918
+ resolve(n) {
2919
+ return r.get(n);
2063
2920
  }
2064
2921
  };
2065
2922
  }
2066
- function It() {
2923
+ function Gt() {
2067
2924
  const e = /* @__PURE__ */ new Map();
2068
2925
  return {
2069
- register(n, t) {
2070
- e.set(n, t);
2926
+ register(r, n) {
2927
+ e.set(r, n);
2071
2928
  },
2072
- resolve(n) {
2073
- return e.get(n);
2929
+ resolve(r) {
2930
+ return e.get(r);
2074
2931
  }
2075
2932
  };
2076
2933
  }
2077
- function Sn(e) {
2934
+ function Fn(e) {
2078
2935
  return "dataSource" in e;
2079
2936
  }
2080
- function Cn(e, n) {
2937
+ function Hn(e, r) {
2081
2938
  if (!e)
2082
2939
  return;
2083
- const t = {};
2084
- for (const [r, l] of Object.entries(e))
2085
- t[r] = l.kind === "static" ? l.value : n[l.field];
2086
- return t;
2940
+ const n = {};
2941
+ for (const [t, a] of Object.entries(e))
2942
+ n[t] = a.kind === "static" ? a.value : r[a.field];
2943
+ return n;
2087
2944
  }
2088
- function fe(e, n, t) {
2089
- return n && t ? t(n) : e;
2945
+ function Qe(e, r, n) {
2946
+ return r && n ? n(r) : e;
2090
2947
  }
2091
- function X(e, n) {
2092
- const { values: t, translate: r } = n;
2948
+ function fe(e, r) {
2949
+ const { values: n, translate: t } = r;
2093
2950
  return {
2094
2951
  metadata: e,
2095
2952
  visible: e.visible ?? !0,
2096
2953
  readOnly: e.readOnly ?? !1,
2097
2954
  disabled: e.disabled ?? !1,
2098
2955
  required: e.required ?? !1,
2099
- label: fe(e.label, e.labelKey, r),
2956
+ label: Qe(e.label, e.labelKey, t),
2100
2957
  placeholder: e.placeholder,
2101
2958
  helpText: e.helpText,
2102
- validationMessage: fe(e.validationMessage, e.validationMessageKey, r),
2103
- params: Sn(e) ? Cn(e.dataSource.params, t) : void 0
2959
+ validationMessage: Qe(e.validationMessage, e.validationMessageKey, t),
2960
+ params: Fn(e) ? Hn(e.dataSource.params, n) : void 0
2104
2961
  };
2105
2962
  }
2106
- function Dt(e, n, t) {
2107
- const r = n == null ? void 0 : n.fields.find((l) => l.name === e);
2108
- if (r)
2109
- return X(r, t);
2110
- }
2111
- const In = [];
2112
- function Dn(e, n) {
2113
- const t = {};
2114
- for (const r of n)
2115
- t[r] = e[r];
2116
- return t;
2117
- }
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, _(() => {
2963
+ function Jt(e, r, n) {
2964
+ const t = r == null ? void 0 : r.fields.find((a) => a.name === e);
2965
+ if (t)
2966
+ return fe(t, n);
2967
+ }
2968
+ const jn = [];
2969
+ function Un(e, r) {
2970
+ const n = {};
2971
+ for (const t of r)
2972
+ n[t] = e[t];
2973
+ return n;
2974
+ }
2975
+ function qn(e, r, n) {
2976
+ const t = e ?? jn, a = Un(r, t), i = t.length === 0 ? "" : JSON.stringify(a), l = L(null), c = L(n);
2977
+ c.current = n, U(() => {
2121
2978
  var d;
2122
- if (r.length === 0)
2979
+ if (t.length === 0)
2123
2980
  return;
2124
- const s = o.current;
2981
+ const s = l.current;
2125
2982
  if (s && s.key !== i)
2126
- for (const u of r)
2127
- Object.is(s.snapshot[u], l[u]) || (d = c.current) == null || d.call(c, u);
2128
- o.current = { key: i, snapshot: l };
2983
+ for (const u of t)
2984
+ Object.is(s.snapshot[u], a[u]) || (d = c.current) == null || d.call(c, u);
2985
+ l.current = { key: i, snapshot: a };
2129
2986
  }, [i]);
2130
2987
  }
2131
- function Ce(e, n) {
2132
- const { actions: t, translate: r } = n, l = t.resolve(e.id);
2988
+ function yr(e, r) {
2989
+ const { actions: n, translate: t } = r, a = n.resolve(e.id);
2133
2990
  return {
2134
2991
  metadata: e,
2135
2992
  visible: e.visible ?? !0,
2136
- enabled: (e.enabled ?? !0) && !!l,
2137
- label: e.labelKey && r ? r(e.labelKey) : e.label,
2138
- handler: l
2993
+ enabled: (e.enabled ?? !0) && !!a,
2994
+ label: e.labelKey && t ? t(e.labelKey) : e.label,
2995
+ handler: a
2139
2996
  };
2140
2997
  }
2141
- function Vt(e, n, t) {
2142
- var l;
2143
- const r = (l = n == null ? void 0 : n.actions) == null ? void 0 : l.find((i) => i.id === e);
2144
- if (r)
2145
- return Ce(r, t);
2998
+ function Zt(e, r, n) {
2999
+ var a;
3000
+ const t = (a = r == null ? void 0 : r.actions) == null ? void 0 : a.find((i) => i.id === e);
3001
+ if (t)
3002
+ return yr(t, n);
2146
3003
  }
2147
- const $n = (e, n) => {
2148
- const t = X(e, { values: n.values, translate: n.translate });
2149
- if (!t.visible)
3004
+ const zn = (e, r) => {
3005
+ const n = fe(e, { values: r.values, translate: r.translate });
3006
+ if (!n.visible)
2150
3007
  return null;
2151
- const r = n.dataSources.resolve(e.dataSource.id);
2152
- return r ? /* @__PURE__ */ a(
2153
- wn,
3008
+ const t = r.dataSources.resolve(e.dataSource.id);
3009
+ return t ? /* @__PURE__ */ o(
3010
+ Kn,
2154
3011
  {
2155
- label: t.label,
2156
- url: r.url,
2157
- client: r.client,
2158
- params: t.params,
3012
+ label: n.label,
3013
+ url: t.url,
3014
+ client: t.client,
3015
+ params: n.params,
2159
3016
  valueMember: e.valueMember,
2160
3017
  displayMember: e.displayMember,
2161
- required: t.required,
2162
- readOnly: t.readOnly,
2163
- disabled: t.disabled,
2164
- helpText: t.helpText,
2165
- error: t.validationMessage,
2166
- value: n.values[e.name] ?? null,
2167
- onChange: (l) => n.onFieldChange(e.name, l)
3018
+ required: n.required,
3019
+ readOnly: n.readOnly,
3020
+ disabled: n.disabled,
3021
+ helpText: n.helpText,
3022
+ error: n.validationMessage,
3023
+ value: r.values[e.name] ?? null,
3024
+ onChange: (a) => r.onFieldChange(e.name, a)
2168
3025
  }
2169
3026
  ) : (console.warn(`Smart: no data source registered for id "${e.dataSource.id}" (field "${e.name}"). Skipping.`), null);
2170
3027
  };
2171
- function Tn(e, n) {
3028
+ function Wn(e, r) {
2172
3029
  if (e.visible === !1)
2173
3030
  return null;
2174
- const t = e.headerKey && n ? n(e.headerKey) : e.header ?? e.key, r = e.format === "boolean" && !!n;
3031
+ const n = e.headerKey && r ? r(e.headerKey) : e.header ?? e.key, t = e.format === "boolean" && !!r;
2175
3032
  return {
2176
3033
  key: e.key,
2177
- header: t,
3034
+ header: n,
2178
3035
  sortable: e.sortable,
2179
- format: r ? void 0 : e.format,
2180
- formatter: r ? (l) => n(l ? "smart.boolean.true" : "smart.boolean.false") : void 0
3036
+ format: t ? void 0 : e.format,
3037
+ formatter: t ? (a) => r(a ? "smart.boolean.true" : "smart.boolean.false") : void 0
2181
3038
  };
2182
3039
  }
2183
- const En = (e, n) => {
2184
- const t = X(e, { values: n.values, translate: n.translate });
2185
- if (!t.visible)
3040
+ const Gn = (e, r) => {
3041
+ const n = fe(e, { values: r.values, translate: r.translate });
3042
+ if (!n.visible)
2186
3043
  return null;
2187
- const r = n.dataSources.resolve(e.dataSource.id);
2188
- if (!r)
3044
+ const t = r.dataSources.resolve(e.dataSource.id);
3045
+ if (!t)
2189
3046
  return console.warn(`Smart: no data source registered for id "${e.dataSource.id}" (field "${e.name}"). Skipping.`), null;
2190
- const l = e.columns.map((c) => Tn(c, n.translate)).filter((c) => c !== null), i = e.totalCountField, o = i ? (c) => {
3047
+ const a = e.columns.map((c) => Wn(c, r.translate)).filter((c) => c !== null), i = e.totalCountField, l = i ? (c) => {
2191
3048
  const s = c == null ? void 0 : c[i];
2192
3049
  return typeof s == "number" ? s : void 0;
2193
3050
  } : void 0;
2194
- return /* @__PURE__ */ a(
2195
- kn,
3051
+ return /* @__PURE__ */ o(
3052
+ Bn,
2196
3053
  {
2197
- url: r.url,
2198
- client: r.client,
2199
- params: t.params,
2200
- columns: l,
3054
+ url: t.url,
3055
+ client: t.client,
3056
+ params: n.params,
3057
+ columns: a,
2201
3058
  rowKey: (c) => c[e.rowKey],
2202
- getTotalCount: o
3059
+ getTotalCount: l
2203
3060
  }
2204
3061
  );
2205
3062
  };
2206
- function me(e) {
3063
+ function Xe(e) {
2207
3064
  if (!e)
2208
3065
  return;
2209
- const n = new Date(e);
2210
- return Number.isNaN(n.getTime()) ? void 0 : n;
3066
+ const r = new Date(e);
3067
+ return Number.isNaN(r.getTime()) ? void 0 : r;
2211
3068
  }
2212
- const Mn = (e, n) => {
2213
- const t = X(e, { values: n.values, translate: n.translate });
2214
- return t.visible ? /* @__PURE__ */ a(
2215
- Oe,
3069
+ const Jn = (e, r) => {
3070
+ const n = fe(e, { values: r.values, translate: r.translate });
3071
+ return n.visible ? /* @__PURE__ */ o(
3072
+ Er,
2216
3073
  {
2217
- label: t.label,
2218
- required: t.required,
2219
- readOnly: t.readOnly,
2220
- disabled: t.disabled,
2221
- helpText: t.helpText,
2222
- error: t.validationMessage,
2223
- min: me(e.minDate),
2224
- max: me(e.maxDate),
2225
- value: n.values[e.name] ?? null,
2226
- onChange: (r) => n.onFieldChange(e.name, r)
3074
+ label: n.label,
3075
+ required: n.required,
3076
+ readOnly: n.readOnly,
3077
+ disabled: n.disabled,
3078
+ helpText: n.helpText,
3079
+ error: n.validationMessage,
3080
+ min: Xe(e.minDate),
3081
+ max: Xe(e.maxDate),
3082
+ value: r.values[e.name] ?? null,
3083
+ onChange: (t) => r.onFieldChange(e.name, t)
2227
3084
  }
2228
3085
  ) : null;
2229
- }, On = (e, n) => {
2230
- const t = X(e, { values: n.values, translate: n.translate });
2231
- return t.visible ? /* @__PURE__ */ a(
2232
- Z,
3086
+ }, Zn = (e, r) => {
3087
+ const n = fe(e, { values: r.values, translate: r.translate });
3088
+ return n.visible ? /* @__PURE__ */ o(
3089
+ de,
2233
3090
  {
2234
- label: t.label,
2235
- required: t.required,
2236
- readOnly: t.readOnly,
2237
- disabled: t.disabled,
2238
- helpText: t.helpText,
2239
- placeholder: t.placeholder,
2240
- error: t.validationMessage,
3091
+ label: n.label,
3092
+ required: n.required,
3093
+ readOnly: n.readOnly,
3094
+ disabled: n.disabled,
3095
+ helpText: n.helpText,
3096
+ placeholder: n.placeholder,
3097
+ error: n.validationMessage,
2241
3098
  maxLength: e.maxLength,
2242
- value: n.values[e.name] ?? "",
2243
- onChange: (r) => n.onFieldChange(e.name, r)
3099
+ value: r.values[e.name] ?? "",
3100
+ onChange: (t) => r.onFieldChange(e.name, t)
2244
3101
  }
2245
3102
  ) : null;
2246
3103
  };
2247
- function $t(e) {
2248
- e.register("Input", On), e.register("ComboBox", $n), e.register("DatePicker", Mn), e.register("DataGrid", En);
3104
+ function Yt(e) {
3105
+ e.register("Input", Zn), e.register("ComboBox", zn), e.register("DatePicker", Jn), e.register("DataGrid", Gn);
2249
3106
  }
2250
- function Rn({ metadata: e, ctx: n }) {
2251
- const t = n.onMetadataRefreshNeeded;
2252
- return Vn(
3107
+ function Yn({ metadata: e, ctx: r }) {
3108
+ const n = r.onMetadataRefreshNeeded;
3109
+ return qn(
2253
3110
  e.dependsOn,
2254
- n.values,
2255
- t ? (r) => t(e.name, r) : void 0
2256
- ), e.visible === !1 ? null : n.registry.resolve(e, n);
3111
+ r.values,
3112
+ n ? (t) => n(e.name, t) : void 0
3113
+ ), e.visible === !1 ? null : r.registry.resolve(e, r);
2257
3114
  }
2258
- const Ie = 1;
2259
- function An(e) {
2260
- const n = Number(e.split(".")[0]);
2261
- return Number.isFinite(n) && n === Ie;
3115
+ const Nr = 1;
3116
+ function Qn(e) {
3117
+ const r = Number(e.split(".")[0]);
3118
+ return Number.isFinite(r) && r === Nr;
2262
3119
  }
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: [
3120
+ function Qt({ metadata: e, ctx: r }) {
3121
+ return Qn(e.schemaVersion) ? /* @__PURE__ */ o(Q, { children: e.fields.map((n) => /* @__PURE__ */ o(Yn, { metadata: n, ctx: r }, n.name)) }) : /* @__PURE__ */ y(or, { variant: "danger", children: [
2265
3122
  'Unsupported form schema version "',
2266
3123
  e.schemaVersion,
2267
3124
  '" — this app understands schema version ',
2268
- Ie,
3125
+ Nr,
2269
3126
  ".x."
2270
3127
  ] });
2271
3128
  }
2272
- function Ln({ metadata: e, ctx: n }) {
2273
- const t = Ce(e, n);
2274
- return t.visible ? /* @__PURE__ */ a(te, { disabled: !t.enabled, onClick: () => {
2275
- var r;
2276
- return (r = t.handler) == null ? void 0 : r.call(t);
2277
- }, children: t.label ?? e.id }) : null;
3129
+ function Xn({ metadata: e, ctx: r }) {
3130
+ const n = yr(e, r);
3131
+ return n.visible ? /* @__PURE__ */ o(ke, { disabled: !n.enabled, onClick: () => {
3132
+ var t;
3133
+ return (t = n.handler) == null ? void 0 : t.call(n);
3134
+ }, children: n.label ?? e.id }) : null;
2278
3135
  }
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)) });
3136
+ function Xt({ metadata: e, ctx: r }) {
3137
+ return !e.actions || e.actions.length === 0 ? null : /* @__PURE__ */ o(Q, { children: e.actions.map((n) => /* @__PURE__ */ o(Xn, { metadata: n, ctx: r }, n.id)) });
2281
3138
  }
2282
3139
  export {
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
3140
+ vt as Accordion,
3141
+ or as Alert,
3142
+ Ht as AppearanceMenu,
3143
+ Vt as AppearanceProvider,
3144
+ Tr as AutoComplete,
3145
+ St as Avatar,
3146
+ Hr as Badge,
3147
+ Yr as Breadcrumb,
3148
+ ke as Button,
3149
+ dr as COLOR_SCHEME_TOKEN_KEYS,
3150
+ yt as Card,
3151
+ it as CheckBox,
3152
+ wt as Col,
3153
+ Ar as ComboBox,
3154
+ ht as ConfirmProvider,
3155
+ Nt as Container,
3156
+ Re as DEFAULT_COLOR_SCHEME_ID,
3157
+ Kr as DataGrid,
3158
+ Er as DatePicker,
3159
+ dt as DateTimePicker,
3160
+ Zr as Divider,
3161
+ ot as FileInput,
3162
+ Mt as Flex,
3163
+ ut as FormField,
3164
+ Ln as HttpError,
3165
+ Le as Icon,
3166
+ Pt as IconButton,
3167
+ de as Input,
3168
+ xr as Label,
3169
+ Kt as ListItem,
3170
+ _t as Menu,
3171
+ Vr as Modal,
3172
+ Ir as MultiSelect,
3173
+ Dt as Navbar,
3174
+ tt as NumberInput,
3175
+ Ot as PageHeader,
3176
+ Rr as Pagination,
3177
+ at as PasswordInput,
3178
+ gt as Popover,
3179
+ oe as Popup,
3180
+ At as ProgressBar,
3181
+ Sr as RadioButton,
3182
+ st as RadioGroup,
3183
+ Et as Rating,
3184
+ jt as RemoteAutoComplete,
3185
+ Kn as RemoteComboBox,
3186
+ Bn as RemoteDataGrid,
3187
+ qt as RemoteMultiSelect,
3188
+ Ut as RemoteSelect,
3189
+ kt as Row,
3190
+ mr as SIDEBAR_PRESENTATIONS,
3191
+ fr as SIDEBAR_TONES,
3192
+ Cr as Select,
3193
+ $t as Sidebar,
3194
+ ye as Skeleton,
3195
+ It as Slider,
3196
+ Xn as SmartAction,
3197
+ Xt as SmartActions,
3198
+ Yn as SmartField,
3199
+ Qt as SmartForm,
3200
+ Bt as Sparkline,
3201
+ Br as Spinner,
3202
+ cr as Stack,
3203
+ Ft as Statistic,
3204
+ xt as Stepper,
3205
+ lt as Switch,
3206
+ ur as THEME_MODES,
3207
+ bt as Tabs,
3208
+ Ct as Tag,
3209
+ te as Text,
3210
+ nt as TextArea,
3211
+ ct as TimePicker,
3212
+ mt as ToastProvider,
3213
+ sr as Tooltip,
3214
+ er as ValidationMessage,
3215
+ on as colorSchemeCssVariables,
3216
+ zn as comboBoxResolver,
3217
+ Rt as createAppearanceInitScript,
3218
+ ve as createColorScheme,
3219
+ $n as createHttpClient,
3220
+ Gt as createSmartActionRegistry,
3221
+ zt as createSmartComponentRegistry,
3222
+ Wt as createSmartDataSourceRegistry,
3223
+ $r as dataGridFormatters,
3224
+ Gn as dataGridResolver,
3225
+ Jn as datePickerResolver,
3226
+ me as defaultArrayNormalization,
3227
+ On as defaultHttpClient,
3228
+ nr as fromDateInputValue,
3229
+ ar as fromTimeInputValue,
3230
+ nn as getColorScheme,
3231
+ Zn as inputResolver,
3232
+ pr as isSidebarExpandable,
3233
+ un as isSidebarParent,
3234
+ en as isValidColorScheme,
3235
+ pn as legacyActiveKey,
3236
+ hn as legacyDefaultExpandedKeys,
3237
+ tn as listColorSchemes,
3238
+ Yt as registerBuiltInResolvers,
3239
+ Tt as registerColorScheme,
3240
+ an as resolveColorScheme,
3241
+ yr as resolveSmartActionMetadata,
3242
+ fe as resolveSmartFieldMetadata,
3243
+ ae as toDateInputValue,
3244
+ Se as toSelectOption,
3245
+ mn as toSidebarItems,
3246
+ tr as toTimeInputValue,
3247
+ Lt as useAppearance,
3248
+ pt as useConfirm,
3249
+ Pn as useDebouncedValue,
3250
+ ue as useRemoteData,
3251
+ Zt as useSmartAction,
3252
+ qn as useSmartDependencies,
3253
+ Jt as useSmartField,
3254
+ ft as useToast
2377
3255
  };
2378
3256
  //# sourceMappingURL=index.js.map