@arudovwen/form-builder-react 1.4.21 → 1.4.23

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.
@@ -1,11 +1,11 @@
1
- import si, { createContext as co, useState as L, useMemo as Y, useEffect as R, forwardRef as pe, createElement as vn, Fragment as Ji, useContext as vi, useRef as Gi, useCallback as J, memo as An } from "react";
2
- import { toast as bi, ToastContainer as he } from "react-toastify";
1
+ import si, { createContext as co, useState as L, useMemo as Y, useEffect as R, forwardRef as he, createElement as vn, Fragment as Ji, useContext as vi, useRef as Gi, useCallback as J, memo as An } from "react";
2
+ import { toast as bi, ToastContainer as pe } from "react-toastify";
3
3
  import { v4 as xi } from "uuid";
4
4
  import to from "react-datepicker";
5
5
  import { Listbox as q, Transition as Bi, Combobox as Ti, ComboboxInput as ro, ComboboxButton as mo, ComboboxOptions as bo, ComboboxOption as vo } from "@headlessui/react";
6
6
  import Ei from "axios";
7
7
  import Qi from "react-currency-input-field";
8
- import { appendErrors as po, useForm as Sn, useFieldArray as dn, useWatch as ho, FormProvider as go } from "react-hook-form";
8
+ import { appendErrors as ho, useForm as Sn, useFieldArray as dn, useWatch as po, FormProvider as go } from "react-hook-form";
9
9
  import { validateFieldsNatively as fo, toNestErrors as xo } from "@hookform/resolvers";
10
10
  import * as T from "yup";
11
11
  import yo from "papaparse";
@@ -48,11 +48,11 @@ var Ri = {};
48
48
  var Zn;
49
49
  function No() {
50
50
  return Zn || (Zn = 1, process.env.NODE_ENV !== "production" && function() {
51
- var i = si, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), t = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), r = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), y = Symbol.iterator, h = "@@iterator";
52
- function p(b) {
51
+ var i = si, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), t = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), r = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), y = Symbol.iterator, p = "@@iterator";
52
+ function h(b) {
53
53
  if (b === null || typeof b != "object")
54
54
  return null;
55
- var j = y && b[y] || b[h];
55
+ var j = y && b[y] || b[p];
56
56
  return typeof j == "function" ? j : null;
57
57
  }
58
58
  var f = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -137,14 +137,14 @@ function No() {
137
137
  }
138
138
  return null;
139
139
  }
140
- var I = Object.assign, $ = 0, li, pi, F, hi, gi, fi, yi;
140
+ var I = Object.assign, $ = 0, li, hi, F, pi, gi, fi, yi;
141
141
  function Ai() {
142
142
  }
143
143
  Ai.__reactDisabledLog = !0;
