@builder.io/sdk-react 2.0.27 → 2.0.28

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.
Files changed (65) hide show
  1. package/lib/browser/blocks-exports.cjs +14 -14
  2. package/lib/browser/blocks-exports.mjs +366 -362
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-b2eed856.cjs → server-entry-7260e494.cjs} +1 -1
  6. package/lib/browser/{server-entry-fea90db1.js → server-entry-ffd47885.js} +1 -1
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-6557fd47.js → accordion-616460c1.js} +1 -1
  10. package/lib/edge/{accordion-c7ebd14b.cjs → accordion-7ef6a928.cjs} +1 -1
  11. package/lib/edge/{blocks-00d9b985.cjs → blocks-896a56b0.cjs} +1 -1
  12. package/lib/edge/{blocks-b7b78f6f.js → blocks-dd91ae28.js} +3 -3
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-ca865fd7.cjs → button-1fa8b647.cjs} +1 -1
  16. package/lib/edge/{button-07555543.js → button-f917a1c0.js} +2 -2
  17. package/lib/edge/columns-5756d7b8.cjs +28 -0
  18. package/lib/edge/{columns-a8fb6e6e.js → columns-dacb342b.js} +67 -63
  19. package/lib/edge/{content-variants-5de0e605.cjs → content-variants-afc4a718.cjs} +1 -1
  20. package/lib/edge/{content-variants-f7aadfcc.js → content-variants-cd80b703.js} +11 -11
  21. package/lib/edge/{evaluate-3fbf8291.js → evaluate-17c2cadd.js} +1 -1
  22. package/lib/edge/{evaluate-2596ffe5.cjs → evaluate-2fcda9ec.cjs} +1 -1
  23. package/lib/edge/{form-be8d48c0.js → form-dc7f56c9.js} +4 -4
  24. package/lib/edge/{form-7f214547.cjs → form-efce5c78.cjs} +1 -1
  25. package/lib/edge/{get-class-prop-name-00a9606b.cjs → get-class-prop-name-2ce20e98.cjs} +1 -1
  26. package/lib/edge/{get-class-prop-name-35810f43.js → get-class-prop-name-5437ca23.js} +1 -1
  27. package/lib/edge/{img-3eab09f2.cjs → img-35a1343f.cjs} +1 -1
  28. package/lib/edge/{img-1c578e3b.js → img-d187da14.js} +1 -1
  29. package/lib/edge/index.cjs +1 -1
  30. package/lib/edge/index.mjs +1 -1
  31. package/lib/edge/{input-9c1e8a98.js → input-38f565ce.js} +1 -1
  32. package/lib/edge/{input-0d7c1c27.cjs → input-9a6498fd.cjs} +1 -1
  33. package/lib/edge/{select-c58218b7.cjs → select-135b7397.cjs} +1 -1
  34. package/lib/edge/{select-fd1e4221.js → select-6cb0b4b7.js} +1 -1
  35. package/lib/edge/{server-entry-72a543d1.js → server-entry-216eb1bf.js} +1 -1
  36. package/lib/edge/{server-entry-f03cbcfe.cjs → server-entry-3e6518b6.cjs} +1 -1
  37. package/lib/edge/server-entry.cjs +1 -1
  38. package/lib/edge/server-entry.mjs +1 -1
  39. package/lib/edge/{slot-864f8ee7.cjs → slot-b0728030.cjs} +1 -1
  40. package/lib/edge/{slot-ec9f4a5e.js → slot-d692126c.js} +4 -4
  41. package/lib/edge/{symbol-68340c52.cjs → symbol-0ac2655e.cjs} +1 -1
  42. package/lib/edge/{symbol-78fe0b05.js → symbol-df30241a.js} +2 -2
  43. package/lib/edge/{tabs-b0f30ed3.cjs → tabs-47ed7dde.cjs} +1 -1
  44. package/lib/edge/{tabs-c847b763.js → tabs-b925777d.js} +4 -4
  45. package/lib/edge/{text-ff0134a1.cjs → text-0f85a76c.cjs} +1 -1
  46. package/lib/edge/{text-5ed7f583.js → text-337389ba.js} +2 -2
  47. package/lib/node/blocks-exports.cjs +14 -14
  48. package/lib/node/blocks-exports.mjs +368 -364
  49. package/lib/node/index.cjs +1 -1
  50. package/lib/node/index.mjs +3 -3
  51. package/lib/node/init.cjs +1 -1
  52. package/lib/node/init.mjs +3 -3
  53. package/lib/node/{server-entry-b19b6f07.cjs → server-entry-3e017173.cjs} +1 -1
  54. package/lib/node/{server-entry-bac0a183.js → server-entry-ca0dcb45.js} +1 -1
  55. package/lib/node/server-entry.cjs +1 -1
  56. package/lib/node/server-entry.mjs +1 -1
  57. package/lib/node/{setIvm-22947995.js → setIvm-2100f4f5.js} +1 -1
  58. package/lib/node/{setIvm-e38cb38e.cjs → setIvm-2d47478e.cjs} +1 -1
  59. package/lib/node/setIvm.cjs +1 -1
  60. package/lib/node/setIvm.mjs +2 -2
  61. package/lib/node/{should-force-browser-runtime-in-node-5458ba48.js → should-force-browser-runtime-in-node-a77d7cfc.js} +1 -1
  62. package/lib/node/{should-force-browser-runtime-in-node-0d7217c7.cjs → should-force-browser-runtime-in-node-fd3ca2a8.cjs} +1 -1
  63. package/package.json +1 -1
  64. package/types/constants/sdk-version.d.ts +1 -1
  65. package/lib/edge/columns-1d6d0f14.cjs +0 -28
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { jsx as l, Fragment as w, jsxs as V } from "react/jsx-runtime";
3
- import { TARGET as D, isEditing as W, isBrowser as L, getUserAttributes as Ue, checkIsDefined as q, logger as z, isPreviewing as ve, registerInsertMenu as He, setupBrowserForEditing as je, createRegisterComponentMessage as Me, getDefaultCanTrack as K, _track as le, fetchOneEntry as Se, createEditorListener as _e, serializeIncludingFunctions as se, handleABTestingSync as qe } from "./server-entry-fea90db1.js";
4
- import { createContext as ke, useEffect as B, useState as T, useRef as $, useContext as ce, createElement as Ce } from "react";
2
+ import { jsx as l, Fragment as T, jsxs as V } from "react/jsx-runtime";
3
+ import { TARGET as D, isEditing as W, isBrowser as L, getUserAttributes as Ue, checkIsDefined as q, logger as z, isPreviewing as ve, registerInsertMenu as He, setupBrowserForEditing as je, createRegisterComponentMessage as Me, getDefaultCanTrack as K, _track as le, fetchOneEntry as Se, createEditorListener as _e, serializeIncludingFunctions as se, handleABTestingSync as qe } from "./server-entry-ffd47885.js";
4
+ import { createContext as ke, useEffect as B, useState as w, useRef as $, useContext as ce, createElement as Ce } from "react";
5
5
  const Ke = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), ze = (e) => typeof e == "string" && Ke.has(e.toLowerCase());
