@overmap-ai/forms 1.0.17-blank-value-updates.1 → 1.0.17-blank-value-updates.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/forms.js CHANGED
@@ -1,22 +1,22 @@
1
- var pr = Object.defineProperty;
2
- var gr = (t, n, e) => n in t ? pr(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
3
- var R = (t, n, e) => gr(t, typeof n != "symbol" ? n + "" : n, e);
1
+ var hr = Object.defineProperty;
2
+ var pr = (t, n, e) => n in t ? hr(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
3
+ var R = (t, n, e) => pr(t, typeof n != "symbol" ? n + "" : n, e);
4
4
  import { jsxs as C, jsx as a, Fragment as be } from "react/jsx-runtime";
5
- import { Popover as le, IconButton as V, RiIcon as F, Text as ge, Spinner as wt, ButtonGroup as xt, Tooltip as Ne, Separator as Yt, Checkbox as lt, Button as Q, DayPicker as vr, useToast as Ct, Input as pe, Badge as zt, Card as He, Menu as B, TextArea as Jn, Heading as Zn, HoverCard as Tt, useAlertDialog as yr, Tabs as Te, useSize as br, IconToggleButton as wr } from "@overmap-ai/blocks";
5
+ import { Popover as le, IconButton as V, RiIcon as F, Text as ge, Spinner as wt, ButtonGroup as xt, Tooltip as Ne, Separator as Yt, Checkbox as lt, Button as Q, DayPicker as gr, useToast as Ct, Input as pe, Badge as zt, Card as He, Menu as B, TextArea as Qn, Heading as Jn, HoverCard as Tt, useAlertDialog as vr, Tabs as Te, useSize as yr, IconToggleButton as br } from "@overmap-ai/blocks";
6
6
  import * as p from "react";
7
- import { memo as O, useCallback as S, useMemo as k, forwardRef as Xe, createContext as ei, useContext as xr, useState as U, useRef as me, useEffect as Y, Fragment as ti, useLayoutEffect as Qt, useId as Cr, use as Jt, useReducer as Er } from "react";
8
- import { useField as Zt, useFormikContext as Ie, useFormik as en, FormikProvider as tn } from "formik";
9
- import * as Ir from "react-dom";
10
- import Rr from "react-dom";
11
- import { RiCheckboxCircleLine as Sr, RiCalendarLine as Nr, RiListCheck as Tr, RiHashtag as Lr, RiQrCodeLine as Fr, RiCheckboxLine as Dr, RiMenuFoldLine as Ar, RiInputField as Or, RiAlignJustify as Pr, RiUpload2Line as kr, RiFileCopyLine as Mr, RiDeleteBin7Fill as zr, RiImageLine as _r, RiArrowDownLine as Br, RiArrowUpLine as $r } from "react-icons/ri";
7
+ import { memo as O, useCallback as S, useMemo as k, forwardRef as Xe, createContext as Zn, useContext as wr, useState as U, useRef as me, useEffect as G, Fragment as ei, useId as xr, use as Qt, useReducer as Cr } from "react";
8
+ import { useField as Jt, useFormikContext as Ie, useFormik as Zt, FormikProvider as en } from "formik";
9
+ import * as Er from "react-dom";
10
+ import Ir from "react-dom";
11
+ import { RiCheckboxCircleLine as Rr, RiCalendarLine as Sr, RiListCheck as Nr, RiHashtag as Tr, RiQrCodeLine as Lr, RiCheckboxLine as Fr, RiMenuFoldLine as Dr, RiInputField as Ar, RiAlignJustify as Or, RiUpload2Line as Pr, RiFileCopyLine as kr, RiDeleteBin7Fill as Mr, RiImageLine as zr, RiArrowDownLine as _r, RiArrowUpLine as Br } from "react-icons/ri";
12
12
  import oe from "lodash.get";
13
13
  import Et from "lodash.set";
14
- import { DragDropContext as ni, Droppable as nn, Draggable as rn } from "@hello-pangea/dnd";
15
- import Vr from "qr-scanner";
16
- import Ur from "lodash.clonedeep";
17
- import { Colors as ii, fileToBlob as ri, hashFile as Fn, DeferredPromise as jr } from "@overmap-ai/core";
18
- import { ReactSketchCanvas as Wr } from "react-sketch-canvas";
19
- const oi = O((t) => {
14
+ import { DragDropContext as ti, Droppable as tn, Draggable as nn } from "@hello-pangea/dnd";
15
+ import $r from "qr-scanner";
16
+ import Vr from "lodash.clonedeep";
17
+ import { Colors as ni, fileToBlob as ii, hashFile as Ln, DeferredPromise as Ur } from "@overmap-ai/core";
18
+ import { ReactSketchCanvas as jr } from "react-sketch-canvas";
19
+ const ri = O((t) => {
20
20
  const { selectedColor: n, allColors: e, onFinish: i, trigger: r } = t, o = S(
21
21
  (s) => () => {
22
22
  i(s);
@@ -41,33 +41,33 @@ const oi = O((t) => {
41
41
  )) }) })
42
42
  ] });
43
43
  });
