@arudovwen/form-builder-react 1.5.7 → 1.5.8

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,9 +1,9 @@
1
- import { jsx as n, Fragment as ti, jsxs as b } from "react/jsx-runtime";
2
- import si, { createContext as ae, useState as P, useMemo as $, useEffect as R, forwardRef as In, createElement as _i, Fragment as wi, useContext as mi, useRef as hi, useCallback as Z, memo as Oi } from "react";
1
+ import { jsx as n, Fragment as ti, jsxs as v } from "react/jsx-runtime";
2
+ import si, { createContext as ae, useState as P, useMemo as $, useEffect as I, forwardRef as In, createElement as _i, Fragment as wi, useContext as bi, useRef as mi, useCallback as Z, memo as Oi } from "react";
3
3
  import { v4 as ri } from "uuid";
4
4
  import se from "react-datepicker";
5
5
  import { Listbox as ii, Transition as yi, Combobox as Ai, ComboboxInput as le, ComboboxButton as de, ComboboxOptions as ue, ComboboxOption as ce } from "@headlessui/react";
6
- import { toast as vi, Toaster as Dn } from "sonner";
6
+ import { toast as hi, Toaster as Dn } from "sonner";
7
7
  import xi from "axios";
8
8
  import Gi from "react-currency-input-field";
9
9
  import { createPortal as te } from "react-dom";
