@arudovwen/form-builder-react 1.4.51 → 1.5.0

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,7 +1,7 @@
1
1
  import mi, { createContext as mo, useState as P, useMemo as oi, useEffect as D, forwardRef as ye, createElement as Sn, Fragment as Zi, useContext as ji, useRef as Ci, useCallback as $, memo as an } from "react";
2
2
  import { v4 as Ai } from "uuid";
3
3
  import bo from "react-datepicker";
4
- import { Listbox as di, Transition as wi, Combobox as Ri, ComboboxInput as vo, ComboboxButton as ho, ComboboxOptions as po, ComboboxOption as go } from "@headlessui/react";
4
+ import { Listbox as di, Transition as Ei, Combobox as Ri, ComboboxInput as vo, ComboboxButton as ho, ComboboxOptions as po, ComboboxOption as go } from "@headlessui/react";
5
5
  import { toast as ki, Toaster as Ae } from "sonner";
6
6
  import Ii from "axios";
7
7
  import sn from "react-currency-input-field";
@@ -28,11 +28,11 @@ function Co() {
28
28
  ie = 1;
29
29
  var i = mi, e = Symbol.for("react.element"), o = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
30
30
  function u(t, d, r) {
31
- var c, v = {}, h = null, p = null;
32
- r !== void 0 && (h = "" + r), d.key !== void 0 && (h = "" + d.key), d.ref !== void 0 && (p = d.ref);
31
+ var c, v = {}, h = null, b = null;
32
+ r !== void 0 && (h = "" + r), d.key !== void 0 && (h = "" + d.key), d.ref !== void 0 && (b = d.ref);
33
33
  for (c in d) s.call(d, c) && !l.hasOwnProperty(c) && (v[c] = d[c]);
34
34
  if (t && t.defaultProps) for (c in d = t.defaultProps, d) v[c] === void 0 && (v[c] = d[c]);
35
- return { $$typeof: e, type: t, key: h, ref: p, props: v, _owner: a.current };
35
+ return { $$typeof: e, type: t, key: h, ref: b, props: v, _owner: a.current };
36
36
  }
37
37
  return Gi.Fragment = o, Gi.jsx = u, Gi.jsxs = u, Gi;
38
38
  }
@@ -49,58 +49,58 @@ var Hi = {};
49
49
  var ne;
50
50
  function Mo() {
51
51
  return ne || (ne = 1, process.env.NODE_ENV !== "production" && function() {
52
- var i = mi, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), t = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), r = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), y = Symbol.iterator, f = "@@iterator";
53
- function g(b) {
54
- if (b === null || typeof b != "object")
52
+ var i = mi, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), t = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), r = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), f = Symbol.iterator, x = "@@iterator";
53
+ function g(m) {
54
+ if (m === null || typeof m != "object")
55
55
  return null;
56
- var C = y && b[y] || b[f];
57
- return typeof C == "function" ? C : null;
56
+ var k = f && m[f] || m[x];
57
+ return typeof k == "function" ? k : null;
58
58
  }
