ynotsoft-dynamic-form 1.0.77 → 1.0.78

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.
@@ -21,8 +21,8 @@ function Ma({
21
21
  disabled: s
22
22
  }) {
23
23
  const i = e.disabled && typeof e.disabled == "function" ? e.disabled(t) : e.disabled, a = s || i, l = e.options || [], c = _a(), f = t[e.name] || e.value || [], p = (m) => Array.isArray(m) && m.length > 0 && typeof m[0] == "object" && m[0] !== null && "value" in m[0];
24
- let g;
25
- return p(f) ? g = f : g = f.filter((m) => m != null).map((m) => l.find((w) => w.value === m)).filter((m) => m !== void 0), /* @__PURE__ */ u(
24
+ let b;
25
+ return p(f) ? b = f : b = f.filter((m) => m != null).map((m) => l.find((w) => w.value === m)).filter((m) => m !== void 0), /* @__PURE__ */ u(
26
26
  "div",
27
27
  {
28
28
  className: `mb-4 ${e.fieldClass ? e.fieldClass : "col-span-full"}`,
@@ -33,7 +33,7 @@ function Ma({
33
33
  isMulti: !0,
34
34
  isDisabled: a,
35
35
  name: e.label,
36
- value: g,
36
+ value: b,
37
37
  onChange: (m) => {
38
38
  const w = m.map((h) => h.value);
39
39
  n(e.name, w);
@@ -178,13 +178,13 @@ function al({
178
178
  disabled: s,
179
179
  apiClient: i
180
180
  }) {
181
- const a = s || e.disabled && (typeof e.disabled == "function" ? e.disabled(t) : e.disabled), l = e.selectMode !== "multiple", [c, f] = de([]), [p, g] = de(!1), [m, w] = de(!1), [h, y] = de(""), [C, E] = de({}), A = $t(null), x = $t(null), T = $t(null), D = t[e.name], P = D == null || D === "" ? [] : (Array.isArray(D) ? D : [D]).map((S) => {
181
+ const a = s || e.disabled && (typeof e.disabled == "function" ? e.disabled(t) : e.disabled), l = e.selectMode !== "multiple", [c, f] = de([]), [p, b] = de(!1), [m, w] = de(!1), [h, y] = de(""), [C, E] = de({}), A = $t(null), x = $t(null), T = $t(null), D = t[e.name], P = D == null || D === "" ? [] : (Array.isArray(D) ? D : [D]).map((S) => {
182
182
  const N = c.find((k) => k.value === S);
183
183
  return N || (C[S] ? C[S] : { value: S, label: S });
184
184
  }), W = Na(
185
- async (b = "") => {
185
+ async (g = "") => {
186
186
  if (e.onSearch && typeof e.onSearch == "function") {
187
- const S = await e.onSearch(b, t);
187
+ const S = await e.onSearch(g, t);
188
188
  f(S);
189
189
  return;
190
190
  }
@@ -194,10 +194,10 @@ function al({
194
194
  value: N[e.valueId || "value"] || N.value || N.id,
195
195
  label: N[e.labelId || "label"] || N.label || N.name
196
196
  }));
197
- if (!b)
197
+ if (!g)
198
198
  f(S);
199
199
  else {
200
- const N = b.toLowerCase(), k = S.filter(
200
+ const N = g.toLowerCase(), k = S.filter(
201
201
  (_) => String(_.label).toLowerCase().includes(N)
202
202
  );
203
203
  f(k);
@@ -206,9 +206,9 @@ function al({
206
206
  f([]);
207
207
  return;
208
208
  }
209
- g(!0);
209
+ b(!0);
210
210
  try {
211
- const S = e.searchParam || "search", N = e.optionsUrl.includes("?") ? "&" : "?", k = `${e.optionsUrl}${N}${S}=${encodeURIComponent(b)}`, _ = await i(k), R = _.data || _, te = (Array.isArray(R) ? R : []).map((j) => ({
211
+ const S = e.searchParam || "search", N = e.optionsUrl.includes("?") ? "&" : "?", k = `${e.optionsUrl}${N}${S}=${encodeURIComponent(g)}`, _ = await i(k), R = _.data || _, te = (Array.isArray(R) ? R : []).map((j) => ({
212
212
  value: j[e.valueId || "value"] || j.value || j.id,
213
213
  label: j[e.labelId || "label"] || j.label || j.name
214
214
  }));
@@ -216,34 +216,34 @@ function al({
216
216
  } catch (S) {
217
217
  console.error("Search failed:", S), f([]);
218
218
  } finally {
219
- g(!1);
219
+ b(!1);
220
220
  }
221
221
  },
222
222
  [e, i, t]
223
- ), H = (b) => {
224
- const S = b.target.value;
223
+ ), H = (g) => {
224
+ const S = g.target.value;
225
225
  y(S), T.current && clearTimeout(T.current), T.current = setTimeout(() => W(S), 300);
226
226
  };
227
227
  zt(() => {
228
- m && ((c.length === 0 || !e.optionsUrl && !i && !e.onSearch) && W(""), setTimeout(() => x.current?.focus(), 50));
228
+ m && (h === "" ? W("") : (c.length === 0 || !e.optionsUrl && !i && !e.onSearch) && W(h), setTimeout(() => x.current?.focus(), 50));
229
229
  }, [m]), zt(() => {
230
- const b = (S) => {
230
+ const g = (S) => {
231
231
  A.current && !A.current.contains(S.target) && (w(!1), y(""), r(e.name));
232
232
  };
233
- return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
233
+ return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
234
234
  }, [e.name, r]);
235
- const U = (b) => {
236
- E((N) => ({ ...N, [b.value]: b }));
235
+ const U = (g) => {
236
+ E((N) => ({ ...N, [g.value]: g }));
237
237
  let S;
238
238
  if (l)
239
- S = b.value, w(!1);
239
+ S = g.value, w(!1);
240
240
  else {
241
241
  const N = Array.isArray(D) ? D : [];
242
- S = N.includes(b.value) ? N.filter((_) => _ !== b.value) : [...N, b.value];
242
+ S = N.includes(g.value) ? N.filter((_) => _ !== g.value) : [...N, g.value];
243
243
  }
244
- n(e.name, S), e.clearSearchOnSelect && y("");
245
- }, V = (b, S) => {
246
- if (b.stopPropagation(), l)
244
+ console.log("Selected value(s) for field", e.name, ":", S), n(e.name, S), e.clearSearchOnSelect && y("");
245
+ }, V = (g, S) => {
246
+ if (g.stopPropagation(), l)
247
247
  n(e.name, null);
248
248
  else {
249
249
  const N = Array.isArray(D) ? D : [];
@@ -263,10 +263,10 @@ function al({
263
263
  ${a ? "bg-gray-100 opacity-60 cursor-not-allowed" : ""}
264
264
  `,
265
265
  children: [
266
- P.length > 0 ? P.map((b) => /* @__PURE__ */ M("span", { className: "inline-flex items-center px-2 py-1 bg-blue-50 text-blue-700 text-sm rounded-md border border-blue-100", children: [
267
- b.label,
268
- !a && /* @__PURE__ */ u("button", { type: "button", onClick: (S) => V(S, b.value), className: "ml-1 p-0.5 hover:bg-blue-200 rounded-full", children: /* @__PURE__ */ u(il, { className: "w-3 h-3" }) })
269
- ] }, b.value)) : /* @__PURE__ */ u("span", { className: "text-gray-400 text-sm", children: e.placeholder || "Select..." }),
266
+ P.length > 0 ? P.map((g) => /* @__PURE__ */ M("span", { className: "inline-flex items-center px-2 py-1 bg-blue-50 text-blue-700 text-sm rounded-md border border-blue-100", children: [
267
+ g.label,
268
+ !a && /* @__PURE__ */ u("button", { type: "button", onClick: (S) => V(S, g.value), className: "ml-1 p-0.5 hover:bg-blue-200 rounded-full", children: /* @__PURE__ */ u(il, { className: "w-3 h-3" }) })
269
+ ] }, g.value)) : /* @__PURE__ */ u("span", { className: "text-gray-400 text-sm", children: e.placeholder || "Select..." }),
270
270
  /* @__PURE__ */ M("div", { className: "ml-auto flex items-center", children: [
271
271
  p && /* @__PURE__ */ u(nl, { className: "w-4 h-4 mr-2 animate-spin text-gray-400" }),
272
272
  /* @__PURE__ */ u(is, { className: `w-4 h-4 text-gray-400 transition-transform ${m ? "rotate-180" : ""}` })
@@ -275,8 +275,8 @@ function al({
275
275
  }
276
276
  ),
277
277
  m && !a && /* @__PURE__ */ M("div", { className: "absolute z-50 w-full mt-1 bg-white border border-gray-200 rounded-lg shadow-xl overflow-hidden", children: [
278
- /* @__PURE__ */ u("div", { className: "p-2 border-b border-gray-100 bg-gray-50", children: /* @__PURE__ */ M("div", { className: "relative", children: [
279
- /* @__PURE__ */ u(ol, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" }),
278
+ /* @__PURE__ */ u("div", { className: "p-2 border-b border-gray-100 bg-gray-50", children: /* @__PURE__ */ M("div", { className: "relative flex items-center", children: [
279
+ /* @__PURE__ */ u(ol, { className: "absolute left-3 w-4 h-4 text-gray-400" }),
280
280
  /* @__PURE__ */ u(
281
281
  "input",
282
282
  {
@@ -289,19 +289,19 @@ function al({
289
289
  }
290
290
  )
291
291
  ] }) }),
292
- /* @__PURE__ */ u("div", { className: "max-h-60 overflow-y-auto p-1", children: c.length > 0 ? c.map((b) => {
293
- const S = P.some((N) => N.value === b.value);
292
+ /* @__PURE__ */ u("div", { className: "max-h-60 overflow-y-auto p-1", children: c.length > 0 ? c.map((g) => {
293
+ const S = P.some((N) => N.value === g.value);
294
294
  return /* @__PURE__ */ M(
295
295
  "div",
296
296
  {
297
- onClick: () => U(b),
297
+ onClick: () => U(g),
298
298
  className: `px-3 py-2 text-sm rounded cursor-pointer flex items-center justify-between ${S ? "bg-blue-50 text-blue-700" : "hover:bg-gray-100 text-gray-700"}`,
299
299
  children: [
300
- /* @__PURE__ */ u("span", { children: b.label }),
300
+ /* @__PURE__ */ u("span", { children: g.label }),
301
301
  S && /* @__PURE__ */ u(Ua, { className: "w-4 h-4" })
302
302
  ]
303
303
  },
304
- b.value
304
+ g.value
305
305
  );
306
306
  }) : /* @__PURE__ */ u("div", { className: "py-4 text-center text-sm text-gray-500", children: p ? "Loading..." : "No results found" }) })
307
307
  ] })
@@ -322,12 +322,12 @@ function ut(e, t = []) {
322
322
  const a = d.createContext(i), l = n.length;
323
323
  n = [...n, i];
324
324
  const c = (p) => {
325
- const { scope: g, children: m, ...w } = p, h = g?.[e]?.[l] || a, y = d.useMemo(() => w, Object.values(w));
325
+ const { scope: b, children: m, ...w } = p, h = b?.[e]?.[l] || a, y = d.useMemo(() => w, Object.values(w));
326
326
  return /* @__PURE__ */ u(h.Provider, { value: y, children: m });
327
327
  };
328
328
  c.displayName = s + "Provider";
329
- function f(p, g) {
330
- const m = g?.[e]?.[l] || a, w = d.useContext(m);
329
+ function f(p, b) {
330
+ const m = b?.[e]?.[l] || a, w = d.useContext(m);
331
331
  if (w) return w;
332
332
  if (i !== void 0) return i;
333
333
  throw new Error(`\`${p}\` must be used within \`${s}\``);
@@ -447,10 +447,10 @@ function as(e) {
447
447
  }
448
448
  );
449
449
  c.displayName = a;
450
- const f = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ we(f), m = Pe.forwardRef(
450
+ const f = e + "CollectionItemSlot", p = "data-radix-collection-item", b = /* @__PURE__ */ we(f), m = Pe.forwardRef(
451
451
  (h, y) => {
452
452
  const { scope: C, children: E, ...A } = h, x = Pe.useRef(null), T = se(y, x), D = s(f, C);
453
- return Pe.useEffect(() => (D.itemMap.set(x, { ref: x, ...A }), () => void D.itemMap.delete(x))), /* @__PURE__ */ u(g, { [p]: "", ref: T, children: E });
453
+ return Pe.useEffect(() => (D.itemMap.set(x, { ref: x, ...A }), () => void D.itemMap.delete(x))), /* @__PURE__ */ u(b, { [p]: "", ref: T, children: E });
454
454
  }
455
455
  );
456
456
  m.displayName = f;
@@ -533,21 +533,21 @@ var vl = "DismissableLayer", hr = "dismissableLayer.update", yl = "dismissableLa
533
533
  onInteractOutside: i,
534
534
  onDismiss: a,
535
535
  ...l
536
- } = e, c = d.useContext(cs), [f, p] = d.useState(null), g = f?.ownerDocument ?? globalThis?.document, [, m] = d.useState({}), w = se(t, (O) => p(O)), h = Array.from(c.layers), [y] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), C = h.indexOf(y), E = f ? h.indexOf(f) : -1, A = c.layersWithOutsidePointerEventsDisabled.size > 0, x = E >= C, T = Cl((O) => {
536
+ } = e, c = d.useContext(cs), [f, p] = d.useState(null), b = f?.ownerDocument ?? globalThis?.document, [, m] = d.useState({}), w = se(t, (O) => p(O)), h = Array.from(c.layers), [y] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), C = h.indexOf(y), E = f ? h.indexOf(f) : -1, A = c.layersWithOutsidePointerEventsDisabled.size > 0, x = E >= C, T = Cl((O) => {
537
537
  const P = O.target, W = [...c.branches].some((H) => H.contains(P));
538
538
  !x || W || (o?.(O), i?.(O), O.defaultPrevented || a?.());
539
- }, g), D = El((O) => {
539
+ }, b), D = El((O) => {
540
540
  const P = O.target;
541
541
  [...c.branches].some((H) => H.contains(P)) || (s?.(O), i?.(O), O.defaultPrevented || a?.());
542
- }, g);
542
+ }, b);
543
543
  return bl((O) => {
544
544
  E === c.layers.size - 1 && (r?.(O), !O.defaultPrevented && a && (O.preventDefault(), a()));
545
- }, g), d.useEffect(() => {
545
+ }, b), d.useEffect(() => {
546
546
  if (f)
547
- return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (bo = g.body.style.pointerEvents, g.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), vo(), () => {
548
- n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (g.body.style.pointerEvents = bo);
547
+ return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (bo = b.body.style.pointerEvents, b.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), vo(), () => {
548
+ n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (b.body.style.pointerEvents = bo);
549
549
  };
550
- }, [f, g, n, c]), d.useEffect(() => () => {
550
+ }, [f, b, n, c]), d.useEffect(() => () => {
551
551
  f && (c.layers.delete(f), c.layersWithOutsidePointerEventsDisabled.delete(f), vo());
552
552
  }, [f, c]), d.useEffect(() => {
553
553
  const O = () => m({});
@@ -679,7 +679,7 @@ var Al = [
679
679
  onMountAutoFocus: o,
680
680
  onUnmountAutoFocus: s,
681
681
  ...i
682
- } = e, [a, l] = d.useState(null), c = Ze(o), f = Ze(s), p = d.useRef(null), g = se(t, (h) => l(h)), m = d.useRef({
682
+ } = e, [a, l] = d.useState(null), c = Ze(o), f = Ze(s), p = d.useRef(null), b = se(t, (h) => l(h)), m = d.useRef({
683
683
  paused: !1,
684
684
  pause() {
685
685
  this.paused = !0;
@@ -736,7 +736,7 @@ var Al = [
736
736
  },
737
737
  [n, r, m.paused]
738
738
  );
739
- return /* @__PURE__ */ u(Rl.div, { tabIndex: -1, ...i, ref: g, onKeyDown: w });
739
+ return /* @__PURE__ */ u(Rl.div, { tabIndex: -1, ...i, ref: b, onKeyDown: w });
740
740
  });
741
741
  Mr.displayName = Nl;
742
742
  function Tl(e, { select: t = !1 } = {}) {
@@ -920,7 +920,7 @@ function Ro(e, t, n) {
920
920
  reference: r,
921
921
  floating: o
922
922
  } = e;
923
- const s = $e(t), i = Fr(t), a = Lr(i), l = Ye(t), c = s === "y", f = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, g = r[a] / 2 - o[a] / 2;
923
+ const s = $e(t), i = Fr(t), a = Lr(i), l = Ye(t), c = s === "y", f = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, b = r[a] / 2 - o[a] / 2;
924
924
  let m;
925
925
  switch (l) {
926
926
  case "top":
@@ -955,10 +955,10 @@ function Ro(e, t, n) {
955
955
  }
956
956
  switch (Et(t)) {
957
957
  case "start":
958
- m[i] -= g * (n && c ? -1 : 1);
958
+ m[i] -= b * (n && c ? -1 : 1);
959
959
  break;
960
960
  case "end":
961
- m[i] += g * (n && c ? -1 : 1);
961
+ m[i] += b * (n && c ? -1 : 1);
962
962
  break;
963
963
  }
964
964
  return m;
@@ -977,7 +977,7 @@ const Yl = async (e, t, n) => {
977
977
  }), {
978
978
  x: f,
979
979
  y: p
980
- } = Ro(c, r, l), g = r, m = {}, w = 0;
980
+ } = Ro(c, r, l), b = r, m = {}, w = 0;
981
981
  for (let h = 0; h < a.length; h++) {
982
982
  const {
983
983
  name: y,
@@ -991,7 +991,7 @@ const Yl = async (e, t, n) => {
991
991
  x: f,
992
992
  y: p,
993
993
  initialPlacement: r,
994
- placement: g,
994
+ placement: b,
995
995
  strategy: o,
996
996
  middlewareData: m,
997
997
  rects: c,
@@ -1007,19 +1007,19 @@ const Yl = async (e, t, n) => {
1007
1007
  ...m[y],
1008
1008
  ...x
1009
1009
  }
1010
- }, T && w <= 50 && (w++, typeof T == "object" && (T.placement && (g = T.placement), T.rects && (c = T.rects === !0 ? await i.getElementRects({
1010
+ }, T && w <= 50 && (w++, typeof T == "object" && (T.placement && (b = T.placement), T.rects && (c = T.rects === !0 ? await i.getElementRects({
1011
1011
  reference: e,
1012
1012
  floating: t,
1013
1013
  strategy: o
1014
1014
  }) : T.rects), {
1015
1015
  x: f,
1016
1016
  y: p
1017
- } = Ro(c, g, l)), h = -1);
1017
+ } = Ro(c, b, l)), h = -1);
1018
1018
  }
1019
1019
  return {
1020
1020
  x: f,
1021
1021
  y: p,
1022
- placement: g,
1022
+ placement: b,
1023
1023
  strategy: o,
1024
1024
  middlewareData: m
1025
1025
  };
@@ -1038,9 +1038,9 @@ async function Bt(e, t) {
1038
1038
  boundary: c = "clippingAncestors",
1039
1039
  rootBoundary: f = "viewport",
1040
1040
  elementContext: p = "floating",
1041
- altBoundary: g = !1,
1041
+ altBoundary: b = !1,
1042
1042
  padding: m = 0
1043
- } = Ge(t, e), w = ps(m), y = a[g ? p === "floating" ? "reference" : "floating" : p], C = bn(await s.getClippingRect({
1043
+ } = Ge(t, e), w = ps(m), y = a[b ? p === "floating" ? "reference" : "floating" : p], C = bn(await s.getClippingRect({
1044
1044
  element: (n = await (s.isElement == null ? void 0 : s.isElement(y))) == null || n ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
1045
1045
  boundary: c,
1046
1046
  rootBoundary: f,
@@ -1087,15 +1087,15 @@ const Kl = (e) => ({
1087
1087
  } = Ge(e, t) || {};
1088
1088
  if (c == null)
1089
1089
  return {};
1090
- const p = ps(f), g = {
1090
+ const p = ps(f), b = {
1091
1091
  x: n,
1092
1092
  y: r
1093
- }, m = Fr(o), w = Lr(m), h = await i.getDimensions(c), y = m === "y", C = y ? "top" : "left", E = y ? "bottom" : "right", A = y ? "clientHeight" : "clientWidth", x = s.reference[w] + s.reference[m] - g[m] - s.floating[w], T = g[m] - s.reference[m], D = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
1093
+ }, m = Fr(o), w = Lr(m), h = await i.getDimensions(c), y = m === "y", C = y ? "top" : "left", E = y ? "bottom" : "right", A = y ? "clientHeight" : "clientWidth", x = s.reference[w] + s.reference[m] - b[m] - s.floating[w], T = b[m] - s.reference[m], D = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
1094
1094
  let O = D ? D[A] : 0;
1095
1095
  (!O || !await (i.isElement == null ? void 0 : i.isElement(D))) && (O = a.floating[A] || s.floating[w]);
1096
- const P = x / 2 - T / 2, W = O / 2 - h[w] / 2 - 1, H = Qe(p[C], W), U = Qe(p[E], W), V = H, b = O - h[w] - U, S = O / 2 - h[w] / 2 + P, N = gr(V, S, b), k = !l.arrow && Et(o) != null && S !== N && s.reference[w] / 2 - (S < V ? H : U) - h[w] / 2 < 0, _ = k ? S < V ? S - V : S - b : 0;
1096
+ const P = x / 2 - T / 2, W = O / 2 - h[w] / 2 - 1, H = Qe(p[C], W), U = Qe(p[E], W), V = H, g = O - h[w] - U, S = O / 2 - h[w] / 2 + P, N = gr(V, S, g), k = !l.arrow && Et(o) != null && S !== N && s.reference[w] / 2 - (S < V ? H : U) - h[w] / 2 < 0, _ = k ? S < V ? S - V : S - g : 0;
1097
1097
  return {
1098
- [m]: g[m] + _,
1098
+ [m]: b[m] + _,
1099
1099
  data: {
1100
1100
  [m]: N,
1101
1101
  centerOffset: S - N - _,
@@ -1122,7 +1122,7 @@ const Kl = (e) => ({
1122
1122
  } = t, {
1123
1123
  mainAxis: f = !0,
1124
1124
  crossAxis: p = !0,
1125
- fallbackPlacements: g,
1125
+ fallbackPlacements: b,
1126
1126
  fallbackStrategy: m = "bestFit",
1127
1127
  fallbackAxisSideDirection: w = "none",
1128
1128
  flipAlignment: h = !0,
@@ -1130,8 +1130,8 @@ const Kl = (e) => ({
1130
1130
  } = Ge(e, t);
1131
1131
  if ((n = s.arrow) != null && n.alignmentOffset)
1132
1132
  return {};
1133
- const C = Ye(o), E = $e(a), A = Ye(a) === a, x = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), T = g || (A || !h ? [gn(a)] : Ul(a)), D = w !== "none";
1134
- !g && D && T.push(...Vl(a, h, w, x));
1133
+ const C = Ye(o), E = $e(a), A = Ye(a) === a, x = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), T = b || (A || !h ? [gn(a)] : Ul(a)), D = w !== "none";
1134
+ !b && D && T.push(...Vl(a, h, w, x));
1135
1135
  const O = [a, ...T], P = await Bt(t, y), W = [];
1136
1136
  let H = ((r = s.flip) == null ? void 0 : r.overflows) || [];
1137
1137
  if (f && W.push(P[C]), p) {
@@ -1160,8 +1160,8 @@ const Kl = (e) => ({
1160
1160
  if (!k)
1161
1161
  switch (m) {
1162
1162
  case "bestFit": {
1163
- var b;
1164
- const _ = (b = H.filter((R) => {
1163
+ var g;
1164
+ const _ = (g = H.filter((R) => {
1165
1165
  if (D) {
1166
1166
  const K = $e(R.placement);
1167
1167
  return K === E || // Create a bias to the `y` side axis due to horizontal
@@ -1169,7 +1169,7 @@ const Kl = (e) => ({
1169
1169
  K === "y";
1170
1170
  }
1171
1171
  return !0;
1172
- }).map((R) => [R.placement, R.overflows.filter((K) => K > 0).reduce((K, te) => K + te, 0)]).sort((R, K) => R[1] - K[1])[0]) == null ? void 0 : b[0];
1172
+ }).map((R) => [R.placement, R.overflows.filter((K) => K > 0).reduce((K, te) => K + te, 0)]).sort((R, K) => R[1] - K[1])[0]) == null ? void 0 : g[0];
1173
1173
  _ && (k = _);
1174
1174
  break;
1175
1175
  }
@@ -1248,7 +1248,7 @@ async function Zl(e, t) {
1248
1248
  elements: o
1249
1249
  } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Ye(n), a = Et(n), l = $e(n) === "y", c = ms.has(i) ? -1 : 1, f = s && l ? -1 : 1, p = Ge(t, e);
1250
1250
  let {
1251
- mainAxis: g,
1251
+ mainAxis: b,
1252
1252
  crossAxis: m,
1253
1253
  alignmentAxis: w
1254
1254
  } = typeof p == "number" ? {
@@ -1262,9 +1262,9 @@ async function Zl(e, t) {
1262
1262
  };
1263
1263
  return a && typeof w == "number" && (m = a === "end" ? w * -1 : w), l ? {
1264
1264
  x: m * f,
1265
- y: g * c
1265
+ y: b * c
1266
1266
  } : {
1267
- x: g * c,
1267
+ x: b * c,
1268
1268
  y: m * f
1269
1269
  };
1270
1270
  }
@@ -1318,10 +1318,10 @@ const Ql = function(e) {
1318
1318
  } = Ge(e, t), c = {
1319
1319
  x: n,
1320
1320
  y: r
1321
- }, f = await Bt(t, l), p = $e(Ye(o)), g = Dr(p);
1322
- let m = c[g], w = c[p];
1321
+ }, f = await Bt(t, l), p = $e(Ye(o)), b = Dr(p);
1322
+ let m = c[b], w = c[p];
1323
1323
  if (s) {
1324
- const y = g === "y" ? "top" : "left", C = g === "y" ? "bottom" : "right", E = m + f[y], A = m - f[C];
1324
+ const y = b === "y" ? "top" : "left", C = b === "y" ? "bottom" : "right", E = m + f[y], A = m - f[C];
1325
1325
  m = gr(E, m, A);
1326
1326
  }
1327
1327
  if (i) {
@@ -1330,7 +1330,7 @@ const Ql = function(e) {
1330
1330
  }
1331
1331
  const h = a.fn({
1332
1332
  ...t,
1333
- [g]: m,
1333
+ [b]: m,
1334
1334
  [p]: w
1335
1335
  });
1336
1336
  return {
@@ -1339,7 +1339,7 @@ const Ql = function(e) {
1339
1339
  x: h.x - n,
1340
1340
  y: h.y - r,
1341
1341
  enabled: {
1342
- [g]: s,
1342
+ [b]: s,
1343
1343
  [p]: i
1344
1344
  }
1345
1345
  }
@@ -1363,8 +1363,8 @@ const Ql = function(e) {
1363
1363
  } = Ge(e, t), f = {
1364
1364
  x: n,
1365
1365
  y: r
1366
- }, p = $e(o), g = Dr(p);
1367
- let m = f[g], w = f[p];
1366
+ }, p = $e(o), b = Dr(p);
1367
+ let m = f[b], w = f[p];
1368
1368
  const h = Ge(a, t), y = typeof h == "number" ? {
1369
1369
  mainAxis: h,
1370
1370
  crossAxis: 0
@@ -1374,16 +1374,16 @@ const Ql = function(e) {
1374
1374
  ...h
1375
1375
  };
1376
1376
  if (l) {
1377
- const A = g === "y" ? "height" : "width", x = s.reference[g] - s.floating[A] + y.mainAxis, T = s.reference[g] + s.reference[A] - y.mainAxis;
1377
+ const A = b === "y" ? "height" : "width", x = s.reference[b] - s.floating[A] + y.mainAxis, T = s.reference[b] + s.reference[A] - y.mainAxis;
1378
1378
  m < x ? m = x : m > T && (m = T);
1379
1379
  }
1380
1380
  if (c) {
1381
1381
  var C, E;
1382
- const A = g === "y" ? "width" : "height", x = ms.has(Ye(o)), T = s.reference[p] - s.floating[A] + (x && ((C = i.offset) == null ? void 0 : C[p]) || 0) + (x ? 0 : y.crossAxis), D = s.reference[p] + s.reference[A] + (x ? 0 : ((E = i.offset) == null ? void 0 : E[p]) || 0) - (x ? y.crossAxis : 0);
1382
+ const A = b === "y" ? "width" : "height", x = ms.has(Ye(o)), T = s.reference[p] - s.floating[A] + (x && ((C = i.offset) == null ? void 0 : C[p]) || 0) + (x ? 0 : y.crossAxis), D = s.reference[p] + s.reference[A] + (x ? 0 : ((E = i.offset) == null ? void 0 : E[p]) || 0) - (x ? y.crossAxis : 0);
1383
1383
  w < T ? w = T : w > D && (w = D);
1384
1384
  }
1385
1385
  return {
1386
- [g]: m,
1386
+ [b]: m,
1387
1387
  [p]: w
1388
1388
  };
1389
1389
  }
@@ -1403,17 +1403,17 @@ const Ql = function(e) {
1403
1403
  apply: l = () => {
1404
1404
  },
1405
1405
  ...c
1406
- } = Ge(e, t), f = await Bt(t, c), p = Ye(o), g = Et(o), m = $e(o) === "y", {
1406
+ } = Ge(e, t), f = await Bt(t, c), p = Ye(o), b = Et(o), m = $e(o) === "y", {
1407
1407
  width: w,
1408
1408
  height: h
1409
1409
  } = s.floating;
1410
1410
  let y, C;
1411
- p === "top" || p === "bottom" ? (y = p, C = g === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (C = p, y = g === "end" ? "top" : "bottom");
1411
+ p === "top" || p === "bottom" ? (y = p, C = b === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (C = p, y = b === "end" ? "top" : "bottom");
1412
1412
  const E = h - f.top - f.bottom, A = w - f.left - f.right, x = Qe(h - f[y], E), T = Qe(w - f[C], A), D = !t.middlewareData.shift;
1413
1413
  let O = x, P = T;
1414
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (P = A), (r = t.middlewareData.shift) != null && r.enabled.y && (O = E), D && !g) {
1415
- const H = xe(f.left, 0), U = xe(f.right, 0), V = xe(f.top, 0), b = xe(f.bottom, 0);
1416
- m ? P = w - 2 * (H !== 0 || U !== 0 ? H + U : xe(f.left, f.right)) : O = h - 2 * (V !== 0 || b !== 0 ? V + b : xe(f.top, f.bottom));
1414
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (P = A), (r = t.middlewareData.shift) != null && r.enabled.y && (O = E), D && !b) {
1415
+ const H = xe(f.left, 0), U = xe(f.right, 0), V = xe(f.top, 0), g = xe(f.bottom, 0);
1416
+ m ? P = w - 2 * (H !== 0 || U !== 0 ? H + U : xe(f.left, f.right)) : O = h - 2 * (V !== 0 || g !== 0 ? V + g : xe(f.top, f.bottom));
1417
1417
  }
1418
1418
  await l({
1419
1419
  ...t,
@@ -1590,8 +1590,8 @@ function at(e, t, n, r) {
1590
1590
  const a = fc(s, n, r) ? vs(s) : ze(0);
1591
1591
  let l = (o.left + a.x) / i.x, c = (o.top + a.y) / i.y, f = o.width / i.x, p = o.height / i.y;
1592
1592
  if (s) {
1593
- const g = Se(s), m = r && _e(r) ? Se(r) : r;
1594
- let w = g, h = vr(w);
1593
+ const b = Se(s), m = r && _e(r) ? Se(r) : r;
1594
+ let w = b, h = vr(w);
1595
1595
  for (; h && r && m !== w; ) {
1596
1596
  const y = wt(h), C = h.getBoundingClientRect(), E = Oe(h), A = C.left + (h.clientLeft + parseFloat(E.paddingLeft)) * y.x, x = C.top + (h.clientTop + parseFloat(E.paddingTop)) * y.y;
1597
1597
  l *= y.x, c *= y.y, f *= y.x, p *= y.y, l += A, c += x, w = Se(h), h = vr(w);
@@ -1634,12 +1634,12 @@ function pc(e) {
1634
1634
  const m = at(r);
1635
1635
  c = wt(r), f.x = m.x + r.clientLeft, f.y = m.y + r.clientTop;
1636
1636
  }
1637
- const g = i && !p && !s ? ys(i, l) : ze(0);
1637
+ const b = i && !p && !s ? ys(i, l) : ze(0);
1638
1638
  return {
1639
1639
  width: n.width * c.x,
1640
1640
  height: n.height * c.y,
1641
- x: n.x * c.x - l.scrollLeft * c.x + f.x + g.x,
1642
- y: n.y * c.y - l.scrollTop * c.y + f.y + g.y
1641
+ x: n.x * c.x - l.scrollLeft * c.x + f.x + b.x,
1642
+ y: n.y * c.y - l.scrollTop * c.y + f.y + b.y
1643
1643
  };
1644
1644
  }
1645
1645
  function mc(e) {
@@ -1667,7 +1667,7 @@ function gc(e, t) {
1667
1667
  }
1668
1668
  const c = Rn(r);
1669
1669
  if (c <= 0) {
1670
- const f = r.ownerDocument, p = f.body, g = getComputedStyle(p), m = f.compatMode === "CSS1Compat" && parseFloat(g.marginLeft) + parseFloat(g.marginRight) || 0, w = Math.abs(r.clientWidth - p.clientWidth - m);
1670
+ const f = r.ownerDocument, p = f.body, b = getComputedStyle(p), m = f.compatMode === "CSS1Compat" && parseFloat(b.marginLeft) + parseFloat(b.marginRight) || 0, w = Math.abs(r.clientWidth - p.clientWidth - m);
1671
1671
  w <= Po && (s -= w);
1672
1672
  } else c <= Po && (s += c);
1673
1673
  return {
@@ -1767,10 +1767,10 @@ function Sc(e, t, n) {
1767
1767
  l.x = m.x + t.clientLeft, l.y = m.y + t.clientTop;
1768
1768
  } else o && c();
1769
1769
  s && !r && o && c();
1770
- const f = o && !r && !s ? ys(o, a) : ze(0), p = i.left + a.scrollLeft - l.x - f.x, g = i.top + a.scrollTop - l.y - f.y;
1770
+ const f = o && !r && !s ? ys(o, a) : ze(0), p = i.left + a.scrollLeft - l.x - f.x, b = i.top + a.scrollTop - l.y - f.y;
1771
1771
  return {
1772
1772
  x: p,
1773
- y: g,
1773
+ y: b,
1774
1774
  width: i.width,
1775
1775
  height: i.height
1776
1776
  };
@@ -1846,12 +1846,12 @@ function Rc(e, t) {
1846
1846
  const c = e.getBoundingClientRect(), {
1847
1847
  left: f,
1848
1848
  top: p,
1849
- width: g,
1849
+ width: b,
1850
1850
  height: m
1851
1851
  } = c;
1852
- if (a || t(), !g || !m)
1852
+ if (a || t(), !b || !m)
1853
1853
  return;
1854
- const w = Jt(p), h = Jt(o.clientWidth - (f + g)), y = Jt(o.clientHeight - (p + m)), C = Jt(f), A = {
1854
+ const w = Jt(p), h = Jt(o.clientWidth - (f + b)), y = Jt(o.clientHeight - (p + m)), C = Jt(f), A = {
1855
1855
  rootMargin: -w + "px " + -h + "px " + -y + "px " + -C + "px",
1856
1856
  threshold: xe(0, Qe(1, l)) || 1
1857
1857
  };
@@ -1895,10 +1895,10 @@ function Nc(e, t, n, r) {
1895
1895
  }), s && C.addEventListener("resize", n);
1896
1896
  });
1897
1897
  const p = c && a ? Rc(c, n) : null;
1898
- let g = -1, m = null;
1898
+ let b = -1, m = null;
1899
1899
  i && (m = new ResizeObserver((C) => {
1900
1900
  let [E] = C;
1901
- E && E.target === c && m && (m.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
1901
+ E && E.target === c && m && (m.unobserve(t), cancelAnimationFrame(b), b = requestAnimationFrame(() => {
1902
1902
  var A;
1903
1903
  (A = m) == null || A.observe(t);
1904
1904
  })), n();
@@ -1995,19 +1995,19 @@ function Fc(e) {
1995
1995
  placement: t,
1996
1996
  middlewareData: {},
1997
1997
  isPositioned: !1
1998
- }), [g, m] = d.useState(r);
1999
- vn(g, r) || m(r);
1998
+ }), [b, m] = d.useState(r);
1999
+ vn(b, r) || m(r);
2000
2000
  const [w, h] = d.useState(null), [y, C] = d.useState(null), E = d.useCallback((R) => {
2001
2001
  R !== D.current && (D.current = R, h(R));
2002
2002
  }, []), A = d.useCallback((R) => {
2003
2003
  R !== O.current && (O.current = R, C(R));
2004
- }, []), x = s || w, T = i || y, D = d.useRef(null), O = d.useRef(null), P = d.useRef(f), W = l != null, H = Jn(l), U = Jn(o), V = Jn(c), b = d.useCallback(() => {
2004
+ }, []), x = s || w, T = i || y, D = d.useRef(null), O = d.useRef(null), P = d.useRef(f), W = l != null, H = Jn(l), U = Jn(o), V = Jn(c), g = d.useCallback(() => {
2005
2005
  if (!D.current || !O.current)
2006
2006
  return;
2007
2007
  const R = {
2008
2008
  placement: t,
2009
2009
  strategy: n,
2010
- middleware: g
2010
+ middleware: b
2011
2011
  };
2012
2012
  U.current && (R.platform = U.current), Mc(D.current, O.current, R).then((K) => {
2013
2013
  const te = {
@@ -2022,7 +2022,7 @@ function Fc(e) {
2022
2022
  p(te);
2023
2023
  }));
2024
2024
  });
2025
- }, [g, t, n, U, V]);
2025
+ }, [b, t, n, U, V]);
2026
2026
  un(() => {
2027
2027
  c === !1 && P.current.isPositioned && (P.current.isPositioned = !1, p((R) => ({
2028
2028
  ...R,
@@ -2035,10 +2035,10 @@ function Fc(e) {
2035
2035
  }), []), un(() => {
2036
2036
  if (x && (D.current = x), T && (O.current = T), x && T) {
2037
2037
  if (H.current)
2038
- return H.current(x, T, b);
2039
- b();
2038
+ return H.current(x, T, g);
2039
+ g();
2040
2040
  }
2041
- }, [x, T, b, H, W]);
2041
+ }, [x, T, g, H, W]);
2042
2042
  const N = d.useMemo(() => ({
2043
2043
  reference: D,
2044
2044
  floating: O,
@@ -2070,11 +2070,11 @@ function Fc(e) {
2070
2070
  }, [n, a, k.floating, f.x, f.y]);
2071
2071
  return d.useMemo(() => ({
2072
2072
  ...f,
2073
- update: b,
2073
+ update: g,
2074
2074
  refs: N,
2075
2075
  elements: k,
2076
2076
  floatingStyles: _
2077
- }), [f, b, N, k, _]);
2077
+ }), [f, g, N, k, _]);
2078
2078
  }
2079
2079
  const $c = (e) => {
2080
2080
  function t(n) {
@@ -2234,11 +2234,11 @@ var Wr = "PopperContent", [Qc, Jc] = Ns(Wr), Os = d.forwardRef(
2234
2234
  collisionBoundary: c = [],
2235
2235
  collisionPadding: f = 0,
2236
2236
  sticky: p = "partial",
2237
- hideWhenDetached: g = !1,
2237
+ hideWhenDetached: b = !1,
2238
2238
  updatePositionStrategy: m = "optimized",
2239
2239
  onPlaced: w,
2240
2240
  ...h
2241
- } = e, y = Ts(Wr, n), [C, E] = d.useState(null), A = se(t, (L) => E(L)), [x, T] = d.useState(null), D = Rs(x), O = D?.width ?? 0, P = D?.height ?? 0, W = r + (s !== "center" ? "-" + s : ""), H = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, U = Array.isArray(c) ? c : [c], V = U.length > 0, b = {
2241
+ } = e, y = Ts(Wr, n), [C, E] = d.useState(null), A = se(t, (L) => E(L)), [x, T] = d.useState(null), D = Rs(x), O = D?.width ?? 0, P = D?.height ?? 0, W = r + (s !== "center" ? "-" + s : ""), H = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, U = Array.isArray(c) ? c : [c], V = U.length > 0, g = {
2242
2242
  padding: H,
2243
2243
  boundary: U.filter(tu),
2244
2244
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -2259,11 +2259,11 @@ var Wr = "PopperContent", [Qc, Jc] = Ns(Wr), Os = d.forwardRef(
2259
2259
  mainAxis: !0,
2260
2260
  crossAxis: !1,
2261
2261
  limiter: p === "partial" ? Uc() : void 0,
2262
- ...b
2262
+ ...g
2263
2263
  }),
2264
- l && Wc({ ...b }),
2264
+ l && Wc({ ...g }),
2265
2265
  Hc({
2266
- ...b,
2266
+ ...g,
2267
2267
  apply: ({ elements: L, rects: J, availableWidth: ie, availableHeight: q }) => {
2268
2268
  const { width: ee, height: ne } = J.reference, le = L.floating.style;
2269
2269
  le.setProperty("--radix-popper-available-width", `${ie}px`), le.setProperty("--radix-popper-available-height", `${q}px`), le.setProperty("--radix-popper-anchor-width", `${ee}px`), le.setProperty("--radix-popper-anchor-height", `${ne}px`);
@@ -2271,7 +2271,7 @@ var Wr = "PopperContent", [Qc, Jc] = Ns(Wr), Os = d.forwardRef(
2271
2271
  }),
2272
2272
  x && Vc({ element: x, padding: a }),
2273
2273
  nu({ arrowWidth: O, arrowHeight: P }),
2274
- g && jc({ strategy: "referenceHidden", ...b })
2274
+ b && jc({ strategy: "referenceHidden", ...g })
2275
2275
  ]
2276
2276
  }), [K, te] = Ds(k), j = Ze(w);
2277
2277
  he(() => {
@@ -2393,9 +2393,9 @@ var nu = (e) => ({
2393
2393
  name: "transformOrigin",
2394
2394
  options: e,
2395
2395
  fn(t) {
2396
- const { placement: n, rects: r, middlewareData: o } = t, i = o.arrow?.centerOffset !== 0, a = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [c, f] = Ds(n), p = { start: "0%", center: "50%", end: "100%" }[f], g = (o.arrow?.x ?? 0) + a / 2, m = (o.arrow?.y ?? 0) + l / 2;
2396
+ const { placement: n, rects: r, middlewareData: o } = t, i = o.arrow?.centerOffset !== 0, a = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [c, f] = Ds(n), p = { start: "0%", center: "50%", end: "100%" }[f], b = (o.arrow?.x ?? 0) + a / 2, m = (o.arrow?.y ?? 0) + l / 2;
2397
2397
  let w = "", h = "";
2398
- return c === "bottom" ? (w = i ? p : `${g}px`, h = `${-l}px`) : c === "top" ? (w = i ? p : `${g}px`, h = `${r.floating.height + l}px`) : c === "right" ? (w = `${-l}px`, h = i ? p : `${m}px`) : c === "left" && (w = `${r.floating.width + l}px`, h = i ? p : `${m}px`), { data: { x: w, y: h } };
2398
+ return c === "bottom" ? (w = i ? p : `${b}px`, h = `${-l}px`) : c === "top" ? (w = i ? p : `${b}px`, h = `${r.floating.height + l}px`) : c === "right" ? (w = `${-l}px`, h = i ? p : `${m}px`) : c === "left" && (w = `${r.floating.width + l}px`, h = i ? p : `${m}px`), { data: { x: w, y: h } };
2399
2399
  }
2400
2400
  });
2401
2401
  function Ds(e) {
@@ -2579,22 +2579,22 @@ var mu = function(e) {
2579
2579
  };
2580
2580
  o.forEach(c);
2581
2581
  var f = function(p) {
2582
- !p || l.has(p) || Array.prototype.forEach.call(p.children, function(g) {
2583
- if (a.has(g))
2584
- f(g);
2582
+ !p || l.has(p) || Array.prototype.forEach.call(p.children, function(b) {
2583
+ if (a.has(b))
2584
+ f(b);
2585
2585
  else
2586
2586
  try {
2587
- var m = g.getAttribute(r), w = m !== null && m !== "false", h = (gt.get(g) || 0) + 1, y = (s.get(g) || 0) + 1;
2588
- gt.set(g, h), s.set(g, y), i.push(g), h === 1 && w && en.set(g, !0), y === 1 && g.setAttribute(n, "true"), w || g.setAttribute(r, "true");
2587
+ var m = b.getAttribute(r), w = m !== null && m !== "false", h = (gt.get(b) || 0) + 1, y = (s.get(b) || 0) + 1;
2588
+ gt.set(b, h), s.set(b, y), i.push(b), h === 1 && w && en.set(b, !0), y === 1 && b.setAttribute(n, "true"), w || b.setAttribute(r, "true");
2589
2589
  } catch (C) {
2590
- console.error("aria-hidden: cannot operate on ", g, C);
2590
+ console.error("aria-hidden: cannot operate on ", b, C);
2591
2591
  }
2592
2592
  });
2593
2593
  };
2594
2594
  return f(t), a.clear(), er++, function() {
2595
2595
  i.forEach(function(p) {
2596
- var g = gt.get(p) - 1, m = s.get(p) - 1;
2597
- gt.set(p, g), s.set(p, m), g || (en.has(p) || p.removeAttribute(r), en.delete(p)), m || p.removeAttribute(n);
2596
+ var b = gt.get(p) - 1, m = s.get(p) - 1;
2597
+ gt.set(p, b), s.set(p, m), b || (en.has(p) || p.removeAttribute(r), en.delete(p)), m || p.removeAttribute(n);
2598
2598
  }), er--, er || (gt = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), tn = {});
2599
2599
  };
2600
2600
  }, Ws = function(e, t, n) {
@@ -2752,7 +2752,7 @@ var Vs = Au(), nr = function() {
2752
2752
  onScrollCapture: nr,
2753
2753
  onWheelCapture: nr,
2754
2754
  onTouchMoveCapture: nr
2755
- }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, l = e.className, c = e.removeScrollBar, f = e.enabled, p = e.shards, g = e.sideCar, m = e.noRelative, w = e.noIsolation, h = e.inert, y = e.allowPinchZoom, C = e.as, E = C === void 0 ? "div" : C, A = e.gapMode, x = Hs(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), T = g, D = Su([n, t]), O = Fe(Fe({}, x), o);
2755
+ }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, l = e.className, c = e.removeScrollBar, f = e.enabled, p = e.shards, b = e.sideCar, m = e.noRelative, w = e.noIsolation, h = e.inert, y = e.allowPinchZoom, C = e.as, E = C === void 0 ? "div" : C, A = e.gapMode, x = Hs(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), T = b, D = Su([n, t]), O = Fe(Fe({}, x), o);
2756
2756
  return d.createElement(
2757
2757
  d.Fragment,
2758
2758
  null,
@@ -2955,12 +2955,12 @@ var bt = yr ? { passive: !1 } : !1, Bu = function(e) {
2955
2955
  }, Vu = function(e, t) {
2956
2956
  return e === "h" && t === "rtl" ? -1 : 1;
2957
2957
  }, Gu = function(e, t, n, r, o) {
2958
- var s = Vu(e, window.getComputedStyle(t).direction), i = s * r, a = n.target, l = t.contains(a), c = !1, f = i > 0, p = 0, g = 0;
2958
+ var s = Vu(e, window.getComputedStyle(t).direction), i = s * r, a = n.target, l = t.contains(a), c = !1, f = i > 0, p = 0, b = 0;
2959
2959
  do {
2960
2960
  if (!a)
2961
2961
  break;
2962
2962
  var m = Xs(e, a), w = m[0], h = m[1], y = m[2], C = h - y - s * w;
2963
- (w || C) && Ks(e, a) && (p += C, g += w);
2963
+ (w || C) && Ks(e, a) && (p += C, b += w);
2964
2964
  var E = a.parentNode;
2965
2965
  a = E && E.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? E.host : E;
2966
2966
  } while (
@@ -2968,7 +2968,7 @@ var bt = yr ? { passive: !1 } : !1, Bu = function(e) {
2968
2968
  !l && a !== document.body || // self content
2969
2969
  l && (t.contains(a) || t === a)
2970
2970
  );
2971
- return (f && Math.abs(p) < 1 || !f && Math.abs(g) < 1) && (c = !0), c;
2971
+ return (f && Math.abs(p) < 1 || !f && Math.abs(b) < 1) && (c = !0), c;
2972
2972
  }, rn = function(e) {
2973
2973
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
2974
2974
  }, $o = function(e) {
@@ -3043,14 +3043,14 @@ function qu(e) {
3043
3043
  n.current = rn(h), r.current = void 0;
3044
3044
  }, []), p = d.useCallback(function(h) {
3045
3045
  c(h.type, $o(h), h.target, a(h, e.lockRef.current));
3046
- }, []), g = d.useCallback(function(h) {
3046
+ }, []), b = d.useCallback(function(h) {
3047
3047
  c(h.type, rn(h), h.target, a(h, e.lockRef.current));
3048
3048
  }, []);
3049
3049
  d.useEffect(function() {
3050
3050
  return vt.push(s), e.setCallbacks({
3051
3051
  onScrollCapture: p,
3052
3052
  onWheelCapture: p,
3053
- onTouchMoveCapture: g
3053
+ onTouchMoveCapture: b
3054
3054
  }), document.addEventListener("wheel", l, bt), document.addEventListener("touchmove", l, bt), document.addEventListener("touchstart", f, bt), function() {
3055
3055
  vt = vt.filter(function(h) {
3056
3056
  return h !== s;
@@ -3091,7 +3091,7 @@ var Ju = [" ", "Enter", "ArrowUp", "ArrowDown"], ed = [" ", "Enter"], lt = "Sele
3091
3091
  dir: c,
3092
3092
  name: f,
3093
3093
  autoComplete: p,
3094
- disabled: g,
3094
+ disabled: b,
3095
3095
  required: m,
3096
3096
  form: w
3097
3097
  } = e, h = _n(t), [y, C] = d.useState(null), [E, A] = d.useState(null), [x, T] = d.useState(!1), D = Or(c), [O, P] = Wt({
@@ -3104,7 +3104,7 @@ var Ju = [" ", "Enter", "ArrowUp", "ArrowDown"], ed = [" ", "Enter"], lt = "Sele
3104
3104
  defaultProp: a,
3105
3105
  onChange: l,
3106
3106
  caller: lt
3107
- }), U = d.useRef(null), V = y ? w || !!y.closest("form") : !0, [b, S] = d.useState(/* @__PURE__ */ new Set()), N = Array.from(b).map((k) => k.props.value).join(";");
3107
+ }), U = d.useRef(null), V = y ? w || !!y.closest("form") : !0, [g, S] = d.useState(/* @__PURE__ */ new Set()), N = Array.from(g).map((k) => k.props.value).join(";");
3108
3108
  return /* @__PURE__ */ u(Ls, { ...h, children: /* @__PURE__ */ M(
3109
3109
  nd,
3110
3110
  {
@@ -3123,7 +3123,7 @@ var Ju = [" ", "Enter", "ArrowUp", "ArrowDown"], ed = [" ", "Enter"], lt = "Sele
3123
3123
  onOpenChange: P,
3124
3124
  dir: D,
3125
3125
  triggerPointerDownPosRef: U,
3126
- disabled: g,
3126
+ disabled: b,
3127
3127
  children: [
3128
3128
  /* @__PURE__ */ u(kn.Provider, { scope: t, children: /* @__PURE__ */ u(
3129
3129
  rd,
@@ -3151,11 +3151,11 @@ var Ju = [" ", "Enter", "ArrowUp", "ArrowDown"], ed = [" ", "Enter"], lt = "Sele
3151
3151
  autoComplete: p,
3152
3152
  value: W,
3153
3153
  onChange: (k) => H(k.target.value),
3154
- disabled: g,
3154
+ disabled: b,
3155
3155
  form: w,
3156
3156
  children: [
3157
3157
  W === void 0 ? /* @__PURE__ */ u("option", { value: "" }) : null,
3158
- Array.from(b)
3158
+ Array.from(g)
3159
3159
  ]
3160
3160
  },
3161
3161
  N
@@ -3167,7 +3167,7 @@ var Ju = [" ", "Enter", "ArrowUp", "ArrowDown"], ed = [" ", "Enter"], lt = "Sele
3167
3167
  qs.displayName = lt;
3168
3168
  var Zs = "SelectTrigger", Qs = d.forwardRef(
3169
3169
  (e, t) => {
3170
- const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = _n(n), i = et(Zs, n), a = i.disabled || r, l = se(t, i.onTriggerChange), c = Pn(n), f = d.useRef("touch"), [p, g, m] = Si((h) => {
3170
+ const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = _n(n), i = et(Zs, n), a = i.disabled || r, l = se(t, i.onTriggerChange), c = Pn(n), f = d.useRef("touch"), [p, b, m] = Si((h) => {
3171
3171
  const y = c().filter((A) => !A.disabled), C = y.find((A) => A.value === i.value), E = Ci(y, h, C);
3172
3172
  E !== void 0 && i.onValueChange(E.value);
3173
3173
  }), w = (h) => {
@@ -3202,7 +3202,7 @@ var Zs = "SelectTrigger", Qs = d.forwardRef(
3202
3202
  }),
3203
3203
  onKeyDown: Z(o.onKeyDown, (h) => {
3204
3204
  const y = p.current !== "";
3205
- !(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && g(h.key), !(y && h.key === " ") && Ju.includes(h.key) && (w(), h.preventDefault());
3205
+ !(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && b(h.key), !(y && h.key === " ") && Ju.includes(h.key) && (w(), h.preventDefault());
3206
3206
  })
3207
3207
  }
3208
3208
  ) });
@@ -3266,7 +3266,7 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3266
3266
  align: c,
3267
3267
  alignOffset: f,
3268
3268
  arrowPadding: p,
3269
- collisionBoundary: g,
3269
+ collisionBoundary: b,
3270
3270
  collisionPadding: m,
3271
3271
  sticky: w,
3272
3272
  hideWhenDetached: h,
@@ -3275,7 +3275,7 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3275
3275
  ...C
3276
3276
  } = e, E = et(ct, n), [A, x] = d.useState(null), [T, D] = d.useState(null), O = se(t, (L) => x(L)), [P, W] = d.useState(null), [H, U] = d.useState(
3277
3277
  null
3278
- ), V = Pn(n), [b, S] = d.useState(!1), N = d.useRef(!1);
3278
+ ), V = Pn(n), [g, S] = d.useState(!1), N = d.useRef(!1);
3279
3279
  d.useEffect(() => {
3280
3280
  if (A) return Ws(A);
3281
3281
  }, [A]), ds();
@@ -3291,8 +3291,8 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3291
3291
  [k, P, A]
3292
3292
  );
3293
3293
  d.useEffect(() => {
3294
- b && _();
3295
- }, [b, _]);
3294
+ g && _();
3295
+ }, [g, _]);
3296
3296
  const { onOpenChange: R, triggerPointerDownPosRef: K } = E;
3297
3297
  d.useEffect(() => {
3298
3298
  if (A) {
@@ -3336,7 +3336,7 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3336
3336
  align: c,
3337
3337
  alignOffset: f,
3338
3338
  arrowPadding: p,
3339
- collisionBoundary: g,
3339
+ collisionBoundary: b,
3340
3340
  collisionPadding: m,
3341
3341
  sticky: w,
3342
3342
  hideWhenDetached: h,
@@ -3356,7 +3356,7 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3356
3356
  focusSelectedItem: _,
3357
3357
  selectedItemText: H,
3358
3358
  position: r,
3359
- isPositioned: b,
3359
+ isPositioned: g,
3360
3360
  searchRef: te,
3361
3361
  children: /* @__PURE__ */ u(Vr, { as: ld, allowPinchZoom: !0, children: /* @__PURE__ */ u(
3362
3362
  Mr,
@@ -3421,7 +3421,7 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3421
3421
  );
3422
3422
  si.displayName = ad;
3423
3423
  var cd = "SelectItemAlignedPosition", ii = d.forwardRef((e, t) => {
3424
- const { __scopeSelect: n, onPlaced: r, ...o } = e, s = et(ct, n), i = tt(ct, n), [a, l] = d.useState(null), [c, f] = d.useState(null), p = se(t, (O) => f(O)), g = Pn(n), m = d.useRef(!1), w = d.useRef(!0), { viewport: h, selectedItem: y, selectedItemText: C, focusSelectedItem: E } = i, A = d.useCallback(() => {
3424
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, s = et(ct, n), i = tt(ct, n), [a, l] = d.useState(null), [c, f] = d.useState(null), p = se(t, (O) => f(O)), b = Pn(n), m = d.useRef(!1), w = d.useRef(!0), { viewport: h, selectedItem: y, selectedItemText: C, focusSelectedItem: E } = i, A = d.useCallback(() => {
3425
3425
  if (s.trigger && s.valueNode && a && c && h && y && C) {
3426
3426
  const O = s.trigger.getBoundingClientRect(), P = c.getBoundingClientRect(), W = s.valueNode.getBoundingClientRect(), H = C.getBoundingClientRect();
3427
3427
  if (s.dir !== "rtl") {
@@ -3442,7 +3442,7 @@ var cd = "SelectItemAlignedPosition", ii = d.forwardRef((e, t) => {
3442
3442
  ]);
3443
3443
  a.style.minWidth = Ae + "px", a.style.right = ot + "px";
3444
3444
  }
3445
- const U = g(), V = window.innerHeight - Te * 2, b = h.scrollHeight, S = window.getComputedStyle(c), N = parseInt(S.borderTopWidth, 10), k = parseInt(S.paddingTop, 10), _ = parseInt(S.borderBottomWidth, 10), R = parseInt(S.paddingBottom, 10), K = N + k + b + R + _, te = Math.min(y.offsetHeight * 5, K), j = window.getComputedStyle(h), Ee = parseInt(j.paddingTop, 10), G = parseInt(j.paddingBottom, 10), re = O.top + O.height / 2 - Te, Q = V - re, pe = y.offsetHeight / 2, L = y.offsetTop + pe, J = N + k + L, ie = K - J;
3445
+ const U = b(), V = window.innerHeight - Te * 2, g = h.scrollHeight, S = window.getComputedStyle(c), N = parseInt(S.borderTopWidth, 10), k = parseInt(S.paddingTop, 10), _ = parseInt(S.borderBottomWidth, 10), R = parseInt(S.paddingBottom, 10), K = N + k + g + R + _, te = Math.min(y.offsetHeight * 5, K), j = window.getComputedStyle(h), Ee = parseInt(j.paddingTop, 10), G = parseInt(j.paddingBottom, 10), re = O.top + O.height / 2 - Te, Q = V - re, pe = y.offsetHeight / 2, L = y.offsetTop + pe, J = N + k + L, ie = K - J;
3446
3446
  if (J <= re) {
3447
3447
  const ee = U.length > 0 && y === U[U.length - 1].ref.current;
3448
3448
  a.style.bottom = "0px";
@@ -3465,7 +3465,7 @@ var cd = "SelectItemAlignedPosition", ii = d.forwardRef((e, t) => {
3465
3465
  a.style.margin = `${Te}px 0`, a.style.minHeight = te + "px", a.style.maxHeight = V + "px", r?.(), requestAnimationFrame(() => m.current = !0);
3466
3466
  }
3467
3467
  }, [
3468
- g,
3468
+ b,
3469
3469
  s.trigger,
3470
3470
  s.valueNode,
3471
3471
  a,
@@ -3588,8 +3588,8 @@ var [dd, Gr] = Rt(ct, {}), xr = "SelectViewport", ai = d.forwardRef(
3588
3588
  ...o.style
3589
3589
  },
3590
3590
  onScroll: Z(o.onScroll, (c) => {
3591
- const f = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: g } = i;
3592
- if (g?.current && p) {
3591
+ const f = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: b } = i;
3592
+ if (b?.current && p) {
3593
3593
  const m = Math.abs(l.current - f.scrollTop);
3594
3594
  if (m > 0) {
3595
3595
  const w = window.innerHeight - Te * 2, h = parseFloat(p.style.minHeight), y = parseFloat(p.style.height), C = Math.max(h, y);
@@ -3629,7 +3629,7 @@ var yn = "SelectItem", [md, fi] = Rt(yn), pi = d.forwardRef(
3629
3629
  disabled: o = !1,
3630
3630
  textValue: s,
3631
3631
  ...i
3632
- } = e, a = et(yn, n), l = tt(yn, n), c = a.value === r, [f, p] = d.useState(s ?? ""), [g, m] = d.useState(!1), w = se(
3632
+ } = e, a = et(yn, n), l = tt(yn, n), c = a.value === r, [f, p] = d.useState(s ?? ""), [b, m] = d.useState(!1), w = se(
3633
3633
  t,
3634
3634
  (E) => l.itemRefCallback?.(E, r, o)
3635
3635
  ), h = Ht(), y = d.useRef("touch"), C = () => {
@@ -3662,8 +3662,8 @@ var yn = "SelectItem", [md, fi] = Rt(yn), pi = d.forwardRef(
3662
3662
  {
3663
3663
  role: "option",
3664
3664
  "aria-labelledby": h,
3665
- "data-highlighted": g ? "" : void 0,
3666
- "aria-selected": c && g,
3665
+ "data-highlighted": b ? "" : void 0,
3666
+ "aria-selected": c && b,
3667
3667
  "data-state": c ? "checked" : "unchecked",
3668
3668
  "aria-disabled": o || void 0,
3669
3669
  "data-disabled": o ? "" : void 0,
@@ -3701,7 +3701,7 @@ var yn = "SelectItem", [md, fi] = Rt(yn), pi = d.forwardRef(
3701
3701
  pi.displayName = yn;
3702
3702
  var Ft = "SelectItemText", mi = d.forwardRef(
3703
3703
  (e, t) => {
3704
- const { __scopeSelect: n, className: r, style: o, ...s } = e, i = et(Ft, n), a = tt(Ft, n), l = fi(Ft, n), c = od(Ft, n), [f, p] = d.useState(null), g = se(
3704
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, i = et(Ft, n), a = tt(Ft, n), l = fi(Ft, n), c = od(Ft, n), [f, p] = d.useState(null), b = se(
3705
3705
  t,
3706
3706
  (C) => p(C),
3707
3707
  l.onItemTextChange,
@@ -3711,7 +3711,7 @@ var Ft = "SelectItemText", mi = d.forwardRef(
3711
3711
  [l.disabled, l.value, m]
3712
3712
  ), { onNativeOptionAdd: h, onNativeOptionRemove: y } = c;
3713
3713
  return he(() => (h(w), () => y(w)), [h, y, w]), /* @__PURE__ */ M(Ke, { children: [
3714
- /* @__PURE__ */ u(Ce.span, { id: l.textId, ...s, ref: g }),
3714
+ /* @__PURE__ */ u(Ce.span, { id: l.textId, ...s, ref: b }),
3715
3715
  l.isSelected && i.valueNode && !i.valueNodeHasChildren ? Sn.createPortal(s.children, i.valueNode) : null
3716
3716
  ] });
3717
3717
  }
@@ -4175,7 +4175,7 @@ function Ni() {
4175
4175
  NodeFilter: c,
4176
4176
  NamedNodeMap: f = e.NamedNodeMap || e.MozNamedAttrMap,
4177
4177
  HTMLFormElement: p,
4178
- DOMParser: g,
4178
+ DOMParser: b,
4179
4179
  trustedTypes: m
4180
4180
  } = e, w = l.prototype, h = Mt(w, "cloneNode"), y = Mt(w, "remove"), C = Mt(w, "nextSibling"), E = Mt(w, "childNodes"), A = Mt(w, "parentNode");
4181
4181
  if (typeof i == "function") {
@@ -4195,7 +4195,7 @@ function Ni() {
4195
4195
  t.isSupported = typeof Ei == "function" && typeof A == "function" && D && D.createHTMLDocument !== void 0;
4196
4196
  const {
4197
4197
  MUSTACHE_EXPR: V,
4198
- ERB_EXPR: b,
4198
+ ERB_EXPR: g,
4199
4199
  TMPLIT_EXPR: S,
4200
4200
  DATA_ATTR: N,
4201
4201
  ARIA_ATTR: k,
@@ -4326,7 +4326,7 @@ function Ni() {
4326
4326
  const oe = x ? x.createHTML(v) : v;
4327
4327
  if (pt === We)
4328
4328
  try {
4329
- I = new g().parseFromString(oe, Pt);
4329
+ I = new b().parseFromString(oe, Pt);
4330
4330
  } catch {
4331
4331
  }
4332
4332
  if (!I || !I.documentElement) {
@@ -4381,7 +4381,7 @@ function Ni() {
4381
4381
  }
4382
4382
  return De(v), !0;
4383
4383
  }
4384
- return v instanceof l && !Aa(v) || (z === "noscript" || z === "noembed" || z === "noframes") && ge(/<\/no(script|embed|frames)/i, v.innerHTML) ? (De(v), !0) : (le && v.nodeType === Dt.text && (I = v.textContent, on([V, b, S], (oe) => {
4384
+ return v instanceof l && !Aa(v) || (z === "noscript" || z === "noembed" || z === "noframes") && ge(/<\/no(script|embed|frames)/i, v.innerHTML) ? (De(v), !0) : (le && v.nodeType === Dt.text && (I = v.textContent, on([V, g, S], (oe) => {
4385
4385
  I = Ot(I, oe, " ");
4386
4386
  }), v.textContent !== I && (_t(t.removed, {
4387
4387
  element: v.cloneNode()
@@ -4457,7 +4457,7 @@ function Ni() {
4457
4457
  st(ae, v);
4458
4458
  continue;
4459
4459
  }
4460
- le && on([V, b, S], (po) => {
4460
+ le && on([V, g, S], (po) => {
4461
4461
  fe = Ot(fe, po, " ");
4462
4462
  });
4463
4463
  const fo = ce(v.nodeName);
@@ -4532,7 +4532,7 @@ function Ni() {
4532
4532
  }
4533
4533
  let ye = Ne ? I.outerHTML : I.innerHTML;
4534
4534
  return Ne && j["!doctype"] && I.ownerDocument && I.ownerDocument.doctype && I.ownerDocument.doctype.name && ge(Ri, I.ownerDocument.doctype.name) && (ye = "<!DOCTYPE " + I.ownerDocument.doctype.name + `>
4535
- ` + ye), le && on([V, b, S], (je) => {
4535
+ ` + ye), le && on([V, g, S], (je) => {
4536
4536
  ye = Ot(ye, je, " ");
4537
4537
  }), x && Kt ? x.createHTML(ye) : ye;
4538
4538
  }, t.setConfig = function() {
@@ -4579,16 +4579,16 @@ function sf({ field: e, formValues: t, disabled: n }) {
4579
4579
  function af({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
4580
4580
  const s = typeof e.disabled == "function" ? e.disabled(t) : e.disabled, i = e.options || [], a = e.inline || e.layout === "inline";
4581
4581
  if (i.length > 0) {
4582
- const l = Array.isArray(t[e.name]) ? t[e.name] : [], c = (p, g) => {
4582
+ const l = Array.isArray(t[e.name]) ? t[e.name] : [], c = (p, b) => {
4583
4583
  let m;
4584
- g ? m = [...l, p] : m = l.filter((w) => w !== p), n(e.name, m);
4584
+ b ? m = [...l, p] : m = l.filter((w) => w !== p), n(e.name, m);
4585
4585
  }, f = o && e.required && l.length === 0;
4586
4586
  return /* @__PURE__ */ u(Ke, { children: /* @__PURE__ */ u(
4587
4587
  "div",
4588
4588
  {
4589
4589
  className: a ? "grid grid-cols-4 gap-3 mt-3" : "space-y-3 mt-3",
4590
4590
  children: i.map((p) => {
4591
- const g = typeof p == "object" ? p.value : p, m = typeof p == "object" ? p.label : p, w = typeof p == "object" ? p.description : null, h = `${e.name}-${g}`, y = l.includes(g);
4591
+ const b = typeof p == "object" ? p.value : p, m = typeof p == "object" ? p.label : p, w = typeof p == "object" ? p.description : null, h = `${e.name}-${b}`, y = l.includes(b);
4592
4592
  return /* @__PURE__ */ M("div", { className: "relative flex items-start", children: [
4593
4593
  /* @__PURE__ */ u("div", { className: "flex h-6 items-center", children: /* @__PURE__ */ u(
4594
4594
  "input",
@@ -4597,7 +4597,7 @@ function af({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
4597
4597
  type: "checkbox",
4598
4598
  id: h,
4599
4599
  checked: y,
4600
- onChange: (C) => c(g, C.target.checked),
4600
+ onChange: (C) => c(b, C.target.checked),
4601
4601
  onBlur: () => r(e.name),
4602
4602
  disabled: s,
4603
4603
  className: `
@@ -4628,7 +4628,7 @@ function af({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
4628
4628
  }
4629
4629
  )
4630
4630
  ] })
4631
- ] }, g);
4631
+ ] }, b);
4632
4632
  })
4633
4633
  }
4634
4634
  ) });
@@ -4681,8 +4681,8 @@ function cf(e) {
4681
4681
  }, [a]), he(() => {
4682
4682
  const c = r.current, f = o.current;
4683
4683
  if (f !== e) {
4684
- const g = s.current, m = an(c);
4685
- e ? l("MOUNT") : m === "none" || c?.display === "none" ? l("UNMOUNT") : l(f && g !== m ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
4684
+ const b = s.current, m = an(c);
4685
+ e ? l("MOUNT") : m === "none" || c?.display === "none" ? l("UNMOUNT") : l(f && b !== m ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
4686
4686
  }
4687
4687
  }, [e, l]), he(() => {
4688
4688
  if (t) {
@@ -4695,11 +4695,11 @@ function cf(e) {
4695
4695
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = y);
4696
4696
  });
4697
4697
  }
4698
- }, g = (m) => {
4698
+ }, b = (m) => {
4699
4699
  m.target === t && (s.current = an(r.current));
4700
4700
  };
4701
- return t.addEventListener("animationstart", g), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
4702
- f.clearTimeout(c), t.removeEventListener("animationstart", g), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
4701
+ return t.addEventListener("animationstart", b), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
4702
+ f.clearTimeout(c), t.removeEventListener("animationstart", b), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
4703
4703
  };
4704
4704
  } else
4705
4705
  l("ANIMATION_END");
@@ -4751,7 +4751,7 @@ var df = [
4751
4751
  defaultOpen: o,
4752
4752
  onOpenChange: s,
4753
4753
  modal: i = !1
4754
- } = e, a = Vt(t), l = d.useRef(null), [c, f] = d.useState(!1), [p, g] = Wt({
4754
+ } = e, a = Vt(t), l = d.useRef(null), [c, f] = d.useState(!1), [p, b] = Wt({
4755
4755
  prop: r,
4756
4756
  defaultProp: o ?? !1,
4757
4757
  onChange: s,
@@ -4764,8 +4764,8 @@ var df = [
4764
4764
  contentId: Ht(),
4765
4765
  triggerRef: l,
4766
4766
  open: p,
4767
- onOpenChange: g,
4768
- onOpenToggle: d.useCallback(() => g((m) => !m), [g]),
4767
+ onOpenChange: b,
4768
+ onOpenToggle: d.useCallback(() => b((m) => !m), [b]),
4769
4769
  hasCustomAnchor: c,
4770
4770
  onCustomAnchorAdd: d.useCallback(() => f(!0), []),
4771
4771
  onCustomAnchorRemove: d.useCallback(() => f(!1), []),
@@ -4881,7 +4881,7 @@ var gf = /* @__PURE__ */ we("PopoverContent.RemoveScroll"), bf = d.forwardRef(
4881
4881
  onFocusOutside: c,
4882
4882
  onInteractOutside: f,
4883
4883
  ...p
4884
- } = e, g = nt(Ct, n), m = Vt(n);
4884
+ } = e, b = nt(Ct, n), m = Vt(n);
4885
4885
  return ds(), /* @__PURE__ */ u(
4886
4886
  Mr,
4887
4887
  {
@@ -4899,13 +4899,13 @@ var gf = /* @__PURE__ */ we("PopoverContent.RemoveScroll"), bf = d.forwardRef(
4899
4899
  onEscapeKeyDown: a,
4900
4900
  onPointerDownOutside: l,
4901
4901
  onFocusOutside: c,
4902
- onDismiss: () => g.onOpenChange(!1),
4902
+ onDismiss: () => b.onOpenChange(!1),
4903
4903
  children: /* @__PURE__ */ u(
4904
4904
  Fs,
4905
4905
  {
4906
- "data-state": $i(g.open),
4906
+ "data-state": $i(b.open),
4907
4907
  role: "dialog",
4908
- id: g.contentId,
4908
+ id: b.contentId,
4909
4909
  ...m,
4910
4910
  ...p,
4911
4911
  ref: t,
@@ -5124,16 +5124,16 @@ const Nf = (e, t) => {
5124
5124
  y === "[" ? i++ : y === "]" ? i-- : y === "(" ? a++ : y === ")" && a--;
5125
5125
  }
5126
5126
  const p = s.length === 0 ? o : o.slice(l);
5127
- let g = p, m = !1;
5128
- p.endsWith(Tr) ? (g = p.slice(0, -1), m = !0) : (
5127
+ let b = p, m = !1;
5128
+ p.endsWith(Tr) ? (b = p.slice(0, -1), m = !0) : (
5129
5129
  /**
5130
5130
  * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
5131
5131
  * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
5132
5132
  */
5133
- p.startsWith(Tr) && (g = p.slice(1), m = !0)
5133
+ p.startsWith(Tr) && (b = p.slice(1), m = !0)
5134
5134
  );
5135
5135
  const w = c && c > l ? c - l : void 0;
5136
- return Qo(s, m, g, w);
5136
+ return Qo(s, m, b, w);
5137
5137
  };
5138
5138
  if (t) {
5139
5139
  const o = t + Zo, s = r;
@@ -5176,7 +5176,7 @@ const Nf = (e, t) => {
5176
5176
  for (let c = a.length - 1; c >= 0; c -= 1) {
5177
5177
  const f = a[c], {
5178
5178
  isExternal: p,
5179
- modifiers: g,
5179
+ modifiers: b,
5180
5180
  hasImportantModifier: m,
5181
5181
  baseClassName: w,
5182
5182
  maybePostfixModifierPosition: h
@@ -5197,7 +5197,7 @@ const Nf = (e, t) => {
5197
5197
  }
5198
5198
  y = !1;
5199
5199
  }
5200
- const E = g.length === 0 ? "" : g.length === 1 ? g[0] : s(g).join(":"), A = m ? E + Tr : E, x = A + C;
5200
+ const E = b.length === 0 ? "" : b.length === 1 ? b[0] : s(b).join(":"), A = m ? E + Tr : E, x = A + C;
5201
5201
  if (i.indexOf(x) > -1)
5202
5202
  continue;
5203
5203
  i.push(x);
@@ -5249,7 +5249,7 @@ const Nf = (e, t) => {
5249
5249
  const r = Vi.exec(e);
5250
5250
  return r ? r[1] ? t(r[1]) : n : !1;
5251
5251
  }, Yi = (e) => e === "position" || e === "percentage", Ki = (e) => e === "image" || e === "url", Xi = (e) => e === "length" || e === "size" || e === "bg-size", qi = (e) => e === "length", dp = (e) => e === "number", fp = (e) => e === "family-name", Zi = (e) => e === "shadow", pp = () => {
5252
- const e = ue("color"), t = ue("font"), n = ue("text"), r = ue("font-weight"), o = ue("tracking"), s = ue("leading"), i = ue("breakpoint"), a = ue("container"), l = ue("spacing"), c = ue("radius"), f = ue("shadow"), p = ue("inset-shadow"), g = ue("text-shadow"), m = ue("drop-shadow"), w = ue("blur"), h = ue("perspective"), y = ue("aspect"), C = ue("ease"), E = ue("animate"), A = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], x = () => [
5252
+ const e = ue("color"), t = ue("font"), n = ue("text"), r = ue("font-weight"), o = ue("tracking"), s = ue("leading"), i = ue("breakpoint"), a = ue("container"), l = ue("spacing"), c = ue("radius"), f = ue("shadow"), p = ue("inset-shadow"), b = ue("text-shadow"), m = ue("drop-shadow"), w = ue("blur"), h = ue("perspective"), y = ue("aspect"), C = ue("ease"), E = ue("animate"), A = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], x = () => [
5253
5253
  "center",
5254
5254
  "top",
5255
5255
  "bottom",
@@ -5269,7 +5269,7 @@ const Nf = (e, t) => {
5269
5269
  "left-bottom"
5270
5270
  ], T = () => [...x(), $, F], D = () => ["auto", "hidden", "clip", "visible", "scroll"], O = () => ["auto", "contain", "none"], P = () => [$, F, l], W = () => [yt, "full", "auto", ...P()], H = () => [Xe, "none", "subgrid", $, F], U = () => ["auto", {
5271
5271
  span: ["full", Xe, $, F]
5272
- }, Xe, $, F], V = () => [Xe, "auto", $, F], b = () => ["auto", "min", "max", "fr", $, F], S = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], N = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], k = () => ["auto", ...P()], _ = () => [yt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...P()], R = () => [e, $, F], K = () => [...x(), es, Jo, {
5272
+ }, Xe, $, F], V = () => [Xe, "auto", $, F], g = () => ["auto", "min", "max", "fr", $, F], S = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], N = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], k = () => ["auto", ...P()], _ = () => [yt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...P()], R = () => [e, $, F], K = () => [...x(), es, Jo, {
5273
5273
  position: [$, F]
5274
5274
  }], te = () => ["no-repeat", {
5275
5275
  repeat: ["", "x", "y", "space", "round"]
@@ -5658,14 +5658,14 @@ const Nf = (e, t) => {
5658
5658
  * @see https://tailwindcss.com/docs/grid-auto-columns
5659
5659
  */
5660
5660
  "auto-cols": [{
5661
- "auto-cols": b()
5661
+ "auto-cols": g()
5662
5662
  }],
5663
5663
  /**
5664
5664
  * Grid Auto Rows
5665
5665
  * @see https://tailwindcss.com/docs/grid-auto-rows
5666
5666
  */
5667
5667
  "auto-rows": [{
5668
- "auto-rows": b()
5668
+ "auto-rows": g()
5669
5669
  }],
5670
5670
  /**
5671
5671
  * Gap
@@ -6723,7 +6723,7 @@ const Nf = (e, t) => {
6723
6723
  * @see https://tailwindcss.com/docs/text-shadow
6724
6724
  */
6725
6725
  "text-shadow": [{
6726
- "text-shadow": ["none", g, cn, ln]
6726
+ "text-shadow": ["none", b, cn, ln]
6727
6727
  }],
6728
6728
  /**
6729
6729
  * Text Shadow Color
@@ -7860,17 +7860,17 @@ function ts({
7860
7860
  api_URL: a,
7861
7861
  disabled: l
7862
7862
  }) {
7863
- const c = l, f = e.type === "multifile", p = r?.[e.name] || {}, g = t[e.name], m = f ? g || [] : [g].filter(Boolean), [w, h] = de(!1), y = a ? `${a}uploads` : null;
7863
+ const c = l, f = e.type === "multifile", p = r?.[e.name] || {}, b = t[e.name], m = f ? b || [] : [b].filter(Boolean), [w, h] = de(!1), y = a ? `${a}uploads` : null;
7864
7864
  !y && e.uploadEndpoint && console.error(
7865
7865
  `api_URL prop is required when using FileField with upload functionality for field "${e.name}"`
7866
7866
  );
7867
- const C = (b) => {
7868
- if (b === 0) return "0 Bytes";
7869
- const S = 1024, N = ["Bytes", "KB", "MB", "GB"], k = Math.floor(Math.log(b) / Math.log(S));
7870
- return `${parseFloat((b / S ** k).toFixed(2))} ${N[k]}`;
7871
- }, E = async (b) => {
7867
+ const C = (g) => {
7868
+ if (g === 0) return "0 Bytes";
7869
+ const S = 1024, N = ["Bytes", "KB", "MB", "GB"], k = Math.floor(Math.log(g) / Math.log(S));
7870
+ return `${parseFloat((g / S ** k).toFixed(2))} ${N[k]}`;
7871
+ }, E = async (g) => {
7872
7872
  const S = new FormData();
7873
- S.append("file", b);
7873
+ S.append("file", g);
7874
7874
  const N = await fetch(`${y}`, {
7875
7875
  method: "POST",
7876
7876
  body: S
@@ -7878,48 +7878,48 @@ function ts({
7878
7878
  if (!N.ok)
7879
7879
  throw mn.error("Upload failed"), new Error("Upload failed");
7880
7880
  return await N.json();
7881
- }, A = async (b, S) => {
7881
+ }, A = async (g, S) => {
7882
7882
  if (!S) return;
7883
- if (b.maxSize && S.size > b.maxSize)
7883
+ if (g.maxSize && S.size > g.maxSize)
7884
7884
  throw new Error(
7885
- `File size must not exceed ${C(b.maxSize)}`
7885
+ `File size must not exceed ${C(g.maxSize)}`
7886
7886
  );
7887
- const N = await E(S), k = { ...t, [b.name]: N };
7888
- s(b.name, N), i(k);
7889
- }, x = async (b, S) => {
7890
- const N = t[b.name] || [];
7891
- if (b.maxFiles && N.length + S.length > b.maxFiles)
7892
- throw new Error(`Maximum ${b.maxFiles} files allowed`);
7887
+ const N = await E(S), k = { ...t, [g.name]: N };
7888
+ s(g.name, N), i(k);
7889
+ }, x = async (g, S) => {
7890
+ const N = t[g.name] || [];
7891
+ if (g.maxFiles && N.length + S.length > g.maxFiles)
7892
+ throw new Error(`Maximum ${g.maxFiles} files allowed`);
7893
7893
  S.forEach((R) => {
7894
- if (b.maxSize && R.size > b.maxSize)
7894
+ if (g.maxSize && R.size > g.maxSize)
7895
7895
  throw new Error(
7896
- `Each file must not exceed ${C(b.maxSize)}`
7896
+ `Each file must not exceed ${C(g.maxSize)}`
7897
7897
  );
7898
7898
  });
7899
7899
  const k = await Promise.all(
7900
7900
  S.map((R) => E(R))
7901
7901
  // Updated call
7902
7902
  ), _ = [...N, ...k];
7903
- s(b.name, _), i({ ...t, [b.name]: _ });
7904
- }, T = async (b, S) => {
7903
+ s(g.name, _), i({ ...t, [g.name]: _ });
7904
+ }, T = async (g, S) => {
7905
7905
  if (c) return;
7906
7906
  const N = Array.from(S);
7907
7907
  try {
7908
- e.type === "multifile" ? await x(e, N) : await A(e, N[0]), o.current?.[b] && (o.current[b].value = "");
7908
+ e.type === "multifile" ? await x(e, N) : await A(e, N[0]), o.current?.[g] && (o.current[g].value = "");
7909
7909
  } catch (k) {
7910
7910
  mn.error(`Upload failed: ${k.message}`);
7911
7911
  }
7912
- }, D = async (b, S) => {
7912
+ }, D = async (g, S) => {
7913
7913
  if (c) return;
7914
7914
  let N;
7915
- e.type === "file" ? N = "" : N = (t[b] || []).filter((_) => _ !== S), s(b, N), i({ ...t, [b]: N }), o.current?.[b] && (o.current[b].value = "");
7916
- }, O = (b) => {
7917
- b.preventDefault(), c || h(!0);
7918
- }, P = (b) => {
7919
- b.preventDefault(), c || h(!1);
7920
- }, W = (b) => {
7921
- b.preventDefault(), h(!1), !c && b.dataTransfer.files && b.dataTransfer.files.length > 0 && T(e.name, b.dataTransfer.files);
7922
- }, H = e.accept ? e.accept.split(",").map((b) => b.split("/")[1] || b.split(".")[1] || b).join(", ").toUpperCase() : "PNG, JPG, PDF", U = e.maxSize ? `, up to ${C(e.maxSize)}` : "", V = `
7915
+ e.type === "file" ? N = "" : N = (t[g] || []).filter((_) => _ !== S), s(g, N), i({ ...t, [g]: N }), o.current?.[g] && (o.current[g].value = "");
7916
+ }, O = (g) => {
7917
+ g.preventDefault(), c || h(!0);
7918
+ }, P = (g) => {
7919
+ g.preventDefault(), c || h(!1);
7920
+ }, W = (g) => {
7921
+ g.preventDefault(), h(!1), !c && g.dataTransfer.files && g.dataTransfer.files.length > 0 && T(e.name, g.dataTransfer.files);
7922
+ }, H = e.accept ? e.accept.split(",").map((g) => g.split("/")[1] || g.split(".")[1] || g).join(", ").toUpperCase() : "PNG, JPG, PDF", U = e.maxSize ? `, up to ${C(e.maxSize)}` : "", V = `
7923
7923
  w-full flex flex-col items-center justify-center p-6 border-2 border-dashed rounded-lg transition-all duration-200
7924
7924
  // Ensure focus styling is handled correctly for the button element
7925
7925
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
@@ -7969,20 +7969,20 @@ function ts({
7969
7969
  /* @__PURE__ */ u(
7970
7970
  "input",
7971
7971
  {
7972
- ref: (b) => {
7973
- b && o && o.current && (o.current[e.name] = b);
7972
+ ref: (g) => {
7973
+ g && o && o.current && (o.current[e.name] = g);
7974
7974
  },
7975
7975
  id: e.name,
7976
7976
  type: "file",
7977
7977
  accept: e.accept,
7978
7978
  multiple: f,
7979
7979
  className: "sr-only",
7980
- onChange: (b) => T(e.name, b.target.files),
7980
+ onChange: (g) => T(e.name, g.target.files),
7981
7981
  disabled: c
7982
7982
  }
7983
7983
  ),
7984
- m.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: m.map((b, S) => {
7985
- const N = b.original_name || b.name || "File", k = b.size || null;
7984
+ m.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: m.map((g, S) => {
7985
+ const N = g.original_name || g.name || "File", k = g.size || null;
7986
7986
  return /* @__PURE__ */ M(
7987
7987
  "div",
7988
7988
  {
@@ -8000,7 +8000,7 @@ function ts({
8000
8000
  "button",
8001
8001
  {
8002
8002
  type: "button",
8003
- onClick: () => D(e.name, b),
8003
+ onClick: () => D(e.name, g),
8004
8004
  className: `text-red-500 hover:text-red-700 ml-3 flex-shrink-0 ${c ? "cursor-not-allowed opacity-50" : ""}`,
8005
8005
  disabled: c,
8006
8006
  children: "Remove"
@@ -8008,14 +8008,14 @@ function ts({
8008
8008
  )
8009
8009
  ]
8010
8010
  },
8011
- b.url || b.original_name || S
8011
+ g.url || g.original_name || S
8012
8012
  );
8013
8013
  }) }),
8014
- Object.entries(p).map(([b, S]) => S.status === "uploading" ? /* @__PURE__ */ M("div", { className: "relative pt-1", children: [
8014
+ Object.entries(p).map(([g, S]) => S.status === "uploading" ? /* @__PURE__ */ M("div", { className: "relative pt-1", children: [
8015
8015
  /* @__PURE__ */ M("div", { className: "flex items-center justify-between", children: [
8016
8016
  /* @__PURE__ */ M("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
8017
8017
  "Uploading ",
8018
- b
8018
+ g
8019
8019
  ] }),
8020
8020
  /* @__PURE__ */ M("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
8021
8021
  S.progress,
@@ -8029,7 +8029,7 @@ function ts({
8029
8029
  style: { width: `${S.progress}%` }
8030
8030
  }
8031
8031
  ) })
8032
- ] }, b) : null)
8032
+ ] }, g) : null)
8033
8033
  ] })
8034
8034
  },
8035
8035
  e.name
@@ -8045,16 +8045,16 @@ function gp({
8045
8045
  setCharCounts: i
8046
8046
  }) {
8047
8047
  const a = $t(null), l = t[e.name] || "", c = typeof e.disabled == "function" ? e.disabled(t) : e.disabled || e.readOnly, f = () => {
8048
- const g = a.current;
8049
- g && (g.style.height = "auto", g.style.height = `${g.scrollHeight + 2}px`);
8048
+ const b = a.current;
8049
+ b && (b.style.height = "auto", b.style.height = `${b.scrollHeight + 2}px`);
8050
8050
  };
8051
8051
  zt(() => {
8052
8052
  f();
8053
8053
  }, [l]);
8054
- const p = (g) => {
8055
- n(e.name, g.target.value), f(), i && i((m) => ({
8054
+ const p = (b) => {
8055
+ n(e.name, b.target.value), f(), i && i((m) => ({
8056
8056
  ...m,
8057
- [e.name]: g.target.value.length
8057
+ [e.name]: b.target.value.length
8058
8058
  }));
8059
8059
  };
8060
8060
  return /* @__PURE__ */ M("div", { className: "space-y-2", children: [
@@ -8088,7 +8088,7 @@ function gp({
8088
8088
  ] });
8089
8089
  }
8090
8090
  function bp({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
8091
- const [s, i] = de(!1), a = t[e.name], l = a ? new Date(a) : null, c = l ? (l.getHours() % 12 || 12).toString().padStart(2, "0") : "12", f = l ? l.getMinutes().toString().padStart(2, "0") : "00", p = l ? l.getHours() >= 12 ? "PM" : "AM" : "PM", g = (x) => {
8091
+ const [s, i] = de(!1), a = t[e.name], l = a ? new Date(a) : null, c = l ? (l.getHours() % 12 || 12).toString().padStart(2, "0") : "12", f = l ? l.getMinutes().toString().padStart(2, "0") : "00", p = l ? l.getHours() >= 12 ? "PM" : "AM" : "PM", b = (x) => {
8092
8092
  if (!x) {
8093
8093
  n(e.name, null);
8094
8094
  return;
@@ -8172,7 +8172,7 @@ function bp({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
8172
8172
  {
8173
8173
  mode: "single",
8174
8174
  selected: l,
8175
- onSelect: g,
8175
+ onSelect: b,
8176
8176
  showOutsideDays: !0,
8177
8177
  className: "p-0",
8178
8178
  classNames: {
@@ -8432,14 +8432,14 @@ var Bp = d.forwardRef((e, t) => {
8432
8432
  onEntryFocus: c,
8433
8433
  preventScrollOnEntryFocus: f = !1,
8434
8434
  ...p
8435
- } = e, g = d.useRef(null), m = se(t, g), w = Or(s), [h, y] = Wt({
8435
+ } = e, b = d.useRef(null), m = se(t, b), w = Or(s), [h, y] = Wt({
8436
8436
  prop: i,
8437
8437
  defaultProp: a ?? null,
8438
8438
  onChange: l,
8439
8439
  caller: Gt
8440
8440
  }), [C, E] = d.useState(!1), A = Ze(c), x = ta(n), T = d.useRef(!1), [D, O] = d.useState(0);
8441
8441
  return d.useEffect(() => {
8442
- const P = g.current;
8442
+ const P = b.current;
8443
8443
  if (P)
8444
8444
  return P.addEventListener(pr, A), () => P.removeEventListener(pr, A);
8445
8445
  }, [A]), /* @__PURE__ */ u(
@@ -8479,7 +8479,7 @@ var Bp = d.forwardRef((e, t) => {
8479
8479
  if (P.target === P.currentTarget && W && !C) {
8480
8480
  const H = new CustomEvent(pr, Dp);
8481
8481
  if (P.currentTarget.dispatchEvent(H), !H.defaultPrevented) {
8482
- const U = x().filter((k) => k.focusable), V = U.find((k) => k.active), b = U.find((k) => k.id === h), N = [V, b, ...U].filter(
8482
+ const U = x().filter((k) => k.focusable), V = U.find((k) => k.active), g = U.find((k) => k.id === h), N = [V, g, ...U].filter(
8483
8483
  Boolean
8484
8484
  ).map((k) => k.ref.current);
8485
8485
  ia(N, f);
@@ -8501,7 +8501,7 @@ var Bp = d.forwardRef((e, t) => {
8501
8501
  tabStopId: s,
8502
8502
  children: i,
8503
8503
  ...a
8504
- } = e, l = Ht(), c = s || l, f = zp(oa, n), p = f.currentTabStopId === c, g = ta(n), { onFocusableItemAdd: m, onFocusableItemRemove: w, currentTabStopId: h } = f;
8504
+ } = e, l = Ht(), c = s || l, f = zp(oa, n), p = f.currentTabStopId === c, b = ta(n), { onFocusableItemAdd: m, onFocusableItemRemove: w, currentTabStopId: h } = f;
8505
8505
  return d.useEffect(() => {
8506
8506
  if (r)
8507
8507
  return m(), () => w();
@@ -8533,7 +8533,7 @@ var Bp = d.forwardRef((e, t) => {
8533
8533
  if (C !== void 0) {
8534
8534
  if (y.metaKey || y.ctrlKey || y.altKey || y.shiftKey) return;
8535
8535
  y.preventDefault();
8536
- let A = g().filter((x) => x.focusable).map((x) => x.ref.current);
8536
+ let A = b().filter((x) => x.focusable).map((x) => x.ref.current);
8537
8537
  if (C === "last") A.reverse();
8538
8538
  else if (C === "prev" || C === "next") {
8539
8539
  C === "prev" && A.reverse();
@@ -8589,7 +8589,7 @@ var Vp = ra, Gp = sa, Xr = "Radio", [Yp, aa] = ut(Xr), [Kp, Xp] = Yp(Xr), la = d
8589
8589
  onCheck: l,
8590
8590
  form: c,
8591
8591
  ...f
8592
- } = e, [p, g] = d.useState(null), m = se(t, (y) => g(y)), w = d.useRef(!1), h = p ? c || !!p.closest("form") : !0;
8592
+ } = e, [p, b] = d.useState(null), m = se(t, (y) => b(y)), w = d.useRef(!1), h = p ? c || !!p.closest("form") : !0;
8593
8593
  return /* @__PURE__ */ M(Kp, { scope: n, checked: o, disabled: i, children: [
8594
8594
  /* @__PURE__ */ u(
8595
8595
  $n.button,
@@ -8702,7 +8702,7 @@ var Zp = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
8702
8702
  dir: c,
8703
8703
  loop: f = !0,
8704
8704
  onValueChange: p,
8705
- ...g
8705
+ ...b
8706
8706
  } = e, m = pa(n), w = Or(c), [h, y] = Wt({
8707
8707
  prop: s,
8708
8708
  defaultProp: o ?? null,
@@ -8734,7 +8734,7 @@ var Zp = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
8734
8734
  "aria-orientation": l,
8735
8735
  "data-disabled": a ? "" : void 0,
8736
8736
  dir: w,
8737
- ...g,
8737
+ ...b,
8738
8738
  ref: t
8739
8739
  }
8740
8740
  )
@@ -8747,11 +8747,11 @@ var Zp = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
8747
8747
  ha.displayName = zn;
8748
8748
  var ga = "RadioGroupItem", ba = d.forwardRef(
8749
8749
  (e, t) => {
8750
- const { __scopeRadioGroup: n, disabled: r, ...o } = e, s = em(ga, n), i = s.disabled || r, a = pa(n), l = ma(n), c = d.useRef(null), f = se(t, c), p = s.value === o.value, g = d.useRef(!1);
8750
+ const { __scopeRadioGroup: n, disabled: r, ...o } = e, s = em(ga, n), i = s.disabled || r, a = pa(n), l = ma(n), c = d.useRef(null), f = se(t, c), p = s.value === o.value, b = d.useRef(!1);
8751
8751
  return d.useEffect(() => {
8752
8752
  const m = (h) => {
8753
- Zp.includes(h.key) && (g.current = !0);
8754
- }, w = () => g.current = !1;
8753
+ Zp.includes(h.key) && (b.current = !0);
8754
+ }, w = () => b.current = !1;
8755
8755
  return document.addEventListener("keydown", m), document.addEventListener("keyup", w), () => {
8756
8756
  document.removeEventListener("keydown", m), document.removeEventListener("keyup", w);
8757
8757
  };
@@ -8777,7 +8777,7 @@ var ga = "RadioGroupItem", ba = d.forwardRef(
8777
8777
  m.key === "Enter" && m.preventDefault();
8778
8778
  }),
8779
8779
  onFocus: Z(o.onFocus, () => {
8780
- g.current && c.current?.click();
8780
+ b.current && c.current?.click();
8781
8781
  })
8782
8782
  }
8783
8783
  )
@@ -8855,13 +8855,13 @@ function im({
8855
8855
  sm,
8856
8856
  {
8857
8857
  value: i,
8858
- onValueChange: (g) => n(e.name, g),
8858
+ onValueChange: (b) => n(e.name, b),
8859
8859
  onBlur: () => r(e.name),
8860
8860
  disabled: a,
8861
8861
  className: p,
8862
8862
  "aria-label": e.label || e.name,
8863
- children: l.map((g) => {
8864
- const m = typeof g == "object" ? g.value : g, w = typeof g == "object" ? g.label : g, h = typeof g == "object" ? g.description : null, y = `${e.name}-${m}`, C = i === m;
8863
+ children: l.map((b) => {
8864
+ const m = typeof b == "object" ? b.value : b, w = typeof b == "object" ? b.label : b, h = typeof b == "object" ? b.description : null, y = `${e.name}-${m}`, C = i === m;
8865
8865
  return f ? /* @__PURE__ */ M(
8866
8866
  "label",
8867
8867
  {
@@ -9053,18 +9053,18 @@ function lm({
9053
9053
  ] }) });
9054
9054
  }
9055
9055
  function cm({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
9056
- const [s, i] = de(!1), [a, l] = de("12"), [c, f] = de("00"), [p, g] = de("PM"), m = t[e.name] || "";
9056
+ const [s, i] = de(!1), [a, l] = de("12"), [c, f] = de("00"), [p, b] = de("PM"), m = t[e.name] || "";
9057
9057
  Pe.useEffect(() => {
9058
9058
  if (m) {
9059
9059
  const x = m.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);
9060
- x && (l(x[1].padStart(2, "0")), f(x[2]), g(x[3].toUpperCase()));
9060
+ x && (l(x[1].padStart(2, "0")), f(x[2]), b(x[3].toUpperCase()));
9061
9061
  }
9062
9062
  }, [m]);
9063
9063
  const w = () => {
9064
9064
  const x = `${a}:${c} ${p}`;
9065
9065
  n(e.name, x), i(!1);
9066
9066
  }, h = () => {
9067
- n(e.name, ""), l("12"), f("00"), g("PM");
9067
+ n(e.name, ""), l("12"), f("00"), b("PM");
9068
9068
  }, y = () => {
9069
9069
  const x = parseInt(a);
9070
9070
  l((x % 12 + 1).toString().padStart(2, "0"));
@@ -9248,7 +9248,7 @@ function cm({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
9248
9248
  "button",
9249
9249
  {
9250
9250
  type: "button",
9251
- onClick: () => g("AM"),
9251
+ onClick: () => b("AM"),
9252
9252
  className: `
9253
9253
  px-3 py-1 text-sm font-medium rounded
9254
9254
  ${p === "AM" ? "bg-blue-600 text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-200"}
@@ -9260,7 +9260,7 @@ function cm({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
9260
9260
  "button",
9261
9261
  {
9262
9262
  type: "button",
9263
- onClick: () => g("PM"),
9263
+ onClick: () => b("PM"),
9264
9264
  className: `
9265
9265
  px-3 py-1 text-sm font-medium rounded
9266
9266
  ${p === "PM" ? "bg-blue-600 text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-200"}
@@ -9362,7 +9362,7 @@ const Em = ({
9362
9362
  },
9363
9363
  debugMode: c = !1
9364
9364
  }) => {
9365
- const [f, p] = de({ ...a }), [g, m] = de({}), [w, h] = de({}), [y, C] = de({}), E = $t({}), A = [
9365
+ const [f, p] = de({ ...a }), [b, m] = de({}), [w, h] = de({}), [y, C] = de({}), E = $t({}), A = [
9366
9366
  "hidden",
9367
9367
  "html",
9368
9368
  "linebreak",
@@ -9392,17 +9392,17 @@ const Em = ({
9392
9392
  linebreak: Op
9393
9393
  }),
9394
9394
  []
9395
- ), T = async (b, S = null) => {
9395
+ ), T = async (g, S = null) => {
9396
9396
  if (!e) {
9397
- const N = `apiClient prop is required when using fields with optionsUrl. Field "${b.name}" requires optionsUrl but no apiClient was provided.`;
9397
+ const N = `apiClient prop is required when using fields with optionsUrl. Field "${g.name}" requires optionsUrl but no apiClient was provided.`;
9398
9398
  c && console.error(N), mn.error(N);
9399
9399
  return;
9400
9400
  }
9401
9401
  try {
9402
- const N = await e(`/${b.optionsUrl}`);
9402
+ const N = await e(`/${g.optionsUrl}`);
9403
9403
  let k = [];
9404
- b.type === "select" ? k = [
9405
- { value: "", label: `Select ${b.label.toLowerCase()}` },
9404
+ g.type === "select" ? k = [
9405
+ { value: "", label: `Select ${g.label.toLowerCase()}` },
9406
9406
  ...N.data
9407
9407
  ] : k = [
9408
9408
  ...N.data.map((_) => ({
@@ -9410,10 +9410,10 @@ const Em = ({
9410
9410
  label: _.label
9411
9411
  }))
9412
9412
  ], r.fields.forEach((_) => {
9413
- _.name === b.name && (_.options = k);
9413
+ _.name === g.name && (_.options = k);
9414
9414
  });
9415
9415
  } catch (N) {
9416
- c && console.error(`Failed to load options for ${b.name}:`, N);
9416
+ c && console.error(`Failed to load options for ${g.name}:`, N);
9417
9417
  } finally {
9418
9418
  }
9419
9419
  };
@@ -9431,38 +9431,38 @@ const Em = ({
9431
9431
  }), p(S);
9432
9432
  }
9433
9433
  }, [r]);
9434
- const D = (b, S, N) => {
9435
- const k = typeof S == "object" && S !== null && !Array.isArray(S) && !(S instanceof Date), _ = S == null || typeof S == "string" && S.trim() === "" || Array.isArray(S) && S.length === 0 || b.type === "checkbox" && S === !1 || k && Object.keys(S).length === 0;
9436
- if (b.required && _)
9437
- return c && console.warn(`VALIDATION FAILED (REQUIRED): ${b.name} is empty.`), `${b.label} is required`;
9438
- if (_ && !b.required)
9434
+ const D = (g, S, N) => {
9435
+ const k = typeof S == "object" && S !== null && !Array.isArray(S) && !(S instanceof Date), _ = S == null || typeof S == "string" && S.trim() === "" || Array.isArray(S) && S.length === 0 || g.type === "checkbox" && S === !1 || k && Object.keys(S).length === 0;
9436
+ if (g.required && _)
9437
+ return c && console.warn(`VALIDATION FAILED (REQUIRED): ${g.name} is empty.`), `${g.label} is required`;
9438
+ if (_ && !g.required)
9439
9439
  return null;
9440
- if (b.validate) {
9441
- const R = b.validate(S, N);
9440
+ if (g.validate) {
9441
+ const R = g.validate(S, N);
9442
9442
  if (R) return R;
9443
9443
  }
9444
- if (b.type === "email" && S && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(S))
9444
+ if (g.type === "email" && S && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(S))
9445
9445
  return "Please enter a valid email address";
9446
- if (b.type === "number") {
9447
- if (b.min !== void 0 && S < b.min)
9448
- return `${b.label} must be at least ${b.min}`;
9449
- if (b.max !== void 0 && S > b.max)
9450
- return `${b.label} must be no more than ${b.max}`;
9446
+ if (g.type === "number") {
9447
+ if (g.min !== void 0 && S < g.min)
9448
+ return `${g.label} must be at least ${g.min}`;
9449
+ if (g.max !== void 0 && S > g.max)
9450
+ return `${g.label} must be no more than ${g.max}`;
9451
9451
  }
9452
- return b.type === "date" && S && !Kn(S).isValid() ? `${b.label} must be a valid date` : b.maxLength && S && S.length > b.maxLength ? `${b.label} must not exceed ${b.maxLength} characters` : null;
9453
- }, O = (b, S) => {
9454
- const N = r.fields.find((_) => _.name === b);
9452
+ return g.type === "date" && S && !Kn(S).isValid() ? `${g.label} must be a valid date` : g.maxLength && S && S.length > g.maxLength ? `${g.label} must not exceed ${g.maxLength} characters` : null;
9453
+ }, O = (g, S) => {
9454
+ const N = r.fields.find((_) => _.name === g);
9455
9455
  if (!N) return;
9456
9456
  const k = { ...f };
9457
- N.type === "multiselect" || N.type === "searchselect" ? k[b] = Array.isArray(S) ? S : Array.from(S.target.selectedOptions).map(
9457
+ N.type === "multiselect" || N.type === "searchselect" ? Array.isArray(S) ? k[g] = S : S && S.target && S.target.selectedOptions ? k[g] = Array.from(S.target.selectedOptions).map(
9458
9458
  (_) => _.value
9459
- ) : N.type === "dateRange" ? k[b] = [
9459
+ ) : k[g] = S : N.type === "dateRange" ? k[g] = [
9460
9460
  {
9461
9461
  startDate: S[0].from,
9462
9462
  endDate: S[0].to,
9463
9463
  key: "selection"
9464
9464
  }
9465
- ] : N.type === "dayTimePicker" ? k[b] = S ? Kn(S).format("YYYY-MM-DD HH:mm:ss") : "" : N.type === "number" ? k[b] = S === "" ? "" : Number(S) : k[b] = S, N.type === "select" && r.fields.forEach((_) => {
9465
+ ] : N.type === "dayTimePicker" ? k[g] = S ? Kn(S).format("YYYY-MM-DD HH:mm:ss") : "" : N.type === "number" ? k[g] = S === "" ? "" : Number(S) : k[g] = S, N.type === "select" && r.fields.forEach((_) => {
9466
9466
  if (_.showIf && !_.showIf(k)) {
9467
9467
  const R = _.type === "multiselect" || _.type === "searchselect" || _.type === "checkbox" && _.options && _.options.length > 0;
9468
9468
  k[_.name] = R ? [] : "";
@@ -9473,10 +9473,10 @@ const Em = ({
9473
9473
  k[_.name] = R ? [] : "";
9474
9474
  }
9475
9475
  }), p(k);
9476
- }, P = (b) => {
9477
- h({ ...w, [b]: !0 });
9478
- }, W = (b) => {
9479
- b.preventDefault();
9476
+ }, P = (g) => {
9477
+ h({ ...w, [g]: !0 });
9478
+ }, W = (g) => {
9479
+ g.preventDefault();
9480
9480
  const S = {};
9481
9481
  r.fields.forEach((k) => {
9482
9482
  k.name && (S[k.name] = !0);
@@ -9536,13 +9536,13 @@ const Em = ({
9536
9536
  pink: "border-pink-500 bg-pink-50",
9537
9537
  orange: "border-orange-500 bg-orange-50"
9538
9538
  };
9539
- function U(b, S, N) {
9539
+ function U(g, S, N) {
9540
9540
  if (c && (N ? console.log(
9541
9541
  `[fieldFormat RENDER] Rendering error for ${S.name}: ${N}`
9542
- ) : g[S.name] && console.log(
9542
+ ) : b[S.name] && console.log(
9543
9543
  `[fieldFormat RENDER] Error exists in state for ${S.name} but not passed in props!`
9544
9544
  )), A.includes(S.type))
9545
- return /* @__PURE__ */ u("div", { className: S.fieldClass || "col-span-full", children: b });
9545
+ return /* @__PURE__ */ u("div", { className: S.fieldClass || "col-span-full", children: g });
9546
9546
  const k = S.containerStyle, _ = S.color || "blue", R = k === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${S.containerClassName || H[_] || H.blue}` : "", K = /* @__PURE__ */ M(Ke, { children: [
9547
9547
  S.label && /* @__PURE__ */ M(
9548
9548
  "label",
@@ -9555,29 +9555,29 @@ const Em = ({
9555
9555
  ]
9556
9556
  }
9557
9557
  ),
9558
- /* @__PURE__ */ u("div", { children: b }),
9558
+ /* @__PURE__ */ u("div", { children: g }),
9559
9559
  N && /* @__PURE__ */ u("p", { className: "text-sm text-red-500 mt-1", children: N })
9560
9560
  ] });
9561
9561
  return /* @__PURE__ */ u("div", { className: `mb-4 ${S.fieldClass || "col-span-8"}`, children: k === "card" ? /* @__PURE__ */ u("div", { className: R, children: K }) : K });
9562
9562
  }
9563
- const V = (b) => {
9564
- if (b.showIf && !b.showIf(f)) return null;
9565
- const S = x[b.type] || Uo;
9566
- if (f[b.name] === void 0) {
9567
- const _ = b.type === "multiselect" || b.type === "searchselect" || b.type === "checkbox" && b.options && b.options.length > 0;
9568
- f[b.name] = b.value !== void 0 ? b.value : _ ? [] : "";
9563
+ const V = (g) => {
9564
+ if (g.showIf && !g.showIf(f)) return null;
9565
+ const S = x[g.type] || Uo;
9566
+ if (f[g.name] === void 0) {
9567
+ const _ = g.type === "multiselect" || g.type === "searchselect" || g.type === "checkbox" && g.options && g.options.length > 0;
9568
+ f[g.name] = g.value !== void 0 ? g.value : _ ? [] : "";
9569
9569
  }
9570
- const N = g[b.name] ? g[b.name] : null, k = typeof b.disabled == "function" ? b.disabled(f) : !!b.disabled;
9570
+ const N = b[g.name] ? b[g.name] : null, k = typeof g.disabled == "function" ? g.disabled(f) : !!g.disabled;
9571
9571
  return U(
9572
9572
  /* @__PURE__ */ u(
9573
9573
  S,
9574
9574
  {
9575
- field: b,
9575
+ field: g,
9576
9576
  formValues: f,
9577
9577
  handleChange: O,
9578
- handleBlur: () => P(b.name),
9578
+ handleBlur: () => P(g.name),
9579
9579
  setCharCounts: C,
9580
- charCount: y[b.name] || 0,
9580
+ charCount: y[g.name] || 0,
9581
9581
  api_URL: t,
9582
9582
  error: N,
9583
9583
  fileInputRefs: E,
@@ -9585,7 +9585,7 @@ const Em = ({
9585
9585
  apiClient: e
9586
9586
  }
9587
9587
  ),
9588
- b,
9588
+ g,
9589
9589
  N
9590
9590
  );
9591
9591
  };
@@ -9595,16 +9595,16 @@ const Em = ({
9595
9595
  onSubmit: W,
9596
9596
  className: "grid grid-cols-12 gap-x-4 mx-auto w-full  ",
9597
9597
  children: [
9598
- r ? r.fields.map((b) => /* @__PURE__ */ u("div", { className: "col-span-full", children: V(b) }, b.name + b.type)) : /* @__PURE__ */ u("div", { children: "Loading..." }),
9598
+ r ? r.fields.map((g) => /* @__PURE__ */ u("div", { className: "col-span-full", children: V(g) }, g.name + g.type)) : /* @__PURE__ */ u("div", { children: "Loading..." }),
9599
9599
  /* @__PURE__ */ u(
9600
9600
  "div",
9601
9601
  {
9602
9602
  className: n === "sticky" ? "absolute col-span-full w-full bottom-0  bg-white py-4 flex justify-end gap-2 z-50" : "col-span-full mt-4 flex justify-end gap-2",
9603
- children: Pe.Children.map(i, (b) => Pe.isValidElement(b) && b.props.onClick ? Pe.cloneElement(b, {
9603
+ children: Pe.Children.map(i, (g) => Pe.isValidElement(g) && g.props.onClick ? Pe.cloneElement(g, {
9604
9604
  onClick: (S) => {
9605
- b.props.onClick(f, S);
9605
+ g.props.onClick(f, S);
9606
9606
  }
9607
- }) : b)
9607
+ }) : g)
9608
9608
  }
9609
9609
  )
9610
9610
  ]