@builder.io/sdk-react 0.11.2 → 0.11.4

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 (32) hide show
  1. package/lib/browser/index.cjs +25 -25
  2. package/lib/browser/index.mjs +540 -546
  3. package/lib/edge/index.cjs +31 -31
  4. package/lib/edge/index.mjs +1288 -1294
  5. package/lib/node/index.cjs +16 -16
  6. package/lib/node/index.mjs +342 -348
  7. package/package.json +61 -4
  8. package/types/blocks/button/button.d.ts +1 -9
  9. package/types/blocks/button/button.types.d.ts +6 -0
  10. package/types/blocks/columns/columns.d.ts +2 -14
  11. package/types/blocks/columns/columns.types.d.ts +15 -0
  12. package/types/blocks/fragment/fragment.d.ts +1 -5
  13. package/types/blocks/fragment/fragment.types.d.ts +5 -0
  14. package/types/blocks/image/image.d.ts +1 -19
  15. package/types/blocks/image/image.types.d.ts +19 -0
  16. package/types/blocks/section/section.d.ts +1 -9
  17. package/types/blocks/section/section.types.d.ts +6 -0
  18. package/types/blocks/symbol/symbol.d.ts +2 -23
  19. package/types/blocks/symbol/symbol.types.d.ts +18 -0
  20. package/types/blocks/text/text.d.ts +1 -3
  21. package/types/blocks/text/text.types.d.ts +3 -0
  22. package/types/blocks/video/video.d.ts +1 -21
  23. package/types/blocks/video/video.types.d.ts +21 -0
  24. package/types/components/blocks/blocks.d.ts +1 -6
  25. package/types/components/blocks/blocks.types.d.ts +6 -0
  26. package/types/components/content/components/enable-editor.d.ts +1 -1
  27. package/types/components/content/content.helpers.d.ts +1 -1
  28. package/types/components/content-variants/content-variants.types.d.ts +30 -1
  29. package/types/constants/sdk-version.d.ts +1 -1
  30. package/types/functions/get-content/index.d.ts +1 -1
  31. package/types/functions/get-content/types.d.ts +2 -2
  32. package/types/server-index.d.ts +10 -1
@@ -2,7 +2,7 @@
2
2
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
3
  import { createContext, useState, useContext, createElement, useRef, useEffect } from "react";
4
4
  import { i as isEditing, j as isBrowser, k as getUserAttributes, l as fastClone, m as logger, n as checkIsDefined, T as TARGET, r as register, o as getDefaultCanTrack, p as _track, a as isPreviewing, c as createRegisterComponentMessage, b as fetchOneEntry, q as fetch$1, u as components, v as serializeComponentInfo, w as handleABTestingSync } from "./server-entry-46908b1b.js";
5
- import { _ as U, h as H, f as K, g as z, e as q, d as Y, s as G, t as J } from "./server-entry-46908b1b.js";
5
+ import { _ as H, h as K, f as z, g as q, e as Y, d as G, s as J, t as Q } from "./server-entry-46908b1b.js";
6
6
  import { createRequire } from "node:module";
7
7
  function Button(e) {
8
8
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -20,11 +20,11 @@ function Button(e) {
20
20
  {
21
21
  ...e.attributes,
22
22
  style: e.attributes.style,
23
- className: e.attributes.className + " button-3ecc5438",
23
+ className: e.attributes.className + " button-fdf49de0",
24
24
  children: e.text
25
25
  }
26
26
  ) }),