59
- var m = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
60
- function x(b) {
59
+ var p = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
60
+ function y(m) {
61
61
  {
62
- for (var C = arguments.length, M = new Array(C > 1 ? C - 1 : 0), V = 1; V < C; V++)
62
+ for (var k = arguments.length, M = new Array(k > 1 ? k - 1 : 0), V = 1; V < k; V++)
63
63
  M[V - 1] = arguments[V];
64
- j("error", b, M);
64
+ C("error", m, M);
65
65
  }
66
66
  }
67
- function j(b, C, M) {
67
+ function C(m, k, M) {
68
68
  {
69
- var V = m.ReactDebugCurrentFrame, ei = V.getStackAddendum();
70
- ei !== "" && (C += "%s", M = M.concat([ei]));
69
+ var V = p.ReactDebugCurrentFrame, ei = V.getStackAddendum();
70
+ ei !== "" && (k += "%s", M = M.concat([ei]));
71
71
  var ai = M.map(function(Q) {
72
72
  return String(Q);
73
73
  });
74
- ai.unshift("Warning: " + C), Function.prototype.apply.call(console[b], console, ai);
74
+ ai.unshift("Warning: " + k), Function.prototype.apply.call(console[m], console, ai);
75
75
  }
76
76
  }
77
- var S = !1, N = !1, A = !1, k = !1, O = !1, ii;
77
+ var S = !1, N = !1, A = !1, j = !1, O = !1, ii;
78
78
  ii = Symbol.for("react.module.reference");
79
- function z(b) {
80
- return !!(typeof b == "string" || typeof b == "function" || b === s || b === l || O || b === a || b === r || b === c || k || b === p || S || N || A || typeof b == "object" && b !== null && (b.$$typeof === h || b.$$typeof === v || b.$$typeof === u || b.$$typeof === t || b.$$typeof === d || // This needs to include all possible module reference object
79
+ function z(m) {
80
+ return !!(typeof m == "string" || typeof m == "function" || m === s || m === l || O || m === a || m === r || m === c || j || m === b || S || N || A || typeof m == "object" && m !== null && (m.$$typeof === h || m.$$typeof === v || m.$$typeof === u || m.$$typeof === t || m.$$typeof === d || // This needs to include all possible module reference object
81
81
  // types supported by any Flight configuration anywhere since
82
82
  // we don't know which Flight build this will end up being used
83
83
  // with.
84
- b.$$typeof === ii || b.getModuleId !== void 0));
84
+ m.$$typeof === ii || m.getModuleId !== void 0));
85
85
  }
86
- function Z(b, C, M) {
87
- var V = b.displayName;
86
+ function Z(m, k, M) {
87
+ var V = m.displayName;
88
88
  if (V)
89
89
  return V;
90
- var ei = C.displayName || C.name || "";
90
+ var ei = k.displayName || k.name || "";
91
91
  return ei !== "" ? M + "(" + ei + ")" : M;
92
92
  }
93
- function w(b) {
94
- return b.displayName || "Context";
93
+ function E(m) {
94
+ return m.displayName || "Context";
95
95
  }
96
- function W(b) {
97
- if (b == null)
96
+ function W(m) {
97
+ if (m == null)
98
98
  return null;
99
- if (typeof b.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof b == "function")
100
- return b.displayName || b.name || null;
101
- if (typeof b == "string")
102
- return b;
103
- switch (b) {
99
+ if (typeof m.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof m == "function")
100
+ return m.displayName || m.name || null;
101
+ if (typeof m == "string")
102
+ return m;
103
+ switch (m) {
104
104
  case s:
105
105
  return "Fragment";
106
106
  case o:
@@ -114,21 +114,21 @@ function Mo() {
114
114
  case c:
115
115
  return "SuspenseList";
116
116
  }
117
- if (typeof b == "object")
118
- switch (b.$$typeof) {
117
+ if (typeof m == "object")
118
+ switch (m.$$typeof) {
119
119
  case t:
120
- var C = b;
121
- return w(C) + ".Consumer";
120
+ var k = m;
121
+ return E(k) + ".Consumer";
122
122
  case u:
123
- var M = b;
124
- return w(M._context) + ".Provider";
123
+ var M = m;
124
+ return E(M._context) + ".Provider";
125
125
  case d:
126
- return Z(b, b.render, "ForwardRef");
126
+ return Z(m, m.render, "ForwardRef");
127
127
  case v:
128
- var V = b.displayName || null;
129
- return V !== null ? V : W(b.type) || "Memo";
128
+ var V = m.displayName || null;
129
+ return V !== null ? V : W(m.type) || "Memo";
130
130
  case h: {
131
- var ei = b, ai = ei._payload, Q = ei._init;
131
+ var ei = m, ai = ei._payload, Q = ei._init;
132
132
  try {
133
133
  return W(Q(ai));
134
134
  } catch (Y) {
@@ -138,28 +138,28 @@ function Mo() {
138
138
  }
139
139
  return null;
140
140
  }
141
- var I = Object.assign, G = 0, H, R, T, E, U, ci, ni;
141
+ var I = Object.assign, G = 0, H, R, T, w, U, ci, ni;
142
142
  function si() {
143
143
  }
144
144
  si.__reactDisabledLog = !0;
145
145
  function hi() {
146
146
  {
147
147
  if (G === 0) {
148
- H = console.log, R = console.info, T = console.warn, E = console.error, U = console.group, ci = console.groupCollapsed, ni = console.groupEnd;
149
- var b = {
148
+ H = console.log, R = console.info, T = console.warn, w = console.error, U = console.group, ci = console.groupCollapsed, ni = console.groupEnd;
149
+ var m = {
150
150
  configurable: !0,
151
151
  enumerable: !0,
152
152
  value: si,
153
153
  writable: !0
154
154
  };
155
155
  Object.defineProperties(console, {
156
- info: b,
157
- log: b,
158
- warn: b,
159
- error: b,
160
- group: b,
161
- groupCollapsed: b,
162
- groupEnd: b
156
+ info: m,
157
+ log: m,
158
+ warn: m,
159
+ error: m,
160
+ group: m,
161
+ groupCollapsed: m,
162
+ groupEnd: m
163
163
  });
164
164
  }
165
165
  G++;
@@ -168,40 +168,40 @@ function Mo() {
168
168
  function vi() {
169
169
  {
170
170
  if (G--, G === 0) {
171
- var b = {
171
+ var m = {
172
172
  configurable: !0,
173
173
  enumerable: !0,
174
174
  writable: !0
175
175
  };
176
176
  Object.defineProperties(console, {
177
- log: I({}, b, {
177
+ log: I({}, m, {
178
178
  value: H
179
179
  }),
180
- info: I({}, b, {
180
+ info: I({}, m, {
181
181
  value: R
182
182
  }),
183
- warn: I({}, b, {
183
+ warn: I({}, m, {
184
184
  value: T
185
185
  }),
186
- error: I({}, b, {
187
- value: E
186
+ error: I({}, m, {
187
+ value: w
188
188
  }),
189
- group: I({}, b, {
189
+ group: I({}, m, {
190
190
  value: U
191
191
  }),
192
- groupCollapsed: I({}, b, {
192
+ groupCollapsed: I({}, m, {
193
193
  value: ci
194
194
  }),
195
- groupEnd: I({}, b, {
195
+ groupEnd: I({}, m, {
196
196
  value: ni
197
197
  })
198
198
  });
199
199
  }
200
- G < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
200
+ G < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
201
201
  }
202
202
  }
203
- var L = m.ReactCurrentDispatcher, K;
204
- function X(b, C, M) {
203
+ var L = p.ReactCurrentDispatcher, K;
204
+ function X(m, k, M) {
205
205
  {
206
206
  if (K === void 0)
207
207
  try {
@@ -211,7 +211,7 @@ function Mo() {
211
211
  K = V && V[1] || "";
212
212
  }
213
213
  return `
214
- ` + K + b;
214
+ ` + K + m;
215
215
  }
216
216
  }
217
217
  var ui = !1, J;
@@ -219,11 +219,11 @@ function Mo() {
219
219
  var li = typeof WeakMap == "function" ? WeakMap : Map;
220
220
  J = new li();
221
221
  }
222
- function pi(b, C) {
223
- if (!b || ui)
222
+ function pi(m, k) {
223
+ if (!m || ui)
224
224
  return "";
225
225
  {
226
- var M = J.get(b);
226
+ var M = J.get(m);
227
227
  if (M !== void 0)
228
228
  return M;
229
229
  }
@@ -234,7 +234,7 @@ function Mo() {
234
234
  var ai;
235
235
  ai = L.current, L.current = null, hi();
236
236
  try {
237
- if (C) {
237
+ if (k) {
238
238
  var Q = function() {
239
239
  throw Error();
240
240
  };
@@ -248,14 +248,14 @@ function Mo() {
248
248
  } catch (yi) {
249
249
  V = yi;
250
250
  }
251
- Reflect.construct(b, [], Q);
251
+ Reflect.construct(m, [], Q);
252
252
  } else {
253
253
  try {
254
254
  Q.call();
255
255
  } catch (yi) {
256
256
  V = yi;
257
257
  }
258
- b.call(Q.prototype);
258
+ m.call(Q.prototype);
259
259
  }
260
260
  } else {
261
261
  try {
@@ -263,7 +263,7 @@ function Mo() {
263
263
  } catch (yi) {
264
264
  V = yi;
265
265
  }
266
- b();
266
+ m();
267
267
  }
268
268
  } catch (yi) {
269
269
  if (yi && V && typeof yi.stack == "string") {
@@ -278,7 +278,7 @@ function Mo() {
278
278
  if (ri--, bi--, bi < 0 || Y[ri] !== fi[bi]) {
279
279
  var Ni = `
280
280
  ` + Y[ri].replace(" at new ", " at ");
281
- return b.displayName && Ni.includes("<anonymous>") && (Ni = Ni.replace("<anonymous>", b.displayName)), typeof b == "function" && J.set(b, Ni), Ni;
281
+ return m.displayName && Ni.includes("<anonymous>") && (Ni = Ni.replace("<anonymous>", m.displayName)), typeof m == "function" && J.set(m, Ni), Ni;
282
282
  }
283
283
  while (ri >= 1 && bi >= 0);
284
284
  break;
@@ -287,150 +287,150 @@ function Mo() {
287
287
  } finally {
288
288
  ui = !1, L.current = ai, vi(), Error.prepareStackTrace = ei;
289
289
  }
290
- var Pi = b ? b.displayName || b.name : "", Bi = Pi ? X(Pi) : "";
291
- return typeof b == "function" && J.set(b, Bi), Bi;
290
+ var Pi = m ? m.displayName || m.name : "", Bi = Pi ? X(Pi) : "";
291
+ return typeof m == "function" && J.set(m, Bi), Bi;
292
292
  }
293
- function Si(b, C, M) {
294
- return pi(b, !1);
293
+ function Si(m, k, M) {
294
+ return pi(m, !1);
295
295
  }
296
- function Mi(b) {
297
- var C = b.prototype;
298
- return !!(C && C.isReactComponent);
296
+ function Mi(m) {
297
+ var k = m.prototype;
298
+ return !!(k && k.isReactComponent);
299
299
  }
300
- function zi(b, C, M) {
301
- if (b == null)
300
+ function zi(m, k, M) {
301
+ if (m == null)
302
302
  return "";
303
- if (typeof b == "function")
304
- return pi(b, Mi(b));
305
- if (typeof b == "string")
306
- return X(b);
307
- switch (b) {
303
+ if (typeof m == "function")
304
+ return pi(m, Mi(m));
305
+ if (typeof m == "string")
306
+ return X(m);
307
+ switch (m) {
308
308
  case r:
309
309
  return X("Suspense");
310
310
  case c:
311
311
  return X("SuspenseList");
312
312
  }
313
- if (typeof b == "object")
314
- switch (b.$$typeof) {
313
+ if (typeof m == "object")
314
+ switch (m.$$typeof) {
315
315
  case d:
316
- return Si(b.render);
316
+ return Si(m.render);
317
317
  case v:
318
- return zi(b.type, C, M);
318
+ return zi(m.type, k, M);
319
319
  case h: {
320
- var V = b, ei = V._payload, ai = V._init;
320
+ var V = m, ei = V._payload, ai = V._init;
321
321
  try {
322
- return zi(ai(ei), C, M);
322
+ return zi(ai(ei), k, M);
323
323
  } catch (Q) {
324
324
  }
325
325
  }
326
326
  }
327
327
  return "";
328
328
  }
329
- var Ki = Object.prototype.hasOwnProperty, Gn = {}, Hn = m.ReactDebugCurrentFrame;
330
- function _i(b) {
331
- if (b) {
332
- var C = b._owner, M = zi(b.type, b._source, C ? C.type : null);
329
+ var Ki = Object.prototype.hasOwnProperty, Gn = {}, Hn = p.ReactDebugCurrentFrame;
330
+ function _i(m) {
331
+ if (m) {
332
+ var k = m._owner, M = zi(m.type, m._source, k ? k.type : null);
333
333
  Hn.setExtraStackFrame(M);
334
334
  } else
335
335
  Hn.setExtraStackFrame(null);
336
336
  }
337
- function We(b, C, M, V, ei) {
337
+ function We(m, k, M, V, ei) {
338
338
  {
339
339
  var ai = Function.call.bind(Ki);
340
- for (var Q in b)
341
- if (ai(b, Q)) {
340
+ for (var Q in m)
341
+ if (ai(m, Q)) {
342
342
  var Y = void 0;
343
343
  try {
344
- if (typeof b[Q] != "function") {
345
- var fi = Error((V || "React class") + ": " + M + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof b[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
344
+ if (typeof m[Q] != "function") {
345
+ var fi = Error((V || "React class") + ": " + M + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof m[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
346
346
  throw fi.name = "Invariant Violation", fi;
347
347
  }
348
- Y = b[Q](C, Q, V, M, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
348
+ Y = m[Q](k, Q, V, M, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
349
349
  } catch (ri) {
350
350
  Y = ri;
351
351
  }
352
- Y && !(Y instanceof Error) && (_i(ei), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", V || "React class", M, Q, typeof Y), _i(null)), Y instanceof Error && !(Y.message in Gn) && (Gn[Y.message] = !0, _i(ei), x("Failed %s type: %s", M, Y.message), _i(null));
352
+ Y && !(Y instanceof Error) && (_i(ei), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", V || "React class", M, Q, typeof Y), _i(null)), Y instanceof Error && !(Y.message in Gn) && (Gn[Y.message] = !0, _i(ei), y("Failed %s type: %s", M, Y.message), _i(null));
353
353
  }
354
354
  }
355
355
  }
356
356
  var Ue = Array.isArray;
357
- function dn(b) {
358
- return Ue(b);
357
+ function dn(m) {
358
+ return Ue(m);
359
359
  }
360
- function ze(b) {
360
+ function ze(m) {
361
361
  {
362
- var C = typeof Symbol == "function" && Symbol.toStringTag, M = C && b[Symbol.toStringTag] || b.constructor.name || "Object";
362
+ var k = typeof Symbol == "function" && Symbol.toStringTag, M = k && m[Symbol.toStringTag] || m.constructor.name || "Object";
363
363
  return M;
364
364
  }
365
365
  }
366
- function _e(b) {
366
+ function _e(m) {
367
367
  try {
368
- return Vn(b), !1;
369
- } catch (C) {
368
+ return Vn(m), !1;
369
+ } catch (k) {
370
370
  return !0;
371
371
  }
372
372
  }
373
- function Vn(b) {
374
- return "" + b;
373
+ function Vn(m) {
374
+ return "" + m;
375
375
  }
376
- function Fn(b) {
377
- if (_e(b))
378
- return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(b)), Vn(b);
376
+ function Fn(m) {
377
+ if (_e(m))
378
+ return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(m)), Vn(m);
379
379
  }
380
- var Wn = m.ReactCurrentOwner, Je = {
380
+ var Wn = p.ReactCurrentOwner, Je = {
381
381
  key: !0,
382
382
  ref: !0,
383
383
  __self: !0,
384
384
  __source: !0
385
385
  }, Un, zn;
386
- function Ye(b) {
387
- if (Ki.call(b, "ref")) {
388
- var C = Object.getOwnPropertyDescriptor(b, "ref").get;
389
- if (C && C.isReactWarning)
386
+ function Ye(m) {
387
+ if (Ki.call(m, "ref")) {
388
+ var k = Object.getOwnPropertyDescriptor(m, "ref").get;
389
+ if (k && k.isReactWarning)
390
390
  return !1;
391
391
  }
392
- return b.ref !== void 0;
392
+ return m.ref !== void 0;
393
393
  }
394
- function qe(b) {
395
- if (Ki.call(b, "key")) {
396
- var C = Object.getOwnPropertyDescriptor(b, "key").get;
397
- if (C && C.isReactWarning)
394
+ function qe(m) {
395
+ if (Ki.call(m, "key")) {
396
+ var k = Object.getOwnPropertyDescriptor(m, "key").get;
397
+ if (k && k.isReactWarning)
398
398
  return !1;
399
399
  }
400
- return b.key !== void 0;
400
+ return m.key !== void 0;
401
401
  }
402
- function Ze(b, C) {
403
- typeof b.ref == "string" && Wn.current;
402
+ function Ze(m, k) {
403
+ typeof m.ref == "string" && Wn.current;
404
404
  }
405
- function $e(b, C) {
405
+ function $e(m, k) {
406
406
  {
407
407
  var M = function() {
408
- Un || (Un = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", C));
408
+ Un || (Un = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", k));
409
409
  };
410
- M.isReactWarning = !0, Object.defineProperty(b, "key", {
410
+ M.isReactWarning = !0, Object.defineProperty(m, "key", {
411
411
  get: M,
412
412
  configurable: !0
413
413
  });
414
414
  }
415
415
  }
416
- function Qe(b, C) {
416
+ function Qe(m, k) {
417
417
  {
418
418
  var M = function() {
419
- zn || (zn = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", C));
419
+ zn || (zn = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", k));
420
420
  };
421
- M.isReactWarning = !0, Object.defineProperty(b, "ref", {
421
+ M.isReactWarning = !0, Object.defineProperty(m, "ref", {
422
422
  get: M,
423
423
  configurable: !0
424
424
  });
425
425
  }
426
426
  }
427
- var Xe = function(b, C, M, V, ei, ai, Q) {
427
+ var Xe = function(m, k, M, V, ei, ai, Q) {
428
428
  var Y = {
429
429
  // This tag allows us to uniquely identify this as a React Element
430
430
  $$typeof: e,
431
431
  // Built-in properties that belong on the element
432
- type: b,
433
- key: C,
432
+ type: m,
433
+ key: k,
434
434
  ref: M,
435
435
  props: Q,
436
436
  // Record the component responsible for creating this element.
@@ -453,169 +453,169 @@ function Mo() {
453
453
  value: ei
454
454
  }), Object.freeze && (Object.freeze(Y.props), Object.freeze(Y)), Y;
455
455
  };
456
- function io(b, C, M, V, ei) {
456
+ function io(m, k, M, V, ei) {
457
457
  {
458
458
  var ai, Q = {}, Y = null, fi = null;
459
- M !== void 0 && (Fn(M), Y = "" + M), qe(C) && (Fn(C.key), Y = "" + C.key), Ye(C) && (fi = C.ref, Ze(C, ei));
460
- for (ai in C)
461
- Ki.call(C, ai) && !Je.hasOwnProperty(ai) && (Q[ai] = C[ai]);
462
- if (b && b.defaultProps) {
463
- var ri = b.defaultProps;
459
+ M !== void 0 && (Fn(M), Y = "" + M), qe(k) && (Fn(k.key), Y = "" + k.key), Ye(k) && (fi = k.ref, Ze(k, ei));
460
+ for (ai in k)
461
+ Ki.call(k, ai) && !Je.hasOwnProperty(ai) && (Q[ai] = k[ai]);
462
+ if (m && m.defaultProps) {
463
+ var ri = m.defaultProps;
464
464
  for (ai in ri)
465
465
  Q[ai] === void 0 && (Q[ai] = ri[ai]);
466
466
  }
467
467
  if (Y || fi) {
468
- var bi = typeof b == "function" ? b.displayName || b.name || "Unknown" : b;
468
+ var bi = typeof m == "function" ? m.displayName || m.name || "Unknown" : m;
469
469
  Y && $e(Q, bi), fi && Qe(Q, bi);
470
470
  }
471
- return Xe(b, Y, fi, ei, V, Wn.current, Q);
471
+ return Xe(m, Y, fi, ei, V, Wn.current, Q);
472
472
  }
473
473
  }
474
- var un = m.ReactCurrentOwner, _n = m.ReactDebugCurrentFrame;
475
- function Li(b) {
476
- if (b) {
477
- var C = b._owner, M = zi(b.type, b._source, C ? C.type : null);
474
+ var un = p.ReactCurrentOwner, _n = p.ReactDebugCurrentFrame;
475
+ function Li(m) {
476
+ if (m) {
477
+ var k = m._owner, M = zi(m.type, m._source, k ? k.type : null);
478
478
  _n.setExtraStackFrame(M);
479
479
  } else
480
480
  _n.setExtraStackFrame(null);
481
481
  }
482
482
  var tn;
483
483
  tn = !1;
484
- function cn(b) {
485
- return typeof b == "object" && b !== null && b.$$typeof === e;
484
+ function cn(m) {
485
+ return typeof m == "object" && m !== null && m.$$typeof === e;
486
486
  }
487
487
  function Jn() {
488
488
  {
489
489
  if (un.current) {
490
- var b = W(un.current.type);
491
- if (b)
490
+ var m = W(un.current.type);
491
+ if (m)
492
492
  return `
493
493
 
494
- Check the render method of \`` + b + "`.";
494
+ Check the render method of \`` + m + "`.";
495
495
  }
496
496
  return "";
497
497
  }
498
498
  }
499
- function no(b) {
499
+ function no(m) {
500
500
  return "";
501
501
  }
502
502
  var Yn = {};
503
- function eo(b) {
503
+ function eo(m) {
504
504
  {
505
- var C = Jn();
506
- if (!C) {
507
- var M = typeof b == "string" ? b : b.displayName || b.name;
508
- M && (C = `
505
+ var k = Jn();
506
+ if (!k) {
507
+ var M = typeof m == "string" ? m : m.displayName || m.name;
508
+ M && (k = `
509
509
 
510
510
  Check the top-level render call using <` + M + ">.");
511
511
  }
512
- return C;
512
+ return k;
513
513
  }
514
514
  }
515
- function qn(b, C) {
515
+ function qn(m, k) {
516
516
  {
517
- if (!b._store || b._store.validated || b.key != null)
517
+ if (!m._store || m._store.validated || m.key != null)
518
518
  return;
519
- b._store.validated = !0;
520
- var M = eo(C);
519
+ m._store.validated = !0;
520
+ var M = eo(k);
521
521
  if (Yn[M])
522
522
  return;
523
523
  Yn[M] = !0;
524
524
  var V = "";
525
- b && b._owner && b._owner !== un.current && (V = " It was passed a child from " + W(b._owner.type) + "."), Li(b), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', M, V), Li(null);
525
+ m && m._owner && m._owner !== un.current && (V = " It was passed a child from " + W(m._owner.type) + "."), Li(m), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', M, V), Li(null);
526
526
  }
527
527
  }
528
- function Zn(b, C) {
528
+ function Zn(m, k) {
529
529
  {
530
- if (typeof b != "object")
530
+ if (typeof m != "object")
531
531
  return;
532
- if (dn(b))
533
- for (var M = 0; M < b.length; M++) {
534
- var V = b[M];
535
- cn(V) && qn(V, C);
532
+ if (dn(m))
533
+ for (var M = 0; M < m.length; M++) {
534
+ var V = m[M];
535
+ cn(V) && qn(V, k);
536
536
  }
537
- else if (cn(b))
538
- b._store && (b._store.validated = !0);
539
- else if (b) {
540
- var ei = g(b);
541
- if (typeof ei == "function" && ei !== b.entries)
542
- for (var ai = ei.call(b), Q; !(Q = ai.next()).done; )
543
- cn(Q.value) && qn(Q.value, C);
537
+ else if (cn(m))
538
+ m._store && (m._store.validated = !0);
539
+ else if (m) {
540
+ var ei = g(m);
541
+ if (typeof ei == "function" && ei !== m.entries)
542
+ for (var ai = ei.call(m), Q; !(Q = ai.next()).done; )
543
+ cn(Q.value) && qn(Q.value, k);
544
544
  }
545
545
  }
546
546
  }
547
- function oo(b) {
547
+ function oo(m) {
548
548
  {
549
- var C = b.type;
550
- if (C == null || typeof C == "string")
549
+ var k = m.type;
550
+ if (k == null || typeof k == "string")
551
551
  return;
552
552
  var M;
553
- if (typeof C == "function")
554
- M = C.propTypes;
555
- else if (typeof C == "object" && (C.$$typeof === d || // Note: Memo only checks outer props here.
553
+ if (typeof k == "function")
554
+ M = k.propTypes;
555
+ else if (typeof k == "object" && (k.$$typeof === d || // Note: Memo only checks outer props here.
556
556
  // Inner props are checked in the reconciler.
557
- C.$$typeof === v))
558
- M = C.propTypes;
557
+ k.$$typeof === v))
558
+ M = k.propTypes;
559
559
  else
560
560
  return;
561
561
  if (M) {
562
- var V = W(C);
563
- We(M, b.props, "prop", V, b);
564
- } else if (C.PropTypes !== void 0 && !tn) {
562
+ var V = W(k);
563
+ We(M, m.props, "prop", V, m);
564
+ } else if (k.PropTypes !== void 0 && !tn) {
565
565
  tn = !0;
566
- var ei = W(C);
567
- x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ei || "Unknown");
566
+ var ei = W(k);
567
+ y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ei || "Unknown");
568
568
  }
569
- typeof C.getDefaultProps == "function" && !C.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
569
+ typeof k.getDefaultProps == "function" && !k.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
570
570
  }
571
571
  }
572
- function ao(b) {
572
+ function ao(m) {
573
573
  {
574
- for (var C = Object.keys(b.props), M = 0; M < C.length; M++) {
575
- var V = C[M];
574
+ for (var k = Object.keys(m.props), M = 0; M < k.length; M++) {
575
+ var V = k[M];
576
576
  if (V !== "children" && V !== "key") {
577
- Li(b), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", V), Li(null);
577
+ Li(m), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", V), Li(null);
578
578
  break;
579
579
  }
580
580
  }
581
- b.ref !== null && (Li(b), x("Invalid attribute `ref` supplied to `React.Fragment`."), Li(null));
581
+ m.ref !== null && (Li(m), y("Invalid attribute `ref` supplied to `React.Fragment`."), Li(null));
582
582
  }
583
583
  }
584
584
  var $n = {};
585
- function Qn(b, C, M, V, ei, ai) {
585
+ function Qn(m, k, M, V, ei, ai) {
586
586
  {
587
- var Q = z(b);
587
+ var Q = z(m);
588
588
  if (!Q) {
589
589
  var Y = "";
590
- (b === void 0 || typeof b == "object" && b !== null && Object.keys(b).length === 0) && (Y += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
590
+ (m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (Y += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
591
591
  var fi = no();
592
592
  fi ? Y += fi : Y += Jn();
593
593
  var ri;
594
- b === null ? ri = "null" : dn(b) ? ri = "array" : b !== void 0 && b.$$typeof === e ? (ri = "<" + (W(b.type) || "Unknown") + " />", Y = " Did you accidentally export a JSX literal instead of a component?") : ri = typeof b, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ri, Y);
594
+ m === null ? ri = "null" : dn(m) ? ri = "array" : m !== void 0 && m.$$typeof === e ? (ri = "<" + (W(m.type) || "Unknown") + " />", Y = " Did you accidentally export a JSX literal instead of a component?") : ri = typeof m, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ri, Y);
595
595
  }
596
- var bi = io(b, C, M, ei, ai);
596
+ var bi = io(m, k, M, ei, ai);
597
597
  if (bi == null)
598
598
  return bi;
599
599
  if (Q) {
600
- var Ni = C.children;
600
+ var Ni = k.children;
601
601
  if (Ni !== void 0)
602
602
  if (V)
603
603
  if (dn(Ni)) {
604
604
  for (var Pi = 0; Pi < Ni.length; Pi++)
605
- Zn(Ni[Pi], b);
605
+ Zn(Ni[Pi], m);
606
606
  Object.freeze && Object.freeze(Ni);
607
607
  } else
608
- x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
608
+ y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
609
609
  else
610
- Zn(Ni, b);
610
+ Zn(Ni, m);
611
611
  }
612
- if (Ki.call(C, "key")) {
613
- var Bi = W(b), yi = Object.keys(C).filter(function(ro) {
612
+ if (Ki.call(k, "key")) {
613
+ var Bi = W(m), yi = Object.keys(k).filter(function(ro) {
614
614
  return ro !== "key";
615
615
  }), rn = yi.length > 0 ? "{key: someKey, " + yi.join(": ..., ") + ": ...}" : "{key: someKey}";
616
616
  if (!$n[Bi + rn]) {
617
617
  var co = yi.length > 0 ? "{" + yi.join(": ..., ") + ": ...}" : "{}";
618
- x(`A props object containing a "key" prop is being spread into JSX:
618
+ y(`A props object containing a "key" prop is being spread into JSX:
619
619
  let props = %s;
620
620
  <%s {...props} />
621
621
  React keys must be passed directly to JSX without using spread:
@@ -623,14 +623,14 @@ React keys must be passed directly to JSX without using spread:
623
623
  <%s key={someKey} {...props} />`, rn, Bi, co, Bi), $n[Bi + rn] = !0;
624
624
  }
625
625
  }
626
- return b === s ? ao(bi) : oo(bi), bi;
626
+ return m === s ? ao(bi) : oo(bi), bi;
627
627
  }
628
628
  }
629
- function so(b, C, M) {
630
- return Qn(b, C, M, !0);
629
+ function so(m, k, M) {
630
+ return Qn(m, k, M, !0);
631
631
  }
632
- function lo(b, C, M) {
633
- return Qn(b, C, M, !1);
632
+ function lo(m, k, M) {
633
+ return Qn(m, k, M, !1);
634
634
  }
635
635
  var uo = lo, to = so;
636
636
  Hi.Fragment = s, Hi.jsx = uo, Hi.jsxs = to;
@@ -649,13 +649,13 @@ const gi = mo(void 0), oe = {
649
649
  disabled: !1,
650
650
  isHidden: !1
651
651
  }, Se = ({ children: i }) => {
652
- const [e, o] = P(!0), [s, a] = P({}), [l, u] = P({}), [t, d] = P([oe]), [r, c] = P(!1), [v, h] = P(null), [p, y] = P([
652
+ const [e, o] = P(!0), [s, a] = P({}), [l, u] = P({}), [t, d] = P([oe]), [r, c] = P(!1), [v, h] = P(null), [b, f] = P([
653
653
  0
654
- ]), [f, g] = P(""), m = mi.useCallback(() => {
655
- }, []), x = mi.useCallback(() => {
654
+ ]), [x, g] = P(""), p = mi.useCallback(() => {
655
+ }, []), y = mi.useCallback(() => {
656
656
  const I = Ai();
657
- d((G) => [...G, { ...oe, id: I }]), h(I), y([t.length]);
658
- }, [t]), j = mi.useCallback((I) => {
657
+ d((G) => [...G, { ...oe, id: I }]), h(I), f([t.length]);
658
+ }, [t]), C = mi.useCallback((I) => {
659
659
  d(
660
660
  (G) => G.filter((H) => H.id !== I)
661
661
  ), h(null);
@@ -666,10 +666,10 @@ const gi = mo(void 0), oe = {
666
666
  );
667
667
  R && d(
668
668
  (T) => T == null ? void 0 : T.map(
669
- (E) => E.id === G ? {
670
- ...E,
671
- questionData: E.questionData.filter((U) => R.type === "grid" ? U.gridId !== R.id && U.id !== R.id : U.id !== I)
672
- } : E
669
+ (w) => w.id === G ? {
670
+ ...w,
671
+ questionData: w.questionData.filter((U) => R.type === "grid" ? U.gridId !== R.id && U.id !== R.id : U.id !== I)
672
+ } : w
673
673
  )
674
674
  );
675
675
  },
@@ -682,7 +682,7 @@ const gi = mo(void 0), oe = {
682
682
  (U) => U.id === I
683
683
  );
684
684
  if (R === -1) return;
685
- const T = H.questionData[R], E = (U, ci = {}) => ({
685
+ const T = H.questionData[R], w = (U, ci = {}) => ({
686
686
  ...JSON.parse(JSON.stringify(U)),
687
687
  id: Ai(),
688
688
  ...ci
@@ -695,10 +695,10 @@ const gi = mo(void 0), oe = {
695
695
  if (T.type === "grid") {
696
696
  const hi = (si = ni == null ? void 0 : ni.map((li, pi) => ({ e: li, i: pi })).filter(
697
697
  ({ e: li }) => li.id === T.id || li.gridId === T.id
698
- )) == null ? void 0 : si.map(({ i: li }) => li), vi = hi.length ? Math.max(...hi) + 1 : R + 1, L = Ai(), K = E(T, {});
698
+ )) == null ? void 0 : si.map(({ i: li }) => li), vi = hi.length ? Math.max(...hi) + 1 : R + 1, L = Ai(), K = w(T, {});
699
699
  K.id = L;
700
700
  const X = ni.filter((li) => li.gridId === T.id), ui = X == null ? void 0 : X.map(
701
- (li) => E(li, { gridId: L })
701
+ (li) => w(li, { gridId: L })
702
702
  ), J = [
703
703
  ...ni.slice(0, vi),
704
704
  K,
@@ -707,7 +707,7 @@ const gi = mo(void 0), oe = {
707
707
  ];
708
708
  return { ...ci, questionData: J };
709
709
  } else {
710
- const hi = E(
710
+ const hi = w(
711
711
  T,
712
712
  T.gridId ? { gridId: T.gridId } : {}
713
713
  ), vi = [
@@ -730,7 +730,7 @@ const gi = mo(void 0), oe = {
730
730
  );
731
731
  },
732
732
  []
733
- ), k = mi.useCallback((I, G) => {
733
+ ), j = mi.useCallback((I, G) => {
734
734
  d(
735
735
  (H) => H == null ? void 0 : H.map(
736
736
  (R) => R.id === G ? {
@@ -760,10 +760,10 @@ const gi = mo(void 0), oe = {
760
760
  d(
761
761
  (R) => R == null ? void 0 : R.map(
762
762
  (T) => {
763
- var E;
763
+ var w;
764
764
  return T.id === H ? {
765
765
  ...T,
766
- questionData: (E = T.questionData) == null ? void 0 : E.map(
766
+ questionData: (w = T.questionData) == null ? void 0 : w.map(
767
767
  (U) => {
768
768
  var ci;
769
769
  return U.type === "grid" && U.gridData ? {
@@ -793,7 +793,7 @@ const gi = mo(void 0), oe = {
793
793
  return R.id === G ? {
794
794
  ...R,
795
795
  questionData: (T = R.questionData) == null ? void 0 : T.map(
796
- (E) => E.id === I.id ? { ...E, ...I } : E
796
+ (w) => w.id === I.id ? { ...w, ...I } : w
797
797
  )
798
798
  } : R;
799
799
  }
@@ -806,7 +806,7 @@ const gi = mo(void 0), oe = {
806
806
  sectionId: H,
807
807
  targetIndex: R,
808
808
  targetId: T,
809
- targetGridId: E,
809
+ targetGridId: w,
810
810
  targetCol: U
811
811
  } = I;
812
812
  d(
@@ -815,18 +815,18 @@ const gi = mo(void 0), oe = {
815
815
  const si = [...ni.questionData], hi = si.findIndex((L) => L.id === G);
816
816
  if (hi === -1) return ni;
817
817
  const vi = { ...si[hi] };
818
- if (E !== void 0 && U !== void 0) {
818
+ if (w !== void 0 && U !== void 0) {
819
819
  if (vi.type === "grid") return ni;
820
820
  const L = si.findIndex(
821
821
  (X) => {
822
822
  var ui;
823
- return X.id !== G && X.gridId === E && ((ui = X.gridPosition) == null ? void 0 : ui.col) === U;
823
+ return X.id !== G && X.gridId === w && ((ui = X.gridPosition) == null ? void 0 : ui.col) === U;
824
824
  }
825
825
  );
826
826
  let K = si.map(
827
827
  (X) => X.id === G ? {
828
828
  ...X,
829
- gridId: E,
829
+ gridId: w,
830
830
  gridPosition: { col: U }
831
831
  } : X
832
832
  );
@@ -836,13 +836,13 @@ const gi = mo(void 0), oe = {
836
836
  return delete J.gridId, delete J.gridPosition, J;
837
837
  })), { ...ni, questionData: K };
838
838
  }
839
- if (vi.gridId && R !== void 0 && E === void 0) {
839
+ if (vi.gridId && R !== void 0 && w === void 0) {
840
840
  const L = { ...vi };
841
841
  delete L.gridId, delete L.gridPosition;
842
842
  const K = si.filter((ui) => ui.id !== G), X = Math.min(R, K.length);
843
843
  return K.splice(X, 0, L), { ...ni, questionData: K };
844
844
  }
845
- if (!vi.gridId && R !== void 0 && E === void 0 && !T) {
845
+ if (!vi.gridId && R !== void 0 && w === void 0 && !T) {
846
846
  si.splice(hi, 1);
847
847
  const L = Math.min(R, si.length);
848
848
  return si.splice(L, 0, vi), { ...ni, questionData: si };
@@ -856,7 +856,7 @@ const gi = mo(void 0), oe = {
856
856
  );
857
857
  },
858
858
  []
859
- ), w = mi.useCallback((I, G) => {
859
+ ), E = mi.useCallback((I, G) => {
860
860
  d(
861
861
  (H) => H == null ? void 0 : H.map(
862
862
  (R) => R.id === G ? {
@@ -869,27 +869,27 @@ const gi = mo(void 0), oe = {
869
869
  () => ({
870
870
  formData: t,
871
871
  setFormData: d,
872
- handleDragStop: m,
872
+ handleDragStop: p,
873
873
  removeElement: S,
874
874
  elementData: l,
875
875
  setElementData: u,
876
876
  updateElementPosition: A,
877
- addElement: k,
877
+ addElement: j,
878
878
  addElementInPosition: O,
879
879
  updateElement: z,
880
- addSection: x,
881
- removeSection: j,
882
- updateSection: w,
880
+ addSection: y,
881
+ removeSection: C,
882
+ updateSection: E,
883
883
  isDragging: r,
884
884
  setIsDragging: c,
885
885
  selectedSection: v,
886
886
  setSelectedSection: h,
887
- activeSections: p,
888
- setActiveSections: y,
887
+ activeSections: b,
888
+ setActiveSections: f,
889
889
  updateGridElement: ii,
890
890
  answerData: s,
891
891
  setAnswerData: a,
892
- uploadUrl: f,
892
+ uploadUrl: x,
893
893
  setUploadUrl: g,
894
894
  duplicateElement: N,
895
895
  moveElement: Z,
@@ -898,22 +898,22 @@ const gi = mo(void 0), oe = {
898
898
  }),
899
899
  [
900
900
  t,
901
- m,
901
+ p,
902
902
  S,
903
903
  l,
904
904
  A,
905
- k,
905
+ j,
906
906
  O,
907
907
  z,
908
- x,
909
- j,
910
- w,
908
+ y,
909
+ C,
910
+ E,
911
911
  r,
912
912
  v,
913
- p,
913
+ b,
914
914
  ii,
915
915
  s,
916
- f,
916
+ x,
917
917
  N,
918
918
  Z,
919
919
  e
@@ -1120,13 +1120,13 @@ const Nn = ({
1120
1120
  }) => {
1121
1121
  const r = i ? new Date(i) : null, [c, v] = P(r);
1122
1122
  D(() => {
1123
- const p = i ? new Date(i) : null;
1124
- (p && c && p.getTime() !== c.getTime() || !p && c || p && !c) && v(p);
1123
+ const b = i ? new Date(i) : null;
1124
+ (b && c && b.getTime() !== c.getTime() || !b && c || b && !c) && v(b);
1125
1125
  }, [i]), D(() => {
1126
1126
  e && e(a, c);
1127
1127
  }, [c, e, a]);
1128
- const h = (p) => {
1129
- v(p);
1128
+ const h = (b) => {
1129
+ v(b);
1130
1130
  };
1131
1131
  return /* @__PURE__ */ n.jsx("div", { className: "builder_date__picker", children: /* @__PURE__ */ n.jsx(
1132
1132
  bo,
@@ -1149,7 +1149,7 @@ const Nn = ({
1149
1149
  }
1150
1150
  ) });
1151
1151
  };
1152
- function Eo({
1152
+ function wo({
1153
1153
  element: i,
1154
1154
  validationData: e
1155
1155
  }) {
@@ -1195,7 +1195,7 @@ function bn({
1195
1195
  }
1196
1196
  ) });
1197
1197
  }
1198
- function wo(i, e) {
1198
+ function Eo(i, e) {
1199
1199
  const o = i.icons, s = i.aliases || /* @__PURE__ */ Object.create(null), a = /* @__PURE__ */ Object.create(null);
1200
1200
  function l(u) {
1201
1201
  if (o[u]) return a[u] = [];
@@ -1217,11 +1217,11 @@ const je = Object.freeze({
1217
1217
  rotate: 0,
1218
1218
  vFlip: !1,
1219
1219
  hFlip: !1
1220
- }), En = Object.freeze({
1220
+ }), wn = Object.freeze({
1221
1221
  ...je,
1222
1222
  ...nn
1223
1223
  }), jn = Object.freeze({
1224
- ...En,
1224
+ ...wn,
1225
1225
  body: "",
1226
1226
  hidden: !1
1227
1227
  });
@@ -1250,7 +1250,7 @@ function ke(i, e) {
1250
1250
  i.not_found instanceof Array && i.not_found.forEach((a) => {
1251
1251
  e(a, null), o.push(a);
1252
1252
  });
1253
- const s = wo(i);
1253
+ const s = Eo(i);
1254
1254
  for (const a in s) {
1255
1255
  const l = s[a];
1256
1256
  l && (e(a, Po(i, a, l)), o.push(a));
@@ -1376,11 +1376,11 @@ function Ko(i, e) {
1376
1376
  const s = Oi(e, o);
1377
1377
  return !!Me(s, i);
1378
1378
  }
1379
- const Ee = Object.freeze({
1379
+ const we = Object.freeze({
1380
1380
  width: null,
1381
1381
  height: null
1382
- }), we = Object.freeze({
1383
- ...Ee,
1382
+ }), Ee = Object.freeze({
1383
+ ...we,
1384
1384
  ...nn
1385
1385
  }), Go = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Ho = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
1386
1386
  function de(i, e, o) {
@@ -1425,10 +1425,10 @@ function Wo(i, e, o) {
1425
1425
  const Uo = (i) => i === "unset" || i === "undefined" || i === "none";
1426
1426
  function zo(i, e) {
1427
1427
  const o = {
1428
- ...En,
1428
+ ...wn,
1429
1429
  ...i
1430
1430
  }, s = {
1431
- ...we,
1431
+ ...Ee,
1432
1432
  ...e
1433
1433
  }, a = {
1434
1434
  left: o.left,
@@ -1437,12 +1437,12 @@ function zo(i, e) {
1437
1437
  height: o.height
1438
1438
  };
1439
1439
  let l = o.body;
1440
- [o, s].forEach((f) => {
1441
- const g = [], m = f.hFlip, x = f.vFlip;
1442
- let j = f.rotate;
1443
- m ? x ? j += 2 : (g.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), g.push("scale(-1 1)"), a.top = a.left = 0) : x && (g.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), g.push("scale(1 -1)"), a.top = a.left = 0);
1440
+ [o, s].forEach((x) => {
1441
+ const g = [], p = x.hFlip, y = x.vFlip;
1442
+ let C = x.rotate;
1443
+ p ? y ? C += 2 : (g.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), g.push("scale(-1 1)"), a.top = a.left = 0) : y && (g.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), g.push("scale(1 -1)"), a.top = a.left = 0);
1444
1444
  let S;
1445
- switch (j < 0 && (j -= Math.floor(j / 4) * 4), j = j % 4, j) {
1445
+ switch (C < 0 && (C -= Math.floor(C / 4) * 4), C = C % 4, C) {
1446
1446
  case 1:
1447
1447
  S = a.height / 2 + a.top, g.unshift("rotate(90 " + S.toString() + " " + S.toString() + ")");
1448
1448
  break;
@@ -1453,24 +1453,24 @@ function zo(i, e) {
1453
1453
  S = a.width / 2 + a.left, g.unshift("rotate(-90 " + S.toString() + " " + S.toString() + ")");
1454
1454
  break;
1455
1455
  }
1456
- j % 2 === 1 && (a.left !== a.top && (S = a.left, a.left = a.top, a.top = S), a.width !== a.height && (S = a.width, a.width = a.height, a.height = S)), g.length && (l = Wo(l, '<g transform="' + g.join(" ") + '">', "</g>"));
1456
+ C % 2 === 1 && (a.left !== a.top && (S = a.left, a.left = a.top, a.top = S), a.width !== a.height && (S = a.width, a.width = a.height, a.height = S)), g.length && (l = Wo(l, '<g transform="' + g.join(" ") + '">', "</g>"));
1457
1457
  });
1458
1458
  const u = s.width, t = s.height, d = a.width, r = a.height;
1459
1459
  let c, v;
1460
1460
  u === null ? (v = t === null ? "1em" : t === "auto" ? r : t, c = de(v, d / r)) : (c = u === "auto" ? d : u, v = t === null ? de(c, r / d) : t === "auto" ? r : t);
1461
- const h = {}, p = (f, g) => {
1462
- Uo(g) || (h[f] = g.toString());
1461
+ const h = {}, b = (x, g) => {
1462
+ Uo(g) || (h[x] = g.toString());
1463
1463
  };
1464
- p("width", c), p("height", v);
1465
- const y = [
1464
+ b("width", c), b("height", v);
1465
+ const f = [
1466
1466
  a.left,
1467
1467
  a.top,
1468
1468
  d,
1469
1469
  r
1470
1470
  ];
1471
- return h.viewBox = y.join(" "), {
1471
+ return h.viewBox = f.join(" "), {
1472
1472
  attributes: h,
1473
- viewBox: y,
1473
+ viewBox: f,
1474
1474
  body: l
1475
1475
  };
1476
1476
  }
@@ -1494,7 +1494,7 @@ function Zo(i, e) {
1494
1494
  function Cn(i) {
1495
1495
  return kn[i] || kn[""];
1496
1496
  }
1497
- function wn(i) {
1497
+ function En(i) {
1498
1498
  let e;
1499
1499
  if (typeof i.resources == "string") e = [i.resources];
1500
1500
  else if (e = i.resources, !(e instanceof Array) || !e.length) return null;
@@ -1511,9 +1511,9 @@ function wn(i) {
1511
1511
  }
1512
1512
  const Ln = /* @__PURE__ */ Object.create(null), Vi = ["https://api.simplesvg.com", "https://api.unisvg.com"], Qi = [];
1513
1513
  for (; Vi.length > 0; ) Vi.length === 1 || Math.random() > 0.5 ? Qi.push(Vi.shift()) : Qi.push(Vi.pop());
1514
- Ln[""] = wn({ resources: ["https://api.iconify.design"].concat(Qi) });
1514
+ Ln[""] = En({ resources: ["https://api.iconify.design"].concat(Qi) });
1515
1515
  function $o(i, e) {
1516
- const o = wn(e);
1516
+ const o = En(e);
1517
1517
  return o === null ? !1 : (Ln[i] = o, !0);
1518
1518
  }
1519
1519
  function Pn(i) {
@@ -1713,26 +1713,26 @@ function ra(i, e, o, s) {
1713
1713
  if (i.random) {
1714
1714
  let A = i.resources.slice(0);
1715
1715
  for (u = []; A.length > 1; ) {
1716
- const k = Math.floor(Math.random() * A.length);
1717
- u.push(A[k]), A = A.slice(0, k).concat(A.slice(k + 1));
1716
+ const j = Math.floor(Math.random() * A.length);
1717
+ u.push(A[j]), A = A.slice(0, j).concat(A.slice(j + 1));
1718
1718
  }
1719
1719
  u = u.concat(A);
1720
1720
  } else u = i.resources.slice(l).concat(i.resources.slice(0, l));
1721
1721
  const t = Date.now();
1722
- let d = "pending", r = 0, c, v = null, h = [], p = [];
1723
- typeof s == "function" && p.push(s);
1724
- function y() {
1722
+ let d = "pending", r = 0, c, v = null, h = [], b = [];
1723
+ typeof s == "function" && b.push(s);
1724
+ function f() {
1725
1725
  v && (clearTimeout(v), v = null);
1726
1726
  }
1727
- function f() {
1728
- d === "pending" && (d = "aborted"), y(), h.forEach((A) => {
1727
+ function x() {
1728
+ d === "pending" && (d = "aborted"), f(), h.forEach((A) => {
1729
1729
  A.status === "pending" && (A.status = "aborted");
1730
1730
  }), h = [];
1731
1731
  }
1732
- function g(A, k) {
1733
- k && (p = []), typeof A == "function" && p.push(A);
1732
+ function g(A, j) {
1733
+ j && (b = []), typeof A == "function" && b.push(A);
1734
1734
  }
1735
- function m() {
1735
+ function p() {
1736
1736
  return {
1737
1737
  startTime: t,
1738
1738
  payload: e,
@@ -1740,21 +1740,21 @@ function ra(i, e, o, s) {
1740
1740
  queriesSent: r,
1741
1741
  queriesPending: h.length,
1742
1742
  subscribe: g,
1743
- abort: f
1743
+ abort: x
1744
1744
  };
1745
1745
  }
1746
- function x() {
1747
- d = "failed", p.forEach((A) => {
1746
+ function y() {
1747
+ d = "failed", b.forEach((A) => {
1748
1748
  A(void 0, c);
1749
1749
  });
1750
1750
  }
1751
- function j() {
1751
+ function C() {
1752
1752
  h.forEach((A) => {
1753
1753
  A.status === "pending" && (A.status = "aborted");
1754
1754
  }), h = [];
1755
1755
  }
1756
- function S(A, k, O) {
1757
- const ii = k !== "success";
1756
+ function S(A, j, O) {
1757
+ const ii = j !== "success";
1758
1758
  switch (h = h.filter((z) => z !== A), d) {
1759
1759
  case "pending":
1760
1760
  break;
@@ -1764,46 +1764,46 @@ function ra(i, e, o, s) {
1764
1764
  default:
1765
1765
  return;
1766
1766
  }
1767
- if (k === "abort") {
1768
- c = O, x();
1767
+ if (j === "abort") {
1768
+ c = O, y();
1769
1769
  return;
1770
1770
  }
1771
1771
  if (ii) {
1772
- c = O, h.length || (u.length ? N() : x());
1772
+ c = O, h.length || (u.length ? N() : y());
1773
1773
  return;
1774
1774
  }
1775
- if (y(), j(), !i.random) {
1775
+ if (f(), C(), !i.random) {
1776
1776
  const z = i.resources.indexOf(A.resource);
1777
1777
  z !== -1 && z !== i.index && (i.index = z);
1778
1778
  }
1779
- d = "completed", p.forEach((z) => {
1779
+ d = "completed", b.forEach((z) => {
1780
1780
  z(O);
1781
1781
  });
1782
1782
  }
1783
1783
  function N() {
1784
1784
  if (d !== "pending") return;
1785
- y();
1785
+ f();
1786
1786
  const A = u.shift();
1787
1787
  if (A === void 0) {
1788
1788
  if (h.length) {
1789
1789
  v = setTimeout(() => {
1790
- y(), d === "pending" && (j(), x());
1790
+ f(), d === "pending" && (C(), y());
1791
1791
  }, i.timeout);
1792
1792
  return;
1793
1793
  }
1794
- x();
1794
+ y();
1795
1795
  return;
1796
1796
  }
1797
- const k = {
1797
+ const j = {
1798
1798
  status: "pending",
1799
1799
  resource: A,
1800
1800
  callback: (O, ii) => {
1801
- S(k, O, ii);
1801
+ S(j, O, ii);
1802
1802
  }
1803
1803
  };
1804
- h.push(k), r++, v = setTimeout(N, i.rotate), o(A, e, k.callback);
1804
+ h.push(j), r++, v = setTimeout(N, i.rotate), o(A, e, j.callback);
1805
1805
  }
1806
- return setTimeout(N), m;
1806
+ return setTimeout(N), p;
1807
1807
  }
1808
1808
  function Pe(i) {
1809
1809
  const e = {
@@ -1858,7 +1858,7 @@ function ba(i, e, o) {
1858
1858
  const u = ma(i);
1859
1859
  u && (s = u.redundancy);
1860
1860
  } else {
1861
- const l = wn(i);
1861
+ const l = En(i);
1862
1862
  if (l) {
1863
1863
  s = Pe(l);
1864
1864
  const u = i.resources ? i.resources[0] : "", t = Cn(u);
@@ -1923,11 +1923,11 @@ function pa(i, e) {
1923
1923
  a.forEach((c) => {
1924
1924
  const v = l(c, s, o);
1925
1925
  re(v, (h) => {
1926
- const p = h ? {
1926
+ const b = h ? {
1927
1927
  prefix: s,
1928
1928
  icons: { [c]: h }
1929
1929
  } : null;
1930
- Fi(i, [c], p);
1930
+ Fi(i, [c], b);
1931
1931
  });
1932
1932
  });
1933
1933
  return;
@@ -1965,8 +1965,8 @@ const ga = (i, e) => {
1965
1965
  const v = a[r] || (a[r] = /* @__PURE__ */ Object.create(null));
1966
1966
  v[c] || (v[c] = []);
1967
1967
  }), s.pending.forEach((d) => {
1968
- const { provider: r, prefix: c, name: v } = d, h = Oi(r, c), p = h.pendingIcons || (h.pendingIcons = /* @__PURE__ */ new Set());
1969
- p.has(v) || (p.add(v), a[r][c].push(v));
1968
+ const { provider: r, prefix: c, name: v } = d, h = Oi(r, c), b = h.pendingIcons || (h.pendingIcons = /* @__PURE__ */ new Set());
1969
+ b.has(v) || (b.add(v), a[r][c].push(v));
1970
1970
  }), l.forEach((d) => {
1971
1971
  const r = a[d.provider][d.prefix];
1972
1972
  r.length && pa(d, r);
@@ -1976,7 +1976,7 @@ function fa(i, e) {
1976
1976
  const o = { ...i };
1977
1977
  for (const s in e) {
1978
1978
  const a = e[s], l = typeof a;
1979
- s in Ee ? (a === null || a && (l === "string" || l === "number")) && (o[s] = a) : l === typeof o[s] && (o[s] = s === "rotate" ? a % 4 : a);
1979
+ s in we ? (a === null || a && (l === "string" || l === "number")) && (o[s] = a) : l === typeof o[s] && (o[s] = s === "rotate" ? a % 4 : a);
1980
1980
  }
1981
1981
  return o;
1982
1982
  }
@@ -2044,7 +2044,7 @@ function Ma(i) {
2044
2044
  return Wi === void 0 && Ca(), Wi ? Wi.createHTML(i) : i;
2045
2045
  }
2046
2046
  const Re = {
2047
- ...we,
2047
+ ...Ee,
2048
2048
  inline: !1
2049
2049
  }, Ta = {
2050
2050
  xmlns: "http://www.w3.org/2000/svg",
@@ -2071,32 +2071,32 @@ for (const i in be) {
2071
2071
  for (const o in me)
2072
2072
  e[i + o] = me[o];
2073
2073
  }
2074
- const Ea = {
2074
+ const wa = {
2075
2075
  ...Re,
2076
2076
  inline: !0
2077
2077
  };
2078
2078
  function ve(i) {
2079
2079
  return i + (i.match(/^[-0-9.]+$/) ? "px" : "");
2080
2080
  }
2081
- const wa = (i, e, o) => {
2082
- const s = e.inline ? Ea : Re, a = fa(s, e), l = e.mode || "svg", u = {}, t = e.style || {}, d = {
2081
+ const Ea = (i, e, o) => {
2082
+ const s = e.inline ? wa : Re, a = fa(s, e), l = e.mode || "svg", u = {}, t = e.style || {}, d = {
2083
2083
  ...l === "svg" ? Ta : {}
2084
2084
  };
2085
2085
  if (o) {
2086
2086
  const g = ln(o, !1, !0);
2087
2087
  if (g) {
2088
- const m = ["iconify"], x = [
2088
+ const p = ["iconify"], y = [
2089
2089
  "provider",
2090
2090
  "prefix"
2091
2091
  ];
2092
- for (const j of x)
2093
- g[j] && m.push("iconify--" + g[j]);
2094
- d.className = m.join(" ");
2092
+ for (const C of y)
2093
+ g[C] && p.push("iconify--" + g[C]);
2094
+ d.className = p.join(" ");
2095
2095
  }
2096
2096
  }
2097
2097
  for (let g in e) {
2098
- const m = e[g];
2099
- if (m !== void 0)
2098
+ const p = e[g];
2099
+ if (p !== void 0)
2100
2100
  switch (g) {
2101
2101
  // Properties to ignore
2102
2102
  case "icon":
@@ -2109,38 +2109,38 @@ const wa = (i, e, o) => {
2109
2109
  break;
2110
2110
  // Forward ref
2111
2111
  case "_ref":
2112
- d.ref = m;
2112
+ d.ref = p;
2113
2113
  break;
2114
2114
  // Merge class names
2115
2115
  case "className":
2116
- d[g] = (d[g] ? d[g] + " " : "") + m;
2116
+ d[g] = (d[g] ? d[g] + " " : "") + p;
2117
2117
  break;
2118
2118
  // Boolean attributes
2119
2119
  case "inline":
2120
2120
  case "hFlip":
2121
2121
  case "vFlip":
2122
- a[g] = m === !0 || m === "true" || m === 1;
2122
+ a[g] = p === !0 || p === "true" || p === 1;
2123
2123
  break;
2124
2124
  // Flip as string: 'horizontal,vertical'
2125
2125
  case "flip":
2126
- typeof m == "string" && ya(a, m);
2126
+ typeof p == "string" && ya(a, p);
2127
2127
  break;
2128
2128
  // Color: copy to style
2129
2129
  case "color":
2130
- u.color = m;
2130
+ u.color = p;
2131
2131
  break;
2132
2132
  // Rotation as string
2133
2133
  case "rotate":
2134
- typeof m == "string" ? a[g] = Aa(m) : typeof m == "number" && (a[g] = m);
2134
+ typeof p == "string" ? a[g] = Aa(p) : typeof p == "number" && (a[g] = p);
2135
2135
  break;
2136
2136
  // Remove aria-hidden
2137
2137
  case "ariaHidden":
2138
2138
  case "aria-hidden":
2139
- m !== !0 && m !== "true" && delete d["aria-hidden"];
2139
+ p !== !0 && p !== "true" && delete d["aria-hidden"];
2140
2140
  break;
2141
2141
  // Copy missing property if it does not exist in customisations
2142
2142
  default:
2143
- s[g] === void 0 && (d[g] = m);
2143
+ s[g] === void 0 && (d[g] = p);
2144
2144
  }
2145
2145
  }
2146
2146
  const r = zo(i, a), c = r.attributes;
@@ -2149,23 +2149,23 @@ const wa = (i, e, o) => {
2149
2149
  ...u,
2150
2150
  ...t
2151
2151
  }, Object.assign(d, c);
2152
- let g = 0, m = e.id;
2153
- return typeof m == "string" && (m = m.replace(/-/g, "_")), d.dangerouslySetInnerHTML = {
2154
- __html: Ma(qo(r.body, m ? () => m + "ID" + g++ : "iconifyReact"))
2152
+ let g = 0, p = e.id;
2153
+ return typeof p == "string" && (p = p.replace(/-/g, "_")), d.dangerouslySetInnerHTML = {
2154
+ __html: Ma(qo(r.body, p ? () => p + "ID" + g++ : "iconifyReact"))
2155
2155
  }, Sn("svg", d);
2156
2156
  }
2157
- const { body: v, width: h, height: p } = i, y = l === "mask" || (l === "bg" ? !1 : v.indexOf("currentColor") !== -1), f = Sa(v, {
2157
+ const { body: v, width: h, height: b } = i, f = l === "mask" || (l === "bg" ? !1 : v.indexOf("currentColor") !== -1), x = Sa(v, {
2158
2158
  ...c,
2159
2159
  width: h + "",
2160
- height: p + ""
2160
+ height: b + ""
2161
2161
  });
2162
2162
  return d.style = {
2163
2163
  ...u,
2164
- "--svg": ka(f),
2164
+ "--svg": ka(x),
2165
2165
  width: ve(c.width),
2166
2166
  height: ve(c.height),
2167
2167
  ...Ba,
2168
- ...y ? Mn : De,
2168
+ ...f ? Mn : De,
2169
2169
  ...t
2170
2170
  }, Sn("span", d);
2171
2171
  };
@@ -2204,19 +2204,19 @@ if (typeof document != "undefined" && typeof window != "undefined") {
2204
2204
  }
2205
2205
  function Ie(i) {
2206
2206
  const [e, o] = P(!!i.ssr), [s, a] = P({});
2207
- function l(p) {
2208
- if (p) {
2209
- const y = i.icon;
2210
- if (typeof y == "object")
2207
+ function l(b) {
2208
+ if (b) {
2209
+ const f = i.icon;
2210
+ if (typeof f == "object")
2211
2211
  return {
2212
2212
  name: "",
2213
- data: y
2213
+ data: f
2214
2214
  };
2215
- const f = le(y);
2216
- if (f)
2215
+ const x = le(f);
2216
+ if (x)
2217
2217
  return {
2218
- name: y,
2219
- data: f
2218
+ name: f,
2219
+ data: x
2220
2220
  };
2221
2221
  }
2222
2222
  return {
@@ -2225,41 +2225,41 @@ function Ie(i) {
2225
2225
  }
2226
2226
  const [u, t] = P(l(!!i.ssr));
2227
2227
  function d() {
2228
- const p = s.callback;
2229
- p && (p(), a({}));
2228
+ const b = s.callback;
2229
+ b && (b(), a({}));
2230
2230
  }
2231
- function r(p) {
2232
- if (JSON.stringify(u) !== JSON.stringify(p))
2233
- return d(), t(p), !0;
2231
+ function r(b) {
2232
+ if (JSON.stringify(u) !== JSON.stringify(b))
2233
+ return d(), t(b), !0;
2234
2234
  }
2235
2235
  function c() {
2236
- var p;
2237
- const y = i.icon;
2238
- if (typeof y == "object") {
2236
+ var b;
2237
+ const f = i.icon;
2238
+ if (typeof f == "object") {
2239
2239
  r({
2240
2240
  name: "",
2241
- data: y
2241
+ data: f
2242
2242
  });
2243
2243
  return;
2244
2244
  }
2245
- const f = le(y);
2245
+ const x = le(f);
2246
2246
  if (r({
2247
- name: y,
2248
- data: f
2247
+ name: f,
2248
+ data: x
2249
2249
  }))
2250
- if (f === void 0) {
2251
- const g = ga([y], c);
2250
+ if (x === void 0) {
2251
+ const g = ga([f], c);
2252
2252
  a({
2253
2253
  callback: g
2254
2254
  });
2255
- } else f && ((p = i.onLoad) === null || p === void 0 || p.call(i, y));
2255
+ } else x && ((b = i.onLoad) === null || b === void 0 || b.call(i, f));
2256
2256
  }
2257
2257
  D(() => (o(!0), d), []), D(() => {
2258
2258
  e && c();
2259
2259
  }, [i.icon, e]);
2260
2260
  const { name: v, data: h } = u;
2261
- return h ? wa({
2262
- ...En,
2261
+ return h ? Ea({
2262
+ ...wn,
2263
2263
  ...h
2264
2264
  }, i, v) : i.children ? i.children : i.fallback ? i.fallback : Sn("span", {});
2265
2265
  }
@@ -2327,7 +2327,7 @@ function Rn({
2327
2327
  ]
2328
2328
  }
2329
2329
  ),
2330
- /* @__PURE__ */ n.jsx(wi, { as: Zi, leave: "custom-select__transition", children: /* @__PURE__ */ n.jsx(
2330
+ /* @__PURE__ */ n.jsx(Ei, { as: Zi, leave: "custom-select__transition", children: /* @__PURE__ */ n.jsx(
2331
2331
  di.Options,
2332
2332
  {
2333
2333
  anchor: "bottom start",
@@ -2337,16 +2337,16 @@ function Rn({
2337
2337
  di.Option,
2338
2338
  {
2339
2339
  value: v,
2340
- className: ({ active: p }) => `custom-select__option ${p ? "custom-select__option--active" : ""}`,
2341
- children: ({ selected: p }) => /* @__PURE__ */ n.jsxs("div", { className: "custom-select__option-row", children: [
2340
+ className: ({ active: b }) => `custom-select__option ${b ? "custom-select__option--active" : ""}`,
2341
+ children: ({ selected: b }) => /* @__PURE__ */ n.jsxs("div", { className: "custom-select__option-row", children: [
2342
2342
  /* @__PURE__ */ n.jsx(
2343
2343
  "span",
2344
2344
  {
2345
- className: `custom-select__option-label ${p ? "custom-select__option--selected" : ""}`,
2345
+ className: `custom-select__option-label ${b ? "custom-select__option--selected" : ""}`,
2346
2346
  children: v.label
2347
2347
  }
2348
2348
  ),
2349
- p && /* @__PURE__ */ n.jsx("span", { className: "custom-select__check", children: "✓" })
2349
+ b && /* @__PURE__ */ n.jsx("span", { className: "custom-select__check", children: "✓" })
2350
2350
  ] })
2351
2351
  },
2352
2352
  h
@@ -2388,13 +2388,13 @@ function Ke({
2388
2388
  }, [i]), D(() => {
2389
2389
  if (l === "pdf" && (i != null && i.startsWith("data:")))
2390
2390
  try {
2391
- const p = atob(i.split(",")[1]), y = new ArrayBuffer(p.length), f = new Uint8Array(y);
2392
- for (let x = 0; x < p.length; x++)
2393
- f[x] = p.charCodeAt(x);
2394
- const g = new Blob([y], { type: "application/pdf" }), m = URL.createObjectURL(g);
2395
- return d(m), () => URL.revokeObjectURL(m);
2396
- } catch (p) {
2397
- console.error("Error creating blob URL:", p);
2391
+ const b = atob(i.split(",")[1]), f = new ArrayBuffer(b.length), x = new Uint8Array(f);
2392
+ for (let y = 0; y < b.length; y++)
2393
+ x[y] = b.charCodeAt(y);
2394
+ const g = new Blob([f], { type: "application/pdf" }), p = URL.createObjectURL(g);
2395
+ return d(p), () => URL.revokeObjectURL(p);
2396
+ } catch (b) {
2397
+ console.error("Error creating blob URL:", b);
2398
2398
  }
2399
2399
  else
2400
2400
  d(null);
@@ -2402,15 +2402,15 @@ function Ke({
2402
2402
  const r = () => {
2403
2403
  l === "image" || l === "pdf" ? a(!0) : window.open(t || i, "_blank");
2404
2404
  }, c = () => a(!1), v = e || (i == null ? void 0 : i.split("/").pop()) || "Unknown file";
2405
- function h(p, y = "download") {
2406
- if (!p) return;
2407
- if (p.startsWith("data:")) {
2405
+ function h(b, f = "download") {
2406
+ if (!b) return;
2407
+ if (b.startsWith("data:")) {
2408
2408
  const g = document.createElement("a");
2409
- g.href = p, g.download = y, document.body.appendChild(g), g.click(), document.body.removeChild(g);
2409
+ g.href = b, g.download = f, document.body.appendChild(g), g.click(), document.body.removeChild(g);
2410
2410
  return;
2411
2411
  }
2412
- const f = document.createElement("a");
2413
- f.href = p, f.setAttribute("download", y), document.body.appendChild(f), f.click(), document.body.removeChild(f);
2412
+ const x = document.createElement("a");
2413
+ x.href = b, x.setAttribute("download", f), document.body.appendChild(x), x.click(), document.body.removeChild(x);
2414
2414
  }
2415
2415
  return /* @__PURE__ */ n.jsxs("div", { className: "mt-2 field-control !py-1 !bg-gray-50 !flex justify-between gap-x-8 items-center", children: [
2416
2416
  /* @__PURE__ */ n.jsxs(
@@ -2456,7 +2456,7 @@ function Ke({
2456
2456
  "div",
2457
2457
  {
2458
2458
  className: "relative bg-white p-8 rounded-lg w-full max-w-[90vw] max-h-[90vh] overflow-auto",
2459
- onClick: (p) => p.stopPropagation(),
2459
+ onClick: (b) => b.stopPropagation(),
2460
2460
  children: [
2461
2461
  /* @__PURE__ */ n.jsx(
2462
2462
  "button",
@@ -2516,38 +2516,38 @@ function Ia({
2516
2516
  const h = oi(
2517
2517
  () => l == null ? void 0 : l.map((S) => S.value).join(", "),
2518
2518
  [l]
2519
- ), p = oi(
2519
+ ), b = oi(
2520
2520
  () => l == null ? void 0 : l.map((S) => S.label).join(", "),
2521
2521
  [l]
2522
- ), y = $(
2522
+ ), f = $(
2523
2523
  async (S) => {
2524
2524
  var A;
2525
2525
  const N = xi("token");
2526
2526
  try {
2527
- const { data: k } = await Ii.post(u, S, {
2527
+ const { data: j } = await Ii.post(u, S, {
2528
2528
  headers: {
2529
2529
  Authorization: `Bearer ${N}`
2530
2530
  }
2531
2531
  });
2532
- return (A = k == null ? void 0 : k.data) == null ? void 0 : A.url;
2533
- } catch (k) {
2534
- throw console.error("File upload error:", k), new Error("Failed to upload file to server");
2532
+ return (A = j == null ? void 0 : j.data) == null ? void 0 : A.url;
2533
+ } catch (j) {
2534
+ throw console.error("File upload error:", j), new Error("Failed to upload file to server");
2535
2535
  }
2536
2536
  },
2537
2537
  [u]
2538
- ), f = $(
2538
+ ), x = $(
2539
2539
  (S) => new Promise((N, A) => {
2540
- const k = new FileReader();
2541
- k.onloadend = async () => {
2540
+ const j = new FileReader();
2541
+ j.onloadend = async () => {
2542
2542
  try {
2543
- const O = k.result.replace(
2543
+ const O = j.result.replace(
2544
2544
  /^data:.*;base64,/,
2545
2545
  ""
2546
- ), ii = u ? await y({
2546
+ ), ii = u ? await f({
2547
2547
  base64: O,
2548
2548
  ext: `.${S.name.split(".").pop()}`,
2549
2549
  fileName: S.name
2550
- }) : k.result;
2550
+ }) : j.result;
2551
2551
  N({
2552
2552
  base64: ii,
2553
2553
  type: S.type,
@@ -2556,29 +2556,29 @@ function Ia({
2556
2556
  } catch (O) {
2557
2557
  A(O);
2558
2558
  }
2559
- }, k.onerror = () => A(new Error("File read failed")), k.readAsDataURL(S);
2559
+ }, j.onerror = () => A(new Error("File read failed")), j.readAsDataURL(S);
2560
2560
  }),
2561
- [u, y]
2561
+ [u, f]
2562
2562
  ), g = $(
2563
2563
  (S) => {
2564
2564
  var A;
2565
- const N = h ? (A = h.split(",")) == null ? void 0 : A.map((k) => k.trim()) : [];
2566
- for (const k of S) {
2567
- if (k.size > Da)
2565
+ const N = h ? (A = h.split(",")) == null ? void 0 : A.map((j) => j.trim()) : [];
2566
+ for (const j of S) {
2567
+ if (j.size > Da)
2568
2568
  return ki.error(
2569
- `File "${k.name}" exceeds 5MB limit (${(k.size / 1024 / 1024).toFixed(2)}MB)`
2569
+ `File "${j.name}" exceeds 5MB limit (${(j.size / 1024 / 1024).toFixed(2)}MB)`
2570
2570
  ), !1;
2571
2571
  if (N.length && !N.some(
2572
- (O) => k.type === O || k.name.toLowerCase().endsWith(O.replace("*", ""))
2572
+ (O) => j.type === O || j.name.toLowerCase().endsWith(O.replace("*", ""))
2573
2573
  ))
2574
2574
  return ki.error(
2575
- `File "${k.name}" is not an allowed type. Allowed: ${p || "any"}`
2575
+ `File "${j.name}" is not an allowed type. Allowed: ${b || "any"}`
2576
2576
  ), !1;
2577
2577
  }
2578
2578
  return !0;
2579
2579
  },
2580
- [h, p]
2581
- ), m = $(
2580
+ [h, b]
2581
+ ), p = $(
2582
2582
  async (S) => {
2583
2583
  const N = Array.from(S.target.files || []);
2584
2584
  if (!(!N.length || c)) {
@@ -2588,8 +2588,8 @@ function Ia({
2588
2588
  }
2589
2589
  try {
2590
2590
  v(!0);
2591
- const A = await Promise.all(N == null ? void 0 : N.map(f)), k = s && d ? [...d, ...A] : A;
2592
- r(k), i(k), ki.success(`Successfully uploaded ${N.length} file(s)`);
2591
+ const A = await Promise.all(N == null ? void 0 : N.map(x)), j = s && d ? [...d, ...A] : A;
2592
+ r(j), i(j), ki.success(`Successfully uploaded ${N.length} file(s)`);
2593
2593
  } catch (A) {
2594
2594
  console.error("Upload error:", A), ki.error("Failed to upload file(s). Please try again.");
2595
2595
  } finally {
@@ -2597,16 +2597,16 @@ function Ia({
2597
2597
  }
2598
2598
  }
2599
2599
  },
2600
- [c, g, f, i, s, d]
2601
- ), x = $(
2600
+ [c, g, x, i, s, d]
2601
+ ), y = $(
2602
2602
  (S) => {
2603
2603
  c || (t.current && (t.current.value = ""), r((N) => {
2604
- const A = S === void 0 ? null : (N == null ? void 0 : N.filter((k, O) => O !== S)) || null;
2604
+ const A = S === void 0 ? null : (N == null ? void 0 : N.filter((j, O) => O !== S)) || null;
2605
2605
  return i(A), A;
2606
2606
  }), o == null || o());
2607
2607
  },
2608
2608
  [o, i, c]
2609
- ), j = d && d.length > 0;
2609
+ ), C = d && d.length > 0;
2610
2610
  return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col items-start gap-2", children: [
2611
2611
  !e && /* @__PURE__ */ n.jsxs("div", { className: "!flex field-control !py-0 !px-0 relative", children: [
2612
2612
  /* @__PURE__ */ n.jsx(
@@ -2614,7 +2614,7 @@ function Ia({
2614
2614
  {
2615
2615
  ref: t,
2616
2616
  type: "file",
2617
- onChange: m,
2617
+ onChange: p,
2618
2618
  disabled: e || c,
2619
2619
  multiple: s,
2620
2620
  accept: h || "",
@@ -2625,19 +2625,19 @@ function Ia({
2625
2625
  hover:file:bg-blue-100 disabled:opacity-50 disabled:cursor-not-allowed`
2626
2626
  }
2627
2627
  ),
2628
- j && /* @__PURE__ */ n.jsx(
2628
+ C && /* @__PURE__ */ n.jsx(
2629
2629
  "button",
2630
2630
  {
2631
2631
  type: "button",
2632
2632
  className: "p-2 text-lg text-red-500 hover:text-red-600 transition-colors disabled:opacity-50",
2633
- onClick: () => x(),
2633
+ onClick: () => y(),
2634
2634
  disabled: c,
2635
2635
  "aria-label": "Remove all files",
2636
2636
  children: /* @__PURE__ */ n.jsx(_, { icon: "lets-icons:trash-duotone" })
2637
2637
  }
2638
2638
  )
2639
2639
  ] }),
2640
- j && /* @__PURE__ */ n.jsxs("div", { className: "relative grid gap-y-1 flex-1 w-full", children: [
2640
+ C && /* @__PURE__ */ n.jsxs("div", { className: "relative grid gap-y-1 flex-1 w-full", children: [
2641
2641
  c && /* @__PURE__ */ n.jsx("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-white/60 rounded", children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 text-sm text-blue-600 font-medium", children: [
2642
2642
  /* @__PURE__ */ n.jsx("span", { className: "animate-spin h-4 w-4 border-2 border-blue-500 border-t-transparent rounded-full" }),
2643
2643
  "Uploading..."
@@ -2647,7 +2647,7 @@ function Ia({
2647
2647
  {
2648
2648
  fileUrl: S.base64,
2649
2649
  fileName: S.name,
2650
- removeFile: () => x(N)
2650
+ removeFile: () => y(N)
2651
2651
  },
2652
2652
  `${S.name}-${N}`
2653
2653
  )))
@@ -2728,13 +2728,13 @@ const F = ({
2728
2728
  trigger: c,
2729
2729
  prefix: v,
2730
2730
  disabled: h,
2731
- watch: p,
2732
- min: y,
2733
- max: f,
2731
+ watch: b,
2732
+ min: f,
2733
+ max: x,
2734
2734
  description: g
2735
2735
  }) => {
2736
- var x, j, S, N;
2737
- const m = o ? { ...o(e) } : {};
2736
+ var y, C, S, N;
2737
+ const p = o ? { ...o(e) } : {};
2738
2738
  if (l === "amount")
2739
2739
  return /* @__PURE__ */ n.jsxs("div", { className: "space-y-1.5 relative", children: [
2740
2740
  /* @__PURE__ */ n.jsx(
@@ -2758,12 +2758,12 @@ const F = ({
2758
2758
  disabled: h
2759
2759
  }
2760
2760
  ),
2761
- (s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "mt-1 text-sm text-red-600", children: (x = s[e]) == null ? void 0 : x.message })
2761
+ (s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "mt-1 text-sm text-red-600", children: (y = s[e]) == null ? void 0 : y.message })
2762
2762
  ] });
2763
2763
  if (["checkbox", "radio"].includes(l)) {
2764
- const A = (p == null ? void 0 : p(e)) || null;
2765
- let k = !1;
2766
- return A && (A != null && A.length && l === "checkbox" ? k = A == null ? void 0 : A.includes(r) : k = A == r), /* @__PURE__ */ n.jsxs("div", { className: "space-y-1", children: [
2764
+ const A = (b == null ? void 0 : b(e)) || null;
2765
+ let j = !1;
2766
+ return A && (A != null && A.length && l === "checkbox" ? j = A == null ? void 0 : A.includes(r) : j = A == r), /* @__PURE__ */ n.jsxs("div", { className: "space-y-1", children: [
2767
2767
  /* @__PURE__ */ n.jsxs(
2768
2768
  "label",
2769
2769
  {
@@ -2772,7 +2772,7 @@ const F = ({
2772
2772
  /* @__PURE__ */ n.jsx(
2773
2773
  "input",
2774
2774
  {
2775
- ...m,
2775
+ ...p,
2776
2776
  type: l,
2777
2777
  value: r || "",
2778
2778
  disabled: h,
@@ -2791,7 +2791,7 @@ const F = ({
2791
2791
  peer-disabled:opacity-60
2792
2792
  peer-disabled:cursor-not-allowed
2793
2793
  `,
2794
- children: k && /* @__PURE__ */ n.jsx(
2794
+ children: j && /* @__PURE__ */ n.jsx(
2795
2795
  _,
2796
2796
  {
2797
2797
  icon: "meteor-icons:check",
@@ -2807,7 +2807,7 @@ const F = ({
2807
2807
  ]
2808
2808
  }
2809
2809
  ),
2810
- (s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "ml-8 text-sm text-red-600", children: (j = s[e]) == null ? void 0 : j.message })
2810
+ (s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "ml-8 text-sm text-red-600", children: (C = s[e]) == null ? void 0 : C.message })
2811
2811
  ] });
2812
2812
  }
2813
2813
  return l === "textarea" ? /* @__PURE__ */ n.jsxs("div", { className: "space-y-1.5 relative", children: [
@@ -2821,7 +2821,7 @@ const F = ({
2821
2821
  /* @__PURE__ */ n.jsx(
2822
2822
  "textarea",
2823
2823
  {
2824
- ...m,
2824
+ ...p,
2825
2825
  className: `field-control ${s != null && s[e] ? "border-red-300" : "border-[#D0D5DD]"} ${a}`,
2826
2826
  placeholder: u,
2827
2827
  disabled: h
@@ -2839,13 +2839,13 @@ const F = ({
2839
2839
  /* @__PURE__ */ n.jsx(
2840
2840
  "input",
2841
2841
  {
2842
- ...m,
2842
+ ...p,
2843
2843
  type: l,
2844
2844
  className: `field-control ${s != null && s[e] ? "border-red-300" : "border-[#D0D5DD]"} ${a}`,
2845
2845
  placeholder: t ? "" : u,
2846
2846
  disabled: h,
2847
- min: y,
2848
- max: f
2847
+ min: f,
2848
+ max: x
2849
2849
  }
2850
2850
  ),
2851
2851
  (s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "mt-1 text-sm text-red-600", children: (N = s[e]) == null ? void 0 : N.message })
@@ -2915,36 +2915,36 @@ const Di = ({
2915
2915
  isFloatingLabel: c,
2916
2916
  subText: v,
2917
2917
  labelClass: h = "text-[10px]",
2918
- loading: p,
2919
- disabled: y
2918
+ loading: b,
2919
+ disabled: f
2920
2920
  }) => {
2921
- const [f, g] = P(r ? [] : null), m = Ci(!1), x = oi(() => !t || !i || i.length === 0 ? r ? [] : null : r ? Array.isArray(t) ? i.filter((N) => t.some(
2921
+ const [x, g] = P(r ? [] : null), p = Ci(!1), y = oi(() => !t || !i || i.length === 0 ? r ? [] : null : r ? Array.isArray(t) ? i.filter((N) => t.some(
2922
2922
  (A) => {
2923
- var k;
2924
- return typeof N.value == "object" ? ((k = N.value) == null ? void 0 : k.id) === (A == null ? void 0 : A.id) : N.value === A;
2923
+ var j;
2924
+ return typeof N.value == "object" ? ((j = N.value) == null ? void 0 : j.id) === (A == null ? void 0 : A.id) : N.value === A;
2925
2925
  }
2926
2926
  )) : [] : i.find((N) => {
2927
2927
  var A;
2928
2928
  return typeof N.value == "string" && typeof t == "string" ? N.value.toLowerCase() === t.toLowerCase() : typeof N.value == "object" && typeof t == "object" ? ((A = N.value) == null ? void 0 : A.id) === (t == null ? void 0 : t.id) : N.value === t;
2929
2929
  }) || null, [t, i, r]);
2930
2930
  D(() => {
2931
- if (m.current) {
2932
- m.current = !1;
2931
+ if (p.current) {
2932
+ p.current = !1;
2933
2933
  return;
2934
2934
  }
2935
- if (r && Array.isArray(x) && Array.isArray(f)) {
2936
- const N = f == null ? void 0 : f.map((k) => k.value), A = x == null ? void 0 : x.map((k) => k.value);
2937
- JSON.stringify(N) !== JSON.stringify(A) && g(x);
2938
- } else (x == null ? void 0 : x.value) !== (f == null ? void 0 : f.value) && g(x);
2939
- }, [x, r]);
2940
- const j = $((N) => {
2935
+ if (r && Array.isArray(y) && Array.isArray(x)) {
2936
+ const N = x == null ? void 0 : x.map((j) => j.value), A = y == null ? void 0 : y.map((j) => j.value);
2937
+ JSON.stringify(N) !== JSON.stringify(A) && g(y);
2938
+ } else (y == null ? void 0 : y.value) !== (x == null ? void 0 : x.value) && g(y);
2939
+ }, [y, r]);
2940
+ const C = $((N) => {
2941
2941
  var A;
2942
- if (m.current = !0, g(N), a) {
2943
- const k = r ? Array.isArray(N) ? N == null ? void 0 : N.map((O) => O.value) : [] : (A = N == null ? void 0 : N.value) != null ? A : null;
2944
- a(l, k), d == null || d(l);
2942
+ if (p.current = !0, g(N), a) {
2943
+ const j = r ? Array.isArray(N) ? N == null ? void 0 : N.map((O) => O.value) : [] : (A = N == null ? void 0 : N.value) != null ? A : null;
2944
+ a(l, j), d == null || d(l);
2945
2945
  }
2946
- s && !m.current && s(l);
2947
- }, [a, l, d, s, r]), S = oi(() => p ? "Fetching data..." : f ? r && Array.isArray(f) ? f.length > 0 ? f == null ? void 0 : f.map((N) => N.label).join(", ") : e : (f == null ? void 0 : f.label) || e : e, [f, p, e, r]);
2946
+ s && !p.current && s(l);
2947
+ }, [a, l, d, s, r]), S = oi(() => b ? "Fetching data..." : x ? r && Array.isArray(x) ? x.length > 0 ? x == null ? void 0 : x.map((N) => N.label).join(", ") : e : (x == null ? void 0 : x.label) || e : e, [x, b, e, r]);
2948
2948
  return /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
2949
2949
  !c && u && /* @__PURE__ */ n.jsx("label", { className: "block text-sm text-[#686878] darks:text-white/70 mb-2", children: u }),
2950
2950
  c && u && /* @__PURE__ */ n.jsx(
@@ -2960,17 +2960,17 @@ const Di = ({
2960
2960
  /* @__PURE__ */ n.jsx(
2961
2961
  di,
2962
2962
  {
2963
- value: f,
2964
- onChange: j,
2963
+ value: x,
2964
+ onChange: C,
2965
2965
  multiple: r,
2966
- disabled: y || p,
2966
+ disabled: f || b,
2967
2967
  children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
2968
- /* @__PURE__ */ n.jsxs(di.Button, { className: "field-control", disabled: y || p, children: [
2968
+ /* @__PURE__ */ n.jsxs(di.Button, { className: "field-control", disabled: f || b, children: [
2969
2969
  /* @__PURE__ */ n.jsx(
2970
2970
  "span",
2971
2971
  {
2972
2972
  className: q("block text-sm text-left truncate", {
2973
- "opacity-60": !f || p
2973
+ "opacity-60": !x || b
2974
2974
  }),
2975
2975
  children: S
2976
2976
  }
@@ -2978,13 +2978,13 @@ const Di = ({
2978
2978
  /* @__PURE__ */ n.jsx("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ n.jsx(_, { icon: "lucide:chevron-down" }) })
2979
2979
  ] }),
2980
2980
  /* @__PURE__ */ n.jsx(
2981
- wi,
2981
+ Ei,
2982
2982
  {
2983
2983
  leave: "transition ease-in duration-100",
2984
2984
  leaveFrom: "opacity-100",
2985
2985
  leaveTo: "opacity-0",
2986
2986
  children: /* @__PURE__ */ n.jsx(di.Options, { anchor: "bottom start", className: "select-button-options", children: i.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No options available" }) : i == null ? void 0 : i.map((N, A) => {
2987
- var k;
2987
+ var j;
2988
2988
  return /* @__PURE__ */ n.jsx(
2989
2989
  di.Option,
2990
2990
  {
@@ -2992,7 +2992,7 @@ const Di = ({
2992
2992
  className: ({ active: O }) => q("select-option", { active: O }),
2993
2993
  children: ({ selected: O }) => /* @__PURE__ */ n.jsx("div", { className: q("option-text", { selected: O }), children: N.label })
2994
2994
  },
2995
- ((k = N.value) == null ? void 0 : k.id) || N.value || A
2995
+ ((j = N.value) == null ? void 0 : j.id) || N.value || A
2996
2996
  );
2997
2997
  }) })
2998
2998
  }
@@ -3013,23 +3013,23 @@ function Tn({
3013
3013
  name: l
3014
3014
  }) {
3015
3015
  const [u, t] = P(""), d = oi(() => {
3016
- const p = e != null ? e : o;
3017
- return i.find((y) => y.value === p || y.label === p) || null;
3016
+ const b = e != null ? e : o;
3017
+ return i.find((f) => f.value === b || f.label === b) || null;
3018
3018
  }, [e, o, i]), [r, c] = P(d);
3019
3019
  D(() => {
3020
3020
  if (e !== void 0) {
3021
- const p = i.find((y) => y.value === e || y.label === e) || null;
3022
- c(p);
3021
+ const b = i.find((f) => f.value === e || f.label === e) || null;
3022
+ c(b);
3023
3023
  }
3024
3024
  }, [e, i]);
3025
3025
  const v = oi(() => {
3026
3026
  if (u === "") return i;
3027
- const p = u.toLowerCase();
3027
+ const b = u.toLowerCase();
3028
3028
  return i.filter(
3029
- (y) => y.label.toLowerCase().includes(p)
3029
+ (f) => f.label.toLowerCase().includes(b)
3030
3030
  );
3031
- }, [u, i]), h = $((p) => {
3032
- c(p), s(l, p);
3031
+ }, [u, i]), h = $((b) => {
3032
+ c(b), s(l, b);
3033
3033
  }, [l, s]);
3034
3034
  return /* @__PURE__ */ n.jsx("div", { className: "relative w-full", children: /* @__PURE__ */ n.jsxs(
3035
3035
  Ri,
@@ -3043,21 +3043,21 @@ function Tn({
3043
3043
  vo,
3044
3044
  {
3045
3045
  className: "field-control",
3046
- displayValue: (p) => (p == null ? void 0 : p.label) || "",
3047
- onChange: (p) => t(p.target.value),
3046
+ displayValue: (b) => (b == null ? void 0 : b.label) || "",
3047
+ onChange: (b) => t(b.target.value),
3048
3048
  placeholder: "Select an option..."
3049
3049
  }
3050
3050
  ),
3051
3051
  /* @__PURE__ */ n.jsx(ho, { className: "absolute inset-y-0 right-0 flex items-center px-2 text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ n.jsx(_, { icon: "octicon:chevron-down-12" }) })
3052
3052
  ] }),
3053
- /* @__PURE__ */ n.jsx(po, { anchor: "bottom start", className: "select-options__combo", children: v.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : v == null ? void 0 : v.map((p) => /* @__PURE__ */ n.jsx(
3053
+ /* @__PURE__ */ n.jsx(po, { anchor: "bottom start", className: "select-options__combo", children: v.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : v == null ? void 0 : v.map((b) => /* @__PURE__ */ n.jsx(
3054
3054
  go,
3055
3055
  {
3056
- value: p,
3057
- className: ({ active: y, selected: f }) => q("select-option", { active: y, selected: f }),
3058
- children: ({ selected: y }) => /* @__PURE__ */ n.jsx("div", { className: q("option-text", { selected: y }), children: p.label })
3056
+ value: b,
3057
+ className: ({ active: f, selected: x }) => q("select-option", { active: f, selected: x }),
3058
+ children: ({ selected: f }) => /* @__PURE__ */ n.jsx("div", { className: q("option-text", { selected: f }), children: b.label })
3059
3059
  },
3060
- p.value
3060
+ b.value
3061
3061
  )) })
3062
3062
  ]
3063
3063
  }
@@ -3670,8 +3670,8 @@ const ls = () => /* @__PURE__ */ n.jsx("blockquote", { className: "bg-gray-100 p
3670
3670
  const v = c.target.result, h = jo.parse(v, { header: !0 });
3671
3671
  i(e, h.data);
3672
3672
  }, r.readAsText(d)) : d.name.endsWith(".xlsx") || d.name.endsWith(".xls") ? (r.onload = (c) => {
3673
- const v = new Uint8Array(c.target.result), h = Xn.read(v, { type: "array" }), p = h.SheetNames[0], y = h.Sheets[p], f = Xn.utils.sheet_to_json(y);
3674
- i(e, f);
3673
+ const v = new Uint8Array(c.target.result), h = Xn.read(v, { type: "array" }), b = h.SheetNames[0], f = h.Sheets[b], x = Xn.utils.sheet_to_json(f);
3674
+ i(e, x);
3675
3675
  }, r.readAsArrayBuffer(d)) : ki.error("Unsupported file type. Please upload a CSV or Excel file.");
3676
3676
  };
3677
3677
  return /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
@@ -3778,7 +3778,7 @@ function bs({
3778
3778
  });
3779
3779
  }, [l, u, a]), d = (r, c, v) => {
3780
3780
  const h = u == null ? void 0 : u.map(
3781
- (p, y) => y === r ? { ...p, [c]: v } : p
3781
+ (b, f) => f === r ? { ...b, [c]: v } : b
3782
3782
  );
3783
3783
  e("visibilityDependentFields", h);
3784
3784
  };
@@ -3812,11 +3812,11 @@ function bs({
3812
3812
  di,
3813
3813
  {
3814
3814
  value: r.fieldType,
3815
- onChange: (p) => d(c, "fieldType", p),
3815
+ onChange: (b) => d(c, "fieldType", b),
3816
3816
  children: /* @__PURE__ */ n.jsxs("div", { className: "listbox-wrapper", children: [
3817
3817
  /* @__PURE__ */ n.jsx(di.Button, { className: "listbox-button", children: r.fieldType }),
3818
3818
  /* @__PURE__ */ n.jsx(
3819
- wi,
3819
+ Ei,
3820
3820
  {
3821
3821
  as: Zi,
3822
3822
  leave: "transition ease-in duration-100",
@@ -3827,14 +3827,14 @@ function bs({
3827
3827
  {
3828
3828
  className: "listbox-options ",
3829
3829
  anchor: "bottom",
3830
- children: gn == null ? void 0 : gn.map((p) => /* @__PURE__ */ n.jsx(
3830
+ children: gn == null ? void 0 : gn.map((b) => /* @__PURE__ */ n.jsx(
3831
3831
  di.Option,
3832
3832
  {
3833
- value: p,
3833
+ value: b,
3834
3834
  className: "listbox-option",
3835
- children: p
3835
+ children: b
3836
3836
  },
3837
- p
3837
+ b
3838
3838
  ))
3839
3839
  }
3840
3840
  )
@@ -3847,11 +3847,11 @@ function bs({
3847
3847
  di,
3848
3848
  {
3849
3849
  value: r.operator,
3850
- onChange: (p) => d(c, "operator", p),
3850
+ onChange: (b) => d(c, "operator", b),
3851
3851
  children: /* @__PURE__ */ n.jsxs("div", { className: "listbox-wrapper", children: [
3852
3852
  /* @__PURE__ */ n.jsx(di.Button, { className: "listbox-button", children: r.operator.replace("_", " ") }),
3853
3853
  /* @__PURE__ */ n.jsx(
3854
- wi,
3854
+ Ei,
3855
3855
  {
3856
3856
  as: Zi,
3857
3857
  leave: "transition ease-in duration-100",
@@ -3862,14 +3862,14 @@ function bs({
3862
3862
  {
3863
3863
  className: "listbox-options ",
3864
3864
  anchor: "bottom",
3865
- children: (v = r.fieldType === "number" ? [...pe, ...ms] : pe) == null ? void 0 : v.map((p) => /* @__PURE__ */ n.jsx(
3865
+ children: (v = r.fieldType === "number" ? [...pe, ...ms] : pe) == null ? void 0 : v.map((b) => /* @__PURE__ */ n.jsx(
3866
3866
  di.Option,
3867
3867
  {
3868
- value: p,
3868
+ value: b,
3869
3869
  className: "listbox-option",
3870
- children: p.replace("_", " ")
3870
+ children: b.replace("_", " ")
3871
3871
  },
3872
- p
3872
+ b
3873
3873
  ))
3874
3874
  }
3875
3875
  )
@@ -3883,7 +3883,7 @@ function bs({
3883
3883
  {
3884
3884
  type: r.fieldType,
3885
3885
  value: r.fieldValue || "",
3886
- onChange: (p) => d(c, "fieldValue", p.target.value),
3886
+ onChange: (b) => d(c, "fieldValue", b.target.value),
3887
3887
  placeholder: "Value",
3888
3888
  className: "field-value"
3889
3889
  }
@@ -3891,11 +3891,11 @@ function bs({
3891
3891
  di,
3892
3892
  {
3893
3893
  value: (h = r.fieldValue) != null ? h : "",
3894
- onChange: (p) => d(c, "fieldValue", p),
3894
+ onChange: (b) => d(c, "fieldValue", b),
3895
3895
  children: /* @__PURE__ */ n.jsxs("div", { className: "listbox-wrapper", children: [
3896
3896
  /* @__PURE__ */ n.jsx(di.Button, { className: "listbox-button", children: r.fieldValue === !0 ? "True" : r.fieldValue === !1 ? "False" : "Select value" }),
3897
3897
  /* @__PURE__ */ n.jsx(
3898
- wi,
3898
+ Ei,
3899
3899
  {
3900
3900
  as: Zi,
3901
3901
  leave: "transition ease-in duration-100",
@@ -4016,12 +4016,12 @@ const vs = B.object().shape({
4016
4016
  (L) => !qi.includes(o.inputType) || L.key !== "validation"
4017
4017
  ), { updateElement: a } = mi.useContext(gi), [l, u] = P("basic"), [t, d] = P(!1), [r, c] = P("manual"), v = xi("config"), {
4018
4018
  register: h,
4019
- handleSubmit: p,
4020
- control: y,
4021
- setValue: f,
4019
+ handleSubmit: b,
4020
+ control: f,
4021
+ setValue: x,
4022
4022
  watch: g,
4023
- trigger: m,
4024
- formState: { errors: x, isSubmitting: j, isValid: S },
4023
+ trigger: p,
4024
+ formState: { errors: y, isSubmitting: C, isValid: S },
4025
4025
  reset: N
4026
4026
  } = Bn({
4027
4027
  resolver: Dn(vs),
@@ -4029,22 +4029,22 @@ const vs = B.object().shape({
4029
4029
  ...o,
4030
4030
  options: o.options || []
4031
4031
  }
4032
- }), A = g(), { fields: k, append: O, remove: ii } = mn({
4033
- control: y,
4032
+ }), A = g(), { fields: j, append: O, remove: ii } = mn({
4033
+ control: f,
4034
4034
  name: "options"
4035
4035
  }), {
4036
4036
  fields: z,
4037
4037
  append: Z,
4038
- remove: w
4038
+ remove: E
4039
4039
  } = mn({
4040
- control: y,
4040
+ control: f,
4041
4041
  name: "options1"
4042
4042
  }), {
4043
4043
  fields: W,
4044
4044
  append: I,
4045
4045
  remove: G
4046
4046
  } = mn({
4047
- control: y,
4047
+ control: f,
4048
4048
  name: "dataColumns"
4049
4049
  });
4050
4050
  D(() => {
@@ -4056,7 +4056,7 @@ const vs = B.object().shape({
4056
4056
  headers: {
4057
4057
  Authorization: `Bearer ${xi("token")}`
4058
4058
  }
4059
- }, E = $(async () => {
4059
+ }, w = $(async () => {
4060
4060
  var L, K, X;
4061
4061
  if (!A.apiUrl || !/^https?:\/\//.test(A.apiUrl)) {
4062
4062
  ki.info("Please provide a valid API URL");
@@ -4074,16 +4074,16 @@ const vs = B.object().shape({
4074
4074
  ki.error("Expected an array in response (data, record, or result).");
4075
4075
  return;
4076
4076
  }
4077
- ((L = o.type) == null ? void 0 : L.toLowerCase()) === "datagrid" ? f("dataColumns", li) : f("options", li);
4077
+ ((L = o.type) == null ? void 0 : L.toLowerCase()) === "datagrid" ? x("dataColumns", li) : x("options", li);
4078
4078
  } catch (ui) {
4079
4079
  const J = ((X = (K = ui == null ? void 0 : ui.response) == null ? void 0 : K.data) == null ? void 0 : X.message) || (ui == null ? void 0 : ui.message) || "Unable to load options";
4080
4080
  ki.error(J);
4081
4081
  } finally {
4082
4082
  d(!1);
4083
4083
  }
4084
- }, [o.type, f, A.apiUrl]), U = ["manual", "api", "sheet"];
4084
+ }, [o.type, x, A.apiUrl]), U = ["manual", "api", "sheet"];
4085
4085
  function ci() {
4086
- r === "api" && E();
4086
+ r === "api" && w();
4087
4087
  }
4088
4088
  const ni = () => /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col justify-start gap-y-1", children: [
4089
4089
  /* @__PURE__ */ n.jsx("div", { className: "flex items-center mb-4 gap-x-5", children: U == null ? void 0 : U.map((L) => /* @__PURE__ */ n.jsxs("label", { className: "items-center text-base capitalize gap-x-3", children: [
@@ -4111,7 +4111,7 @@ const vs = B.object().shape({
4111
4111
  watch: g,
4112
4112
  label: "Load Options from Api",
4113
4113
  name: "apiUrl",
4114
- errors: x,
4114
+ errors: y,
4115
4115
  register: h,
4116
4116
  className: "!w-full",
4117
4117
  placeholder: "https://example.com/options",
@@ -4137,13 +4137,13 @@ const vs = B.object().shape({
4137
4137
  {
4138
4138
  isFloating: !0,
4139
4139
  label: "Load options form sheet (csv, xlsx)",
4140
- setValue: f,
4140
+ setValue: x,
4141
4141
  name: "options"
4142
4142
  }
4143
4143
  ) }),
4144
4144
  /* @__PURE__ */ n.jsxs("div", { children: [
4145
4145
  /* @__PURE__ */ n.jsx("h3", { className: "mb-4 text-sm text-gray-500", children: "Parent Options " }),
4146
- k == null ? void 0 : k.map((L, K) => /* @__PURE__ */ n.jsxs(
4146
+ j == null ? void 0 : j.map((L, K) => /* @__PURE__ */ n.jsxs(
4147
4147
  "div",
4148
4148
  {
4149
4149
  className: "flex items-center mb-1 gap-x-4 last:mb-0",
@@ -4155,7 +4155,7 @@ const vs = B.object().shape({
4155
4155
  label: K === 0 ? "Label" : "",
4156
4156
  name: `options.${K}.label`,
4157
4157
  register: h,
4158
- errors: x,
4158
+ errors: y,
4159
4159
  element: o,
4160
4160
  placeholder: "Label"
4161
4161
  }
@@ -4167,7 +4167,7 @@ const vs = B.object().shape({
4167
4167
  label: K === 0 ? "Value" : "",
4168
4168
  name: `options.${K}.value`,
4169
4169
  register: h,
4170
- errors: x,
4170
+ errors: y,
4171
4171
  element: o,
4172
4172
  placeholder: "Value"
4173
4173
  }
@@ -4175,7 +4175,7 @@ const vs = B.object().shape({
4175
4175
  /* @__PURE__ */ n.jsx(
4176
4176
  "button",
4177
4177
  {
4178
- disabled: k.length === 1,
4178
+ disabled: j.length === 1,
4179
4179
  type: "button",
4180
4180
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
4181
4181
  onClick: () => ii(K),
@@ -4220,7 +4220,7 @@ const vs = B.object().shape({
4220
4220
  label: "Label",
4221
4221
  name: `options1.${K}.label`,
4222
4222
  register: h,
4223
- errors: x,
4223
+ errors: y,
4224
4224
  element: o,
4225
4225
  placeholder: "Label",
4226
4226
  isFloating: !0
@@ -4233,7 +4233,7 @@ const vs = B.object().shape({
4233
4233
  label: "Value",
4234
4234
  name: `options1.${K}.value`,
4235
4235
  register: h,
4236
- errors: x,
4236
+ errors: y,
4237
4237
  element: o,
4238
4238
  placeholder: "Value",
4239
4239
  isFloating: !0
@@ -4246,7 +4246,7 @@ const vs = B.object().shape({
4246
4246
  label: "Key",
4247
4247
  name: `options1.${K}.key`,
4248
4248
  register: h,
4249
- errors: x,
4249
+ errors: y,
4250
4250
  element: o,
4251
4251
  placeholder: "Key",
4252
4252
  isFloating: !0
@@ -4258,7 +4258,7 @@ const vs = B.object().shape({
4258
4258
  disabled: z.length === 1,
4259
4259
  type: "button",
4260
4260
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
4261
- onClick: () => w(K),
4261
+ onClick: () => E(K),
4262
4262
  children: /* @__PURE__ */ n.jsx(_, { icon: "iconamoon:sign-times-fill" })
4263
4263
  }
4264
4264
  )
@@ -4310,7 +4310,7 @@ const vs = B.object().shape({
4310
4310
  watch: g,
4311
4311
  label: "Load Columns from Api",
4312
4312
  name: "apiUrl",
4313
- errors: x,
4313
+ errors: y,
4314
4314
  register: h,
4315
4315
  className: "!w-full",
4316
4316
  placeholder: "https://example.com/columns",
@@ -4337,7 +4337,7 @@ const vs = B.object().shape({
4337
4337
  {
4338
4338
  isFloating: !0,
4339
4339
  label: "Load columns form sheet (csv, xlsx)",
4340
- setValue: f,
4340
+ setValue: x,
4341
4341
  name: "dataColumns"
4342
4342
  }
4343
4343
  ) }),
@@ -4362,8 +4362,8 @@ const vs = B.object().shape({
4362
4362
  ],
4363
4363
  register: h,
4364
4364
  name: `dataColumns.${K}.type`,
4365
- setValue: f,
4366
- trigger: m,
4365
+ setValue: x,
4366
+ trigger: p,
4367
4367
  value: A.dataColumns[K].type
4368
4368
  }
4369
4369
  ) }),
@@ -4374,7 +4374,7 @@ const vs = B.object().shape({
4374
4374
  label: K === 0 ? "Field key" : "",
4375
4375
  name: `dataColumns.${K}.field`,
4376
4376
  register: h,
4377
- errors: x,
4377
+ errors: y,
4378
4378
  element: o,
4379
4379
  placeholder: "fieldKey"
4380
4380
  }
@@ -4386,7 +4386,7 @@ const vs = B.object().shape({
4386
4386
  label: K === 0 ? "Display header" : "",
4387
4387
  name: `dataColumns.${K}.headerName`,
4388
4388
  register: h,
4389
- errors: x,
4389
+ errors: y,
4390
4390
  element: o,
4391
4391
  placeholder: "header"
4392
4392
  }
@@ -4430,8 +4430,8 @@ const vs = B.object().shape({
4430
4430
  Authorization: `Bearer ${L}`
4431
4431
  }
4432
4432
  });
4433
- K === 200 && f("options", (X == null ? void 0 : X.data) || X);
4434
- }, [f, A.url]);
4433
+ K === 200 && x("options", (X == null ? void 0 : X.data) || X);
4434
+ }, [x, A.url]);
4435
4435
  D(() => {
4436
4436
  o.type === "document" && A.url && hi();
4437
4437
  }, [A.url, o.type, hi]);
@@ -4466,7 +4466,7 @@ const vs = B.object().shape({
4466
4466
  /* @__PURE__ */ n.jsxs(
4467
4467
  "form",
4468
4468
  {
4469
- onSubmit: p(H),
4469
+ onSubmit: b(H),
4470
4470
  className: "w-full flex-1 flex flex-col",
4471
4471
  children: [
4472
4472
  /* @__PURE__ */ n.jsxs("div", { className: "flex-1", children: [
@@ -4480,7 +4480,7 @@ const vs = B.object().shape({
4480
4480
  label: "Value",
4481
4481
  name: "value",
4482
4482
  register: h,
4483
- errors: x,
4483
+ errors: y,
4484
4484
  element: o
4485
4485
  }
4486
4486
  ) }),
@@ -4492,7 +4492,7 @@ const vs = B.object().shape({
4492
4492
  label: "Label",
4493
4493
  name: "inputLabel",
4494
4494
  register: h,
4495
- errors: x,
4495
+ errors: y,
4496
4496
  element: o
4497
4497
  }
4498
4498
  ),
@@ -4504,7 +4504,7 @@ const vs = B.object().shape({
4504
4504
  label: "Child Label",
4505
4505
  name: "childLabel",
4506
4506
  register: h,
4507
- errors: x,
4507
+ errors: y,
4508
4508
  element: o
4509
4509
  }
4510
4510
  )
@@ -4516,7 +4516,7 @@ const vs = B.object().shape({
4516
4516
  label: "Placeholder",
4517
4517
  name: "placeholder",
4518
4518
  register: h,
4519
- errors: x,
4519
+ errors: y,
4520
4520
  element: o
4521
4521
  }
4522
4522
  ),
@@ -4527,7 +4527,7 @@ const vs = B.object().shape({
4527
4527
  label: "Prefix",
4528
4528
  name: "prefix",
4529
4529
  register: h,
4530
- errors: x,
4530
+ errors: y,
4531
4531
  element: o
4532
4532
  }
4533
4533
  ),
@@ -4540,7 +4540,7 @@ const vs = B.object().shape({
4540
4540
  label: "Api Url",
4541
4541
  name: "url",
4542
4542
  register: h,
4543
- errors: x,
4543
+ errors: y,
4544
4544
  element: o
4545
4545
  }
4546
4546
  ),
@@ -4560,8 +4560,8 @@ const vs = B.object().shape({
4560
4560
  ],
4561
4561
  register: h,
4562
4562
  name: "method",
4563
- setValue: f,
4564
- trigger: m,
4563
+ setValue: x,
4564
+ trigger: p,
4565
4565
  value: g("method")
4566
4566
  }
4567
4567
  ),
@@ -4581,8 +4581,8 @@ const vs = B.object().shape({
4581
4581
  ],
4582
4582
  register: h,
4583
4583
  name: "responseType",
4584
- setValue: f,
4585
- trigger: m,
4584
+ setValue: x,
4585
+ trigger: p,
4586
4586
  value: g("responseType")
4587
4587
  }
4588
4588
  )
@@ -4591,7 +4591,7 @@ const vs = B.object().shape({
4591
4591
  ss,
4592
4592
  {
4593
4593
  onChange: (L) => {
4594
- f("denominators", L);
4594
+ x("denominators", L);
4595
4595
  },
4596
4596
  value: g("denominators")
4597
4597
  }
@@ -4603,7 +4603,7 @@ const vs = B.object().shape({
4603
4603
  label: "Short Description",
4604
4604
  name: "description",
4605
4605
  register: h,
4606
- errors: x,
4606
+ errors: y,
4607
4607
  element: o
4608
4608
  }
4609
4609
  ),
@@ -4615,8 +4615,8 @@ const vs = B.object().shape({
4615
4615
  options: Za,
4616
4616
  register: h,
4617
4617
  name: "dateFormat",
4618
- setValue: f,
4619
- trigger: m,
4618
+ setValue: x,
4619
+ trigger: p,
4620
4620
  value: g("dateFormat")
4621
4621
  }
4622
4622
  ),
@@ -4627,7 +4627,7 @@ const vs = B.object().shape({
4627
4627
  label: "Allow Range",
4628
4628
  name: "canHaveDateRange",
4629
4629
  register: h,
4630
- errors: x,
4630
+ errors: y,
4631
4631
  element: o,
4632
4632
  type: "checkbox",
4633
4633
  value: A.canHaveDateRange
@@ -4639,7 +4639,7 @@ const vs = B.object().shape({
4639
4639
  {
4640
4640
  name: "minDate",
4641
4641
  value: A == null ? void 0 : A.minDate,
4642
- onGetValue: f,
4642
+ onGetValue: x,
4643
4643
  placeholder: "Select min date"
4644
4644
  }
4645
4645
  ),
@@ -4648,7 +4648,7 @@ const vs = B.object().shape({
4648
4648
  {
4649
4649
  name: "maxDate",
4650
4650
  value: A == null ? void 0 : A.minDate,
4651
- onGetValue: f,
4651
+ onGetValue: x,
4652
4652
  placeholder: "Select max date",
4653
4653
  minDate: A == null ? void 0 : A.minDate
4654
4654
  }
@@ -4661,7 +4661,7 @@ const vs = B.object().shape({
4661
4661
  label: "Allow Year Picker",
4662
4662
  name: "allowYearPicker",
4663
4663
  register: h,
4664
- errors: x,
4664
+ errors: y,
4665
4665
  element: o,
4666
4666
  type: "checkbox",
4667
4667
  value: A.allowYearPicker
@@ -4675,7 +4675,7 @@ const vs = B.object().shape({
4675
4675
  label: "Allow States",
4676
4676
  name: "showState",
4677
4677
  register: h,
4678
- errors: x,
4678
+ errors: y,
4679
4679
  element: o,
4680
4680
  type: "checkbox",
4681
4681
  value: A.showState
@@ -4697,8 +4697,8 @@ const vs = B.object().shape({
4697
4697
  ],
4698
4698
  register: h,
4699
4699
  name: "selectType",
4700
- setValue: f,
4701
- trigger: m,
4700
+ setValue: x,
4701
+ trigger: p,
4702
4702
  value: g("selectType")
4703
4703
  }
4704
4704
  ),
@@ -4709,7 +4709,7 @@ const vs = B.object().shape({
4709
4709
  label: "Number of columns (max: 4)",
4710
4710
  name: "columns",
4711
4711
  register: h,
4712
- errors: x,
4712
+ errors: y,
4713
4713
  element: o,
4714
4714
  max: 4,
4715
4715
  min: 1
@@ -4724,7 +4724,7 @@ const vs = B.object().shape({
4724
4724
  label: "Document Options Url",
4725
4725
  name: "url",
4726
4726
  register: h,
4727
- errors: x,
4727
+ errors: y,
4728
4728
  element: o
4729
4729
  }
4730
4730
  ),
@@ -4739,7 +4739,7 @@ const vs = B.object().shape({
4739
4739
  label: "Document Validation Url",
4740
4740
  name: "validationUrl",
4741
4741
  register: h,
4742
- errors: x,
4742
+ errors: y,
4743
4743
  element: o
4744
4744
  }
4745
4745
  ),
@@ -4752,7 +4752,7 @@ const vs = B.object().shape({
4752
4752
  label: "Signature Page Url",
4753
4753
  name: "signatureLink",
4754
4754
  register: h,
4755
- errors: x,
4755
+ errors: y,
4756
4756
  element: o
4757
4757
  }
4758
4758
  ) })
@@ -4766,7 +4766,7 @@ const vs = B.object().shape({
4766
4766
  label: "Allow Multiple Uploads",
4767
4767
  name: "isMultiple",
4768
4768
  register: h,
4769
- errors: x,
4769
+ errors: y,
4770
4770
  element: o,
4771
4771
  type: "checkbox",
4772
4772
  value: A.isMultiple
@@ -4780,7 +4780,7 @@ const vs = B.object().shape({
4780
4780
  id: "acceptedFiles",
4781
4781
  value: A == null ? void 0 : A.acceptedFiles
4782
4782
  },
4783
- validationData: { register: h, setValue: f, trigger: m, watch: g },
4783
+ validationData: { register: h, setValue: x, trigger: p, watch: g },
4784
4784
  placeholder: "Choose file types"
4785
4785
  }
4786
4786
  )
@@ -4794,7 +4794,7 @@ const vs = B.object().shape({
4794
4794
  label: "Toggle Visibility",
4795
4795
  name: "isHidden",
4796
4796
  register: h,
4797
- errors: x,
4797
+ errors: y,
4798
4798
  element: o,
4799
4799
  type: "checkbox",
4800
4800
  value: A.isHidden
@@ -4805,8 +4805,8 @@ const vs = B.object().shape({
4805
4805
  bs,
4806
4806
  {
4807
4807
  register: h,
4808
- setValue: f,
4809
- trigger: m,
4808
+ setValue: x,
4809
+ trigger: p,
4810
4810
  watch: g,
4811
4811
  id: o == null ? void 0 : o.id
4812
4812
  }
@@ -4822,7 +4822,7 @@ const vs = B.object().shape({
4822
4822
  label: "Required",
4823
4823
  name: "isRequired",
4824
4824
  register: h,
4825
- errors: x,
4825
+ errors: y,
4826
4826
  element: o,
4827
4827
  type: "checkbox",
4828
4828
  value: A.isRequired
@@ -4836,7 +4836,7 @@ const vs = B.object().shape({
4836
4836
  label: "Error message text",
4837
4837
  name: "requiredMessage",
4838
4838
  register: h,
4839
- errors: x,
4839
+ errors: y,
4840
4840
  element: o
4841
4841
  }
4842
4842
  ) })
@@ -4850,7 +4850,7 @@ const vs = B.object().shape({
4850
4850
  label: "Min Length",
4851
4851
  name: "minLength",
4852
4852
  register: h,
4853
- errors: x,
4853
+ errors: y,
4854
4854
  element: o,
4855
4855
  type: "number"
4856
4856
  }
@@ -4863,7 +4863,7 @@ const vs = B.object().shape({
4863
4863
  label: "Error message text",
4864
4864
  name: "minLengthMessage",
4865
4865
  register: h,
4866
- errors: x,
4866
+ errors: y,
4867
4867
  element: o
4868
4868
  }
4869
4869
  ) })
@@ -4876,7 +4876,7 @@ const vs = B.object().shape({
4876
4876
  label: "Max Length",
4877
4877
  name: "maxLength",
4878
4878
  register: h,
4879
- errors: x,
4879
+ errors: y,
4880
4880
  element: o,
4881
4881
  type: "number"
4882
4882
  }
@@ -4889,7 +4889,7 @@ const vs = B.object().shape({
4889
4889
  label: "Error message text",
4890
4890
  name: "maxLengthMessage",
4891
4891
  register: h,
4892
- errors: x,
4892
+ errors: y,
4893
4893
  element: o
4894
4894
  }
4895
4895
  ) })
@@ -4904,7 +4904,7 @@ const vs = B.object().shape({
4904
4904
  label: "Min Amount",
4905
4905
  name: "minAmount",
4906
4906
  register: h,
4907
- errors: x,
4907
+ errors: y,
4908
4908
  element: o,
4909
4909
  type: "amount"
4910
4910
  }
@@ -4917,7 +4917,7 @@ const vs = B.object().shape({
4917
4917
  label: "Error message text",
4918
4918
  name: "minAmountMessage",
4919
4919
  register: h,
4920
- errors: x,
4920
+ errors: y,
4921
4921
  element: o
4922
4922
  }
4923
4923
  ) })
@@ -4930,7 +4930,7 @@ const vs = B.object().shape({
4930
4930
  label: "Max Amount",
4931
4931
  name: "maxAmount",
4932
4932
  register: h,
4933
- errors: x,
4933
+ errors: y,
4934
4934
  element: o,
4935
4935
  type: "amount"
4936
4936
  }
@@ -4943,7 +4943,7 @@ const vs = B.object().shape({
4943
4943
  label: "Error message text",
4944
4944
  name: "maxAmountMessage",
4945
4945
  register: h,
4946
- errors: x,
4946
+ errors: y,
4947
4947
  element: o
4948
4948
  }
4949
4949
  ) })
@@ -4966,10 +4966,10 @@ const vs = B.object().shape({
4966
4966
  "button",
4967
4967
  {
4968
4968
  type: "submit",
4969
- disabled: !S || j,
4969
+ disabled: !S || C,
4970
4970
  style: { background: (v == null ? void 0 : v.buttonColor) || "#333" },
4971
- className: `flex-1 px-4 py-2.5 ${!S || j ? "bg-[#F2F4F7]" : "bg-[#2563EB]"} ${!S || j ? "text-[#98A2B3]" : "text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50 editor_option__save`,
4972
- children: j ? "Saving..." : "Save"
4971
+ className: `flex-1 px-4 py-2.5 ${!S || C ? "bg-[#F2F4F7]" : "bg-[#2563EB]"} ${!S || C ? "text-[#98A2B3]" : "text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50 editor_option__save`,
4972
+ children: C ? "Saving..." : "Save"
4973
4973
  }
4974
4974
  )
4975
4975
  ] })
@@ -4991,7 +4991,7 @@ const vs = B.object().shape({
4991
4991
  ), d = $(() => {
4992
4992
  l(e.id, e.sectionId);
4993
4993
  }, [e.id, e.sectionId, l]);
4994
- return /* @__PURE__ */ n.jsxs("div", { className: "w-full", children: [
4994
+ return /* @__PURE__ */ n.jsxs("div", { className: "w-full min-w-0", children: [
4995
4995
  s && /* @__PURE__ */ n.jsx(
4996
4996
  ps,
4997
4997
  {
@@ -5177,54 +5177,54 @@ function ys({
5177
5177
  validationData: e
5178
5178
  }) {
5179
5179
  var A;
5180
- const { register: o = () => ({}), setValue: s, watch: a } = e || {}, [l, u] = P(), [t, d] = P(!1), [r, c] = P(!1), [v, h] = P(""), p = a && a(i == null ? void 0 : i.id);
5180
+ const { register: o = () => ({}), setValue: s, watch: a } = e || {}, [l, u] = P(), [t, d] = P(!1), [r, c] = P(!1), [v, h] = P(""), b = a && a(i == null ? void 0 : i.id);
5181
5181
  D(() => {
5182
- u(p);
5183
- }, [p]);
5184
- const [y, f] = P("");
5182
+ u(b);
5183
+ }, [b]);
5184
+ const [f, x] = P("");
5185
5185
  D(() => {
5186
5186
  o(i.id);
5187
5187
  }, [i.id, o]);
5188
- const { url: g, method: m, responseType: x } = i || {}, S = {
5188
+ const { url: g, method: p, responseType: y } = i || {}, S = {
5189
5189
  headers: {
5190
5190
  Authorization: `Bearer ${xi("token")}`
5191
5191
  }
5192
5192
  }, N = $(
5193
- async (k) => {
5194
- var O, ii, z, Z, w, W, I, G, H, R, T;
5195
- if (!(!g || !m)) {
5193
+ async (j) => {
5194
+ var O, ii, z, Z, E, W, I, G, H, R, T;
5195
+ if (!(!g || !p)) {
5196
5196
  d(!0);
5197
5197
  try {
5198
- let E;
5199
- if (m.toLowerCase() === "get") {
5200
- const U = `${g}?value=${k}`;
5201
- E = await Ii.get(U, S);
5202
- } else if (m.toLowerCase() === "post")
5203
- E = await Ii.post(g, { value: k }, S);
5198
+ let w;
5199
+ if (p.toLowerCase() === "get") {
5200
+ const U = `${g}?value=${j}`;
5201
+ w = await Ii.get(U, S);
5202
+ } else if (p.toLowerCase() === "post")
5203
+ w = await Ii.post(g, { value: j }, S);
5204
5204
  else
5205
5205
  throw new Error("Unsupported HTTP method");
5206
- E.status === 200 && ((((ii = (O = E == null ? void 0 : E.data) == null ? void 0 : O.data) == null ? void 0 : ii.status) || ((z = E == null ? void 0 : E.data) == null ? void 0 : z.status)) === !0 ? (c(!0), x === "string" ? h(
5207
- ((w = (Z = E == null ? void 0 : E.data) == null ? void 0 : Z.data) == null ? void 0 : w.description) || ((W = E == null ? void 0 : E.data) == null ? void 0 : W.description) || "Validation successful"
5208
- ) : f(
5209
- ((G = (I = E == null ? void 0 : E.data) == null ? void 0 : I.data) == null ? void 0 : G.description) || ((H = E == null ? void 0 : E.data) == null ? void 0 : H.description) || {}
5210
- )) : (console.error("Invalid input:", k), h("Unable to validate input"), c(!1)));
5211
- } catch (E) {
5212
- console.error("Error validating input:", E), h(
5213
- ((T = (R = E == null ? void 0 : E.response) == null ? void 0 : R.data) == null ? void 0 : T.message) || "Unable to validate input"
5206
+ w.status === 200 && ((((ii = (O = w == null ? void 0 : w.data) == null ? void 0 : O.data) == null ? void 0 : ii.status) || ((z = w == null ? void 0 : w.data) == null ? void 0 : z.status)) === !0 ? (c(!0), y === "string" ? h(
5207
+ ((E = (Z = w == null ? void 0 : w.data) == null ? void 0 : Z.data) == null ? void 0 : E.description) || ((W = w == null ? void 0 : w.data) == null ? void 0 : W.description) || "Validation successful"
5208
+ ) : x(
5209
+ ((G = (I = w == null ? void 0 : w.data) == null ? void 0 : I.data) == null ? void 0 : G.description) || ((H = w == null ? void 0 : w.data) == null ? void 0 : H.description) || {}
5210
+ )) : (console.error("Invalid input:", j), h("Unable to validate input"), c(!1)));
5211
+ } catch (w) {
5212
+ console.error("Error validating input:", w), h(
5213
+ ((T = (R = w == null ? void 0 : w.response) == null ? void 0 : R.data) == null ? void 0 : T.message) || "Unable to validate input"
5214
5214
  ), c(!1);
5215
5215
  } finally {
5216
5216
  d(!1);
5217
5217
  }
5218
5218
  }
5219
5219
  },
5220
- [m, x, g]
5220
+ [p, y, g]
5221
5221
  );
5222
5222
  return D(() => {
5223
5223
  if (l) {
5224
- const k = setTimeout(() => {
5224
+ const j = setTimeout(() => {
5225
5225
  N(l);
5226
5226
  }, 700);
5227
- return () => clearTimeout(k);
5227
+ return () => clearTimeout(j);
5228
5228
  }
5229
5229
  }, [N, l]), /* @__PURE__ */ n.jsxs("div", { children: [
5230
5230
  /* @__PURE__ */ n.jsxs("div", { className: "relative flex items-center", children: [
@@ -5235,8 +5235,8 @@ function ys({
5235
5235
  type: (i == null ? void 0 : i.inputType) || "text",
5236
5236
  className: q("field-control", i == null ? void 0 : i.customClass),
5237
5237
  ...o(i == null ? void 0 : i.id),
5238
- onChange: (k) => {
5239
- u(k.target.value), s(i == null ? void 0 : i.id, k.target.value);
5238
+ onChange: (j) => {
5239
+ u(j.target.value), s(i == null ? void 0 : i.id, j.target.value);
5240
5240
  },
5241
5241
  disabled: e == null ? void 0 : e.isReadOnly
5242
5242
  }
@@ -5278,20 +5278,20 @@ function ys({
5278
5278
  r && !t && /* @__PURE__ */ n.jsx("span", { className: "block pr-3 text-lg text-green-600", children: /* @__PURE__ */ n.jsx(_, { icon: "gg:check-o" }) })
5279
5279
  ] })
5280
5280
  ] }),
5281
- v && x === "string" && /* @__PURE__ */ n.jsx(
5281
+ v && y === "string" && /* @__PURE__ */ n.jsx(
5282
5282
  "span",
5283
5283
  {
5284
5284
  className: `${r ? "text-green-600" : "text-red-600"} text-sm`,
5285
5285
  children: v
5286
5286
  }
5287
5287
  ),
5288
- x === "object" && /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-2 gap-6 mt-2 text-sm text-gray-600", children: (A = Object.entries(y)) == null ? void 0 : A.map(([k, O]) => /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
5288
+ y === "object" && /* @__PURE__ */ n.jsx("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(([j, O]) => /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
5289
5289
  /* @__PURE__ */ n.jsxs("span", { className: "font-semibold", children: [
5290
- k,
5290
+ j,
5291
5291
  ":"
5292
5292
  ] }),
5293
5293
  fs(O) ? /* @__PURE__ */ n.jsx(xs, { imageUrl: O }) : /* @__PURE__ */ n.jsx("span", { children: String(O) })
5294
- ] }, k)) })
5294
+ ] }, j)) })
5295
5295
  ] });
5296
5296
  }
5297
5297
  function As({
@@ -5351,7 +5351,7 @@ function As({
5351
5351
  className: "border border-gray-100 rounded w-full px-3 py-1 outline-none",
5352
5352
  decimalsLimit: 6,
5353
5353
  value: r.value,
5354
- onValueChange: (p) => u(p, c),
5354
+ onValueChange: (b) => u(b, c),
5355
5355
  disabled: e,
5356
5356
  allowNegativeValue: !1
5357
5357
  }
@@ -5428,11 +5428,11 @@ function Ms({
5428
5428
  const r = (c) => (s == null ? void 0 : s.rowId) === i.id && (s == null ? void 0 : s.field) === c;
5429
5429
  return /* @__PURE__ */ n.jsxs("tr", { children: [
5430
5430
  e.map((c) => {
5431
- var x;
5432
- const v = i[c.field], h = c.editable && !o, p = r(c.field), { isValidating: y, result: f } = t(i.id, c.field);
5431
+ var y;
5432
+ const v = i[c.field], h = c.editable && !o, b = r(c.field), { isValidating: f, result: x } = t(i.id, c.field);
5433
5433
  let g = "border-gray-300";
5434
- c.validate && ((f == null ? void 0 : f.isValid) === !1 ? g = "border-red-500 bg-red-50" : (f == null ? void 0 : f.isValid) === !0 && (g = "border-green-500 bg-green-50"));
5435
- const m = `w-full px-2 py-1 border rounded outline-none ${g}`;
5434
+ c.validate && ((x == null ? void 0 : x.isValid) === !1 ? g = "border-red-500 bg-red-50" : (x == null ? void 0 : x.isValid) === !0 && (g = "border-green-500 bg-green-50"));
5435
+ const p = `w-full px-2 py-1 border rounded outline-none ${g}`;
5436
5436
  return /* @__PURE__ */ n.jsx(
5437
5437
  "td",
5438
5438
  {
@@ -5442,24 +5442,24 @@ function Ms({
5442
5442
  rowId: i.id,
5443
5443
  field: c.field
5444
5444
  }),
5445
- children: h && p ? /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
5445
+ children: h && b ? /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
5446
5446
  c.type === "number" ? /* @__PURE__ */ n.jsx(
5447
5447
  sn,
5448
5448
  {
5449
5449
  value: v,
5450
5450
  decimalsLimit: 6,
5451
5451
  allowNegativeValue: !1,
5452
- className: m,
5453
- onValueChange: (j) => l(j, i.id, c.field),
5452
+ className: p,
5453
+ onValueChange: (C) => l(C, i.id, c.field),
5454
5454
  onBlur: () => {
5455
5455
  a(null), u(v, i.id, c.field, c);
5456
5456
  },
5457
5457
  autoFocus: !0
5458
5458
  }
5459
- ) : c.type === "checkbox" ? /* @__PURE__ */ n.jsx("div", { className: "flex items-center gap-x-4", children: ["yes", "no"].map((j) => {
5460
- const S = j === "yes", N = `radio-${i.id}-${String(
5459
+ ) : c.type === "checkbox" ? /* @__PURE__ */ n.jsx("div", { className: "flex items-center gap-x-4", children: ["yes", "no"].map((C) => {
5460
+ const S = C === "yes", N = `radio-${i.id}-${String(
5461
5461
  c.field
5462
- )}-${j}`;
5462
+ )}-${C}`;
5463
5463
  return /* @__PURE__ */ n.jsxs(
5464
5464
  "label",
5465
5465
  {
@@ -5479,33 +5479,33 @@ function Ms({
5479
5479
  /* @__PURE__ */ n.jsx("span", { className: "text-sm", children: S ? "Yes" : "No" })
5480
5480
  ]
5481
5481
  },
5482
- j
5482
+ C
5483
5483
  );
5484
5484
  }) }) : /* @__PURE__ */ n.jsx(
5485
5485
  "input",
5486
5486
  {
5487
5487
  type: "text",
5488
5488
  value: String(v != null ? v : ""),
5489
- onChange: (j) => l(j.target.value, i.id, c.field),
5489
+ onChange: (C) => l(C.target.value, i.id, c.field),
5490
5490
  onBlur: () => {
5491
5491
  a(null), u(v, i.id, c.field, c);
5492
5492
  },
5493
- className: m,
5493
+ className: p,
5494
5494
  autoFocus: !0
5495
5495
  }
5496
5496
  ),
5497
- y && /* @__PURE__ */ n.jsx("div", { className: "absolute right-1 top-1", children: /* @__PURE__ */ n.jsx("div", { className: "w-4 h-4 border-2 border-blue-500 rounded-full border-t-transparent animate-spin" }) })
5498
- ] }) : c.validate && f ? /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
5497
+ f && /* @__PURE__ */ n.jsx("div", { className: "absolute right-1 top-1", children: /* @__PURE__ */ n.jsx("div", { className: "w-4 h-4 border-2 border-blue-500 rounded-full border-t-transparent animate-spin" }) })
5498
+ ] }) : c.validate && x ? /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
5499
5499
  /* @__PURE__ */ n.jsxs("span", { children: [
5500
5500
  String(v != null ? v : ""),
5501
5501
  " ",
5502
- f.data && `[${f.data}]`
5502
+ x.data && `[${x.data}]`
5503
5503
  ] }),
5504
- f.isValid ? /* @__PURE__ */ n.jsx("span", { className: "text-xs text-green-600", children: "✓" }) : /* @__PURE__ */ n.jsx(
5504
+ x.isValid ? /* @__PURE__ */ n.jsx("span", { className: "text-xs text-green-600", children: "✓" }) : /* @__PURE__ */ n.jsx(
5505
5505
  "span",
5506
5506
  {
5507
5507
  className: "text-xs text-red-600 cursor-help",
5508
- title: (x = f.error) != null ? x : "",
5508
+ title: (y = x.error) != null ? y : "",
5509
5509
  children: "✗"
5510
5510
  }
5511
5511
  )
@@ -5533,45 +5533,32 @@ function Bs({
5533
5533
  isReadOnly: o = !1,
5534
5534
  columns: s
5535
5535
  }) {
5536
- const [a, l] = P(i), [u, t] = P(null), d = Ci(null), [r, c] = P(0);
5536
+ const [a, l] = P(i), [u, t] = P(null), d = Ci(null);
5537
5537
  D(() => {
5538
- const f = document.getElementById("form");
5539
- if (!f) return;
5540
- const g = (x) => {
5541
- const j = x.getBoundingClientRect().width;
5542
- c(j ? j - 48 : 0);
5543
- };
5544
- g(f);
5545
- const m = new ResizeObserver((x) => {
5546
- for (const j of x)
5547
- g(j.target);
5548
- });
5549
- return m.observe(f), () => m.disconnect();
5550
- }, []), D(() => {
5551
- l((f) => JSON.stringify(f) !== JSON.stringify(i) ? i : f);
5538
+ l((b) => JSON.stringify(b) !== JSON.stringify(i) ? i : b);
5552
5539
  }, [i]), D(() => {
5553
5540
  e == null || e(a);
5554
5541
  }, [a, e]), D(() => {
5555
- const f = (g) => {
5556
- d.current && !d.current.contains(g.target) && t(null);
5542
+ const b = (f) => {
5543
+ d.current && !d.current.contains(f.target) && t(null);
5557
5544
  };
5558
- return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
5545
+ return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
5559
5546
  }, []);
5560
- const v = $(
5561
- (f, g, m) => {
5547
+ const r = $(
5548
+ (b, f, x) => {
5562
5549
  l(
5563
- (x) => x.map(
5564
- (j) => j.id === g ? { ...j, [m]: f } : j
5550
+ (g) => g.map(
5551
+ (p) => p.id === f ? { ...p, [x]: b } : p
5565
5552
  )
5566
5553
  );
5567
5554
  },
5568
5555
  []
5569
- ), h = $(() => {
5570
- const f = Ai(), g = s.reduce((m, x) => (m[x.field] = x.field === "id" ? f : "", m), {});
5571
- l((m) => [...m, { id: f, ...g }]);
5572
- }, [s]), p = $((f) => {
5573
- l((g) => g.filter((m) => m.id !== f));
5574
- }, []), y = $(
5556
+ ), c = $(() => {
5557
+ const b = Ai(), f = s.reduce((x, g) => (x[g.field] = g.field === "id" ? b : "", x), {});
5558
+ l((x) => [...x, { id: b, ...f }]);
5559
+ }, [s]), v = $((b) => {
5560
+ l((f) => f.filter((x) => x.id !== b));
5561
+ }, []), h = $(
5575
5562
  () => ({
5576
5563
  isValidating: !1,
5577
5564
  result: void 0
@@ -5582,64 +5569,57 @@ function Bs({
5582
5569
  /* @__PURE__ */ n.jsx("div", { className: "flex justify-end", children: !o && /* @__PURE__ */ n.jsx(
5583
5570
  "button",
5584
5571
  {
5585
- onClick: h,
5572
+ onClick: c,
5586
5573
  type: "button",
5587
5574
  className: "px-2 py-1 mb-3 text-xs text-white bg-gray-600 rounded hover:bg-gray-700",
5588
5575
  children: "Add Row"
5589
5576
  }
5590
5577
  ) }),
5591
- /* @__PURE__ */ n.jsx(
5592
- "div",
5593
- {
5594
- className: "w-full max-w-full overflow-x-auto",
5595
- style: { maxWidth: `${r}px` },
5596
- children: /* @__PURE__ */ n.jsxs("table", { className: "min-w-max w-full text-sm border-collapse rounded table-auto bg-gray-50", children: [
5597
- /* @__PURE__ */ n.jsx("thead", { children: /* @__PURE__ */ n.jsxs("tr", { className: "bg-gray-100", children: [
5598
- s.map((f, g) => {
5599
- var m;
5600
- return /* @__PURE__ */ n.jsxs(
5601
- "th",
5602
- {
5603
- className: "px-3 py-2 text-xs font-semibold text-left text-gray-600 border whitespace-nowrap",
5604
- children: [
5605
- (m = f.headerName) != null ? m : String(f.field),
5606
- f.validate && /* @__PURE__ */ n.jsx("span", { className: "ml-1 text-blue-600", children: "*" })
5607
- ]
5608
- },
5609
- `${String(f.id)}-${g}`
5610
- );
5611
- }),
5612
- !o && /* @__PURE__ */ n.jsx("th", { className: "w-10 px-2 py-2 border" })
5613
- ] }) }),
5614
- /* @__PURE__ */ n.jsx("tbody", { children: a.length > 0 ? a.map((f) => /* @__PURE__ */ n.jsx(
5615
- Ts,
5578
+ /* @__PURE__ */ n.jsx("div", { className: "w-full max-w-full overflow-x-auto border rounded-lg", children: /* @__PURE__ */ n.jsxs("table", { className: "min-w-max w-full text-sm border-collapse rounded table-auto bg-gray-50", children: [
5579
+ /* @__PURE__ */ n.jsx("thead", { children: /* @__PURE__ */ n.jsxs("tr", { className: "bg-gray-100", children: [
5580
+ s.map((b, f) => {
5581
+ var x;
5582
+ return /* @__PURE__ */ n.jsxs(
5583
+ "th",
5616
5584
  {
5617
- row: f,
5618
- columns: s,
5619
- isReadOnly: o,
5620
- editingCell: u,
5621
- setEditingCell: t,
5622
- handleCellChange: v,
5623
- debouncedValidate: () => {
5624
- },
5625
- getValidationStatus: y,
5626
- deleteRow: p
5585
+ className: "px-3 py-2 text-xs font-semibold text-left text-gray-600 border whitespace-nowrap",
5586
+ children: [
5587
+ (x = b.headerName) != null ? x : String(b.field),
5588
+ b.validate && /* @__PURE__ */ n.jsx("span", { className: "ml-1 text-blue-600", children: "*" })
5589
+ ]
5627
5590
  },
5628
- f.id
5629
- )) : /* @__PURE__ */ n.jsx("tr", { children: /* @__PURE__ */ n.jsx(
5630
- "td",
5631
- {
5632
- colSpan: s.length + (o ? 0 : 1),
5633
- className: "p-2 text-xs text-center text-gray-400",
5634
- children: "No data available"
5635
- }
5636
- ) }) })
5637
- ] })
5638
- }
5639
- )
5591
+ `${String(b.id)}-${f}`
5592
+ );
5593
+ }),
5594
+ !o && /* @__PURE__ */ n.jsx("th", { className: "w-10 px-2 py-2 border" })
5595
+ ] }) }),
5596
+ /* @__PURE__ */ n.jsx("tbody", { children: a.length > 0 ? a.map((b) => /* @__PURE__ */ n.jsx(
5597
+ Ts,
5598
+ {
5599
+ row: b,
5600
+ columns: s,
5601
+ isReadOnly: o,
5602
+ editingCell: u,
5603
+ setEditingCell: t,
5604
+ handleCellChange: r,
5605
+ debouncedValidate: () => {
5606
+ },
5607
+ getValidationStatus: h,
5608
+ deleteRow: v
5609
+ },
5610
+ b.id
5611
+ )) : /* @__PURE__ */ n.jsx("tr", { children: /* @__PURE__ */ n.jsx(
5612
+ "td",
5613
+ {
5614
+ colSpan: s.length + (o ? 0 : 1),
5615
+ className: "p-2 text-xs text-center text-gray-400",
5616
+ children: "No data available"
5617
+ }
5618
+ ) }) })
5619
+ ] }) })
5640
5620
  ] });
5641
5621
  }
5642
- function Es({
5622
+ function ws({
5643
5623
  element: i,
5644
5624
  validationData: e
5645
5625
  }) {
@@ -5682,40 +5662,40 @@ const ge = ({
5682
5662
  isMultiple: c = !1,
5683
5663
  isFloatingLabel: v = !1,
5684
5664
  subText: h,
5685
- labelClass: p = "",
5686
- loading: y,
5687
- disabled: f
5665
+ labelClass: b = "",
5666
+ loading: f,
5667
+ disabled: x
5688
5668
  }) => {
5689
- const [g, m] = P(c ? [] : null), x = q("custom-select__control", i), j = oi(() => e, [e]);
5669
+ const [g, p] = P(c ? [] : null), y = q("custom-select__control", i), C = oi(() => e, [e]);
5690
5670
  return D(() => {
5691
5671
  const S = e == null ? void 0 : e.find((N) => {
5692
5672
  var A;
5693
5673
  return typeof N.value == "string" && typeof d == "string" ? N.value.toLowerCase() === d.toLowerCase() : typeof N.value == "object" && typeof d == "object" ? ((A = N.value) == null ? void 0 : A.id) === (d == null ? void 0 : d.id) : N.value === d;
5694
5674
  });
5695
- m(S || null);
5675
+ p(S || null);
5696
5676
  }, [d, e]), D(() => {
5697
5677
  g && l && a && (l(u, g == null ? void 0 : g.value), a(u), r == null || r(u));
5698
5678
  }, [u, g]), /* @__PURE__ */ n.jsxs("div", { className: "custom-select", children: [
5699
5679
  t && !v && /* @__PURE__ */ n.jsx("label", { className: "custom-select__label", children: t }),
5700
- v && t && /* @__PURE__ */ n.jsx("label", { className: q("custom-select__floating-label", p), children: t }),
5680
+ v && t && /* @__PURE__ */ n.jsx("label", { className: q("custom-select__floating-label", b), children: t }),
5701
5681
  /* @__PURE__ */ n.jsx(
5702
5682
  di,
5703
5683
  {
5704
5684
  value: g,
5705
- onChange: m,
5685
+ onChange: p,
5706
5686
  multiple: c,
5707
- disabled: f,
5687
+ disabled: x,
5708
5688
  children: /* @__PURE__ */ n.jsxs("div", { className: "custom-select__wrapper", children: [
5709
- /* @__PURE__ */ n.jsxs(di.Button, { className: x, disabled: f, children: [
5710
- y ? /* @__PURE__ */ n.jsx("span", { className: "custom-select__loading", children: "Fetching data..." }) : /* @__PURE__ */ n.jsx("span", { className: "custom-select__value", children: (g == null ? void 0 : g.label) || /* @__PURE__ */ n.jsx("span", { className: "custom-select__placeholder", children: o }) }),
5689
+ /* @__PURE__ */ n.jsxs(di.Button, { className: y, disabled: x, children: [
5690
+ f ? /* @__PURE__ */ n.jsx("span", { className: "custom-select__loading", children: "Fetching data..." }) : /* @__PURE__ */ n.jsx("span", { className: "custom-select__value", children: (g == null ? void 0 : g.label) || /* @__PURE__ */ n.jsx("span", { className: "custom-select__placeholder", children: o }) }),
5711
5691
  /* @__PURE__ */ n.jsx("span", { className: "custom-select__icon", children: /* @__PURE__ */ n.jsx(_, { icon: "lucide:chevron-down" }) })
5712
5692
  ] }),
5713
5693
  /* @__PURE__ */ n.jsx(
5714
- wi,
5694
+ Ei,
5715
5695
  {
5716
5696
  as: mi.Fragment,
5717
5697
  leave: "custom-select__transition",
5718
- children: /* @__PURE__ */ n.jsx(di.Options, { className: "custom-select__options", anchor: "bottom", children: j == null ? void 0 : j.map((S, N) => /* @__PURE__ */ n.jsx(
5698
+ children: /* @__PURE__ */ n.jsx(di.Options, { className: "custom-select__options", anchor: "bottom", children: C == null ? void 0 : C.map((S, N) => /* @__PURE__ */ n.jsx(
5719
5699
  di.Option,
5720
5700
  {
5721
5701
  value: S,
@@ -5744,36 +5724,36 @@ const ge = ({
5744
5724
  h && !s && /* @__PURE__ */ n.jsx("p", { className: "custom-select__subtext", children: h }),
5745
5725
  s && /* @__PURE__ */ n.jsx("span", { className: "custom-select__error", children: s.message })
5746
5726
  ] });
5747
- }, ws = ({
5727
+ }, Es = ({
5748
5728
  element: i,
5749
5729
  validationData: e
5750
5730
  }) => {
5751
- var f;
5731
+ var x;
5752
5732
  const {
5753
5733
  register: o = () => ({}),
5754
5734
  trigger: s,
5755
5735
  setValue: a,
5756
5736
  watch: l,
5757
5737
  isReadOnly: u
5758
- } = e || {}, t = (f = i == null ? void 0 : i.id) != null ? f : "cascadeValue", [d, r] = P(""), [c, v] = P(""), h = (g, m) => {
5759
- const x = g && m ? `${g}_${m}` : "";
5760
- a == null || a(t, x), s == null || s(t);
5761
- }, p = (g, m) => {
5762
- g === "first" ? (r(m), v(""), h(m, "")) : (v(m), h(d, m));
5738
+ } = e || {}, t = (x = i == null ? void 0 : i.id) != null ? x : "cascadeValue", [d, r] = P(""), [c, v] = P(""), h = (g, p) => {
5739
+ const y = g && p ? `${g}_${p}` : "";
5740
+ a == null || a(t, y), s == null || s(t);
5741
+ }, b = (g, p) => {
5742
+ g === "first" ? (r(p), v(""), h(p, "")) : (v(p), h(d, p));
5763
5743
  };
5764
5744
  D(() => {
5765
5745
  if (l) {
5766
5746
  const g = l(t);
5767
5747
  if (g != null && g.includes("_")) {
5768
- const [m, x] = g.split("_");
5769
- r(m), v(x);
5748
+ const [p, y] = g.split("_");
5749
+ r(p), v(y);
5770
5750
  }
5771
5751
  }
5772
5752
  }, [l, t]);
5773
- const y = oi(
5753
+ const f = oi(
5774
5754
  () => {
5775
5755
  var g;
5776
- return (g = i.options1) == null ? void 0 : g.filter((m) => m.key === d);
5756
+ return (g = i.options1) == null ? void 0 : g.filter((p) => p.key === d);
5777
5757
  },
5778
5758
  [i.options1, d]
5779
5759
  );
@@ -5782,7 +5762,7 @@ const ge = ({
5782
5762
  /* @__PURE__ */ n.jsx("div", { className: "relative", children: /* @__PURE__ */ n.jsx(
5783
5763
  ge,
5784
5764
  {
5785
- setValue: (g, m) => p("first", m),
5765
+ setValue: (g, p) => b("first", p),
5786
5766
  options: i.options,
5787
5767
  name: `${t}`,
5788
5768
  register: o,
@@ -5794,8 +5774,8 @@ const ge = ({
5794
5774
  /* @__PURE__ */ n.jsx(
5795
5775
  ge,
5796
5776
  {
5797
- setValue: (g, m) => p("second", m),
5798
- options: y,
5777
+ setValue: (g, p) => b("second", p),
5778
+ options: f,
5799
5779
  name: `${t}`,
5800
5780
  register: o,
5801
5781
  value: c
@@ -5813,27 +5793,27 @@ const ge = ({
5813
5793
  element: u,
5814
5794
  validationData: t
5815
5795
  }) => {
5816
- var m;
5796
+ var p;
5817
5797
  const {
5818
5798
  register: d = () => ({}),
5819
5799
  trigger: r,
5820
5800
  setValue: c,
5821
5801
  watch: v,
5822
5802
  isReadOnly: h
5823
- } = t || {}, p = (m = v == null ? void 0 : v(u.id)) != null ? m : 0, [y, f] = P(null);
5803
+ } = t || {}, b = (p = v == null ? void 0 : v(u.id)) != null ? p : 0, [f, x] = P(null);
5824
5804
  D(() => {
5825
- p == null && (c == null || c(u.id, i));
5805
+ b == null && (c == null || c(u.id, i));
5826
5806
  }, []);
5827
- const g = (x) => {
5807
+ const g = (y) => {
5828
5808
  if (!o && !h) {
5829
- const j = x + 1;
5830
- c == null || c(u.id, j), r == null || r(u.id), s == null || s(j);
5809
+ const C = y + 1;
5810
+ c == null || c(u.id, C), r == null || r(u.id), s == null || s(C);
5831
5811
  }
5832
5812
  };
5833
5813
  return /* @__PURE__ */ n.jsxs("div", { className: `flex gap-1 ${l}`, children: [
5834
5814
  /* @__PURE__ */ n.jsx("input", { type: "hidden", ...d(u.id) }),
5835
- Array.from({ length: e }, (x, j) => {
5836
- const S = y !== null ? j <= y : j < p;
5815
+ Array.from({ length: e }, (y, C) => {
5816
+ const S = f !== null ? C <= f : C < b;
5837
5817
  return /* @__PURE__ */ n.jsx(
5838
5818
  Oe,
5839
5819
  {
@@ -5841,11 +5821,11 @@ const ge = ({
5841
5821
  className: `cursor-pointer transition-colors ${S ? "text-yellow-400" : "text-gray-300"}`,
5842
5822
  width: a,
5843
5823
  height: a,
5844
- onMouseEnter: () => !(o || h) && f(j),
5845
- onMouseLeave: () => !(o || h) && f(null),
5846
- onClick: () => g(j)
5824
+ onMouseEnter: () => !(o || h) && x(C),
5825
+ onMouseLeave: () => !(o || h) && x(null),
5826
+ onClick: () => g(C)
5847
5827
  },
5848
- j
5828
+ C
5849
5829
  );
5850
5830
  })
5851
5831
  ] });
@@ -5861,24 +5841,24 @@ function fe({
5861
5841
  isReadOnly: l,
5862
5842
  watch: u
5863
5843
  } = e || {}, t = (u == null ? void 0 : u(i.id)) || "", { country: d, state: r } = oi(() => {
5864
- var y;
5844
+ var f;
5865
5845
  if (typeof t == "string" && t.includes(",")) {
5866
- const [f, g] = (y = t.split(",")) == null ? void 0 : y.map((m) => m.trim());
5867
- return { country: g, state: f };
5846
+ const [x, g] = (f = t.split(",")) == null ? void 0 : f.map((p) => p.trim());
5847
+ return { country: g, state: x };
5868
5848
  }
5869
5849
  return { country: t, state: "" };
5870
5850
  }, [t]), c = Ci(t), v = oi(() => {
5871
- var y, f;
5872
- return d ? ((f = (y = Xi.find((g) => g.name === d)) == null ? void 0 : y.states) == null ? void 0 : f.map((g) => ({
5851
+ var f, x;
5852
+ return d ? ((x = (f = Xi.find((g) => g.name === d)) == null ? void 0 : f.states) == null ? void 0 : x.map((g) => ({
5873
5853
  label: g.name,
5874
5854
  value: g.name
5875
5855
  }))) || [] : [];
5876
- }, [d]), h = (y, f) => {
5877
- const m = (f == null ? void 0 : f.value) || "";
5878
- s && m !== c.current && (s(i.id, m), a == null || a(i.id), c.current = m);
5879
- }, p = (y, f) => {
5880
- const g = (f == null ? void 0 : f.value) || "", m = g ? `${g}, ${d}` : d;
5881
- s && m !== c.current && (s(i.id, m), a == null || a(i.id), c.current = m);
5856
+ }, [d]), h = (f, x) => {
5857
+ const p = (x == null ? void 0 : x.value) || "";
5858
+ s && p !== c.current && (s(i.id, p), a == null || a(i.id), c.current = p);
5859
+ }, b = (f, x) => {
5860
+ const g = (x == null ? void 0 : x.value) || "", p = g ? `${g}, ${d}` : d;
5861
+ s && p !== c.current && (s(i.id, p), a == null || a(i.id), c.current = p);
5882
5862
  };
5883
5863
  return D(() => {
5884
5864
  c.current = t;
@@ -5901,7 +5881,7 @@ function fe({
5901
5881
  Tn,
5902
5882
  {
5903
5883
  options: v,
5904
- onGetValue: p,
5884
+ onGetValue: b,
5905
5885
  name: `${i.id}-state`,
5906
5886
  readOnly: l,
5907
5887
  defaultValue: r
@@ -5916,7 +5896,7 @@ function Ps({
5916
5896
  validationData: e
5917
5897
  }) {
5918
5898
  const { register: o = () => ({}), isReadOnly: s } = e || {}, { validationUrl: a, documentObj: l, signatureLink: u } = i, t = oi(() => xi("config"), []), [d, r] = P(!1), [c, v] = P(!1), h = $(async () => {
5919
- var p, y;
5899
+ var b, f;
5920
5900
  if (!(!a || !l))
5921
5901
  try {
5922
5902
  v(!0);
@@ -5924,25 +5904,25 @@ function Ps({
5924
5904
  headers: {
5925
5905
  Authorization: `Bearer ${xi("token")}`
5926
5906
  }
5927
- }, { data: m } = await Ii.get(
5907
+ }, { data: p } = await Ii.get(
5928
5908
  `${a}/${l}`,
5929
5909
  g
5930
- ), x = !!((y = (p = m == null ? void 0 : m.data) == null ? void 0 : p.isSigned) != null ? y : m != null && m.isSigned);
5931
- return r(x), x;
5932
- } catch (f) {
5933
- console.error("Failed to check sign status", f);
5910
+ ), y = !!((f = (b = p == null ? void 0 : p.data) == null ? void 0 : b.isSigned) != null ? f : p != null && p.isSigned);
5911
+ return r(y), y;
5912
+ } catch (x) {
5913
+ console.error("Failed to check sign status", x);
5934
5914
  } finally {
5935
5915
  v(!1);
5936
5916
  }
5937
5917
  }, [a, l]);
5938
5918
  return D(() => {
5939
- let p = null;
5919
+ let b = null;
5940
5920
  return !d && l && a && (async () => {
5941
- await h() || (p = setInterval(async () => {
5942
- await h() && p && clearInterval(p);
5921
+ await h() || (b = setInterval(async () => {
5922
+ await h() && b && clearInterval(b);
5943
5923
  }, 2e3));
5944
5924
  })(), () => {
5945
- p && clearInterval(p);
5925
+ b && clearInterval(b);
5946
5926
  };
5947
5927
  }, [h, d, l, a]), /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
5948
5928
  /* @__PURE__ */ n.jsx(
@@ -6240,41 +6220,41 @@ function Rs({
6240
6220
  horizontal: c,
6241
6221
  description: v,
6242
6222
  validate: h,
6243
- onChange: p,
6244
- onError: y
6223
+ onChange: b,
6224
+ onError: f
6245
6225
  }) {
6246
- const [f, g] = P(""), [m, x] = P(null), [j, S] = P(""), N = oi(
6226
+ const [x, g] = P(""), [p, y] = P(null), [C, S] = P(""), N = oi(
6247
6227
  () => {
6248
- var w;
6249
- return (w = fn == null ? void 0 : fn.slice().sort((W, I) => W.label.localeCompare(I.label))) == null ? void 0 : w.map((W) => ({ ...W, phone: `+${W.phone}` }));
6228
+ var E;
6229
+ return (E = fn == null ? void 0 : fn.slice().sort((W, I) => W.label.localeCompare(I.label))) == null ? void 0 : E.map((W) => ({ ...W, phone: `+${W.phone}` }));
6250
6230
  },
6251
6231
  []
6252
- ), A = oi(() => f ? N.filter(
6253
- (w) => `${w.label} ${w.phone}`.toLowerCase().includes(f.toLowerCase())
6254
- ) : N, [f, N]), k = (m == null ? void 0 : m.min) || 10, O = (m == null ? void 0 : m.max) || 10, ii = () => j ? `${(m == null ? void 0 : m.phone) || "+234"}-${j}` : "", z = (w) => {
6255
- if (!w) return { code: "+234", number: "" };
6256
- const W = w.split(/[-\s]/);
6232
+ ), A = oi(() => x ? N.filter(
6233
+ (E) => `${E.label} ${E.phone}`.toLowerCase().includes(x.toLowerCase())
6234
+ ) : N, [x, N]), j = (p == null ? void 0 : p.min) || 10, O = (p == null ? void 0 : p.max) || 10, ii = () => C ? `${(p == null ? void 0 : p.phone) || "+234"}-${C}` : "", z = (E) => {
6235
+ if (!E) return { code: "+234", number: "" };
6236
+ const W = E.split(/[-\s]/);
6257
6237
  return { code: W[0], number: W.slice(1).join(" ") };
6258
6238
  };
6259
6239
  D(() => {
6260
6240
  if (u) {
6261
- const w = z(u);
6262
- x(
6263
- N.find((W) => W.phone === w.code) || N[0]
6264
- ), S(w.number);
6241
+ const E = z(u);
6242
+ y(
6243
+ N.find((W) => W.phone === E.code) || N[0]
6244
+ ), S(E.number);
6265
6245
  }
6266
6246
  }, [u, N]);
6267
6247
  const Z = oi(() => {
6268
6248
  if (t) return t;
6269
- const w = j.length;
6270
- return s && w === 0 ? "Phone number is required" : w > 0 && !/^\d+$/.test(j) ? "Phone number must contain only digits" : w > 0 && w < k ? `Minimum length is ${k}` : w > O ? `Maximum length is ${O}` : "";
6271
- }, [t, j, k, O, s]);
6249
+ const E = C.length;
6250
+ return s && E === 0 ? "Phone number is required" : E > 0 && !/^\d+$/.test(C) ? "Phone number must contain only digits" : E > 0 && E < j ? `Minimum length is ${j}` : E > O ? `Maximum length is ${O}` : "";
6251
+ }, [t, C, j, O, s]);
6272
6252
  return D(() => {
6273
- p == null || p(ii()), y == null || y(Z || null);
6274
- }, [j, m, Z]), /* @__PURE__ */ n.jsxs(
6253
+ b == null || b(ii()), f == null || f(Z || null);
6254
+ }, [C, p, Z]), /* @__PURE__ */ n.jsxs(
6275
6255
  "div",
6276
6256
  {
6277
- className: `relative formGroup ${Z && !r ? "has-error" : ""} ${c ? "flex" : ""} ${!Z && j.length > 0 && !r ? "is-valid" : ""}`,
6257
+ className: `relative formGroup ${Z && !r ? "has-error" : ""} ${c ? "flex" : ""} ${!Z && C.length > 0 && !r ? "is-valid" : ""}`,
6278
6258
  children: [
6279
6259
  i && /* @__PURE__ */ n.jsxs(
6280
6260
  "label",
@@ -6291,29 +6271,29 @@ function Rs({
6291
6271
  ),
6292
6272
  /* @__PURE__ */ n.jsxs("div", { className: "relative !flex items-center input-control text-[#667085] !py-0 field-control", children: [
6293
6273
  /* @__PURE__ */ n.jsx(_, { icon: "lucide:phone-call" }),
6294
- /* @__PURE__ */ n.jsx(Ri, { value: m, onChange: x, children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
6274
+ /* @__PURE__ */ n.jsx(Ri, { value: p, onChange: y, children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
6295
6275
  /* @__PURE__ */ n.jsx(
6296
6276
  Ri.Input,
6297
6277
  {
6298
6278
  className: "pl-3 pr-4 mr-1 text-sm bg-white py-[10px] outline-none whitespace-nowrap max-w-[70px]",
6299
- displayValue: (w) => (w == null ? void 0 : w.phone) || "+234",
6279
+ displayValue: (E) => (E == null ? void 0 : E.phone) || "+234",
6300
6280
  placeholder: "+234",
6301
- onChange: (w) => g(w.target.value)
6281
+ onChange: (E) => g(E.target.value)
6302
6282
  }
6303
6283
  ),
6304
6284
  /* @__PURE__ */ n.jsx(Ri.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ n.jsx(_, { icon: "lucide:chevron-down" }) }),
6305
- /* @__PURE__ */ n.jsx(Ri.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, W) => /* @__PURE__ */ n.jsxs(
6285
+ /* @__PURE__ */ n.jsx(Ri.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((E, W) => /* @__PURE__ */ n.jsxs(
6306
6286
  Ri.Option,
6307
6287
  {
6308
- value: w,
6288
+ value: E,
6309
6289
  className: "px-4 py-2 cursor-pointer hover:bg-gray-100",
6310
6290
  children: [
6311
- w.phone,
6291
+ E.phone,
6312
6292
  " - ",
6313
- w.label
6293
+ E.label
6314
6294
  ]
6315
6295
  },
6316
- `${w.code}+ ${W}`
6296
+ `${E.code}+ ${W}`
6317
6297
  )) })
6318
6298
  ] }) }),
6319
6299
  /* @__PURE__ */ n.jsxs("div", { className: "relative flex items-center flex-1 z-[1]", children: [
@@ -6322,20 +6302,20 @@ function Rs({
6322
6302
  {
6323
6303
  type: "tel",
6324
6304
  inputMode: "numeric",
6325
- value: j,
6305
+ value: C,
6326
6306
  disabled: d,
6327
6307
  readOnly: r,
6328
- onChange: (w) => {
6329
- const W = w.target.value.replace(/\D/g, "");
6308
+ onChange: (E) => {
6309
+ const W = E.target.value.replace(/\D/g, "");
6330
6310
  S(W);
6331
6311
  },
6332
6312
  placeholder: e,
6333
6313
  className: "w-full px-3 outline-none",
6334
6314
  maxLength: O,
6335
- minLength: k
6315
+ minLength: j
6336
6316
  }
6337
6317
  ),
6338
- /* @__PURE__ */ n.jsx("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !Z && j.length > 0 && !r && /* @__PURE__ */ n.jsx("span", { className: "text-green-500", children: /* @__PURE__ */ n.jsx(_, { icon: "bi:check-lg" }) }) })
6318
+ /* @__PURE__ */ n.jsx("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !Z && C.length > 0 && !r && /* @__PURE__ */ n.jsx("span", { className: "text-green-500", children: /* @__PURE__ */ n.jsx(_, { icon: "bi:check-lg" }) }) })
6339
6319
  ] })
6340
6320
  ] }),
6341
6321
  v && /* @__PURE__ */ n.jsx("span", { className: "block text-[#475467] font-light leading-4 text-xs mt-2", children: v })
@@ -6433,13 +6413,13 @@ const He = {
6433
6413
  multiSelect: Rn,
6434
6414
  numberField: bn,
6435
6415
  amountField: gs,
6436
- date: Eo,
6416
+ date: wo,
6437
6417
  password: Ka,
6438
6418
  checkbox: Va,
6439
6419
  radio: Ga,
6440
6420
  email: bn,
6441
6421
  file: Oa,
6442
- dataGrid: Es,
6422
+ dataGrid: ws,
6443
6423
  section: Ha,
6444
6424
  validateInput: ys,
6445
6425
  tableInput: Ss,
@@ -6448,7 +6428,7 @@ const He = {
6448
6428
  header: ks,
6449
6429
  basicText: Cs,
6450
6430
  phoneField: Ds,
6451
- cascadeSelect: ws,
6431
+ cascadeSelect: Es,
6452
6432
  rating: Ls,
6453
6433
  country: fe,
6454
6434
  bank: fe,
@@ -6470,7 +6450,7 @@ const He = {
6470
6450
  }, On = ({ col: i, children: e, customClass: o }) => /* @__PURE__ */ n.jsx(
6471
6451
  "div",
6472
6452
  {
6473
- className: q("w-full bg-white", o),
6453
+ className: q("w-full bg-white min-w-0", o),
6474
6454
  style: { gridColumn: i },
6475
6455
  children: e
6476
6456
  }
@@ -6492,37 +6472,37 @@ const He = {
6492
6472
  } = ji(gi), h = oi(
6493
6473
  () => Array.from({ length: i.columns }),
6494
6474
  [i.columns]
6495
- ), [p, y] = P(null);
6475
+ ), [b, f] = P(null);
6496
6476
  D(() => {
6497
6477
  const S = () => {
6498
- y(null), d(!1);
6478
+ f(null), d(!1);
6499
6479
  };
6500
6480
  return document.addEventListener("dragend", S), () => document.removeEventListener("dragend", S);
6501
6481
  }, [d]);
6502
- const f = $(
6482
+ const x = $(
6503
6483
  (S, N) => {
6504
- S.preventDefault(), S.stopPropagation(), S.dataTransfer.dropEffect = "move", y(N);
6484
+ S.preventDefault(), S.stopPropagation(), S.dataTransfer.dropEffect = "move", f(N);
6505
6485
  },
6506
6486
  []
6507
6487
  ), g = $(
6508
6488
  (S, N) => {
6509
- S.preventDefault(), S.stopPropagation(), y(N);
6489
+ S.preventDefault(), S.stopPropagation(), f(N);
6510
6490
  },
6511
6491
  []
6512
- ), m = $(
6492
+ ), p = $(
6513
6493
  (S, N) => {
6514
6494
  const A = S.relatedTarget;
6515
- A && S.currentTarget.contains(A) || y((k) => k === N ? null : k);
6495
+ A && S.currentTarget.contains(A) || f((j) => j === N ? null : j);
6516
6496
  },
6517
6497
  []
6518
- ), x = $(
6498
+ ), y = $(
6519
6499
  (S, N) => {
6520
6500
  var O;
6521
- S.preventDefault(), S.stopPropagation(), d(!1), y(null);
6522
- const A = N + 1, k = S.dataTransfer.getData("elementId");
6523
- if (k) {
6501
+ S.preventDefault(), S.stopPropagation(), d(!1), f(null);
6502
+ const A = N + 1, j = S.dataTransfer.getData("elementId");
6503
+ if (j) {
6524
6504
  r({
6525
- draggedId: k,
6505
+ draggedId: j,
6526
6506
  sectionId: e,
6527
6507
  targetGridId: i.id,
6528
6508
  targetCol: A
@@ -6534,13 +6514,13 @@ const He = {
6534
6514
  if (!ii) return;
6535
6515
  const z = JSON.parse(ii);
6536
6516
  if ((z == null ? void 0 : z.type) === "grid") return;
6537
- const Z = u.find((I) => I.id === e), w = (O = Z == null ? void 0 : Z.questionData) == null ? void 0 : O.find(
6517
+ const Z = u.find((I) => I.id === e), E = (O = Z == null ? void 0 : Z.questionData) == null ? void 0 : O.find(
6538
6518
  (I) => {
6539
6519
  var G;
6540
6520
  return I.gridId === i.id && ((G = I.gridPosition) == null ? void 0 : G.col) === A;
6541
6521
  }
6542
6522
  );
6543
- w && v(w.id, e);
6523
+ E && v(E.id, e);
6544
6524
  const W = {
6545
6525
  ...z,
6546
6526
  id: Ai(),
@@ -6554,59 +6534,59 @@ const He = {
6554
6534
  }
6555
6535
  },
6556
6536
  [t, i.id, u, e, d, r]
6557
- ), j = (S, N, A) => {
6537
+ ), C = (S, N, A) => {
6558
6538
  var G, H, R;
6559
- const k = S + 1, O = (H = (G = u.find((T) => T.id === e)) == null ? void 0 : G.questionData) == null ? void 0 : H.find(
6539
+ const j = S + 1, O = (H = (G = u.find((T) => T.id === e)) == null ? void 0 : G.questionData) == null ? void 0 : H.find(
6560
6540
  (T) => {
6561
- var E;
6562
- return T.gridId === i.id && ((E = T.gridPosition) == null ? void 0 : E.col) === k;
6541
+ var w;
6542
+ return T.gridId === i.id && ((w = T.gridPosition) == null ? void 0 : w.col) === j;
6563
6543
  }
6564
6544
  ), ii = (R = O == null ? void 0 : O.id) != null ? R : null, z = Array.isArray(o) && o.find((T) => {
6565
- var E;
6566
- return ((E = T == null ? void 0 : T.props) == null ? void 0 : E.col) === k;
6567
- }), Z = c && p === S, w = !!z, W = c && !!l, I = w && ii && A === "edit" ? {
6545
+ var w;
6546
+ return ((w = T == null ? void 0 : T.props) == null ? void 0 : w.col) === j;
6547
+ }), Z = c && b === S, E = !!z, W = c && !!l, I = E && ii && A === "edit" ? {
6568
6548
  draggable: !0,
6569
6549
  onDragStart: (T) => {
6570
6550
  T.stopPropagation(), T.dataTransfer.setData("elementId", ii), T.dataTransfer.setData("properties", ii), T.dataTransfer.effectAllowed = "move", d(!0);
6571
6551
  },
6572
6552
  onDragEnd: () => {
6573
- y(null), d(!1);
6553
+ f(null), d(!1);
6574
6554
  }
6575
6555
  } : {};
6576
- return /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsxs(
6556
+ return /* @__PURE__ */ n.jsx("div", { className: "min-w-0", children: /* @__PURE__ */ n.jsxs(
6577
6557
  "div",
6578
6558
  {
6579
6559
  id: `grid-cell-${i.id}-${S}`,
6580
6560
  ...I,
6581
- onDrop: (T) => x(T, S),
6561
+ onDrop: (T) => y(T, S),
6582
6562
  onDragEnter: (T) => g(T, S),
6583
- onDragOver: (T) => f(T, S),
6584
- onDragLeave: (T) => m(T, S),
6563
+ onDragOver: (T) => x(T, S),
6564
+ onDragLeave: (T) => p(T, S),
6585
6565
  className: q(
6586
- "relative border rounded-lg min-h-[110px]",
6566
+ "relative border rounded-lg min-h-[110px] min-w-0",
6587
6567
  "flex items-center justify-center",
6588
6568
  "transition-all duration-200 ease-in-out",
6589
6569
  A === "edit" ? "py-3 " : "",
6590
- w && A === "edit" && "cursor-grab active:cursor-grabbing border-none",
6570
+ E && A === "edit" && "cursor-grab active:cursor-grabbing border-none",
6591
6571
  N,
6592
6572
  !W && !Z && "bg-white border-gray-200 text-gray-300",
6593
- W && !Z && !w && "bg-blue-50 border-blue-200 border-dashed text-blue-300",
6594
- W && !Z && w && "bg-white border-orange-200 border-dashed",
6595
- Z && !w && "bg-blue-100 border-blue-400 border-dashed shadow-inner scale-[1.01] text-blue-500",
6596
- Z && w && "bg-orange-50 border-orange-400 border-dashed shadow-inner scale-[1.01] text-orange-500"
6573
+ W && !Z && !E && "bg-blue-50 border-blue-200 border-dashed text-blue-300",
6574
+ W && !Z && E && "bg-white border-orange-200 border-dashed",
6575
+ Z && !E && "bg-blue-100 border-blue-400 border-dashed shadow-inner scale-[1.01] text-blue-500",
6576
+ Z && E && "bg-orange-50 border-orange-400 border-dashed shadow-inner scale-[1.01] text-orange-500"
6597
6577
  ),
6598
6578
  children: [
6599
- w && A === "edit" && /* @__PURE__ */ n.jsx("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.jsx(_, { icon: "ph:dots-six-bold" }) }),
6600
- Z && !w && /* @__PURE__ */ n.jsxs("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: [
6579
+ E && A === "edit" && /* @__PURE__ */ n.jsx("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.jsx(_, { icon: "ph:dots-six-bold" }) }),
6580
+ Z && !E && /* @__PURE__ */ n.jsxs("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: [
6601
6581
  /* @__PURE__ */ n.jsx(_, { icon: "ph:plus-bold" }),
6602
6582
  "Drop here"
6603
6583
  ] }),
6604
- Z && w && /* @__PURE__ */ n.jsx("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" }),
6584
+ Z && E && /* @__PURE__ */ n.jsx("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" }),
6605
6585
  /* @__PURE__ */ n.jsx(
6606
6586
  "div",
6607
6587
  {
6608
6588
  className: q(
6609
- "w-full select-none",
6589
+ "w-full select-none min-w-0",
6610
6590
  Z && "opacity-50 pointer-events-none"
6611
6591
  ),
6612
6592
  children: z || /* @__PURE__ */ n.jsx("span", { className: "flex items-center justify-center text-gray-300", children: A === "edit" && /* @__PURE__ */ n.jsx(_, { icon: "ph:plus-bold" }) })
@@ -6621,10 +6601,10 @@ const He = {
6621
6601
  {
6622
6602
  className: "grid w-full gap-3 items-center",
6623
6603
  style: {
6624
- gridTemplateColumns: `repeat(${i.columns}, 1fr)`
6604
+ gridTemplateColumns: `repeat(${i.columns}, minmax(0, 1fr))`
6625
6605
  },
6626
6606
  children: h == null ? void 0 : h.map(
6627
- (S, N) => j(N, s, a)
6607
+ (S, N) => C(N, s, a)
6628
6608
  )
6629
6609
  }
6630
6610
  ) });
@@ -6674,13 +6654,13 @@ function Hs({ elementData: i, sectionId: e }) {
6674
6654
  moveElement: u
6675
6655
  } = ji(gi), [t, d] = P(null), r = oi(
6676
6656
  () => {
6677
- var m;
6678
- return ((m = o.find((x) => x.id === e)) == null ? void 0 : m.questionData) || [];
6657
+ var p;
6658
+ return ((p = o.find((y) => y.id === e)) == null ? void 0 : p.questionData) || [];
6679
6659
  },
6680
6660
  [o, e]
6681
6661
  ), c = $(
6682
- (m, x) => {
6683
- m.dataTransfer.setData("elementId", x), m.dataTransfer.setData("properties", x), m.dataTransfer.effectAllowed = "move", d(x), a(!0);
6662
+ (p, y) => {
6663
+ p.dataTransfer.setData("elementId", y), p.dataTransfer.setData("properties", y), p.dataTransfer.effectAllowed = "move", d(y), a(!0);
6684
6664
  },
6685
6665
  [a]
6686
6666
  ), v = $(() => {
@@ -6690,93 +6670,93 @@ function Hs({ elementData: i, sectionId: e }) {
6690
6670
  !s && t && d(null);
6691
6671
  }, [s, t]);
6692
6672
  const h = $(
6693
- (m) => {
6694
- m.preventDefault(), m.stopPropagation();
6695
- const x = m.dataTransfer.getData("elementId"), j = m.currentTarget.id;
6696
- if (!x || !j || x === j) {
6673
+ (p) => {
6674
+ p.preventDefault(), p.stopPropagation();
6675
+ const y = p.dataTransfer.getData("elementId"), C = p.currentTarget.id;
6676
+ if (!y || !C || y === C) {
6697
6677
  v();
6698
6678
  return;
6699
6679
  }
6700
- const S = r.find((A) => A.id === x), N = r.findIndex(
6701
- (A) => A.id === j
6680
+ const S = r.find((A) => A.id === y), N = r.findIndex(
6681
+ (A) => A.id === C
6702
6682
  );
6703
- S != null && S.gridId && N !== -1 ? u({ draggedId: x, sectionId: e, targetIndex: N }) : u({ draggedId: x, sectionId: e, targetId: j }), d(null), a(!1);
6683
+ S != null && S.gridId && N !== -1 ? u({ draggedId: y, sectionId: e, targetIndex: N }) : u({ draggedId: y, sectionId: e, targetId: C }), d(null), a(!1);
6704
6684
  },
6705
6685
  [e, u, a, v, r]
6706
- ), p = $(
6707
- (m, x) => {
6708
- m.preventDefault(), m.stopPropagation(), a(!1);
6709
- const j = m.dataTransfer.getData("elementId");
6710
- if (j) {
6711
- u({ draggedId: j, sectionId: e, targetIndex: x }), d(null);
6686
+ ), b = $(
6687
+ (p, y) => {
6688
+ p.preventDefault(), p.stopPropagation(), a(!1);
6689
+ const C = p.dataTransfer.getData("elementId");
6690
+ if (C) {
6691
+ u({ draggedId: C, sectionId: e, targetIndex: y }), d(null);
6712
6692
  return;
6713
6693
  }
6714
6694
  try {
6715
- const S = JSON.parse(m.dataTransfer.getData("properties"));
6695
+ const S = JSON.parse(p.dataTransfer.getData("properties"));
6716
6696
  if ((S == null ? void 0 : S.type) === "section") return;
6717
6697
  const N = { ...S, id: Ai(), sectionId: e };
6718
- l(N, e, x), d(null);
6698
+ l(N, e, y), d(null);
6719
6699
  } catch (S) {
6720
6700
  console.error("Drop error:", S);
6721
6701
  }
6722
6702
  },
6723
6703
  [l, e, a, u]
6724
- ), y = $(
6725
- (m, x = !1) => /* @__PURE__ */ n.jsx(
6704
+ ), f = $(
6705
+ (p, y = !1) => /* @__PURE__ */ n.jsx(
6726
6706
  "div",
6727
6707
  {
6728
- id: m.id,
6708
+ id: p.id,
6729
6709
  draggable: !0,
6730
- onDragStart: (j) => c(j, m.id),
6731
- onDragOver: x ? void 0 : (j) => {
6732
- j.preventDefault(), j.stopPropagation();
6710
+ onDragStart: (C) => c(C, p.id),
6711
+ onDragOver: y ? void 0 : (C) => {
6712
+ C.preventDefault(), C.stopPropagation();
6733
6713
  },
6734
- onDrop: x ? void 0 : h,
6714
+ onDrop: y ? void 0 : h,
6735
6715
  onDragEnd: v,
6736
6716
  className: q(
6737
6717
  "cursor-grab active:cursor-grabbing border p-4 w-full rounded-lg",
6738
6718
  "transition-all duration-200 ease-in-out",
6739
- t === m.id ? "opacity-40 scale-[0.98] bg-gray-100 border-dashed border-blue-300 shadow-inner" : t ? "bg-white border-dashed border-blue-200 shadow-sm" : "bg-white border-gray-200 shadow-sm hover:border-blue-300 hover:shadow-md"
6719
+ t === p.id ? "opacity-40 scale-[0.98] bg-gray-100 border-dashed border-blue-300 shadow-inner" : t ? "bg-white border-dashed border-blue-200 shadow-sm" : "bg-white border-gray-200 shadow-sm hover:border-blue-300 hover:shadow-md"
6740
6720
  ),
6741
- children: Os(m, e)
6721
+ children: Os(p, e)
6742
6722
  },
6743
- m.id
6723
+ p.id
6744
6724
  ),
6745
6725
  [t, h, e, c, v]
6746
- ), f = oi(() => (i == null ? void 0 : i.reduce((m, x) => (x.gridId && (m[x.gridId] = m[x.gridId] || [], m[x.gridId].push(x)), m), {})) || {}, [i]);
6726
+ ), x = oi(() => (i == null ? void 0 : i.reduce((p, y) => (y.gridId && (p[y.gridId] = p[y.gridId] || [], p[y.gridId].push(y)), p), {})) || {}, [i]);
6747
6727
  if (!(i != null && i.length))
6748
6728
  return /* @__PURE__ */ n.jsx(
6749
6729
  "div",
6750
6730
  {
6751
- onDragOver: (m) => m.preventDefault(),
6752
- onDrop: (m) => p(m, 0),
6731
+ onDragOver: (p) => p.preventDefault(),
6732
+ onDrop: (p) => b(p, 0),
6753
6733
  onDragEnd: v,
6754
6734
  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",
6755
6735
  children: "Drag or click an element to display"
6756
6736
  }
6757
6737
  );
6758
- const g = i.filter((m) => !m.gridId);
6738
+ const g = i.filter((p) => !p.gridId);
6759
6739
  return /* @__PURE__ */ n.jsxs("div", { className: "relative flex flex-col w-full h-full gap-2", children: [
6760
6740
  /* @__PURE__ */ n.jsx(
6761
6741
  xn,
6762
6742
  {
6763
6743
  index: 0,
6764
6744
  isDragging: s,
6765
- onDrop: p,
6745
+ onDrop: b,
6766
6746
  onDragEnd: v
6767
6747
  }
6768
6748
  ),
6769
- g.map((m) => {
6770
- const x = r.findIndex((j) => j.id === m.id);
6771
- if (m.type === "grid") {
6772
- const j = f[m.id] || [], S = t === m.id, N = !!t && !S;
6749
+ g.map((p) => {
6750
+ const y = r.findIndex((C) => C.id === p.id);
6751
+ if (p.type === "grid") {
6752
+ const C = x[p.id] || [], S = t === p.id, N = !!t && !S;
6773
6753
  return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-0", children: [
6774
6754
  /* @__PURE__ */ n.jsx(
6775
6755
  "div",
6776
6756
  {
6777
- id: m.id,
6757
+ id: p.id,
6778
6758
  draggable: !0,
6779
- onDragStart: (A) => c(A, m.id),
6759
+ onDragStart: (A) => c(A, p.id),
6780
6760
  onDragOver: (A) => {
6781
6761
  A.preventDefault(), A.stopPropagation();
6782
6762
  },
@@ -6787,17 +6767,17 @@ function Hs({ elementData: i, sectionId: e }) {
6787
6767
  "transition-all duration-200 ease-in-out",
6788
6768
  S ? "opacity-40 scale-[0.98] bg-gray-100 border-dashed border-blue-400 shadow-inner" : N ? "bg-white border-dashed border-blue-200" : "bg-white border-gray-200 shadow-sm hover:border-blue-300 hover:shadow-md"
6789
6769
  ),
6790
- children: /* @__PURE__ */ n.jsx(In, { element: m, state: "edit", children: /* @__PURE__ */ n.jsx(
6770
+ children: /* @__PURE__ */ n.jsx(In, { element: p, state: "edit", children: /* @__PURE__ */ n.jsx(
6791
6771
  Kn,
6792
6772
  {
6793
- element: m,
6773
+ element: p,
6794
6774
  sectionId: e,
6795
6775
  state: Gs,
6796
6776
  draggedElementId: t,
6797
- children: j == null ? void 0 : j.map(
6777
+ children: C == null ? void 0 : C.map(
6798
6778
  (A) => {
6799
- var k;
6800
- return /* @__PURE__ */ n.jsx(On, { col: (k = A.gridPosition) == null ? void 0 : k.col, children: y(A, !0) }, A.id);
6779
+ var j;
6780
+ return /* @__PURE__ */ n.jsx(On, { col: (j = A.gridPosition) == null ? void 0 : j.col, children: f(A, !0) }, A.id);
6801
6781
  }
6802
6782
  )
6803
6783
  }
@@ -6807,26 +6787,26 @@ function Hs({ elementData: i, sectionId: e }) {
6807
6787
  /* @__PURE__ */ n.jsx(
6808
6788
  xn,
6809
6789
  {
6810
- index: x + 1,
6790
+ index: y + 1,
6811
6791
  isDragging: s,
6812
- onDrop: p,
6792
+ onDrop: b,
6813
6793
  onDragEnd: v
6814
6794
  }
6815
6795
  )
6816
- ] }, m.id);
6796
+ ] }, p.id);
6817
6797
  }
6818
6798
  return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-0", children: [
6819
- y(m),
6799
+ f(p),
6820
6800
  /* @__PURE__ */ n.jsx(
6821
6801
  xn,
6822
6802
  {
6823
- index: x + 1,
6803
+ index: y + 1,
6824
6804
  isDragging: s,
6825
- onDrop: p,
6805
+ onDrop: b,
6826
6806
  onDragEnd: v
6827
6807
  }
6828
6808
  )
6829
- ] }, m.id);
6809
+ ] }, p.id);
6830
6810
  })
6831
6811
  ] });
6832
6812
  }
@@ -6849,8 +6829,8 @@ const Vs = an(Hs), Fs = B.object({
6849
6829
  if (mi.useEffect(() => {
6850
6830
  i || c();
6851
6831
  }, [i, c]), !i) return null;
6852
- const v = (p) => {
6853
- s(p, o.id), e();
6832
+ const v = (b) => {
6833
+ s(b, o.id), e();
6854
6834
  }, h = u();
6855
6835
  return /* @__PURE__ */ n.jsx("div", { className: "fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none", children: /* @__PURE__ */ n.jsxs("div", { className: "min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center", children: [
6856
6836
  /* @__PURE__ */ n.jsxs("div", { className: "w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6", children: [
@@ -6953,8 +6933,8 @@ const Vs = an(Hs), Fs = B.object({
6953
6933
  const v = Ci(null), h = Ci(i.questionData.length);
6954
6934
  return D(() => {
6955
6935
  i.questionData.length > h.current && v.current && requestAnimationFrame(() => {
6956
- var p;
6957
- (p = v.current) == null || p.scrollTo({
6936
+ var b;
6937
+ (b = v.current) == null || b.scrollTo({
6958
6938
  top: v.current.scrollHeight,
6959
6939
  behavior: "smooth"
6960
6940
  });
@@ -7055,34 +7035,34 @@ const Vs = an(Hs), Fs = B.object({
7055
7035
  setActiveSections: v
7056
7036
  } = ji(gi), h = Ci((u == null ? void 0 : u.length) || 0);
7057
7037
  D(() => {
7058
- var m;
7059
- d(((m = u[0]) == null ? void 0 : m.id) || null);
7038
+ var p;
7039
+ d(((p = u[0]) == null ? void 0 : p.id) || null);
7060
7040
  }, []), D(() => {
7061
7041
  (u == null ? void 0 : u.length) > h.current && s.current && requestAnimationFrame(() => {
7062
- var m;
7063
- (m = s.current) == null || m.scrollTo({
7042
+ var p;
7043
+ (p = s.current) == null || p.scrollTo({
7064
7044
  top: s.current.scrollHeight,
7065
7045
  behavior: "smooth"
7066
7046
  });
7067
7047
  }), h.current = (u == null ? void 0 : u.length) || 0;
7068
7048
  }, [u == null ? void 0 : u.length]);
7069
- const p = $((m) => {
7070
- m.preventDefault(), m.dataTransfer.dropEffect = "move", s.current && (s.current.scrollTop = s.current.scrollHeight);
7049
+ const b = $((p) => {
7050
+ p.preventDefault(), p.dataTransfer.dropEffect = "move", s.current && (s.current.scrollTop = s.current.scrollHeight);
7071
7051
  }, []);
7072
- function y(m) {
7073
- c.includes(m) ? v(
7074
- (x) => x.filter((j) => j !== m)
7075
- ) : v((x) => [...x, m]);
7052
+ function f(p) {
7053
+ c.includes(p) ? v(
7054
+ (y) => y.filter((C) => C !== p)
7055
+ ) : v((y) => [...y, p]);
7076
7056
  }
7077
- function f(m) {
7078
- o.current = m, e(!0);
7057
+ function x(p) {
7058
+ o.current = p, e(!0);
7079
7059
  }
7080
7060
  const g = xi("config");
7081
7061
  return /* @__PURE__ */ n.jsxs(
7082
7062
  "div",
7083
7063
  {
7084
7064
  ref: s,
7085
- className: "relative flex flex-col h-full pb-5 mx-auto gap-x-4 overflow-y-auto",
7065
+ className: "relative flex flex-col h-full pb-5 mx-auto gap-x-4 ",
7086
7066
  children: [
7087
7067
  i && /* @__PURE__ */ n.jsx(
7088
7068
  Ws,
@@ -7092,40 +7072,47 @@ const Vs = an(Hs), Fs = B.object({
7092
7072
  section: o.current
7093
7073
  }
7094
7074
  ),
7095
- /* @__PURE__ */ n.jsxs("div", { className: "relative flex flex-col flex-1 w-full gap-y-3", children: [
7096
- u == null ? void 0 : u.map(
7097
- (m, x) => /* @__PURE__ */ n.jsx(
7098
- Us,
7099
- {
7100
- section: m,
7101
- index: x,
7102
- selectedSection: r,
7103
- setSelectedSection: d,
7104
- activeSections: c,
7105
- toggleSection: y,
7106
- handleSectionEdit: f,
7107
- removeSection: a,
7108
- formDataLength: u.length,
7109
- onDragOver: p,
7110
- setIsDragging: t
7111
- },
7112
- m.id
7113
- )
7114
- ),
7115
- /* @__PURE__ */ n.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ n.jsxs(
7116
- "button",
7117
- {
7118
- type: "button",
7119
- onClick: () => l(),
7120
- style: { color: (g == null ? void 0 : g.buttonColor) || "#333" },
7121
- className: "text-sm font-medium",
7122
- children: [
7123
- "+ Add section",
7124
- " "
7125
- ]
7126
- }
7127
- ) })
7128
- ] })
7075
+ /* @__PURE__ */ n.jsxs(
7076
+ "div",
7077
+ {
7078
+ id: "section-container",
7079
+ className: "relative flex flex-col flex-1 w-full gap-y-3 container overflow-y-auto",
7080
+ children: [
7081
+ u == null ? void 0 : u.map(
7082
+ (p, y) => /* @__PURE__ */ n.jsx(
7083
+ Us,
7084
+ {
7085
+ section: p,
7086
+ index: y,
7087
+ selectedSection: r,
7088
+ setSelectedSection: d,
7089
+ activeSections: c,
7090
+ toggleSection: f,
7091
+ handleSectionEdit: x,
7092
+ removeSection: a,
7093
+ formDataLength: u.length,
7094
+ onDragOver: b,
7095
+ setIsDragging: t
7096
+ },
7097
+ p.id
7098
+ )
7099
+ ),
7100
+ /* @__PURE__ */ n.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ n.jsxs(
7101
+ "button",
7102
+ {
7103
+ type: "button",
7104
+ onClick: () => l(),
7105
+ style: { color: (g == null ? void 0 : g.buttonColor) || "#333" },
7106
+ className: "text-sm font-medium",
7107
+ children: [
7108
+ "+ Add section",
7109
+ " "
7110
+ ]
7111
+ }
7112
+ ) })
7113
+ ]
7114
+ }
7115
+ )
7129
7116
  ]
7130
7117
  }
7131
7118
  );
@@ -7177,7 +7164,7 @@ function Js({
7177
7164
  }
7178
7165
  ),
7179
7166
  /* @__PURE__ */ n.jsx(
7180
- wi,
7167
+ Ei,
7181
7168
  {
7182
7169
  show: l,
7183
7170
  as: "div",
@@ -7187,8 +7174,8 @@ function Js({
7187
7174
  leave: "transition-all duration-300 ease-in-out origin-right",
7188
7175
  leaveFrom: "opacity-100 w-2/5 translate-x-0",
7189
7176
  leaveTo: "opacity-0 w-0 translate-x-10 px-0 overflow-hidden border-transparent shadow-none",
7190
- className: "shrink-0 overflow-y-auto no-scrollbar max-h-[calc(100vh-70px)] form_preview w-2/5",
7191
- children: /* @__PURE__ */ n.jsx("div", { className: "px-2 shadow_box min-w-[320px] bg-white border border-gray-100 rounded-lg", children: /* @__PURE__ */ n.jsx(_s, {}) })
7177
+ className: "shrink-0 overflow-y-auto no-scrollbar max-h-[calc(100vh-70px)] form_preview w-2/5 min-w-0",
7178
+ children: /* @__PURE__ */ n.jsx("div", { className: "px-2 shadow_box min-w-0 bg-white border border-gray-100 rounded-lg container", children: /* @__PURE__ */ n.jsx(_s, {}) })
7192
7179
  }
7193
7180
  )
7194
7181
  ] });
@@ -7202,38 +7189,38 @@ const An = [
7202
7189
  { key: "advancedData", title: "Advanced / Data" }
7203
7190
  ], Ys = () => {
7204
7191
  const [i, e] = P(""), { setIsDragging: o, addElement: s, selectedSection: a } = ji(gi), l = $(
7205
- (p, y) => {
7192
+ (b, f) => {
7206
7193
  if (!a) {
7207
7194
  ki.error("Please select a section to add an element.");
7208
7195
  return;
7209
7196
  }
7210
- p.dataTransfer.setData("properties", JSON.stringify(y)), p.dataTransfer.effectAllowed = "move", o(!0);
7197
+ b.dataTransfer.setData("properties", JSON.stringify(f)), b.dataTransfer.effectAllowed = "move", o(!0);
7211
7198
  },
7212
7199
  [o, a]
7213
7200
  );
7214
- function u(p) {
7201
+ function u(b) {
7215
7202
  if (!a) {
7216
7203
  ki.error("Please select a section to add an element.");
7217
7204
  return;
7218
7205
  }
7219
- const y = {
7220
- ...p,
7206
+ const f = {
7207
+ ...b,
7221
7208
  id: Ai(),
7222
7209
  sectionId: a
7223
7210
  };
7224
- s(y, a);
7211
+ s(f, a);
7225
7212
  }
7226
7213
  const t = xi("config") || {}, d = t.elementColor, r = t.elementBgColor, c = t.elementBorderColor, v = Ya.filter(
7227
- (p) => p.label.toLowerCase().includes(i.toLowerCase())
7228
- ), h = An == null ? void 0 : An.map((p) => ({
7229
- title: p.title,
7214
+ (b) => b.label.toLowerCase().includes(i.toLowerCase())
7215
+ ), h = An == null ? void 0 : An.map((b) => ({
7216
+ title: b.title,
7230
7217
  elements: v.filter(
7231
- (y) => {
7232
- var f;
7233
- return (f = qa[p.key]) == null ? void 0 : f.includes(y.type);
7218
+ (f) => {
7219
+ var x;
7220
+ return (x = qa[b.key]) == null ? void 0 : x.includes(f.type);
7234
7221
  }
7235
7222
  )
7236
- })).filter((p) => p.elements.length > 0);
7223
+ })).filter((b) => b.elements.length > 0);
7237
7224
  return /* @__PURE__ */ n.jsxs("div", { className: "pt-4 flex flex-col gap-y-6", children: [
7238
7225
  /* @__PURE__ */ n.jsx("div", { className: "px-5", children: /* @__PURE__ */ n.jsx(
7239
7226
  "input",
@@ -7241,19 +7228,19 @@ const An = [
7241
7228
  className: "field-control",
7242
7229
  placeholder: "Search",
7243
7230
  value: i,
7244
- onChange: (p) => e(p.target.value),
7231
+ onChange: (b) => e(b.target.value),
7245
7232
  name: "search",
7246
7233
  id: "search"
7247
7234
  }
7248
7235
  ) }),
7249
- /* @__PURE__ */ n.jsx("div", { className: "flex-1 overflow-y-auto no-scrollbar max-h-[calc(100vh-100px)]", children: /* @__PURE__ */ n.jsx("ul", { className: "grid gap-y-5 mt-3 px-5 ", children: h == null ? void 0 : h.map((p, y) => {
7250
- var f;
7236
+ /* @__PURE__ */ n.jsx("div", { className: "flex-1 overflow-y-auto no-scrollbar max-h-[calc(100vh-100px)]", children: /* @__PURE__ */ n.jsx("ul", { className: "grid gap-y-5 mt-3 px-5 ", children: h == null ? void 0 : h.map((b, f) => {
7237
+ var x;
7251
7238
  return /* @__PURE__ */ n.jsxs("li", { children: [
7252
- /* @__PURE__ */ n.jsx("h4", { className: "mb-2 text-[11px] font-bold text-gray-500 uppercase", children: p.title }),
7253
- /* @__PURE__ */ n.jsx("ul", { className: "grid grid-cols-2 gap-y-3 gap-x-4 mb-3", children: (f = p.elements) == null ? void 0 : f.map((g) => /* @__PURE__ */ n.jsx(
7239
+ /* @__PURE__ */ n.jsx("h4", { className: "mb-2 text-[11px] font-bold text-gray-500 uppercase", children: b.title }),
7240
+ /* @__PURE__ */ n.jsx("ul", { className: "grid grid-cols-2 gap-y-3 gap-x-4 mb-3", children: (x = b.elements) == null ? void 0 : x.map((g) => /* @__PURE__ */ n.jsx(
7254
7241
  "li",
7255
7242
  {
7256
- onDragStart: (m) => l(m, g),
7243
+ onDragStart: (p) => l(p, g),
7257
7244
  onDragEnd: () => o(!1),
7258
7245
  onClick: () => u(g),
7259
7246
  style: {
@@ -7279,10 +7266,10 @@ const An = [
7279
7266
  },
7280
7267
  g.type
7281
7268
  )) })
7282
- ] }, y);
7269
+ ] }, f);
7283
7270
  }) }) })
7284
7271
  ] });
7285
- }, qs = an(Ys), Ei = ({
7272
+ }, qs = an(Ys), wi = ({
7286
7273
  text: i = "",
7287
7274
  isDisabled: e = !1,
7288
7275
  isLoading: o = !1,
@@ -7297,14 +7284,14 @@ const An = [
7297
7284
  style: v,
7298
7285
  onClick: h
7299
7286
  }) => {
7300
- const p = q(
7287
+ const b = q(
7301
7288
  "btn inline-flex justify-center",
7302
7289
  {
7303
7290
  "pointer-events-none": o,
7304
7291
  "opacity-40 cursor-not-allowed": e
7305
7292
  },
7306
7293
  s
7307
- ), y = () => o ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
7294
+ ), f = () => o ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
7308
7295
  /* @__PURE__ */ n.jsxs(
7309
7296
  "svg",
7310
7297
  {
@@ -7341,16 +7328,16 @@ const An = [
7341
7328
  i && /* @__PURE__ */ n.jsx("span", { children: i }),
7342
7329
  a && l === "right" && /* @__PURE__ */ n.jsx("span", { className: `ml-[6px] ${u}`, children: /* @__PURE__ */ n.jsx(_, { icon: a }) })
7343
7330
  ] });
7344
- return r ? /* @__PURE__ */ n.jsx("div", { className: p, children: y() }) : d ? /* @__PURE__ */ n.jsx(ko, { to: d, className: p, children: y() }) : /* @__PURE__ */ n.jsx(
7331
+ return r ? /* @__PURE__ */ n.jsx("div", { className: b, children: f() }) : d ? /* @__PURE__ */ n.jsx(ko, { to: d, className: b, children: f() }) : /* @__PURE__ */ n.jsx(
7345
7332
  "button",
7346
7333
  {
7347
7334
  disabled: e,
7348
7335
  type: c,
7349
- className: p,
7336
+ className: b,
7350
7337
  "data-testid": "btn",
7351
7338
  onClick: h,
7352
7339
  style: v,
7353
- children: y()
7340
+ children: f()
7354
7341
  }
7355
7342
  );
7356
7343
  };
@@ -7411,7 +7398,7 @@ const $s = ({
7411
7398
  }
7412
7399
  ),
7413
7400
  " ",
7414
- /* @__PURE__ */ n.jsx("div", { className: "max-h-[80vh] overflow-y-auto h-max w-full max-w-[650px] min-w-0 border border-[#D5D9EB] rounded-lg bg-white form_submit", children: /* @__PURE__ */ n.jsx(
7401
+ /* @__PURE__ */ n.jsx("div", { className: "max-h-[80vh] overflow-y-auto h-max w-full max-w-[650px] min-w-0 border border-[#D5D9EB] rounded-lg bg-white form_submit container", children: /* @__PURE__ */ n.jsx(
7415
7402
  Fe,
7416
7403
  {
7417
7404
  form_data: o,
@@ -7457,15 +7444,15 @@ function Xs({
7457
7444
  publishLoading: u,
7458
7445
  onTitleChange: t
7459
7446
  }) {
7460
- const { formData: d, setShowPreview: r, showPreview: c } = ji(gi), [v, h] = P(!1), [p, y] = P(!1), [f, g] = P(i || ""), m = xi("config");
7461
- function x() {
7447
+ const { formData: d, setShowPreview: r, showPreview: c } = ji(gi), [v, h] = P(!1), [b, f] = P(!1), [x, g] = P(i || ""), p = xi("config");
7448
+ function y() {
7462
7449
  localStorage.setItem("formData", JSON.stringify(d)), o == null || o(d);
7463
7450
  }
7464
- function j() {
7451
+ function C() {
7465
7452
  localStorage.setItem("formData", JSON.stringify(d)), s == null || s(d);
7466
7453
  }
7467
7454
  function S() {
7468
- y(!1), t && f !== i && t(f.trim());
7455
+ f(!1), t && x !== i && t(x.trim());
7469
7456
  }
7470
7457
  return /* @__PURE__ */ n.jsxs("div", { className: "px-[30px] py-3 flex justify-between items-center bg-[#F9F9FB] top_bar border-b h-full", children: [
7471
7458
  /* @__PURE__ */ n.jsxs("span", { className: "flex items-center gap-x-2", children: [
@@ -7474,17 +7461,17 @@ function Xs({
7474
7461
  {
7475
7462
  type: "button",
7476
7463
  onClick: () => e(),
7477
- style: { color: (m == null ? void 0 : m.buttonColor) || "#333" },
7464
+ style: { color: (p == null ? void 0 : p.buttonColor) || "#333" },
7478
7465
  className: "flex items-center gap-x-3",
7479
7466
  children: /* @__PURE__ */ n.jsx(Qs, {})
7480
7467
  }
7481
7468
  ),
7482
7469
  " ",
7483
- p ? /* @__PURE__ */ n.jsx(
7470
+ b ? /* @__PURE__ */ n.jsx(
7484
7471
  "input",
7485
7472
  {
7486
7473
  type: "text",
7487
- value: f,
7474
+ value: x,
7488
7475
  onChange: (N) => g(N.target.value),
7489
7476
  onBlur: S,
7490
7477
  autoFocus: !0,
@@ -7495,8 +7482,8 @@ function Xs({
7495
7482
  {
7496
7483
  title: "Click to edit",
7497
7484
  className: "text-base font-semibold cursor-pointer form_title",
7498
- onClick: () => y(!0),
7499
- children: f || "Untitled"
7485
+ onClick: () => f(!0),
7486
+ children: x || "Untitled"
7500
7487
  }
7501
7488
  )
7502
7489
  ] }),
@@ -7510,37 +7497,37 @@ function Xs({
7510
7497
  ),
7511
7498
  /* @__PURE__ */ n.jsxs("div", { className: "flex justify-end text-xs gap-x-3", children: [
7512
7499
  /* @__PURE__ */ n.jsx(
7513
- Ei,
7500
+ wi,
7514
7501
  {
7515
7502
  onClick: () => r((N) => !N),
7516
7503
  text: c ? "Hide Preview" : "Preview",
7517
7504
  btnClass: "px-2 bg-transparent font-medium text-sm form_preview",
7518
7505
  icon: c ? "iconamoon:eye-off-duotone" : "solar:eye-bold-duotone",
7519
7506
  iconClass: "text-base",
7520
- style: { color: (m == null ? void 0 : m.buttonColor) || "#333" },
7507
+ style: { color: (p == null ? void 0 : p.buttonColor) || "#333" },
7521
7508
  isDisabled: a,
7522
7509
  isLoading: a
7523
7510
  }
7524
7511
  ),
7525
7512
  /* @__PURE__ */ n.jsx(
7526
- Ei,
7513
+ wi,
7527
7514
  {
7528
- onClick: x,
7515
+ onClick: y,
7529
7516
  text: "Save",
7530
7517
  btnClass: "px-2 bg-transparent font-medium text-sm form_save__btn",
7531
7518
  icon: "lets-icons:save-duotone",
7532
7519
  iconClass: "text-base",
7533
- style: { color: (m == null ? void 0 : m.buttonColor) || "#333" },
7520
+ style: { color: (p == null ? void 0 : p.buttonColor) || "#333" },
7534
7521
  isDisabled: l,
7535
7522
  isLoading: l
7536
7523
  }
7537
7524
  ),
7538
7525
  /* @__PURE__ */ n.jsx(
7539
- Ei,
7526
+ wi,
7540
7527
  {
7541
- onClick: j,
7528
+ onClick: C,
7542
7529
  text: "Publish",
7543
- style: { background: (m == null ? void 0 : m.buttonColor) || "#333" },
7530
+ style: { background: (p == null ? void 0 : p.buttonColor) || "#333" },
7544
7531
  btnClass: "border-[#98A2B3] font-medium text-sm py-2 px-6 text-white rounded-lg form_publish__btn",
7545
7532
  isDisabled: u,
7546
7533
  isLoading: u
@@ -7575,8 +7562,8 @@ function il({
7575
7562
  return /* @__PURE__ */ n.jsxs(Se, { children: [
7576
7563
  /* @__PURE__ */ n.jsx(Ae, { position: "top-right", richColors: !0, closeButton: !0 }),
7577
7564
  /* @__PURE__ */ n.jsx("div", { className: "w-full h-full bg-[#F8F9FC] flex flex-col", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 ", children: [
7578
- /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("div", { className: "w-[270px] h-screen border-r border-[#E4E7EC] bg-white ", children: /* @__PURE__ */ n.jsx(qs, {}) }) }),
7579
- /* @__PURE__ */ n.jsxs("div", { className: "flex-1 h-full max-h-full z-[1]", children: [
7565
+ /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("div", { className: "w-[250px] h-screen border-r border-[#E4E7EC] bg-white ", children: /* @__PURE__ */ n.jsx(qs, {}) }) }),
7566
+ /* @__PURE__ */ n.jsxs("div", { className: "flex-1 h-full max-h-full z-[1] w-[calc(100%-250px)]", children: [
7580
7567
  /* @__PURE__ */ n.jsx("div", { className: " h-[70px]", children: /* @__PURE__ */ n.jsx(
7581
7568
  Xs,
7582
7569
  {
@@ -7731,8 +7718,8 @@ const en = ({ element: i, validationData: e }) => {
7731
7718
  }
7732
7719
  }
7733
7720
  ) : !0, [l, s, i]);
7734
- return o ? /* @__PURE__ */ n.jsxs("div", { className: u ? "" : "invisible h-0", children: [
7735
- /* @__PURE__ */ n.jsxs("div", { className: "mb-1.5", children: [
7721
+ return o ? /* @__PURE__ */ n.jsxs("div", { className: `${u ? "" : "invisible h-0"} min-w-0 w-full`, children: [
7722
+ /* @__PURE__ */ n.jsxs("div", { className: "mb-1.5 min-w-0", children: [
7736
7723
  i.inputLabel && /* @__PURE__ */ n.jsxs("label", { className: "block text-sm font-medium input_label", children: [
7737
7724
  i.inputLabel,
7738
7725
  " ",
@@ -7761,7 +7748,7 @@ const en = ({ element: i, validationData: e }) => {
7761
7748
  ] }) : null;
7762
7749
  }, on = (i, e) => i != null && i.allowEdit ? { ...e, isReadOnly: !1 } : e;
7763
7750
  function ll({ form_data: i, options: e }) {
7764
- const o = (a, l) => /* @__PURE__ */ n.jsx(
7751
+ const o = (a, l) => /* @__PURE__ */ n.jsx("div", { className: "min-w-0", children: /* @__PURE__ */ n.jsx(
7765
7752
  Kn,
7766
7753
  {
7767
7754
  element: a,
@@ -7787,14 +7774,13 @@ function ll({ form_data: i, options: e }) {
7787
7774
  u.id
7788
7775
  );
7789
7776
  })
7790
- },
7791
- a.id
7792
- ), s = (a) => {
7777
+ }
7778
+ ) }, a.id), s = (a) => {
7793
7779
  var l, u;
7794
7780
  return /* @__PURE__ */ n.jsxs(
7795
7781
  "div",
7796
7782
  {
7797
- className: q("group relative grid gap-y-[6px]", a.elementClass),
7783
+ className: q("group relative grid gap-y-[6px] min-w-0", a.elementClass),
7798
7784
  children: [
7799
7785
  /* @__PURE__ */ n.jsx(
7800
7786
  en,
@@ -7814,12 +7800,12 @@ function ll({ form_data: i, options: e }) {
7814
7800
  const l = /* @__PURE__ */ new Map();
7815
7801
  return (u = a.questionData) == null || u.forEach((d) => {
7816
7802
  d.gridId && (l.has(d.gridId) || l.set(d.gridId, []), l.get(d.gridId).push(d));
7817
- }), /* @__PURE__ */ n.jsxs("div", { className: "pb-6 section_box", children: [
7803
+ }), /* @__PURE__ */ n.jsxs("div", { className: "pb-6 section_box min-w-0", children: [
7818
7804
  (a.title || a.description) && /* @__PURE__ */ n.jsxs("div", { className: "py-4 border-b border-gray-100 mb-7 section_box__title", children: [
7819
7805
  a.title && /* @__PURE__ */ n.jsx("h2", { className: "text-lg font-semibold mb-[4px]", children: a.title }),
7820
7806
  a.description && /* @__PURE__ */ n.jsx("p", { className: "text-sm", children: a.description })
7821
7807
  ] }),
7822
- /* @__PURE__ */ n.jsx("div", { className: "grid gap-y-6 section_box__content", children: (t = a.questionData) == null ? void 0 : t.map((d) => d.gridId ? null : d.type === "grid" ? o(
7808
+ /* @__PURE__ */ n.jsx("div", { className: "grid gap-y-6 section_box__content min-w-0", children: (t = a.questionData) == null ? void 0 : t.map((d) => d.gridId ? null : d.type === "grid" ? o(
7823
7809
  d,
7824
7810
  l.get(d.id) || []
7825
7811
  ) : s(d)) })
@@ -7828,13 +7814,13 @@ function ll({ form_data: i, options: e }) {
7828
7814
  }
7829
7815
  function dl({ form_data: i, options: e, current: o }) {
7830
7816
  var s;
7831
- return /* @__PURE__ */ n.jsx("div", { className: "grid gap-y-3 multi_section__content", children: (s = i[o].questionData) == null ? void 0 : s.map((a) => {
7817
+ return /* @__PURE__ */ n.jsx("div", { className: "grid gap-y-3 multi_section__content min-w-0", children: (s = i[o].questionData) == null ? void 0 : s.map((a) => {
7832
7818
  var l, u;
7833
7819
  if (a.type === "grid") {
7834
7820
  const t = i[o].questionData.filter(
7835
7821
  (d) => d.gridId === a.id
7836
7822
  );
7837
- return /* @__PURE__ */ n.jsx(
7823
+ return /* @__PURE__ */ n.jsx("div", { className: "min-w-0", children: /* @__PURE__ */ n.jsx(
7838
7824
  Kn,
7839
7825
  {
7840
7826
  element: a,
@@ -7860,15 +7846,14 @@ function dl({ form_data: i, options: e, current: o }) {
7860
7846
  d.id
7861
7847
  );
7862
7848
  })
7863
- },
7864
- a.id
7865
- );
7849
+ }
7850
+ ) }, a.id);
7866
7851
  }
7867
7852
  return a.gridId ? null : /* @__PURE__ */ n.jsxs(
7868
7853
  "div",
7869
7854
  {
7870
7855
  className: q(
7871
- "group relative grid gap-y-[6px]",
7856
+ "group relative grid gap-y-[6px] min-w-0",
7872
7857
  a.elementClass
7873
7858
  ),
7874
7859
  children: [
@@ -7902,7 +7887,7 @@ const tl = ({
7902
7887
  uploadUrl: r
7903
7888
  }) => {
7904
7889
  var ni, si, hi, vi, L, K, X, ui;
7905
- const { setAnswerData: c, setUploadUrl: v } = ji(gi), [h, p] = P(0), y = oi(
7890
+ const { setAnswerData: c, setUploadUrl: v } = ji(gi), [h, b] = P(0), f = oi(
7906
7891
  () => i.filter((J) => !J.isHidden).map((J) => {
7907
7892
  var pi;
7908
7893
  return J.isDisabled || J.disabled ? {
@@ -7914,26 +7899,26 @@ const tl = ({
7914
7899
  } : J;
7915
7900
  }),
7916
7901
  [i]
7917
- ), f = (ni = y == null ? void 0 : y.length) != null ? ni : 0, g = xi("config"), m = oi(
7918
- () => sl(y),
7919
- [y]
7920
- ), x = Bn({
7921
- resolver: Dn(m),
7902
+ ), x = (ni = f == null ? void 0 : f.length) != null ? ni : 0, g = xi("config"), p = oi(
7903
+ () => sl(f),
7904
+ [f]
7905
+ ), y = Bn({
7906
+ resolver: Dn(p),
7922
7907
  mode: "onSubmit",
7923
7908
  defaultValues: {}
7924
7909
  }), {
7925
- register: j,
7910
+ register: C,
7926
7911
  setValue: S,
7927
7912
  control: N,
7928
7913
  handleSubmit: A,
7929
- reset: k,
7914
+ reset: j,
7930
7915
  getValues: O,
7931
7916
  watch: ii,
7932
7917
  formState: { errors: z, isSubmitting: Z },
7933
- trigger: w,
7918
+ trigger: E,
7934
7919
  setError: W,
7935
7920
  clearErrors: I
7936
- } = x, G = yo({ control: N }), H = oi(
7921
+ } = y, G = yo({ control: N }), H = oi(
7937
7922
  () => G,
7938
7923
  [JSON.stringify(G)]
7939
7924
  ), R = $(
@@ -7945,8 +7930,8 @@ const tl = ({
7945
7930
  D(() => {
7946
7931
  v(r);
7947
7932
  }, [v, r]), D(() => {
7948
- if (!(y != null && y.length) || !a) return;
7949
- const J = y.flatMap(
7933
+ if (!(f != null && f.length) || !a) return;
7934
+ const J = f.flatMap(
7950
7935
  (li) => {
7951
7936
  var pi;
7952
7937
  return (pi = li.questionData) == null ? void 0 : pi.map((Si) => ({
@@ -7963,16 +7948,16 @@ const tl = ({
7963
7948
  R(J), c(H);
7964
7949
  }, [
7965
7950
  H,
7966
- y,
7951
+ f,
7967
7952
  R,
7968
7953
  a,
7969
7954
  c
7970
7955
  ]), D(() => {
7971
- e != null && e.length && k(ul(e));
7972
- }, [e, k]);
7956
+ e != null && e.length && j(ul(e));
7957
+ }, [e, j]);
7973
7958
  const T = $(
7974
7959
  (J) => {
7975
- const li = y.flatMap(
7960
+ const li = f.flatMap(
7976
7961
  (pi) => {
7977
7962
  var Si;
7978
7963
  return (Si = pi.questionData) == null ? void 0 : Si.map((Mi) => ({
@@ -7988,25 +7973,25 @@ const tl = ({
7988
7973
  );
7989
7974
  Object.keys(z).length > 0 || s == null || s(li);
7990
7975
  },
7991
- [z, y, s]
7992
- ), E = $(async () => {
7976
+ [z, f, s]
7977
+ ), w = $(async () => {
7993
7978
  var J, li;
7994
7979
  if (!o) {
7995
- const pi = (li = (J = y == null ? void 0 : y[h]) == null ? void 0 : J.questionData) == null ? void 0 : li.map(
7980
+ const pi = (li = (J = f == null ? void 0 : f[h]) == null ? void 0 : J.questionData) == null ? void 0 : li.map(
7996
7981
  (Mi) => Mi.id
7997
7982
  );
7998
- if (!await w(pi)) return;
7983
+ if (!await E(pi)) return;
7999
7984
  }
8000
- p((pi) => pi + 1);
8001
- }, [h, y, o, w]), U = $(() => {
8002
- p((J) => J - 1);
7985
+ b((pi) => pi + 1);
7986
+ }, [h, f, o, E]), U = $(() => {
7987
+ b((J) => J - 1);
8003
7988
  }, []), ci = oi(
8004
7989
  () => ({
8005
- register: j,
7990
+ register: C,
8006
7991
  setValue: S,
8007
7992
  watch: ii,
8008
7993
  errors: z,
8009
- trigger: w,
7994
+ trigger: E,
8010
7995
  isSubmitting: Z,
8011
7996
  isReadOnly: l,
8012
7997
  getValues: O,
@@ -8014,11 +7999,11 @@ const tl = ({
8014
7999
  clearErrors: I
8015
8000
  }),
8016
8001
  [
8017
- j,
8002
+ C,
8018
8003
  S,
8019
8004
  ii,
8020
8005
  z,
8021
- w,
8006
+ E,
8022
8007
  Z,
8023
8008
  l,
8024
8009
  O,
@@ -8026,48 +8011,47 @@ const tl = ({
8026
8011
  I
8027
8012
  ]
8028
8013
  );
8029
- return /* @__PURE__ */ n.jsxs(Ao, { ...x, children: [
8014
+ return /* @__PURE__ */ n.jsxs(Ao, { ...y, children: [
8030
8015
  /* @__PURE__ */ n.jsx(Ae, { position: "top-right", richColors: !0, closeButton: !0 }),
8031
8016
  /* @__PURE__ */ n.jsxs(
8032
8017
  "form",
8033
8018
  {
8034
- id: "form",
8035
8019
  onSubmit: A(T),
8036
8020
  className: "container h-full mx-auto",
8037
8021
  children: [
8038
- /* @__PURE__ */ n.jsx("div", { className: "relative flex flex-col w-full py-4 gap-y-12", children: /* @__PURE__ */ n.jsxs(
8022
+ /* @__PURE__ */ n.jsx("div", { className: "relative flex flex-col w-full min-w-0 py-4 gap-y-12", children: /* @__PURE__ */ n.jsxs(
8039
8023
  "div",
8040
8024
  {
8041
- className: "multi_section__box",
8025
+ className: "multi_section__box min-w-0",
8042
8026
  children: [
8043
- u === "multi" && (((si = y == null ? void 0 : y[h]) == null ? void 0 : si.title) || ((hi = y == null ? void 0 : y[h]) == null ? void 0 : hi.description)) && /* @__PURE__ */ n.jsxs("div", { className: "py-4 mb-4 border-b border-gray-100 multi_section__title", children: [
8044
- ((vi = y[h]) == null ? void 0 : vi.title) && /* @__PURE__ */ n.jsx("h2", { className: "text-lg font-semibold mb-[6px]", children: (L = y[h]) == null ? void 0 : L.title }),
8045
- ((K = y[h]) == null ? void 0 : K.description) && /* @__PURE__ */ n.jsx("p", { className: "text-sm", children: (X = y[h]) == null ? void 0 : X.description })
8027
+ u === "multi" && (((si = f == null ? void 0 : f[h]) == null ? void 0 : si.title) || ((hi = f == null ? void 0 : f[h]) == null ? void 0 : hi.description)) && /* @__PURE__ */ n.jsxs("div", { className: "py-4 mb-4 border-b border-gray-100 multi_section__title", children: [
8028
+ ((vi = f[h]) == null ? void 0 : vi.title) && /* @__PURE__ */ n.jsx("h2", { className: "text-lg font-semibold mb-[6px]", children: (L = f[h]) == null ? void 0 : L.title }),
8029
+ ((K = f[h]) == null ? void 0 : K.description) && /* @__PURE__ */ n.jsx("p", { className: "text-sm", children: (X = f[h]) == null ? void 0 : X.description })
8046
8030
  ] }),
8047
8031
  u === "multi" ? /* @__PURE__ */ n.jsx(
8048
8032
  dl,
8049
8033
  {
8050
- form_data: y,
8034
+ form_data: f,
8051
8035
  options: ci,
8052
8036
  current: h
8053
8037
  }
8054
8038
  ) : /* @__PURE__ */ n.jsx(
8055
8039
  ll,
8056
8040
  {
8057
- form_data: y,
8041
+ form_data: f,
8058
8042
  options: ci
8059
8043
  }
8060
8044
  )
8061
8045
  ]
8062
8046
  },
8063
- (ui = y == null ? void 0 : y[h]) == null ? void 0 : ui.id
8047
+ (ui = f == null ? void 0 : f[h]) == null ? void 0 : ui.id
8064
8048
  ) }),
8065
8049
  !d && /* @__PURE__ */ n.jsx("footer", { className: "flex items-center justify-end gap-4 footer flex-wrap", children: u === "multi" ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
8066
8050
  /* @__PURE__ */ n.jsxs("div", { className: "flex gap-x-4 justify-between navigation_container w-full", children: [
8067
8051
  /* @__PURE__ */ n.jsxs("div", { children: [
8068
8052
  " ",
8069
8053
  h > 0 && /* @__PURE__ */ n.jsx(
8070
- Ei,
8054
+ wi,
8071
8055
  {
8072
8056
  type: "button",
8073
8057
  text: "Back",
@@ -8076,19 +8060,19 @@ const tl = ({
8076
8060
  }
8077
8061
  )
8078
8062
  ] }),
8079
- h < f - 1 && /* @__PURE__ */ n.jsx(
8080
- Ei,
8063
+ h < x - 1 && /* @__PURE__ */ n.jsx(
8064
+ wi,
8081
8065
  {
8082
8066
  type: "button",
8083
8067
  text: "Next",
8084
- onClick: E,
8068
+ onClick: w,
8085
8069
  style: { background: (g == null ? void 0 : g.buttonColor) || "#333" },
8086
8070
  btnClass: "text-gray-700 next_btn text-sm border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg continue_btn"
8087
8071
  }
8088
8072
  )
8089
8073
  ] }),
8090
- (h === f - 1 || l) && !o && (t != null ? t : /* @__PURE__ */ n.jsx(
8091
- Ei,
8074
+ (h === x - 1 || l) && !o && (t != null ? t : /* @__PURE__ */ n.jsx(
8075
+ wi,
8092
8076
  {
8093
8077
  isDisabled: Z || Object.keys(z).length > 0,
8094
8078
  isLoading: Z,
@@ -8099,7 +8083,7 @@ const tl = ({
8099
8083
  }
8100
8084
  ))
8101
8085
  ] }) : !o && (t != null ? t : /* @__PURE__ */ n.jsx(
8102
- Ei,
8086
+ wi,
8103
8087
  {
8104
8088
  isDisabled: Z || Object.keys(z).length > 0,
8105
8089
  isLoading: Z,
@@ -8132,12 +8116,12 @@ function Fe({
8132
8116
  u && Ge("config", u);
8133
8117
  }, [u]);
8134
8118
  const h = $(
8135
- (p) => {
8136
- c && c(p);
8119
+ (b) => {
8120
+ c && c(b);
8137
8121
  },
8138
8122
  [c]
8139
8123
  );
8140
- return l ? /* @__PURE__ */ n.jsx(Ve, {}) : e ? /* @__PURE__ */ n.jsxs("div", { id: "form", className: "w-full h-full", children: [
8124
+ return l ? /* @__PURE__ */ n.jsx(Ve, {}) : e ? /* @__PURE__ */ n.jsxs("div", { className: "w-full h-full min-w-0", children: [
8141
8125
  /* @__PURE__ */ n.jsx("div", { id: "root-portal" }),
8142
8126
  /* @__PURE__ */ n.jsx(Se, { children: /* @__PURE__ */ n.jsx(
8143
8127
  cl,