iq-line-form-builder-renderer 1.2.8 → 1.2.9

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.
@@ -305,8 +305,8 @@ const My = (e, t) => {
305
305
  continue;
306
306
  s.push(C);
307
307
  const k = o(w, y);
308
- for (let _ = 0; _ < k.length; ++_) {
309
- const E = k[_];
308
+ for (let N = 0; N < k.length; ++N) {
309
+ const E = k[N];
310
310
  s.push(S + E);
311
311
  }
312
312
  c = l + (c.length > 0 ? " " + c : c);
@@ -370,7 +370,7 @@ const My = (e, t) => {
370
370
  "bottom-left",
371
371
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
372
372
  "left-bottom"
373
- ], k = () => [...C(), Pe, Re], _ = () => ["auto", "hidden", "clip", "visible", "scroll"], E = () => ["auto", "contain", "none"], A = () => [Pe, Re, c], x = () => [wr, "full", "auto", ...A()], P = () => [Sr, "none", "subgrid", Pe, Re], T = () => ["auto", {
373
+ ], k = () => [...C(), Pe, Re], N = () => ["auto", "hidden", "clip", "visible", "scroll"], E = () => ["auto", "contain", "none"], A = () => [Pe, Re, c], x = () => [wr, "full", "auto", ...A()], P = () => [Sr, "none", "subgrid", Pe, Re], T = () => ["auto", {
374
374
  span: ["full", Sr, Pe, Re]
375
375
  }, Sr, Pe, Re], H = () => [Sr, "auto", Pe, Re], X = () => ["auto", "min", "max", "fr", Pe, Re], F = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], B = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], O = () => ["auto", ...A()], M = () => [wr, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...A()], I = () => [wr, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...A()], z = () => [wr, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...A()], D = () => [e, Pe, Re], ae = () => [...C(), uu, cu, {
376
376
  position: [Pe, Re]
@@ -524,21 +524,21 @@ const My = (e, t) => {
524
524
  * @see https://tailwindcss.com/docs/overflow
525
525
  */
526
526
  overflow: [{
527
- overflow: _()
527
+ overflow: N()
528
528
  }],
529
529
  /**
530
530
  * Overflow X
531
531
  * @see https://tailwindcss.com/docs/overflow
532
532
  */
533
533
  "overflow-x": [{
534
- "overflow-x": _()
534
+ "overflow-x": N()
535
535
  }],
536
536
  /**
537
537
  * Overflow Y
538
538
  * @see https://tailwindcss.com/docs/overflow
539
539
  */
540
540
  "overflow-y": [{
541
- "overflow-y": _()
541
+ "overflow-y": N()
542
542
  }],
543
543
  /**
544
544
  * Overscroll Behavior
@@ -3070,7 +3070,7 @@ function kf(e) {
3070
3070
  maxWidth: "100%"
3071
3071
  };
3072
3072
  }
3073
- function HF(e) {
3073
+ function KF(e) {
3074
3074
  return kf(e);
3075
3075
  }
3076
3076
  function xa(e) {
@@ -3135,7 +3135,7 @@ function us(e) {
3135
3135
  }
3136
3136
  return Kl(Pf(e));
3137
3137
  }
3138
- const WF = us;
3138
+ const qF = us;
3139
3139
  function ql(e) {
3140
3140
  if (e.type === "billingGrid" || e.type === "table" || ai(e) > 1) return !0;
3141
3141
  const t = Ff(e.appearance?.contentVerticalAlign);
@@ -3218,7 +3218,7 @@ function du(e) {
3218
3218
  us(e)
3219
3219
  );
3220
3220
  }
3221
- function GF(e, t) {
3221
+ function YF(e, t) {
3222
3222
  const n = {};
3223
3223
  e !== void 0 && (n.cellAlign = e), t !== void 0 && (n.cellJustify = t);
3224
3224
  const o = e === void 0 && t === void 0 ? void 0 : n;
@@ -3818,23 +3818,23 @@ function Bf(e) {
3818
3818
  }
3819
3819
  if (v.custom?.length && v.custom.forEach(({ key: C, value: k }) => {
3820
3820
  if (!C || !k) return;
3821
- let _ = ul(k, i);
3822
- s && (_ = Hr(_, o, i)), _.match(/\{[^}]+\}/) ? _.match(/\{(?!ctx:|\@)(\w+)\}/g) || S.push(`${encodeURIComponent(C)}=`) : S.push(`${encodeURIComponent(C)}=${encodeURIComponent(_)}`);
3821
+ let N = ul(k, i);
3822
+ s && (N = Hr(N, o, i)), N.match(/\{[^}]+\}/) ? N.match(/\{(?!ctx:|\@)(\w+)\}/g) || S.push(`${encodeURIComponent(C)}=`) : S.push(`${encodeURIComponent(C)}=${encodeURIComponent(N)}`);
3823
3823
  }), S.length > 0) {
3824
3824
  const C = h.includes("?") ? "&" : "?";
3825
3825
  h = `${h}${C}${S.join("&")}`;
3826
3826
  }
3827
3827
  }
3828
3828
  if (s && Object.keys(o).length > 0 && u === "get") {
3829
- const v = (_) => _.replace(/\{/g, "").replace(/\}/g, ""), S = [];
3830
- for (const _ of r.custom || [])
3831
- if (_.value) {
3832
- const E = _.value.match(/\{(\w+)\}/g) || [];
3829
+ const v = (N) => N.replace(/\{/g, "").replace(/\}/g, ""), S = [];
3830
+ for (const N of r.custom || [])
3831
+ if (N.value) {
3832
+ const E = N.value.match(/\{(\w+)\}/g) || [];
3833
3833
  S.push(...E.map(v));
3834
3834
  }
3835
3835
  const C = /* @__PURE__ */ new Set([...y.map(v), ...S]), k = {};
3836
- Object.keys(o).forEach((_) => {
3837
- !C.has(_) && !d.has(_) && (k[_] = o[_]);
3836
+ Object.keys(o).forEach((N) => {
3837
+ !C.has(N) && !d.has(N) && (k[N] = o[N]);
3838
3838
  }), Object.keys(k).length > 0 && (h = `${h}${h.includes("?") ? "&" : "?"}${new URLSearchParams(k).toString()}`);
3839
3839
  }
3840
3840
  let w = null;
@@ -4266,7 +4266,7 @@ const Ot = If((e, t) => ({
4266
4266
  }
4267
4267
  }
4268
4268
  }));
4269
- function KF() {
4269
+ function XF() {
4270
4270
  return Ot.getState();
4271
4271
  }
4272
4272
  function fv({
@@ -4294,7 +4294,7 @@ function fv({
4294
4294
  setFieldValue: S,
4295
4295
  setFieldTouched: C,
4296
4296
  setFieldError: k,
4297
- setValues: _,
4297
+ setValues: N,
4298
4298
  resetForm: E,
4299
4299
  validateField: A,
4300
4300
  validateForm: x,
@@ -4311,7 +4311,7 @@ function fv({
4311
4311
  as(() => {
4312
4312
  if (v(e, { forceReset: !!o }), t && Object.keys(t).length > 0) {
4313
4313
  const de = Ot.getState().values;
4314
- _({ ...de, ...t });
4314
+ N({ ...de, ...t });
4315
4315
  try {
4316
4316
  z.current = JSON.stringify(t);
4317
4317
  } catch {
@@ -4329,8 +4329,8 @@ function fv({
4329
4329
  }
4330
4330
  if (de === z.current) return;
4331
4331
  const st = Ot.getState().values;
4332
- _({ ...st, ...t }), z.current = de;
4333
- }, [t, _]);
4332
+ N({ ...st, ...t }), z.current = de;
4333
+ }, [t, N]);
4334
4334
  const D = Z(
4335
4335
  (de, st) => {
4336
4336
  const xe = {
@@ -4412,7 +4412,7 @@ function fv({
4412
4412
  setFieldValue: D,
4413
4413
  setFieldTouched: C,
4414
4414
  setFieldError: k,
4415
- setValues: _,
4415
+ setValues: N,
4416
4416
  validateField: A,
4417
4417
  getFieldState: U,
4418
4418
  shouldShowField: te,
@@ -4562,20 +4562,20 @@ function yv({
4562
4562
  updateReadOnly: c,
4563
4563
  updateEditable: u,
4564
4564
  updateFormDisabled: l
4565
- } = Ot(), d = Z((_) => _.name || _.key || _.id, []), p = Z((_, E) => {
4566
- if (!_) return d(E);
4565
+ } = Ot(), d = Z((N) => N.name || N.key || N.id, []), p = Z((N, E) => {
4566
+ if (!N) return d(E);
4567
4567
  const A = e.find(
4568
- (x) => x.id === _ || x.name === _ || x.key === _
4568
+ (x) => x.id === N || x.name === N || x.key === N
4569
4569
  );
4570
- return A ? d(A) : _;
4571
- }, [e, d]), m = Z((_) => {
4570
+ return A ? d(A) : N;
4571
+ }, [e, d]), m = Z((N) => {
4572
4572
  const E = e.find(
4573
- (A) => A.id === _ || A.name === _ || A.key === _
4573
+ (A) => A.id === N || A.name === N || A.key === N
4574
4574
  );
4575
- return E ? d(E) : _;
4575
+ return E ? d(E) : N;
4576
4576
  }, [e, d]), g = Z(
4577
- (_) => {
4578
- const { field: E, operator: A, value: x } = _;
4577
+ (N) => {
4578
+ const { field: E, operator: A, value: x } = N;
4579
4579
  if (typeof E == "string" && E.startsWith(Su)) {
4580
4580
  const H = E.slice(Su.length), X = n?.[H], F = ti(X);
4581
4581
  return x === "success" ? F : x === "failure" ? X != null && !F : !1;
@@ -4636,19 +4636,19 @@ function yv({
4636
4636
  },
4637
4637
  [t, m, n]
4638
4638
  ), h = Z(
4639
- (_) => {
4640
- const E = _.conditions.map((A) => vu(A) ? h(A) : g(A));
4641
- return _.logic === "and" ? E.every(Boolean) : E.some(Boolean);
4639
+ (N) => {
4640
+ const E = N.conditions.map((A) => vu(A) ? h(A) : g(A));
4641
+ return N.logic === "and" ? E.every(Boolean) : E.some(Boolean);
4642
4642
  },
4643
4643
  [g]
4644
4644
  ), y = Z(
4645
- (_) => vu(_) ? h(_) : g(_),
4645
+ (N) => vu(N) ? h(N) : g(N),
4646
4646
  [g, h]
4647
4647
  ), w = Z(() => {
4648
- const _ = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new Set(), A = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new Set();
4648
+ const N = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new Set(), A = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new Set();
4649
4649
  e.forEach((F) => {
4650
4650
  const B = d(F);
4651
- F.hidden || _.add(B), F.disabled || E.add(B), F.validation?.some((O) => O.type === "required") && A.add(B);
4651
+ F.hidden || N.add(B), F.disabled || E.add(B), F.validation?.some((O) => O.type === "required") && A.add(B);
4652
4652
  });
4653
4653
  let T = !1;
4654
4654
  if (r != null && o?.length)
@@ -4670,10 +4670,10 @@ function yv({
4670
4670
  E.add(I);
4671
4671
  break;
4672
4672
  case "hide":
4673
- _.delete(I);
4673
+ N.delete(I);
4674
4674
  break;
4675
4675
  case "show":
4676
- _.add(I);
4676
+ N.add(I);
4677
4677
  break;
4678
4678
  case "readOnly":
4679
4679
  x.add(I), P.delete(I);
@@ -4698,10 +4698,10 @@ function yv({
4698
4698
  const z = p(I.target, F);
4699
4699
  switch (I.action) {
4700
4700
  case "show":
4701
- _.add(z);
4701
+ N.add(z);
4702
4702
  break;
4703
4703
  case "hide":
4704
- _.delete(z);
4704
+ N.delete(z);
4705
4705
  break;
4706
4706
  case "enable":
4707
4707
  E.add(z);
@@ -4742,10 +4742,10 @@ function yv({
4742
4742
  E.delete(z);
4743
4743
  break;
4744
4744
  case "show":
4745
- _.add(z);
4745
+ N.add(z);
4746
4746
  break;
4747
4747
  case "hide":
4748
- _.delete(z);
4748
+ N.delete(z);
4749
4749
  break;
4750
4750
  case "readOnly":
4751
4751
  x.add(z);
@@ -4755,9 +4755,9 @@ function yv({
4755
4755
  break;
4756
4756
  }
4757
4757
  });
4758
- }) : ((O?.enableFieldNames ?? []).forEach((M) => E.add(M)), (O?.disableFieldNames ?? []).forEach((M) => E.delete(M)), (O?.showFieldNames ?? []).forEach((M) => _.add(M)), (O?.hideFieldNames ?? []).forEach((M) => _.delete(M)));
4758
+ }) : ((O?.enableFieldNames ?? []).forEach((M) => E.add(M)), (O?.disableFieldNames ?? []).forEach((M) => E.delete(M)), (O?.showFieldNames ?? []).forEach((M) => N.add(M)), (O?.hideFieldNames ?? []).forEach((M) => N.delete(M)));
4759
4759
  }), {
4760
- visible: Array.from(_),
4760
+ visible: Array.from(N),
4761
4761
  enabled: Array.from(E),
4762
4762
  required: Array.from(A),
4763
4763
  readOnly: Array.from(x),
@@ -4786,13 +4786,13 @@ function yv({
4786
4786
  l
4787
4787
  ]);
4788
4788
  const S = Z(
4789
- (_) => v.visible.includes(_),
4789
+ (N) => v.visible.includes(N),
4790
4790
  [v.visible]
4791
4791
  ), C = Z(
4792
- (_) => v.enabled.includes(_),
4792
+ (N) => v.enabled.includes(N),
4793
4793
  [v.enabled]
4794
4794
  ), k = Z(
4795
- (_) => v.required.includes(_),
4795
+ (N) => v.required.includes(N),
4796
4796
  [v.required]
4797
4797
  );
4798
4798
  return {
@@ -5671,9 +5671,9 @@ function Zl(e) {
5671
5671
  u.displayName = a;
5672
5672
  const l = e + "CollectionItemSlot", d = "data-radix-collection-item", p = /* @__PURE__ */ Eu(l), m = Lt.forwardRef(
5673
5673
  (h, y) => {
5674
- const { scope: w, children: v, ...S } = h, C = Lt.useRef(null), k = rt(y, C), _ = i(l, w);
5675
- return Lt.useEffect(() => (_.itemMap.set(C, { ref: C, ...S }), () => {
5676
- _.itemMap.delete(C);
5674
+ const { scope: w, children: v, ...S } = h, C = Lt.useRef(null), k = rt(y, C), N = i(l, w);
5675
+ return Lt.useEffect(() => (N.itemMap.set(C, { ref: C, ...S }), () => {
5676
+ N.itemMap.delete(C);
5677
5677
  })), /* @__PURE__ */ f(p, { [d]: "", ref: k, children: v });
5678
5678
  }
5679
5679
  );
@@ -5685,7 +5685,7 @@ function Zl(e) {
5685
5685
  if (!v) return [];
5686
5686
  const S = Array.from(v.querySelectorAll(`[${d}]`));
5687
5687
  return Array.from(y.itemMap.values()).sort(
5688
- (_, E) => S.indexOf(_.ref.current) - S.indexOf(E.ref.current)
5688
+ (N, E) => S.indexOf(N.ref.current) - S.indexOf(E.ref.current)
5689
5689
  );
5690
5690
  }, [y.collectionRef, y.itemMap]);
5691
5691
  }
@@ -5803,7 +5803,7 @@ var Nw = "DismissableLayer", fl = "dismissableLayer.update", _w = "dismissableLa
5803
5803
  } = e, u = b.useContext(Zf), [l, d] = b.useState(null), p = l?.ownerDocument ?? globalThis?.document, [, m] = b.useState({}), g = rt(t, (E) => d(E)), h = Array.from(u.layers), [y] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), w = h.indexOf(y), v = l ? h.indexOf(l) : -1, S = u.layersWithOutsidePointerEventsDisabled.size > 0, C = v >= w, k = Fw((E) => {
5804
5804
  const A = E.target, x = [...u.branches].some((P) => P.contains(A));
5805
5805
  !C || x || (o?.(E), s?.(E), E.defaultPrevented || a?.());
5806
- }, p), _ = Pw((E) => {
5806
+ }, p), N = Pw((E) => {
5807
5807
  const A = E.target;
5808
5808
  [...u.branches].some((P) => P.contains(A)) || (i?.(E), s?.(E), E.defaultPrevented || a?.());
5809
5809
  }, p);
@@ -5828,8 +5828,8 @@ var Nw = "DismissableLayer", fl = "dismissableLayer.update", _w = "dismissableLa
5828
5828
  pointerEvents: S ? C ? "auto" : "none" : void 0,
5829
5829
  ...e.style
5830
5830
  },
5831
- onFocusCapture: Le(e.onFocusCapture, _.onFocusCapture),
5832
- onBlurCapture: Le(e.onBlurCapture, _.onBlurCapture),
5831
+ onFocusCapture: Le(e.onFocusCapture, N.onFocusCapture),
5832
+ onBlurCapture: Le(e.onBlurCapture, N.onBlurCapture),
5833
5833
  onPointerDownCapture: Le(
5834
5834
  e.onPointerDownCapture,
5835
5835
  k.onPointerDownCapture
@@ -6279,7 +6279,7 @@ const Qw = 50, Zw = async (e, t, n) => {
6279
6279
  x: S,
6280
6280
  y: C,
6281
6281
  data: k,
6282
- reset: _
6282
+ reset: N
6283
6283
  } = await v({
6284
6284
  x: l,
6285
6285
  y: d,
@@ -6297,11 +6297,11 @@ const Qw = 50, Zw = async (e, t, n) => {
6297
6297
  l = S ?? l, d = C ?? d, g[w] = {
6298
6298
  ...g[w],
6299
6299
  ...k
6300
- }, _ && m < Qw && (m++, typeof _ == "object" && (_.placement && (p = _.placement), _.rects && (u = _.rects === !0 ? await s.getElementRects({
6300
+ }, N && m < Qw && (m++, typeof N == "object" && (N.placement && (p = N.placement), N.rects && (u = N.rects === !0 ? await s.getElementRects({
6301
6301
  reference: e,
6302
6302
  floating: t,
6303
6303
  strategy: o
6304
- }) : _.rects), {
6304
+ }) : N.rects), {
6305
6305
  x: l,
6306
6306
  y: d
6307
6307
  } = Mu(u, p, c)), h = -1);
@@ -6334,9 +6334,9 @@ const Qw = 50, Zw = async (e, t, n) => {
6334
6334
  const d = np(l), p = {
6335
6335
  x: n,
6336
6336
  y: r
6337
- }, m = rc(o), g = nc(m), h = await s.getDimensions(u), y = m === "y", w = y ? "top" : "left", v = y ? "bottom" : "right", S = y ? "clientHeight" : "clientWidth", C = i.reference[g] + i.reference[m] - p[m] - i.floating[g], k = p[m] - i.reference[m], _ = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
6338
- let E = _ ? _[S] : 0;
6339
- (!E || !await (s.isElement == null ? void 0 : s.isElement(_))) && (E = a.floating[S] || i.floating[g]);
6337
+ }, m = rc(o), g = nc(m), h = await s.getDimensions(u), y = m === "y", w = y ? "top" : "left", v = y ? "bottom" : "right", S = y ? "clientHeight" : "clientWidth", C = i.reference[g] + i.reference[m] - p[m] - i.floating[g], k = p[m] - i.reference[m], N = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
6338
+ let E = N ? N[S] : 0;
6339
+ (!E || !await (s.isElement == null ? void 0 : s.isElement(N))) && (E = a.floating[S] || i.floating[g]);
6340
6340
  const A = C / 2 - k / 2, x = E / 2 - h[g] / 2 - 1, P = Rr(d[w], x), T = Rr(d[v], x), H = P, X = E - h[g] - T, F = E / 2 - h[g] / 2 + A, B = pl(H, F, X), O = !c.arrow && Oo(o) != null && F !== B && i.reference[g] / 2 - (F < H ? P : T) - h[g] / 2 < 0, M = O ? F < H ? F - H : F - X : 0;
6341
6341
  return {
6342
6342
  [m]: p[m] + M,
@@ -6374,8 +6374,8 @@ const Qw = 50, Zw = async (e, t, n) => {
6374
6374
  } = gr(e, t);
6375
6375
  if ((n = i.arrow) != null && n.alignmentOffset)
6376
6376
  return {};
6377
- const w = yr(o), v = or(a), S = yr(a) === a, C = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), k = p || (S || !h ? [gs(a)] : Ww(a)), _ = g !== "none";
6378
- !p && _ && k.push(...Yw(a, h, g, C));
6377
+ const w = yr(o), v = or(a), S = yr(a) === a, C = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), k = p || (S || !h ? [gs(a)] : Ww(a)), N = g !== "none";
6378
+ !p && N && k.push(...Yw(a, h, g, C));
6379
6379
  const E = [a, ...k], A = await c.detectOverflow(t, y), x = [];
6380
6380
  let P = ((r = i.flip) == null ? void 0 : r.overflows) || [];
6381
6381
  if (l && x.push(A[w]), d) {
@@ -6406,7 +6406,7 @@ const Qw = 50, Zw = async (e, t, n) => {
6406
6406
  case "bestFit": {
6407
6407
  var X;
6408
6408
  const M = (X = P.filter((I) => {
6409
- if (_) {
6409
+ if (N) {
6410
6410
  const z = or(I.placement);
6411
6411
  return z === v || // Create a bias to the `y` side axis due to horizontal
6412
6412
  // reading directions favoring greater width.
@@ -6625,8 +6625,8 @@ const oS = function(e) {
6625
6625
  }
6626
6626
  if (u) {
6627
6627
  var w, v;
6628
- const S = p === "y" ? "width" : "height", C = rp.has(yr(o)), k = i.reference[d] - i.floating[S] + (C && ((w = s.offset) == null ? void 0 : w[d]) || 0) + (C ? 0 : y.crossAxis), _ = i.reference[d] + i.reference[S] + (C ? 0 : ((v = s.offset) == null ? void 0 : v[d]) || 0) - (C ? y.crossAxis : 0);
6629
- g < k ? g = k : g > _ && (g = _);
6628
+ const S = p === "y" ? "width" : "height", C = rp.has(yr(o)), k = i.reference[d] - i.floating[S] + (C && ((w = s.offset) == null ? void 0 : w[d]) || 0) + (C ? 0 : y.crossAxis), N = i.reference[d] + i.reference[S] + (C ? 0 : ((v = s.offset) == null ? void 0 : v[d]) || 0) - (C ? y.crossAxis : 0);
6629
+ g < k ? g = k : g > N && (g = N);
6630
6630
  }
6631
6631
  return {
6632
6632
  [p]: m,
@@ -6655,9 +6655,9 @@ const oS = function(e) {
6655
6655
  } = i.floating;
6656
6656
  let y, w;
6657
6657
  d === "top" || d === "bottom" ? (y = d, w = p === (await (s.isRTL == null ? void 0 : s.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (w = d, y = p === "end" ? "top" : "bottom");
6658
- const v = h - l.top - l.bottom, S = g - l.left - l.right, C = Rr(h - l[y], v), k = Rr(g - l[w], S), _ = !t.middlewareData.shift;
6658
+ const v = h - l.top - l.bottom, S = g - l.left - l.right, C = Rr(h - l[y], v), k = Rr(g - l[w], S), N = !t.middlewareData.shift;
6659
6659
  let E = C, A = k;
6660
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = S), (r = t.middlewareData.shift) != null && r.enabled.y && (E = v), _ && !p) {
6660
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = S), (r = t.middlewareData.shift) != null && r.enabled.y && (E = v), N && !p) {
6661
6661
  const P = On(l.left, 0), T = On(l.right, 0), H = On(l.top, 0), X = On(l.bottom, 0);
6662
6662
  m ? A = g - 2 * (P !== 0 || T !== 0 ? P + T : On(l.left, l.right)) : E = h - 2 * (H !== 0 || X !== 0 ? H + X : On(l.top, l.bottom));
6663
6663
  }
@@ -7103,8 +7103,8 @@ function NS(e, t) {
7103
7103
  threshold: On(0, Rr(1, c)) || 1
7104
7104
  };
7105
7105
  let C = !0;
7106
- function k(_) {
7107
- const E = _[0].intersectionRatio;
7106
+ function k(N) {
7107
+ const E = N[0].intersectionRatio;
7108
7108
  if (E !== c) {
7109
7109
  if (!C)
7110
7110
  return s();
@@ -7245,18 +7245,18 @@ function DS(e) {
7245
7245
  }), [p, m] = b.useState(r);
7246
7246
  bs(p, r) || m(r);
7247
7247
  const [g, h] = b.useState(null), [y, w] = b.useState(null), v = b.useCallback((I) => {
7248
- I !== _.current && (_.current = I, h(I));
7248
+ I !== N.current && (N.current = I, h(I));
7249
7249
  }, []), S = b.useCallback((I) => {
7250
7250
  I !== E.current && (E.current = I, w(I));
7251
- }, []), C = i || g, k = s || y, _ = b.useRef(null), E = b.useRef(null), A = b.useRef(l), x = c != null, P = Fa(c), T = Fa(o), H = Fa(u), X = b.useCallback(() => {
7252
- if (!_.current || !E.current)
7251
+ }, []), C = i || g, k = s || y, N = b.useRef(null), E = b.useRef(null), A = b.useRef(l), x = c != null, P = Fa(c), T = Fa(o), H = Fa(u), X = b.useCallback(() => {
7252
+ if (!N.current || !E.current)
7253
7253
  return;
7254
7254
  const I = {
7255
7255
  placement: t,
7256
7256
  strategy: n,
7257
7257
  middleware: p
7258
7258
  };
7259
- T.current && (I.platform = T.current), IS(_.current, E.current, I).then((z) => {
7259
+ T.current && (I.platform = T.current), IS(N.current, E.current, I).then((z) => {
7260
7260
  const D = {
7261
7261
  ...z,
7262
7262
  // The floating element's position may be recomputed while it's closed
@@ -7280,14 +7280,14 @@ function DS(e) {
7280
7280
  es(() => (F.current = !0, () => {
7281
7281
  F.current = !1;
7282
7282
  }), []), es(() => {
7283
- if (C && (_.current = C), k && (E.current = k), C && k) {
7283
+ if (C && (N.current = C), k && (E.current = k), C && k) {
7284
7284
  if (P.current)
7285
7285
  return P.current(C, k, X);
7286
7286
  X();
7287
7287
  }
7288
7288
  }, [C, k, X, P, x]);
7289
7289
  const B = b.useMemo(() => ({
7290
- reference: _,
7290
+ reference: N,
7291
7291
  floating: E,
7292
7292
  setReference: v,
7293
7293
  setFloating: S
@@ -7461,7 +7461,7 @@ var lc = "PopperContent", [YS, XS] = mp(lc), vp = b.forwardRef(
7461
7461
  updatePositionStrategy: m = "optimized",
7462
7462
  onPlaced: g,
7463
7463
  ...h
7464
- } = e, y = hp(lc, n), [w, v] = b.useState(null), S = rt(t, (G) => v(G)), [C, k] = b.useState(null), _ = mi(C), E = _?.width ?? 0, A = _?.height ?? 0, x = r + (i !== "center" ? "-" + i : ""), P = typeof l == "number" ? l : { top: 0, right: 0, bottom: 0, left: 0, ...l }, T = Array.isArray(u) ? u : [u], H = T.length > 0, X = {
7464
+ } = e, y = hp(lc, n), [w, v] = b.useState(null), S = rt(t, (G) => v(G)), [C, k] = b.useState(null), N = mi(C), E = N?.width ?? 0, A = N?.height ?? 0, x = r + (i !== "center" ? "-" + i : ""), P = typeof l == "number" ? l : { top: 0, right: 0, bottom: 0, left: 0, ...l }, T = Array.isArray(u) ? u : [u], H = T.length > 0, X = {
7465
7465
  padding: P,
7466
7466
  boundary: T.filter(QS),
7467
7467
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -7946,12 +7946,12 @@ var kp = Ax(), Ia = function() {
7946
7946
  onScrollCapture: Ia,
7947
7947
  onWheelCapture: Ia,
7948
7948
  onTouchMoveCapture: Ia
7949
- }), o = r[0], i = r[1], s = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, l = e.enabled, d = e.shards, p = e.sideCar, m = e.noRelative, g = e.noIsolation, h = e.inert, y = e.allowPinchZoom, w = e.as, v = w === void 0 ? "div" : w, S = e.gapMode, C = Tp(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), k = p, _ = wx([n, t]), E = nr(nr({}, C), o);
7949
+ }), o = r[0], i = r[1], s = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, l = e.enabled, d = e.shards, p = e.sideCar, m = e.noRelative, g = e.noIsolation, h = e.inert, y = e.allowPinchZoom, w = e.as, v = w === void 0 ? "div" : w, S = e.gapMode, C = Tp(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), k = p, N = wx([n, t]), E = nr(nr({}, C), o);
7950
7950
  return b.createElement(
7951
7951
  b.Fragment,
7952
7952
  null,
7953
7953
  l && b.createElement(k, { sideCar: kp, removeScrollBar: u, shards: d, noRelative: m, noIsolation: g, inert: h, setCallbacks: i, allowPinchZoom: !!y, lockRef: n, gapMode: S }),
7954
- s ? b.cloneElement(b.Children.only(a), nr(nr({}, E), { ref: _ })) : b.createElement(v, nr({}, E, { className: c, ref: _ }), a)
7954
+ s ? b.cloneElement(b.Children.only(a), nr(nr({}, E), { ref: N })) : b.createElement(v, nr({}, E, { className: c, ref: N }), a)
7955
7955
  );
7956
7956
  });
7957
7957
  qs.defaultProps = {
@@ -8197,16 +8197,16 @@ function qx(e) {
8197
8197
  var a = b.useCallback(function(h, y) {
8198
8198
  if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
8199
8199
  return !s.current.allowPinchZoom;
8200
- var w = Ki(h), v = n.current, S = "deltaX" in h ? h.deltaX : v[0] - w[0], C = "deltaY" in h ? h.deltaY : v[1] - w[1], k, _ = h.target, E = Math.abs(S) > Math.abs(C) ? "h" : "v";
8201
- if ("touches" in h && E === "h" && _.type === "range")
8200
+ var w = Ki(h), v = n.current, S = "deltaX" in h ? h.deltaX : v[0] - w[0], C = "deltaY" in h ? h.deltaY : v[1] - w[1], k, N = h.target, E = Math.abs(S) > Math.abs(C) ? "h" : "v";
8201
+ if ("touches" in h && E === "h" && N.type === "range")
8202
8202
  return !1;
8203
- var A = window.getSelection(), x = A && A.anchorNode, P = x ? x === _ || x.contains(_) : !1;
8203
+ var A = window.getSelection(), x = A && A.anchorNode, P = x ? x === N || x.contains(N) : !1;
8204
8204
  if (P)
8205
8205
  return !1;
8206
- var T = Gu(E, _);
8206
+ var T = Gu(E, N);
8207
8207
  if (!T)
8208
8208
  return !0;
8209
- if (T ? k = E : (k = E === "v" ? "h" : "v", T = Gu(E, _)), !T)
8209
+ if (T ? k = E : (k = E === "v" ? "h" : "v", T = Gu(E, N)), !T)
8210
8210
  return !1;
8211
8211
  if (!r.current && "changedTouches" in h && (S || C) && (r.current = k), !k)
8212
8212
  return !0;
@@ -8291,7 +8291,7 @@ var Jx = [" ", "Enter", "ArrowUp", "ArrowDown"], Qx = [" ", "Enter"], Xr = "Sele
8291
8291
  disabled: p,
8292
8292
  required: m,
8293
8293
  form: g
8294
- } = e, h = Qs(t), [y, w] = b.useState(null), [v, S] = b.useState(null), [C, k] = b.useState(!1), _ = Po(u), [E, A] = ar({
8294
+ } = e, h = Qs(t), [y, w] = b.useState(null), [v, S] = b.useState(null), [C, k] = b.useState(!1), N = Po(u), [E, A] = ar({
8295
8295
  prop: r,
8296
8296
  defaultProp: o ?? !1,
8297
8297
  onChange: i,
@@ -8318,7 +8318,7 @@ var Jx = [" ", "Enter", "ArrowUp", "ArrowDown"], Qx = [" ", "Enter"], Xr = "Sele
8318
8318
  onValueChange: P,
8319
8319
  open: E,
8320
8320
  onOpenChange: A,
8321
- dir: _,
8321
+ dir: N,
8322
8322
  triggerPointerDownPosRef: T,
8323
8323
  disabled: p,
8324
8324
  children: [
@@ -8470,7 +8470,7 @@ var Xn = 10, [Vp, Mr] = Mo(Jr), i0 = "SelectContentImpl", s0 = /* @__PURE__ */ t
8470
8470
  avoidCollisions: y,
8471
8471
  //
8472
8472
  ...w
8473
- } = e, v = Ir(Jr, n), [S, C] = b.useState(null), [k, _] = b.useState(null), E = rt(t, (G) => C(G)), [A, x] = b.useState(null), [P, T] = b.useState(
8473
+ } = e, v = Ir(Jr, n), [S, C] = b.useState(null), [k, N] = b.useState(null), E = rt(t, (G) => C(G)), [A, x] = b.useState(null), [P, T] = b.useState(
8474
8474
  null
8475
8475
  ), H = Js(n), [X, F] = b.useState(!1), B = b.useRef(!1);
8476
8476
  b.useEffect(() => {
@@ -8545,7 +8545,7 @@ var Xn = 10, [Vp, Mr] = Mo(Jr), i0 = "SelectContentImpl", s0 = /* @__PURE__ */ t
8545
8545
  scope: n,
8546
8546
  content: S,
8547
8547
  viewport: k,
8548
- onViewportChange: _,
8548
+ onViewportChange: N,
8549
8549
  itemRefCallback: U,
8550
8550
  selectedItem: A,
8551
8551
  onItemLeave: K,
@@ -8678,7 +8678,7 @@ var a0 = "SelectItemAlignedPosition", Wp = b.forwardRef((e, t) => {
8678
8678
  ln(() => {
8679
8679
  u && k(window.getComputedStyle(u).zIndex);
8680
8680
  }, [u]);
8681
- const _ = b.useCallback(
8681
+ const N = b.useCallback(
8682
8682
  (E) => {
8683
8683
  E && g.current === !0 && (S(), v?.(), g.current = !1);
8684
8684
  },
@@ -8690,7 +8690,7 @@ var a0 = "SelectItemAlignedPosition", Wp = b.forwardRef((e, t) => {
8690
8690
  scope: n,
8691
8691
  contentWrapper: a,
8692
8692
  shouldExpandOnScrollRef: m,
8693
- onScrollButtonChange: _,
8693
+ onScrollButtonChange: N,
8694
8694
  children: /* @__PURE__ */ f(
8695
8695
  "div",
8696
8696
  {
@@ -10323,8 +10323,8 @@ const Am = (e) => {
10323
10323
  }, y.onabort = function() {
10324
10324
  y && (r(new Je("Request aborted", Je.ECONNABORTED, e, y)), y = null);
10325
10325
  }, y.onerror = function(C) {
10326
- const k = C && C.message ? C.message : "Network Error", _ = new Je(k, Je.ERR_NETWORK, e, y);
10327
- _.event = C || null, r(_), y = null;
10326
+ const k = C && C.message ? C.message : "Network Error", N = new Je(k, Je.ERR_NETWORK, e, y);
10327
+ N.event = C || null, r(N), y = null;
10328
10328
  }, y.ontimeout = function() {
10329
10329
  let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
10330
10330
  const k = o.transitional || mc;
@@ -10511,7 +10511,7 @@ const Am = (e) => {
10511
10511
  cancelToken: S,
10512
10512
  timeout: C,
10513
10513
  onDownloadProgress: k,
10514
- onUploadProgress: _,
10514
+ onUploadProgress: N,
10515
10515
  responseType: E,
10516
10516
  headers: A,
10517
10517
  withCredentials: x = "same-origin",
@@ -10527,7 +10527,7 @@ const Am = (e) => {
10527
10527
  });
10528
10528
  let B;
10529
10529
  try {
10530
- if (_ && u && y !== "get" && y !== "head" && (B = await m(A, w)) !== 0) {
10530
+ if (N && u && y !== "get" && y !== "head" && (B = await m(A, w)) !== 0) {
10531
10531
  let ae = new n(h, {
10532
10532
  method: "POST",
10533
10533
  body: w,
@@ -10536,7 +10536,7 @@ const Am = (e) => {
10536
10536
  if (W.isFormData(w) && (U = ae.headers.get("content-type")) && A.setContentType(U), ae.body) {
10537
10537
  const [K, J] = td(
10538
10538
  B,
10539
- ws(nd(_))
10539
+ ws(nd(N))
10540
10540
  );
10541
10541
  w = od(ae.body, id, K, J);
10542
10542
  }
@@ -11057,22 +11057,22 @@ It.getAdapter = Em.getAdapter;
11057
11057
  It.HttpStatusCode = El;
11058
11058
  It.default = It;
11059
11059
  const {
11060
- Axios: JF,
11060
+ Axios: eP,
11061
11061
  AxiosError: gC,
11062
- CanceledError: QF,
11063
- isCancel: ZF,
11064
- CancelToken: eP,
11065
- VERSION: tP,
11066
- all: nP,
11067
- Cancel: rP,
11068
- isAxiosError: oP,
11069
- spread: iP,
11070
- toFormData: sP,
11071
- AxiosHeaders: aP,
11072
- HttpStatusCode: lP,
11073
- formToJSON: cP,
11074
- getAdapter: uP,
11075
- mergeConfig: dP
11062
+ CanceledError: tP,
11063
+ isCancel: nP,
11064
+ CancelToken: rP,
11065
+ VERSION: oP,
11066
+ all: iP,
11067
+ Cancel: sP,
11068
+ isAxiosError: aP,
11069
+ spread: lP,
11070
+ toFormData: cP,
11071
+ AxiosHeaders: uP,
11072
+ HttpStatusCode: dP,
11073
+ formToJSON: fP,
11074
+ getAdapter: pP,
11075
+ mergeConfig: mP
11076
11076
  } = It;
11077
11077
  function pn(e, t) {
11078
11078
  if (!t || t.trim() === "" || e == null) return;
@@ -11255,7 +11255,7 @@ function AC(e) {
11255
11255
  });
11256
11256
  }
11257
11257
  let Rm = null;
11258
- function fP(e) {
11258
+ function hP(e) {
11259
11259
  Rm = e;
11260
11260
  }
11261
11261
  function CC() {
@@ -11305,7 +11305,7 @@ function km({
11305
11305
  r?.dependentFields,
11306
11306
  s?.apiClientFilter?.matchField,
11307
11307
  r?.apiClientFilter?.matchField
11308
- ]), _ = pe(() => {
11308
+ ]), N = pe(() => {
11309
11309
  const P = /* @__PURE__ */ new Set([...C, ...k]);
11310
11310
  if (P.size === 0) return null;
11311
11311
  const T = {};
@@ -11387,7 +11387,7 @@ function km({
11387
11387
  s?.apiMethod,
11388
11388
  r?.apiEndpoint,
11389
11389
  r?.apiMethod,
11390
- _,
11390
+ N,
11391
11391
  k,
11392
11392
  A,
11393
11393
  E
@@ -11441,13 +11441,13 @@ const Fm = ({
11441
11441
  field: e,
11442
11442
  formValues: c,
11443
11443
  submissionContext: u
11444
- }), C = l?.length ? new Set(l.map(String)) : null, k = C ? w.filter((D) => !C.has(String(D.value ?? D.label ?? ""))) : w, _ = "__clear__", E = t != null && String(t).trim() !== "", A = E ? k.some((D) => String(D.value ?? D.label ?? "") === String(t)) : !1, x = pe(() => {
11444
+ }), C = l?.length ? new Set(l.map(String)) : null, k = C ? w.filter((D) => !C.has(String(D.value ?? D.label ?? ""))) : w, N = "__clear__", E = t != null && String(t).trim() !== "", A = E ? k.some((D) => String(D.value ?? D.label ?? "") === String(t)) : !1, x = pe(() => {
11445
11445
  if (!E || A) return k;
11446
11446
  const D = String(t);
11447
11447
  return [{ label: D, value: D }, ...k];
11448
11448
  }, [k, E, A, t]), P = E ? String(t) : void 0, T = `${St(e)}-${P ?? "empty"}`, H = Z(
11449
11449
  (D) => {
11450
- n(D === _ ? "" : D), r?.();
11450
+ n(D === N ? "" : D), r?.();
11451
11451
  },
11452
11452
  [n, r]
11453
11453
  ), X = e.appearance?.size || "md", F = {
@@ -11498,10 +11498,10 @@ const Fm = ({
11498
11498
  }
11499
11499
  ),
11500
11500
  /* @__PURE__ */ f(M0, { children: x.length === 0 ? /* @__PURE__ */ f(La, { value: "__no_options__", disabled: !0, children: I }) : /* @__PURE__ */ $(an, { children: [
11501
- E ? /* @__PURE__ */ f(La, { value: _, children: B }) : null,
11501
+ E ? /* @__PURE__ */ f(La, { value: N, children: B }) : null,
11502
11502
  x.map((D, ae) => {
11503
11503
  const U = String(D.value ?? D.label ?? ae);
11504
- if (U === _) return null;
11504
+ if (U === N) return null;
11505
11505
  const K = D.label || D.value || String(D);
11506
11506
  return /* @__PURE__ */ f(
11507
11507
  La,
@@ -11961,16 +11961,16 @@ const Do = If((e) => ({
11961
11961
  _setAuthHeaders: (t) => e({ authHeaders: JC(t) }),
11962
11962
  _reset: () => e({ viewerContext: void 0, authHeaders: void 0 })
11963
11963
  }));
11964
- function pP(e) {
11964
+ function gP(e) {
11965
11965
  Do.getState()._setViewerContext(e);
11966
11966
  }
11967
- function mP(e) {
11967
+ function yP(e) {
11968
11968
  Do.getState()._setAuthHeaders(e);
11969
11969
  }
11970
- function hP() {
11970
+ function bP() {
11971
11971
  Do.getState()._reset();
11972
11972
  }
11973
- function gP() {
11973
+ function vP() {
11974
11974
  return Do.getState().viewerContext;
11975
11975
  }
11976
11976
  function Wm() {
@@ -11978,7 +11978,7 @@ function Wm() {
11978
11978
  }
11979
11979
  const gd = {};
11980
11980
  let Gm = null;
11981
- function yP(e) {
11981
+ function wP(e) {
11982
11982
  Gm = e;
11983
11983
  }
11984
11984
  function QC() {
@@ -12097,7 +12097,7 @@ const qm = ({
12097
12097
  formValues: u = {},
12098
12098
  submissionContext: l
12099
12099
  }) => {
12100
- const d = e.properties || {}, p = ZC(d), m = d.apiEndpoint?.trim() || "", g = d.apiRealtime === !0, h = (d.apiMethod || "GET").toUpperCase() === "POST" ? "POST" : "GET", y = d.searchInBody === !0, w = h === "POST" || h === "GET" && y, v = d.searchStrategy ?? d.searchSchedule ?? "debounce", S = d.searchIntervalMs ?? d.intervalMs ?? 300, C = d.minQueryLength ?? 0, k = d.maxResults, _ = d.searchQueryParam || "q", E = d.clearable !== !1, A = u, [x, P] = Ee(() => Ua(t, p) ? "" : p && typeof t == "object" && t !== null && !Array.isArray(t) ? d.initialDisplayLabel || "" : d.initialDisplayLabel || String(t)), [T, H] = Ee(!1), [X, F] = Ee([]), [B, O] = Ee([]), [M, I] = Ee([]), [z, D] = Ee(!1), [ae, U] = Ee(null), [K, J] = Ee(-1), ue = At(za(t, p)), ie = At(
12100
+ const d = e.properties || {}, p = ZC(d), m = d.apiEndpoint?.trim() || "", g = d.apiRealtime === !0, h = (d.apiMethod || "GET").toUpperCase() === "POST" ? "POST" : "GET", y = d.searchInBody === !0, w = h === "POST" || h === "GET" && y, v = d.searchStrategy ?? d.searchSchedule ?? "debounce", S = d.searchIntervalMs ?? d.intervalMs ?? 300, C = d.minQueryLength ?? 0, k = d.maxResults, N = d.searchQueryParam || "q", E = d.clearable !== !1, A = u, [x, P] = Ee(() => Ua(t, p) ? "" : p && typeof t == "object" && t !== null && !Array.isArray(t) ? d.initialDisplayLabel || "" : d.initialDisplayLabel || String(t)), [T, H] = Ee(!1), [X, F] = Ee([]), [B, O] = Ee([]), [M, I] = Ee([]), [z, D] = Ee(!1), [ae, U] = Ee(null), [K, J] = Ee(-1), ue = At(za(t, p)), ie = At(
12101
12101
  Ua(t, p) ? "" : p && typeof t == "object" && t !== null && !Array.isArray(t) ? d.initialDisplayLabel || "" : d.initialDisplayLabel || String(t ?? "")
12102
12102
  ), G = At(void 0), te = At(0), Oe = At(null), oe = tE(x, {
12103
12103
  mode: v,
@@ -12170,7 +12170,7 @@ const qm = ({
12170
12170
  let Ve;
12171
12171
  if (!w)
12172
12172
  Ve = (await Fr.get(ke, {
12173
- params: { [_]: ne },
12173
+ params: { [N]: ne },
12174
12174
  signal: Ge.signal,
12175
12175
  headers: Object.keys(Qe).length ? Qe : void 0
12176
12176
  })).data;
@@ -12184,7 +12184,7 @@ const qm = ({
12184
12184
  const ur = JSON.parse(un);
12185
12185
  Tn = { ...Bt, ...ur };
12186
12186
  } else
12187
- Tn = { ...Bt, [_]: ne };
12187
+ Tn = { ...Bt, [N]: ne };
12188
12188
  Ve = (await Fr.post(ke, Tn, {
12189
12189
  signal: Ge.signal,
12190
12190
  headers: Object.keys(Qe).length ? Qe : void 0
@@ -12252,7 +12252,7 @@ const qm = ({
12252
12252
  h,
12253
12253
  y,
12254
12254
  w,
12255
- _,
12255
+ N,
12256
12256
  C,
12257
12257
  k,
12258
12258
  d.apiKey,
@@ -12662,9 +12662,9 @@ var eh = "CheckboxBubbleInput", th = b.forwardRef(
12662
12662
  const S = window.HTMLInputElement.prototype, k = Object.getOwnPropertyDescriptor(
12663
12663
  S,
12664
12664
  "checked"
12665
- ).set, _ = !o.current;
12665
+ ).set, N = !o.current;
12666
12666
  if (h !== i && k) {
12667
- const E = new Event("click", { bubbles: _ });
12667
+ const E = new Event("click", { bubbles: N });
12668
12668
  v.indeterminate = Nr(i), k.call(v, Nr(i) ? !1 : i), v.dispatchEvent(E);
12669
12669
  }
12670
12670
  }, [p, h, i, o]);
@@ -12777,7 +12777,7 @@ var xc = "ScrollArea", [rh] = Mn(xc), [fE, Wn] = rh(xc), oh = b.forwardRef(
12777
12777
  dir: o,
12778
12778
  scrollHideDelay: i = 600,
12779
12779
  ...s
12780
- } = e, [a, c] = b.useState(null), [u, l] = b.useState(null), [d, p] = b.useState(null), [m, g] = b.useState(null), [h, y] = b.useState(null), [w, v] = b.useState(0), [S, C] = b.useState(0), [k, _] = b.useState(!1), [E, A] = b.useState(!1), x = rt(t, (T) => c(T)), P = Po(o);
12780
+ } = e, [a, c] = b.useState(null), [u, l] = b.useState(null), [d, p] = b.useState(null), [m, g] = b.useState(null), [h, y] = b.useState(null), [w, v] = b.useState(0), [S, C] = b.useState(0), [k, N] = b.useState(!1), [E, A] = b.useState(!1), x = rt(t, (T) => c(T)), P = Po(o);
12781
12781
  return /* @__PURE__ */ f(
12782
12782
  fE,
12783
12783
  {
@@ -12793,7 +12793,7 @@ var xc = "ScrollArea", [rh] = Mn(xc), [fE, Wn] = rh(xc), oh = b.forwardRef(
12793
12793
  scrollbarX: m,
12794
12794
  onScrollbarXChange: g,
12795
12795
  scrollbarXEnabled: k,
12796
- onScrollbarXEnabledChange: _,
12796
+ onScrollbarXEnabledChange: N,
12797
12797
  scrollbarY: h,
12798
12798
  onScrollbarYChange: y,
12799
12799
  scrollbarYEnabled: E,
@@ -13099,7 +13099,7 @@ var pE = b.forwardRef((e, t) => {
13099
13099
  onWheelScroll: l,
13100
13100
  onResize: d,
13101
13101
  ...p
13102
- } = e, m = Wn(cr, n), [g, h] = b.useState(null), y = rt(t, (x) => h(x)), w = b.useRef(null), v = b.useRef(""), S = m.viewport, C = r.content - r.viewport, k = bn(l), _ = bn(c), E = aa(d, 10);
13102
+ } = e, m = Wn(cr, n), [g, h] = b.useState(null), y = rt(t, (x) => h(x)), w = b.useRef(null), v = b.useRef(""), S = m.viewport, C = r.content - r.viewport, k = bn(l), N = bn(c), E = aa(d, 10);
13103
13103
  function A(x) {
13104
13104
  if (w.current) {
13105
13105
  const P = x.clientX - w.current.left, T = x.clientY - w.current.top;
@@ -13112,7 +13112,7 @@ var pE = b.forwardRef((e, t) => {
13112
13112
  g?.contains(T) && k(P, C);
13113
13113
  };
13114
13114
  return document.addEventListener("wheel", x, { passive: !1 }), () => document.removeEventListener("wheel", x, { passive: !1 });
13115
- }, [S, g, C, k]), b.useEffect(_, [r, _]), _o(g, E), _o(m.content, E), /* @__PURE__ */ f(
13115
+ }, [S, g, C, k]), b.useEffect(N, [r, N]), _o(g, E), _o(m.content, E), /* @__PURE__ */ f(
13116
13116
  yE,
13117
13117
  {
13118
13118
  scope: n,
@@ -13120,7 +13120,7 @@ var pE = b.forwardRef((e, t) => {
13120
13120
  hasThumb: o,
13121
13121
  onThumbChange: bn(i),
13122
13122
  onThumbPointerUp: bn(s),
13123
- onThumbPositionChange: _,
13123
+ onThumbPositionChange: N,
13124
13124
  onThumbPointerDown: bn(a),
13125
13125
  children: /* @__PURE__ */ f(
13126
13126
  Ue.div,
@@ -13360,7 +13360,7 @@ const gh = ({
13360
13360
  sm: "h-8 text-sm",
13361
13361
  md: "h-10",
13362
13362
  lg: "h-12 text-lg"
13363
- }, _ = w.length > 0 ? `${w.length} selected` : h.length === 0 && l?.length ? "No available options" : e.placeholder || "Select options";
13363
+ }, N = w.length > 0 ? `${w.length} selected` : h.length === 0 && l?.length ? "No available options" : e.placeholder || "Select options";
13364
13364
  return /* @__PURE__ */ $(
13365
13365
  Rt,
13366
13366
  {
@@ -13392,7 +13392,7 @@ const gh = ({
13392
13392
  e.appearance?.className
13393
13393
  ),
13394
13394
  children: [
13395
- /* @__PURE__ */ f("span", { className: "truncate", children: _ }),
13395
+ /* @__PURE__ */ f("span", { className: "truncate", children: N }),
13396
13396
  /* @__PURE__ */ $("div", { className: "flex items-center gap-2 shrink-0", children: [
13397
13397
  p && /* @__PURE__ */ f(ni, { className: "h-4 w-4 animate-spin text-muted-foreground" }),
13398
13398
  /* @__PURE__ */ f(di, { className: "h-4 w-4 opacity-50" })
@@ -13779,7 +13779,7 @@ var $E = b.forwardRef((e, t) => {
13779
13779
  defaultProp: a ?? null,
13780
13780
  onChange: c,
13781
13781
  caller: xi
13782
- }), [w, v] = b.useState(!1), S = bn(u), C = Ch(n), k = b.useRef(!1), [_, E] = b.useState(0);
13782
+ }), [w, v] = b.useState(!1), S = bn(u), C = Ch(n), k = b.useRef(!1), [N, E] = b.useState(0);
13783
13783
  return b.useEffect(() => {
13784
13784
  const A = p.current;
13785
13785
  if (A)
@@ -13808,7 +13808,7 @@ var $E = b.forwardRef((e, t) => {
13808
13808
  children: /* @__PURE__ */ f(
13809
13809
  Ue.div,
13810
13810
  {
13811
- tabIndex: w || _ === 0 ? -1 : 0,
13811
+ tabIndex: w || N === 0 ? -1 : 0,
13812
13812
  "data-orientation": r,
13813
13813
  ...d,
13814
13814
  ref: m,
@@ -14383,7 +14383,7 @@ function Tc({
14383
14383
  className: L("relative w-full h-full flex items-center gap-1 min-h-0 overflow-x-auto", l),
14384
14384
  children: [
14385
14385
  e.map((p, m) => {
14386
- const g = p instanceof File, h = !g && p && "url" in p ? p : null, y = h?.url ?? "", w = `${m}-${y}`, v = h && o.has(y), S = g ? r[m] ?? null : h && Cs(y) && !v ? y : null, C = g && _c(p) && !!S || !!h && Cs(y) && !v && !!S, k = g ? p.name : h ? h.name ?? d(y) : "", _ = c?.(m, p), E = h && y || _ || "";
14386
+ const g = p instanceof File, h = !g && p && "url" in p ? p : null, y = h?.url ?? "", w = `${m}-${y}`, v = h && o.has(y), S = g ? r[m] ?? null : h && Cs(y) && !v ? y : null, C = g && _c(p) && !!S || !!h && Cs(y) && !v && !!S, k = g ? p.name : h ? h.name ?? d(y) : "", N = c?.(m, p), E = h && y || N || "";
14387
14387
  return /* @__PURE__ */ $(
14388
14388
  "div",
14389
14389
  {
@@ -14533,12 +14533,12 @@ const oN = ({
14533
14533
  className: a,
14534
14534
  buttonResponses: c
14535
14535
  }) => {
14536
- const { gridStretch: u } = Os(), l = u && ql(e), d = e.properties, p = At(null), [m, g] = Ee(!1), [h, y] = Ee(), [w, v] = Ee(() => /* @__PURE__ */ new Set()), [S, C] = Ee(0), k = e.metadata ? typeof e.metadata == "string" ? JSON.parse(e.metadata) : e.metadata : null, _ = Is(e), E = pe(() => Ms(t), [t]), [A, x] = Ee(null);
14536
+ const { gridStretch: u } = Os(), l = u && ql(e), d = e.properties, p = At(null), [m, g] = Ee(!1), [h, y] = Ee(), [w, v] = Ee(() => /* @__PURE__ */ new Set()), [S, C] = Ee(0), k = e.metadata ? typeof e.metadata == "string" ? JSON.parse(e.metadata) : e.metadata : null, N = Is(e), E = pe(() => Ms(t), [t]), [A, x] = Ee(null);
14537
14537
  wt(() => {
14538
14538
  x(null);
14539
14539
  }, [t, S]);
14540
14540
  const P = A ?? E, T = Rc(P), H = e.validation?.find((xe) => xe.type === "fileSize"), X = e.validation?.find((xe) => xe.type === "fileType"), F = H?.value ? H.value : d?.maxSize ?? k?.maxSize ?? 10 * 1024 * 1024, B = X?.value ? X.value : d?.accept ?? k?.accept ?? [], O = Array.isArray(B) ? B.join(",") : "", M = () => {
14541
- P.length >= _ || p.current?.click();
14541
+ P.length >= N || p.current?.click();
14542
14542
  }, I = Z(
14543
14543
  (xe) => {
14544
14544
  if (H) {
@@ -14557,17 +14557,17 @@ const oN = ({
14557
14557
  [H, X, F]
14558
14558
  ), z = Z(
14559
14559
  (xe) => {
14560
- const Ae = Yl(xe, _);
14560
+ const Ae = Yl(xe, N);
14561
14561
  n(Ae), r?.();
14562
14562
  },
14563
- [n, r, _]
14563
+ [n, r, N]
14564
14564
  ), D = Z(
14565
14565
  (xe) => {
14566
14566
  y(void 0);
14567
14567
  const Ae = Array.from(xe), le = [...P];
14568
14568
  let we = null;
14569
14569
  for (const Xe of Ae) {
14570
- if (le.length >= _) break;
14570
+ if (le.length >= N) break;
14571
14571
  const dt = I(Xe);
14572
14572
  if (dt) {
14573
14573
  we || (we = dt);
@@ -14581,7 +14581,7 @@ const oN = ({
14581
14581
  }
14582
14582
  we && y(we), x(le), z(le);
14583
14583
  },
14584
- [P, _, I, z]
14584
+ [P, N, I, z]
14585
14585
  ), ae = Z(
14586
14586
  (xe) => {
14587
14587
  const Ae = xe.target.files;
@@ -14602,7 +14602,7 @@ const oN = ({
14602
14602
  }, ue = (xe) => {
14603
14603
  xe.preventDefault(), g(!1), xe.dataTransfer.files?.length && D(xe.dataTransfer.files);
14604
14604
  }, ie = o || h, G = [];
14605
- (H || F) && G.push(`Max size: ${To(F)}`), X && B.length > 0 && G.push(`Allowed types: ${B.join(", ")}`), _ > 1 && G.push(`Up to ${_} files`);
14605
+ (H || F) && G.push(`Max size: ${To(F)}`), X && B.length > 0 && G.push(`Allowed types: ${B.join(", ")}`), N > 1 && G.push(`Up to ${N} files`);
14606
14606
  const te = e.appearance?.hideLabel ?? !1, Oe = pe(() => {
14607
14607
  if (!c) return null;
14608
14608
  const xe = Object.values(c);
@@ -14619,7 +14619,7 @@ const oN = ({
14619
14619
  window.open(xe, "_blank", "noopener,noreferrer");
14620
14620
  }, []), re = Z((xe) => {
14621
14621
  v((Ae) => new Set(Ae).add(xe));
14622
- }, []), ve = P.length === 0, de = P.length < _, st = Nc(_, P.length);
14622
+ }, []), ve = P.length === 0, de = P.length < N, st = Nc(N, P.length);
14623
14623
  return /* @__PURE__ */ f(
14624
14624
  Rt,
14625
14625
  {
@@ -14661,7 +14661,7 @@ const oN = ({
14661
14661
  id: St(e),
14662
14662
  type: "file",
14663
14663
  accept: O,
14664
- multiple: _ > 1,
14664
+ multiple: N > 1,
14665
14665
  onChange: ae,
14666
14666
  disabled: i || e.disabled || !de,
14667
14667
  className: "hidden",
@@ -14690,7 +14690,7 @@ const oN = ({
14690
14690
  Tc,
14691
14691
  {
14692
14692
  items: P,
14693
- maxFiles: _,
14693
+ maxFiles: N,
14694
14694
  disabled: i,
14695
14695
  objectUrls: T,
14696
14696
  failedUrlKeys: w,
@@ -14971,7 +14971,7 @@ rg.displayName = ng;
14971
14971
  function Oc(e) {
14972
14972
  return e ? "open" : "closed";
14973
14973
  }
14974
- var og = "DialogTitleWarning", [bP, ig] = cw(og, {
14974
+ var og = "DialogTitleWarning", [SP, ig] = cw(og, {
14975
14975
  contentName: eo,
14976
14976
  titleName: Pc,
14977
14977
  docsSlug: "dialog"
@@ -15133,7 +15133,7 @@ const sg = ({
15133
15133
  const a = At(null), c = At(null), u = At(null), l = At(null), [d, p] = Ee(null), [m, g] = Ee(!1), h = Z(() => {
15134
15134
  a.current && (a.current.srcObject = null);
15135
15135
  }, []), y = Z(() => {
15136
- u.current && (u.current.getTracks().forEach((_) => _.stop()), u.current = null), h();
15136
+ u.current && (u.current.getTracks().forEach((N) => N.stop()), u.current = null), h();
15137
15137
  }, [h]);
15138
15138
  wt(() => {
15139
15139
  if (!e) {
@@ -15141,33 +15141,33 @@ const sg = ({
15141
15141
  return;
15142
15142
  }
15143
15143
  if (i) return;
15144
- let _ = !1;
15144
+ let N = !1;
15145
15145
  return p(null), g(!0), MN().then((E) => {
15146
- if (_) {
15146
+ if (N) {
15147
15147
  E.getTracks().forEach((A) => A.stop());
15148
15148
  return;
15149
15149
  }
15150
15150
  u.current = E, g(!1);
15151
15151
  }).catch((E) => {
15152
- if (_) return;
15152
+ if (N) return;
15153
15153
  g(!1);
15154
15154
  const A = E instanceof Error ? E.message : "Could not access camera";
15155
15155
  p(A);
15156
15156
  }), () => {
15157
- _ = !0, u.current && (u.current.getTracks().forEach((E) => E.stop()), u.current = null), h();
15157
+ N = !0, u.current && (u.current.getTracks().forEach((E) => E.stop()), u.current = null), h();
15158
15158
  };
15159
15159
  }, [e, i, y, h]);
15160
15160
  const w = Z(
15161
- (_) => {
15162
- a.current = _, _ && u.current && e && !d && !m && (_.srcObject = u.current, wd(_));
15161
+ (N) => {
15162
+ a.current = N, N && u.current && e && !d && !m && (N.srcObject = u.current, wd(N));
15163
15163
  },
15164
15164
  [e, d, m]
15165
15165
  );
15166
15166
  as(() => {
15167
15167
  if (!e || d || m || !u.current) return;
15168
- let _ = !1, E = 0;
15168
+ let N = !1, E = 0;
15169
15169
  const A = () => {
15170
- if (_) return;
15170
+ if (N) return;
15171
15171
  const P = a.current;
15172
15172
  !P || !u.current || (P.srcObject = u.current, wd(P));
15173
15173
  };
@@ -15176,19 +15176,19 @@ const sg = ({
15176
15176
  A(), E = requestAnimationFrame(A);
15177
15177
  });
15178
15178
  return () => {
15179
- _ = !0, cancelAnimationFrame(x), cancelAnimationFrame(E), h();
15179
+ N = !0, cancelAnimationFrame(x), cancelAnimationFrame(E), h();
15180
15180
  };
15181
15181
  }, [e, d, m, h]);
15182
15182
  const v = Z(() => {
15183
15183
  y(), p(null), g(!1), t(!1), l.current && (l.current.value = "");
15184
15184
  }, [y, t]), S = Z(() => {
15185
- const _ = a.current, E = c.current;
15186
- if (!_ || !E || !u.current || _.readyState < 2) return;
15187
- const A = _.videoWidth, x = _.videoHeight;
15185
+ const N = a.current, E = c.current;
15186
+ if (!N || !E || !u.current || N.readyState < 2) return;
15187
+ const A = N.videoWidth, x = N.videoHeight;
15188
15188
  if (A === 0 || x === 0) return;
15189
15189
  E.width = A, E.height = x;
15190
15190
  const P = E.getContext("2d");
15191
- P && (P.drawImage(_, 0, 0), E.toBlob(
15191
+ P && (P.drawImage(N, 0, 0), E.toBlob(
15192
15192
  (T) => {
15193
15193
  if (!T) return;
15194
15194
  const H = new File([T], `camera-capture-${Date.now()}.jpg`, {
@@ -15205,8 +15205,8 @@ const sg = ({
15205
15205
  0.92
15206
15206
  ));
15207
15207
  }, [n, r, v, s]), C = Z(
15208
- (_) => {
15209
- const E = _.target.files?.[0];
15208
+ (N) => {
15209
+ const E = N.target.files?.[0];
15210
15210
  if (!E) return;
15211
15211
  const A = r(E);
15212
15212
  if (A) {
@@ -15235,15 +15235,15 @@ const sg = ({
15235
15235
  TN,
15236
15236
  {
15237
15237
  open: e,
15238
- onOpenChange: (_) => {
15239
- _ || v();
15238
+ onOpenChange: (N) => {
15239
+ N || v();
15240
15240
  },
15241
15241
  children: /* @__PURE__ */ $(
15242
15242
  FN,
15243
15243
  {
15244
15244
  className: "sm:max-w-md",
15245
15245
  showCloseButton: !0,
15246
- onPointerDownOutside: (_) => _.preventDefault(),
15246
+ onPointerDownOutside: (N) => N.preventDefault(),
15247
15247
  children: [
15248
15248
  /* @__PURE__ */ f(PN, { children: /* @__PURE__ */ f(IN, { children: "Take a photo" }) }),
15249
15249
  d ? /* @__PURE__ */ $("div", { className: "space-y-3 py-2", children: [
@@ -15282,7 +15282,7 @@ const sg = ({
15282
15282
  isRequired: s,
15283
15283
  className: a
15284
15284
  }) => {
15285
- const c = e.properties, [u, l] = Ee(), [d, p] = Ee(!1), [m, g] = Ee(() => /* @__PURE__ */ new Set()), [h, y] = Ee("none"), w = e.metadata ? typeof e.metadata == "string" ? JSON.parse(e.metadata) : e.metadata : null, v = e.validation?.find((K) => K.type === "fileSize"), S = e.validation?.find((K) => K.type === "fileType"), C = v?.value != null ? v.value : c?.maxSize ?? w?.maxSize ?? 5 * 1024 * 1024, k = S?.value != null ? S.value : c?.accept ?? w?.accept ?? ["image/*"], _ = k.join(",") || "image/*", E = Is(e), A = Z(
15285
+ const c = e.properties, [u, l] = Ee(), [d, p] = Ee(!1), [m, g] = Ee(() => /* @__PURE__ */ new Set()), [h, y] = Ee("none"), w = e.metadata ? typeof e.metadata == "string" ? JSON.parse(e.metadata) : e.metadata : null, v = e.validation?.find((K) => K.type === "fileSize"), S = e.validation?.find((K) => K.type === "fileType"), C = v?.value != null ? v.value : c?.maxSize ?? w?.maxSize ?? 5 * 1024 * 1024, k = S?.value != null ? S.value : c?.accept ?? w?.accept ?? ["image/*"], N = k.join(",") || "image/*", E = Is(e), A = Z(
15286
15286
  (K) => {
15287
15287
  if (v) {
15288
15288
  const J = ir(K, v);
@@ -15419,7 +15419,7 @@ const sg = ({
15419
15419
  onOpenChange: B,
15420
15420
  onCaptured: H,
15421
15421
  validateFile: A,
15422
- accept: _,
15422
+ accept: N,
15423
15423
  disabled: i,
15424
15424
  onValidationMessage: l
15425
15425
  }
@@ -15438,14 +15438,14 @@ const sg = ({
15438
15438
  className: a,
15439
15439
  buttonResponses: c
15440
15440
  }) => {
15441
- const u = e.properties, l = At(null), [d, p] = Ee(), [m, g] = Ee(!1), [h, y] = Ee(() => /* @__PURE__ */ new Set()), [w, v] = Ee("none"), S = e.metadata ? typeof e.metadata == "string" ? JSON.parse(e.metadata) : e.metadata : null, C = e.validation?.find((oe) => oe.type === "fileSize"), k = e.validation?.find((oe) => oe.type === "fileType"), _ = C?.value ? C.value : u?.maxSize ?? S?.maxSize ?? 5 * 1024 * 1024, E = k?.value ? k.value : u?.accept ?? S?.accept ?? ["image/*"], A = Array.isArray(E) ? E.join(",") : "image/*", x = Is(e), P = Z(
15441
+ const u = e.properties, l = At(null), [d, p] = Ee(), [m, g] = Ee(!1), [h, y] = Ee(() => /* @__PURE__ */ new Set()), [w, v] = Ee("none"), S = e.metadata ? typeof e.metadata == "string" ? JSON.parse(e.metadata) : e.metadata : null, C = e.validation?.find((oe) => oe.type === "fileSize"), k = e.validation?.find((oe) => oe.type === "fileType"), N = C?.value ? C.value : u?.maxSize ?? S?.maxSize ?? 5 * 1024 * 1024, E = k?.value ? k.value : u?.accept ?? S?.accept ?? ["image/*"], A = Array.isArray(E) ? E.join(",") : "image/*", x = Is(e), P = Z(
15442
15442
  (oe) => {
15443
15443
  if (C) {
15444
15444
  const re = ir(oe, C);
15445
15445
  if (re !== !0)
15446
15446
  return typeof re == "string" ? re : "File size exceeds the maximum allowed size";
15447
- } else if (oe.size > _)
15448
- return `File size must be less than ${To(_)}`;
15447
+ } else if (oe.size > N)
15448
+ return `File size must be less than ${To(N)}`;
15449
15449
  if (k) {
15450
15450
  const re = ir(oe, k);
15451
15451
  if (re !== !0)
@@ -15453,7 +15453,7 @@ const sg = ({
15453
15453
  }
15454
15454
  return null;
15455
15455
  },
15456
- [C, k, _]
15456
+ [C, k, N]
15457
15457
  ), T = pe(
15458
15458
  () => Ms(t),
15459
15459
  [t]
@@ -15514,7 +15514,7 @@ const sg = ({
15514
15514
  ), D = Z((oe) => {
15515
15515
  g(oe), oe || v("none");
15516
15516
  }, []), ae = o || d, U = e.appearance?.hideLabel ?? !1, K = [];
15517
- (C || _) && K.push(`Max size: ${To(_)}`), k && E.length > 0 && K.push(`Allowed: ${E.join(", ")}`), x > 1 && K.push(`Up to ${x} photos`);
15517
+ (C || N) && K.push(`Max size: ${To(N)}`), k && E.length > 0 && K.push(`Allowed: ${E.join(", ")}`), x > 1 && K.push(`Up to ${x} photos`);
15518
15518
  const J = pe(() => {
15519
15519
  if (!c) return null;
15520
15520
  const oe = Object.values(c);
@@ -16102,7 +16102,7 @@ const QN = ({
16102
16102
  buttonResponses: S,
16103
16103
  onButtonApiResponse: C,
16104
16104
  onValidateForm: k,
16105
- getValidationErrors: _,
16105
+ getValidationErrors: N,
16106
16106
  allFields: E,
16107
16107
  onSubmittingChange: A,
16108
16108
  scopedFormValues: x,
@@ -16138,9 +16138,9 @@ const QN = ({
16138
16138
  const ie = M?.variant || "default", G = M?.size || "default", te = M?.hideLabel ?? e.appearance?.hideLabel ?? !1, Oe = M?.buttonText || e.label || "Button", oe = M?.closeOnCancel ?? !0, re = async () => {
16139
16139
  if (x && P && Object.keys(P).length > 0 || !k) return !0;
16140
16140
  const Ze = await k();
16141
- if (!Ze && _)
16141
+ if (!Ze && N)
16142
16142
  try {
16143
- const q = _();
16143
+ const q = N();
16144
16144
  Kt.error(
16145
16145
  Tl(q, E ?? void 0) || "Please fix the errors before submitting."
16146
16146
  );
@@ -16814,7 +16814,7 @@ var pg = ["PageUp", "PageDown"], mg = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
16814
16814
  onChange: (T) => {
16815
16815
  [...y.current][w.current]?.focus(), d(T);
16816
16816
  }
16817
- }), _ = b.useRef(C);
16817
+ }), N = b.useRef(C);
16818
16818
  function E(T) {
16819
16819
  const H = b_(C, T);
16820
16820
  P(T, H);
@@ -16823,7 +16823,7 @@ var pg = ["PageUp", "PageDown"], mg = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
16823
16823
  P(T, w.current);
16824
16824
  }
16825
16825
  function x() {
16826
- const T = _.current[w.current];
16826
+ const T = N.current[w.current];
16827
16827
  C[w.current] !== T && p(C);
16828
16828
  }
16829
16829
  function P(T, H, { commit: X } = { commit: !1 }) {
@@ -16859,7 +16859,7 @@ var pg = ["PageUp", "PageDown"], mg = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
16859
16859
  ...h,
16860
16860
  ref: t,
16861
16861
  onPointerDown: Le(h.onPointerDown, () => {
16862
- a || (_.current = C);
16862
+ a || (N.current = C);
16863
16863
  }),
16864
16864
  min: r,
16865
16865
  max: o,
@@ -17313,8 +17313,8 @@ const R_ = ({
17313
17313
  if (!v) return;
17314
17314
  const S = v.getContext("2d");
17315
17315
  if (!S) return;
17316
- const C = v.getBoundingClientRect(), k = "touches" in w ? w.touches[0].clientX - C.left : w.clientX - C.left, _ = "touches" in w ? w.touches[0].clientY - C.top : w.clientY - C.top;
17317
- S.beginPath(), S.moveTo(k, _);
17316
+ const C = v.getBoundingClientRect(), k = "touches" in w ? w.touches[0].clientX - C.left : w.clientX - C.left, N = "touches" in w ? w.touches[0].clientY - C.top : w.clientY - C.top;
17317
+ S.beginPath(), S.moveTo(k, N);
17318
17318
  },
17319
17319
  [p]
17320
17320
  ), g = Z(
@@ -17324,8 +17324,8 @@ const R_ = ({
17324
17324
  if (!v) return;
17325
17325
  const S = v.getContext("2d");
17326
17326
  if (!S) return;
17327
- const C = v.getBoundingClientRect(), k = "touches" in w ? w.touches[0].clientX - C.left : w.clientX - C.left, _ = "touches" in w ? w.touches[0].clientY - C.top : w.clientY - C.top;
17328
- S.lineWidth = 2, S.lineCap = "round", S.strokeStyle = "#000", S.lineTo(k, _), S.stroke(), S.beginPath(), S.moveTo(k, _);
17327
+ const C = v.getBoundingClientRect(), k = "touches" in w ? w.touches[0].clientX - C.left : w.clientX - C.left, N = "touches" in w ? w.touches[0].clientY - C.top : w.clientY - C.top;
17328
+ S.lineWidth = 2, S.lineCap = "round", S.strokeStyle = "#000", S.lineTo(k, N), S.stroke(), S.beginPath(), S.moveTo(k, N);
17329
17329
  },
17330
17330
  [l, p]
17331
17331
  ), h = Z(() => {
@@ -17409,7 +17409,7 @@ const R_ = ({
17409
17409
  formValues: l,
17410
17410
  submissionContext: d
17411
17411
  }) => {
17412
- const p = e.properties, m = p?.columns || [], g = p?.minRows || 1, h = p?.maxRows || 10, y = !u && p?.allowAddRow !== !1, w = !u && p?.allowDeleteRow !== !1, v = i === !1 && s === !1 ? !1 : i || e.disabled || s || e.readOnly, S = t || [], C = y && S.length < h, k = w && S.length > g, _ = Z(() => {
17412
+ const p = e.properties, m = p?.columns || [], g = p?.minRows || 1, h = p?.maxRows || 10, y = !u && p?.allowAddRow !== !1, w = !u && p?.allowDeleteRow !== !1, v = i === !1 && s === !1 ? !1 : i || e.disabled || s || e.readOnly, S = t || [], C = y && S.length < h, k = w && S.length > g, N = Z(() => {
17413
17413
  if (!C || v) return;
17414
17414
  const F = {};
17415
17415
  m.forEach((B) => {
@@ -17693,7 +17693,7 @@ const R_ = ({
17693
17693
  type: "button",
17694
17694
  variant: "outline",
17695
17695
  size: "sm",
17696
- onClick: _,
17696
+ onClick: N,
17697
17697
  disabled: v,
17698
17698
  className: "w-full",
17699
17699
  children: [
@@ -18134,7 +18134,7 @@ const J_ = ({
18134
18134
  children: F.value
18135
18135
  }
18136
18136
  ) : /* @__PURE__ */ f("span", { className: L(B, z.className), style: z.style, children: _g(O, X, { currencySymbol: d, emptyDisplay: p }) });
18137
- }, w = u.gridTitle?.trim() ?? "", v = Math.max(1, e.position?.rowSpan ?? 1), S = Math.max(1, e.position?.columnSpan ?? 1), C = Math.max(g.rows.length, 1), k = v >= 3 ? "py-4" : v >= 2 ? "py-3" : "py-2", _ = S >= 3 ? "px-4" : S >= 2 ? "px-3" : "px-2";
18137
+ }, w = u.gridTitle?.trim() ?? "", v = Math.max(1, e.position?.rowSpan ?? 1), S = Math.max(1, e.position?.columnSpan ?? 1), C = Math.max(g.rows.length, 1), k = v >= 3 ? "py-4" : v >= 2 ? "py-3" : "py-2", N = S >= 3 ? "px-4" : S >= 2 ? "px-3" : "px-2";
18138
18138
  return l.length === 0 ? /* @__PURE__ */ f(Rt, { field: e, error: o, isRequired: a, className: c, children: /* @__PURE__ */ f("div", { className: "p-4 border rounded-md bg-muted/50 text-sm text-muted-foreground", children: "No columns defined for this billing grid" }) }) : /* @__PURE__ */ f(Rt, { field: e, error: o, isRequired: a, className: c, children: /* @__PURE__ */ $(
18139
18139
  "div",
18140
18140
  {
@@ -18171,7 +18171,7 @@ const J_ = ({
18171
18171
  "th",
18172
18172
  {
18173
18173
  className: L(
18174
- _,
18174
+ N,
18175
18175
  k,
18176
18176
  "text-xs uppercase tracking-wider whitespace-nowrap",
18177
18177
  Ga(E.align),
@@ -18183,7 +18183,7 @@ const J_ = ({
18183
18183
  E.id
18184
18184
  );
18185
18185
  }) }) }),
18186
- /* @__PURE__ */ f("tbody", { className: "h-full", children: g.rows.length === 0 ? /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f("td", { colSpan: l.length, className: L(_, "py-8 text-center text-sm text-muted-foreground"), children: "No billing rows configured" }) }) : g.rows.map((E) => /* @__PURE__ */ f(
18186
+ /* @__PURE__ */ f("tbody", { className: "h-full", children: g.rows.length === 0 ? /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f("td", { colSpan: l.length, className: L(N, "py-8 text-center text-sm text-muted-foreground"), children: "No billing rows configured" }) }) : g.rows.map((E) => /* @__PURE__ */ f(
18187
18187
  "tr",
18188
18188
  {
18189
18189
  className: "border-b border-border/60",
@@ -18194,7 +18194,7 @@ const J_ = ({
18194
18194
  "td",
18195
18195
  {
18196
18196
  className: L(
18197
- _,
18197
+ N,
18198
18198
  k,
18199
18199
  "align-middle whitespace-nowrap",
18200
18200
  Ga(P)
@@ -18237,7 +18237,7 @@ const Q_ = ({
18237
18237
  skipApiCall: u = !1,
18238
18238
  prepopulateResponse: l = null
18239
18239
  }) => {
18240
- const d = e.properties || {}, p = d.source ?? "manual", m = Array.isArray(d.statuses) ? d.statuses : [], g = (d.dataPath || "data").trim(), h = d.showStatusText === !0, y = (d.statusTextPath || "data.admissionStatus").trim(), w = d.showCurrentIndicator !== !1, [v, S] = Ee(null), [C, k] = Ee(!1), [_, E] = Ee(null), A = Ul(), x = At(s), P = At(a), T = At(c), H = At(A);
18240
+ const d = e.properties || {}, p = d.source ?? "manual", m = Array.isArray(d.statuses) ? d.statuses : [], g = (d.dataPath || "data").trim(), h = d.showStatusText === !0, y = (d.statusTextPath || "data.admissionStatus").trim(), w = d.showCurrentIndicator !== !1, [v, S] = Ee(null), [C, k] = Ee(!1), [N, E] = Ee(null), A = Ul(), x = At(s), P = At(a), T = At(c), H = At(A);
18241
18241
  x.current = s, P.current = a, T.current = c, H.current = A;
18242
18242
  const X = Z(async () => {
18243
18243
  const I = d.apiEndpoint?.trim();
@@ -18287,7 +18287,7 @@ const Q_ = ({
18287
18287
  Rt,
18288
18288
  {
18289
18289
  field: e,
18290
- error: n || _ || void 0,
18290
+ error: n || N || void 0,
18291
18291
  isRequired: o,
18292
18292
  className: L(i, "!space-y-0 h-full min-h-0 flex flex-col"),
18293
18293
  children: /* @__PURE__ */ $("div", { className: "rounded-lg border bg-card p-4 h-full min-h-0 flex flex-col", children: [
@@ -18415,7 +18415,7 @@ const eT = ({
18415
18415
  const C = pe(() => {
18416
18416
  const T = Array.isArray(t) ? t : [];
18417
18417
  return new Set(T.map((X) => mo(X, p)));
18418
- }, [t, p]), k = v.length > 0 && v.every((T) => C.has(mo(T, p))), _ = v.some((T) => C.has(mo(T, p))), E = Z(
18418
+ }, [t, p]), k = v.length > 0 && v.every((T) => C.has(mo(T, p))), N = v.some((T) => C.has(mo(T, p))), E = Z(
18419
18419
  (T, H) => {
18420
18420
  const X = mo(T, p), F = Array.isArray(t) ? t : [];
18421
18421
  H ? C.has(X) || n([...F, T]) : n(F.filter((B) => mo(B, p) !== X)), r?.();
@@ -18451,7 +18451,7 @@ const eT = ({
18451
18451
  Ss,
18452
18452
  {
18453
18453
  id: `${St(e)}-select-all`,
18454
- checked: k ? !0 : _ ? "indeterminate" : !1,
18454
+ checked: k ? !0 : N ? "indeterminate" : !1,
18455
18455
  onCheckedChange: A,
18456
18456
  disabled: P,
18457
18457
  "aria-label": "Select all"
@@ -18491,7 +18491,7 @@ const eT = ({
18491
18491
  variant: "outline",
18492
18492
  size: "sm",
18493
18493
  className: "h-7 text-xs",
18494
- disabled: P || !_,
18494
+ disabled: P || !N,
18495
18495
  onClick: () => {
18496
18496
  n([]), r?.();
18497
18497
  },
@@ -18914,7 +18914,7 @@ function Mg() {
18914
18914
  const _e = n.createElement("template");
18915
18915
  _e.content && _e.content.ownerDocument && (n = _e.content.ownerDocument);
18916
18916
  }
18917
- let _, E = "";
18917
+ let N, E = "";
18918
18918
  const A = n, x = A.implementation, P = A.createNodeIterator, T = A.createDocumentFragment, H = A.getElementsByTagName, X = r.importNode;
18919
18919
  let F = Ud();
18920
18920
  t.isSupported = typeof Og == "function" && typeof C == "function" && x && x.createHTMLDocument !== void 0;
@@ -18986,9 +18986,9 @@ function Mg() {
18986
18986
  throw Qi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
18987
18987
  if (typeof R.TRUSTED_TYPES_POLICY.createScriptURL != "function")
18988
18988
  throw Qi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
18989
- _ = R.TRUSTED_TYPES_POLICY, E = _.createHTML("");
18989
+ N = R.TRUSTED_TYPES_POLICY, E = N.createHTML("");
18990
18990
  } else
18991
- _ === void 0 && (_ = VT(g, o)), _ !== null && typeof E == "string" && (E = _.createHTML(""));
18991
+ N === void 0 && (N = VT(g, o)), N !== null && typeof E == "string" && (E = N.createHTML(""));
18992
18992
  vn && vn(R), _n = R;
18993
18993
  }, nn = it({}, [...Ya, ...Xa, ...FT]), un = it({}, [...Ja, ...PT]), ur = function(R) {
18994
18994
  let Y = C(R);
@@ -19039,7 +19039,7 @@ function Mg() {
19039
19039
  ye = Ct && Ct[0];
19040
19040
  }
19041
19041
  Ht === "application/xhtml+xml" && ze === Nt && (R = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + R + "</body></html>");
19042
- const at = _ ? _.createHTML(R) : R;
19042
+ const at = N ? N.createHTML(R) : R;
19043
19043
  if (ze === Nt)
19044
19044
  try {
19045
19045
  Y = new m().parseFromString(at, Ht);
@@ -19196,14 +19196,14 @@ function Mg() {
19196
19196
  kt(Ct, R);
19197
19197
  continue;
19198
19198
  }
19199
- if (_ && typeof g == "object" && typeof g.getAttributeType == "function" && !$t)
19199
+ if (N && typeof g == "object" && typeof g.getAttributeType == "function" && !$t)
19200
19200
  switch (g.getAttributeType(_i, dn)) {
19201
19201
  case "TrustedHTML": {
19202
- jt = _.createHTML(jt);
19202
+ jt = N.createHTML(jt);
19203
19203
  break;
19204
19204
  }
19205
19205
  case "TrustedScriptURL": {
19206
- jt = _.createScriptURL(jt);
19206
+ jt = N.createScriptURL(jt);
19207
19207
  break;
19208
19208
  }
19209
19209
  }
@@ -19255,7 +19255,7 @@ function Mg() {
19255
19255
  else {
19256
19256
  if (!qe && !Ae && !we && // eslint-disable-next-line unicorn/prefer-includes
19257
19257
  _e.indexOf("<") === -1)
19258
- return _ && Ze ? _.createHTML(_e) : _e;
19258
+ return N && Ze ? N.createHTML(_e) : _e;
19259
19259
  if (Y = jo(_e), !Y)
19260
19260
  return qe ? null : Ze ? E : "";
19261
19261
  }
@@ -19277,7 +19277,7 @@ function Mg() {
19277
19277
  return we && J["!doctype"] && Y.ownerDocument && Y.ownerDocument.doctype && Y.ownerDocument.doctype.name && sn(jT, Y.ownerDocument.doctype.name) && ($t = "<!DOCTYPE " + Y.ownerDocument.doctype.name + `>
19278
19278
  ` + $t), Ae && ho([B, O, M], ($n) => {
19279
19279
  $t = yo($t, $n, " ");
19280
- }), _ && Ze ? _.createHTML($t) : $t;
19280
+ }), N && Ze ? N.createHTML($t) : $t;
19281
19281
  }, t.setConfig = function() {
19282
19282
  let _e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
19283
19283
  Tn(_e), Xe = !0;
@@ -19623,10 +19623,10 @@ const cR = ({
19623
19623
  wt(() => {
19624
19624
  y && w();
19625
19625
  }, [y, w]);
19626
- const v = c.textAlign === "center" ? "items-center" : c.textAlign === "right" ? "items-end" : c.textAlign === "justify" ? "items-stretch" : "items-start", S = XT(e), C = JT(e), k = C && e.label ? e.label : "", _ = e.description ?? "", E = tR({
19626
+ const v = c.textAlign === "center" ? "items-center" : c.textAlign === "right" ? "items-end" : c.textAlign === "justify" ? "items-stretch" : "items-start", S = XT(e), C = JT(e), k = C && e.label ? e.label : "", N = e.description ?? "", E = tR({
19627
19627
  bodyTemplate: S,
19628
19628
  captionTemplate: k,
19629
- descriptionTemplate: _,
19629
+ descriptionTemplate: N,
19630
19630
  prepopulateLoading: a,
19631
19631
  labelApiConfigPresent: u != null,
19632
19632
  labelApiLoading: p,
@@ -19639,7 +19639,7 @@ const cR = ({
19639
19639
  buttonResponses: i,
19640
19640
  prepopulateResponse: s,
19641
19641
  labelApiResponse: l
19642
- }, x = S ? Za(S, A) : "", P = C && e.label ? Za(e.label, A) : "", T = _ ? Za(_, A) : "";
19642
+ }, x = S ? Za(S, A) : "", P = C && e.label ? Za(e.label, A) : "", T = N ? Za(N, A) : "";
19643
19643
  return /* @__PURE__ */ f(
19644
19644
  "div",
19645
19645
  {
@@ -19731,7 +19731,7 @@ const cR = ({
19731
19731
  onButtonApiResponse: S,
19732
19732
  onValidateForm: C,
19733
19733
  getValidationErrors: k,
19734
- allFields: _,
19734
+ allFields: N,
19735
19735
  onSubmittingChange: E,
19736
19736
  onAddMore: A,
19737
19737
  scopedFormValues: x,
@@ -20155,7 +20155,7 @@ const cR = ({
20155
20155
  extraSubmitPayload: w,
20156
20156
  onValidateForm: C,
20157
20157
  getValidationErrors: k,
20158
- allFields: _,
20158
+ allFields: N,
20159
20159
  onSubmittingChange: E,
20160
20160
  scopedFormValues: x,
20161
20161
  scopedFieldNameMap: P,
@@ -20520,7 +20520,7 @@ function ss(e, t, n, r) {
20520
20520
  let S = l.readOnly === !0 || p?.readOnly === !0 || !1;
20521
20521
  const C = l.hidden === !0 || p?.hidden === !0 || !1;
20522
20522
  (p?.valueSource === "calculated" || p?.formula) && (S = !0);
20523
- const { disabled: k, readOnly: _, hidden: E, ...A } = p, x = {};
20523
+ const { disabled: k, readOnly: N, hidden: E, ...A } = p, x = {};
20524
20524
  A.hideLabel !== void 0 && (x.hideLabel = A.hideLabel), A.labelPosition !== void 0 && (x.labelPlacement = A.labelPosition), A.size !== void 0 && (x.size = A.size), A.customClass !== void 0 && (x.className = A.customClass);
20525
20525
  const { labelPosition: P, size: T, customClass: H, visibility: X, ...F } = A, B = Object.keys(F).length > 0 ? F : void 0, O = Object.keys(x).length > 0 ? x : void 0, M = l.visibility ?? p?.visibility ?? X;
20526
20526
  let I = yR(M);
@@ -20858,7 +20858,7 @@ function Uc(e) {
20858
20858
  });
20859
20859
  return n ? { ...e, fields: r } : e;
20860
20860
  }
20861
- function vP(e) {
20861
+ function xP(e) {
20862
20862
  return Uc(e);
20863
20863
  }
20864
20864
  const FR = new Set(
@@ -21123,14 +21123,14 @@ function qR(e, t, n, r, o, i, s) {
21123
21123
  for (let E = y; E <= y + v - 1; E++)
21124
21124
  for (let A = w; A <= w + S - 1; A++)
21125
21125
  a.add(`${E}-${A}`);
21126
- const k = l, _ = ei(d, m + 1);
21126
+ const k = l, N = ei(d, m + 1);
21127
21127
  c.set(C, {
21128
21128
  anchorRow: y,
21129
21129
  anchorCol: w,
21130
21130
  rowSpan: v,
21131
21131
  colSpan: S,
21132
21132
  run: k,
21133
- legend: _,
21133
+ legend: N,
21134
21134
  renderFields: Vc(g),
21135
21135
  addMoreMeta: {
21136
21136
  addMoreFieldName: u.addMoreFieldName,
@@ -21294,49 +21294,49 @@ const Xg = ({
21294
21294
  hideTableRowControls: S = !1,
21295
21295
  themeVars: C,
21296
21296
  dark: k = !1,
21297
- omitRootWrapper: _ = !1
21297
+ omitRootWrapper: N = !1
21298
21298
  }) => {
21299
- const E = Do((N) => N.viewerContext), A = pe(() => {
21299
+ const E = Do((_) => _.viewerContext), A = pe(() => {
21300
21300
  if (w !== void 0) return w;
21301
- const N = v?.();
21302
- return N !== void 0 ? N : E;
21303
- }, [w, v, E]), [x, P] = Ee(e || null), [T, H] = Ee(!!t && !e), [X, F] = Ee(null), B = e?.BFF_submit_api ?? X, [O, M] = Ee(!1), [I, z] = Ee({}), [D, ae] = Ee({}), [U, K] = Ee({}), [J, ue] = Ee({}), [ie, G] = Ee({}), [te, Oe] = Ee(null), oe = Ul(), re = Ot((N) => N.setValues), ve = Ot((N) => N.setSubmitting), de = Ot((N) => N.formDisabled), st = Ot((N) => N.visibleFields), xe = Ot((N) => N.requiredFields), Ae = Ot((N) => N.updateVisibility), le = Ot((N) => N.updateRequired), we = Ot((N) => N.setFieldError), Xe = At(!1), dt = At(void 0), qe = pe(() => {
21301
+ const _ = v?.();
21302
+ return _ !== void 0 ? _ : E;
21303
+ }, [w, v, E]), [x, P] = Ee(e || null), [T, H] = Ee(!!t && !e), [X, F] = Ee(null), B = e?.BFF_submit_api ?? X, [O, M] = Ee(!1), [I, z] = Ee({}), [D, ae] = Ee({}), [U, K] = Ee({}), [J, ue] = Ee({}), [ie, G] = Ee({}), [te, Oe] = Ee(null), oe = Ul(), re = Ot((_) => _.setValues), ve = Ot((_) => _.setSubmitting), de = Ot((_) => _.formDisabled), st = Ot((_) => _.visibleFields), xe = Ot((_) => _.requiredFields), Ae = Ot((_) => _.updateVisibility), le = Ot((_) => _.updateRequired), we = Ot((_) => _.setFieldError), Xe = At(!1), dt = At(void 0), qe = pe(() => {
21304
21304
  if (!e) return null;
21305
- const N = e;
21306
- if (N.form && Array.isArray(N.form.fields))
21305
+ const _ = e;
21306
+ if (_.form && Array.isArray(_.form.fields))
21307
21307
  try {
21308
21308
  return ss(
21309
- N.form,
21310
- N.form.fields,
21311
- N.form.layout || null,
21312
- N.form.rules || []
21309
+ _.form,
21310
+ _.form.fields,
21311
+ _.form.layout || null,
21312
+ _.form.rules || []
21313
21313
  );
21314
21314
  } catch {
21315
21315
  return e;
21316
21316
  }
21317
- if (Array.isArray(N.fields) && N.fields.some(
21317
+ if (Array.isArray(_.fields) && _.fields.some(
21318
21318
  (j) => typeof j.metadata == "string" && j.metadata.startsWith("{") || j.fieldType && !j.type
21319
21319
  ))
21320
21320
  try {
21321
21321
  const j = {
21322
- id: N.id || N._id || "temp",
21323
- name: N.name || "Form",
21324
- version: N.version ?? 1,
21325
- status: N.status || "draft",
21326
- createdAt: N.createdAt || (/* @__PURE__ */ new Date()).toISOString(),
21327
- updatedAt: N.updatedAt || (/* @__PURE__ */ new Date()).toISOString(),
21328
- createdBy: N.createdBy || "system",
21329
- category: N.category || "",
21330
- moduleId: N.moduleId,
21331
- tenantId: N.tenantId,
21332
- featureId: N.featureId,
21333
- isDefault: N.isDefault || !1
21322
+ id: _.id || _._id || "temp",
21323
+ name: _.name || "Form",
21324
+ version: _.version ?? 1,
21325
+ status: _.status || "draft",
21326
+ createdAt: _.createdAt || (/* @__PURE__ */ new Date()).toISOString(),
21327
+ updatedAt: _.updatedAt || (/* @__PURE__ */ new Date()).toISOString(),
21328
+ createdBy: _.createdBy || "system",
21329
+ category: _.category || "",
21330
+ moduleId: _.moduleId,
21331
+ tenantId: _.tenantId,
21332
+ featureId: _.featureId,
21333
+ isDefault: _.isDefault || !1
21334
21334
  };
21335
21335
  return ss(
21336
21336
  j,
21337
- N.fields,
21338
- N.layout || null,
21339
- N.rules || []
21337
+ _.fields,
21338
+ _.layout || null,
21339
+ _.rules || []
21340
21340
  );
21341
21341
  } catch {
21342
21342
  return e;
@@ -21345,13 +21345,13 @@ const Xg = ({
21345
21345
  }, [e]);
21346
21346
  wt(() => {
21347
21347
  if (e) {
21348
- const N = e;
21349
- N.BFF_submit_api && F(N.BFF_submit_api);
21348
+ const _ = e;
21349
+ _.BFF_submit_api && F(_.BFF_submit_api);
21350
21350
  }
21351
21351
  }, [e]);
21352
21352
  const Xt = pe(() => {
21353
- const N = qe || x, V = N ? Uc(
21354
- N
21353
+ const _ = qe || x, V = _ ? Uc(
21354
+ _
21355
21355
  ) : null;
21356
21356
  if (!V)
21357
21357
  return null;
@@ -21461,18 +21461,18 @@ const Xg = ({
21461
21461
  qe && qe !== x && P(qe);
21462
21462
  }, [qe]), wt(() => {
21463
21463
  if (t && !e) {
21464
- const N = (Zr() ?? "").trim() || "default", V = qg({
21465
- scope: N,
21464
+ const _ = (Zr() ?? "").trim() || "default", V = qg({
21465
+ scope: _,
21466
21466
  formId: t,
21467
21467
  version: "latest"
21468
21468
  });
21469
21469
  V?.value?.schema ? (P(V.value.schema), V.value.bffSubmitApi && F(V.value.bffSubmitApi), H(!1), V.isStale && Ze({ background: !0 })) : Ze({ background: !1 });
21470
21470
  }
21471
21471
  }, [t, e]);
21472
- const Ze = async ({ background: N }) => {
21472
+ const Ze = async ({ background: _ }) => {
21473
21473
  if (!t) return;
21474
21474
  const V = t;
21475
- N || H(!0);
21475
+ _ || H(!0);
21476
21476
  try {
21477
21477
  const j = await pR.getForRendering(t), ee = ss(
21478
21478
  j.form,
@@ -21489,7 +21489,7 @@ const Xg = ({
21489
21489
  );
21490
21490
  } catch {
21491
21491
  } finally {
21492
- N || H(!1);
21492
+ _ || H(!1);
21493
21493
  }
21494
21494
  };
21495
21495
  if (T)
@@ -21500,8 +21500,8 @@ const Xg = ({
21500
21500
  () => new Set(Object.keys(q.config?.prepopulateApi?.fieldMapping ?? {})),
21501
21501
  [q.config?.prepopulateApi?.fieldMapping]
21502
21502
  ), yt = Z(
21503
- async (N) => {
21504
- const V = q?.fields?.length ? Rl(N, q.fields) : N, j = ug(
21503
+ async (_) => {
21504
+ const V = q?.fields?.length ? Rl(_, q.fields) : _, j = ug(
21505
21505
  V,
21506
21506
  q.config?.sections,
21507
21507
  q.config?.submitPayload
@@ -21550,14 +21550,14 @@ const Xg = ({
21550
21550
  prepopulateResponse: te,
21551
21551
  prepopulateResponseRules: q.config?.prepopulateResponseRules
21552
21552
  });
21553
- const Tt = Ot((N) => N.readOnlyFields), _n = Ot((N) => N.editableFields), Br = Z((N) => Tt.has(N), [Tt]), Bt = Z((N) => _n.has(N), [_n]);
21553
+ const Tt = Ot((_) => _.readOnlyFields), _n = Ot((_) => _.editableFields), Br = Z((_) => Tt.has(_), [Tt]), Bt = Z((_) => _n.has(_), [_n]);
21554
21554
  wt(() => {
21555
21555
  q.config?.allowDraft && a === "fill" && Dr();
21556
21556
  }, [q.id]), wt(() => {
21557
21557
  dt.current = q.id, Xe.current = !1, z({}), K({}), ue({}), G({}), Oe(null);
21558
21558
  }, [q.id]), wt(() => {
21559
- const N = q.config?.prepopulateApi, V = !!(N?.fieldMapping && Object.keys(N?.fieldMapping ?? {}).length > 0), j = (q.config?.prepopulateResponseRules?.length ?? 0) > 0;
21560
- if (!N?.enabled || !N.apiEndpoint?.trim() || !V && !j || Xe.current)
21559
+ const _ = q.config?.prepopulateApi, V = !!(_?.fieldMapping && Object.keys(_?.fieldMapping ?? {}).length > 0), j = (q.config?.prepopulateResponseRules?.length ?? 0) > 0;
21560
+ if (!_?.enabled || !_.apiEndpoint?.trim() || !V && !j || Xe.current)
21561
21561
  return;
21562
21562
  Xe.current = !0;
21563
21563
  const ee = q.id;
@@ -21566,26 +21566,26 @@ const Xg = ({
21566
21566
  return M(!0), (async () => {
21567
21567
  try {
21568
21568
  const ce = Ot.getState().values, Ne = typeof p == "object" && p !== null ? { ...p, ...g || {} } : g || {}, Te = (se) => rr(se, ce, oe, Ne);
21569
- let Be = Er(Te(N.apiEndpoint));
21570
- if (N.apiQueryParams?.length) {
21569
+ let Be = Er(Te(_.apiEndpoint));
21570
+ if (_.apiQueryParams?.length) {
21571
21571
  const se = new URLSearchParams();
21572
- N.apiQueryParams.forEach(({ key: Me, value: ge }) => se.append(Me, Te(ge))), Be = `${Be}${Be.includes("?") ? "&" : "?"}${se.toString()}`;
21572
+ _.apiQueryParams.forEach(({ key: Me, value: ge }) => se.append(Me, Te(ge))), Be = `${Be}${Be.includes("?") ? "&" : "?"}${se.toString()}`;
21573
21573
  }
21574
21574
  const lt = {};
21575
- N.apiHeaders?.forEach(({ key: se, value: Me }) => {
21575
+ _.apiHeaders?.forEach(({ key: se, value: Me }) => {
21576
21576
  se.trim() && (lt[se] = Te(Me));
21577
21577
  }), lt["Content-Type"] = lt["Content-Type"] ?? "application/json";
21578
21578
  let Wt;
21579
- if (N.apiMethod === "POST" && N.apiBodyFields?.length) {
21579
+ if (_.apiMethod === "POST" && _.apiBodyFields?.length) {
21580
21580
  const se = {};
21581
- N.apiBodyFields.forEach(({ key: Me, value: ge }) => {
21581
+ _.apiBodyFields.forEach(({ key: Me, value: ge }) => {
21582
21582
  Me.trim() && (se[Me] = Te(ge));
21583
21583
  }), Wt = JSON.stringify(se);
21584
21584
  }
21585
21585
  const De = await fetch(Be, {
21586
- method: N.apiMethod,
21586
+ method: _.apiMethod,
21587
21587
  headers: lt,
21588
- body: N.apiMethod === "POST" ? Wt : void 0
21588
+ body: _.apiMethod === "POST" ? Wt : void 0
21589
21589
  });
21590
21590
  if (!De.ok) {
21591
21591
  const se = await De.text();
@@ -21638,7 +21638,7 @@ const Xg = ({
21638
21638
  ), me = new Set(
21639
21639
  q.fields.filter((se) => se.type === "billingGrid").map((se) => se.name || se.key)
21640
21640
  ), Fe = (se) => se.name || se.key || se.id, be = {}, ft = [], Gt = [], Ut = qN(
21641
- N?.fieldMapping,
21641
+ _?.fieldMapping,
21642
21642
  q.config?.sections,
21643
21643
  q.config?.submitPayload
21644
21644
  );
@@ -21693,7 +21693,7 @@ const Xg = ({
21693
21693
  continue;
21694
21694
  }
21695
21695
  if (gt?.type === "multiselect") {
21696
- const nt = N.multiselectArrayPropertyMap?.[se];
21696
+ const nt = _.multiselectArrayPropertyMap?.[se];
21697
21697
  nt && ge.length > 0 && ge.some((fe) => fe != null && typeof fe == "object") && (pt = ge.map(
21698
21698
  (fe) => fe != null && typeof fe == "object" && nt in fe ? fe[nt] : void 0
21699
21699
  ).filter((fe) => fe != null));
@@ -21712,7 +21712,7 @@ const Xg = ({
21712
21712
  Fe
21713
21713
  );
21714
21714
  if (Ye.length === 0) continue;
21715
- const pt = N.addMoreFieldKeyMap?.[se], gt = Me.length > 0 && Me[0] != null && typeof Me[0] == "object" ? Me[0] : null;
21715
+ const pt = _.addMoreFieldKeyMap?.[se], gt = Me.length > 0 && Me[0] != null && typeof Me[0] == "object" ? Me[0] : null;
21716
21716
  if (gt)
21717
21717
  for (const vt of Ye) {
21718
21718
  const Ke = Fe(vt), Pt = pt && pt[Ke] || Ke, hn = gt[Pt];
@@ -21794,7 +21794,7 @@ const Xg = ({
21794
21794
  let pt = Array.isArray(ge) && ge.length > 0 && ge[0] != null && typeof ge[0] == "object" && ge[0].id ? ge[0].id : void 0;
21795
21795
  pt === void 0 && Array.isArray(Ye) && Ye.length > 0 && Ye[0] != null && typeof Ye[0] == "object" && Ye[0].id && (pt = Ye[0].id), pt === void 0 && (pt = et(He, "data.0.id"));
21796
21796
  const gt = OR(He, {
21797
- treatFirstItemIdAsPaymentId: N?.treatFirstItemIdAsPaymentId === !0
21797
+ treatFirstItemIdAsPaymentId: _?.treatFirstItemIdAsPaymentId === !0
21798
21798
  }), nt = et(He, "data.id"), fe = et(He, "data.batch_id"), vt = et(He, "data.program_id"), Ke = {};
21799
21799
  Me != null && (Ke.context_user_id = Me), pt != null && pt !== "" && (Ke.documentId = pt), nt != null && String(nt).trim() !== "" && (p?.id === void 0 || p?.id === null) && (Ke.id = nt), fe != null && String(fe).trim() !== "" && ((p?.admission_batch_id === void 0 || p?.admission_batch_id === null) && (Ke.admission_batch_id = fe), (p?.batch_id === void 0 || p?.batch_id === null) && (Ke.batch_id = fe)), vt != null && String(vt).trim() !== "" && (p?.program_id === void 0 || p?.program_id === null) && (Ke.program_id = vt), gt != null && String(gt).trim() !== "" && (p?.payment_id === void 0 || p?.payment_id === null) && (Ke.payment_id = gt), Object.keys(Ke).length > 0 && z((Pt) => {
21800
21800
  const hn = { ...Pt, ...Ke };
@@ -21825,24 +21825,24 @@ const Xg = ({
21825
21825
  Object.keys(ne).length > 0 && i?.(ne);
21826
21826
  }, [ne, i]);
21827
21827
  const Tn = Qe > 1, nn = a === "view", un = Z(
21828
- (N, V) => nn || !!V && !Bt(N) || Br(N) && !Bt(N),
21828
+ (_, V) => nn || !!V && !Bt(_) || Br(_) && !Bt(_),
21829
21829
  [nn, Bt, Br]
21830
- ), ur = q.fields.filter((N) => !N.parentId), kt = [...Tn ? mt : ur.length > 0 ? ur : q.fields].filter((N) => !(!N || typeof N != "object" || !N.name && !N.key)).sort((N, V) => {
21831
- const j = typeof N.position?.order == "number" ? N.position.order : typeof N.positionOrder == "number" ? N.positionOrder : Number.MAX_SAFE_INTEGER, ee = typeof V.position?.order == "number" ? V.position.order : typeof V.positionOrder == "number" ? V.positionOrder : Number.MAX_SAFE_INTEGER;
21830
+ ), ur = q.fields.filter((_) => !_.parentId), kt = [...Tn ? mt : ur.length > 0 ? ur : q.fields].filter((_) => !(!_ || typeof _ != "object" || !_.name && !_.key)).sort((_, V) => {
21831
+ const j = typeof _.position?.order == "number" ? _.position.order : typeof _.positionOrder == "number" ? _.positionOrder : Number.MAX_SAFE_INTEGER, ee = typeof V.position?.order == "number" ? V.position.order : typeof V.positionOrder == "number" ? V.positionOrder : Number.MAX_SAFE_INTEGER;
21832
21832
  if (j !== ee)
21833
21833
  return j - ee;
21834
- const Q = typeof N.position?.column == "number" ? N.position.column : 1, ce = typeof V.position?.column == "number" ? V.position.column : 1;
21834
+ const Q = typeof _.position?.column == "number" ? _.position.column : 1, ce = typeof V.position?.column == "number" ? V.position.column : 1;
21835
21835
  return Q - ce;
21836
21836
  }), jo = Z(
21837
- (N) => {
21838
- const V = Ot.getState().errors, j = Object.keys(V).find((ee) => N.includes(ee));
21837
+ (_) => {
21838
+ const V = Ot.getState().errors, j = Object.keys(V).find((ee) => _.includes(ee));
21839
21839
  j && requestAnimationFrame(() => {
21840
21840
  document.querySelector(`[data-field-name="${j}"]`)?.scrollIntoView({ behavior: "smooth", block: "center" });
21841
21841
  });
21842
21842
  },
21843
21843
  []
21844
- ), Rn = async (N) => {
21845
- if (N?.preventDefault(), Tn && !Et) {
21844
+ ), Rn = async (_) => {
21845
+ if (_?.preventDefault(), Tn && !Et) {
21846
21846
  if (!await Vt())
21847
21847
  try {
21848
21848
  const ee = Ot.getState().errors;
@@ -21854,7 +21854,7 @@ const Xg = ({
21854
21854
  }
21855
21855
  return;
21856
21856
  }
21857
- const V = await bt(N);
21857
+ const V = await bt(_);
21858
21858
  if (V && V.success === !1 && V.errors?.length)
21859
21859
  try {
21860
21860
  const j = Ot.getState().errors;
@@ -21868,15 +21868,15 @@ const Xg = ({
21868
21868
  }, Dn = Z(() => {
21869
21869
  _t(), s && s();
21870
21870
  }, [_t, s]), kn = Z(
21871
- (N, V) => {
21871
+ (_, V) => {
21872
21872
  const j = q.fields.find(
21873
- (Q) => Q.type === "button" && (Q.name === N || Q.key === N)
21873
+ (Q) => Q.type === "button" && (Q.name === _ || Q.key === _)
21874
21874
  ), ee = DR(V, j);
21875
21875
  ee != null && String(ee).trim() !== "" && (p?.payment_id === void 0 || p?.payment_id === null) && z((Q) => {
21876
21876
  const ce = { ...Q, payment_id: ee };
21877
21877
  return h?.(ce), ce;
21878
21878
  }), ae((Q) => {
21879
- const ce = { ...Q, [N]: V };
21879
+ const ce = { ...Q, [_]: V };
21880
21880
  return !ti(V) || !(j?.type === "button" && j.properties?.action === "submit") || q.fields.filter((Be) => Be.type === "editButton").map((Be) => Be.name).forEach((Be) => delete ce[Be]), ce;
21881
21881
  });
21882
21882
  },
@@ -21895,11 +21895,11 @@ const Xg = ({
21895
21895
  card: "bg-card border rounded-lg shadow-sm p-6",
21896
21896
  compact: "space-y-2"
21897
21897
  }, zo = pe(() => {
21898
- if (_) return;
21899
- const N = q.config?.theme?.cssVariables;
21900
- if (!(!N && !C))
21901
- return { ...N ?? {}, ...C ?? {} };
21902
- }, [_, q.config?.theme?.cssVariables, C]), Fn = pe(
21898
+ if (N) return;
21899
+ const _ = q.config?.theme?.cssVariables;
21900
+ if (!(!_ && !C))
21901
+ return { ..._ ?? {}, ...C ?? {} };
21902
+ }, [N, q.config?.theme?.cssVariables, C]), Fn = pe(
21903
21903
  () => Vl(
21904
21904
  {
21905
21905
  config: q.config,
@@ -21915,9 +21915,9 @@ const Xg = ({
21915
21915
  rowHeight: Fn.rowHeight ?? So
21916
21916
  } : null, [Fn]), R = _e !== null;
21917
21917
  _e?.rows;
21918
- const Y = _e?.columns ?? 3, ye = _e?.verticalSpacing ?? _e?.spacing ?? "16px", at = _e?.horizontalSpacing ?? _e?.spacing ?? "16px", Ft = _e?.rowHeight ?? So, Ct = Z((N) => {
21918
+ const Y = _e?.columns ?? 3, ye = _e?.verticalSpacing ?? _e?.spacing ?? "16px", at = _e?.horizontalSpacing ?? _e?.spacing ?? "16px", Ft = _e?.rowHeight ?? So, Ct = Z((_) => {
21919
21919
  if (!A) return !0;
21920
- const V = N.visibility;
21920
+ const V = _.visibility;
21921
21921
  if (!V) return !0;
21922
21922
  const j = V.visibleToUserType ?? V.user_type, ee = V.visibleToUserRole ?? V.user_role, Q = Array.isArray(V.visibleToUserIds) ? V.visibleToUserIds : Array.isArray(V.users) ? V.users : [], ce = Array.isArray(V.hiddenFromUserIds) ? V.hiddenFromUserIds : [];
21923
21923
  if (Array.isArray(ce) && ce.length > 0 && A.userId != null && ce.includes(A.userId))
@@ -21938,8 +21938,8 @@ const Xg = ({
21938
21938
  wt(() => {
21939
21939
  so($n);
21940
21940
  }, [q.id, $n]);
21941
- const jt = Z((N, V) => {
21942
- so((j) => j[N] === V ? j : { ...j, [N]: V });
21941
+ const jt = Z((_, V) => {
21942
+ so((j) => j[_] === V ? j : { ...j, [_]: V });
21943
21943
  }, []), _i = pe(
21944
21944
  () => ({
21945
21945
  visibility: dn,
@@ -21948,40 +21948,40 @@ const Xg = ({
21948
21948
  allFields: q.fields
21949
21949
  }),
21950
21950
  [dn, jt, $t, q.fields]
21951
- ), tt = Z((N) => N.name || N.key || N.id, []), Pn = (N) => {
21952
- if (!Ct(N)) return !1;
21953
- const V = N.name || N.key || N.id;
21951
+ ), tt = Z((_) => _.name || _.key || _.id, []), Pn = (_) => {
21952
+ if (!Ct(_)) return !1;
21953
+ const V = _.name || _.key || _.id;
21954
21954
  if (!Cd(
21955
21955
  V,
21956
- N.type,
21956
+ _.type,
21957
21957
  dn,
21958
21958
  $t
21959
21959
  ))
21960
21960
  return !1;
21961
- const j = N.hidden === !0;
21961
+ const j = _.hidden === !0;
21962
21962
  return Nn(V) || !j && V;
21963
21963
  }, Kc = Z(
21964
- (N) => {
21965
- const V = q.fields.find((ee) => tt(ee) === N);
21964
+ (_) => {
21965
+ const V = q.fields.find((ee) => tt(ee) === _);
21966
21966
  if (V) return V.type;
21967
- const j = fg(N);
21967
+ const j = fg(_);
21968
21968
  return q.fields.find((ee) => tt(ee) === j)?.type;
21969
21969
  },
21970
21970
  [q.fields, tt]
21971
21971
  ), Ti = Z(
21972
- (N) => Cd(
21973
- N,
21974
- Kc(N),
21972
+ (_) => Cd(
21973
+ _,
21974
+ Kc(_),
21975
21975
  dn,
21976
21976
  $t
21977
21977
  ),
21978
21978
  [dn, $t, Kc]
21979
21979
  ), dr = Z(
21980
- (N) => Ti(N) ? io(N) : !1,
21980
+ (_) => Ti(_) ? io(_) : !1,
21981
21981
  [Ti, io]
21982
21982
  );
21983
21983
  wt(() => {
21984
- const { visibleFields: N, requiredFields: V, errors: j } = Ot.getState(), ee = new Set(N), Q = new Set(V), ce = [];
21984
+ const { visibleFields: _, requiredFields: V, errors: j } = Ot.getState(), ee = new Set(_), Q = new Set(V), ce = [];
21985
21985
  for (const Ne of q.fields) {
21986
21986
  const Te = tt(Ne);
21987
21987
  Te && (Ti(Te) || (ee.delete(Te), Q.delete(Te), j[Te] && ce.push(Te)));
@@ -22003,13 +22003,13 @@ const Xg = ({
22003
22003
  xe
22004
22004
  ]);
22005
22005
  const zt = q.config?.sections, $r = Z(
22006
- (N) => {
22007
- let V = N;
22008
- if (N.type === "table") {
22009
- const ee = N.properties?.columns;
22006
+ (_) => {
22007
+ let V = _;
22008
+ if (_.type === "table") {
22009
+ const ee = _.properties?.columns;
22010
22010
  if (Array.isArray(ee) && ee.length > 0) {
22011
22011
  const Q = ee.filter((ce) => Ct(ce));
22012
- V = { ...N, properties: { ...N.properties, columns: Q } };
22012
+ V = { ..._, properties: { ..._.properties, columns: Q } };
22013
22013
  }
22014
22014
  }
22015
22015
  const j = UR(V, zt, tt);
@@ -22017,27 +22017,27 @@ const Xg = ({
22017
22017
  },
22018
22018
  [Ct, zt, tt]
22019
22019
  ), fr = Z(
22020
- (N) => Qd(N, q.fields, zt, tt),
22020
+ (_) => Qd(_, q.fields, zt, tt),
22021
22021
  [q.fields, zt, tt]
22022
- ), Kn = Z((N, V, j) => `${N}__addmore__${V}__${j}`, []), Ri = Z(
22023
- (N, V) => `${N}__${V ?? "base"}`,
22022
+ ), Kn = Z((_, V, j) => `${_}__addmore__${V}__${j}`, []), Ri = Z(
22023
+ (_, V) => `${_}__${V ?? "base"}`,
22024
22024
  []
22025
22025
  ), ki = Z(
22026
- (N, V) => {
22027
- const j = Ri(N.id, V);
22028
- return J[j] ?? N.defaultCollapsed ?? !1;
22026
+ (_, V) => {
22027
+ const j = Ri(_.id, V);
22028
+ return J[j] ?? _.defaultCollapsed ?? !1;
22029
22029
  },
22030
22030
  [J, Ri]
22031
22031
  ), ya = Z(
22032
- (N, V, j) => {
22033
- const ee = Ri(N, V);
22032
+ (_, V, j) => {
22033
+ const ee = Ri(_, V);
22034
22034
  ue(
22035
22035
  (Q) => Q[ee] === j ? Q : { ...Q, [ee]: j }
22036
22036
  );
22037
22037
  },
22038
22038
  [Ri]
22039
22039
  ), Fi = pe(() => {
22040
- const N = [], V = q.fields.filter((j) => j.type === "addmore");
22040
+ const _ = [], V = q.fields.filter((j) => j.type === "addmore");
22041
22041
  for (const j of V) {
22042
22042
  const ee = tt(j), ce = fr(j).find((lt) => {
22043
22043
  if (lt.type !== "button") return !1;
@@ -22052,13 +22052,13 @@ const Xg = ({
22052
22052
  });
22053
22053
  if (!ce) continue;
22054
22054
  const Ne = tt(ce), Te = U[ee] || [], Be = et(D[Ne], "data.id") ?? et(D[Ne], "data.documentId") ?? I.documentId;
22055
- Be != null && String(Be).trim() !== "" && N.push(String(Be));
22055
+ Be != null && String(Be).trim() !== "" && _.push(String(Be));
22056
22056
  for (const lt of Te) {
22057
22057
  const Wt = Kn(Ne, ee, lt), De = et(D[Wt], "data.id") ?? et(D[Wt], "data.documentId"), He = ie[`${ee}__${lt}`], Se = De ?? He;
22058
- Se != null && String(Se).trim() !== "" && N.push(String(Se));
22058
+ Se != null && String(Se).trim() !== "" && _.push(String(Se));
22059
22059
  }
22060
22060
  }
22061
- return N;
22061
+ return _;
22062
22062
  }, [
22063
22063
  q.fields,
22064
22064
  U,
@@ -22070,15 +22070,15 @@ const Xg = ({
22070
22070
  Kn
22071
22071
  ]);
22072
22072
  wt(() => {
22073
- z((N) => {
22074
- const V = { ...N, document_ids: Fi }, j = N.document_ids;
22075
- return Array.isArray(j) && j.length === Fi.length && Fi.every((ee, Q) => j[Q] === ee) ? N : V;
22073
+ z((_) => {
22074
+ const V = { ..._, document_ids: Fi }, j = _.document_ids;
22075
+ return Array.isArray(j) && j.length === Fi.length && Fi.every((ee, Q) => j[Q] === ee) ? _ : V;
22076
22076
  });
22077
22077
  }, [Fi]);
22078
22078
  const Pi = Z(
22079
- (N, V, j, ee) => {
22079
+ (_, V, j, ee) => {
22080
22080
  for (const Q of j) {
22081
- const ce = tt(Q), Ne = Kn(ce, N, V), Te = ee[Ne];
22081
+ const ce = tt(Q), Ne = Kn(ce, _, V), Te = ee[Ne];
22082
22082
  if (Te == null) continue;
22083
22083
  const Be = Q.type;
22084
22084
  if (Be === "file" || Be === "camera" || Be === "photoChoice") {
@@ -22094,10 +22094,10 @@ const Xg = ({
22094
22094
  return !1;
22095
22095
  },
22096
22096
  [tt, Kn]
22097
- ), jr = Z((N) => {
22098
- const V = tt(N);
22097
+ ), jr = Z((_) => {
22098
+ const V = tt(_);
22099
22099
  if (!V) return;
22100
- if (fr(N).length === 0) {
22100
+ if (fr(_).length === 0) {
22101
22101
  Kt.error("No linked fields configured for this Add More button.");
22102
22102
  return;
22103
22103
  }
@@ -22106,24 +22106,24 @@ const Xg = ({
22106
22106
  ...Q,
22107
22107
  [V]: [...Q[V] || [], ee]
22108
22108
  }));
22109
- }, [tt, fr]), Oi = Z((N, V) => {
22109
+ }, [tt, fr]), Oi = Z((_, V) => {
22110
22110
  K((j) => {
22111
- const ee = j[N] || [], Q = ee.filter((ce) => ce !== V);
22111
+ const ee = j[_] || [], Q = ee.filter((ce) => ce !== V);
22112
22112
  if (Q.length === ee.length) return j;
22113
22113
  if (Q.length === 0) {
22114
22114
  const ce = { ...j };
22115
- return delete ce[N], ce;
22115
+ return delete ce[_], ce;
22116
22116
  }
22117
22117
  return {
22118
22118
  ...j,
22119
- [N]: Q
22119
+ [_]: Q
22120
22120
  };
22121
22121
  });
22122
22122
  }, []), Ii = pe(
22123
- () => kt.filter((N) => !N.parentId),
22123
+ () => kt.filter((_) => !_.parentId),
22124
22124
  [kt]
22125
22125
  ), vr = pe(() => {
22126
- const N = [];
22126
+ const _ = [];
22127
22127
  return kt.filter((j) => j.type === "addmore").sort((j, ee) => {
22128
22128
  const Q = j.position?.order ?? 0, ce = ee.position?.order ?? 0;
22129
22129
  return Q - ce;
@@ -22142,7 +22142,7 @@ const Xg = ({
22142
22142
  1,
22143
22143
  ...Ne.map((Ce) => (Ce.position?.order ?? Wt) - Wt + ai(Ce))
22144
22144
  ), He = lt?.blockHeight ?? De, Se = ce.length * He;
22145
- N.push({
22145
+ _.push({
22146
22146
  addMoreFieldName: ee,
22147
22147
  baseOrder: Q,
22148
22148
  blockHeight: He,
@@ -22152,27 +22152,27 @@ const Xg = ({
22152
22152
  templateFieldNames: Be,
22153
22153
  templateBounds: lt
22154
22154
  });
22155
- }), N;
22156
- }, [kt, Ii, Y, tt, U, fr, zt]), Uo = pe(() => ({}), []), Mi = pe(() => vr.length === 0 ? kt : kt.map((N) => {
22157
- const V = N.position?.order ?? 0, j = vr.reduce((ee, Q) => {
22155
+ }), _;
22156
+ }, [kt, Ii, Y, tt, U, fr, zt]), Uo = pe(() => ({}), []), Mi = pe(() => vr.length === 0 ? kt : kt.map((_) => {
22157
+ const V = _.position?.order ?? 0, j = vr.reduce((ee, Q) => {
22158
22158
  const ce = Q.templateBounds?.maxRow ?? Q.baseOrder;
22159
22159
  return V > ce ? ee + Q.insertedRows : ee;
22160
22160
  }, 0);
22161
- return j === 0 ? N : {
22162
- ...N,
22161
+ return j === 0 ? _ : {
22162
+ ..._,
22163
22163
  position: {
22164
- ...N.position,
22164
+ ..._.position,
22165
22165
  order: V + j
22166
22166
  }
22167
22167
  };
22168
- }), [kt, vr]), Li = Z((N) => {
22168
+ }), [kt, vr]), Li = Z((_) => {
22169
22169
  const V = {};
22170
22170
  return Object.entries(D).forEach(([j, ee]) => {
22171
- const Q = N[j];
22171
+ const Q = _[j];
22172
22172
  Q && (V[Q] = ee);
22173
22173
  }), V;
22174
22174
  }, [D]), ao = pe(() => {
22175
- const N = [], V = {};
22175
+ const _ = [], V = {};
22176
22176
  return vr.forEach((j) => {
22177
22177
  const { addMoreFieldName: ee, blockIds: Q, linkedFields: ce, blockHeight: Ne, templateBounds: Te } = j, Be = Math.min(...ce.map((De) => De.position?.order ?? 0)), Wt = q.fields.find((De) => tt(De) === ee && De.type === "addmore")?.properties;
22178
22178
  Q.forEach((De, He) => {
@@ -22186,7 +22186,7 @@ const Xg = ({
22186
22186
  Yn != null && Yn !== "" && (Array.isArray(Yn) ? xt.push(...Yn.map((se) => String(se))) : xt.push(String(Yn)));
22187
22187
  }), xt.length > 0 && (We[Gt] = [...new Set(xt)]);
22188
22188
  }
22189
- N.push({
22189
+ _.push({
22190
22190
  ...be,
22191
22191
  id: `${be.id}__${De}`,
22192
22192
  name: Gt,
@@ -22207,30 +22207,30 @@ const Xg = ({
22207
22207
  };
22208
22208
  });
22209
22209
  });
22210
- }), { clonedFields: N, scopeByFieldName: V };
22211
- }, [vr, ie, tt, Kn, Ie, Li, q.fields]), Vo = pe(() => [...Mi, ...ao.clonedFields].sort((N, V) => {
22212
- const j = N.position?.order ?? 0, ee = V.position?.order ?? 0;
22210
+ }), { clonedFields: _, scopeByFieldName: V };
22211
+ }, [vr, ie, tt, Kn, Ie, Li, q.fields]), Vo = pe(() => [...Mi, ...ao.clonedFields].sort((_, V) => {
22212
+ const j = _.position?.order ?? 0, ee = V.position?.order ?? 0;
22213
22213
  if (j !== ee) return j - ee;
22214
- const Q = N.position?.column ?? 1, ce = V.position?.column ?? 1;
22214
+ const Q = _.position?.column ?? 1, ce = V.position?.column ?? 1;
22215
22215
  if (Q !== ce) return Q - ce;
22216
- const Ne = ko(N.position) ?? 0, Te = ko(V.position) ?? 0;
22217
- return Ne !== Te ? Ne - Te : String(N.id).localeCompare(String(V.id));
22216
+ const Ne = ko(_.position) ?? 0, Te = ko(V.position) ?? 0;
22217
+ return Ne !== Te ? Ne - Te : String(_.id).localeCompare(String(V.id));
22218
22218
  }), [Mi, ao.clonedFields]), lo = pe(
22219
- () => wR(Vo.filter((N) => !N.parentId), Pn),
22219
+ () => wR(Vo.filter((_) => !_.parentId), Pn),
22220
22220
  [Vo, Pn]
22221
22221
  ), ba = Z(
22222
- (N, V) => lo.some(
22223
- (j) => SR(N, V, j, Y)
22222
+ (_, V) => lo.some(
22223
+ (j) => SR(_, V, j, Y)
22224
22224
  ),
22225
22225
  [lo, Y]
22226
22226
  );
22227
22227
  lo.length === 0 || Math.max(
22228
- ...lo.map((N) => (N[0]?.position?.order ?? 0) + Zo(N, Y).rowSpan)
22228
+ ...lo.map((_) => (_[0]?.position?.order ?? 0) + Zo(_, Y).rowSpan)
22229
22229
  );
22230
22230
  const Di = pe(
22231
22231
  () => VR(
22232
22232
  zt,
22233
- Vc(kt.filter((N) => !N.parentId)),
22233
+ Vc(kt.filter((_) => !_.parentId)),
22234
22234
  tt
22235
22235
  ),
22236
22236
  [zt, kt, tt]
@@ -22244,11 +22244,11 @@ const Xg = ({
22244
22244
  [Di, Mi, tt, Y]
22245
22245
  ), { anchorsByOrigin: Xc, coveredCells: Jc } = pe(
22246
22246
  () => qR(
22247
- vr.map((N) => ({
22248
- addMoreFieldName: N.addMoreFieldName,
22249
- blockIds: N.blockIds,
22250
- linkedFields: N.linkedFields,
22251
- templateFieldNames: N.templateFieldNames
22247
+ vr.map((_) => ({
22248
+ addMoreFieldName: _.addMoreFieldName,
22249
+ blockIds: _.blockIds,
22250
+ linkedFields: _.linkedFields,
22251
+ templateFieldNames: _.templateFieldNames
22252
22252
  })),
22253
22253
  zt,
22254
22254
  ao.clonedFields,
@@ -22273,11 +22273,11 @@ const Xg = ({
22273
22273
  () => Jc,
22274
22274
  [Jc]
22275
22275
  ), Zc = String(Ft).endsWith("px") ? Ft : So, eu = Z(
22276
- (N, V) => {
22276
+ (_, V) => {
22277
22277
  for (let j = 0; j < Y; j++) {
22278
22278
  if (j >= V.anchorCol && j < V.anchorCol + V.colSpan)
22279
22279
  continue;
22280
- if (Uo[`${N}-${j}`] || pr.get(`${N}-${j}`) || Jd(N, j, Vo, Pn).length > 0 || ba(N, j)) return !0;
22280
+ if (Uo[`${_}-${j}`] || pr.get(`${_}-${j}`) || Jd(_, j, Vo, Pn).length > 0 || ba(_, j)) return !0;
22281
22281
  }
22282
22282
  return !1;
22283
22283
  },
@@ -22292,24 +22292,24 @@ const Xg = ({
22292
22292
  ), tu = pe(
22293
22293
  () => QR(
22294
22294
  pr,
22295
- (N) => {
22296
- const V = N.run.section;
22297
- return V.collapsible ? ki(V, N.addMoreMeta?.blockId) : !1;
22295
+ (_) => {
22296
+ const V = _.run.section;
22297
+ return V.collapsible ? ki(V, _.addMoreMeta?.blockId) : !1;
22298
22298
  },
22299
22299
  eu
22300
22300
  ),
22301
22301
  [pr, ki, eu]
22302
22302
  ), nu = pe(() => {
22303
- const N = [];
22303
+ const _ = [];
22304
22304
  for (const V of Object.keys(Uo)) {
22305
22305
  const j = Number(V.split("-")[0]);
22306
- Number.isNaN(j) || N.push(j);
22306
+ Number.isNaN(j) || _.push(j);
22307
22307
  }
22308
22308
  for (const V of pr.values())
22309
22309
  if (V.renderFields.some((j) => Pn(j)))
22310
22310
  for (let j = V.anchorRow; j < V.anchorRow + V.rowSpan; j++)
22311
- N.push(j);
22312
- return xR(lo, Y, N);
22311
+ _.push(j);
22312
+ return xR(lo, Y, _);
22313
22313
  }, [
22314
22314
  lo,
22315
22315
  Y,
@@ -22317,46 +22317,46 @@ const Xg = ({
22317
22317
  pr,
22318
22318
  Pn
22319
22319
  ]), { originalToDisplayRow: Bi, displayRowCount: Ny, sortedOccupiedRows: _y } = pe(() => {
22320
- const N = AR(nu);
22320
+ const _ = AR(nu);
22321
22321
  return {
22322
- originalToDisplayRow: N.originalToDisplay,
22323
- displayRowCount: N.displayRowCount,
22324
- sortedOccupiedRows: N.sortedOriginalRows
22322
+ originalToDisplayRow: _.originalToDisplay,
22323
+ displayRowCount: _.displayRowCount,
22324
+ sortedOccupiedRows: _.sortedOriginalRows
22325
22325
  };
22326
22326
  }, [nu]), ru = Math.max(Ny, 1), va = Z(
22327
- (N, V = 1) => CR(N, V, Bi),
22327
+ (_, V = 1) => CR(_, V, Bi),
22328
22328
  [Bi]
22329
22329
  ), ou = pe(() => {
22330
- const N = /* @__PURE__ */ new Set();
22330
+ const _ = /* @__PURE__ */ new Set();
22331
22331
  for (const V of tu) {
22332
22332
  const j = Bi.get(V);
22333
- j !== void 0 && N.add(j);
22333
+ j !== void 0 && _.add(j);
22334
22334
  }
22335
- return N;
22335
+ return _;
22336
22336
  }, [tu, Bi]), Ty = pe(
22337
22337
  () => ZR(ru, Zc, ou),
22338
22338
  [ru, Zc, ou]
22339
22339
  ), Ry = pe(
22340
22340
  () => tk(
22341
- kt.filter((N) => !N.parentId && Pn(N)),
22341
+ kt.filter((_) => !_.parentId && Pn(_)),
22342
22342
  Di,
22343
22343
  tt
22344
22344
  ),
22345
22345
  [kt, Di, tt, Pn]
22346
- ), $i = Z((N) => {
22346
+ ), $i = Z((_) => {
22347
22347
  if (R) return null;
22348
- const V = tt(N), j = U[V] || [];
22348
+ const V = tt(_), j = U[V] || [];
22349
22349
  if (j.length === 0) return null;
22350
- const ee = fr(N);
22350
+ const ee = fr(_);
22351
22351
  if (ee.length === 0) return null;
22352
- const Q = zR(N, zt), ce = ee.map((Be) => tt(Be)).filter(Boolean), Ne = Wg(ce, zt), Te = (Be, lt, Wt, De, He, Se, Ce) => {
22352
+ const Q = zR(_, zt), ce = ee.map((Be) => tt(Be)).filter(Boolean), Ne = Wg(ce, zt), Te = (Be, lt, Wt, De, He, Se, Ce) => {
22353
22353
  const We = tt(Be), ot = Kn(We, V, lt), me = Be.hidden === !0;
22354
22354
  if (!(Ct(Be) && (Nn(We) || !me && We))) return null;
22355
22355
  const be = {
22356
22356
  ...Be,
22357
22357
  id: `${Be.id}__${lt}`,
22358
22358
  name: ot
22359
- }, Gt = N.properties?.linkedFieldAllowDuplicate?.[We] ?? !0;
22359
+ }, Gt = _.properties?.linkedFieldAllowDuplicate?.[We] ?? !0;
22360
22360
  let Ut;
22361
22361
  if (!Gt && (Be.type === "select" || Be.type === "radio" || Be.type === "multiselect")) {
22362
22362
  const ct = [], xt = Ie[We];
@@ -22454,15 +22454,15 @@ const Xg = ({
22454
22454
  onCollapsedChange: (Ut) => ya(Ne.section.id, Be, Ut),
22455
22455
  children: Gt
22456
22456
  }
22457
- ) : Gt }, `${N.id}-${Be}`);
22457
+ ) : Gt }, `${_.id}-${Be}`);
22458
22458
  }) });
22459
22459
  }, [R, U, ie, tt, fr, Kn, Pi, Ie, he, je, ne, Nt, ze, Ht, nn, dr, Bn, $e, kn, Rn, _t, Dn, Ge, B, m, rn, Sn, Jt, q.fields, ve, Nn, Ct, Li, Oi, S, zt, oe, te, O]);
22460
22460
  return /* @__PURE__ */ f(
22461
22461
  "div",
22462
22462
  {
22463
- className: _ ? L("relative", c) : L(ff, k && "dark", c),
22463
+ className: N ? L("relative", c) : L(ff, k && "dark", c),
22464
22464
  style: zo,
22465
- "data-form-renderer": _ ? void 0 : "root",
22465
+ "data-form-renderer": N ? void 0 : "root",
22466
22466
  children: /* @__PURE__ */ $("div", { className: "relative", children: [
22467
22467
  O && /* @__PURE__ */ f("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-background/60 rounded-md", children: /* @__PURE__ */ f(Pr, {}) }),
22468
22468
  /* @__PURE__ */ f(
@@ -22498,10 +22498,10 @@ const Xg = ({
22498
22498
  },
22499
22499
  "data-form-renderer": "grid",
22500
22500
  children: _y.map(
22501
- (N) => Array.from({ length: Y }, (V, j) => {
22502
- const ee = va(N);
22501
+ (_) => Array.from({ length: Y }, (V, j) => {
22502
+ const ee = va(_);
22503
22503
  if (!ee) return null;
22504
- if (ba(N, j))
22504
+ if (ba(_, j))
22505
22505
  return /* @__PURE__ */ f(
22506
22506
  "div",
22507
22507
  {
@@ -22515,21 +22515,21 @@ const Xg = ({
22515
22515
  "data-form-renderer": "grid-cell",
22516
22516
  "data-form-renderer-empty": !0
22517
22517
  },
22518
- `empty-${N}-${j}`
22518
+ `empty-${_}-${j}`
22519
22519
  );
22520
22520
  if (YR(
22521
- N,
22521
+ _,
22522
22522
  j,
22523
22523
  Qc,
22524
22524
  pr
22525
22525
  )) {
22526
22526
  const Se = XR(
22527
- N,
22527
+ _,
22528
22528
  j,
22529
22529
  pr
22530
22530
  );
22531
22531
  return Se && JR(
22532
- N,
22532
+ _,
22533
22533
  j,
22534
22534
  Se,
22535
22535
  ki(Se.run.section, Se.addMoreMeta?.blockId)
@@ -22546,10 +22546,10 @@ const Xg = ({
22546
22546
  "data-form-renderer": "grid-cell",
22547
22547
  "data-form-renderer-empty": !0
22548
22548
  },
22549
- `section-border-cover-${N}-${j}`
22549
+ `section-border-cover-${_}-${j}`
22550
22550
  );
22551
22551
  }
22552
- const Q = pr.get(`${N}-${j}`);
22552
+ const Q = pr.get(`${_}-${j}`);
22553
22553
  if (Q) {
22554
22554
  const Se = Q.renderFields.filter((ct) => Pn(ct));
22555
22555
  if (Se.length === 0) return null;
@@ -22669,14 +22669,14 @@ const Xg = ({
22669
22669
  }
22670
22670
  )
22671
22671
  },
22672
- `section-border-${Q.run.section.id}-${N}-${j}-${Ce?.blockId ?? "base"}`
22672
+ `section-border-${Q.run.section.id}-${_}-${j}-${Ce?.blockId ?? "base"}`
22673
22673
  );
22674
22674
  }
22675
- const ce = Jd(N, j, Vo, Pn).filter(
22676
- (Se) => !(tt(Se)?.includes("__addmore__") && Qc.has(`${N}-${j}`))
22675
+ const ce = Jd(_, j, Vo, Pn).filter(
22676
+ (Se) => !(tt(Se)?.includes("__addmore__") && Qc.has(`${_}-${j}`))
22677
22677
  );
22678
22678
  if (ce.length === 0) {
22679
- const Se = Uo[`${N}-${j}`];
22679
+ const Se = Uo[`${_}-${j}`];
22680
22680
  if (Se) {
22681
22681
  const Ce = q.fields.find(
22682
22682
  (me) => me.type === "addmore" && tt(me) === Se.addMoreFieldName
@@ -22714,7 +22714,7 @@ const Xg = ({
22714
22714
  }
22715
22715
  )
22716
22716
  },
22717
- `add-more-remove-${N}-${j}`
22717
+ `add-more-remove-${_}-${j}`
22718
22718
  );
22719
22719
  }
22720
22720
  return /* @__PURE__ */ f(
@@ -22725,10 +22725,10 @@ const Xg = ({
22725
22725
  "data-form-renderer": "grid-cell",
22726
22726
  "data-form-renderer-empty": !0
22727
22727
  },
22728
- `empty-${N}-${j}`
22728
+ `empty-${_}-${j}`
22729
22729
  );
22730
22730
  }
22731
- const Ne = ce[0], { rowSpan: Te, columnSpan: Be } = Zo(ce, Y), lt = va(N, Te) ?? ee;
22731
+ const Ne = ce[0], { rowSpan: Te, columnSpan: Be } = Zo(ce, Y), lt = va(_, Te) ?? ee;
22732
22732
  if (ce.length === 1 && Ne.type === "section") {
22733
22733
  const Se = q.fields.filter((Ce) => Ce.parentId === Ne.id && Ce.position != null).sort((Ce, We) => {
22734
22734
  const ot = typeof Ce.position?.order == "number" ? Ce.position.order : 0, me = typeof We.position?.order == "number" ? We.position.order : 0;
@@ -22882,13 +22882,13 @@ const Xg = ({
22882
22882
  })
22883
22883
  )
22884
22884
  }
22885
- ) : /* @__PURE__ */ f("div", { className: d ? "" : "space-y-4", "data-form-renderer": "stack", children: kt.map((N) => {
22886
- if (!Pn(N)) return null;
22885
+ ) : /* @__PURE__ */ f("div", { className: d ? "" : "space-y-4", "data-form-renderer": "stack", children: kt.map((_) => {
22886
+ if (!Pn(_)) return null;
22887
22887
  const V = Ry.find(
22888
- (ee) => ee.kind === "border" && ee.fields.some((Q) => Q.id === N.id)
22888
+ (ee) => ee.kind === "border" && ee.fields.some((Q) => Q.id === _.id)
22889
22889
  );
22890
22890
  if (V)
22891
- return V.fields[0]?.id !== N.id ? null : /* @__PURE__ */ f(
22891
+ return V.fields[0]?.id !== _.id ? null : /* @__PURE__ */ f(
22892
22892
  nl,
22893
22893
  {
22894
22894
  legend: ei(V.run.section, 0),
@@ -22948,13 +22948,13 @@ const Xg = ({
22948
22948
  );
22949
22949
  })
22950
22950
  },
22951
- `stack-border-${V.run.section.id}-${N.id}`
22951
+ `stack-border-${V.run.section.id}-${_.id}`
22952
22952
  );
22953
- if (!N.parentId) {
22953
+ if (!_.parentId) {
22954
22954
  const ee = kt.filter(
22955
- (ce) => !ce.parentId && Pn(ce) && Ts(ce) === Ts(N)
22955
+ (ce) => !ce.parentId && Pn(ce) && Ts(ce) === Ts(_)
22956
22956
  ), Q = zc(ee).slice(0, 2);
22957
- if (Q.length > 1 && Q[0].id !== N.id) return null;
22957
+ if (Q.length > 1 && Q[0].id !== _.id) return null;
22958
22958
  if (Q.length > 1) {
22959
22959
  const ce = Xd(Q);
22960
22960
  return /* @__PURE__ */ f(
@@ -23026,12 +23026,12 @@ const Xg = ({
23026
23026
  );
23027
23027
  }
23028
23028
  }
23029
- if (N.type === "section") {
23030
- const ee = q.fields.filter((Q) => Q.parentId === N.id && Q.position != null).sort((Q, ce) => {
23029
+ if (_.type === "section") {
23030
+ const ee = q.fields.filter((Q) => Q.parentId === _.id && Q.position != null).sort((Q, ce) => {
23031
23031
  const Ne = typeof Q.position?.order == "number" ? Q.position.order : 0, Te = typeof ce.position?.order == "number" ? ce.position.order : 0;
23032
23032
  return Ne - Te;
23033
23033
  });
23034
- return /* @__PURE__ */ f(Td, { field: N, children: ee.map((Q) => {
23034
+ return /* @__PURE__ */ f(Td, { field: _, children: ee.map((Q) => {
23035
23035
  const ce = Q.name || Q.key || Q.id, Ne = Q.hidden === !0;
23036
23036
  return Ct(Q) && (Nn(ce) || !Ne && ce) ? /* @__PURE__ */ $(
23037
23037
  "div",
@@ -23082,26 +23082,26 @@ const Xg = ({
23082
23082
  },
23083
23083
  Q.id
23084
23084
  ) : null;
23085
- }) }, N.id);
23085
+ }) }, _.id);
23086
23086
  }
23087
- const j = N.name || N.key || N.id;
23087
+ const j = _.name || _.key || _.id;
23088
23088
  return /* @__PURE__ */ $(
23089
23089
  "div",
23090
23090
  {
23091
23091
  "data-field-name": j,
23092
23092
  "data-form-renderer": "field-wrapper",
23093
- style: xr(N),
23093
+ style: xr(_),
23094
23094
  children: [
23095
23095
  /* @__PURE__ */ f(
23096
23096
  Ar,
23097
23097
  {
23098
- field: $r(N),
23098
+ field: $r(_),
23099
23099
  value: Ie[j],
23100
23100
  error: he[j] || je > 0 ? ne[j] : void 0,
23101
23101
  onChange: (ee) => Nt(j, ee),
23102
23102
  onBlur: () => ze(j),
23103
- disabled: (N.type === "table" || N.type === "billingGrid") && a === "fill" ? !1 : de || !Ht(j) || nn || !!N.disabled,
23104
- readOnly: (N.type === "table" || N.type === "billingGrid") && a === "fill" ? !1 : un(j, !!N.readOnly),
23103
+ disabled: (_.type === "table" || _.type === "billingGrid") && a === "fill" ? !1 : de || !Ht(j) || nn || !!_.disabled,
23104
+ readOnly: (_.type === "table" || _.type === "billingGrid") && a === "fill" ? !1 : un(j, !!_.readOnly),
23105
23105
  isRequired: dr(j),
23106
23106
  formValues: Ie,
23107
23107
  submissionContext: Bn,
@@ -23129,10 +23129,10 @@ const Xg = ({
23129
23129
  hideTableRowControls: S
23130
23130
  }
23131
23131
  ),
23132
- N.type === "addmore" && $i(N)
23132
+ _.type === "addmore" && $i(_)
23133
23133
  ]
23134
23134
  },
23135
- N.id
23135
+ _.id
23136
23136
  );
23137
23137
  }) }) }),
23138
23138
  u
@@ -23287,11 +23287,11 @@ function ik(e, t) {
23287
23287
  column: typeof w.column == "number" ? w.column : typeof y.positionColumn == "number" ? y.positionColumn : 1,
23288
23288
  columnSpan: typeof w.columnSpan == "number" ? w.columnSpan : typeof w.width == "number" ? w.width : typeof y.positionWidth == "number" ? y.positionWidth : 1,
23289
23289
  rowSpan: typeof w.rowSpan == "number" ? w.rowSpan : typeof y.positionRowSpan == "number" ? y.positionRowSpan : 1
23290
- }, _ = ko(w, {
23290
+ }, N = ko(w, {
23291
23291
  cellSlotIndex: y.cellSlotIndex ?? S.cellSlotIndex,
23292
23292
  stackSlot: v.stackSlot ?? S.stackSlot
23293
23293
  });
23294
- typeof _ == "number" && (k.cellSlot = _);
23294
+ typeof N == "number" && (k.cellSlot = N);
23295
23295
  const E = w.cellGroupId ?? S.cellGroupId;
23296
23296
  typeof E == "string" && (k.cellGroupId = E);
23297
23297
  const A = si(w) ?? si(S) ?? (v.stackDirection === "horizontal" || S.stackDirection === "horizontal" ? "row" : v.stackDirection === "vertical" || S.stackDirection === "vertical" ? "stack" : void 0);
@@ -23617,7 +23617,7 @@ const wk = ({
23617
23617
  clientId: l
23618
23618
  }),
23619
23619
  [t, n, c, u, l]
23620
- ), [C, k] = Ee([]), [_, E] = Ee(null), [A, x] = Ee(null), [P, T] = Ee(null), [H, X] = Ee({}), F = At(null), B = At(null), O = At(null), M = At(null), I = pe(
23620
+ ), [C, k] = Ee([]), [N, E] = Ee(null), [A, x] = Ee(null), [P, T] = Ee(null), [H, X] = Ee({}), F = At(null), B = At(null), O = At(null), M = At(null), I = pe(
23621
23621
  () => C && Array.isArray(C) ? C.filter((le) => le.feature_id) : [],
23622
23622
  [C]
23623
23623
  ), z = qr({
@@ -23646,10 +23646,10 @@ const wk = ({
23646
23646
  }
23647
23647
  }, [z.data, C.length, a]);
23648
23648
  const U = pe(() => {
23649
- if (!_) return;
23650
- const le = C.find((Xe) => Xe.step_id === _), we = F.current === _;
23649
+ if (!N) return;
23650
+ const le = C.find((Xe) => Xe.step_id === N), we = F.current === N;
23651
23651
  return le?.feature_id ?? (we ? M.current : void 0) ?? void 0;
23652
- }, [_, C]), K = qr({
23652
+ }, [N, C]), K = qr({
23653
23653
  queryKey: [
23654
23654
  "workflow-step",
23655
23655
  t,
@@ -23667,12 +23667,12 @@ const wk = ({
23667
23667
  refetchOnReconnect: !0
23668
23668
  }), J = K.isPending, ue = K.error ? K.error instanceof Error ? K.error.message : "Failed to load form" : null;
23669
23669
  wt(() => {
23670
- !K.data || F.current === _ || (x(K.data), T(null), F.current = null, M.current = null);
23671
- }, [K.data, _]), wt(() => {
23670
+ !K.data || F.current === N || (x(K.data), T(null), F.current = null, M.current = null);
23671
+ }, [K.data, N]), wt(() => {
23672
23672
  T(ue);
23673
23673
  }, [ue]), wt(() => {
23674
- U === void 0 && F.current !== _ && (x(null), T(null), F.current = null, M.current = null);
23675
- }, [U, _]);
23674
+ U === void 0 && F.current !== N && (x(null), T(null), F.current = null, M.current = null);
23675
+ }, [U, N]);
23676
23676
  const ie = pe(() => {
23677
23677
  const le = A?.form;
23678
23678
  if (!le) return null;
@@ -23832,7 +23832,7 @@ const wk = ({
23832
23832
  children: /* @__PURE__ */ $(
23833
23833
  ay,
23834
23834
  {
23835
- value: _ ?? "",
23835
+ value: N ?? "",
23836
23836
  onValueChange: (le) => E(le),
23837
23837
  children: [
23838
23838
  /* @__PURE__ */ f(ly, { className: "w-full justify-start border-b rounded-none h-auto p-0 bg-transparent gap-0", "data-form-renderer": "workflow-tabs", children: I.map((le) => /* @__PURE__ */ f(
@@ -23845,7 +23845,7 @@ const wk = ({
23845
23845
  },
23846
23846
  le.step_id
23847
23847
  )) }),
23848
- I.map((le) => /* @__PURE__ */ f(uy, { value: le.step_id, className: "mt-4 outline-none", children: le.step_id !== _ ? null : J ? /* @__PURE__ */ f(pk, {}) : P ? /* @__PURE__ */ f("div", { className: "rounded-lg border border-destructive/50 bg-destructive/10 px-4 py-3 text-sm text-destructive", children: P }) : Ae && !A?.form ? /* @__PURE__ */ f(
23848
+ I.map((le) => /* @__PURE__ */ f(uy, { value: le.step_id, className: "mt-4 outline-none", children: le.step_id !== N ? null : J ? /* @__PURE__ */ f(pk, {}) : P ? /* @__PURE__ */ f("div", { className: "rounded-lg border border-destructive/50 bg-destructive/10 px-4 py-3 text-sm text-destructive", children: P }) : Ae && !A?.form ? /* @__PURE__ */ f(
23849
23849
  "div",
23850
23850
  {
23851
23851
  className: L(
@@ -23867,9 +23867,9 @@ const wk = ({
23867
23867
  }
23868
23868
  ) : null,
23869
23869
  (() => {
23870
- const we = B.current !== _ || O.current !== (te?.id ?? null);
23871
- if (_ && te && we) {
23872
- B.current = _, O.current = te.id ?? null;
23870
+ const we = B.current !== N || O.current !== (te?.id ?? null);
23871
+ if (N && te && we) {
23872
+ B.current = N, O.current = te.id ?? null;
23873
23873
  const Xe = Ot.getState();
23874
23874
  Xe.setSchema(te, { forceReset: !0 });
23875
23875
  const dt = Ot.getState().values;
@@ -23885,7 +23885,7 @@ const wk = ({
23885
23885
  omitRootWrapper: !0,
23886
23886
  submissionContext: r,
23887
23887
  initialValues: o,
23888
- workflowStepId: _ ?? void 0,
23888
+ workflowStepId: N ?? void 0,
23889
23889
  viewerContext: m,
23890
23890
  getViewerContext: g,
23891
23891
  onSubmit: de,
@@ -23913,10 +23913,10 @@ const wk = ({
23913
23913
  }
23914
23914
  );
23915
23915
  };
23916
- function wP(e) {
23916
+ function AP(e) {
23917
23917
  return typeof e == "object" && e !== null && "apiEndpoint" in e;
23918
23918
  }
23919
- function SP({ formSchema: e }) {
23919
+ function CP({ formSchema: e }) {
23920
23920
  const t = pe(() => {
23921
23921
  if (!e)
23922
23922
  return [];
@@ -24008,7 +24008,7 @@ function SP({ formSchema: e }) {
24008
24008
  isValid: o
24009
24009
  };
24010
24010
  }
24011
- function xP({
24011
+ function EP({
24012
24012
  field: e,
24013
24013
  value: t,
24014
24014
  allValues: n,
@@ -24166,7 +24166,7 @@ function Sk() {
24166
24166
  ]
24167
24167
  };
24168
24168
  }
24169
- const AP = {
24169
+ const NP = {
24170
24170
  // Input Fields
24171
24171
  text: {
24172
24172
  type: "text",
@@ -24933,7 +24933,7 @@ function Tk(e) {
24933
24933
  }
24934
24934
  const rf = {};
24935
24935
  let my = null;
24936
- function CP(e) {
24936
+ function _P(e) {
24937
24937
  my = e;
24938
24938
  }
24939
24939
  function Rk() {
@@ -24990,6 +24990,13 @@ function Fk(e, t) {
24990
24990
  return n;
24991
24991
  }
24992
24992
  const yy = jl(null);
24993
+ function Pk(e, t) {
24994
+ if (t.parentContext) return "idle";
24995
+ const n = e.prepopulateApi, r = String(
24996
+ t.clientIdProp ?? t.externalContext.clientId ?? ""
24997
+ );
24998
+ return n?.enabled && n.api?.path && r ? "loading" : "idle";
24999
+ }
24993
25000
  function of(e, t) {
24994
25001
  const n = {};
24995
25002
  for (const r of e) {
@@ -25023,7 +25030,7 @@ function of(e, t) {
25023
25030
  }
25024
25031
  return n;
25025
25032
  }
25026
- function Pk({
25033
+ function Ok({
25027
25034
  schema: e,
25028
25035
  context: t = {},
25029
25036
  clientId: n,
@@ -25035,7 +25042,13 @@ function Pk({
25035
25042
  }) {
25036
25043
  const [c, u] = Ee(() => s ? s.filterGroups : {}), l = At(c);
25037
25044
  l.current = c;
25038
- const [d, p] = Ee({}), [m, g] = Ee("idle"), h = At(null), y = String(
25045
+ const [d, p] = Ee({}), [m, g] = Ee(
25046
+ () => Pk(e, {
25047
+ parentContext: s,
25048
+ clientIdProp: n,
25049
+ externalContext: t
25050
+ })
25051
+ ), h = At(null), y = String(
25039
25052
  n ?? t.clientId ?? s?.clientId ?? ""
25040
25053
  ), w = JSON.stringify(t);
25041
25054
  wt(() => {
@@ -25102,7 +25115,7 @@ function Pk({
25102
25115
  }));
25103
25116
  },
25104
25117
  []
25105
- ), k = Z((A) => l.current[A] ?? {}, []), _ = Z(
25118
+ ), k = Z((A) => l.current[A] ?? {}, []), N = Z(
25106
25119
  (A, x, P, T) => {
25107
25120
  (o ?? s?.onAction)?.({ ...A, sourceWidgetId: x, event: P, payload: T });
25108
25121
  },
@@ -25119,7 +25132,7 @@ function Pk({
25119
25132
  filterGroups: c,
25120
25133
  setFilterValue: C,
25121
25134
  getFilterGroup: k,
25122
- dispatchAction: _
25135
+ dispatchAction: N
25123
25136
  }),
25124
25137
  [
25125
25138
  e,
@@ -25134,7 +25147,7 @@ function Pk({
25134
25147
  c,
25135
25148
  C,
25136
25149
  k,
25137
- _
25150
+ N
25138
25151
  ]
25139
25152
  );
25140
25153
  return /* @__PURE__ */ f(yy.Provider, { value: E, children: a });
@@ -25145,51 +25158,51 @@ function Gn() {
25145
25158
  throw new Error("usePageContext must be used within PageContextProvider");
25146
25159
  return e;
25147
25160
  }
25148
- const Ok = 5, sf = 1;
25161
+ const Ik = 5, sf = 1;
25149
25162
  function $o(e) {
25150
- return Number.isFinite(e) ? Math.min(Ok, Math.max(sf, Math.round(e))) : sf;
25163
+ return Number.isFinite(e) ? Math.min(Ik, Math.max(sf, Math.round(e))) : sf;
25151
25164
  }
25152
- function Ik(e, t) {
25165
+ function Mk(e, t) {
25153
25166
  const n = $o(t), r = Array.from({ length: n }, () => []);
25154
25167
  return e.forEach((o, i) => {
25155
25168
  const s = o.config, a = s.columnIndex !== void 0 ? Math.min(Math.max(0, s.columnIndex), n - 1) : i % n;
25156
25169
  r[a].push(o);
25157
25170
  }), r;
25158
25171
  }
25159
- function Mk(e) {
25172
+ function Lk(e) {
25160
25173
  return Number.isFinite(e) ? Math.min(100, Math.max(0, Math.round(e))) : 0;
25161
25174
  }
25162
- function Lk(e, t) {
25175
+ function Dk(e, t) {
25163
25176
  const n = Math.max(1, t), r = Math.min(100, Math.max(0, Math.round(e))), o = Math.floor(r / n), i = r - o * n;
25164
25177
  return Array.from({ length: n }, (s, a) => o + (a < i ? 1 : 0));
25165
25178
  }
25166
25179
  function af(e) {
25167
- return Lk(100, $o(e));
25180
+ return Dk(100, $o(e));
25168
25181
  }
25169
- function Dk(e) {
25182
+ function Bk(e) {
25170
25183
  const t = e.trim(), n = /^(\d+(?:\.\d+)?)\s*%?$/.exec(t);
25171
- return n ? Mk(Number(n[1])) : null;
25184
+ return n ? Lk(Number(n[1])) : null;
25172
25185
  }
25173
25186
  function by(e, t) {
25174
25187
  const n = $o(t), r = [];
25175
25188
  for (let i = 0; i < n; i++) {
25176
- const s = Dk(e?.[i] ?? "");
25189
+ const s = Bk(e?.[i] ?? "");
25177
25190
  if (s === null) return af(n);
25178
25191
  r.push(s);
25179
25192
  }
25180
25193
  return r.reduce((i, s) => i + s, 0) !== 100 ? af(n) : r;
25181
25194
  }
25182
- function Bk(e) {
25195
+ function $k(e) {
25183
25196
  return e === "sm" ? "gap-2" : e === "lg" ? "gap-6" : "gap-4";
25184
25197
  }
25185
25198
  function lf(e, t) {
25186
25199
  return by(t, $o(e)).map((r) => `minmax(0, ${r}fr)`).join(" ");
25187
25200
  }
25188
- function $k(e) {
25201
+ function jk(e) {
25189
25202
  return e.length ? e.map((t) => `minmax(0, ${t}fr)`).join(" ") : "minmax(0, 1fr)";
25190
25203
  }
25191
- function jk(e, t, n, r) {
25192
- const o = $o(t), i = Ik(e, o), s = by(n, o);
25204
+ function zk(e, t, n, r) {
25205
+ const o = $o(t), i = Mk(e, o), s = by(n, o);
25193
25206
  if (!(r?.collapseEmpty !== !1))
25194
25207
  return {
25195
25208
  columns: i,
@@ -25208,45 +25221,45 @@ function jk(e, t, n, r) {
25208
25221
  ), d = 100 - l.reduce((p, m) => p + m, 0);
25209
25222
  return d !== 0 && l.length > 0 && (l[0] += d), {
25210
25223
  columns: c.map((p) => p.colChildren),
25211
- gridTemplate: $k(l),
25224
+ gridTemplate: jk(l),
25212
25225
  sourceIndices: c.map((p) => p.index)
25213
25226
  };
25214
25227
  }
25215
25228
  function Gc(e, t = "solid") {
25216
25229
  return e ? t === "dashed" ? "rounded-md border border-dashed border-border" : "rounded-md border border-border" : "";
25217
25230
  }
25218
- function zk(e) {
25231
+ function Uk(e) {
25219
25232
  return L(
25220
25233
  Gc(e.showBorder, e.borderStyle ?? "solid"),
25221
25234
  e.showBorder && "p-3"
25222
25235
  );
25223
25236
  }
25224
- function Uk(e) {
25237
+ function Vk(e) {
25225
25238
  return L(
25226
25239
  Gc(e.showBorder, e.borderStyle ?? "solid"),
25227
25240
  e.showBorder && "p-2"
25228
25241
  );
25229
25242
  }
25230
- function Vk(e, t) {
25243
+ function Hk(e, t) {
25231
25244
  return e.columnBorders?.[t] !== void 0 ? !!e.columnBorders[t] : !!e.showColumnBorders;
25232
25245
  }
25233
- function Hk(e, t) {
25234
- const n = Vk(e, t);
25246
+ function Wk(e, t) {
25247
+ const n = Hk(e, t);
25235
25248
  return L(
25236
25249
  Gc(n, e.borderStyle ?? "dashed"),
25237
25250
  n && "p-2"
25238
25251
  );
25239
25252
  }
25240
- function Wk(e) {
25253
+ function Gk(e) {
25241
25254
  if (e)
25242
25255
  return { minHeight: `${e}vh` };
25243
25256
  }
25244
- function Gk({ widget: e, renderChildren: t }) {
25257
+ function Kk({ widget: e, renderChildren: t }) {
25245
25258
  const n = e.config, [r, o] = Lt.useState(n.defaultCollapsed ?? !1);
25246
25259
  return /* @__PURE__ */ $(
25247
25260
  "section",
25248
25261
  {
25249
- className: L("space-y-4", zk(n)),
25262
+ className: L("space-y-4", Uk(n)),
25250
25263
  "data-widget-id": e.id,
25251
25264
  children: [
25252
25265
  n.heading && /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: n.collapsible ? /* @__PURE__ */ f(
@@ -25264,8 +25277,8 @@ function Gk({ widget: e, renderChildren: t }) {
25264
25277
  }
25265
25278
  );
25266
25279
  }
25267
- function Kk({ widget: e, renderChildren: t }) {
25268
- const n = e.config, r = $o(n.columns ?? 2), o = n.collapseEmptyColumns !== !1, i = jk(e.children ?? [], r, n.columnWidths, {
25280
+ function qk({ widget: e, renderChildren: t }) {
25281
+ const n = e.config, r = $o(n.columns ?? 2), o = n.collapseEmptyColumns !== !1, i = zk(e.children ?? [], r, n.columnWidths, {
25269
25282
  collapseEmpty: o
25270
25283
  });
25271
25284
  return /* @__PURE__ */ f(
@@ -25273,12 +25286,12 @@ function Kk({ widget: e, renderChildren: t }) {
25273
25286
  {
25274
25287
  className: L(
25275
25288
  "grid w-full min-w-0 items-stretch",
25276
- Bk(n.gap),
25277
- Uk(n)
25289
+ $k(n.gap),
25290
+ Vk(n)
25278
25291
  ),
25279
25292
  style: {
25280
25293
  gridTemplateColumns: i.gridTemplate,
25281
- ...Wk(n.minHeightPercent)
25294
+ ...Gk(n.minHeightPercent)
25282
25295
  },
25283
25296
  "data-widget-id": e.id,
25284
25297
  children: i.columns.map((s, a) => {
@@ -25288,7 +25301,7 @@ function Kk({ widget: e, renderChildren: t }) {
25288
25301
  {
25289
25302
  className: L(
25290
25303
  "flex min-h-[inherit] min-w-0 flex-col space-y-4 overflow-hidden",
25291
- Hk(n, c)
25304
+ Wk(n, c)
25292
25305
  ),
25293
25306
  children: t?.(s)
25294
25307
  },
@@ -25298,7 +25311,7 @@ function Kk({ widget: e, renderChildren: t }) {
25298
25311
  }
25299
25312
  );
25300
25313
  }
25301
- function qk({ widget: e, renderChildren: t }) {
25314
+ function Yk({ widget: e, renderChildren: t }) {
25302
25315
  const n = e.config, r = n.variant === "outline" ? "border bg-background" : n.variant === "elevated" ? "border bg-background shadow-md" : "border bg-card";
25303
25316
  return /* @__PURE__ */ $("div", { className: L("rounded-lg p-4", r), "data-widget-id": e.id, children: [
25304
25317
  (n.title || n.subtitle) && /* @__PURE__ */ $("div", { className: "mb-4", children: [
@@ -25315,7 +25328,7 @@ function vy(e, t) {
25315
25328
  }
25316
25329
  return e.text ?? "";
25317
25330
  }
25318
- function Yk({ widget: e }) {
25331
+ function Xk({ widget: e }) {
25319
25332
  const t = e.config, { context: n } = Gn(), r = vy(t, n), o = t.level ?? 2, i = t.align === "center" ? "text-center" : t.align === "right" ? "text-right" : "text-left";
25320
25333
  return /* @__PURE__ */ f(
25321
25334
  "div",
@@ -25328,11 +25341,11 @@ function Yk({ widget: e }) {
25328
25341
  }
25329
25342
  );
25330
25343
  }
25331
- function Xk({ widget: e }) {
25344
+ function Jk({ widget: e }) {
25332
25345
  const t = e.config, { context: n } = Gn(), r = vy(t, n), o = t.preset === "caption" ? "text-sm text-muted-foreground" : t.preset === "small" ? "text-xs text-muted-foreground" : "text-base", i = t.align === "center" ? "text-center" : t.align === "right" ? "text-right" : "text-left";
25333
25346
  return /* @__PURE__ */ f("p", { className: L(o, i), "data-widget-id": e.id, children: r });
25334
25347
  }
25335
- function Jk(e, t) {
25348
+ function Qk(e, t) {
25336
25349
  return !e || typeof e != "string" ? e : e.replace(/\{\{([^}]+)\}\}/g, (n, r) => {
25337
25350
  const o = r.trim(), i = t[o];
25338
25351
  return i == null ? "" : String(i);
@@ -25341,10 +25354,10 @@ function Jk(e, t) {
25341
25354
  function wy(e, t) {
25342
25355
  const n = { ...e };
25343
25356
  for (const [r, o] of Object.entries(n))
25344
- typeof o == "string" && (n[r] = Jk(o, t));
25357
+ typeof o == "string" && (n[r] = Qk(o, t));
25345
25358
  return n;
25346
25359
  }
25347
- function Qk(e, t) {
25360
+ function Zk(e, t) {
25348
25361
  return e.replace(/\{\{([^}]+)\}\}/g, (n, r) => {
25349
25362
  const o = t[r.trim()];
25350
25363
  return o != null ? String(o) : "";
@@ -25352,7 +25365,7 @@ function Qk(e, t) {
25352
25365
  }
25353
25366
  function Sy(e, t, n, r) {
25354
25367
  if (e.type === "navigate") {
25355
- const o = Qk(e.href, t);
25368
+ const o = Zk(e.href, t);
25356
25369
  if (!o.trim()) return;
25357
25370
  e.openIn === "new" ? window.open(o, "_blank", "noopener,noreferrer") : window.location.assign(o);
25358
25371
  return;
@@ -25374,7 +25387,7 @@ function Sy(e, t, n, r) {
25374
25387
  }
25375
25388
  n(e, r, "click");
25376
25389
  }
25377
- function Zk({ widget: e }) {
25390
+ function eF({ widget: e }) {
25378
25391
  const t = e.config, { context: n, dispatchAction: r } = Gn();
25379
25392
  return /* @__PURE__ */ f(
25380
25393
  tn,
@@ -25387,25 +25400,25 @@ function Zk({ widget: e }) {
25387
25400
  }
25388
25401
  );
25389
25402
  }
25390
- const eF = {
25403
+ const tF = {
25391
25404
  start: "justify-start",
25392
25405
  center: "justify-center",
25393
25406
  end: "justify-end",
25394
25407
  "space-between": "justify-between"
25395
- }, tF = {
25408
+ }, nF = {
25396
25409
  sm: "gap-2",
25397
25410
  md: "gap-3",
25398
25411
  lg: "gap-4"
25399
25412
  };
25400
- function nF({ widget: e }) {
25413
+ function rF({ widget: e }) {
25401
25414
  const t = e.config, { context: n, dispatchAction: r } = Gn(), o = t.buttons ?? [];
25402
25415
  return /* @__PURE__ */ f(
25403
25416
  "div",
25404
25417
  {
25405
25418
  className: L(
25406
25419
  "flex flex-wrap items-center",
25407
- eF[t.align ?? "start"],
25408
- tF[t.gap ?? "sm"],
25420
+ tF[t.align ?? "start"],
25421
+ nF[t.gap ?? "sm"],
25409
25422
  t.wrap === !1 && "flex-nowrap"
25410
25423
  ),
25411
25424
  "data-widget-id": e.id,
@@ -25424,11 +25437,17 @@ function nF({ widget: e }) {
25424
25437
  }
25425
25438
  );
25426
25439
  }
25427
- function rF(e) {
25440
+ function oF(e) {
25428
25441
  const t = e.prepopulateApi;
25429
25442
  return !!(t?.enabled && t.api?.path);
25430
25443
  }
25431
- function oF(e, t) {
25444
+ function iF(e, t) {
25445
+ return e && (t === "idle" || t === "loading");
25446
+ }
25447
+ function sF(e, t) {
25448
+ return !e || t === "ready" || t === "error";
25449
+ }
25450
+ function aF(e, t) {
25432
25451
  const n = et(e, t ?? "");
25433
25452
  return n === void 0 ? null : n;
25434
25453
  }
@@ -25446,43 +25465,48 @@ function xy({
25446
25465
  pageSize: o,
25447
25466
  search: i
25448
25467
  }) {
25449
- const { schema: s, context: a, clientId: c, getFilterGroup: u, prepopulateStatus: l } = Gn(), d = pe(() => t.filterGroupKey ? u(t.filterGroupKey) : {}, [t.filterGroupKey, u]), p = t.mode === "context" && rF(s), m = n && (t.mode === "static" || (t.mode === "context" ? !p || l !== "loading" : !!c)), g = pe(
25468
+ const { schema: s, context: a, clientId: c, getFilterGroup: u, prepopulateStatus: l } = Gn(), d = pe(() => t.filterGroupKey ? u(t.filterGroupKey) : {}, [t.filterGroupKey, u]), p = t.mode === "context" && oF(s), m = iF(p, l), g = n && (t.mode === "static" || (t.mode === "context" ? sF(p, l) : !!c)), h = pe(
25450
25469
  () => ["page-ds", e, t, a, d, r, o, i, l],
25451
25470
  [e, t, a, d, r, o, i, l]
25452
- );
25453
- return qr({
25454
- queryKey: g,
25455
- enabled: m,
25471
+ ), y = qr({
25472
+ queryKey: h,
25473
+ enabled: g,
25456
25474
  staleTime: cf(t, s.dataApis ?? {})?.staleTimeMs ?? 3e4,
25457
25475
  queryFn: async () => {
25458
25476
  if (t.mode === "static")
25459
25477
  return t.staticData;
25460
25478
  if (t.mode === "context")
25461
- return oF(a, t.contextPath);
25462
- const h = cf(t, s.dataApis ?? {});
25463
- if (!h)
25479
+ return aF(a, t.contextPath);
25480
+ const w = cf(t, s.dataApis ?? {});
25481
+ if (!w)
25464
25482
  throw new Error(`No API config for data source on widget ${e}`);
25465
- const y = { ...a };
25483
+ const v = { ...a };
25466
25484
  if (t.requestBindings)
25467
- for (const S of t.requestBindings) {
25468
- let C;
25469
- S.source === "binding" ? C = a[S.key] : S.source === "filter" && (C = d[S.key]), C !== void 0 && (y[S.param] = C);
25485
+ for (const k of t.requestBindings) {
25486
+ let N;
25487
+ k.source === "binding" ? N = a[k.key] : k.source === "filter" && (N = d[k.key]), N !== void 0 && (v[k.param] = N);
25470
25488
  }
25471
- const v = {
25489
+ const C = {
25472
25490
  ...wy(
25473
- y,
25491
+ v,
25474
25492
  a
25475
25493
  ),
25476
25494
  ...r !== void 0 ? { page: r, pageSize: o, search: i } : {}
25477
25495
  };
25478
25496
  return gy({
25479
25497
  clientId: c,
25480
- api: h,
25481
- context: v,
25498
+ api: w,
25499
+ context: C,
25482
25500
  filterState: d
25483
25501
  });
25484
25502
  }
25485
25503
  });
25504
+ return {
25505
+ ...y,
25506
+ isLoading: y.isLoading || m,
25507
+ isPending: y.isPending || m,
25508
+ isFetching: y.isFetching || m
25509
+ };
25486
25510
  }
25487
25511
  function $l(e, t) {
25488
25512
  if (e == null) return "";
@@ -25519,23 +25543,23 @@ function Xo(e, t) {
25519
25543
  const n = et(e, t.path);
25520
25544
  return n == null ? t.fallback ?? n : t.formatter ? $l(n, t.formatter) : n;
25521
25545
  }
25522
- function iF(e, t) {
25546
+ function lF(e, t) {
25523
25547
  if (!t) return {};
25524
25548
  const n = {};
25525
25549
  for (const [r, o] of Object.entries(t))
25526
25550
  o in e && (n[r] = e[o]);
25527
25551
  return n;
25528
25552
  }
25529
- const sF = {
25553
+ const cF = {
25530
25554
  default: "border bg-card",
25531
25555
  success: "border border-green-200 bg-green-50 text-green-900",
25532
25556
  warning: "border border-amber-200 bg-amber-50 text-amber-900",
25533
25557
  danger: "border border-red-200 bg-red-50 text-red-900"
25534
- }, aF = {
25558
+ }, uF = {
25535
25559
  rectangle: "rounded-lg",
25536
25560
  square: "aspect-square rounded-lg",
25537
25561
  circle: "aspect-square rounded-full"
25538
- }, lF = {
25562
+ }, dF = {
25539
25563
  sm: "p-2 text-xs",
25540
25564
  md: "p-4 text-sm",
25541
25565
  lg: "p-6 text-base"
@@ -25543,12 +25567,12 @@ const sF = {
25543
25567
  sm: "text-lg",
25544
25568
  md: "text-2xl",
25545
25569
  lg: "text-3xl"
25546
- }, cF = {
25570
+ }, fF = {
25547
25571
  sm: "gap-2",
25548
25572
  md: "gap-3",
25549
25573
  lg: "gap-4"
25550
25574
  };
25551
- function uF({
25575
+ function pF({
25552
25576
  title: e,
25553
25577
  value: t,
25554
25578
  trend: n,
@@ -25564,9 +25588,9 @@ function uF({
25564
25588
  "div",
25565
25589
  {
25566
25590
  className: L(
25567
- sF[r ?? "default"],
25568
- aF[o ?? "rectangle"],
25569
- lF[i ?? "md"],
25591
+ cF[r ?? "default"],
25592
+ uF[o ?? "rectangle"],
25593
+ dF[i ?? "md"],
25570
25594
  u && "flex items-center justify-between gap-3"
25571
25595
  ),
25572
25596
  children: [
@@ -25588,6 +25612,8 @@ function Ay({
25588
25612
  widgetId: t,
25589
25613
  dataSource: e.dataSource
25590
25614
  }), s = (() => {
25615
+ if (r)
25616
+ return "";
25591
25617
  if (n == null)
25592
25618
  return e.valueMapping.fallback ?? "—";
25593
25619
  if (e.dataSource.mode === "context") {
@@ -25607,7 +25633,7 @@ function Ay({
25607
25633
  return Xo(n, e.valueMapping);
25608
25634
  })(), a = e.trendMapping && n !== void 0 && e.dataSource.mode !== "context" ? Xo(n, e.trendMapping) : e.trendMapping && e.dataSource.mode === "context" && e.trendMapping.path ? Xo({ value: n }, e.trendMapping) : null;
25609
25635
  return /* @__PURE__ */ f(
25610
- uF,
25636
+ pF,
25611
25637
  {
25612
25638
  title: e.title,
25613
25639
  value: s,
@@ -25621,14 +25647,14 @@ function Ay({
25621
25647
  }
25622
25648
  );
25623
25649
  }
25624
- function dF({ widget: e }) {
25650
+ function mF({ widget: e }) {
25625
25651
  const t = e.config;
25626
25652
  return /* @__PURE__ */ f("div", { "data-widget-id": e.id, children: /* @__PURE__ */ f(Ay, { stat: t, widgetId: e.id }) });
25627
25653
  }
25628
- function fF({ stat: e, widgetId: t }) {
25654
+ function hF({ stat: e, widgetId: t }) {
25629
25655
  return /* @__PURE__ */ f(Ay, { stat: e, widgetId: `${t}-${e.id}` });
25630
25656
  }
25631
- function pF({ widget: e }) {
25657
+ function gF({ widget: e }) {
25632
25658
  const t = e.config, n = t.stats ?? [], r = t.columns ?? 1, o = t.direction === "horizontal";
25633
25659
  return /* @__PURE__ */ f(
25634
25660
  "div",
@@ -25640,13 +25666,13 @@ function pF({ widget: e }) {
25640
25666
  !o && r === 2 && "grid-cols-2",
25641
25667
  !o && r === 3 && "grid-cols-3",
25642
25668
  !o && r === 4 && "grid-cols-4",
25643
- cF[t.gap ?? "md"]
25669
+ fF[t.gap ?? "md"]
25644
25670
  ),
25645
- children: n.map((i) => /* @__PURE__ */ f(fF, { stat: i, widgetId: e.id }, i.id))
25671
+ children: n.map((i) => /* @__PURE__ */ f(hF, { stat: i, widgetId: e.id }, i.id))
25646
25672
  }
25647
25673
  );
25648
25674
  }
25649
- function mF({ widget: e }) {
25675
+ function yF({ widget: e }) {
25650
25676
  const t = e.config, { setFilterValue: n } = Gn(), [r, o] = Ee("");
25651
25677
  return wt(() => {
25652
25678
  const i = t.debounceMs ?? 300, s = setTimeout(() => {
@@ -25665,7 +25691,7 @@ function mF({ widget: e }) {
25665
25691
  }
25666
25692
  );
25667
25693
  }
25668
- function hF(e, t) {
25694
+ function bF(e, t) {
25669
25695
  if (!e) return [];
25670
25696
  const n = t ? et(e, t) : e;
25671
25697
  if (Array.isArray(n))
@@ -25677,14 +25703,14 @@ function hF(e, t) {
25677
25703
  }
25678
25704
  return [];
25679
25705
  }
25680
- function gF({ widget: e }) {
25706
+ function vF({ widget: e }) {
25681
25707
  const t = e.config, { dispatchAction: n } = Gn(), [r, o] = Ee(1), [i, s] = Ee(""), a = t.pagination?.pageSize ?? 10, { data: c, isLoading: u, isError: l } = xy({
25682
25708
  widgetId: e.id,
25683
25709
  dataSource: t.dataSource,
25684
25710
  page: r,
25685
25711
  pageSize: a,
25686
25712
  search: t.search?.enabled ? i : void 0
25687
- }), d = t.dataSource.mode === "pageApi" ? void 0 : t.dataSource.api?.itemsPath, p = hF(c, d ?? "data.items"), m = (g, h) => {
25713
+ }), d = t.dataSource.mode === "pageApi" ? void 0 : t.dataSource.api?.itemsPath, p = bF(c, d ?? "data.items"), m = (g, h) => {
25688
25714
  const y = t.dataSource.responseMapping.find((w) => w.target === h);
25689
25715
  return y ? Xo(g, y) : et(g, h) ?? "";
25690
25716
  };
@@ -25772,9 +25798,9 @@ function gF({ widget: e }) {
25772
25798
  ] })
25773
25799
  ] });
25774
25800
  }
25775
- const yF = 75;
25776
- function bF(e) {
25777
- return e ?? yF;
25801
+ const wF = 75;
25802
+ function SF(e) {
25803
+ return e ?? wF;
25778
25804
  }
25779
25805
  function sl({
25780
25806
  scrollBehavior: e = "page",
@@ -25784,7 +25810,7 @@ function sl({
25784
25810
  }) {
25785
25811
  if (e !== "contained")
25786
25812
  return /* @__PURE__ */ f(an, { children: n });
25787
- const o = bF(t);
25813
+ const o = SF(t);
25788
25814
  return /* @__PURE__ */ f(
25789
25815
  "div",
25790
25816
  {
@@ -25795,10 +25821,10 @@ function sl({
25795
25821
  }
25796
25822
  );
25797
25823
  }
25798
- function vF(e, t, n) {
25824
+ function xF(e, t, n) {
25799
25825
  return ["embedded-form", e, t, n ?? "latest"];
25800
25826
  }
25801
- async function wF(e, t) {
25827
+ async function AF(e, t) {
25802
25828
  try {
25803
25829
  const n = await Fr.get(
25804
25830
  `/api/form-builder/form-layouts/form/${e}`,
@@ -25812,12 +25838,12 @@ async function wF(e, t) {
25812
25838
  return null;
25813
25839
  }
25814
25840
  }
25815
- async function SF(e, t, n) {
25841
+ async function CF(e, t, n) {
25816
25842
  const r = n !== void 0 ? `/api/form-builder/forms/${e}/render?version=${n}` : `/api/form-builder/forms/${e}/render`, o = await Fr.get(r, {
25817
25843
  params: { clientId: t }
25818
25844
  }), s = o.data?.data ?? o.data, a = s.form ?? s, c = s.fields ?? a.fields ?? [];
25819
25845
  let u = s.layout ?? a.layout ?? null;
25820
- (!u || typeof u.columns != "number") && (u = await wF(e, t));
25846
+ (!u || typeof u.columns != "number") && (u = await AF(e, t));
25821
25847
  const l = s.rules ?? a.rules ?? [], d = ss(
25822
25848
  a,
25823
25849
  c,
@@ -25829,7 +25855,7 @@ async function SF(e, t, n) {
25829
25855
  ) ?? ll(u);
25830
25856
  return { schema: d, gridLayout: p };
25831
25857
  }
25832
- const xF = 300 * 1e3;
25858
+ const EF = 300 * 1e3;
25833
25859
  function Cy({
25834
25860
  formId: e,
25835
25861
  mode: t = "fill",
@@ -25841,11 +25867,11 @@ function Cy({
25841
25867
  maxHeightPercent: a
25842
25868
  }) {
25843
25869
  const { data: c, isLoading: u, isError: l, error: d } = qr({
25844
- queryKey: vF(e, o, i),
25845
- queryFn: () => SF(e, o, i),
25846
- staleTime: xF
25870
+ queryKey: xF(e, o, i),
25871
+ queryFn: () => CF(e, o, i),
25872
+ staleTime: EF
25847
25873
  }), p = pe(
25848
- () => iF(r, n),
25874
+ () => lF(r, n),
25849
25875
  [r, n]
25850
25876
  );
25851
25877
  return u ? /* @__PURE__ */ f(sl, { scrollBehavior: s, maxHeightPercent: a, children: /* @__PURE__ */ f(Pr, {}) }) : l ? /* @__PURE__ */ f(sl, { scrollBehavior: s, maxHeightPercent: a, children: /* @__PURE__ */ f("p", { className: "text-sm text-destructive", children: d instanceof Error ? d.message : "Failed to load form" }) }) : c?.schema ? /* @__PURE__ */ f(sl, { scrollBehavior: s, maxHeightPercent: a, children: /* @__PURE__ */ f(
@@ -25859,7 +25885,7 @@ function Cy({
25859
25885
  }
25860
25886
  ) }) : null;
25861
25887
  }
25862
- function AF({ widget: e }) {
25888
+ function NF({ widget: e }) {
25863
25889
  const t = e.config, { context: n, clientId: r } = Gn();
25864
25890
  return t.formId ? /* @__PURE__ */ f(
25865
25891
  Cy,
@@ -25874,7 +25900,7 @@ function AF({ widget: e }) {
25874
25900
  }
25875
25901
  ) : /* @__PURE__ */ f("p", { className: "text-sm text-muted-foreground", children: "No form configured" });
25876
25902
  }
25877
- function CF({ widget: e }) {
25903
+ function _F({ widget: e }) {
25878
25904
  const t = e.config, { context: n, getWorkflowState: r, clientId: o } = Gn(), i = String(n.moduleId ?? "");
25879
25905
  if (!r)
25880
25906
  return /* @__PURE__ */ $(
@@ -25909,7 +25935,7 @@ function CF({ widget: e }) {
25909
25935
  }
25910
25936
  );
25911
25937
  }
25912
- function EF({ widget: e }) {
25938
+ function TF({ widget: e }) {
25913
25939
  const t = e.config, { schema: n, dispatchAction: r } = Gn(), o = t.previousPage ?? n.navigation?.previousPage, i = t.nextPage ?? n.navigation?.nextPage, s = t.showPrevious !== !1 && !!o, a = t.showNext !== !1 && !!i, c = t.showBreadcrumbs && n.navigation?.breadcrumbs?.length, u = t.align === "center" ? "justify-center" : t.align === "right" ? "justify-end" : t.align === "space-between" ? "justify-between" : "justify-start", l = (d) => {
25914
25940
  r(
25915
25941
  {
@@ -25931,11 +25957,11 @@ function EF({ widget: e }) {
25931
25957
  ] })
25932
25958
  ] });
25933
25959
  }
25934
- function NF(e, t) {
25960
+ function RF(e, t) {
25935
25961
  return e?.length ? e.filter((n) => n.config.tabId === t) : [];
25936
25962
  }
25937
- const _F = 1;
25938
- function TF(e) {
25963
+ const kF = 1;
25964
+ function FF(e) {
25939
25965
  switch (e) {
25940
25966
  case "pills":
25941
25967
  return "bg-transparent gap-1 p-0 h-auto";
@@ -25945,7 +25971,7 @@ function TF(e) {
25945
25971
  return "";
25946
25972
  }
25947
25973
  }
25948
- function RF(e) {
25974
+ function PF(e) {
25949
25975
  switch (e) {
25950
25976
  case "pills":
25951
25977
  return "rounded-full data-[state=active]:bg-primary data-[state=active]:text-primary-foreground";
@@ -25955,10 +25981,10 @@ function RF(e) {
25955
25981
  return "";
25956
25982
  }
25957
25983
  }
25958
- function kF(e, t, n) {
25984
+ function OF(e, t, n) {
25959
25985
  return e ? new Set(n ? [n] : []) : new Set(t.map((r) => r.id));
25960
25986
  }
25961
- function FF({
25987
+ function IF({
25962
25988
  tab: e,
25963
25989
  shouldRender: t,
25964
25990
  pageContext: n,
@@ -25977,7 +26003,7 @@ function FF({
25977
26003
  }
25978
26004
  ) : /* @__PURE__ */ f("p", { className: "text-sm text-muted-foreground", children: "No form configured for this tab" }) : null;
25979
26005
  }
25980
- function PF({
26006
+ function MF({
25981
26007
  tab: e,
25982
26008
  shouldLoad: t,
25983
26009
  shouldRender: n,
@@ -25992,7 +26018,7 @@ function PF({
25992
26018
  enabled: t && !!e.pageId,
25993
26019
  queryFn: async () => hy(e.pageId, i, e.pageVersion)
25994
26020
  });
25995
- return n ? r >= _F ? /* @__PURE__ */ f("div", { className: "rounded-md border border-destructive/50 bg-destructive/5 p-4 text-sm text-destructive", children: "Nested page tabs not supported" }) : e.pageId ? l ? /* @__PURE__ */ f(Pr, {}) : d ? /* @__PURE__ */ f("p", { className: "text-sm text-destructive", children: p instanceof Error ? p.message : "Failed to load page" }) : u ? /* @__PURE__ */ f(
26021
+ return n ? r >= kF ? /* @__PURE__ */ f("div", { className: "rounded-md border border-destructive/50 bg-destructive/5 p-4 text-sm text-destructive", children: "Nested page tabs not supported" }) : e.pageId ? l ? /* @__PURE__ */ f(Pr, {}) : d ? /* @__PURE__ */ f("p", { className: "text-sm text-destructive", children: p instanceof Error ? p.message : "Failed to load page" }) : u ? /* @__PURE__ */ f(
25996
26022
  Ey,
25997
26023
  {
25998
26024
  page: u,
@@ -26005,17 +26031,17 @@ function PF({
26005
26031
  }
26006
26032
  ) : null : /* @__PURE__ */ f("p", { className: "text-sm text-muted-foreground", children: "No page configured for this tab" }) : null;
26007
26033
  }
26008
- function OF({
26034
+ function LF({
26009
26035
  tab: e,
26010
26036
  widgetChildren: t,
26011
26037
  renderChildren: n
26012
26038
  }) {
26013
- const r = NF(t, e.id);
26039
+ const r = RF(t, e.id);
26014
26040
  return r.length === 0 ? /* @__PURE__ */ f("p", { className: "text-sm text-muted-foreground py-4", children: "No widgets in this tab" }) : /* @__PURE__ */ f(an, { children: n?.(r) });
26015
26041
  }
26016
- function IF({ widget: e, renderChildren: t }) {
26042
+ function DF({ widget: e, renderChildren: t }) {
26017
26043
  const n = e.config, { context: r, clientId: o, nestingDepth: i, onAction: s, getWorkflowState: a } = Gn(), c = n.tabs ?? [], u = n.defaultTabId ?? c[0]?.id ?? "", l = n.lazyLoad !== !1, [d, p] = Ee(u), [m, g] = Ee(
26018
- () => kF(l, c, u)
26044
+ () => OF(l, c, u)
26019
26045
  ), h = (w) => {
26020
26046
  g((v) => new Set(v).add(w)), p(w);
26021
26047
  }, y = pe(() => !l, [l]);
@@ -26027,12 +26053,12 @@ function IF({ widget: e, renderChildren: t }) {
26027
26053
  className: "w-full",
26028
26054
  "data-widget-id": e.id,
26029
26055
  children: [
26030
- /* @__PURE__ */ f(ly, { className: L("mb-4", TF(n.variant)), children: c.map((w) => /* @__PURE__ */ f(
26056
+ /* @__PURE__ */ f(ly, { className: L("mb-4", FF(n.variant)), children: c.map((w) => /* @__PURE__ */ f(
26031
26057
  cy,
26032
26058
  {
26033
26059
  value: w.id,
26034
26060
  disabled: w.disabled,
26035
- className: RF(n.variant),
26061
+ className: PF(n.variant),
26036
26062
  children: w.label
26037
26063
  },
26038
26064
  w.id
@@ -26047,7 +26073,7 @@ function IF({ widget: e, renderChildren: t }) {
26047
26073
  className: L("mt-0", y && "data-[state=inactive]:hidden"),
26048
26074
  children: [
26049
26075
  w.contentType === "widgets" && C && /* @__PURE__ */ f(
26050
- OF,
26076
+ LF,
26051
26077
  {
26052
26078
  tab: w,
26053
26079
  widgetChildren: e.children ?? [],
@@ -26055,7 +26081,7 @@ function IF({ widget: e, renderChildren: t }) {
26055
26081
  }
26056
26082
  ),
26057
26083
  w.contentType === "form" && /* @__PURE__ */ f(
26058
- FF,
26084
+ IF,
26059
26085
  {
26060
26086
  tab: w,
26061
26087
  shouldRender: S,
@@ -26064,7 +26090,7 @@ function IF({ widget: e, renderChildren: t }) {
26064
26090
  }
26065
26091
  ),
26066
26092
  w.contentType === "page" && /* @__PURE__ */ f(
26067
- PF,
26093
+ MF,
26068
26094
  {
26069
26095
  tab: w,
26070
26096
  shouldLoad: S,
@@ -26085,24 +26111,24 @@ function IF({ widget: e, renderChildren: t }) {
26085
26111
  }
26086
26112
  );
26087
26113
  }
26088
- const MF = {
26089
- section: Gk,
26090
- columns: Kk,
26091
- card: qk,
26092
- tab_group: IF,
26093
- heading: Yk,
26094
- text: Xk,
26095
- button: Zk,
26096
- button_group: nF,
26097
- stat_card: dF,
26098
- stat_grid: pF,
26099
- data_table: gF,
26100
- search_filter: mF,
26101
- form_embed: AF,
26102
- workflow_embed: CF,
26103
- page_nav: EF
26114
+ const BF = {
26115
+ section: Kk,
26116
+ columns: qk,
26117
+ card: Yk,
26118
+ tab_group: DF,
26119
+ heading: Xk,
26120
+ text: Jk,
26121
+ button: eF,
26122
+ button_group: rF,
26123
+ stat_card: mF,
26124
+ stat_grid: gF,
26125
+ data_table: vF,
26126
+ search_filter: yF,
26127
+ form_embed: NF,
26128
+ workflow_embed: _F,
26129
+ page_nav: TF
26104
26130
  };
26105
- function LF({ widget: e }) {
26131
+ function $F({ widget: e }) {
26106
26132
  return /* @__PURE__ */ $(
26107
26133
  "div",
26108
26134
  {
@@ -26121,16 +26147,16 @@ function LF({ widget: e }) {
26121
26147
  }
26122
26148
  );
26123
26149
  }
26124
- function DF({
26150
+ function jF({
26125
26151
  widget: e,
26126
26152
  renderChildren: t
26127
26153
  }) {
26128
- const n = MF[e.type] ?? LF;
26154
+ const n = BF[e.type] ?? $F;
26129
26155
  return /* @__PURE__ */ f(n, { widget: e, renderChildren: t });
26130
26156
  }
26131
26157
  function uf(e, t) {
26132
26158
  return e.map((n) => /* @__PURE__ */ f(
26133
- DF,
26159
+ jF,
26134
26160
  {
26135
26161
  widget: n,
26136
26162
  renderChildren: t
@@ -26165,7 +26191,7 @@ function Ey({
26165
26191
  }
26166
26192
  );
26167
26193
  return a && c ? d : /* @__PURE__ */ f(
26168
- Pk,
26194
+ Ok,
26169
26195
  {
26170
26196
  schema: u,
26171
26197
  context: t,
@@ -26178,7 +26204,7 @@ function Ey({
26178
26204
  }
26179
26205
  );
26180
26206
  }
26181
- function EP({
26207
+ function TP({
26182
26208
  clientId: e,
26183
26209
  tenantId: t,
26184
26210
  moduleId: n,
@@ -26223,14 +26249,14 @@ function EP({
26223
26249
  }), v = o ?? g?.pageId, S = u ?? g?.version, {
26224
26250
  data: C,
26225
26251
  isLoading: k,
26226
- isError: _,
26252
+ isError: N,
26227
26253
  error: E
26228
26254
  } = qr({
26229
26255
  queryKey: ["page-render", v, e, S],
26230
26256
  queryFn: () => hy(v, e, S),
26231
26257
  enabled: !!v
26232
26258
  });
26233
- return !o && h ? /* @__PURE__ */ f("div", { className: "flex items-center justify-center p-12", children: /* @__PURE__ */ f(Pr, {}) }) : y ? /* @__PURE__ */ f("div", { className: "rounded-md border border-destructive/50 bg-destructive/5 p-4 text-sm text-destructive", children: w instanceof Error ? w.message : "Failed to resolve page" }) : v ? k ? /* @__PURE__ */ f("div", { className: "flex items-center justify-center p-12", children: /* @__PURE__ */ f(Pr, {}) }) : _ || !C ? /* @__PURE__ */ f("div", { className: "rounded-md border border-destructive/50 bg-destructive/5 p-4 text-sm text-destructive", children: E instanceof Error ? E.message : "Failed to load page" }) : /* @__PURE__ */ f(
26259
+ return !o && h ? /* @__PURE__ */ f("div", { className: "flex items-center justify-center p-12", children: /* @__PURE__ */ f(Pr, {}) }) : y ? /* @__PURE__ */ f("div", { className: "rounded-md border border-destructive/50 bg-destructive/5 p-4 text-sm text-destructive", children: w instanceof Error ? w.message : "Failed to resolve page" }) : v ? k ? /* @__PURE__ */ f("div", { className: "flex items-center justify-center p-12", children: /* @__PURE__ */ f(Pr, {}) }) : N || !C ? /* @__PURE__ */ f("div", { className: "rounded-md border border-destructive/50 bg-destructive/5 p-4 text-sm text-destructive", children: E instanceof Error ? E.message : "Failed to load page" }) : /* @__PURE__ */ f(
26234
26260
  Ey,
26235
26261
  {
26236
26262
  page: C,
@@ -26243,25 +26269,25 @@ function EP({
26243
26269
  ) : /* @__PURE__ */ f("div", { className: "rounded-md border p-4 text-sm text-muted-foreground", children: "No page found for the given scope or route." });
26244
26270
  }
26245
26271
  export {
26246
- AP as FIELD_TYPE_REGISTRY,
26272
+ NP as FIELD_TYPE_REGISTRY,
26247
26273
  So as FORM_RENDERER_GRID_ROW_HEIGHT_DEFAULT,
26248
26274
  ff as FORM_RENDERER_ROOT_CLASS,
26249
26275
  Ar as FieldRenderer,
26250
26276
  Xg as FormRenderer,
26251
26277
  Ey as PageRenderer,
26252
26278
  Of as RendererFieldLayoutContext,
26253
- EP as StudioPageHost,
26279
+ TP as StudioPageHost,
26254
26280
  wk as WorkflowStepsView,
26255
26281
  Fs as appearanceControlClasses,
26256
26282
  Bb as appearanceHasExplicitVerticalIntent,
26257
26283
  Nb as appearanceTextareaClasses,
26258
26284
  ss as backendToFormSchema,
26259
- GF as cellAlignmentClasses,
26260
- WF as cellVerticalJustifyClassesForField,
26285
+ YF as cellAlignmentClasses,
26286
+ qF as cellVerticalJustifyClassesForField,
26261
26287
  Gl as effectiveWidthPercent,
26262
26288
  gy as executeDataSource,
26263
26289
  hy as fetchPageRender,
26264
- HF as fieldBlockBoxStyle,
26290
+ KF as fieldBlockBoxStyle,
26265
26291
  Lb as fieldBlockBoxStyleForField,
26266
26292
  Pb as fieldBlockHorizontalPlacementClass,
26267
26293
  Ob as fieldBlockHorizontalSelfClass,
@@ -26274,20 +26300,20 @@ export {
26274
26300
  CC as getBusinessApiOrigin,
26275
26301
  Zr as getClientId,
26276
26302
  Wm as getRendererHostAuthHeaders,
26277
- gP as getRendererHostViewerContext,
26278
- KF as getRendererStore,
26303
+ vP as getRendererHostViewerContext,
26304
+ XF as getRendererStore,
26279
26305
  Fb as gridCellFlexClasses,
26280
26306
  du as gridCellFlexClassesForField,
26281
26307
  kb as gridCellOuterFlexClasses,
26282
26308
  Ib as hasExplicitFieldBlockWidth,
26283
- wP as isAsyncSearchFieldProperties,
26309
+ AP as isAsyncSearchFieldProperties,
26284
26310
  li as isIntrinsicWidthButtonField,
26285
- vP as normalizeWorkflowFormSchema,
26311
+ xP as normalizeWorkflowFormSchema,
26286
26312
  Uc as normalizeWorkflowFormToRendererSchema,
26287
26313
  ga as pageBuilderHttp,
26288
26314
  Ff as parseContentVerticalAlign,
26289
26315
  ma as parseMetadataJson,
26290
- hP as resetRendererHostAuth,
26316
+ bP as resetRendererHostAuth,
26291
26317
  Er as resolveBusinessApiUrl,
26292
26318
  Vl as resolveFormGridLayout,
26293
26319
  kk as resolvePage,
@@ -26295,14 +26321,14 @@ export {
26295
26321
  Zn as resolvedHorizontalAlign,
26296
26322
  cs as resolvedVerticalAlign,
26297
26323
  Pf as resolvedVerticalAlignForField,
26298
- fP as setBusinessApiOrigin,
26299
- yP as setFormBuilderAuthProvider,
26300
- CP as setPageBuilderAuthProvider,
26301
- mP as setRendererHostAuthHeaders,
26302
- pP as setRendererHostViewerContext,
26303
- xP as useFieldValidation,
26324
+ hP as setBusinessApiOrigin,
26325
+ wP as setFormBuilderAuthProvider,
26326
+ _P as setPageBuilderAuthProvider,
26327
+ yP as setRendererHostAuthHeaders,
26328
+ gP as setRendererHostViewerContext,
26329
+ EP as useFieldValidation,
26304
26330
  fv as useFormRenderer,
26305
- SP as useFormValidation,
26331
+ CP as useFormValidation,
26306
26332
  Os as useRendererFieldLayout,
26307
26333
  Do as useRendererHostAuthStore
26308
26334
  };