27
- /* @__PURE__ */ jsx("style", { children: `.button-3ecc5438 {
27
+ /* @__PURE__ */ jsx("style", { children: `.button-fdf49de0 {
28
28
  all: unset;
29
29
  }` })
30
30
  ] });
@@ -82,13 +82,13 @@ const getFunctionArguments = ({
82
82
  rootSetState: a,
83
83
  rootState: r
84
84
  }) => {
85
- const c = getFunctionArguments({
85
+ const l = getFunctionArguments({
86
86
  builder: t,
87
87
  context: n,
88
88
  event: i,
89
89
  state: flattenState(r, o, a)
90
90
  });
91
- return new Function(...c.map(([l]) => l), e)(...c.map(([, l]) => l));
91
+ return new Function(...l.map(([c]) => c), e)(...l.map(([, c]) => c));
92
92
  };
93
93
  function flattenState(e, t, n) {
94
94
  if (e === t)
@@ -175,32 +175,32 @@ output;
175
175
  rootSetState: a,
176
176
  rootState: r
177
177
  }) => {
178
- const c = fastClone({
178
+ const l = fastClone({
179
179
  ...r,
180
180
  ...o
181
- }), l = getFunctionArguments({
181
+ }), c = getFunctionArguments({
182
182
  builder: t,
183
183
  context: n,
184
184
  event: i,
185
- state: c
185
+ state: l
186
186
  }), s = getIsolateContext(), d = s.global;
187
- d.setSync("global", d.derefInto()), d.setSync("log", function(...S) {
188
- console.log(...S);
189
- }), d.setSync(BUILDER_SET_STATE_NAME, function(S, f) {
190
- set(r, S, f), a == null || a(r);
191
- }), l.forEach(([S, f]) => {
192
- const p = typeof f == "object" ? new ivm.Reference(
187
+ d.setSync("global", d.derefInto()), d.setSync("log", function(...f) {
188
+ console.log(...f);
189
+ }), d.setSync(BUILDER_SET_STATE_NAME, function(f, S) {
190
+ set(r, f, S), a == null || a(r);
191
+ }), c.forEach(([f, S]) => {
192
+ const y = typeof S == "object" ? new ivm.Reference(
193
193
  // workaround: methods with default values for arguments is not being cloned over
194
- S === "builder" ? {
195
- ...f,
196
- getUserAttributes: () => f.getUserAttributes()
197
- } : f
194
+ f === "builder" ? {
195
+ ...S,
196
+ getUserAttributes: () => S.getUserAttributes()
197
+ } : S
198
198
  ) : null;
199
- d.setSync(getSyncValName(S), p);
199
+ d.setSync(getSyncValName(f), y);
200
200
  }), d.setSync(INJECTED_IVM_GLOBAL, ivm);
201
201
  const g = processCode({
202
202
  code: e,
203
- args: l
203
+ args: c
204
204
  }), x = s.evalSync(g);
205
205
  try {
206
206
  return JSON.parse(x);
@@ -221,7 +221,7 @@ function evaluate({
221
221
  logger.warn("Skipping evaluation of empty code block.");
222
222
  return;
223
223
  }
224
- const c = {
224
+ const l = {
225
225
  code: parseCode(e, {
226
226
  isExpression: r
227
227
  }),
@@ -233,9 +233,9 @@ function evaluate({
233
233
  localState: n
234
234
  };
235
235
  try {
236
- return chooseBrowserOrServerEval(c);
237
- } catch (l) {
238
- logger.error("Failed code evaluation: " + l.message, {
236
+ return chooseBrowserOrServerEval(l);
237
+ } catch (c) {
238
+ logger.error("Failed code evaluation: " + c.message, {
239
239
  code: e
240
240
  });
241
241
  return;
@@ -262,15 +262,15 @@ const evaluateBindings = ({
262
262
  ...a.actions
263
263
  }
264
264
  };
265
- for (const c in e.bindings) {
266
- const l = e.bindings[c], s = evaluate({
267
- code: l,
265
+ for (const l in e.bindings) {
266
+ const c = e.bindings[l], s = evaluate({
267
+ code: c,
268
268
  localState: n,
269
269
  rootState: i,
270
270
  rootSetState: o,
271
271
  context: t
272
272
  });
273
- set(r, c, s);
273
+ set(r, l, s);
274
274
  }
275
275
  return r;
276
276
  };
@@ -333,14 +333,14 @@ const EMPTY_HTML_ELEMENTS = ["area", "base", "br", "col", "embed", "hr", "img",
333
333
  if (!Array.isArray(o))
334
334
  return;
335
335
  const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
336
- return o.map((l, s) => ({
336
+ return o.map((c, s) => ({
337
337
  context: {
338
338
  ...t,
339
339
  localState: {
340
340
  ...t.localState,
341
341
  $index: s,
342
- $item: l,
343
- [r]: l,
342
+ $item: c,
343
+ [r]: c,
344
344
  [`$${r}Index`]: s
345
345
  }
346
346
  },
@@ -420,7 +420,7 @@ function BlockStyles(e) {
420
420
  return checkIsDefined(i.hide) ? !i.hide : checkIsDefined(i.show) ? i.show : !0;
421
421
  }
422
422
  function n() {
423
- var f;
423
+ var S;
424
424
  const i = getProcessedBlock({
425
425
  block: e.block,
426
426
  localState: e.context.localState,
@@ -429,21 +429,21 @@ function BlockStyles(e) {
429
429
  context: e.context.context,
430
430
  shouldEvaluateBindings: !0
431
431
  }), o = i.responsiveStyles, a = e.context.content, r = getSizesForBreakpoints(
432
- ((f = a == null ? void 0 : a.meta) == null ? void 0 : f.breakpoints) || {}
433
- ), c = o == null ? void 0 : o.large, l = o == null ? void 0 : o.medium, s = o == null ? void 0 : o.small, d = i.id;
432
+ ((S = a == null ? void 0 : a.meta) == null ? void 0 : S.breakpoints) || {}
433
+ ), l = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, s = o == null ? void 0 : o.small, d = i.id;
434
434
  if (!d)
435
435
  return "";
436
- const g = c ? createCssClass({
436
+ const g = l ? createCssClass({
437
437
  className: d,
438
- styles: c
439
- }) : "", x = l ? createCssClass({
438
+ styles: l
439
+ }) : "", x = c ? createCssClass({
440
440
  className: d,
441
- styles: l,
441
+ styles: c,
442
442
  mediaQuery: getMaxWidthQueryForSize(
443
443
  "medium",
444
444
  r
445
445
  )
446
- }) : "", S = s ? createCssClass({
446
+ }) : "", f = s ? createCssClass({
447
447
  className: d,
448
448
  styles: s,
449
449
  mediaQuery: getMaxWidthQueryForSize(
@@ -451,7 +451,7 @@ function BlockStyles(e) {
451
451
  r
452
452
  )
453
453
  }) : "";
454
- return [g, x, S].join(" ");
454
+ return [g, x, f].join(" ");
455
455
  }
456
456
  return /* @__PURE__ */ jsx(Fragment, { children: n() && t() ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: n() }) }) : null });
457
457
  }
@@ -602,7 +602,7 @@ const getWrapperProps = ({
602
602
  isInteractive: a,
603
603
  contextValue: r
604
604
  }) => {
605
- const c = {
605
+ const l = {
606
606
  ...e,
607
607
  /**
608
608
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
@@ -621,14 +621,14 @@ const getWrapperProps = ({
621
621
  context: n,
622
622
  wrapperProps: e,
623
623
  includeBlockProps: o
624
- } : c;
624
+ } : l;
625
625
  };
626
626
  function ComponentRef(e) {
627
- var i, o;
627
+ var i;
628
628
  const [t, n] = useState(
629
629
  () => e.isInteractive ? InteractiveElement : e.componentRef
630
630
  );
631
- return /* @__PURE__ */ jsx(Fragment, { children: e.componentRef ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
631
+ return /* @__PURE__ */ jsx(Fragment, { children: e.componentRef ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
632
632
  t,
633
633
  {
634
634
  ...getWrapperProps({
@@ -640,25 +640,15 @@ function ComponentRef(e) {
640
640
  isInteractive: e.isInteractive,
641
641
  contextValue: e.context
642
642
  }),
643
- children: [
644
- (i = e.blockChildren) == null ? void 0 : i.map((a) => /* @__PURE__ */ jsx(
645
- Block,
646
- {
647
- block: a,
648
- context: e.context,
649
- registeredComponents: e.registeredComponents
650
- },
651
- "block-" + a.id
652
- )),
653
- (o = e.blockChildren) == null ? void 0 : o.map((a) => /* @__PURE__ */ jsx(
654
- BlockStyles,
655
- {
656
- block: a,
657
- context: e.context
658
- },
659
- "block-style-" + a.id
660
- ))
661
- ]
643
+ children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ jsx(
644
+ Block,
645
+ {
646
+ block: o,
647
+ context: e.context,
648
+ registeredComponents: e.registeredComponents
649
+ },
650
+ o.id
651
+ ))
662
652
  }
663
653
  ) }) : null });
664
654
  }
@@ -674,7 +664,7 @@ function RepeatedBlock(e) {
674
664
  ) });
675
665
  }
676
666
  function Block(e) {
677
- var d, g, x, S;
667
+ var d, g, x;
678
668
  function t() {
679
669
  return getComponent({
680
670
  block: e.block,
@@ -703,109 +693,104 @@ function Block(e) {
703
693
  return e.block.tagName || "div";
704
694
  }
705
695
  function a() {
706
- var k, E;
707
- if ((k = e.block.repeat) != null && k.collection)
708
- return !!((E = n == null ? void 0 : n()) != null && E.length);
696
+ var y, I;
697
+ if ((y = e.block.repeat) != null && y.collection)
698
+ return !!((I = n == null ? void 0 : n()) != null && I.length);
709
699
  const f = "hide" in i() ? i().hide : !1;
710
700
  return ("show" in i() ? i().show : !0) && !f;
711
701
  }
712
702
  function r() {
713
- var p, k;
714
- return !((p = t == null ? void 0 : t()) != null && p.component) && !n() ? (k = i().children) != null ? k : [] : [];
703
+ var S, y;
704
+ return !((S = t == null ? void 0 : t()) != null && S.component) && !n() ? (y = i().children) != null ? y : [] : [];
715
705
  }
716
- function c() {
717
- var f, p, k, E, C, y;
706
+ function l() {
707
+ var f, S, y, I, E, v;
718
708
  return {
719
709
  blockChildren: (f = i().children) != null ? f : [],
720
- componentRef: (p = t == null ? void 0 : t()) == null ? void 0 : p.component,
710
+ componentRef: (S = t == null ? void 0 : t()) == null ? void 0 : S.component,
721
711
  componentOptions: {
722
712
  ...getBlockComponentOptions(i()),
723
713
  builderContext: e.context,
724
- ...((k = t == null ? void 0 : t()) == null ? void 0 : k.name) === "Symbol" || ((E = t == null ? void 0 : t()) == null ? void 0 : E.name) === "Columns" ? {
714
+ ...((y = t == null ? void 0 : t()) == null ? void 0 : y.name) === "Symbol" || ((I = t == null ? void 0 : t()) == null ? void 0 : I.name) === "Columns" ? {
725
715
  builderComponents: e.registeredComponents
726
716
  } : {}
727
717
  },
728
- context: l,
718
+ context: c,
729
719
  registeredComponents: e.registeredComponents,
730
720
  builderBlock: i(),
731
- includeBlockProps: ((C = t == null ? void 0 : t()) == null ? void 0 : C.noWrap) === !0,
732
- isInteractive: !((y = t == null ? void 0 : t()) != null && y.isRSC)
721
+ includeBlockProps: ((E = t == null ? void 0 : t()) == null ? void 0 : E.noWrap) === !0,
722
+ isInteractive: !((v = t == null ? void 0 : t()) != null && v.isRSC)
733
723
  };
734
724
  }
735
- const [l, s] = useState(() => e.context);
736
- return /* @__PURE__ */ jsx(Fragment, { children: a() ? /* @__PURE__ */ jsx(Fragment, { children: (d = t == null ? void 0 : t()) != null && d.noWrap ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
737
- ComponentRef,
738
- {
739
- componentRef: c().componentRef,
740
- componentOptions: c().componentOptions,
741
- blockChildren: c().blockChildren,
742
- context: c().context,
743
- registeredComponents: c().registeredComponents,
744
- builderBlock: c().builderBlock,
745
- includeBlockProps: c().includeBlockProps,
746
- isInteractive: c().isInteractive
747
- }
748
- ) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
749
- isEmptyHtmlElement(o()) ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
750
- BlockWrapper,
725
+ const [c, s] = useState(() => e.context);
726
+ return /* @__PURE__ */ jsx(Fragment, { children: a() ? /* @__PURE__ */ jsxs(Fragment, { children: [
727
+ /* @__PURE__ */ jsx(BlockStyles, { block: e.block, context: e.context }),
728
+ (d = t == null ? void 0 : t()) != null && d.noWrap ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
729
+ ComponentRef,
751
730
  {
752
- Wrapper: o(),
753
- block: i(),
754
- context: e.context,
755
- hasChildren: !1
731
+ componentRef: l().componentRef,
732
+ componentOptions: l().componentOptions,
733
+ blockChildren: l().blockChildren,
734
+ context: l().context,
735
+ registeredComponents: l().registeredComponents,
736
+ builderBlock: l().builderBlock,
737
+ includeBlockProps: l().includeBlockProps,
738
+ isInteractive: l().isInteractive
756
739
  }
757
- ) }) : null,
758
- !isEmptyHtmlElement(o()) && n() ? /* @__PURE__ */ jsx(Fragment, { children: (g = n()) == null ? void 0 : g.map((f, p) => /* @__PURE__ */ jsx(
759
- RepeatedBlock,
760
- {
761
- repeatContext: f.context,
762
- block: f.block,
763
- registeredComponents: e.registeredComponents
764
- },
765
- p
766
- )) }) : null,
767
- !isEmptyHtmlElement(o()) && !n() ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
768
- BlockWrapper,
769
- {
770
- Wrapper: o(),
771
- block: i(),
772
- context: e.context,
773
- hasChildren: !0,
774
- children: [
775
- /* @__PURE__ */ jsx(
776
- ComponentRef,
777
- {
778
- componentRef: c().componentRef,
779
- componentOptions: c().componentOptions,
780
- blockChildren: c().blockChildren,
781
- context: c().context,
782
- registeredComponents: c().registeredComponents,
783
- builderBlock: c().builderBlock,
784
- includeBlockProps: c().includeBlockProps,
785
- isInteractive: c().isInteractive
786
- }
787
- ),
788
- (x = r()) == null ? void 0 : x.map((f) => /* @__PURE__ */ jsx(
789
- Block,
790
- {
791
- block: f,
792
- context: l,
793
- registeredComponents: e.registeredComponents
794
- },
795
- "block-" + f.id
796
- )),
797
- (S = r()) == null ? void 0 : S.map((f) => /* @__PURE__ */ jsx(
798
- BlockStyles,
799
- {
800
- block: f,
801
- context: l
802
- },
803
- "block-style-" + f.id
804
- ))
805
- ]
806
- }
807
- ) }) : null
808
- ] }) }) : null });
740
+ ) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
741
+ isEmptyHtmlElement(o()) ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
742
+ BlockWrapper,
743
+ {
744
+ Wrapper: o(),
745
+ block: i(),
746
+ context: e.context,
747
+ hasChildren: !1
748
+ }
749
+ ) }) : null,
750
+ !isEmptyHtmlElement(o()) && n() ? /* @__PURE__ */ jsx(Fragment, { children: (g = n()) == null ? void 0 : g.map((f, S) => /* @__PURE__ */ jsx(
751
+ RepeatedBlock,
752
+ {
753
+ repeatContext: f.context,
754
+ block: f.block,
755
+ registeredComponents: e.registeredComponents
756
+ },
757
+ S
758
+ )) }) : null,
759
+ !isEmptyHtmlElement(o()) && !n() ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
760
+ BlockWrapper,
761
+ {
762
+ Wrapper: o(),
763
+ block: i(),
764
+ context: e.context,
765
+ hasChildren: !0,
766
+ children: [
767
+ /* @__PURE__ */ jsx(
768
+ ComponentRef,
769
+ {
770
+ componentRef: l().componentRef,
771
+ componentOptions: l().componentOptions,
772
+ blockChildren: l().blockChildren,
773
+ context: l().context,
774
+ registeredComponents: l().registeredComponents,
775
+ builderBlock: l().builderBlock,
776
+ includeBlockProps: l().includeBlockProps,
777
+ isInteractive: l().isInteractive
778
+ }
779
+ ),
780
+ (x = r()) == null ? void 0 : x.map((f) => /* @__PURE__ */ jsx(
781
+ Block,
782
+ {
783
+ block: f,
784
+ context: c,
785
+ registeredComponents: e.registeredComponents
786
+ },
787
+ f.id
788
+ ))
789
+ ]
790
+ }
791
+ ) }) : null
792
+ ] })
793
+ ] }) : null });
809
794
  }
810
795
  function BlocksWrapper(e) {
811
796
  function t() {
@@ -861,9 +846,9 @@ function BlocksWrapper(e) {
861
846
  ] });
862
847
  }
863
848
  function Blocks(e) {
864
- var i, o, a, r;
849
+ var i, o, a;
865
850
  const t = useContext(builderContext), n = useContext(ComponentsContext);
866
- return /* @__PURE__ */ jsxs(
851
+ return /* @__PURE__ */ jsx(
867
852
  BlocksWrapper,
868
853
  {
869
854
  blocks: e.blocks,
@@ -872,25 +857,15 @@ function Blocks(e) {
872
857
  styleProp: e.styleProp,
873
858
  BlocksWrapper: (i = e.context) == null ? void 0 : i.BlocksWrapper,
874
859
  BlocksWrapperProps: (o = e.context) == null ? void 0 : o.BlocksWrapperProps,
875
- children: [
876
- e.blocks ? /* @__PURE__ */ jsx(Fragment, { children: (a = e.blocks) == null ? void 0 : a.map((c) => /* @__PURE__ */ jsx(
877
- Block,
878
- {
879
- block: c,
880
- context: e.context || t,
881
- registeredComponents: e.registeredComponents || n.registeredComponents
882
- },
883
- "render-block-" + c.id
884
- )) }) : null,
885
- e.blocks ? /* @__PURE__ */ jsx(Fragment, { children: (r = e.blocks) == null ? void 0 : r.map((c) => /* @__PURE__ */ jsx(
886
- BlockStyles,
887
- {
888
- block: c,
889
- context: e.context || t
890
- },
891
- "block-style-" + c.id
892
- )) }) : null
893
- ]
860
+ children: e.blocks ? /* @__PURE__ */ jsx(Fragment, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ jsx(
861
+ Block,
862
+ {
863
+ block: r,
864
+ context: e.context || t,
865
+ registeredComponents: e.registeredComponents || n.registeredComponents
866
+ },
867
+ r.id
868
+ )) }) : null
894
869
  }
895
870
  );
896
871
  }
@@ -901,30 +876,30 @@ function Columns(e) {
901
876
  ), [i, o] = useState(() => e.columns || []), [a, r] = useState(
902
877
  () => e.stackColumnsAt || "tablet"
903
878
  );
904
- function c(C) {
905
- var y;
906
- return ((y = i[C]) == null ? void 0 : y.width) || 100 / i.length;
879
+ function l(v) {
880
+ var C;
881
+ return ((C = i[v]) == null ? void 0 : C.width) || 100 / i.length;
907
882
  }
908
- function l(C) {
909
- const y = t * (i.length - 1) / i.length;
910
- return `calc(${c(C)}% - ${y}px)`;
883
+ function c(v) {
884
+ const C = t * (i.length - 1) / i.length;
885
+ return `calc(${l(v)}% - ${C}px)`;
911
886
  }
912
887
  function s({
913
- stackedStyle: C,
914
- desktopStyle: y
888
+ stackedStyle: v,
889
+ desktopStyle: C
915
890
  }) {
916
- return a === "tablet" ? C : y;
891
+ return a === "tablet" ? v : C;
917
892
  }
918
893
  function d({
919
- stackedStyle: C,
920
- desktopStyle: y
894
+ stackedStyle: v,
895
+ desktopStyle: C
921
896
  }) {
922
- return a === "never" ? y : C;
897
+ return a === "never" ? C : v;
923
898
  }
924
899
  const [g, x] = useState(
925
900
  () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
926
901
  );
927
- function S() {
902
+ function f() {
928
903
  return {
929
904
  "--flex-dir": g,
930
905
  "--flex-dir-tablet": s({
@@ -933,8 +908,8 @@ function Columns(e) {
933
908
  })
934
909
  };
935
910
  }
936
- function f(C) {
937
- const y = C === 0 ? 0 : t, T = l(C), w = `${y}px`, R = "100%", j = 0;
911
+ function S(v) {
912
+ const C = v === 0 ? 0 : t, T = c(v), w = `${C}px`, R = "100%", j = 0;
938
913
  return {
939
914
  width: T,
940
915
  ["marginLeft"]: w,
@@ -956,15 +931,15 @@ function Columns(e) {
956
931
  })
957
932
  };
958
933
  }
959
- function p(C) {
934
+ function y(v) {
960
935
  var T, w;
961
936
  return getSizesForBreakpoints(
962
937
  ((w = (T = e.builderContext.content) == null ? void 0 : T.meta) == null ? void 0 : w.breakpoints) || {}
963
- )[C].max;
938
+ )[v].max;
964
939
  }
965
- function k() {
940
+ function I() {
966
941
  return `
967
- @media (max-width: ${p("medium")}px) {
942
+ @media (max-width: ${y("medium")}px) {
968
943
  .${e.builderBlock.id}-breakpoints {
969
944
  flex-direction: var(--flex-dir-tablet);
970
945
  align-items: stretch;
@@ -976,7 +951,7 @@ function Columns(e) {
976
951
  }
977
952
  }
978
953
 
979
- @media (max-width: ${p("small")}px) {
954
+ @media (max-width: ${y("small")}px) {
980
955
  .${e.builderBlock.id}-breakpoints {
981
956
  flex-direction: var(--flex-dir);
982
957
  align-items: stretch;
@@ -993,38 +968,38 @@ function Columns(e) {
993
968
  /* @__PURE__ */ jsxs(
994
969
  "div",
995
970
  {
996
- className: `builder-columns ${e.builderBlock.id}-breakpoints div-53636e90`,
997
- style: S(),
971
+ className: `builder-columns ${e.builderBlock.id}-breakpoints div-3c01d6ec`,
972
+ style: f(),
998
973
  children: [
999
- /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: k() }) }),
1000
- (E = e.columns) == null ? void 0 : E.map((C, y) => /* @__PURE__ */ createElement(
974
+ /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: I() }) }),
975
+ (E = e.columns) == null ? void 0 : E.map((v, C) => /* @__PURE__ */ createElement(
1001
976
  "div",
1002
977
  {
1003
- className: "builder-column div-53636e90-2",
1004
- style: f(y),
1005
- key: y
978
+ className: "builder-column div-3c01d6ec-2",
979
+ style: S(C),
980
+ key: C
1006
981
  },
1007
982
  /* @__PURE__ */ jsx(
1008
983
  Blocks,
1009
984
  {
1010
- path: `component.options.columns.${y}.blocks`,
985
+ path: `component.options.columns.${C}.blocks`,
1011
986
  parent: e.builderBlock.id,
1012
987
  styleProp: {
1013
988
  flexGrow: "1"
1014
989
  },
1015
990
  context: e.builderContext,
1016
991
  registeredComponents: e.builderComponents,
1017
- blocks: C.blocks
992
+ blocks: v.blocks
1018
993
  }
1019
994
  )
1020
995
  ))
1021
996
  ]
1022
997
  }
1023
998
  ),
1024
- /* @__PURE__ */ jsx("style", { children: `.div-53636e90 {
999
+ /* @__PURE__ */ jsx("style", { children: `.div-3c01d6ec {
1025
1000
  display: flex;
1026
1001
  line-height: normal;
1027
- }.div-53636e90-2 {
1002
+ }.div-3c01d6ec-2 {
1028
1003
  display: flex;
1029
1004
  flex-direction: column;
1030
1005
  align-items: stretch;
@@ -1065,7 +1040,7 @@ function getSrcSet(e) {
1065
1040
  return e.match(/cdn\.shopify\.com/) ? t.map((n) => [getShopifyImageUrl(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
1066
1041
  }
1067
1042
  function Image(e) {
1068
- var o, a, r, c;
1043
+ var o, a, r, l;
1069
1044
  function t() {
1070
1045
  var d;
1071
1046
  const s = e.image || e.src;
@@ -1081,18 +1056,18 @@ function Image(e) {
1081
1056
  return getSrcSet(s);
1082
1057
  }
1083
1058
  function n() {
1084
- var l;
1085
- return (l = t == null ? void 0 : t()) != null && l.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
1059
+ var c;
1060
+ return (c = t == null ? void 0 : t()) != null && c.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
1086
1061
  }
1087
1062
  function i() {
1088
- const l = {
1063
+ const c = {
1089
1064
  position: "absolute",
1090
1065
  height: "100%",
1091
1066
  width: "100%",
1092
1067
  left: "0px",
1093
1068
  top: "0px"
1094
1069
  };
1095
- return e.aspectRatio ? l : void 0;
1070
+ return e.aspectRatio ? c : void 0;
1096
1071
  }
1097
1072
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1098
1073
  /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1109,7 +1084,7 @@ function Image(e) {
1109
1084
  objectFit: e.backgroundSize || "cover",
1110
1085
  ...i()
1111
1086
  },
1112
- className: "builder-image" + (e.className ? " " + e.className : "") + " img-dbab4030",
1087
+ className: "builder-image" + (e.className ? " " + e.className : "") + " img-40c70c9b",
1113
1088
  src: e.image,
1114
1089
  srcSet: t(),
1115
1090
  sizes: e.sizes
@@ -1119,23 +1094,23 @@ function Image(e) {
1119
1094
  e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
1120
1095
  "div",
1121
1096
  {
1122
- className: "builder-image-sizer div-dbab4030",
1097
+ className: "builder-image-sizer div-40c70c9b",
1123
1098
  style: {
1124
1099
  paddingTop: e.aspectRatio * 100 + "%"
1125
1100
  }
1126
1101
  }
1127
1102
  ) }) : null,
1128
- (c = (r = e.builderBlock) == null ? void 0 : r.children) != null && c.length && e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: e.children }) : null,
1129
- !e.fitContent && e.children ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: "div-dbab4030-2", children: e.children }) }) : null
1103
+ (l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: e.children }) : null,
1104
+ !e.fitContent && e.children ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: "div-40c70c9b-2", children: e.children }) }) : null
1130
1105
  ] }),