144
144
  function Si() {
145
145
  {
146
146
  if ($ === 0) {
147
- li = console.log, pi = console.info, F = console.warn, hi = console.error, gi = console.group, fi = console.groupCollapsed, yi = console.groupEnd;
147
+ li = console.log, hi = console.info, F = console.warn, pi = console.error, gi = console.group, fi = console.groupCollapsed, yi = console.groupEnd;
148
148
  var b = {
149
149
  configurable: !0,
150
150
  enumerable: !0,
@@ -177,13 +177,13 @@ function No() {
177
177
  value: li
178
178
  }),
179
179
  info: I({}, b, {
180
- value: pi
180
+ value: hi
181
181
  }),
182
182
  warn: I({}, b, {
183
183
  value: F
184
184
  }),
185
185
  error: I({}, b, {
186
- value: hi
186
+ value: pi
187
187
  }),
188
188
  group: I({}, b, {
189
189
  value: gi
@@ -200,7 +200,7 @@ function No() {
200
200
  }
201
201
  }
202
202
  var _ = f.ReactCurrentDispatcher, X;
203
- function ni(b, j, M) {
203
+ function ii(b, j, M) {
204
204
  {
205
205
  if (X === void 0)
206
206
  try {
@@ -213,13 +213,13 @@ function No() {
213
213
  ` + X + b;
214
214
  }
215
215
  }
216
- var ei = !1, ri;
216
+ var ni = !1, ri;
217
217
  {
218
218
  var nn = typeof WeakMap == "function" ? WeakMap : Map;
219
219
  ri = new nn();
220
220
  }
221
221
  function Pn(b, j) {
222
- if (!b || ei)
222
+ if (!b || ni)
223
223
  return "";
224
224
  {
225
225
  var M = ri.get(b);
@@ -227,7 +227,7 @@ function No() {
227
227
  return M;
228
228
  }
229
229
  var w;
230
- ei = !0;
230
+ ni = !0;
231
231
  var z = Error.prepareStackTrace;
232
232
  Error.prepareStackTrace = void 0;
233
233
  var Z;
@@ -268,25 +268,25 @@ function No() {
268
268
  if (ci && w && typeof ci.stack == "string") {
269
269
  for (var G = ci.stack.split(`
270
270
  `), di = w.stack.split(`
271
- `), oi = G.length - 1, ai = di.length - 1; oi >= 1 && ai >= 0 && G[oi] !== di[ai]; )
271
+ `), ei = G.length - 1, ai = di.length - 1; ei >= 1 && ai >= 0 && G[ei] !== di[ai]; )
272
272
  ai--;
273
- for (; oi >= 1 && ai >= 0; oi--, ai--)
274
- if (G[oi] !== di[ai]) {
275
- if (oi !== 1 || ai !== 1)
273
+ for (; ei >= 1 && ai >= 0; ei--, ai--)
274
+ if (G[ei] !== di[ai]) {
275
+ if (ei !== 1 || ai !== 1)
276
276
  do
277
- if (oi--, ai--, ai < 0 || G[oi] !== di[ai]) {
277
+ if (ei--, ai--, ai < 0 || G[ei] !== di[ai]) {
278
278
  var mi = `
279
- ` + G[oi].replace(" at new ", " at ");
279
+ ` + G[ei].replace(" at new ", " at ");
280
280
  return b.displayName && mi.includes("<anonymous>") && (mi = mi.replace("<anonymous>", b.displayName)), typeof b == "function" && ri.set(b, mi), mi;
281
281
  }
282
- while (oi >= 1 && ai >= 0);
282
+ while (ei >= 1 && ai >= 0);
283
283
  break;
284
284
  }
285
285
  }
286
286
  } finally {
287
- ei = !1, _.current = Z, H(), Error.prepareStackTrace = z;
287
+ ni = !1, _.current = Z, H(), Error.prepareStackTrace = z;
288
288
  }
289
- var Mi = b ? b.displayName || b.name : "", Ni = Mi ? ni(Mi) : "";
289
+ var Mi = b ? b.displayName || b.name : "", Ni = Mi ? ii(Mi) : "";
290
290
  return typeof b == "function" && ri.set(b, Ni), Ni;
291
291
  }
292
292
  function Ie(b, j, M) {
@@ -302,12 +302,12 @@ function No() {
302
302
  if (typeof b == "function")
303
303
  return Pn(b, Ge(b));
304
304
  if (typeof b == "string")
305
- return ni(b);
305
+ return ii(b);
306
306
  switch (b) {
307
307
  case m:
308
- return ni("Suspense");
308
+ return ii("Suspense");
309
309
  case t:
310
- return ni("SuspenseList");
310
+ return ii("SuspenseList");
311
311
  }
312
312
  if (typeof b == "object")
313
313
  switch (b.$$typeof) {
@@ -345,8 +345,8 @@ function No() {
345
345
  throw di.name = "Invariant Violation", di;
346
346
  }
347
347
  G = b[V](j, V, w, M, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
348
- } catch (oi) {
349
- G = oi;
348
+ } catch (ei) {
349
+ G = ei;
350
350
  }
351
351
  G && !(G instanceof Error) && (Vi(z), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", w || "React class", M, V, typeof G), Vi(null)), G instanceof Error && !(G.message in wn) && (wn[G.message] = !0, Vi(z), A("Failed %s type: %s", M, G.message), Vi(null));
352
352
  }
@@ -459,9 +459,9 @@ function No() {
459
459
  for (Z in j)
460
460
  Pi.call(j, Z) && !Ue.hasOwnProperty(Z) && (V[Z] = j[Z]);
461
461
  if (b && b.defaultProps) {
462
- var oi = b.defaultProps;
463
- for (Z in oi)
464
- V[Z] === void 0 && (V[Z] = oi[Z]);
462
+ var ei = b.defaultProps;
463
+ for (Z in ei)
464
+ V[Z] === void 0 && (V[Z] = ei[Z]);
465
465
  }
466
466
  if (G || di) {
467
467
  var ai = typeof b == "function" ? b.displayName || b.name || "Unknown" : b;
@@ -536,7 +536,7 @@ Check the top-level render call using <` + M + ">.");
536
536
  else if (sn(b))
537
537
  b._store && (b._store.validated = !0);
538
538
  else if (b) {
539
- var z = p(b);
539
+ var z = h(b);
540
540
  if (typeof z == "function" && z !== b.entries)
541
541
  for (var Z = z.call(b), V; !(V = Z.next()).done; )
542
542
  sn(V.value) && Wn(V.value, j);
@@ -589,8 +589,8 @@ Check the top-level render call using <` + M + ">.");
589
589
  (b === void 0 || typeof b == "object" && b !== null && Object.keys(b).length === 0) && (G += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
590
590
  var di = Qe();
591
591
  di ? G += di : G += Hn();
592
- var oi;
593
- b === null ? oi = "null" : en(b) ? oi = "array" : b !== void 0 && b.$$typeof === e ? (oi = "<" + (E(b.type) || "Unknown") + " />", G = " Did you accidentally export a JSX literal instead of a component?") : oi = typeof b, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", oi, G);
592
+ var ei;
593
+ b === null ? ei = "null" : en(b) ? ei = "array" : b !== void 0 && b.$$typeof === e ? (ei = "<" + (E(b.type) || "Unknown") + " />", G = " Did you accidentally export a JSX literal instead of a component?") : ei = typeof b, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ei, G);
594
594
  }
595
595
  var ai = $e(b, j, M, z, Z);
596
596
  if (ai == null)
@@ -648,8 +648,8 @@ const ui = co(void 0), $n = {
648
648
  }, ge = ({ children: i }) => {
649
649
  const [e, o] = L({}), [s, a] = L({}), [l, d] = L([$n]), [c, u] = L(!1), [m, t] = L(null), [g, r] = L([
650
650
  0
651
- ]), [v, y] = L(""), h = si.useCallback(() => {
652
- }, []), p = si.useCallback(() => {
651
+ ]), [v, y] = L(""), p = si.useCallback(() => {
652
+ }, []), h = si.useCallback(() => {
653
653
  const P = xi();
654
654
  d((K) => [...K, { ...$n, id: P }]), t(P), r([l.length]);
655
655
  }, [l]), f = si.useCallback((P) => {
@@ -715,7 +715,7 @@ const ui = co(void 0), $n = {
715
715
  ($) => $.type === "grid" && $.gridData ? {
716
716
  ...$,
717
717
  gridData: $.gridData.map(
718
- (li, pi) => pi === P ? {
718
+ (li, hi) => hi === P ? {
719
719
  ...li,
720
720
  ...K
721
721
  } : li
@@ -753,7 +753,7 @@ const ui = co(void 0), $n = {
753
753
  () => ({
754
754
  formData: l,
755
755
  setFormData: d,
756
- handleDragStop: h,
756
+ handleDragStop: p,
757
757
  removeElement: A,
758
758
  elementData: s,
759
759
  setElementData: a,
@@ -761,7 +761,7 @@ const ui = co(void 0), $n = {
761
761
  addElement: k,
762
762
  addElementInPosition: N,
763
763
  updateElement: C,
764
- addSection: p,
764
+ addSection: h,
765
765
  removeSection: f,
766
766
  updateSection: D,
767
767
  isDragging: c,
@@ -778,14 +778,14 @@ const ui = co(void 0), $n = {
778
778
  }),
779
779
  [
780
780
  l,
781
- h,
781
+ p,
782
782
  A,
783
783
  s,
784
784
  S,
785
785
  k,
786
786
  N,
787
787
  C,
788
- p,
788
+ h,
789
789
  f,
790
790
  D,
791
791
  c,
@@ -807,7 +807,7 @@ function fe(i) {
807
807
  } else for (o in i) i[o] && (s && (s += " "), s += o);
808
808
  return s;
809
809
  }
810
- function W() {
810
+ function U() {
811
811
  for (var i, e, o = 0, s = "", a = arguments.length; o < a; o++) (i = arguments[o]) && (e = fe(i)) && (s && (s += " "), s += e);
812
812
  return s;
813
813
  }
@@ -984,7 +984,7 @@ function ko({ type: i = "calendar", className: e }) {
984
984
  }
985
985
  ) });
986
986
  }
987
- const pn = ({
987
+ const hn = ({
988
988
  value: i = null,
989
989
  onGetValue: e,
990
990
  readOnly: o = !1,
@@ -1039,7 +1039,7 @@ function Co({
1039
1039
  return a && (l = a()[i.id]), R(() => {
1040
1040
  o(i.id);
1041
1041
  }, [i.id]), /* @__PURE__ */ n.jsx(
1042
- pn,
1042
+ hn,
1043
1043
  {
1044
1044
  name: i.id,
1045
1045
  value: l,
@@ -1063,7 +1063,7 @@ function un({
1063
1063
  {
1064
1064
  placeholder: (i == null ? void 0 : i.placeholder) || "",
1065
1065
  type: (i == null ? void 0 : i.inputType) || "text",
1066
- className: W("field-control", i == null ? void 0 : i.customClass),
1066
+ className: U("field-control", i == null ? void 0 : i.customClass),
1067
1067
  ...o(i == null ? void 0 : i.id),
1068
1068
  disabled: e == null ? void 0 : e.isReadOnly,
1069
1069
  inputMode: (i == null ? void 0 : i.inputMode) || void 0,
@@ -1097,7 +1097,7 @@ const xe = Object.freeze({
1097
1097
  }), Nn = Object.freeze({
1098
1098
  ...xe,
1099
1099
  ...Zi
1100
- }), hn = Object.freeze({
1100
+ }), pn = Object.freeze({
1101
1101
  ...Nn,
1102
1102
  body: "",
1103
1103
  hidden: !1
@@ -1110,7 +1110,7 @@ function To(i, e) {
1110
1110
  }
1111
1111
  function Qn(i, e) {
1112
1112
  const o = To(i, e);
1113
- for (const s in hn) s in Zi ? s in i && !(s in o) && (o[s] = Zi[s]) : s in e ? o[s] = e[s] : s in i && (o[s] = i[s]);
1113
+ for (const s in pn) s in Zi ? s in i && !(s in o) && (o[s] = Zi[s]) : s in e ? o[s] = e[s] : s in i && (o[s] = i[s]);
1114
1114
  return o;
1115
1115
  }
1116
1116
  function Bo(i, e, o) {
@@ -1151,12 +1151,12 @@ function Ae(i) {
1151
1151
  const o = e.icons;
1152
1152
  for (const a in o) {
1153
1153
  const l = o[a];
1154
- if (!a || typeof l.body != "string" || !cn(l, hn)) return null;
1154
+ if (!a || typeof l.body != "string" || !cn(l, pn)) return null;
1155
1155
  }
1156
1156
  const s = e.aliases || /* @__PURE__ */ Object.create(null);
1157
1157
  for (const a in s) {
1158
1158
  const l = s[a], d = l.parent;
1159
- if (!a || typeof d != "string" || !o[d] && !s[d] || !cn(l, hn)) return null;
1159
+ if (!a || typeof d != "string" || !o[d] && !s[d] || !cn(l, pn)) return null;
1160
1160
  }
1161
1161
  return e;
1162
1162
  }
@@ -1314,29 +1314,29 @@ function Ho(i, e) {
1314
1314
  height: o.height
1315
1315
  };
1316
1316
  let l = o.body;
1317
- [o, s].forEach((h) => {
1318
- const p = [], f = h.hFlip, A = h.vFlip;
1319
- let S = h.rotate;
1320
- f ? A ? S += 2 : (p.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), p.push("scale(-1 1)"), a.top = a.left = 0) : A && (p.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), p.push("scale(1 -1)"), a.top = a.left = 0);
1317
+ [o, s].forEach((p) => {
1318
+ const h = [], f = p.hFlip, A = p.vFlip;
1319
+ let S = p.rotate;
1320
+ f ? A ? S += 2 : (h.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), h.push("scale(-1 1)"), a.top = a.left = 0) : A && (h.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), h.push("scale(1 -1)"), a.top = a.left = 0);
1321
1321
  let k;
1322
1322
  switch (S < 0 && (S -= Math.floor(S / 4) * 4), S = S % 4, S) {
1323
1323
  case 1:
1324
- k = a.height / 2 + a.top, p.unshift("rotate(90 " + k.toString() + " " + k.toString() + ")");
1324
+ k = a.height / 2 + a.top, h.unshift("rotate(90 " + k.toString() + " " + k.toString() + ")");
1325
1325
  break;
1326
1326
  case 2:
1327
- p.unshift("rotate(180 " + (a.width / 2 + a.left).toString() + " " + (a.height / 2 + a.top).toString() + ")");
1327
+ h.unshift("rotate(180 " + (a.width / 2 + a.left).toString() + " " + (a.height / 2 + a.top).toString() + ")");
1328
1328
  break;
1329
1329
  case 3:
1330
- k = a.width / 2 + a.left, p.unshift("rotate(-90 " + k.toString() + " " + k.toString() + ")");
1330
+ k = a.width / 2 + a.left, h.unshift("rotate(-90 " + k.toString() + " " + k.toString() + ")");
1331
1331
  break;
1332
1332
  }
1333
- S % 2 === 1 && (a.left !== a.top && (k = a.left, a.left = a.top, a.top = k), a.width !== a.height && (k = a.width, a.width = a.height, a.height = k)), p.length && (l = Go(l, '<g transform="' + p.join(" ") + '">', "</g>"));
1333
+ S % 2 === 1 && (a.left !== a.top && (k = a.left, a.left = a.top, a.top = k), a.width !== a.height && (k = a.width, a.width = a.height, a.height = k)), h.length && (l = Go(l, '<g transform="' + h.join(" ") + '">', "</g>"));
1334
1334
  });
1335
1335
  const d = s.width, c = s.height, u = a.width, m = a.height;
1336
1336
  let t, g;
1337
1337
  d === null ? (g = c === null ? "1em" : c === "auto" ? m : c, t = ne(g, u / m)) : (t = d === "auto" ? u : d, g = c === null ? ne(t, m / u) : c === "auto" ? m : c);
1338
- const r = {}, v = (h, p) => {
1339
- Fo(p) || (r[h] = p.toString());
1338
+ const r = {}, v = (p, h) => {
1339
+ Fo(h) || (r[p] = h.toString());
1340
1340
  };
1341
1341
  v("width", t), v("height", g);
1342
1342
  const y = [
@@ -1601,12 +1601,12 @@ function da(i, e, o, s) {
1601
1601
  function y() {
1602
1602
  g && (clearTimeout(g), g = null);
1603
1603
  }
1604
- function h() {
1604
+ function p() {
1605
1605
  u === "pending" && (u = "aborted"), y(), r.forEach((x) => {
1606
1606
  x.status === "pending" && (x.status = "aborted");
1607
1607
  }), r = [];
1608
1608
  }
1609
- function p(x, C) {
1609
+ function h(x, C) {
1610
1610
  C && (v = []), typeof x == "function" && v.push(x);
1611
1611
  }
1612
1612
  function f() {
@@ -1616,8 +1616,8 @@ function da(i, e, o, s) {
1616
1616
  status: u,
1617
1617
  queriesSent: m,
1618
1618
  queriesPending: r.length,
1619
- subscribe: p,
1620
- abort: h
1619
+ subscribe: h,
1620
+ abort: p
1621
1621
  };
1622
1622
  }
1623
1623
  function A() {
@@ -1857,9 +1857,9 @@ function va(i, e) {
1857
1857
  }
1858
1858
  return o;
1859
1859
  }
1860
- const pa = /[\s,]+/;
1861
- function ha(i, e) {
1862
- e.split(pa).forEach((o) => {
1860
+ const ha = /[\s,]+/;
1861
+ function pa(i, e) {
1862
+ e.split(ha).forEach((o) => {
1863
1863
  switch (o.trim()) {
1864
1864
  case "horizontal":
1865
1865
  i.hFlip = !0;
@@ -1960,21 +1960,21 @@ const Ma = (i, e, o) => {
1960
1960
  ...l === "svg" ? ja : {}
1961
1961
  };
1962
1962
  if (o) {
1963
- const p = Xi(o, !1, !0);
1964
- if (p) {
1963
+ const h = Xi(o, !1, !0);
1964
+ if (h) {
1965
1965
  const f = ["iconify"], A = [
1966
1966
  "provider",
1967
1967
  "prefix"
1968
1968
  ];
1969
1969
  for (const S of A)
1970
- p[S] && f.push("iconify--" + p[S]);
1970
+ h[S] && f.push("iconify--" + h[S]);
1971
1971
  u.className = f.join(" ");
1972
1972
  }
1973
1973
  }
1974
- for (let p in e) {
1975
- const f = e[p];
1974
+ for (let h in e) {
1975
+ const f = e[h];
1976
1976
  if (f !== void 0)
1977
- switch (p) {
1977
+ switch (h) {
1978
1978
  // Properties to ignore
1979
1979
  case "icon":
1980
1980
  case "style":
@@ -1990,17 +1990,17 @@ const Ma = (i, e, o) => {
1990
1990
  break;
1991
1991
  // Merge class names
1992
1992
  case "className":
1993
- u[p] = (u[p] ? u[p] + " " : "") + f;
1993
+ u[h] = (u[h] ? u[h] + " " : "") + f;
1994
1994
  break;
1995
1995
  // Boolean attributes
1996
1996
  case "inline":
1997
1997
  case "hFlip":
1998
1998
  case "vFlip":
1999
- a[p] = f === !0 || f === "true" || f === 1;
1999
+ a[h] = f === !0 || f === "true" || f === 1;
2000
2000
  break;
2001
2001
  // Flip as string: 'horizontal,vertical'
2002
2002
  case "flip":
2003
- typeof f == "string" && ha(a, f);
2003
+ typeof f == "string" && pa(a, f);
2004
2004
  break;
2005
2005
  // Color: copy to style
2006
2006
  case "color":
@@ -2008,7 +2008,7 @@ const Ma = (i, e, o) => {
2008
2008
  break;
2009
2009
  // Rotation as string
2010
2010
  case "rotate":
2011
- typeof f == "string" ? a[p] = ga(f) : typeof f == "number" && (a[p] = f);
2011
+ typeof f == "string" ? a[h] = ga(f) : typeof f == "number" && (a[h] = f);
2012
2012
  break;
2013
2013
  // Remove aria-hidden
2014
2014
  case "ariaHidden":
@@ -2017,7 +2017,7 @@ const Ma = (i, e, o) => {
2017
2017
  break;
2018
2018
  // Copy missing property if it does not exist in customisations
2019
2019
  default:
2020
- s[p] === void 0 && (u[p] = f);
2020
+ s[h] === void 0 && (u[h] = f);
2021
2021
  }
2022
2022
  }
2023
2023
  const m = Ho(i, a), t = m.attributes;
@@ -2026,19 +2026,19 @@ const Ma = (i, e, o) => {
2026
2026
  ...d,
2027
2027
  ...c
2028
2028
  }, Object.assign(u, t);
2029
- let p = 0, f = e.id;
2029
+ let h = 0, f = e.id;
2030
2030
  return typeof f == "string" && (f = f.replace(/-/g, "_")), u.dangerouslySetInnerHTML = {
2031
- __html: Na(zo(m.body, f ? () => f + "ID" + p++ : "iconifyReact"))
2031
+ __html: Na(zo(m.body, f ? () => f + "ID" + h++ : "iconifyReact"))
2032
2032
  }, vn("svg", u);
2033
2033
  }
2034
- const { body: g, width: r, height: v } = i, y = l === "mask" || (l === "bg" ? !1 : g.indexOf("currentColor") !== -1), h = fa(g, {
2034
+ const { body: g, width: r, height: v } = i, y = l === "mask" || (l === "bg" ? !1 : g.indexOf("currentColor") !== -1), p = fa(g, {
2035
2035
  ...t,
2036
2036
  width: r + "",
2037
2037
  height: v + ""
2038
2038
  });
2039
2039
  return u.style = {
2040
2040
  ...d,
2041
- "--svg": Aa(h),
2041
+ "--svg": Aa(p),
2042
2042
  width: ue(t.width),
2043
2043
  height: ue(t.height),
2044
2044
  ...ka,
@@ -2089,11 +2089,11 @@ function Le(i) {
2089
2089
  name: "",
2090
2090
  data: y
2091
2091
  };
2092
- const h = ie(y);
2093
- if (h)
2092
+ const p = ie(y);
2093
+ if (p)
2094
2094
  return {
2095
2095
  name: y,
2096
- data: h
2096
+ data: p
2097
2097
  };
2098
2098
  }
2099
2099
  return {
@@ -2119,17 +2119,17 @@ function Le(i) {
2119
2119
  });
2120
2120
  return;
2121
2121
  }
2122
- const h = ie(y);
2122
+ const p = ie(y);
2123
2123
  if (m({
2124
2124
  name: y,
2125
- data: h
2125
+ data: p
2126
2126
  }))
2127
- if (h === void 0) {
2128
- const p = ba([y], t);
2127
+ if (p === void 0) {
2128
+ const h = ba([y], t);
2129
2129
  a({
2130
- callback: p
2130
+ callback: h
2131
2131
  });
2132
- } else h && ((v = i.onLoad) === null || v === void 0 || v.call(i, y));
2132
+ } else p && ((v = i.onLoad) === null || v === void 0 || v.call(i, y));
2133
2133
  }
2134
2134
  R(() => (o(!0), u), []), R(() => {
2135
2135
  e && t();
@@ -2140,16 +2140,16 @@ function Le(i) {
2140
2140
  ...r
2141
2141
  }, i, g) : i.children ? i.children : i.fallback ? i.fallback : vn("span", {});
2142
2142
  }
2143
- const Pe = pe((i, e) => Le({
2143
+ const Pe = he((i, e) => Le({
2144
2144
  ...i,
2145
2145
  _ref: e
2146
2146
  }));
2147
- pe((i, e) => Le({
2147
+ he((i, e) => Le({
2148
2148
  inline: !0,
2149
2149
  ...i,
2150
2150
  _ref: e
2151
2151
  }));
2152
- function U({
2152
+ function W({
2153
2153
  icon: i,
2154
2154
  iconClass: e
2155
2155
  }) {
@@ -2189,7 +2189,7 @@ function Mn({
2189
2189
  disabled: c,
2190
2190
  children: [
2191
2191
  /* @__PURE__ */ n.jsx("span", { className: "custom-select__value", children: s.length > 0 ? u : /* @__PURE__ */ n.jsx("span", { className: "custom-select__placeholder", children: o != null ? o : " Select options" }) }),
2192
- /* @__PURE__ */ n.jsx("span", { className: "custom-select__icon", children: /* @__PURE__ */ n.jsx(U, { icon: "lucide:chevron-down" }) })
2192
+ /* @__PURE__ */ n.jsx("span", { className: "custom-select__icon", children: /* @__PURE__ */ n.jsx(W, { icon: "lucide:chevron-down" }) })
2193
2193
  ]
2194
2194
  }
2195
2195
  ),
@@ -2254,10 +2254,10 @@ function we({
2254
2254
  }, [i]), R(() => {
2255
2255
  if (l === "pdf" && (i != null && i.startsWith("data:")))
2256
2256
  try {
2257
- const v = atob(i.split(",")[1]), y = new ArrayBuffer(v.length), h = new Uint8Array(y);
2257
+ const v = atob(i.split(",")[1]), y = new ArrayBuffer(v.length), p = new Uint8Array(y);
2258
2258
  for (let A = 0; A < v.length; A++)
2259
- h[A] = v.charCodeAt(A);
2260
- const p = new Blob([y], { type: "application/pdf" }), f = URL.createObjectURL(p);
2259
+ p[A] = v.charCodeAt(A);
2260
+ const h = new Blob([y], { type: "application/pdf" }), f = URL.createObjectURL(h);
2261
2261
  return u(f), () => URL.revokeObjectURL(f);
2262
2262
  } catch (v) {
2263
2263
  console.error("Error creating blob URL:", v);
@@ -2271,12 +2271,12 @@ function we({
2271
2271
  function r(v, y = "download") {
2272
2272
  if (!v) return;
2273
2273
  if (v.startsWith("data:")) {
2274
- const p = document.createElement("a");
2275
- p.href = v, p.download = y, document.body.appendChild(p), p.click(), document.body.removeChild(p);
2274
+ const h = document.createElement("a");
2275
+ h.href = v, h.download = y, document.body.appendChild(h), h.click(), document.body.removeChild(h);
2276
2276
  return;
2277
2277
  }
2278
- const h = document.createElement("a");
2279
- h.href = v, h.setAttribute("download", y), document.body.appendChild(h), h.click(), document.body.removeChild(h);
2278
+ const p = document.createElement("a");
2279
+ p.href = v, p.setAttribute("download", y), document.body.appendChild(p), p.click(), document.body.removeChild(p);
2280
2280
  }
2281
2281
  return /* @__PURE__ */ n.jsxs("div", { className: "mt-2 field-control !py-1 !bg-gray-50 !flex justify-between gap-x-8 items-center", children: [
2282
2282
  /* @__PURE__ */ n.jsxs(
@@ -2286,8 +2286,8 @@ function we({
2286
2286
  className: "!flex items-center rounded cursor-pointer gap-x-3",
2287
2287
  title: `Click to preview ${g}`,
2288
2288
  children: [
2289
- l === "image" && /* @__PURE__ */ n.jsx("div", { className: "flex items-center justify-center ", children: /* @__PURE__ */ n.jsx(U, { iconClass: "text-4xl", icon: "fluent-color:image-48" }) }),
2290
- l !== "image" && /* @__PURE__ */ n.jsx(U, { icon: Ea[l], iconClass: "text-4xl" }),
2289
+ l === "image" && /* @__PURE__ */ n.jsx("div", { className: "flex items-center justify-center ", children: /* @__PURE__ */ n.jsx(W, { iconClass: "text-4xl", icon: "fluent-color:image-48" }) }),
2290
+ l !== "image" && /* @__PURE__ */ n.jsx(W, { icon: Ea[l], iconClass: "text-4xl" }),
2291
2291
  /* @__PURE__ */ n.jsx("span", { className: "text-sm font-semibold text-center text-gray-700 truncate max-w-[300px]", children: g })
2292
2292
  ]
2293
2293
  }
@@ -2300,7 +2300,7 @@ function we({
2300
2300
  className: "p-2",
2301
2301
  onClick: () => r(c || i, e),
2302
2302
  title: `Download ${g}`,
2303
- children: /* @__PURE__ */ n.jsx(U, { icon: "streamline-flex:download-tray-solid" })
2303
+ children: /* @__PURE__ */ n.jsx(W, { icon: "streamline-flex:download-tray-solid" })
2304
2304
  }
2305
2305
  ),
2306
2306
  o && /* @__PURE__ */ n.jsx(
@@ -2309,7 +2309,7 @@ function we({
2309
2309
  type: "button",
2310
2310
  className: "p-2 text-lg text-red-500",
2311
2311
  onClick: o,
2312
- children: /* @__PURE__ */ n.jsx(U, { icon: "lets-icons:trash-duotone" })
2312
+ children: /* @__PURE__ */ n.jsx(W, { icon: "lets-icons:trash-duotone" })
2313
2313
  }
2314
2314
  )
2315
2315
  ] }),
@@ -2400,7 +2400,7 @@ function Pa({
2400
2400
  }
2401
2401
  },
2402
2402
  [d]
2403
- ), h = J(
2403
+ ), p = J(
2404
2404
  (k) => new Promise((N, x) => {
2405
2405
  const C = new FileReader();
2406
2406
  C.onloadend = async () => {
@@ -2424,7 +2424,7 @@ function Pa({
2424
2424
  }, C.onerror = () => x(new Error("File read failed")), C.readAsDataURL(k);
2425
2425
  }),
2426
2426
  [d, y]
2427
- ), p = J(
2427
+ ), h = J(
2428
2428
  (k) => {
2429
2429
  const N = r ? r.split(",").map((x) => x.trim()) : [];
2430
2430
  for (const x of k) {
@@ -2446,13 +2446,13 @@ function Pa({
2446
2446
  async (k) => {
2447
2447
  const N = Array.from(k.target.files || []);
2448
2448
  if (!(!N.length || t)) {
2449
- if (!p(N)) {
2449
+ if (!h(N)) {
2450
2450
  c.current && (c.current.value = "");
2451
2451
  return;
2452
2452
  }
2453
2453
  try {
2454
2454
  g(!0);
2455
- const x = await Promise.all(N.map(h));
2455
+ const x = await Promise.all(N.map(p));
2456
2456
  m((C) => {
2457
2457
  const D = s && C ? [...C, ...x] : x;
2458
2458
  return i(D), D;
@@ -2464,7 +2464,7 @@ function Pa({
2464
2464
  }
2465
2465
  }
2466
2466
  },
2467
- [t, p, h, i, s]
2467
+ [t, h, p, i, s]
2468
2468
  ), A = J(
2469
2469
  (k) => {
2470
2470
  t || (c.current && (c.current.value = ""), m((N) => {
@@ -2500,7 +2500,7 @@ function Pa({
2500
2500
  onClick: () => A(),
2501
2501
  disabled: t,
2502
2502
  "aria-label": "Remove all files",
2503
- children: /* @__PURE__ */ n.jsx(U, { icon: "lets-icons:trash-duotone" })
2503
+ children: /* @__PURE__ */ n.jsx(W, { icon: "lets-icons:trash-duotone" })
2504
2504
  }
2505
2505
  )
2506
2506
  ] }),
@@ -2575,7 +2575,7 @@ function Ra({
2575
2575
  {
2576
2576
  placeholder: i.placeholder,
2577
2577
  type: i.inputType,
2578
- className: W("field-control", i == null ? void 0 : i.customClass),
2578
+ className: U("field-control", i == null ? void 0 : i.customClass),
2579
2579
  ...o(i.id),
2580
2580
  disabled: e == null ? void 0 : e.isReadOnly
2581
2581
  }
@@ -2596,7 +2596,7 @@ const O = ({
2596
2596
  prefix: g,
2597
2597
  disabled: r
2598
2598
  }) => {
2599
- var y, h, p, f;
2599
+ var y, p, h, f;
2600
2600
  const v = o ? { ...o(e) } : {};
2601
2601
  return l === "amount" ? /* @__PURE__ */ n.jsxs("div", { className: "space-y-1.5 relative", children: [
2602
2602
  /* @__PURE__ */ n.jsx(
@@ -2635,7 +2635,7 @@ const O = ({
2635
2635
  ),
2636
2636
  /* @__PURE__ */ n.jsx("span", { className: "text-sm font-medium text-[#344054] font-onest", children: i })
2637
2637
  ] }),
2638
- (s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "ml-2 text-sm text-red-600", children: (h = s[e]) == null ? void 0 : h.message })
2638
+ (s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "ml-2 text-sm text-red-600", children: (p = s[e]) == null ? void 0 : p.message })
2639
2639
  ] }) : l === "textarea" ? /* @__PURE__ */ n.jsxs("div", { className: "space-y-1.5 relative", children: [
2640
2640
  /* @__PURE__ */ n.jsx(
2641
2641
  "label",
@@ -2653,7 +2653,7 @@ const O = ({
2653
2653
  disabled: r
2654
2654
  }
2655
2655
  ),
2656
- (s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "mt-1 text-sm text-red-600", children: (p = s[e]) == null ? void 0 : p.message })
2656
+ (s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "mt-1 text-sm text-red-600", children: (h = s[e]) == null ? void 0 : h.message })
2657
2657
  ] }) : /* @__PURE__ */ n.jsxs("div", { className: "space-y-1.5 relative w-full", children: [
2658
2658
  /* @__PURE__ */ n.jsx(
2659
2659
  "label",
@@ -2680,7 +2680,7 @@ function Da({
2680
2680
  validationData: e
2681
2681
  }) {
2682
2682
  const { register: o = () => ({}) } = e || {};
2683
- return /* @__PURE__ */ n.jsx("div", { className: W("grid gap-y-[6px]", i.customClass), children: i == null ? void 0 : i.options.map(
2683
+ return /* @__PURE__ */ n.jsx("div", { className: U("grid gap-y-[6px]", i.customClass), children: i == null ? void 0 : i.options.map(
2684
2684
  (s) => /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
2685
2685
  O,
2686
2686
  {
@@ -2706,7 +2706,7 @@ function Ka({
2706
2706
  validationData: e
2707
2707
  }) {
2708
2708
  const { register: o = () => ({}) } = e || {};
2709
- return /* @__PURE__ */ n.jsx("div", { className: W("grid gap-y-[6px]", i.customClass), children: i == null ? void 0 : i.options.map(
2709
+ return /* @__PURE__ */ n.jsx("div", { className: U("grid gap-y-[6px]", i.customClass), children: i == null ? void 0 : i.options.map(
2710
2710
  (s) => /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
2711
2711
  O,
2712
2712
  {
@@ -2738,7 +2738,7 @@ const Ki = ({
2738
2738
  loading: v,
2739
2739
  disabled: y
2740
2740
  }) => {
2741
- const [h, p] = L(m ? [] : null), f = Gi(!1), A = Y(() => !c || !i || i.length === 0 ? m ? [] : null : m ? Array.isArray(c) ? i.filter((N) => c.some(
2741
+ const [p, h] = L(m ? [] : null), f = Gi(!1), A = Y(() => !c || !i || i.length === 0 ? m ? [] : null : m ? Array.isArray(c) ? i.filter((N) => c.some(
2742
2742
  (x) => {
2743
2743
  var C;
2744
2744
  return typeof N.value == "object" ? ((C = N.value) == null ? void 0 : C.id) === (x == null ? void 0 : x.id) : N.value === x;
@@ -2752,25 +2752,25 @@ const Ki = ({
2752
2752
  f.current = !1;
2753
2753
  return;
2754
2754
  }
2755
- if (m && Array.isArray(A) && Array.isArray(h)) {
2756
- const N = h.map((C) => C.value), x = A.map((C) => C.value);
2757
- JSON.stringify(N) !== JSON.stringify(x) && p(A);
2758
- } else (A == null ? void 0 : A.value) !== (h == null ? void 0 : h.value) && p(A);
2755
+ if (m && Array.isArray(A) && Array.isArray(p)) {
2756
+ const N = p.map((C) => C.value), x = A.map((C) => C.value);
2757
+ JSON.stringify(N) !== JSON.stringify(x) && h(A);
2758
+ } else (A == null ? void 0 : A.value) !== (p == null ? void 0 : p.value) && h(A);
2759
2759
  }, [A, m]);
2760
2760
  const S = J((N) => {
2761
2761
  var x;
2762
- if (f.current = !0, p(N), a) {
2762
+ if (f.current = !0, h(N), a) {
2763
2763
  const C = m ? Array.isArray(N) ? N.map((D) => D.value) : [] : (x = N == null ? void 0 : N.value) != null ? x : null;
2764
2764
  a(l, C), u == null || u(l);
2765
2765
  }
2766
2766
  s && !f.current && s(l);
2767
- }, [a, l, u, s, m]), k = Y(() => v ? "Fetching data..." : h ? m && Array.isArray(h) ? h.length > 0 ? h.map((N) => N.label).join(", ") : e : (h == null ? void 0 : h.label) || e : e, [h, v, e, m]);
2767
+ }, [a, l, u, s, m]), k = Y(() => v ? "Fetching data..." : p ? m && Array.isArray(p) ? p.length > 0 ? p.map((N) => N.label).join(", ") : e : (p == null ? void 0 : p.label) || e : e, [p, v, e, m]);
2768
2768
  return /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
2769
2769
  !t && d && /* @__PURE__ */ n.jsx("label", { className: "block text-sm text-[#686878] darks:text-white/70 mb-2", children: d }),
2770
2770
  t && d && /* @__PURE__ */ n.jsx(
2771
2771
  "label",
2772
2772
  {
2773
- className: W(
2773
+ className: U(
2774
2774
  "z-[40] absolute bg-white py-[2px] px-1 -top-[10px] left-3",
2775
2775
  r
2776
2776
  ),
@@ -2780,7 +2780,7 @@ const Ki = ({
2780
2780
  /* @__PURE__ */ n.jsx(
2781
2781
  q,
2782
2782
  {
2783
- value: h,
2783
+ value: p,
2784
2784
  onChange: S,
2785
2785
  multiple: m,
2786
2786
  disabled: y || v,
@@ -2789,13 +2789,13 @@ const Ki = ({
2789
2789
  /* @__PURE__ */ n.jsx(
2790
2790
  "span",
2791
2791
  {
2792
- className: W("block text-sm text-left truncate", {
2793
- "opacity-60": !h || v
2792
+ className: U("block text-sm text-left truncate", {
2793
+ "opacity-60": !p || v
2794
2794
  }),
2795
2795
  children: k
2796
2796
  }
2797
2797
  ),
2798
- /* @__PURE__ */ n.jsx("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ n.jsx(U, { icon: "lucide:chevron-down" }) })
2798
+ /* @__PURE__ */ n.jsx("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ n.jsx(W, { icon: "lucide:chevron-down" }) })
2799
2799
  ] }),
2800
2800
  /* @__PURE__ */ n.jsx(
2801
2801
  Bi,
@@ -2809,8 +2809,8 @@ const Ki = ({
2809
2809
  q.Option,
2810
2810
  {
2811
2811
  value: N,
2812
- className: ({ active: D }) => W("select-option", { active: D }),
2813
- children: ({ selected: D }) => /* @__PURE__ */ n.jsx("div", { className: W("option-text", { selected: D }), children: N.label })
2812
+ className: ({ active: D }) => U("select-option", { active: D }),
2813
+ children: ({ selected: D }) => /* @__PURE__ */ n.jsx("div", { className: U("option-text", { selected: D }), children: N.label })
2814
2814
  },
2815
2815
  ((C = N.value) == null ? void 0 : C.id) || N.value || x
2816
2816
  );
@@ -2868,14 +2868,14 @@ function yn({
2868
2868
  placeholder: "Select an option..."
2869
2869
  }
2870
2870
  ),
2871
- /* @__PURE__ */ n.jsx(mo, { className: "absolute inset-y-0 right-0 flex items-center px-2 text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ n.jsx(U, { icon: "octicon:chevron-down-12" }) })
2871
+ /* @__PURE__ */ n.jsx(mo, { className: "absolute inset-y-0 right-0 flex items-center px-2 text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ n.jsx(W, { icon: "octicon:chevron-down-12" }) })
2872
2872
  ] }),
2873
2873
  /* @__PURE__ */ n.jsx(bo, { anchor: "bottom start", className: "select-options__combo", children: g.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : g.map((v) => /* @__PURE__ */ n.jsx(
2874
2874
  vo,
2875
2875
  {
2876
2876
  value: v,
2877
- className: ({ active: y, selected: h }) => W("select-option", { active: y, selected: h }),
2878
- children: ({ selected: y }) => /* @__PURE__ */ n.jsx("div", { className: W("option-text", { selected: y }), children: v.label })
2877
+ className: ({ active: y, selected: p }) => U("select-option", { active: y, selected: p }),
2878
+ children: ({ selected: y }) => /* @__PURE__ */ n.jsx("div", { className: U("option-text", { selected: y }), children: v.label })
2879
2879
  },
2880
2880
  v.value
2881
2881
  )) })
@@ -2906,7 +2906,7 @@ function Ia({
2906
2906
  setValue: a,
2907
2907
  trigger: s,
2908
2908
  value: d,
2909
- className: W("field-control", i == null ? void 0 : i.customClass),
2909
+ className: U("field-control", i == null ? void 0 : i.customClass),
2910
2910
  disabled: e == null ? void 0 : e.isReadOnly
2911
2911
  }
2912
2912
  ) : /* @__PURE__ */ n.jsx(
@@ -2930,7 +2930,7 @@ function Ga({
2930
2930
  {
2931
2931
  placeholder: i.placeholder,
2932
2932
  rows: 4,
2933
- className: W("field-control resize-none", i == null ? void 0 : i.customClass),
2933
+ className: U("field-control resize-none", i == null ? void 0 : i.customClass),
2934
2934
  ...o(i.id),
2935
2935
  disabled: e == null ? void 0 : e.isReadOnly
2936
2936
  }
@@ -2953,7 +2953,7 @@ function Tn(i, e, o) {
2953
2953
  return { values: {}, errors: xo((c = d, u = !l.shouldUseNativeValidation && l.criteriaMode === "all", (c.inner || []).reduce(function(m, t) {
2954
2954
  if (m[t.path] || (m[t.path] = { message: t.message, type: t.type }), u) {
2955
2955
  var g = m[t.path].types, r = g && g[t.type];
2956
- m[t.path] = po(t.path, u, m, t.type, r ? [].concat(r, t.message) : t.message);
2956
+ m[t.path] = ho(t.path, u, m, t.type, r ? [].concat(r, t.message) : t.message);
2957
2957
  }
2958
2958
  return m;
2959
2959
  }, {})), l) };
@@ -2972,16 +2972,16 @@ const Fa = ({
2972
2972
  activeTab: a,
2973
2973
  btnClass: l = ""
2974
2974
  }) => {
2975
- const d = W(
2975
+ const d = U(
2976
2976
  "flex gap-x-3 mb-8 w-full no-scrollbar overflow-x-auto border-b-2 border-[#EAECF0] darks:border-gray-500",
2977
2977
  e
2978
2978
  );
2979
2979
  return /* @__PURE__ */ n.jsx("div", { className: d, children: i.map((c) => {
2980
- const u = a === c.key, m = o[c.key] || 0, t = W(
2980
+ const u = a === c.key, m = o[c.key] || 0, t = U(
2981
2981
  "capitalize text-sm whitespace-nowrap no-scrollbar font-semibold pb-[14px] border-b-2 border-[#EAECF0] px-6 flex items-center gap-x-1 flex-1 text-center",
2982
2982
  `${i.length === 1 ? "justify-start" : "justify-center"}`,
2983
2983
  l
2984
- ), g = W({
2984
+ ), g = U({
2985
2985
  "border-gray-500 border-primary border-primary-500 text-primary text-primary-500": u,
2986
2986
  "border-transparent text-gray-400 ": !u
2987
2987
  }), r = m > 0 && /* @__PURE__ */ n.jsx("span", { className: "text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80", children: m });
@@ -2989,7 +2989,7 @@ const Fa = ({
2989
2989
  "button",
2990
2990
  {
2991
2991
  onClick: () => s(c.key),
2992
- className: W(t, g),
2992
+ className: U(t, g),
2993
2993
  "aria-selected": u,
2994
2994
  role: "tab",
2995
2995
  type: "button",
@@ -3026,7 +3026,7 @@ const Fa = ({
3026
3026
  label: i,
3027
3027
  value: e,
3028
3028
  id: e
3029
- }), ii = (i) => ({
3029
+ }), oi = (i) => ({
3030
3030
  ...Va,
3031
3031
  ...i
3032
3032
  }), Wa = De.map((i) => ({
@@ -3034,28 +3034,28 @@ const Fa = ({
3034
3034
  value: i.name,
3035
3035
  id: i.code || i.name
3036
3036
  })), Ua = [
3037
- ii({
3037
+ oi({
3038
3038
  type: "basicText",
3039
3039
  label: "Basic Text",
3040
3040
  icon: "fluent:text-16-filled",
3041
3041
  inputLabel: "",
3042
3042
  inputType: "basicText"
3043
3043
  }),
3044
- ii({
3044
+ oi({
3045
3045
  type: "textField",
3046
3046
  label: "Text Field",
3047
3047
  icon: "fluent:text-16-filled",
3048
3048
  inputLabel: "Text Label",
3049
3049
  inputType: "text"
3050
3050
  }),
3051
- ii({
3051
+ oi({
3052
3052
  type: "longText",
3053
3053
  label: "Long Text Field",
3054
3054
  icon: "dashicons:text",
3055
3055
  inputLabel: "Long Text Label",
3056
3056
  inputType: "text"
3057
3057
  }),
3058
- ii({
3058
+ oi({
3059
3059
  type: "selectField",
3060
3060
  label: "Select List",
3061
3061
  icon: "tabler:select",
@@ -3073,7 +3073,7 @@ const Fa = ({
3073
3073
  // options: [option("Parent", "")],
3074
3074
  // options2: [option("Child", "")],
3075
3075
  // }),
3076
- ii({
3076
+ oi({
3077
3077
  type: "multiSelect",
3078
3078
  label: "Multi Select",
3079
3079
  icon: "fluent-mdl2:multi-select",
@@ -3081,7 +3081,7 @@ const Fa = ({
3081
3081
  inputType: "select",
3082
3082
  options: [Ui("Placeholder 1", "")]
3083
3083
  }),
3084
- ii({
3084
+ oi({
3085
3085
  type: "validateInput",
3086
3086
  label: "Validate Input",
3087
3087
  icon: "iconoir:www",
@@ -3091,7 +3091,7 @@ const Fa = ({
3091
3091
  method: "GET",
3092
3092
  responseType: "string"
3093
3093
  }),
3094
- ii({
3094
+ oi({
3095
3095
  type: "numberField",
3096
3096
  label: "Number",
3097
3097
  icon: "octicon:number-16",
@@ -3099,7 +3099,7 @@ const Fa = ({
3099
3099
  inputType: "number",
3100
3100
  inputMode: "decimal"
3101
3101
  }),
3102
- ii({
3102
+ oi({
3103
3103
  type: "amountField",
3104
3104
  label: "Amount",
3105
3105
  icon: "carbon:currency",
@@ -3107,7 +3107,7 @@ const Fa = ({
3107
3107
  inputType: "amount",
3108
3108
  prefix: null
3109
3109
  }),
3110
- ii({
3110
+ oi({
3111
3111
  type: "date",
3112
3112
  label: "Date",
3113
3113
  icon: "bx:calendar",
@@ -3120,14 +3120,14 @@ const Fa = ({
3120
3120
  canHaveDateRange: !1,
3121
3121
  allowYearPicker: !1
3122
3122
  }),
3123
- ii({
3123
+ oi({
3124
3124
  type: "password",
3125
3125
  label: "Password",
3126
3126
  icon: "ic:round-password",
3127
3127
  inputLabel: "Password Label",
3128
3128
  inputType: "password"
3129
3129
  }),
3130
- ii({
3130
+ oi({
3131
3131
  type: "checkbox",
3132
3132
  label: "Checkbox",
3133
3133
  icon: "mingcute:checkbox-line",
@@ -3135,7 +3135,7 @@ const Fa = ({
3135
3135
  inputType: "checkbox",
3136
3136
  options: [Ui("Checkbox Option", "")]
3137
3137
  }),
3138
- ii({
3138
+ oi({
3139
3139
  type: "phoneField",
3140
3140
  label: "Phone Number",
3141
3141
  icon: "fluent-mdl2:add-phone",
@@ -3143,7 +3143,7 @@ const Fa = ({
3143
3143
  inputType: "tel",
3144
3144
  pattern: "^\\+?[0-9]{7,15}$"
3145
3145
  }),
3146
- ii({
3146
+ oi({
3147
3147
  type: "radio",
3148
3148
  label: "Radio Select",
3149
3149
  icon: "ri:checkbox-circle-line",
@@ -3151,14 +3151,14 @@ const Fa = ({
3151
3151
  inputType: "radio",
3152
3152
  options: [Ui("Radio Option", "")]
3153
3153
  }),
3154
- ii({
3154
+ oi({
3155
3155
  type: "email",
3156
3156
  label: "Email",
3157
3157
  icon: "mdi:email-outline",
3158
3158
  inputLabel: "Email Label",
3159
3159
  inputType: "email"
3160
3160
  }),
3161
- ii({
3161
+ oi({
3162
3162
  type: "file",
3163
3163
  label: "File Attachment",
3164
3164
  icon: "ion:attach-sharp",
@@ -3167,7 +3167,7 @@ const Fa = ({
3167
3167
  isMultiple: !1,
3168
3168
  acceptedFiles: []
3169
3169
  }),
3170
- ii({
3170
+ oi({
3171
3171
  type: "country",
3172
3172
  label: "Country",
3173
3173
  icon: "fluent:globe-16-regular",
@@ -3176,14 +3176,14 @@ const Fa = ({
3176
3176
  options: Wa,
3177
3177
  showState: !1
3178
3178
  }),
3179
- ii({
3179
+ oi({
3180
3180
  type: "rating",
3181
3181
  label: "Ratings",
3182
3182
  icon: "streamline-ultimate:rating-star-ribbon",
3183
3183
  inputLabel: "Rating Label",
3184
3184
  inputType: "rating"
3185
3185
  }),
3186
- ii({
3186
+ oi({
3187
3187
  type: "dataGrid",
3188
3188
  label: "Data Grid",
3189
3189
  icon: "carbon:data-table",
@@ -3199,36 +3199,36 @@ const Fa = ({
3199
3199
  }
3200
3200
  ]
3201
3201
  }),
3202
- ii({
3203
- type: "tableInput",
3204
- label: "Table Input",
3205
- icon: "iconoir:table",
3206
- inputLabel: "Table Input Label",
3207
- inputType: "tableInput",
3208
- value: []
3209
- }),
3210
- ii({
3202
+ // createElement({
3203
+ // type: ElementKind.TABLE_INPUT,
3204
+ // label: "Table Input",
3205
+ // icon: "iconoir:table",
3206
+ // inputLabel: "Table Input Label",
3207
+ // inputType: "tableInput",
3208
+ // value: [],
3209
+ // }),
3210
+ oi({
3211
3211
  type: "divider",
3212
3212
  label: "Divider",
3213
3213
  icon: "pixel:divider",
3214
3214
  inputLabel: "",
3215
3215
  inputType: "divider"
3216
3216
  }),
3217
- ii({
3217
+ oi({
3218
3218
  type: "spacer",
3219
3219
  label: "Spacer",
3220
3220
  icon: "fluent-mdl2:spacer",
3221
3221
  inputLabel: "",
3222
3222
  inputType: "spacer"
3223
3223
  }),
3224
- ii({
3225
- type: "section",
3226
- label: "Section",
3227
- icon: "stash:section-divider",
3228
- inputLabel: "",
3229
- inputType: "section"
3230
- }),
3231
- ii({
3224
+ // createElement({
3225
+ // type: ElementKind.SECTION,
3226
+ // label: "Section",
3227
+ // icon: "stash:section-divider",
3228
+ // inputLabel: "",
3229
+ // inputType: "section",
3230
+ // }),
3231
+ oi({
3232
3232
  type: "grid",
3233
3233
  label: "Grid",
3234
3234
  icon: "cuida:grid-outline",
@@ -3479,8 +3479,8 @@ const es = () => /* @__PURE__ */ n.jsx("blockquote", { className: "bg-gray-100 p
3479
3479
  const g = t.target.result, r = yo.parse(g, { header: !0 });
3480
3480
  i(e, r.data);
3481
3481
  }, m.readAsText(u)) : u.name.endsWith(".xlsx") || u.name.endsWith(".xls") ? (m.onload = (t) => {
3482
- const g = new Uint8Array(t.target.result), r = _n.read(g, { type: "array" }), v = r.SheetNames[0], y = r.Sheets[v], h = _n.utils.sheet_to_json(y);
3483
- i(e, h);
3482
+ const g = new Uint8Array(t.target.result), r = _n.read(g, { type: "array" }), v = r.SheetNames[0], y = r.Sheets[v], p = _n.utils.sheet_to_json(y);
3483
+ i(e, p);
3484
3484
  }, m.readAsArrayBuffer(u)) : bi.error("Unsupported file type. Please upload a CSV or Excel file.");
3485
3485
  };
3486
3486
  return /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
@@ -3824,8 +3824,8 @@ const rs = T.object().shape({
3824
3824
  register: r,
3825
3825
  handleSubmit: v,
3826
3826
  control: y,
3827
- setValue: h,
3828
- watch: p,
3827
+ setValue: p,
3828
+ watch: h,
3829
3829
  trigger: f,
3830
3830
  formState: { errors: A, isSubmitting: S, isValid: k },
3831
3831
  reset: N
@@ -3835,7 +3835,7 @@ const rs = T.object().shape({
3835
3835
  ...o,
3836
3836
  options: o.options || []
3837
3837
  }
3838
- }), x = p(), { fields: C, append: D, remove: Q } = dn({
3838
+ }), x = h(), { fields: C, append: D, remove: Q } = dn({
3839
3839
  control: y,
3840
3840
  name: "options"
3841
3841
  }), {
@@ -3862,7 +3862,7 @@ const rs = T.object().shape({
3862
3862
  headers: {
3863
3863
  Authorization: `Bearer ${ti("token")}`
3864
3864
  }
3865
- }, hi = J(async () => {
3865
+ }, pi = J(async () => {
3866
3866
  var H, _, X;
3867
3867
  if (!x.apiUrl || !/^https?:\/\//.test(x.apiUrl)) {
3868
3868
  bi.info("Please provide a valid API URL");
@@ -3870,26 +3870,26 @@ const rs = T.object().shape({
3870
3870
  }
3871
3871
  try {
3872
3872
  u(!0);
3873
- const { status: ni, data: ei } = await Ei.get(x.apiUrl, F);
3874
- if (ni !== 200 || !ei) {
3873
+ const { status: ii, data: ni } = await Ei.get(x.apiUrl, F);
3874
+ if (ii !== 200 || !ni) {
3875
3875
  bi.error("Unexpected response from server.");
3876
3876
  return;
3877
3877
  }
3878
- const ri = ei.data || ei.record || ei.result;
3878
+ const ri = ni.data || ni.record || ni.result;
3879
3879
  if (!Array.isArray(ri)) {
3880
3880
  bi.error("Expected an array in response (data, record, or result).");
3881
3881
  return;
3882
3882
  }
3883
- ((H = o.type) == null ? void 0 : H.toLowerCase()) === "datagrid" ? h("dataColumns", ri) : h("options", ri);
3884
- } catch (ni) {
3885
- const ei = ((X = (_ = ni == null ? void 0 : ni.response) == null ? void 0 : _.data) == null ? void 0 : X.message) || (ni == null ? void 0 : ni.message) || "Unable to load options";
3886
- bi.error(ei);
3883
+ ((H = o.type) == null ? void 0 : H.toLowerCase()) === "datagrid" ? p("dataColumns", ri) : p("options", ri);
3884
+ } catch (ii) {
3885
+ const ni = ((X = (_ = ii == null ? void 0 : ii.response) == null ? void 0 : _.data) == null ? void 0 : X.message) || (ii == null ? void 0 : ii.message) || "Unable to load options";
3886
+ bi.error(ni);
3887
3887
  } finally {
3888
3888
  u(!1);
3889
3889
  }
3890
- }, [o.type, h, x.apiUrl]), gi = ["manual", "api", "sheet"];
3890
+ }, [o.type, p, x.apiUrl]), gi = ["manual", "api", "sheet"];
3891
3891
  function fi() {
3892
- m === "api" && hi();
3892
+ m === "api" && pi();
3893
3893
  }
3894
3894
  const yi = () => /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col justify-start gap-y-1", children: [
3895
3895
  /* @__PURE__ */ n.jsx("div", { className: "flex items-center mb-4 gap-x-5", children: gi.map((H) => /* @__PURE__ */ n.jsxs("label", { className: "items-center text-base capitalize gap-x-3", children: [
@@ -3942,7 +3942,7 @@ const rs = T.object().shape({
3942
3942
  {
3943
3943
  isFloating: !0,
3944
3944
  label: "Load options form sheet (csv, xlsx)",
3945
- setValue: h,
3945
+ setValue: p,
3946
3946
  name: "options"
3947
3947
  }
3948
3948
  ) }),
@@ -3984,7 +3984,7 @@ const rs = T.object().shape({
3984
3984
  type: "button",
3985
3985
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
3986
3986
  onClick: () => Q(_),
3987
- children: /* @__PURE__ */ n.jsx(U, { icon: "iconamoon:sign-times-fill" })
3987
+ children: /* @__PURE__ */ n.jsx(W, { icon: "iconamoon:sign-times-fill" })
3988
3988
  }
3989
3989
  )
3990
3990
  ]
@@ -4001,7 +4001,7 @@ const rs = T.object().shape({
4001
4001
  className: "flex items-center mt-2 text-sm font-medium text-gray-700 gap-x-1",
4002
4002
  onClick: () => D({ label: "", value: "", id: xi() }),
4003
4003
  children: [
4004
- /* @__PURE__ */ n.jsx(U, { icon: "qlementine-icons:plus-16" }),
4004
+ /* @__PURE__ */ n.jsx(W, { icon: "qlementine-icons:plus-16" }),
4005
4005
  " Add Option"
4006
4006
  ]
4007
4007
  }
@@ -4061,7 +4061,7 @@ const rs = T.object().shape({
4061
4061
  type: "button",
4062
4062
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
4063
4063
  onClick: () => B(_),
4064
- children: /* @__PURE__ */ n.jsx(U, { icon: "iconamoon:sign-times-fill" })
4064
+ children: /* @__PURE__ */ n.jsx(W, { icon: "iconamoon:sign-times-fill" })
4065
4065
  }
4066
4066
  )
4067
4067
  ]
@@ -4077,7 +4077,7 @@ const rs = T.object().shape({
4077
4077
  className: "flex items-center mt-2 text-sm font-medium text-gray-700 gap-x-1",
4078
4078
  onClick: () => K({ label: "", value: "", key: "", id: xi() }),
4079
4079
  children: [
4080
- /* @__PURE__ */ n.jsx(U, { icon: "qlementine-icons:plus-16" }),
4080
+ /* @__PURE__ */ n.jsx(W, { icon: "qlementine-icons:plus-16" }),
4081
4081
  " Add Option"
4082
4082
  ]
4083
4083
  }
@@ -4138,7 +4138,7 @@ const rs = T.object().shape({
4138
4138
  {
4139
4139
  isFloating: !0,
4140
4140
  label: "Load columns form sheet (csv, xlsx)",
4141
- setValue: h,
4141
+ setValue: p,
4142
4142
  name: "dataColumns"
4143
4143
  }
4144
4144
  ) }),
@@ -4174,7 +4174,7 @@ const rs = T.object().shape({
4174
4174
  type: "button",
4175
4175
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
4176
4176
  onClick: () => $(_),
4177
- children: /* @__PURE__ */ n.jsx(U, { icon: "iconamoon:sign-times-fill" })
4177
+ children: /* @__PURE__ */ n.jsx(W, { icon: "iconamoon:sign-times-fill" })
4178
4178
  }
4179
4179
  )
4180
4180
  ] }, H.id)),
@@ -4192,7 +4192,7 @@ const rs = T.object().shape({
4192
4192
  id: xi()
4193
4193
  }),
4194
4194
  children: [
4195
- /* @__PURE__ */ n.jsx(U, { icon: "qlementine-icons:plus-16" }),
4195
+ /* @__PURE__ */ n.jsx(W, { icon: "qlementine-icons:plus-16" }),
4196
4196
  " Add column"
4197
4197
  ]
4198
4198
  }
@@ -4204,23 +4204,24 @@ const rs = T.object().shape({
4204
4204
  Authorization: `Bearer ${H}`
4205
4205
  }
4206
4206
  });
4207
- _ === 200 && (console.log({ data: X }), h("options", (X == null ? void 0 : X.data) || X));
4208
- }, [h, x.url]);
4207
+ _ === 200 && (console.log({ data: X }), p("options", (X == null ? void 0 : X.data) || X));
4208
+ }, [p, x.url]);
4209
4209
  return R(() => {
4210
4210
  o.type === "document" && x.url && Si();
4211
4211
  }, [x.url, o.type, Si]), /* @__PURE__ */ n.jsx(
4212
4212
  "div",
4213
4213
  {
4214
- className: "fixed inset-0 bg-black/30 flex items-center justify-end z-[999] cursor-default select-none ",
4214
+ className: "fixed inset-0 bg-gray-800/40 backdrop-blur-sm flex items-center justify-end z-[999] cursor-default select-none ",
4215
4215
  draggable: "true",
4216
4216
  onDragStart: (H) => H.preventDefault(),
4217
4217
  children: /* @__PURE__ */ n.jsxs(
4218
4218
  "div",
4219
4219
  {
4220
- className: "w-full lg:w-1/3 xl:w-1/4 bg-white h-screen shadow-xl relative flex flex-col items-center select-",
4220
+ className: "w-full lg:w-2/3 xl:w-2/5 bg-white h-screen shadow-xl relative flex flex-col items-center select-",
4221
4221
  draggable: "true",
4222
4222
  onDragStart: (H) => H.preventDefault(),
4223
4223
  children: [
4224
+ /* @__PURE__ */ n.jsx("button", { className: "bg-white h-10 w-10 flex justify-center items-center absolute top-1 -left-12 rounded-lg hover:bg-gray-50", onClick: e, children: /* @__PURE__ */ n.jsx(W, { icon: "tabler:x", iconClass: "text-xl" }) }),
4224
4225
  /* @__PURE__ */ n.jsx("div", { className: "w-full pt-4", children: /* @__PURE__ */ n.jsx(
4225
4226
  Fa,
4226
4227
  {
@@ -4239,7 +4240,7 @@ const rs = T.object().shape({
4239
4240
  children: [
4240
4241
  /* @__PURE__ */ n.jsxs("div", { className: "flex-1", children: [
4241
4242
  " ",
4242
- /* @__PURE__ */ n.jsxs("div", { className: " max-h-[75vh] overflow-y-auto flex-1", children: [
4243
+ /* @__PURE__ */ n.jsxs("div", { className: " max-h-[70vh] overflow-y-auto flex-1", children: [
4243
4244
  l === "basic" && /* @__PURE__ */ n.jsxs("div", { className: "z-10 flex flex-col w-full gap-5 px-6", children: [
4244
4245
  rn.includes(o.inputType) && /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(
4245
4246
  O,
@@ -4322,9 +4323,9 @@ const rs = T.object().shape({
4322
4323
  ],
4323
4324
  register: r,
4324
4325
  name: "method",
4325
- setValue: h,
4326
+ setValue: p,
4326
4327
  trigger: f,
4327
- value: p("method")
4328
+ value: h("method")
4328
4329
  }
4329
4330
  ),
4330
4331
  /* @__PURE__ */ n.jsx(
@@ -4343,9 +4344,9 @@ const rs = T.object().shape({
4343
4344
  ],
4344
4345
  register: r,
4345
4346
  name: "responseType",
4346
- setValue: h,
4347
+ setValue: p,
4347
4348
  trigger: f,
4348
- value: p("responseType")
4349
+ value: h("responseType")
4349
4350
  }
4350
4351
  )
4351
4352
  ] }),
@@ -4353,9 +4354,9 @@ const rs = T.object().shape({
4353
4354
  ns,
4354
4355
  {
4355
4356
  onChange: (H) => {
4356
- h("denominators", H);
4357
+ p("denominators", H);
4357
4358
  },
4358
- value: p("denominators")
4359
+ value: h("denominators")
4359
4360
  }
4360
4361
  ),
4361
4362
  !rn.includes(o.inputType) && !zi.includes(o.inputType) && /* @__PURE__ */ n.jsx(
@@ -4376,9 +4377,9 @@ const rs = T.object().shape({
4376
4377
  options: Ja,
4377
4378
  register: r,
4378
4379
  name: "dateFormat",
4379
- setValue: h,
4380
+ setValue: p,
4380
4381
  trigger: f,
4381
- value: p("dateFormat")
4382
+ value: h("dateFormat")
4382
4383
  }
4383
4384
  ),
4384
4385
  /* @__PURE__ */ n.jsx(
@@ -4394,20 +4395,20 @@ const rs = T.object().shape({
4394
4395
  ),
4395
4396
  (x == null ? void 0 : x.canHaveDateRange) && /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
4396
4397
  /* @__PURE__ */ n.jsx(
4397
- pn,
4398
+ hn,
4398
4399
  {
4399
4400
  name: "minDate",
4400
4401
  value: x == null ? void 0 : x.minDate,
4401
- onGetValue: h,
4402
+ onGetValue: p,
4402
4403
  placeholder: "Select min date"
4403
4404
  }
4404
4405
  ),
4405
4406
  /* @__PURE__ */ n.jsx(
4406
- pn,
4407
+ hn,
4407
4408
  {
4408
4409
  name: "maxDate",
4409
4410
  value: x == null ? void 0 : x.minDate,
4410
- onGetValue: h,
4411
+ onGetValue: p,
4411
4412
  placeholder: "Select max date",
4412
4413
  minDate: x == null ? void 0 : x.minDate
4413
4414
  }
@@ -4452,9 +4453,9 @@ const rs = T.object().shape({
4452
4453
  ],
4453
4454
  register: r,
4454
4455
  name: "selectType",
4455
- setValue: h,
4456
+ setValue: p,
4456
4457
  trigger: f,
4457
- value: p("selectType")
4458
+ value: h("selectType")
4458
4459
  }
4459
4460
  ),
4460
4461
  o.type.toLowerCase() === "grid" && /* @__PURE__ */ n.jsx(
@@ -4527,7 +4528,7 @@ const rs = T.object().shape({
4527
4528
  id: "acceptedFiles",
4528
4529
  value: x == null ? void 0 : x.acceptedFiles
4529
4530
  },
4530
- validationData: { register: r, setValue: h, trigger: f, watch: p },
4531
+ validationData: { register: r, setValue: p, trigger: f, watch: h },
4531
4532
  placeholder: "Choose file types"
4532
4533
  }
4533
4534
  )
@@ -4550,9 +4551,9 @@ const rs = T.object().shape({
4550
4551
  ts,
4551
4552
  {
4552
4553
  register: r,
4553
- setValue: h,
4554
+ setValue: p,
4554
4555
  trigger: f,
4555
- watch: p,
4556
+ watch: h,
4556
4557
  id: o == null ? void 0 : o.id
4557
4558
  }
4558
4559
  )
@@ -4686,7 +4687,7 @@ const rs = T.object().shape({
4686
4687
  ] })
4687
4688
  ] })
4688
4689
  ] }),
4689
- /* @__PURE__ */ n.jsxs("div", { className: "sticky flex w-full gap-3 px-6 pt-8 pb-4 mt-10 border-t", children: [
4690
+ /* @__PURE__ */ n.jsxs("div", { className: "sticky flex w-full gap-3 px-6 pt-8 pb-10 mt-10 border-t", children: [
4690
4691
  /* @__PURE__ */ n.jsx(
4691
4692
  "button",
4692
4693
  {
@@ -4755,7 +4756,7 @@ const rs = T.object().shape({
4755
4756
  type: "button",
4756
4757
  className: "text-sm outline-none hover:opacity-80",
4757
4758
  onClick: () => a(!0),
4758
- children: /* @__PURE__ */ n.jsx(U, { icon: "circum:edit", iconClass: "text-base" })
4759
+ children: /* @__PURE__ */ n.jsx(W, { icon: "circum:edit", iconClass: "text-base" })
4759
4760
  }
4760
4761
  ),
4761
4762
  /* @__PURE__ */ n.jsx(
@@ -4764,7 +4765,7 @@ const rs = T.object().shape({
4764
4765
  type: "button",
4765
4766
  className: "text-sm outline-none hover:opacity-80",
4766
4767
  onClick: c,
4767
- children: /* @__PURE__ */ n.jsx(U, { icon: "iconamoon:trash", iconClass: "text-base" })
4768
+ children: /* @__PURE__ */ n.jsx(W, { icon: "iconamoon:trash", iconClass: "text-base" })
4768
4769
  }
4769
4770
  )
4770
4771
  ] })
@@ -4802,12 +4803,12 @@ function vs({
4802
4803
  }
4803
4804
  );
4804
4805
  }
4805
- function ps(i) {
4806
+ function hs(i) {
4806
4807
  if (!i) return !1;
4807
4808
  const e = /^data:image\/(jpeg|png|gif|bmp|webp);base64,/i, o = /\.(jpeg|jpg|png|gif|bmp|webp)$/i;
4808
4809
  return e.test(i) || o.test(i);
4809
4810
  }
4810
- const hs = ({ imageUrl: i }) => {
4811
+ const ps = ({ imageUrl: i }) => {
4811
4812
  const [e, o] = L(!1), s = () => {
4812
4813
  o(!0);
4813
4814
  }, a = () => {
@@ -4902,43 +4903,43 @@ function gs({
4902
4903
  R(() => {
4903
4904
  d(v);
4904
4905
  }, [v]);
4905
- const [y, h] = L("");
4906
+ const [y, p] = L("");
4906
4907
  R(() => {
4907
4908
  o(i.id);
4908
4909
  }, [i.id, o]);
4909
- const { url: p, method: f, responseType: A } = i || {}, k = {
4910
+ const { url: h, method: f, responseType: A } = i || {}, k = {
4910
4911
  headers: {
4911
4912
  Authorization: `Bearer ${ti("token")}`
4912
4913
  }
4913
4914
  }, N = J(
4914
4915
  async (x) => {
4915
- var C, D, Q, P, K, B, E, I, $, li, pi;
4916
- if (!(!p || !f)) {
4916
+ var C, D, Q, P, K, B, E, I, $, li, hi;
4917
+ if (!(!h || !f)) {
4917
4918
  u(!0);
4918
4919
  try {
4919
4920
  let F;
4920
4921
  if (f.toLowerCase() === "get") {
4921
- const hi = `${p}?value=${x}`;
4922
- F = await Ei.get(hi, k);
4922
+ const pi = `${h}?value=${x}`;
4923
+ F = await Ei.get(pi, k);
4923
4924
  } else if (f.toLowerCase() === "post")
4924
- F = await Ei.post(p, { value: x }, k);
4925
+ F = await Ei.post(h, { value: x }, k);
4925
4926
  else
4926
4927
  throw new Error("Unsupported HTTP method");
4927
4928
  F.status === 200 && ((((D = (C = F == null ? void 0 : F.data) == null ? void 0 : C.data) == null ? void 0 : D.status) || ((Q = F == null ? void 0 : F.data) == null ? void 0 : Q.status)) === !0 ? (t(!0), A === "string" ? r(
4928
4929
  ((K = (P = F == null ? void 0 : F.data) == null ? void 0 : P.data) == null ? void 0 : K.description) || ((B = F == null ? void 0 : F.data) == null ? void 0 : B.description) || "Validation successful"
4929
- ) : h(
4930
+ ) : p(
4930
4931
  ((I = (E = F == null ? void 0 : F.data) == null ? void 0 : E.data) == null ? void 0 : I.description) || (($ = F == null ? void 0 : F.data) == null ? void 0 : $.description) || {}
4931
4932
  )) : (console.error("Invalid input:", x), r("Unable to validate input"), t(!1)));
4932
4933
  } catch (F) {
4933
4934
  console.error("Error validating input:", F), r(
4934
- ((pi = (li = F == null ? void 0 : F.response) == null ? void 0 : li.data) == null ? void 0 : pi.message) || "Unable to validate input"
4935
+ ((hi = (li = F == null ? void 0 : F.response) == null ? void 0 : li.data) == null ? void 0 : hi.message) || "Unable to validate input"
4935
4936
  ), t(!1);
4936
4937
  } finally {
4937
4938
  u(!1);
4938
4939
  }
4939
4940
  }
4940
4941
  },
4941
- [f, A, p]
4942
+ [f, A, h]
4942
4943
  );
4943
4944
  return R(() => {
4944
4945
  if (l) {
@@ -4954,7 +4955,7 @@ function gs({
4954
4955
  {
4955
4956
  placeholder: (i == null ? void 0 : i.placeholder) || "",
4956
4957
  type: (i == null ? void 0 : i.inputType) || "text",
4957
- className: W("field-control", i == null ? void 0 : i.customClass),
4958
+ className: U("field-control", i == null ? void 0 : i.customClass),
4958
4959
  ...o(i == null ? void 0 : i.id),
4959
4960
  onChange: (x) => {
4960
4961
  d(x.target.value), s(i == null ? void 0 : i.id, x.target.value);
@@ -4996,7 +4997,7 @@ function gs({
4996
4997
  }
4997
4998
  )
4998
4999
  ] }),
4999
- m && !c && /* @__PURE__ */ n.jsx("span", { className: "block pr-3 text-lg text-green-600", children: /* @__PURE__ */ n.jsx(U, { icon: "gg:check-o" }) })
5000
+ m && !c && /* @__PURE__ */ n.jsx("span", { className: "block pr-3 text-lg text-green-600", children: /* @__PURE__ */ n.jsx(W, { icon: "gg:check-o" }) })
5000
5001
  ] })
5001
5002
  ] }),
5002
5003
  g && A === "string" && /* @__PURE__ */ n.jsx(
@@ -5011,7 +5012,7 @@ function gs({
5011
5012
  x,
5012
5013
  ":"
5013
5014
  ] }),
5014
- ps(C) ? /* @__PURE__ */ n.jsx(hs, { imageUrl: C }) : /* @__PURE__ */ n.jsx("span", { children: String(C) })
5015
+ hs(C) ? /* @__PURE__ */ n.jsx(ps, { imageUrl: C }) : /* @__PURE__ */ n.jsx("span", { children: String(C) })
5015
5016
  ] }, x)) })
5016
5017
  ] });
5017
5018
  }
@@ -5109,10 +5110,10 @@ function xs({
5109
5110
  ) });
5110
5111
  }
5111
5112
  function ys({ element: i }) {
5112
- return /* @__PURE__ */ n.jsx("div", { className: W("py-6", i == null ? void 0 : i.customClass) });
5113
+ return /* @__PURE__ */ n.jsx("div", { className: U("py-6", i == null ? void 0 : i.customClass) });
5113
5114
  }
5114
5115
  function As({ element: i }) {
5115
- return /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("hr", { className: W("border-gray-200 my-4", i == null ? void 0 : i.customClass) }) });
5116
+ return /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("hr", { className: U("border-gray-200 my-4", i == null ? void 0 : i.customClass) }) });
5116
5117
  }
5117
5118
  function Ss({
5118
5119
  element: i,
@@ -5146,19 +5147,19 @@ function js({
5146
5147
  l(i);
5147
5148
  }, []);
5148
5149
  const u = (r, v, y) => {
5149
- const h = a.map((p, f) => f === v ? { ...p, [y]: r } : p);
5150
- l(h), e && e(h);
5150
+ const p = a.map((h, f) => f === v ? { ...h, [y]: r } : h);
5151
+ l(p), e && e(p);
5151
5152
  }, m = () => {
5152
- const r = a.length > 0 ? Math.max(...a.map((h) => Number(h.id) || 0)) + 1 : 1, v = s.reduce(
5153
- (h, p) => ({
5154
- ...h,
5155
- [p.field]: p.field === "id" ? r : ""
5153
+ const r = a.length > 0 ? Math.max(...a.map((p) => Number(p.id) || 0)) + 1 : 1, v = s.reduce(
5154
+ (p, h) => ({
5155
+ ...p,
5156
+ [h.field]: h.field === "id" ? r : ""
5156
5157
  }),
5157
5158
  {}
5158
5159
  ), y = [...a, v];
5159
5160
  l(y), e && e(y);
5160
5161
  }, t = (r) => {
5161
- const v = a.filter((y, h) => h !== r);
5162
+ const v = a.filter((y, p) => p !== r);
5162
5163
  l(v), e && e(v);
5163
5164
  }, g = (r, v) => (d == null ? void 0 : d.rowIndex) === r && (d == null ? void 0 : d.field) === v;
5164
5165
  return /* @__PURE__ */ n.jsxs("div", { className: "mt-4 rounded", children: [
@@ -5176,7 +5177,7 @@ function js({
5176
5177
  s.map((r) => /* @__PURE__ */ n.jsx(
5177
5178
  "th",
5178
5179
  {
5179
- className: "px-3 py-2 text-xs font-semibold text-left text-gray-600 border",
5180
+ className: "px-3 py-2 text-xs font-semibold text-left text-gray-600 border whitespace-nowrap",
5180
5181
  children: r.headerName || r.field
5181
5182
  },
5182
5183
  r.field
@@ -5186,18 +5187,18 @@ function js({
5186
5187
  /* @__PURE__ */ n.jsx("tbody", { children: a.length > 0 ? a.map((r, v) => {
5187
5188
  var y;
5188
5189
  return /* @__PURE__ */ n.jsxs("tr", { children: [
5189
- s.map((h) => {
5190
- var p, f;
5190
+ s.map((p) => {
5191
+ var h, f;
5191
5192
  return /* @__PURE__ */ n.jsx(
5192
5193
  "td",
5193
5194
  {
5194
5195
  className: "px-2 py-1 border",
5195
- onDoubleClick: () => h.editable && !o && c({ rowIndex: v, field: h.field }),
5196
- children: h.editable && g(v, h.field) && !o ? /* @__PURE__ */ n.jsx(n.Fragment, { children: h.type === "number" ? /* @__PURE__ */ n.jsx(
5196
+ onDoubleClick: () => p.editable && !o && c({ rowIndex: v, field: p.field }),
5197
+ children: p.editable && g(v, p.field) && !o ? /* @__PURE__ */ n.jsx(n.Fragment, { children: p.type === "number" ? /* @__PURE__ */ n.jsx(
5197
5198
  Qi,
5198
5199
  {
5199
- value: (p = r[h.field]) != null ? p : "",
5200
- onValueChange: (A) => u(A, v, h.field),
5200
+ value: (h = r[p.field]) != null ? h : "",
5201
+ onValueChange: (A) => u(A, v, p.field),
5201
5202
  decimalsLimit: 6,
5202
5203
  allowNegativeValue: !1,
5203
5204
  placeholder: "",
@@ -5208,18 +5209,18 @@ function js({
5208
5209
  {
5209
5210
  autoFocus: !0,
5210
5211
  type: "text",
5211
- value: (f = r[h.field]) != null ? f : "",
5212
+ value: (f = r[p.field]) != null ? f : "",
5212
5213
  onChange: (A) => u(
5213
5214
  A.target.value,
5214
5215
  v,
5215
- h.field
5216
+ p.field
5216
5217
  ),
5217
5218
  onBlur: () => c(null),
5218
5219
  className: "w-full px-2 py-1 text-gray-600 border rounded outline-none"
5219
5220
  }
5220
- ) }) : /* @__PURE__ */ n.jsx("span", { className: "block py-1 text-gray-700 cursor-pointer", children: r[h.field] })
5221
+ ) }) : /* @__PURE__ */ n.jsx("span", { className: "block py-1 text-gray-700 cursor-pointer", children: r[p.field] })
5221
5222
  },
5222
- h.field
5223
+ p.field
5223
5224
  );
5224
5225
  }),
5225
5226
  !o && /* @__PURE__ */ n.jsx("td", { className: "px-2 py-1 text-center border", children: /* @__PURE__ */ n.jsx(
@@ -5229,7 +5230,7 @@ function js({
5229
5230
  className: "text-red-500 hover:text-red-700",
5230
5231
  "aria-label": "Delete row",
5231
5232
  children: /* @__PURE__ */ n.jsx(
5232
- U,
5233
+ W,
5233
5234
  {
5234
5235
  icon: "lets-icons:trash-duotone",
5235
5236
  iconClass: "text-xl"
@@ -5284,9 +5285,9 @@ const re = ({
5284
5285
  subText: r,
5285
5286
  labelClass: v = "",
5286
5287
  loading: y,
5287
- disabled: h
5288
+ disabled: p
5288
5289
  }) => {
5289
- const [p, f] = L(t ? [] : null), A = W("custom-select__control", i), S = Y(() => e, [e]);
5290
+ const [h, f] = L(t ? [] : null), A = U("custom-select__control", i), S = Y(() => e, [e]);
5290
5291
  return R(() => {
5291
5292
  const k = e == null ? void 0 : e.find((N) => {
5292
5293
  var x;
@@ -5294,21 +5295,21 @@ const re = ({
5294
5295
  });
5295
5296
  f(k || null);
5296
5297
  }, [u, e]), R(() => {
5297
- p && l && a && (l(d, p == null ? void 0 : p.value), a(d), m == null || m(d));
5298
- }, [d, p]), /* @__PURE__ */ n.jsxs("div", { className: "custom-select", children: [
5298
+ h && l && a && (l(d, h == null ? void 0 : h.value), a(d), m == null || m(d));
5299
+ }, [d, h]), /* @__PURE__ */ n.jsxs("div", { className: "custom-select", children: [
5299
5300
  c && !g && /* @__PURE__ */ n.jsx("label", { className: "custom-select__label", children: c }),
5300
- g && c && /* @__PURE__ */ n.jsx("label", { className: W("custom-select__floating-label", v), children: c }),
5301
+ g && c && /* @__PURE__ */ n.jsx("label", { className: U("custom-select__floating-label", v), children: c }),
5301
5302
  /* @__PURE__ */ n.jsx(
5302
5303
  q,
5303
5304
  {
5304
- value: p,
5305
+ value: h,
5305
5306
  onChange: f,
5306
5307
  multiple: t,
5307
- disabled: h,
5308
+ disabled: p,
5308
5309
  children: /* @__PURE__ */ n.jsxs("div", { className: "custom-select__wrapper", children: [
5309
- /* @__PURE__ */ n.jsxs(q.Button, { className: A, disabled: h, children: [
5310
- y ? /* @__PURE__ */ n.jsx("span", { className: "custom-select__loading", children: "Fetching data..." }) : /* @__PURE__ */ n.jsx("span", { className: "custom-select__value", children: (p == null ? void 0 : p.label) || /* @__PURE__ */ n.jsx("span", { className: "custom-select__placeholder", children: o }) }),
5311
- /* @__PURE__ */ n.jsx("span", { className: "custom-select__icon", children: /* @__PURE__ */ n.jsx(U, { icon: "lucide:chevron-down" }) })
5310
+ /* @__PURE__ */ n.jsxs(q.Button, { className: A, disabled: p, children: [
5311
+ y ? /* @__PURE__ */ n.jsx("span", { className: "custom-select__loading", children: "Fetching data..." }) : /* @__PURE__ */ n.jsx("span", { className: "custom-select__value", children: (h == null ? void 0 : h.label) || /* @__PURE__ */ n.jsx("span", { className: "custom-select__placeholder", children: o }) }),
5312
+ /* @__PURE__ */ n.jsx("span", { className: "custom-select__icon", children: /* @__PURE__ */ n.jsx(W, { icon: "lucide:chevron-down" }) })
5312
5313
  ] }),
5313
5314
  /* @__PURE__ */ n.jsx(
5314
5315
  Bi,
@@ -5319,14 +5320,14 @@ const re = ({
5319
5320
  q.Option,
5320
5321
  {
5321
5322
  value: k,
5322
- className: ({ active: x }) => W(
5323
+ className: ({ active: x }) => U(
5323
5324
  "custom-select__option",
5324
5325
  x && "custom-select__option--active"
5325
5326
  ),
5326
5327
  children: ({ selected: x }) => /* @__PURE__ */ n.jsx(
5327
5328
  "span",
5328
5329
  {
5329
- className: W(
5330
+ className: U(
5330
5331
  "custom-select__option-label",
5331
5332
  x && "custom-select__option--selected"
5332
5333
  ),
@@ -5348,32 +5349,32 @@ const re = ({
5348
5349
  element: i,
5349
5350
  validationData: e
5350
5351
  }) => {
5351
- var h;
5352
+ var p;
5352
5353
  const {
5353
5354
  register: o = () => ({}),
5354
5355
  trigger: s,
5355
5356
  setValue: a,
5356
5357
  watch: l,
5357
5358
  isReadOnly: d
5358
- } = e || {}, c = (h = i == null ? void 0 : i.id) != null ? h : "cascadeValue", [u, m] = L(""), [t, g] = L(""), r = (p, f) => {
5359
- const A = p && f ? `${p}_${f}` : "";
5359
+ } = e || {}, c = (p = i == null ? void 0 : i.id) != null ? p : "cascadeValue", [u, m] = L(""), [t, g] = L(""), r = (h, f) => {
5360
+ const A = h && f ? `${h}_${f}` : "";
5360
5361
  a == null || a(c, A), s == null || s(c);
5361
- }, v = (p, f) => {
5362
- p === "first" ? (m(f), g(""), r(f, "")) : (g(f), r(u, f));
5362
+ }, v = (h, f) => {
5363
+ h === "first" ? (m(f), g(""), r(f, "")) : (g(f), r(u, f));
5363
5364
  };
5364
5365
  R(() => {
5365
5366
  if (l) {
5366
- const p = l(c);
5367
- if (p != null && p.includes("_")) {
5368
- const [f, A] = p.split("_");
5367
+ const h = l(c);
5368
+ if (h != null && h.includes("_")) {
5369
+ const [f, A] = h.split("_");
5369
5370
  m(f), g(A);
5370
5371
  }
5371
5372
  }
5372
5373
  }, [l, c]);
5373
5374
  const y = Y(
5374
5375
  () => {
5375
- var p;
5376
- return (p = i.options1) == null ? void 0 : p.filter((f) => f.key === u);
5376
+ var h;
5377
+ return (h = i.options1) == null ? void 0 : h.filter((f) => f.key === u);
5377
5378
  },
5378
5379
  [i.options1, u]
5379
5380
  );
@@ -5382,7 +5383,7 @@ const re = ({
5382
5383
  /* @__PURE__ */ n.jsx("div", { className: "relative", children: /* @__PURE__ */ n.jsx(
5383
5384
  re,
5384
5385
  {
5385
- setValue: (p, f) => v("first", f),
5386
+ setValue: (h, f) => v("first", f),
5386
5387
  options: i.options,
5387
5388
  name: `${c}`,
5388
5389
  register: o,
@@ -5394,7 +5395,7 @@ const re = ({
5394
5395
  /* @__PURE__ */ n.jsx(
5395
5396
  re,
5396
5397
  {
5397
- setValue: (p, f) => v("second", f),
5398
+ setValue: (h, f) => v("second", f),
5398
5399
  options: y,
5399
5400
  name: `${c}`,
5400
5401
  register: o,
@@ -5420,11 +5421,11 @@ const re = ({
5420
5421
  setValue: t,
5421
5422
  watch: g,
5422
5423
  isReadOnly: r
5423
- } = c || {}, v = (f = g == null ? void 0 : g(d.id)) != null ? f : 0, [y, h] = L(null);
5424
+ } = c || {}, v = (f = g == null ? void 0 : g(d.id)) != null ? f : 0, [y, p] = L(null);
5424
5425
  R(() => {
5425
5426
  v == null && (t == null || t(d.id, i));
5426
5427
  }, []);
5427
- const p = (A) => {
5428
+ const h = (A) => {
5428
5429
  if (!o && !r) {
5429
5430
  const S = A + 1;
5430
5431
  t == null || t(d.id, S), m == null || m(d.id), s == null || s(S);
@@ -5441,9 +5442,9 @@ const re = ({
5441
5442
  className: `cursor-pointer transition-colors ${k ? "text-yellow-400" : "text-gray-300"}`,
5442
5443
  width: a,
5443
5444
  height: a,
5444
- onMouseEnter: () => !(o || r) && h(S),
5445
- onMouseLeave: () => !(o || r) && h(null),
5446
- onClick: () => p(S)
5445
+ onMouseEnter: () => !(o || r) && p(S),
5446
+ onMouseLeave: () => !(o || r) && p(null),
5447
+ onClick: () => h(S)
5447
5448
  },
5448
5449
  S
5449
5450
  );
@@ -5462,21 +5463,21 @@ function me({
5462
5463
  watch: d
5463
5464
  } = e || {}, c = (d == null ? void 0 : d(i.id)) || "", { country: u, state: m } = Y(() => {
5464
5465
  if (typeof c == "string" && c.includes(",")) {
5465
- const [y, h] = c.split(",").map((p) => p.trim());
5466
- return { country: h, state: y };
5466
+ const [y, p] = c.split(",").map((h) => h.trim());
5467
+ return { country: p, state: y };
5467
5468
  }
5468
5469
  return { country: c, state: "" };
5469
5470
  }, [c]), t = Gi(c), g = Y(() => {
5470
- var y, h;
5471
- return u ? ((h = (y = De.find((p) => p.name === u)) == null ? void 0 : y.states) == null ? void 0 : h.map((p) => ({
5472
- label: p.name,
5473
- value: p.name
5471
+ var y, p;
5472
+ return u ? ((p = (y = De.find((h) => h.name === u)) == null ? void 0 : y.states) == null ? void 0 : p.map((h) => ({
5473
+ label: h.name,
5474
+ value: h.name
5474
5475
  }))) || [] : [];
5475
- }, [u]), r = (y, h) => {
5476
- const f = (h == null ? void 0 : h.value) || "";
5476
+ }, [u]), r = (y, p) => {
5477
+ const f = (p == null ? void 0 : p.value) || "";
5477
5478
  s && f !== t.current && (s(i.id, f), a == null || a(i.id), t.current = f);
5478
- }, v = (y, h) => {
5479
- const p = (h == null ? void 0 : h.value) || "", f = p ? `${p}, ${u}` : u;
5479
+ }, v = (y, p) => {
5480
+ const h = (p == null ? void 0 : p.value) || "", f = h ? `${h}, ${u}` : u;
5480
5481
  s && f !== t.current && (s(i.id, f), a == null || a(i.id), t.current = f);
5481
5482
  };
5482
5483
  return R(() => {
@@ -5519,17 +5520,17 @@ function Ts({
5519
5520
  if (!(!a || !l))
5520
5521
  try {
5521
5522
  g(!0);
5522
- const p = {
5523
+ const h = {
5523
5524
  headers: {
5524
5525
  Authorization: `Bearer ${ti("token")}`
5525
5526
  }
5526
5527
  }, { data: f } = await Ei.get(
5527
5528
  `${a}/${l}`,
5528
- p
5529
+ h
5529
5530
  ), A = !!((y = (v = f == null ? void 0 : f.data) == null ? void 0 : v.isSigned) != null ? y : f != null && f.isSigned);
5530
5531
  return m(A), A;
5531
- } catch (h) {
5532
- console.error("Failed to check sign status", h);
5532
+ } catch (p) {
5533
+ console.error("Failed to check sign status", p);
5533
5534
  } finally {
5534
5535
  g(!1);
5535
5536
  }
@@ -5549,7 +5550,7 @@ function Ts({
5549
5550
  {
5550
5551
  placeholder: i.placeholder,
5551
5552
  type: i.inputType,
5552
- className: W("field-control", i.customClass),
5553
+ className: U("field-control", i.customClass),
5553
5554
  ...o(i.id),
5554
5555
  disabled: s
5555
5556
  }
@@ -5561,13 +5562,13 @@ function Ts({
5561
5562
  onClick: r,
5562
5563
  disabled: t || u,
5563
5564
  style: { background: (c == null ? void 0 : c.buttonColor) || "#333" },
5564
- className: W(
5565
+ className: U(
5565
5566
  "flex items-center gap-x-1 rounded-lg border border-gray-200 bg-gray-200 px-3 py-[10px] text-sm text-white",
5566
5567
  { "!opacity-60": t }
5567
5568
  ),
5568
5569
  children: [
5569
5570
  /* @__PURE__ */ n.jsx(
5570
- U,
5571
+ W,
5571
5572
  {
5572
5573
  icon: t ? "solar:refresh-outline" : u ? "solar:check-circle-bold" : "solar:pen-2-line-duotone",
5573
5574
  iconClass: t ? "animate-spin" : ""
@@ -5842,12 +5843,12 @@ function Bs({
5842
5843
  onChange: v,
5843
5844
  onError: y
5844
5845
  }) {
5845
- const [h, p] = L(""), [f, A] = L(null), [S, k] = L(""), N = Y(
5846
+ const [p, h] = L(""), [f, A] = L(null), [S, k] = L(""), N = Y(
5846
5847
  () => mn == null ? void 0 : mn.slice().sort((B, E) => B.label.localeCompare(E.label)).map((B) => ({ ...B, phone: `+${B.phone}` })),
5847
5848
  []
5848
- ), x = Y(() => h ? N.filter(
5849
- (B) => `${B.label} ${B.phone}`.toLowerCase().includes(h.toLowerCase())
5850
- ) : N, [h, N]), C = (f == null ? void 0 : f.min) || 10, D = (f == null ? void 0 : f.max) || 10, Q = () => S ? `${(f == null ? void 0 : f.phone) || "+234"}-${S}` : "", P = (B) => {
5849
+ ), x = Y(() => p ? N.filter(
5850
+ (B) => `${B.label} ${B.phone}`.toLowerCase().includes(p.toLowerCase())
5851
+ ) : N, [p, N]), C = (f == null ? void 0 : f.min) || 10, D = (f == null ? void 0 : f.max) || 10, Q = () => S ? `${(f == null ? void 0 : f.phone) || "+234"}-${S}` : "", P = (B) => {
5851
5852
  if (!B) return { code: "+234", number: "" };
5852
5853
  const E = B.split(/[-\s]/);
5853
5854
  return { code: E[0], number: E.slice(1).join(" ") };
@@ -5886,7 +5887,7 @@ function Bs({
5886
5887
  }
5887
5888
  ),
5888
5889
  /* @__PURE__ */ n.jsxs("div", { className: "relative !flex items-center input-control text-[#667085] !py-0 field-control", children: [
5889
- /* @__PURE__ */ n.jsx(U, { icon: "lucide:phone-call" }),
5890
+ /* @__PURE__ */ n.jsx(W, { icon: "lucide:phone-call" }),
5890
5891
  /* @__PURE__ */ n.jsx(Ti, { value: f, onChange: A, children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
5891
5892
  /* @__PURE__ */ n.jsx(
5892
5893
  Ti.Input,
@@ -5894,10 +5895,10 @@ function Bs({
5894
5895
  className: "pl-3 pr-4 mr-1 text-sm bg-white py-[10px] outline-none whitespace-nowrap max-w-[70px]",
5895
5896
  displayValue: (B) => (B == null ? void 0 : B.phone) || "+234",
5896
5897
  placeholder: "+234",
5897
- onChange: (B) => p(B.target.value)
5898
+ onChange: (B) => h(B.target.value)
5898
5899
  }
5899
5900
  ),
5900
- /* @__PURE__ */ n.jsx(Ti.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ n.jsx(U, { icon: "lucide:chevron-down" }) }),
5901
+ /* @__PURE__ */ n.jsx(Ti.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ n.jsx(W, { icon: "lucide:chevron-down" }) }),
5901
5902
  /* @__PURE__ */ n.jsx(Ti.Options, { className: "absolute z-10 w-[250px] left-0 bg-white border rounded-md shadow-lg max-h-[400px] overflow-y-auto", children: x.map((B, E) => /* @__PURE__ */ n.jsxs(
5902
5903
  Ti.Option,
5903
5904
  {
@@ -5929,7 +5930,7 @@ function Bs({
5929
5930
  className: "w-full px-3 outline-none"
5930
5931
  }
5931
5932
  ),
5932
- /* @__PURE__ */ n.jsx("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !K && S.length > 0 && /* @__PURE__ */ n.jsx("span", { className: "text-green-500", children: /* @__PURE__ */ n.jsx(U, { icon: "bi:check-lg" }) }) })
5933
+ /* @__PURE__ */ n.jsx("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !K && S.length > 0 && /* @__PURE__ */ n.jsx("span", { className: "text-green-500", children: /* @__PURE__ */ n.jsx(W, { icon: "bi:check-lg" }) }) })
5933
5934
  ] })
5934
5935
  ] }),
5935
5936
  K ? /* @__PURE__ */ n.jsx("span", { className: "block mt-1 text-sm text-red-500", children: K }) : S.length > 0 && r && /* @__PURE__ */ n.jsx("span", { className: "block mt-1 text-sm text-green-500", children: r }),
@@ -6011,7 +6012,7 @@ const Oe = {
6011
6012
  }, En = ({ col: i, children: e, customClass: o }) => /* @__PURE__ */ n.jsx(
6012
6013
  "div",
6013
6014
  {
6014
- className: W("w-full bg-white", o),
6015
+ className: U("w-full bg-white", o),
6015
6016
  style: { gridColumn: i },
6016
6017
  children: e
6017
6018
  }
@@ -6031,15 +6032,15 @@ const Oe = {
6031
6032
  r.preventDefault(), r.stopPropagation(), r.dataTransfer.dropEffect = "move";
6032
6033
  }, []), t = J(
6033
6034
  (r, v) => {
6034
- var y, h;
6035
+ var y, p;
6035
6036
  r.preventDefault(), c(!1);
6036
6037
  try {
6037
- const p = r.dataTransfer.getData("properties");
6038
- if (!p) return;
6039
- const f = JSON.parse(p);
6038
+ const h = r.dataTransfer.getData("properties");
6039
+ if (!h) return;
6040
+ const f = JSON.parse(h);
6040
6041
  if ((f == null ? void 0 : f.type) === "grid") return;
6041
6042
  const A = v + 1;
6042
- if ((h = (y = l.find((N) => N.id === e)) == null ? void 0 : y.questionData) == null ? void 0 : h.some(
6043
+ if ((p = (y = l.find((N) => N.id === e)) == null ? void 0 : y.questionData) == null ? void 0 : p.some(
6043
6044
  (N) => {
6044
6045
  var x;
6045
6046
  return N.gridId === i.id && ((x = N.gridPosition) == null ? void 0 : x.col) === A;
@@ -6054,16 +6055,16 @@ const Oe = {
6054
6055
  // grid-column is 1-based
6055
6056
  };
6056
6057
  d(k, e);
6057
- } catch (p) {
6058
- console.error("Drop failed in grid:", p), c(!1);
6058
+ } catch (h) {
6059
+ console.error("Drop failed in grid:", h), c(!1);
6059
6060
  }
6060
6061
  },
6061
6062
  [d, i.id, l, e, c]
6062
6063
  ), g = (r, v, y) => {
6063
- const h = Array.isArray(o) && o.find(
6064
- (p) => {
6064
+ const p = Array.isArray(o) && o.find(
6065
+ (h) => {
6065
6066
  var f;
6066
- return ((f = p == null ? void 0 : p.props) == null ? void 0 : f.col) === r + 1;
6067
+ return ((f = h == null ? void 0 : h.props) == null ? void 0 : f.col) === r + 1;
6067
6068
  }
6068
6069
  // because grid-column is 1-based
6069
6070
  );
@@ -6071,15 +6072,15 @@ const Oe = {
6071
6072
  "div",
6072
6073
  {
6073
6074
  id: r.toString(),
6074
- onDrop: (p) => t(p, r),
6075
+ onDrop: (h) => t(h, r),
6075
6076
  onDragOver: m,
6076
- className: W(
6077
+ className: U(
6077
6078
  "border rounded-lg min-h-[110px] bg-white ",
6078
6079
  "flex items-center justify-center text-gray-400 transition-colors",
6079
6080
  `${y === "edit" ? "p-3" : ""}`,
6080
6081
  v
6081
6082
  ),
6082
- children: h || /* @__PURE__ */ n.jsx("span", { children: y === "edit" && /* @__PURE__ */ n.jsx(U, { icon: "ph:plus-bold" }) })
6083
+ children: p || /* @__PURE__ */ n.jsx("span", { children: y === "edit" && /* @__PURE__ */ n.jsx(W, { icon: "ph:plus-bold" }) })
6083
6084
  }
6084
6085
  ) }, r);
6085
6086
  };
@@ -6128,7 +6129,7 @@ function ws({ elementData: i, sectionId: e }) {
6128
6129
  D.splice(C, 0, Q), s(D, e), u(null);
6129
6130
  },
6130
6131
  [g, e, s]
6131
- ), h = J(
6132
+ ), p = J(
6132
6133
  (S, k) => {
6133
6134
  S.preventDefault(), l(!1);
6134
6135
  try {
@@ -6142,25 +6143,25 @@ function ws({ elementData: i, sectionId: e }) {
6142
6143
  }
6143
6144
  },
6144
6145
  [d, e, l]
6145
- ), p = J(
6146
+ ), h = J(
6146
6147
  (S) => /* @__PURE__ */ n.jsx(
6147
6148
  "div",
6148
6149
  {
6149
6150
  className: "transition rounded hover:bg-blue-300",
6150
6151
  onDragOver: (k) => k.preventDefault(),
6151
- onDrop: (k) => h(k, S),
6152
+ onDrop: (k) => p(k, S),
6152
6153
  onDragEnd: () => l(!1),
6153
- children: /* @__PURE__ */ n.jsx("div", { className: "bg-blue-50 rounded p-6 h-[60px] border-2 border-blue-300 border-dashed flex items-center justify-center text-gray-400 opacity-70", children: /* @__PURE__ */ n.jsx(U, { icon: "octicon:plus-16" }) })
6154
+ children: /* @__PURE__ */ n.jsx("div", { className: "bg-blue-50 rounded p-6 h-[60px] border-2 border-blue-300 border-dashed flex items-center justify-center text-gray-400 opacity-70", children: /* @__PURE__ */ n.jsx(W, { icon: "octicon:plus-16" }) })
6154
6155
  },
6155
6156
  `drop-${S}`
6156
6157
  ),
6157
- [h, l]
6158
+ [p, l]
6158
6159
  ), f = J(
6159
6160
  (S) => /* @__PURE__ */ n.jsx(
6160
6161
  "div",
6161
6162
  {
6162
6163
  id: S.id,
6163
- className: W(
6164
+ className: U(
6164
6165
  "cursor-move border p-4 w-full rounded-lg transition-colors bg-white",
6165
6166
  {
6166
6167
  "bg-gray-100": c === S.id,
@@ -6201,14 +6202,14 @@ function ws({ elementData: i, sectionId: e }) {
6201
6202
  return S.gridId ? null : /* @__PURE__ */ n.jsxs(
6202
6203
  "div",
6203
6204
  {
6204
- className: W(
6205
+ className: U(
6205
6206
  "group relative grid gap-y-[6px]",
6206
6207
  S.elementClass
6207
6208
  ),
6208
6209
  children: [
6209
- a && m === S.id && p(k),
6210
+ a && m === S.id && h(k),
6210
6211
  /* @__PURE__ */ n.jsx("div", { className: "group", children: f(S) }),
6211
- a && m === S.id && p(k + 1)
6212
+ a && m === S.id && h(k + 1)
6212
6213
  ]
6213
6214
  },
6214
6215
  S.id
@@ -6217,7 +6218,7 @@ function ws({ elementData: i, sectionId: e }) {
6217
6218
  "div",
6218
6219
  {
6219
6220
  onDragOver: (S) => S.preventDefault(),
6220
- onDrop: (S) => h(S, 0),
6221
+ onDrop: (S) => p(S, 0),
6221
6222
  onDragEnd: () => l(!1),
6222
6223
  className: "w-full h-full flex items-center justify-center text-gray-400 min-h-[200px] p-10 col-span-2 border border-dashed border-gray-300 rounded-lg",
6223
6224
  children: "Drag or click an element to display"
@@ -6251,7 +6252,7 @@ const Rs = An(ws), Ds = T.object({
6251
6252
  {
6252
6253
  onClick: e,
6253
6254
  className: "absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",
6254
- children: /* @__PURE__ */ n.jsx(U, { icon: "tabler:x" })
6255
+ children: /* @__PURE__ */ n.jsx(W, { icon: "tabler:x" })
6255
6256
  }
6256
6257
  )
6257
6258
  ] }),
@@ -6312,21 +6313,21 @@ const Rs = An(ws), Ds = T.object({
6312
6313
  setActiveSections: g
6313
6314
  } = vi(ui);
6314
6315
  R(() => {
6315
- var p;
6316
- u(((p = d[0]) == null ? void 0 : p.id) || null);
6316
+ var h;
6317
+ u(((h = d[0]) == null ? void 0 : h.id) || null);
6317
6318
  }, []);
6318
- const r = J((p) => {
6319
- p.preventDefault(), p.dataTransfer.dropEffect = "move", s.current && (s.current.scrollTop = s.current.scrollHeight);
6319
+ const r = J((h) => {
6320
+ h.preventDefault(), h.dataTransfer.dropEffect = "move", s.current && (s.current.scrollTop = s.current.scrollHeight);
6320
6321
  }, []);
6321
- function v(p) {
6322
- t.includes(p) ? g(
6323
- (f) => f.filter((A) => A !== p)
6324
- ) : g((f) => [...f, p]);
6322
+ function v(h) {
6323
+ t.includes(h) ? g(
6324
+ (f) => f.filter((A) => A !== h)
6325
+ ) : g((f) => [...f, h]);
6325
6326
  }
6326
- function y(p) {
6327
- o.current = p, e(!0);
6327
+ function y(h) {
6328
+ o.current = h, e(!0);
6328
6329
  }
6329
- const h = ti("config");
6330
+ const p = ti("config");
6330
6331
  return /* @__PURE__ */ n.jsxs(
6331
6332
  "div",
6332
6333
  {
@@ -6343,7 +6344,7 @@ const Rs = An(ws), Ds = T.object({
6343
6344
  ),
6344
6345
  /* @__PURE__ */ n.jsxs("div", { className: "relative flex flex-col flex-1 w-full py-4 gap-y-6", children: [
6345
6346
  d.map(
6346
- (p, f) => /* @__PURE__ */ n.jsx(
6347
+ (h, f) => /* @__PURE__ */ n.jsx(
6347
6348
  "div",
6348
6349
  {
6349
6350
  className: "bg-white group cursor-pointer rounded ",
@@ -6351,15 +6352,15 @@ const Rs = An(ws), Ds = T.object({
6351
6352
  "div",
6352
6353
  {
6353
6354
  className: `border border-gray-100 rounded px-4 shadow-[rgba(149,157,165,0.2)_0px_2px_4px] transition-colors duration-200
6354
- ${m === p.id ? "border-dashed border-blue-400 bg-[#f7f8fa]" : ""} ${t.includes(f) ? "min-h-[300px] pb-6 " : ""}`,
6355
+ ${m === h.id ? "border-dashed border-blue-400 bg-[#f7f8fa]" : ""} ${t.includes(f) ? "min-h-[300px] pb-6 " : ""}`,
6355
6356
  children: [
6356
6357
  /* @__PURE__ */ n.jsxs("div", { className: "flex items-center justify-between", children: [
6357
6358
  /* @__PURE__ */ n.jsx(
6358
6359
  "div",
6359
6360
  {
6360
- onClick: () => u(p.id),
6361
+ onClick: () => u(h.id),
6361
6362
  className: "flex-1 h-full py-4 cursor-pointer",
6362
- children: /* @__PURE__ */ n.jsx("h2", { className: "font-medium", children: p.title || "Section title" })
6363
+ children: /* @__PURE__ */ n.jsx("h2", { className: "font-medium", children: h.title || "Section title" })
6363
6364
  }
6364
6365
  ),
6365
6366
  /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
@@ -6368,8 +6369,8 @@ const Rs = An(ws), Ds = T.object({
6368
6369
  {
6369
6370
  type: "button",
6370
6371
  className: "p-1 text-xs border rounded-lg",
6371
- onClick: () => y(p),
6372
- children: /* @__PURE__ */ n.jsx(U, { icon: "fluent:edit-28-regular" })
6372
+ onClick: () => y(h),
6373
+ children: /* @__PURE__ */ n.jsx(W, { icon: "fluent:edit-28-regular" })
6373
6374
  }
6374
6375
  ),
6375
6376
  d.length > 1 && /* @__PURE__ */ n.jsx(
@@ -6377,8 +6378,8 @@ const Rs = An(ws), Ds = T.object({
6377
6378
  {
6378
6379
  type: "button",
6379
6380
  className: "p-1 text-xs border rounded-lg",
6380
- onClick: () => a(p.id),
6381
- children: /* @__PURE__ */ n.jsx(U, { icon: "lets-icons:trash-duotone-line" })
6381
+ onClick: () => a(h.id),
6382
+ children: /* @__PURE__ */ n.jsx(W, { icon: "lets-icons:trash-duotone-line" })
6382
6383
  }
6383
6384
  ),
6384
6385
  /* @__PURE__ */ n.jsx(
@@ -6388,7 +6389,7 @@ const Rs = An(ws), Ds = T.object({
6388
6389
  className: "p-1 text-xs rounded-lg",
6389
6390
  onClick: () => v(f),
6390
6391
  children: /* @__PURE__ */ n.jsx(
6391
- U,
6392
+ W,
6392
6393
  {
6393
6394
  icon: t.includes(f) ? "fa6-solid:chevron-up" : "fa6-solid:chevron-down",
6394
6395
  iconClass: "text-base"
@@ -6398,22 +6399,22 @@ const Rs = An(ws), Ds = T.object({
6398
6399
  )
6399
6400
  ] })
6400
6401
  ] }),
6401
- (p == null ? void 0 : p.description) && t.includes(f) && /* @__PURE__ */ n.jsx("p", { className: "mt-2 text-sm text-gray-600 text-gray-60", children: p == null ? void 0 : p.description }),
6402
+ (h == null ? void 0 : h.description) && t.includes(f) && /* @__PURE__ */ n.jsx("p", { className: "mt-2 text-sm text-gray-600 text-gray-60", children: h == null ? void 0 : h.description }),
6402
6403
  t.includes(f) && /* @__PURE__ */ n.jsxs(
6403
6404
  "div",
6404
6405
  {
6405
6406
  className: "h-full mt-4 transition-all duration-200",
6406
- id: p.id,
6407
+ id: h.id,
6407
6408
  onDragOver: r,
6408
6409
  onDragEnd: () => c(!1),
6409
- onClick: () => u(p.id),
6410
+ onClick: () => u(h.id),
6410
6411
  children: [
6411
6412
  /* @__PURE__ */ n.jsx("hr", { className: "group-last:hidden" }),
6412
6413
  /* @__PURE__ */ n.jsx("div", { className: "h-full mt-4 gap-y-6", children: /* @__PURE__ */ n.jsx(
6413
6414
  Rs,
6414
6415
  {
6415
- elementData: p.questionData,
6416
- sectionId: p.id
6416
+ elementData: h.questionData,
6417
+ sectionId: h.id
6417
6418
  }
6418
6419
  ) })
6419
6420
  ]
@@ -6423,7 +6424,7 @@ const Rs = An(ws), Ds = T.object({
6423
6424
  }
6424
6425
  )
6425
6426
  },
6426
- p.id
6427
+ h.id
6427
6428
  )
6428
6429
  ),
6429
6430
  /* @__PURE__ */ n.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ n.jsxs(
@@ -6431,7 +6432,7 @@ const Rs = An(ws), Ds = T.object({
6431
6432
  {
6432
6433
  type: "button",
6433
6434
  onClick: () => l(),
6434
- style: { color: (h == null ? void 0 : h.buttonColor) || "#333" },
6435
+ style: { color: (p == null ? void 0 : p.buttonColor) || "#333" },
6435
6436
  className: "text-sm font-medium",
6436
6437
  children: [
6437
6438
  "+ Add section",
@@ -6512,13 +6513,13 @@ const Gs = [
6512
6513
  title: v.title,
6513
6514
  elements: g.filter(
6514
6515
  (y) => {
6515
- var h;
6516
- return (h = za[v.key]) == null ? void 0 : h.includes(y.type);
6516
+ var p;
6517
+ return (p = za[v.key]) == null ? void 0 : p.includes(y.type);
6517
6518
  }
6518
6519
  )
6519
6520
  })).filter((v) => v.elements.length > 0);
6520
6521
  return /* @__PURE__ */ n.jsxs("div", { className: "pt-4 pb-6", children: [
6521
- /* @__PURE__ */ n.jsx(he, {}),
6522
+ /* @__PURE__ */ n.jsx(pe, {}),
6522
6523
  /* @__PURE__ */ n.jsx("div", { className: "px-5 mb-4", children: /* @__PURE__ */ n.jsx(
6523
6524
  "input",
6524
6525
  {
@@ -6531,12 +6532,12 @@ const Gs = [
6531
6532
  /* @__PURE__ */ n.jsx("hr", {}),
6532
6533
  /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("ul", { className: "grid gap-y-5 mt-3 px-5 max-h-[80vh] overflow-y-auto no-scrollbar", children: r.map((v, y) => /* @__PURE__ */ n.jsxs("li", { children: [
6533
6534
  /* @__PURE__ */ n.jsx("h4", { className: "mb-2 text-[11px] font-bold text-gray-500 uppercase", children: v.title }),
6534
- /* @__PURE__ */ n.jsx("ul", { className: "grid gap-y-[6px] mb-3", children: v.elements.map((h) => /* @__PURE__ */ n.jsx(
6535
+ /* @__PURE__ */ n.jsx("ul", { className: "grid gap-y-[6px] mb-3", children: v.elements.map((p) => /* @__PURE__ */ n.jsx(
6535
6536
  "li",
6536
6537
  {
6537
- onDragStart: (p) => l(p, h),
6538
+ onDragStart: (h) => l(h, p),
6538
6539
  onDragEnd: () => o(!1),
6539
- onClick: () => d(h),
6540
+ onClick: () => d(p),
6540
6541
  style: {
6541
6542
  borderColor: t,
6542
6543
  backgroundColor: m
@@ -6547,18 +6548,18 @@ const Gs = [
6547
6548
  active:opacity-50 element_class`,
6548
6549
  draggable: !0,
6549
6550
  children: /* @__PURE__ */ n.jsxs("span", { className: "flex flex-row-reverse items-center justify-between w-full gap-x-3", children: [
6550
- /* @__PURE__ */ n.jsx("span", { style: { color: u }, children: /* @__PURE__ */ n.jsx(U, { icon: h.icon, iconClass: "w-4 h-4" }) }),
6551
+ /* @__PURE__ */ n.jsx("span", { style: { color: u }, children: /* @__PURE__ */ n.jsx(W, { icon: p.icon, iconClass: "w-4 h-4" }) }),
6551
6552
  /* @__PURE__ */ n.jsx(
6552
6553
  "span",
6553
6554
  {
6554
6555
  style: { color: u },
6555
6556
  className: "text-sm font-medium leading-[0]",
6556
- children: h.label
6557
+ children: p.label
6557
6558
  }
6558
6559
  )
6559
6560
  ] })
6560
6561
  },
6561
- h.type
6562
+ p.type
6562
6563
  )) })
6563
6564
  ] }, y)) }) })
6564
6565
  ] });
@@ -6577,7 +6578,7 @@ const Gs = [
6577
6578
  style: g,
6578
6579
  onClick: r
6579
6580
  }) => {
6580
- const v = W(
6581
+ const v = U(
6581
6582
  "btn inline-flex justify-center",
6582
6583
  {
6583
6584
  "pointer-events-none": o,
@@ -6617,9 +6618,9 @@ const Gs = [
6617
6618
  ),
6618
6619
  "Submitting..."
6619
6620
  ] }) : /* @__PURE__ */ n.jsxs("span", { className: "flex items-center", children: [
6620
- a && l === "left" && /* @__PURE__ */ n.jsx("span", { className: `mr-[6px] ${d}`, children: /* @__PURE__ */ n.jsx(U, { icon: a }) }),
6621
+ a && l === "left" && /* @__PURE__ */ n.jsx("span", { className: `mr-[6px] ${d}`, children: /* @__PURE__ */ n.jsx(W, { icon: a }) }),
6621
6622
  i && /* @__PURE__ */ n.jsx("span", { children: i }),
6622
- a && l === "right" && /* @__PURE__ */ n.jsx("span", { className: `ml-[6px] ${d}`, children: /* @__PURE__ */ n.jsx(U, { icon: a }) })
6623
+ a && l === "right" && /* @__PURE__ */ n.jsx("span", { className: `ml-[6px] ${d}`, children: /* @__PURE__ */ n.jsx(W, { icon: a }) })
6623
6624
  ] });
6624
6625
  return m ? /* @__PURE__ */ n.jsx("div", { className: v, children: y() }) : u ? /* @__PURE__ */ n.jsx(Ao, { to: u, className: v, children: y() }) : /* @__PURE__ */ n.jsx(
6625
6626
  "button",
@@ -6737,8 +6738,8 @@ function zs({
6737
6738
  publishLoading: d,
6738
6739
  onTitleChange: c
6739
6740
  }) {
6740
- const { formData: u } = vi(ui), [m, t] = L(!1), [g, r] = L(!1), [v, y] = L(i || ""), h = ti("config");
6741
- function p() {
6741
+ const { formData: u } = vi(ui), [m, t] = L(!1), [g, r] = L(!1), [v, y] = L(i || ""), p = ti("config");
6742
+ function h() {
6742
6743
  localStorage.setItem("formData", JSON.stringify(u)), o == null || o(u);
6743
6744
  }
6744
6745
  function f() {
@@ -6754,7 +6755,7 @@ function zs({
6754
6755
  {
6755
6756
  type: "button",
6756
6757
  onClick: () => e(),
6757
- style: { color: (h == null ? void 0 : h.buttonColor) || "#333" },
6758
+ style: { color: (p == null ? void 0 : p.buttonColor) || "#333" },
6758
6759
  className: "flex items-center gap-x-3",
6759
6760
  children: /* @__PURE__ */ n.jsx(Us, {})
6760
6761
  }
@@ -6797,7 +6798,7 @@ function zs({
6797
6798
  btnClass: "px-2 bg-transparent font-medium text-sm form_preview",
6798
6799
  icon: "solar:eye-bold-duotone",
6799
6800
  iconClass: "text-base",
6800
- style: { color: (h == null ? void 0 : h.buttonColor) || "#333" },
6801
+ style: { color: (p == null ? void 0 : p.buttonColor) || "#333" },
6801
6802
  isDisabled: a,
6802
6803
  isLoading: a
6803
6804
  }
@@ -6805,12 +6806,12 @@ function zs({
6805
6806
  /* @__PURE__ */ n.jsx(
6806
6807
  ji,
6807
6808
  {
6808
- onClick: p,
6809
+ onClick: h,
6809
6810
  text: "Save",
6810
6811
  btnClass: "px-2 bg-transparent font-medium text-sm form_save__btn",
6811
6812
  icon: "lets-icons:save-duotone",
6812
6813
  iconClass: "text-base",
6813
- style: { color: (h == null ? void 0 : h.buttonColor) || "#333" },
6814
+ style: { color: (p == null ? void 0 : p.buttonColor) || "#333" },
6814
6815
  isDisabled: l,
6815
6816
  isLoading: l
6816
6817
  }
@@ -6820,7 +6821,7 @@ function zs({
6820
6821
  {
6821
6822
  onClick: f,
6822
6823
  text: "Publish",
6823
- style: { background: (h == null ? void 0 : h.buttonColor) || "#333" },
6824
+ style: { background: (p == null ? void 0 : p.buttonColor) || "#333" },
6824
6825
  btnClass: "border-[#98A2B3] font-medium text-sm py-[8px] px-6 text-white rounded-lg form_publish__btn",
6825
6826
  isDisabled: d,
6826
6827
  isLoading: d
@@ -6830,7 +6831,7 @@ function zs({
6830
6831
  ] });
6831
6832
  }
6832
6833
  const Ke = ({ loadingClass: i }) => {
6833
- const e = W(
6834
+ const e = U(
6834
6835
  "h-full w-full min-h-[300px] flex justify-center items-center",
6835
6836
  i
6836
6837
  );
@@ -6853,7 +6854,7 @@ function Js({
6853
6854
  uploadUrl: t
6854
6855
  }) {
6855
6856
  return /* @__PURE__ */ n.jsx(ge, { children: /* @__PURE__ */ n.jsxs("div", { className: "w-full h-full bg-[#F8F9FC] flex flex-col", children: [
6856
- /* @__PURE__ */ n.jsx(he, {}),
6857
+ /* @__PURE__ */ n.jsx(pe, {}),
6857
6858
  /* @__PURE__ */ n.jsx("div", { className: "border-b bg-white border-[#E4E7EC]", children: /* @__PURE__ */ n.jsx(
6858
6859
  zs,
6859
6860
  {
@@ -6873,7 +6874,7 @@ function Js({
6873
6874
  ] })
6874
6875
  ] }) });
6875
6876
  }
6876
- const pl = ({
6877
+ const hl = ({
6877
6878
  onSubmit: i,
6878
6879
  questionData: e,
6879
6880
  isReadOnly: o,
@@ -6971,6 +6972,7 @@ const qi = (i, e) => {
6971
6972
  () => (i == null ? void 0 : i.visibilityDependentFields) || [],
6972
6973
  [i]
6973
6974
  ), d = Y(() => l.length ? l.every((c) => {
6975
+ if (!i.isHidden) return !0;
6974
6976
  const u = s == null ? void 0 : s[c.id], m = c.fieldValue, t = u;
6975
6977
  switch (c.operator) {
6976
6978
  case "equals":
@@ -6988,7 +6990,7 @@ const qi = (i, e) => {
6988
6990
  default:
6989
6991
  return !0;
6990
6992
  }
6991
- }) : !0, [l, s]);
6993
+ }) : !0, [l, s, i]);
6992
6994
  return o ? /* @__PURE__ */ n.jsxs("div", { className: d ? "" : "invisible h-0", children: [
6993
6995
  i.inputLabel && /* @__PURE__ */ n.jsxs("label", { className: "block text-sm font-medium mb-1.5 input_label", children: [
6994
6996
  i.inputLabel,
@@ -7034,7 +7036,7 @@ function Xs({ form_data: i, options: e }) {
7034
7036
  return /* @__PURE__ */ n.jsxs(
7035
7037
  "div",
7036
7038
  {
7037
- className: W("group relative grid gap-y-[6px]", a.elementClass),
7039
+ className: U("group relative grid gap-y-[6px]", a.elementClass),
7038
7040
  children: [
7039
7041
  qi(a, $i(a, e)),
7040
7042
  ((d = (l = e == null ? void 0 : e.errors) == null ? void 0 : l[a.id]) == null ? void 0 : d.message) && /* @__PURE__ */ n.jsx("div", { className: "mt-1 text-xs text-red-600", children: e.errors[a.id].message })
@@ -7092,7 +7094,7 @@ function il({ form_data: i, options: e, current: o }) {
7092
7094
  return a.gridId ? null : /* @__PURE__ */ n.jsxs(
7093
7095
  "div",
7094
7096
  {
7095
- className: W(
7097
+ className: U(
7096
7098
  "group relative grid gap-y-[6px]",
7097
7099
  a.elementClass
7098
7100
  ),
@@ -7117,12 +7119,12 @@ const nl = ({
7117
7119
  hideFooter: u = !1,
7118
7120
  uploadUrl: m
7119
7121
  }) => {
7120
- var hi, gi, fi, yi, Ai, Si, H, _;
7121
- const { setAnswerData: t, setUploadUrl: g } = vi(ui), [r, v] = L(0), y = (hi = i == null ? void 0 : i.length) != null ? hi : 0, h = ti("config"), p = Y(
7122
+ var pi, gi, fi, yi, Ai, Si, H, _;
7123
+ const { setAnswerData: t, setUploadUrl: g } = vi(ui), [r, v] = L(0), y = (pi = i == null ? void 0 : i.length) != null ? pi : 0, p = ti("config"), h = Y(
7122
7124
  () => $s(i),
7123
7125
  [i]
7124
7126
  ), f = Sn({
7125
- resolver: Tn(p),
7127
+ resolver: Tn(h),
7126
7128
  mode: "onSubmit",
7127
7129
  defaultValues: {}
7128
7130
  }), {
@@ -7135,7 +7137,7 @@ const nl = ({
7135
7137
  watch: D,
7136
7138
  formState: { errors: Q, isSubmitting: P },
7137
7139
  trigger: K
7138
- } = f, B = ho({ control: k }), E = Y(
7140
+ } = f, B = po({ control: k }), E = Y(
7139
7141
  () => B,
7140
7142
  [JSON.stringify(B)]
7141
7143
  ), I = J(
@@ -7149,11 +7151,11 @@ const nl = ({
7149
7151
  }, [g, m]), R(() => {
7150
7152
  if (!(i != null && i.length) || !a) return;
7151
7153
  const X = i.flatMap(
7152
- (ni) => ni.questionData.map((ei) => ({
7153
- id: ei.id,
7154
- value: E[ei.id],
7155
- sectionId: ni.id,
7156
- type: ei.type
7154
+ (ii) => ii.questionData.map((ni) => ({
7155
+ id: ni.id,
7156
+ value: E[ni.id],
7157
+ sectionId: ii.id,
7158
+ type: ni.type
7157
7159
  }))
7158
7160
  );
7159
7161
  I(X), t(E);
@@ -7162,27 +7164,27 @@ const nl = ({
7162
7164
  }, [e, x]);
7163
7165
  const $ = J(
7164
7166
  (X) => {
7165
- const ni = i.flatMap(
7166
- (ei) => ei.questionData.map((ri) => ({
7167
+ const ii = i.flatMap(
7168
+ (ni) => ni.questionData.map((ri) => ({
7167
7169
  id: ri.id,
7168
7170
  value: X[ri.id],
7169
- sectionId: ei.id,
7171
+ sectionId: ni.id,
7170
7172
  type: ri.type
7171
7173
  }))
7172
7174
  );
7173
- s == null || s(ni);
7175
+ s == null || s(ii);
7174
7176
  },
7175
7177
  [i, s]
7176
7178
  ), li = J(async () => {
7177
- var X, ni;
7179
+ var X, ii;
7178
7180
  if (!o) {
7179
- const ei = (ni = (X = i == null ? void 0 : i[r]) == null ? void 0 : X.questionData) == null ? void 0 : ni.map(
7181
+ const ni = (ii = (X = i == null ? void 0 : i[r]) == null ? void 0 : X.questionData) == null ? void 0 : ii.map(
7180
7182
  (nn) => nn.id
7181
7183
  );
7182
- if (!await K(ei)) return;
7184
+ if (!await K(ni)) return;
7183
7185
  }
7184
- v((ei) => ei + 1);
7185
- }, [r, i, o, K]), pi = J(() => {
7186
+ v((ni) => ni + 1);
7187
+ }, [r, i, o, K]), hi = J(() => {
7186
7188
  v((X) => X - 1);
7187
7189
  }, []), F = Y(
7188
7190
  () => ({
@@ -7232,7 +7234,7 @@ const nl = ({
7232
7234
  {
7233
7235
  type: "button",
7234
7236
  text: "Back",
7235
- onClick: pi,
7237
+ onClick: hi,
7236
7238
  btnClass: "text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-gray-200 rounded-lg"
7237
7239
  }
7238
7240
  ),
@@ -7242,7 +7244,7 @@ const nl = ({
7242
7244
  type: "button",
7243
7245
  text: "Continue",
7244
7246
  onClick: li,
7245
- style: { background: (h == null ? void 0 : h.buttonColor) || "#333" },
7247
+ style: { background: (p == null ? void 0 : p.buttonColor) || "#333" },
7246
7248
  btnClass: "text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg continue_btn"
7247
7249
  }
7248
7250
  ) : !o && (c != null ? c : /* @__PURE__ */ n.jsx(
@@ -7252,7 +7254,7 @@ const nl = ({
7252
7254
  isLoading: P,
7253
7255
  type: "submit",
7254
7256
  text: "Submit",
7255
- style: { background: (h == null ? void 0 : h.buttonColor) || "#333" },
7257
+ style: { background: (p == null ? void 0 : p.buttonColor) || "#333" },
7256
7258
  btnClass: "text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg submit_btn"
7257
7259
  }
7258
7260
  ))
@@ -7263,7 +7265,7 @@ const nl = ({
7263
7265
  isLoading: P,
7264
7266
  type: "submit",
7265
7267
  text: "Submit",
7266
- style: { background: (h == null ? void 0 : h.buttonColor) || "#333" },
7268
+ style: { background: (p == null ? void 0 : p.buttonColor) || "#333" },
7267
7269
  btnClass: "text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg submit_btn"
7268
7270
  }
7269
7271
  )) })
@@ -7314,6 +7316,6 @@ function ol({
7314
7316
  ] }) : /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("p", { className: "p-6 text-sm text-gray-400", children: "Error: No form data available." }) });
7315
7317
  }
7316
7318
  export {
7317
- pl as FormBuilder,
7319
+ hl as FormBuilder,
7318
7320
  ol as FormViewer
7319
7321
  };