@@ -21,73 +21,73 @@ const ci = ae(void 0), gn = {
21
21
  disabled: !1,
22
22
  isHidden: !1
23
23
  }, Kn = ({ children: i }) => {
24
- const [e, o] = P(!0), [s, a] = P({}), [l, d] = P({}), [u, c] = P([gn]), [r, t] = P(!1), [h, m] = P(null), [v, f] = P([
24
+ const [e, o] = P(!0), [s, a] = P({}), [l, d] = P({}), [u, c] = P([gn]), [r, t] = P(!1), [h, m] = P(null), [b, f] = P([
25
25
  0
26
26
  ]), [y, g] = P(""), p = si.useCallback(() => {
27
- }, []), S = si.useCallback(() => {
27
+ }, []), A = si.useCallback(() => {
28
28
  const K = ri();
29
- c((O) => [...O, { ...gn, id: K }]), m(K), f([u.length]);
29
+ c((G) => [...G, { ...gn, id: K }]), m(K), f([u.length]);
30
30
  }, [u]), C = si.useCallback((K) => {
31
31
  c(
32
- (O) => O.filter((D) => D.id !== K)
32
+ (G) => G.filter((D) => D.id !== K)
33
33
  ), m(null);
34
34
  }, []), x = si.useCallback(
35
- (K, O) => {
36
- const D = u.find((B) => B.id === O), E = D == null ? void 0 : D.questionData.find(
35
+ (K, G) => {
36
+ const D = u.find((B) => B.id === G), E = D == null ? void 0 : D.questionData.find(
37
37
  (B) => B.id === K
38
38
  );
39
39
  E && c(
40
40
  (B) => B == null ? void 0 : B.map(
41
- (L) => L.id === O ? {
41
+ (L) => L.id === G ? {
42
42
  ...L,
43
- questionData: L.questionData.filter((z) => E.type === "grid" ? z.gridId !== E.id && z.id !== E.id : z.id !== K)
43
+ questionData: L.questionData.filter((J) => E.type === "grid" ? J.gridId !== E.id && J.id !== E.id : J.id !== K)
44
44
  } : L
45
45
  )
46
46
  );
47
47
  },
48
48
  [u, c]
49
49
  ), k = si.useCallback(
50
- (K, O) => {
51
- const D = u.find((z) => z.id === O);
50
+ (K, G) => {
51
+ const D = u.find((J) => J.id === G);
52
52
  if (!D) return;
53
53
  const E = D.questionData.findIndex(
54
- (z) => z.id === K
54
+ (J) => J.id === K
55
55
  );
56
56
  if (E === -1) return;
57
- const B = D.questionData[E], L = (z, ai = {}) => ({
58
- ...JSON.parse(JSON.stringify(z)),
57
+ const B = D.questionData[E], L = (J, ai = {}) => ({
58
+ ...JSON.parse(JSON.stringify(J)),
59
59
  id: ri(),
60
60
  ...ai
61
61
  });
62
62
  c(
63
- (z) => z == null ? void 0 : z.map((ai) => {
63
+ (J) => J == null ? void 0 : J.map((ai) => {
64
64
  var ni;
65
- if (ai.id !== O) return ai;
65
+ if (ai.id !== G) return ai;
66
66
  const _ = [...ai.questionData];
67
67
  if (B.type === "grid") {
68
68
  const ui = (ni = _ == null ? void 0 : _.map((X, oi) => ({ e: X, i: oi })).filter(
69
69
  ({ e: X }) => X.id === B.id || X.gridId === B.id
70
- )) == null ? void 0 : ni.map(({ i: X }) => X), li = ui.length ? Math.max(...ui) + 1 : E + 1, I = ri(), J = L(B, {});
71
- J.id = I;
72
- const j = _.filter((X) => X.gridId === B.id), G = j == null ? void 0 : j.map(
73
- (X) => L(X, { gridId: I })
70
+ )) == null ? void 0 : ni.map(({ i: X }) => X), li = ui.length ? Math.max(...ui) + 1 : E + 1, R = ri(), F = L(B, {});
71
+ F.id = R;
72
+ const j = _.filter((X) => X.gridId === B.id), H = j == null ? void 0 : j.map(
73
+ (X) => L(X, { gridId: R })
74
74
  ), V = [
75
75
  ..._.slice(0, li),
76
- J,
77
- ...G,
76
+ F,
77
+ ...H,
78
78
  ..._.slice(li)
79
79
  ];
80
80
  return { ...ai, questionData: V };
81
81
  } else if (B.gridId) {
82
- const { gridId: ui, gridPosition: li, ...I } = B, J = L(I, {}), j = _.reduce(
82
+ const { gridId: ui, gridPosition: li, ...R } = B, F = L(R, {}), j = _.reduce(
83
83
  (V, X, oi) => X.id === B.gridId || X.gridId === B.gridId ? oi : V,
84
84
  E
85
- ), G = [
85
+ ), H = [
86
86
  ..._.slice(0, j + 1),
87
- J,
87
+ F,
88
88
  ..._.slice(j + 1)
89
89
  ];
90
- return { ...ai, questionData: G };
90
+ return { ...ai, questionData: H };
91
91
  } else {
92
92
  const ui = L(B, {}), li = [
93
93
  ..._.slice(0, E + 1),
@@ -100,29 +100,29 @@ const ci = ae(void 0), gn = {
100
100
  );
101
101
  },
102
102
  [u, c]
103
- ), A = si.useCallback(
104
- (K, O) => {
103
+ ), S = si.useCallback(
104
+ (K, G) => {
105
105
  c(
106
106
  (D) => D == null ? void 0 : D.map(
107
- (E) => E.id === O ? { ...E, questionData: K } : E
107
+ (E) => E.id === G ? { ...E, questionData: K } : E
108
108
  )
109
109
  );
110
110
  },
111
111
  []
112
- ), N = si.useCallback((K, O) => {
112
+ ), N = si.useCallback((K, G) => {
113
113
  c(
114
114
  (D) => D == null ? void 0 : D.map(
115
- (E) => E.id === O ? {
115
+ (E) => E.id === G ? {
116
116
  ...E,
117
117
  questionData: [...E.questionData, K]
118
118
  } : E
119
119
  )
120
120
  );
121
121
  }, []), T = si.useCallback(
122
- (K, O, D) => {
122
+ (K, G, D) => {
123
123
  c(
124
124
  (E) => E == null ? void 0 : E.map(
125
- (B) => B.id === O ? {
125
+ (B) => B.id === G ? {
126
126
  ...B,
127
127
  questionData: [
128
128
  ...B.questionData.slice(0, D),
@@ -135,7 +135,7 @@ const ci = ae(void 0), gn = {
135
135
  },
136
136
  []
137
137
  ), Q = si.useCallback(
138
- (K, O, D) => {
138
+ (K, G, D) => {
139
139
  c(
140
140
  (E) => E == null ? void 0 : E.map(
141
141
  (B) => {
@@ -143,19 +143,19 @@ const ci = ae(void 0), gn = {
143
143
  return B.id === D ? {
144
144
  ...B,
145
145
  questionData: (L = B.questionData) == null ? void 0 : L.map(
146
- (z) => {
146
+ (J) => {
147
147
  var ai;
148
- return z.type === "grid" && z.gridData ? {
149
- ...z,
150
- gridData: (ai = z.gridData) == null ? void 0 : ai.map(
148
+ return J.type === "grid" && J.gridData ? {
149
+ ...J,
150
+ gridData: (ai = J.gridData) == null ? void 0 : ai.map(
151
151
  (_, ni) => ni === K ? {
152
152
  ..._,
153
- ...O
153
+ ...G
154
154
  } : _
155
155
  ).concat(
156
- K >= z.gridData.length ? { ...O } : []
156
+ K >= J.gridData.length ? { ...G } : []
157
157
  )
158
- } : z;
158
+ } : J;
159
159
  }
160
160
  )
161
161
  } : B;
@@ -164,12 +164,12 @@ const ci = ae(void 0), gn = {
164
164
  );
165
165
  },
166
166
  []
167
- ), U = si.useCallback((K, O) => {
167
+ ), z = si.useCallback((K, G) => {
168
168
  c(
169
169
  (D) => D == null ? void 0 : D.map(
170
170
  (E) => {
171
171
  var B;
172
- return E.id === O ? {
172
+ return E.id === G ? {
173
173
  ...E,
174
174
  questionData: (B = E.questionData) == null ? void 0 : B.map(
175
175
  (L) => L.id === K.id ? { ...L, ...K } : L
@@ -181,64 +181,64 @@ const ci = ae(void 0), gn = {
181
181
  }, []), q = si.useCallback(
182
182
  (K) => {
183
183
  const {
184
- draggedId: O,
184
+ draggedId: G,
185
185
  sectionId: D,
186
186
  targetIndex: E,
187
187
  targetId: B,
188
188
  targetGridId: L,
189
- targetCol: z
189
+ targetCol: J
190
190
  } = K;
191
191
  c(
192
192
  (ai) => ai.map((_) => {
193
193
  if (_.id !== D) return _;
194
- const ni = [..._.questionData], ui = ni.findIndex((I) => I.id === O);
194
+ const ni = [..._.questionData], ui = ni.findIndex((R) => R.id === G);
195
195
  if (ui === -1) return _;
196
196
  const li = { ...ni[ui] };
197
- if (L !== void 0 && z !== void 0) {
197
+ if (L !== void 0 && J !== void 0) {
198
198
  if (li.type === "grid") return _;
199
- const I = ni.findIndex(
199
+ const R = ni.findIndex(
200
200
  (j) => {
201
- var G;
202
- return j.id !== O && j.gridId === L && ((G = j.gridPosition) == null ? void 0 : G.col) === z;
201
+ var H;
202
+ return j.id !== G && j.gridId === L && ((H = j.gridPosition) == null ? void 0 : H.col) === J;
203
203
  }
204
204
  );
205
- let J = ni.map(
206
- (j) => j.id === O ? {
205
+ let F = ni.map(
206
+ (j) => j.id === G ? {
207
207
  ...j,
208
208
  gridId: L,
209
- gridPosition: { col: z }
209
+ gridPosition: { col: J }
210
210
  } : j
211
211
  );
212
- return I !== -1 && (J = J.map((j, G) => {
213
- if (G !== I) return j;
212
+ return R !== -1 && (F = F.map((j, H) => {
213
+ if (H !== R) return j;
214
214
  const V = { ...j };
215
215
  return delete V.gridId, delete V.gridPosition, V;
216
- })), { ..._, questionData: J };
216
+ })), { ..._, questionData: F };
217
217
  }
218
218
  if (li.gridId && E !== void 0 && L === void 0) {
219
- const I = { ...li };
220
- delete I.gridId, delete I.gridPosition;
221
- const J = ni.filter((G) => G.id !== O), j = Math.min(E, J.length);
222
- return J.splice(j, 0, I), { ..._, questionData: J };
219
+ const R = { ...li };
220
+ delete R.gridId, delete R.gridPosition;
221
+ const F = ni.filter((H) => H.id !== G), j = Math.min(E, F.length);
222
+ return F.splice(j, 0, R), { ..._, questionData: F };
223
223
  }
224
224
  if (!li.gridId && E !== void 0 && L === void 0 && !B) {
225
225
  ni.splice(ui, 1);
226
- const I = Math.min(E, ni.length);
227
- return ni.splice(I, 0, li), { ..._, questionData: ni };
226
+ const R = Math.min(E, ni.length);
227
+ return ni.splice(R, 0, li), { ..._, questionData: ni };
228
228
  }
229
229
  if (B) {
230
- const I = ni.findIndex((J) => J.id === B);
231
- return I === -1 ? _ : (ni.splice(ui, 1), ni.splice(I, 0, li), { ..._, questionData: ni });
230
+ const R = ni.findIndex((F) => F.id === B);
231
+ return R === -1 ? _ : (ni.splice(ui, 1), ni.splice(R, 0, li), { ..._, questionData: ni });
232
232
  }
233
233
  return _;
234
234
  })
235
235
  );
236
236
  },
237
237
  []
238
- ), w = si.useCallback((K, O) => {
238
+ ), w = si.useCallback((K, G) => {
239
239
  c(
240
240
  (D) => D == null ? void 0 : D.map(
241
- (E) => E.id === O ? {
241
+ (E) => E.id === G ? {
242
242
  ...E,
243
243
  ...K
244
244
  } : E
@@ -252,18 +252,18 @@ const ci = ae(void 0), gn = {
252
252
  removeElement: x,
253
253
  elementData: l,
254
254
  setElementData: d,
255
- updateElementPosition: A,
255
+ updateElementPosition: S,
256
256
  addElement: N,
257
257
  addElementInPosition: T,
258
- updateElement: U,
259
- addSection: S,
258
+ updateElement: z,
259
+ addSection: A,
260
260
  removeSection: C,
261
261
  updateSection: w,
262
262
  isDragging: r,
263
263
  setIsDragging: t,
264
264
  selectedSection: h,
265
265
  setSelectedSection: m,
266
- activeSections: v,
266
+ activeSections: b,
267
267
  setActiveSections: f,
268
268
  updateGridElement: Q,
269
269
  answerData: s,
@@ -280,16 +280,16 @@ const ci = ae(void 0), gn = {
280
280
  p,
281
281
  x,
282
282
  l,
283
- A,
283
+ S,
284
284
  N,
285
285
  T,
286
- U,
287
- S,
286
+ z,
287
+ A,
288
288
  C,
289
289
  w,
290
290
  r,
291
291
  h,
292
- v,
292
+ b,
293
293
  Q,
294
294
  s,
295
295
  y,
@@ -309,12 +309,12 @@ function On(i) {
309
309
  } else for (o in i) i[o] && (s && (s += " "), s += o);
310
310
  return s;
311
311
  }
312
- function W() {
312
+ function U() {
313
313
  for (var i, e, o = 0, s = "", a = arguments.length; o < a; o++) (i = arguments[o]) && (e = On(i)) && (s && (s += " "), s += e);
314
314
  return s;
315
315
  }
316
316
  function fe({ type: i = "calendar", className: e }) {
317
- return /* @__PURE__ */ n(ti, { children: i === "calendar" ? /* @__PURE__ */ b(
317
+ return /* @__PURE__ */ n(ti, { children: i === "calendar" ? /* @__PURE__ */ v(
318
318
  "svg",
319
319
  {
320
320
  width: "20",
@@ -430,7 +430,7 @@ function fe({ type: i = "calendar", className: e }) {
430
430
  )
431
431
  ]
432
432
  }
433
- ) : /* @__PURE__ */ b(
433
+ ) : /* @__PURE__ */ v(
434
434
  "svg",
435
435
  {
436
436
  width: "20",
@@ -498,10 +498,10 @@ const $i = ({
498
498
  showYearDropdown: c
499
499
  }) => {
500
500
  const r = i ? new Date(i) : null, [t, h] = P(r);
501
- return R(() => {
502
- const v = i ? new Date(i) : null;
503
- (v && t && v.getTime() !== t.getTime() || !v && t || v && !t) && h(v);
504
- }, [i]), R(() => {
501
+ return I(() => {
502
+ const b = i ? new Date(i) : null;
503
+ (b && t && b.getTime() !== t.getTime() || !b && t || b && !t) && h(b);
504
+ }, [i]), I(() => {
505
505
  e && e(a, t);
506
506
  }, [t, e, a]), /* @__PURE__ */ n("div", { className: "builder_date__picker", children: /* @__PURE__ */ n(
507
507
  se,
@@ -512,8 +512,8 @@ const $i = ({
512
512
  dateFormat: s,
513
513
  disabled: o,
514
514
  selected: t,
515
- onChange: (v) => {
516
- h(v);
515
+ onChange: (b) => {
516
+ h(b);
517
517
  },
518
518
  className: "field-control",
519
519
  portalId: "root-portal",
@@ -536,7 +536,7 @@ function ye({
536
536
  watch: a
537
537
  } = e || {};
538
538
  let l;
539
- return a && (l = a()[i.id]), R(() => {
539
+ return a && (l = a()[i.id]), I(() => {
540
540
  o(i.id);
541
541
  }, [i.id]), /* @__PURE__ */ n(
542
542
  $i,
@@ -563,7 +563,7 @@ function Vi({
563
563
  {
564
564
  placeholder: (i == null ? void 0 : i.placeholder) || "",
565
565
  type: (i == null ? void 0 : i.inputType) || "text",
566
- className: W("field-control", i == null ? void 0 : i.customClass),
566
+ className: U("field-control", i == null ? void 0 : i.customClass),
567
567
  ...o(i == null ? void 0 : i.id),
568
568
  disabled: e == null ? void 0 : e.isReadOnly,
569
569
  inputMode: (i == null ? void 0 : i.inputMode) || void 0,
@@ -815,9 +815,9 @@ function Ie(i, e) {
815
815
  };
816
816
  let l = o.body;
817
817
  [o, s].forEach((y) => {
818
- const g = [], p = y.hFlip, S = y.vFlip;
818
+ const g = [], p = y.hFlip, A = y.vFlip;
819
819
  let C = y.rotate;
820
- p ? S ? C += 2 : (g.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), g.push("scale(-1 1)"), a.top = a.left = 0) : S && (g.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), g.push("scale(1 -1)"), a.top = a.left = 0);
820
+ p ? A ? C += 2 : (g.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), g.push("scale(-1 1)"), a.top = a.left = 0) : A && (g.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), g.push("scale(1 -1)"), a.top = a.left = 0);
821
821
  let x;
822
822
  switch (C < 0 && (C -= Math.floor(C / 4) * 4), C = C % 4, C) {
823
823
  case 1:
@@ -835,10 +835,10 @@ function Ie(i, e) {
835
835
  const d = s.width, u = s.height, c = a.width, r = a.height;
836
836
  let t, h;
837
837
  d === null ? (h = u === null ? "1em" : u === "auto" ? r : u, t = Sn(h, c / r)) : (t = d === "auto" ? c : d, h = u === null ? Sn(t, r / c) : u === "auto" ? r : u);
838
- const m = {}, v = (y, g) => {
838
+ const m = {}, b = (y, g) => {
839
839
  Re(g) || (m[y] = g.toString());
840
840
  };
841
- v("width", t), v("height", h);
841
+ b("width", t), b("height", h);
842
842
  const f = [
843
843
  a.left,
844
844
  a.top,
@@ -1088,26 +1088,26 @@ function io(i, e, o, s) {
1088
1088
  const a = i.resources.length, l = i.random ? Math.floor(Math.random() * a) : i.index;
1089
1089
  let d;
1090
1090
  if (i.random) {
1091
- let A = i.resources.slice(0);
1092
- for (d = []; A.length > 1; ) {
1093
- const N = Math.floor(Math.random() * A.length);
1094
- d.push(A[N]), A = A.slice(0, N).concat(A.slice(N + 1));
1091
+ let S = i.resources.slice(0);
1092
+ for (d = []; S.length > 1; ) {
1093
+ const N = Math.floor(Math.random() * S.length);
1094
+ d.push(S[N]), S = S.slice(0, N).concat(S.slice(N + 1));
1095
1095
  }
1096
- d = d.concat(A);
1096
+ d = d.concat(S);
1097
1097
  } else d = i.resources.slice(l).concat(i.resources.slice(0, l));
1098
1098
  const u = Date.now();
1099
- let c = "pending", r = 0, t, h = null, m = [], v = [];
1100
- typeof s == "function" && v.push(s);
1099
+ let c = "pending", r = 0, t, h = null, m = [], b = [];
1100
+ typeof s == "function" && b.push(s);
1101
1101
  function f() {
1102
1102
  h && (clearTimeout(h), h = null);
1103
1103
  }
1104
1104
  function y() {
1105
- c === "pending" && (c = "aborted"), f(), m.forEach((A) => {
1106
- A.status === "pending" && (A.status = "aborted");
1105
+ c === "pending" && (c = "aborted"), f(), m.forEach((S) => {
1106
+ S.status === "pending" && (S.status = "aborted");
1107
1107
  }), m = [];
1108
1108
  }
1109
- function g(A, N) {
1110
- N && (v = []), typeof A == "function" && v.push(A);
1109
+ function g(S, N) {
1110
+ N && (b = []), typeof S == "function" && b.push(S);
1111
1111
  }
1112
1112
  function p() {
1113
1113
  return {
@@ -1120,19 +1120,19 @@ function io(i, e, o, s) {
1120
1120
  abort: y
1121
1121
  };
1122
1122
  }
1123
- function S() {
1124
- c = "failed", v.forEach((A) => {
1125
- A(void 0, t);
1123
+ function A() {
1124
+ c = "failed", b.forEach((S) => {
1125
+ S(void 0, t);
1126
1126
  });
1127
1127
  }
1128
1128
  function C() {
1129
- m.forEach((A) => {
1130
- A.status === "pending" && (A.status = "aborted");
1129
+ m.forEach((S) => {
1130
+ S.status === "pending" && (S.status = "aborted");
1131
1131
  }), m = [];
1132
1132
  }
1133
- function x(A, N, T) {
1133
+ function x(S, N, T) {
1134
1134
  const Q = N !== "success";
1135
- switch (m = m.filter((U) => U !== A), c) {
1135
+ switch (m = m.filter((z) => z !== S), c) {
1136
1136
  case "pending":
1137
1137
  break;
1138
1138
  case "failed":
@@ -1142,43 +1142,43 @@ function io(i, e, o, s) {
1142
1142
  return;
1143
1143
  }
1144
1144
  if (N === "abort") {
1145
- t = T, S();
1145
+ t = T, A();
1146
1146
  return;
1147
1147
  }
1148
1148
  if (Q) {
1149
- t = T, m.length || (d.length ? k() : S());
1149
+ t = T, m.length || (d.length ? k() : A());
1150
1150
  return;
1151
1151
  }
1152
1152
  if (f(), C(), !i.random) {
1153
- const U = i.resources.indexOf(A.resource);
1154
- U !== -1 && U !== i.index && (i.index = U);
1153
+ const z = i.resources.indexOf(S.resource);
1154
+ z !== -1 && z !== i.index && (i.index = z);
1155
1155
  }
1156
- c = "completed", v.forEach((U) => {
1157
- U(T);
1156
+ c = "completed", b.forEach((z) => {
1157
+ z(T);
1158
1158
  });
1159
1159
  }
1160
1160
  function k() {
1161
1161
  if (c !== "pending") return;
1162
1162
  f();
1163
- const A = d.shift();
1164
- if (A === void 0) {
1163
+ const S = d.shift();
1164
+ if (S === void 0) {
1165
1165
  if (m.length) {
1166
1166
  h = setTimeout(() => {
1167
- f(), c === "pending" && (C(), S());
1167
+ f(), c === "pending" && (C(), A());
1168
1168
  }, i.timeout);
1169
1169
  return;
1170
1170
  }
1171
- S();
1171
+ A();
1172
1172
  return;
1173
1173
  }
1174
1174
  const N = {
1175
1175
  status: "pending",
1176
- resource: A,
1176
+ resource: S,
1177
1177
  callback: (T, Q) => {
1178
1178
  x(N, T, Q);
1179
1179
  }
1180
1180
  };
1181
- m.push(N), r++, h = setTimeout(k, i.rotate), o(A, e, N.callback);
1181
+ m.push(N), r++, h = setTimeout(k, i.rotate), o(S, e, N.callback);
1182
1182
  }
1183
1183
  return setTimeout(k), p;
1184
1184
  }
@@ -1300,11 +1300,11 @@ function so(i, e) {
1300
1300
  a.forEach((t) => {
1301
1301
  const h = l(t, s, o);
1302
1302
  Cn(h, (m) => {
1303
- const v = m ? {
1303
+ const b = m ? {
1304
1304
  prefix: s,
1305
1305
  icons: { [t]: m }
1306
1306
  } : null;
1307
- Ci(i, [t], v);
1307
+ Ci(i, [t], b);
1308
1308
  });
1309
1309
  });
1310
1310
  return;
@@ -1342,8 +1342,8 @@ const lo = (i, e) => {
1342
1342
  const h = a[r] || (a[r] = /* @__PURE__ */ Object.create(null));
1343
1343
  h[t] || (h[t] = []);
1344
1344
  }), s.pending.forEach((c) => {
1345
- const { provider: r, prefix: t, name: h } = c, m = Ni(r, t), v = m.pendingIcons || (m.pendingIcons = /* @__PURE__ */ new Set());
1346
- v.has(h) || (v.add(h), a[r][t].push(h));
1345
+ const { provider: r, prefix: t, name: h } = c, m = Ni(r, t), b = m.pendingIcons || (m.pendingIcons = /* @__PURE__ */ new Set());
1346
+ b.has(h) || (b.add(h), a[r][t].push(h));
1347
1347
  }), l.forEach((c) => {
1348
1348
  const r = a[c.provider][c.prefix];
1349
1349
  r.length && so(c, r);
@@ -1462,11 +1462,11 @@ const So = (i, e, o) => {
1462
1462
  if (o) {
1463
1463
  const g = Hi(o, !1, !0);
1464
1464
  if (g) {
1465
- const p = ["iconify"], S = [
1465
+ const p = ["iconify"], A = [
1466
1466
  "provider",
1467
1467
  "prefix"
1468
1468
  ];
1469
- for (const C of S)
1469
+ for (const C of A)
1470
1470
  g[C] && p.push("iconify--" + g[C]);
1471
1471
  c.className = p.join(" ");
1472
1472
  }
@@ -1531,10 +1531,10 @@ const So = (i, e, o) => {
1531
1531
  __html: go(Ge(r.body, p ? () => p + "ID" + g++ : "iconifyReact"))
1532
1532
  }, _i("svg", c);
1533
1533
  }
1534
- const { body: h, width: m, height: v } = i, f = l === "mask" || (l === "bg" ? !1 : h.indexOf("currentColor") !== -1), y = mo(h, {
1534
+ const { body: h, width: m, height: b } = i, f = l === "mask" || (l === "bg" ? !1 : h.indexOf("currentColor") !== -1), y = mo(h, {
1535
1535
  ...t,
1536
1536
  width: m + "",
1537
- height: v + ""
1537
+ height: b + ""
1538
1538
  });
1539
1539
  return c.style = {
1540
1540
  ...d,
@@ -1581,8 +1581,8 @@ if (typeof document != "undefined" && typeof window != "undefined") {
1581
1581
  }
1582
1582
  function _n(i) {
1583
1583
  const [e, o] = P(!!i.ssr), [s, a] = P({});
1584
- function l(v) {
1585
- if (v) {
1584
+ function l(b) {
1585
+ if (b) {
1586
1586
  const f = i.icon;
1587
1587
  if (typeof f == "object")
1588
1588
  return {
@@ -1602,15 +1602,15 @@ function _n(i) {
1602
1602
  }
1603
1603
  const [d, u] = P(l(!!i.ssr));
1604
1604
  function c() {
1605
- const v = s.callback;
1606
- v && (v(), a({}));
1605
+ const b = s.callback;
1606
+ b && (b(), a({}));
1607
1607
  }
1608
- function r(v) {
1609
- if (JSON.stringify(d) !== JSON.stringify(v))
1610
- return c(), u(v), !0;
1608
+ function r(b) {
1609
+ if (JSON.stringify(d) !== JSON.stringify(b))
1610
+ return c(), u(b), !0;
1611
1611
  }
1612
1612
  function t() {
1613
- var v;
1613
+ var b;
1614
1614
  const f = i.icon;
1615
1615
  if (typeof f == "object") {
1616
1616
  r({
@@ -1629,9 +1629,9 @@ function _n(i) {
1629
1629
  a({
1630
1630
  callback: g
1631
1631
  });
1632
- } else y && ((v = i.onLoad) === null || v === void 0 || v.call(i, f));
1632
+ } else y && ((b = i.onLoad) === null || b === void 0 || b.call(i, f));
1633
1633
  }
1634
- R(() => (o(!0), c), []), R(() => {
1634
+ I(() => (o(!0), c), []), I(() => {
1635
1635
  e && t();
1636
1636
  }, [i.icon, e]);
1637
1637
  const { name: h, data: m } = d;
@@ -1649,7 +1649,7 @@ In((i, e) => _n({
1649
1649
  ...i,
1650
1650
  _ref: e
1651
1651
  }));
1652
- function F({
1652
+ function W({
1653
1653
  icon: i,
1654
1654
  iconClass: e
1655
1655
  }) {
@@ -1674,17 +1674,17 @@ function rn({
1674
1674
  () => c == null ? void 0 : c.map((m) => m.label).join(", "),
1675
1675
  [c]
1676
1676
  );
1677
- return R(() => {
1677
+ return I(() => {
1678
1678
  s(i.id);
1679
- }, [i.id, s]), R(() => {
1679
+ }, [i.id, s]), I(() => {
1680
1680
  if (!d) return;
1681
- const m = d((v) => {
1682
- const f = v[i.id];
1681
+ const m = d((b) => {
1682
+ const f = b[i.id];
1683
1683
  f !== void 0 && r(Array.isArray(f) ? f : []);
1684
1684
  });
1685
1685
  return () => {
1686
- var v;
1687
- return (v = m.unsubscribe) == null ? void 0 : v.call(m);
1686
+ var b;
1687
+ return (b = m.unsubscribe) == null ? void 0 : b.call(m);
1688
1688
  };
1689
1689
  }, [d, i.id]), /* @__PURE__ */ n("div", { className: "custom-select", children: /* @__PURE__ */ n(
1690
1690
  ii,
@@ -1696,15 +1696,15 @@ function rn({
1696
1696
  multiple: !0,
1697
1697
  disabled: l,
1698
1698
  by: "value",
1699
- children: /* @__PURE__ */ b("div", { className: "custom-select__wrapper", children: [
1700
- /* @__PURE__ */ b(
1699
+ children: /* @__PURE__ */ v("div", { className: "custom-select__wrapper", children: [
1700
+ /* @__PURE__ */ v(
1701
1701
  ii.Button,
1702
1702
  {
1703
1703
  className: "custom-select__control field-control",
1704
1704
  disabled: l,
1705
1705
  children: [
1706
1706
  /* @__PURE__ */ n("span", { className: "custom-select__value", children: (c == null ? void 0 : c.length) > 0 ? t : /* @__PURE__ */ n("span", { className: "custom-select__placeholder", children: o != null ? o : " Select options" }) }),
1707
- /* @__PURE__ */ n("span", { className: "custom-select__icon", children: /* @__PURE__ */ n(F, { icon: "lucide:chevron-down" }) })
1707
+ /* @__PURE__ */ n("span", { className: "custom-select__icon", children: /* @__PURE__ */ n(W, { icon: "lucide:chevron-down" }) })
1708
1708
  ]
1709
1709
  }
1710
1710
  ),
@@ -1714,12 +1714,12 @@ function rn({
1714
1714
  anchor: "bottom start",
1715
1715
  className: "custom-select__options",
1716
1716
  children: (h = i == null ? void 0 : i.options) == null ? void 0 : h.map(
1717
- (m, v) => /* @__PURE__ */ n(
1717
+ (m, b) => /* @__PURE__ */ n(
1718
1718
  ii.Option,
1719
1719
  {
1720
1720
  value: m,
1721
1721
  className: ({ active: f }) => `custom-select__option ${f ? "custom-select__option--active" : ""}`,
1722
- children: ({ selected: f }) => /* @__PURE__ */ b("div", { className: "custom-select__option-row", children: [
1722
+ children: ({ selected: f }) => /* @__PURE__ */ v("div", { className: "custom-select__option-row", children: [
1723
1723
  /* @__PURE__ */ n(
1724
1724
  "span",
1725
1725
  {
@@ -1730,7 +1730,7 @@ function rn({
1730
1730
  f && /* @__PURE__ */ n("span", { className: "custom-select__check", children: "✓" })
1731
1731
  ] })
1732
1732
  },
1733
- v
1733
+ b
1734
1734
  )
1735
1735
  )
1736
1736
  }
@@ -1764,18 +1764,18 @@ function Qn({
1764
1764
  removeFile: o
1765
1765
  }) {
1766
1766
  const [s, a] = P(!1), [l, d] = P("unknown"), [u, c] = P(null);
1767
- R(() => {
1767
+ I(() => {
1768
1768
  i && d(No(i));
1769
- }, [i]), R(() => {
1769
+ }, [i]), I(() => {
1770
1770
  if (l === "pdf" && (i != null && i.startsWith("data:")))
1771
1771
  try {
1772
- const v = atob(i.split(",")[1]), f = new ArrayBuffer(v.length), y = new Uint8Array(f);
1773
- for (let S = 0; S < v.length; S++)
1774
- y[S] = v.charCodeAt(S);
1772
+ const b = atob(i.split(",")[1]), f = new ArrayBuffer(b.length), y = new Uint8Array(f);
1773
+ for (let A = 0; A < b.length; A++)
1774
+ y[A] = b.charCodeAt(A);
1775
1775
  const g = new Blob([f], { type: "application/pdf" }), p = URL.createObjectURL(g);
1776
1776
  return c(p), () => URL.revokeObjectURL(p);
1777
- } catch (v) {
1778
- console.error("Error creating blob URL:", v);
1777
+ } catch (b) {
1778
+ console.error("Error creating blob URL:", b);
1779
1779
  }
1780
1780
  else
1781
1781
  c(null);
@@ -1783,31 +1783,31 @@ function Qn({
1783
1783
  const r = () => {
1784
1784
  l === "image" || l === "pdf" ? a(!0) : window.open(u || i, "_blank");
1785
1785
  }, t = () => a(!1), h = e || (i == null ? void 0 : i.split("/").pop()) || "Unknown file";
1786
- function m(v, f = "download") {
1787
- if (!v) return;
1788
- if (v.startsWith("data:")) {
1786
+ function m(b, f = "download") {
1787
+ if (!b) return;
1788
+ if (b.startsWith("data:")) {
1789
1789
  const g = document.createElement("a");
1790
- g.href = v, g.download = f, document.body.appendChild(g), g.click(), document.body.removeChild(g);
1790
+ g.href = b, g.download = f, document.body.appendChild(g), g.click(), document.body.removeChild(g);
1791
1791
  return;
1792
1792
  }
1793
1793
  const y = document.createElement("a");
1794
- y.href = v, y.setAttribute("download", f), document.body.appendChild(y), y.click(), document.body.removeChild(y);
1794
+ y.href = b, y.setAttribute("download", f), document.body.appendChild(y), y.click(), document.body.removeChild(y);
1795
1795
  }
1796
- return /* @__PURE__ */ b("div", { className: "mt-2 field-control !py-1 !bg-gray-50 !flex justify-between gap-x-8 items-center", children: [
1797
- /* @__PURE__ */ b(
1796
+ return /* @__PURE__ */ v("div", { className: "mt-2 field-control !py-1 !bg-gray-50 !flex justify-between gap-x-8 items-center", children: [
1797
+ /* @__PURE__ */ v(
1798
1798
  "div",
1799
1799
  {
1800
1800
  onClick: r,
1801
1801
  className: "!flex items-center rounded cursor-pointer gap-x-3",
1802
1802
  title: `Click to preview ${h}`,
1803
1803
  children: [
1804
- l === "image" && /* @__PURE__ */ n("div", { className: "flex items-center justify-center ", children: /* @__PURE__ */ n(F, { iconClass: "text-4xl", icon: "fluent-color:image-48" }) }),
1805
- l !== "image" && /* @__PURE__ */ n(F, { icon: ko[l], iconClass: "text-4xl" }),
1804
+ l === "image" && /* @__PURE__ */ n("div", { className: "flex items-center justify-center ", children: /* @__PURE__ */ n(W, { iconClass: "text-4xl", icon: "fluent-color:image-48" }) }),
1805
+ l !== "image" && /* @__PURE__ */ n(W, { icon: ko[l], iconClass: "text-4xl" }),
1806
1806
  /* @__PURE__ */ n("span", { className: "text-sm font-semibold text-center text-gray-700 truncate max-w-[300px]", children: h })
1807
1807
  ]
1808
1808
  }
1809
1809
  ),
1810
- /* @__PURE__ */ b("div", { className: "flex gap-x-1 items-center", children: [
1810
+ /* @__PURE__ */ v("div", { className: "flex gap-x-1 items-center", children: [
1811
1811
  /* @__PURE__ */ n(
1812
1812
  "button",
1813
1813
  {
@@ -1815,7 +1815,7 @@ function Qn({
1815
1815
  className: "p-2",
1816
1816
  onClick: () => m(u || i, e),
1817
1817
  title: `Download ${h}`,
1818
- children: /* @__PURE__ */ n(F, { icon: "streamline-flex:download-tray-solid" })
1818
+ children: /* @__PURE__ */ n(W, { icon: "streamline-flex:download-tray-solid" })
1819
1819
  }
1820
1820
  ),
1821
1821
  o && /* @__PURE__ */ n(
@@ -1824,7 +1824,7 @@ function Qn({
1824
1824
  type: "button",
1825
1825
  className: "p-2 text-lg text-red-500",
1826
1826
  onClick: o,
1827
- children: /* @__PURE__ */ n(F, { icon: "lets-icons:trash-duotone" })
1827
+ children: /* @__PURE__ */ n(W, { icon: "lets-icons:trash-duotone" })
1828
1828
  }
1829
1829
  )
1830
1830
  ] }),
@@ -1833,11 +1833,11 @@ function Qn({
1833
1833
  {
1834
1834
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",
1835
1835
  onClick: t,
1836
- children: /* @__PURE__ */ b(
1836
+ children: /* @__PURE__ */ v(
1837
1837
  "div",
1838
1838
  {
1839
1839
  className: "relative bg-white p-8 rounded-lg w-full max-w-[90vw] max-h-[90vh] overflow-auto",
1840
- onClick: (v) => v.stopPropagation(),
1840
+ onClick: (b) => b.stopPropagation(),
1841
1841
  children: [
1842
1842
  /* @__PURE__ */ n(
1843
1843
  "button",
@@ -1890,19 +1890,19 @@ function Mo({
1890
1890
  list: a = null,
1891
1891
  accept: l = []
1892
1892
  }) {
1893
- const { uploadUrl: d } = mi(ci), u = hi(null), [c, r] = P(a), [t, h] = P(!1);
1894
- R(() => {
1893
+ const { uploadUrl: d } = bi(ci), u = mi(null), [c, r] = P(a), [t, h] = P(!1);
1894
+ I(() => {
1895
1895
  r(a);
1896
1896
  }, [a]);
1897
1897
  const m = $(
1898
1898
  () => l == null ? void 0 : l.map((x) => x.value).join(", "),
1899
1899
  [l]
1900
- ), v = $(
1900
+ ), b = $(
1901
1901
  () => l == null ? void 0 : l.map((x) => x.label).join(", "),
1902
1902
  [l]
1903
1903
  ), f = Z(
1904
1904
  async (x) => {
1905
- var A;
1905
+ var S;
1906
1906
  const k = di("token");
1907
1907
  try {
1908
1908
  const { data: N } = await xi.post(d, x, {
@@ -1910,14 +1910,14 @@ function Mo({
1910
1910
  Authorization: `Bearer ${k}`
1911
1911
  }
1912
1912
  });
1913
- return (A = N == null ? void 0 : N.data) == null ? void 0 : A.url;
1913
+ return (S = N == null ? void 0 : N.data) == null ? void 0 : S.url;
1914
1914
  } catch (N) {
1915
1915
  throw console.error("File upload error:", N), new Error("Failed to upload file to server");
1916
1916
  }
1917
1917
  },
1918
1918
  [d]
1919
1919
  ), y = Z(
1920
- (x) => new Promise((k, A) => {
1920
+ (x) => new Promise((k, S) => {
1921
1921
  const N = new FileReader();
1922
1922
  N.onloadend = async () => {
1923
1923
  try {
@@ -1935,30 +1935,30 @@ function Mo({
1935
1935
  name: x.name
1936
1936
  });
1937
1937
  } catch (T) {
1938
- A(T);
1938
+ S(T);
1939
1939
  }
1940
- }, N.onerror = () => A(new Error("File read failed")), N.readAsDataURL(x);
1940
+ }, N.onerror = () => S(new Error("File read failed")), N.readAsDataURL(x);
1941
1941
  }),
1942
1942
  [d, f]
1943
1943
  ), g = Z(
1944
1944
  (x) => {
1945
- var A;
1946
- const k = m ? (A = m.split(",")) == null ? void 0 : A.map((N) => N.trim()) : [];
1945
+ var S;
1946
+ const k = m ? (S = m.split(",")) == null ? void 0 : S.map((N) => N.trim()) : [];
1947
1947
  for (const N of x) {
1948
1948
  if (N.size > Co)
1949
- return vi.error(
1949
+ return hi.error(
1950
1950
  `File "${N.name}" exceeds 5MB limit (${(N.size / 1024 / 1024).toFixed(2)}MB)`
1951
1951
  ), !1;
1952
1952
  if (k.length && !k.some(
1953
1953
  (T) => N.type === T || N.name.toLowerCase().endsWith(T.replace("*", ""))
1954
1954
  ))
1955
- return vi.error(
1956
- `File "${N.name}" is not an allowed type. Allowed: ${v || "any"}`
1955
+ return hi.error(
1956
+ `File "${N.name}" is not an allowed type. Allowed: ${b || "any"}`
1957
1957
  ), !1;
1958
1958
  }
1959
1959
  return !0;
1960
1960
  },
1961
- [m, v]
1961
+ [m, b]
1962
1962
  ), p = Z(
1963
1963
  async (x) => {
1964
1964
  const k = Array.from(x.target.files || []);
@@ -1969,27 +1969,27 @@ function Mo({
1969
1969
  }
1970
1970
  try {
1971
1971
  h(!0);
1972
- const A = await Promise.all(k == null ? void 0 : k.map(y)), N = s && c ? [...c, ...A] : A;
1973
- r(N), i(N), vi.success(`Successfully uploaded ${k.length} file(s)`);
1974
- } catch (A) {
1975
- console.error("Upload error:", A), vi.error("Failed to upload file(s). Please try again.");
1972
+ const S = await Promise.all(k == null ? void 0 : k.map(y)), N = s && c ? [...c, ...S] : S;
1973
+ r(N), i(N), hi.success(`Successfully uploaded ${k.length} file(s)`);
1974
+ } catch (S) {
1975
+ console.error("Upload error:", S), hi.error("Failed to upload file(s). Please try again.");
1976
1976
  } finally {
1977
1977
  h(!1), u.current && (u.current.value = "");
1978
1978
  }
1979
1979
  }
1980
1980
  },
1981
1981
  [t, g, y, i, s, c]
1982
- ), S = Z(
1982
+ ), A = Z(
1983
1983
  (x) => {
1984
1984
  t || (u.current && (u.current.value = ""), r((k) => {
1985
- const A = x === void 0 ? null : (k == null ? void 0 : k.filter((N, T) => T !== x)) || null;
1986
- return i(A), A;
1985
+ const S = x === void 0 ? null : (k == null ? void 0 : k.filter((N, T) => T !== x)) || null;
1986
+ return i(S), S;
1987
1987
  }), o == null || o());
1988
1988
  },
1989
1989
  [o, i, t]
1990
1990
  ), C = c && c.length > 0;
1991
- return /* @__PURE__ */ b("div", { className: "flex flex-col items-start gap-2", children: [
1992
- !e && /* @__PURE__ */ b("div", { className: "!flex field-control !py-0 !px-0 relative", children: [
1991
+ return /* @__PURE__ */ v("div", { className: "flex flex-col items-start gap-2", children: [
1992
+ !e && /* @__PURE__ */ v("div", { className: "!flex field-control !py-0 !px-0 relative", children: [
1993
1993
  /* @__PURE__ */ n(
1994
1994
  "input",
1995
1995
  {
@@ -2011,15 +2011,15 @@ function Mo({
2011
2011
  {
2012
2012
  type: "button",
2013
2013
  className: "p-2 text-lg text-red-500 hover:text-red-600 transition-colors disabled:opacity-50",
2014
- onClick: () => S(),
2014
+ onClick: () => A(),
2015
2015
  disabled: t,
2016
2016
  "aria-label": "Remove all files",
2017
- children: /* @__PURE__ */ n(F, { icon: "lets-icons:trash-duotone" })
2017
+ children: /* @__PURE__ */ n(W, { icon: "lets-icons:trash-duotone" })
2018
2018
  }
2019
2019
  )
2020
2020
  ] }),
2021
- C && /* @__PURE__ */ b("div", { className: "relative grid gap-y-1 flex-1 w-full", children: [
2022
- t && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-white/60 rounded", children: /* @__PURE__ */ b("div", { className: "flex items-center gap-2 text-sm text-blue-600 font-medium", children: [
2021
+ C && /* @__PURE__ */ v("div", { className: "relative grid gap-y-1 flex-1 w-full", children: [
2022
+ t && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-white/60 rounded", children: /* @__PURE__ */ v("div", { className: "flex items-center gap-2 text-sm text-blue-600 font-medium", children: [
2023
2023
  /* @__PURE__ */ n("span", { className: "animate-spin h-4 w-4 border-2 border-blue-500 border-t-transparent rounded-full" }),
2024
2024
  "Uploading..."
2025
2025
  ] }) }),
@@ -2028,7 +2028,7 @@ function Mo({
2028
2028
  {
2029
2029
  fileUrl: x.base64,
2030
2030
  fileName: x.name,
2031
- removeFile: () => S(k)
2031
+ removeFile: () => A(k)
2032
2032
  },
2033
2033
  `${x.name}-${k}`
2034
2034
  )))
@@ -2043,9 +2043,9 @@ function Bo({ element: i, validationData: e }) {
2043
2043
  isReadOnly: d,
2044
2044
  watch: u
2045
2045
  } = e || {};
2046
- R(() => {
2046
+ I(() => {
2047
2047
  a(i.id);
2048
- }, [i.id, a]), R(() => {
2048
+ }, [i.id, a]), I(() => {
2049
2049
  if (u) {
2050
2050
  const h = u((m) => {
2051
2051
  s(m[i.id]);
@@ -2064,7 +2064,7 @@ function Bo({ element: i, validationData: e }) {
2064
2064
  ), r = () => {
2065
2065
  l == null || l(i.id, null), s(null);
2066
2066
  };
2067
- return /* @__PURE__ */ b("div", { children: [
2067
+ return /* @__PURE__ */ v("div", { children: [
2068
2068
  !d && /* @__PURE__ */ n(
2069
2069
  Mo,
2070
2070
  {
@@ -2089,13 +2089,13 @@ function Lo({
2089
2089
  {
2090
2090
  placeholder: i.placeholder,
2091
2091
  type: i.inputType,
2092
- className: W("field-control", i == null ? void 0 : i.customClass),
2092
+ className: U("field-control", i == null ? void 0 : i.customClass),
2093
2093
  ...o(i.id),
2094
2094
  disabled: e == null ? void 0 : e.isReadOnly
2095
2095
  }
2096
2096
  );
2097
2097
  }
2098
- const H = ({
2098
+ const O = ({
2099
2099
  label: i,
2100
2100
  name: e,
2101
2101
  register: o,
@@ -2109,16 +2109,16 @@ const H = ({
2109
2109
  trigger: t,
2110
2110
  prefix: h,
2111
2111
  disabled: m,
2112
- watch: v,
2112
+ watch: b,
2113
2113
  min: f,
2114
2114
  max: y,
2115
2115
  description: g,
2116
2116
  onChange: p
2117
2117
  }) => {
2118
- var C, x, k, A;
2119
- const S = o ? { ...o(e) } : {};
2118
+ var C, x, k, S;
2119
+ const A = o ? { ...o(e) } : {};
2120
2120
  if (l === "amount")
2121
- return /* @__PURE__ */ b("div", { className: "space-y-1.5 relative", children: [
2121
+ return /* @__PURE__ */ v("div", { className: "space-y-1.5 relative", children: [
2122
2122
  /* @__PURE__ */ n(
2123
2123
  "label",
2124
2124
  {
@@ -2143,10 +2143,10 @@ const H = ({
2143
2143
  (s == null ? void 0 : s[e]) && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-red-600", children: (C = s[e]) == null ? void 0 : C.message })
2144
2144
  ] });
2145
2145
  if (["checkbox", "radio"].includes(l)) {
2146
- const N = (v == null ? void 0 : v(e)) || null;
2146
+ const N = (b == null ? void 0 : b(e)) || null;
2147
2147
  let T = !1;
2148
- return N && (N != null && N.length && l === "checkbox" ? T = N == null ? void 0 : N.includes(r) : T = N == r), /* @__PURE__ */ b("div", { className: "space-y-1", children: [
2149
- /* @__PURE__ */ b(
2148
+ return N && (N != null && N.length && l === "checkbox" ? T = N == null ? void 0 : N.includes(r) : T = N == r), /* @__PURE__ */ v("div", { className: "space-y-1", children: [
2149
+ /* @__PURE__ */ v(
2150
2150
  "label",
2151
2151
  {
2152
2152
  className: `flex gap-3 cursor-pointer select-none ${g ? "items-start" : "items-center"}`,
@@ -2154,7 +2154,7 @@ const H = ({
2154
2154
  /* @__PURE__ */ n(
2155
2155
  "input",
2156
2156
  {
2157
- ...S,
2157
+ ...A,
2158
2158
  type: l,
2159
2159
  value: r || "",
2160
2160
  disabled: m,
@@ -2174,7 +2174,7 @@ const H = ({
2174
2174
  peer-disabled:cursor-not-allowed
2175
2175
  `,
2176
2176
  children: T && /* @__PURE__ */ n(
2177
- F,
2177
+ W,
2178
2178
  {
2179
2179
  icon: "meteor-icons:check",
2180
2180
  iconClass: "w-3.5 h-3.5 text-white"
@@ -2182,7 +2182,7 @@ const H = ({
2182
2182
  )
2183
2183
  }
2184
2184
  ),
2185
- /* @__PURE__ */ b("div", { children: [
2185
+ /* @__PURE__ */ v("div", { children: [
2186
2186
  /* @__PURE__ */ n("span", { className: "text-sm leading-none block font-medium text-[#344054] font-onest", children: i }),
2187
2187
  g && /* @__PURE__ */ n("span", { className: "text-xs font-medium leading-none text-[#5c6c86] font-onest", children: g })
2188
2188
  ] })
@@ -2192,7 +2192,7 @@ const H = ({
2192
2192
  (s == null ? void 0 : s[e]) && /* @__PURE__ */ n("p", { className: "ml-8 text-sm text-red-600", children: (x = s[e]) == null ? void 0 : x.message })
2193
2193
  ] });
2194
2194
  }
2195
- return l === "textarea" ? /* @__PURE__ */ b("div", { className: "space-y-1.5 relative", children: [
2195
+ return l === "textarea" ? /* @__PURE__ */ v("div", { className: "space-y-1.5 relative", children: [
2196
2196
  /* @__PURE__ */ n(
2197
2197
  "label",
2198
2198
  {
@@ -2203,10 +2203,10 @@ const H = ({
2203
2203
  /* @__PURE__ */ n(
2204
2204
  "textarea",
2205
2205
  {
2206
- ...S,
2206
+ ...A,
2207
2207
  onChange: (N) => {
2208
2208
  var T;
2209
- (T = S.onChange) == null || T.call(S, N), p == null || p(N);
2209
+ (T = A.onChange) == null || T.call(A, N), p == null || p(N);
2210
2210
  },
2211
2211
  className: `field-control ${s != null && s[e] ? "border-red-300" : "border-[#D0D5DD]"} ${a}`,
2212
2212
  placeholder: d,
@@ -2214,7 +2214,7 @@ const H = ({
2214
2214
  }
2215
2215
  ),
2216
2216
  (s == null ? void 0 : s[e]) && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-red-600", children: (k = s[e]) == null ? void 0 : k.message })
2217
- ] }) : /* @__PURE__ */ b("div", { className: " relative w-full", children: [
2217
+ ] }) : /* @__PURE__ */ v("div", { className: " relative w-full", children: [
2218
2218
  i && /* @__PURE__ */ n(
2219
2219
  "label",
2220
2220
  {
@@ -2225,10 +2225,10 @@ const H = ({
2225
2225
  /* @__PURE__ */ n(
2226
2226
  "input",
2227
2227
  {
2228
- ...S,
2228
+ ...A,
2229
2229
  onChange: (N) => {
2230
2230
  var T;
2231
- (T = S.onChange) == null || T.call(S, N), p == null || p(N);
2231
+ (T = A.onChange) == null || T.call(A, N), p == null || p(N);
2232
2232
  },
2233
2233
  type: l,
2234
2234
  className: `field-control ${s != null && s[e] ? "border-red-300" : "border-[#D0D5DD]"} ${a}`,
@@ -2238,7 +2238,7 @@ const H = ({
2238
2238
  max: y
2239
2239
  }
2240
2240
  ),
2241
- (s == null ? void 0 : s[e]) && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-red-600", children: (A = s[e]) == null ? void 0 : A.message })
2241
+ (s == null ? void 0 : s[e]) && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-red-600", children: (S = s[e]) == null ? void 0 : S.message })
2242
2242
  ] });
2243
2243
  };
2244
2244
  function To({
@@ -2247,9 +2247,9 @@ function To({
2247
2247
  }) {
2248
2248
  var a;
2249
2249
  const { register: o = () => ({}), watch: s } = e || {};
2250
- return /* @__PURE__ */ n("div", { className: W("grid gap-y-[6px]", i.customClass), children: (a = i == null ? void 0 : i.options) == null ? void 0 : a.map(
2250
+ return /* @__PURE__ */ n("div", { className: U("grid gap-y-[6px]", i.customClass), children: (a = i == null ? void 0 : i.options) == null ? void 0 : a.map(
2251
2251
  (l) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2252
- H,
2252
+ O,
2253
2253
  {
2254
2254
  placeholder: i.placeholder,
2255
2255
  type: i.inputType,
@@ -2275,9 +2275,9 @@ function Po({
2275
2275
  }) {
2276
2276
  var a;
2277
2277
  const { register: o = () => ({}), watch: s } = e || {};
2278
- return /* @__PURE__ */ n("div", { className: W("grid gap-y-[6px]", i.customClass), children: (a = i == null ? void 0 : i.options) == null ? void 0 : a.map(
2278
+ return /* @__PURE__ */ n("div", { className: U("grid gap-y-[6px]", i.customClass), children: (a = i == null ? void 0 : i.options) == null ? void 0 : a.map(
2279
2279
  (l) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2280
- H,
2280
+ O,
2281
2281
  {
2282
2282
  placeholder: i.placeholder,
2283
2283
  type: i.inputType,
@@ -2305,42 +2305,42 @@ const Si = ({
2305
2305
  isFloatingLabel: t,
2306
2306
  subText: h,
2307
2307
  labelClass: m = "text-[10px]",
2308
- loading: v,
2308
+ loading: b,
2309
2309
  disabled: f
2310
2310
  }) => {
2311
- const [y, g] = P(r ? [] : null), p = hi(!1), S = $(() => !u || !i || i.length === 0 ? r ? [] : null : r ? Array.isArray(u) ? i.filter((k) => u.some(
2312
- (A) => {
2311
+ const [y, g] = P(r ? [] : null), p = mi(!1), A = $(() => !u || !i || i.length === 0 ? r ? [] : null : r ? Array.isArray(u) ? i.filter((k) => u.some(
2312
+ (S) => {
2313
2313
  var N;
2314
- return typeof k.value == "object" ? ((N = k.value) == null ? void 0 : N.id) === (A == null ? void 0 : A.id) : k.value === A;
2314
+ return typeof k.value == "object" ? ((N = k.value) == null ? void 0 : N.id) === (S == null ? void 0 : S.id) : k.value === S;
2315
2315
  }
2316
2316
  )) : [] : i.find((k) => {
2317
- var A;
2318
- return typeof k.value == "string" && typeof u == "string" ? k.value.toLowerCase() === u.toLowerCase() : typeof k.value == "object" && typeof u == "object" ? ((A = k.value) == null ? void 0 : A.id) === (u == null ? void 0 : u.id) : k.value === u;
2317
+ var S;
2318
+ return typeof k.value == "string" && typeof u == "string" ? k.value.toLowerCase() === u.toLowerCase() : typeof k.value == "object" && typeof u == "object" ? ((S = k.value) == null ? void 0 : S.id) === (u == null ? void 0 : u.id) : k.value === u;
2319
2319
  }) || null, [u, i, r]);
2320
- R(() => {
2320
+ I(() => {
2321
2321
  if (p.current) {
2322
2322
  p.current = !1;
2323
2323
  return;
2324
2324
  }
2325
- if (r && Array.isArray(S) && Array.isArray(y)) {
2326
- const k = y == null ? void 0 : y.map((N) => N.value), A = S == null ? void 0 : S.map((N) => N.value);
2327
- JSON.stringify(k) !== JSON.stringify(A) && g(S);
2328
- } else (S == null ? void 0 : S.value) !== (y == null ? void 0 : y.value) && g(S);
2329
- }, [S, r]);
2325
+ if (r && Array.isArray(A) && Array.isArray(y)) {
2326
+ const k = y == null ? void 0 : y.map((N) => N.value), S = A == null ? void 0 : A.map((N) => N.value);
2327
+ JSON.stringify(k) !== JSON.stringify(S) && g(A);
2328
+ } else (A == null ? void 0 : A.value) !== (y == null ? void 0 : y.value) && g(A);
2329
+ }, [A, r]);
2330
2330
  const C = Z((k) => {
2331
- var A;
2331
+ var S;
2332
2332
  if (p.current = !0, g(k), a) {
2333
- const N = r ? Array.isArray(k) ? k == null ? void 0 : k.map((T) => T.value) : [] : (A = k == null ? void 0 : k.value) != null ? A : null;
2333
+ const N = r ? Array.isArray(k) ? k == null ? void 0 : k.map((T) => T.value) : [] : (S = k == null ? void 0 : k.value) != null ? S : null;
2334
2334
  a(l, N), c == null || c(l);
2335
2335
  }
2336
2336
  s && !p.current && s(l);
2337
- }, [a, l, c, s, r]), x = $(() => v ? "Fetching data..." : y ? r && Array.isArray(y) ? y.length > 0 ? y == null ? void 0 : y.map((k) => k.label).join(", ") : e : (y == null ? void 0 : y.label) || e : e, [y, v, e, r]);
2338
- return /* @__PURE__ */ b("div", { className: "relative", children: [
2337
+ }, [a, l, c, s, r]), x = $(() => b ? "Fetching data..." : y ? r && Array.isArray(y) ? y.length > 0 ? y == null ? void 0 : y.map((k) => k.label).join(", ") : e : (y == null ? void 0 : y.label) || e : e, [y, b, e, r]);
2338
+ return /* @__PURE__ */ v("div", { className: "relative", children: [
2339
2339
  !t && d && /* @__PURE__ */ n("label", { className: "block text-sm text-[#686878] darks:text-white/70 mb-2", children: d }),
2340
2340
  t && d && /* @__PURE__ */ n(
2341
2341
  "label",
2342
2342
  {
2343
- className: W(
2343
+ className: U(
2344
2344
  "z-[40] absolute bg-white py-[2px] px-1 -top-[10px] left-3",
2345
2345
  m
2346
2346
  ),
@@ -2353,19 +2353,19 @@ const Si = ({
2353
2353
  value: y,
2354
2354
  onChange: C,
2355
2355
  multiple: r,
2356
- disabled: f || v,
2357
- children: /* @__PURE__ */ b("div", { className: "relative", children: [
2358
- /* @__PURE__ */ b(ii.Button, { className: "field-control", disabled: f || v, children: [
2356
+ disabled: f || b,
2357
+ children: /* @__PURE__ */ v("div", { className: "relative", children: [
2358
+ /* @__PURE__ */ v(ii.Button, { className: "field-control", disabled: f || b, children: [
2359
2359
  /* @__PURE__ */ n(
2360
2360
  "span",
2361
2361
  {
2362
- className: W("block text-sm text-left truncate", {
2363
- "opacity-60": !y || v
2362
+ className: U("block text-sm text-left truncate", {
2363
+ "opacity-60": !y || b
2364
2364
  }),
2365
2365
  children: x
2366
2366
  }
2367
2367
  ),
2368
- /* @__PURE__ */ n("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ n(F, { icon: "lucide:chevron-down" }) })
2368
+ /* @__PURE__ */ n("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ n(W, { icon: "lucide:chevron-down" }) })
2369
2369
  ] }),
2370
2370
  /* @__PURE__ */ n(
2371
2371
  yi,
@@ -2373,16 +2373,16 @@ const Si = ({
2373
2373
  leave: "transition ease-in duration-100",
2374
2374
  leaveFrom: "opacity-100",
2375
2375
  leaveTo: "opacity-0",
2376
- children: /* @__PURE__ */ n(ii.Options, { anchor: "bottom start", className: "select-button-options", children: i.length === 0 ? /* @__PURE__ */ n("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No options available" }) : i == null ? void 0 : i.map((k, A) => {
2376
+ children: /* @__PURE__ */ n(ii.Options, { anchor: "bottom start", className: "select-button-options", children: i.length === 0 ? /* @__PURE__ */ n("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No options available" }) : i == null ? void 0 : i.map((k, S) => {
2377
2377
  var N;
2378
2378
  return /* @__PURE__ */ n(
2379
2379
  ii.Option,
2380
2380
  {
2381
2381
  value: k,
2382
- className: ({ active: T }) => W("select-option", { active: T }),
2383
- children: ({ selected: T }) => /* @__PURE__ */ n("div", { className: W("option-text", { selected: T }), children: k.label })
2382
+ className: ({ active: T }) => U("select-option", { active: T }),
2383
+ children: ({ selected: T }) => /* @__PURE__ */ n("div", { className: U("option-text", { selected: T }), children: k.label })
2384
2384
  },
2385
- ((N = k.value) == null ? void 0 : N.id) || k.value || A
2385
+ ((N = k.value) == null ? void 0 : N.id) || k.value || S
2386
2386
  );
2387
2387
  }) })
2388
2388
  }
@@ -2403,51 +2403,51 @@ function on({
2403
2403
  name: l
2404
2404
  }) {
2405
2405
  const [d, u] = P(""), c = $(() => {
2406
- const v = e != null ? e : o;
2407
- return i.find((f) => f.value === v || f.label === v) || null;
2406
+ const b = e != null ? e : o;
2407
+ return i.find((f) => f.value === b || f.label === b) || null;
2408
2408
  }, [e, o, i]), [r, t] = P(c);
2409
- R(() => {
2409
+ I(() => {
2410
2410
  if (e !== void 0) {
2411
- const v = i.find((f) => f.value === e || f.label === e) || null;
2412
- t(v);
2411
+ const b = i.find((f) => f.value === e || f.label === e) || null;
2412
+ t(b);
2413
2413
  }
2414
2414
  }, [e, i]);
2415
2415
  const h = $(() => {
2416
2416
  if (d === "") return i;
2417
- const v = d.toLowerCase();
2417
+ const b = d.toLowerCase();
2418
2418
  return i.filter(
2419
- (f) => f.label.toLowerCase().includes(v)
2419
+ (f) => f.label.toLowerCase().includes(b)
2420
2420
  );
2421
- }, [d, i]), m = Z((v) => {
2422
- t(v), s(l, v);
2421
+ }, [d, i]), m = Z((b) => {
2422
+ t(b), s(l, b);
2423
2423
  }, [l, s]);
2424
- return /* @__PURE__ */ n("div", { className: "relative w-full", children: /* @__PURE__ */ b(
2424
+ return /* @__PURE__ */ n("div", { className: "relative w-full", children: /* @__PURE__ */ v(
2425
2425
  Ai,
2426
2426
  {
2427
2427
  value: r,
2428
2428
  onChange: m,
2429
2429
  disabled: a,
2430
2430
  children: [
2431
- /* @__PURE__ */ b("div", { className: "relative", children: [
2431
+ /* @__PURE__ */ v("div", { className: "relative", children: [
2432
2432
  /* @__PURE__ */ n(
2433
2433
  le,
2434
2434
  {
2435
2435
  className: "field-control",
2436
- displayValue: (v) => (v == null ? void 0 : v.label) || "",
2437
- onChange: (v) => u(v.target.value),
2436
+ displayValue: (b) => (b == null ? void 0 : b.label) || "",
2437
+ onChange: (b) => u(b.target.value),
2438
2438
  placeholder: "Select an option..."
2439
2439
  }
2440
2440
  ),
2441
- /* @__PURE__ */ n(de, { className: "absolute inset-y-0 right-0 flex items-center px-2 text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ n(F, { icon: "octicon:chevron-down-12" }) })
2441
+ /* @__PURE__ */ n(de, { className: "absolute inset-y-0 right-0 flex items-center px-2 text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ n(W, { icon: "octicon:chevron-down-12" }) })
2442
2442
  ] }),
2443
- /* @__PURE__ */ n(ue, { anchor: "bottom start", className: "select-options__combo", children: h.length === 0 ? /* @__PURE__ */ n("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : h == null ? void 0 : h.map((v) => /* @__PURE__ */ n(
2443
+ /* @__PURE__ */ n(ue, { anchor: "bottom start", className: "select-options__combo", children: h.length === 0 ? /* @__PURE__ */ n("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : h == null ? void 0 : h.map((b) => /* @__PURE__ */ n(
2444
2444
  ce,
2445
2445
  {
2446
- value: v,
2447
- className: ({ active: f, selected: y }) => W("select-option", { active: f, selected: y }),
2448
- children: ({ selected: f }) => /* @__PURE__ */ n("div", { className: W("option-text", { selected: f }), children: v.label })
2446
+ value: b,
2447
+ className: ({ active: f, selected: y }) => U("select-option", { active: f, selected: y }),
2448
+ children: ({ selected: f }) => /* @__PURE__ */ n("div", { className: U("option-text", { selected: f }), children: b.label })
2449
2449
  },
2450
- v.value
2450
+ b.value
2451
2451
  )) })
2452
2452
  ]
2453
2453
  }
@@ -2465,7 +2465,7 @@ function Eo({
2465
2465
  watch: l
2466
2466
  } = e || {};
2467
2467
  let d;
2468
- return l && (d = l()[i.id]), R(() => {
2468
+ return l && (d = l()[i.id]), I(() => {
2469
2469
  o(i.id);
2470
2470
  }, [i.id, o]), /* @__PURE__ */ n(ti, { children: i.selectType === "list" ? /* @__PURE__ */ n(
2471
2471
  Si,
@@ -2476,7 +2476,7 @@ function Eo({
2476
2476
  setValue: a,
2477
2477
  trigger: s,
2478
2478
  value: d,
2479
- className: W("field-control", i == null ? void 0 : i.customClass),
2479
+ className: U("field-control", i == null ? void 0 : i.customClass),
2480
2480
  disabled: e == null ? void 0 : e.isReadOnly
2481
2481
  }
2482
2482
  ) : /* @__PURE__ */ n(
@@ -2500,7 +2500,7 @@ function Ro({
2500
2500
  {
2501
2501
  placeholder: i.placeholder,
2502
2502
  rows: 4,
2503
- className: W("field-control resize-none", i == null ? void 0 : i.customClass),
2503
+ className: U("field-control resize-none", i == null ? void 0 : i.customClass),
2504
2504
  ...o(i.id),
2505
2505
  disabled: e == null ? void 0 : e.isReadOnly
2506
2506
  }
@@ -2542,24 +2542,24 @@ const Io = ({
2542
2542
  activeTab: a,
2543
2543
  btnClass: l = ""
2544
2544
  }) => {
2545
- const d = W(
2545
+ const d = U(
2546
2546
  "flex gap-x-3 mb-8 w-full no-scrollbar overflow-x-auto border-b-2 border-[#EAECF0] darks:border-gray-500",
2547
2547
  e
2548
2548
  );
2549
2549
  return /* @__PURE__ */ n("div", { className: d, children: i == null ? void 0 : i.map((u) => {
2550
- const c = a === u.key, r = o[u.key] || 0, t = W(
2550
+ const c = a === u.key, r = o[u.key] || 0, t = U(
2551
2551
  "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",
2552
2552
  `${i.length === 1 ? "justify-start" : "justify-center"}`,
2553
2553
  l
2554
- ), h = W({
2554
+ ), h = U({
2555
2555
  "border-gray-500 border-primary border-primary-500 text-primary text-primary-500": c,
2556
2556
  "border-transparent text-gray-400 ": !c
2557
2557
  }), m = r > 0 && /* @__PURE__ */ n("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: r });
2558
- return /* @__PURE__ */ b(
2558
+ return /* @__PURE__ */ v(
2559
2559
  "button",
2560
2560
  {
2561
2561
  onClick: () => s(u.key),
2562
- className: W(t, h),
2562
+ className: U(t, h),
2563
2563
  "aria-selected": c,
2564
2564
  role: "tab",
2565
2565
  type: "button",
@@ -2958,7 +2958,7 @@ function Yo({
2958
2958
  const [s, a] = P(
2959
2959
  (i == null ? void 0 : i.length) > 0 ? i : [{ value: "" }]
2960
2960
  );
2961
- R(() => {
2961
+ I(() => {
2962
2962
  (i == null ? void 0 : i.length) > 0 && JSON.stringify(i) !== JSON.stringify(s) && a(i);
2963
2963
  }, [i]);
2964
2964
  function l(c, r) {
@@ -2981,16 +2981,16 @@ function Yo({
2981
2981
  const r = s.filter((t, h) => h !== c);
2982
2982
  a(r), e && e(r);
2983
2983
  }
2984
- return R(() => {
2984
+ return I(() => {
2985
2985
  o && o(JSON.stringify({ values: s }));
2986
- }, [o, s]), /* @__PURE__ */ b("div", { className: "]", children: [
2987
- /* @__PURE__ */ b("div", { className: "border border-gray-200 rounded-lg overflow-hidden", children: [
2986
+ }, [o, s]), /* @__PURE__ */ v("div", { className: "]", children: [
2987
+ /* @__PURE__ */ v("div", { className: "border border-gray-200 rounded-lg overflow-hidden", children: [
2988
2988
  /* @__PURE__ */ n("div", { className: "grid text-sm font-bold border-b border-gray-100 bg-gray-50", children: /* @__PURE__ */ n("div", { className: "px-2 py-2", children: /* @__PURE__ */ n("span", { className: "", children: "Add Denominations" }) }) }),
2989
2989
  s == null ? void 0 : s.map((c, r) => /* @__PURE__ */ n(
2990
2990
  "div",
2991
2991
  {
2992
2992
  className: "grid text-sm border-b border-gray-100",
2993
- children: /* @__PURE__ */ b("div", { className: "flex items-center gap-x-4 px-2 py-1", children: [
2993
+ children: /* @__PURE__ */ v("div", { className: "flex items-center gap-x-4 px-2 py-1", children: [
2994
2994
  /* @__PURE__ */ n("span", { className: "flex-1", children: /* @__PURE__ */ n(
2995
2995
  Gi,
2996
2996
  {
@@ -3028,14 +3028,14 @@ function Yo({
3028
3028
  ) })
3029
3029
  ] });
3030
3030
  }
3031
- const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700", children: /* @__PURE__ */ b("ul", { children: [
3032
- /* @__PURE__ */ b("li", { className: "text-xs", children: [
3031
+ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700", children: /* @__PURE__ */ v("ul", { children: [
3032
+ /* @__PURE__ */ v("li", { className: "text-xs", children: [
3033
3033
  "API URL example format: ",
3034
3034
  /* @__PURE__ */ n("code", { children: "https://example.com/validation?value={value}" })
3035
3035
  ] }),
3036
- /* @__PURE__ */ b("li", { className: "text-xs", children: [
3036
+ /* @__PURE__ */ v("li", { className: "text-xs", children: [
3037
3037
  /* @__PURE__ */ n("span", { className: "block mb-1", children: " Response example format:" }),
3038
- /* @__PURE__ */ n("pre", { className: "bg-white p-2 rounded-md", children: /* @__PURE__ */ b("code", { children: [
3038
+ /* @__PURE__ */ n("pre", { className: "bg-white p-2 rounded-md", children: /* @__PURE__ */ v("code", { children: [
3039
3039
  "{ ",
3040
3040
  /* @__PURE__ */ n("br", {}),
3041
3041
  '  "data": { ',
@@ -3049,13 +3049,13 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3049
3049
  "}"
3050
3050
  ] }) })
3051
3051
  ] })
3052
- ] }) }), $o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700 text-sm space-y-3", children: /* @__PURE__ */ b("ul", { className: "list-disc list-inside space-y-1", children: [
3053
- /* @__PURE__ */ b("li", { children: [
3052
+ ] }) }), $o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700 text-sm space-y-3", children: /* @__PURE__ */ v("ul", { className: "list-disc list-inside space-y-1", children: [
3053
+ /* @__PURE__ */ v("li", { children: [
3054
3054
  /* @__PURE__ */ n("strong", { children: "Method:" }),
3055
3055
  " ",
3056
3056
  /* @__PURE__ */ n("code", { children: "GET" })
3057
3057
  ] }),
3058
- /* @__PURE__ */ b("li", { children: [
3058
+ /* @__PURE__ */ v("li", { children: [
3059
3059
  /* @__PURE__ */ n("strong", { children: "Response format:" }),
3060
3060
  /* @__PURE__ */ n("pre", { className: "bg-white p-2 mt-1 rounded-md overflow-auto text-xs", children: /* @__PURE__ */ n("code", { children: `{
3061
3061
  "data": [
@@ -3084,8 +3084,8 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3084
3084
  type: a
3085
3085
  }) => {
3086
3086
  const [l, d] = P(""), u = di("config");
3087
- return /* @__PURE__ */ b("div", { children: [
3088
- /* @__PURE__ */ b("div", { className: "relative", children: [
3087
+ return /* @__PURE__ */ v("div", { children: [
3088
+ /* @__PURE__ */ v("div", { className: "relative", children: [
3089
3089
  /* @__PURE__ */ n(
3090
3090
  "label",
3091
3091
  {
@@ -3104,7 +3104,7 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3104
3104
  d(t.name);
3105
3105
  const h = new FileReader();
3106
3106
  t.name.endsWith(".csv") ? (h.onload = (m) => {
3107
- const v = m.target.result, f = pe.parse(v, { header: !0 });
3107
+ const b = m.target.result, f = pe.parse(b, { header: !0 });
3108
3108
  i(
3109
3109
  e,
3110
3110
  (a === "dataGrid" ? sn : an)(
@@ -3112,17 +3112,17 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3112
3112
  )
3113
3113
  );
3114
3114
  }, h.readAsText(t)) : t.name.endsWith(".xlsx") || t.name.endsWith(".xls") ? (h.onload = (m) => {
3115
- const v = new Uint8Array(m.target.result), f = pn.read(v, { type: "array" }), y = f.SheetNames[0], g = f.Sheets[y], p = pn.utils.sheet_to_json(g);
3115
+ const b = new Uint8Array(m.target.result), f = pn.read(b, { type: "array" }), y = f.SheetNames[0], g = f.Sheets[y], p = pn.utils.sheet_to_json(g);
3116
3116
  i(
3117
3117
  e,
3118
3118
  (a === "dataGrid" ? sn : an)(p)
3119
3119
  );
3120
- }, h.readAsArrayBuffer(t)) : vi.error("Unsupported file type. Please upload a CSV or Excel file.");
3120
+ }, h.readAsArrayBuffer(t)) : hi.error("Unsupported file type. Please upload a CSV or Excel file.");
3121
3121
  },
3122
3122
  className: "mb-4 field-control file:bg-gray-600 file:text-white file:text-sm file:rounded file:border-gray-600 file:outline-none"
3123
3123
  }
3124
3124
  ),
3125
- l && /* @__PURE__ */ b("p", { className: "text-xs text-gray-600 mb-2", children: [
3125
+ l && /* @__PURE__ */ v("p", { className: "text-xs text-gray-600 mb-2", children: [
3126
3126
  "Uploaded: ",
3127
3127
  l
3128
3128
  ] })
@@ -3140,13 +3140,13 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3140
3140
  }
3141
3141
  )
3142
3142
  ] });
3143
- }, Qo = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700 text-sm space-y-3", children: /* @__PURE__ */ b("ul", { className: "list-disc list-inside space-y-1", children: [
3144
- /* @__PURE__ */ b("li", { children: [
3143
+ }, Qo = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700 text-sm space-y-3", children: /* @__PURE__ */ v("ul", { className: "list-disc list-inside space-y-1", children: [
3144
+ /* @__PURE__ */ v("li", { children: [
3145
3145
  /* @__PURE__ */ n("strong", { children: "Method:" }),
3146
3146
  " ",
3147
3147
  /* @__PURE__ */ n("code", { children: "GET" })
3148
3148
  ] }),
3149
- /* @__PURE__ */ b("li", { children: [
3149
+ /* @__PURE__ */ v("li", { children: [
3150
3150
  /* @__PURE__ */ n("strong", { children: "Response format:" }),
3151
3151
  /* @__PURE__ */ n("pre", { className: "bg-white p-2 mt-1 rounded-md overflow-auto text-xs", children: /* @__PURE__ */ n("code", { children: `{
3152
3152
  "data": [
@@ -3154,7 +3154,7 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3154
3154
  ]
3155
3155
  }` }) })
3156
3156
  ] })
3157
- ] }) }), Xo = () => /* @__PURE__ */ n("blockquote", { className: "p-4 space-y-3 text-xs text-gray-700 bg-gray-100 rounded-md", children: /* @__PURE__ */ n("ul", { className: "space-y-1 ", children: /* @__PURE__ */ b("li", { children: [
3157
+ ] }) }), Xo = () => /* @__PURE__ */ n("blockquote", { className: "p-4 space-y-3 text-xs text-gray-700 bg-gray-100 rounded-md", children: /* @__PURE__ */ n("ul", { className: "space-y-1 ", children: /* @__PURE__ */ v("li", { children: [
3158
3158
  /* @__PURE__ */ n("span", { children: "Method:" }),
3159
3159
  " ",
3160
3160
  /* @__PURE__ */ n("code", { children: "GET" }),
@@ -3165,17 +3165,17 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3165
3165
  { "name": "Document Name", "id": "documentMainId", ...restObject },
3166
3166
  ]
3167
3167
  }` }) })
3168
- ] }) }) }), ia = () => /* @__PURE__ */ n("blockquote", { className: "p-4 text-gray-700 bg-gray-100 rounded-md", children: /* @__PURE__ */ b("ul", { children: [
3169
- /* @__PURE__ */ b("li", { className: "text-xs", children: [
3168
+ ] }) }) }), ia = () => /* @__PURE__ */ n("blockquote", { className: "p-4 text-gray-700 bg-gray-100 rounded-md", children: /* @__PURE__ */ v("ul", { children: [
3169
+ /* @__PURE__ */ v("li", { className: "text-xs", children: [
3170
3170
  "Method: GET ",
3171
3171
  /* @__PURE__ */ n("br", {}),
3172
3172
  "URL format:",
3173
3173
  " ",
3174
3174
  /* @__PURE__ */ n("code", { children: "https://example.com/validation/{documentId}" })
3175
3175
  ] }),
3176
- /* @__PURE__ */ b("li", { className: "text-xs", children: [
3176
+ /* @__PURE__ */ v("li", { className: "text-xs", children: [
3177
3177
  /* @__PURE__ */ n("span", { className: "block mb-1", children: " Response example format:" }),
3178
- /* @__PURE__ */ n("pre", { className: "p-2 bg-white rounded-md", children: /* @__PURE__ */ b("code", { children: [
3178
+ /* @__PURE__ */ n("pre", { className: "p-2 bg-white rounded-md", children: /* @__PURE__ */ v("code", { children: [
3179
3179
  "{ ",
3180
3180
  /* @__PURE__ */ n("br", {}),
3181
3181
  '  "data": { ',
@@ -3204,7 +3204,7 @@ function oa({
3204
3204
  watch: s,
3205
3205
  id: a
3206
3206
  }) {
3207
- const { formData: l } = mi(ci), d = s("visibilityDependentFields") || [], u = $(() => {
3207
+ const { formData: l } = bi(ci), d = s("visibilityDependentFields") || [], u = $(() => {
3208
3208
  var r;
3209
3209
  return (r = na(l).filter((t) => t.id !== a)) == null ? void 0 : r.map((t) => {
3210
3210
  const h = d.find(
@@ -3222,11 +3222,11 @@ function oa({
3222
3222
  });
3223
3223
  }, [l, d, a]), c = (r, t, h) => {
3224
3224
  const m = d == null ? void 0 : d.map(
3225
- (v, f) => f === r ? { ...v, [t]: h } : v
3225
+ (b, f) => f === r ? { ...b, [t]: h } : b
3226
3226
  );
3227
3227
  e("visibilityDependentFields", m);
3228
3228
  };
3229
- return /* @__PURE__ */ b("div", { className: "visibility-editor", children: [
3229
+ return /* @__PURE__ */ v("div", { className: "visibility-editor", children: [
3230
3230
  /* @__PURE__ */ n("label", { className: "label", children: "Select Dependent Fields" }),
3231
3231
  /* @__PURE__ */ n(
3232
3232
  rn,
@@ -3241,7 +3241,7 @@ function oa({
3241
3241
  ),
3242
3242
  d.length > 0 && /* @__PURE__ */ n("div", { className: "py-1 bg-gray-100 rounded dependent-fields", children: d == null ? void 0 : d.map((r, t) => {
3243
3243
  var h, m;
3244
- return /* @__PURE__ */ b("div", { className: "dependent-field", children: [
3244
+ return /* @__PURE__ */ v("div", { className: "dependent-field", children: [
3245
3245
  /* @__PURE__ */ n(
3246
3246
  "input",
3247
3247
  {
@@ -3256,8 +3256,8 @@ function oa({
3256
3256
  ii,
3257
3257
  {
3258
3258
  value: r.fieldType,
3259
- onChange: (v) => c(t, "fieldType", v),
3260
- children: /* @__PURE__ */ b("div", { className: "listbox-wrapper", children: [
3259
+ onChange: (b) => c(t, "fieldType", b),
3260
+ children: /* @__PURE__ */ v("div", { className: "listbox-wrapper", children: [
3261
3261
  /* @__PURE__ */ n(ii.Button, { className: "listbox-button", children: r.fieldType }),
3262
3262
  /* @__PURE__ */ n(
3263
3263
  yi,
@@ -3271,14 +3271,14 @@ function oa({
3271
3271
  {
3272
3272
  className: "listbox-options ",
3273
3273
  anchor: "bottom",
3274
- children: zi == null ? void 0 : zi.map((v) => /* @__PURE__ */ n(
3274
+ children: zi == null ? void 0 : zi.map((b) => /* @__PURE__ */ n(
3275
3275
  ii.Option,
3276
3276
  {
3277
- value: v,
3277
+ value: b,
3278
3278
  className: "listbox-option",
3279
- children: v
3279
+ children: b
3280
3280
  },
3281
- v
3281
+ b
3282
3282
  ))
3283
3283
  }
3284
3284
  )
@@ -3291,8 +3291,8 @@ function oa({
3291
3291
  ii,
3292
3292
  {
3293
3293
  value: r.operator,
3294
- onChange: (v) => c(t, "operator", v),
3295
- children: /* @__PURE__ */ b("div", { className: "listbox-wrapper", children: [
3294
+ onChange: (b) => c(t, "operator", b),
3295
+ children: /* @__PURE__ */ v("div", { className: "listbox-wrapper", children: [
3296
3296
  /* @__PURE__ */ n(ii.Button, { className: "listbox-button", children: r.operator.replace("_", " ") }),
3297
3297
  /* @__PURE__ */ n(
3298
3298
  yi,
@@ -3306,14 +3306,14 @@ function oa({
3306
3306
  {
3307
3307
  className: "listbox-options ",
3308
3308
  anchor: "bottom",
3309
- children: (h = r.fieldType === "number" ? [...wn, ...ea] : wn) == null ? void 0 : h.map((v) => /* @__PURE__ */ n(
3309
+ children: (h = r.fieldType === "number" ? [...wn, ...ea] : wn) == null ? void 0 : h.map((b) => /* @__PURE__ */ n(
3310
3310
  ii.Option,
3311
3311
  {
3312
- value: v,
3312
+ value: b,
3313
3313
  className: "listbox-option",
3314
- children: v.replace("_", " ")
3314
+ children: b.replace("_", " ")
3315
3315
  },
3316
- v
3316
+ b
3317
3317
  ))
3318
3318
  }
3319
3319
  )
@@ -3327,7 +3327,7 @@ function oa({
3327
3327
  {
3328
3328
  type: r.fieldType,
3329
3329
  value: r.fieldValue || "",
3330
- onChange: (v) => c(t, "fieldValue", v.target.value),
3330
+ onChange: (b) => c(t, "fieldValue", b.target.value),
3331
3331
  placeholder: "Value",
3332
3332
  className: "field-value"
3333
3333
  }
@@ -3335,8 +3335,8 @@ function oa({
3335
3335
  ii,
3336
3336
  {
3337
3337
  value: (m = r.fieldValue) != null ? m : "",
3338
- onChange: (v) => c(t, "fieldValue", v),
3339
- children: /* @__PURE__ */ b("div", { className: "listbox-wrapper", children: [
3338
+ onChange: (b) => c(t, "fieldValue", b),
3339
+ children: /* @__PURE__ */ v("div", { className: "listbox-wrapper", children: [
3340
3340
  /* @__PURE__ */ n(ii.Button, { className: "listbox-button", children: r.fieldValue === !0 ? "True" : r.fieldValue === !1 ? "False" : "Select value" }),
3341
3341
  /* @__PURE__ */ n(
3342
3342
  yi,
@@ -3345,7 +3345,7 @@ function oa({
3345
3345
  leave: "transition ease-in duration-100",
3346
3346
  leaveFrom: "opacity-100",
3347
3347
  leaveTo: "opacity-0",
3348
- children: /* @__PURE__ */ b(
3348
+ children: /* @__PURE__ */ v(
3349
3349
  ii.Options,
3350
3350
  {
3351
3351
  className: "listbox-options ",
@@ -3457,15 +3457,15 @@ const aa = M.object().shape({
3457
3457
  element: o
3458
3458
  }) => {
3459
3459
  const s = sa.filter(
3460
- (I) => !Ti.includes(o.inputType) || I.key !== "validation"
3460
+ (R) => !Ti.includes(o.inputType) || R.key !== "validation"
3461
3461
  ), { updateElement: a } = si.useContext(ci), [l, d] = P("basic"), [u, c] = P(!1), [r, t] = P("manual"), h = di("config"), {
3462
3462
  register: m,
3463
- handleSubmit: v,
3463
+ handleSubmit: b,
3464
3464
  control: f,
3465
3465
  setValue: y,
3466
3466
  watch: g,
3467
3467
  trigger: p,
3468
- formState: { errors: S, isSubmitting: C, isValid: x },
3468
+ formState: { errors: A, isSubmitting: C, isValid: x },
3469
3469
  reset: k
3470
3470
  } = ln({
3471
3471
  resolver: mn(aa),
@@ -3473,11 +3473,11 @@ const aa = M.object().shape({
3473
3473
  ...o,
3474
3474
  options: o.options || []
3475
3475
  }
3476
- }), A = g(), { fields: N, append: T, remove: Q } = ji({
3476
+ }), S = g(), { fields: N, append: T, remove: Q } = ji({
3477
3477
  control: f,
3478
3478
  name: "options"
3479
3479
  }), {
3480
- fields: U,
3480
+ fields: z,
3481
3481
  append: q,
3482
3482
  remove: w
3483
3483
  } = ji({
@@ -3486,78 +3486,78 @@ const aa = M.object().shape({
3486
3486
  }), {
3487
3487
  fields: Y,
3488
3488
  append: K,
3489
- remove: O
3489
+ remove: G
3490
3490
  } = ji({
3491
3491
  control: f,
3492
3492
  name: "dataColumns"
3493
3493
  });
3494
- R(() => {
3494
+ I(() => {
3495
3495
  i || k();
3496
3496
  }, [i, k]);
3497
- const D = (I) => {
3498
- a(I, o.sectionId), e();
3497
+ const D = (R) => {
3498
+ a(R, o.sectionId), e();
3499
3499
  }, B = {
3500
3500
  headers: {
3501
3501
  Authorization: `Bearer ${di("token")}`
3502
3502
  }
3503
3503
  }, L = Z(async () => {
3504
- var I, J, j;
3505
- if (!A.apiUrl || !/^https?:\/\//.test(A.apiUrl)) {
3506
- vi.info("Please provide a valid API URL");
3504
+ var R, F, j;
3505
+ if (!S.apiUrl || !/^https?:\/\//.test(S.apiUrl)) {
3506
+ hi.info("Please provide a valid API URL");
3507
3507
  return;
3508
3508
  }
3509
3509
  try {
3510
3510
  c(!0);
3511
- const { status: G, data: V } = await xi.get(A.apiUrl, B);
3512
- if (G !== 200 || !V) {
3513
- vi.error("Unexpected response from server.");
3511
+ const { status: H, data: V } = await xi.get(S.apiUrl, B);
3512
+ if (H !== 200 || !V) {
3513
+ hi.error("Unexpected response from server.");
3514
3514
  return;
3515
3515
  }
3516
3516
  const X = V.data || V.record || V.result;
3517
3517
  if (!Array.isArray(X)) {
3518
- vi.error("Expected an array in response (data, record, or result).");
3518
+ hi.error("Expected an array in response (data, record, or result).");
3519
3519
  return;
3520
3520
  }
3521
- ((I = o.type) == null ? void 0 : I.toLowerCase()) === "datagrid" ? y("dataColumns", sn(X)) : y("options", an(X));
3522
- } catch (G) {
3523
- const V = ((j = (J = G == null ? void 0 : G.response) == null ? void 0 : J.data) == null ? void 0 : j.message) || (G == null ? void 0 : G.message) || "Unable to load options";
3524
- vi.error(V);
3521
+ ((R = o.type) == null ? void 0 : R.toLowerCase()) === "datagrid" ? y("dataColumns", sn(X)) : y("options", an(X));
3522
+ } catch (H) {
3523
+ const V = ((j = (F = H == null ? void 0 : H.response) == null ? void 0 : F.data) == null ? void 0 : j.message) || (H == null ? void 0 : H.message) || "Unable to load options";
3524
+ hi.error(V);
3525
3525
  } finally {
3526
3526
  c(!1);
3527
3527
  }
3528
- }, [o.type, y, A.apiUrl]), z = ["manual", "api", "sheet"];
3528
+ }, [o.type, y, S.apiUrl]), J = ["manual", "api", "sheet"];
3529
3529
  function ai() {
3530
3530
  r === "api" && L();
3531
3531
  }
3532
3532
  const _ = () => {
3533
- var I, J;
3534
- return /* @__PURE__ */ b("div", { className: "flex flex-col justify-start gap-y-1", children: [
3535
- /* @__PURE__ */ n("div", { className: "flex items-center mb-4 gap-x-5", children: z == null ? void 0 : z.map((j) => /* @__PURE__ */ b("label", { className: "items-center text-base capitalize gap-x-3", children: [
3533
+ var R, F;
3534
+ return /* @__PURE__ */ v("div", { className: "flex flex-col justify-start gap-y-1", children: [
3535
+ /* @__PURE__ */ n("div", { className: "flex items-center mb-4 gap-x-5", children: J == null ? void 0 : J.map((j) => /* @__PURE__ */ v("label", { className: "items-center text-base capitalize gap-x-3", children: [
3536
3536
  /* @__PURE__ */ n(
3537
3537
  "input",
3538
3538
  {
3539
3539
  type: "radio",
3540
3540
  name: "optionType",
3541
- onChange: (G) => t(G.target.value),
3541
+ onChange: (H) => t(H.target.value),
3542
3542
  value: j
3543
3543
  }
3544
3544
  ),
3545
3545
  " ",
3546
- /* @__PURE__ */ b("span", { children: [
3546
+ /* @__PURE__ */ v("span", { children: [
3547
3547
  j,
3548
3548
  " options"
3549
3549
  ] })
3550
3550
  ] }, j)) }),
3551
- r === "api" && /* @__PURE__ */ b("div", { className: "mb-4", children: [
3552
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-2", children: [
3553
- /* @__PURE__ */ b("div", { className: "relative flex items-center w-full mb-2", children: [
3551
+ r === "api" && /* @__PURE__ */ v("div", { className: "mb-4", children: [
3552
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-2", children: [
3553
+ /* @__PURE__ */ v("div", { className: "relative flex items-center w-full mb-2", children: [
3554
3554
  /* @__PURE__ */ n(
3555
- H,
3555
+ O,
3556
3556
  {
3557
3557
  watch: g,
3558
3558
  label: "Load Options from Api",
3559
3559
  name: "apiUrl",
3560
- errors: S,
3560
+ errors: A,
3561
3561
  register: m,
3562
3562
  className: "!w-full",
3563
3563
  placeholder: "https://example.com/options",
@@ -3587,26 +3587,26 @@ const aa = M.object().shape({
3587
3587
  name: "options"
3588
3588
  }
3589
3589
  ) }),
3590
- /* @__PURE__ */ b("div", { children: [
3591
- /* @__PURE__ */ n("h3", { className: "mb-4 text-sm text-gray-500 font-semibold", children: ((I = o == null ? void 0 : o.type) == null ? void 0 : I.toLowerCase()) === "matrix" ? "Rows Options" : "Parent Options" }),
3592
- N == null ? void 0 : N.map((j, G) => /* @__PURE__ */ b(
3590
+ /* @__PURE__ */ v("div", { children: [
3591
+ /* @__PURE__ */ n("h3", { className: "mb-4 text-sm text-gray-500 font-semibold", children: ((R = o == null ? void 0 : o.type) == null ? void 0 : R.toLowerCase()) === "matrix" ? "Rows Options" : "Parent Options" }),
3592
+ N == null ? void 0 : N.map((j, H) => /* @__PURE__ */ v(
3593
3593
  "div",
3594
3594
  {
3595
3595
  className: "flex items-center mb-1 gap-x-4 last:mb-0",
3596
3596
  children: [
3597
3597
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3598
- H,
3598
+ O,
3599
3599
  {
3600
3600
  watch: g,
3601
- label: G === 0 ? "Label" : "",
3602
- name: `options.${G}.label`,
3601
+ label: H === 0 ? "Label" : "",
3602
+ name: `options.${H}.label`,
3603
3603
  register: m,
3604
- errors: S,
3604
+ errors: A,
3605
3605
  element: o,
3606
3606
  placeholder: "Label",
3607
3607
  onChange: (V) => {
3608
3608
  const oi = V.target.value.toLowerCase().trim().replace(/[\s-]+/g, "_").replace(/[^a-z0-9_]/g, "");
3609
- y(`options.${G}.value`, oi, {
3609
+ y(`options.${H}.value`, oi, {
3610
3610
  shouldValidate: !0,
3611
3611
  shouldDirty: !0
3612
3612
  });
@@ -3614,13 +3614,13 @@ const aa = M.object().shape({
3614
3614
  }
3615
3615
  ) }),
3616
3616
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3617
- H,
3617
+ O,
3618
3618
  {
3619
3619
  watch: g,
3620
- label: G === 0 ? "Value" : "",
3621
- name: `options.${G}.value`,
3620
+ label: H === 0 ? "Value" : "",
3621
+ name: `options.${H}.value`,
3622
3622
  register: m,
3623
- errors: S,
3623
+ errors: A,
3624
3624
  element: o,
3625
3625
  placeholder: "Value"
3626
3626
  }
@@ -3631,8 +3631,8 @@ const aa = M.object().shape({
3631
3631
  disabled: N.length === 1,
3632
3632
  type: "button",
3633
3633
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
3634
- onClick: () => Q(G),
3635
- children: /* @__PURE__ */ n(F, { icon: "iconamoon:sign-times-fill" })
3634
+ onClick: () => Q(H),
3635
+ children: /* @__PURE__ */ n(W, { icon: "iconamoon:sign-times-fill" })
3636
3636
  }
3637
3637
  )
3638
3638
  ]
@@ -3640,45 +3640,45 @@ const aa = M.object().shape({
3640
3640
  j.id
3641
3641
  )),
3642
3642
  " ",
3643
- /* @__PURE__ */ b("div", { children: [
3643
+ /* @__PURE__ */ v("div", { children: [
3644
3644
  " ",
3645
- /* @__PURE__ */ b(
3645
+ /* @__PURE__ */ v(
3646
3646
  "button",
3647
3647
  {
3648
3648
  type: "button",
3649
3649
  className: "flex items-center mt-2 text-sm font-medium text-gray-700 gap-x-1",
3650
3650
  onClick: () => T({ label: "", value: "", id: ri() }),
3651
3651
  children: [
3652
- /* @__PURE__ */ n(F, { icon: "qlementine-icons:plus-16" }),
3652
+ /* @__PURE__ */ n(W, { icon: "qlementine-icons:plus-16" }),
3653
3653
  " Add Option"
3654
3654
  ]
3655
3655
  }
3656
3656
  )
3657
3657
  ] })
3658
3658
  ] }),
3659
- ["cascadeselect", "matrix"].includes(o.type.toLowerCase()) && /* @__PURE__ */ b(ti, { children: [
3659
+ ["cascadeselect", "matrix"].includes(o.type.toLowerCase()) && /* @__PURE__ */ v(ti, { children: [
3660
3660
  /* @__PURE__ */ n("hr", { className: "my-5" }),
3661
- /* @__PURE__ */ b("div", { children: [
3661
+ /* @__PURE__ */ v("div", { children: [
3662
3662
  " ",
3663
- /* @__PURE__ */ n("h3", { className: "mb-4 text-sm text-gray-500 font-semibold", children: ((J = o == null ? void 0 : o.type) == null ? void 0 : J.toLowerCase()) === "matrix" ? "Columns Options" : "Child Options" }),
3664
- U == null ? void 0 : U.map((j, G) => /* @__PURE__ */ b(
3663
+ /* @__PURE__ */ n("h3", { className: "mb-4 text-sm text-gray-500 font-semibold", children: ((F = o == null ? void 0 : o.type) == null ? void 0 : F.toLowerCase()) === "matrix" ? "Columns Options" : "Child Options" }),
3664
+ z == null ? void 0 : z.map((j, H) => /* @__PURE__ */ v(
3665
3665
  "div",
3666
3666
  {
3667
3667
  className: "flex items-center mb-1 gap-x-4 last:mb-0",
3668
3668
  children: [
3669
3669
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3670
- H,
3670
+ O,
3671
3671
  {
3672
3672
  watch: g,
3673
- label: G === 0 ? "Label" : "",
3674
- name: `options1.${G}.label`,
3673
+ label: H === 0 ? "Label" : "",
3674
+ name: `options1.${H}.label`,
3675
3675
  register: m,
3676
- errors: S,
3676
+ errors: A,
3677
3677
  element: o,
3678
3678
  placeholder: "Label",
3679
3679
  onChange: (V) => {
3680
3680
  const oi = V.target.value.toLowerCase().trim().replace(/[\s-]+/g, "_").replace(/[^a-z0-9_]/g, "");
3681
- y(`options1.${G}.value`, oi, {
3681
+ y(`options1.${H}.value`, oi, {
3682
3682
  shouldValidate: !0,
3683
3683
  shouldDirty: !0
3684
3684
  });
@@ -3686,25 +3686,25 @@ const aa = M.object().shape({
3686
3686
  }
3687
3687
  ) }),
3688
3688
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3689
- H,
3689
+ O,
3690
3690
  {
3691
3691
  watch: g,
3692
- label: G === 0 ? "Value" : "",
3693
- name: `options1.${G}.value`,
3692
+ label: H === 0 ? "Value" : "",
3693
+ name: `options1.${H}.value`,
3694
3694
  register: m,
3695
- errors: S,
3695
+ errors: A,
3696
3696
  element: o,
3697
3697
  placeholder: "Value"
3698
3698
  }
3699
3699
  ) }),
3700
3700
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3701
- H,
3701
+ O,
3702
3702
  {
3703
3703
  watch: g,
3704
- label: G === 0 ? "Key" : "",
3705
- name: `options1.${G}.key`,
3704
+ label: H === 0 ? "Key" : "",
3705
+ name: `options1.${H}.key`,
3706
3706
  register: m,
3707
- errors: S,
3707
+ errors: A,
3708
3708
  element: o,
3709
3709
  placeholder: "Key"
3710
3710
  }
@@ -3712,27 +3712,27 @@ const aa = M.object().shape({
3712
3712
  /* @__PURE__ */ n(
3713
3713
  "button",
3714
3714
  {
3715
- disabled: U.length === 1,
3715
+ disabled: z.length === 1,
3716
3716
  type: "button",
3717
3717
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
3718
- onClick: () => w(G),
3719
- children: /* @__PURE__ */ n(F, { icon: "iconamoon:sign-times-fill" })
3718
+ onClick: () => w(H),
3719
+ children: /* @__PURE__ */ n(W, { icon: "iconamoon:sign-times-fill" })
3720
3720
  }
3721
3721
  )
3722
3722
  ]
3723
3723
  },
3724
3724
  j.id
3725
3725
  )),
3726
- /* @__PURE__ */ b("div", { children: [
3726
+ /* @__PURE__ */ v("div", { children: [
3727
3727
  " ",
3728
- /* @__PURE__ */ b(
3728
+ /* @__PURE__ */ v(
3729
3729
  "button",
3730
3730
  {
3731
3731
  type: "button",
3732
3732
  className: "flex items-center mt-2 text-sm font-medium text-gray-700 gap-x-1",
3733
3733
  onClick: () => q({ label: "", value: "", key: "", id: ri() }),
3734
3734
  children: [
3735
- /* @__PURE__ */ n(F, { icon: "qlementine-icons:plus-16" }),
3735
+ /* @__PURE__ */ n(W, { icon: "qlementine-icons:plus-16" }),
3736
3736
  " Add Option"
3737
3737
  ]
3738
3738
  }
@@ -3741,34 +3741,34 @@ const aa = M.object().shape({
3741
3741
  ] })
3742
3742
  ] })
3743
3743
  ] });
3744
- }, ni = () => /* @__PURE__ */ b("div", { className: "flex flex-col justify-start gap-y-1", children: [
3745
- /* @__PURE__ */ n("div", { className: "flex items-center mb-4 gap-x-5", children: z == null ? void 0 : z.map((I) => /* @__PURE__ */ b("label", { className: "items-center text-base capitalize gap-x-3", children: [
3744
+ }, ni = () => /* @__PURE__ */ v("div", { className: "flex flex-col justify-start gap-y-1", children: [
3745
+ /* @__PURE__ */ n("div", { className: "flex items-center mb-4 gap-x-5", children: J == null ? void 0 : J.map((R) => /* @__PURE__ */ v("label", { className: "items-center text-base capitalize gap-x-3", children: [
3746
3746
  /* @__PURE__ */ n(
3747
3747
  "input",
3748
3748
  {
3749
3749
  type: "radio",
3750
3750
  name: "optionType",
3751
- onChange: (J) => t(J.target.value),
3752
- value: I,
3753
- checked: I === r
3751
+ onChange: (F) => t(F.target.value),
3752
+ value: R,
3753
+ checked: R === r
3754
3754
  }
3755
3755
  ),
3756
3756
  " ",
3757
- /* @__PURE__ */ b("span", { children: [
3758
- I,
3757
+ /* @__PURE__ */ v("span", { children: [
3758
+ R,
3759
3759
  " options"
3760
3760
  ] })
3761
- ] }, I)) }),
3762
- r === "api" && /* @__PURE__ */ b("div", { className: "mb-4", children: [
3763
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-2", children: [
3764
- /* @__PURE__ */ b("div", { className: "relative flex items-center w-full mb-2", children: [
3761
+ ] }, R)) }),
3762
+ r === "api" && /* @__PURE__ */ v("div", { className: "mb-4", children: [
3763
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-2", children: [
3764
+ /* @__PURE__ */ v("div", { className: "relative flex items-center w-full mb-2", children: [
3765
3765
  /* @__PURE__ */ n(
3766
- H,
3766
+ O,
3767
3767
  {
3768
3768
  watch: g,
3769
3769
  label: "Load Columns from Api",
3770
3770
  name: "apiUrl",
3771
- errors: S,
3771
+ errors: A,
3772
3772
  register: m,
3773
3773
  className: "!w-full",
3774
3774
  placeholder: "https://example.com/columns"
@@ -3798,11 +3798,11 @@ const aa = M.object().shape({
3798
3798
  name: "dataColumns"
3799
3799
  }
3800
3800
  ) }),
3801
- /* @__PURE__ */ n("div", { className: "grid gap-y-3", children: Y == null ? void 0 : Y.map((I, J) => /* @__PURE__ */ b("div", { className: "flex items-center gap-x-4 ", children: [
3801
+ /* @__PURE__ */ n("div", { className: "grid gap-y-3", children: Y == null ? void 0 : Y.map((R, F) => /* @__PURE__ */ v("div", { className: "flex items-center gap-x-4 ", children: [
3802
3802
  /* @__PURE__ */ n("div", { className: "min-w-[140px]", children: /* @__PURE__ */ n(
3803
3803
  Si,
3804
3804
  {
3805
- label: J === 0 ? "Type" : "",
3805
+ label: F === 0 ? "Type" : "",
3806
3806
  options: [
3807
3807
  {
3808
3808
  label: "Text",
@@ -3818,45 +3818,58 @@ const aa = M.object().shape({
3818
3818
  }
3819
3819
  ],
3820
3820
  register: m,
3821
- name: `dataColumns.${J}.type`,
3821
+ name: `dataColumns.${F}.type`,
3822
3822
  setValue: y,
3823
3823
  trigger: p,
3824
- value: A.dataColumns[J].type
3824
+ value: S.dataColumns[F].type
3825
3825
  }
3826
3826
  ) }),
3827
3827
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3828
- H,
3828
+ O,
3829
3829
  {
3830
3830
  watch: g,
3831
- label: J === 0 ? "Display header" : "",
3832
- name: `dataColumns.${J}.headerName`,
3831
+ label: F === 0 ? "Display header" : "",
3832
+ name: `dataColumns.${F}.headerName`,
3833
3833
  register: m,
3834
3834
  onChange: (j) => {
3835
3835
  const V = j.target.value.toLowerCase().trim().replace(/[\s-]+/g, "_").replace(/[^a-z0-9_]/g, "");
3836
- y(`dataColumns.${J}.field`, V, {
3836
+ y(`dataColumns.${F}.field`, V, {
3837
3837
  shouldValidate: !0,
3838
3838
  shouldDirty: !0
3839
3839
  });
3840
3840
  },
3841
- errors: S,
3841
+ errors: A,
3842
3842
  element: o,
3843
3843
  placeholder: "header"
3844
3844
  }
3845
3845
  ) }),
3846
+ /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3847
+ O,
3848
+ {
3849
+ watch: g,
3850
+ label: F === 0 ? "Field key" : "",
3851
+ name: `dataColumns.${F}.field`,
3852
+ register: m,
3853
+ errors: A,
3854
+ element: o,
3855
+ placeholder: "fieldKey",
3856
+ disabled: !0
3857
+ }
3858
+ ) }),
3846
3859
  /* @__PURE__ */ n(
3847
3860
  "button",
3848
3861
  {
3849
3862
  disabled: Y.length === 1,
3850
3863
  type: "button",
3851
3864
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
3852
- onClick: () => O(J),
3853
- children: /* @__PURE__ */ n(F, { icon: "iconamoon:sign-times-fill" })
3865
+ onClick: () => G(F),
3866
+ children: /* @__PURE__ */ n(W, { icon: "iconamoon:sign-times-fill" })
3854
3867
  }
3855
3868
  )
3856
- ] }, I.id)) }),
3857
- /* @__PURE__ */ b("div", { children: [
3869
+ ] }, R.id)) }),
3870
+ /* @__PURE__ */ v("div", { children: [
3858
3871
  " ",
3859
- /* @__PURE__ */ b(
3872
+ /* @__PURE__ */ v(
3860
3873
  "button",
3861
3874
  {
3862
3875
  type: "button",
@@ -3870,39 +3883,39 @@ const aa = M.object().shape({
3870
3883
  validate: !1
3871
3884
  }),
3872
3885
  children: [
3873
- /* @__PURE__ */ n(F, { icon: "qlementine-icons:plus-16" }),
3886
+ /* @__PURE__ */ n(W, { icon: "qlementine-icons:plus-16" }),
3874
3887
  " Add column"
3875
3888
  ]
3876
3889
  }
3877
3890
  )
3878
3891
  ] })
3879
3892
  ] }), ui = Z(async () => {
3880
- const I = di("token"), { status: J, data: j } = await xi.get(A.url, {
3893
+ const R = di("token"), { status: F, data: j } = await xi.get(S.url, {
3881
3894
  headers: {
3882
- Authorization: `Bearer ${I}`
3895
+ Authorization: `Bearer ${R}`
3883
3896
  }
3884
3897
  });
3885
- J === 200 && y("options", (j == null ? void 0 : j.data) || j);
3886
- }, [y, A.url]);
3887
- R(() => {
3888
- o.type === "document" && A.url && ui();
3889
- }, [A.url, o.type, ui]);
3898
+ F === 200 && y("options", (j == null ? void 0 : j.data) || j);
3899
+ }, [y, S.url]);
3900
+ I(() => {
3901
+ o.type === "document" && S.url && ui();
3902
+ }, [S.url, o.type, ui]);
3890
3903
  const li = /* @__PURE__ */ n(
3891
3904
  "div",
3892
3905
  {
3893
3906
  className: "fixed inset-0 bg-gray-800/40 backdrop-blur-sm flex items-center justify-end z-[999] cursor-default",
3894
- onMouseDown: (I) => I.stopPropagation(),
3895
- onPointerDown: (I) => I.stopPropagation(),
3896
- onDragStart: (I) => {
3897
- I.preventDefault(), I.stopPropagation();
3907
+ onMouseDown: (R) => R.stopPropagation(),
3908
+ onPointerDown: (R) => R.stopPropagation(),
3909
+ onDragStart: (R) => {
3910
+ R.preventDefault(), R.stopPropagation();
3898
3911
  },
3899
- children: /* @__PURE__ */ b("div", { className: "w-full lg:w-2/3 xl:w-2/5 bg-white h-screen shadow-xl relative flex flex-col items-center", children: [
3912
+ children: /* @__PURE__ */ v("div", { className: "w-full lg:w-2/3 xl:w-2/5 bg-white h-screen shadow-xl relative flex flex-col items-center", children: [
3900
3913
  /* @__PURE__ */ n(
3901
3914
  "button",
3902
3915
  {
3903
3916
  className: "bg-white h-10 w-10 flex justify-center items-center absolute top-1 -left-12 rounded-lg hover:bg-gray-50",
3904
3917
  onClick: e,
3905
- children: /* @__PURE__ */ n(F, { icon: "tabler:x", iconClass: "text-xl" })
3918
+ children: /* @__PURE__ */ n(W, { icon: "tabler:x", iconClass: "text-xl" })
3906
3919
  }
3907
3920
  ),
3908
3921
  /* @__PURE__ */ n("div", { className: "w-full pt-4", children: /* @__PURE__ */ n(
@@ -3915,84 +3928,84 @@ const aa = M.object().shape({
3915
3928
  btnClass: " !text-left"
3916
3929
  }
3917
3930
  ) }),
3918
- /* @__PURE__ */ b(
3931
+ /* @__PURE__ */ v(
3919
3932
  "form",
3920
3933
  {
3921
- onSubmit: v(D),
3934
+ onSubmit: b(D),
3922
3935
  className: "w-full flex-1 flex flex-col",
3923
3936
  children: [
3924
- /* @__PURE__ */ b("div", { className: "flex-1", children: [
3937
+ /* @__PURE__ */ v("div", { className: "flex-1", children: [
3925
3938
  " ",
3926
- /* @__PURE__ */ b("div", { className: " max-h-[70vh] overflow-y-auto flex-1", children: [
3927
- l === "basic" && /* @__PURE__ */ b("div", { className: "z-10 flex flex-col w-full gap-5 px-6", children: [
3939
+ /* @__PURE__ */ v("div", { className: " max-h-[70vh] overflow-y-auto flex-1", children: [
3940
+ l === "basic" && /* @__PURE__ */ v("div", { className: "z-10 flex flex-col w-full gap-5 px-6", children: [
3928
3941
  Ui.includes(o.inputType) && /* @__PURE__ */ n(ti, { children: /* @__PURE__ */ n(
3929
- H,
3942
+ O,
3930
3943
  {
3931
3944
  watch: g,
3932
3945
  label: "Value",
3933
3946
  name: "value",
3934
3947
  register: m,
3935
- errors: S,
3948
+ errors: A,
3936
3949
  element: o
3937
3950
  }
3938
3951
  ) }),
3939
- !Ui.includes(o.inputType) && !Ti.includes(o.inputType) && /* @__PURE__ */ b(ti, { children: [
3952
+ !Ui.includes(o.inputType) && !Ti.includes(o.inputType) && /* @__PURE__ */ v(ti, { children: [
3940
3953
  /* @__PURE__ */ n(
3941
- H,
3954
+ O,
3942
3955
  {
3943
3956
  watch: g,
3944
3957
  label: "Label",
3945
3958
  name: "inputLabel",
3946
3959
  register: m,
3947
- errors: S,
3960
+ errors: A,
3948
3961
  element: o
3949
3962
  }
3950
3963
  ),
3951
3964
  " ",
3952
3965
  o.type.toLowerCase() === "cascadeselect" && /* @__PURE__ */ n(
3953
- H,
3966
+ O,
3954
3967
  {
3955
3968
  watch: g,
3956
3969
  label: "Child Label",
3957
3970
  name: "childLabel",
3958
3971
  register: m,
3959
- errors: S,
3972
+ errors: A,
3960
3973
  element: o
3961
3974
  }
3962
3975
  )
3963
3976
  ] }),
3964
3977
  Wo.includes(o.inputType) && /* @__PURE__ */ n(
3965
- H,
3978
+ O,
3966
3979
  {
3967
3980
  watch: g,
3968
3981
  label: "Placeholder",
3969
3982
  name: "placeholder",
3970
3983
  register: m,
3971
- errors: S,
3984
+ errors: A,
3972
3985
  element: o
3973
3986
  }
3974
3987
  ),
3975
3988
  Vo.includes(o.inputType) && /* @__PURE__ */ n(
3976
- H,
3989
+ O,
3977
3990
  {
3978
3991
  watch: g,
3979
3992
  label: "Prefix",
3980
3993
  name: "prefix",
3981
3994
  register: m,
3982
- errors: S,
3995
+ errors: A,
3983
3996
  element: o
3984
3997
  }
3985
3998
  ),
3986
- Jo.includes(o.inputType) && /* @__PURE__ */ b("div", { className: "grid gap-y-4", children: [
3999
+ Jo.includes(o.inputType) && /* @__PURE__ */ v("div", { className: "grid gap-y-4", children: [
3987
4000
  /* @__PURE__ */ n(_o, {}),
3988
4001
  /* @__PURE__ */ n(
3989
- H,
4002
+ O,
3990
4003
  {
3991
4004
  watch: g,
3992
4005
  label: "Api Url",
3993
4006
  name: "url",
3994
4007
  register: m,
3995
- errors: S,
4008
+ errors: A,
3996
4009
  element: o
3997
4010
  }
3998
4011
  ),
@@ -4042,24 +4055,24 @@ const aa = M.object().shape({
4042
4055
  Zo.includes(o.inputType) && /* @__PURE__ */ n(
4043
4056
  Yo,
4044
4057
  {
4045
- onChange: (I) => {
4046
- y("denominators", I);
4058
+ onChange: (R) => {
4059
+ y("denominators", R);
4047
4060
  },
4048
4061
  value: g("denominators")
4049
4062
  }
4050
4063
  ),
4051
4064
  !Ui.includes(o.inputType) && !Ti.includes(o.inputType) && /* @__PURE__ */ n(
4052
- H,
4065
+ O,
4053
4066
  {
4054
4067
  watch: g,
4055
4068
  label: "Short Description",
4056
4069
  name: "description",
4057
4070
  register: m,
4058
- errors: S,
4071
+ errors: A,
4059
4072
  element: o
4060
4073
  }
4061
4074
  ),
4062
- o.type.toLowerCase() === "date" && /* @__PURE__ */ b(ti, { children: [
4075
+ o.type.toLowerCase() === "date" && /* @__PURE__ */ v(ti, { children: [
4063
4076
  /* @__PURE__ */ n(
4064
4077
  Si,
4065
4078
  {
@@ -4073,24 +4086,24 @@ const aa = M.object().shape({
4073
4086
  }
4074
4087
  ),
4075
4088
  /* @__PURE__ */ n(
4076
- H,
4089
+ O,
4077
4090
  {
4078
4091
  watch: g,
4079
4092
  label: "Allow Range",
4080
4093
  name: "canHaveDateRange",
4081
4094
  register: m,
4082
- errors: S,
4095
+ errors: A,
4083
4096
  element: o,
4084
4097
  type: "checkbox",
4085
- value: A.canHaveDateRange
4098
+ value: S.canHaveDateRange
4086
4099
  }
4087
4100
  ),
4088
- (A == null ? void 0 : A.canHaveDateRange) && /* @__PURE__ */ b("div", { className: "grid grid-cols-2 gap-4", children: [
4101
+ (S == null ? void 0 : S.canHaveDateRange) && /* @__PURE__ */ v("div", { className: "grid grid-cols-2 gap-4", children: [
4089
4102
  /* @__PURE__ */ n(
4090
4103
  $i,
4091
4104
  {
4092
4105
  name: "minDate",
4093
- value: A == null ? void 0 : A.minDate,
4106
+ value: S == null ? void 0 : S.minDate,
4094
4107
  onGetValue: y,
4095
4108
  placeholder: "Select min date"
4096
4109
  }
@@ -4099,38 +4112,38 @@ const aa = M.object().shape({
4099
4112
  $i,
4100
4113
  {
4101
4114
  name: "maxDate",
4102
- value: A == null ? void 0 : A.minDate,
4115
+ value: S == null ? void 0 : S.minDate,
4103
4116
  onGetValue: y,
4104
4117
  placeholder: "Select max date",
4105
- minDate: A == null ? void 0 : A.minDate
4118
+ minDate: S == null ? void 0 : S.minDate
4106
4119
  }
4107
4120
  )
4108
4121
  ] }),
4109
4122
  /* @__PURE__ */ n(
4110
- H,
4123
+ O,
4111
4124
  {
4112
4125
  watch: g,
4113
4126
  label: "Allow Year Picker",
4114
4127
  name: "allowYearPicker",
4115
4128
  register: m,
4116
- errors: S,
4129
+ errors: A,
4117
4130
  element: o,
4118
4131
  type: "checkbox",
4119
- value: A.allowYearPicker
4132
+ value: S.allowYearPicker
4120
4133
  }
4121
4134
  )
4122
4135
  ] }),
4123
4136
  o.type.toLowerCase() === "country" && /* @__PURE__ */ n(
4124
- H,
4137
+ O,
4125
4138
  {
4126
4139
  watch: g,
4127
4140
  label: "Allow States",
4128
4141
  name: "showState",
4129
4142
  register: m,
4130
- errors: S,
4143
+ errors: A,
4131
4144
  element: o,
4132
4145
  type: "checkbox",
4133
- value: A.showState
4146
+ value: S.showState
4134
4147
  }
4135
4148
  ),
4136
4149
  o.type.toLowerCase() === "selectfield" && /* @__PURE__ */ n(
@@ -4155,73 +4168,73 @@ const aa = M.object().shape({
4155
4168
  }
4156
4169
  ),
4157
4170
  o.type.toLowerCase() === "grid" && /* @__PURE__ */ n(
4158
- H,
4171
+ O,
4159
4172
  {
4160
4173
  watch: g,
4161
4174
  label: "Number of columns (max: 4)",
4162
4175
  name: "columns",
4163
4176
  register: m,
4164
- errors: S,
4177
+ errors: A,
4165
4178
  element: o,
4166
4179
  max: 4,
4167
4180
  min: 1
4168
4181
  }
4169
4182
  ),
4170
- o.type.toLowerCase() === "document" && /* @__PURE__ */ b("div", { className: "grid gap-y-6", children: [
4171
- /* @__PURE__ */ b("div", { className: "grid gap-y-1", children: [
4183
+ o.type.toLowerCase() === "document" && /* @__PURE__ */ v("div", { className: "grid gap-y-6", children: [
4184
+ /* @__PURE__ */ v("div", { className: "grid gap-y-1", children: [
4172
4185
  /* @__PURE__ */ n(
4173
- H,
4186
+ O,
4174
4187
  {
4175
4188
  watch: g,
4176
4189
  label: "Document Options Url",
4177
4190
  name: "url",
4178
4191
  register: m,
4179
- errors: S,
4192
+ errors: A,
4180
4193
  element: o
4181
4194
  }
4182
4195
  ),
4183
4196
  " ",
4184
4197
  /* @__PURE__ */ n(Xo, {})
4185
4198
  ] }),
4186
- /* @__PURE__ */ b("div", { className: "grid gap-y-1", children: [
4199
+ /* @__PURE__ */ v("div", { className: "grid gap-y-1", children: [
4187
4200
  /* @__PURE__ */ n(
4188
- H,
4201
+ O,
4189
4202
  {
4190
4203
  watch: g,
4191
4204
  label: "Document Validation Url",
4192
4205
  name: "validationUrl",
4193
4206
  register: m,
4194
- errors: S,
4207
+ errors: A,
4195
4208
  element: o
4196
4209
  }
4197
4210
  ),
4198
4211
  /* @__PURE__ */ n(ia, {})
4199
4212
  ] }),
4200
4213
  /* @__PURE__ */ n("div", { className: "grid gap-y-1", children: /* @__PURE__ */ n(
4201
- H,
4214
+ O,
4202
4215
  {
4203
4216
  watch: g,
4204
4217
  label: "Signature Page Url",
4205
4218
  name: "signatureLink",
4206
4219
  register: m,
4207
- errors: S,
4220
+ errors: A,
4208
4221
  element: o
4209
4222
  }
4210
4223
  ) })
4211
4224
  ] }),
4212
4225
  o.type.toLowerCase() === "datagrid" && ni(),
4213
- o.type.toLowerCase() === "file" && /* @__PURE__ */ b(ti, { children: [
4226
+ o.type.toLowerCase() === "file" && /* @__PURE__ */ v(ti, { children: [
4214
4227
  /* @__PURE__ */ n(
4215
- H,
4228
+ O,
4216
4229
  {
4217
4230
  watch: g,
4218
4231
  label: "Allow Multiple Uploads",
4219
4232
  name: "isMultiple",
4220
4233
  register: m,
4221
- errors: S,
4234
+ errors: A,
4222
4235
  element: o,
4223
4236
  type: "checkbox",
4224
- value: A.isMultiple
4237
+ value: S.isMultiple
4225
4238
  }
4226
4239
  ),
4227
4240
  /* @__PURE__ */ n(
@@ -4230,7 +4243,7 @@ const aa = M.object().shape({
4230
4243
  element: {
4231
4244
  options: qo,
4232
4245
  id: "acceptedFiles",
4233
- value: A == null ? void 0 : A.acceptedFiles
4246
+ value: S == null ? void 0 : S.acceptedFiles
4234
4247
  },
4235
4248
  validationData: { register: m, setValue: y, trigger: p, watch: g },
4236
4249
  placeholder: "Choose file types"
@@ -4238,22 +4251,22 @@ const aa = M.object().shape({
4238
4251
  )
4239
4252
  ] }),
4240
4253
  zo.includes(o.inputType) && _(),
4241
- /* @__PURE__ */ b("div", { children: [
4254
+ /* @__PURE__ */ v("div", { children: [
4242
4255
  /* @__PURE__ */ n("div", { className: "w-[150px] mb-4", children: /* @__PURE__ */ n(
4243
- H,
4256
+ O,
4244
4257
  {
4245
4258
  watch: g,
4246
4259
  label: "Toggle Visibility",
4247
4260
  name: "isHidden",
4248
4261
  register: m,
4249
- errors: S,
4262
+ errors: A,
4250
4263
  element: o,
4251
4264
  type: "checkbox",
4252
- value: A.isHidden
4265
+ value: S.isHidden
4253
4266
  }
4254
4267
  ) }),
4255
4268
  " ",
4256
- A.isHidden && /* @__PURE__ */ n(
4269
+ S.isHidden && /* @__PURE__ */ n(
4257
4270
  oa,
4258
4271
  {
4259
4272
  register: m,
@@ -4265,137 +4278,137 @@ const aa = M.object().shape({
4265
4278
  )
4266
4279
  ] })
4267
4280
  ] }),
4268
- !Ti.includes(o.type.toLowerCase()) && l === "validation" && /* @__PURE__ */ b("div", { className: "z-10 flex flex-col w-full gap-5 px-6", children: [
4269
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-6", children: [
4281
+ !Ti.includes(o.type.toLowerCase()) && l === "validation" && /* @__PURE__ */ v("div", { className: "z-10 flex flex-col w-full gap-5 px-6", children: [
4282
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-6", children: [
4270
4283
  /* @__PURE__ */ n("div", { className: "w-[150px]", children: /* @__PURE__ */ n(
4271
- H,
4284
+ O,
4272
4285
  {
4273
4286
  watch: g,
4274
4287
  label: "Required",
4275
4288
  name: "isRequired",
4276
4289
  register: m,
4277
- errors: S,
4290
+ errors: A,
4278
4291
  element: o,
4279
4292
  type: "checkbox",
4280
- value: A.isRequired
4293
+ value: S.isRequired
4281
4294
  }
4282
4295
  ) }),
4283
4296
  " ",
4284
4297
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
4285
- H,
4298
+ O,
4286
4299
  {
4287
4300
  watch: g,
4288
4301
  label: "Error message text",
4289
4302
  name: "requiredMessage",
4290
4303
  register: m,
4291
- errors: S,
4304
+ errors: A,
4292
4305
  element: o
4293
4306
  }
4294
4307
  ) })
4295
4308
  ] }),
4296
- Fo.includes(o.inputType) && /* @__PURE__ */ b(ti, { children: [
4297
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-6", children: [
4309
+ Fo.includes(o.inputType) && /* @__PURE__ */ v(ti, { children: [
4310
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-6", children: [
4298
4311
  /* @__PURE__ */ n("div", { className: "w-[150px]", children: /* @__PURE__ */ n(
4299
- H,
4312
+ O,
4300
4313
  {
4301
4314
  watch: g,
4302
4315
  label: "Min Length",
4303
4316
  name: "minLength",
4304
4317
  register: m,
4305
- errors: S,
4318
+ errors: A,
4306
4319
  element: o,
4307
4320
  type: "number"
4308
4321
  }
4309
4322
  ) }),
4310
4323
  " ",
4311
4324
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
4312
- H,
4325
+ O,
4313
4326
  {
4314
4327
  watch: g,
4315
4328
  label: "Error message text",
4316
4329
  name: "minLengthMessage",
4317
4330
  register: m,
4318
- errors: S,
4331
+ errors: A,
4319
4332
  element: o
4320
4333
  }
4321
4334
  ) })
4322
4335
  ] }),
4323
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-6", children: [
4336
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-6", children: [
4324
4337
  /* @__PURE__ */ n("div", { className: "w-[150px]", children: /* @__PURE__ */ n(
4325
- H,
4338
+ O,
4326
4339
  {
4327
4340
  watch: g,
4328
4341
  label: "Max Length",
4329
4342
  name: "maxLength",
4330
4343
  register: m,
4331
- errors: S,
4344
+ errors: A,
4332
4345
  element: o,
4333
4346
  type: "number"
4334
4347
  }
4335
4348
  ) }),
4336
4349
  " ",
4337
4350
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
4338
- H,
4351
+ O,
4339
4352
  {
4340
4353
  watch: g,
4341
4354
  label: "Error message text",
4342
4355
  name: "maxLengthMessage",
4343
4356
  register: m,
4344
- errors: S,
4357
+ errors: A,
4345
4358
  element: o
4346
4359
  }
4347
4360
  ) })
4348
4361
  ] })
4349
4362
  ] }),
4350
- Uo.includes(o.inputType) && /* @__PURE__ */ b(ti, { children: [
4351
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-6", children: [
4363
+ Uo.includes(o.inputType) && /* @__PURE__ */ v(ti, { children: [
4364
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-6", children: [
4352
4365
  /* @__PURE__ */ n("div", { className: "w-[150px]", children: /* @__PURE__ */ n(
4353
- H,
4366
+ O,
4354
4367
  {
4355
4368
  watch: g,
4356
4369
  label: "Min Amount",
4357
4370
  name: "minAmount",
4358
4371
  register: m,
4359
- errors: S,
4372
+ errors: A,
4360
4373
  element: o,
4361
4374
  type: "amount"
4362
4375
  }
4363
4376
  ) }),
4364
4377
  " ",
4365
4378
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
4366
- H,
4379
+ O,
4367
4380
  {
4368
4381
  watch: g,
4369
4382
  label: "Error message text",
4370
4383
  name: "minAmountMessage",
4371
4384
  register: m,
4372
- errors: S,
4385
+ errors: A,
4373
4386
  element: o
4374
4387
  }
4375
4388
  ) })
4376
4389
  ] }),
4377
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-6", children: [
4390
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-6", children: [
4378
4391
  /* @__PURE__ */ n("div", { className: "w-[150px]", children: /* @__PURE__ */ n(
4379
- H,
4392
+ O,
4380
4393
  {
4381
4394
  watch: g,
4382
4395
  label: "Max Amount",
4383
4396
  name: "maxAmount",
4384
4397
  register: m,
4385
- errors: S,
4398
+ errors: A,
4386
4399
  element: o,
4387
4400
  type: "amount"
4388
4401
  }
4389
4402
  ) }),
4390
4403
  " ",
4391
4404
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
4392
- H,
4405
+ O,
4393
4406
  {
4394
4407
  watch: g,
4395
4408
  label: "Error message text",
4396
4409
  name: "maxAmountMessage",
4397
4410
  register: m,
4398
- errors: S,
4411
+ errors: A,
4399
4412
  element: o
4400
4413
  }
4401
4414
  ) })
@@ -4404,7 +4417,7 @@ const aa = M.object().shape({
4404
4417
  ] })
4405
4418
  ] })
4406
4419
  ] }),
4407
- /* @__PURE__ */ b("div", { className: "sticky flex w-full gap-3 px-6 pt-8 pb-10 mt-10 border-t", children: [
4420
+ /* @__PURE__ */ v("div", { className: "sticky flex w-full gap-3 px-6 pt-8 pb-10 mt-10 border-t", children: [
4408
4421
  /* @__PURE__ */ n(
4409
4422
  "button",
4410
4423
  {
@@ -4443,7 +4456,7 @@ const aa = M.object().shape({
4443
4456
  ), c = Z(() => {
4444
4457
  l(e.id, e.sectionId);
4445
4458
  }, [e.id, e.sectionId, l]);
4446
- return /* @__PURE__ */ b("div", { className: "w-full min-w-0", children: [
4459
+ return /* @__PURE__ */ v("div", { className: "w-full min-w-0", children: [
4447
4460
  s && /* @__PURE__ */ n(
4448
4461
  la,
4449
4462
  {
@@ -4452,20 +4465,20 @@ const aa = M.object().shape({
4452
4465
  element: e
4453
4466
  }
4454
4467
  ),
4455
- /* @__PURE__ */ b("div", { className: "flex items-center justify-between mb-2", children: [
4456
- /* @__PURE__ */ b("span", { children: [
4468
+ /* @__PURE__ */ v("div", { className: "flex items-center justify-between mb-2", children: [
4469
+ /* @__PURE__ */ v("span", { children: [
4457
4470
  " ",
4458
- e.inputLabel && /* @__PURE__ */ b("label", { className: "text-sm font-medium input_label", children: [
4471
+ e.inputLabel && /* @__PURE__ */ v("label", { className: "text-sm font-medium input_label", children: [
4459
4472
  e.inputLabel,
4460
4473
  " ",
4461
- u && /* @__PURE__ */ b("span", { className: "text-gray-400 text-xs", children: [
4474
+ u && /* @__PURE__ */ v("span", { className: "text-gray-400 text-xs", children: [
4462
4475
  "(",
4463
4476
  u == null ? void 0 : u.toLowerCase(),
4464
4477
  ")"
4465
4478
  ] })
4466
4479
  ] })
4467
4480
  ] }),
4468
- i === "edit" && /* @__PURE__ */ b("span", { className: "flex items-center gap-x-3", children: [
4481
+ i === "edit" && /* @__PURE__ */ v("span", { className: "flex items-center gap-x-3", children: [
4469
4482
  /* @__PURE__ */ n(
4470
4483
  "button",
4471
4484
  {
@@ -4473,7 +4486,7 @@ const aa = M.object().shape({
4473
4486
  className: "text-sm outline-none hover:opacity-80 py-1 text-gray-600",
4474
4487
  onClick: () => d(e == null ? void 0 : e.id, e.sectionId),
4475
4488
  title: "Duplicate",
4476
- children: /* @__PURE__ */ n(F, { icon: "tabler:copy", iconClass: "text-base" })
4489
+ children: /* @__PURE__ */ n(W, { icon: "tabler:copy", iconClass: "text-base" })
4477
4490
  }
4478
4491
  ),
4479
4492
  /* @__PURE__ */ n(
@@ -4483,7 +4496,7 @@ const aa = M.object().shape({
4483
4496
  className: "text-sm outline-none hover:opacity-80 text-gray-600 py-1",
4484
4497
  onClick: () => a(!0),
4485
4498
  title: "Edit",
4486
- children: /* @__PURE__ */ n(F, { icon: "circum:edit", iconClass: "text-base" })
4499
+ children: /* @__PURE__ */ n(W, { icon: "circum:edit", iconClass: "text-base" })
4487
4500
  }
4488
4501
  ),
4489
4502
  /* @__PURE__ */ n(
@@ -4493,7 +4506,7 @@ const aa = M.object().shape({
4493
4506
  className: "text-sm outline-none hover:opacity-80 text-gray-600 py-1",
4494
4507
  onClick: c,
4495
4508
  title: "Remove",
4496
- children: /* @__PURE__ */ n(F, { icon: "iconamoon:trash", iconClass: "text-base" })
4509
+ children: /* @__PURE__ */ n(W, { icon: "iconamoon:trash", iconClass: "text-base" })
4497
4510
  }
4498
4511
  )
4499
4512
  ] })
@@ -4516,7 +4529,7 @@ function da({
4516
4529
  } = e || {};
4517
4530
  let u;
4518
4531
  return l && (u = l()[i.id]), /* @__PURE__ */ n(
4519
- H,
4532
+ O,
4520
4533
  {
4521
4534
  placeholder: i.placeholder,
4522
4535
  type: i.inputType,
@@ -4543,7 +4556,7 @@ const ca = ({ imageUrl: i }) => {
4543
4556
  }, a = () => {
4544
4557
  o(!1);
4545
4558
  };
4546
- return /* @__PURE__ */ b("div", { children: [
4559
+ return /* @__PURE__ */ v("div", { children: [
4547
4560
  /* @__PURE__ */ n(
4548
4561
  "img",
4549
4562
  {
@@ -4577,7 +4590,7 @@ const ca = ({ imageUrl: i }) => {
4577
4590
  alignItems: "center"
4578
4591
  },
4579
4592
  onClick: a,
4580
- children: /* @__PURE__ */ b(
4593
+ children: /* @__PURE__ */ v(
4581
4594
  "div",
4582
4595
  {
4583
4596
  className: "modal-content",
@@ -4628,37 +4641,37 @@ function ta({
4628
4641
  element: i,
4629
4642
  validationData: e
4630
4643
  }) {
4631
- var A;
4632
- const { register: o = () => ({}), setValue: s, watch: a } = e || {}, [l, d] = P(), [u, c] = P(!1), [r, t] = P(!1), [h, m] = P(""), v = a && a(i == null ? void 0 : i.id);
4633
- R(() => {
4634
- d(v);
4635
- }, [v]);
4644
+ var S;
4645
+ const { register: o = () => ({}), setValue: s, watch: a } = e || {}, [l, d] = P(), [u, c] = P(!1), [r, t] = P(!1), [h, m] = P(""), b = a && a(i == null ? void 0 : i.id);
4646
+ I(() => {
4647
+ d(b);
4648
+ }, [b]);
4636
4649
  const [f, y] = P("");
4637
- R(() => {
4650
+ I(() => {
4638
4651
  o(i.id);
4639
4652
  }, [i.id, o]);
4640
- const { url: g, method: p, responseType: S } = i || {}, x = {
4653
+ const { url: g, method: p, responseType: A } = i || {}, x = {
4641
4654
  headers: {
4642
4655
  Authorization: `Bearer ${di("token")}`
4643
4656
  }
4644
4657
  }, k = Z(
4645
4658
  async (N) => {
4646
- var T, Q, U, q, w, Y, K, O, D, E, B;
4659
+ var T, Q, z, q, w, Y, K, G, D, E, B;
4647
4660
  if (!(!g || !p)) {
4648
4661
  c(!0);
4649
4662
  try {
4650
4663
  let L;
4651
4664
  if (p.toLowerCase() === "get") {
4652
- const z = `${g}?value=${N}`;
4653
- L = await xi.get(z, x);
4665
+ const J = `${g}?value=${N}`;
4666
+ L = await xi.get(J, x);
4654
4667
  } else if (p.toLowerCase() === "post")
4655
4668
  L = await xi.post(g, { value: N }, x);
4656
4669
  else
4657
4670
  throw new Error("Unsupported HTTP method");
4658
- L.status === 200 && ((((Q = (T = L == null ? void 0 : L.data) == null ? void 0 : T.data) == null ? void 0 : Q.status) || ((U = L == null ? void 0 : L.data) == null ? void 0 : U.status)) === !0 ? (t(!0), S === "string" ? m(
4671
+ L.status === 200 && ((((Q = (T = L == null ? void 0 : L.data) == null ? void 0 : T.data) == null ? void 0 : Q.status) || ((z = L == null ? void 0 : L.data) == null ? void 0 : z.status)) === !0 ? (t(!0), A === "string" ? m(
4659
4672
  ((w = (q = L == null ? void 0 : L.data) == null ? void 0 : q.data) == null ? void 0 : w.description) || ((Y = L == null ? void 0 : L.data) == null ? void 0 : Y.description) || "Validation successful"
4660
4673
  ) : y(
4661
- ((O = (K = L == null ? void 0 : L.data) == null ? void 0 : K.data) == null ? void 0 : O.description) || ((D = L == null ? void 0 : L.data) == null ? void 0 : D.description) || {}
4674
+ ((G = (K = L == null ? void 0 : L.data) == null ? void 0 : K.data) == null ? void 0 : G.description) || ((D = L == null ? void 0 : L.data) == null ? void 0 : D.description) || {}
4662
4675
  )) : (console.error("Invalid input:", N), m("Unable to validate input"), t(!1)));
4663
4676
  } catch (L) {
4664
4677
  console.error("Error validating input:", L), m(
@@ -4669,23 +4682,23 @@ function ta({
4669
4682
  }
4670
4683
  }
4671
4684
  },
4672
- [p, S, g]
4685
+ [p, A, g]
4673
4686
  );
4674
- return R(() => {
4687
+ return I(() => {
4675
4688
  if (l) {
4676
4689
  const N = setTimeout(() => {
4677
4690
  k(l);
4678
4691
  }, 700);
4679
4692
  return () => clearTimeout(N);
4680
4693
  }
4681
- }, [k, l]), /* @__PURE__ */ b("div", { children: [
4682
- /* @__PURE__ */ b("div", { className: "relative flex items-center", children: [
4694
+ }, [k, l]), /* @__PURE__ */ v("div", { children: [
4695
+ /* @__PURE__ */ v("div", { className: "relative flex items-center", children: [
4683
4696
  /* @__PURE__ */ n(
4684
4697
  "input",
4685
4698
  {
4686
4699
  placeholder: (i == null ? void 0 : i.placeholder) || "",
4687
4700
  type: (i == null ? void 0 : i.inputType) || "text",
4688
- className: W("field-control", i == null ? void 0 : i.customClass),
4701
+ className: U("field-control", i == null ? void 0 : i.customClass),
4689
4702
  ...o(i == null ? void 0 : i.id),
4690
4703
  onChange: (N) => {
4691
4704
  d(N.target.value), s(i == null ? void 0 : i.id, N.target.value);
@@ -4693,10 +4706,10 @@ function ta({
4693
4706
  disabled: e == null ? void 0 : e.isReadOnly
4694
4707
  }
4695
4708
  ),
4696
- /* @__PURE__ */ b("span", { className: "absolute right-0", children: [
4697
- u && /* @__PURE__ */ b("span", { children: [
4709
+ /* @__PURE__ */ v("span", { className: "absolute right-0", children: [
4710
+ u && /* @__PURE__ */ v("span", { children: [
4698
4711
  " ",
4699
- /* @__PURE__ */ b(
4712
+ /* @__PURE__ */ v(
4700
4713
  "svg",
4701
4714
  {
4702
4715
  className: "animate-spin -ml-1 mr-3 h-5 w-5",
@@ -4727,18 +4740,18 @@ function ta({
4727
4740
  }
4728
4741
  )
4729
4742
  ] }),
4730
- r && !u && /* @__PURE__ */ n("span", { className: "block pr-3 text-lg text-green-600", children: /* @__PURE__ */ n(F, { icon: "gg:check-o" }) })
4743
+ r && !u && /* @__PURE__ */ n("span", { className: "block pr-3 text-lg text-green-600", children: /* @__PURE__ */ n(W, { icon: "gg:check-o" }) })
4731
4744
  ] })
4732
4745
  ] }),
4733
- h && S === "string" && /* @__PURE__ */ n(
4746
+ h && A === "string" && /* @__PURE__ */ n(
4734
4747
  "span",
4735
4748
  {
4736
4749
  className: `${r ? "text-green-600" : "text-red-600"} text-sm`,
4737
4750
  children: h
4738
4751
  }
4739
4752
  ),
4740
- S === "object" && /* @__PURE__ */ n("div", { className: "grid grid-cols-2 gap-6 mt-2 text-sm text-gray-600", children: (A = Object.entries(f)) == null ? void 0 : A.map(([N, T]) => /* @__PURE__ */ b("div", { className: "flex items-center gap-x-2", children: [
4741
- /* @__PURE__ */ b("span", { className: "font-semibold", children: [
4753
+ A === "object" && /* @__PURE__ */ n("div", { className: "grid grid-cols-2 gap-6 mt-2 text-sm text-gray-600", children: (S = Object.entries(f)) == null ? void 0 : S.map(([N, T]) => /* @__PURE__ */ v("div", { className: "flex items-center gap-x-2", children: [
4754
+ /* @__PURE__ */ v("span", { className: "font-semibold", children: [
4742
4755
  N,
4743
4756
  ":"
4744
4757
  ] }),
@@ -4772,9 +4785,9 @@ function ra({
4772
4785
  }, 0),
4773
4786
  [a]
4774
4787
  );
4775
- return R(() => {
4788
+ return I(() => {
4776
4789
  i && i(a);
4777
- }, [a]), R(() => {
4790
+ }, [a]), I(() => {
4778
4791
  if (s != null && s.length) {
4779
4792
  const r = s == null ? void 0 : s.map((t, h) => ({
4780
4793
  key: t.value,
@@ -4782,15 +4795,15 @@ function ra({
4782
4795
  }));
4783
4796
  l(r);
4784
4797
  }
4785
- }, [o, s]), /* @__PURE__ */ n("div", { className: "mt-2", children: /* @__PURE__ */ b("div", { className: "border border-gray-200 rounded-lg overflow-hidden text-gray-700", children: [
4786
- /* @__PURE__ */ b("div", { className: "grid grid-cols-3 text-sm font-bold border-b border-gray-100 bg-gray-50", children: [
4798
+ }, [o, s]), /* @__PURE__ */ n("div", { className: "mt-2", children: /* @__PURE__ */ v("div", { className: "border border-gray-200 rounded-lg overflow-hidden text-gray-700", children: [
4799
+ /* @__PURE__ */ v("div", { className: "grid grid-cols-3 text-sm font-bold border-b border-gray-100 bg-gray-50", children: [
4787
4800
  /* @__PURE__ */ n("div", { className: "border-r px-4 py-2", children: /* @__PURE__ */ n("span", { className: "", children: "Denomination" }) }),
4788
4801
  /* @__PURE__ */ n("div", { className: "border-r px-4 py-2", children: /* @__PURE__ */ n("span", { children: "Quantity" }) }),
4789
4802
  /* @__PURE__ */ n("div", { className: "px-4 py-2", children: /* @__PURE__ */ n("span", { children: "Sub total" }) })
4790
4803
  ] }),
4791
4804
  a == null ? void 0 : a.map((r, t) => {
4792
4805
  var h, m;
4793
- return /* @__PURE__ */ b(
4806
+ return /* @__PURE__ */ v(
4794
4807
  "div",
4795
4808
  {
4796
4809
  className: "grid grid-cols-3 text-sm border-b border-gray-100",
@@ -4803,7 +4816,7 @@ function ra({
4803
4816
  className: "border border-gray-100 rounded w-full px-3 py-1 outline-none",
4804
4817
  decimalsLimit: 6,
4805
4818
  value: r.value,
4806
- onValueChange: (v) => d(v, t),
4819
+ onValueChange: (b) => d(b, t),
4807
4820
  disabled: e,
4808
4821
  allowNegativeValue: !1
4809
4822
  }
@@ -4814,7 +4827,7 @@ function ra({
4814
4827
  t + "index"
4815
4828
  );
4816
4829
  }),
4817
- /* @__PURE__ */ b("div", { className: "grid grid-cols-3 text-sm font-bold bg-gray-50", children: [
4830
+ /* @__PURE__ */ v("div", { className: "grid grid-cols-3 text-sm font-bold bg-gray-50", children: [
4818
4831
  /* @__PURE__ */ n("div", { className: "border-r px-4 py-3 col-span-2 text-right", children: "Total" }),
4819
4832
  /* @__PURE__ */ n("div", { className: "px-4 py-3", children: c == null ? void 0 : c.toLocaleString() })
4820
4833
  ] })
@@ -4825,7 +4838,7 @@ function ma({
4825
4838
  validationData: e
4826
4839
  }) {
4827
4840
  const { register: o = () => ({}), setValue: s, getValues: a } = e || {}, l = a && a(i == null ? void 0 : i.id) || [];
4828
- return R(() => {
4841
+ return I(() => {
4829
4842
  o(i.id);
4830
4843
  }, [i.id, o]), /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
4831
4844
  ra,
@@ -4840,10 +4853,10 @@ function ma({
4840
4853
  ) });
4841
4854
  }
4842
4855
  function ba({ element: i }) {
4843
- return /* @__PURE__ */ n("div", { className: W("py-6", i == null ? void 0 : i.customClass) });
4856
+ return /* @__PURE__ */ n("div", { className: U("py-6", i == null ? void 0 : i.customClass) });
4844
4857
  }
4845
4858
  function va({ element: i }) {
4846
- return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("hr", { className: W("border-gray-200 my-4", i == null ? void 0 : i.customClass) }) });
4859
+ return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("hr", { className: U("border-gray-200 my-4", i == null ? void 0 : i.customClass) }) });
4847
4860
  }
4848
4861
  function ha({
4849
4862
  element: i,
@@ -4874,9 +4887,9 @@ function ga({
4874
4887
  getValidationStatus: a,
4875
4888
  deleteRow: l
4876
4889
  }) {
4877
- return /* @__PURE__ */ b("tr", { children: [
4890
+ return /* @__PURE__ */ v("tr", { children: [
4878
4891
  e.map((d) => {
4879
- var v;
4892
+ var b;
4880
4893
  const u = i[d.field], c = d.editable && !o, { isValidating: r, result: t } = a(i.id, d.field);
4881
4894
  let h = "border-gray-300";
4882
4895
  d.validate && ((t == null ? void 0 : t.isValid) === !1 ? h = "border-red-500 bg-red-50" : (t == null ? void 0 : t.isValid) === !0 && (h = "border-green-500 bg-green-50"));
@@ -4885,7 +4898,7 @@ function ga({
4885
4898
  "td",
4886
4899
  {
4887
4900
  className: "px-3 py-1 border-b border-r last:border-r-0",
4888
- children: c ? /* @__PURE__ */ b("div", { className: "relative", children: [
4901
+ children: c ? /* @__PURE__ */ v("div", { className: "relative", children: [
4889
4902
  d.type === "number" ? /* @__PURE__ */ n(
4890
4903
  Gi,
4891
4904
  {
@@ -4897,7 +4910,7 @@ function ga({
4897
4910
  }
4898
4911
  ) : d.type === "checkbox" ? /* @__PURE__ */ n("div", { className: "flex items-center gap-x-4", children: ["yes", "no"].map((f) => {
4899
4912
  const y = f === "yes", g = `radio-${i.id}-${String(d.field)}-${f}`;
4900
- return /* @__PURE__ */ b(
4913
+ return /* @__PURE__ */ v(
4901
4914
  "label",
4902
4915
  {
4903
4916
  htmlFor: g,
@@ -4928,8 +4941,8 @@ function ga({
4928
4941
  }
4929
4942
  ),
4930
4943
  r && /* @__PURE__ */ n("div", { className: "absolute right-1 top-1", children: /* @__PURE__ */ n("div", { className: "w-4 h-4 border-2 border-blue-500 rounded-full border-t-transparent animate-spin" }) })
4931
- ] }) : d.validate && t ? /* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
4932
- /* @__PURE__ */ b("span", { children: [
4944
+ ] }) : d.validate && t ? /* @__PURE__ */ v("div", { className: "flex items-center gap-2", children: [
4945
+ /* @__PURE__ */ v("span", { children: [
4933
4946
  String(u != null ? u : ""),
4934
4947
  " ",
4935
4948
  t.data && `[${t.data}]`
@@ -4938,7 +4951,7 @@ function ga({
4938
4951
  "span",
4939
4952
  {
4940
4953
  className: "text-xs text-red-600 cursor-help",
4941
- title: (v = t.error) != null ? v : "",
4954
+ title: (b = t.error) != null ? b : "",
4942
4955
  children: "✗"
4943
4956
  }
4944
4957
  )
@@ -4954,7 +4967,7 @@ function ga({
4954
4967
  onClick: () => l(i.id),
4955
4968
  className: "text-red-500 hover:text-red-700",
4956
4969
  "aria-label": "Delete row",
4957
- children: /* @__PURE__ */ n(F, { icon: "lets-icons:trash-duotone", iconClass: "text-xl" })
4970
+ children: /* @__PURE__ */ n(W, { icon: "lets-icons:trash-duotone", iconClass: "text-xl" })
4958
4971
  }
4959
4972
  ) })
4960
4973
  ] });
@@ -4967,43 +4980,48 @@ function ya({
4967
4980
  columns: s
4968
4981
  }) {
4969
4982
  const [a, l] = P(i), d = di("config");
4970
- R(() => {
4983
+ I(() => {
4971
4984
  l((h) => JSON.stringify(h) !== JSON.stringify(i) ? i : h);
4972
- }, [i]), R(() => {
4973
- e == null || e(a);
4974
- }, [a, e]);
4985
+ }, [i]);
4975
4986
  const u = Z(
4976
- (h, m, v) => {
4977
- l(
4978
- (f) => f.map(
4979
- (y) => y.id === m ? { ...y, [v]: h } : y
4980
- )
4981
- );
4987
+ (h, m, b) => {
4988
+ l((f) => {
4989
+ const y = f.map(
4990
+ (g) => g.id === m ? { ...g, [b]: h } : g
4991
+ );
4992
+ return e == null || e(y), y;
4993
+ });
4982
4994
  },
4983
- []
4995
+ [e]
4984
4996
  ), c = Z(() => {
4985
- const h = ri(), m = s.reduce((v, f) => (v[f.field] = f.field === "id" ? h : "", v), {});
4986
- l((v) => [...v, { id: h, ...m }]);
4987
- }, [s]), r = Z((h) => {
4988
- l((m) => m.filter((v) => v.id !== h));
4989
- }, []), t = Z(
4997
+ const h = ri(), m = s.reduce((b, f) => (b[f.field] = f.field === "id" ? h : "", b), {});
4998
+ l((b) => {
4999
+ const f = [...b, { id: h, ...m }];
5000
+ return e == null || e(f), f;
5001
+ });
5002
+ }, [s, e]), r = Z((h) => {
5003
+ l((m) => {
5004
+ const b = m.filter((f) => f.id !== h);
5005
+ return e == null || e(b), b;
5006
+ });
5007
+ }, [e]), t = Z(
4990
5008
  (h, m) => ({
4991
5009
  isValidating: !1,
4992
5010
  result: void 0
4993
5011
  }),
4994
5012
  []
4995
5013
  );
4996
- return /* @__PURE__ */ b("div", { className: "mt-3 rounded", children: [
4997
- /* @__PURE__ */ n("div", { className: "w-full max-w-full overflow-x-auto border rounded-lg", children: /* @__PURE__ */ b("table", { className: "min-w-max w-full text-sm border-collapse table-auto", children: [
4998
- /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ b("tr", { className: "bg-gray-100", children: [
5014
+ return /* @__PURE__ */ v("div", { className: "mt-3 rounded", children: [
5015
+ /* @__PURE__ */ n("div", { className: "w-full max-w-full overflow-x-auto border rounded-lg", children: /* @__PURE__ */ v("table", { className: "min-w-max w-full text-sm border-collapse table-auto", children: [
5016
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ v("tr", { className: "bg-gray-100", children: [
4999
5017
  s.map((h, m) => {
5000
- var v;
5001
- return /* @__PURE__ */ b(
5018
+ var b;
5019
+ return /* @__PURE__ */ v(
5002
5020
  "th",
5003
5021
  {
5004
5022
  className: "px-3 py-2 text-xs font-semibold text-left text-gray-600 border-b whitespace-nowrap",
5005
5023
  children: [
5006
- (v = h.headerName) != null ? v : String(h.field),
5024
+ (b = h.headerName) != null ? b : String(h.field),
5007
5025
  h.validate && /* @__PURE__ */ n("span", { className: "ml-1 text-blue-600", children: "*" })
5008
5026
  ]
5009
5027
  },
@@ -5048,31 +5066,31 @@ function Aa({
5048
5066
  element: i,
5049
5067
  validationData: e
5050
5068
  }) {
5051
- var t;
5069
+ var b;
5052
5070
  const {
5053
5071
  register: o = () => ({}),
5054
5072
  setValue: s,
5055
5073
  watch: a,
5056
5074
  isReadOnly: l
5057
- } = e || {}, d = a && a(i == null ? void 0 : i.id) || {}, u = Array.isArray(d) ? d : (t = d == null ? void 0 : d.rows) != null ? t : [];
5058
- R(() => {
5075
+ } = e || {}, d = a && a(i == null ? void 0 : i.id) || {}, u = Array.isArray(d) ? d : (b = d == null ? void 0 : d.rows) != null ? b : [];
5076
+ I(() => {
5059
5077
  o(i.id);
5060
5078
  }, [i.id, o]);
5061
- const c = hi(""), r = Z(
5062
- (h) => {
5063
- const m = JSON.stringify(h);
5064
- m !== c.current && (c.current = m, s == null || s(i.id, {
5065
- rows: h,
5066
- columns: i == null ? void 0 : i.dataColumns
5067
- }));
5068
- },
5069
- [i.id, i == null ? void 0 : i.dataColumns, s]
5070
- );
5079
+ const c = mi(""), r = mi(i == null ? void 0 : i.id), t = mi(i == null ? void 0 : i.dataColumns), h = mi(s);
5080
+ r.current = i == null ? void 0 : i.id, t.current = i == null ? void 0 : i.dataColumns, h.current = s;
5081
+ const m = Z((f) => {
5082
+ var g;
5083
+ const y = JSON.stringify(f);
5084
+ y !== c.current && (c.current = y, (g = h.current) == null || g.call(h, r.current, {
5085
+ rows: f,
5086
+ columns: t.current
5087
+ }));
5088
+ }, []);
5071
5089
  return /* @__PURE__ */ n(
5072
5090
  ya,
5073
5091
  {
5074
5092
  value: u,
5075
- onChange: r,
5093
+ onChange: m,
5076
5094
  columns: i == null ? void 0 : i.dataColumns,
5077
5095
  isReadOnly: l
5078
5096
  }
@@ -5092,22 +5110,22 @@ const Pn = ({
5092
5110
  isMultiple: t = !1,
5093
5111
  isFloatingLabel: h = !1,
5094
5112
  subText: m,
5095
- labelClass: v = "",
5113
+ labelClass: b = "",
5096
5114
  loading: f,
5097
5115
  disabled: y
5098
5116
  }) => {
5099
- const [g, p] = P(t ? [] : null), S = W("custom-select__control", i), C = $(() => e, [e]);
5100
- return R(() => {
5117
+ const [g, p] = P(t ? [] : null), A = U("custom-select__control", i), C = $(() => e, [e]);
5118
+ return I(() => {
5101
5119
  const x = e == null ? void 0 : e.find((k) => {
5102
- var A;
5103
- return typeof k.value == "string" && typeof c == "string" ? k.value.toLowerCase() === c.toLowerCase() : typeof k.value == "object" && typeof c == "object" ? ((A = k.value) == null ? void 0 : A.id) === (c == null ? void 0 : c.id) : k.value === c;
5120
+ var S;
5121
+ return typeof k.value == "string" && typeof c == "string" ? k.value.toLowerCase() === c.toLowerCase() : typeof k.value == "object" && typeof c == "object" ? ((S = k.value) == null ? void 0 : S.id) === (c == null ? void 0 : c.id) : k.value === c;
5104
5122
  });
5105
5123
  p(x || null);
5106
- }, [c, e]), R(() => {
5124
+ }, [c, e]), I(() => {
5107
5125
  g && l && a && (l(d, g == null ? void 0 : g.value), a(d), r == null || r(d));
5108
- }, [d, g]), /* @__PURE__ */ b("div", { className: "custom-select", children: [
5126
+ }, [d, g]), /* @__PURE__ */ v("div", { className: "custom-select", children: [
5109
5127
  u && !h && /* @__PURE__ */ n("label", { className: "custom-select__label", children: u }),
5110
- h && u && /* @__PURE__ */ n("label", { className: W("custom-select__floating-label", v), children: u }),
5128
+ h && u && /* @__PURE__ */ n("label", { className: U("custom-select__floating-label", b), children: u }),
5111
5129
  /* @__PURE__ */ n(
5112
5130
  ii,
5113
5131
  {
@@ -5115,10 +5133,10 @@ const Pn = ({
5115
5133
  onChange: p,
5116
5134
  multiple: t,
5117
5135
  disabled: y,
5118
- children: /* @__PURE__ */ b("div", { className: "custom-select__wrapper", children: [
5119
- /* @__PURE__ */ b(ii.Button, { className: S, disabled: y, children: [
5136
+ children: /* @__PURE__ */ v("div", { className: "custom-select__wrapper", children: [
5137
+ /* @__PURE__ */ v(ii.Button, { className: A, disabled: y, children: [
5120
5138
  f ? /* @__PURE__ */ n("span", { className: "custom-select__loading", children: "Fetching data..." }) : /* @__PURE__ */ n("span", { className: "custom-select__value", children: (g == null ? void 0 : g.label) || /* @__PURE__ */ n("span", { className: "custom-select__placeholder", children: o }) }),
5121
- /* @__PURE__ */ n("span", { className: "custom-select__icon", children: /* @__PURE__ */ n(F, { icon: "lucide:chevron-down" }) })
5139
+ /* @__PURE__ */ n("span", { className: "custom-select__icon", children: /* @__PURE__ */ n(W, { icon: "lucide:chevron-down" }) })
5122
5140
  ] }),
5123
5141
  /* @__PURE__ */ n(
5124
5142
  yi,
@@ -5129,16 +5147,16 @@ const Pn = ({
5129
5147
  ii.Option,
5130
5148
  {
5131
5149
  value: x,
5132
- className: ({ active: A }) => W(
5150
+ className: ({ active: S }) => U(
5133
5151
  "custom-select__option",
5134
- A && "custom-select__option--active"
5152
+ S && "custom-select__option--active"
5135
5153
  ),
5136
- children: ({ selected: A }) => /* @__PURE__ */ n(
5154
+ children: ({ selected: S }) => /* @__PURE__ */ n(
5137
5155
  "span",
5138
5156
  {
5139
- className: W(
5157
+ className: U(
5140
5158
  "custom-select__option-label",
5141
- A && "custom-select__option--selected"
5159
+ S && "custom-select__option--selected"
5142
5160
  ),
5143
5161
  children: x.label
5144
5162
  }
@@ -5166,17 +5184,17 @@ const Pn = ({
5166
5184
  watch: l,
5167
5185
  isReadOnly: d
5168
5186
  } = e || {}, u = (y = i == null ? void 0 : i.id) != null ? y : "cascadeValue", [c, r] = P(""), [t, h] = P(""), m = (g, p) => {
5169
- const S = g && p ? `${g}_${p}` : "";
5170
- a == null || a(u, S), s == null || s(u);
5171
- }, v = (g, p) => {
5187
+ const A = g && p ? `${g}_${p}` : "";
5188
+ a == null || a(u, A), s == null || s(u);
5189
+ }, b = (g, p) => {
5172
5190
  g === "first" ? (r(p), h(""), m(p, "")) : (h(p), m(c, p));
5173
5191
  };
5174
- R(() => {
5192
+ I(() => {
5175
5193
  if (l) {
5176
5194
  const g = l(u);
5177
5195
  if (g != null && g.includes("_")) {
5178
- const [p, S] = g.split("_");
5179
- r(p), h(S);
5196
+ const [p, A] = g.split("_");
5197
+ r(p), h(A);
5180
5198
  }
5181
5199
  }
5182
5200
  }, [l, u]);
@@ -5187,24 +5205,24 @@ const Pn = ({
5187
5205
  },
5188
5206
  [i.options1, c]
5189
5207
  );
5190
- return !i.options || !i.options1 ? null : /* @__PURE__ */ b("div", { children: [
5208
+ return !i.options || !i.options1 ? null : /* @__PURE__ */ v("div", { children: [
5191
5209
  /* @__PURE__ */ n("input", { type: "hidden", ...o(u) }),
5192
5210
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
5193
5211
  Pn,
5194
5212
  {
5195
- setValue: (g, p) => v("first", p),
5213
+ setValue: (g, p) => b("first", p),
5196
5214
  options: i.options,
5197
5215
  name: `${u}`,
5198
5216
  register: o,
5199
5217
  value: c
5200
5218
  }
5201
5219
  ) }),
5202
- c && /* @__PURE__ */ b("div", { className: "mt-4", children: [
5220
+ c && /* @__PURE__ */ v("div", { className: "mt-4", children: [
5203
5221
  (i == null ? void 0 : i.childLabel) && /* @__PURE__ */ n("label", { className: "block text-sm text-[#686878] darks:!text-white/70 mb-2", children: i == null ? void 0 : i.childLabel }),
5204
5222
  /* @__PURE__ */ n(
5205
5223
  Pn,
5206
5224
  {
5207
- setValue: (g, p) => v("second", p),
5225
+ setValue: (g, p) => b("second", p),
5208
5226
  options: f,
5209
5227
  name: `${u}`,
5210
5228
  register: o,
@@ -5230,20 +5248,20 @@ const Pn = ({
5230
5248
  setValue: t,
5231
5249
  watch: h,
5232
5250
  isReadOnly: m
5233
- } = u || {}, v = (p = h == null ? void 0 : h(d.id)) != null ? p : 0, [f, y] = P(null);
5234
- R(() => {
5235
- v == null && (t == null || t(d.id, i));
5251
+ } = u || {}, b = (p = h == null ? void 0 : h(d.id)) != null ? p : 0, [f, y] = P(null);
5252
+ I(() => {
5253
+ b == null && (t == null || t(d.id, i));
5236
5254
  }, []);
5237
- const g = (S) => {
5255
+ const g = (A) => {
5238
5256
  if (!o && !m) {
5239
- const C = S + 1;
5257
+ const C = A + 1;
5240
5258
  t == null || t(d.id, C), r == null || r(d.id), s == null || s(C);
5241
5259
  }
5242
5260
  };
5243
- return /* @__PURE__ */ b("div", { className: `flex gap-1 ${l}`, children: [
5261
+ return /* @__PURE__ */ v("div", { className: `flex gap-1 ${l}`, children: [
5244
5262
  /* @__PURE__ */ n("input", { type: "hidden", ...c(d.id) }),
5245
- Array.from({ length: e }, (S, C) => {
5246
- const x = f !== null ? C <= f : C < v;
5263
+ Array.from({ length: e }, (A, C) => {
5264
+ const x = f !== null ? C <= f : C < b;
5247
5265
  return /* @__PURE__ */ n(
5248
5266
  $n,
5249
5267
  {
@@ -5265,8 +5283,8 @@ function Na({
5265
5283
  validationData: e
5266
5284
  }) {
5267
5285
  const { register: o = () => ({}) } = e || {}, s = (i == null ? void 0 : i.options) || [], a = (i == null ? void 0 : i.options1) || [];
5268
- return /* @__PURE__ */ n("div", { className: W("w-full overflow-x-auto", i.customClass), children: /* @__PURE__ */ b("table", { className: "w-full text-left border-collapse min-w-[600px] mb-2", children: [
5269
- /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ b("tr", { children: [
5286
+ return /* @__PURE__ */ n("div", { className: U("w-full overflow-x-auto", i.customClass), children: /* @__PURE__ */ v("table", { className: "w-full text-left border-collapse min-w-[600px] mb-2", children: [
5287
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ v("tr", { children: [
5270
5288
  /* @__PURE__ */ n("th", { className: "p-3 border-b bg-gray-50/50" }),
5271
5289
  a.map((l) => /* @__PURE__ */ n(
5272
5290
  "th",
@@ -5277,7 +5295,7 @@ function Na({
5277
5295
  l.id || l.value
5278
5296
  ))
5279
5297
  ] }) }),
5280
- /* @__PURE__ */ n("tbody", { children: s.map((l) => /* @__PURE__ */ b(
5298
+ /* @__PURE__ */ n("tbody", { children: s.map((l) => /* @__PURE__ */ v(
5281
5299
  "tr",
5282
5300
  {
5283
5301
  className: "border-b last:border-0 hover:bg-gray-50/30",
@@ -5316,7 +5334,7 @@ function En({
5316
5334
  return { country: g, state: y };
5317
5335
  }
5318
5336
  return { country: u, state: "" };
5319
- }, [u]), t = hi(u), h = $(() => {
5337
+ }, [u]), t = mi(u), h = $(() => {
5320
5338
  var f, y;
5321
5339
  return c ? ((y = (f = Ri.find((g) => g.name === c)) == null ? void 0 : f.states) == null ? void 0 : y.map((g) => ({
5322
5340
  label: g.name,
@@ -5325,13 +5343,13 @@ function En({
5325
5343
  }, [c]), m = (f, y) => {
5326
5344
  const p = (y == null ? void 0 : y.value) || "";
5327
5345
  s && p !== t.current && (s(i.id, p), a == null || a(i.id), t.current = p);
5328
- }, v = (f, y) => {
5346
+ }, b = (f, y) => {
5329
5347
  const g = (y == null ? void 0 : y.value) || "", p = g ? `${g}, ${c}` : c;
5330
5348
  s && p !== t.current && (s(i.id, p), a == null || a(i.id), t.current = p);
5331
5349
  };
5332
- return R(() => {
5350
+ return I(() => {
5333
5351
  t.current = u;
5334
- }, [u]), /* @__PURE__ */ b("div", { className: "grid gap-y-6", children: [
5352
+ }, [u]), /* @__PURE__ */ v("div", { className: "grid gap-y-6", children: [
5335
5353
  /* @__PURE__ */ n("input", { type: "hidden", ...o(i.id) }),
5336
5354
  /* @__PURE__ */ n(
5337
5355
  on,
@@ -5344,13 +5362,13 @@ function En({
5344
5362
  },
5345
5363
  `country-${c}`
5346
5364
  ),
5347
- h.length > 0 && i.showState && /* @__PURE__ */ b("div", { children: [
5365
+ h.length > 0 && i.showState && /* @__PURE__ */ v("div", { children: [
5348
5366
  /* @__PURE__ */ n("label", { className: "block text-sm font-medium mb-1.5 input_label", children: "State" }),
5349
5367
  /* @__PURE__ */ n(
5350
5368
  on,
5351
5369
  {
5352
5370
  options: h,
5353
- onGetValue: v,
5371
+ onGetValue: b,
5354
5372
  name: `${i.id}-state`,
5355
5373
  readOnly: l,
5356
5374
  defaultValue: r
@@ -5365,7 +5383,7 @@ function ka({
5365
5383
  validationData: e
5366
5384
  }) {
5367
5385
  const { register: o = () => ({}), isReadOnly: s } = e || {}, { validationUrl: a, documentObj: l, signatureLink: d } = i, u = $(() => di("config"), []), [c, r] = P(!1), [t, h] = P(!1), m = Z(async () => {
5368
- var v, f;
5386
+ var b, f;
5369
5387
  if (!(!a || !l))
5370
5388
  try {
5371
5389
  h(!0);
@@ -5376,48 +5394,48 @@ function ka({
5376
5394
  }, { data: p } = await xi.get(
5377
5395
  `${a}/${l}`,
5378
5396
  g
5379
- ), S = !!((f = (v = p == null ? void 0 : p.data) == null ? void 0 : v.isSigned) != null ? f : p != null && p.isSigned);
5380
- return r(S), S;
5397
+ ), A = !!((f = (b = p == null ? void 0 : p.data) == null ? void 0 : b.isSigned) != null ? f : p != null && p.isSigned);
5398
+ return r(A), A;
5381
5399
  } catch (y) {
5382
5400
  console.error("Failed to check sign status", y);
5383
5401
  } finally {
5384
5402
  h(!1);
5385
5403
  }
5386
5404
  }, [a, l]);
5387
- return R(() => {
5388
- let v = null;
5405
+ return I(() => {
5406
+ let b = null;
5389
5407
  return !c && l && a && (async () => {
5390
- await m() || (v = setInterval(async () => {
5391
- await m() && v && clearInterval(v);
5408
+ await m() || (b = setInterval(async () => {
5409
+ await m() && b && clearInterval(b);
5392
5410
  }, 2e3));
5393
5411
  })(), () => {
5394
- v && clearInterval(v);
5412
+ b && clearInterval(b);
5395
5413
  };
5396
- }, [m, c, l, a]), /* @__PURE__ */ b("div", { className: "flex items-center gap-x-2", children: [
5414
+ }, [m, c, l, a]), /* @__PURE__ */ v("div", { className: "flex items-center gap-x-2", children: [
5397
5415
  /* @__PURE__ */ n(
5398
5416
  "input",
5399
5417
  {
5400
5418
  placeholder: i.placeholder,
5401
5419
  type: i.inputType,
5402
- className: W("field-control", i.customClass),
5420
+ className: U("field-control", i.customClass),
5403
5421
  ...o(i.id),
5404
5422
  disabled: s
5405
5423
  }
5406
5424
  ),
5407
- /* @__PURE__ */ n("a", { href: c ? "#" : d, children: /* @__PURE__ */ b(
5425
+ /* @__PURE__ */ n("a", { href: c ? "#" : d, children: /* @__PURE__ */ v(
5408
5426
  "button",
5409
5427
  {
5410
5428
  type: "button",
5411
5429
  onClick: m,
5412
5430
  disabled: t || c,
5413
5431
  style: { background: (u == null ? void 0 : u.buttonColor) || "#333" },
5414
- className: W(
5432
+ className: U(
5415
5433
  "flex items-center gap-x-1 rounded-lg border border-gray-200 bg-gray-200 px-3 py-[10px] text-sm text-white",
5416
5434
  { "!opacity-60": t }
5417
5435
  ),
5418
5436
  children: [
5419
5437
  /* @__PURE__ */ n(
5420
- F,
5438
+ W,
5421
5439
  {
5422
5440
  icon: t ? "solar:refresh-outline" : c ? "solar:check-circle-bold" : "solar:pen-2-line-duotone",
5423
5441
  iconClass: t ? "animate-spin" : ""
@@ -5689,26 +5707,26 @@ function Ca({
5689
5707
  horizontal: t,
5690
5708
  description: h,
5691
5709
  validate: m,
5692
- onChange: v,
5710
+ onChange: b,
5693
5711
  onError: f
5694
5712
  }) {
5695
- const [y, g] = P(""), [p, S] = P(null), [C, x] = P(""), k = $(
5713
+ const [y, g] = P(""), [p, A] = P(null), [C, x] = P(""), k = $(
5696
5714
  () => {
5697
5715
  var w;
5698
5716
  return (w = Ji == null ? void 0 : Ji.slice().sort((Y, K) => Y.label.localeCompare(K.label))) == null ? void 0 : w.map((Y) => ({ ...Y, phone: `+${Y.phone}` }));
5699
5717
  },
5700
5718
  []
5701
- ), A = $(() => y ? k.filter(
5719
+ ), S = $(() => y ? k.filter(
5702
5720
  (w) => `${w.label} ${w.phone}`.toLowerCase().includes(y.toLowerCase())
5703
- ) : k, [y, k]), N = (p == null ? void 0 : p.min) || 10, T = (p == null ? void 0 : p.max) || 10, Q = () => C ? `${(p == null ? void 0 : p.phone) || "+234"}-${C}` : "", U = (w) => {
5721
+ ) : k, [y, k]), N = (p == null ? void 0 : p.min) || 10, T = (p == null ? void 0 : p.max) || 10, Q = () => C ? `${(p == null ? void 0 : p.phone) || "+234"}-${C}` : "", z = (w) => {
5704
5722
  if (!w) return { code: "+234", number: "" };
5705
5723
  const Y = w.split(/[-\s]/);
5706
5724
  return { code: Y[0], number: Y.slice(1).join(" ") };
5707
5725
  };
5708
- R(() => {
5726
+ I(() => {
5709
5727
  if (d) {
5710
- const w = U(d);
5711
- S(
5728
+ const w = z(d);
5729
+ A(
5712
5730
  k.find((Y) => Y.phone === w.code) || k[0]
5713
5731
  ), x(w.number);
5714
5732
  }
@@ -5718,14 +5736,14 @@ function Ca({
5718
5736
  const w = C.length;
5719
5737
  return s && w === 0 ? "Phone number is required" : w > 0 && !/^\d+$/.test(C) ? "Phone number must contain only digits" : w > 0 && w < N ? `Minimum length is ${N}` : w > T ? `Maximum length is ${T}` : "";
5720
5738
  }, [u, C, N, T, s]);
5721
- return R(() => {
5722
- v == null || v(Q()), f == null || f(q || null);
5723
- }, [C, p, q]), /* @__PURE__ */ b(
5739
+ return I(() => {
5740
+ b == null || b(Q()), f == null || f(q || null);
5741
+ }, [C, p, q]), /* @__PURE__ */ v(
5724
5742
  "div",
5725
5743
  {
5726
5744
  className: `relative formGroup ${q && !r ? "has-error" : ""} ${t ? "flex" : ""} ${!q && C.length > 0 && !r ? "is-valid" : ""}`,
5727
5745
  children: [
5728
- i && /* @__PURE__ */ b(
5746
+ i && /* @__PURE__ */ v(
5729
5747
  "label",
5730
5748
  {
5731
5749
  htmlFor: l,
@@ -5738,9 +5756,9 @@ function Ca({
5738
5756
  ]
5739
5757
  }
5740
5758
  ),
5741
- /* @__PURE__ */ b("div", { className: "relative !flex items-center input-control text-[#667085] !py-0 field-control", children: [
5742
- /* @__PURE__ */ n(F, { icon: "lucide:phone-call" }),
5743
- /* @__PURE__ */ n(Ai, { value: p, onChange: S, children: /* @__PURE__ */ b("div", { className: "relative", children: [
5759
+ /* @__PURE__ */ v("div", { className: "relative !flex items-center input-control text-[#667085] !py-0 field-control", children: [
5760
+ /* @__PURE__ */ n(W, { icon: "lucide:phone-call" }),
5761
+ /* @__PURE__ */ n(Ai, { value: p, onChange: A, children: /* @__PURE__ */ v("div", { className: "relative", children: [
5744
5762
  /* @__PURE__ */ n(
5745
5763
  Ai.Input,
5746
5764
  {
@@ -5750,8 +5768,8 @@ function Ca({
5750
5768
  onChange: (w) => g(w.target.value)
5751
5769
  }
5752
5770
  ),
5753
- /* @__PURE__ */ n(Ai.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ n(F, { icon: "lucide:chevron-down" }) }),
5754
- /* @__PURE__ */ n(Ai.Options, { className: "absolute z-10 w-[250px] left-0 bg-white border rounded-md shadow-lg max-h-[400px] overflow-y-auto", children: A == null ? void 0 : A.map((w, Y) => /* @__PURE__ */ b(
5771
+ /* @__PURE__ */ n(Ai.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ n(W, { icon: "lucide:chevron-down" }) }),
5772
+ /* @__PURE__ */ n(Ai.Options, { className: "absolute z-10 w-[250px] left-0 bg-white border rounded-md shadow-lg max-h-[400px] overflow-y-auto", children: S == null ? void 0 : S.map((w, Y) => /* @__PURE__ */ v(
5755
5773
  Ai.Option,
5756
5774
  {
5757
5775
  value: w,
@@ -5765,7 +5783,7 @@ function Ca({
5765
5783
  `${w.code}+ ${Y}`
5766
5784
  )) })
5767
5785
  ] }) }),
5768
- /* @__PURE__ */ b("div", { className: "relative flex items-center flex-1 z-[1]", children: [
5786
+ /* @__PURE__ */ v("div", { className: "relative flex items-center flex-1 z-[1]", children: [
5769
5787
  /* @__PURE__ */ n(
5770
5788
  "input",
5771
5789
  {
@@ -5784,7 +5802,7 @@ function Ca({
5784
5802
  minLength: N
5785
5803
  }
5786
5804
  ),
5787
- /* @__PURE__ */ n("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !q && C.length > 0 && !r && /* @__PURE__ */ n("span", { className: "text-green-500", children: /* @__PURE__ */ n(F, { icon: "bi:check-lg" }) }) })
5805
+ /* @__PURE__ */ n("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !q && C.length > 0 && !r && /* @__PURE__ */ n("span", { className: "text-green-500", children: /* @__PURE__ */ n(W, { icon: "bi:check-lg" }) }) })
5788
5806
  ] })
5789
5807
  ] }),
5790
5808
  h && /* @__PURE__ */ n("span", { className: "block text-[#475467] font-light leading-4 text-xs mt-2", children: h })
@@ -5805,7 +5823,7 @@ function Ma({
5805
5823
  clearErrors: u
5806
5824
  } = e || {};
5807
5825
  let c;
5808
- return R(() => {
5826
+ return I(() => {
5809
5827
  o(i.id);
5810
5828
  }, [i.id, o]), a && (c = a()[i.id]), /* @__PURE__ */ n(
5811
5829
  Ca,
@@ -5834,15 +5852,15 @@ function Ba({
5834
5852
  let a = "";
5835
5853
  s && (a = (r = s()[i.id]) != null ? r : "");
5836
5854
  const l = a.trim(), d = /^https?:\/\//i.test(l), u = l ? d ? l : `https://${l}` : "", c = !d;
5837
- return /* @__PURE__ */ b("div", { children: [
5838
- !(e != null && e.isReadOnly) && /* @__PURE__ */ b("div", { className: "relative", children: [
5855
+ return /* @__PURE__ */ v("div", { children: [
5856
+ !(e != null && e.isReadOnly) && /* @__PURE__ */ v("div", { className: "relative", children: [
5839
5857
  c && /* @__PURE__ */ n("span", { className: "text-sm absolute left-4 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none select-none", children: "https://" }),
5840
5858
  /* @__PURE__ */ n(
5841
5859
  "input",
5842
5860
  {
5843
5861
  placeholder: (i == null ? void 0 : i.placeholder) || "Enter Url link",
5844
5862
  type: "text",
5845
- className: W(
5863
+ className: U(
5846
5864
  "field-control",
5847
5865
  c && "!pl-16",
5848
5866
  i == null ? void 0 : i.customClass
@@ -5906,7 +5924,7 @@ const ne = {
5906
5924
  url: Ba
5907
5925
  }, Rn = "edit", La = (i, e) => {
5908
5926
  const o = ne[i.type];
5909
- return o ? /* @__PURE__ */ n(bn, { element: i, state: Rn, children: /* @__PURE__ */ b("div", { className: "relative w-full", children: [
5927
+ return o ? /* @__PURE__ */ n(bn, { element: i, state: Rn, children: /* @__PURE__ */ v("div", { className: "relative w-full", children: [
5910
5928
  i.type.toLowerCase() !== "grid" && /* @__PURE__ */ n("div", { className: "absolute top-0 left-0 z-20 w-full h-full" }),
5911
5929
  /* @__PURE__ */ n(
5912
5930
  o,
@@ -5920,7 +5938,7 @@ const ne = {
5920
5938
  }, vn = ({ col: i, children: e, customClass: o }) => /* @__PURE__ */ n(
5921
5939
  "div",
5922
5940
  {
5923
- className: W("w-full bg-white min-w-0", o),
5941
+ className: U("w-full bg-white min-w-0", o),
5924
5942
  style: { gridColumn: i },
5925
5943
  children: e
5926
5944
  }
@@ -5939,11 +5957,11 @@ const ne = {
5939
5957
  moveElement: r,
5940
5958
  isDragging: t,
5941
5959
  removeElement: h
5942
- } = mi(ci), m = $(
5960
+ } = bi(ci), m = $(
5943
5961
  () => Array.from({ length: i.columns }),
5944
5962
  [i.columns]
5945
- ), [v, f] = P(null);
5946
- R(() => {
5963
+ ), [b, f] = P(null);
5964
+ I(() => {
5947
5965
  const x = () => {
5948
5966
  f(null), c(!1);
5949
5967
  };
@@ -5961,42 +5979,42 @@ const ne = {
5961
5979
  []
5962
5980
  ), p = Z(
5963
5981
  (x, k) => {
5964
- const A = x.relatedTarget;
5965
- A && x.currentTarget.contains(A) || f((N) => N === k ? null : N);
5982
+ const S = x.relatedTarget;
5983
+ S && x.currentTarget.contains(S) || f((N) => N === k ? null : N);
5966
5984
  },
5967
5985
  []
5968
- ), S = Z(
5986
+ ), A = Z(
5969
5987
  (x, k) => {
5970
5988
  var T;
5971
5989
  x.preventDefault(), x.stopPropagation(), c(!1), f(null);
5972
- const A = k + 1, N = x.dataTransfer.getData("elementId");
5990
+ const S = k + 1, N = x.dataTransfer.getData("elementId");
5973
5991
  if (N) {
5974
5992
  r({
5975
5993
  draggedId: N,
5976
5994
  sectionId: e,
5977
5995
  targetGridId: i.id,
5978
- targetCol: A
5996
+ targetCol: S
5979
5997
  });
5980
5998
  return;
5981
5999
  }
5982
6000
  try {
5983
6001
  const Q = x.dataTransfer.getData("properties");
5984
6002
  if (!Q) return;
5985
- const U = JSON.parse(Q);
5986
- if ((U == null ? void 0 : U.type) === "grid") return;
6003
+ const z = JSON.parse(Q);
6004
+ if ((z == null ? void 0 : z.type) === "grid") return;
5987
6005
  const q = d.find((K) => K.id === e), w = (T = q == null ? void 0 : q.questionData) == null ? void 0 : T.find(
5988
6006
  (K) => {
5989
- var O;
5990
- return K.gridId === i.id && ((O = K.gridPosition) == null ? void 0 : O.col) === A;
6007
+ var G;
6008
+ return K.gridId === i.id && ((G = K.gridPosition) == null ? void 0 : G.col) === S;
5991
6009
  }
5992
6010
  );
5993
6011
  w && h(w.id, e);
5994
6012
  const Y = {
5995
- ...U,
6013
+ ...z,
5996
6014
  id: ri(),
5997
6015
  sectionId: e,
5998
6016
  gridId: i.id,
5999
- gridPosition: { col: A }
6017
+ gridPosition: { col: S }
6000
6018
  };
6001
6019
  u(Y, e);
6002
6020
  } catch (Q) {
@@ -6004,17 +6022,17 @@ const ne = {
6004
6022
  }
6005
6023
  },
6006
6024
  [u, i.id, d, e, c, r]
6007
- ), C = (x, k, A) => {
6008
- var O, D, E;
6009
- const N = x + 1, T = (D = (O = d.find((B) => B.id === e)) == null ? void 0 : O.questionData) == null ? void 0 : D.find(
6025
+ ), C = (x, k, S) => {
6026
+ var G, D, E;
6027
+ const N = x + 1, T = (D = (G = d.find((B) => B.id === e)) == null ? void 0 : G.questionData) == null ? void 0 : D.find(
6010
6028
  (B) => {
6011
6029
  var L;
6012
6030
  return B.gridId === i.id && ((L = B.gridPosition) == null ? void 0 : L.col) === N;
6013
6031
  }
6014
- ), Q = (E = T == null ? void 0 : T.id) != null ? E : null, U = Array.isArray(o) && o.find((B) => {
6032
+ ), Q = (E = T == null ? void 0 : T.id) != null ? E : null, z = Array.isArray(o) && o.find((B) => {
6015
6033
  var L;
6016
6034
  return ((L = B == null ? void 0 : B.props) == null ? void 0 : L.col) === N;
6017
- }), q = t && v === x, w = !!U, Y = t && !!l, K = w && Q && A === "edit" ? {
6035
+ }), q = t && b === x, w = !!z, Y = t && !!l, K = w && Q && S === "edit" ? {
6018
6036
  draggable: !0,
6019
6037
  onDragStart: (B) => {
6020
6038
  B.stopPropagation(), B.dataTransfer.setData("elementId", Q), B.dataTransfer.setData("properties", Q), B.dataTransfer.effectAllowed = "move", c(!0);
@@ -6023,21 +6041,21 @@ const ne = {
6023
6041
  f(null), c(!1);
6024
6042
  }
6025
6043
  } : {};
6026
- return /* @__PURE__ */ n("div", { className: "min-w-0", children: /* @__PURE__ */ b(
6044
+ return /* @__PURE__ */ n("div", { className: "min-w-0", children: /* @__PURE__ */ v(
6027
6045
  "div",
6028
6046
  {
6029
6047
  id: `grid-cell-${i.id}-${x}`,
6030
6048
  ...K,
6031
- onDrop: (B) => S(B, x),
6049
+ onDrop: (B) => A(B, x),
6032
6050
  onDragEnter: (B) => g(B, x),
6033
6051
  onDragOver: (B) => y(B, x),
6034
6052
  onDragLeave: (B) => p(B, x),
6035
- className: W(
6053
+ className: U(
6036
6054
  "relative border rounded-lg min-h-[110px] min-w-0",
6037
6055
  "flex items-center justify-center",
6038
6056
  "transition-all duration-200 ease-in-out",
6039
- A === "edit" ? "py-3 " : "",
6040
- w && A === "edit" && "cursor-grab active:cursor-grabbing border-none",
6057
+ S === "edit" ? "py-3 " : "",
6058
+ w && S === "edit" && "cursor-grab active:cursor-grabbing border-none",
6041
6059
  k,
6042
6060
  !Y && !q && "bg-white border-gray-200 text-gray-300",
6043
6061
  Y && !q && !w && "bg-blue-50 border-blue-200 border-dashed text-blue-300",
@@ -6046,20 +6064,20 @@ const ne = {
6046
6064
  q && w && "bg-orange-50 border-orange-400 border-dashed shadow-inner scale-[1.01] text-orange-500"
6047
6065
  ),
6048
6066
  children: [
6049
- w && A === "edit" && /* @__PURE__ */ n("div", { className: "absolute top-1 left-1/2 -translate-x-1/2 flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-gray-100 hover:bg-blue-100 text-gray-400 hover:text-blue-500 cursor-grab active:cursor-grabbing transition-colors z-10 opacity-60 hover:opacity-100 pointer-events-none select-none", children: /* @__PURE__ */ n(F, { icon: "ph:dots-six-bold" }) }),
6050
- q && !w && /* @__PURE__ */ b("span", { className: "absolute inset-0 flex flex-col items-center justify-center gap-1 text-blue-400 text-xs font-medium pointer-events-none", children: [
6051
- /* @__PURE__ */ n(F, { icon: "ph:plus-bold" }),
6067
+ w && S === "edit" && /* @__PURE__ */ n("div", { className: "absolute top-1 left-1/2 -translate-x-1/2 flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-gray-100 hover:bg-blue-100 text-gray-400 hover:text-blue-500 cursor-grab active:cursor-grabbing transition-colors z-10 opacity-60 hover:opacity-100 pointer-events-none select-none", children: /* @__PURE__ */ n(W, { icon: "ph:dots-six-bold" }) }),
6068
+ q && !w && /* @__PURE__ */ v("span", { className: "absolute inset-0 flex flex-col items-center justify-center gap-1 text-blue-400 text-xs font-medium pointer-events-none", children: [
6069
+ /* @__PURE__ */ n(W, { icon: "ph:plus-bold" }),
6052
6070
  "Drop here"
6053
6071
  ] }),
6054
6072
  q && w && /* @__PURE__ */ n("span", { className: "absolute top-1 right-1 text-xs text-orange-400 font-medium pointer-events-none px-1 py-0.5 bg-orange-50 rounded", children: "Replace" }),
6055
6073
  /* @__PURE__ */ n(
6056
6074
  "div",
6057
6075
  {
6058
- className: W(
6076
+ className: U(
6059
6077
  "w-full select-none min-w-0",
6060
6078
  q && "opacity-50 pointer-events-none"
6061
6079
  ),
6062
- children: U || /* @__PURE__ */ n("span", { className: "flex items-center justify-center text-gray-300", children: A === "edit" && /* @__PURE__ */ n(F, { icon: "ph:plus-bold" }) })
6080
+ children: z || /* @__PURE__ */ n("span", { className: "flex items-center justify-center text-gray-300", children: S === "edit" && /* @__PURE__ */ n(W, { icon: "ph:plus-bold" }) })
6063
6081
  }
6064
6082
  )
6065
6083
  ]
@@ -6103,13 +6121,13 @@ function Zi({
6103
6121
  l(!1), o();
6104
6122
  },
6105
6123
  style: { height: `${a ? 52 : s ? 28 : 4}px` },
6106
- className: W(
6124
+ className: U(
6107
6125
  "w-full rounded-md flex items-center justify-center",
6108
6126
  "transition-all duration-150 ease-in-out overflow-hidden",
6109
6127
  a ? "bg-blue-50 border-2 border-blue-300 border-dashed" : s ? "border-2 border-blue-200 border-dashed" : "border-2 border-transparent"
6110
6128
  ),
6111
- children: a && /* @__PURE__ */ b("span", { className: "flex items-center gap-1 text-blue-500 text-xs font-medium select-none pointer-events-none", children: [
6112
- /* @__PURE__ */ n(F, { icon: "octicon:plus-16" }),
6129
+ children: a && /* @__PURE__ */ v("span", { className: "flex items-center gap-1 text-blue-500 text-xs font-medium select-none pointer-events-none", children: [
6130
+ /* @__PURE__ */ n(W, { icon: "octicon:plus-16" }),
6113
6131
  "Drop here"
6114
6132
  ] })
6115
6133
  }
@@ -6122,68 +6140,68 @@ function Pa({ elementData: i, sectionId: e }) {
6122
6140
  setIsDragging: a,
6123
6141
  addElementInPosition: l,
6124
6142
  moveElement: d
6125
- } = mi(ci), [u, c] = P(null), r = $(
6143
+ } = bi(ci), [u, c] = P(null), r = $(
6126
6144
  () => {
6127
6145
  var p;
6128
- return ((p = o.find((S) => S.id === e)) == null ? void 0 : p.questionData) || [];
6146
+ return ((p = o.find((A) => A.id === e)) == null ? void 0 : p.questionData) || [];
6129
6147
  },
6130
6148
  [o, e]
6131
6149
  ), t = Z(
6132
- (p, S) => {
6133
- p.dataTransfer.setData("elementId", S), p.dataTransfer.setData("properties", S), p.dataTransfer.effectAllowed = "move", c(S), a(!0);
6150
+ (p, A) => {
6151
+ p.dataTransfer.setData("elementId", A), p.dataTransfer.setData("properties", A), p.dataTransfer.effectAllowed = "move", c(A), a(!0);
6134
6152
  },
6135
6153
  [a]
6136
6154
  ), h = Z(() => {
6137
6155
  c(null), a(!1);
6138
6156
  }, [a]);
6139
- R(() => {
6157
+ I(() => {
6140
6158
  !s && u && c(null);
6141
6159
  }, [s, u]);
6142
6160
  const m = Z(
6143
6161
  (p) => {
6144
6162
  p.preventDefault(), p.stopPropagation();
6145
- const S = p.dataTransfer.getData("elementId"), C = p.currentTarget.id;
6146
- if (!S || !C || S === C) {
6163
+ const A = p.dataTransfer.getData("elementId"), C = p.currentTarget.id;
6164
+ if (!A || !C || A === C) {
6147
6165
  h();
6148
6166
  return;
6149
6167
  }
6150
- const x = r.find((A) => A.id === S), k = r.findIndex(
6151
- (A) => A.id === C
6168
+ const x = r.find((S) => S.id === A), k = r.findIndex(
6169
+ (S) => S.id === C
6152
6170
  );
6153
- x != null && x.gridId && k !== -1 ? d({ draggedId: S, sectionId: e, targetIndex: k }) : d({ draggedId: S, sectionId: e, targetId: C }), c(null), a(!1);
6171
+ x != null && x.gridId && k !== -1 ? d({ draggedId: A, sectionId: e, targetIndex: k }) : d({ draggedId: A, sectionId: e, targetId: C }), c(null), a(!1);
6154
6172
  },
6155
6173
  [e, d, a, h, r]
6156
- ), v = Z(
6157
- (p, S) => {
6174
+ ), b = Z(
6175
+ (p, A) => {
6158
6176
  p.preventDefault(), p.stopPropagation(), a(!1);
6159
6177
  const C = p.dataTransfer.getData("elementId");
6160
6178
  if (C) {
6161
- d({ draggedId: C, sectionId: e, targetIndex: S }), c(null);
6179
+ d({ draggedId: C, sectionId: e, targetIndex: A }), c(null);
6162
6180
  return;
6163
6181
  }
6164
6182
  try {
6165
6183
  const x = JSON.parse(p.dataTransfer.getData("properties"));
6166
6184
  if ((x == null ? void 0 : x.type) === "section") return;
6167
6185
  const k = { ...x, id: ri(), sectionId: e };
6168
- l(k, e, S), c(null);
6186
+ l(k, e, A), c(null);
6169
6187
  } catch (x) {
6170
6188
  console.error("Drop error:", x);
6171
6189
  }
6172
6190
  },
6173
6191
  [l, e, a, d]
6174
6192
  ), f = Z(
6175
- (p, S = !1) => /* @__PURE__ */ n(
6193
+ (p, A = !1) => /* @__PURE__ */ n(
6176
6194
  "div",
6177
6195
  {
6178
6196
  id: p.id,
6179
6197
  draggable: !0,
6180
6198
  onDragStart: (C) => t(C, p.id),
6181
- onDragOver: S ? void 0 : (C) => {
6199
+ onDragOver: A ? void 0 : (C) => {
6182
6200
  C.preventDefault(), C.stopPropagation();
6183
6201
  },
6184
- onDrop: S ? void 0 : m,
6202
+ onDrop: A ? void 0 : m,
6185
6203
  onDragEnd: h,
6186
- className: W(
6204
+ className: U(
6187
6205
  "cursor-grab active:cursor-grabbing border p-4 w-full rounded-lg",
6188
6206
  "transition-all duration-200 ease-in-out",
6189
6207
  u === p.id ? "opacity-40 scale-[0.98] bg-gray-100 border-dashed border-blue-300 shadow-inner" : u ? "bg-white border-dashed border-blue-200 shadow-sm" : "bg-white border-gray-200 shadow-sm hover:border-blue-300 hover:shadow-md"
@@ -6193,46 +6211,46 @@ function Pa({ elementData: i, sectionId: e }) {
6193
6211
  p.id
6194
6212
  ),
6195
6213
  [u, m, e, t, h]
6196
- ), y = $(() => (i == null ? void 0 : i.reduce((p, S) => (S.gridId && (p[S.gridId] = p[S.gridId] || [], p[S.gridId].push(S)), p), {})) || {}, [i]);
6214
+ ), y = $(() => (i == null ? void 0 : i.reduce((p, A) => (A.gridId && (p[A.gridId] = p[A.gridId] || [], p[A.gridId].push(A)), p), {})) || {}, [i]);
6197
6215
  if (!(i != null && i.length))
6198
6216
  return /* @__PURE__ */ n(
6199
6217
  "div",
6200
6218
  {
6201
6219
  onDragOver: (p) => p.preventDefault(),
6202
- onDrop: (p) => v(p, 0),
6220
+ onDrop: (p) => b(p, 0),
6203
6221
  onDragEnd: h,
6204
6222
  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",
6205
6223
  children: "Drag or click an element to display"
6206
6224
  }
6207
6225
  );
6208
6226
  const g = i.filter((p) => !p.gridId);
6209
- return /* @__PURE__ */ b("div", { className: "relative flex flex-col w-full h-full gap-2", children: [
6227
+ return /* @__PURE__ */ v("div", { className: "relative flex flex-col w-full h-full gap-2", children: [
6210
6228
  /* @__PURE__ */ n(
6211
6229
  Zi,
6212
6230
  {
6213
6231
  index: 0,
6214
6232
  isDragging: s,
6215
- onDrop: v,
6233
+ onDrop: b,
6216
6234
  onDragEnd: h
6217
6235
  }
6218
6236
  ),
6219
6237
  g.map((p) => {
6220
- const S = r.findIndex((C) => C.id === p.id);
6238
+ const A = r.findIndex((C) => C.id === p.id);
6221
6239
  if (p.type === "grid") {
6222
6240
  const C = y[p.id] || [], x = u === p.id, k = !!u && !x;
6223
- return /* @__PURE__ */ b("div", { className: "flex flex-col gap-0", children: [
6241
+ return /* @__PURE__ */ v("div", { className: "flex flex-col gap-0", children: [
6224
6242
  /* @__PURE__ */ n(
6225
6243
  "div",
6226
6244
  {
6227
6245
  id: p.id,
6228
6246
  draggable: !0,
6229
- onDragStart: (A) => t(A, p.id),
6230
- onDragOver: (A) => {
6231
- A.preventDefault(), A.stopPropagation();
6247
+ onDragStart: (S) => t(S, p.id),
6248
+ onDragOver: (S) => {
6249
+ S.preventDefault(), S.stopPropagation();
6232
6250
  },
6233
6251
  onDrop: m,
6234
6252
  onDragEnd: h,
6235
- className: W(
6253
+ className: U(
6236
6254
  "w-full p-4 border rounded-lg cursor-grab active:cursor-grabbing",
6237
6255
  "transition-all duration-200 ease-in-out",
6238
6256
  x ? "opacity-40 scale-[0.98] bg-gray-100 border-dashed border-blue-400 shadow-inner" : k ? "bg-white border-dashed border-blue-200" : "bg-white border-gray-200 shadow-sm hover:border-blue-300 hover:shadow-md"
@@ -6245,9 +6263,9 @@ function Pa({ elementData: i, sectionId: e }) {
6245
6263
  state: wa,
6246
6264
  draggedElementId: u,
6247
6265
  children: C == null ? void 0 : C.map(
6248
- (A) => {
6266
+ (S) => {
6249
6267
  var N;
6250
- return /* @__PURE__ */ n(vn, { col: (N = A.gridPosition) == null ? void 0 : N.col, children: f(A, !0) }, A.id);
6268
+ return /* @__PURE__ */ n(vn, { col: (N = S.gridPosition) == null ? void 0 : N.col, children: f(S, !0) }, S.id);
6251
6269
  }
6252
6270
  )
6253
6271
  }
@@ -6257,22 +6275,22 @@ function Pa({ elementData: i, sectionId: e }) {
6257
6275
  /* @__PURE__ */ n(
6258
6276
  Zi,
6259
6277
  {
6260
- index: S + 1,
6278
+ index: A + 1,
6261
6279
  isDragging: s,
6262
- onDrop: v,
6280
+ onDrop: b,
6263
6281
  onDragEnd: h
6264
6282
  }
6265
6283
  )
6266
6284
  ] }, p.id);
6267
6285
  }
6268
- return /* @__PURE__ */ b("div", { className: "flex flex-col gap-0", children: [
6286
+ return /* @__PURE__ */ v("div", { className: "flex flex-col gap-0", children: [
6269
6287
  f(p),
6270
6288
  /* @__PURE__ */ n(
6271
6289
  Zi,
6272
6290
  {
6273
- index: S + 1,
6291
+ index: A + 1,
6274
6292
  isDragging: s,
6275
- onDrop: v,
6293
+ onDrop: b,
6276
6294
  onDragEnd: h
6277
6295
  }
6278
6296
  )
@@ -6299,25 +6317,25 @@ const Ea = Oi(Pa), Ra = M.object({
6299
6317
  if (si.useEffect(() => {
6300
6318
  i || t();
6301
6319
  }, [i, t]), !i) return null;
6302
- const h = (v) => {
6303
- s(v, o.id), e();
6320
+ const h = (b) => {
6321
+ s(b, o.id), e();
6304
6322
  }, m = d();
6305
- return /* @__PURE__ */ n("div", { className: "fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none", children: /* @__PURE__ */ b("div", { className: "min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center", children: [
6306
- /* @__PURE__ */ b("div", { className: "w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6", children: [
6323
+ return /* @__PURE__ */ n("div", { className: "fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none", children: /* @__PURE__ */ v("div", { className: "min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center", children: [
6324
+ /* @__PURE__ */ v("div", { className: "w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6", children: [
6307
6325
  /* @__PURE__ */ n("h2", { className: "text-lg font-semibold text-[#475467] font-onest", children: "Update Section Information" }),
6308
6326
  /* @__PURE__ */ n(
6309
6327
  "button",
6310
6328
  {
6311
6329
  onClick: e,
6312
6330
  className: "absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",
6313
- children: /* @__PURE__ */ n(F, { icon: "tabler:x" })
6331
+ children: /* @__PURE__ */ n(W, { icon: "tabler:x" })
6314
6332
  }
6315
6333
  )
6316
6334
  ] }),
6317
- /* @__PURE__ */ b("form", { onSubmit: l(h), className: "w-full", children: [
6318
- /* @__PURE__ */ b("div", { className: "w-full px-6 flex flex-col gap-5 z-10", children: [
6335
+ /* @__PURE__ */ v("form", { onSubmit: l(h), className: "w-full", children: [
6336
+ /* @__PURE__ */ v("div", { className: "w-full px-6 flex flex-col gap-5 z-10", children: [
6319
6337
  /* @__PURE__ */ n(
6320
- H,
6338
+ O,
6321
6339
  {
6322
6340
  label: "Title",
6323
6341
  name: "title",
@@ -6327,7 +6345,7 @@ const Ea = Oi(Pa), Ra = M.object({
6327
6345
  }
6328
6346
  ),
6329
6347
  /* @__PURE__ */ n(
6330
- H,
6348
+ O,
6331
6349
  {
6332
6350
  label: "Description",
6333
6351
  name: "description",
@@ -6338,7 +6356,7 @@ const Ea = Oi(Pa), Ra = M.object({
6338
6356
  }
6339
6357
  ),
6340
6358
  /* @__PURE__ */ n(
6341
- H,
6359
+ O,
6342
6360
  {
6343
6361
  label: "Disable Section",
6344
6362
  name: "disabled",
@@ -6351,7 +6369,7 @@ const Ea = Oi(Pa), Ra = M.object({
6351
6369
  }
6352
6370
  ),
6353
6371
  /* @__PURE__ */ n(
6354
- H,
6372
+ O,
6355
6373
  {
6356
6374
  label: "Hide Section",
6357
6375
  name: "isHidden",
@@ -6364,7 +6382,7 @@ const Ea = Oi(Pa), Ra = M.object({
6364
6382
  }
6365
6383
  )
6366
6384
  ] }),
6367
- /* @__PURE__ */ b("div", { className: "w-full px-6 pt-8 pb-6 flex gap-3 mt-4", children: [
6385
+ /* @__PURE__ */ v("div", { className: "w-full px-6 pt-8 pb-6 flex gap-3 mt-4", children: [
6368
6386
  /* @__PURE__ */ n(
6369
6387
  "button",
6370
6388
  {
@@ -6400,9 +6418,9 @@ const Ea = Oi(Pa), Ra = M.object({
6400
6418
  onDragOver: r,
6401
6419
  setIsDragging: t
6402
6420
  }) => {
6403
- var v, f;
6404
- const h = hi(null), m = hi((v = i.questionData) == null ? void 0 : v.length);
6405
- return R(() => {
6421
+ var b, f;
6422
+ const h = mi(null), m = mi((b = i.questionData) == null ? void 0 : b.length);
6423
+ return I(() => {
6406
6424
  var y;
6407
6425
  i.questionData.length > m.current && h.current && requestAnimationFrame(() => {
6408
6426
  var g;
@@ -6416,13 +6434,13 @@ const Ea = Oi(Pa), Ra = M.object({
6416
6434
  {
6417
6435
  ref: h,
6418
6436
  className: "bg-white group cursor-pointer rounded-lg shadow-[rgba(149,157,165,0.2)_0px_2px_2px] transition-colors duration-200",
6419
- children: /* @__PURE__ */ b(
6437
+ children: /* @__PURE__ */ v(
6420
6438
  "div",
6421
6439
  {
6422
6440
  className: ` border border-gray-200 rounded-lg px-4 transition-colors duration-200
6423
6441
  ${o === i.id ? " border-blue-200 bg-gray-100" : "bg-white"} ${a.includes(e) ? "min-h-[300px] pb-6 " : ""}`,
6424
6442
  children: [
6425
- /* @__PURE__ */ b("div", { className: "flex items-center justify-between", children: [
6443
+ /* @__PURE__ */ v("div", { className: "flex items-center justify-between", children: [
6426
6444
  /* @__PURE__ */ n(
6427
6445
  "div",
6428
6446
  {
@@ -6431,14 +6449,14 @@ const Ea = Oi(Pa), Ra = M.object({
6431
6449
  children: /* @__PURE__ */ n("h2", { className: "font-medium", children: i.title || "Section title" })
6432
6450
  }
6433
6451
  ),
6434
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-2", children: [
6452
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-2", children: [
6435
6453
  /* @__PURE__ */ n(
6436
6454
  "button",
6437
6455
  {
6438
6456
  type: "button",
6439
6457
  className: "p-1 text-xs border rounded-lg",
6440
6458
  onClick: () => d(i),
6441
- children: /* @__PURE__ */ n(F, { icon: "fluent:edit-28-regular" })
6459
+ children: /* @__PURE__ */ n(W, { icon: "fluent:edit-28-regular" })
6442
6460
  }
6443
6461
  ),
6444
6462
  c > 1 && /* @__PURE__ */ n(
@@ -6447,7 +6465,7 @@ const Ea = Oi(Pa), Ra = M.object({
6447
6465
  type: "button",
6448
6466
  className: "p-1 text-xs border rounded-lg",
6449
6467
  onClick: () => u(i.id),
6450
- children: /* @__PURE__ */ n(F, { icon: "lets-icons:trash-duotone-line" })
6468
+ children: /* @__PURE__ */ n(W, { icon: "lets-icons:trash-duotone-line" })
6451
6469
  }
6452
6470
  ),
6453
6471
  /* @__PURE__ */ n(
@@ -6457,7 +6475,7 @@ const Ea = Oi(Pa), Ra = M.object({
6457
6475
  className: "p-1 text-xs rounded-lg",
6458
6476
  onClick: () => l(e),
6459
6477
  children: /* @__PURE__ */ n(
6460
- F,
6478
+ W,
6461
6479
  {
6462
6480
  icon: a.includes(e) ? "fa6-solid:chevron-up" : "fa6-solid:chevron-down",
6463
6481
  iconClass: "text-base"
@@ -6468,7 +6486,7 @@ const Ea = Oi(Pa), Ra = M.object({
6468
6486
  ] })
6469
6487
  ] }),
6470
6488
  (i == null ? void 0 : i.description) && a.includes(e) && /* @__PURE__ */ n("p", { className: "mt-2 text-sm text-gray-600", children: i == null ? void 0 : i.description }),
6471
- a.includes(e) && /* @__PURE__ */ b(
6489
+ a.includes(e) && /* @__PURE__ */ v(
6472
6490
  "div",
6473
6491
  {
6474
6492
  className: "h-full mt-4 transition-all duration-200",
@@ -6495,7 +6513,7 @@ const Ea = Oi(Pa), Ra = M.object({
6495
6513
  i.id
6496
6514
  );
6497
6515
  }, Ka = () => {
6498
- const [i, e] = P(!1), o = hi(null), s = hi(null), {
6516
+ const [i, e] = P(!1), o = mi(null), s = mi(null), {
6499
6517
  removeSection: a,
6500
6518
  // addElement,
6501
6519
  addSection: l,
@@ -6505,11 +6523,11 @@ const Ea = Oi(Pa), Ra = M.object({
6505
6523
  selectedSection: r,
6506
6524
  activeSections: t,
6507
6525
  setActiveSections: h
6508
- } = mi(ci), m = hi((d == null ? void 0 : d.length) || 0);
6509
- R(() => {
6526
+ } = bi(ci), m = mi((d == null ? void 0 : d.length) || 0);
6527
+ I(() => {
6510
6528
  var p;
6511
6529
  c(((p = d[0]) == null ? void 0 : p.id) || null);
6512
- }, []), R(() => {
6530
+ }, []), I(() => {
6513
6531
  (d == null ? void 0 : d.length) > m.current && s.current && requestAnimationFrame(() => {
6514
6532
  var p;
6515
6533
  (p = s.current) == null || p.scrollTo({
@@ -6518,19 +6536,19 @@ const Ea = Oi(Pa), Ra = M.object({
6518
6536
  });
6519
6537
  }), m.current = (d == null ? void 0 : d.length) || 0;
6520
6538
  }, [d == null ? void 0 : d.length]);
6521
- const v = Z((p) => {
6539
+ const b = Z((p) => {
6522
6540
  p.preventDefault(), p.dataTransfer.dropEffect = "move", s.current && (s.current.scrollTop = s.current.scrollHeight);
6523
6541
  }, []);
6524
6542
  function f(p) {
6525
6543
  t.includes(p) ? h(
6526
- (S) => S.filter((C) => C !== p)
6527
- ) : h((S) => [...S, p]);
6544
+ (A) => A.filter((C) => C !== p)
6545
+ ) : h((A) => [...A, p]);
6528
6546
  }
6529
6547
  function y(p) {
6530
6548
  o.current = p, e(!0);
6531
6549
  }
6532
6550
  const g = di("config");
6533
- return /* @__PURE__ */ b(
6551
+ return /* @__PURE__ */ v(
6534
6552
  "div",
6535
6553
  {
6536
6554
  ref: s,
@@ -6544,18 +6562,18 @@ const Ea = Oi(Pa), Ra = M.object({
6544
6562
  section: o.current
6545
6563
  }
6546
6564
  ),
6547
- /* @__PURE__ */ b(
6565
+ /* @__PURE__ */ v(
6548
6566
  "div",
6549
6567
  {
6550
6568
  id: "section-container",
6551
6569
  className: "relative flex flex-col flex-1 w-full gap-y-3 container overflow-y-auto",
6552
6570
  children: [
6553
6571
  d == null ? void 0 : d.map(
6554
- (p, S) => /* @__PURE__ */ n(
6572
+ (p, A) => /* @__PURE__ */ n(
6555
6573
  Da,
6556
6574
  {
6557
6575
  section: p,
6558
- index: S,
6576
+ index: A,
6559
6577
  selectedSection: r,
6560
6578
  setSelectedSection: c,
6561
6579
  activeSections: t,
@@ -6563,13 +6581,13 @@ const Ea = Oi(Pa), Ra = M.object({
6563
6581
  handleSectionEdit: y,
6564
6582
  removeSection: a,
6565
6583
  formDataLength: d.length,
6566
- onDragOver: v,
6584
+ onDragOver: b,
6567
6585
  setIsDragging: u
6568
6586
  },
6569
6587
  p.id
6570
6588
  )
6571
6589
  ),
6572
- /* @__PURE__ */ n("div", { className: "flex justify-center", children: /* @__PURE__ */ b(
6590
+ /* @__PURE__ */ n("div", { className: "flex justify-center", children: /* @__PURE__ */ v(
6573
6591
  "button",
6574
6592
  {
6575
6593
  type: "button",
@@ -6589,7 +6607,7 @@ const Ea = Oi(Pa), Ra = M.object({
6589
6607
  }
6590
6608
  );
6591
6609
  }, Oa = () => {
6592
- const { formData: i, uploadUrl: e } = mi(
6610
+ const { formData: i, uploadUrl: e } = bi(
6593
6611
  ci
6594
6612
  ), o = di("config");
6595
6613
  return /* @__PURE__ */ n(
@@ -6608,10 +6626,10 @@ function Ga({
6608
6626
  questionData: i,
6609
6627
  uploadUrl: e
6610
6628
  }) {
6611
- const { setFormData: o, addSection: s, setUploadUrl: a, showPreview: l } = mi(ci);
6612
- R(() => {
6629
+ const { setFormData: o, addSection: s, setUploadUrl: a, showPreview: l } = bi(ci);
6630
+ I(() => {
6613
6631
  i && i.length > 0 && o(i);
6614
- }, [i, o]), R(() => {
6632
+ }, [i, o]), I(() => {
6615
6633
  a(e);
6616
6634
  }, [e, a]);
6617
6635
  const d = Z((u) => {
@@ -6626,7 +6644,7 @@ function Ga({
6626
6644
  console.error("Drop error:", c);
6627
6645
  }
6628
6646
  }, []);
6629
- return /* @__PURE__ */ b("div", { className: "flex gap-x-6 h-full", children: [
6647
+ return /* @__PURE__ */ v("div", { className: "flex gap-x-6 h-full", children: [
6630
6648
  /* @__PURE__ */ n(
6631
6649
  "div",
6632
6650
  {
@@ -6661,56 +6679,56 @@ const Yi = [
6661
6679
  { key: "layoutAndDisplay", title: "Layout & Display" },
6662
6680
  { key: "advancedData", title: "Advanced / Data" }
6663
6681
  ], Ha = () => {
6664
- const [i, e] = P(""), { setIsDragging: o, addElement: s, selectedSection: a } = mi(ci), l = Z(
6665
- (v, f) => {
6682
+ const [i, e] = P(""), { setIsDragging: o, addElement: s, selectedSection: a } = bi(ci), l = Z(
6683
+ (b, f) => {
6666
6684
  if (!a) {
6667
- vi.error("Please select a section to add an element.");
6685
+ hi.error("Please select a section to add an element.");
6668
6686
  return;
6669
6687
  }
6670
- v.dataTransfer.setData("properties", JSON.stringify(f)), v.dataTransfer.effectAllowed = "move", o(!0);
6688
+ b.dataTransfer.setData("properties", JSON.stringify(f)), b.dataTransfer.effectAllowed = "move", o(!0);
6671
6689
  },
6672
6690
  [o, a]
6673
6691
  );
6674
- function d(v) {
6692
+ function d(b) {
6675
6693
  if (!a) {
6676
- vi.error("Please select a section to add an element.");
6694
+ hi.error("Please select a section to add an element.");
6677
6695
  return;
6678
6696
  }
6679
6697
  const f = {
6680
- ...v,
6698
+ ...b,
6681
6699
  id: ri(),
6682
6700
  sectionId: a
6683
6701
  };
6684
6702
  s(f, a);
6685
6703
  }
6686
6704
  const u = di("config") || {}, c = u.elementColor, r = u.elementBgColor, t = u.elementBorderColor, h = Go.filter(
6687
- (v) => v.label.toLowerCase().includes(i.toLowerCase())
6688
- ), m = Yi == null ? void 0 : Yi.map((v) => ({
6689
- title: v.title,
6705
+ (b) => b.label.toLowerCase().includes(i.toLowerCase())
6706
+ ), m = Yi == null ? void 0 : Yi.map((b) => ({
6707
+ title: b.title,
6690
6708
  elements: h.filter(
6691
6709
  (f) => {
6692
6710
  var y;
6693
- return (y = Ho[v.key]) == null ? void 0 : y.includes(f.type);
6711
+ return (y = Ho[b.key]) == null ? void 0 : y.includes(f.type);
6694
6712
  }
6695
6713
  )
6696
- })).filter((v) => v.elements.length > 0);
6697
- return /* @__PURE__ */ b("div", { className: "pt-4 flex flex-col gap-y-6", children: [
6714
+ })).filter((b) => b.elements.length > 0);
6715
+ return /* @__PURE__ */ v("div", { className: "pt-4 flex flex-col gap-y-6", children: [
6698
6716
  /* @__PURE__ */ n("div", { className: "px-5", children: /* @__PURE__ */ n(
6699
6717
  "input",
6700
6718
  {
6701
6719
  className: "field-control",
6702
6720
  placeholder: "Search",
6703
6721
  value: i,
6704
- onChange: (v) => e(v.target.value),
6722
+ onChange: (b) => e(b.target.value),
6705
6723
  name: "search",
6706
6724
  id: "search"
6707
6725
  }
6708
6726
  ) }),
6709
- /* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto no-scrollbar max-h-[calc(100vh-100px)]", children: /* @__PURE__ */ n("ul", { className: "grid gap-y-5 mt-3 px-5 ", children: m == null ? void 0 : m.map((v, f) => {
6727
+ /* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto no-scrollbar max-h-[calc(100vh-100px)]", children: /* @__PURE__ */ n("ul", { className: "grid gap-y-5 mt-3 px-5 ", children: m == null ? void 0 : m.map((b, f) => {
6710
6728
  var y;
6711
- return /* @__PURE__ */ b("li", { children: [
6712
- /* @__PURE__ */ n("h4", { className: "mb-2 text-[11px] font-bold text-gray-500 uppercase", children: v.title }),
6713
- /* @__PURE__ */ n("ul", { className: "grid grid-cols-2 gap-y-3 gap-x-4 mb-3", children: (y = v.elements) == null ? void 0 : y.map((g) => /* @__PURE__ */ n(
6729
+ return /* @__PURE__ */ v("li", { children: [
6730
+ /* @__PURE__ */ n("h4", { className: "mb-2 text-[11px] font-bold text-gray-500 uppercase", children: b.title }),
6731
+ /* @__PURE__ */ n("ul", { className: "grid grid-cols-2 gap-y-3 gap-x-4 mb-3", children: (y = b.elements) == null ? void 0 : y.map((g) => /* @__PURE__ */ n(
6714
6732
  "li",
6715
6733
  {
6716
6734
  onDragStart: (p) => l(p, g),
@@ -6725,8 +6743,8 @@ const Yi = [
6725
6743
  hover:shadow-lg transition-all duration-200\r
6726
6744
  active:opacity-50 element_class`,
6727
6745
  draggable: !0,
6728
- children: /* @__PURE__ */ b("span", { className: "flex flex-col items-center justify-center w-full gap-2", children: [
6729
- /* @__PURE__ */ n("span", { style: { color: c }, children: /* @__PURE__ */ n(F, { icon: g.icon, iconClass: "w-6 h-6" }) }),
6746
+ children: /* @__PURE__ */ v("span", { className: "flex flex-col items-center justify-center w-full gap-2", children: [
6747
+ /* @__PURE__ */ n("span", { style: { color: c }, children: /* @__PURE__ */ n(W, { icon: g.icon, iconClass: "w-6 h-6" }) }),
6730
6748
  /* @__PURE__ */ n(
6731
6749
  "span",
6732
6750
  {
@@ -6757,15 +6775,15 @@ const Yi = [
6757
6775
  style: h,
6758
6776
  onClick: m
6759
6777
  }) => {
6760
- const v = W(
6778
+ const b = U(
6761
6779
  "btn inline-flex justify-center",
6762
6780
  {
6763
6781
  "pointer-events-none": o,
6764
6782
  "opacity-40 cursor-not-allowed": e
6765
6783
  },
6766
6784
  s
6767
- ), f = () => o ? /* @__PURE__ */ b(ti, { children: [
6768
- /* @__PURE__ */ b(
6785
+ ), f = () => o ? /* @__PURE__ */ v(ti, { children: [
6786
+ /* @__PURE__ */ v(
6769
6787
  "svg",
6770
6788
  {
6771
6789
  className: `animate-spin -ml-1 mr-3 h-5 w-5 ${u}`,
@@ -6796,17 +6814,17 @@ const Yi = [
6796
6814
  }
6797
6815
  ),
6798
6816
  "Submitting..."
6799
- ] }) : /* @__PURE__ */ b("span", { className: "flex items-center", children: [
6800
- a && l === "left" && /* @__PURE__ */ n("span", { className: `mr-[6px] ${d}`, children: /* @__PURE__ */ n(F, { icon: a }) }),
6817
+ ] }) : /* @__PURE__ */ v("span", { className: "flex items-center", children: [
6818
+ a && l === "left" && /* @__PURE__ */ n("span", { className: `mr-[6px] ${d}`, children: /* @__PURE__ */ n(W, { icon: a }) }),
6801
6819
  i && /* @__PURE__ */ n("span", { children: i }),
6802
- a && l === "right" && /* @__PURE__ */ n("span", { className: `ml-[6px] ${d}`, children: /* @__PURE__ */ n(F, { icon: a }) })
6820
+ a && l === "right" && /* @__PURE__ */ n("span", { className: `ml-[6px] ${d}`, children: /* @__PURE__ */ n(W, { icon: a }) })
6803
6821
  ] });
6804
- return r ? /* @__PURE__ */ n("div", { className: v, children: f() }) : c ? /* @__PURE__ */ n(ge, { to: c, className: v, children: f() }) : /* @__PURE__ */ n(
6822
+ return r ? /* @__PURE__ */ n("div", { className: b, children: f() }) : c ? /* @__PURE__ */ n(ge, { to: c, className: b, children: f() }) : /* @__PURE__ */ n(
6805
6823
  "button",
6806
6824
  {
6807
6825
  disabled: e,
6808
6826
  type: t,
6809
- className: v,
6827
+ className: b,
6810
6828
  "data-testid": "btn",
6811
6829
  onClick: m,
6812
6830
  style: h,
@@ -6815,7 +6833,7 @@ const Yi = [
6815
6833
  );
6816
6834
  };
6817
6835
  function Va() {
6818
- return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ b(
6836
+ return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ v(
6819
6837
  "svg",
6820
6838
  {
6821
6839
  width: "36",
@@ -6854,12 +6872,12 @@ const Fa = ({
6854
6872
  isOpen: i,
6855
6873
  onClose: e
6856
6874
  }) => {
6857
- const { formData: o, uploadUrl: s } = mi(
6875
+ const { formData: o, uploadUrl: s } = bi(
6858
6876
  ci
6859
6877
  );
6860
6878
  if (!i) return null;
6861
6879
  const a = di("config");
6862
- return /* @__PURE__ */ b("div", { className: "fixed inset-0 flex justify-center z-[999] cursor-default no-drag select-none w-screen h-screen pt-20 bg-[#F8F9FC]", children: [
6880
+ return /* @__PURE__ */ v("div", { className: "fixed inset-0 flex justify-center z-[999] cursor-default no-drag select-none w-screen h-screen pt-20 bg-[#F8F9FC]", children: [
6863
6881
  /* @__PURE__ */ n(
6864
6882
  "button",
6865
6883
  {
@@ -6883,7 +6901,7 @@ const Fa = ({
6883
6901
  ] });
6884
6902
  };
6885
6903
  function Wa() {
6886
- return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ b(
6904
+ return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ v(
6887
6905
  "svg",
6888
6906
  {
6889
6907
  width: "24",
@@ -6917,8 +6935,8 @@ function Ua({
6917
6935
  publishLoading: d,
6918
6936
  onTitleChange: u
6919
6937
  }) {
6920
- const { formData: c, setShowPreview: r, showPreview: t } = mi(ci), [h, m] = P(!1), [v, f] = P(!1), [y, g] = P(i || ""), p = di("config");
6921
- function S() {
6938
+ const { formData: c, setShowPreview: r, showPreview: t } = bi(ci), [h, m] = P(!1), [b, f] = P(!1), [y, g] = P(i || ""), p = di("config");
6939
+ function A() {
6922
6940
  localStorage.setItem("formData", JSON.stringify(c)), o == null || o(c);
6923
6941
  }
6924
6942
  function C() {
@@ -6927,8 +6945,8 @@ function Ua({
6927
6945
  function x() {
6928
6946
  f(!1), u && y !== i && u(y.trim());
6929
6947
  }
6930
- return /* @__PURE__ */ b("div", { className: "px-[30px] py-3 flex justify-between items-center bg-[#F9F9FB] top_bar border-b h-full", children: [
6931
- /* @__PURE__ */ b("span", { className: "flex items-center gap-x-2", children: [
6948
+ return /* @__PURE__ */ v("div", { className: "px-[30px] py-3 flex justify-between items-center bg-[#F9F9FB] top_bar border-b h-full", children: [
6949
+ /* @__PURE__ */ v("span", { className: "flex items-center gap-x-2", children: [
6932
6950
  e && /* @__PURE__ */ n(
6933
6951
  "button",
6934
6952
  {
@@ -6940,7 +6958,7 @@ function Ua({
6940
6958
  }
6941
6959
  ),
6942
6960
  " ",
6943
- v ? /* @__PURE__ */ n(
6961
+ b ? /* @__PURE__ */ n(
6944
6962
  "input",
6945
6963
  {
6946
6964
  type: "text",
@@ -6968,7 +6986,7 @@ function Ua({
6968
6986
  element: void 0
6969
6987
  }
6970
6988
  ),
6971
- /* @__PURE__ */ b("div", { className: "flex justify-end text-xs gap-x-3", children: [
6989
+ /* @__PURE__ */ v("div", { className: "flex justify-end text-xs gap-x-3", children: [
6972
6990
  /* @__PURE__ */ n(
6973
6991
  fi,
6974
6992
  {
@@ -6985,7 +7003,7 @@ function Ua({
6985
7003
  /* @__PURE__ */ n(
6986
7004
  fi,
6987
7005
  {
6988
- onClick: S,
7006
+ onClick: A,
6989
7007
  text: "Save",
6990
7008
  btnClass: "px-2 bg-transparent font-medium text-sm form_save__btn",
6991
7009
  icon: "lets-icons:save-duotone",
@@ -7010,11 +7028,11 @@ function Ua({
7010
7028
  ] });
7011
7029
  }
7012
7030
  const ee = ({ loadingClass: i }) => {
7013
- const e = W(
7031
+ const e = U(
7014
7032
  "h-full w-full min-h-[300px] flex justify-center items-center",
7015
7033
  i
7016
7034
  );
7017
- return R(() => {
7035
+ return I(() => {
7018
7036
  const o = di("config"), s = (o == null ? void 0 : o.loaderColor) || "#333";
7019
7037
  document.documentElement.style.setProperty("--loader-color", s);
7020
7038
  }, []), /* @__PURE__ */ n("div", { className: e, children: /* @__PURE__ */ n("span", { className: "loader" }) });
@@ -7032,11 +7050,11 @@ function za({
7032
7050
  onTitleChange: r,
7033
7051
  uploadUrl: t
7034
7052
  }) {
7035
- return /* @__PURE__ */ b(Kn, { children: [
7053
+ return /* @__PURE__ */ v(Kn, { children: [
7036
7054
  /* @__PURE__ */ n(Dn, { position: "top-right", richColors: !0, closeButton: !0 }),
7037
- /* @__PURE__ */ n("div", { className: "w-full h-full bg-[#F8F9FC] flex flex-col", children: /* @__PURE__ */ b("div", { className: "flex flex-1 ", children: [
7055
+ /* @__PURE__ */ n("div", { className: "w-full h-full bg-[#F8F9FC] flex flex-col", children: /* @__PURE__ */ v("div", { className: "flex flex-1 ", children: [
7038
7056
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("div", { className: "w-[250px] h-screen border-r border-[#E4E7EC] bg-white ", children: /* @__PURE__ */ n(ja, {}) }) }),
7039
- /* @__PURE__ */ b("div", { className: "flex-1 h-full max-h-full z-[1] w-[calc(100%-250px)]", children: [
7057
+ /* @__PURE__ */ v("div", { className: "flex-1 h-full max-h-full z-[1] w-[calc(100%-250px)]", children: [
7040
7058
  /* @__PURE__ */ n("div", { className: " h-[70px]", children: /* @__PURE__ */ n(
7041
7059
  Ua,
7042
7060
  {
@@ -7071,7 +7089,7 @@ const hs = ({
7071
7089
  publishLoading: t,
7072
7090
  onTitleChange: h,
7073
7091
  uploadUrl: m
7074
- }) => (R(() => {
7092
+ }) => (I(() => {
7075
7093
  s && Xn("config", s);
7076
7094
  }, [s]), /* @__PURE__ */ n(
7077
7095
  za,
@@ -7161,7 +7179,7 @@ function _a({ formData: i, isReadOnly: e }) {
7161
7179
  }), M.object().shape(o);
7162
7180
  }
7163
7181
  const Di = ({ element: i, validationData: e }) => {
7164
- const o = ne[i.type], { answerData: s } = mi(ci), a = $(
7182
+ const o = ne[i.type], { answerData: s } = bi(ci), a = $(
7165
7183
  () => {
7166
7184
  var u;
7167
7185
  return (u = i == null ? void 0 : i.acceptedFiles) == null ? void 0 : u.map((c) => c.label).join(", ");
@@ -7192,18 +7210,18 @@ const Di = ({ element: i, validationData: e }) => {
7192
7210
  }
7193
7211
  }
7194
7212
  ) : !0, [l, s, i]);
7195
- return o ? /* @__PURE__ */ b("div", { className: `${d ? "" : "invisible h-0"} min-w-0 w-full`, children: [
7196
- /* @__PURE__ */ b("div", { className: "mb-1.5 min-w-0", children: [
7197
- i.inputLabel && /* @__PURE__ */ b("label", { className: "block text-sm font-medium input_label", children: [
7213
+ return o ? /* @__PURE__ */ v("div", { className: `${d ? "" : "invisible h-0"} min-w-0 w-full`, children: [
7214
+ /* @__PURE__ */ v("div", { className: "mb-1.5 min-w-0", children: [
7215
+ i.inputLabel && /* @__PURE__ */ v("label", { className: "block text-sm font-medium input_label", children: [
7198
7216
  i.inputLabel,
7199
7217
  " ",
7200
- a && /* @__PURE__ */ b("span", { className: "text-gray-400 text-xs", children: [
7218
+ a && /* @__PURE__ */ v("span", { className: "text-gray-400 text-xs", children: [
7201
7219
  "(",
7202
7220
  a == null ? void 0 : a.toLowerCase(),
7203
7221
  ")"
7204
7222
  ] })
7205
7223
  ] }),
7206
- i.description && /* @__PURE__ */ b("small", { className: "block text-gray-400 mt-0.5 text-xs", children: [
7224
+ i.description && /* @__PURE__ */ v("small", { className: "block text-gray-400 mt-0.5 text-xs", children: [
7207
7225
  " ",
7208
7226
  i.description
7209
7227
  ] })
@@ -7229,7 +7247,7 @@ function $a({ form_data: i, options: e }) {
7229
7247
  customClass: "p-0 min-h-[60px] border-none",
7230
7248
  children: l == null ? void 0 : l.map((d) => {
7231
7249
  var u, c, r;
7232
- return /* @__PURE__ */ b(
7250
+ return /* @__PURE__ */ v(
7233
7251
  vn,
7234
7252
  {
7235
7253
  col: (u = d.gridPosition) == null ? void 0 : u.col,
@@ -7251,10 +7269,10 @@ function $a({ form_data: i, options: e }) {
7251
7269
  }
7252
7270
  ) }, a.id), s = (a) => {
7253
7271
  var l, d;
7254
- return /* @__PURE__ */ b(
7272
+ return /* @__PURE__ */ v(
7255
7273
  "div",
7256
7274
  {
7257
- className: W("group relative grid gap-y-[6px] min-w-0", a.elementClass),
7275
+ className: U("group relative grid gap-y-[6px] min-w-0", a.elementClass),
7258
7276
  children: [
7259
7277
  /* @__PURE__ */ n(
7260
7278
  Di,
@@ -7274,8 +7292,8 @@ function $a({ form_data: i, options: e }) {
7274
7292
  const l = /* @__PURE__ */ new Map();
7275
7293
  return (d = a.questionData) == null || d.forEach((c) => {
7276
7294
  c.gridId && (l.has(c.gridId) || l.set(c.gridId, []), l.get(c.gridId).push(c));
7277
- }), /* @__PURE__ */ b("div", { className: "pb-6 section_box min-w-0", children: [
7278
- (a.title || a.description) && /* @__PURE__ */ b("div", { className: "py-4 border-b border-gray-100 mb-7 section_box__title", children: [
7295
+ }), /* @__PURE__ */ v("div", { className: "pb-6 section_box min-w-0", children: [
7296
+ (a.title || a.description) && /* @__PURE__ */ v("div", { className: "py-4 border-b border-gray-100 mb-7 section_box__title", children: [
7279
7297
  a.title && /* @__PURE__ */ n("h2", { className: "text-lg font-semibold mb-[4px]", children: a.title }),
7280
7298
  a.description && /* @__PURE__ */ n("p", { className: "text-sm", children: a.description })
7281
7299
  ] }),
@@ -7301,7 +7319,7 @@ function Qa({ form_data: i, options: e, current: o }) {
7301
7319
  customClass: "p-0 min-h-[60px] border-none",
7302
7320
  children: u == null ? void 0 : u.map((c) => {
7303
7321
  var r, t, h;
7304
- return /* @__PURE__ */ b(
7322
+ return /* @__PURE__ */ v(
7305
7323
  vn,
7306
7324
  {
7307
7325
  col: (r = c.gridPosition) == null ? void 0 : r.col,
@@ -7323,10 +7341,10 @@ function Qa({ form_data: i, options: e, current: o }) {
7323
7341
  }
7324
7342
  ) }, a.id);
7325
7343
  }
7326
- return a.gridId ? null : /* @__PURE__ */ b(
7344
+ return a.gridId ? null : /* @__PURE__ */ v(
7327
7345
  "div",
7328
7346
  {
7329
- className: W(
7347
+ className: U(
7330
7348
  "group relative grid gap-y-[6px] min-w-0",
7331
7349
  a.elementClass
7332
7350
  ),
@@ -7360,14 +7378,14 @@ const is = ({
7360
7378
  hideFooter: c = !1,
7361
7379
  uploadUrl: r
7362
7380
  }) => {
7363
- var _, ni, ui, li, I, J, j, G;
7364
- const { setAnswerData: t, setUploadUrl: h } = mi(ci), [m, v] = P(0), f = $(
7381
+ var _, ni, ui, li, R, F, j, H;
7382
+ const { setAnswerData: t, setUploadUrl: h } = bi(ci), [m, b] = P(0), f = $(
7365
7383
  () => i.filter((V) => !V.isHidden).map((V) => {
7366
7384
  var oi;
7367
7385
  return V.isDisabled || V.disabled ? {
7368
7386
  ...V,
7369
- questionData: (oi = V.questionData) == null ? void 0 : oi.map((bi) => ({
7370
- ...bi,
7387
+ questionData: (oi = V.questionData) == null ? void 0 : oi.map((vi) => ({
7388
+ ...vi,
7371
7389
  isDisabled: !0
7372
7390
  }))
7373
7391
  } : V;
@@ -7376,7 +7394,7 @@ const is = ({
7376
7394
  ), y = (_ = f == null ? void 0 : f.length) != null ? _ : 0, g = di("config"), p = $(
7377
7395
  () => _a({ formData: f, isReadOnly: l }),
7378
7396
  [f, l]
7379
- ), S = ln({
7397
+ ), A = ln({
7380
7398
  resolver: mn(p),
7381
7399
  mode: "onSubmit",
7382
7400
  defaultValues: {}
@@ -7384,38 +7402,38 @@ const is = ({
7384
7402
  register: C,
7385
7403
  setValue: x,
7386
7404
  control: k,
7387
- handleSubmit: A,
7405
+ handleSubmit: S,
7388
7406
  reset: N,
7389
7407
  getValues: T,
7390
7408
  watch: Q,
7391
- formState: { errors: U, isSubmitting: q },
7409
+ formState: { errors: z, isSubmitting: q },
7392
7410
  trigger: w,
7393
7411
  setError: Y,
7394
7412
  clearErrors: K
7395
- } = S, O = me({ control: k }), D = $(
7396
- () => O,
7397
- [JSON.stringify(O)]
7413
+ } = A, G = me({ control: k }), D = $(
7414
+ () => G,
7415
+ [JSON.stringify(G)]
7398
7416
  ), E = Z(
7399
7417
  (V) => {
7400
7418
  a && a(V);
7401
7419
  },
7402
7420
  [a]
7403
7421
  );
7404
- R(() => {
7422
+ I(() => {
7405
7423
  h(r);
7406
- }, [h, r]), R(() => {
7424
+ }, [h, r]), I(() => {
7407
7425
  if (!(f != null && f.length) || !a) return;
7408
7426
  const V = f.flatMap(
7409
7427
  (X) => {
7410
7428
  var oi;
7411
- return (oi = X.questionData) == null ? void 0 : oi.map((bi) => ({
7412
- id: bi.id,
7413
- value: D[bi.id] || "",
7429
+ return (oi = X.questionData) == null ? void 0 : oi.map((vi) => ({
7430
+ id: vi.id,
7431
+ value: D[vi.id] || "",
7414
7432
  sectionId: X.id,
7415
- type: bi.type,
7433
+ type: vi.type,
7416
7434
  metaData: {
7417
- prefix: bi.prefix,
7418
- dateFormat: bi.dateFormat
7435
+ prefix: vi.prefix,
7436
+ dateFormat: vi.dateFormat
7419
7437
  }
7420
7438
  }));
7421
7439
  }
@@ -7427,15 +7445,15 @@ const is = ({
7427
7445
  E,
7428
7446
  a,
7429
7447
  t
7430
- ]), R(() => {
7448
+ ]), I(() => {
7431
7449
  e != null && e.length && N(Xa(e));
7432
7450
  }, [e, N]);
7433
7451
  const B = Z(
7434
7452
  (V) => {
7435
7453
  const X = f.flatMap(
7436
7454
  (oi) => {
7437
- var bi;
7438
- return (bi = oi.questionData) == null ? void 0 : bi.map((gi) => ({
7455
+ var vi;
7456
+ return (vi = oi.questionData) == null ? void 0 : vi.map((gi) => ({
7439
7457
  id: gi.id,
7440
7458
  value: V[gi.id] || "",
7441
7459
  sectionId: oi.id,
@@ -7447,9 +7465,9 @@ const is = ({
7447
7465
  }));
7448
7466
  }
7449
7467
  );
7450
- Object.keys(U).length > 0 || s == null || s(X);
7468
+ Object.keys(z).length > 0 || s == null || s(X);
7451
7469
  },
7452
- [U, f, s]
7470
+ [z, f, s]
7453
7471
  ), L = Z(async () => {
7454
7472
  var V, X;
7455
7473
  if (!o) {
@@ -7458,15 +7476,15 @@ const is = ({
7458
7476
  );
7459
7477
  if (!await w(oi)) return;
7460
7478
  }
7461
- v((oi) => oi + 1);
7462
- }, [m, f, o, w]), z = Z(() => {
7463
- v((V) => V - 1);
7479
+ b((oi) => oi + 1);
7480
+ }, [m, f, o, w]), J = Z(() => {
7481
+ b((V) => V - 1);
7464
7482
  }, []), ai = $(
7465
7483
  () => ({
7466
7484
  register: C,
7467
7485
  setValue: x,
7468
7486
  watch: Q,
7469
- errors: U,
7487
+ errors: z,
7470
7488
  trigger: w,
7471
7489
  isSubmitting: q,
7472
7490
  isReadOnly: l,
@@ -7478,7 +7496,7 @@ const is = ({
7478
7496
  C,
7479
7497
  x,
7480
7498
  Q,
7481
- U,
7499
+ z,
7482
7500
  w,
7483
7501
  q,
7484
7502
  l,
@@ -7487,22 +7505,22 @@ const is = ({
7487
7505
  K
7488
7506
  ]
7489
7507
  );
7490
- return /* @__PURE__ */ b(be, { ...S, children: [
7508
+ return /* @__PURE__ */ v(be, { ...A, children: [
7491
7509
  /* @__PURE__ */ n(Dn, { position: "top-right", richColors: !0, closeButton: !0 }),
7492
- /* @__PURE__ */ b(
7510
+ /* @__PURE__ */ v(
7493
7511
  "form",
7494
7512
  {
7495
- onSubmit: A(B),
7513
+ onSubmit: S(B),
7496
7514
  className: "container h-full mx-auto",
7497
7515
  children: [
7498
- /* @__PURE__ */ n("div", { className: "relative flex flex-col w-full min-w-0 py-4 gap-y-12", children: /* @__PURE__ */ b(
7516
+ /* @__PURE__ */ n("div", { className: "relative flex flex-col w-full min-w-0 py-4 gap-y-12", children: /* @__PURE__ */ v(
7499
7517
  "div",
7500
7518
  {
7501
7519
  className: "multi_section__box min-w-0",
7502
7520
  children: [
7503
- d === "multi" && (((ni = f == null ? void 0 : f[m]) == null ? void 0 : ni.title) || ((ui = f == null ? void 0 : f[m]) == null ? void 0 : ui.description)) && /* @__PURE__ */ b("div", { className: "py-4 mb-4 border-b border-gray-100 multi_section__title", children: [
7504
- ((li = f[m]) == null ? void 0 : li.title) && /* @__PURE__ */ n("h2", { className: "text-lg font-semibold mb-[6px]", children: (I = f[m]) == null ? void 0 : I.title }),
7505
- ((J = f[m]) == null ? void 0 : J.description) && /* @__PURE__ */ n("p", { className: "text-sm", children: (j = f[m]) == null ? void 0 : j.description })
7521
+ d === "multi" && (((ni = f == null ? void 0 : f[m]) == null ? void 0 : ni.title) || ((ui = f == null ? void 0 : f[m]) == null ? void 0 : ui.description)) && /* @__PURE__ */ v("div", { className: "py-4 mb-4 border-b border-gray-100 multi_section__title", children: [
7522
+ ((li = f[m]) == null ? void 0 : li.title) && /* @__PURE__ */ n("h2", { className: "text-lg font-semibold mb-[6px]", children: (R = f[m]) == null ? void 0 : R.title }),
7523
+ ((F = f[m]) == null ? void 0 : F.description) && /* @__PURE__ */ n("p", { className: "text-sm", children: (j = f[m]) == null ? void 0 : j.description })
7506
7524
  ] }),
7507
7525
  d === "multi" ? /* @__PURE__ */ n(
7508
7526
  Qa,
@@ -7520,18 +7538,18 @@ const is = ({
7520
7538
  )
7521
7539
  ]
7522
7540
  },
7523
- (G = f == null ? void 0 : f[m]) == null ? void 0 : G.id
7541
+ (H = f == null ? void 0 : f[m]) == null ? void 0 : H.id
7524
7542
  ) }),
7525
- !c && /* @__PURE__ */ n("footer", { className: "flex items-center justify-end gap-4 footer flex-wrap", children: d === "multi" ? /* @__PURE__ */ b(ti, { children: [
7526
- /* @__PURE__ */ b("div", { className: "flex gap-x-4 justify-between navigation_container w-full", children: [
7527
- /* @__PURE__ */ b("div", { children: [
7543
+ !c && /* @__PURE__ */ n("footer", { className: "flex items-center justify-end gap-4 footer flex-wrap", children: d === "multi" ? /* @__PURE__ */ v(ti, { children: [
7544
+ /* @__PURE__ */ v("div", { className: "flex gap-x-4 justify-between navigation_container w-full", children: [
7545
+ /* @__PURE__ */ v("div", { children: [
7528
7546
  " ",
7529
7547
  m > 0 && /* @__PURE__ */ n(
7530
7548
  fi,
7531
7549
  {
7532
7550
  type: "button",
7533
7551
  text: "Back",
7534
- onClick: z,
7552
+ onClick: J,
7535
7553
  btnClass: "text-gray-700 back_btn text-sm border-[#98A2B3] !font-medium !py-[10px] px-10 bg-gray-200 rounded-lg"
7536
7554
  }
7537
7555
  )
@@ -7550,7 +7568,7 @@ const is = ({
7550
7568
  (m === y - 1 || l) && !o && (u != null ? u : /* @__PURE__ */ n(
7551
7569
  fi,
7552
7570
  {
7553
- isDisabled: q || Object.keys(U).length > 0,
7571
+ isDisabled: q || Object.keys(z).length > 0,
7554
7572
  isLoading: q,
7555
7573
  type: "submit",
7556
7574
  text: "Submit",
@@ -7561,7 +7579,7 @@ const is = ({
7561
7579
  ] }) : !o && (u != null ? u : /* @__PURE__ */ n(
7562
7580
  fi,
7563
7581
  {
7564
- isDisabled: q || Object.keys(U).length > 0,
7582
+ isDisabled: q || Object.keys(z).length > 0,
7565
7583
  isLoading: q,
7566
7584
  type: "submit",
7567
7585
  text: "Submit",
@@ -7588,16 +7606,16 @@ function oe({
7588
7606
  onGetValues: t,
7589
7607
  uploadUrl: h
7590
7608
  }) {
7591
- R(() => {
7609
+ I(() => {
7592
7610
  d && Xn("config", d);
7593
7611
  }, [d]);
7594
7612
  const m = Z(
7595
- (v) => {
7596
- t && t(v);
7613
+ (b) => {
7614
+ t && t(b);
7597
7615
  },
7598
7616
  [t]
7599
7617
  );
7600
- return l ? /* @__PURE__ */ n(ee, {}) : e ? /* @__PURE__ */ b("div", { className: "w-full h-full min-w-0", children: [
7618
+ return l ? /* @__PURE__ */ n(ee, {}) : e ? /* @__PURE__ */ v("div", { className: "w-full h-full min-w-0", children: [
7601
7619
  /* @__PURE__ */ n("div", { id: "root-portal" }),
7602
7620
  /* @__PURE__ */ n(Kn, { children: /* @__PURE__ */ n(
7603
7621
  ns,