ynotsoft-dynamic-form 1.0.117 → 1.0.119

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.
@@ -275,37 +275,45 @@ function gl({
275
275
  apiClient: s,
276
276
  ...i
277
277
  }) {
278
- const c = a, u = e.selectMode !== "multiple", d = e.returnValueOnly === !0, [p, g] = ce([]), [m, b] = ce(!1), [h, v] = ce(!1), [S, E] = ce(""), [C, w] = ce(-1), [x, A] = ce({}), _ = Zt(null), O = Zt(null), $ = Zt(null), z = t[e.name], G = dr(() => z ? (Array.isArray(z) ? z : [z]).map((R) => {
279
- if (R && typeof R == "object" && R.value !== void 0)
280
- return { value: R.value, label: R.label || R.value };
281
- const P = p.find((q) => q.value === R);
282
- return P || (x[R] ? x[R] : { value: R, label: R });
278
+ const c = a, u = e.selectMode !== "multiple", d = e.returnValueOnly === !0, [p, g] = ce([]), [m, b] = ce(!1), [h, v] = ce(!1), [S, E] = ce(""), [C, w] = ce(-1), [x, R] = ce({}), _ = Zt(null), O = Zt(null), $ = Zt(null), z = t[e.name], G = dr(() => z ? (Array.isArray(z) ? z : [z]).map((P) => {
279
+ if (P && typeof P == "object" && P.value !== void 0)
280
+ return { value: P.value, label: P.label || P.value };
281
+ const T = p.find((q) => q.value === P);
282
+ return T || (x[P] ? x[P] : { value: P, label: P });
283
283
  }) : [], [z, p, x])(), M = dr(
284
- async (T = "") => {
284
+ async (A = "") => {
285
285
  if (e.onSearch) {
286
- const R = await e.onSearch(T, t);
287
- g(R);
286
+ const P = await e.onSearch(A, t);
287
+ g(
288
+ (P || []).map((T) => ({
289
+ value: T[e.valueId || "value"] ?? T.value ?? T.id,
290
+ label: T[e.labelId || "label"] ?? T.label ?? T.name,
291
+ email: T.email
292
+ }))
293
+ );
288
294
  return;
289
295
  }
290
296
  if (!e.optionsUrl || !s) {
291
- const R = (e.options || []).map((P) => ({
292
- value: P[e.valueId || "value"] || P.value || P.id,
293
- label: P[e.labelId || "label"] || P.label || P.name
297
+ const P = (e.options || []).map((T) => ({
298
+ value: T[e.valueId || "value"] || T.value || T.id,
299
+ label: T[e.labelId || "label"] || T.label || T.name,
300
+ email: T.email
294
301
  }));
295
302
  g(
296
- T ? R.filter(
297
- (P) => String(P.label).toLowerCase().includes(T.toLowerCase())
298
- ) : R
303
+ A ? P.filter(
304
+ (T) => String(T.label).toLowerCase().includes(A.toLowerCase())
305
+ ) : P
299
306
  );
300
307
  return;
301
308
  }
302
309
  b(!0);
303
310
  try {
304
- const R = e.searchParam || "search", P = e.optionsUrl.includes("?") ? "&" : "?", q = `${e.optionsUrl}${P}${R}=${encodeURIComponent(T)}`, te = await s(q), K = te.data || te, ge = Array.isArray(K) ? K : [];
311
+ const P = e.searchParam || "search", T = e.optionsUrl.includes("?") ? "&" : "?", q = `${e.optionsUrl}${T}${P}=${encodeURIComponent(A)}`, te = await s(q), K = te.data || te, ge = Array.isArray(K) ? K : [];
305
312
  g(
306
313
  ge.map((Y) => ({
307
314
  value: Y[e.valueId || "value"] || Y.value || Y.id,
308
- label: Y[e.labelId || "label"] || Y.label || Y.name
315
+ label: Y[e.labelId || "label"] || Y.label || Y.name,
316
+ email: Y.email
309
317
  }))
310
318
  );
311
319
  } catch {
@@ -316,18 +324,18 @@ function gl({
316
324
  },
317
325
  [e, s, t]
318
326
  ), F = dr(
319
- (T) => {
320
- if (!T) return;
321
- A((q) => ({ ...q, [T.value]: T }));
322
- const R = d ? T.value : { value: T.value, label: T.label };
323
- let P;
327
+ (A) => {
328
+ if (!A) return;
329
+ R((q) => ({ ...q, [A.value]: A }));
330
+ const P = d ? A.value : { value: A.value, label: A.label };
331
+ let T;
324
332
  if (u)
325
- P = [R], v(!1);
333
+ T = [P], v(!1);
326
334
  else {
327
335
  const q = Array.isArray(z) ? z : [];
328
- P = q.some((K) => (K?.value ?? K) === T.value) ? q.filter((K) => (K?.value ?? K) !== T.value) : [...q, R];
336
+ T = q.some((K) => (K?.value ?? K) === A.value) ? q.filter((K) => (K?.value ?? K) !== A.value) : [...q, P];
329
337
  }
330
- n(e.name, P), r(e.name), e.clearSearchOnSelect && E("");
338
+ n(e.name, T), r(e.name), e.clearSearchOnSelect && E("");
331
339
  },
332
340
  [
333
341
  z,
@@ -338,19 +346,19 @@ function gl({
338
346
  u,
339
347
  d
340
348
  ]
341
- ), N = (T) => {
349
+ ), N = (A) => {
342
350
  if (!c)
343
- switch (T.key) {
351
+ switch (A.key) {
344
352
  case "ArrowDown":
345
- T.preventDefault(), h ? w(
346
- (R) => R < p.length - 1 ? R + 1 : R
353
+ A.preventDefault(), h ? w(
354
+ (P) => P < p.length - 1 ? P + 1 : P
347
355
  ) : v(!0);
348
356
  break;
349
357
  case "ArrowUp":
350
- T.preventDefault(), h && w((R) => R > 0 ? R - 1 : 0);
358
+ A.preventDefault(), h && w((P) => P > 0 ? P - 1 : 0);
351
359
  break;
352
360
  case "Enter":
353
- T.preventDefault(), h && C >= 0 && p[C] ? F(p[C]) : h || v(!0);
361
+ A.preventDefault(), h && C >= 0 && p[C] ? F(p[C]) : h || v(!0);
354
362
  break;
355
363
  case "Escape":
356
364
  v(!1);
@@ -359,27 +367,27 @@ function gl({
359
367
  v(!1), r(e.name);
360
368
  break;
361
369
  }
362
- }, k = (T) => {
363
- const R = T.target.value;
364
- E(R), w(-1), $.current && clearTimeout($.current), $.current = setTimeout(() => M(R), 300);
370
+ }, k = (A) => {
371
+ const P = A.target.value;
372
+ E(P), w(-1), $.current && clearTimeout($.current), $.current = setTimeout(() => M(P), 300);
365
373
  };
366
374
  Ie(() => {
367
375
  if (h) {
368
376
  M(S);
369
- const T = setTimeout(() => O.current?.focus(), 50);
370
- return () => clearTimeout(T);
377
+ const A = setTimeout(() => O.current?.focus(), 50);
378
+ return () => clearTimeout(A);
371
379
  } else
372
380
  w(-1);
373
381
  }, [h, M, S]), Ie(() => {
374
382
  if (!h) return;
375
- const T = (R) => {
376
- _.current && !_.current.contains(R.target) && (v(!1), r(e.name));
383
+ const A = (P) => {
384
+ _.current && !_.current.contains(P.target) && (v(!1), r(e.name));
377
385
  };
378
- return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
386
+ return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
379
387
  }, [h, e.name, r]);
380
- const D = (T, R) => {
381
- T.stopPropagation();
382
- const P = Array.isArray(z) ? z : [], q = u ? [] : P.filter((te) => (te?.value ?? te) !== R);
388
+ const D = (A, P) => {
389
+ A.stopPropagation();
390
+ const T = Array.isArray(z) ? z : [], q = u ? [] : T.filter((te) => (te?.value ?? te) !== P);
383
391
  n(e.name, q), r(e.name);
384
392
  };
385
393
  return /* @__PURE__ */ L(
@@ -406,25 +414,25 @@ function gl({
406
414
  ${c ? "bg-muted opacity-60 cursor-not-allowed" : ""}
407
415
  `,
408
416
  children: [
409
- G.length > 0 ? G.map((T) => /* @__PURE__ */ L(
417
+ G.length > 0 ? G.map((A) => /* @__PURE__ */ L(
410
418
  "span",
411
419
  {
412
420
  className: "inline-flex items-center px-2 py-0.5 bg-primary/10 text-primary text-xs rounded-sm border border-primary/20",
413
421
  children: [
414
- T.label,
422
+ A.label,
415
423
  !c && /* @__PURE__ */ l(
416
424
  "button",
417
425
  {
418
426
  type: "button",
419
- "aria-label": `Remove ${T.label}`,
420
- onClick: (R) => D(R, T.value),
427
+ "aria-label": `Remove ${A.label}`,
428
+ onClick: (P) => D(P, A.value),
421
429
  className: "ml-1 p-0.5 hover:bg-primary/20 rounded-full transition-colors",
422
430
  children: /* @__PURE__ */ l(Kr, { className: "w-3 h-3" })
423
431
  }
424
432
  )
425
433
  ]
426
434
  },
427
- T.value
435
+ A.value
428
436
  )) : /* @__PURE__ */ l("span", { className: "text-muted-foreground text-sm leading-tight", children: e.placeholder || "Select..." }),
429
437
  /* @__PURE__ */ L("div", { className: "ml-auto flex items-center gap-2", children: [
430
438
  m && /* @__PURE__ */ l(Ia, { className: "w-4 h-4 animate-spin text-muted-foreground" }),
@@ -464,32 +472,35 @@ function gl({
464
472
  role: "listbox",
465
473
  "aria-label": e.label,
466
474
  className: "max-h-60 overflow-y-auto p-1",
467
- children: p.length > 0 ? p.map((T, R) => {
468
- const P = G.some(
469
- (te) => te.value === T.value
470
- ), q = R === C;
475
+ children: p.length > 0 ? p.map((A, P) => {
476
+ const T = G.some(
477
+ (te) => te.value === A.value
478
+ ), q = P === C;
471
479
  return /* @__PURE__ */ L(
472
480
  "div",
473
481
  {
474
- id: `${e.name}-opt-${R}`,
482
+ id: `${e.name}-opt-${P}`,
475
483
  role: "option",
476
484
  tabIndex: -1,
477
- "aria-selected": P,
478
- onClick: () => F(T),
479
- onKeyDown: (te) => te.key === "Enter" && F(T),
480
- onMouseEnter: () => w(R),
485
+ "aria-selected": T,
486
+ onClick: () => F(A),
487
+ onKeyDown: (te) => te.key === "Enter" && F(A),
488
+ onMouseEnter: () => w(P),
481
489
  className: `
482
490
  px-3 py-2 text-sm rounded-md cursor-pointer flex items-center justify-between transition-colors outline-none
483
491
  ${q ? "bg-accent text-accent-foreground" : ""}
484
- ${P ? "text-primary font-medium" : "text-foreground"}
485
- ${!q && !P ? "hover:bg-muted" : ""}
492
+ ${T ? "text-primary font-medium" : "text-foreground"}
493
+ ${!q && !T ? "hover:bg-muted" : ""}
486
494
  `,
487
495
  children: [
488
- /* @__PURE__ */ l("span", { children: T.label }),
489
- P && /* @__PURE__ */ l(kc, { className: "w-4 h-4 text-primary" })
496
+ /* @__PURE__ */ L("div", { className: "flex flex-col min-w-0", children: [
497
+ /* @__PURE__ */ l("span", { className: "truncate", children: A.label }),
498
+ A.email && /* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground truncate", children: A.email })
499
+ ] }),
500
+ T && /* @__PURE__ */ l(kc, { className: "w-4 h-4 text-primary shrink-0 ml-2" })
490
501
  ]
491
502
  },
492
- T.value
503
+ A.value
493
504
  );
494
505
  }) : /* @__PURE__ */ l("output", { className: "block py-8 text-center text-sm text-muted-foreground", children: m ? "Searching..." : "No results found" })
495
506
  }
@@ -641,9 +652,9 @@ function La(e) {
641
652
  u.displayName = i;
642
653
  const d = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ Ee(d), m = Re.forwardRef(
643
654
  (h, v) => {
644
- const { scope: S, children: E, ...C } = h, w = Re.useRef(null), x = de(v, w), A = a(d, S);
645
- return Re.useEffect(() => (A.itemMap.set(w, { ref: w, ...C }), () => {
646
- A.itemMap.delete(w);
655
+ const { scope: S, children: E, ...C } = h, w = Re.useRef(null), x = de(v, w), R = a(d, S);
656
+ return Re.useEffect(() => (R.itemMap.set(w, { ref: w, ...C }), () => {
657
+ R.itemMap.delete(w);
647
658
  })), /* @__PURE__ */ l(g, { [p]: "", ref: x, children: E });
648
659
  }
649
660
  );
@@ -655,7 +666,7 @@ function La(e) {
655
666
  if (!E) return [];
656
667
  const C = Array.from(E.querySelectorAll(`[${p}]`));
657
668
  return Array.from(v.itemMap.values()).sort(
658
- (A, _) => C.indexOf(A.ref.current) - C.indexOf(_.ref.current)
669
+ (R, _) => C.indexOf(R.ref.current) - C.indexOf(_.ref.current)
659
670
  );
660
671
  }, [v.collectionRef, v.itemMap]);
661
672
  }
@@ -730,7 +741,7 @@ var Al = "DismissableLayer", Mr = "dismissableLayer.update", Tl = "dismissableLa
730
741
  } = e, u = f.useContext($a), [d, p] = f.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, m] = f.useState({}), b = de(t, (_) => p(_)), h = Array.from(u.layers), [v] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), S = h.indexOf(v), E = d ? h.indexOf(d) : -1, C = u.layersWithOutsidePointerEventsDisabled.size > 0, w = E >= S, x = _l((_) => {
731
742
  const O = _.target, $ = [...u.branches].some((z) => z.contains(O));
732
743
  !w || $ || (o?.(_), s?.(_), _.defaultPrevented || i?.());
733
- }, g), A = Ml((_) => {
744
+ }, g), R = Ml((_) => {
734
745
  const O = _.target;
735
746
  [...u.branches].some((z) => z.contains(O)) || (a?.(_), s?.(_), _.defaultPrevented || i?.());
736
747
  }, g);
@@ -755,8 +766,8 @@ var Al = "DismissableLayer", Mr = "dismissableLayer.update", Tl = "dismissableLa
755
766
  pointerEvents: C ? w ? "auto" : "none" : void 0,
756
767
  ...e.style
757
768
  },
758
- onFocusCapture: ee(e.onFocusCapture, A.onFocusCapture),
759
- onBlurCapture: ee(e.onBlurCapture, A.onBlurCapture),
769
+ onFocusCapture: ee(e.onFocusCapture, R.onFocusCapture),
770
+ onBlurCapture: ee(e.onBlurCapture, R.onBlurCapture),
760
771
  onPointerDownCapture: ee(
761
772
  e.onPointerDownCapture,
762
773
  x.onPointerDownCapture
@@ -1230,7 +1241,7 @@ const tu = 50, nu = async (e, t, n) => {
1230
1241
  x: C,
1231
1242
  y: w,
1232
1243
  data: x,
1233
- reset: A
1244
+ reset: R
1234
1245
  } = await E({
1235
1246
  x: d,
1236
1247
  y: p,
@@ -1248,11 +1259,11 @@ const tu = 50, nu = async (e, t, n) => {
1248
1259
  d = C ?? d, p = w ?? p, b[S] = {
1249
1260
  ...b[S],
1250
1261
  ...x
1251
- }, A && m < tu && (m++, typeof A == "object" && (A.placement && (g = A.placement), A.rects && (u = A.rects === !0 ? await s.getElementRects({
1262
+ }, R && m < tu && (m++, typeof R == "object" && (R.placement && (g = R.placement), R.rects && (u = R.rects === !0 ? await s.getElementRects({
1252
1263
  reference: e,
1253
1264
  floating: t,
1254
1265
  strategy: o
1255
- }) : A.rects), {
1266
+ }) : R.rects), {
1256
1267
  x: d,
1257
1268
  y: p
1258
1269
  } = Go(u, g, c)), h = -1);
@@ -1285,9 +1296,9 @@ const tu = 50, nu = async (e, t, n) => {
1285
1296
  const p = Ba(d), g = {
1286
1297
  x: n,
1287
1298
  y: r
1288
- }, m = no(o), b = to(m), h = await s.getDimensions(u), v = m === "y", S = v ? "top" : "left", E = v ? "bottom" : "right", C = v ? "clientHeight" : "clientWidth", w = a.reference[b] + a.reference[m] - g[m] - a.floating[b], x = g[m] - a.reference[m], A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
1289
- let _ = A ? A[C] : 0;
1290
- (!_ || !await (s.isElement == null ? void 0 : s.isElement(A))) && (_ = i.floating[C] || a.floating[b]);
1299
+ }, m = no(o), b = to(m), h = await s.getDimensions(u), v = m === "y", S = v ? "top" : "left", E = v ? "bottom" : "right", C = v ? "clientHeight" : "clientWidth", w = a.reference[b] + a.reference[m] - g[m] - a.floating[b], x = g[m] - a.reference[m], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
1300
+ let _ = R ? R[C] : 0;
1301
+ (!_ || !await (s.isElement == null ? void 0 : s.isElement(R))) && (_ = i.floating[C] || a.floating[b]);
1291
1302
  const O = w / 2 - x / 2, $ = _ / 2 - h[b] / 2 - 1, z = rt(p[S], $), B = rt(p[E], $), G = z, M = _ - h[b] - B, F = _ / 2 - h[b] / 2 + O, N = Dr(G, F, M), k = !c.arrow && Lt(o) != null && F !== N && a.reference[b] / 2 - (F < G ? z : B) - h[b] / 2 < 0, D = k ? F < G ? F - G : F - M : 0;
1292
1303
  return {
1293
1304
  [m]: g[m] + D,
@@ -1325,8 +1336,8 @@ const tu = 50, nu = async (e, t, n) => {
1325
1336
  } = qe(e, t);
1326
1337
  if ((n = a.arrow) != null && n.alignmentOffset)
1327
1338
  return {};
1328
- const S = Ke(o), E = Ue(i), C = Ke(i) === i, w = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), x = g || (C || !h ? [Tn(i)] : ql(i)), A = b !== "none";
1329
- !g && A && x.push(...Zl(i, h, b, w));
1339
+ const S = Ke(o), E = Ue(i), C = Ke(i) === i, w = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), x = g || (C || !h ? [Tn(i)] : ql(i)), R = b !== "none";
1340
+ !g && R && x.push(...Zl(i, h, b, w));
1330
1341
  const _ = [i, ...x], O = await c.detectOverflow(t, v), $ = [];
1331
1342
  let z = ((r = a.flip) == null ? void 0 : r.overflows) || [];
1332
1343
  if (d && $.push(O[S]), p) {
@@ -1341,7 +1352,7 @@ const tu = 50, nu = async (e, t, n) => {
1341
1352
  const F = (((B = a.flip) == null ? void 0 : B.index) || 0) + 1, N = _[F];
1342
1353
  if (N && (!(p === "alignment" ? E !== Ue(N) : !1) || // We leave the current main axis only if every placement on that axis
1343
1354
  // overflows the main axis.
1344
- z.every((T) => Ue(T.placement) === E ? T.overflows[0] > 0 : !0)))
1355
+ z.every((A) => Ue(A.placement) === E ? A.overflows[0] > 0 : !0)))
1345
1356
  return {
1346
1357
  data: {
1347
1358
  index: F,
@@ -1351,20 +1362,20 @@ const tu = 50, nu = async (e, t, n) => {
1351
1362
  placement: N
1352
1363
  }
1353
1364
  };
1354
- let k = (G = z.filter((D) => D.overflows[0] <= 0).sort((D, T) => D.overflows[1] - T.overflows[1])[0]) == null ? void 0 : G.placement;
1365
+ let k = (G = z.filter((D) => D.overflows[0] <= 0).sort((D, A) => D.overflows[1] - A.overflows[1])[0]) == null ? void 0 : G.placement;
1355
1366
  if (!k)
1356
1367
  switch (m) {
1357
1368
  case "bestFit": {
1358
1369
  var M;
1359
- const D = (M = z.filter((T) => {
1360
- if (A) {
1361
- const R = Ue(T.placement);
1362
- return R === E || // Create a bias to the `y` side axis due to horizontal
1370
+ const D = (M = z.filter((A) => {
1371
+ if (R) {
1372
+ const P = Ue(A.placement);
1373
+ return P === E || // Create a bias to the `y` side axis due to horizontal
1363
1374
  // reading directions favoring greater width.
1364
- R === "y";
1375
+ P === "y";
1365
1376
  }
1366
1377
  return !0;
1367
- }).map((T) => [T.placement, T.overflows.filter((R) => R > 0).reduce((R, P) => R + P, 0)]).sort((T, R) => T[1] - R[1])[0]) == null ? void 0 : M[0];
1378
+ }).map((A) => [A.placement, A.overflows.filter((P) => P > 0).reduce((P, T) => P + T, 0)]).sort((A, P) => A[1] - P[1])[0]) == null ? void 0 : M[0];
1368
1379
  D && (k = D);
1369
1380
  break;
1370
1381
  }
@@ -1576,8 +1587,8 @@ const iu = function(e) {
1576
1587
  }
1577
1588
  if (u) {
1578
1589
  var S, E;
1579
- const C = g === "y" ? "width" : "height", w = Ua.has(Ke(o)), x = a.reference[p] - a.floating[C] + (w && ((S = s.offset) == null ? void 0 : S[p]) || 0) + (w ? 0 : v.crossAxis), A = a.reference[p] + a.reference[C] + (w ? 0 : ((E = s.offset) == null ? void 0 : E[p]) || 0) - (w ? v.crossAxis : 0);
1580
- b < x ? b = x : b > A && (b = A);
1590
+ const C = g === "y" ? "width" : "height", w = Ua.has(Ke(o)), x = a.reference[p] - a.floating[C] + (w && ((S = s.offset) == null ? void 0 : S[p]) || 0) + (w ? 0 : v.crossAxis), R = a.reference[p] + a.reference[C] + (w ? 0 : ((E = s.offset) == null ? void 0 : E[p]) || 0) - (w ? v.crossAxis : 0);
1591
+ b < x ? b = x : b > R && (b = R);
1581
1592
  }
1582
1593
  return {
1583
1594
  [g]: m,
@@ -1606,9 +1617,9 @@ const iu = function(e) {
1606
1617
  } = a.floating;
1607
1618
  let v, S;
1608
1619
  p === "top" || p === "bottom" ? (v = p, S = g === (await (s.isRTL == null ? void 0 : s.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (S = p, v = g === "end" ? "top" : "bottom");
1609
- const E = h - d.top - d.bottom, C = b - d.left - d.right, w = rt(h - d[v], E), x = rt(b - d[S], C), A = !t.middlewareData.shift;
1620
+ const E = h - d.top - d.bottom, C = b - d.left - d.right, w = rt(h - d[v], E), x = rt(b - d[S], C), R = !t.middlewareData.shift;
1610
1621
  let _ = w, O = x;
1611
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (O = C), (r = t.middlewareData.shift) != null && r.enabled.y && (_ = E), A && !g) {
1622
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (O = C), (r = t.middlewareData.shift) != null && r.enabled.y && (_ = E), R && !g) {
1612
1623
  const z = ke(d.left, 0), B = ke(d.right, 0), G = ke(d.top, 0), M = ke(d.bottom, 0);
1613
1624
  m ? O = b - 2 * (z !== 0 || B !== 0 ? z + B : ke(d.left, d.right)) : _ = h - 2 * (G !== 0 || M !== 0 ? G + M : ke(d.top, d.bottom));
1614
1625
  }
@@ -2054,8 +2065,8 @@ function Ru(e, t) {
2054
2065
  threshold: ke(0, rt(1, c)) || 1
2055
2066
  };
2056
2067
  let w = !0;
2057
- function x(A) {
2058
- const _ = A[0].intersectionRatio;
2068
+ function x(R) {
2069
+ const _ = R[0].intersectionRatio;
2059
2070
  if (_ !== c) {
2060
2071
  if (!w)
2061
2072
  return s();
@@ -2195,35 +2206,35 @@ function Wu(e) {
2195
2206
  isPositioned: !1
2196
2207
  }), [g, m] = f.useState(r);
2197
2208
  Pn(g, r) || m(r);
2198
- const [b, h] = f.useState(null), [v, S] = f.useState(null), E = f.useCallback((T) => {
2199
- T !== A.current && (A.current = T, h(T));
2200
- }, []), C = f.useCallback((T) => {
2201
- T !== _.current && (_.current = T, S(T));
2202
- }, []), w = a || b, x = s || v, A = f.useRef(null), _ = f.useRef(null), O = f.useRef(d), $ = c != null, z = br(c), B = br(o), G = br(u), M = f.useCallback(() => {
2203
- if (!A.current || !_.current)
2209
+ const [b, h] = f.useState(null), [v, S] = f.useState(null), E = f.useCallback((A) => {
2210
+ A !== R.current && (R.current = A, h(A));
2211
+ }, []), C = f.useCallback((A) => {
2212
+ A !== _.current && (_.current = A, S(A));
2213
+ }, []), w = a || b, x = s || v, R = f.useRef(null), _ = f.useRef(null), O = f.useRef(d), $ = c != null, z = br(c), B = br(o), G = br(u), M = f.useCallback(() => {
2214
+ if (!R.current || !_.current)
2204
2215
  return;
2205
- const T = {
2216
+ const A = {
2206
2217
  placement: t,
2207
2218
  strategy: n,
2208
2219
  middleware: g
2209
2220
  };
2210
- B.current && (T.platform = B.current), Fu(A.current, _.current, T).then((R) => {
2211
- const P = {
2212
- ...R,
2221
+ B.current && (A.platform = B.current), Fu(R.current, _.current, A).then((P) => {
2222
+ const T = {
2223
+ ...P,
2213
2224
  // The floating element's position may be recomputed while it's closed
2214
2225
  // but still mounted (such as when transitioning out). To ensure
2215
2226
  // `isPositioned` will be `false` initially on the next open, avoid
2216
2227
  // setting it to `true` when `open === false` (must be specified).
2217
2228
  isPositioned: G.current !== !1
2218
2229
  };
2219
- F.current && !Pn(O.current, P) && (O.current = P, Ln.flushSync(() => {
2220
- p(P);
2230
+ F.current && !Pn(O.current, T) && (O.current = T, Ln.flushSync(() => {
2231
+ p(T);
2221
2232
  }));
2222
2233
  });
2223
2234
  }, [g, t, n, B, G]);
2224
2235
  Sn(() => {
2225
- u === !1 && O.current.isPositioned && (O.current.isPositioned = !1, p((T) => ({
2226
- ...T,
2236
+ u === !1 && O.current.isPositioned && (O.current.isPositioned = !1, p((A) => ({
2237
+ ...A,
2227
2238
  isPositioned: !1
2228
2239
  })));
2229
2240
  }, [u]);
@@ -2231,14 +2242,14 @@ function Wu(e) {
2231
2242
  Sn(() => (F.current = !0, () => {
2232
2243
  F.current = !1;
2233
2244
  }), []), Sn(() => {
2234
- if (w && (A.current = w), x && (_.current = x), w && x) {
2245
+ if (w && (R.current = w), x && (_.current = x), w && x) {
2235
2246
  if (z.current)
2236
2247
  return z.current(w, x, M);
2237
2248
  M();
2238
2249
  }
2239
2250
  }, [w, x, M, z, $]);
2240
2251
  const N = f.useMemo(() => ({
2241
- reference: A,
2252
+ reference: R,
2242
2253
  floating: _,
2243
2254
  setReference: E,
2244
2255
  setFloating: C
@@ -2246,24 +2257,24 @@ function Wu(e) {
2246
2257
  reference: w,
2247
2258
  floating: x
2248
2259
  }), [w, x]), D = f.useMemo(() => {
2249
- const T = {
2260
+ const A = {
2250
2261
  position: n,
2251
2262
  left: 0,
2252
2263
  top: 0
2253
2264
  };
2254
2265
  if (!k.floating)
2255
- return T;
2256
- const R = ea(k.floating, d.x), P = ea(k.floating, d.y);
2266
+ return A;
2267
+ const P = ea(k.floating, d.x), T = ea(k.floating, d.y);
2257
2268
  return i ? {
2258
- ...T,
2259
- transform: "translate(" + R + "px, " + P + "px)",
2269
+ ...A,
2270
+ transform: "translate(" + P + "px, " + T + "px)",
2260
2271
  ...Za(k.floating) >= 1.5 && {
2261
2272
  willChange: "transform"
2262
2273
  }
2263
2274
  } : {
2264
2275
  position: n,
2265
- left: R,
2266
- top: P
2276
+ left: P,
2277
+ top: T
2267
2278
  };
2268
2279
  }, [n, i, k.floating, d.x, d.y]);
2269
2280
  return f.useMemo(() => ({
@@ -2460,12 +2471,12 @@ var io = "PopperContent", [td, nd] = ns(io), is = f.forwardRef(
2460
2471
  updatePositionStrategy: m = "optimized",
2461
2472
  onPlaced: b,
2462
2473
  ...h
2463
- } = e, v = rs(io, n), [S, E] = f.useState(null), C = de(t, (V) => E(V)), [w, x] = f.useState(null), A = ts(w), _ = A?.width ?? 0, O = A?.height ?? 0, $ = r + (a !== "center" ? "-" + a : ""), z = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, B = Array.isArray(u) ? u : [u], G = B.length > 0, M = {
2474
+ } = e, v = rs(io, n), [S, E] = f.useState(null), C = de(t, (V) => E(V)), [w, x] = f.useState(null), R = ts(w), _ = R?.width ?? 0, O = R?.height ?? 0, $ = r + (a !== "center" ? "-" + a : ""), z = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, B = Array.isArray(u) ? u : [u], G = B.length > 0, M = {
2464
2475
  padding: z,
2465
2476
  boundary: B.filter(od),
2466
2477
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
2467
2478
  altBoundary: G
2468
- }, { refs: F, floatingStyles: N, placement: k, isPositioned: D, middlewareData: T } = Wu({
2479
+ }, { refs: F, floatingStyles: N, placement: k, isPositioned: D, middlewareData: A } = Wu({
2469
2480
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
2470
2481
  strategy: "fixed",
2471
2482
  placement: $,
@@ -2495,11 +2506,11 @@ var io = "PopperContent", [td, nd] = ns(io), is = f.forwardRef(
2495
2506
  ad({ arrowWidth: _, arrowHeight: O }),
2496
2507
  g && Yu({ strategy: "referenceHidden", ...M })
2497
2508
  ]
2498
- }), [R, P] = us(k), q = nt(b);
2509
+ }), [P, T] = us(k), q = nt(b);
2499
2510
  ye(() => {
2500
2511
  D && q?.();
2501
2512
  }, [D, q]);
2502
- const te = T.arrow?.x, K = T.arrow?.y, ge = T.arrow?.centerOffset !== 0, [Y, oe] = f.useState();
2513
+ const te = A.arrow?.x, K = A.arrow?.y, ge = A.arrow?.centerOffset !== 0, [Y, oe] = f.useState();
2503
2514
  return ye(() => {
2504
2515
  S && oe(window.getComputedStyle(S).zIndex);
2505
2516
  }, [S]), /* @__PURE__ */ l(
@@ -2514,13 +2525,13 @@ var io = "PopperContent", [td, nd] = ns(io), is = f.forwardRef(
2514
2525
  minWidth: "max-content",
2515
2526
  zIndex: Y,
2516
2527
  "--radix-popper-transform-origin": [
2517
- T.transformOrigin?.x,
2518
- T.transformOrigin?.y
2528
+ A.transformOrigin?.x,
2529
+ A.transformOrigin?.y
2519
2530
  ].join(" "),
2520
2531
  // hide the content if using the hide middleware and should be hidden
2521
2532
  // set visibility to hidden and disable pointer events so the UI behaves
2522
2533
  // as if the PopperContent isn't there at all
2523
- ...T.hide?.referenceHidden && {
2534
+ ...A.hide?.referenceHidden && {
2524
2535
  visibility: "hidden",
2525
2536
  pointerEvents: "none"
2526
2537
  }
@@ -2530,7 +2541,7 @@ var io = "PopperContent", [td, nd] = ns(io), is = f.forwardRef(
2530
2541
  td,
2531
2542
  {
2532
2543
  scope: n,
2533
- placedSide: R,
2544
+ placedSide: P,
2534
2545
  onArrowChange: x,
2535
2546
  arrowX: te,
2536
2547
  arrowY: K,
@@ -2538,8 +2549,8 @@ var io = "PopperContent", [td, nd] = ns(io), is = f.forwardRef(
2538
2549
  children: /* @__PURE__ */ l(
2539
2550
  es.div,
2540
2551
  {
2541
- "data-side": R,
2542
- "data-align": P,
2552
+ "data-side": P,
2553
+ "data-align": T,
2543
2554
  ...h,
2544
2555
  ref: C,
2545
2556
  style: {
@@ -2974,12 +2985,12 @@ var ws = Td(), wr = function() {
2974
2985
  onScrollCapture: wr,
2975
2986
  onWheelCapture: wr,
2976
2987
  onTouchMoveCapture: wr
2977
- }), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, p = e.shards, g = e.sideCar, m = e.noRelative, b = e.noIsolation, h = e.inert, v = e.allowPinchZoom, S = e.as, E = S === void 0 ? "div" : S, C = e.gapMode, w = vs(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = g, A = Nd([n, t]), _ = Be(Be({}, w), o);
2988
+ }), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, p = e.shards, g = e.sideCar, m = e.noRelative, b = e.noIsolation, h = e.inert, v = e.allowPinchZoom, S = e.as, E = S === void 0 ? "div" : S, C = e.gapMode, w = vs(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = g, R = Nd([n, t]), _ = Be(Be({}, w), o);
2978
2989
  return f.createElement(
2979
2990
  f.Fragment,
2980
2991
  null,
2981
2992
  d && f.createElement(x, { sideCar: ws, removeScrollBar: u, shards: p, noRelative: m, noIsolation: b, inert: h, setCallbacks: a, allowPinchZoom: !!v, lockRef: n, gapMode: C }),
2982
- s ? f.cloneElement(f.Children.only(i), Be(Be({}, _), { ref: A })) : f.createElement(E, Be({}, _, { className: c, ref: A }), i)
2993
+ s ? f.cloneElement(f.Children.only(i), Be(Be({}, _), { ref: R })) : f.createElement(E, Be({}, _, { className: c, ref: R }), i)
2983
2994
  );
2984
2995
  });
2985
2996
  Un.defaultProps = {
@@ -3225,16 +3236,16 @@ function Jd(e) {
3225
3236
  var i = f.useCallback(function(h, v) {
3226
3237
  if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
3227
3238
  return !s.current.allowPinchZoom;
3228
- var S = bn(h), E = n.current, C = "deltaX" in h ? h.deltaX : E[0] - S[0], w = "deltaY" in h ? h.deltaY : E[1] - S[1], x, A = h.target, _ = Math.abs(C) > Math.abs(w) ? "h" : "v";
3229
- if ("touches" in h && _ === "h" && A.type === "range")
3239
+ var S = bn(h), E = n.current, C = "deltaX" in h ? h.deltaX : E[0] - S[0], w = "deltaY" in h ? h.deltaY : E[1] - S[1], x, R = h.target, _ = Math.abs(C) > Math.abs(w) ? "h" : "v";
3240
+ if ("touches" in h && _ === "h" && R.type === "range")
3230
3241
  return !1;
3231
- var O = window.getSelection(), $ = O && O.anchorNode, z = $ ? $ === A || $.contains(A) : !1;
3242
+ var O = window.getSelection(), $ = O && O.anchorNode, z = $ ? $ === R || $.contains(R) : !1;
3232
3243
  if (z)
3233
3244
  return !1;
3234
- var B = ra(_, A);
3245
+ var B = ra(_, R);
3235
3246
  if (!B)
3236
3247
  return !0;
3237
- if (B ? x = _ : (x = _ === "v" ? "h" : "v", B = ra(_, A)), !B)
3248
+ if (B ? x = _ : (x = _ === "v" ? "h" : "v", B = ra(_, R)), !B)
3238
3249
  return !1;
3239
3250
  if (!r.current && "changedTouches" in h && (C || w) && (r.current = x), !x)
3240
3251
  return !0;
@@ -3319,7 +3330,7 @@ var nf = [" ", "Enter", "ArrowUp", "ArrowDown"], rf = [" ", "Enter"], bt = "Sele
3319
3330
  disabled: g,
3320
3331
  required: m,
3321
3332
  form: b
3322
- } = e, h = Gn(t), [v, S] = f.useState(null), [E, C] = f.useState(null), [w, x] = f.useState(!1), A = Qr(u), [_, O] = en({
3333
+ } = e, h = Gn(t), [v, S] = f.useState(null), [E, C] = f.useState(null), [w, x] = f.useState(!1), R = Qr(u), [_, O] = en({
3323
3334
  prop: r,
3324
3335
  defaultProp: o ?? !1,
3325
3336
  onChange: a,
@@ -3346,7 +3357,7 @@ var nf = [" ", "Enter", "ArrowUp", "ArrowDown"], rf = [" ", "Enter"], bt = "Sele
3346
3357
  onValueChange: z,
3347
3358
  open: _,
3348
3359
  onOpenChange: O,
3349
- dir: A,
3360
+ dir: R,
3350
3361
  triggerPointerDownPosRef: B,
3351
3362
  disabled: g,
3352
3363
  children: [
@@ -3359,8 +3370,8 @@ var nf = [" ", "Enter", "ArrowUp", "ArrowDown"], rf = [" ", "Enter"], bt = "Sele
3359
3370
  }, []),
3360
3371
  onNativeOptionRemove: f.useCallback((k) => {
3361
3372
  F((D) => {
3362
- const T = new Set(D);
3363
- return T.delete(k), T;
3373
+ const A = new Set(D);
3374
+ return A.delete(k), A;
3364
3375
  });
3365
3376
  }, []),
3366
3377
  children: n
@@ -3498,7 +3509,7 @@ var Me = 10, [Ms, it] = $t(vt), df = "SelectContentImpl", ff = /* @__PURE__ */ E
3498
3509
  avoidCollisions: v,
3499
3510
  //
3500
3511
  ...S
3501
- } = e, E = st(vt, n), [C, w] = f.useState(null), [x, A] = f.useState(null), _ = de(t, (V) => w(V)), [O, $] = f.useState(null), [z, B] = f.useState(
3512
+ } = e, E = st(vt, n), [C, w] = f.useState(null), [x, R] = f.useState(null), _ = de(t, (V) => w(V)), [O, $] = f.useState(null), [z, B] = f.useState(
3502
3513
  null
3503
3514
  ), G = jn(n), [M, F] = f.useState(!1), N = f.useRef(!1);
3504
3515
  f.useEffect(() => {
@@ -3518,29 +3529,29 @@ var Me = 10, [Ms, it] = $t(vt), df = "SelectContentImpl", ff = /* @__PURE__ */ E
3518
3529
  f.useEffect(() => {
3519
3530
  M && D();
3520
3531
  }, [M, D]);
3521
- const { onOpenChange: T, triggerPointerDownPosRef: R } = E;
3532
+ const { onOpenChange: A, triggerPointerDownPosRef: P } = E;
3522
3533
  f.useEffect(() => {
3523
3534
  if (C) {
3524
3535
  let V = { x: 0, y: 0 };
3525
3536
  const J = (ne) => {
3526
3537
  V = {
3527
- x: Math.abs(Math.round(ne.pageX) - (R.current?.x ?? 0)),
3528
- y: Math.abs(Math.round(ne.pageY) - (R.current?.y ?? 0))
3538
+ x: Math.abs(Math.round(ne.pageX) - (P.current?.x ?? 0)),
3539
+ y: Math.abs(Math.round(ne.pageY) - (P.current?.y ?? 0))
3529
3540
  };
3530
3541
  }, Z = (ne) => {
3531
- V.x <= 10 && V.y <= 10 ? ne.preventDefault() : C.contains(ne.target) || T(!1), document.removeEventListener("pointermove", J), R.current = null;
3542
+ V.x <= 10 && V.y <= 10 ? ne.preventDefault() : C.contains(ne.target) || A(!1), document.removeEventListener("pointermove", J), P.current = null;
3532
3543
  };
3533
- return R.current !== null && (document.addEventListener("pointermove", J), document.addEventListener("pointerup", Z, { capture: !0, once: !0 })), () => {
3544
+ return P.current !== null && (document.addEventListener("pointermove", J), document.addEventListener("pointerup", Z, { capture: !0, once: !0 })), () => {
3534
3545
  document.removeEventListener("pointermove", J), document.removeEventListener("pointerup", Z, { capture: !0 });
3535
3546
  };
3536
3547
  }
3537
- }, [C, T, R]), f.useEffect(() => {
3538
- const V = () => T(!1);
3548
+ }, [C, A, P]), f.useEffect(() => {
3549
+ const V = () => A(!1);
3539
3550
  return window.addEventListener("blur", V), window.addEventListener("resize", V), () => {
3540
3551
  window.removeEventListener("blur", V), window.removeEventListener("resize", V);
3541
3552
  };
3542
- }, [T]);
3543
- const [P, q] = Qs((V) => {
3553
+ }, [A]);
3554
+ const [T, q] = Qs((V) => {
3544
3555
  const J = G().filter((re) => !re.disabled), Z = J.find((re) => re.ref.current === document.activeElement), ne = Zs(J, V, Z);
3545
3556
  ne && setTimeout(() => ne.ref.current.focus());
3546
3557
  }), te = f.useCallback(
@@ -3573,7 +3584,7 @@ var Me = 10, [Ms, it] = $t(vt), df = "SelectContentImpl", ff = /* @__PURE__ */ E
3573
3584
  scope: n,
3574
3585
  content: C,
3575
3586
  viewport: x,
3576
- onViewportChange: A,
3587
+ onViewportChange: R,
3577
3588
  itemRefCallback: te,
3578
3589
  selectedItem: O,
3579
3590
  onItemLeave: K,
@@ -3582,7 +3593,7 @@ var Me = 10, [Ms, it] = $t(vt), df = "SelectContentImpl", ff = /* @__PURE__ */ E
3582
3593
  selectedItemText: z,
3583
3594
  position: r,
3584
3595
  isPositioned: M,
3585
- searchRef: P,
3596
+ searchRef: T,
3586
3597
  children: /* @__PURE__ */ l(uo, { as: ff, allowPinchZoom: !0, children: /* @__PURE__ */ l(
3587
3598
  Jr,
3588
3599
  {
@@ -3667,7 +3678,7 @@ var mf = "SelectItemAlignedPosition", Is = f.forwardRef((e, t) => {
3667
3678
  ]);
3668
3679
  i.style.minWidth = he + "px", i.style.right = dt + "px";
3669
3680
  }
3670
- const B = g(), G = window.innerHeight - Me * 2, M = h.scrollHeight, F = window.getComputedStyle(u), N = parseInt(F.borderTopWidth, 10), k = parseInt(F.paddingTop, 10), D = parseInt(F.borderBottomWidth, 10), T = parseInt(F.paddingBottom, 10), R = N + k + M + T + D, P = Math.min(v.offsetHeight * 5, R), q = window.getComputedStyle(h), te = parseInt(q.paddingTop, 10), K = parseInt(q.paddingBottom, 10), ge = _.top + _.height / 2 - Me, Y = G - ge, oe = v.offsetHeight / 2, V = v.offsetTop + oe, J = N + k + V, Z = R - J;
3681
+ const B = g(), G = window.innerHeight - Me * 2, M = h.scrollHeight, F = window.getComputedStyle(u), N = parseInt(F.borderTopWidth, 10), k = parseInt(F.paddingTop, 10), D = parseInt(F.borderBottomWidth, 10), A = parseInt(F.paddingBottom, 10), P = N + k + M + A + D, T = Math.min(v.offsetHeight * 5, P), q = window.getComputedStyle(h), te = parseInt(q.paddingTop, 10), K = parseInt(q.paddingBottom, 10), ge = _.top + _.height / 2 - Me, Y = G - ge, oe = v.offsetHeight / 2, V = v.offsetTop + oe, J = N + k + V, Z = P - J;
3671
3682
  if (J <= ge) {
3672
3683
  const re = B.length > 0 && v === B[B.length - 1].ref.current;
3673
3684
  i.style.bottom = "0px";
@@ -3687,7 +3698,7 @@ var mf = "SelectItemAlignedPosition", Is = f.forwardRef((e, t) => {
3687
3698
  ) + Z;
3688
3699
  i.style.height = le + "px", h.scrollTop = J - ge + h.offsetTop;
3689
3700
  }
3690
- i.style.margin = `${Me}px 0`, i.style.minHeight = P + "px", i.style.maxHeight = G + "px", r?.(), requestAnimationFrame(() => m.current = !0);
3701
+ i.style.margin = `${Me}px 0`, i.style.minHeight = T + "px", i.style.maxHeight = G + "px", r?.(), requestAnimationFrame(() => m.current = !0);
3691
3702
  }
3692
3703
  }, [
3693
3704
  g,
@@ -3706,7 +3717,7 @@ var mf = "SelectItemAlignedPosition", Is = f.forwardRef((e, t) => {
3706
3717
  ye(() => {
3707
3718
  u && x(window.getComputedStyle(u).zIndex);
3708
3719
  }, [u]);
3709
- const A = f.useCallback(
3720
+ const R = f.useCallback(
3710
3721
  (_) => {
3711
3722
  _ && b.current === !0 && (C(), E?.(), b.current = !1);
3712
3723
  },
@@ -3718,7 +3729,7 @@ var mf = "SelectItemAlignedPosition", Is = f.forwardRef((e, t) => {
3718
3729
  scope: n,
3719
3730
  contentWrapper: i,
3720
3731
  shouldExpandOnScrollRef: m,
3721
- onScrollButtonChange: A,
3732
+ onScrollButtonChange: R,
3722
3733
  children: /* @__PURE__ */ l(
3723
3734
  "div",
3724
3735
  {
@@ -4201,9 +4212,12 @@ function $f({
4201
4212
  ...e.props,
4202
4213
  type: "email",
4203
4214
  value: t[e.name] || "",
4204
- onChange: (i) => n(e.name, i.target.value),
4215
+ onChange: (i) => {
4216
+ s || n(e.name, i.target.value);
4217
+ },
4205
4218
  onBlur: () => r(e.name),
4206
4219
  disabled: s,
4220
+ readOnly: s,
4207
4221
  name: e.name,
4208
4222
  placeholder: e.placeholder,
4209
4223
  className: `flex h-10 w-full rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${o ? "border-red-500 focus-visible:ring-red-500" : "border-input focus-visible:ring-blue-500"} ${s ? "bg-gray-100 text-gray-500 cursor-not-allowed" : "bg-background"}`
@@ -4480,7 +4494,7 @@ function ni() {
4480
4494
  }
4481
4495
  let w, x = "";
4482
4496
  const {
4483
- implementation: A,
4497
+ implementation: R,
4484
4498
  createNodeIterator: _,
4485
4499
  createDocumentFragment: O,
4486
4500
  getElementsByTagName: $
@@ -4488,7 +4502,7 @@ function ni() {
4488
4502
  importNode: z
4489
4503
  } = r;
4490
4504
  let B = ha();
4491
- t.isSupported = typeof Js == "function" && typeof C == "function" && A && A.createHTMLDocument !== void 0;
4505
+ t.isSupported = typeof Js == "function" && typeof C == "function" && R && R.createHTMLDocument !== void 0;
4492
4506
  const {
4493
4507
  MUSTACHE_EXPR: G,
4494
4508
  ERB_EXPR: M,
@@ -4496,11 +4510,11 @@ function ni() {
4496
4510
  DATA_ATTR: N,
4497
4511
  ARIA_ATTR: k,
4498
4512
  IS_SCRIPT_OR_DATA: D,
4499
- ATTR_WHITESPACE: T,
4500
- CUSTOM_ELEMENT: R
4513
+ ATTR_WHITESPACE: A,
4514
+ CUSTOM_ELEMENT: P
4501
4515
  } = pa;
4502
4516
  let {
4503
- IS_ALLOWED_URI: P
4517
+ IS_ALLOWED_URI: T
4504
4518
  } = pa, q = null;
4505
4519
  const te = Q({}, [...ua, ...Er, ...Nr, ...kr, ...da]);
4506
4520
  let K = null;
@@ -4560,7 +4574,7 @@ function ni() {
4560
4574
  let y = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4561
4575
  if (!(Et && Et === y)) {
4562
4576
  if ((!y || typeof y != "object") && (y = {}), y = He(y), Wt = // eslint-disable-next-line unicorn/prefer-includes
4563
- rc.indexOf(y.PARSER_MEDIA_TYPE) === -1 ? oc : y.PARSER_MEDIA_TYPE, me = Wt === "application/xhtml+xml" ? Sr : Nn, q = De(y, "ALLOWED_TAGS") ? Q({}, y.ALLOWED_TAGS, me) : te, K = De(y, "ALLOWED_ATTR") ? Q({}, y.ALLOWED_ATTR, me) : ge, sr = De(y, "ALLOWED_NAMESPACES") ? Q({}, y.ALLOWED_NAMESPACES, Sr) : tc, or = De(y, "ADD_URI_SAFE_ATTR") ? Q(He(xo), y.ADD_URI_SAFE_ATTR, me) : xo, yo = De(y, "ADD_DATA_URI_TAGS") ? Q(He(wo), y.ADD_DATA_URI_TAGS, me) : wo, ze = De(y, "FORBID_CONTENTS") ? Q({}, y.FORBID_CONTENTS, me) : rr, oe = De(y, "FORBID_TAGS") ? Q({}, y.FORBID_TAGS, me) : He({}), V = De(y, "FORBID_ATTR") ? Q({}, y.FORBID_ATTR, me) : He({}), St = De(y, "USE_PROFILES") ? y.USE_PROFILES : !1, Z = y.ALLOW_ARIA_ATTR !== !1, ne = y.ALLOW_DATA_ATTR !== !1, re = y.ALLOW_UNKNOWN_PROTOCOLS || !1, se = y.ALLOW_SELF_CLOSE_IN_ATTR !== !1, le = y.SAFE_FOR_TEMPLATES || !1, he = y.SAFE_FOR_XML !== !1, Oe = y.WHOLE_DOCUMENT || !1, xt = y.RETURN_DOM || !1, sn = y.RETURN_DOM_FRAGMENT || !1, cn = y.RETURN_TRUSTED_TYPE || !1, dt = y.FORCE_BODY || !1, bo = y.SANITIZE_DOM !== !1, vo = y.SANITIZE_NAMED_PROPS || !1, nr = y.KEEP_CONTENT !== !1, zt = y.IN_PLACE || !1, P = y.ALLOWED_URI_REGEXP || ei, Ct = y.NAMESPACE || We, dn = y.MATHML_TEXT_INTEGRATION_POINTS || dn, fn = y.HTML_INTEGRATION_POINTS || fn, Y = y.CUSTOM_ELEMENT_HANDLING || Xt(null), y.CUSTOM_ELEMENT_HANDLING && So(y.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Y.tagNameCheck = y.CUSTOM_ELEMENT_HANDLING.tagNameCheck), y.CUSTOM_ELEMENT_HANDLING && So(y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Y.attributeNameCheck = y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), y.CUSTOM_ELEMENT_HANDLING && typeof y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Y.allowCustomizedBuiltInElements = y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), le && (ne = !1), sn && (xt = !0), St && (q = Q({}, da), K = Xt(null), St.html === !0 && (Q(q, ua), Q(K, fa)), St.svg === !0 && (Q(q, Er), Q(K, Ar), Q(K, vn)), St.svgFilters === !0 && (Q(q, Nr), Q(K, Ar), Q(K, vn)), St.mathMl === !0 && (Q(q, kr), Q(K, ma), Q(K, vn))), J.tagCheck = null, J.attributeCheck = null, y.ADD_TAGS && (typeof y.ADD_TAGS == "function" ? J.tagCheck = y.ADD_TAGS : (q === te && (q = He(q)), Q(q, y.ADD_TAGS, me))), y.ADD_ATTR && (typeof y.ADD_ATTR == "function" ? J.attributeCheck = y.ADD_ATTR : (K === ge && (K = He(K)), Q(K, y.ADD_ATTR, me))), y.ADD_URI_SAFE_ATTR && Q(or, y.ADD_URI_SAFE_ATTR, me), y.FORBID_CONTENTS && (ze === rr && (ze = He(ze)), Q(ze, y.FORBID_CONTENTS, me)), y.ADD_FORBID_CONTENTS && (ze === rr && (ze = He(ze)), Q(ze, y.ADD_FORBID_CONTENTS, me)), nr && (q["#text"] = !0), Oe && Q(q, ["html", "head", "body"]), q.table && (Q(q, ["tbody"]), delete oe.tbody), y.TRUSTED_TYPES_POLICY) {
4577
+ rc.indexOf(y.PARSER_MEDIA_TYPE) === -1 ? oc : y.PARSER_MEDIA_TYPE, me = Wt === "application/xhtml+xml" ? Sr : Nn, q = De(y, "ALLOWED_TAGS") ? Q({}, y.ALLOWED_TAGS, me) : te, K = De(y, "ALLOWED_ATTR") ? Q({}, y.ALLOWED_ATTR, me) : ge, sr = De(y, "ALLOWED_NAMESPACES") ? Q({}, y.ALLOWED_NAMESPACES, Sr) : tc, or = De(y, "ADD_URI_SAFE_ATTR") ? Q(He(xo), y.ADD_URI_SAFE_ATTR, me) : xo, yo = De(y, "ADD_DATA_URI_TAGS") ? Q(He(wo), y.ADD_DATA_URI_TAGS, me) : wo, ze = De(y, "FORBID_CONTENTS") ? Q({}, y.FORBID_CONTENTS, me) : rr, oe = De(y, "FORBID_TAGS") ? Q({}, y.FORBID_TAGS, me) : He({}), V = De(y, "FORBID_ATTR") ? Q({}, y.FORBID_ATTR, me) : He({}), St = De(y, "USE_PROFILES") ? y.USE_PROFILES : !1, Z = y.ALLOW_ARIA_ATTR !== !1, ne = y.ALLOW_DATA_ATTR !== !1, re = y.ALLOW_UNKNOWN_PROTOCOLS || !1, se = y.ALLOW_SELF_CLOSE_IN_ATTR !== !1, le = y.SAFE_FOR_TEMPLATES || !1, he = y.SAFE_FOR_XML !== !1, Oe = y.WHOLE_DOCUMENT || !1, xt = y.RETURN_DOM || !1, sn = y.RETURN_DOM_FRAGMENT || !1, cn = y.RETURN_TRUSTED_TYPE || !1, dt = y.FORCE_BODY || !1, bo = y.SANITIZE_DOM !== !1, vo = y.SANITIZE_NAMED_PROPS || !1, nr = y.KEEP_CONTENT !== !1, zt = y.IN_PLACE || !1, T = y.ALLOWED_URI_REGEXP || ei, Ct = y.NAMESPACE || We, dn = y.MATHML_TEXT_INTEGRATION_POINTS || dn, fn = y.HTML_INTEGRATION_POINTS || fn, Y = y.CUSTOM_ELEMENT_HANDLING || Xt(null), y.CUSTOM_ELEMENT_HANDLING && So(y.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Y.tagNameCheck = y.CUSTOM_ELEMENT_HANDLING.tagNameCheck), y.CUSTOM_ELEMENT_HANDLING && So(y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Y.attributeNameCheck = y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), y.CUSTOM_ELEMENT_HANDLING && typeof y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Y.allowCustomizedBuiltInElements = y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), le && (ne = !1), sn && (xt = !0), St && (q = Q({}, da), K = Xt(null), St.html === !0 && (Q(q, ua), Q(K, fa)), St.svg === !0 && (Q(q, Er), Q(K, Ar), Q(K, vn)), St.svgFilters === !0 && (Q(q, Nr), Q(K, Ar), Q(K, vn)), St.mathMl === !0 && (Q(q, kr), Q(K, ma), Q(K, vn))), J.tagCheck = null, J.attributeCheck = null, y.ADD_TAGS && (typeof y.ADD_TAGS == "function" ? J.tagCheck = y.ADD_TAGS : (q === te && (q = He(q)), Q(q, y.ADD_TAGS, me))), y.ADD_ATTR && (typeof y.ADD_ATTR == "function" ? J.attributeCheck = y.ADD_ATTR : (K === ge && (K = He(K)), Q(K, y.ADD_ATTR, me))), y.ADD_URI_SAFE_ATTR && Q(or, y.ADD_URI_SAFE_ATTR, me), y.FORBID_CONTENTS && (ze === rr && (ze = He(ze)), Q(ze, y.FORBID_CONTENTS, me)), y.ADD_FORBID_CONTENTS && (ze === rr && (ze = He(ze)), Q(ze, y.ADD_FORBID_CONTENTS, me)), nr && (q["#text"] = !0), Oe && Q(q, ["html", "head", "body"]), q.table && (Q(q, ["tbody"]), delete oe.tbody), y.TRUSTED_TYPES_POLICY) {
4564
4578
  if (typeof y.TRUSTED_TYPES_POLICY.createHTML != "function")
4565
4579
  throw Ut('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
4566
4580
  if (typeof y.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -4626,7 +4640,7 @@ function ni() {
4626
4640
  } catch {
4627
4641
  }
4628
4642
  if (!I || !I.documentElement) {
4629
- I = A.createDocument(Ct, "template", null);
4643
+ I = R.createDocument(Ct, "template", null);
4630
4644
  try {
4631
4645
  I.documentElement.innerHTML = ar ? x : ue;
4632
4646
  } catch {
@@ -4698,9 +4712,9 @@ function ni() {
4698
4712
  I === "is" && Y.allowCustomizedBuiltInElements && (Y.tagNameCheck instanceof RegExp && we(Y.tagNameCheck, U) || Y.tagNameCheck instanceof Function && Y.tagNameCheck(U)))
4699
4713
  ) return !1;
4700
4714
  } else if (!or[I]) {
4701
- if (!we(P, Rt(U, T, ""))) {
4715
+ if (!we(T, Rt(U, A, ""))) {
4702
4716
  if (!((I === "src" || I === "xlink:href" || I === "href") && y !== "script" && jf(U, "data:") === 0 && yo[y])) {
4703
- if (!(re && !we(D, Rt(U, T, "")))) {
4717
+ if (!(re && !we(D, Rt(U, A, "")))) {
4704
4718
  if (U)
4705
4719
  return !1;
4706
4720
  }
@@ -4712,7 +4726,7 @@ function ni() {
4712
4726
  }
4713
4727
  return !0;
4714
4728
  }, Ro = function(y) {
4715
- return y !== "annotation-xml" && Cr(y, R);
4729
+ return y !== "annotation-xml" && Cr(y, P);
4716
4730
  }, Po = function(y) {
4717
4731
  Ge(B.beforeSanitizeAttributes, y, null);
4718
4732
  const {
@@ -5139,8 +5153,8 @@ function um({
5139
5153
  `;
5140
5154
  if (b.length > 0) {
5141
5155
  const E = Array.isArray(t[e.name]) ? t[e.name] : [], C = (w, x) => {
5142
- let A = x ? [...E, w] : E.filter((_) => _ !== w);
5143
- n(e.name, A), r(e.name);
5156
+ let R = x ? [...E, w] : E.filter((_) => _ !== w);
5157
+ n(e.name, R), r(e.name);
5144
5158
  };
5145
5159
  return /* @__PURE__ */ L(
5146
5160
  "fieldset",
@@ -5155,7 +5169,7 @@ function um({
5155
5169
  {
5156
5170
  className: h ? "flex flex-wrap gap-x-6 gap-y-3" : "space-y-4",
5157
5171
  children: b.map((w) => {
5158
- const x = typeof w == "object" ? w.value : w, A = typeof w == "object" ? w.label : w, _ = typeof w == "object" ? w.description : null, O = `${e.name}-${x}`, $ = E.includes(x);
5172
+ const x = typeof w == "object" ? w.value : w, R = typeof w == "object" ? w.label : w, _ = typeof w == "object" ? w.description : null, O = `${e.name}-${x}`, $ = E.includes(x);
5159
5173
  return /* @__PURE__ */ L(
5160
5174
  "div",
5161
5175
  {
@@ -5181,7 +5195,7 @@ function um({
5181
5195
  {
5182
5196
  htmlFor: O,
5183
5197
  className: `font-medium select-none transition-colors ${m ? "text-muted-foreground" : "text-foreground cursor-pointer group-hover:text-primary"}`,
5184
- children: A
5198
+ children: R
5185
5199
  }
5186
5200
  ),
5187
5201
  _ && !h && /* @__PURE__ */ l(
@@ -7009,8 +7023,8 @@ const Ip = (e, t) => {
7009
7023
  continue;
7010
7024
  s.push(w);
7011
7025
  const x = o(S, v);
7012
- for (let A = 0; A < x.length; ++A) {
7013
- const _ = x[A];
7026
+ for (let R = 0; R < x.length; ++R) {
7027
+ const _ = x[R];
7014
7028
  s.push(C + _);
7015
7029
  }
7016
7030
  c = d + (c.length > 0 ? " " + c : c);
@@ -7074,9 +7088,9 @@ const Ip = (e, t) => {
7074
7088
  "bottom-left",
7075
7089
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
7076
7090
  "left-bottom"
7077
- ], x = () => [...w(), H, W], A = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", "contain", "none"], O = () => [H, W, c], $ = () => [Je, "full", "auto", ...O()], z = () => [et, "none", "subgrid", H, W], B = () => ["auto", {
7091
+ ], x = () => [...w(), H, W], R = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", "contain", "none"], O = () => [H, W, c], $ = () => [Je, "full", "auto", ...O()], z = () => [et, "none", "subgrid", H, W], B = () => ["auto", {
7078
7092
  span: ["full", et, H, W]
7079
- }, et, H, W], G = () => [et, "auto", H, W], M = () => ["auto", "min", "max", "fr", H, W], F = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], N = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], k = () => ["auto", ...O()], D = () => [Je, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...O()], T = () => [Je, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...O()], R = () => [Je, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...O()], P = () => [e, H, W], q = () => [...w(), Ta, Aa, {
7093
+ }, et, H, W], G = () => [et, "auto", H, W], M = () => ["auto", "min", "max", "fr", H, W], F = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], N = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], k = () => ["auto", ...O()], D = () => [Je, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...O()], A = () => [Je, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...O()], P = () => [Je, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...O()], T = () => [e, H, W], q = () => [...w(), Ta, Aa, {
7080
7094
  position: [H, W]
7081
7095
  }], te = () => ["no-repeat", {
7082
7096
  repeat: ["", "x", "y", "space", "round"]
@@ -7228,21 +7242,21 @@ const Ip = (e, t) => {
7228
7242
  * @see https://tailwindcss.com/docs/overflow
7229
7243
  */
7230
7244
  overflow: [{
7231
- overflow: A()
7245
+ overflow: R()
7232
7246
  }],
7233
7247
  /**
7234
7248
  * Overflow X
7235
7249
  * @see https://tailwindcss.com/docs/overflow
7236
7250
  */
7237
7251
  "overflow-x": [{
7238
- "overflow-x": A()
7252
+ "overflow-x": R()
7239
7253
  }],
7240
7254
  /**
7241
7255
  * Overflow Y
7242
7256
  * @see https://tailwindcss.com/docs/overflow
7243
7257
  */
7244
7258
  "overflow-y": [{
7245
- "overflow-y": A()
7259
+ "overflow-y": R()
7246
7260
  }],
7247
7261
  /**
7248
7262
  * Overscroll Behavior
@@ -7782,42 +7796,42 @@ const Ip = (e, t) => {
7782
7796
  * @see https://tailwindcss.com/docs/width
7783
7797
  */
7784
7798
  "inline-size": [{
7785
- inline: ["auto", ...T()]
7799
+ inline: ["auto", ...A()]
7786
7800
  }],
7787
7801
  /**
7788
7802
  * Min-Inline Size
7789
7803
  * @see https://tailwindcss.com/docs/min-width
7790
7804
  */
7791
7805
  "min-inline-size": [{
7792
- "min-inline": ["auto", ...T()]
7806
+ "min-inline": ["auto", ...A()]
7793
7807
  }],
7794
7808
  /**
7795
7809
  * Max-Inline Size
7796
7810
  * @see https://tailwindcss.com/docs/max-width
7797
7811
  */
7798
7812
  "max-inline-size": [{
7799
- "max-inline": ["none", ...T()]
7813
+ "max-inline": ["none", ...A()]
7800
7814
  }],
7801
7815
  /**
7802
7816
  * Block Size
7803
7817
  * @see https://tailwindcss.com/docs/height
7804
7818
  */
7805
7819
  "block-size": [{
7806
- block: ["auto", ...R()]
7820
+ block: ["auto", ...P()]
7807
7821
  }],
7808
7822
  /**
7809
7823
  * Min-Block Size
7810
7824
  * @see https://tailwindcss.com/docs/min-height
7811
7825
  */
7812
7826
  "min-block-size": [{
7813
- "min-block": ["auto", ...R()]
7827
+ "min-block": ["auto", ...P()]
7814
7828
  }],
7815
7829
  /**
7816
7830
  * Max-Block Size
7817
7831
  * @see https://tailwindcss.com/docs/max-height
7818
7832
  */
7819
7833
  "max-block-size": [{
7820
- "max-block": ["none", ...R()]
7834
+ "max-block": ["none", ...P()]
7821
7835
  }],
7822
7836
  /**
7823
7837
  * Width
@@ -8015,14 +8029,14 @@ const Ip = (e, t) => {
8015
8029
  * @see https://v3.tailwindcss.com/docs/placeholder-color
8016
8030
  */
8017
8031
  "placeholder-color": [{
8018
- placeholder: P()
8032
+ placeholder: T()
8019
8033
  }],
8020
8034
  /**
8021
8035
  * Text Color
8022
8036
  * @see https://tailwindcss.com/docs/text-color
8023
8037
  */
8024
8038
  "text-color": [{
8025
- text: P()
8039
+ text: T()
8026
8040
  }],
8027
8041
  /**
8028
8042
  * Text Decoration
@@ -8048,7 +8062,7 @@ const Ip = (e, t) => {
8048
8062
  * @see https://tailwindcss.com/docs/text-decoration-color
8049
8063
  */
8050
8064
  "text-decoration-color": [{
8051
- decoration: P()
8065
+ decoration: T()
8052
8066
  }],
8053
8067
  /**
8054
8068
  * Text Underline Offset
@@ -8186,7 +8200,7 @@ const Ip = (e, t) => {
8186
8200
  * @see https://tailwindcss.com/docs/background-color
8187
8201
  */
8188
8202
  "bg-color": [{
8189
- bg: P()
8203
+ bg: T()
8190
8204
  }],
8191
8205
  /**
8192
8206
  * Gradient Color Stops From Position
@@ -8214,21 +8228,21 @@ const Ip = (e, t) => {
8214
8228
  * @see https://tailwindcss.com/docs/gradient-color-stops
8215
8229
  */
8216
8230
  "gradient-from": [{
8217
- from: P()
8231
+ from: T()
8218
8232
  }],
8219
8233
  /**
8220
8234
  * Gradient Color Stops Via
8221
8235
  * @see https://tailwindcss.com/docs/gradient-color-stops
8222
8236
  */
8223
8237
  "gradient-via": [{
8224
- via: P()
8238
+ via: T()
8225
8239
  }],
8226
8240
  /**
8227
8241
  * Gradient Color Stops To
8228
8242
  * @see https://tailwindcss.com/docs/gradient-color-stops
8229
8243
  */
8230
8244
  "gradient-to": [{
8231
- to: P()
8245
+ to: T()
8232
8246
  }],
8233
8247
  // ---------------
8234
8248
  // --- Borders ---
@@ -8458,84 +8472,84 @@ const Ip = (e, t) => {
8458
8472
  * @see https://tailwindcss.com/docs/border-color
8459
8473
  */
8460
8474
  "border-color": [{
8461
- border: P()
8475
+ border: T()
8462
8476
  }],
8463
8477
  /**
8464
8478
  * Border Color Inline
8465
8479
  * @see https://tailwindcss.com/docs/border-color
8466
8480
  */
8467
8481
  "border-color-x": [{
8468
- "border-x": P()
8482
+ "border-x": T()
8469
8483
  }],
8470
8484
  /**
8471
8485
  * Border Color Block
8472
8486
  * @see https://tailwindcss.com/docs/border-color
8473
8487
  */
8474
8488
  "border-color-y": [{
8475
- "border-y": P()
8489
+ "border-y": T()
8476
8490
  }],
8477
8491
  /**
8478
8492
  * Border Color Inline Start
8479
8493
  * @see https://tailwindcss.com/docs/border-color
8480
8494
  */
8481
8495
  "border-color-s": [{
8482
- "border-s": P()
8496
+ "border-s": T()
8483
8497
  }],
8484
8498
  /**
8485
8499
  * Border Color Inline End
8486
8500
  * @see https://tailwindcss.com/docs/border-color
8487
8501
  */
8488
8502
  "border-color-e": [{
8489
- "border-e": P()
8503
+ "border-e": T()
8490
8504
  }],
8491
8505
  /**
8492
8506
  * Border Color Block Start
8493
8507
  * @see https://tailwindcss.com/docs/border-color
8494
8508
  */
8495
8509
  "border-color-bs": [{
8496
- "border-bs": P()
8510
+ "border-bs": T()
8497
8511
  }],
8498
8512
  /**
8499
8513
  * Border Color Block End
8500
8514
  * @see https://tailwindcss.com/docs/border-color
8501
8515
  */
8502
8516
  "border-color-be": [{
8503
- "border-be": P()
8517
+ "border-be": T()
8504
8518
  }],
8505
8519
  /**
8506
8520
  * Border Color Top
8507
8521
  * @see https://tailwindcss.com/docs/border-color
8508
8522
  */
8509
8523
  "border-color-t": [{
8510
- "border-t": P()
8524
+ "border-t": T()
8511
8525
  }],
8512
8526
  /**
8513
8527
  * Border Color Right
8514
8528
  * @see https://tailwindcss.com/docs/border-color
8515
8529
  */
8516
8530
  "border-color-r": [{
8517
- "border-r": P()
8531
+ "border-r": T()
8518
8532
  }],
8519
8533
  /**
8520
8534
  * Border Color Bottom
8521
8535
  * @see https://tailwindcss.com/docs/border-color
8522
8536
  */
8523
8537
  "border-color-b": [{
8524
- "border-b": P()
8538
+ "border-b": T()
8525
8539
  }],
8526
8540
  /**
8527
8541
  * Border Color Left
8528
8542
  * @see https://tailwindcss.com/docs/border-color
8529
8543
  */
8530
8544
  "border-color-l": [{
8531
- "border-l": P()
8545
+ "border-l": T()
8532
8546
  }],
8533
8547
  /**
8534
8548
  * Divide Color
8535
8549
  * @see https://tailwindcss.com/docs/divide-color
8536
8550
  */
8537
8551
  "divide-color": [{
8538
- divide: P()
8552
+ divide: T()
8539
8553
  }],
8540
8554
  /**
8541
8555
  * Outline Style
@@ -8563,7 +8577,7 @@ const Ip = (e, t) => {
8563
8577
  * @see https://tailwindcss.com/docs/outline-color
8564
8578
  */
8565
8579
  "outline-color": [{
8566
- outline: P()
8580
+ outline: T()
8567
8581
  }],
8568
8582
  // ---------------
8569
8583
  // --- Effects ---
@@ -8587,7 +8601,7 @@ const Ip = (e, t) => {
8587
8601
  * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
8588
8602
  */
8589
8603
  "shadow-color": [{
8590
- shadow: P()
8604
+ shadow: T()
8591
8605
  }],
8592
8606
  /**
8593
8607
  * Inset Box Shadow
@@ -8601,7 +8615,7 @@ const Ip = (e, t) => {
8601
8615
  * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
8602
8616
  */
8603
8617
  "inset-shadow-color": [{
8604
- "inset-shadow": P()
8618
+ "inset-shadow": T()
8605
8619
  }],
8606
8620
  /**
8607
8621
  * Ring Width
@@ -8622,7 +8636,7 @@ const Ip = (e, t) => {
8622
8636
  * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
8623
8637
  */
8624
8638
  "ring-color": [{
8625
- ring: P()
8639
+ ring: T()
8626
8640
  }],
8627
8641
  /**
8628
8642
  * Ring Offset Width
@@ -8640,7 +8654,7 @@ const Ip = (e, t) => {
8640
8654
  * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
8641
8655
  */
8642
8656
  "ring-offset-color": [{
8643
- "ring-offset": P()
8657
+ "ring-offset": T()
8644
8658
  }],
8645
8659
  /**
8646
8660
  * Inset Ring Width
@@ -8654,7 +8668,7 @@ const Ip = (e, t) => {
8654
8668
  * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
8655
8669
  */
8656
8670
  "inset-ring-color": [{
8657
- "inset-ring": P()
8671
+ "inset-ring": T()
8658
8672
  }],
8659
8673
  /**
8660
8674
  * Text Shadow
@@ -8668,7 +8682,7 @@ const Ip = (e, t) => {
8668
8682
  * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
8669
8683
  */
8670
8684
  "text-shadow-color": [{
8671
- "text-shadow": P()
8685
+ "text-shadow": T()
8672
8686
  }],
8673
8687
  /**
8674
8688
  * Opacity
@@ -8719,10 +8733,10 @@ const Ip = (e, t) => {
8719
8733
  "mask-linear-to": Z()
8720
8734
  }],
8721
8735
  "mask-image-linear-from-color": [{
8722
- "mask-linear-from": P()
8736
+ "mask-linear-from": T()
8723
8737
  }],
8724
8738
  "mask-image-linear-to-color": [{
8725
- "mask-linear-to": P()
8739
+ "mask-linear-to": T()
8726
8740
  }],
8727
8741
  "mask-image-t-from-pos": [{
8728
8742
  "mask-t-from": Z()
@@ -8731,10 +8745,10 @@ const Ip = (e, t) => {
8731
8745
  "mask-t-to": Z()
8732
8746
  }],
8733
8747
  "mask-image-t-from-color": [{
8734
- "mask-t-from": P()
8748
+ "mask-t-from": T()
8735
8749
  }],
8736
8750
  "mask-image-t-to-color": [{
8737
- "mask-t-to": P()
8751
+ "mask-t-to": T()
8738
8752
  }],
8739
8753
  "mask-image-r-from-pos": [{
8740
8754
  "mask-r-from": Z()
@@ -8743,10 +8757,10 @@ const Ip = (e, t) => {
8743
8757
  "mask-r-to": Z()
8744
8758
  }],
8745
8759
  "mask-image-r-from-color": [{
8746
- "mask-r-from": P()
8760
+ "mask-r-from": T()
8747
8761
  }],
8748
8762
  "mask-image-r-to-color": [{
8749
- "mask-r-to": P()
8763
+ "mask-r-to": T()
8750
8764
  }],
8751
8765
  "mask-image-b-from-pos": [{
8752
8766
  "mask-b-from": Z()
@@ -8755,10 +8769,10 @@ const Ip = (e, t) => {
8755
8769
  "mask-b-to": Z()
8756
8770
  }],
8757
8771
  "mask-image-b-from-color": [{
8758
- "mask-b-from": P()
8772
+ "mask-b-from": T()
8759
8773
  }],
8760
8774
  "mask-image-b-to-color": [{
8761
- "mask-b-to": P()
8775
+ "mask-b-to": T()
8762
8776
  }],
8763
8777
  "mask-image-l-from-pos": [{
8764
8778
  "mask-l-from": Z()
@@ -8767,10 +8781,10 @@ const Ip = (e, t) => {
8767
8781
  "mask-l-to": Z()
8768
8782
  }],
8769
8783
  "mask-image-l-from-color": [{
8770
- "mask-l-from": P()
8784
+ "mask-l-from": T()
8771
8785
  }],
8772
8786
  "mask-image-l-to-color": [{
8773
- "mask-l-to": P()
8787
+ "mask-l-to": T()
8774
8788
  }],
8775
8789
  "mask-image-x-from-pos": [{
8776
8790
  "mask-x-from": Z()
@@ -8779,10 +8793,10 @@ const Ip = (e, t) => {
8779
8793
  "mask-x-to": Z()
8780
8794
  }],
8781
8795
  "mask-image-x-from-color": [{
8782
- "mask-x-from": P()
8796
+ "mask-x-from": T()
8783
8797
  }],
8784
8798
  "mask-image-x-to-color": [{
8785
- "mask-x-to": P()
8799
+ "mask-x-to": T()
8786
8800
  }],
8787
8801
  "mask-image-y-from-pos": [{
8788
8802
  "mask-y-from": Z()
@@ -8791,10 +8805,10 @@ const Ip = (e, t) => {
8791
8805
  "mask-y-to": Z()
8792
8806
  }],
8793
8807
  "mask-image-y-from-color": [{
8794
- "mask-y-from": P()
8808
+ "mask-y-from": T()
8795
8809
  }],
8796
8810
  "mask-image-y-to-color": [{
8797
- "mask-y-to": P()
8811
+ "mask-y-to": T()
8798
8812
  }],
8799
8813
  "mask-image-radial": [{
8800
8814
  "mask-radial": [H, W]
@@ -8806,10 +8820,10 @@ const Ip = (e, t) => {
8806
8820
  "mask-radial-to": Z()
8807
8821
  }],
8808
8822
  "mask-image-radial-from-color": [{
8809
- "mask-radial-from": P()
8823
+ "mask-radial-from": T()
8810
8824
  }],
8811
8825
  "mask-image-radial-to-color": [{
8812
- "mask-radial-to": P()
8826
+ "mask-radial-to": T()
8813
8827
  }],
8814
8828
  "mask-image-radial-shape": [{
8815
8829
  "mask-radial": ["circle", "ellipse"]
@@ -8833,10 +8847,10 @@ const Ip = (e, t) => {
8833
8847
  "mask-conic-to": Z()
8834
8848
  }],
8835
8849
  "mask-image-conic-from-color": [{
8836
- "mask-conic-from": P()
8850
+ "mask-conic-from": T()
8837
8851
  }],
8838
8852
  "mask-image-conic-to-color": [{
8839
- "mask-conic-to": P()
8853
+ "mask-conic-to": T()
8840
8854
  }],
8841
8855
  /**
8842
8856
  * Mask Mode
@@ -8943,7 +8957,7 @@ const Ip = (e, t) => {
8943
8957
  * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
8944
8958
  */
8945
8959
  "drop-shadow-color": [{
8946
- "drop-shadow": P()
8960
+ "drop-shadow": T()
8947
8961
  }],
8948
8962
  /**
8949
8963
  * Grayscale
@@ -9314,7 +9328,7 @@ const Ip = (e, t) => {
9314
9328
  * @see https://tailwindcss.com/docs/accent-color
9315
9329
  */
9316
9330
  accent: [{
9317
- accent: P()
9331
+ accent: T()
9318
9332
  }],
9319
9333
  /**
9320
9334
  * Appearance
@@ -9328,7 +9342,7 @@ const Ip = (e, t) => {
9328
9342
  * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
9329
9343
  */
9330
9344
  "caret-color": [{
9331
- caret: P()
9345
+ caret: T()
9332
9346
  }],
9333
9347
  /**
9334
9348
  * Color Scheme
@@ -9602,7 +9616,7 @@ const Ip = (e, t) => {
9602
9616
  * @see https://tailwindcss.com/docs/fill
9603
9617
  */
9604
9618
  fill: [{
9605
- fill: ["none", ...P()]
9619
+ fill: ["none", ...T()]
9606
9620
  }],
9607
9621
  /**
9608
9622
  * Stroke Width
@@ -9616,7 +9630,7 @@ const Ip = (e, t) => {
9616
9630
  * @see https://tailwindcss.com/docs/stroke
9617
9631
  */
9618
9632
  stroke: [{
9619
- stroke: ["none", ...P()]
9633
+ stroke: ["none", ...T()]
9620
9634
  }],
9621
9635
  // ---------------------
9622
9636
  // --- Accessibility ---
@@ -9898,14 +9912,14 @@ function Ra({
9898
9912
  const N = t[M.name] || [];
9899
9913
  if (M.maxFiles && N.length + F.length > M.maxFiles)
9900
9914
  throw new Error(`Maximum ${M.maxFiles} files allowed`);
9901
- F.forEach((T) => {
9902
- if (M.maxSize && T.size > M.maxSize)
9915
+ F.forEach((A) => {
9916
+ if (M.maxSize && A.size > M.maxSize)
9903
9917
  throw new Error(
9904
9918
  `Each file must not exceed ${S(M.maxSize)}`
9905
9919
  );
9906
9920
  });
9907
9921
  const k = await Promise.all(
9908
- F.map((T) => E(T))
9922
+ F.map((A) => E(A))
9909
9923
  // Updated call
9910
9924
  ), D = [...N, ...k];
9911
9925
  a(M.name, D), s({ ...t, [M.name]: D });
@@ -9917,7 +9931,7 @@ function Ra({
9917
9931
  } catch (k) {
9918
9932
  kn.error(`Upload failed: ${k.message}`);
9919
9933
  }
9920
- }, A = async (M, F) => {
9934
+ }, R = async (M, F) => {
9921
9935
  if (u) return;
9922
9936
  let N;
9923
9937
  e.type === "file" ? N = "" : N = (t[M] || []).filter((D) => D !== F), a(M, N), s({ ...t, [M]: N }), o.current?.[M] && (o.current[M].value = "");
@@ -10008,7 +10022,7 @@ function Ra({
10008
10022
  "button",
10009
10023
  {
10010
10024
  type: "button",
10011
- onClick: () => A(e.name, M),
10025
+ onClick: () => R(e.name, M),
10012
10026
  className: `text-red-500 hover:text-red-700 ml-3 flex-shrink-0 ${u ? "cursor-not-allowed opacity-50" : ""}`,
10013
10027
  disabled: u,
10014
10028
  children: "Remove"
@@ -10096,58 +10110,58 @@ function Nh({
10096
10110
  ] });
10097
10111
  }
10098
10112
  function kh({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
10099
- const [a, s] = ce(!1), i = (A) => {
10100
- if (!A) return null;
10101
- if (A instanceof Date)
10102
- return Number.isNaN(A.getTime()) ? null : A;
10103
- if (typeof A == "string") {
10104
- const O = A.match(/^(\d{4})-(\d{2})-(\d{2})$/);
10113
+ const [a, s] = ce(!1), i = (R) => {
10114
+ if (!R) return null;
10115
+ if (R instanceof Date)
10116
+ return Number.isNaN(R.getTime()) ? null : R;
10117
+ if (typeof R == "string") {
10118
+ const O = R.match(/^(\d{4})-(\d{2})-(\d{2})$/);
10105
10119
  if (O) {
10106
10120
  const [, B, G, M] = O, F = new Date(Number(B), Number(G) - 1, Number(M));
10107
10121
  return Number.isNaN(F.getTime()) ? null : F;
10108
10122
  }
10109
- const $ = A.includes("T") ? A : A.replace(" ", "T"), z = new Date($);
10123
+ const $ = R.includes("T") ? R : R.replace(" ", "T"), z = new Date($);
10110
10124
  return Number.isNaN(z.getTime()) ? null : z;
10111
10125
  }
10112
- const _ = new Date(A);
10126
+ const _ = new Date(R);
10113
10127
  return Number.isNaN(_.getTime()) ? null : _;
10114
- }, c = t[e.name], u = i(c), d = u ? (u.getHours() % 12 || 12).toString().padStart(2, "0") : "12", p = u ? u.getMinutes().toString().padStart(2, "0") : "00", g = u ? u.getHours() >= 12 ? "PM" : "AM" : "PM", m = (A) => {
10115
- if (!A) {
10128
+ }, c = t[e.name], u = i(c), d = u ? (u.getHours() % 12 || 12).toString().padStart(2, "0") : "12", p = u ? u.getMinutes().toString().padStart(2, "0") : "00", g = u ? u.getHours() >= 12 ? "PM" : "AM" : "PM", m = (R) => {
10129
+ if (!R) {
10116
10130
  n(e.name, null);
10117
10131
  return;
10118
10132
  }
10119
- const _ = new Date(A);
10133
+ const _ = new Date(R);
10120
10134
  u ? (_.setHours(u.getHours()), _.setMinutes(u.getMinutes())) : (_.setHours(12), _.setMinutes(0)), n(e.name, _);
10121
- }, b = (A, _, O) => {
10135
+ }, b = (R, _, O) => {
10122
10136
  const $ = u ? new Date(u) : /* @__PURE__ */ new Date();
10123
- let z = parseInt(A);
10137
+ let z = parseInt(R);
10124
10138
  O === "PM" && z !== 12 && (z += 12), O === "AM" && z === 12 && (z = 0), $.setHours(z), $.setMinutes(parseInt(_)), n(e.name, $);
10125
10139
  }, h = () => {
10126
- let A = parseInt(d);
10127
- A = A % 12 + 1, b(A.toString(), p, g);
10140
+ let R = parseInt(d);
10141
+ R = R % 12 + 1, b(R.toString(), p, g);
10128
10142
  }, v = () => {
10129
- let A = parseInt(d);
10130
- A = A === 1 ? 12 : A - 1, b(A.toString(), p, g);
10143
+ let R = parseInt(d);
10144
+ R = R === 1 ? 12 : R - 1, b(R.toString(), p, g);
10131
10145
  }, S = () => {
10132
- let A = parseInt(p);
10133
- A = (A + 5) % 60, b(d, A.toString(), g);
10146
+ let R = parseInt(p);
10147
+ R = (R + 5) % 60, b(d, R.toString(), g);
10134
10148
  }, E = () => {
10135
- let A = parseInt(p);
10136
- A = A === 0 ? 55 : A - 5, b(d, A.toString(), g);
10149
+ let R = parseInt(p);
10150
+ R = R === 0 ? 55 : R - 5, b(d, R.toString(), g);
10137
10151
  }, C = () => {
10138
10152
  b(d, p, g === "AM" ? "PM" : "AM");
10139
10153
  }, w = () => n(e.name, null), x = [];
10140
10154
  if (e.maxDate) {
10141
- const A = i(e.maxDate);
10142
- A && x.push({ after: A });
10155
+ const R = i(e.maxDate);
10156
+ R && x.push({ after: R });
10143
10157
  }
10144
10158
  if (e.minDate) {
10145
- const A = i(e.minDate);
10146
- A && x.push({ before: A });
10159
+ const R = i(e.minDate);
10160
+ R && x.push({ before: R });
10147
10161
  }
10148
10162
  return /* @__PURE__ */ L("div", { className: "relative", children: [
10149
- /* @__PURE__ */ L(Qn, { open: e.disabled ? !1 : a, onOpenChange: (A) => {
10150
- e.disabled || s(A);
10163
+ /* @__PURE__ */ L(Qn, { open: e.disabled ? !1 : a, onOpenChange: (R) => {
10164
+ e.disabled || s(R);
10151
10165
  }, children: [
10152
10166
  /* @__PURE__ */ l(Zn, { asChild: !0, children: /* @__PURE__ */ L(
10153
10167
  "button",
@@ -10158,7 +10172,7 @@ function kh({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
10158
10172
  "aria-haspopup": "dialog",
10159
10173
  "aria-expanded": a,
10160
10174
  onClick: () => !e.disabled && s(!0),
10161
- onKeyDown: (A) => !e.disabled && A.key === "Enter" && s(!0),
10175
+ onKeyDown: (R) => !e.disabled && R.key === "Enter" && s(!0),
10162
10176
  className: `
10163
10177
  group inline-flex items-center justify-between gap-2
10164
10178
  w-full h-10 rounded-lg border bg-white
@@ -10472,7 +10486,7 @@ var Kh = f.forwardRef((e, t) => {
10472
10486
  defaultProp: i ?? null,
10473
10487
  onChange: c,
10474
10488
  caller: an
10475
- }), [S, E] = f.useState(!1), C = nt(u), w = Li(n), x = f.useRef(!1), [A, _] = f.useState(0);
10489
+ }), [S, E] = f.useState(!1), C = nt(u), w = Li(n), x = f.useRef(!1), [R, _] = f.useState(0);
10476
10490
  return f.useEffect(() => {
10477
10491
  const O = g.current;
10478
10492
  if (O)
@@ -10501,7 +10515,7 @@ var Kh = f.forwardRef((e, t) => {
10501
10515
  children: /* @__PURE__ */ l(
10502
10516
  Ii.div,
10503
10517
  {
10504
- tabIndex: S || A === 0 ? -1 : 0,
10518
+ tabIndex: S || R === 0 ? -1 : 0,
10505
10519
  "data-orientation": r,
10506
10520
  ...p,
10507
10521
  ref: m,
@@ -10904,13 +10918,13 @@ function hg({
10904
10918
  onValueChange: (w) => {
10905
10919
  const x = h.find(
10906
10920
  (_) => String(typeof _ == "object" ? _.value : _) === w
10907
- ), A = x ? typeof x == "object" ? x.value : x : w;
10908
- n(e.name, A), r(e.name);
10921
+ ), R = x ? typeof x == "object" ? x.value : x : w;
10922
+ n(e.name, R), r(e.name);
10909
10923
  },
10910
10924
  disabled: b,
10911
10925
  className: C,
10912
10926
  children: h.map((w) => {
10913
- const x = typeof w == "object" ? w.value : w, A = typeof w == "object" ? w.label : w, _ = typeof w == "object" ? w.description : null, O = `${e.name}-${String(x)}`, $ = String(m) === String(x);
10927
+ const x = typeof w == "object" ? w.value : w, R = typeof w == "object" ? w.label : w, _ = typeof w == "object" ? w.description : null, O = `${e.name}-${String(x)}`, $ = String(m) === String(x);
10914
10928
  return S ? /* @__PURE__ */ L(
10915
10929
  "label",
10916
10930
  {
@@ -10932,7 +10946,7 @@ function hg({
10932
10946
  className: "sr-only"
10933
10947
  }
10934
10948
  ),
10935
- A
10949
+ R
10936
10950
  ]
10937
10951
  },
10938
10952
  String(x)
@@ -10957,7 +10971,7 @@ function hg({
10957
10971
  {
10958
10972
  htmlFor: O,
10959
10973
  className: `font-medium transition-colors ${b ? "text-muted-foreground" : "text-foreground cursor-pointer group-hover:text-primary"}`,
10960
- children: A
10974
+ children: R
10961
10975
  }
10962
10976
  ),
10963
10977
  _ && !v && /* @__PURE__ */ l(
@@ -11029,13 +11043,13 @@ function bg({
11029
11043
  const O = x.includes("T") ? x : x.replace(" ", "T"), $ = new Date(O);
11030
11044
  return Number.isNaN($.getTime()) ? null : $;
11031
11045
  }
11032
- const A = new Date(x);
11033
- return Number.isNaN(A.getTime()) ? null : A;
11046
+ const R = new Date(x);
11047
+ return Number.isNaN(R.getTime()) ? null : R;
11034
11048
  }, c = (x) => !(x instanceof Date) || Number.isNaN(x.getTime()) ? null : Mn(x, "yyyy-MM-dd"), u = (x) => i(x), [d, p] = ce(!1), g = a, m = t[e.name], b = Yr(() => u(m), [m]), [h, v] = ce(b || /* @__PURE__ */ new Date());
11035
11049
  s["aria-describedby"], Ie(() => {
11036
11050
  if (d) {
11037
11051
  const x = b || /* @__PURE__ */ new Date();
11038
- v((A) => A.getFullYear() === x.getFullYear() && A.getMonth() === x.getMonth() ? A : x);
11052
+ v((R) => R.getFullYear() === x.getFullYear() && R.getMonth() === x.getMonth() ? R : x);
11039
11053
  }
11040
11054
  }, [d, b]);
11041
11055
  const S = [];
@@ -11498,7 +11512,7 @@ const $g = ({
11498
11512
  },
11499
11513
  debugMode: d = !1
11500
11514
  }) => {
11501
- const [p, g] = ce({ ...c }), [m, b] = ce({}), [h, v] = ce({}), [S, E] = ce({}), C = t, w = Zt({}), x = ["hidden", "linebreak", "header", "alert"], A = Yr(
11515
+ const [p, g] = ce({ ...c }), [m, b] = ce({}), [h, v] = ce({}), [S, E] = ce({}), C = t, w = Zt({}), x = ["hidden", "linebreak", "header", "alert"], R = Yr(
11502
11516
  () => ({
11503
11517
  file: Ra,
11504
11518
  multifile: Ra,
@@ -11531,17 +11545,17 @@ const $g = ({
11531
11545
  }
11532
11546
  try {
11533
11547
  const D = await e(`/${N.optionsUrl}`);
11534
- let T = [];
11535
- N.type === "select" ? T = [
11548
+ let A = [];
11549
+ N.type === "select" ? A = [
11536
11550
  { value: "", label: `Select ${N.label.toLowerCase()}` },
11537
11551
  ...D.data
11538
- ] : T = [
11539
- ...D.data.map((R) => ({
11540
- value: R.value,
11541
- label: R.label
11552
+ ] : A = [
11553
+ ...D.data.map((P) => ({
11554
+ value: P.value,
11555
+ label: P.label
11542
11556
  }))
11543
- ], o.fields.forEach((R) => {
11544
- R && R.name === N.name && (R.options = T);
11557
+ ], o.fields.forEach((P) => {
11558
+ P && P.name === N.name && (P.options = A);
11545
11559
  });
11546
11560
  } catch (D) {
11547
11561
  d && console.error(`Failed to load options for ${N.name}:`, D);
@@ -11557,21 +11571,21 @@ const $g = ({
11557
11571
  const k = {};
11558
11572
  o.fields.forEach((D) => {
11559
11573
  if (!D || !D.name) return;
11560
- const T = D.type === "multiselect" || D.type === "searchselect" || D.type === "checkbox" && D.options && D.options.length > 0;
11561
- let R = c[D.name] ?? D.value ?? (T ? [] : "");
11562
- ["date", "datetime", "datepicker"].includes(D.type?.toLowerCase()) && R && (R = Eg(R) || R), k[D.name] = R;
11574
+ const A = D.type === "multiselect" || D.type === "searchselect" || D.type === "checkbox" && D.options && D.options.length > 0;
11575
+ let P = c[D.name] ?? D.value ?? (A ? [] : "");
11576
+ ["date", "datetime", "datepicker"].includes(D.type?.toLowerCase()) && P && (P = Eg(P) || P), k[D.name] = P;
11563
11577
  }), g(k);
11564
11578
  }
11565
11579
  }, [o]);
11566
11580
  const O = (N, k, D) => {
11567
- const T = typeof k == "object" && k !== null && !Array.isArray(k) && !(k instanceof Date), R = k == null || typeof k == "string" && k.trim() === "" || Array.isArray(k) && k.length === 0 || N.type === "checkbox" && k === !1 || T && Object.keys(k).length === 0;
11568
- if (N.required && R)
11581
+ const A = typeof k == "object" && k !== null && !Array.isArray(k) && !(k instanceof Date), P = k == null || typeof k == "string" && k.trim() === "" || Array.isArray(k) && k.length === 0 || N.type === "checkbox" && k === !1 || A && Object.keys(k).length === 0;
11582
+ if (N.required && P)
11569
11583
  return d && console.warn(`VALIDATION FAILED (REQUIRED): ${N.name} is empty.`), `${N.label} is required`;
11570
- if (R && !N.required)
11584
+ if (P && !N.required)
11571
11585
  return null;
11572
11586
  if (N.validate) {
11573
- const P = N.validate(k, D);
11574
- if (P) return P;
11587
+ const T = N.validate(k, D);
11588
+ if (T) return T;
11575
11589
  }
11576
11590
  if (N.type === "email" && k && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k))
11577
11591
  return "Please enter a valid email address";
@@ -11583,74 +11597,74 @@ const $g = ({
11583
11597
  }
11584
11598
  return N.type === "date" && k && !Nt(k).isValid() ? `${N.label} must be a valid date` : N.maxLength && k && k.length > N.maxLength ? `${N.label} must not exceed ${N.maxLength} characters` : null;
11585
11599
  }, $ = (N, k) => {
11586
- const D = o.fields.find((R) => R && R.name === N);
11600
+ const D = o.fields.find((P) => P && P.name === N);
11587
11601
  if (!D) return;
11588
- const T = { ...p };
11589
- D.type === "multiselect" || D.type === "searchselect" ? Array.isArray(k) ? T[N] = k : k && k.target && k.target.selectedOptions ? T[N] = Array.from(k.target.selectedOptions).map(
11590
- (R) => R.value
11591
- ) : T[N] = k : D.type === "dateRange" ? T[N] = [
11602
+ const A = { ...p };
11603
+ D.type === "multiselect" || D.type === "searchselect" ? Array.isArray(k) ? A[N] = k : k && k.target && k.target.selectedOptions ? A[N] = Array.from(k.target.selectedOptions).map(
11604
+ (P) => P.value
11605
+ ) : A[N] = k : D.type === "dateRange" ? A[N] = [
11592
11606
  {
11593
11607
  startDate: k.from,
11594
11608
  endDate: k.to || k.from,
11595
11609
  key: "selection"
11596
11610
  }
11597
- ] : D.type === "dayTimePicker" ? T[N] = k ? Nt(k).format("YYYY-MM-DD HH:mm:ss") : "" : D.type === "number" ? T[N] = k === "" ? "" : Number(k) : T[N] = k, D.type === "select" && o.fields.forEach((R) => {
11598
- if (R && R.showIf && !R.showIf(T)) {
11599
- const P = R.type === "multiselect" || R.type === "searchselect" || R.type === "checkbox" && R.options && R.options.length > 0;
11600
- T[R.name] = P ? [] : "";
11611
+ ] : D.type === "dayTimePicker" ? A[N] = k ? Nt(k).format("YYYY-MM-DD HH:mm:ss") : "" : D.type === "number" ? A[N] = k === "" ? "" : Number(k) : A[N] = k, D.type === "select" && o.fields.forEach((P) => {
11612
+ if (P && P.showIf && !P.showIf(A)) {
11613
+ const T = P.type === "multiselect" || P.type === "searchselect" || P.type === "checkbox" && P.options && P.options.length > 0;
11614
+ A[P.name] = T ? [] : "";
11601
11615
  }
11602
- }), o.fields.forEach((R) => {
11603
- if (R && typeof R.disabled == "function" && R.disabled(T)) {
11604
- const P = R.type === "multiselect" || R.type === "searchselect" || R.type === "checkbox" && R.options && R.options.length > 0;
11605
- T[R.name] = P ? [] : "";
11616
+ }), o.fields.forEach((P) => {
11617
+ if (P && typeof P.disabled == "function" && P.disabled(A)) {
11618
+ const T = P.type === "multiselect" || P.type === "searchselect" || P.type === "checkbox" && P.options && P.options.length > 0;
11619
+ A[P.name] = T ? [] : "";
11606
11620
  }
11607
- }), g(T);
11621
+ }), g(A);
11608
11622
  }, z = (N) => {
11609
11623
  v({ ...h, [N]: !0 });
11610
11624
  }, B = (N) => {
11611
11625
  N.preventDefault();
11612
11626
  const k = {};
11613
- o.fields.forEach((T) => {
11614
- T && T.name && (k[T.name] = !0);
11627
+ o.fields.forEach((A) => {
11628
+ A && A.name && (k[A.name] = !0);
11615
11629
  }), v(k);
11616
11630
  const D = {};
11617
- if (o.fields.forEach((T) => {
11618
- if (!(!T || !T.name) && (!T.showIf || T.showIf(p))) {
11619
- const R = O(T, p[T.name], p);
11620
- R && (D[T.name] = R);
11631
+ if (o.fields.forEach((A) => {
11632
+ if (!(!A || !A.name) && (!A.showIf || A.showIf(p))) {
11633
+ const P = O(A, p[A.name], p);
11634
+ P && (D[A.name] = P);
11621
11635
  }
11622
11636
  }), b(D), Object.keys(D).length === 0) {
11623
- const T = (P, q) => {
11624
- if (P === "" || P === null || P === void 0) return null;
11637
+ const A = (T, q) => {
11638
+ if (T === "" || T === null || T === void 0) return null;
11625
11639
  const te = q?.toLowerCase();
11626
- if (Array.isArray(P))
11627
- return te === "number" || te === "integer" ? P.map((K) => K === "" ? null : Number(K)) : P;
11640
+ if (Array.isArray(T))
11641
+ return te === "number" || te === "integer" ? T.map((K) => K === "" ? null : Number(K)) : T;
11628
11642
  switch (te) {
11629
11643
  case "number":
11630
11644
  case "integer":
11631
11645
  case "float":
11632
- return Number(P);
11646
+ return Number(T);
11633
11647
  case "boolean":
11634
11648
  case "bool":
11635
- return String(P).toLowerCase() === "true" || P === !0;
11649
+ return String(T).toLowerCase() === "true" || T === !0;
11636
11650
  case "date":
11637
11651
  case "datepicker":
11638
- return Nt(P).isValid() ? Nt(P).format("YYYY-MM-DD") : P;
11652
+ return Nt(T).isValid() ? Nt(T).format("YYYY-MM-DD") : T;
11639
11653
  case "datetime":
11640
- return Nt(P).isValid() ? Nt(P).format("YYYY-MM-DDTHH:mm:ss") : P;
11654
+ return Nt(T).isValid() ? Nt(T).format("YYYY-MM-DDTHH:mm:ss") : T;
11641
11655
  default:
11642
- return P;
11656
+ return T;
11643
11657
  }
11644
- }, R = {};
11645
- o.fields.forEach((P) => {
11646
- if (P && P.name) {
11647
- const q = p[P.name], te = P.type || "string", K = T(q, te);
11648
- a ? R[P.name] = {
11658
+ }, P = {};
11659
+ o.fields.forEach((T) => {
11660
+ if (T && T.name) {
11661
+ const q = p[T.name], te = T.type || "string", K = A(q, te);
11662
+ a ? P[T.name] = {
11649
11663
  value: K,
11650
11664
  fieldType: te
11651
- } : R[P.name] = K;
11665
+ } : P[T.name] = K;
11652
11666
  }
11653
- }), d ? console.log("Form submitted with values:", R) : s(R);
11667
+ }), d ? console.log("Form submitted with values:", P) : s(P);
11654
11668
  } else
11655
11669
  kn.error("Please correct the errors in the form");
11656
11670
  };
@@ -11669,14 +11683,14 @@ const $g = ({
11669
11683
  orange: "border-orange-500 bg-orange-50"
11670
11684
  };
11671
11685
  function M(N, k, D) {
11672
- const T = `${k.name}-error`;
11686
+ const A = `${k.name}-error`;
11673
11687
  if (d && (D ? console.log(
11674
11688
  `[fieldFormat RENDER] Rendering error for ${k.name}: ${D}`
11675
11689
  ) : m[k.name] && console.log(
11676
11690
  `[fieldFormat RENDER] Error exists in state for ${k.name} but not passed in props!`
11677
11691
  )), x.includes(k.type))
11678
11692
  return /* @__PURE__ */ l("div", { className: k.class || "col-span-full", children: N });
11679
- const R = k.containerStyle, P = k.color || "blue", q = R === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${k.containerClassName || G[P] || G.blue}` : "", te = /* @__PURE__ */ L(It, { children: [
11693
+ const P = k.containerStyle, T = k.color || "blue", q = P === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${k.containerClassName || G[T] || G.blue}` : "", te = /* @__PURE__ */ L(It, { children: [
11680
11694
  k.label && /* @__PURE__ */ L(
11681
11695
  "label",
11682
11696
  {
@@ -11690,23 +11704,23 @@ const $g = ({
11690
11704
  }
11691
11705
  ),
11692
11706
  /* @__PURE__ */ l("div", { children: Re.cloneElement(N, {
11693
- "aria-describedby": D ? T : void 0,
11707
+ "aria-describedby": D ? A : void 0,
11694
11708
  "aria-invalid": !!D,
11695
11709
  "aria-required": k.required
11696
11710
  }) }),
11697
11711
  k.description && /* @__PURE__ */ l("p", { className: "text-xs mt-1.5 text-gray-400", children: k.description }),
11698
- D && /* @__PURE__ */ l("p", { id: T, className: "text-sm text-red-500 mt-1", role: "alert", children: D })
11712
+ D && /* @__PURE__ */ l("p", { id: A, className: "text-sm text-red-500 mt-1", role: "alert", children: D })
11699
11713
  ] });
11700
- return /* @__PURE__ */ l("div", { className: "mb-4", children: R === "card" ? /* @__PURE__ */ l("div", { className: q, children: te }) : te });
11714
+ return /* @__PURE__ */ l("div", { className: "mb-4", children: P === "card" ? /* @__PURE__ */ l("div", { className: q, children: te }) : te });
11701
11715
  }
11702
11716
  const F = (N) => {
11703
11717
  if (N.showIf && !N.showIf(p)) return null;
11704
- const k = A[N.type] || ia;
11718
+ const k = R[N.type] || ia;
11705
11719
  if (p[N.name] === void 0) {
11706
- const R = N.type === "multiselect" || N.type === "searchselect" || N.type === "checkbox" && N.options && N.options.length > 0;
11707
- p[N.name] = N.value !== void 0 ? N.value : R ? [] : "";
11720
+ const P = N.type === "multiselect" || N.type === "searchselect" || N.type === "checkbox" && N.options && N.options.length > 0;
11721
+ p[N.name] = N.value !== void 0 ? N.value : P ? [] : "";
11708
11722
  }
11709
- const D = m[N.name] ? m[N.name] : null, T = C || (typeof N.disabled == "function" ? N.disabled(p) : !!N.disabled);
11723
+ const D = m[N.name] ? m[N.name] : null, A = C || (typeof N.disabled == "function" ? N.disabled(p) : !!N.disabled);
11710
11724
  return M(
11711
11725
  /* @__PURE__ */ l(
11712
11726
  k,
@@ -11720,7 +11734,7 @@ const $g = ({
11720
11734
  api_URL: n,
11721
11735
  error: D,
11722
11736
  fileInputRefs: w,
11723
- disabled: T,
11737
+ disabled: A,
11724
11738
  apiClient: e
11725
11739
  }
11726
11740
  ),