6
6
  function ie(e) {
7
- return /* @__PURE__ */ l(w, { children: ze(e.TagName) ? /* @__PURE__ */ l(w, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(w, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
7
+ return /* @__PURE__ */ l(T, { children: ze(e.TagName) ? /* @__PURE__ */ l(T, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(T, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
8
8
  }
9
9
  const H = () => {
10
10
  switch (D) {
@@ -363,8 +363,8 @@ function ft(e) {
363
363
  leading: !1
364
364
  });
365
365
  function s(h) {
366
- const b = h.getBoundingClientRect(), f = window.innerHeight, g = (e.thresholdPercent || 0) / 100 * f;
367
- return b.bottom > g && b.top < f - g;
366
+ const g = h.getBoundingClientRect(), m = window.innerHeight, f = (e.thresholdPercent || 0) / 100 * m;
367
+ return g.bottom > f && g.top < m - f;
368
368
  }
369
369
  const d = e.steps[0].styles;
370
370
  function c() {
@@ -547,16 +547,16 @@ function Ct(e) {
547
547
  return q(i.hide) ? !i.hide : q(i.show) ? i.show : !0;
548
548
  }
549
549
  function n() {
550
- var x, R, C;
550
+ var S, p, b;
551
551
  const i = e.block, o = i.responsiveStyles, a = e.context.content, r = We(
552
- ((x = a == null ? void 0 : a.meta) == null ? void 0 : x.breakpoints) || {}
552
+ ((S = a == null ? void 0 : a.meta) == null ? void 0 : S.breakpoints) || {}
553
553
  ), s = o == null ? void 0 : o.large, d = o == null ? void 0 : o.medium, c = o == null ? void 0 : o.small, h = i.id;
554
554
  if (!h)
555
555
  return "";
556
- const b = s ? M({
556
+ const g = s ? M({
557
557
  className: h,
558
558
  styles: s
559
- }) : "", f = d ? M({
559
+ }) : "", m = d ? M({
560
560
  className: h,
561
561
  styles: d,
562
562
  mediaQuery: ue(
@@ -570,29 +570,29 @@ function Ct(e) {
570
570
  "small",
571
571
  r
572
572
  )
573
- }) : "", g = i.animations && i.animations.find((k) => k.trigger === "hover");
574
- let S = "";
575
- if (g) {
576
- const k = ((C = (R = g.steps) == null ? void 0 : R[1]) == null ? void 0 : C.styles) || {};
577
- S = M({
573
+ }) : "", f = i.animations && i.animations.find((x) => x.trigger === "hover");
574
+ let k = "";
575
+ if (f) {
576
+ const x = ((b = (p = f.steps) == null ? void 0 : p[1]) == null ? void 0 : b.styles) || {};
577
+ k = M({
578
578
  className: `${h}:hover`,
579
579
  styles: {
580
- ...k,
581
- transition: `all ${g.duration}s ${J(
582
- g.easing
580
+ ...x,
581
+ transition: `all ${f.duration}s ${J(
582
+ f.easing
583
583
  )}`,
584
- transitionDelay: g.delay ? `${g.delay}s` : "0s"
584
+ transitionDelay: f.delay ? `${f.delay}s` : "0s"
585
585
  }
586
586
  }) || "";
587
587
  }
588
588
  return [
589
- b,
590
- f,
589
+ g,
590
+ m,
591
591
  v,
592
- S
592
+ k
593
593
  ].join(" ");
594
594
  }
595
- return /* @__PURE__ */ l(w, { children: n() && t() ? /* @__PURE__ */ l(w, { children: /* @__PURE__ */ l(
595
+ return /* @__PURE__ */ l(T, { children: n() && t() ? /* @__PURE__ */ l(T, { children: /* @__PURE__ */ l(
596
596
  G,
597
597
  {
598
598
  id: "builderio-block",
@@ -686,7 +686,7 @@ function Pt(e) {
686
686
  }
687
687
  function Bt(e) {
688
688
  return B(() => {
689
- }, []), /* @__PURE__ */ l(w, { children: e.children });
689
+ }, []), /* @__PURE__ */ l(T, { children: e.children });
690
690
  }
691
691
  function Vt(e) {
692
692
  function t() {
@@ -704,7 +704,7 @@ function Vt(e) {
704
704
  })
705
705
  } : {};
706
706
  }
707
- return /* @__PURE__ */ l(w, { children: e.Wrapper.load ? /* @__PURE__ */ l(w, { children: /* @__PURE__ */ l(
707
+ return /* @__PURE__ */ l(T, { children: e.Wrapper.load ? /* @__PURE__ */ l(T, { children: /* @__PURE__ */ l(
708
708
  Bt,
709
709
  {
710
710
  load: e.Wrapper.load,
@@ -747,10 +747,10 @@ const At = ({
747
747
  };
748
748
  function me(e) {
749
749
  var i;
750
- const [t, n] = T(
750
+ const [t, n] = w(
751
751
  () => e.isInteractive ? Vt : e.componentRef
752
752
  );
753
- return /* @__PURE__ */ l(w, { children: e.componentRef ? /* @__PURE__ */ l(w, { children: /* @__PURE__ */ l(
753
+ return /* @__PURE__ */ l(T, { children: e.componentRef ? /* @__PURE__ */ l(T, { children: /* @__PURE__ */ l(
754
754
  t,
755
755
  {
756
756
  ...At({
@@ -777,7 +777,7 @@ function me(e) {
777
777
  ) }) : null });
778
778
  }
779
779
  function fe(e) {
780
- const [t, n] = T(() => e.repeatContext);
780
+ const [t, n] = w(() => e.repeatContext);
781
781
  return /* @__PURE__ */ l(oe.Provider, { value: t, children: /* @__PURE__ */ l(
782
782
  j,
783
783
  {
@@ -789,22 +789,22 @@ function fe(e) {
789
789
  ) });
790
790
  }
791
791
  function j(e) {
792
- var h, b, f, v;
792
+ var h, g, m, v;
793
793
  function t() {
794
794
  return yt({
795
795
  block: e.block,
796
796
  context: e.context
797
797
  });
798
798
  }
799
- const [n, i] = T(() => ({
799
+ const [n, i] = w(() => ({
800
800
  value: null,
801
801
  update: !1
802
802
  }));
803
803
  function o() {
804
- var S;
804
+ var k;
805
805
  if (n.value && !n.update && !ve())
806
806
  return n.value;
807
- const g = (S = e.block.repeat) != null && S.collection ? e.block : ct({
807
+ const f = (k = e.block.repeat) != null && k.collection ? e.block : ct({
808
808
  block: e.block,
809
809
  localState: e.context.localState,
810
810
  rootState: e.context.rootState,
@@ -812,7 +812,7 @@ function j(e) {
812
812
  context: e.context.context,
813
813
  shouldEvaluateBindings: !0
814
814
  });
815
- return n.value = g, n.update = !1, g;
815
+ return n.value = f, n.update = !1, f;
816
816
  }
817
817
  function a() {
818
818
  return pt({
@@ -821,25 +821,25 @@ function j(e) {
821
821
  });
822
822
  }
823
823
  function r() {
824
- var S;
825
- return e.block.tagName === "a" || ((S = o().properties) == null ? void 0 : S.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
824
+ var k;
825
+ return e.block.tagName === "a" || ((k = o().properties) == null ? void 0 : k.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
826
826
  }
827
827
  function s() {
828
- var x, R;
829
- if ((x = e.block.repeat) != null && x.collection)
830
- return !!((R = t == null ? void 0 : t()) != null && R.length);
831
- const g = "hide" in o() ? o().hide : !1;
832
- return ("show" in o() ? o().show : !0) && !g;
828
+ var S, p;
829
+ if ((S = e.block.repeat) != null && S.collection)
830
+ return !!((p = t == null ? void 0 : t()) != null && p.length);
831
+ const f = "hide" in o() ? o().hide : !1;
832
+ return ("show" in o() ? o().show : !0) && !f;
833
833
  }
834
834
  function d() {
835
- var S, x;
836
- return !((S = a == null ? void 0 : a()) != null && S.component) && !t() ? (x = o().children) != null ? x : [] : [];
835
+ var k, S;
836
+ return !((k = a == null ? void 0 : a()) != null && k.component) && !t() ? (S = o().children) != null ? S : [] : [];
837
837
  }
838
838
  function c() {
839
- var g, S, x, R;
839
+ var f, k, S, p;
840
840
  return {
841
- blockChildren: (g = o().children) != null ? g : [],
842
- componentRef: (S = a == null ? void 0 : a()) == null ? void 0 : S.component,
841
+ blockChildren: (f = o().children) != null ? f : [],
842
+ componentRef: (k = a == null ? void 0 : a()) == null ? void 0 : k.component,
843
843
  componentOptions: {
844
844
  ...Ge(o()),
845
845
  ...St(a(), o()),
@@ -854,31 +854,31 @@ function j(e) {
854
854
  linkComponent: e.linkComponent,
855
855
  registeredComponents: e.registeredComponents,
856
856
  builderBlock: o(),
857
- includeBlockProps: ((x = a == null ? void 0 : a()) == null ? void 0 : x.noWrap) === !0,
858
- isInteractive: !((R = a == null ? void 0 : a()) != null && R.isRSC && D === "rsc")
857
+ includeBlockProps: ((S = a == null ? void 0 : a()) == null ? void 0 : S.noWrap) === !0,
858
+ isInteractive: !((p = a == null ? void 0 : a()) != null && p.isRSC && D === "rsc")
859
859
  };
860
860
  }
861
861
  return B(() => {
862
- const g = o().id, S = o().animations;
863
- S && g && ut(
864
- S.map((x) => ({
865
- ...x,
866
- elementId: g
862
+ const f = o().id, k = o().animations;
863
+ k && f && ut(
864
+ k.map((S) => ({
865
+ ...S,
866
+ elementId: f
867
867
  }))
868
868
  );
869
869
  }, []), B(() => {
870
870
  n.update = !0;
871
- }), /* @__PURE__ */ l(w, { children: s() ? /* @__PURE__ */ V(w, { children: [
871
+ }), /* @__PURE__ */ l(T, { children: s() ? /* @__PURE__ */ V(T, { children: [
872
872
  /* @__PURE__ */ l(Ct, { block: o(), context: e.context }),
873
- (h = a == null ? void 0 : a()) != null && h.noWrap ? t() ? /* @__PURE__ */ l(w, { children: (v = t()) == null ? void 0 : v.map((g, S) => /* @__PURE__ */ l(
873
+ (h = a == null ? void 0 : a()) != null && h.noWrap ? t() ? /* @__PURE__ */ l(T, { children: (v = t()) == null ? void 0 : v.map((f, k) => /* @__PURE__ */ l(
874
874
  fe,
875
875
  {
876
- repeatContext: g.context,
877
- block: g.block,
876
+ repeatContext: f.context,
877
+ block: f.block,
878
878
  registeredComponents: e.registeredComponents,
879
879
  linkComponent: e.linkComponent
880
880
  },
881
- S
881
+ k
882
882
  )) }) : /* @__PURE__ */ l(
883
883
  me,
884
884
  {
@@ -892,15 +892,15 @@ function j(e) {
892
892
  includeBlockProps: c().includeBlockProps,
893
893
  isInteractive: c().isInteractive
894
894
  }
895
- ) : /* @__PURE__ */ l(w, { children: t() ? /* @__PURE__ */ l(w, { children: (f = t()) == null ? void 0 : f.map((g, S) => /* @__PURE__ */ l(
895
+ ) : /* @__PURE__ */ l(T, { children: t() ? /* @__PURE__ */ l(T, { children: (m = t()) == null ? void 0 : m.map((f, k) => /* @__PURE__ */ l(
896
896
  fe,
897
897
  {
898
- repeatContext: g.context,
899
- block: g.block,
898
+ repeatContext: f.context,
899
+ block: f.block,
900
900
  registeredComponents: e.registeredComponents,
901
901
  linkComponent: e.linkComponent
902
902
  },
903
- S
903
+ k
904
904
  )) }) : /* @__PURE__ */ V(
905
905
  Pt,
906
906
  {
@@ -922,15 +922,15 @@ function j(e) {
922
922
  isInteractive: c().isInteractive
923
923
  }
924
924
  ),
925
- (b = d()) == null ? void 0 : b.map((g) => /* @__PURE__ */ l(
925
+ (g = d()) == null ? void 0 : g.map((f) => /* @__PURE__ */ l(
926
926
  j,
927
927
  {
928
- block: g,
928
+ block: f,
929
929
  registeredComponents: e.registeredComponents,
930
930
  linkComponent: e.linkComponent,
931
931
  context: e.context
932
932
  },
933
- g.id
933
+ f.id
934
934
  ))
935
935
  ]
936
936
  }
@@ -974,7 +974,7 @@ function Nt(e) {
974
974
  ));
975
975
  }
976
976
  return B(() => {
977
- }, []), /* @__PURE__ */ V(w, { children: [
977
+ }, []), /* @__PURE__ */ V(T, { children: [
978
978
  /* @__PURE__ */ l(
979
979
  e.BlocksWrapper,
980
980
  {
@@ -1010,7 +1010,7 @@ function F(e) {
1010
1010
  classNameProp: e.className,
1011
1011
  BlocksWrapper: ((i = e.context) == null ? void 0 : i.BlocksWrapper) || (t == null ? void 0 : t.BlocksWrapper),
1012
1012
  BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || (t == null ? void 0 : t.BlocksWrapperProps),
1013
- children: e.blocks ? /* @__PURE__ */ l(w, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ l(
1013
+ children: e.blocks ? /* @__PURE__ */ l(T, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ l(
1014
1014
  j,
1015
1015
  {
1016
1016
  block: r,
@@ -1025,143 +1025,147 @@ function F(e) {
1025
1025
  }
1026
1026
  const Wt = (e) => `builder-columns ${e}-breakpoints`;
1027
1027
  function Ft(e) {
1028
- var k, N;
1029
- const [t, n] = T(
1030
- () => typeof e.space == "number" ? e.space || 0 : 20
1031
- ), [i, o] = T(() => e.columns || []), [a, r] = T(
1032
- () => e.stackColumnsAt || "tablet"
1033
- );
1034
- function s(m) {
1035
- return m.link ? e.builderLinkComponent || "a" : "div";
1028
+ var k, S;
1029
+ function t() {
1030
+ return typeof e.space == "number" ? e.space || 0 : 20;
1036
1031
  }
1037
- function d(m) {
1038
- var y;
1039
- return ((y = i[m]) == null ? void 0 : y.width) || 100 / i.length;
1032
+ function n() {
1033
+ return e.columns || [];
1040
1034
  }
1041
- function c(m) {
1042
- const y = d(m), I = t * (i.length - 1) * (y / 100);
1043
- return `calc(${y}% - ${I}px)`;
1035
+ function i() {
1036
+ return e.stackColumnsAt || "tablet";
1037
+ }
1038
+ function o(p) {
1039
+ return p.link ? e.builderLinkComponent || "a" : "div";
1040
+ }
1041
+ function a(p) {
1042
+ var b;
1043
+ return ((b = n()[p]) == null ? void 0 : b.width) || 100 / n().length;
1044
+ }
1045
+ function r(p) {
1046
+ const b = a(p), x = t() * (n().length - 1) * (b / 100);
1047
+ return `calc(${b}% - ${x}px)`;
1044
1048
  }
1045
- function h({
1046
- stackedStyle: m,
1047
- desktopStyle: y
1049
+ function s({
1050
+ stackedStyle: p,
1051
+ desktopStyle: b
1048
1052
  }) {
1049
- return a === "tablet" ? m : y;
1053
+ return i() === "tablet" ? p : b;
1050
1054
  }
1051
- function b({
1052
- stackedStyle: m,
1053
- desktopStyle: y
1055
+ function d({
1056
+ stackedStyle: p,
1057
+ desktopStyle: b
1054
1058
  }) {
1055
- return a === "never" ? y : m;
1059
+ return i() === "never" ? b : p;
1056
1060
  }
1057
- const [f, v] = T(
1058
- () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
1059
- );
1060
- function g() {
1061
+ function c() {
1062
+ return e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column";
1063
+ }
1064
+ function h() {
1061
1065
  return {
1062
- "--flex-dir": f,
1063
- "--flex-dir-tablet": h({
1064
- stackedStyle: f,
1066
+ "--flex-dir": c(),
1067
+ "--flex-dir-tablet": s({
1068
+ stackedStyle: c(),
1065
1069
  desktopStyle: "row"
1066
1070
  })
1067
1071
  };
1068
1072
  }
1069
- function S(m) {
1070
- const y = m === 0 ? 0 : t, I = c(m), u = `${y}px`, p = "100%", E = 0;
1073
+ function g(p) {
1074
+ const b = p === 0 ? 0 : t(), x = r(p), A = `${b}px`, C = "100%", I = 0;
1071
1075
  return {
1072
1076
  ...{
1073
1077
  display: "flex",
1074
1078
  flexDirection: "column",
1075
1079
  alignItems: "stretch"
1076
1080
  },
1077
- width: I,
1078
- ["marginLeft"]: u,
1079
- "--column-width-mobile": b({
1080
- stackedStyle: p,
1081
- desktopStyle: I
1081
+ width: x,
1082
+ ["marginLeft"]: A,
1083
+ "--column-width-mobile": d({
1084
+ stackedStyle: C,
1085
+ desktopStyle: x
1082
1086
  }),
1083
- "--column-margin-left-mobile": b({
1084
- stackedStyle: E,
1085
- desktopStyle: u
1087
+ "--column-margin-left-mobile": d({
1088
+ stackedStyle: I,
1089
+ desktopStyle: A
1086
1090
  }),
1087
- "--column-width-tablet": h({
1088
- stackedStyle: p,
1089
- desktopStyle: I
1091
+ "--column-width-tablet": s({
1092
+ stackedStyle: C,
1093
+ desktopStyle: x
1090
1094
  }),
1091
- "--column-margin-left-tablet": h({
1092
- stackedStyle: E,
1093
- desktopStyle: u
1095
+ "--column-margin-left-tablet": s({
1096
+ stackedStyle: I,
1097
+ desktopStyle: A
1094
1098
  })
1095
1099
  };
1096
1100
  }
1097
- function x(m) {
1098
- var I, u;
1101
+ function m(p) {
1102
+ var x, A;
1099
1103
  return We(
1100
- ((u = (I = e.builderContext.content) == null ? void 0 : I.meta) == null ? void 0 : u.breakpoints) || {}
1101
- )[m].max;
1104
+ ((A = (x = e.builderContext.content) == null ? void 0 : x.meta) == null ? void 0 : A.breakpoints) || {}
1105
+ )[p].max;
1102
1106
  }
1103
- function R() {
1104
- const m = `.${e.builderBlock.id}-breakpoints > .builder-column`;
1107
+ function v() {
1108
+ const p = `.${e.builderBlock.id}-breakpoints > .builder-column`;
1105
1109
  return `
1106
- @media (max-width: ${x("medium")}px) {
1110
+ @media (max-width: ${m("medium")}px) {
1107
1111
  .${e.builderBlock.id}-breakpoints {
1108
1112
  flex-direction: var(--flex-dir-tablet);
1109
1113
  align-items: stretch;
1110
1114
  }
1111
1115
 
1112
- ${m} {
1116
+ ${p} {
1113
1117
  width: var(--column-width-tablet) !important;
1114
1118
  margin-left: var(--column-margin-left-tablet) !important;
1115
1119
  }
1116
1120
  }
1117
1121
 
1118
- @media (max-width: ${x("small")}px) {
1122
+ @media (max-width: ${m("small")}px) {
1119
1123
  .${e.builderBlock.id}-breakpoints {
1120
1124
  flex-direction: var(--flex-dir);
1121
1125
  align-items: stretch;
1122
1126
  }
1123
1127
 
1124
- ${m} {
1128
+ ${p} {
1125
1129
  width: var(--column-width-mobile) !important;
1126
1130
  margin-left: var(--column-margin-left-mobile) !important;
1127
1131
  }
1128
1132
  },
1129
1133
  `;
1130
1134
  }
1131
- function C(m, y) {
1135
+ function f(p, b) {
1132
1136
  return {
1133
- ...m.link ? {
1134
- href: m.link
1137
+ ...p.link ? {
1138
+ href: p.link
1135
1139
  } : {},
1136
1140
  [H()]: "builder-column",
1137
- style: Ae(S(y))
1141
+ style: Ae(g(b))
1138
1142
  };
1139
1143
  }
1140
- return /* @__PURE__ */ V(w, { children: [
1144
+ return /* @__PURE__ */ V(T, { children: [
1141
1145
  /* @__PURE__ */ V(
1142
1146
  "div",
1143
1147
  {
1144
- className: Wt((k = e.builderBlock) == null ? void 0 : k.id) + " div-3b0f6fe2",
1145
- style: g(),
1148
+ className: Wt((k = e.builderBlock) == null ? void 0 : k.id) + " div-424156c6",
1149
+ style: h(),
1146
1150
  children: [
1147
1151
  /* @__PURE__ */ l(
1148
1152
  G,
1149
1153
  {
1150
1154
  id: "builderio-columns",
1151
- styles: R(),
1155
+ styles: v(),
1152
1156
  nonce: e.builderContext.nonce
1153
1157
  }
1154
1158
  ),
1155
- (N = e.columns) == null ? void 0 : N.map((m, y) => /* @__PURE__ */ l(
1159
+ (S = e.columns) == null ? void 0 : S.map((p, b) => /* @__PURE__ */ l(
1156
1160
  ie,
1157
1161
  {
1158
- TagName: s(m),
1162
+ TagName: o(p),
1159
1163
  actionAttributes: {},
1160
- attributes: C(m, y),
1164
+ attributes: f(p, b),
1161
1165
  children: /* @__PURE__ */ l(
1162
1166
  F,
1163
1167
  {
1164
- path: `component.options.columns.${y}.blocks`,
1168
+ path: `component.options.columns.${b}.blocks`,
1165
1169
  parent: e.builderBlock.id,
1166
1170
  styleProp: {
1167
1171
  flexGrow: "1"
@@ -1169,16 +1173,16 @@ function Ft(e) {
1169
1173
  context: e.builderContext,
1170
1174
  registeredComponents: e.builderComponents,
1171
1175
  linkComponent: e.builderLinkComponent,
1172
- blocks: m.blocks
1176
+ blocks: p.blocks
1173
1177
  }
1174
1178
  )
1175
1179
  },
1176
- y
1180
+ b
1177
1181
  ))
1178
1182
  ]
1179
1183
  }
1180
1184
  ),
1181
- /* @__PURE__ */ l("style", { children: `.div-3b0f6fe2 {
1185
+ /* @__PURE__ */ l("style", { children: `.div-424156c6 {
1182
1186
  display: flex;
1183
1187
  line-height: normal;
1184
1188
  }` })
@@ -1220,19 +1224,19 @@ function Y(e) {
1220
1224
  function Ot(e) {
1221
1225
  var o, a, r, s, d, c;
1222
1226
  function t() {
1223
- var f;
1224
- const b = e.image || e.src;
1225
- if (!b || // We can auto add srcset for cdn.builder.io and shopify
1227
+ var m;
1228
+ const g = e.image || e.src;
1229
+ if (!g || // We can auto add srcset for cdn.builder.io and shopify
1226
1230
  // images, otherwise you can supply this prop manually
1227
- !(b.match(/builder\.io/) || b.match(/cdn\.shopify\.com/)))
1231
+ !(g.match(/builder\.io/) || g.match(/cdn\.shopify\.com/)))
1228
1232
  return e.srcset;
1229
1233
  if (!e.noWebp) {
1230
- if (e.srcset && ((f = e.image) != null && f.includes("builder.io/api/v1/image"))) {
1234
+ if (e.srcset && ((m = e.image) != null && m.includes("builder.io/api/v1/image"))) {
1231
1235
  if (!e.srcset.includes(e.image.split("?")[0]))
1232
- return console.debug("Removed given srcset"), Y(b);
1236
+ return console.debug("Removed given srcset"), Y(g);
1233
1237
  } else if (e.image && !e.srcset)
1234
- return Y(b);
1235
- return Y(b);
1238
+ return Y(g);
1239
+ return Y(g);
1236
1240
  }
1237
1241
  }
1238
1242
  function n() {
@@ -1250,8 +1254,8 @@ function Ot(e) {
1250
1254
  return e.aspectRatio ? h : void 0;
1251
1255
  }
1252
1256
  return B(() => {
1253
- }, []), /* @__PURE__ */ V(w, { children: [
1254
- /* @__PURE__ */ V(w, { children: [
1257
+ }, []), /* @__PURE__ */ V(T, { children: [
1258
+ /* @__PURE__ */ V(T, { children: [
1255
1259
  /* @__PURE__ */ V("picture", { children: [
1256
1260
  n() ? /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) : null,
1257
1261
  /* @__PURE__ */ l(
@@ -1282,7 +1286,7 @@ function Ot(e) {
1282
1286
  }
1283
1287
  }
1284
1288
  ) : null,
1285
- (s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(w, { children: e.children }) : null,
1289
+ (s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(T, { children: e.children }) : null,
1286
1290
  !e.fitContent && ((c = (d = e.builderBlock) == null ? void 0 : d.children) != null && c.length) ? /* @__PURE__ */ l("div", { className: "div-7a292ab8-2", children: e.children }) : null
1287
1291
  ] }),
1288
1292
  /* @__PURE__ */ l("style", { children: `.img-7a292ab8 {
@@ -1451,8 +1455,8 @@ const Q = {
1451
1455
  }
1452
1456
  }, ge = (e) => e.toString();
1453
1457
  function jt(e) {
1454
- var b;
1455
- const [t, n] = T(() => []);
1458
+ var g;
1459
+ const [t, n] = w(() => []);
1456
1460
  function i() {
1457
1461
  return !!(e.grid || e.oneAtATime);
1458
1462
  }
@@ -1478,57 +1482,57 @@ function jt(e) {
1478
1482
  cursor: "pointer"
1479
1483
  };
1480
1484
  return Object.fromEntries(
1481
- Object.entries(v).filter(([g, S]) => S !== void 0)
1485
+ Object.entries(v).filter(([f, k]) => k !== void 0)
1482
1486
  );
1483
1487
  }
1484
- function r(f) {
1485
- return `builder-accordion-title builder-accordion-title-${t.includes(f) ? "open" : "closed"}`;
1488
+ function r(m) {
1489
+ return `builder-accordion-title builder-accordion-title-${t.includes(m) ? "open" : "closed"}`;
1486
1490
  }
1487
- function s(f) {
1488
- return `builder-accordion-detail builder-accordion-detail-${t.includes(f) ? "open" : "closed"}`;
1491
+ function s(m) {
1492
+ return `builder-accordion-detail builder-accordion-detail-${t.includes(m) ? "open" : "closed"}`;
1489
1493
  }
1490
1494
  function d() {
1491
- let f = null;
1495
+ let m = null;
1492
1496
  if (e.grid && t.length && document) {
1493
- const g = t[0];
1494
- let x = document.querySelector(
1495
- `.builder-accordion-title[data-index="${g}"]`
1497
+ const f = t[0];
1498
+ let S = document.querySelector(
1499
+ `.builder-accordion-title[data-index="${f}"]`
1496
1500
  );
1497
- if (f = g, x) {
1498
- let R = x.getBoundingClientRect();
1499
- for (; x = x && x.nextElementSibling; )
1500
- if (x) {
1501
- if (x.classList.contains("builder-accordion-detail"))
1501
+ if (m = f, S) {
1502
+ let p = S.getBoundingClientRect();
1503
+ for (; S = S && S.nextElementSibling; )
1504
+ if (S) {
1505
+ if (S.classList.contains("builder-accordion-detail"))
1502
1506
  continue;
1503
- const C = x.getBoundingClientRect();
1504
- if (C.left > R.left) {
1505
- const k = parseInt(
1506
- x.getAttribute("data-index") || "",
1507
+ const b = S.getBoundingClientRect();
1508
+ if (b.left > p.left) {
1509
+ const x = parseInt(
1510
+ S.getAttribute("data-index") || "",
1507
1511
  10
1508
1512
  );
1509
- isNaN(k) || (R = C, f = k);
1513
+ isNaN(x) || (p = b, m = x);
1510
1514
  } else
1511
1515
  break;
1512
1516
  }
1513
1517
  }
1514
1518
  }
1515
- return typeof f == "number" && (f = f + 1), f;
1519
+ return typeof m == "number" && (m = m + 1), m;
1516
1520
  }
1517
1521
  function c() {
1518
- const f = {
1522
+ const m = {
1519
1523
  order: typeof d() == "number" ? d() : void 0,
1520
1524
  ...e.grid && {
1521
1525
  width: "100%"
1522
1526
  }
1523
1527
  };
1524
1528
  return Object.fromEntries(
1525
- Object.entries(f).filter(([v, g]) => g !== void 0)
1529
+ Object.entries(m).filter(([v, f]) => f !== void 0)
1526
1530
  );
1527
1531
  }
1528
- function h(f) {
1529
- t.includes(f) ? n(i() ? [] : t.filter((v) => v !== f)) : n(i() ? [f] : t.concat(f));
1532
+ function h(m) {
1533
+ t.includes(m) ? n(i() ? [] : t.filter((v) => v !== m)) : n(i() ? [m] : t.concat(m));
1530
1534
  }
1531
- return /* @__PURE__ */ l("div", { className: "builder-accordion", style: o(), children: (b = e.items) == null ? void 0 : b.map((f, v) => /* @__PURE__ */ V(w, { children: [
1535
+ return /* @__PURE__ */ l("div", { className: "builder-accordion", style: o(), children: (g = e.items) == null ? void 0 : g.map((m, v) => /* @__PURE__ */ V(T, { children: [
1532
1536
  /* @__PURE__ */ l(
1533
1537
  "div",
1534
1538
  {
@@ -1539,11 +1543,11 @@ function jt(e) {
1539
1543
  order: d() !== null ? ge(v) : ge(v + 1)
1540
1544
  },
1541
1545
  "data-index": v,
1542
- onClick: (g) => h(v),
1546
+ onClick: (f) => h(v),
1543
1547
  children: /* @__PURE__ */ l(
1544
1548
  F,
1545
1549
  {
1546
- blocks: f.title,
1550
+ blocks: m.title,
1547
1551
  path: `items.${v}.title`,
1548
1552
  parent: e.builderBlock.id,
1549
1553
  context: e.builderContext,
@@ -1561,7 +1565,7 @@ function jt(e) {
1561
1565
  children: /* @__PURE__ */ l(
1562
1566
  F,
1563
1567
  {
1564
- blocks: f.detail,
1568
+ blocks: m.detail,
1565
1569
  path: `items.${v}.detail`,
1566
1570
  parent: e.builderBlock.id,
1567
1571
  context: e.builderContext,
@@ -1845,13 +1849,13 @@ const Mt = {
1845
1849
  function n(r, s = 6e4) {
1846
1850
  return new Promise((d, c) => {
1847
1851
  const h = document.createElement("img");
1848
- let b = !1;
1852
+ let g = !1;
1849
1853
  h.onload = () => {
1850
- b = !0, d(h);
1851
- }, h.addEventListener("error", (f) => {
1852
- console.warn("Image load failed", f.error), c(f.error);
1854
+ g = !0, d(h);
1855
+ }, h.addEventListener("error", (m) => {
1856
+ console.warn("Image load failed", m.error), c(m.error);
1853
1857
  }), h.src = r, setTimeout(() => {
1854
- b || c(new Error("Image load timed out"));
1858
+ g || c(new Error("Image load timed out"));
1855
1859
  }, s);
1856
1860
  });
1857
1861
  }
@@ -2194,7 +2198,7 @@ const Yt = {
2194
2198
  };
2195
2199
  function Xt(e) {
2196
2200
  var a;
2197
- const [t, n] = T(
2201
+ const [t, n] = w(
2198
2202
  () => e.defaultActiveTab ? e.defaultActiveTab - 1 : 0
2199
2203
  );
2200
2204
  function i(r) {
@@ -2329,7 +2333,7 @@ const tn = {
2329
2333
  }]
2330
2334
  };
2331
2335
  function nn(e) {
2332
- const t = $(null), [n, i] = T(() => []), [o, a] = T(() => []);
2336
+ const t = $(null), [n, i] = w(() => []), [o, a] = w(() => []);
2333
2337
  return B(() => {
2334
2338
  var s;
2335
2339
  if (!((s = t.current) != null && s.getElementsByTagName) || typeof window == "undefined")
@@ -2383,22 +2387,22 @@ const on = {
2383
2387
  }]
2384
2388
  }, an = ["text/javascript", "application/javascript", "application/ecmascript"], rn = (e) => an.includes(e.type);
2385
2389
  function ln(e) {
2386
- const t = $(null), [n, i] = T(() => []), [o, a] = T(() => []), [r, s] = T(() => !1);
2390
+ const t = $(null), [n, i] = w(() => []), [o, a] = w(() => []), [r, s] = w(() => !1);
2387
2391
  function d() {
2388
2392
  if (!t.current || !t.current.getElementsByTagName)
2389
2393
  return;
2390
2394
  const c = t.current.getElementsByTagName("script");
2391
2395
  for (let h = 0; h < c.length; h++) {
2392
- const b = c[h];
2393
- if (b.src && !n.includes(b.src)) {
2394
- n.push(b.src);
2395
- const f = document.createElement("script");
2396
- f.async = !0, f.src = b.src, document.head.appendChild(f);
2397
- } else if (rn(b) && !o.includes(b.innerText))
2396
+ const g = c[h];
2397
+ if (g.src && !n.includes(g.src)) {
2398
+ n.push(g.src);
2399
+ const m = document.createElement("script");
2400
+ m.async = !0, m.src = g.src, document.head.appendChild(m);
2401
+ } else if (rn(g) && !o.includes(g.innerText))
2398
2402
  try {
2399
- o.push(b.innerText), new Function(b.innerText)();
2400
- } catch (f) {
2401
- console.warn("`Embed`: Error running script:", f);
2403
+ o.push(g.innerText), new Function(g.innerText)();
2404
+ } catch (m) {
2405
+ console.warn("`Embed`: Error running script:", m);
2402
2406
  }
2403
2407
  }
2404
2408
  }
@@ -2655,115 +2659,115 @@ const sn = {
2655
2659
  return cn.includes(e) ? e : "production";
2656
2660
  };
2657
2661
  function un(e) {
2658
- var b, f;
2659
- const t = $(null), [n, i] = T(() => "unsubmitted"), [o, a] = T(() => null), [r, s] = T(() => "");
2662
+ var g, m;
2663
+ const t = $(null), [n, i] = w(() => "unsubmitted"), [o, a] = w(() => null), [r, s] = w(() => "");
2660
2664
  function d(v) {
2661
- var S, x;
2662
- const g = {
2665
+ var k, S;
2666
+ const f = {
2663
2667
  ...e.builderContext.rootState,
2664
2668
  ...v
2665
2669
  };
2666
- e.builderContext.rootSetState ? (x = (S = e.builderContext).rootSetState) == null || x.call(S, g) : e.builderContext.rootState = g;
2670
+ e.builderContext.rootSetState ? (S = (k = e.builderContext).rootSetState) == null || S.call(k, f) : e.builderContext.rootState = f;
2667
2671
  }
2668
2672
  function c() {
2669
2673
  return W() && e.previewState || n;
2670
2674
  }
2671
2675
  function h(v) {
2672
- var S;
2673
- const g = e.sendWithJs || e.sendSubmissionsTo === "email";
2676
+ var k;
2677
+ const f = e.sendWithJs || e.sendSubmissionsTo === "email";
2674
2678
  if (e.sendSubmissionsTo === "zapier")
2675
2679
  v.preventDefault();
2676
- else if (g) {
2680
+ else if (f) {
2677
2681
  if (!(e.action || e.sendSubmissionsTo === "email")) {
2678
2682
  v.preventDefault();
2679
2683
  return;
2680
2684
  }
2681
2685
  v.preventDefault();
2682
- const x = v.currentTarget || v.target, R = e.customHeaders || {};
2683
- let C;
2684
- const k = new FormData(x), N = Array.from(x.querySelectorAll("input,select,textarea")).filter((u) => !!u.name).map((u) => {
2685
- let p;
2686
+ const S = v.currentTarget || v.target, p = e.customHeaders || {};
2687
+ let b;
2688
+ const x = new FormData(S), A = Array.from(S.querySelectorAll("input,select,textarea")).filter((u) => !!u.name).map((u) => {
2689
+ let y;
2686
2690
  const E = u.name;
2687
2691
  if (u instanceof HTMLInputElement)
2688
2692
  if (u.type === "radio") {
2689
2693
  if (u.checked)
2690
- return p = u.name, {
2694
+ return y = u.name, {
2691
2695
  key: E,
2692
- value: p
2696
+ value: y
2693
2697
  };
2694
2698
  } else if (u.type === "checkbox")
2695
- p = u.checked;
2699
+ y = u.checked;
2696
2700
  else if (u.type === "number" || u.type === "range") {
2697
- const P = u.valueAsNumber;
2698
- isNaN(P) || (p = P);
2701
+ const R = u.valueAsNumber;
2702
+ isNaN(R) || (y = R);
2699
2703
  } else
2700
- u.type === "file" ? p = u.files : p = u.value;
2704
+ u.type === "file" ? y = u.files : y = u.value;
2701
2705
  else
2702
- p = u.value;
2706
+ y = u.value;
2703
2707
  return {
2704
2708
  key: E,
2705
- value: p
2709
+ value: y
2706
2710
  };
2707
2711
  });
2708
- let m = e.contentType;
2709
- if (e.sendSubmissionsTo === "email" && (m = "multipart/form-data"), Array.from(N).forEach(({ value: u }) => {
2710
- (u instanceof File || Array.isArray(u) && u[0] instanceof File || u instanceof FileList) && (m = "multipart/form-data");
2711
- }), m !== "application/json")
2712
- C = k;
2712
+ let C = e.contentType;
2713
+ if (e.sendSubmissionsTo === "email" && (C = "multipart/form-data"), Array.from(A).forEach(({ value: u }) => {
2714
+ (u instanceof File || Array.isArray(u) && u[0] instanceof File || u instanceof FileList) && (C = "multipart/form-data");
2715
+ }), C !== "application/json")
2716
+ b = x;
2713
2717
  else {
2714
2718
  const u = {};
2715
- Array.from(N).forEach(({ value: p, key: E }) => {
2716
- Ee(u, E, p);
2717
- }), C = JSON.stringify(u);
2719
+ Array.from(A).forEach(({ value: y, key: E }) => {
2720
+ Ee(u, E, y);
2721
+ }), b = JSON.stringify(u);
2718
2722
  }
2719
- m && m !== "multipart/form-data" && (g && ((S = e.action) != null && S.includes("zapier.com")) || (R["content-type"] = m));
2720
- const y = new CustomEvent("presubmit", { detail: { body: C } });
2721
- if (t.current && (t.current.dispatchEvent(y), y.defaultPrevented))
2723
+ C && C !== "multipart/form-data" && (f && ((k = e.action) != null && k.includes("zapier.com")) || (p["content-type"] = C));
2724
+ const I = new CustomEvent("presubmit", { detail: { body: b } });
2725
+ if (t.current && (t.current.dispatchEvent(I), I.defaultPrevented))
2722
2726
  return;
2723
2727
  i("sending");
2724
- const I = `${dn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
2728
+ const P = `${dn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
2725
2729
  e.sendSubmissionsToEmail || ""
2726
2730
  )}&name=${encodeURIComponent(e.name || "")}`;
2727
2731
  fetch(
2728
- e.sendSubmissionsTo === "email" ? I : e.action,
2729
- { body: C, headers: R, method: e.method || "post" }
2732
+ e.sendSubmissionsTo === "email" ? P : e.action,
2733
+ { body: b, headers: p, method: e.method || "post" }
2730
2734
  ).then(
2731
2735
  async (u) => {
2732
- let p;
2736
+ let y;
2733
2737
  const E = u.headers.get("content-type");
2734
- if (E && E.indexOf("application/json") !== -1 ? p = await u.json() : p = await u.text(), !u.ok && e.errorMessagePath) {
2735
- let P = Ie(p, e.errorMessagePath);
2736
- P && (typeof P != "string" && (P = JSON.stringify(P)), s(P), d({ formErrorMessage: P }));
2738
+ if (E && E.indexOf("application/json") !== -1 ? y = await u.json() : y = await u.text(), !u.ok && e.errorMessagePath) {
2739
+ let R = Ie(y, e.errorMessagePath);
2740
+ R && (typeof R != "string" && (R = JSON.stringify(R)), s(R), d({ formErrorMessage: R }));
2737
2741
  }
2738
- if (a(p), i(u.ok ? "success" : "error"), u.ok) {
2739
- const P = new CustomEvent("submit:success", {
2740
- detail: { res: u, body: p }
2742
+ if (a(y), i(u.ok ? "success" : "error"), u.ok) {
2743
+ const R = new CustomEvent("submit:success", {
2744
+ detail: { res: u, body: y }
2741
2745
  });
2742
2746
  if (t.current) {
2743
- if (t.current.dispatchEvent(P), P.defaultPrevented)
2747
+ if (t.current.dispatchEvent(R), R.defaultPrevented)
2744
2748
  return;
2745
2749
  e.resetFormOnSubmit !== !1 && t.current.reset();
2746
2750
  }
2747
2751
  if (e.successUrl)
2748
2752
  if (t.current) {
2749
- const A = new CustomEvent("route", {
2753
+ const N = new CustomEvent("route", {
2750
2754
  detail: { url: e.successUrl }
2751
2755
  });
2752
- t.current.dispatchEvent(A), A.defaultPrevented || (location.href = e.successUrl);
2756
+ t.current.dispatchEvent(N), N.defaultPrevented || (location.href = e.successUrl);
2753
2757
  } else
2754
2758
  location.href = e.successUrl;
2755
2759
  }
2756
2760
  },
2757
2761
  (u) => {
2758
- const p = new CustomEvent("submit:error", {
2762
+ const y = new CustomEvent("submit:error", {
2759
2763
  detail: { error: u }
2760
2764
  });
2761
- t.current && (t.current.dispatchEvent(p), p.defaultPrevented) || (a(u), i("error"));
2765
+ t.current && (t.current.dispatchEvent(y), y.defaultPrevented) || (a(u), i("error"));
2762
2766
  }
2763
2767
  );
2764
2768
  }
2765
2769
  }
2766
- return /* @__PURE__ */ V(w, { children: [
2770
+ return /* @__PURE__ */ V(T, { children: [
2767
2771
  " ",
2768
2772
  /* @__PURE__ */ V(
2769
2773
  "form",
@@ -2776,7 +2780,7 @@ function un(e) {
2776
2780
  onSubmit: (v) => h(v),
2777
2781
  ...e.attributes,
2778
2782
  children: [
2779
- e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(w, { children: (f = (b = e.builderBlock) == null ? void 0 : b.children) == null ? void 0 : f.map((v, g) => /* @__PURE__ */ l(
2783
+ e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(T, { children: (m = (g = e.builderBlock) == null ? void 0 : g.children) == null ? void 0 : m.map((v, f) => /* @__PURE__ */ l(
2780
2784
  j,
2781
2785
  {
2782
2786
  block: v,
@@ -2784,7 +2788,7 @@ function un(e) {
2784
2788
  registeredComponents: e.builderComponents,
2785
2789
  linkComponent: e.builderLinkComponent
2786
2790
  },
2787
- `form-block-${g}`
2791
+ `form-block-${f}`
2788
2792
  )) }) : null,
2789
2793
  c() === "error" ? /* @__PURE__ */ l(
2790
2794
  F,
@@ -3510,37 +3514,37 @@ font-weight: ${s};
3510
3514
  }
3511
3515
  `, On = (e) => e ? "" : Ln, Un = (e) => `variant-${e}`;
3512
3516
  function Hn(e) {
3513
- var C, k, N;
3517
+ var b, x, A;
3514
3518
  const t = $(null);
3515
- function n(m) {
3516
- var I, u;
3517
- const y = {
3519
+ function n(C) {
3520
+ var P, u;
3521
+ const I = {
3518
3522
  ...e.builderContextSignal.rootState,
3519
- ...m
3523
+ ...C
3520
3524
  };
3521
- e.builderContextSignal.rootSetState ? (u = (I = e.builderContextSignal).rootSetState) == null || u.call(I, y) : e.setBuilderContextSignal((p) => ({
3522
- ...p,
3523
- rootState: y
3525
+ e.builderContextSignal.rootSetState ? (u = (P = e.builderContextSignal).rootSetState) == null || u.call(P, I) : e.setBuilderContextSignal((y) => ({
3526
+ ...y,
3527
+ rootState: I
3524
3528
  }));
3525
3529
  }
3526
- function i(m) {
3527
- var I, u, p, E, P;
3528
- const y = {
3530
+ function i(C) {
3531
+ var P, u, y, E, R;
3532
+ const I = {
3529
3533
  ...e.builderContextSignal.content,
3530
- ...m,
3534
+ ...C,
3531
3535
  data: {
3532
- ...(I = e.builderContextSignal.content) == null ? void 0 : I.data,
3533
- ...m == null ? void 0 : m.data
3536
+ ...(P = e.builderContextSignal.content) == null ? void 0 : P.data,
3537
+ ...C == null ? void 0 : C.data
3534
3538
  },
3535
3539
  meta: {
3536
3540
  ...(u = e.builderContextSignal.content) == null ? void 0 : u.meta,
3537
- ...m == null ? void 0 : m.meta,
3538
- breakpoints: ((p = m == null ? void 0 : m.meta) == null ? void 0 : p.breakpoints) || ((P = (E = e.builderContextSignal.content) == null ? void 0 : E.meta) == null ? void 0 : P.breakpoints)
3541
+ ...C == null ? void 0 : C.meta,
3542
+ breakpoints: ((y = C == null ? void 0 : C.meta) == null ? void 0 : y.breakpoints) || ((R = (E = e.builderContextSignal.content) == null ? void 0 : E.meta) == null ? void 0 : R.breakpoints)
3539
3543
  }
3540
3544
  };
3541
- e.setBuilderContextSignal((A) => ({
3542
- ...A,
3543
- content: y
3545
+ e.setBuilderContextSignal((N) => ({
3546
+ ...N,
3547
+ content: I
3544
3548
  }));
3545
3549
  }
3546
3550
  function o() {
@@ -3549,60 +3553,60 @@ function Hn(e) {
3549
3553
  "aria-hidden": !0
3550
3554
  };
3551
3555
  }
3552
- const [a, r] = T(
3556
+ const [a, r] = w(
3553
3557
  () => e.contentWrapper || "div"
3554
3558
  );
3555
- function s(m) {
3559
+ function s(C) {
3556
3560
  return _e({
3557
3561
  model: e.model,
3558
3562
  trustedHosts: e.trustedHosts,
3559
3563
  callbacks: {
3560
- configureSdk: (y) => {
3561
- var p;
3562
- const { breakpoints: I, contentId: u } = y;
3563
- !u || u !== ((p = e.builderContextSignal.content) == null ? void 0 : p.id) || I && i({
3564
+ configureSdk: (I) => {
3565
+ var y;
3566
+ const { breakpoints: P, contentId: u } = I;
3567
+ !u || u !== ((y = e.builderContextSignal.content) == null ? void 0 : y.id) || P && i({
3564
3568
  meta: {
3565
- breakpoints: I
3569
+ breakpoints: P
3566
3570
  }
3567
3571
  });
3568
3572
  },
3569
- animation: (y) => {
3570
- Be(y);
3573
+ animation: (I) => {
3574
+ Be(I);
3571
3575
  },
3572
- contentUpdate: (y) => {
3573
- i(y);
3576
+ contentUpdate: (I) => {
3577
+ i(I);
3574
3578
  }
3575
3579
  }
3576
- })(m);
3580
+ })(C);
3577
3581
  }
3578
- const [d, c] = T(() => ({})), [h, b] = T(() => ({})), [f, v] = T(() => !1);
3579
- function g(m) {
3580
- var y, I;
3582
+ const [d, c] = w(() => ({})), [h, g] = w(() => ({})), [m, v] = w(() => !1);
3583
+ function f(C) {
3584
+ var I, P;
3581
3585
  if (e.builderContextSignal.content) {
3582
- const u = (y = e.builderContextSignal.content) == null ? void 0 : y.testVariationId, p = (I = e.builderContextSignal.content) == null ? void 0 : I.id;
3586
+ const u = (I = e.builderContextSignal.content) == null ? void 0 : I.testVariationId, y = (P = e.builderContextSignal.content) == null ? void 0 : P.id;
3583
3587
  le({
3584
3588
  apiHost: e.apiHost,
3585
3589
  type: "click",
3586
3590
  canTrack: K(e.canTrack),
3587
- contentId: p,
3591
+ contentId: y,
3588
3592
  apiKey: e.apiKey,
3589
- variationId: u !== p ? u : void 0,
3590
- ...Wn(m),
3591
- unique: !f
3593
+ variationId: u !== y ? u : void 0,
3594
+ ...Wn(C),
3595
+ unique: !m
3592
3596
  });
3593
3597
  }
3594
- f || v(!0);
3598
+ m || v(!0);
3595
3599
  }
3596
- function S() {
3597
- var y, I, u;
3598
- const m = (u = (I = (y = e.builderContextSignal.content) == null ? void 0 : y.data) == null ? void 0 : I.httpRequests) != null ? u : {};
3599
- Object.entries(m).forEach(([p, E]) => {
3600
- if (!E || h[p] || d[p] && !W())
3600
+ function k() {
3601
+ var I, P, u;
3602
+ const C = (u = (P = (I = e.builderContextSignal.content) == null ? void 0 : I.data) == null ? void 0 : P.httpRequests) != null ? u : {};
3603
+ Object.entries(C).forEach(([y, E]) => {
3604
+ if (!E || h[y] || d[y] && !W())
3601
3605
  return;
3602
- h[p] = !0;
3603
- const P = E.replace(
3606
+ h[y] = !0;
3607
+ const R = E.replace(
3604
3608
  /{{([^}]+)}}/g,
3605
- (A, Oe) => String(
3609
+ (N, Oe) => String(
3606
3610
  O({
3607
3611
  code: Oe,
3608
3612
  context: e.context || {},
@@ -3612,18 +3616,18 @@ function Hn(e) {
3612
3616
  })
3613
3617
  )
3614
3618
  );
3615
- fetch(P).then((A) => A.json()).then((A) => {
3619
+ fetch(R).then((N) => N.json()).then((N) => {
3616
3620
  n({
3617
- [p]: A
3618
- }), d[p] = !0;
3619
- }).catch((A) => {
3620
- console.error("error fetching dynamic data", E, A);
3621
+ [y]: N
3622
+ }), d[y] = !0;
3623
+ }).catch((N) => {
3624
+ console.error("error fetching dynamic data", E, N);
3621
3625
  }).finally(() => {
3622
- h[p] = !1;
3626
+ h[y] = !1;
3623
3627
  });
3624
3628
  });
3625
3629
  }
3626
- function x() {
3630
+ function S() {
3627
3631
  W() && window.dispatchEvent(
3628
3632
  new CustomEvent(
3629
3633
  "builder:component:stateChange",
@@ -3638,9 +3642,9 @@ function Hn(e) {
3638
3642
  )
3639
3643
  );
3640
3644
  }
3641
- const R = $(!1);
3642
- return R.current || (S(), x(), R.current = !0), B(() => {
3643
- var m, y;
3645
+ const p = $(!1);
3646
+ return p.current || (k(), S(), p.current = !0), B(() => {
3647
+ var C, I;
3644
3648
  if (L()) {
3645
3649
  if (W() && !e.isNestedRender && (window.addEventListener("message", s), He(), je({
3646
3650
  ...e.locale ? {
@@ -3656,39 +3660,39 @@ function Hn(e) {
3656
3660
  e.builderContextSignal.componentInfos
3657
3661
  ).forEach((u) => {
3658
3662
  var E;
3659
- const p = Me(u);
3660
- (E = window.parent) == null || E.postMessage(p, "*");
3663
+ const y = Me(u);
3664
+ (E = window.parent) == null || E.postMessage(y, "*");
3661
3665
  }), window.addEventListener(
3662
3666
  "builder:component:stateChangeListenerActivated",
3663
- x
3667
+ S
3664
3668
  )), e.builderContextSignal.content && K(e.canTrack)) {
3665
- const u = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, p = (y = e.builderContextSignal.content) == null ? void 0 : y.id, E = e.apiKey;
3669
+ const u = (C = e.builderContextSignal.content) == null ? void 0 : C.testVariationId, y = (I = e.builderContextSignal.content) == null ? void 0 : I.id, E = e.apiKey;
3666
3670
  le({
3667
3671
  apiHost: e.apiHost,
3668
3672
  type: "impression",
3669
3673
  canTrack: !0,
3670
- contentId: p,
3674
+ contentId: y,
3671
3675
  apiKey: E,
3672
- variationId: u !== p ? u : void 0
3676
+ variationId: u !== y ? u : void 0
3673
3677
  });
3674
3678
  }
3675
3679
  if (ve() && !W()) {
3676
- const u = new URL(location.href).searchParams, p = u.get("builder.preview"), E = u.get(
3677
- `builder.overrides.${p}`
3678
- ), P = u.get("apiKey") || u.get("builder.space");
3679
- p === e.model && P === e.apiKey && (!e.content || E === e.content.id) && Se({
3680
+ const u = new URL(location.href).searchParams, y = u.get("builder.preview"), E = u.get(
3681
+ `builder.overrides.${y}`
3682
+ ), R = u.get("apiKey") || u.get("builder.space");
3683
+ y === e.model && R === e.apiKey && (!e.content || E === e.content.id) && Se({
3680
3684
  model: e.model,
3681
3685
  apiKey: e.apiKey,
3682
3686
  apiVersion: e.builderContextSignal.apiVersion
3683
- }).then((A) => {
3684
- A && i(A);
3687
+ }).then((N) => {
3688
+ N && i(N);
3685
3689
  });
3686
3690
  }
3687
3691
  }
3688
3692
  }, []), B(() => {
3689
3693
  e.content && i(e.content);
3690
3694
  }, [e.content]), B(() => {
3691
- x();
3695
+ S();
3692
3696
  }, [e.builderContextSignal.rootState]), B(() => {
3693
3697
  e.data && n(e.data);
3694
3698
  }, [e.data]), B(() => {
@@ -3698,17 +3702,17 @@ function Hn(e) {
3698
3702
  }, [e.locale]), B(() => () => {
3699
3703
  L() && (window.removeEventListener("message", s), window.removeEventListener(
3700
3704
  "builder:component:stateChangeListenerActivated",
3701
- x
3705
+ S
3702
3706
  ));
3703
3707
  }, []), /* @__PURE__ */ l(oe.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(
3704
3708
  a,
3705
3709
  {
3706
3710
  ref: t,
3707
- onClick: (m) => g(m),
3708
- "builder-content-id": (C = e.builderContextSignal.content) == null ? void 0 : C.id,
3711
+ onClick: (C) => f(C),
3712
+ "builder-content-id": (b = e.builderContextSignal.content) == null ? void 0 : b.id,
3709
3713
  "builder-model": e.model,
3710
3714
  className: Un(
3711
- ((k = e.content) == null ? void 0 : k.testVariationId) || ((N = e.content) == null ? void 0 : N.id)
3715
+ ((x = e.content) == null ? void 0 : x.testVariationId) || ((A = e.content) == null ? void 0 : A.id)
3712
3716
  ),
3713
3717
  ...o(),
3714
3718
  ...e.contentWrapperProps,
@@ -3717,7 +3721,7 @@ function Hn(e) {
3717
3721
  ) : null });
3718
3722
  }
3719
3723
  function jn(e) {
3720
- const [t, n] = T(
3724
+ const [t, n] = w(
3721
3725
  () => `
3722
3726
  ${Dn({
3723
3727
  cssCode: e.cssCode,
@@ -3767,43 +3771,43 @@ const Mn = ({
3767
3771
  meta: e == null ? void 0 : e.meta
3768
3772
  } : void 0;
3769
3773
  function xe(e) {
3770
- var c, h, b, f, v, g, S, x, R;
3771
- const [t, n] = T(
3774
+ var c, h, g, m, v, f, k, S, p;
3775
+ const [t, n] = w(
3772
3776
  () => {
3773
- var C, k;
3777
+ var b, x;
3774
3778
  return Vn({
3775
3779
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
3776
- variationId: (C = e.content) == null ? void 0 : C.testVariationId,
3780
+ variationId: (b = e.content) == null ? void 0 : b.testVariationId,
3777
3781
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
3778
- contentId: (k = e.content) == null ? void 0 : k.id
3782
+ contentId: (x = e.content) == null ? void 0 : x.id
3779
3783
  });
3780
3784
  }
3781
3785
  );
3782
- function i(C) {
3783
- s((k) => ({
3784
- ...k,
3785
- rootState: C
3786
+ function i(b) {
3787
+ s((x) => ({
3788
+ ...x,
3789
+ rootState: b
3786
3790
  }));
3787
3791
  }
3788
- const [o, a] = T(
3792
+ const [o, a] = w(
3789
3793
  () => {
3790
- var C;
3794
+ var b;
3791
3795
  return [
3792
3796
  ...be(),
3793
- ...((C = e.customComponents) == null ? void 0 : C.filter(({ models: k }) => !(k != null && k.length) || !e.model ? !0 : k.includes(e.model))) || []
3797
+ ...((b = e.customComponents) == null ? void 0 : b.filter(({ models: x }) => !(x != null && x.length) || !e.model ? !0 : x.includes(e.model))) || []
3794
3798
  ].reduce(
3795
- (k, { component: N, ...m }) => ({
3796
- ...k,
3797
- [m.name]: {
3798
- component: N,
3799
- ...se(m)
3799
+ (x, { component: A, ...C }) => ({
3800
+ ...x,
3801
+ [C.name]: {
3802
+ component: A,
3803
+ ...se(C)
3800
3804
  }
3801
3805
  }),
3802
3806
  {}
3803
3807
  );
3804
3808
  }
3805
- ), [r, s] = T(() => {
3806
- var C;
3809
+ ), [r, s] = w(() => {
3810
+ var b;
3807
3811
  return {
3808
3812
  content: _n({
3809
3813
  content: e.content,
@@ -3822,11 +3826,11 @@ function xe(e) {
3822
3826
  apiVersion: e.apiVersion,
3823
3827
  componentInfos: [
3824
3828
  ...be(),
3825
- ...((C = e.customComponents) == null ? void 0 : C.filter(({ models: k }) => !(k != null && k.length) || !e.model ? !0 : k.includes(e.model))) || []
3829
+ ...((b = e.customComponents) == null ? void 0 : b.filter(({ models: x }) => !(x != null && x.length) || !e.model ? !0 : x.includes(e.model))) || []
3826
3830
  ].reduce(
3827
- (k, { component: N, ...m }) => ({
3828
- ...k,
3829
- [m.name]: se(m)
3831
+ (x, { component: A, ...C }) => ({
3832
+ ...x,
3833
+ [C.name]: se(C)
3830
3834
  }),
3831
3835
  {}
3832
3836
  ),
@@ -3840,14 +3844,14 @@ function xe(e) {
3840
3844
  e.apiKey || z.error(
3841
3845
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
3842
3846
  );
3843
- const C = (h = (c = r.content) == null ? void 0 : c.data) == null ? void 0 : h.jsCode;
3844
- C && O({
3845
- code: C,
3847
+ const b = (h = (c = r.content) == null ? void 0 : c.data) == null ? void 0 : h.jsCode;
3848
+ b && O({
3849
+ code: b,
3846
3850
  context: e.context || {},
3847
3851
  localState: void 0,
3848
3852
  rootState: r.rootState,
3849
- rootSetState: (k) => {
3850
- Object.assign(r.rootState, k);
3853
+ rootSetState: (x) => {
3854
+ Object.assign(r.rootState, x);
3851
3855
  },
3852
3856
  isExpression: !1
3853
3857
  }), d.current = !0;
@@ -3892,15 +3896,15 @@ function xe(e) {
3892
3896
  {
3893
3897
  nonce: e.nonce || "",
3894
3898
  isNestedRender: e.isNestedRender,
3895
- contentId: (b = r.content) == null ? void 0 : b.id,
3896
- cssCode: (v = (f = r.content) == null ? void 0 : f.data) == null ? void 0 : v.cssCode,
3897
- customFonts: (S = (g = r.content) == null ? void 0 : g.data) == null ? void 0 : S.customFonts
3899
+ contentId: (g = r.content) == null ? void 0 : g.id,
3900
+ cssCode: (v = (m = r.content) == null ? void 0 : m.data) == null ? void 0 : v.cssCode,
3901
+ customFonts: (k = (f = r.content) == null ? void 0 : f.data) == null ? void 0 : k.customFonts
3898
3902
  }
3899
3903
  ),
3900
3904
  /* @__PURE__ */ l(
3901
3905
  F,
3902
3906
  {
3903
- blocks: (R = (x = r.content) == null ? void 0 : x.data) == null ? void 0 : R.blocks,
3907
+ blocks: (p = (S = r.content) == null ? void 0 : S.data) == null ? void 0 : p.blocks,
3904
3908
  context: r,
3905
3909
  registeredComponents: o,
3906
3910
  linkComponent: e.linkComponent
@@ -3914,7 +3918,7 @@ function xe(e) {
3914
3918
  }
3915
3919
  function qn(e) {
3916
3920
  var r;
3917
- const [t, n] = T(
3921
+ const [t, n] = w(
3918
3922
  () => En({
3919
3923
  canTrack: K(e.canTrack),
3920
3924
  content: e.content
@@ -3944,7 +3948,7 @@ function qn(e) {
3944
3948
  });
3945
3949
  }
3946
3950
  return B(() => {
3947
- }, []), /* @__PURE__ */ V(w, { children: [
3951
+ }, []), /* @__PURE__ */ V(T, { children: [
3948
3952
  !e.isNestedRender && D !== "reactNative" ? /* @__PURE__ */ l(
3949
3953
  ne,
3950
3954
  {
@@ -3953,7 +3957,7 @@ function qn(e) {
3953
3957
  nonce: e.nonce || ""
3954
3958
  }
3955
3959
  ) : null,
3956
- t ? /* @__PURE__ */ V(w, { children: [
3960
+ t ? /* @__PURE__ */ V(T, { children: [
3957
3961
  /* @__PURE__ */ l(
3958
3962
  G,
3959
3963
  {
@@ -4054,24 +4058,24 @@ function zn(e) {
4054
4058
  return "div";
4055
4059
  }
4056
4060
  function i() {
4057
- var b, f;
4061
+ var g, m;
4058
4062
  return [
4059
4063
  e.attributes[H()],
4060
4064
  "builder-symbol",
4061
- (b = e.symbol) != null && b.inline ? "builder-inline-symbol" : void 0,
4062
- (f = e.symbol) != null && f.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
4065
+ (g = e.symbol) != null && g.inline ? "builder-inline-symbol" : void 0,
4066
+ (m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
4063
4067
  ].filter(Boolean).join(" ");
4064
4068
  }
4065
- const [o, a] = T(() => {
4066
- var b;
4067
- return (b = e.symbol) == null ? void 0 : b.content;
4069
+ const [o, a] = w(() => {
4070
+ var g;
4071
+ return (g = e.symbol) == null ? void 0 : g.content;
4068
4072
  });
4069
4073
  function r() {
4070
4074
  o || Kn({
4071
4075
  symbol: e.symbol,
4072
4076
  builderContextValue: e.builderContext
4073
- }).then((b) => {
4074
- b && a(b);
4077
+ }).then((g) => {
4078
+ g && a(g);
4075
4079
  });
4076
4080
  }
4077
4081
  return B(() => {