@arudovwen/form-builder-react 1.1.7 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -385,7 +385,7 @@ function ym() {
385
385
  }
386
386
  return w.ref !== void 0;
387
387
  }
388
- function Ke(w) {
388
+ function Xe(w) {
389
389
  if (Ee.call(w, "key")) {
390
390
  var F = Object.getOwnPropertyDescriptor(w, "key").get;
391
391
  if (F && F.isReactWarning)
@@ -453,7 +453,7 @@ function ym() {
453
453
  function kt(w, F, R, I, X) {
454
454
  {
455
455
  var te, G = {}, q = null, K = null;
456
- R !== void 0 && (De(R), q = "" + R), Ke(F) && (De(F.key), q = "" + F.key), tt(F) && (K = F.ref, Ht(F, X));
456
+ R !== void 0 && (De(R), q = "" + R), Xe(F) && (De(F.key), q = "" + F.key), tt(F) && (K = F.ref, Ht(F, X));
457
457
  for (te in F)
458
458
  Ee.call(F, te) && !He.hasOwnProperty(te) && (G[te] = F[te]);
459
459
  if (w && w.defaultProps) {
@@ -846,37 +846,37 @@ function Fo(e, r) {
846
846
  function Ao(e) {
847
847
  return (r, t) => Ki(r, Fo(e, t));
848
848
  }
849
- function qe(e, r) {
849
+ function Ke(e, r) {
850
850
  return Ki(e, Fo("default", r));
851
851
  }
852
- qe.loading = (e, r) => Ki(e, Fo("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...r }));
852
+ Ke.loading = (e, r) => Ki(e, Fo("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...r }));
853
853
  function jm(e, { pending: r, error: t, success: n }, a) {
854
854
  let i;
855
- r && (i = ta(r) ? qe.loading(r, a) : qe.loading(r.render, { ...a, ...r }));
855
+ r && (i = ta(r) ? Ke.loading(r, a) : Ke.loading(r.render, { ...a, ...r }));
856
856
  let s = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, o = (c, f, u) => {
857
857
  if (f == null) {
858
- qe.dismiss(i);
858
+ Ke.dismiss(i);
859
859
  return;
860
860
  }
861
861
  let d = { type: c, ...s, ...a, data: u }, p = ta(f) ? { render: f } : f;
862
- return i ? qe.update(i, { ...d, ...p }) : qe(p.render, { ...d, ...p }), u;
862
+ return i ? Ke.update(i, { ...d, ...p }) : Ke(p.render, { ...d, ...p }), u;
863
863
  }, l = mn(e) ? e() : e;
864
864
  return l.then((c) => o("success", n, c)).catch((c) => o("error", t, c)), l;
865
865
  }
866
- qe.promise = jm;
867
- qe.success = Ao("success");
868
- qe.info = Ao("info");
869
- qe.error = Ao("error");
870
- qe.warning = Ao("warning");
871
- qe.warn = qe.warning;
872
- qe.dark = (e, r) => Ki(e, Fo("default", { theme: "dark", ...r }));
866
+ Ke.promise = jm;
867
+ Ke.success = Ao("success");
868
+ Ke.info = Ao("info");
869
+ Ke.error = Ao("error");
870
+ Ke.warning = Ao("warning");
871
+ Ke.warn = Ke.warning;
872
+ Ke.dark = (e, r) => Ki(e, Fo("default", { theme: "dark", ...r }));
873
873
  function $m(e) {
874
874
  Nm(e);
875
875
  }
876
- qe.dismiss = $m;
877
- qe.clearWaitingQueue = Im;
878
- qe.isActive = th;
879
- qe.update = (e, r = {}) => {
876
+ Ke.dismiss = $m;
877
+ Ke.clearWaitingQueue = Im;
878
+ Ke.isActive = th;
879
+ Ke.update = (e, r = {}) => {
880
880
  let t = Dm(e, r);
881
881
  if (t) {
882
882
  let { props: n, content: a } = t, i = { delay: 100, ...n, ...r, toastId: r.toastId || e, updateId: Qd() };
@@ -885,12 +885,12 @@ qe.update = (e, r = {}) => {
885
885
  delete i.render, Ki(s, i);
886
886
  }
887
887
  };
888
- qe.done = (e) => {
889
- qe.update(e, { progress: 1 });
888
+ Ke.done = (e) => {
889
+ Ke.update(e, { progress: 1 });
890
890
  };
891
- qe.onChange = Mm;
892
- qe.play = (e) => nh(!0, e);
893
- qe.pause = (e) => nh(!1, e);
891
+ Ke.onChange = Mm;
892
+ Ke.play = (e) => nh(!0, e);
893
+ Ke.pause = (e) => nh(!1, e);
894
894
  function Um(e) {
895
895
  var r;
896
896
  let { subscribe: t, getSnapshot: n, setProps: a } = Be(Lm(e)).current;
@@ -998,7 +998,7 @@ function tg(e) {
998
998
  return mn(c) ? c({ position: m, rtl: u, defaultClassName: v }) : Ze(v, ec(c));
999
999
  }
1000
1000
  function x() {
1001
- t && (a(!0), qe.play());
1001
+ t && (a(!0), Ke.play());
1002
1002
  }
1003
1003
  return Hm(() => {
1004
1004
  var m;
@@ -1015,13 +1015,13 @@ function tg(e) {
1015
1015
  function m(v) {
1016
1016
  var y;
1017
1017
  let g = i.current;
1018
- p(v) && ((y = g.querySelector('[tabIndex="0"]')) == null || y.focus(), a(!1), qe.pause()), v.key === "Escape" && (document.activeElement === g || g != null && g.contains(document.activeElement)) && (a(!0), qe.play());
1018
+ p(v) && ((y = g.querySelector('[tabIndex="0"]')) == null || y.focus(), a(!1), Ke.pause()), v.key === "Escape" && (document.activeElement === g || g != null && g.contains(document.activeElement)) && (a(!0), Ke.play());
1019
1019
  }
1020
1020
  return document.addEventListener("keydown", m), () => {
1021
1021
  document.removeEventListener("keydown", m);
1022
1022
  };
1023
1023
  }, [p]), ue.createElement("section", { ref: i, className: "Toastify", id: d, onMouseEnter: () => {
1024
- t && (a(!1), qe.pause());
1024
+ t && (a(!1), Ke.pause());
1025
1025
  }, onMouseLeave: x, "aria-live": "polite", "aria-atomic": "false", "aria-relevant": "additions text", "aria-label": r["aria-label"] }, s((m, v) => {
1026
1026
  let y = v.length ? { ...f } : { ...f, pointerEvents: "none" };
1027
1027
  return ue.createElement("div", { tabIndex: -1, className: h(m), "data-stacked": t, style: y, key: `c-${m}` }, v.map(({ content: g, props: S }) => ue.createElement(Jm, { ...S, stacked: t, collapseAll: x, isIn: o(S.toastId, S.containerId), key: `t-${S.key}` }, g)));
@@ -4018,9 +4018,9 @@ function Ry({ onSubmit: e }) {
4018
4018
  Rr
4019
4019
  ), t = jn("config");
4020
4020
  function n() {
4021
- localStorage.setItem("formData", JSON.stringify(r)), e(r), qe.success("Saved successfully");
4021
+ localStorage.setItem("formData", JSON.stringify(r)), e(r);
4022
4022
  }
4023
- return /* @__PURE__ */ T.jsx("div", { className: "px-[30px] py-4 flex justify-end items-center fixed z-[999] w-full bg-white bottom-0 border-t", children: /* @__PURE__ */ T.jsx(
4023
+ return /* @__PURE__ */ T.jsx("div", { className: "px-[30px] py-3 flex justify-end items-center w-full", children: /* @__PURE__ */ T.jsx(
4024
4024
  Ra,
4025
4025
  {
4026
4026
  onClick: () => n(),
@@ -7853,12 +7853,12 @@ var tn = function(e) {
7853
7853
  }, [me, ve, Fe, _e, re]);
7854
7854
  var tt = function() {
7855
7855
  return x != null && me !== "-" && (!Y || me !== Y) ? ci(at(at({}, oe), { decimalScale: _e ? void 0 : g, value: String(x) })) : me;
7856
- }, Ke = at({ type: "text", inputMode: "decimal", id: s, name: o, className: l, onChange: Le, onBlur: xt, onFocus: He, onKeyDown: Ie, onKeyUp: Ve, placeholder: y, disabled: p, value: tt(), ref: Fe }, H);
7856
+ }, Xe = at({ type: "text", inputMode: "decimal", id: s, name: o, className: l, onChange: Le, onBlur: xt, onFocus: He, onKeyDown: Ie, onKeyUp: Ve, placeholder: y, disabled: p, value: tt(), ref: Fe }, H);
7857
7857
  if (c) {
7858
7858
  var Ht = c;
7859
- return ue.createElement(Ht, at({}, Ke));
7859
+ return ue.createElement(Ht, at({}, Xe));
7860
7860
  }
7861
- return ue.createElement("input", at({}, Ke));
7861
+ return ue.createElement("input", at({}, Xe));
7862
7862
  });
7863
7863
  zo.displayName = "CurrencyInput";
7864
7864
  const rt = ({
@@ -8842,10 +8842,10 @@ function f_(e = {}) {
8842
8842
  }), xt)
8843
8843
  return f.isValid && (r.mode === "onBlur" ? He && m() : m()), tt && u.state.next({ name: re, ...Ie ? {} : Ve });
8844
8844
  if (!He && Ie && u.state.next({ ...t }), r.resolver) {
8845
- const { errors: Ke } = await E([re]);
8845
+ const { errors: Xe } = await E([re]);
8846
8846
  if (be(Le), we) {
8847
- const Ht = g0(t.errors, n, re), it = g0(Ke, n, Ht.name || re);
8848
- Fe = it.error, re = it.name, De = er(Ke);
8847
+ const Ht = g0(t.errors, n, re), it = g0(Xe, n, Ht.name || re);
8848
+ Fe = it.error, re = it.name, De = er(Xe);
8849
8849
  }
8850
8850
  } else
8851
8851
  v([re], !0), Fe = (await Sc(xe, i, h, r.shouldUseNativeValidation))[re], v([re]), be(Le), we && (Fe ? De = !1 : f.isValid && (De = await C(n, !0)));
@@ -13638,9 +13638,9 @@ function Rk() {
13638
13638
  for (let Ve = 0; Ve < Le.length; Ve++) {
13639
13639
  let tt = Le[Ve];
13640
13640
  if (He[tt = _(E.transformHeader) ? E.transformHeader(tt, Ve) : tt]) {
13641
- let Ke, Ht = He[tt];
13642
- for (; Ke = tt + "_" + Ht, Ht++, xt.has(Ke); ) ;
13643
- xt.add(Ke), Le[Ve] = Ke, He[tt]++, Ie = !0, (ne = ne === null ? {} : ne)[Ke] = tt;
13641
+ let Xe, Ht = He[tt];
13642
+ for (; Xe = tt + "_" + Ht, Ht++, xt.has(Xe); ) ;
13643
+ xt.add(Xe), Le[Ve] = Xe, He[tt]++, Ie = !0, (ne = ne === null ? {} : ne)[Xe] = tt;
13644
13644
  } else He[tt] = 1, Le[Ve] = tt;
13645
13645
  xt.add(tt);
13646
13646
  }
@@ -15702,7 +15702,7 @@ var cS = /* @__PURE__ */ function() {
15702
15702
  var B = St(50 + Math.floor(A.length * 1.1)), w = xt(A, B);
15703
15703
  return B.slice(0, w);
15704
15704
  }
15705
- var Ve = ie ? new Uint16Array(32768) : be(32768), tt = ie ? new Uint16Array(32768) : be(32768), Ke = ie ? new Uint16Array(128) : be(128), Ht = 1, it = 1;
15705
+ var Ve = ie ? new Uint16Array(32768) : be(32768), tt = ie ? new Uint16Array(32768) : be(32768), Xe = ie ? new Uint16Array(128) : be(128), Ht = 1, it = 1;
15706
15706
  function Ot(A, B) {
15707
15707
  var w = Ee(A, B) + 257;
15708
15708
  B += 5;
@@ -15719,11 +15719,11 @@ var cS = /* @__PURE__ */ function() {
15719
15719
  for (ge = 0; ge < fe; ++ge)
15720
15720
  if (ye = X[ge], ye != 0) {
15721
15721
  Te = le[te[ge]] >> 8 - ye;
15722
- for (var ke = (1 << 7 - ye) - 1; ke >= 0; --ke) Ke[Te | ke << ye] = ye & 7 | ge << 3;
15722
+ for (var ke = (1 << 7 - ye) - 1; ke >= 0; --ke) Xe[Te | ke << ye] = ye & 7 | ge << 3;
15723
15723
  }
15724
15724
  var Re = [];
15725
15725
  for (G = 1; Re.length < w + F; )
15726
- switch (Te = Ke[ve(A, B)], B += Te & 7, Te >>>= 3) {
15726
+ switch (Te = Xe[ve(A, B)], B += Te & 7, Te >>>= 3) {
15727
15727
  case 16:
15728
15728
  for (I = 3 + Ae(A, B), B += 2, Te = Re[Re.length - 1]; I-- > 0; ) Re.push(Te);
15729
15729
  break;
@@ -16830,8 +16830,8 @@ function Ya(e) {
16830
16830
  var r = e.indexOf(":");
16831
16831
  return r == -1 ? { s: ir(e), e: ir(e) } : { s: ir(e.slice(0, r)), e: ir(e.slice(r + 1)) };
16832
16832
  }
16833
- function Xe(e, r) {
16834
- return typeof r > "u" || typeof r == "number" ? Xe(e.s, e.e) : (typeof e != "string" && (e = Me(e)), typeof r != "string" && (r = Me(r)), e == r ? e : e + ":" + r);
16833
+ function qe(e, r) {
16834
+ return typeof r > "u" || typeof r == "number" ? qe(e.s, e.e) : (typeof e != "string" && (e = Me(e)), typeof r != "string" && (r = Me(r)), e == r ? e : e + ":" + r);
16835
16835
  }
16836
16836
  function pt(e) {
16837
16837
  var r = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } }, t = 0, n = 0, a = 0, i = e.length;
@@ -16903,7 +16903,7 @@ function g1(e, r, t) {
16903
16903
  }
16904
16904
  }
16905
16905
  }
16906
- return c.s.c < 1e7 && (i["!ref"] = Xe(c)), i;
16906
+ return c.s.c < 1e7 && (i["!ref"] = qe(c)), i;
16907
16907
  }
16908
16908
  function Ja(e, r) {
16909
16909
  return g1(null, e, r);
@@ -19850,7 +19850,7 @@ var qA = [2, 3, 48, 49, 131, 139, 140, 245], Sd = /* @__PURE__ */ function() {
19850
19850
  if (!k && C()) break e;
19851
19851
  break;
19852
19852
  }
19853
- return S - g > 0 && C(), h["!ref"] = Xe(x), h;
19853
+ return S - g > 0 && C(), h["!ref"] = qe(x), h;
19854
19854
  }
19855
19855
  function s(f, u) {
19856
19856
  return !(u && u.PRN) || u.FS || f.slice(0, 4) == "sep=" || f.indexOf(" ") >= 0 || f.indexOf(",") >= 0 || f.indexOf(";") >= 0 ? i(f, u) : Ja(r(f, u), u);
@@ -19969,7 +19969,7 @@ var Si = /* @__PURE__ */ function() {
19969
19969
  case 14:
19970
19970
  /* NUMBER */
19971
19971
  case 16:
19972
- z == 14 && (ve[2] & 112) == 112 && (ve[2] & 15) > 1 && (ve[2] & 15) < 15 && (ve[1].z = H.dateNF || je[14], H.cellDates && (ve[1].t = "d", ve[1].v = Qo(ve[1].v))), H.qpro && ve[3] > oe && (V["!ref"] = Xe(L), ie[Y] = V, le.push(Y), V = H.dense ? [] : {}, L = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }, oe = ve[3], Y = de || "Sheet" + (oe + 1), de = "");
19972
+ z == 14 && (ve[2] & 112) == 112 && (ve[2] & 15) > 1 && (ve[2] & 15) < 15 && (ve[1].z = H.dateNF || je[14], H.cellDates && (ve[1].t = "d", ve[1].v = Qo(ve[1].v))), H.qpro && ve[3] > oe && (V["!ref"] = qe(L), ie[Y] = V, le.push(Y), V = H.dense ? [] : {}, L = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }, oe = ve[3], Y = de || "Sheet" + (oe + 1), de = "");
19973
19973
  var re = H.dense ? (V[ve[0].r] || [])[ve[0].c] : V[Me(ve[0])];
19974
19974
  if (re) {
19975
19975
  re.t = ve[1].t, re.v = ve[1].v, ve[1].z != null && (re.z = ve[1].z), ve[1].f != null && (re.f = ve[1].f);
@@ -20000,7 +20000,7 @@ var Si = /* @__PURE__ */ function() {
20000
20000
  case 39:
20001
20001
  /* NUMBER27 */
20002
20002
  case 40:
20003
- if (ve[3] > oe && (V["!ref"] = Xe(L), ie[Y] = V, le.push(Y), V = H.dense ? [] : {}, L = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }, oe = ve[3], Y = "Sheet" + (oe + 1)), Ae > 0 && ve[0].r >= Ae) break;
20003
+ if (ve[3] > oe && (V["!ref"] = qe(L), ie[Y] = V, le.push(Y), V = H.dense ? [] : {}, L = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }, oe = ve[3], Y = "Sheet" + (oe + 1)), Ae > 0 && ve[0].r >= Ae) break;
20004
20004
  H.dense ? (V[ve[0].r] || (V[ve[0].r] = []), V[ve[0].r][ve[0].c] = ve[1]) : V[Me(ve[0])] = ve[1], L.e.c < ve[0].c && (L.e.c = ve[0].c), L.e.r < ve[0].r && (L.e.r = ve[0].r);
20005
20005
  break;
20006
20006
  case 27:
@@ -20012,7 +20012,7 @@ var Si = /* @__PURE__ */ function() {
20012
20012
  }
20013
20013
  }, H);
20014
20014
  else throw new Error("Unrecognized LOTUS BOF " + P[2]);
20015
- if (V["!ref"] = Xe(L), ie[de || Y] = V, le.push(de || Y), !me.length) return { SheetNames: le, Sheets: ie };
20015
+ if (V["!ref"] = qe(L), ie[de || Y] = V, le.push(de || Y), !me.length) return { SheetNames: le, Sheets: ie };
20016
20016
  for (var _e = {}, Ce = [], Ee = 0; Ee < me.length; ++Ee) ie[le[Ee]] ? (Ce.push(me[Ee] || le[Ee]), _e[me[Ee]] = ie[me[Ee]] || ie[le[Ee]]) : (Ce.push(me[Ee]), _e[me[Ee]] = { "!ref": "A1" });
20017
20017
  return { SheetNames: Ce, Sheets: _e };
20018
20018
  }
@@ -21195,7 +21195,7 @@ var A4 = /* @__PURE__ */ function() {
21195
21195
  p = d.lastIndex;
21196
21196
  }
21197
21197
  x > c.e.c && (c.e.c = x);
21198
- }), o["!ref"] = Xe(c), o;
21198
+ }), o["!ref"] = qe(c), o;
21199
21199
  }
21200
21200
  function t(a, i) {
21201
21201
  return $n(e(a, i), i);
@@ -22308,7 +22308,7 @@ function Fd(e, r, t, n) {
22308
22308
  i = { t: "z" }, a ? e[o.r][o.c] = i : e[s.ref] = i;
22309
22309
  var l = pt(e["!ref"] || "BDWGO1000001:A1");
22310
22310
  l.s.r > o.r && (l.s.r = o.r), l.e.r < o.r && (l.e.r = o.r), l.s.c > o.c && (l.s.c = o.c), l.e.c < o.c && (l.e.c = o.c);
22311
- var c = Xe(l);
22311
+ var c = qe(l);
22312
22312
  c !== e["!ref"] && (e["!ref"] = c);
22313
22313
  }
22314
22314
  i.c || (i.c = []);
@@ -24761,7 +24761,7 @@ function Q1(e, r, t, n, a, i) {
24761
24761
  }
24762
24762
  function sO(e, r) {
24763
24763
  var t = pt(r);
24764
- t.s.r <= t.e.r && t.s.c <= t.e.c && t.s.r >= 0 && t.s.c >= 0 && (e["!ref"] = Xe(t));
24764
+ t.s.r <= t.e.r && t.s.c <= t.e.c && t.s.r >= 0 && t.s.c >= 0 && (e["!ref"] = qe(t));
24765
24765
  }
24766
24766
  var oO = /<(?:\w:)?mergeCell ref="[A-Z0-9:]+"\s*[\/]?>/g, lO = /<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/, cO = /<(?:\w:)?hyperlink [^>]*>/mg, fO = /"(\w*:\w*)"/, uO = /<(?:\w:)?col\b[^>]*[\/]?>/g, dO = /<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g, hO = /<(?:\w:)?pageMargins[^>]*\/>/g, em = /<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/, pO = /<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/, xO = /<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;
24767
24767
  function mO(e, r, t, n, a, i, s) {
@@ -24792,9 +24792,9 @@ function mO(e, r, t, n, a, i, s) {
24792
24792
  var O = f.match(cO);
24793
24793
  O && vO(o, O, n);
24794
24794
  var k = f.match(hO);
24795
- if (k && (o["!margins"] = yO(Pe(k[0]))), !o["!ref"] && l.e.c >= l.s.c && l.e.r >= l.s.r && (o["!ref"] = Xe(l)), r.sheetRows > 0 && o["!ref"]) {
24795
+ if (k && (o["!margins"] = yO(Pe(k[0]))), !o["!ref"] && l.e.c >= l.s.c && l.e.r >= l.s.r && (o["!ref"] = qe(l)), r.sheetRows > 0 && o["!ref"]) {
24796
24796
  var _ = pt(o["!ref"]);
24797
- r.sheetRows <= +_.e.r && (_.e.r = r.sheetRows - 1, _.e.r > l.e.r && (_.e.r = l.e.r), _.e.r < _.s.r && (_.s.r = _.e.r), _.e.c > l.e.c && (_.e.c = l.e.c), _.e.c < _.s.c && (_.s.c = _.e.c), o["!fullref"] = o["!ref"], o["!ref"] = Xe(_));
24797
+ r.sheetRows <= +_.e.r && (_.e.r = r.sheetRows - 1, _.e.r > l.e.r && (_.e.r = l.e.r), _.e.r < _.s.r && (_.s.r = _.e.r), _.e.c > l.e.c && (_.e.c = l.e.c), _.e.c < _.s.c && (_.s.c = _.e.c), o["!fullref"] = o["!ref"], o["!ref"] = qe(_));
24798
24798
  }
24799
24799
  return m.length > 0 && (o["!cols"] = m), g.length > 0 && (o["!merges"] = g), o;
24800
24800
  }
@@ -25195,7 +25195,7 @@ function nR(e, r, t, n, a, i, s) {
25195
25195
  if ((x = s.CellXf[U[0].iStyleRef]) && Q1(h, x.numFmtId, null, o, i, s), v = U[0].c == -1 ? v + 1 : U[0].c, o.dense ? (l[m] || (l[m] = []), l[m][v] = h) : l[At(v) + S] = h, o.cellFormula) {
25196
25196
  for (E = !1, _ = 0; _ < b.length; ++_) {
25197
25197
  var P = b[_];
25198
- p.r >= P[0].s.r && p.r <= P[0].e.r && v >= P[0].s.c && v <= P[0].e.c && (h.F = Xe(P[0]), E = !0);
25198
+ p.r >= P[0].s.r && p.r <= P[0].e.r && v >= P[0].s.c && v <= P[0].e.c && (h.F = qe(P[0]), E = !0);
25199
25199
  }
25200
25200
  !E && U.length > 3 && (h.f = U[3]);
25201
25201
  }
@@ -25224,7 +25224,7 @@ function nR(e, r, t, n, a, i, s) {
25224
25224
  break;
25225
25225
  case 426:
25226
25226
  if (!o.cellFormula) break;
25227
- b.push(U), O = o.dense ? l[m][v] : l[At(v) + S], O.f = zt(U[1], f, { r: p.r, c: v }, D, o), O.F = Xe(U[0]);
25227
+ b.push(U), O = o.dense ? l[m][v] : l[At(v) + S], O.f = zt(U[1], f, { r: p.r, c: v }, D, o), O.F = qe(U[0]);
25228
25228
  break;
25229
25229
  case 427:
25230
25230
  if (!o.cellFormula) break;
@@ -25237,7 +25237,7 @@ function nR(e, r, t, n, a, i, s) {
25237
25237
  W[U.e--] = { width: U.w / 256, hidden: !!(U.flags & 1), level: U.level }, ne || (ne = !0, ru(U.w / 256)), Ua(W[U.e + 1]);
25238
25238
  break;
25239
25239
  case 161:
25240
- l["!autofilter"] = { ref: Xe(U) };
25240
+ l["!autofilter"] = { ref: qe(U) };
25241
25241
  break;
25242
25242
  case 476:
25243
25243
  l["!margins"] = U;
@@ -25373,9 +25373,9 @@ function nR(e, r, t, n, a, i, s) {
25373
25373
  if (!u || o.WTF) throw new Error("Unexpected record 0x" + ce.toString(16));
25374
25374
  }
25375
25375
  }
25376
- }, o), delete o.supbooks, delete o["!row"], !l["!ref"] && (f.s.r < 2e6 || c && (c.e.r > 0 || c.e.c > 0 || c.s.r > 0 || c.s.c > 0)) && (l["!ref"] = Xe(c || f)), o.sheetRows && l["!ref"]) {
25376
+ }, o), delete o.supbooks, delete o["!row"], !l["!ref"] && (f.s.r < 2e6 || c && (c.e.r > 0 || c.e.c > 0 || c.s.r > 0 || c.s.c > 0)) && (l["!ref"] = qe(c || f)), o.sheetRows && l["!ref"]) {
25377
25377
  var J = pt(l["!ref"]);
25378
- o.sheetRows <= +J.e.r && (J.e.r = o.sheetRows - 1, J.e.r > f.e.r && (J.e.r = f.e.r), J.e.r < J.s.r && (J.s.r = J.e.r), J.e.c > f.e.c && (J.e.c = f.e.c), J.e.c < J.s.c && (J.s.c = J.e.c), l["!fullref"] = l["!ref"], l["!ref"] = Xe(J));
25378
+ o.sheetRows <= +J.e.r && (J.e.r = o.sheetRows - 1, J.e.r > f.e.r && (J.e.r = f.e.r), J.e.r < J.s.r && (J.s.r = J.e.r), J.e.c > f.e.c && (J.e.c = f.e.c), J.e.c < J.s.c && (J.s.c = J.e.c), l["!fullref"] = l["!ref"], l["!ref"] = qe(J));
25379
25379
  }
25380
25380
  return k.length > 0 && (l["!merges"] = k), W.length > 0 && (l["!cols"] = W), Z.length > 0 && (l["!rows"] = Z), l;
25381
25381
  }
@@ -25399,7 +25399,7 @@ function iR(e, r, t, n, a, i) {
25399
25399
  f.s.r = f.s.c = 0, f.e.c = o, c = At(o), d[0].forEach(function(p, h) {
25400
25400
  s[c + Ut(h)] = { t: "n", v: p, z: d[1] }, l = h;
25401
25401
  }), f.e.r < l && (f.e.r = l), ++o;
25402
- }), o > 0 && (s["!ref"] = Xe(f)), s;
25402
+ }), o > 0 && (s["!ref"] = qe(f)), s;
25403
25403
  }
25404
25404
  function sR(e, r, t, n, a) {
25405
25405
  if (!e) return e;
@@ -26111,7 +26111,7 @@ function Yl(e, r) {
26111
26111
  case "worksheet":
26112
26112
  if (o[1] === "/") {
26113
26113
  if ((c = l.pop())[0] !== o[3]) throw new Error("Bad state: " + c.join("|"));
26114
- u.push(p), S.s.r <= S.e.r && S.s.c <= S.e.c && (d["!ref"] = Xe(S), t.sheetRows && t.sheetRows <= S.e.r && (d["!fullref"] = d["!ref"], S.e.r = t.sheetRows - 1, d["!ref"] = Xe(S))), b.length && (d["!merges"] = b), Q.length > 0 && (d["!cols"] = Q), he.length > 0 && (d["!rows"] = he), f[p] = d;
26114
+ u.push(p), S.s.r <= S.e.r && S.s.c <= S.e.c && (d["!ref"] = qe(S), t.sheetRows && t.sheetRows <= S.e.r && (d["!fullref"] = d["!ref"], S.e.r = t.sheetRows - 1, d["!ref"] = qe(S))), b.length && (d["!merges"] = b), Q.length > 0 && (d["!cols"] = Q), he.length > 0 && (d["!rows"] = he), f[p] = d;
26115
26115
  } else
26116
26116
  S = { s: { r: 2e6, c: 2e6 }, e: { r: 0, c: 0 } }, g = y = 0, l.push([o[3], !1]), c = Ir(o[0]), p = Ye(c.Name), d = t.dense ? [] : {}, b = [], U = [], he = [], V = { name: p, Hidden: 0 }, H.Sheets.push(V);
26117
26117
  break;
@@ -27053,18 +27053,18 @@ function HR(e, r) {
27053
27053
  var t = { opts: {} }, n = {}, a = r.dense ? [] : {}, i = {}, s = {}, o = null, l = [], c = "", f = {}, u, d = "", p, h, x, m, v = {}, y = [], g, S, O = [], k = [], _ = { Sheets: [], WBProps: { date1904: !1 }, Views: [{}] }, E = {}, b = function(Ie) {
27054
27054
  return Ie < 8 ? ea[Ie] : Ie < 64 && k[Ie - 8] || ea[Ie];
27055
27055
  }, C = function(Ie, Ve, tt) {
27056
- var Ke = Ve.XF.data;
27057
- if (!(!Ke || !Ke.patternType || !tt || !tt.cellStyles)) {
27058
- Ve.s = {}, Ve.s.patternType = Ke.patternType;
27056
+ var Xe = Ve.XF.data;
27057
+ if (!(!Xe || !Xe.patternType || !tt || !tt.cellStyles)) {
27058
+ Ve.s = {}, Ve.s.patternType = Xe.patternType;
27059
27059
  var Ht;
27060
- (Ht = Vi(b(Ke.icvFore))) && (Ve.s.fgColor = { rgb: Ht }), (Ht = Vi(b(Ke.icvBack))) && (Ve.s.bgColor = { rgb: Ht });
27060
+ (Ht = Vi(b(Xe.icvFore))) && (Ve.s.fgColor = { rgb: Ht }), (Ht = Vi(b(Xe.icvBack))) && (Ve.s.bgColor = { rgb: Ht });
27061
27061
  }
27062
27062
  }, D = function(Ie, Ve, tt) {
27063
27063
  if (!(ce > 1) && !(tt.sheetRows && Ie.r >= tt.sheetRows)) {
27064
27064
  if (tt.cellStyles && Ve.XF && Ve.XF.data && C(Ie, Ve, tt), delete Ve.ixfe, delete Ve.XF, u = Ie, d = Me(Ie), (!s || !s.s || !s.e) && (s = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }), Ie.r < s.s.r && (s.s.r = Ie.r), Ie.c < s.s.c && (s.s.c = Ie.c), Ie.r + 1 > s.e.r && (s.e.r = Ie.r + 1), Ie.c + 1 > s.e.c && (s.e.c = Ie.c + 1), tt.cellFormula && Ve.f) {
27065
- for (var Ke = 0; Ke < y.length; ++Ke)
27066
- if (!(y[Ke][0].s.c > Ie.c || y[Ke][0].s.r > Ie.r) && !(y[Ke][0].e.c < Ie.c || y[Ke][0].e.r < Ie.r)) {
27067
- Ve.F = Xe(y[Ke][0]), (y[Ke][0].s.c != Ie.c || y[Ke][0].s.r != Ie.r) && delete Ve.f, Ve.f && (Ve.f = "" + zt(y[Ke][1], s, Ie, U, N));
27065
+ for (var Xe = 0; Xe < y.length; ++Xe)
27066
+ if (!(y[Xe][0].s.c > Ie.c || y[Xe][0].s.r > Ie.r) && !(y[Xe][0].e.c < Ie.c || y[Xe][0].e.r < Ie.r)) {
27067
+ Ve.F = qe(y[Xe][0]), (y[Xe][0].s.c != Ie.c || y[Xe][0].s.r != Ie.r) && delete Ve.f, Ve.f && (Ve.f = "" + zt(y[Xe][1], s, Ie, U, N));
27068
27068
  break;
27069
27069
  }
27070
27070
  }
@@ -27198,7 +27198,7 @@ function HR(e, r) {
27198
27198
  V = {
27199
27199
  Name: L.Name,
27200
27200
  Ref: zt(L.rgce, s, null, U, N)
27201
- }, L.itab > 0 && (V.Sheet = L.itab - 1), U.names.push(V), U[0] || (U[0] = [], U[0].XTI = []), U[U.length - 1].push(L), L.Name == "_xlnm._FilterDatabase" && L.itab > 0 && L.rgce && L.rgce[0] && L.rgce[0][0] && L.rgce[0][0][0] == "PtgArea3d" && (H[L.itab - 1] = { ref: Xe(L.rgce[0][0][1][2]) });
27201
+ }, L.itab > 0 && (V.Sheet = L.itab - 1), U.names.push(V), U[0] || (U[0] = [], U[0].XTI = []), U[U.length - 1].push(L), L.Name == "_xlnm._FilterDatabase" && L.itab > 0 && L.rgce && L.rgce[0] && L.rgce[0][0] && L.rgce[0][0][0] == "PtgArea3d" && (H[L.itab - 1] = { ref: qe(L.rgce[0][0][1][2]) });
27202
27202
  break;
27203
27203
  case 22:
27204
27204
  N.ExternCount = L;
@@ -27225,9 +27225,9 @@ function HR(e, r) {
27225
27225
  if (--ce) break;
27226
27226
  if (s.e) {
27227
27227
  if (s.e.r > 0 && s.e.c > 0) {
27228
- if (s.e.r--, s.e.c--, a["!ref"] = Xe(s), r.sheetRows && r.sheetRows <= s.e.r) {
27228
+ if (s.e.r--, s.e.c--, a["!ref"] = qe(s), r.sheetRows && r.sheetRows <= s.e.r) {
27229
27229
  var _e = s.e.r;
27230
- s.e.r = r.sheetRows - 1, a["!fullref"] = a["!ref"], a["!ref"] = Xe(s), s.e.r = _e;
27230
+ s.e.r = r.sheetRows - 1, a["!fullref"] = a["!ref"], a["!ref"] = qe(s), s.e.r = _e;
27231
27231
  }
27232
27232
  s.e.r++, s.e.c++;
27233
27233
  }
@@ -27321,7 +27321,7 @@ function HR(e, r) {
27321
27321
  var xe = Me(L[0].s);
27322
27322
  if (p = r.dense ? (a[L[0].s.r] || [])[L[0].s.c] : a[xe], r.cellFormula && p) {
27323
27323
  if (!o || !xe || !p) break;
27324
- p.f = "" + zt(L[1], s, L[0], U, N), p.F = Xe(L[0]);
27324
+ p.f = "" + zt(L[1], s, L[0], U, N), p.F = qe(L[0]);
27325
27325
  }
27326
27326
  }
27327
27327
  break;
@@ -33526,7 +33526,7 @@ function Ld(e, r) {
33526
33526
  }
33527
33527
  }
33528
33528
  }
33529
- return n["!ref"] = Xe(p), h.length && (n["!merges"] = h), n;
33529
+ return n["!ref"] = qe(p), h.length && (n["!merges"] = h), n;
33530
33530
  }
33531
33531
  function zR(e, r, t, n) {
33532
33532
  for (var a = e["!merges"] || [], i = [], s = r.s.c; s <= r.e.c; ++s) {
@@ -33606,7 +33606,7 @@ function om(e, r, t) {
33606
33606
  }
33607
33607
  ++x;
33608
33608
  }
33609
- return u.length && (e["!merges"] = (e["!merges"] || []).concat(u)), c.e.r = Math.max(c.e.r, x - 1 + a), e["!ref"] = Xe(c), x >= l && (e["!fullref"] = Xe((c.e.r = o.length - h + x - 1 + a, c))), e;
33609
+ return u.length && (e["!merges"] = (e["!merges"] || []).concat(u)), c.e.r = Math.max(c.e.r, x - 1 + a), e["!ref"] = qe(c), x >= l && (e["!fullref"] = qe((c.e.r = o.length - h + x - 1 + a, c))), e;
33610
33610
  }
33611
33611
  function lm(e, r) {
33612
33612
  var t = r || {}, n = t.dense ? [] : {};
@@ -33648,7 +33648,7 @@ function cm(e, r) {
33648
33648
  for ($i.lastIndex = 0, n = n.replace(/<!--([\s\S]*?)-->/mg, "").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm, ""); x = $i.exec(n); ) switch (x[3] = x[3].replace(/_.*$/, "")) {
33649
33649
  case "table":
33650
33650
  case "工作表":
33651
- x[1] === "/" ? (_.e.c >= _.s.c && _.e.r >= _.s.r ? h["!ref"] = Xe(_) : h["!ref"] = "A1:A1", t.sheetRows > 0 && t.sheetRows <= _.e.r && (h["!fullref"] = h["!ref"], _.e.r = t.sheetRows - 1, h["!ref"] = Xe(_)), C.length && (h["!merges"] = C), Z.length && (h["!rows"] = Z), f.name = f.名称 || f.name, typeof JSON < "u" && JSON.stringify(f), p.push(f.name), d[f.name] = h, Y = !1) : x[0].charAt(x[0].length - 2) !== "/" && (f = Pe(x[0], !1), O = k = -1, _.s.r = _.s.c = 1e7, _.e.r = _.e.c = 0, h = t.dense ? [] : {}, C = [], Z = [], Y = !0);
33651
+ x[1] === "/" ? (_.e.c >= _.s.c && _.e.r >= _.s.r ? h["!ref"] = qe(_) : h["!ref"] = "A1:A1", t.sheetRows > 0 && t.sheetRows <= _.e.r && (h["!fullref"] = h["!ref"], _.e.r = t.sheetRows - 1, h["!ref"] = qe(_)), C.length && (h["!merges"] = C), Z.length && (h["!rows"] = Z), f.name = f.名称 || f.name, typeof JSON < "u" && JSON.stringify(f), p.push(f.name), d[f.name] = h, Y = !1) : x[0].charAt(x[0].length - 2) !== "/" && (f = Pe(x[0], !1), O = k = -1, _.s.r = _.s.c = 1e7, _.e.r = _.e.c = 0, h = t.dense ? [] : {}, C = [], Z = [], Y = !0);
33652
33652
  break;
33653
33653
  case "table-row-group":
33654
33654
  x[1] === "/" ? --E : ++E;
@@ -33682,7 +33682,7 @@ function cm(e, r) {
33682
33682
  v: null
33683
33683
  /*:: , z:null, w:"",c:[]*/
33684
33684
  }, t.cellFormula)
33685
- if (v.formula && (v.formula = Ye(v.formula)), v["number-matrix-columns-spanned"] && v["number-matrix-rows-spanned"] && (N = parseInt(v["number-matrix-rows-spanned"], 10) || 0, W = parseInt(v["number-matrix-columns-spanned"], 10) || 0, D = { s: { r: O, c: k }, e: { r: O + N - 1, c: k + W - 1 } }, m.F = Xe(D), J.push([D, m.F])), v.formula) m.f = Dd(v.formula);
33685
+ if (v.formula && (v.formula = Ye(v.formula)), v["number-matrix-columns-spanned"] && v["number-matrix-rows-spanned"] && (N = parseInt(v["number-matrix-rows-spanned"], 10) || 0, W = parseInt(v["number-matrix-columns-spanned"], 10) || 0, D = { s: { r: O, c: k }, e: { r: O + N - 1, c: k + W - 1 } }, m.F = qe(D), J.push([D, m.F])), v.formula) m.f = Dd(v.formula);
33686
33686
  else for (de = 0; de < J.length; ++de)
33687
33687
  O >= J[de][0].s.r && O <= J[de][0].e.r && k >= J[de][0].s.c && k <= J[de][0].e.c && (m.F = J[de][1]);
33688
33688
  switch ((v["number-columns-spanned"] || v["number-rows-spanned"]) && (N = parseInt(v["number-rows-spanned"], 10) || 0, W = parseInt(v["number-columns-spanned"], 10) || 0, D = { s: { r: O, c: k }, e: { r: O + N - 1, c: k + W - 1 } }, C.push(D)), v["number-columns-repeated"] && (Q = parseInt(v["number-columns-repeated"], 10)), m.t) {
@@ -34562,7 +34562,7 @@ function cD(e, r, t) {
34562
34562
  throw new Error("Invalid row varint ".concat(a[6][0].data));
34563
34563
  if (i.e.c = (Ct(a[7][0].data) >>> 0) - 1, i.e.c < 0)
34564
34564
  throw new Error("Invalid col varint ".concat(a[7][0].data));
34565
- t["!ref"] = Xe(i);
34565
+ t["!ref"] = qe(i);
34566
34566
  var s = Yt(a[4][0].data), o = Vd(e, e[In(s[4][0].data)][0]), l = (n = s[17]) != null && n[0] ? Vd(e, e[In(s[17][0].data)][0]) : [], c = Yt(s[3][0].data), f = 0;
34567
34567
  c[1].forEach(function(u) {
34568
34568
  var d = Yt(u.data), p = e[In(d[2][0].data)][0], h = Ct(p.meta[1][0].data);
@@ -35170,7 +35170,7 @@ function dm(e, r, t) {
35170
35170
  }), f.e.c = Math.max(f.e.c, o + d.length - 1);
35171
35171
  var h = Ut(s);
35172
35172
  if (a) for (p = 0; p < d.length; ++p) i[At(p + o) + h] = { t: "s", v: d[p] };
35173
- return i["!ref"] = Xe(f), i;
35173
+ return i["!ref"] = qe(f), i;
35174
35174
  }
35175
35175
  function AD(e, r) {
35176
35176
  return dm(null, e, r);
@@ -35237,7 +35237,7 @@ function ND(e, r, t) {
35237
35237
  e.c || (e.c = []), e.c.push({ t: r, a: t || "SheetJS" });
35238
35238
  }
35239
35239
  function ID(e, r, t, n) {
35240
- for (var a = typeof r != "string" ? r : pt(r), i = typeof r == "string" ? r : Xe(r), s = a.s.r; s <= a.e.r; ++s) for (var o = a.s.c; o <= a.e.c; ++o) {
35240
+ for (var a = typeof r != "string" ? r : pt(r), i = typeof r == "string" ? r : qe(r), s = a.s.r; s <= a.e.r; ++s) for (var o = a.s.c; o <= a.e.c; ++o) {
35241
35241
  var l = zi(e, s, o);
35242
35242
  l.t = "n", l.F = i, delete l.v, s == a.s.r && o == a.s.c && (l.f = t, n && (l.D = !0));
35243
35243
  }
@@ -35247,7 +35247,7 @@ var PD = {
35247
35247
  encode_col: At,
35248
35248
  encode_row: Ut,
35249
35249
  encode_cell: Me,
35250
- encode_range: Xe,
35250
+ encode_range: qe,
35251
35251
  decode_col: Kf,
35252
35252
  decode_row: Xf,
35253
35253
  split_cell: GS,
@@ -35299,7 +35299,7 @@ const Wd = ({
35299
35299
  }, c.readAsText(l)) : l.name.endsWith(".xlsx") || l.name.endsWith(".xls") ? (c.onload = (f) => {
35300
35300
  const u = new Uint8Array(f.target.result), d = Gc(u, { type: "array" }), p = d.SheetNames[0], h = d.Sheets[p], x = PD.sheet_to_json(h);
35301
35301
  e(r, x);
35302
- }, c.readAsArrayBuffer(l)) : qe.error("Unsupported file type. Please upload a CSV or Excel file.");
35302
+ }, c.readAsArrayBuffer(l)) : Ke.error("Unsupported file type. Please upload a CSV or Excel file.");
35303
35303
  };
35304
35304
  return /* @__PURE__ */ T.jsxs("div", { className: "relative", children: [
35305
35305
  /* @__PURE__ */ T.jsx(
@@ -35423,25 +35423,25 @@ const Wd = ({
35423
35423
  }, Z = Ge(async () => {
35424
35424
  var se, U, he;
35425
35425
  if (!k.apiUrl || !/^https?:\/\//.test(k.apiUrl)) {
35426
- qe.info("Please provide a valid API URL");
35426
+ Ke.info("Please provide a valid API URL");
35427
35427
  return;
35428
35428
  }
35429
35429
  try {
35430
35430
  l(!0);
35431
35431
  const { status: ce, data: P } = await ht.get(k.apiUrl);
35432
35432
  if (ce !== 200 || !P) {
35433
- qe.error("Unexpected response from server.");
35433
+ Ke.error("Unexpected response from server.");
35434
35434
  return;
35435
35435
  }
35436
35436
  const j = P.data || P.record || P.result;
35437
35437
  if (!Array.isArray(j)) {
35438
- qe.error("Expected an array in response (data, record, or result).");
35438
+ Ke.error("Expected an array in response (data, record, or result).");
35439
35439
  return;
35440
35440
  }
35441
35441
  ((se = t.type) == null ? void 0 : se.toLowerCase()) === "datagrid" ? x("dataColumns", j) : x("options", j);
35442
35442
  } catch (ce) {
35443
35443
  const P = ((he = (U = ce == null ? void 0 : ce.response) == null ? void 0 : U.data) == null ? void 0 : he.message) || (ce == null ? void 0 : ce.message) || "Unable to load options";
35444
- qe.error(P);
35444
+ Ke.error(P);
35445
35445
  } finally {
35446
35446
  l(!1);
35447
35447
  }
@@ -36604,56 +36604,74 @@ function eN({ elementData: e, sectionId: r }) {
36604
36604
  return ((g = t.find((S) => S.id === r)) == null ? void 0 : g.questionData) || [];
36605
36605
  },
36606
36606
  [t, r]
36607
- ), d = Ge((g, S) => {
36608
- g.dataTransfer.setData("properties", S), l(S);
36609
- }, []), p = Ge((g, S) => {
36610
- g.preventDefault(), g.stopPropagation(), f(S);
36611
- }, []), h = Ge((g) => {
36612
- g.preventDefault(), g.stopPropagation();
36613
- const S = g.dataTransfer.getData("properties"), O = g.currentTarget.id;
36614
- if (!O || S === O) return;
36615
- const k = u.findIndex((C) => C.id === S), _ = u.findIndex((C) => C.id === O);
36616
- if (k === -1 || _ === -1) return;
36617
- const E = [...u], [b] = E.splice(k, 1);
36618
- E.splice(_, 0, b), n(E, r), l(null);
36619
- }, [u, r, n]), x = Ge((g, S) => {
36620
- g.preventDefault(), i(!1);
36621
- try {
36622
- const k = { ...JSON.parse(g.dataTransfer.getData("properties")), id: Mr(), sectionId: r };
36623
- s(k, r, S);
36624
- } catch (O) {
36625
- console.error("Drop error:", O);
36626
- }
36627
- }, [s, r, i]), m = Ge((g) => /* @__PURE__ */ T.jsx(
36628
- "div",
36629
- {
36630
- className: "hover:bg-blue-300 transition rounded",
36631
- onDragOver: (S) => S.preventDefault(),
36632
- onDrop: (S) => x(S, g),
36633
- onDragEnd: () => i(!1),
36634
- children: /* @__PURE__ */ T.jsx("div", { className: "bg-blue-50 rounded p-6 h-[60px] border-2 border-blue-300 border-dashed flex items-center justify-center text-gray-400 opacity-70", children: /* @__PURE__ */ T.jsx(gt, { icon: "octicon:plus-16" }) })
36607
+ ), d = Ge(
36608
+ (g, S) => {
36609
+ g.dataTransfer.setData("properties", S), l(S);
36635
36610
  },
36636
- `drop-${g}`
36637
- ), [x, i]), v = Ge((g) => /* @__PURE__ */ T.jsx(
36638
- "div",
36639
- {
36640
- id: g.id,
36641
- className: Ze(
36642
- "cursor-move border p-4 w-full rounded-lg transition-colors bg-white",
36643
- {
36644
- "bg-gray-100": o === g.id,
36645
- "border-dashed border-blue-300": o && o !== g.id
36646
- }
36647
- ),
36648
- draggable: !0,
36649
- onDragStart: (S) => d(S, g.id),
36650
- onDragOver: (S) => p(S, g.id),
36651
- onDrop: h,
36652
- onDragEnd: () => l(null),
36653
- children: Gd(g, r)
36611
+ []
36612
+ ), p = Ge(
36613
+ (g, S) => {
36614
+ g.preventDefault(), g.stopPropagation(), f(S);
36615
+ },
36616
+ []
36617
+ ), h = Ge(
36618
+ (g) => {
36619
+ g.preventDefault(), g.stopPropagation();
36620
+ const S = g.dataTransfer.getData("properties"), O = g.currentTarget.id;
36621
+ if (!O || S === O) return;
36622
+ const k = u.findIndex((C) => C.id === S), _ = u.findIndex((C) => C.id === O);
36623
+ if (k === -1 || _ === -1) return;
36624
+ const E = [...u], [b] = E.splice(k, 1);
36625
+ E.splice(_, 0, b), n(E, r), l(null);
36626
+ },
36627
+ [u, r, n]
36628
+ ), x = Ge(
36629
+ (g, S) => {
36630
+ g.preventDefault(), i(!1);
36631
+ try {
36632
+ const k = { ...JSON.parse(g.dataTransfer.getData("properties")), id: Mr(), sectionId: r };
36633
+ s(k, r, S);
36634
+ } catch (O) {
36635
+ console.error("Drop error:", O);
36636
+ }
36654
36637
  },
36655
- g.id
36656
- ), [o, h, p, r, d]), y = Qe(() => (e == null ? void 0 : e.reduce((g, S) => (S.gridId && (g[S.gridId] = g[S.gridId] || [], g[S.gridId].push(S)), g), {})) || {}, [e]);
36638
+ [s, r, i]
36639
+ ), m = Ge(
36640
+ (g) => /* @__PURE__ */ T.jsx(
36641
+ "div",
36642
+ {
36643
+ className: "hover:bg-blue-300 transition rounded",
36644
+ onDragOver: (S) => S.preventDefault(),
36645
+ onDrop: (S) => x(S, g),
36646
+ onDragEnd: () => i(!1),
36647
+ children: /* @__PURE__ */ T.jsx("div", { className: "bg-blue-50 rounded p-6 h-[60px] border-2 border-blue-300 border-dashed flex items-center justify-center text-gray-400 opacity-70", children: /* @__PURE__ */ T.jsx(gt, { icon: "octicon:plus-16" }) })
36648
+ },
36649
+ `drop-${g}`
36650
+ ),
36651
+ [x, i]
36652
+ ), v = Ge(
36653
+ (g) => /* @__PURE__ */ T.jsx(
36654
+ "div",
36655
+ {
36656
+ id: g.id,
36657
+ className: Ze(
36658
+ "cursor-move border p-4 w-full rounded-lg transition-colors bg-white",
36659
+ {
36660
+ "bg-gray-100": o === g.id,
36661
+ "border-dashed border-blue-300": o && o !== g.id
36662
+ }
36663
+ ),
36664
+ draggable: !0,
36665
+ onDragStart: (S) => d(S, g.id),
36666
+ onDragOver: (S) => p(S, g.id),
36667
+ onDrop: h,
36668
+ onDragEnd: () => l(null),
36669
+ children: Gd(g, r)
36670
+ },
36671
+ g.id
36672
+ ),
36673
+ [o, h, p, r, d]
36674
+ ), y = Qe(() => (e == null ? void 0 : e.reduce((g, S) => (S.gridId && (g[S.gridId] = g[S.gridId] || [], g[S.gridId].push(S)), g), {})) || {}, [e]);
36657
36675
  return e != null && e.length ? /* @__PURE__ */ T.jsx("div", { className: "w-full h-full grid grid-cols-1 gap-4 relative", children: e.map((g, S) => {
36658
36676
  if (g.type === "grid") {
36659
36677
  const O = y[g.id] || [];
@@ -36689,7 +36707,16 @@ function eN({ elementData: e, sectionId: r }) {
36689
36707
  },
36690
36708
  g.id
36691
36709
  );
36692
- }) }) : /* @__PURE__ */ T.jsx("div", { className: "w-full h-full flex items-center justify-center text-gray-400 min-h-[250px] p-10 col-span-2", children: "Drag or click an element to display" });
36710
+ }) }) : /* @__PURE__ */ T.jsx(
36711
+ "div",
36712
+ {
36713
+ onDragOver: (g) => g.preventDefault(),
36714
+ onDrop: (g) => x(g, 0),
36715
+ onDragEnd: () => i(!1),
36716
+ className: "w-full h-full flex items-center justify-center text-gray-400 min-h-[250px] p-10 col-span-2",
36717
+ children: "Drag or click an element to display"
36718
+ }
36719
+ );
36693
36720
  }
36694
36721
  const tN = Xc(eN), rN = Li({
36695
36722
  title: nt(),
@@ -36796,7 +36823,7 @@ const tN = Xc(eN), rN = Li({
36796
36823
  "div",
36797
36824
  {
36798
36825
  ref: n,
36799
- className: "flex gap-x-4 mx-auto h-full relative px-6 pb-5 flex-col no-scrollbar overflow-y-auto max-h-[85vh]",
36826
+ className: "flex gap-x-4 mx-auto h-full relative px-6 pb-5 flex-col",
36800
36827
  children: [
36801
36828
  e && /* @__PURE__ */ T.jsx(
36802
36829
  nN,
@@ -36888,7 +36915,7 @@ function iN({
36888
36915
  const { setFormData: r } = et(Rr);
36889
36916
  return Ne(() => {
36890
36917
  e && e.length > 0 && r(e);
36891
- }, [e, r]), /* @__PURE__ */ T.jsx("div", { className: "bg-white p-4 border border-[#E4E7EC] rounded-lg h-full overflow-y-auto no-scrollbar", children: /* @__PURE__ */ T.jsx(aN, {}) });
36918
+ }, [e, r]), /* @__PURE__ */ T.jsx("div", { className: "bg-white p-4 border border-[#E4E7EC] rounded-lg h-full overflow-y-auto no-scrollbar max-h-[calc(100vh-152px)]", children: /* @__PURE__ */ T.jsx(aN, {}) });
36892
36919
  }
36893
36920
  const sN = () => {
36894
36921
  const { setIsDragging: e, addElement: r, selectedSection: t } = et(Rr), n = Ge(
@@ -36899,7 +36926,7 @@ const sN = () => {
36899
36926
  );
36900
36927
  function a(c) {
36901
36928
  if (!t) {
36902
- qe.error("Please select a section to add an element to.");
36929
+ Ke.error("Please select a section to add an element to.");
36903
36930
  return;
36904
36931
  }
36905
36932
  const f = {
@@ -36910,7 +36937,7 @@ const sN = () => {
36910
36937
  r(f, t);
36911
36938
  }
36912
36939
  const i = jn("config"), s = i == null ? void 0 : i.elementColor, o = i == null ? void 0 : i.elementBgColor, l = i == null ? void 0 : i.elementBorderColor;
36913
- return /* @__PURE__ */ T.jsx("div", { className: "pt-4 pb-6 px-5 max-h-[85vh] overflow-y-auto side_shadow rounded-lg", children: /* @__PURE__ */ T.jsx("div", { children: /* @__PURE__ */ T.jsx("ul", { className: "grid gap-y-[8px] mt-3", children: z_.map((c) => /* @__PURE__ */ T.jsxs(
36940
+ return /* @__PURE__ */ T.jsx("div", { className: "pt-4 pb-6 px-5", children: /* @__PURE__ */ T.jsx("div", { children: /* @__PURE__ */ T.jsx("ul", { className: "grid gap-y-[8px] mt-3", children: z_.map((c) => /* @__PURE__ */ T.jsxs(
36914
36941
  "li",
36915
36942
  {
36916
36943
  onDragStart: (f) => n(f, c),
@@ -37039,8 +37066,8 @@ function fN({
37039
37066
  return /* @__PURE__ */ T.jsx(Lh, { children: /* @__PURE__ */ T.jsxs("div", { className: "w-full h-full bg-[#E4E7EC] flex flex-col", children: [
37040
37067
  /* @__PURE__ */ T.jsx(tg, {}),
37041
37068
  /* @__PURE__ */ T.jsx("div", { className: "border-b bg-white border-[#E4E7EC]", children: /* @__PURE__ */ T.jsx(cN, { title: t, backUrl: n }) }),
37042
- /* @__PURE__ */ T.jsxs("div", { className: "flex flex-1 p-4 gap-x-4 pb-20", children: [
37043
- /* @__PURE__ */ T.jsx("div", { className: "w-[270px] border-l border-[#E4E7EC] bg-white rounded-lg max-h-max ", children: /* @__PURE__ */ T.jsx(oN, {}) }),
37069
+ /* @__PURE__ */ T.jsxs("div", { className: "flex flex-1 p-4 gap-x-4", children: [
37070
+ /* @__PURE__ */ T.jsx("div", { children: /* @__PURE__ */ T.jsx("div", { className: "w-[270px] border border-[#E4E7EC] bg-white max-h-[80vh] overflow-y-auto side_shadow rounded-lg ", children: /* @__PURE__ */ T.jsx(oN, {}) }) }),
37044
37071
  /* @__PURE__ */ T.jsx("div", { className: "flex-1 h-full max-h-full z-[1] ", children: a ? /* @__PURE__ */ T.jsx(xm, { loadingClass: "!w-full !h-[800px]" }) : /* @__PURE__ */ T.jsx(iN, { questionData: r }) })
37045
37072
  ] }),
37046
37073
  /* @__PURE__ */ T.jsx("div", { className: "border-b bg-white border-t border-[#E4E7EC]", children: /* @__PURE__ */ T.jsx(Ry, { onSubmit: e }) })