44
- oi.displayName = "ColorPicker";
45
- function si(t) {
44
+ ri.displayName = "ColorPicker";
45
+ function oi(t) {
46
46
  var n, e, i = "";
47
47
  if (typeof t == "string" || typeof t == "number") i += t;
48
48
  else if (typeof t == "object") if (Array.isArray(t)) {
49
49
  var r = t.length;
50
- for (n = 0; n < r; n++) t[n] && (e = si(t[n])) && (i && (i += " "), i += e);
50
+ for (n = 0; n < r; n++) t[n] && (e = oi(t[n])) && (i && (i += " "), i += e);
51
51
  } else for (e in t) t[e] && (i && (i += " "), i += e);
52
52
  return i;
53
53
  }
54
- function qr() {
55
- for (var t, n, e = 0, i = "", r = arguments.length; e < r; e++) (t = arguments[e]) && (n = si(t)) && (i && (i += " "), i += n);
54
+ function Wr() {
55
+ for (var t, n, e = 0, i = "", r = arguments.length; e < r; e++) (t = arguments[e]) && (n = oi(t)) && (i && (i += " "), i += n);
56
56
  return i;
57
57
  }
58
- const qe = qr, Hr = ["image/jpeg", "image/png", "image/svg+xml"], Gr = [
58
+ const qe = Wr, qr = ["image/jpeg", "image/png", "image/svg+xml"], Hr = [
59
59
  // .csv
60
60
  "text/csv",
61
61
  // .xlsx
62
62
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
63
63
  // .xls
64
64
  "application/vnd.ms-excel"
65
- ], Xr = ["application/pdf"], on = O((t) => {
66
- const { fileType: n } = t, e = k(() => Gr.includes(n) ? /* @__PURE__ */ a(F, { icon: "RiFileExcelLine" }) : Xr.includes(n) ? /* @__PURE__ */ a(F, { icon: "RiFilePdfLine" }) : Hr.includes(n) ? /* @__PURE__ */ a(F, { icon: "RiFileImageLine" }) : /* @__PURE__ */ a(F, { icon: "RiFileLine" }), [n]);
65
+ ], Gr = ["application/pdf"], rn = O((t) => {
66
+ const { fileType: n } = t, e = k(() => Hr.includes(n) ? /* @__PURE__ */ a(F, { icon: "RiFileExcelLine" }) : Gr.includes(n) ? /* @__PURE__ */ a(F, { icon: "RiFilePdfLine" }) : qr.includes(n) ? /* @__PURE__ */ a(F, { icon: "RiFileImageLine" }) : /* @__PURE__ */ a(F, { icon: "RiFileLine" }), [n]);
67
67
  return /* @__PURE__ */ a("div", { className: "h-max w-max", children: e });
68
68
  });
69
- on.displayName = "FileIcon";
70
- const ai = O(
69
+ rn.displayName = "FileIcon";
70
+ const si = O(
71
71
  Xe((t, n) => {
72
72
  const { file: e, className: i, error: r, rightSlot: o, ...s } = t;
73
73
  return /* @__PURE__ */ C(
@@ -83,7 +83,7 @@ const ai = O(
83
83
  ref: n,
84
84
  ...s,
85
85
  children: [
86
- r ? /* @__PURE__ */ a(F, { icon: "RiFileWarningLine" }) : /* @__PURE__ */ a(on, { fileType: (e == null ? void 0 : e.type) ?? "" }),
86
+ r ? /* @__PURE__ */ a(F, { icon: "RiFileWarningLine" }) : /* @__PURE__ */ a(rn, { fileType: (e == null ? void 0 : e.type) ?? "" }),
87
87
  r || (e ? /* @__PURE__ */ a(ge, { className: "truncate", children: e.name }) : /* @__PURE__ */ a("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ a(wt, {}) })),
88
88
  o
89
89
  ]
@@ -91,13 +91,13 @@ const ai = O(
91
91
  );
92
92
  })
93
93
  );
94
- ai.displayName = "FileCard";
94
+ si.displayName = "FileCard";
95
95
  const nt = 500, Ue = 1e4, we = {
96
96
  danger: "danger",
97
97
  warning: "warning",
98
98
  info: "base",
99
99
  success: "success"
100
- }, Ea = {
100
+ }, Ca = {
101
101
  boolean: "RiCheckboxCircleLine",
102
102
  date: "RiCalendarLine",
103
103
  "multi-string": "RiListCheck",
@@ -111,7 +111,7 @@ const nt = 500, Ue = 1e4, we = {
111
111
  custom: "RiCodeSSlashLine",
112
112
  section: "RiFolderLine"
113
113
  };
114
- class li {
114
+ class ai {
115
115
  constructor(n) {
116
116
  R(this, "type");
117
117
  R(this, "identifier");
@@ -140,7 +140,7 @@ const ee = {
140
140
  description: "",
141
141
  required: !1
142
142
  };
143
- class K extends li {
143
+ class Y extends ai {
144
144
  constructor(e) {
145
145
  const { label: i, required: r, image: o, fieldValidators: s = [], formValidators: l = [], ...m } = e;
146
146
  super(m);
@@ -202,9 +202,9 @@ class K extends li {
202
202
  return JSON.parse(e);
203
203
  }
204
204
  }
205
- R(K, "fieldTypeName"), R(K, "fieldTypeDescription");
205
+ R(Y, "fieldTypeName"), R(Y, "fieldTypeDescription");
206
206
  const Z = (t) => {
207
- const { id: n, field: e, formId: i, size: r, showInputOnly: o, onValuesChange: s, ...l } = t, [m, c, d] = Zt(e.getId()), { touched: u } = c, h = c.error ?? e.description, y = c.error ? "danger" : void 0, b = n ?? `${i}-${e.getId()}-input`, f = `${b}-label`, v = e.required ? `${e.label} *` : e.label, w = k(() => ({
207
+ const { id: n, field: e, formId: i, size: r, showInputOnly: o, onValuesChange: s, ...l } = t, [m, c, d] = Jt(e.getId()), { touched: u } = c, h = c.error ?? e.description, y = c.error ? "danger" : void 0, b = n ?? `${i}-${e.getId()}-input`, f = `${b}-label`, v = e.required ? `${e.label} *` : e.label, w = k(() => ({
208
208
  ...m,
209
209
  // name and value not being overridden
210
210
  onChange: (I) => {
@@ -231,40 +231,40 @@ const Z = (t) => {
231
231
  /* Props that should be spread on the html element representing the field */
232
232
  { ...l, "aria-labelledby": f }
233
233
  ];
234
- }, ci = ei(() => {
234
+ }, li = Zn(() => {
235
235
  throw new Error("No ImageViewerProvider found");
236
- }), sn = () => xr(ci);
236
+ }), on = () => wr(li);
237
237
  function he(t, n, { checkForDefaultPrevented: e = !0 } = {}) {
238
238
  return function(r) {
239
239
  if (t == null || t(r), e === !1 || !r.defaultPrevented)
240
240
  return n == null ? void 0 : n(r);
241
241
  };
242
242
  }
243
- function Dn(t, n) {
243
+ function Fn(t, n) {
244
244
  if (typeof t == "function")
245
245
  return t(n);
246
246
  t != null && (t.current = n);
247
247
  }
248
- function di(...t) {
248
+ function ci(...t) {
249
249
  return (n) => {
250
250
  let e = !1;
251
251
  const i = t.map((r) => {
252
- const o = Dn(r, n);
252
+ const o = Fn(r, n);
253
253
  return !e && typeof o == "function" && (e = !0), o;
254
254
  });
255
255
  if (e)
256
256
  return () => {
257
257
  for (let r = 0; r < i.length; r++) {
258
258
  const o = i[r];
259
- typeof o == "function" ? o() : Dn(t[r], null);
259
+ typeof o == "function" ? o() : Fn(t[r], null);
260
260
  }
261
261
  };
262
262
  };
263
263
  }
264
264
  function Re(...t) {
265
- return p.useCallback(di(...t), t);
265
+ return p.useCallback(ci(...t), t);
266
266
  }
267
- function Kr(t, n) {
267
+ function Xr(t, n) {
268
268
  const e = p.createContext(n), i = (o) => {
269
269
  const { children: s, ...l } = o, m = p.useMemo(() => l, Object.values(l));
270
270
  return /* @__PURE__ */ a(e.Provider, { value: m, children: s });
@@ -278,7 +278,7 @@ function Kr(t, n) {
278
278
  }
279
279
  return [i, r];
280
280
  }
281
- function Yr(t, n = []) {
281
+ function Kr(t, n = []) {
282
282
  let e = [];
283
283
  function i(o, s) {
284
284
  const l = p.createContext(s), m = e.length;
@@ -308,9 +308,9 @@ function Yr(t, n = []) {
308
308
  );
309
309
  };
310
310
  };
311
- return r.scopeName = t, [i, Qr(r, ...n)];
311
+ return r.scopeName = t, [i, Yr(r, ...n)];
312
312
  }
313
- function Qr(...t) {
313
+ function Yr(...t) {
314
314
  const n = t[0];
315
315
  if (t.length === 1) return n;
316
316
  const e = () => {
@@ -329,12 +329,12 @@ function Qr(...t) {
329
329
  return e.scopeName = n.scopeName, e;
330
330
  }
331
331
  var ct = globalThis != null && globalThis.document ? p.useLayoutEffect : () => {
332
- }, Jr = p.useId || (() => {
333
- }), Zr = 0;
332
+ }, Qr = p.useId || (() => {
333
+ }), Jr = 0;
334
334
  function Lt(t) {
335
- const [n, e] = p.useState(Jr());
335
+ const [n, e] = p.useState(Qr());
336
336
  return ct(() => {
337
- e((i) => i ?? String(Zr++));
337
+ e((i) => i ?? String(Jr++));
338
338
  }, [t]), t || (n ? `radix-${n}` : "");
339
339
  }
340
340
  function xe(t) {
@@ -346,13 +346,13 @@ function xe(t) {
346
346
  return (i = n.current) == null ? void 0 : i.call(n, ...e);
347
347
  }, []);
348
348
  }
349
- function eo({
349
+ function Zr({
350
350
  prop: t,
351
351
  defaultProp: n,
352
352
  onChange: e = () => {
353
353
  }
354
354
  }) {
355
- const [i, r] = to({ defaultProp: n, onChange: e }), o = t !== void 0, s = o ? t : i, l = xe(e), m = p.useCallback(
355
+ const [i, r] = eo({ defaultProp: n, onChange: e }), o = t !== void 0, s = o ? t : i, l = xe(e), m = p.useCallback(
356
356
  (c) => {
357
357
  if (o) {
358
358
  const u = typeof c == "function" ? c(t) : c;
@@ -364,7 +364,7 @@ function eo({
364
364
  );
365
365
  return [s, m];
366
366
  }
367
- function to({
367
+ function eo({
368
368
  defaultProp: t,
369
369
  onChange: n
370
370
  }) {
@@ -373,33 +373,33 @@ function to({
373
373
  r.current !== i && (o(i), r.current = i);
374
374
  }, [i, r, o]), e;
375
375
  }
376
- var an = p.forwardRef((t, n) => {
377
- const { children: e, ...i } = t, r = p.Children.toArray(e), o = r.find(io);
376
+ var sn = p.forwardRef((t, n) => {
377
+ const { children: e, ...i } = t, r = p.Children.toArray(e), o = r.find(no);
378
378
  if (o) {
379
379
  const s = o.props.children, l = r.map((m) => m === o ? p.Children.count(s) > 1 ? p.Children.only(null) : p.isValidElement(s) ? s.props.children : null : m);
380
380
  return /* @__PURE__ */ a(_t, { ...i, ref: n, children: p.isValidElement(s) ? p.cloneElement(s, void 0, l) : null });
381
381
  }
382
382
  return /* @__PURE__ */ a(_t, { ...i, ref: n, children: e });
383
383
  });
384
- an.displayName = "Slot";
384
+ sn.displayName = "Slot";
385
385
  var _t = p.forwardRef((t, n) => {
386
386
  const { children: e, ...i } = t;
387
387
  if (p.isValidElement(e)) {
388
- const r = oo(e);
388
+ const r = ro(e);
389
389
  return p.cloneElement(e, {
390
- ...ro(i, e.props),
390
+ ...io(i, e.props),
391
391
  // @ts-ignore
392
- ref: n ? di(n, r) : r
392
+ ref: n ? ci(n, r) : r
393
393
  });
394
394
  }
395
395
  return p.Children.count(e) > 1 ? p.Children.only(null) : null;
396
396
  });
397
397
  _t.displayName = "SlotClone";
398
- var no = ({ children: t }) => /* @__PURE__ */ a(be, { children: t });
399
- function io(t) {
400
- return p.isValidElement(t) && t.type === no;
398
+ var to = ({ children: t }) => /* @__PURE__ */ a(be, { children: t });
399
+ function no(t) {
400
+ return p.isValidElement(t) && t.type === to;
401
401
  }
402
- function ro(t, n) {
402
+ function io(t, n) {
403
403
  const e = { ...n };
404
404
  for (const i in n) {
405
405
  const r = t[i], o = n[i];
@@ -409,12 +409,12 @@ function ro(t, n) {
409
409
  }
410
410
  return { ...t, ...e };
411
411
  }
412
- function oo(t) {
412
+ function ro(t) {
413
413
  var i, r;
414
414
  let n = (i = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : i.get, e = n && "isReactWarning" in n && n.isReactWarning;
415
415
  return e ? t.ref : (n = (r = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : r.get, e = n && "isReactWarning" in n && n.isReactWarning, e ? t.props.ref : t.props.ref || t.ref);
416
416
  }
417
- var so = [
417
+ var oo = [
418
418
  "a",
419
419
  "button",
420
420
  "div",
@@ -431,17 +431,17 @@ var so = [
431
431
  "span",
432
432
  "svg",
433
433
  "ul"
434
- ], ce = so.reduce((t, n) => {
434
+ ], ce = oo.reduce((t, n) => {
435
435
  const e = p.forwardRef((i, r) => {
436
- const { asChild: o, ...s } = i, l = o ? an : n;
436
+ const { asChild: o, ...s } = i, l = o ? sn : n;
437
437
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ a(l, { ...s, ref: r });
438
438
  });
439
439
  return e.displayName = `Primitive.${n}`, { ...t, [n]: e };
440
440
  }, {});
441
- function ao(t, n) {
442
- t && Ir.flushSync(() => t.dispatchEvent(n));
441
+ function so(t, n) {
442
+ t && Er.flushSync(() => t.dispatchEvent(n));
443
443
  }
444
- function lo(t, n = globalThis == null ? void 0 : globalThis.document) {
444
+ function ao(t, n = globalThis == null ? void 0 : globalThis.document) {
445
445
  const e = xe(t);
446
446
  p.useEffect(() => {
447
447
  const i = (r) => {
@@ -450,11 +450,11 @@ function lo(t, n = globalThis == null ? void 0 : globalThis.document) {
450
450
  return n.addEventListener("keydown", i, { capture: !0 }), () => n.removeEventListener("keydown", i, { capture: !0 });
451
451
  }, [e, n]);
452
452
  }
453
- var co = "DismissableLayer", Bt = "dismissableLayer.update", uo = "dismissableLayer.pointerDownOutside", fo = "dismissableLayer.focusOutside", An, ui = p.createContext({
453
+ var lo = "DismissableLayer", Bt = "dismissableLayer.update", co = "dismissableLayer.pointerDownOutside", uo = "dismissableLayer.focusOutside", Dn, di = p.createContext({
454
454
  layers: /* @__PURE__ */ new Set(),
455
455
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
456
456
  branches: /* @__PURE__ */ new Set()
457
- }), fi = p.forwardRef(
457
+ }), ui = p.forwardRef(
458
458
  (t, n) => {
459
459
  const {
460
460
  disableOutsidePointerEvents: e = !1,
@@ -464,22 +464,22 @@ var co = "DismissableLayer", Bt = "dismissableLayer.update", uo = "dismissableLa
464
464
  onInteractOutside: s,
465
465
  onDismiss: l,
466
466
  ...m
467
- } = t, c = p.useContext(ui), [d, u] = p.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, y] = p.useState({}), b = Re(n, (N) => u(N)), f = Array.from(c.layers), [v] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), w = f.indexOf(v), x = d ? f.indexOf(d) : -1, g = c.layersWithOutsidePointerEventsDisabled.size > 0, I = x >= w, E = po((N) => {
467
+ } = t, c = p.useContext(di), [d, u] = p.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, y] = p.useState({}), b = Re(n, (N) => u(N)), f = Array.from(c.layers), [v] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), w = f.indexOf(v), x = d ? f.indexOf(d) : -1, g = c.layersWithOutsidePointerEventsDisabled.size > 0, I = x >= w, E = ho((N) => {
468
468
  const L = N.target, D = [...c.branches].some((M) => M.contains(L));
469
469
  !I || D || (r == null || r(N), s == null || s(N), N.defaultPrevented || l == null || l());
470
- }, h), T = go((N) => {
470
+ }, h), T = po((N) => {
471
471
  const L = N.target;
472
472
  [...c.branches].some((M) => M.contains(L)) || (o == null || o(N), s == null || s(N), N.defaultPrevented || l == null || l());
473
473
  }, h);
474
- return lo((N) => {
474
+ return ao((N) => {
475
475
  x === c.layers.size - 1 && (i == null || i(N), !N.defaultPrevented && l && (N.preventDefault(), l()));
476
476
  }, h), p.useEffect(() => {
477
477
  if (d)
478
- return e && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (An = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(d)), c.layers.add(d), On(), () => {
479
- e && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = An);
478
+ return e && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (Dn = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(d)), c.layers.add(d), An(), () => {
479
+ e && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = Dn);
480
480
  };
481
481
  }, [d, h, e, c]), p.useEffect(() => () => {
482
- d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), On());
482
+ d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), An());
483
483
  }, [d, c]), p.useEffect(() => {
484
484
  const N = () => y({});
485
485
  return document.addEventListener(Bt, N), () => document.removeEventListener(Bt, N);
@@ -502,9 +502,9 @@ var co = "DismissableLayer", Bt = "dismissableLayer.update", uo = "dismissableLa
502
502
  );
503
503
  }
504
504
  );
505
- fi.displayName = co;
506
- var mo = "DismissableLayerBranch", ho = p.forwardRef((t, n) => {
507
- const e = p.useContext(ui), i = p.useRef(null), r = Re(n, i);
505
+ ui.displayName = lo;
506
+ var fo = "DismissableLayerBranch", mo = p.forwardRef((t, n) => {
507
+ const e = p.useContext(di), i = p.useRef(null), r = Re(n, i);
508
508
  return p.useEffect(() => {
509
509
  const o = i.current;
510
510
  if (o)
@@ -513,16 +513,16 @@ var mo = "DismissableLayerBranch", ho = p.forwardRef((t, n) => {
513
513
  };
514
514
  }, [e.branches]), /* @__PURE__ */ a(ce.div, { ...t, ref: r });
515
515
  });
516
- ho.displayName = mo;
517
- function po(t, n = globalThis == null ? void 0 : globalThis.document) {
516
+ mo.displayName = fo;
517
+ function ho(t, n = globalThis == null ? void 0 : globalThis.document) {
518
518
  const e = xe(t), i = p.useRef(!1), r = p.useRef(() => {
519
519
  });
520
520
  return p.useEffect(() => {
521
521
  const o = (l) => {
522
522
  if (l.target && !i.current) {
523
523
  let m = function() {
524
- mi(
525
- uo,
524
+ fi(
525
+ co,
526
526
  e,
527
527
  c,
528
528
  { discrete: !0 }
@@ -544,11 +544,11 @@ function po(t, n = globalThis == null ? void 0 : globalThis.document) {
544
544
  onPointerDownCapture: () => i.current = !0
545
545
  };
546
546
  }
547
- function go(t, n = globalThis == null ? void 0 : globalThis.document) {
547
+ function po(t, n = globalThis == null ? void 0 : globalThis.document) {
548
548
  const e = xe(t), i = p.useRef(!1);
549
549
  return p.useEffect(() => {
550
550
  const r = (o) => {
551
- o.target && !i.current && mi(fo, e, { originalEvent: o }, {
551
+ o.target && !i.current && fi(uo, e, { originalEvent: o }, {
552
552
  discrete: !1
553
553
  });
554
554
  };
@@ -558,15 +558,15 @@ function go(t, n = globalThis == null ? void 0 : globalThis.document) {
558
558
  onBlurCapture: () => i.current = !1
559
559
  };
560
560
  }
561
- function On() {
561
+ function An() {
562
562
  const t = new CustomEvent(Bt);
563
563
  document.dispatchEvent(t);
564
564
  }
565
- function mi(t, n, e, { discrete: i }) {
565
+ function fi(t, n, e, { discrete: i }) {
566
566
  const r = e.originalEvent.target, o = new CustomEvent(t, { bubbles: !1, cancelable: !0, detail: e });
567
- n && r.addEventListener(t, n, { once: !0 }), i ? ao(r, o) : r.dispatchEvent(o);
567
+ n && r.addEventListener(t, n, { once: !0 }), i ? so(r, o) : r.dispatchEvent(o);
568
568
  }
569
- var Ft = "focusScope.autoFocusOnMount", Dt = "focusScope.autoFocusOnUnmount", Pn = { bubbles: !1, cancelable: !0 }, vo = "FocusScope", hi = p.forwardRef((t, n) => {
569
+ var Ft = "focusScope.autoFocusOnMount", Dt = "focusScope.autoFocusOnUnmount", On = { bubbles: !1, cancelable: !0 }, go = "FocusScope", mi = p.forwardRef((t, n) => {
570
570
  const {
571
571
  loop: e = !1,
572
572
  trapped: i = !1,
@@ -605,16 +605,16 @@ var Ft = "focusScope.autoFocusOnMount", Dt = "focusScope.autoFocusOnUnmount", Pn
605
605
  }
606
606
  }, [i, l, y.paused]), p.useEffect(() => {
607
607
  if (l) {
608
- Mn.add(y);
608
+ kn.add(y);
609
609
  const f = document.activeElement;
610
610
  if (!l.contains(f)) {
611
- const w = new CustomEvent(Ft, Pn);
612
- l.addEventListener(Ft, c), l.dispatchEvent(w), w.defaultPrevented || (yo(Eo(pi(l)), { select: !0 }), document.activeElement === f && fe(l));
611
+ const w = new CustomEvent(Ft, On);
612
+ l.addEventListener(Ft, c), l.dispatchEvent(w), w.defaultPrevented || (vo(Co(hi(l)), { select: !0 }), document.activeElement === f && fe(l));
613
613
  }
614
614
  return () => {
615
615
  l.removeEventListener(Ft, c), setTimeout(() => {
616
- const w = new CustomEvent(Dt, Pn);
617
- l.addEventListener(Dt, d), l.dispatchEvent(w), w.defaultPrevented || fe(f ?? document.body, { select: !0 }), l.removeEventListener(Dt, d), Mn.remove(y);
616
+ const w = new CustomEvent(Dt, On);
617
+ l.addEventListener(Dt, d), l.dispatchEvent(w), w.defaultPrevented || fe(f ?? document.body, { select: !0 }), l.removeEventListener(Dt, d), kn.remove(y);
618
618
  }, 0);
619
619
  };
620
620
  }
@@ -624,7 +624,7 @@ var Ft = "focusScope.autoFocusOnMount", Dt = "focusScope.autoFocusOnUnmount", Pn
624
624
  if (!e && !i || y.paused) return;
625
625
  const v = f.key === "Tab" && !f.altKey && !f.ctrlKey && !f.metaKey, w = document.activeElement;
626
626
  if (v && w) {
627
- const x = f.currentTarget, [g, I] = bo(x);
627
+ const x = f.currentTarget, [g, I] = yo(x);
628
628
  g && I ? !f.shiftKey && w === I ? (f.preventDefault(), e && fe(g, { select: !0 })) : f.shiftKey && w === g && (f.preventDefault(), e && fe(I, { select: !0 })) : w === x && f.preventDefault();
629
629
  }
630
630
  },
@@ -632,17 +632,17 @@ var Ft = "focusScope.autoFocusOnMount", Dt = "focusScope.autoFocusOnUnmount", Pn
632
632
  );
633
633
  return /* @__PURE__ */ a(ce.div, { tabIndex: -1, ...s, ref: h, onKeyDown: b });
634
634
  });
635
- hi.displayName = vo;
636
- function yo(t, { select: n = !1 } = {}) {
635
+ mi.displayName = go;
636
+ function vo(t, { select: n = !1 } = {}) {
637
637
  const e = document.activeElement;
638
638
  for (const i of t)
639
639
  if (fe(i, { select: n }), document.activeElement !== e) return;
640
640
  }
641
- function bo(t) {
642
- const n = pi(t), e = kn(n, t), i = kn(n.reverse(), t);
641
+ function yo(t) {
642
+ const n = hi(t), e = Pn(n, t), i = Pn(n.reverse(), t);
643
643
  return [e, i];
644
644
  }
645
- function pi(t) {
645
+ function hi(t) {
646
646
  const n = [], e = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
647
647
  acceptNode: (i) => {
648
648
  const r = i.tagName === "INPUT" && i.type === "hidden";
@@ -652,11 +652,11 @@ function pi(t) {
652
652
  for (; e.nextNode(); ) n.push(e.currentNode);
653
653
  return n;
654
654
  }
655
- function kn(t, n) {
655
+ function Pn(t, n) {
656
656
  for (const e of t)
657
- if (!wo(e, { upTo: n })) return e;
657
+ if (!bo(e, { upTo: n })) return e;
658
658
  }
659
- function wo(t, { upTo: n }) {
659
+ function bo(t, { upTo: n }) {
660
660
  if (getComputedStyle(t).visibility === "hidden") return !0;
661
661
  for (; t; ) {
662
662
  if (n !== void 0 && t === n) return !1;
@@ -665,54 +665,54 @@ function wo(t, { upTo: n }) {
665
665
  }
666
666
  return !1;
667
667
  }
668
- function xo(t) {
668
+ function wo(t) {
669
669
  return t instanceof HTMLInputElement && "select" in t;
670
670
  }
671
671
  function fe(t, { select: n = !1 } = {}) {
672
672
  if (t && t.focus) {
673
673
  const e = document.activeElement;
674
- t.focus({ preventScroll: !0 }), t !== e && xo(t) && n && t.select();
674
+ t.focus({ preventScroll: !0 }), t !== e && wo(t) && n && t.select();
675
675
  }
676
676
  }
677
- var Mn = Co();
678
- function Co() {
677
+ var kn = xo();
678
+ function xo() {
679
679
  let t = [];
680
680
  return {
681
681
  add(n) {
682
682
  const e = t[0];
683
- n !== e && (e == null || e.pause()), t = zn(t, n), t.unshift(n);
683
+ n !== e && (e == null || e.pause()), t = Mn(t, n), t.unshift(n);
684
684
  },
685
685
  remove(n) {
686
686
  var e;
687
- t = zn(t, n), (e = t[0]) == null || e.resume();
687
+ t = Mn(t, n), (e = t[0]) == null || e.resume();
688
688
  }
689
689
  };
690
690
  }
691
- function zn(t, n) {
691
+ function Mn(t, n) {
692
692
  const e = [...t], i = e.indexOf(n);
693
693
  return i !== -1 && e.splice(i, 1), e;
694
694
  }
695
- function Eo(t) {
695
+ function Co(t) {
696
696
  return t.filter((n) => n.tagName !== "A");
697
697
  }
698
- var Io = "Portal", gi = p.forwardRef((t, n) => {
698
+ var Eo = "Portal", pi = p.forwardRef((t, n) => {
699
699
  var l;
700
700
  const { container: e, ...i } = t, [r, o] = p.useState(!1);
701
701
  ct(() => o(!0), []);
702
702
  const s = e || r && ((l = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : l.body);
703
- return s ? Rr.createPortal(/* @__PURE__ */ a(ce.div, { ...i, ref: n }), s) : null;
703
+ return s ? Ir.createPortal(/* @__PURE__ */ a(ce.div, { ...i, ref: n }), s) : null;
704
704
  });
705
- gi.displayName = Io;
706
- function Ro(t, n) {
705
+ pi.displayName = Eo;
706
+ function Io(t, n) {
707
707
  return p.useReducer((e, i) => n[e][i] ?? e, t);
708
708
  }
709
709
  var It = (t) => {
710
- const { present: n, children: e } = t, i = So(n), r = typeof e == "function" ? e({ present: i.isPresent }) : p.Children.only(e), o = Re(i.ref, No(r));
710
+ const { present: n, children: e } = t, i = Ro(n), r = typeof e == "function" ? e({ present: i.isPresent }) : p.Children.only(e), o = Re(i.ref, So(r));
711
711
  return typeof e == "function" || i.isPresent ? p.cloneElement(r, { ref: o }) : null;
712
712
  };
713
713
  It.displayName = "Presence";
714
- function So(t) {
715
- const [n, e] = p.useState(), i = p.useRef({}), r = p.useRef(t), o = p.useRef("none"), s = t ? "mounted" : "unmounted", [l, m] = Ro(s, {
714
+ function Ro(t) {
715
+ const [n, e] = p.useState(), i = p.useRef({}), r = p.useRef(t), o = p.useRef("none"), s = t ? "mounted" : "unmounted", [l, m] = Io(s, {
716
716
  mounted: {
717
717
  UNMOUNT: "unmounted",
718
718
  ANIMATION_OUT: "unmountSuspended"
@@ -763,21 +763,21 @@ function So(t) {
763
763
  function Ke(t) {
764
764
  return (t == null ? void 0 : t.animationName) || "none";
765
765
  }
766
- function No(t) {
766
+ function So(t) {
767
767
  var i, r;
768
768
  let n = (i = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : i.get, e = n && "isReactWarning" in n && n.isReactWarning;
769
769
  return e ? t.ref : (n = (r = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : r.get, e = n && "isReactWarning" in n && n.isReactWarning, e ? t.props.ref : t.props.ref || t.ref);
770
770
  }
771
771
  var At = 0;
772
- function To() {
772
+ function No() {
773
773
  p.useEffect(() => {
774
774
  const t = document.querySelectorAll("[data-radix-focus-guard]");
775
- return document.body.insertAdjacentElement("afterbegin", t[0] ?? _n()), document.body.insertAdjacentElement("beforeend", t[1] ?? _n()), At++, () => {
775
+ return document.body.insertAdjacentElement("afterbegin", t[0] ?? zn()), document.body.insertAdjacentElement("beforeend", t[1] ?? zn()), At++, () => {
776
776
  At === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((n) => n.remove()), At--;
777
777
  };
778
778
  }, []);
779
779
  }
780
- function _n() {
780
+ function zn() {
781
781
  const t = document.createElement("span");
782
782
  return t.setAttribute("data-radix-focus-guard", ""), t.tabIndex = 0, t.style.outline = "none", t.style.opacity = "0", t.style.position = "fixed", t.style.pointerEvents = "none", t;
783
783
  }
@@ -790,7 +790,7 @@ var re = function() {
790
790
  return n;
791
791
  }, re.apply(this, arguments);
792
792
  };
793
- function vi(t, n) {
793
+ function gi(t, n) {
794
794
  var e = {};
795
795
  for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && n.indexOf(i) < 0 && (e[i] = t[i]);
796
796
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -798,16 +798,16 @@ function vi(t, n) {
798
798
  n.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (e[i[r]] = t[i[r]]);
799
799
  return e;
800
800
  }
801
- function Lo(t, n, e) {
801
+ function To(t, n, e) {
802
802
  if (e || arguments.length === 2) for (var i = 0, r = n.length, o; i < r; i++)
803
803
  (o || !(i in n)) && (o || (o = Array.prototype.slice.call(n, 0, i)), o[i] = n[i]);
804
804
  return t.concat(o || Array.prototype.slice.call(n));
805
805
  }
806
- var it = "right-scroll-bar-position", rt = "width-before-scroll-bar", Fo = "with-scroll-bars-hidden", Do = "--removed-body-scroll-bar-size";
806
+ var it = "right-scroll-bar-position", rt = "width-before-scroll-bar", Lo = "with-scroll-bars-hidden", Fo = "--removed-body-scroll-bar-size";
807
807
  function Ot(t, n) {
808
808
  return typeof t == "function" ? t(n) : t && (t.current = n), t;
809
809
  }
810
- function Ao(t, n) {
810
+ function Do(t, n) {
811
811
  var e = U(function() {
812
812
  return {
813
813
  // value
@@ -828,15 +828,15 @@ function Ao(t, n) {
828
828
  })[0];
829
829
  return e.callback = n, e.facade;
830
830
  }
831
- var Oo = typeof window < "u" ? p.useLayoutEffect : p.useEffect, Bn = /* @__PURE__ */ new WeakMap();
832
- function Po(t, n) {
833
- var e = Ao(null, function(i) {
831
+ var Ao = typeof window < "u" ? p.useLayoutEffect : p.useEffect, _n = /* @__PURE__ */ new WeakMap();
832
+ function Oo(t, n) {
833
+ var e = Do(null, function(i) {
834
834
  return t.forEach(function(r) {
835
835
  return Ot(r, i);
836
836
  });
837
837
  });
838
- return Oo(function() {
839
- var i = Bn.get(e);
838
+ return Ao(function() {
839
+ var i = _n.get(e);
840
840
  if (i) {
841
841
  var r = new Set(i), o = new Set(t), s = e.current;
842
842
  r.forEach(function(l) {
@@ -845,14 +845,14 @@ function Po(t, n) {
845
845
  r.has(l) || Ot(l, s);
846
846
  });
847
847
  }
848
- Bn.set(e, t);
848
+ _n.set(e, t);
849
849
  }, [t]), e;
850
850
  }
851
- function ko(t) {
851
+ function Po(t) {
852
852
  return t;
853
853
  }
854
- function Mo(t, n) {
855
- n === void 0 && (n = ko);
854
+ function ko(t, n) {
855
+ n === void 0 && (n = Po);
856
856
  var e = [], i = !1, r = {
857
857
  read: function() {
858
858
  if (i)
@@ -906,13 +906,13 @@ function Mo(t, n) {
906
906
  };
907
907
  return r;
908
908
  }
909
- function zo(t) {
909
+ function Mo(t) {
910
910
  t === void 0 && (t = {});
911
- var n = Mo(null);
911
+ var n = ko(null);
912
912
  return n.options = re({ async: !0, ssr: !1 }, t), n;
913
913
  }
914
- var yi = function(t) {
915
- var n = t.sideCar, e = vi(t, ["sideCar"]);
914
+ var vi = function(t) {
915
+ var n = t.sideCar, e = gi(t, ["sideCar"]);
916
916
  if (!n)
917
917
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
918
918
  var i = n.read();
@@ -920,21 +920,21 @@ var yi = function(t) {
920
920
  throw new Error("Sidecar medium not found");
921
921
  return p.createElement(i, re({}, e));
922
922
  };
923
- yi.isSideCarExport = !0;
924
- function _o(t, n) {
925
- return t.useMedium(n), yi;
923
+ vi.isSideCarExport = !0;
924
+ function zo(t, n) {
925
+ return t.useMedium(n), vi;
926
926
  }
927
- var bi = zo(), Pt = function() {
927
+ var yi = Mo(), Pt = function() {
928
928
  }, Rt = p.forwardRef(function(t, n) {
929
929
  var e = p.useRef(null), i = p.useState({
930
930
  onScrollCapture: Pt,
931
931
  onWheelCapture: Pt,
932
932
  onTouchMoveCapture: Pt
933
- }), r = i[0], o = i[1], s = t.forwardProps, l = t.children, m = t.className, c = t.removeScrollBar, d = t.enabled, u = t.shards, h = t.sideCar, y = t.noIsolation, b = t.inert, f = t.allowPinchZoom, v = t.as, w = v === void 0 ? "div" : v, x = t.gapMode, g = vi(t, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), I = h, E = Po([e, n]), T = re(re({}, g), r);
933
+ }), r = i[0], o = i[1], s = t.forwardProps, l = t.children, m = t.className, c = t.removeScrollBar, d = t.enabled, u = t.shards, h = t.sideCar, y = t.noIsolation, b = t.inert, f = t.allowPinchZoom, v = t.as, w = v === void 0 ? "div" : v, x = t.gapMode, g = gi(t, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), I = h, E = Oo([e, n]), T = re(re({}, g), r);
934
934
  return p.createElement(
935
935
  p.Fragment,
936
936
  null,
937
- d && p.createElement(I, { sideCar: bi, removeScrollBar: c, shards: u, noIsolation: y, inert: b, setCallbacks: o, allowPinchZoom: !!f, lockRef: e, gapMode: x }),
937
+ d && p.createElement(I, { sideCar: yi, removeScrollBar: c, shards: u, noIsolation: y, inert: b, setCallbacks: o, allowPinchZoom: !!f, lockRef: e, gapMode: x }),
938
938
  s ? p.cloneElement(p.Children.only(l), re(re({}, T), { ref: E })) : p.createElement(w, re({}, T, { className: m, ref: E }), l)
939
939
  );
940
940
  });
@@ -947,37 +947,37 @@ Rt.classNames = {
947
947
  fullWidth: rt,
948
948
  zeroRight: it
949
949
  };
950
- var Bo = function() {
950
+ var _o = function() {
951
951
  if (typeof __webpack_nonce__ < "u")
952
952
  return __webpack_nonce__;
953
953
  };
954
- function $o() {
954
+ function Bo() {
955
955
  if (!document)
956
956
  return null;
957
957
  var t = document.createElement("style");
958
958
  t.type = "text/css";
959
- var n = Bo();
959
+ var n = _o();
960
960
  return n && t.setAttribute("nonce", n), t;
961
961
  }
962
- function Vo(t, n) {
962
+ function $o(t, n) {
963
963
  t.styleSheet ? t.styleSheet.cssText = n : t.appendChild(document.createTextNode(n));
964
964
  }
965
- function Uo(t) {
965
+ function Vo(t) {
966
966
  var n = document.head || document.getElementsByTagName("head")[0];
967
967
  n.appendChild(t);
968
968
  }
969
- var jo = function() {
969
+ var Uo = function() {
970
970
  var t = 0, n = null;
971
971
  return {
972
972
  add: function(e) {
973
- t == 0 && (n = $o()) && (Vo(n, e), Uo(n)), t++;
973
+ t == 0 && (n = Bo()) && ($o(n, e), Vo(n)), t++;
974
974
  },
975
975
  remove: function() {
976
976
  t--, !t && n && (n.parentNode && n.parentNode.removeChild(n), n = null);
977
977
  }
978
978
  };
979
- }, Wo = function() {
980
- var t = jo();
979
+ }, jo = function() {
980
+ var t = Uo();
981
981
  return function(n, e) {
982
982
  p.useEffect(function() {
983
983
  return t.add(n), function() {
@@ -985,36 +985,36 @@ var jo = function() {
985
985
  };
986
986
  }, [n && e]);
987
987
  };
988
- }, wi = function() {
989
- var t = Wo(), n = function(e) {
988
+ }, bi = function() {
989
+ var t = jo(), n = function(e) {
990
990
  var i = e.styles, r = e.dynamic;
991
991
  return t(i, r), null;
992
992
  };
993
993
  return n;
994
- }, qo = {
994
+ }, Wo = {
995
995
  left: 0,
996
996
  top: 0,
997
997
  right: 0,
998
998
  gap: 0
999
999
  }, kt = function(t) {
1000
1000
  return parseInt(t || "", 10) || 0;
1001
- }, Ho = function(t) {
1001
+ }, qo = function(t) {
1002
1002
  var n = window.getComputedStyle(document.body), e = n[t === "padding" ? "paddingLeft" : "marginLeft"], i = n[t === "padding" ? "paddingTop" : "marginTop"], r = n[t === "padding" ? "paddingRight" : "marginRight"];
1003
1003
  return [kt(e), kt(i), kt(r)];
1004
- }, Go = function(t) {
1004
+ }, Ho = function(t) {
1005
1005
  if (t === void 0 && (t = "margin"), typeof window > "u")
1006
- return qo;
1007
- var n = Ho(t), e = document.documentElement.clientWidth, i = window.innerWidth;
1006
+ return Wo;
1007
+ var n = qo(t), e = document.documentElement.clientWidth, i = window.innerWidth;
1008
1008
  return {
1009
1009
  left: n[0],
1010
1010
  top: n[1],
1011
1011
  right: n[2],
1012
1012
  gap: Math.max(0, i - e + n[2] - n[0])
1013
1013
  };
1014
- }, Xo = wi(), je = "data-scroll-locked", Ko = function(t, n, e, i) {
1014
+ }, Go = bi(), je = "data-scroll-locked", Xo = function(t, n, e, i) {
1015
1015
  var r = t.left, o = t.top, s = t.right, l = t.gap;
1016
1016
  return e === void 0 && (e = "margin"), `
1017
- .`.concat(Fo, ` {
1017
+ .`.concat(Lo, ` {
1018
1018
  overflow: hidden `).concat(i, `;
1019
1019
  padding-right: `).concat(l, "px ").concat(i, `;
1020
1020
  }
@@ -1052,26 +1052,26 @@ var jo = function() {
1052
1052
  }
1053
1053
 
1054
1054
  body[`).concat(je, `] {
1055
- `).concat(Do, ": ").concat(l, `px;
1055
+ `).concat(Fo, ": ").concat(l, `px;
1056
1056
  }
1057
1057
  `);
1058
- }, $n = function() {
1058
+ }, Bn = function() {
1059
1059
  var t = parseInt(document.body.getAttribute(je) || "0", 10);
1060
1060
  return isFinite(t) ? t : 0;
1061
- }, Yo = function() {
1061
+ }, Ko = function() {
1062
1062
  p.useEffect(function() {
1063
- return document.body.setAttribute(je, ($n() + 1).toString()), function() {
1064
- var t = $n() - 1;
1063
+ return document.body.setAttribute(je, (Bn() + 1).toString()), function() {
1064
+ var t = Bn() - 1;
1065
1065
  t <= 0 ? document.body.removeAttribute(je) : document.body.setAttribute(je, t.toString());
1066
1066
  };
1067
1067
  }, []);
1068
- }, Qo = function(t) {
1068
+ }, Yo = function(t) {
1069
1069
  var n = t.noRelative, e = t.noImportant, i = t.gapMode, r = i === void 0 ? "margin" : i;
1070
- Yo();
1070
+ Ko();
1071
1071
  var o = p.useMemo(function() {
1072
- return Go(r);
1072
+ return Ho(r);
1073
1073
  }, [r]);
1074
- return p.createElement(Xo, { styles: Ko(o, !n, r, e ? "" : "!important") });
1074
+ return p.createElement(Go, { styles: Xo(o, !n, r, e ? "" : "!important") });
1075
1075
  }, $t = !1;
1076
1076
  if (typeof window < "u")
1077
1077
  try {
@@ -1084,59 +1084,59 @@ if (typeof window < "u")
1084
1084
  } catch {
1085
1085
  $t = !1;
1086
1086
  }
1087
- var Le = $t ? { passive: !1 } : !1, Jo = function(t) {
1087
+ var Le = $t ? { passive: !1 } : !1, Qo = function(t) {
1088
1088
  return t.tagName === "TEXTAREA";
1089
- }, xi = function(t, n) {
1089
+ }, wi = function(t, n) {
1090
1090
  if (!(t instanceof Element))
1091
1091
  return !1;
1092
1092
  var e = window.getComputedStyle(t);
1093
1093
  return (
1094
1094
  // not-not-scrollable
1095
1095
  e[n] !== "hidden" && // contains scroll inside self
1096
- !(e.overflowY === e.overflowX && !Jo(t) && e[n] === "visible")
1096
+ !(e.overflowY === e.overflowX && !Qo(t) && e[n] === "visible")
1097
1097
  );
1098
+ }, Jo = function(t) {
1099
+ return wi(t, "overflowY");
1098
1100
  }, Zo = function(t) {
1099
- return xi(t, "overflowY");
1100
- }, es = function(t) {
1101
- return xi(t, "overflowX");
1102
- }, Vn = function(t, n) {
1101
+ return wi(t, "overflowX");
1102
+ }, $n = function(t, n) {
1103
1103
  var e = n.ownerDocument, i = n;
1104
1104
  do {
1105
1105
  typeof ShadowRoot < "u" && i instanceof ShadowRoot && (i = i.host);
1106
- var r = Ci(t, i);
1106
+ var r = xi(t, i);
1107
1107
  if (r) {
1108
- var o = Ei(t, i), s = o[1], l = o[2];
1108
+ var o = Ci(t, i), s = o[1], l = o[2];
1109
1109
  if (s > l)
1110
1110
  return !0;
1111
1111
  }
1112
1112
  i = i.parentNode;
1113
1113
  } while (i && i !== e.body);
1114
1114
  return !1;
1115
- }, ts = function(t) {
1115
+ }, es = function(t) {
1116
1116
  var n = t.scrollTop, e = t.scrollHeight, i = t.clientHeight;
1117
1117
  return [
1118
1118
  n,
1119
1119
  e,
1120
1120
  i
1121
1121
  ];
1122
- }, ns = function(t) {
1122
+ }, ts = function(t) {
1123
1123
  var n = t.scrollLeft, e = t.scrollWidth, i = t.clientWidth;
1124
1124
  return [
1125
1125
  n,
1126
1126
  e,
1127
1127
  i
1128
1128
  ];
1129
+ }, xi = function(t, n) {
1130
+ return t === "v" ? Jo(n) : Zo(n);
1129
1131
  }, Ci = function(t, n) {
1130
- return t === "v" ? Zo(n) : es(n);
1131
- }, Ei = function(t, n) {
1132
- return t === "v" ? ts(n) : ns(n);
1133
- }, is = function(t, n) {
1132
+ return t === "v" ? es(n) : ts(n);
1133
+ }, ns = function(t, n) {
1134
1134
  return t === "h" && n === "rtl" ? -1 : 1;
1135
- }, rs = function(t, n, e, i, r) {
1136
- var o = is(t, window.getComputedStyle(n).direction), s = o * i, l = e.target, m = n.contains(l), c = !1, d = s > 0, u = 0, h = 0;
1135
+ }, is = function(t, n, e, i, r) {
1136
+ var o = ns(t, window.getComputedStyle(n).direction), s = o * i, l = e.target, m = n.contains(l), c = !1, d = s > 0, u = 0, h = 0;
1137
1137
  do {
1138
- var y = Ei(t, l), b = y[0], f = y[1], v = y[2], w = f - v - o * b;
1139
- (b || w) && Ci(t, l) && (u += w, h += b), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
1138
+ var y = Ci(t, l), b = y[0], f = y[1], v = y[2], w = f - v - o * b;
1139
+ (b || w) && xi(t, l) && (u += w, h += b), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
1140
1140
  } while (
1141
1141
  // portaled content
1142
1142
  !m && l !== document.body || // self content
@@ -1145,26 +1145,26 @@ var Le = $t ? { passive: !1 } : !1, Jo = function(t) {
1145
1145
  return (d && Math.abs(u) < 1 || !d && Math.abs(h) < 1) && (c = !0), c;
1146
1146
  }, Qe = function(t) {
1147
1147
  return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
1148
- }, Un = function(t) {
1148
+ }, Vn = function(t) {
1149
1149
  return [t.deltaX, t.deltaY];
1150
- }, jn = function(t) {
1150
+ }, Un = function(t) {
1151
1151
  return t && "current" in t ? t.current : t;
1152
- }, os = function(t, n) {
1152
+ }, rs = function(t, n) {
1153
1153
  return t[0] === n[0] && t[1] === n[1];
1154
- }, ss = function(t) {
1154
+ }, os = function(t) {
1155
1155
  return `
1156
1156
  .block-interactivity-`.concat(t, ` {pointer-events: none;}
1157
1157
  .allow-interactivity-`).concat(t, ` {pointer-events: all;}
1158
1158
  `);
1159
- }, as = 0, Fe = [];
1160
- function ls(t) {
1161
- var n = p.useRef([]), e = p.useRef([0, 0]), i = p.useRef(), r = p.useState(as++)[0], o = p.useState(wi)[0], s = p.useRef(t);
1159
+ }, ss = 0, Fe = [];
1160
+ function as(t) {
1161
+ var n = p.useRef([]), e = p.useRef([0, 0]), i = p.useRef(), r = p.useState(ss++)[0], o = p.useState(bi)[0], s = p.useRef(t);
1162
1162
  p.useEffect(function() {
1163
1163
  s.current = t;
1164
1164
  }, [t]), p.useEffect(function() {
1165
1165
  if (t.inert) {
1166
1166
  document.body.classList.add("block-interactivity-".concat(r));
1167
- var f = Lo([t.lockRef.current], (t.shards || []).map(jn), !0).filter(Boolean);
1167
+ var f = To([t.lockRef.current], (t.shards || []).map(Un), !0).filter(Boolean);
1168
1168
  return f.forEach(function(v) {
1169
1169
  return v.classList.add("allow-interactivity-".concat(r));
1170
1170
  }), function() {
@@ -1180,34 +1180,34 @@ function ls(t) {
1180
1180
  var w = Qe(f), x = e.current, g = "deltaX" in f ? f.deltaX : x[0] - w[0], I = "deltaY" in f ? f.deltaY : x[1] - w[1], E, T = f.target, N = Math.abs(g) > Math.abs(I) ? "h" : "v";
1181
1181
  if ("touches" in f && N === "h" && T.type === "range")
1182
1182
  return !1;
1183
- var L = Vn(N, T);
1183
+ var L = $n(N, T);
1184
1184
  if (!L)
1185
1185
  return !0;
1186
- if (L ? E = N : (E = N === "v" ? "h" : "v", L = Vn(N, T)), !L)
1186
+ if (L ? E = N : (E = N === "v" ? "h" : "v", L = $n(N, T)), !L)
1187
1187
  return !1;
1188
1188
  if (!i.current && "changedTouches" in f && (g || I) && (i.current = E), !E)
1189
1189
  return !0;
1190
1190
  var D = i.current || E;
1191
- return rs(D, v, f, D === "h" ? g : I);
1191
+ return is(D, v, f, D === "h" ? g : I);
1192
1192
  }, []), m = p.useCallback(function(f) {
1193
1193
  var v = f;
1194
1194
  if (!(!Fe.length || Fe[Fe.length - 1] !== o)) {
1195
- var w = "deltaY" in v ? Un(v) : Qe(v), x = n.current.filter(function(E) {
1196
- return E.name === v.type && (E.target === v.target || v.target === E.shadowParent) && os(E.delta, w);
1195
+ var w = "deltaY" in v ? Vn(v) : Qe(v), x = n.current.filter(function(E) {
1196
+ return E.name === v.type && (E.target === v.target || v.target === E.shadowParent) && rs(E.delta, w);
1197
1197
  })[0];
1198
1198
  if (x && x.should) {
1199
1199
  v.cancelable && v.preventDefault();
1200
1200
  return;
1201
1201
  }
1202
1202
  if (!x) {
1203
- var g = (s.current.shards || []).map(jn).filter(Boolean).filter(function(E) {
1203
+ var g = (s.current.shards || []).map(Un).filter(Boolean).filter(function(E) {
1204
1204
  return E.contains(v.target);
1205
1205
  }), I = g.length > 0 ? l(v, g[0]) : !s.current.noIsolation;
1206
1206
  I && v.cancelable && v.preventDefault();
1207
1207
  }
1208
1208
  }
1209
1209
  }, []), c = p.useCallback(function(f, v, w, x) {
1210
- var g = { name: f, delta: v, target: w, should: x, shadowParent: cs(w) };
1210
+ var g = { name: f, delta: v, target: w, should: x, shadowParent: ls(w) };
1211
1211
  n.current.push(g), setTimeout(function() {
1212
1212
  n.current = n.current.filter(function(I) {
1213
1213
  return I !== g;
@@ -1216,7 +1216,7 @@ function ls(t) {
1216
1216
  }, []), d = p.useCallback(function(f) {
1217
1217
  e.current = Qe(f), i.current = void 0;
1218
1218
  }, []), u = p.useCallback(function(f) {
1219
- c(f.type, Un(f), f.target, l(f, t.lockRef.current));
1219
+ c(f.type, Vn(f), f.target, l(f, t.lockRef.current));
1220
1220
  }, []), h = p.useCallback(function(f) {
1221
1221
  c(f.type, Qe(f), f.target, l(f, t.lockRef.current));
1222
1222
  }, []);
@@ -1235,38 +1235,38 @@ function ls(t) {
1235
1235
  return p.createElement(
1236
1236
  p.Fragment,
1237
1237
  null,
1238
- b ? p.createElement(o, { styles: ss(r) }) : null,
1239
- y ? p.createElement(Qo, { gapMode: t.gapMode }) : null
1238
+ b ? p.createElement(o, { styles: os(r) }) : null,
1239
+ y ? p.createElement(Yo, { gapMode: t.gapMode }) : null
1240
1240
  );
1241
1241
  }
1242
- function cs(t) {
1242
+ function ls(t) {
1243
1243
  for (var n = null; t !== null; )
1244
1244
  t instanceof ShadowRoot && (n = t.host, t = t.host), t = t.parentNode;
1245
1245
  return n;
1246
1246
  }
1247
- const ds = _o(bi, ls);
1248
- var Ii = p.forwardRef(function(t, n) {
1249
- return p.createElement(Rt, re({}, t, { ref: n, sideCar: ds }));
1247
+ const cs = zo(yi, as);
1248
+ var Ei = p.forwardRef(function(t, n) {
1249
+ return p.createElement(Rt, re({}, t, { ref: n, sideCar: cs }));
1250
1250
  });
1251
- Ii.classNames = Rt.classNames;
1252
- var us = function(t) {
1251
+ Ei.classNames = Rt.classNames;
1252
+ var ds = function(t) {
1253
1253
  if (typeof document > "u")
1254
1254
  return null;
1255
1255
  var n = Array.isArray(t) ? t[0] : t;
1256
1256
  return n.ownerDocument.body;
1257
- }, De = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), Ze = {}, Mt = 0, Ri = function(t) {
1258
- return t && (t.host || Ri(t.parentNode));
1259
- }, fs = function(t, n) {
1257
+ }, De = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), Ze = {}, Mt = 0, Ii = function(t) {
1258
+ return t && (t.host || Ii(t.parentNode));
1259
+ }, us = function(t, n) {
1260
1260
  return n.map(function(e) {
1261
1261
  if (t.contains(e))
1262
1262
  return e;
1263
- var i = Ri(e);
1263
+ var i = Ii(e);
1264
1264
  return i && t.contains(i) ? i : (console.error("aria-hidden", e, "in not contained inside", t, ". Doing nothing"), null);
1265
1265
  }).filter(function(e) {
1266
1266
  return !!e;
1267
1267
  });
1268
- }, ms = function(t, n, e, i) {
1269
- var r = fs(n, Array.isArray(t) ? t : [t]);
1268
+ }, fs = function(t, n, e, i) {
1269
+ var r = us(n, Array.isArray(t) ? t : [t]);
1270
1270
  Ze[e] || (Ze[e] = /* @__PURE__ */ new WeakMap());
1271
1271
  var o = Ze[e], s = [], l = /* @__PURE__ */ new Set(), m = new Set(r), c = function(u) {
1272
1272
  !u || l.has(u) || (l.add(u), c(u.parentNode));
@@ -1291,13 +1291,13 @@ var us = function(t) {
1291
1291
  De.set(u, h), o.set(u, y), h || (Je.has(u) || u.removeAttribute(i), Je.delete(u)), y || u.removeAttribute(e);
1292
1292
  }), Mt--, Mt || (De = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), Ze = {});
1293
1293
  };
1294
- }, hs = function(t, n, e) {
1294
+ }, ms = function(t, n, e) {
1295
1295
  e === void 0 && (e = "data-aria-hidden");
1296
- var i = Array.from(Array.isArray(t) ? t : [t]), r = us(t);
1297
- return r ? (i.push.apply(i, Array.from(r.querySelectorAll("[aria-live]"))), ms(i, r, e, "aria-hidden")) : function() {
1296
+ var i = Array.from(Array.isArray(t) ? t : [t]), r = ds(t);
1297
+ return r ? (i.push.apply(i, Array.from(r.querySelectorAll("[aria-live]"))), fs(i, r, e, "aria-hidden")) : function() {
1298
1298
  return null;
1299
1299
  };
1300
- }, ln = "Dialog", [Si, Ia] = Yr(ln), [ps, te] = Si(ln), Ni = (t) => {
1300
+ }, an = "Dialog", [Ri, Ea] = Kr(an), [hs, te] = Ri(an), Si = (t) => {
1301
1301
  const {
1302
1302
  __scopeDialog: n,
1303
1303
  children: e,
@@ -1305,13 +1305,13 @@ var us = function(t) {
1305
1305
  defaultOpen: r,
1306
1306
  onOpenChange: o,
1307
1307
  modal: s = !0
1308
- } = t, l = p.useRef(null), m = p.useRef(null), [c = !1, d] = eo({
1308
+ } = t, l = p.useRef(null), m = p.useRef(null), [c = !1, d] = Zr({
1309
1309
  prop: i,
1310
1310
  defaultProp: r,
1311
1311
  onChange: o
1312
1312
  });
1313
1313
  return /* @__PURE__ */ a(
1314
- ps,
1314
+ hs,
1315
1315
  {
1316
1316
  scope: n,
1317
1317
  triggerRef: l,
@@ -1327,10 +1327,10 @@ var us = function(t) {
1327
1327
  }
1328
1328
  );
1329
1329
  };
1330
- Ni.displayName = ln;
1331
- var Ti = "DialogTrigger", Li = p.forwardRef(
1330
+ Si.displayName = an;
1331
+ var Ni = "DialogTrigger", Ti = p.forwardRef(
1332
1332
  (t, n) => {
1333
- const { __scopeDialog: e, ...i } = t, r = te(Ti, e), o = Re(n, r.triggerRef);
1333
+ const { __scopeDialog: e, ...i } = t, r = te(Ni, e), o = Re(n, r.triggerRef);
1334
1334
  return /* @__PURE__ */ a(
1335
1335
  ce.button,
1336
1336
  {
@@ -1338,7 +1338,7 @@ var Ti = "DialogTrigger", Li = p.forwardRef(
1338
1338
  "aria-haspopup": "dialog",
1339
1339
  "aria-expanded": r.open,
1340
1340
  "aria-controls": r.contentId,
1341
- "data-state": un(r.open),
1341
+ "data-state": dn(r.open),
1342
1342
  ...i,
1343
1343
  ref: o,
1344
1344
  onClick: he(t.onClick, r.onOpenToggle)
@@ -1346,31 +1346,31 @@ var Ti = "DialogTrigger", Li = p.forwardRef(
1346
1346
  );
1347
1347
  }
1348
1348
  );
1349
- Li.displayName = Ti;
1350
- var cn = "DialogPortal", [gs, Fi] = Si(cn, {
1349
+ Ti.displayName = Ni;
1350
+ var ln = "DialogPortal", [ps, Li] = Ri(ln, {
1351
1351
  forceMount: void 0
1352
- }), Di = (t) => {
1353
- const { __scopeDialog: n, forceMount: e, children: i, container: r } = t, o = te(cn, n);
1354
- return /* @__PURE__ */ a(gs, { scope: n, forceMount: e, children: p.Children.map(i, (s) => /* @__PURE__ */ a(It, { present: e || o.open, children: /* @__PURE__ */ a(gi, { asChild: !0, container: r, children: s }) })) });
1352
+ }), Fi = (t) => {
1353
+ const { __scopeDialog: n, forceMount: e, children: i, container: r } = t, o = te(ln, n);
1354
+ return /* @__PURE__ */ a(ps, { scope: n, forceMount: e, children: p.Children.map(i, (s) => /* @__PURE__ */ a(It, { present: e || o.open, children: /* @__PURE__ */ a(pi, { asChild: !0, container: r, children: s }) })) });
1355
1355
  };
1356
- Di.displayName = cn;
1357
- var dt = "DialogOverlay", Ai = p.forwardRef(
1356
+ Fi.displayName = ln;
1357
+ var dt = "DialogOverlay", Di = p.forwardRef(
1358
1358
  (t, n) => {
1359
- const e = Fi(dt, t.__scopeDialog), { forceMount: i = e.forceMount, ...r } = t, o = te(dt, t.__scopeDialog);
1360
- return o.modal ? /* @__PURE__ */ a(It, { present: i || o.open, children: /* @__PURE__ */ a(vs, { ...r, ref: n }) }) : null;
1359
+ const e = Li(dt, t.__scopeDialog), { forceMount: i = e.forceMount, ...r } = t, o = te(dt, t.__scopeDialog);
1360
+ return o.modal ? /* @__PURE__ */ a(It, { present: i || o.open, children: /* @__PURE__ */ a(gs, { ...r, ref: n }) }) : null;
1361
1361
  }
1362
1362
  );
1363
- Ai.displayName = dt;
1364
- var vs = p.forwardRef(
1363
+ Di.displayName = dt;
1364
+ var gs = p.forwardRef(
1365
1365
  (t, n) => {
1366
1366
  const { __scopeDialog: e, ...i } = t, r = te(dt, e);
1367
1367
  return (
1368
1368
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1369
1369
  // ie. when `Overlay` and `Content` are siblings
1370
- /* @__PURE__ */ a(Ii, { as: an, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ a(
1370
+ /* @__PURE__ */ a(Ei, { as: sn, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ a(
1371
1371
  ce.div,
1372
1372
  {
1373
- "data-state": un(r.open),
1373
+ "data-state": dn(r.open),
1374
1374
  ...i,
1375
1375
  ref: n,
1376
1376
  style: { pointerEvents: "auto", ...i.style }
@@ -1378,21 +1378,21 @@ var vs = p.forwardRef(
1378
1378
  ) })
1379
1379
  );
1380
1380
  }
1381
- ), Ce = "DialogContent", Oi = p.forwardRef(
1381
+ ), Ce = "DialogContent", Ai = p.forwardRef(
1382
1382
  (t, n) => {
1383
- const e = Fi(Ce, t.__scopeDialog), { forceMount: i = e.forceMount, ...r } = t, o = te(Ce, t.__scopeDialog);
1384
- return /* @__PURE__ */ a(It, { present: i || o.open, children: o.modal ? /* @__PURE__ */ a(ys, { ...r, ref: n }) : /* @__PURE__ */ a(bs, { ...r, ref: n }) });
1383
+ const e = Li(Ce, t.__scopeDialog), { forceMount: i = e.forceMount, ...r } = t, o = te(Ce, t.__scopeDialog);
1384
+ return /* @__PURE__ */ a(It, { present: i || o.open, children: o.modal ? /* @__PURE__ */ a(vs, { ...r, ref: n }) : /* @__PURE__ */ a(ys, { ...r, ref: n }) });
1385
1385
  }
1386
1386
  );
1387
- Oi.displayName = Ce;
1388
- var ys = p.forwardRef(
1387
+ Ai.displayName = Ce;
1388
+ var vs = p.forwardRef(
1389
1389
  (t, n) => {
1390
1390
  const e = te(Ce, t.__scopeDialog), i = p.useRef(null), r = Re(n, e.contentRef, i);
1391
1391
  return p.useEffect(() => {
1392
1392
  const o = i.current;
1393
- if (o) return hs(o);
1393
+ if (o) return ms(o);
1394
1394
  }, []), /* @__PURE__ */ a(
1395
- Pi,
1395
+ Oi,
1396
1396
  {
1397
1397
  ...t,
1398
1398
  ref: r,
@@ -1413,11 +1413,11 @@ var ys = p.forwardRef(
1413
1413
  }
1414
1414
  );
1415
1415
  }
1416
- ), bs = p.forwardRef(
1416
+ ), ys = p.forwardRef(
1417
1417
  (t, n) => {
1418
1418
  const e = te(Ce, t.__scopeDialog), i = p.useRef(!1), r = p.useRef(!1);
1419
1419
  return /* @__PURE__ */ a(
1420
- Pi,
1420
+ Oi,
1421
1421
  {
1422
1422
  ...t,
1423
1423
  ref: n,
@@ -1436,12 +1436,12 @@ var ys = p.forwardRef(
1436
1436
  }
1437
1437
  );
1438
1438
  }
1439
- ), Pi = p.forwardRef(
1439
+ ), Oi = p.forwardRef(
1440
1440
  (t, n) => {
1441
1441
  const { __scopeDialog: e, trapFocus: i, onOpenAutoFocus: r, onCloseAutoFocus: o, ...s } = t, l = te(Ce, e), m = p.useRef(null), c = Re(n, m);
1442
- return To(), /* @__PURE__ */ C(be, { children: [
1442
+ return No(), /* @__PURE__ */ C(be, { children: [
1443
1443
  /* @__PURE__ */ a(
1444
- hi,
1444
+ mi,
1445
1445
  {
1446
1446
  asChild: !0,
1447
1447
  loop: !0,
@@ -1449,13 +1449,13 @@ var ys = p.forwardRef(
1449
1449
  onMountAutoFocus: r,
1450
1450
  onUnmountAutoFocus: o,
1451
1451
  children: /* @__PURE__ */ a(
1452
- fi,
1452
+ ui,
1453
1453
  {
1454
1454
  role: "dialog",
1455
1455
  id: l.contentId,
1456
1456
  "aria-describedby": l.descriptionId,
1457
1457
  "aria-labelledby": l.titleId,
1458
- "data-state": un(l.open),
1458
+ "data-state": dn(l.open),
1459
1459
  ...s,
1460
1460
  ref: c,
1461
1461
  onDismiss: () => l.onOpenChange(!1)
@@ -1464,28 +1464,28 @@ var ys = p.forwardRef(
1464
1464
  }
1465
1465
  ),
1466
1466
  /* @__PURE__ */ C(be, { children: [
1467
- /* @__PURE__ */ a(Cs, { titleId: l.titleId }),
1468
- /* @__PURE__ */ a(Is, { contentRef: m, descriptionId: l.descriptionId })
1467
+ /* @__PURE__ */ a(xs, { titleId: l.titleId }),
1468
+ /* @__PURE__ */ a(Es, { contentRef: m, descriptionId: l.descriptionId })
1469
1469
  ] })
1470
1470
  ] });
1471
1471
  }
1472
- ), dn = "DialogTitle", ws = p.forwardRef(
1472
+ ), cn = "DialogTitle", bs = p.forwardRef(
1473
1473
  (t, n) => {
1474
- const { __scopeDialog: e, ...i } = t, r = te(dn, e);
1474
+ const { __scopeDialog: e, ...i } = t, r = te(cn, e);
1475
1475
  return /* @__PURE__ */ a(ce.h2, { id: r.titleId, ...i, ref: n });
1476
1476
  }
1477
1477
  );
1478
- ws.displayName = dn;
1479
- var ki = "DialogDescription", xs = p.forwardRef(
1478
+ bs.displayName = cn;
1479
+ var Pi = "DialogDescription", ws = p.forwardRef(
1480
1480
  (t, n) => {
1481
- const { __scopeDialog: e, ...i } = t, r = te(ki, e);
1481
+ const { __scopeDialog: e, ...i } = t, r = te(Pi, e);
1482
1482
  return /* @__PURE__ */ a(ce.p, { id: r.descriptionId, ...i, ref: n });
1483
1483
  }
1484
1484
  );
1485
- xs.displayName = ki;
1486
- var Mi = "DialogClose", zi = p.forwardRef(
1485
+ ws.displayName = Pi;
1486
+ var ki = "DialogClose", Mi = p.forwardRef(
1487
1487
  (t, n) => {
1488
- const { __scopeDialog: e, ...i } = t, r = te(Mi, e);
1488
+ const { __scopeDialog: e, ...i } = t, r = te(ki, e);
1489
1489
  return /* @__PURE__ */ a(
1490
1490
  ce.button,
1491
1491
  {
@@ -1497,16 +1497,16 @@ var Mi = "DialogClose", zi = p.forwardRef(
1497
1497
  );
1498
1498
  }
1499
1499
  );
1500
- zi.displayName = Mi;
1501
- function un(t) {
1500
+ Mi.displayName = ki;
1501
+ function dn(t) {
1502
1502
  return t ? "open" : "closed";
1503
1503
  }
1504
- var _i = "DialogTitleWarning", [Ra, Bi] = Kr(_i, {
1504
+ var zi = "DialogTitleWarning", [Ia, _i] = Xr(zi, {
1505
1505
  contentName: Ce,
1506
- titleName: dn,
1506
+ titleName: cn,
1507
1507
  docsSlug: "dialog"
1508
- }), Cs = ({ titleId: t }) => {
1509
- const n = Bi(_i), e = `\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
1508
+ }), xs = ({ titleId: t }) => {
1509
+ const n = _i(zi), e = `\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
1510
1510
 
1511
1511
  If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
1512
1512
 
@@ -1514,19 +1514,19 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
1514
1514
  return p.useEffect(() => {
1515
1515
  t && (document.getElementById(t) || console.error(e));
1516
1516
  }, [e, t]), null;
1517
- }, Es = "DialogDescriptionWarning", Is = ({ contentRef: t, descriptionId: n }) => {
1518
- const i = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Bi(Es).contentName}}.`;
1517
+ }, Cs = "DialogDescriptionWarning", Es = ({ contentRef: t, descriptionId: n }) => {
1518
+ const i = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_i(Cs).contentName}}.`;
1519
1519
  return p.useEffect(() => {
1520
1520
  var o;
1521
1521
  const r = (o = t.current) == null ? void 0 : o.getAttribute("aria-describedby");
1522
1522
  n && r && (document.getElementById(n) || console.warn(i));
1523
1523
  }, [i, t, n]), null;
1524
- }, fn = Ni, Rs = Li, mn = Di, hn = Ai, pn = Oi, $i = zi, et = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ot = { exports: {} }, Ss = ot.exports, Wn;
1525
- function Ns() {
1526
- return Wn || (Wn = 1, function(t, n) {
1524
+ }, un = Si, Is = Ti, fn = Fi, mn = Di, hn = Ai, Bi = Mi, et = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ot = { exports: {} }, Rs = ot.exports, jn;
1525
+ function Ss() {
1526
+ return jn || (jn = 1, function(t, n) {
1527
1527
  (function(e, i) {
1528
1528
  i();
1529
- })(Ss, function() {
1529
+ })(Rs, function() {
1530
1530
  function e(c, d) {
1531
1531
  return typeof d > "u" ? d = { autoBom: !1 } : typeof d != "object" && (console.warn("Deprecated: Expected third argument to be a object"), d = { autoBom: !d }), d.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type) ? new Blob(["\uFEFF", c], { type: c.type }) : c;
1532
1532
  }
@@ -1592,8 +1592,8 @@ function Ns() {
1592
1592
  });
1593
1593
  }(ot)), ot.exports;
1594
1594
  }
1595
- var gn = Ns();
1596
- const Vi = O((t) => {
1595
+ var pn = Ss();
1596
+ const $i = O((t) => {
1597
1597
  const { file: n, onClose: e } = t, i = me(null), r = S(() => {
1598
1598
  var l;
1599
1599
  if (!i.current) return;
@@ -1602,15 +1602,15 @@ const Vi = O((t) => {
1602
1602
  m && navigator.clipboard.write([new ClipboardItem({ "image/png": m })]);
1603
1603
  }, "image/png");
1604
1604
  }, []), o = S(() => {
1605
- gn.saveAs(n, n.name);
1605
+ pn.saveAs(n, n.name);
1606
1606
  }, [n]);
1607
- return /* @__PURE__ */ a(fn, { open: !0, onOpenChange: e, children: /* @__PURE__ */ a(mn, { children: /* @__PURE__ */ a(
1608
- hn,
1607
+ return /* @__PURE__ */ a(un, { open: !0, onOpenChange: e, children: /* @__PURE__ */ a(fn, { children: /* @__PURE__ */ a(
1608
+ mn,
1609
1609
  {
1610
1610
  className: "bg-(--color-background) fixed inset-0 data-[state='open']:fade-in-0 data-[state='open']:zoom-in-95 data-[state='closed']:animate-out data-[state='closed']:fade-out-0 data-[state='closed']:zoom-out-95 data-[state='open']:animate-in",
1611
1611
  "data-floating-content": "",
1612
1612
  children: /* @__PURE__ */ C(
1613
- pn,
1613
+ hn,
1614
1614
  {
1615
1615
  className: "absolute inset-0 py-12",
1616
1616
  "data-floating-content": "",
@@ -1632,7 +1632,7 @@ const Vi = O((t) => {
1632
1632
  /* @__PURE__ */ a(Ne.Content, { size: "sm", children: "Download" })
1633
1633
  ] }),
1634
1634
  /* @__PURE__ */ a(Yt, { orientation: "vertical", size: "sm" }),
1635
- /* @__PURE__ */ a($i, { asChild: !0, children: /* @__PURE__ */ a(V, { onClick: e, "aria-label": "close", children: /* @__PURE__ */ a(F, { icon: "RiCloseLine" }) }) })
1635
+ /* @__PURE__ */ a(Bi, { asChild: !0, children: /* @__PURE__ */ a(V, { onClick: e, "aria-label": "close", children: /* @__PURE__ */ a(F, { icon: "RiCloseLine" }) }) })
1636
1636
  ]
1637
1637
  }
1638
1638
  ),
@@ -1651,8 +1651,8 @@ const Vi = O((t) => {
1651
1651
  }
1652
1652
  ) }) });
1653
1653
  });
1654
- Vi.displayName = "ImageViewer";
1655
- const Ts = O((t) => {
1654
+ $i.displayName = "ImageViewer";
1655
+ const Ns = O((t) => {
1656
1656
  const { children: n } = t, [e, i] = U(null), r = S(() => {
1657
1657
  i(null);
1658
1658
  }, []), o = S(
@@ -1663,15 +1663,15 @@ const Ts = O((t) => {
1663
1663
  ), s = S(() => {
1664
1664
  e && (e.onClose && e.onClose(), r());
1665
1665
  }, [r, e]), l = k(() => o, [o]);
1666
- return /* @__PURE__ */ C(ci.Provider, { value: l, children: [
1666
+ return /* @__PURE__ */ C(li.Provider, { value: l, children: [
1667
1667
  n,
1668
- e && /* @__PURE__ */ a(Vi, { file: e.file, onClose: s })
1668
+ e && /* @__PURE__ */ a($i, { file: e.file, onClose: s })
1669
1669
  ] });
1670
1670
  });
1671
- Ts.displayName = "FileViewerProvider";
1671
+ Ns.displayName = "FileViewerProvider";
1672
1672
  const se = (t) => {
1673
- const { className: n, label: e, children: i, severity: r, inputId: o, labelId: s, image: l } = t, [m, c] = U(void 0), d = sn(), u = r ? we[r] : "base";
1674
- Y(() => {
1673
+ const { className: n, label: e, children: i, severity: r, inputId: o, labelId: s, image: l } = t, [m, c] = U(void 0), d = on(), u = r ? we[r] : "base";
1674
+ G(() => {
1675
1675
  l instanceof Promise ? l.then(c).catch(console.error) : c(l);
1676
1676
  }, [l]);
1677
1677
  const h = m ? URL.createObjectURL(m) : void 0, y = S(() => {
@@ -1692,7 +1692,7 @@ const se = (t) => {
1692
1692
  /* @__PURE__ */ a("label", { className: qe(n, "flex flex-col gap-1 w-max max-w-full"), htmlFor: o, children: /* @__PURE__ */ a(ge, { accentColor: u, size: "sm", id: s, weight: "medium", className: "text-wrap", children: e }) }),
1693
1693
  i
1694
1694
  ] });
1695
- }, Ui = (t) => {
1695
+ }, Vi = (t) => {
1696
1696
  const { helpText: n, children: e, severity: i } = t, r = i ? we[i] : "base";
1697
1697
  return /* @__PURE__ */ C("div", { className: "flex flex-col gap-1", children: [
1698
1698
  e,
@@ -1700,8 +1700,8 @@ const se = (t) => {
1700
1700
  ] });
1701
1701
  }, ae = (t) => {
1702
1702
  const { children: n, ...e } = t;
1703
- return /* @__PURE__ */ a(Ui, { ...e, children: n });
1704
- }, ji = O((t) => {
1703
+ return /* @__PURE__ */ a(Vi, { ...e, children: n });
1704
+ }, Ui = O((t) => {
1705
1705
  const [{ inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: s, helpText: l, label: m, fieldProps: c }, d] = Z(t), { name: u, onBlur: h, onChange: y, value: b } = c, f = o ? null : l, v = o ? "" : m, w = S(
1706
1706
  (g) => {
1707
1707
  y(!!g), h(!!g);
@@ -1738,11 +1738,11 @@ const se = (t) => {
1738
1738
  }
1739
1739
  ) });
1740
1740
  });
1741
- ji.displayName = "BooleanInput";
1742
- const Ls = {
1741
+ Ui.displayName = "BooleanInput";
1742
+ const Ts = {
1743
1743
  ...ee,
1744
1744
  type: "boolean"
1745
- }, Ae = class Ae extends K {
1745
+ }, Ae = class Ae extends Y {
1746
1746
  constructor(e) {
1747
1747
  super({ ...e, type: "boolean" });
1748
1748
  R(this, "onlyValidateAfterTouched", !1);
@@ -1759,12 +1759,12 @@ const Ls = {
1759
1759
  return new Ae(e);
1760
1760
  }
1761
1761
  getInput(e) {
1762
- return /* @__PURE__ */ a(ji, { ...e, field: this });
1762
+ return /* @__PURE__ */ a(Ui, { ...e, field: this });
1763
1763
  }
1764
1764
  };
1765
- R(Ae, "fieldTypeName", "Checkbox"), R(Ae, "fieldTypeDescription", "Perfect for both optional and required yes/no questions."), R(Ae, "Icon", Sr);
1765
+ R(Ae, "fieldTypeName", "Checkbox"), R(Ae, "fieldTypeDescription", "Perfect for both optional and required yes/no questions."), R(Ae, "Icon", Rr);
1766
1766
  let Ge = Ae;
1767
- const Wi = O((t) => {
1767
+ const ji = O((t) => {
1768
1768
  const [{ inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: s, helpText: l, label: m, fieldProps: c }, d] = Z(t), { name: u, onChange: h, onBlur: y } = c, [b, f] = U(!1), v = o ? null : l, w = o ? "" : m, x = c.value ? new Date(c.value) : void 0, g = S(
1769
1769
  (E) => {
1770
1770
  E && h(E.toISOString()), f(!1);
@@ -1808,7 +1808,7 @@ const Wi = O((t) => {
1808
1808
  }
1809
1809
  ) }),
1810
1810
  /* @__PURE__ */ a(le.Content, { align: "start", children: /* @__PURE__ */ a(
1811
- vr,
1811
+ gr,
1812
1812
  {
1813
1813
  required: !1,
1814
1814
  mode: "single",
@@ -1821,11 +1821,11 @@ const Wi = O((t) => {
1821
1821
  }
1822
1822
  ) });
1823
1823
  });
1824
- Wi.displayName = "DateInput";
1825
- const Fs = {
1824
+ ji.displayName = "DateInput";
1825
+ const Ls = {
1826
1826
  ...ee,
1827
1827
  type: "date"
1828
- }, Oe = class Oe extends K {
1828
+ }, Oe = class Oe extends Y {
1829
1829
  constructor(e) {
1830
1830
  super({ ...e, type: "date" });
1831
1831
  R(this, "onlyValidateAfterTouched", !1);
@@ -1838,24 +1838,24 @@ const Fs = {
1838
1838
  return new Oe(e);
1839
1839
  }
1840
1840
  getInput(e) {
1841
- return /* @__PURE__ */ a(Wi, { field: this, ...e });
1841
+ return /* @__PURE__ */ a(ji, { field: this, ...e });
1842
1842
  }
1843
1843
  };
1844
- R(Oe, "fieldTypeName", "Date"), R(Oe, "fieldTypeDescription", "Allows specifying a date."), R(Oe, "Icon", Nr);
1844
+ R(Oe, "fieldTypeName", "Date"), R(Oe, "fieldTypeDescription", "Allows specifying a date."), R(Oe, "Icon", Sr);
1845
1845
  let Vt = Oe;
1846
- const qi = O((t) => {
1847
- const { field: n, ...e } = t, [{ value: i }] = Zt(n.options.clonedFieldIdentifier), r = k(() => {
1846
+ const Wi = O((t) => {
1847
+ const { field: n, ...e } = t, [{ value: i }] = Jt(n.options.clonedFieldIdentifier), r = k(() => {
1848
1848
  const o = n.options.getFieldToClone(i);
1849
- return o ? xn(o) : null;
1849
+ return o ? wn(o) : null;
1850
1850
  }, [n.options, i]);
1851
- return Hi(r, e);
1851
+ return qi(r, e);
1852
1852
  });
1853
- qi.displayName = "FieldInputCloner";
1854
- const Ds = {
1853
+ Wi.displayName = "FieldInputCloner";
1854
+ const Fs = {
1855
1855
  ...ee,
1856
1856
  type: "custom"
1857
1857
  };
1858
- class ut extends K {
1858
+ class ut extends Y {
1859
1859
  constructor(e, i) {
1860
1860
  super({ ...e, type: "custom" });
1861
1861
  R(this, "Component");
@@ -1872,37 +1872,37 @@ class ut extends K {
1872
1872
  }
1873
1873
  }
1874
1874
  R(ut, "fieldTypeName", "Custom"), R(ut, "fieldTypeDescription", "Allows re-rendering of field already in the form");
1875
- class As extends ut {
1875
+ class Ds extends ut {
1876
1876
  constructor(n) {
1877
- super(n, qi);
1877
+ super(n, Wi);
1878
1878
  }
1879
1879
  }
1880
- const Hi = (t, n) => k(() => !n || !t ? null : t.getInput(n), [t, n]), ft = (t, n) => {
1881
- const e = k(() => t.map((i) => /* @__PURE__ */ a(ti, { children: i.getInput(n) }, i.getId())), [t, n]);
1880
+ const qi = (t, n) => k(() => !n || !t ? null : t.getInput(n), [t, n]), ft = (t, n) => {
1881
+ const e = k(() => t.map((i) => /* @__PURE__ */ a(ei, { children: i.getInput(n) }, i.getId())), [t, n]);
1882
1882
  return /* @__PURE__ */ a("div", { className: "flex flex-col gap-4", children: e });
1883
- }, vn = [];
1883
+ }, gn = [];
1884
1884
  let tt;
1885
- const Os = new Uint8Array(16);
1886
- function Ps() {
1885
+ const As = new Uint8Array(16);
1886
+ function Os() {
1887
1887
  if (!tt && (tt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !tt))
1888
1888
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1889
- return tt(Os);
1889
+ return tt(As);
1890
1890
  }
1891
1891
  const q = [];
1892
1892
  for (let t = 0; t < 256; ++t)
1893
1893
  q.push((t + 256).toString(16).slice(1));
1894
- function ks(t, n = 0) {
1894
+ function Ps(t, n = 0) {
1895
1895
  return q[t[n + 0]] + q[t[n + 1]] + q[t[n + 2]] + q[t[n + 3]] + "-" + q[t[n + 4]] + q[t[n + 5]] + "-" + q[t[n + 6]] + q[t[n + 7]] + "-" + q[t[n + 8]] + q[t[n + 9]] + "-" + q[t[n + 10]] + q[t[n + 11]] + q[t[n + 12]] + q[t[n + 13]] + q[t[n + 14]] + q[t[n + 15]];
1896
1896
  }
1897
- const Ms = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), qn = {
1898
- randomUUID: Ms
1897
+ const ks = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Wn = {
1898
+ randomUUID: ks
1899
1899
  };
1900
- function zs(t, n, e) {
1901
- if (qn.randomUUID && !t)
1902
- return qn.randomUUID();
1900
+ function Ms(t, n, e) {
1901
+ if (Wn.randomUUID && !t)
1902
+ return Wn.randomUUID();
1903
1903
  t = t || {};
1904
- const i = t.random || (t.rng || Ps)();
1905
- return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, ks(i);
1904
+ const i = t.random || (t.rng || Os)();
1905
+ return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, Ps(i);
1906
1906
  }
1907
1907
  const ve = (t) => t.type === "section", mt = (t = "", n = []) => ({
1908
1908
  type: "section",
@@ -1911,7 +1911,7 @@ const ve = (t) => t.type === "section", mt = (t = "", n = []) => ({
1911
1911
  label: null,
1912
1912
  condition: null,
1913
1913
  conditional: !1
1914
- }), _s = (t) => {
1914
+ }), zs = (t) => {
1915
1915
  if (!t) return;
1916
1916
  const n = t.fields;
1917
1917
  let e = [];
@@ -1925,7 +1925,7 @@ function Ut(t, n, e) {
1925
1925
  if (!r) throw new Error("Could not find field to reorder.");
1926
1926
  return i.splice(e, 0, r), i;
1927
1927
  }
1928
- function Gi(t, n, e) {
1928
+ function Hi(t, n, e) {
1929
1929
  const i = Array.from(t ?? []);
1930
1930
  return i.splice(n, 0, e), i;
1931
1931
  }
@@ -1933,33 +1933,33 @@ function ht(t, n) {
1933
1933
  const e = Array.from(t);
1934
1934
  return e.splice(n, 1), e;
1935
1935
  }
1936
- const yn = () => zs(), Xi = (t, n) => {
1936
+ const vn = () => Ms(), Gi = (t, n) => {
1937
1937
  if (!n) return null;
1938
1938
  for (const e of t)
1939
1939
  if (e.type === "section") {
1940
- const i = Xi(e.fields, n);
1940
+ const i = Gi(e.fields, n);
1941
1941
  if (i) return i;
1942
1942
  } else if (e.identifier === n)
1943
1943
  return e;
1944
1944
  return null;
1945
- }, Ki = (t, n) => t.filter((e, i) => i < n).flatMap((e) => e.fields), pt = (t, n, e, i, r) => {
1945
+ }, Xi = (t, n) => t.filter((e, i) => i < n).flatMap((e) => e.fields), pt = (t, n, e, i, r) => {
1946
1946
  const o = {
1947
1947
  ...e,
1948
- identifier: yn()
1948
+ identifier: vn()
1949
1949
  }, s = oe(i, t);
1950
1950
  if (s === void 0)
1951
1951
  throw new Error("Parent path must point to an existing field.");
1952
1952
  if (!Array.isArray(s))
1953
1953
  throw new Error("Parent path must point to an array.");
1954
- const l = Gi(s, n, o);
1954
+ const l = Hi(s, n, o);
1955
1955
  r(t, l).then();
1956
- }, Bs = (t, n, e) => {
1956
+ }, _s = (t, n, e) => {
1957
1957
  const i = {
1958
1958
  ...mt(),
1959
1959
  label: ""
1960
1960
  };
1961
1961
  pt("fields", t, i, n, e);
1962
- }, bn = () => {
1962
+ }, yn = () => {
1963
1963
  const { showError: t } = Ct(), n = S(
1964
1964
  (i, r, o, s, l, m) => {
1965
1965
  const c = i[r];
@@ -2001,15 +2001,15 @@ const yn = () => zs(), Xi = (t, n) => {
2001
2001
  }
2002
2002
  c(`fields.${r}.fields`, ht(i.fields, o)).then(), c(
2003
2003
  `fields.${l}.fields`,
2004
- Gi(s.fields, m, u)
2004
+ Hi(s.fields, m, u)
2005
2005
  ).then();
2006
2006
  }
2007
2007
  },
2008
2008
  [t]
2009
2009
  );
2010
2010
  return { reorderSection: n, reorderField: e };
2011
- }, Yi = O((t) => {
2012
- const [{ inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: s, helpText: l, label: m, fieldProps: c }, d] = Z(t), u = o ? null : l, h = o ? "" : m, { name: y, onChange: b, onBlur: f } = c, v = `${n}-droppable`, { disabled: w } = d, x = c.value ?? vn, [g, I] = U(""), [E, T] = U(""), N = E || u, L = S(
2011
+ }, Ki = O((t) => {
2012
+ const [{ inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: s, helpText: l, label: m, fieldProps: c }, d] = Z(t), u = o ? null : l, h = o ? "" : m, { name: y, onChange: b, onBlur: f } = c, v = `${n}-droppable`, { disabled: w } = d, x = c.value ?? gn, [g, I] = U(""), [E, T] = U(""), N = E || u, L = S(
2013
2013
  (P) => {
2014
2014
  b(P), f(P);
2015
2015
  },
@@ -2047,7 +2047,7 @@ const yn = () => zs(), Xi = (t, n) => {
2047
2047
  ), J = S(() => {
2048
2048
  f(x);
2049
2049
  }, [f, x]);
2050
- return /* @__PURE__ */ a(ni, { onDragEnd: z, children: /* @__PURE__ */ C("div", { className: "flex flex-col gap-2", children: [
2050
+ return /* @__PURE__ */ a(ti, { onDragEnd: z, children: /* @__PURE__ */ C("div", { className: "flex flex-col gap-2", children: [
2051
2051
  /* @__PURE__ */ a(ae, { helpText: N, severity: r, children: /* @__PURE__ */ a(
2052
2052
  se,
2053
2053
  {
@@ -2087,7 +2087,7 @@ const yn = () => zs(), Xi = (t, n) => {
2087
2087
  ] })
2088
2088
  }
2089
2089
  ) }),
2090
- /* @__PURE__ */ a(nn, { droppableId: v, children: (P) => /* @__PURE__ */ C(
2090
+ /* @__PURE__ */ a(tn, { droppableId: v, children: (P) => /* @__PURE__ */ C(
2091
2091
  "div",
2092
2092
  {
2093
2093
  className: "flex flex-col",
@@ -2095,7 +2095,7 @@ const yn = () => zs(), Xi = (t, n) => {
2095
2095
  ref: P.innerRef,
2096
2096
  children: [
2097
2097
  x.map((H, de) => /* @__PURE__ */ a(
2098
- rn,
2098
+ nn,
2099
2099
  {
2100
2100
  draggableId: `${H}-draggable`,
2101
2101
  index: de,
@@ -2142,13 +2142,13 @@ const yn = () => zs(), Xi = (t, n) => {
2142
2142
  ) })
2143
2143
  ] }) });
2144
2144
  });
2145
- Yi.displayName = "MultiStringInput";
2146
- const $s = {
2145
+ Ki.displayName = "MultiStringInput";
2146
+ const Bs = {
2147
2147
  ...ee,
2148
2148
  type: "multi-string",
2149
2149
  minimum_length: 0,
2150
2150
  maximum_length: null
2151
- }, Pe = class Pe extends K {
2151
+ }, Pe = class Pe extends Y {
2152
2152
  constructor(e) {
2153
2153
  const { minimum_length: i, maximum_length: r, placeholder: o, ...s } = e;
2154
2154
  super({ ...s, type: "multi-string" });
@@ -2159,7 +2159,7 @@ const $s = {
2159
2159
  this.minLength = i ?? 0, this.maxLength = r ?? 1 / 0, this.placeholder = o ?? "Press enter to add a new option";
2160
2160
  }
2161
2161
  getInput(e) {
2162
- return /* @__PURE__ */ a(Yi, { field: this, ...e });
2162
+ return /* @__PURE__ */ a(Ki, { field: this, ...e });
2163
2163
  }
2164
2164
  serialize() {
2165
2165
  return {
@@ -2190,14 +2190,14 @@ const $s = {
2190
2190
  return new Pe(e);
2191
2191
  }
2192
2192
  };
2193
- R(Pe, "fieldTypeName", "Multi-string"), R(Pe, "fieldTypeDescription", "Allows the user to provide multiple unique strings."), R(Pe, "Icon", Tr);
2193
+ R(Pe, "fieldTypeName", "Multi-string"), R(Pe, "fieldTypeDescription", "Allows the user to provide multiple unique strings."), R(Pe, "Icon", Nr);
2194
2194
  let gt = Pe;
2195
- const Qi = O((t) => {
2195
+ const Yi = O((t) => {
2196
2196
  const [
2197
2197
  { inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: s, helpText: l, label: m, fieldProps: c, touched: d, helpers: u },
2198
2198
  h
2199
2199
  ] = Z(t), { name: y, onBlur: b, onChange: f, value: v } = c, w = o ? null : l, x = o ? "" : m, [g, I] = U(void 0);
2200
- Qt(() => {
2200
+ G(() => {
2201
2201
  I(v);
2202
2202
  }, [v]);
2203
2203
  const E = S(
@@ -2209,7 +2209,7 @@ const Qi = O((t) => {
2209
2209
  ), T = S(() => {
2210
2210
  f(g), b(g);
2211
2211
  }, [g, b, f]);
2212
- return /* @__PURE__ */ a(ae, { helpText: w, severity: r, children: /* @__PURE__ */ a(
2212
+ return console.debug("NumberInput", g), /* @__PURE__ */ a(ae, { helpText: w, severity: r, children: /* @__PURE__ */ a(
2213
2213
  se,
2214
2214
  {
2215
2215
  size: i,
@@ -2237,14 +2237,14 @@ const Qi = O((t) => {
2237
2237
  }
2238
2238
  ) });
2239
2239
  });
2240
- Qi.displayName = "NumberInput";
2241
- const Vs = {
2240
+ Yi.displayName = "NumberInput";
2241
+ const $s = {
2242
2242
  ...ee,
2243
2243
  type: "number",
2244
2244
  minimum: Number.MIN_SAFE_INTEGER,
2245
2245
  maximum: Number.MAX_SAFE_INTEGER,
2246
2246
  integers: !1
2247
- }, Hn = (t) => "fields" in t, ie = class ie extends K {
2247
+ }, qn = (t) => "fields" in t, ie = class ie extends Y {
2248
2248
  constructor(e) {
2249
2249
  const {
2250
2250
  minimum: i = Number.MIN_SAFE_INTEGER,
@@ -2323,18 +2323,18 @@ const Vs = {
2323
2323
  return new ie(e);
2324
2324
  }
2325
2325
  getInput(e) {
2326
- return /* @__PURE__ */ a(Qi, { field: this, ...e });
2326
+ return /* @__PURE__ */ a(Yi, { field: this, ...e });
2327
2327
  }
2328
2328
  };
2329
- R(ie, "fieldTypeName", "Number"), R(ie, "fieldTypeDescription", "Allows specifying a number within a given range."), R(ie, "Icon", Lr), R(ie, "_validateMin", (e) => (i, r) => {
2330
- const o = Hn(r) ? oe(r, e) : r;
2329
+ R(ie, "fieldTypeName", "Number"), R(ie, "fieldTypeDescription", "Allows specifying a number within a given range."), R(ie, "Icon", Tr), R(ie, "_validateMin", (e) => (i, r) => {
2330
+ const o = qn(r) ? oe(r, e) : r;
2331
2331
  return typeof o.maximum == "number" && typeof i == "number" && o.maximum < i ? "Minimum cannot be greater than minimum." : null;
2332
2332
  }), R(ie, "_validateMax", (e) => (i, r) => {
2333
- const o = Hn(r) ? oe(r, e) : r;
2333
+ const o = qn(r) ? oe(r, e) : r;
2334
2334
  return typeof o.minimum == "number" && typeof i == "number" && o.minimum > i ? "Maximum cannot be less than minimum." : null;
2335
2335
  });
2336
2336
  let Ee = ie;
2337
- const Ji = O((t) => {
2337
+ const Qi = O((t) => {
2338
2338
  const [{ inputId: n, labelId: e, label: i, helpText: r, size: o, severity: s, showInputOnly: l, field: m, fieldProps: c }, d] = Z(t), { name: u, onBlur: h, onChange: y, value: b } = c, [f, v] = U(!1), w = l ? null : r, x = l ? "" : i, g = S(
2339
2339
  (T) => {
2340
2340
  y(T), v(!1);
@@ -2360,8 +2360,8 @@ const Ji = O((t) => {
2360
2360
  className: "flex-col items-start justify-start gap-2",
2361
2361
  children: [
2362
2362
  /* @__PURE__ */ C("div", { className: "flex w-max items-center gap-1", children: [
2363
- /* @__PURE__ */ C(fn, { open: f, onOpenChange: E, children: [
2364
- /* @__PURE__ */ a(Rs, { asChild: !0, children: /* @__PURE__ */ C(
2363
+ /* @__PURE__ */ C(un, { open: f, onOpenChange: E, children: [
2364
+ /* @__PURE__ */ a(Is, { asChild: !0, children: /* @__PURE__ */ C(
2365
2365
  Q,
2366
2366
  {
2367
2367
  id: n,
@@ -2377,9 +2377,9 @@ const Ji = O((t) => {
2377
2377
  ]
2378
2378
  }
2379
2379
  ) }),
2380
- /* @__PURE__ */ C(mn, { children: [
2381
- /* @__PURE__ */ a(hn, { className: "light:bg-(--black-a6) fixed inset-0 dark:bg-(--black-a8)" }),
2382
- /* @__PURE__ */ a(pn, { className: "fixed inset-0", children: /* @__PURE__ */ a(Zi, { onQrScan: g }) })
2380
+ /* @__PURE__ */ C(fn, { children: [
2381
+ /* @__PURE__ */ a(mn, { className: "light:bg-(--black-a6) fixed inset-0 dark:bg-(--black-a8)" }),
2382
+ /* @__PURE__ */ a(hn, { className: "fixed inset-0", children: /* @__PURE__ */ a(Ji, { onQrScan: g }) })
2383
2383
  ] })
2384
2384
  ] }),
2385
2385
  b && /* @__PURE__ */ a(F, { icon: "RiCheckLine", className: "align-bottom text-(--primary-a11)" })
@@ -2402,12 +2402,12 @@ const Ji = O((t) => {
2402
2402
  }
2403
2403
  ) });
2404
2404
  });
2405
- Ji.displayName = "QrInput";
2406
- const Zi = O((t) => {
2405
+ Qi.displayName = "QrInput";
2406
+ const Ji = O((t) => {
2407
2407
  const { onQrScan: n } = t, e = me(null), [i, r] = U(!1);
2408
- return Y(() => {
2408
+ return G(() => {
2409
2409
  if (!e.current) return;
2410
- const o = new Vr(
2410
+ const o = new $r(
2411
2411
  e.current,
2412
2412
  (s) => {
2413
2413
  const l = s.data;
@@ -2423,18 +2423,18 @@ const Zi = O((t) => {
2423
2423
  r(!1);
2424
2424
  });
2425
2425
  }, [n]), /* @__PURE__ */ C("div", { className: "relative flex h-full w-full flex-col justify-center gap-2 bg-(--color-background)", children: [
2426
- /* @__PURE__ */ a("div", { className: "absolute top-0 flex w-full p-2", children: /* @__PURE__ */ a($i, { asChild: !0, children: /* @__PURE__ */ a(V, { "aria-label": "close", variant: "soft", accentColor: "base", children: /* @__PURE__ */ a(F, { icon: "RiCloseLine" }) }) }) }),
2426
+ /* @__PURE__ */ a("div", { className: "absolute top-0 flex w-full p-2", children: /* @__PURE__ */ a(Bi, { asChild: !0, children: /* @__PURE__ */ a(V, { "aria-label": "close", variant: "soft", accentColor: "base", children: /* @__PURE__ */ a(F, { icon: "RiCloseLine" }) }) }) }),
2427
2427
  /* @__PURE__ */ C("div", { className: "relative max-h-full max-w-full", children: [
2428
2428
  /* @__PURE__ */ a("video", { className: "size-full", ref: e }),
2429
2429
  i && /* @__PURE__ */ a("div", { className: "absolute inset-0 flex items-center justify-center bg-(--color-background)", children: /* @__PURE__ */ a(wt, {}) })
2430
2430
  ] })
2431
2431
  ] });
2432
2432
  });
2433
- Zi.displayName = "QrScanner";
2434
- const Us = {
2433
+ Ji.displayName = "QrScanner";
2434
+ const Vs = {
2435
2435
  ...ee,
2436
2436
  type: "qr"
2437
- }, ke = class ke extends K {
2437
+ }, ke = class ke extends Y {
2438
2438
  constructor(e) {
2439
2439
  super({ ...e, type: "qr" });
2440
2440
  R(this, "onlyValidateAfterTouched", !1);
@@ -2447,12 +2447,12 @@ const Us = {
2447
2447
  return new ke(e);
2448
2448
  }
2449
2449
  getInput(e) {
2450
- return /* @__PURE__ */ a(Ji, { ...e, field: this });
2450
+ return /* @__PURE__ */ a(Qi, { ...e, field: this });
2451
2451
  }
2452
2452
  };
2453
- R(ke, "fieldTypeName", "QR"), R(ke, "fieldTypeDescription", "Used for scanning/reading QR codes."), R(ke, "Icon", Fr);
2453
+ R(ke, "fieldTypeName", "QR"), R(ke, "fieldTypeDescription", "Used for scanning/reading QR codes."), R(ke, "Icon", Lr);
2454
2454
  let jt = ke;
2455
- class er extends K {
2455
+ class Zi extends Y {
2456
2456
  constructor(e) {
2457
2457
  const { placeholder: i = "", ...r } = e;
2458
2458
  super(r);
@@ -2489,8 +2489,8 @@ class er extends K {
2489
2489
  ];
2490
2490
  }
2491
2491
  }
2492
- const tr = O((t) => {
2493
- const [{ inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: s, helpText: l, label: m, fieldProps: c }, d] = Z(t), { name: u, onChange: h, onBlur: y } = c, b = o ? null : l, f = o ? "" : m, v = c.value ?? vn, w = S(
2492
+ const er = O((t) => {
2493
+ const [{ inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: s, helpText: l, label: m, fieldProps: c }, d] = Z(t), { name: u, onChange: h, onBlur: y } = c, b = o ? null : l, f = o ? "" : m, v = c.value ?? gn, w = S(
2494
2494
  (g) => {
2495
2495
  const I = g.length > 0 ? g : void 0;
2496
2496
  h(I), y(I);
@@ -2543,12 +2543,12 @@ const tr = O((t) => {
2543
2543
  }
2544
2544
  ) });
2545
2545
  });
2546
- tr.displayName = "MultiSelectInput";
2547
- const js = {
2546
+ er.displayName = "MultiSelectInput";
2547
+ const Us = {
2548
2548
  ...ee,
2549
2549
  type: "multi-select",
2550
2550
  options: []
2551
- }, Me = class Me extends er {
2551
+ }, Me = class Me extends Zi {
2552
2552
  constructor(n) {
2553
2553
  const { placeholder: e = "Select one or more...", ...i } = n;
2554
2554
  super({ ...i, placeholder: e, type: "multi-select" });
@@ -2567,12 +2567,12 @@ const js = {
2567
2567
  return new Me(n);
2568
2568
  }
2569
2569
  getInput(n) {
2570
- return /* @__PURE__ */ a(tr, { field: this, ...n });
2570
+ return /* @__PURE__ */ a(er, { field: this, ...n });
2571
2571
  }
2572
2572
  };
2573
- R(Me, "fieldTypeName", "Multi-select"), R(Me, "fieldTypeDescription", "Allows the user to select a multiple options from a list of options."), R(Me, "Icon", Dr);
2573
+ R(Me, "fieldTypeName", "Multi-select"), R(Me, "fieldTypeDescription", "Allows the user to select a multiple options from a list of options."), R(Me, "Icon", Fr);
2574
2574
  let vt = Me;
2575
- const nr = O((t) => {
2575
+ const tr = O((t) => {
2576
2576
  const [{ inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: s, helpText: l, label: m, fieldProps: c }, d] = Z(t), { name: u, onChange: h, onBlur: y, value: b } = c, f = o ? null : l, v = o ? "" : m, w = S(
2577
2577
  (g) => {
2578
2578
  g && (h(g), y(g));
@@ -2614,12 +2614,12 @@ const nr = O((t) => {
2614
2614
  }
2615
2615
  ) });
2616
2616
  });
2617
- nr.displayName = "SelectInput";
2618
- const Ws = {
2617
+ tr.displayName = "SelectInput";
2618
+ const js = {
2619
2619
  ...ee,
2620
2620
  type: "select",
2621
2621
  options: []
2622
- }, ze = class ze extends er {
2622
+ }, ze = class ze extends Zi {
2623
2623
  constructor(n) {
2624
2624
  const { placeholder: e = "Select one...", ...i } = n;
2625
2625
  super({ ...i, placeholder: e, type: "select" });
@@ -2632,13 +2632,13 @@ const Ws = {
2632
2632
  return new ze(n);
2633
2633
  }
2634
2634
  getInput(n) {
2635
- return /* @__PURE__ */ a(nr, { field: this, ...n });
2635
+ return /* @__PURE__ */ a(tr, { field: this, ...n });
2636
2636
  }
2637
2637
  };
2638
- R(ze, "fieldTypeName", "Dropdown"), R(ze, "fieldTypeDescription", "Allows the user to select a single option from a list of options."), R(ze, "Icon", Ar);
2638
+ R(ze, "fieldTypeName", "Dropdown"), R(ze, "fieldTypeDescription", "Allows the user to select a single option from a list of options."), R(ze, "Icon", Dr);
2639
2639
  let yt = ze;
2640
- const Gn = (t) => "fields" in t;
2641
- class bt extends K {
2640
+ const Hn = (t) => "fields" in t;
2641
+ class bt extends Y {
2642
2642
  constructor(e) {
2643
2643
  const { minLength: i, maxLength: r, placeholder: o = "", ...s } = e;
2644
2644
  super(s);
@@ -2709,7 +2709,7 @@ class bt extends K {
2709
2709
  * equal to the value given for "maximum length".
2710
2710
  */
2711
2711
  R(bt, "_validateMin", (e) => (i, r) => {
2712
- const o = Gn(r) ? oe(r, e) : r;
2712
+ const o = Hn(r) ? oe(r, e) : r;
2713
2713
  return typeof o.maximum_length == "number" && typeof i == "number" && o.maximum_length < i ? "Minimum cannot be greater than maximum." : null;
2714
2714
  }), /**
2715
2715
  * This function returns a function that validates that the value given for "maximum length" (when creating a new field) is greater than or
@@ -2717,15 +2717,15 @@ R(bt, "_validateMin", (e) => (i, r) => {
2717
2717
  */
2718
2718
  R(bt, "_validateMax", (e) => (i, r) => {
2719
2719
  if (typeof i != "number") return null;
2720
- const { minimum_length: o } = Gn(r) ? oe(r, e) : r;
2720
+ const { minimum_length: o } = Hn(r) ? oe(r, e) : r;
2721
2721
  return typeof o != "number" ? null : o > i ? "Maximum cannot be less than minimum." : null;
2722
2722
  });
2723
- const ir = O((t) => {
2723
+ const nr = O((t) => {
2724
2724
  const [
2725
2725
  { inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: s, helpText: l, label: m, fieldProps: c, touched: d, helpers: u },
2726
2726
  h
2727
2727
  ] = Z(t), { name: y, onBlur: b, onChange: f, value: v } = c, w = o ? null : l, x = o ? "" : m, [g, I] = U(void 0);
2728
- Qt(() => {
2728
+ G(() => {
2729
2729
  I(v);
2730
2730
  }, [v]);
2731
2731
  const E = S(
@@ -2762,8 +2762,8 @@ const ir = O((t) => {
2762
2762
  }
2763
2763
  ) });
2764
2764
  });
2765
- ir.displayName = "StringInput";
2766
- const qs = {
2765
+ nr.displayName = "StringInput";
2766
+ const Ws = {
2767
2767
  ...ee,
2768
2768
  type: "string",
2769
2769
  maximum_length: nt,
@@ -2790,17 +2790,17 @@ const qs = {
2790
2790
  });
2791
2791
  }
2792
2792
  getInput(e) {
2793
- return /* @__PURE__ */ a(ir, { field: this, ...e });
2793
+ return /* @__PURE__ */ a(nr, { field: this, ...e });
2794
2794
  }
2795
2795
  };
2796
- R(_e, "fieldTypeName", "Short Text"), R(_e, "fieldTypeDescription", `Short text fields can hold up to ${nt} characters on a single line.`), R(_e, "Icon", Or);
2796
+ R(_e, "fieldTypeName", "Short Text"), R(_e, "fieldTypeDescription", `Short text fields can hold up to ${nt} characters on a single line.`), R(_e, "Icon", Ar);
2797
2797
  let Wt = _e;
2798
- const rr = O((t) => {
2798
+ const ir = O((t) => {
2799
2799
  const [
2800
2800
  { inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: s, helpText: l, label: m, fieldProps: c, touched: d, helpers: u },
2801
2801
  h
2802
2802
  ] = Z(t), { name: y, onBlur: b, onChange: f, value: v } = c, w = o ? null : l, x = o ? "" : m, [g, I] = U(void 0);
2803
- Qt(() => {
2803
+ G(() => {
2804
2804
  I(v);
2805
2805
  }, [v]);
2806
2806
  const E = S(
@@ -2821,7 +2821,7 @@ const rr = O((t) => {
2821
2821
  label: x,
2822
2822
  image: o ? void 0 : s.image,
2823
2823
  children: /* @__PURE__ */ a(
2824
- Jn,
2824
+ Qn,
2825
2825
  {
2826
2826
  id: n,
2827
2827
  value: g ?? "",
@@ -2840,8 +2840,8 @@ const rr = O((t) => {
2840
2840
  }
2841
2841
  ) });
2842
2842
  });
2843
- rr.displayName = "TextInput";
2844
- const Hs = {
2843
+ ir.displayName = "TextInput";
2844
+ const qs = {
2845
2845
  ...ee,
2846
2846
  type: "text",
2847
2847
  maximum_length: Ue
@@ -2864,12 +2864,12 @@ const Hs = {
2864
2864
  });
2865
2865
  }
2866
2866
  getInput(n) {
2867
- return /* @__PURE__ */ a(rr, { field: this, ...n });
2867
+ return /* @__PURE__ */ a(ir, { field: this, ...n });
2868
2868
  }
2869
2869
  };
2870
- R(Be, "fieldTypeName", "Paragraph"), R(Be, "fieldTypeDescription", `Paragraph fields can hold up to ${Ue} characters and can have multiple lines.`), R(Be, "Icon", Pr);
2870
+ R(Be, "fieldTypeName", "Paragraph"), R(Be, "fieldTypeDescription", `Paragraph fields can hold up to ${Ue} characters and can have multiple lines.`), R(Be, "Icon", Or);
2871
2871
  let qt = Be;
2872
- const Gs = O(
2872
+ const Hs = O(
2873
2873
  Xe((t, n) => {
2874
2874
  const { file: e, alt: i, error: r, rightSlot: o, className: s, ...l } = t;
2875
2875
  return /* @__PURE__ */ C(
@@ -2898,7 +2898,7 @@ const Gs = O(
2898
2898
  "bg-transparent": !e
2899
2899
  }),
2900
2900
  children: [
2901
- r ? /* @__PURE__ */ a(F, { icon: "RiFileWarningLine" }) : e && /* @__PURE__ */ a(on, { fileType: e.type }),
2901
+ r ? /* @__PURE__ */ a(F, { icon: "RiFileWarningLine" }) : e && /* @__PURE__ */ a(rn, { fileType: e.type }),
2902
2902
  /* @__PURE__ */ a(ge, { className: "truncate", size: "sm", children: r ?? (e == null ? void 0 : e.name) }),
2903
2903
  o
2904
2904
  ]
@@ -2908,7 +2908,7 @@ const Gs = O(
2908
2908
  }
2909
2909
  );
2910
2910
  })
2911
- ), Xs = (t) => {
2911
+ ), Gs = (t) => {
2912
2912
  const n = ["byte", "kilobyte", "megabyte"];
2913
2913
  let e = t, i = 0;
2914
2914
  for (; e > 1e3 && i < n.length - 1; )
@@ -2919,12 +2919,12 @@ const Gs = O(
2919
2919
  style: "unit",
2920
2920
  unit: n[i]
2921
2921
  }).format(e);
2922
- }, or = O((t) => {
2922
+ }, rr = O((t) => {
2923
2923
  var N;
2924
2924
  const [{ inputId: n, labelId: e, size: i, severity: r, helpText: o, showInputOnly: s, field: l, fieldProps: m }, c] = Z(t), { name: d, onChange: u, onBlur: h } = m;
2925
2925
  let [{ label: y }] = Z(t);
2926
2926
  y = s ? "" : y;
2927
- const b = m.value ?? vn, f = me(null), v = k(() => s ? null : o || (l.maxFileSize ? `Maximum file size: ${l.maxFileSize}MB` : null), [l.maxFileSize, o, s]), w = S(() => {
2927
+ const b = m.value ?? gn, f = me(null), v = k(() => s ? null : o || (l.maxFileSize ? `Maximum file size: ${l.maxFileSize}MB` : null), [l.maxFileSize, o, s]), w = S(() => {
2928
2928
  var L;
2929
2929
  (L = f.current) == null || L.click();
2930
2930
  }, []), x = S(() => {
@@ -2943,7 +2943,7 @@ const Gs = O(
2943
2943
  },
2944
2944
  [b, u]
2945
2945
  );
2946
- Y(() => {
2946
+ G(() => {
2947
2947
  if (!f.current) return;
2948
2948
  const L = new AbortController();
2949
2949
  return f.current.addEventListener(
@@ -3006,7 +3006,7 @@ const Gs = O(
3006
3006
  }
3007
3007
  ) }),
3008
3008
  Array.isArray(b) && b.length > 0 && /* @__PURE__ */ a("div", { className: "flex h-max flex-col gap-2", children: b.map((L, D) => /* @__PURE__ */ a(
3009
- sr,
3009
+ or,
3010
3010
  {
3011
3011
  field: l,
3012
3012
  file: L,
@@ -3019,13 +3019,13 @@ const Gs = O(
3019
3019
  )) })
3020
3020
  ] });
3021
3021
  });
3022
- or.displayName = "UploadInput";
3023
- const sr = O((t) => {
3024
- const { file: n, field: e, onRemove: i, disabled: r } = t, [o, s] = U(null), l = sn(), m = k(() => o && e.getError([o]), [e, o]), { url: c, name: d } = k(() => {
3022
+ rr.displayName = "UploadInput";
3023
+ const or = O((t) => {
3024
+ const { file: n, field: e, onRemove: i, disabled: r } = t, [o, s] = U(null), l = on(), m = k(() => o && e.getError([o]), [e, o]), { url: c, name: d } = k(() => {
3025
3025
  let f = null, v, w;
3026
- return o != null && o.type.startsWith("image/") && (f = URL.createObjectURL(o)), o ? (v = o.name, w = Xs(o.size)) : (v = "Downloading...", w = "..."), { url: f, name: v, size: w };
3026
+ return o != null && o.type.startsWith("image/") && (f = URL.createObjectURL(o)), o ? (v = o.name, w = Gs(o.size)) : (v = "Downloading...", w = "..."), { url: f, name: v, size: w };
3027
3027
  }, [o]);
3028
- Y(() => {
3028
+ G(() => {
3029
3029
  n instanceof Promise ? n.then(s).catch(console.error) : s(n);
3030
3030
  }, [n]);
3031
3031
  const u = S(
@@ -3033,7 +3033,7 @@ const sr = O((t) => {
3033
3033
  if (f.stopPropagation(), !o)
3034
3034
  throw new Error("Cannot download a file that is not resolved.");
3035
3035
  const v = new Blob([o]);
3036
- gn.saveAs(v, d);
3036
+ pn.saveAs(v, d);
3037
3037
  },
3038
3038
  [d, o]
3039
3039
  ), h = S(
@@ -3065,7 +3065,7 @@ const sr = O((t) => {
3065
3065
  [r, h, u, d, o]
3066
3066
  );
3067
3067
  return c ? /* @__PURE__ */ a(
3068
- Gs,
3068
+ Hs,
3069
3069
  {
3070
3070
  className: "cursor-pointer",
3071
3071
  onClick: y,
@@ -3073,20 +3073,20 @@ const sr = O((t) => {
3073
3073
  error: m ?? void 0,
3074
3074
  rightSlot: b
3075
3075
  }
3076
- ) : /* @__PURE__ */ a(ai, { file: o, error: m ?? void 0, rightSlot: b });
3076
+ ) : /* @__PURE__ */ a(si, { file: o, error: m ?? void 0, rightSlot: b });
3077
3077
  });
3078
- sr.displayName = "DisplayFile";
3079
- const Ks = {
3078
+ or.displayName = "DisplayFile";
3079
+ const Xs = {
3080
3080
  ...ee,
3081
3081
  type: "upload",
3082
3082
  extensions: [],
3083
3083
  maximum_size: void 0,
3084
3084
  maximum_files: 1
3085
3085
  };
3086
- function Xn(t, n) {
3086
+ function Gn(t, n) {
3087
3087
  return t.name === n.name && t.size === n.size && t.type === n.type;
3088
3088
  }
3089
- const $e = class $e extends K {
3089
+ const $e = class $e extends Y {
3090
3090
  constructor(e) {
3091
3091
  const { extensions: i, maximum_files: r, maximum_size: o, ...s } = e;
3092
3092
  super({ ...s, type: "upload" });
@@ -3100,7 +3100,7 @@ const $e = class $e extends K {
3100
3100
  return super.isBlank(e) || (e == null ? void 0 : e.length) === 0;
3101
3101
  }
3102
3102
  isEqual(e, i) {
3103
- return e === void 0 && i === void 0 ? !0 : !(e === void 0 || i === void 0 || !e.every((r) => i.some((o) => Xn(r, o))) || !i.every((r) => e.some((o) => Xn(o, r))));
3103
+ return e === void 0 && i === void 0 ? !0 : !(e === void 0 || i === void 0 || !e.every((r) => i.some((o) => Gn(r, o))) || !i.every((r) => e.some((o) => Gn(o, r))));
3104
3104
  }
3105
3105
  static getFieldCreationSchema(e = "") {
3106
3106
  const i = e && `${e}.`;
@@ -3186,12 +3186,12 @@ const $e = class $e extends K {
3186
3186
  return new $e(e);
3187
3187
  }
3188
3188
  getInput(e) {
3189
- return /* @__PURE__ */ a(or, { field: this, ...e });
3189
+ return /* @__PURE__ */ a(rr, { field: this, ...e });
3190
3190
  }
3191
3191
  };
3192
- R($e, "fieldTypeName", "Upload"), R($e, "fieldTypeDescription", "Allows a file to be uploaded."), R($e, "Icon", kr);
3192
+ R($e, "fieldTypeName", "Upload"), R($e, "fieldTypeDescription", "Allows a file to be uploaded."), R($e, "Icon", Pr);
3193
3193
  let Ht = $e;
3194
- const wn = {
3194
+ const bn = {
3195
3195
  date: Vt,
3196
3196
  number: Ee,
3197
3197
  boolean: Ge,
@@ -3204,61 +3204,61 @@ const wn = {
3204
3204
  // TODO: Underscore
3205
3205
  "multi-string": gt,
3206
3206
  "multi-select": vt
3207
- }, Ys = {
3208
- date: Fs,
3209
- number: Vs,
3210
- boolean: Ls,
3211
- select: Ws,
3212
- string: qs,
3213
- text: Hs,
3214
- custom: Ds,
3215
- upload: Ks,
3216
- qr: Us,
3207
+ }, Ks = {
3208
+ date: Ls,
3209
+ number: $s,
3210
+ boolean: Ts,
3211
+ select: js,
3212
+ string: Ws,
3213
+ text: qs,
3214
+ custom: Fs,
3215
+ upload: Xs,
3216
+ qr: Vs,
3217
3217
  // TODO: Underscore
3218
- "multi-string": $s,
3219
- "multi-select": js
3220
- }, st = 50, Qs = st * 1e3, Js = Qs * 1e3, ar = (t) => {
3218
+ "multi-string": Bs,
3219
+ "multi-select": Us
3220
+ }, st = 50, Ys = st * 1e3, Qs = Ys * 1e3, sr = (t) => {
3221
3221
  const n = t.type;
3222
- return wn[n].deserialize(t);
3223
- }, xn = (t) => t.type === "section" ? X.deserialize(t) : ar(t);
3224
- function Zs(t, n = {}) {
3222
+ return bn[n].deserialize(t);
3223
+ }, wn = (t) => t.type === "section" ? K.deserialize(t) : sr(t);
3224
+ function Js(t, n = {}) {
3225
3225
  const { readonly: e = !1 } = n;
3226
3226
  return {
3227
3227
  title: t.title,
3228
3228
  description: t.description,
3229
- fields: t.fields.map((i) => xn(i)),
3229
+ fields: t.fields.map((i) => wn(i)),
3230
3230
  meta: { readonly: e }
3231
3231
  };
3232
3232
  }
3233
- function Cn(t) {
3233
+ function xn(t) {
3234
3234
  const n = [];
3235
3235
  for (const e of t.fields)
3236
- if (e instanceof X)
3236
+ if (e instanceof K)
3237
3237
  for (const i of e.fields)
3238
3238
  n.push(i);
3239
3239
  else {
3240
- if (!(e instanceof K))
3240
+ if (!(e instanceof Y))
3241
3241
  throw new Error(`Invalid field type: ${e.type}`);
3242
3242
  n.push(e);
3243
3243
  }
3244
3244
  return n;
3245
3245
  }
3246
- function ea(t) {
3247
- const n = Cn(t), e = {};
3246
+ function Zs(t) {
3247
+ const n = xn(t), e = {};
3248
3248
  for (const i of n)
3249
3249
  e[i.identifier] = i;
3250
3250
  return e;
3251
3251
  }
3252
- function Sa(t, n) {
3253
- const e = Cn(t), i = {};
3252
+ function Ra(t, n) {
3253
+ const e = xn(t), i = {};
3254
3254
  for (const r of e) {
3255
3255
  const o = n[r.identifier] ?? null;
3256
3256
  o !== null ? i[r.identifier] = r.decodeJsonToValue(o) : i[r.identifier] = o;
3257
3257
  }
3258
3258
  return i;
3259
3259
  }
3260
- function Na(t, n) {
3261
- const e = Cn(t), i = {};
3260
+ function Sa(t, n) {
3261
+ const e = xn(t), i = {};
3262
3262
  for (const r of e) {
3263
3263
  const o = n[r.identifier];
3264
3264
  i[r.identifier] = r.encodeValueToJson(o);
@@ -3268,7 +3268,7 @@ function Na(t, n) {
3268
3268
  function Gt(t) {
3269
3269
  return Array.isArray(t) && t.some((n) => n instanceof File || n instanceof Promise);
3270
3270
  }
3271
- function lr(t, n) {
3271
+ function ar(t, n) {
3272
3272
  if (!t) return !0;
3273
3273
  if (Gt(n) || Gt(t.value)) throw new Error("Conditions do not support file uploads");
3274
3274
  const e = Array.isArray(n) ? n.map((r) => typeof r == "string" ? r : r.value) : n, i = Array.isArray(t.value) ? t.value.map((r) => typeof r == "string" ? r : r.value) : t.value;
@@ -3279,12 +3279,12 @@ function lr(t, n) {
3279
3279
  }
3280
3280
  return i === n;
3281
3281
  }
3282
- const cr = O((t) => {
3282
+ const lr = O((t) => {
3283
3283
  const { field: n, ...e } = t, { label: i, description: r, fields: o, condition: s } = n, { values: l, setFieldValue: m } = Ie(), c = s != null && s.identifier ? oe(l, s.identifier) : void 0, d = k(
3284
- () => c === void 0 || lr(s, c),
3284
+ () => c === void 0 || ar(s, c),
3285
3285
  [s, c]
3286
3286
  );
3287
- Y(() => {
3287
+ G(() => {
3288
3288
  if (!d)
3289
3289
  for (const h of o)
3290
3290
  m(h.getId(), "").then();
@@ -3293,7 +3293,7 @@ const cr = O((t) => {
3293
3293
  return d ? /* @__PURE__ */ a(He, { variant: "soft", children: /* @__PURE__ */ C("div", { className: "flex flex-col gap-4", children: [
3294
3294
  (i || r) && /* @__PURE__ */ C(be, { children: [
3295
3295
  /* @__PURE__ */ C("div", { className: "flex flex-col", children: [
3296
- /* @__PURE__ */ a(Zn, { size: "md", children: i }),
3296
+ /* @__PURE__ */ a(Jn, { size: "md", children: i }),
3297
3297
  /* @__PURE__ */ a(ge, { accentColor: "base", children: r })
3298
3298
  ] }),
3299
3299
  /* @__PURE__ */ a(Yt, { size: "full" })
@@ -3301,8 +3301,8 @@ const cr = O((t) => {
3301
3301
  u
3302
3302
  ] }) }) : null;
3303
3303
  });
3304
- cr.displayName = "FieldSectionLayout";
3305
- const Ve = class Ve extends li {
3304
+ lr.displayName = "FieldSectionLayout";
3305
+ const Ve = class Ve extends ai {
3306
3306
  constructor(e) {
3307
3307
  const { label: i = null, fields: r, condition: o = null, conditional: s, ...l } = e;
3308
3308
  super({ ...l, type: "section" });
@@ -3354,7 +3354,7 @@ const Ve = class Ve extends li {
3354
3354
  // Declare a custom field that will be used to input a value for the condition. The value of the
3355
3355
  // conditional field selected in the previous step must be equal to the value the user inputs into
3356
3356
  // this field for the section to be rendered.
3357
- new As({
3357
+ new Ds({
3358
3358
  label: "Value",
3359
3359
  identifier: `${r}condition.value`,
3360
3360
  required: !0,
@@ -3382,7 +3382,7 @@ const Ve = class Ve extends li {
3382
3382
  static deserialize(e) {
3383
3383
  if (e.type !== "section") throw new Error("Invalid type");
3384
3384
  if (!Array.isArray(e.fields)) throw new Error(`Invalid fields: ${e.fields} (not an array)`);
3385
- const i = e.fields.map(ar);
3385
+ const i = e.fields.map(sr);
3386
3386
  return new Ve({ ...e, fields: i });
3387
3387
  }
3388
3388
  conditional() {
@@ -3406,32 +3406,32 @@ const Ve = class Ve extends li {
3406
3406
  return i;
3407
3407
  }
3408
3408
  getInput(e) {
3409
- return /* @__PURE__ */ a(cr, { field: this, ...e });
3409
+ return /* @__PURE__ */ a(lr, { field: this, ...e });
3410
3410
  }
3411
3411
  };
3412
3412
  R(Ve, "fieldTypeName", "Section"), R(Ve, "fieldTypeDescription", "Sections can be useful for grouping fields together. They can also be conditionally shown or hidden.");
3413
- let X = Ve;
3414
- const ye = (t) => Object.keys(t).length > 0, En = (t, n) => {
3413
+ let K = Ve;
3414
+ const ye = (t) => Object.keys(t).length > 0, Cn = (t, n) => {
3415
3415
  const e = {};
3416
3416
  for (const i of t.fields)
3417
- if (i instanceof X) {
3417
+ if (i instanceof K) {
3418
3418
  if (i.condition) {
3419
3419
  const { identifier: r } = i.condition;
3420
- if (!lr(i.condition, oe(n, r)))
3420
+ if (!ar(i.condition, oe(n, r)))
3421
3421
  continue;
3422
3422
  }
3423
3423
  Object.assign(e, i.getErrors(n));
3424
3424
  } else {
3425
- if (!(i instanceof K))
3425
+ if (!(i instanceof Y))
3426
3426
  throw new Error("Invalid field type");
3427
3427
  const r = i.getId(), o = i.getError(oe(n, r), n);
3428
3428
  o && Et(e, r, o);
3429
3429
  }
3430
3430
  if (ye(e)) return e;
3431
- }, In = (t, n) => t.reduce(
3431
+ }, En = (t, n) => t.reduce(
3432
3432
  (e, i) => {
3433
- if (i instanceof X)
3434
- return { ...e, ...In(i.fields, n) };
3433
+ if (i instanceof K)
3434
+ return { ...e, ...En(i.fields, n) };
3435
3435
  const r = i.getId();
3436
3436
  return Et(e, r, e[r] ?? void 0), e;
3437
3437
  },
@@ -3440,16 +3440,16 @@ const ye = (t) => Object.keys(t).length > 0, En = (t, n) => {
3440
3440
  // > Object is not extensible"
3441
3441
  // This means that we can't mutate `acc` because it's frozen for some
3442
3442
  // unknown reason.
3443
- Ur(n)
3444
- ), dr = (t, n, e) => t.reduce((i, r) => {
3445
- if (r instanceof X)
3446
- return { ...i, ...dr(r.fields, n, e) };
3447
- if (r instanceof K) {
3443
+ Vr(n)
3444
+ ), cr = (t, n, e) => t.reduce((i, r) => {
3445
+ if (r instanceof K)
3446
+ return { ...i, ...cr(r.fields, n, e) };
3447
+ if (r instanceof Y) {
3448
3448
  const o = r.getId(), s = n[o], l = e[o];
3449
3449
  r.isEqual(s, l) || Et(i, o, l);
3450
3450
  }
3451
3451
  return i;
3452
- }, {}), ta = O(
3452
+ }, {}), ea = O(
3453
3453
  Xe((t, n) => {
3454
3454
  const {
3455
3455
  schema: e,
@@ -3468,34 +3468,34 @@ const ye = (t) => Object.keys(t).length > 0, En = (t, n) => {
3468
3468
  buttonProps: b,
3469
3469
  enableReinitialize: f = !1,
3470
3470
  excludeUnchangedFields: v = !1
3471
- } = t, { readonly: w } = e.meta, x = Cr(), g = k(() => In(e.fields, i), [e.fields, i]), I = S(
3471
+ } = t, { readonly: w } = e.meta, x = xr(), g = k(() => En(e.fields, i), [e.fields, i]), I = S(
3472
3472
  ($) => {
3473
- o == null || o(v ? dr(e.fields, g, $) : $);
3473
+ o == null || o(v ? cr(e.fields, g, $) : $);
3474
3474
  },
3475
3475
  [v, g, o, e.fields]
3476
- ), E = en({
3476
+ ), E = Zt({
3477
3477
  initialValues: g,
3478
3478
  onSubmit: I,
3479
- validate: ($) => En(e, $),
3479
+ validate: ($) => Cn(e, $),
3480
3480
  // only validate the entire form on submit
3481
3481
  validateOnBlur: !1,
3482
3482
  validateOnChange: !1,
3483
3483
  enableReinitialize: f
3484
3484
  }), { dirty: T } = E, N = k(
3485
- () => typeof e.title == "string" ? /* @__PURE__ */ a(Zn, { size: "md", children: e.title }) : e.title,
3485
+ () => typeof e.title == "string" ? /* @__PURE__ */ a(Jn, { size: "md", children: e.title }) : e.title,
3486
3486
  [e.title]
3487
3487
  ), L = k(
3488
3488
  () => typeof e.description == "string" ? /* @__PURE__ */ a(ge, { accentColor: "base", children: e.description }) : e.description,
3489
3489
  [e.description]
3490
3490
  ), D = S(
3491
3491
  ($, j) => {
3492
- ea(e)[$].isEqual(g[$], j) || r == null || r({ ...E.values, [$]: j }, { [$]: j });
3492
+ Zs(e)[$].isEqual(g[$], j) || r == null || r({ ...E.values, [$]: j }, { [$]: j });
3493
3493
  },
3494
3494
  [E.values, g, r, e]
3495
3495
  ), M = ft(e.fields, { formId: x, disabled: w, onValuesChange: D });
3496
- return Y(() => {
3496
+ return G(() => {
3497
3497
  T && c && c(), d && d(T);
3498
- }, [T, c, d]), /* @__PURE__ */ a(tn, { value: E, children: /* @__PURE__ */ C(
3498
+ }, [T, c, d]), /* @__PURE__ */ a(en, { value: E, children: /* @__PURE__ */ C(
3499
3499
  "form",
3500
3500
  {
3501
3501
  id: x,
@@ -3532,7 +3532,7 @@ const ye = (t) => Object.keys(t).length > 0, En = (t, n) => {
3532
3532
  ) });
3533
3533
  })
3534
3534
  ), We = O((t) => {
3535
- const { name: n, render: e } = t, { submitForm: i } = Ie(), [r, o, s] = Zt(n), l = k(() => {
3535
+ const { name: n, render: e } = t, { submitForm: i } = Ie(), [r, o, s] = Jt(n), l = k(() => {
3536
3536
  const m = (c) => {
3537
3537
  s.setValue(c, !1);
3538
3538
  };
@@ -3548,9 +3548,9 @@ const ye = (t) => Object.keys(t).length > 0, En = (t, n) => {
3548
3548
  return /* @__PURE__ */ a(be, { children: l });
3549
3549
  });
3550
3550
  We.displayName = "PatchField";
3551
- const Ta = O(
3551
+ const Na = O(
3552
3552
  Xe((t, n) => {
3553
- const { children: e, schema: i, values: r, onPatch: o, onError: s, requiresDiff: l = !0, onDirtyChange: m, ...c } = t, d = k(() => In(i.fields, r), [i.fields, r]), u = S(
3553
+ const { children: e, schema: i, values: r, onPatch: o, onError: s, requiresDiff: l = !0, onDirtyChange: m, ...c } = t, d = k(() => En(i.fields, r), [i.fields, r]), u = S(
3554
3554
  (x) => {
3555
3555
  const g = {};
3556
3556
  for (const I in x) {
@@ -3568,7 +3568,7 @@ const Ta = O(
3568
3568
  [u, o, l]
3569
3569
  ), y = S(
3570
3570
  (x) => {
3571
- const g = En(i, x);
3571
+ const g = Cn(i, x);
3572
3572
  if (g && s(g), m) {
3573
3573
  const I = u(x);
3574
3574
  m(ye(I));
@@ -3576,7 +3576,7 @@ const Ta = O(
3576
3576
  return g;
3577
3577
  },
3578
3578
  [i, m, s, u]
3579
- ), b = en({
3579
+ ), b = Zt({
3580
3580
  initialValues: d,
3581
3581
  onSubmit: h,
3582
3582
  validate: y,
@@ -3589,18 +3589,18 @@ const Ta = O(
3589
3589
  ye(x) && m(!0);
3590
3590
  }
3591
3591
  }, [b.values, u, m]), { errors: v, resetForm: w } = b;
3592
- return Y(() => {
3592
+ return G(() => {
3593
3593
  ye(v) && w({ values: d, errors: {} });
3594
- }, [v, d, w]), /* @__PURE__ */ a(tn, { value: b, children: /* @__PURE__ */ a("form", { ...c, ref: n, onSubmit: b.handleSubmit, onChange: f, children: e }) });
3594
+ }, [v, d, w]), /* @__PURE__ */ a(en, { value: b, children: /* @__PURE__ */ a("form", { ...c, ref: n, onSubmit: b.handleSubmit, onChange: f, children: e }) });
3595
3595
  })
3596
- ), at = "form-builder", na = [
3596
+ ), at = "form-builder", ta = [
3597
3597
  ["string", "text"],
3598
3598
  ["select", "multi-select", "upload", "qr"],
3599
3599
  ["boolean", "date", "number", "multi-string"]
3600
3600
  ], Xt = {
3601
- ...wn,
3602
- section: X
3603
- }, St = ei({}), ia = (t, n) => {
3601
+ ...bn,
3602
+ section: K
3603
+ }, St = Zn({}), na = (t, n) => {
3604
3604
  var i;
3605
3605
  const e = { ...t };
3606
3606
  switch (n.type) {
@@ -3615,7 +3615,7 @@ const Ta = O(
3615
3615
  case "update":
3616
3616
  return n.state;
3617
3617
  }
3618
- }, ra = (t, n) => {
3618
+ }, ia = (t, n) => {
3619
3619
  if (n)
3620
3620
  for (let e = 0; e < t.length; e++) {
3621
3621
  const i = t[e];
@@ -3624,7 +3624,7 @@ const Ta = O(
3624
3624
  if (r.identifier === n) return e;
3625
3625
  }
3626
3626
  }
3627
- }, Kn = (t) => {
3627
+ }, Xn = (t) => {
3628
3628
  var e, i, r;
3629
3629
  const n = {};
3630
3630
  for (let o = 0; o < t.length; o++) {
@@ -3634,32 +3634,32 @@ const Ta = O(
3634
3634
  (i = s.condition) != null && i.identifier && m.add(s.condition.identifier), n[s.identifier] = {
3635
3635
  disabled: !1,
3636
3636
  conditionFields: m,
3637
- conditionIndex: ra(t, (r = s.condition) == null ? void 0 : r.identifier),
3637
+ conditionIndex: ia(t, (r = s.condition) == null ? void 0 : r.identifier),
3638
3638
  index: o,
3639
3639
  label: s.label
3640
3640
  };
3641
3641
  }
3642
3642
  return n;
3643
- }, Rn = O((t) => {
3643
+ }, In = O((t) => {
3644
3644
  const { index: n, type: e, sectionIndex: i, remove: r, duplicate: o, move: s, upload: l } = t;
3645
3645
  if (e !== "section" && !l)
3646
3646
  throw new Error("Upload function prop must be defined for non-section fields.");
3647
3647
  const { values: m } = Ie(), c = me(null), d = k(() => {
3648
3648
  const u = [
3649
3649
  {
3650
- Icon: Mr,
3650
+ Icon: kr,
3651
3651
  key: "duplicate",
3652
3652
  text: "Duplicate",
3653
3653
  buttonProps: { onClick: o }
3654
3654
  }
3655
3655
  ];
3656
3656
  return u.push({
3657
- Icon: zr,
3657
+ Icon: Mr,
3658
3658
  key: "delete",
3659
3659
  text: "Delete",
3660
3660
  buttonProps: { onClick: r }
3661
3661
  }), e !== "section" && u.unshift({
3662
- Icon: _r,
3662
+ Icon: zr,
3663
3663
  key: "upload",
3664
3664
  text: "Upload image",
3665
3665
  buttonProps: {
@@ -3669,7 +3669,7 @@ const Ta = O(
3669
3669
  }
3670
3670
  }
3671
3671
  }), (i === void 0 && n !== m.fields.length - 1 || i !== void 0 && (i < m.fields.length - 1 || n !== m.fields[i].fields.length - 1)) && u.unshift({
3672
- Icon: Br,
3672
+ Icon: _r,
3673
3673
  key: "moveDown",
3674
3674
  text: "Move down",
3675
3675
  buttonProps: {
@@ -3678,7 +3678,7 @@ const Ta = O(
3678
3678
  }
3679
3679
  }
3680
3680
  }), (i === void 0 && n !== 0 || i !== void 0 && (i !== 0 || n !== 0)) && u.unshift({
3681
- Icon: $r,
3681
+ Icon: Br,
3682
3682
  key: "moveUp",
3683
3683
  text: "Move up",
3684
3684
  buttonProps: {
@@ -3722,7 +3722,7 @@ const Ta = O(
3722
3722
  e !== "section" && /* @__PURE__ */ a("input", { style: { display: "none" }, ref: c, type: "file", accept: "image/*", onChange: l })
3723
3723
  ] });
3724
3724
  });
3725
- Rn.displayName = "FieldActions";
3725
+ In.displayName = "FieldActions";
3726
3726
  const Kt = O((t) => {
3727
3727
  const { popoverInputs: n, hasError: e, ...i } = t;
3728
3728
  return /* @__PURE__ */ C(le.Root, { children: [
@@ -3746,8 +3746,8 @@ const Kt = O((t) => {
3746
3746
  ] });
3747
3747
  });
3748
3748
  Kt.displayName = "FieldSettingsPopover";
3749
- const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3750
- const i = wn[e], r = i.Icon;
3749
+ const dr = (t = () => null) => k(() => ta.map((n) => n.map((e) => {
3750
+ const i = bn[e], r = i.Icon;
3751
3751
  return {
3752
3752
  children: i.fieldTypeName,
3753
3753
  icon: /* @__PURE__ */ a(r, {}),
@@ -3756,16 +3756,16 @@ const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3756
3756
  t(e);
3757
3757
  }
3758
3758
  };
3759
- })), [t]), Yn = 576, Sn = O((t) => {
3760
- var Se, Nt, Nn, Tn, Ln;
3761
- const { parentPath: n, index: e, initial: i, conditionalSourceFields: r } = t, { values: o, setFieldValue: s, errors: l } = Ie(), m = ur(), c = sn(), { disableRequiredFields: d } = Jt(St), u = me(null), [h, y] = U(
3762
- u.current && u.current.getBoundingClientRect().width >= Yn
3759
+ })), [t]), Kn = 576, Rn = O((t) => {
3760
+ var Se, Nt, Sn, Nn, Tn;
3761
+ const { parentPath: n, index: e, initial: i, conditionalSourceFields: r } = t, { values: o, setFieldValue: s, errors: l } = Ie(), m = dr(), c = on(), { disableRequiredFields: d } = Qt(St), u = me(null), [h, y] = U(
3762
+ u.current && u.current.getBoundingClientRect().width >= Kn
3763
3763
  );
3764
- Y(() => {
3764
+ G(() => {
3765
3765
  const A = u.current;
3766
3766
  if (A) {
3767
- const _ = new ResizeObserver((G) => {
3768
- G[0] && y(G[0].contentRect.width >= Yn);
3767
+ const _ = new ResizeObserver((X) => {
3768
+ X[0] && y(X[0].contentRect.width >= Kn);
3769
3769
  });
3770
3770
  return _.observe(A), () => {
3771
3771
  _.disconnect();
@@ -3773,24 +3773,24 @@ const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3773
3773
  }
3774
3774
  }, []);
3775
3775
  const [b, f] = U(void 0);
3776
- Y(() => {
3776
+ G(() => {
3777
3777
  ve(i) ? f(void 0) : i.image instanceof Promise ? i.image.then(f).catch(console.error) : f(i.image);
3778
3778
  }, [i]);
3779
3779
  const v = b ? URL.createObjectURL(b) : void 0, w = S(
3780
3780
  (A) => {
3781
3781
  A.stopPropagation();
3782
- const { image: _, ...G } = i;
3783
- s(`${n}.${e}`, G).then();
3782
+ const { image: _, ...X } = i;
3783
+ s(`${n}.${e}`, X).then();
3784
3784
  },
3785
3785
  [e, i, n, s]
3786
3786
  );
3787
- Y(() => {
3787
+ G(() => {
3788
3788
  ve(i) && !i.conditional && s(`${n}.${e}.condition`, null).then();
3789
3789
  }, [e, i, n, s]);
3790
3790
  const x = k(
3791
3791
  () => {
3792
3792
  var A, _;
3793
- return ve(i) ? (_ = Xi(o.fields, (A = i.condition) == null ? void 0 : A.identifier)) == null ? void 0 : _.label : void 0;
3793
+ return ve(i) ? (_ = Gi(o.fields, (A = i.condition) == null ? void 0 : A.identifier)) == null ? void 0 : _.label : void 0;
3794
3794
  },
3795
3795
  [i, o.fields]
3796
3796
  ), g = ve(i) ? Array.isArray((Se = i.condition) == null ? void 0 : Se.value) ? "contains all of" : "equals" : void 0;
@@ -3798,7 +3798,7 @@ const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3798
3798
  if (ve(i)) {
3799
3799
  if (Gt((Nt = i.condition) == null ? void 0 : Nt.value))
3800
3800
  throw new Error("File values are not supported for conditions.");
3801
- I = Array.isArray((Nn = i.condition) == null ? void 0 : Nn.value) ? i.condition.value.map((A) => typeof A == "string" ? A : A.label).join(", ") : (Ln = (Tn = i.condition) == null ? void 0 : Tn.value) == null ? void 0 : Ln.toString();
3801
+ I = Array.isArray((Sn = i.condition) == null ? void 0 : Sn.value) ? i.condition.value.map((A) => typeof A == "string" ? A : A.label).join(", ") : (Tn = (Nn = i.condition) == null ? void 0 : Nn.value) == null ? void 0 : Tn.toString();
3802
3802
  }
3803
3803
  const E = S((A) => {
3804
3804
  A.target.parentNode instanceof HTMLElement && (A.target.parentNode.dataset.replicatedValue = A.target.value);
@@ -3806,34 +3806,34 @@ const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3806
3806
  A.target.parentNode instanceof HTMLElement && (A.target.parentNode.dataset.replicatedValue = A.target.value);
3807
3807
  }, []), N = i.type, L = Xt[N], [D, M] = k(() => {
3808
3808
  let A = [], _ = [];
3809
- if (L === X) {
3809
+ if (L === K) {
3810
3810
  if (r === void 0)
3811
3811
  throw new Error("Conditional source fields must be provided when changing sections.");
3812
- const G = L.getFieldCreationSchema(r, `${n}.${e}`);
3812
+ const X = L.getFieldCreationSchema(r, `${n}.${e}`);
3813
3813
  A = A.concat(
3814
- G.filter((W) => W.showDirectly).map((W) => W.field)
3814
+ X.filter((W) => W.showDirectly).map((W) => W.field)
3815
3815
  ), _ = _.concat(
3816
- G.filter((W) => !W.showDirectly).map((W) => W.field)
3816
+ X.filter((W) => !W.showDirectly).map((W) => W.field)
3817
3817
  );
3818
3818
  } else {
3819
- if (!(L.prototype instanceof K))
3819
+ if (!(L.prototype instanceof Y))
3820
3820
  throw new Error(`Field must be an instance of BaseField. Got ${L.toString()}.`);
3821
- const G = L.getFieldCreationSchema(
3821
+ const X = L.getFieldCreationSchema(
3822
3822
  `${n}.${e}`
3823
3823
  );
3824
3824
  h ? (A = [
3825
3825
  ...A,
3826
- ...G.filter((W) => W.showDirectly).map((W) => W.field)
3826
+ ...X.filter((W) => W.showDirectly).map((W) => W.field)
3827
3827
  ], _ = [
3828
3828
  ..._,
3829
- ...G.filter((W) => !W.showDirectly).map((W) => W.field)
3830
- ]) : _ = [..._, ...G.map((W) => W.field)];
3829
+ ...X.filter((W) => !W.showDirectly).map((W) => W.field)
3830
+ ]) : _ = [..._, ...X.map((W) => W.field)];
3831
3831
  }
3832
3832
  return [A, _];
3833
3833
  }, [L, r, n, e, h]), $ = ft(D, {
3834
3834
  formId: at,
3835
3835
  disabled: !1,
3836
- ...L === X && { size: "sm" }
3836
+ ...L === K && { size: "sm" }
3837
3837
  }), j = ft(M, {
3838
3838
  formId: at,
3839
3839
  disabled: !1
@@ -3841,9 +3841,9 @@ const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3841
3841
  let z = M.length > 0;
3842
3842
  ve(i) && M.length > 0 && (z = i.conditional);
3843
3843
  const J = M.some((A) => {
3844
- const _ = oe(l, L === X ? `${n}.${e}.condition` : A.getId());
3844
+ const _ = oe(l, L === K ? `${n}.${e}.condition` : A.getId());
3845
3845
  return _ && (typeof _ != "object" || ye(_));
3846
- }), P = J ? we.danger : void 0, H = k(() => xn(i), [i]), de = Hi(H, { formId: at, showInputOnly: !1 }), ne = k(
3846
+ }), P = J ? we.danger : void 0, H = k(() => wn(i), [i]), de = qi(H, { formId: at, showInputOnly: !1 }), ne = k(
3847
3847
  () => m.flat().find((A) => A.value === N),
3848
3848
  [m, N]
3849
3849
  ), ue = S(() => {
@@ -3852,7 +3852,7 @@ const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3852
3852
  }));
3853
3853
  }, [c, b]);
3854
3854
  return /* @__PURE__ */ a("div", { className: "flex grow items-center w-full", ref: u, children: /* @__PURE__ */ C("div", { className: "flex w-full flex-col gap-2", children: [
3855
- L === X && (D.length > 0 || z) && /* @__PURE__ */ C("div", { className: "flex flex-col gap-2", children: [
3855
+ L === K && (D.length > 0 || z) && /* @__PURE__ */ C("div", { className: "flex flex-col gap-2", children: [
3856
3856
  $,
3857
3857
  z && /* @__PURE__ */ C("div", { className: "flex items-center gap-4", children: [
3858
3858
  /* @__PURE__ */ a(
@@ -3873,7 +3873,7 @@ const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3873
3873
  ] }) })
3874
3874
  ] })
3875
3875
  ] }),
3876
- L !== X && /* @__PURE__ */ C("div", { className: "flex gap-2 w-full justify-between", children: [
3876
+ L !== K && /* @__PURE__ */ C("div", { className: "flex gap-2 w-full justify-between", children: [
3877
3877
  /* @__PURE__ */ C("div", { className: "flex gap-2 items-center", children: [
3878
3878
  /* @__PURE__ */ C(zt, { accentColor: "base", variant: "soft", size: "sm", children: [
3879
3879
  ne == null ? void 0 : ne.icon,
@@ -3940,8 +3940,8 @@ const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3940
3940
  className: "bg-transparent outline-none text-sm placeholder-(--base-a9)",
3941
3941
  placeholder: N === "section" ? "Enter a section label (optional)" : "Enter your question",
3942
3942
  value: _,
3943
- onChange: (G) => {
3944
- A(G.target.value);
3943
+ onChange: (X) => {
3944
+ A(X.target.value);
3945
3945
  },
3946
3946
  onInput: E,
3947
3947
  maxLength: 200
@@ -3959,8 +3959,8 @@ const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3959
3959
  className: "bg-transparent outline-none text-sm field-sizing-content grow placeholder-(--base-a9)",
3960
3960
  placeholder: `Enter a ${N === "section" ? "section" : "field"} description (optional)`,
3961
3961
  value: _,
3962
- onChange: (G) => {
3963
- A(G.target.value);
3962
+ onChange: (X) => {
3963
+ A(X.target.value);
3964
3964
  },
3965
3965
  onInput: T,
3966
3966
  maxLength: 1e3
@@ -3968,8 +3968,8 @@ const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3968
3968
  )
3969
3969
  }
3970
3970
  ),
3971
- L !== X && D.length > 0 && /* @__PURE__ */ a("div", { className: "w-full", children: $ }),
3972
- L !== X && /* @__PURE__ */ C(He, { className: "flex gap-4 bg-(--accent-a2) items-center", children: [
3971
+ L !== K && D.length > 0 && /* @__PURE__ */ a("div", { className: "w-full", children: $ }),
3972
+ L !== K && /* @__PURE__ */ C(He, { className: "flex gap-4 bg-(--accent-a2) items-center", children: [
3973
3973
  /* @__PURE__ */ C(Tt.Root, { children: [
3974
3974
  /* @__PURE__ */ a(Tt.Trigger, { asChild: !0, children: /* @__PURE__ */ a(zt, { icon: !0, size: "sm", variant: "soft", accentColor: "base", children: /* @__PURE__ */ a(F, { icon: "RiEyeLine" }) }) }),
3975
3975
  /* @__PURE__ */ a(Tt.Content, { className: "w-[225px]", size: "sm", align: "start", children: "This is a preview of the field as it will be rendered in the form." })
@@ -3978,9 +3978,9 @@ const ur = (t = () => null) => k(() => na.map((n) => n.map((e) => {
3978
3978
  ] })
3979
3979
  ] }) });
3980
3980
  });
3981
- Sn.displayName = "FieldBuilder";
3982
- const fr = O((t) => {
3983
- const { field: n, index: e, sectionIndex: i, remove: r } = t, { setFieldValue: o, values: s } = Ie(), { reorderField: l } = bn(), { showInfo: m, showError: c } = Ct(), d = `fields.${i}.fields`, u = k(
3981
+ Rn.displayName = "FieldBuilder";
3982
+ const ur = O((t) => {
3983
+ const { field: n, index: e, sectionIndex: i, remove: r } = t, { setFieldValue: o, values: s } = Ie(), { reorderField: l } = yn(), { showInfo: m, showError: c } = Ct(), d = `fields.${i}.fields`, u = k(
3984
3984
  () => ({
3985
3985
  index: e,
3986
3986
  parentPath: d,
@@ -4019,7 +4019,7 @@ const fr = O((t) => {
4019
4019
  if (!v || v.length !== 1) return;
4020
4020
  const w = v.item(0);
4021
4021
  if (w) {
4022
- if (w.size > Js) {
4022
+ if (w.size > Qs) {
4023
4023
  c({
4024
4024
  title: "File upload error",
4025
4025
  description: `The file ${w.name} exceeded the maximum file size`
@@ -4034,7 +4034,7 @@ const fr = O((t) => {
4034
4034
  },
4035
4035
  [n, e, d, o, c]
4036
4036
  );
4037
- return /* @__PURE__ */ a(rn, { draggableId: n.identifier, index: e, children: (f) => /* @__PURE__ */ a(
4037
+ return /* @__PURE__ */ a(nn, { draggableId: n.identifier, index: e, children: (f) => /* @__PURE__ */ a(
4038
4038
  He,
4039
4039
  {
4040
4040
  ref: f.innerRef,
@@ -4042,9 +4042,9 @@ const fr = O((t) => {
4042
4042
  ...f.dragHandleProps,
4043
4043
  className: "mb-4",
4044
4044
  children: /* @__PURE__ */ C("div", { className: "flex items-center justify-between gap-4 w-full", children: [
4045
- /* @__PURE__ */ a(Sn, { ...u }),
4045
+ /* @__PURE__ */ a(Rn, { ...u }),
4046
4046
  /* @__PURE__ */ a(
4047
- Rn,
4047
+ In,
4048
4048
  {
4049
4049
  index: e,
4050
4050
  type: n.type,
@@ -4059,10 +4059,10 @@ const fr = O((t) => {
4059
4059
  }
4060
4060
  ) });
4061
4061
  });
4062
- fr.displayName = "FieldWithActions";
4063
- const mr = O((t) => {
4062
+ ur.displayName = "FieldWithActions";
4063
+ const fr = O((t) => {
4064
4064
  var I;
4065
- const { field: n, index: e, dropState: i } = t, r = (I = i[n.identifier]) == null ? void 0 : I.disabled, { setFieldValue: o, values: s } = Ie(), l = yr(), { reorderSection: m } = bn(), { showInfo: c } = Ct(), { fieldsOnly: d } = Jt(St), u = S(
4065
+ const { field: n, index: e, dropState: i } = t, r = (I = i[n.identifier]) == null ? void 0 : I.disabled, { setFieldValue: o, values: s } = Ie(), l = vr(), { reorderSection: m } = yn(), { showInfo: c } = Ct(), { fieldsOnly: d } = Qt(St), u = S(
4066
4066
  (E, T) => {
4067
4067
  for (const N of E) {
4068
4068
  const L = T.indexOf(N);
@@ -4138,13 +4138,13 @@ const mr = O((t) => {
4138
4138
  index: e,
4139
4139
  parentPath: "fields",
4140
4140
  initial: n,
4141
- conditionalSourceFields: Ki(s.fields, e)
4141
+ conditionalSourceFields: Xi(s.fields, e)
4142
4142
  }),
4143
4143
  [n, e, s.fields]
4144
4144
  ), w = S(() => {
4145
4145
  const E = n.label || "Untitled section", T = n.fields.map((L) => ({
4146
4146
  ...L,
4147
- identifier: yn()
4147
+ identifier: vn()
4148
4148
  })), N = { ...n, label: E, fields: T };
4149
4149
  pt("fields", e + 1, N, s, o), c({
4150
4150
  title: "Section duplicated",
@@ -4155,14 +4155,14 @@ const mr = O((t) => {
4155
4155
  pt(
4156
4156
  `fields.${e}.fields`,
4157
4157
  n.fields.length,
4158
- Ys[E],
4158
+ Ks[E],
4159
4159
  s,
4160
4160
  o
4161
4161
  );
4162
4162
  },
4163
4163
  [e, n.fields.length, s, o]
4164
- ), g = ur(x);
4165
- return /* @__PURE__ */ a(rn, { draggableId: n.identifier, index: e, children: (E) => /* @__PURE__ */ a(
4164
+ ), g = dr(x);
4165
+ return /* @__PURE__ */ a(nn, { draggableId: n.identifier, index: e, children: (E) => /* @__PURE__ */ a(
4166
4166
  He,
4167
4167
  {
4168
4168
  ref: E.innerRef,
@@ -4172,9 +4172,9 @@ const mr = O((t) => {
4172
4172
  className: "mb-4 w-full",
4173
4173
  children: /* @__PURE__ */ C("div", { className: "flex items-center justify-between gap-3 w-full", children: [
4174
4174
  /* @__PURE__ */ C("div", { className: "flex grow flex-col gap-2 w-full", children: [
4175
- !d && /* @__PURE__ */ a(Sn, { ...v }),
4175
+ !d && /* @__PURE__ */ a(Rn, { ...v }),
4176
4176
  /* @__PURE__ */ a(
4177
- nn,
4177
+ tn,
4178
4178
  {
4179
4179
  droppableId: n.identifier,
4180
4180
  type: "SECTION",
@@ -4187,7 +4187,7 @@ const mr = O((t) => {
4187
4187
  ...T.droppableProps,
4188
4188
  children: [
4189
4189
  n.fields.map((N, L) => /* @__PURE__ */ a(
4190
- fr,
4190
+ ur,
4191
4191
  {
4192
4192
  field: N,
4193
4193
  index: L,
@@ -4216,7 +4216,7 @@ const mr = O((t) => {
4216
4216
  )
4217
4217
  ] }),
4218
4218
  !d && /* @__PURE__ */ a(
4219
- Rn,
4219
+ In,
4220
4220
  {
4221
4221
  index: e,
4222
4222
  type: n.type,
@@ -4229,14 +4229,14 @@ const mr = O((t) => {
4229
4229
  }
4230
4230
  ) });
4231
4231
  });
4232
- mr.displayName = "FieldSectionWithActions";
4233
- const Qn = (t, n) => {
4232
+ fr.displayName = "FieldSectionWithActions";
4233
+ const Yn = (t, n) => {
4234
4234
  for (const [e, i] of Object.entries(t))
4235
4235
  if (i.identifier === n) return [i, e];
4236
- }, hr = O(() => {
4237
- const { values: t, setFieldValue: n } = Ie(), [e, i] = Er(ia, t.fields, Kn), { reorderSection: r, reorderField: o } = bn(), { fieldsOnly: s } = Jt(St);
4238
- Y(() => {
4239
- i({ type: "update", state: Kn(t.fields) });
4236
+ }, mr = O(() => {
4237
+ const { values: t, setFieldValue: n } = Ie(), [e, i] = Cr(na, t.fields, Xn), { reorderSection: r, reorderField: o } = yn(), { fieldsOnly: s } = Qt(St);
4238
+ G(() => {
4239
+ i({ type: "update", state: Xn(t.fields) });
4240
4240
  }, [i, t.fields]);
4241
4241
  const l = S((d) => {
4242
4242
  d.type === "SECTION" && i({ type: "hold", fieldId: d.draggableId });
@@ -4249,7 +4249,7 @@ const Qn = (t, n) => {
4249
4249
  return;
4250
4250
  }
4251
4251
  if (y !== "SECTION") throw new Error("Unexpected droppable type.");
4252
- const [v, w] = Qn(t.fields, u.droppableId) ?? [], [x, g] = Qn(t.fields, h.droppableId) ?? [];
4252
+ const [v, w] = Yn(t.fields, u.droppableId) ?? [], [x, g] = Yn(t.fields, h.droppableId) ?? [];
4253
4253
  o(
4254
4254
  v,
4255
4255
  w,
@@ -4263,20 +4263,20 @@ const Qn = (t, n) => {
4263
4263
  [t, o, n, r, e]
4264
4264
  ), c = S(
4265
4265
  (d) => {
4266
- Bs(d + 1, t, n);
4266
+ _s(d + 1, t, n);
4267
4267
  },
4268
4268
  [t, n]
4269
4269
  );
4270
- return /* @__PURE__ */ a(ni, { onDragStart: l, onDragEnd: m, children: /* @__PURE__ */ a(nn, { droppableId: "droppable", type: "ROOT", children: (d) => /* @__PURE__ */ C(
4270
+ return /* @__PURE__ */ a(ti, { onDragStart: l, onDragEnd: m, children: /* @__PURE__ */ a(tn, { droppableId: "droppable", type: "ROOT", children: (d) => /* @__PURE__ */ C(
4271
4271
  "div",
4272
4272
  {
4273
4273
  className: "flex flex-col gap-0",
4274
4274
  ref: d.innerRef,
4275
4275
  ...d.droppableProps,
4276
4276
  children: [
4277
- t.fields.map((u, h) => /* @__PURE__ */ C(ti, { children: [
4277
+ t.fields.map((u, h) => /* @__PURE__ */ C(ei, { children: [
4278
4278
  /* @__PURE__ */ a(
4279
- mr,
4279
+ fr,
4280
4280
  {
4281
4281
  field: u,
4282
4282
  index: h,
@@ -4324,8 +4324,8 @@ const Qn = (t, n) => {
4324
4324
  }
4325
4325
  ) }) });
4326
4326
  });
4327
- hr.displayName = "FieldsEditor";
4328
- const La = O(
4327
+ mr.displayName = "FieldsEditor";
4328
+ const Ta = O(
4329
4329
  Xe((t, n) => {
4330
4330
  const {
4331
4331
  onCancel: e,
@@ -4346,7 +4346,7 @@ const La = O(
4346
4346
  let T = [];
4347
4347
  for (const [L, D] of I.fields.entries()) {
4348
4348
  const $ = Xt.section.getFieldCreationSchema(
4349
- Ki(I.fields, L),
4349
+ Xi(I.fields, L),
4350
4350
  `fields.${L}`
4351
4351
  ).map((j) => j.field);
4352
4352
  T = [...T, ...$];
@@ -4355,7 +4355,7 @@ const La = O(
4355
4355
  T = [...T, ...P];
4356
4356
  }
4357
4357
  }
4358
- const N = En(
4358
+ const N = Cn(
4359
4359
  {
4360
4360
  fields: T
4361
4361
  },
@@ -4372,16 +4372,16 @@ const La = O(
4372
4372
  () => ({
4373
4373
  title: o ?? "",
4374
4374
  description: "",
4375
- fields: [{ ...mt(yn()), label: "" }]
4375
+ fields: [{ ...mt(vn()), label: "" }]
4376
4376
  }),
4377
4377
  [o]
4378
- ), v = r ? h(r) : void 0, w = en({
4379
- initialValues: _s(v) ?? f,
4378
+ ), v = r ? h(r) : void 0, w = Zt({
4379
+ initialValues: zs(v) ?? f,
4380
4380
  validate: b,
4381
4381
  onSubmit: i,
4382
4382
  validateOnChange: !1,
4383
4383
  validateOnBlur: !1
4384
- }), x = k(() => Zs(w.values), [w.values]), g = k(() => ({
4384
+ }), x = k(() => Js(w.values), [w.values]), g = k(() => ({
4385
4385
  disableRequiredFields: d,
4386
4386
  fieldsOnly: m
4387
4387
  }), [d, m]);
@@ -4412,13 +4412,13 @@ const La = O(
4412
4412
  /* @__PURE__ */ a("strong", { children: "answers to fields in preceding sections. " })
4413
4413
  ] }),
4414
4414
  /* @__PURE__ */ C("form", { className: "mt-3 flex flex-col gap-2", id: at, onSubmit: w.handleSubmit, children: [
4415
- /* @__PURE__ */ C(tn, { value: w, children: [
4415
+ /* @__PURE__ */ C(en, { value: w, children: [
4416
4416
  l && /* @__PURE__ */ C(be, { children: [
4417
4417
  /* @__PURE__ */ a(
4418
4418
  We,
4419
4419
  {
4420
4420
  name: "title",
4421
- render: ({ setValue: I, value: E, meta: T }) => /* @__PURE__ */ a(Ui, { severity: "danger", helpText: T.error ?? null, children: /* @__PURE__ */ a(
4421
+ render: ({ setValue: I, value: E, meta: T }) => /* @__PURE__ */ a(Vi, { severity: "danger", helpText: T.error ?? null, children: /* @__PURE__ */ a(
4422
4422
  pe.Root,
4423
4423
  {
4424
4424
  variant: "outline",
@@ -4444,7 +4444,7 @@ const La = O(
4444
4444
  {
4445
4445
  name: "description",
4446
4446
  render: ({ setValue: I, value: E }) => /* @__PURE__ */ a(
4447
- Jn,
4447
+ Qn,
4448
4448
  {
4449
4449
  className: "field-sizing-content",
4450
4450
  placeholder: "Explain the purpose of this form",
@@ -4460,7 +4460,7 @@ const La = O(
4460
4460
  }
4461
4461
  )
4462
4462
  ] }),
4463
- /* @__PURE__ */ a(hr, {}),
4463
+ /* @__PURE__ */ a(mr, {}),
4464
4464
  /* @__PURE__ */ a(
4465
4465
  "span",
4466
4466
  {
@@ -4476,30 +4476,30 @@ const La = O(
4476
4476
  ] })
4477
4477
  ] })
4478
4478
  ] }),
4479
- /* @__PURE__ */ a(Te.Content, { value: "preview", children: /* @__PURE__ */ a(ta, { schema: x, hideTitle: !l }) })
4479
+ /* @__PURE__ */ a(Te.Content, { value: "preview", children: /* @__PURE__ */ a(ea, { schema: x, hideTitle: !l }) })
4480
4480
  ] }) }) });
4481
4481
  })
4482
- ), oa = Object.values(ii), sa = 1;
4483
- async function aa(t, n, e, i) {
4484
- const r = t.getContext("2d", {}), o = new Image(i.width, i.height), s = new Image(i.width, i.height), l = new jr();
4482
+ ), ra = Object.values(ni), oa = 1;
4483
+ async function sa(t, n, e, i) {
4484
+ const r = t.getContext("2d", {}), o = new Image(i.width, i.height), s = new Image(i.width, i.height), l = new Ur();
4485
4485
  return o.onload = function() {
4486
4486
  r.drawImage(o, 0, 0, i.width, i.height), s.src = URL.createObjectURL(e), s.onload = async function() {
4487
4487
  r.drawImage(s, 0, 0, i.width, i.height);
4488
- const m = t.toDataURL("image/jpeg", sa), c = await ri(m), d = new File([c], n.name, { type: "image/jpeg" });
4488
+ const m = t.toDataURL("image/jpeg", oa), c = await ii(m), d = new File([c], n.name, { type: "image/jpeg" });
4489
4489
  l.resolve(d);
4490
4490
  };
4491
4491
  }, o.src = URL.createObjectURL(n), l;
4492
4492
  }
4493
- const la = O((t) => {
4493
+ const aa = O((t) => {
4494
4494
  const { file: n, onClose: e, onSave: i, onDelete: r, dirty: o, onDirty: s } = t;
4495
4495
  n.objectURL || (n.objectURL = URL.createObjectURL(n));
4496
- const l = me(null), m = me(null), [c, d] = U(ii.red), [u, h] = U(null), [y, b] = U(!1), [f, v] = U(!1), w = me(null), x = br(w);
4497
- Y(() => {
4496
+ const l = me(null), m = me(null), [c, d] = U(ni.red), [u, h] = U(null), [y, b] = U(!1), [f, v] = U(!1), w = me(null), x = yr(w);
4497
+ G(() => {
4498
4498
  const z = new Image();
4499
4499
  z.onload = function() {
4500
4500
  h({ width: z.naturalWidth, height: z.naturalHeight });
4501
4501
  }, z.src = URL.createObjectURL(n);
4502
- }, [n]), Y(() => {
4502
+ }, [n]), G(() => {
4503
4503
  !f && (x != null && x.width) && x.height && v(!0);
4504
4504
  }, [x, f]);
4505
4505
  const g = S(async () => {
@@ -4510,10 +4510,10 @@ const la = O((t) => {
4510
4510
  throw new Error("Original image size not loaded yet");
4511
4511
  const J = await z.exportImage("png"), P = new Image(u.width, u.height);
4512
4512
  P.onload = async function() {
4513
- const H = await ri(J), de = new File([H], n.name, { type: n.type }), ne = m.current, ue = await aa(ne, n, de, u);
4513
+ const H = await ii(J), de = new File([H], n.name, { type: n.type }), ne = m.current, ue = await sa(ne, n, de, u);
4514
4514
  ue.objectURL = URL.createObjectURL(ue);
4515
- const Se = await Fn(n);
4516
- await Fn(ue) !== Se && i(ue), b(!1), e();
4515
+ const Se = await Ln(n);
4516
+ await Ln(ue) !== Se && i(ue), b(!1), e();
4517
4517
  }, b(!0), P.src = J;
4518
4518
  }, [o, n, e, i, u]), I = S(() => {
4519
4519
  r(n);
@@ -4532,17 +4532,17 @@ const la = O((t) => {
4532
4532
  }, []), $ = S(() => {
4533
4533
  g();
4534
4534
  }, [g]), j = S(() => {
4535
- gn.saveAs(n, n.name);
4535
+ pn.saveAs(n, n.name);
4536
4536
  }, [n]);
4537
- return /* @__PURE__ */ a(fn, { open: !0, onOpenChange: e, children: /* @__PURE__ */ C(mn, { children: [
4537
+ return /* @__PURE__ */ a(un, { open: !0, onOpenChange: e, children: /* @__PURE__ */ C(fn, { children: [
4538
4538
  /* @__PURE__ */ a(
4539
- hn,
4539
+ mn,
4540
4540
  {
4541
4541
  className: "bg-(--color-background) fixed inset-0 data-[state='open']:fade-in-0 data-[state='open']:zoom-in-95 data-[state='closed']:animate-out data-[state='closed']:fade-out-0 data-[state='closed']:zoom-out-95 data-[state='open']:animate-in",
4542
4542
  "data-floating-content": ""
4543
4543
  }
4544
4544
  ),
4545
- /* @__PURE__ */ C(pn, { className: "absolute inset-0 py-12", "data-floating-content": "", children: [
4545
+ /* @__PURE__ */ C(hn, { className: "absolute inset-0 py-12", "data-floating-content": "", children: [
4546
4546
  /* @__PURE__ */ a(
4547
4547
  xt,
4548
4548
  {
@@ -4557,10 +4557,10 @@ const la = O((t) => {
4557
4557
  ] }),
4558
4558
  /* @__PURE__ */ C("div", { className: "flex items-center justify-center gap-2", children: [
4559
4559
  /* @__PURE__ */ a(
4560
- oi,
4560
+ ri,
4561
4561
  {
4562
4562
  selectedColor: c,
4563
- allColors: oa,
4563
+ allColors: ra,
4564
4564
  onFinish: d,
4565
4565
  trigger: /* @__PURE__ */ a(
4566
4566
  V,
@@ -4577,7 +4577,7 @@ const la = O((t) => {
4577
4577
  }
4578
4578
  ),
4579
4579
  /* @__PURE__ */ a(
4580
- wr,
4580
+ br,
4581
4581
  {
4582
4582
  defaultPressed: !1,
4583
4583
  "aria-label": "erase",
@@ -4618,7 +4618,7 @@ const la = O((t) => {
4618
4618
  }
4619
4619
  ),
4620
4620
  y ? /* @__PURE__ */ a(wt, {}) : /* @__PURE__ */ a(
4621
- Wr,
4621
+ jr,
4622
4622
  {
4623
4623
  className: "max-w-full max-h-full aspect-square",
4624
4624
  backgroundImage: n.objectURL,
@@ -4632,71 +4632,71 @@ const la = O((t) => {
4632
4632
  ] })
4633
4633
  ] }) });
4634
4634
  });
4635
- la.displayName = "AttachmentEditor";
4635
+ aa.displayName = "AttachmentEditor";
4636
4636
  export {
4637
- K as BaseField,
4638
- li as BaseFormElement,
4637
+ Y as BaseField,
4638
+ ai as BaseFormElement,
4639
4639
  Ge as BooleanField,
4640
- ji as BooleanInput,
4641
- oi as ColorPicker,
4640
+ Ui as BooleanInput,
4641
+ ri as ColorPicker,
4642
4642
  Vt as DateField,
4643
- Wi as DateInput,
4644
- X as FieldSection,
4645
- ai as FileCard,
4646
- on as FileIcon,
4647
- La as FormBuilder,
4648
- ta as FormRenderer,
4649
- Gs as ImageCard,
4650
- la as ImageMarkup,
4651
- Vi as ImageViewer,
4652
- Ts as ImageViewerProvider,
4653
- Ui as InputWithHelpText,
4643
+ ji as DateInput,
4644
+ K as FieldSection,
4645
+ si as FileCard,
4646
+ rn as FileIcon,
4647
+ Ta as FormBuilder,
4648
+ ea as FormRenderer,
4649
+ Hs as ImageCard,
4650
+ aa as ImageMarkup,
4651
+ $i as ImageViewer,
4652
+ Ns as ImageViewerProvider,
4653
+ Vi as InputWithHelpText,
4654
4654
  se as InputWithLabel,
4655
4655
  ae as InputWithLabelAndHelpText,
4656
4656
  vt as MultiSelectField,
4657
- tr as MultiSelectInput,
4657
+ er as MultiSelectInput,
4658
4658
  gt as MultiStringField,
4659
- Yi as MultiStringInput,
4659
+ Ki as MultiStringInput,
4660
4660
  Ee as NumberField,
4661
- Qi as NumberInput,
4661
+ Yi as NumberInput,
4662
4662
  We as PatchField,
4663
- Ta as PatchFormProvider,
4663
+ Na as PatchFormProvider,
4664
4664
  jt as QrField,
4665
- Ji as QrInput,
4666
- Zi as QrScanner,
4667
- Hr as SUPPORTED_IMAGE_FILE_TYPES,
4668
- Xr as SUPPORTED_PDF_FILE_TYPES,
4669
- Gr as SUPPORTED_SPREADSHEET_FILE_EXTENSIONS,
4665
+ Qi as QrInput,
4666
+ Ji as QrScanner,
4667
+ qr as SUPPORTED_IMAGE_FILE_TYPES,
4668
+ Gr as SUPPORTED_PDF_FILE_TYPES,
4669
+ Hr as SUPPORTED_SPREADSHEET_FILE_EXTENSIONS,
4670
4670
  yt as SelectField,
4671
- nr as SelectInput,
4671
+ tr as SelectInput,
4672
4672
  Wt as StringField,
4673
- ir as StringInput,
4673
+ nr as StringInput,
4674
4674
  qt as TextField,
4675
- rr as TextInput,
4676
- Sa as decodeFormValues,
4677
- xn as deserialize,
4678
- ar as deserializeField,
4675
+ ir as TextInput,
4676
+ Ra as decodeFormValues,
4677
+ wn as deserialize,
4678
+ sr as deserializeField,
4679
4679
  ee as emptyBaseField,
4680
- Ls as emptyBooleanField,
4681
- Fs as emptyDateField,
4682
- js as emptyMultiSelectField,
4683
- $s as emptyMultiStringField,
4684
- Vs as emptyNumberField,
4685
- Us as emptyQrField,
4686
- Ws as emptySelectField,
4687
- qs as emptyStringField,
4688
- Hs as emptyTextField,
4689
- Na as encodeFormValues,
4690
- Ea as fieldIcons,
4691
- Cn as flattenFields,
4692
- Zs as formRevisionToSchema,
4693
- ea as getFieldsMapping,
4694
- In as initialFormValues,
4695
- lr as isConditionMet,
4696
- Hi as useFieldInput,
4680
+ Ts as emptyBooleanField,
4681
+ Ls as emptyDateField,
4682
+ Us as emptyMultiSelectField,
4683
+ Bs as emptyMultiStringField,
4684
+ $s as emptyNumberField,
4685
+ Vs as emptyQrField,
4686
+ js as emptySelectField,
4687
+ Ws as emptyStringField,
4688
+ qs as emptyTextField,
4689
+ Sa as encodeFormValues,
4690
+ Ca as fieldIcons,
4691
+ xn as flattenFields,
4692
+ Js as formRevisionToSchema,
4693
+ Zs as getFieldsMapping,
4694
+ En as initialFormValues,
4695
+ ar as isConditionMet,
4696
+ qi as useFieldInput,
4697
4697
  ft as useFieldInputs,
4698
4698
  Z as useFormikInput,
4699
- sn as useImageViewer,
4700
- En as validateForm,
4699
+ on as useImageViewer,
4700
+ Cn as validateForm,
4701
4701
  Gt as valueIsFile
4702
4702
  };