1131
- /* @__PURE__ */ jsx("style", { children: `.img-dbab4030 {
1106
+ /* @__PURE__ */ jsx("style", { children: `.img-40c70c9b {
1132
1107
  opacity: 1;
1133
1108
  transition: opacity 0.2s ease-in-out;
1134
- }.div-dbab4030 {
1109
+ }.div-40c70c9b {
1135
1110
  width: 100%;
1136
1111
  pointer-events: none;
1137
1112
  font-size: 0;
1138
- }.div-dbab4030-2 {
1113
+ }.div-40c70c9b-2 {
1139
1114
  display: flex;
1140
1115
  flex-direction: column;
1141
1116
  align-items: stretch;
@@ -1380,7 +1355,7 @@ const componentInfo$a = {
1380
1355
  });
1381
1356
  }
1382
1357
  const n = e.get("columns");
1383
- Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((c, l) => c + l.get("width"), 0) !== 100) && t();
1358
+ Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((l, c) => l + c.get("width"), 0) !== 100) && t();
1384
1359
  }
1385
1360
  }, {
1386
1361
  name: "space",
@@ -1428,12 +1403,12 @@ const componentInfo$a = {
1428
1403
  function CustomCode(e) {
1429
1404
  const t = useRef(null), [n, i] = useState(() => []), [o, a] = useState(() => []);
1430
1405
  return useEffect(() => {
1431
- var c;
1432
- if (!((c = t.current) != null && c.getElementsByTagName) || typeof window == "undefined")
1406
+ var l;
1407
+ if (!((l = t.current) != null && l.getElementsByTagName) || typeof window == "undefined")
1433
1408
  return;
1434
1409
  const r = t.current.getElementsByTagName("script");
1435
- for (let l = 0; l < r.length; l++) {
1436
- const s = r[l];
1410
+ for (let c = 0; c < r.length; c++) {
1411
+ const s = r[c];
1437
1412
  if (s.src) {
1438
1413
  if (n.includes(s.src))
1439
1414
  continue;
@@ -1490,8 +1465,8 @@ const componentInfo$7 = {
1490
1465
  }]
1491
1466
  }, SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"], isJsScript = (e) => SCRIPT_MIME_TYPES.includes(e.type);
1492
1467
  function Embed(e) {
1493
- const t = useRef(null), [n, i] = useState(() => []), [o, a] = useState(() => []), [r, c] = useState(() => !1);
1494
- function l() {
1468
+ const t = useRef(null), [n, i] = useState(() => []), [o, a] = useState(() => []), [r, l] = useState(() => !1);
1469
+ function c() {
1495
1470
  if (!t.current || !t.current.getElementsByTagName)
1496
1471
  return;
1497
1472
  const s = t.current.getElementsByTagName("script");
@@ -1510,7 +1485,7 @@ function Embed(e) {
1510
1485
  }
1511
1486
  }
1512
1487
  return useEffect(() => {
1513
- t.current && !r && (c(!0), l());
1488
+ t.current && !r && (l(!0), c());
1514
1489
  }, [t.current, r]), /* @__PURE__ */ jsx(
1515
1490
  "div",
1516
1491
  {
@@ -1546,17 +1521,17 @@ const componentInfo$6 = {
1546
1521
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1547
1522
  onChange: (e) => {
1548
1523
  e.delete("srcset"), e.delete("noWebp");
1549
- function n(r, c = 6e4) {
1550
- return new Promise((l, s) => {
1524
+ function n(r, l = 6e4) {
1525
+ return new Promise((c, s) => {
1551
1526
  const d = document.createElement("img");
1552
1527
  let g = !1;
1553
1528
  d.onload = () => {
1554
- g = !0, l(d);
1529
+ g = !0, c(d);
1555
1530
  }, d.addEventListener("error", (x) => {
1556
1531
  console.warn("Image load failed", x.error), s(x.error);
1557
1532
  }), d.src = r, setTimeout(() => {
1558
1533
  g || s(new Error("Image load timed out"));
1559
- }, c);
1534
+ }, l);
1560
1535
  });
1561
1536
  }
1562
1537
  function i(r) {
@@ -1567,8 +1542,8 @@ const componentInfo$6 = {
1567
1542
  r.type.includes("svg") && e.set("noWebp", !0);
1568
1543
  }), o && (!a || a === 0.7041))
1569
1544
  return n(o).then((r) => {
1570
- const c = e.get("aspectRatio");
1571
- e.get("image") === o && (!c || c === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1545
+ const l = e.get("aspectRatio");
1546
+ e.get("image") === o && (!l || l === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1572
1547
  });
1573
1548
  }
1574
1549
  }, {
@@ -1843,7 +1818,7 @@ const componentInfo = {
1843
1818
  }]
1844
1819
  };
1845
1820
  function Video(e) {
1846
- var i, o, a, r, c, l, s;
1821
+ var i, o, a, r, l, c, s;
1847
1822
  function t() {
1848
1823
  return {
1849
1824
  ...e.autoPlay === !0 ? {
@@ -1911,7 +1886,7 @@ function Video(e) {
1911
1886
  }
1912
1887
  }
1913
1888
  ) }) : null,
1914
- (c = (r = e.builderBlock) == null ? void 0 : r.children) != null && c.length && e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
1889
+ (l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
1915
1890
  "div",
1916
1891
  {
1917
1892
  style: {
@@ -1922,7 +1897,7 @@ function Video(e) {
1922
1897
  children: e.children
1923
1898
  }
1924
1899
  ) }) : null,
1925
- (s = (l = e.builderBlock) == null ? void 0 : l.children) != null && s.length && !e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
1900
+ (s = (c = e.builderBlock) == null ? void 0 : c.children) != null && s.length && !e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
1926
1901
  "div",
1927
1902
  {
1928
1903
  style: {
@@ -2136,7 +2111,7 @@ const findParentElement = (e, t, n = !0) => {
2136
2111
  builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
2137
2112
  }
2138
2113
  };
2139
- }, SDK_VERSION = "0.11.2", registerInsertMenu = () => {
2114
+ }, SDK_VERSION = "0.11.4", registerInsertMenu = () => {
2140
2115
  register("insertMenu", {
2141
2116
  name: "_default",
2142
2117
  default: !0,
@@ -2185,25 +2160,25 @@ const setupBrowserForEditing = (e = {}) => {
2185
2160
  if (i != null && i.type)
2186
2161
  switch (i.type) {
2187
2162
  case "builder.evaluate": {
2188
- const r = i.data.text, c = i.data.arguments || [], l = i.data.id, s = new Function(r);
2163
+ const r = i.data.text, l = i.data.arguments || [], c = i.data.id, s = new Function(r);
2189
2164
  let d, g = null;
2190
2165
  try {
2191
- d = s.apply(null, c);
2166
+ d = s.apply(null, l);
2192
2167
  } catch (x) {
2193
2168
  g = x;
2194
2169
  }
2195
2170
  g ? (o = window.parent) == null || o.postMessage({
2196
2171
  type: "builder.evaluateError",
2197
2172
  data: {
2198
- id: l,
2173
+ id: c,
2199
2174
  error: g.message
2200
2175
  }
2201
2176
  }, "*") : d && typeof d.then == "function" ? d.then((x) => {
2202
- var S;
2203
- (S = window.parent) == null || S.postMessage({
2177
+ var f;
2178
+ (f = window.parent) == null || f.postMessage({
2204
2179
  type: "builder.evaluateResult",
2205
2180
  data: {
2206
- id: l,
2181
+ id: c,
2207
2182
  result: x
2208
2183
  }
2209
2184
  }, "*");
@@ -2211,7 +2186,7 @@ const setupBrowserForEditing = (e = {}) => {
2211
2186
  type: "builder.evaluateResult",
2212
2187
  data: {
2213
2188
  result: d,
2214
- id: l
2189
+ id: c
2215
2190
  }
2216
2191
  }, "*");
2217
2192
  break;
@@ -2220,10 +2195,22 @@ const setupBrowserForEditing = (e = {}) => {
2220
2195
  })));
2221
2196
  };
2222
2197
  function EnableEditor(e) {
2223
- var R, j, P, A, F, _, V;
2198
+ var j, P, A, F, _, V, W;
2224
2199
  const t = useRef(null), [n, i] = useState(() => 0);
2200
+ useState(() => !0);
2225
2201
  function o(u) {
2226
- var h, b, v, I, B;
2202
+ var h, b;
2203
+ const m = {
2204
+ ...e.builderContextSignal.rootState,
2205
+ ...u
2206
+ };
2207
+ e.builderContextSignal.rootSetState ? (b = (h = e.builderContextSignal).rootSetState) == null || b.call(h, m) : e.setBuilderContextSignal((p) => ({
2208
+ ...p,
2209
+ rootState: m
2210
+ }));
2211
+ }
2212
+ function a(u) {
2213
+ var h, b, p, k, B;
2227
2214
  const m = {
2228
2215
  ...e.builderContextSignal.content,
2229
2216
  ...u,
@@ -2234,44 +2221,44 @@ function EnableEditor(e) {
2234
2221
  meta: {
2235
2222
  ...(b = e.builderContextSignal.content) == null ? void 0 : b.meta,
2236
2223
  ...u == null ? void 0 : u.meta,
2237
- breakpoints: ((v = u == null ? void 0 : u.meta) == null ? void 0 : v.breakpoints) || ((B = (I = e.builderContextSignal.content) == null ? void 0 : I.meta) == null ? void 0 : B.breakpoints)
2224
+ breakpoints: ((p = u == null ? void 0 : u.meta) == null ? void 0 : p.breakpoints) || ((B = (k = e.builderContextSignal.content) == null ? void 0 : k.meta) == null ? void 0 : B.breakpoints)
2238
2225
  }
2239
2226
  };
2240
- e.setBuilderContextSignal((W) => ({
2241
- ...W,
2227
+ e.setBuilderContextSignal(($) => ({
2228
+ ...$,
2242
2229
  content: m
2243
2230
  }));
2244
2231
  }
2245
2232
  useState(() => 0);
2246
- const [a, r] = useState(
2233
+ const [r, l] = useState(
2247
2234
  () => !1
2248
- ), [c, l] = useState(
2235
+ ), [c, s] = useState(
2249
2236
  () => e.contentWrapper || "div"
2250
2237
  );
2251
- function s(u) {
2238
+ function d(u) {
2252
2239
  var h;
2253
2240
  const { data: m } = u;
2254
2241
  if (m)
2255
2242
  switch (m.type) {
2256
2243
  case "builder.configureSdk": {
2257
- const b = m.data, { breakpoints: v, contentId: I } = b;
2258
- if (!I || I !== ((h = e.builderContextSignal.content) == null ? void 0 : h.id))
2244
+ const b = m.data, { breakpoints: p, contentId: k } = b;
2245
+ if (!k || k !== ((h = e.builderContextSignal.content) == null ? void 0 : h.id))
2259
2246
  return;
2260
- v && o({
2247
+ p && a({
2261
2248
  meta: {
2262
- breakpoints: v
2249
+ breakpoints: p
2263
2250
  }
2264
2251
  }), i(n + 1);
2265
2252
  break;
2266
2253
  }
2267
2254
  case "builder.contentUpdate": {
2268
- const b = m.data, v = b.key || b.alias || b.entry || b.modelName, I = b.data;
2269
- v === e.model && (o(I), i(n + 1));
2255
+ const b = m.data, p = b.key || b.alias || b.entry || b.modelName, k = b.data;
2256
+ p === e.model && (a(k), i(n + 1));
2270
2257
  break;
2271
2258
  }
2272
2259
  }
2273
2260
  }
2274
- function d() {
2261
+ function g() {
2275
2262
  var m, h;
2276
2263
  const u = (h = (m = e.builderContextSignal.content) == null ? void 0 : m.data) == null ? void 0 : h.jsCode;
2277
2264
  u && evaluate({
@@ -2282,24 +2269,24 @@ function EnableEditor(e) {
2282
2269
  rootSetState: e.builderContextSignal.rootSetState
2283
2270
  });
2284
2271
  }
2285
- const [g, x] = useState(() => ({})), [S, f] = useState(() => !1);
2286
- function p(u) {
2272
+ const [x, f] = useState(() => ({})), [S, y] = useState(() => !1);
2273
+ function I(u) {
2287
2274
  var m, h;
2288
2275
  if (e.builderContextSignal.content) {
2289
- const b = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, v = (h = e.builderContextSignal.content) == null ? void 0 : h.id;
2276
+ const b = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, p = (h = e.builderContextSignal.content) == null ? void 0 : h.id;
2290
2277
  _track({
2291
2278
  type: "click",
2292
2279
  canTrack: getDefaultCanTrack(e.canTrack),
2293
- contentId: v,
2280
+ contentId: p,
2294
2281
  apiKey: e.apiKey,
2295
- variationId: b !== v ? b : void 0,
2282
+ variationId: b !== p ? b : void 0,
2296
2283
  ...getInteractionPropertiesForEvent(u),
2297
2284
  unique: !S
2298
2285
  });
2299
2286
  }
2300
- S || f(!0);
2287
+ S || y(!0);
2301
2288
  }
2302
- function k(u) {
2289
+ function E(u) {
2303
2290
  return u.replace(
2304
2291
  /{{([^}]+)}}/g,
2305
2292
  (m, h) => evaluate({
@@ -2311,14 +2298,14 @@ function EnableEditor(e) {
2311
2298
  })
2312
2299
  );
2313
2300
  }
2314
- function E({ url: u, key: m }) {
2301
+ function v({ url: u, key: m }) {
2315
2302
  fetch$1(u).then((h) => h.json()).then((h) => {
2316
- var v, I;
2303
+ var p, k;
2317
2304
  const b = {
2318
2305
  ...e.builderContextSignal.rootState,
2319
2306
  [m]: h
2320
2307
  };
2321
- (I = (v = e.builderContextSignal).rootSetState) == null || I.call(v, b), g[m] = !0;
2308
+ (k = (p = e.builderContextSignal).rootSetState) == null || k.call(p, b), x[m] = !0;
2322
2309
  }).catch((h) => {
2323
2310
  console.error("error fetching dynamic data", u, h);
2324
2311
  });
@@ -2326,17 +2313,17 @@ function EnableEditor(e) {
2326
2313
  function C() {
2327
2314
  var m, h, b;
2328
2315
  const u = (b = (h = (m = e.builderContextSignal.content) == null ? void 0 : m.data) == null ? void 0 : h.httpRequests) != null ? b : {};
2329
- Object.entries(u).forEach(([v, I]) => {
2330
- if (I && (!g[v] || isEditing())) {
2331
- const B = k(I);
2332
- E({
2316
+ Object.entries(u).forEach(([p, k]) => {
2317
+ if (k && (!x[p] || isEditing())) {
2318
+ const B = E(k);
2319
+ v({
2333
2320
  url: B,
2334
- key: v
2321
+ key: p
2335
2322
  });
2336
2323
  }
2337
2324
  });
2338
2325
  }
2339
- function y() {
2326
+ function T() {
2340
2327
  isEditing() && window.dispatchEvent(
2341
2328
  new CustomEvent(
2342
2329
  "builder:component:stateChange",
@@ -2351,8 +2338,8 @@ function EnableEditor(e) {
2351
2338
  )
2352
2339
  );
2353
2340
  }
2354
- function T(u) {
2355
- i(n + 1), window.addEventListener("message", s), registerInsertMenu(), setupBrowserForEditing({
2341
+ function w(u) {
2342
+ i(n + 1), window.addEventListener("message", d), registerInsertMenu(), setupBrowserForEditing({
2356
2343
  ...e.locale ? {
2357
2344
  locale: e.locale
2358
2345
  } : {},
@@ -2370,56 +2357,56 @@ function EnableEditor(e) {
2370
2357
  (b = window.parent) == null || b.postMessage(h, "*");
2371
2358
  }), window.addEventListener(
2372
2359
  "builder:component:stateChangeListenerActivated",
2373
- y
2360
+ T
2374
2361
  );
2375
2362
  }
2376
- function w(u) {
2363
+ function R(u) {
2377
2364
  const m = new URL(location.href).searchParams, h = m.get("builder.preview"), b = m.get(
2378
2365
  `builder.preview.${h}`
2379
- ), v = m.get("apiKey") || m.get("builder.space");
2380
- h === e.model && v === e.apiKey && (!e.content || b === e.content.id) && fetchOneEntry({
2366
+ ), p = m.get("apiKey") || m.get("builder.space");
2367
+ h === e.model && p === e.apiKey && (!e.content || b === e.content.id) && fetchOneEntry({
2381
2368
  model: e.model,
2382
2369
  apiKey: e.apiKey,
2383
2370
  apiVersion: e.builderContextSignal.apiVersion
2384
- }).then((I) => {
2385
- I && o(I);
2371
+ }).then((k) => {
2372
+ k && a(k);
2386
2373
  });
2387
2374
  }
2388
2375
  return useEffect(() => {
2389
2376
  var u;
2390
2377
  return (u = t.current) == null || u.addEventListener(
2391
2378
  "initeditingbldr",
2392
- T
2379
+ w
2393
2380
  ), () => {
2394
2381
  var m;
2395
2382
  return (m = t.current) == null ? void 0 : m.removeEventListener(
2396
2383
  "initeditingbldr",
2397
- T
2384
+ w
2398
2385
  );
2399
2386
  };
2400
2387
  }, []), useEffect(() => {
2401
2388
  var u;
2402
2389
  return (u = t.current) == null || u.addEventListener(
2403
2390
  "initpreviewingbldr",
2404
- w
2391
+ R
2405
2392
  ), () => {
2406
2393
  var m;
2407
2394
  return (m = t.current) == null ? void 0 : m.removeEventListener(
2408
2395
  "initpreviewingbldr",
2409
- w
2396
+ R
2410
2397
  );
2411
2398
  };
2412
2399
  }, []), useEffect(() => {
2413
2400
  var u, m;
2414
2401
  if (isBrowser()) {
2415
2402
  if (isEditing() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && getDefaultCanTrack(e.canTrack)) {
2416
- const b = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, v = (m = e.builderContextSignal.content) == null ? void 0 : m.id, I = e.apiKey;
2403
+ const b = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, p = (m = e.builderContextSignal.content) == null ? void 0 : m.id, k = e.apiKey;
2417
2404
  _track({
2418
2405
  type: "impression",
2419
2406
  canTrack: !0,
2420
- contentId: v,
2421
- apiKey: I,
2422
- variationId: b !== v ? b : void 0
2407
+ contentId: p,
2408
+ apiKey: k,
2409
+ variationId: b !== p ? b : void 0
2423
2410
  });
2424
2411
  }
2425
2412
  isPreviewing() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
@@ -2427,38 +2414,44 @@ function EnableEditor(e) {
2427
2414
  }, []), useEffect(() => {
2428
2415
  e.apiKey || logger.error(
2429
2416
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2430
- ), d(), C(), y();
2417
+ ), g(), C(), T();
2431
2418
  }, []), useEffect(() => {
2432
- e.content && o(e.content);
2419
+ e.content && a(e.content);
2433
2420
  }, [e.content]), useEffect(() => {
2434
- }, [a]), useEffect(() => {
2435
- d();
2421
+ }, [r]), useEffect(() => {
2422
+ g();
2436
2423
  }, [
2437
- (j = (R = e.builderContextSignal.content) == null ? void 0 : R.data) == null ? void 0 : j.jsCode,
2424
+ (P = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : P.jsCode,
2438
2425
  e.builderContextSignal.rootState
2439
2426
  ]), useEffect(() => {
2440
2427
  C();
2441
- }, [(A = (P = e.builderContextSignal.content) == null ? void 0 : P.data) == null ? void 0 : A.httpRequests]), useEffect(() => {
2442
- y();
2443
- }, [e.builderContextSignal.rootState]), useEffect(() => () => {
2444
- isBrowser() && (window.removeEventListener("message", s), window.removeEventListener(
2428
+ }, [(F = (A = e.builderContextSignal.content) == null ? void 0 : A.data) == null ? void 0 : F.httpRequests]), useEffect(() => {
2429
+ T();
2430
+ }, [e.builderContextSignal.rootState]), useEffect(() => {
2431
+ e.data && o(e.data);
2432
+ }, [e.data]), useEffect(() => {
2433
+ e.locale && o({
2434
+ locale: e.locale
2435
+ });
2436
+ }, [e.locale]), useEffect(() => () => {
2437
+ isBrowser() && (window.removeEventListener("message", d), window.removeEventListener(
2445
2438
  "builder:component:stateChangeListenerActivated",
2446
- y
2439
+ T
2447
2440
  ));
2448
2441
  }, []), /* @__PURE__ */ jsx(builderContext.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ createElement(
2449
2442
  c,
2450
2443
  {
2451
2444
  key: n,
2452
2445
  ref: t,
2453
- onClick: (u) => p(u),
2454
- "builder-content-id": (F = e.builderContextSignal.content) == null ? void 0 : F.id,
2446
+ onClick: (u) => I(u),
2447
+ "builder-content-id": (_ = e.builderContextSignal.content) == null ? void 0 : _.id,
2455
2448
  "builder-model": e.model,
2456
2449
  ...e.showContent ? {} : {
2457
2450
  hidden: !0,
2458
2451
  "aria-hidden": !0
2459
2452
  },
2460
2453
  ...e.contentWrapperProps,
2461
- className: `variant-${((_ = e.content) == null ? void 0 : _.testVariationId) || ((V = e.content) == null ? void 0 : V.id)}`
2454
+ className: `variant-${((V = e.content) == null ? void 0 : V.testVariationId) || ((W = e.content) == null ? void 0 : W.id)}`
2462
2455
  },
2463
2456
  e.children
2464
2457
  ) }) : null });
@@ -2475,16 +2468,16 @@ font-display: fallback;
2475
2468
  font-weight: 400;
2476
2469
  }
2477
2470
  `.trim()), e.files)
2478
- for (const c in e.files) {
2479
- if (!(String(Number(c)) === c))
2471
+ for (const l in e.files) {
2472
+ if (!(String(Number(l)) === l))
2480
2473
  continue;
2481
- const s = e.files[c];
2474
+ const s = e.files[l];
2482
2475
  s && s !== i && (o += `
2483
2476
  @font-face {
2484
2477
  font-family: "${t}";
2485
2478
  src: url('${s}') format('woff2');
2486
2479
  font-display: fallback;
2487
- font-weight: ${c};
2480
+ font-weight: ${l};
2488
2481
  }
2489
2482
  `.trim());
2490
2483
  }
@@ -2525,15 +2518,15 @@ ${getFontCss({
2525
2518
  );
2526
2519
  return /* @__PURE__ */ jsx(InlinedStyles, { styles: t });
2527
2520
  }
2528
- const getContextStateInitialValue = ({
2521
+ const getRootStateInitialValue = ({
2529
2522
  content: e,
2530
2523
  data: t,
2531
2524
  locale: n
2532
2525
  }) => {
2533
- var a, r, c;
2526
+ var a, r, l;
2534
2527
  const i = {}, o = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
2535
- return (c = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || c.forEach((l) => {
2536
- l.name && l.defaultValue !== void 0 && (i[l.name] = l.defaultValue);
2528
+ return (l = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || l.forEach((c) => {
2529
+ c.name && c.defaultValue !== void 0 && (i[c.name] = c.defaultValue);
2537
2530
  }), {
2538
2531
  ...i,
2539
2532
  ...o,
@@ -2554,22 +2547,22 @@ const getContextStateInitialValue = ({
2554
2547
  meta: e == null ? void 0 : e.meta
2555
2548
  } : void 0;
2556
2549
  function ContentComponent(e) {
2557
- var l, s, d, g, x, S, f;
2550
+ var c, s, d, g, x, f, S;
2558
2551
  const [t, n] = useState(
2559
2552
  () => {
2560
- var p, k;
2553
+ var y, I;
2561
2554
  return getUpdateVariantVisibilityScript({
2562
2555
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2563
- variationId: (p = e.content) == null ? void 0 : p.testVariationId,
2556
+ variationId: (y = e.content) == null ? void 0 : y.testVariationId,
2564
2557
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2565
- contentId: (k = e.content) == null ? void 0 : k.id
2558
+ contentId: (I = e.content) == null ? void 0 : I.id
2566
2559
  });
2567
2560
  }
2568
2561
  );
2569
- function i(p) {
2570
- c((k) => ({
2571
- ...k,
2572
- rootState: p
2562
+ function i(y) {
2563
+ l((I) => ({
2564
+ ...I,
2565
+ rootState: y
2573
2566
  }));
2574
2567
  }
2575
2568
  const [o, a] = useState(
@@ -2583,22 +2576,22 @@ function ContentComponent(e) {
2583
2576
  ...components,
2584
2577
  ...e.customComponents || []
2585
2578
  ].reduce(
2586
- (p, { component: k, ...E }) => ({
2587
- ...p,
2579
+ (y, { component: I, ...E }) => ({
2580
+ ...y,
2588
2581
  [E.name]: {
2589
- component: k,
2582
+ component: I,
2590
2583
  ...serializeComponentInfo(E)
2591
2584
  }
2592
2585
  }),
2593
2586
  {}
2594
2587
  )
2595
- ), [r, c] = useState(() => ({
2588
+ ), [r, l] = useState(() => ({
2596
2589
  content: getContentInitialValue({
2597
2590
  content: e.content,
2598
2591
  data: e.data
2599
2592
  }),
2600
2593
  localState: void 0,
2601
- rootState: getContextStateInitialValue({
2594
+ rootState: getRootStateInitialValue({
2602
2595
  content: e.content,
2603
2596
  data: e.data,
2604
2597
  locale: e.locale
@@ -2617,8 +2610,8 @@ function ContentComponent(e) {
2617
2610
  ...components,
2618
2611
  ...e.customComponents || []
2619
2612
  ].reduce(
2620
- (p, { component: k, ...E }) => ({
2621
- ...p,
2613
+ (y, { component: I, ...E }) => ({
2614
+ ...y,
2622
2615
  [E.name]: serializeComponentInfo(E)
2623
2616
  }),
2624
2617
  {}
@@ -2637,6 +2630,7 @@ function ContentComponent(e) {
2637
2630
  EnableEditor,
2638
2631
  {
2639
2632
  content: e.content,
2633
+ data: e.data,
2640
2634
  model: e.model,
2641
2635
  context: e.context,
2642
2636
  apiKey: e.apiKey,
@@ -2648,13 +2642,13 @@ function ContentComponent(e) {
2648
2642
  builderContextSignal: r,
2649
2643
  contentWrapper: e.contentWrapper,
2650
2644
  contentWrapperProps: e.contentWrapperProps,
2651
- setBuilderContextSignal: c,
2645
+ setBuilderContextSignal: l,
2652
2646
  children: [
2653
2647
  e.isSsrAbTest ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedScript, { scriptStr: t }) }) : null,
2654
2648
  /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
2655
2649
  ContentStyles,
2656
2650
  {
2657
- contentId: (l = r.content) == null ? void 0 : l.id,
2651
+ contentId: (c = r.content) == null ? void 0 : c.id,
2658
2652
  cssCode: (d = (s = r.content) == null ? void 0 : s.data) == null ? void 0 : d.cssCode,
2659
2653
  customFonts: (x = (g = r.content) == null ? void 0 : g.data) == null ? void 0 : x.customFonts
2660
2654
  }
@@ -2662,7 +2656,7 @@ function ContentComponent(e) {
2662
2656
  /* @__PURE__ */ jsx(
2663
2657
  Blocks,
2664
2658
  {
2665
- blocks: (f = (S = r.content) == null ? void 0 : S.data) == null ? void 0 : f.blocks,
2659
+ blocks: (S = (f = r.content) == null ? void 0 : f.data) == null ? void 0 : S.blocks,
2666
2660
  context: r,
2667
2661
  registeredComponents: o
2668
2662
  }
@@ -2674,7 +2668,7 @@ function ContentComponent(e) {
2674
2668
  );
2675
2669
  }
2676
2670
  function ContentVariants(e) {
2677
- var r, c;
2671
+ var r, l;
2678
2672
  const [t, n] = useState(
2679
2673
  () => checkShouldRenderVariants({
2680
2674
  canTrack: getDefaultCanTrack(e.canTrack),
@@ -2682,23 +2676,23 @@ function ContentVariants(e) {
2682
2676
  })
2683
2677
  );
2684
2678
  function i() {
2685
- var l;
2679
+ var c;
2686
2680
  return getUpdateCookieAndStylesScript(
2687
2681
  getVariants(e.content).map((s) => ({
2688
2682
  id: s.testVariationId,
2689
2683
  testRatio: s.testRatio
2690
2684
  })),
2691
- ((l = e.content) == null ? void 0 : l.id) || ""
2685
+ ((c = e.content) == null ? void 0 : c.id) || ""
2692
2686
  );
2693
2687
  }
2694
2688
  function o() {
2695
- return getVariants(e.content).map((l) => `.variant-${l.testVariationId} { display: none; } `).join("");
2689
+ return getVariants(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
2696
2690
  }
2697
2691
  function a() {
2698
- var l;
2692
+ var c;
2699
2693
  return t ? {
2700
2694
  ...e.content,
2701
- testVariationId: (l = e.content) == null ? void 0 : l.id
2695
+ testVariationId: (c = e.content) == null ? void 0 : c.id
2702
2696
  } : handleABTestingSync({
2703
2697
  item: e.content,
2704
2698
  canTrack: getDefaultCanTrack(e.canTrack)
@@ -2716,10 +2710,10 @@ function ContentVariants(e) {
2716
2710
  }
2717
2711
  ),
2718
2712
  /* @__PURE__ */ jsx(InlinedScript, { scriptStr: i() }),
2719
- (c = getVariants(e.content)) == null ? void 0 : c.map((l) => /* @__PURE__ */ jsx(
2713
+ (l = getVariants(e.content)) == null ? void 0 : l.map((c) => /* @__PURE__ */ jsx(
2720
2714
  ContentComponent,
2721
2715
  {
2722
- content: l,
2716
+ content: c,
2723
2717
  showContent: !1,
2724
2718
  model: e.model,
2725
2719
  data: e.data,
@@ -2737,7 +2731,7 @@ function ContentVariants(e) {
2737
2731
  contentWrapper: e.contentWrapper,
2738
2732
  contentWrapperProps: e.contentWrapperProps
2739
2733
  },
2740
- l.testVariationId
2734
+ c.testVariationId
2741
2735
  ))
2742
2736
  ] }) : null,
2743
2737
  /* @__PURE__ */ jsx(
@@ -2784,26 +2778,26 @@ const fetchSymbolContent = async ({
2784
2778
  });
2785
2779
  };
2786
2780
  function Symbol$1(e) {
2787
- var a, r, c;
2781
+ var a, r, l;
2788
2782
  function t() {
2789
- var l, s;
2783
+ var c, s;
2790
2784
  return [
2791
2785
  e.attributes.className,
2792
2786
  "builder-symbol",
2793
- (l = e.symbol) != null && l.inline ? "builder-inline-symbol" : void 0,
2787
+ (c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
2794
2788
  (s = e.symbol) != null && s.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2795
2789
  ].filter(Boolean).join(" ");
2796
2790
  }
2797
2791
  const [n, i] = useState(() => {
2798
- var l;
2799
- return (l = e.symbol) == null ? void 0 : l.content;
2792
+ var c;
2793
+ return (c = e.symbol) == null ? void 0 : c.content;
2800
2794
  });
2801
2795
  function o() {
2802
2796
  n || fetchSymbolContent({
2803
2797
  symbol: e.symbol,
2804
2798
  builderContextValue: e.builderContext
2805
- }).then((l) => {
2806
- l && i(l);
2799
+ }).then((c) => {
2800
+ c && i(c);
2807
2801
  });
2808
2802
  }
2809
2803
  return useEffect(() => {
@@ -2822,7 +2816,7 @@ function Symbol$1(e) {
2822
2816
  ...e.builderContext.localState,
2823
2817
  ...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
2824
2818
  },
2825
- model: (c = e.symbol) == null ? void 0 : c.model,
2819
+ model: (l = e.symbol) == null ? void 0 : l.model,
2826
2820
  content: n
2827
2821
  }
2828
2822
  ) });
@@ -2841,17 +2835,17 @@ export {
2841
2835
  Symbol$1 as Symbol,
2842
2836
  Text,
2843
2837
  Video,
2844
- U as _processContentResult,
2838
+ H as _processContentResult,
2845
2839
  createRegisterComponentMessage,
2846
- H as fetchBuilderProps,
2847
- K as fetchEntries,
2840
+ K as fetchBuilderProps,
2841
+ z as fetchEntries,
2848
2842
  fetchOneEntry,
2849
- z as getAllContent,
2850
- q as getBuilderSearchParams,
2851
- Y as getContent,
2843
+ q as getAllContent,
2844
+ Y as getBuilderSearchParams,
2845
+ G as getContent,
2852
2846
  isEditing,
2853
2847
  isPreviewing,
2854
2848
  register,
2855
- G as setEditorSettings,
2856
- J as track
2849
+ J as setEditorSettings,
2850
+ Q as track
2857
2851
  };