@builder.io/sdk-react 1.0.16 → 1.0.19

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 (55) hide show
  1. package/lib/browser/blocks-exports.cjs +22 -22
  2. package/lib/browser/blocks-exports.mjs +498 -506
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +22 -21
  5. package/lib/browser/{server-entry-11e01841.cjs → server-entry-1a86f409.cjs} +1 -1
  6. package/lib/browser/{server-entry-afeff3cb.js → server-entry-cfff49d1.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/{blocks-8e5cc463.js → blocks-1ea14427.js} +179 -192
  10. package/lib/edge/{blocks-a0a9d452.cjs → blocks-5341123d.cjs} +9 -9
  11. package/lib/edge/blocks-exports.cjs +1 -1
  12. package/lib/edge/blocks-exports.mjs +27 -13
  13. package/lib/edge/{button-66c46316.cjs → button-c6255c8e.cjs} +1 -1
  14. package/lib/edge/{button-764707c4.js → button-f5764a4c.js} +2 -2
  15. package/lib/edge/{columns-0a14db0e.cjs → columns-01e0bb50.cjs} +1 -1
  16. package/lib/edge/{columns-0bdc7586.js → columns-17090869.js} +24 -23
  17. package/lib/edge/content-variants-3961c4ee.cjs +134 -0
  18. package/lib/edge/{content-variants-db1e0281.js → content-variants-bfca78f9.js} +230 -239
  19. package/lib/edge/dynamic-blocks-exports.cjs +2 -0
  20. package/lib/edge/dynamic-blocks-exports.mjs +4 -1
  21. package/lib/edge/{form-7a6f998f.js → form-39e97f30.js} +6 -5
  22. package/lib/edge/form-b97fba27.cjs +1 -0
  23. package/lib/edge/{get-class-prop-name-49cbb2c6.js → get-class-prop-name-859a7f60.js} +1 -1
  24. package/lib/edge/{get-class-prop-name-bbc4d2f3.cjs → get-class-prop-name-f1301669.cjs} +1 -1
  25. package/lib/edge/{img-058cb6f0.cjs → img-0c1e53c0.cjs} +1 -1
  26. package/lib/edge/{img-c9630f56.js → img-b4ff1bef.js} +1 -1
  27. package/lib/edge/index.cjs +1 -1
  28. package/lib/edge/index.mjs +22 -21
  29. package/lib/edge/{input-ceacd029.cjs → input-2103da14.cjs} +1 -1
  30. package/lib/edge/{input-3de90790.js → input-c6fee09c.js} +1 -1
  31. package/lib/edge/{select-df72f987.cjs → select-b8ad0a4c.cjs} +1 -1
  32. package/lib/edge/{select-ee266e60.js → select-f260d051.js} +1 -1
  33. package/lib/edge/{server-entry-ef266884.cjs → server-entry-00891f33.cjs} +1 -1
  34. package/lib/edge/{server-entry-2b1068fd.js → server-entry-d46a218d.js} +1 -1
  35. package/lib/edge/server-entry.cjs +1 -1
  36. package/lib/edge/server-entry.mjs +1 -1
  37. package/lib/edge/slot-8de7d746.cjs +1 -0
  38. package/lib/edge/{slot-f246e67e.js → slot-c9f94715.js} +6 -5
  39. package/lib/edge/{symbol-f68a7357.js → symbol-324dadc8.js} +2 -2
  40. package/lib/edge/{symbol-991f09b3.cjs → symbol-636383eb.cjs} +1 -1
  41. package/lib/node/blocks-exports.cjs +10 -10
  42. package/lib/node/blocks-exports.mjs +241 -249
  43. package/lib/node/index.cjs +1 -1
  44. package/lib/node/index.mjs +22 -21
  45. package/lib/node/{server-entry-a221fe66.js → server-entry-8c84ddbd.js} +1 -1
  46. package/lib/node/{server-entry-4ba58cf3.cjs → server-entry-ff6fc2b4.cjs} +1 -1
  47. package/lib/node/server-entry.cjs +1 -1
  48. package/lib/node/server-entry.mjs +1 -1
  49. package/package.json +1 -1
  50. package/types/constants/sdk-version.d.ts +1 -1
  51. package/types/context/index.d.ts +1 -0
  52. package/types/index-helpers/blocks-exports.d.ts +4 -0
  53. package/lib/edge/content-variants-c03ec7a1.cjs +0 -134
  54. package/lib/edge/form-a5d18c89.cjs +0 -1
  55. package/lib/edge/slot-83d735d6.cjs +0 -1
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- var V = Object.defineProperty;
3
- var N = (e, t, n) => t in e ? V(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
- var F = (e, t, n) => (N(e, typeof t != "symbol" ? t + "" : t, n), n);
2
+ var N = Object.defineProperty;
3
+ var $ = (e, t, n) => t in e ? N(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
+ var F = (e, t, n) => ($(e, typeof t != "symbol" ? t + "" : t, n), n);
5
5
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
6
- import { TARGET, isEditing, isBrowser, getUserAttributes, fastClone, checkIsDefined, logger, registerInsertMenu, setupBrowserForEditing, createRegisterComponentMessage, getDefaultCanTrack, _track, isPreviewing, fetchOneEntry, createEditorListener, fetch as fetch$1, serializeComponentInfo, handleABTestingSync } from "./server-entry-a221fe66.js";
6
+ import { TARGET, isEditing, isBrowser, getUserAttributes, fastClone, checkIsDefined, logger, registerInsertMenu, setupBrowserForEditing, createRegisterComponentMessage, getDefaultCanTrack, _track, isPreviewing, fetchOneEntry, createEditorListener, fetch as fetch$1, serializeComponentInfo, handleABTestingSync } from "./server-entry-8c84ddbd.js";
7
7
  import { createContext, useState, useEffect, useContext, useRef, createElement } from "react";
8
8
  const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), isEmptyElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.has(e.toLowerCase());
9
9
  function DynamicRenderer(e) {
@@ -213,29 +213,29 @@ output;
213
213
  context: n,
214
214
  event: i,
215
215
  state: c
216
- }), d = getIsolateContext(), m = d.global;
216
+ }), u = getIsolateContext(), m = u.global;
217
217
  m.setSync("global", m.derefInto()), m.setSync("log", function(...y) {
218
218
  console.log(...y);
219
- }), m.setSync(BUILDER_SET_STATE_NAME, function(y, S) {
220
- set(r, y, S), a == null || a(r);
221
- }), l.forEach(([y, S]) => {
222
- const k = typeof S == "object" ? new s.Reference(
219
+ }), m.setSync(BUILDER_SET_STATE_NAME, function(y, p) {
220
+ set(r, y, p), a == null || a(r);
221
+ }), l.forEach(([y, p]) => {
222
+ const k = typeof p == "object" ? new s.Reference(
223
223
  // workaround: methods with default values for arguments is not being cloned over
224
224
  y === "builder" ? {
225
- ...S,
226
- getUserAttributes: () => S.getUserAttributes()
227
- } : S
225
+ ...p,
226
+ getUserAttributes: () => p.getUserAttributes()
227
+ } : p
228
228
  ) : null;
229
229
  m.setSync(getSyncValName(y), k);
230
230
  }), m.setSync(INJECTED_IVM_GLOBAL, s);
231
231
  const g = processCode({
232
232
  code: e,
233
233
  args: l
234
- }), b = d.evalSync(g);
234
+ }), h = u.evalSync(g);
235
235
  try {
236
- return JSON.parse(b);
236
+ return JSON.parse(h);
237
237
  } catch {
238
- return b;
238
+ return h;
239
239
  }
240
240
  };
241
241
  function isNodeRuntime() {
@@ -248,7 +248,7 @@ const shouldForceBrowserRuntimeInNode = () => {
248
248
  return !1;
249
249
  const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
250
250
  return e && t && !n ? (logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
251
- }, chooseBrowserOrServerEval = (e) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(e) : runInNode(e), R = class R {
251
+ }, chooseBrowserOrServerEval = (e) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(e) : runInNode(e), P = class P {
252
252
  static getCacheKey(t) {
253
253
  return JSON.stringify({
254
254
  ...t,
@@ -258,16 +258,16 @@ const shouldForceBrowserRuntimeInNode = () => {
258
258
  });
259
259
  }
260
260
  static getCachedValue(t) {
261
- return R.cache.get(t);
261
+ return P.cache.get(t);
262
262
  }
263
263
  static setCachedValue(t, n) {
264
- R.cache.size > 20 && R.cache.delete(R.cache.keys().next().value), R.cache.set(t, {
264
+ P.cache.size > 20 && P.cache.delete(P.cache.keys().next().value), P.cache.set(t, {
265
265
  value: n
266
266
  });
267
267
  }
268
268
  };
269
- F(R, "cacheLimit", 20), F(R, "cache", /* @__PURE__ */ new Map());
270
- let EvalCache = R;
269
+ F(P, "cacheLimit", 20), F(P, "cache", /* @__PURE__ */ new Map());
270
+ let EvalCache = P;
271
271
  function evaluate({
272
272
  code: e,
273
273
  context: t,
@@ -294,15 +294,15 @@ function evaluate({
294
294
  localState: n
295
295
  };
296
296
  if (s) {
297
- const l = EvalCache.getCacheKey(c), d = EvalCache.getCachedValue(l);
298
- if (d)
299
- return d.value;
297
+ const l = EvalCache.getCacheKey(c), u = EvalCache.getCachedValue(l);
298
+ if (u)
299
+ return u.value;
300
300
  }
301
301
  try {
302
302
  const l = chooseBrowserOrServerEval(c);
303
303
  if (s) {
304
- const d = EvalCache.getCacheKey(c);
305
- EvalCache.setCachedValue(d, l);
304
+ const u = EvalCache.getCacheKey(c);
305
+ EvalCache.setCachedValue(u, l);
306
306
  }
307
307
  return l;
308
308
  } catch (l) {
@@ -371,8 +371,8 @@ function throttle(e, t, n = {}) {
371
371
  return function() {
372
372
  const l = Date.now();
373
373
  !s && n.leading === !1 && (s = l);
374
- const d = t - (l - s);
375
- return i = this, o = arguments, d <= 0 || d > t ? (r && (clearTimeout(r), r = null), s = l, a = e.apply(i, o), r || (i = o = null)) : !r && n.trailing !== !1 && (r = setTimeout(c, d)), a;
374
+ const u = t - (l - s);
375
+ return i = this, o = arguments, u <= 0 || u > t ? (r && (clearTimeout(r), r = null), s = l, a = e.apply(i, o), r || (i = o = null)) : !r && n.trailing !== !1 && (r = setTimeout(c, u)), a;
376
376
  };
377
377
  }
378
378
  function assign(e, ...t) {
@@ -469,8 +469,8 @@ function bindScrollInViewAnimation(e) {
469
469
  const r = throttle(a, 200, {
470
470
  leading: !1
471
471
  });
472
- function s(d) {
473
- const m = d.getBoundingClientRect(), g = window.innerHeight, y = (e.thresholdPercent || 0) / 100 * g;
472
+ function s(u) {
473
+ const m = u.getBoundingClientRect(), g = window.innerHeight, y = (e.thresholdPercent || 0) / 100 * g;
474
474
  return m.bottom > y && m.top < g - y;
475
475
  }
476
476
  const c = e.steps[0].styles;
@@ -658,28 +658,28 @@ function BlockStyles(e) {
658
658
  shouldEvaluateBindings: !0
659
659
  }), o = i.responsiveStyles, a = e.context.content, r = getSizesForBreakpoints(
660
660
  ((y = a == null ? void 0 : a.meta) == null ? void 0 : y.breakpoints) || {}
661
- ), s = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, l = o == null ? void 0 : o.small, d = i.id;
662
- if (!d)
661
+ ), s = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, l = o == null ? void 0 : o.small, u = i.id;
662
+ if (!u)
663
663
  return "";
664
664
  const m = s ? createCssClass({
665
- className: d,
665
+ className: u,
666
666
  styles: s
667
667
  }) : "", g = c ? createCssClass({
668
- className: d,
668
+ className: u,
669
669
  styles: c,
670
670
  mediaQuery: getMaxWidthQueryForSize(
671
671
  "medium",
672
672
  r
673
673
  )
674
- }) : "", b = l ? createCssClass({
675
- className: d,
674
+ }) : "", h = l ? createCssClass({
675
+ className: u,
676
676
  styles: l,
677
677
  mediaQuery: getMaxWidthQueryForSize(
678
678
  "small",
679
679
  r
680
680
  )
681
681
  }) : "";
682
- return [m, g, b].join(" ");
682
+ return [m, g, h].join(" ");
683
683
  }
684
684
  return /* @__PURE__ */ jsx(Fragment, { children: n() && t() ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { id: "builderio-block", styles: n() }) }) : null });
685
685
  }
@@ -863,7 +863,7 @@ function RepeatedBlock(e) {
863
863
  ) });
864
864
  }
865
865
  function Block(e) {
866
- var c, l, d;
866
+ var c, l, u;
867
867
  function t() {
868
868
  return getComponent({
869
869
  block: e.block,
@@ -893,28 +893,28 @@ function Block(e) {
893
893
  return e.block.tagName === "a" || ((g = i().properties) == null ? void 0 : g.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
894
894
  }
895
895
  function a() {
896
- var b, y;
897
- if ((b = e.block.repeat) != null && b.collection)
896
+ var h, y;
897
+ if ((h = e.block.repeat) != null && h.collection)
898
898
  return !!((y = n == null ? void 0 : n()) != null && y.length);
899
899
  const m = "hide" in i() ? i().hide : !1;
900
900
  return ("show" in i() ? i().show : !0) && !m;
901
901
  }
902
902
  function r() {
903
- var g, b;
904
- return !((g = t == null ? void 0 : t()) != null && g.component) && !n() ? (b = i().children) != null ? b : [] : [];
903
+ var g, h;
904
+ return !((g = t == null ? void 0 : t()) != null && g.component) && !n() ? (h = i().children) != null ? h : [] : [];
905
905
  }
906
906
  function s() {
907
- var m, g, b, y, S, k, T, x, C, E, I;
907
+ var m, g, h, y, p, k, T, S, C, E, I;
908
908
  return {
909
909
  blockChildren: (m = i().children) != null ? m : [],
910
910
  componentRef: (g = t == null ? void 0 : t()) == null ? void 0 : g.component,
911
911
  componentOptions: {
912
912
  ...getBlockComponentOptions(i()),
913
913
  builderContext: e.context,
914
- ...((b = t == null ? void 0 : t()) == null ? void 0 : b.name) === "Core:Button" || ((y = t == null ? void 0 : t()) == null ? void 0 : y.name) === "Symbol" || ((S = t == null ? void 0 : t()) == null ? void 0 : S.name) === "Columns" || ((k = t == null ? void 0 : t()) == null ? void 0 : k.name) === "Form:Form" ? {
914
+ ...((h = t == null ? void 0 : t()) == null ? void 0 : h.name) === "Core:Button" || ((y = t == null ? void 0 : t()) == null ? void 0 : y.name) === "Symbol" || ((p = t == null ? void 0 : t()) == null ? void 0 : p.name) === "Columns" || ((k = t == null ? void 0 : t()) == null ? void 0 : k.name) === "Form:Form" ? {
915
915
  builderLinkComponent: e.linkComponent
916
916
  } : {},
917
- ...((T = t == null ? void 0 : t()) == null ? void 0 : T.name) === "Symbol" || ((x = t == null ? void 0 : t()) == null ? void 0 : x.name) === "Columns" || ((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Form:Form" ? {
917
+ ...((T = t == null ? void 0 : t()) == null ? void 0 : T.name) === "Symbol" || ((S = t == null ? void 0 : t()) == null ? void 0 : S.name) === "Columns" || ((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Form:Form" ? {
918
918
  builderComponents: e.registeredComponents
919
919
  } : {}
920
920
  },
@@ -929,8 +929,8 @@ function Block(e) {
929
929
  return useEffect(() => {
930
930
  const m = i().id, g = i().animations;
931
931
  g && m && bindAnimations(
932
- g.filter((b) => b.trigger !== "hover").map((b) => ({
933
- ...b,
932
+ g.filter((h) => h.trigger !== "hover").map((h) => ({
933
+ ...h,
934
934
  elementId: m
935
935
  }))
936
936
  );
@@ -949,7 +949,7 @@ function Block(e) {
949
949
  includeBlockProps: s().includeBlockProps,
950
950
  isInteractive: s().isInteractive
951
951
  }
952
- ) }) : /* @__PURE__ */ jsx(Fragment, { children: n() ? /* @__PURE__ */ jsx(Fragment, { children: (d = n()) == null ? void 0 : d.map((m, g) => /* @__PURE__ */ jsx(
952
+ ) }) : /* @__PURE__ */ jsx(Fragment, { children: n() ? /* @__PURE__ */ jsx(Fragment, { children: (u = n()) == null ? void 0 : u.map((m, g) => /* @__PURE__ */ jsx(
953
953
  RepeatedBlock,
954
954
  {
955
955
  repeatContext: m.context,
@@ -1080,30 +1080,30 @@ function Columns(e) {
1080
1080
  ), [i, o] = useState(() => e.columns || []), [a, r] = useState(
1081
1081
  () => e.stackColumnsAt || "tablet"
1082
1082
  );
1083
- function s(x) {
1083
+ function s(S) {
1084
1084
  var C;
1085
- return ((C = i[x]) == null ? void 0 : C.width) || 100 / i.length;
1085
+ return ((C = i[S]) == null ? void 0 : C.width) || 100 / i.length;
1086
1086
  }
1087
- function c(x) {
1087
+ function c(S) {
1088
1088
  const C = t * (i.length - 1) / i.length;
1089
- return `calc(${s(x)}% - ${C}px)`;
1089
+ return `calc(${s(S)}% - ${C}px)`;
1090
1090
  }
1091
1091
  function l({
1092
- stackedStyle: x,
1092
+ stackedStyle: S,
1093
1093
  desktopStyle: C
1094
1094
  }) {
1095
- return a === "tablet" ? x : C;
1095
+ return a === "tablet" ? S : C;
1096
1096
  }
1097
- function d({
1098
- stackedStyle: x,
1097
+ function u({
1098
+ stackedStyle: S,
1099
1099
  desktopStyle: C
1100
1100
  }) {
1101
- return a === "never" ? C : x;
1101
+ return a === "never" ? C : S;
1102
1102
  }
1103
1103
  const [m, g] = useState(
1104
1104
  () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
1105
1105
  );
1106
- function b() {
1106
+ function h() {
1107
1107
  return {
1108
1108
  "--flex-dir": m,
1109
1109
  "--flex-dir-tablet": l({
@@ -1112,8 +1112,8 @@ function Columns(e) {
1112
1112
  })
1113
1113
  };
1114
1114
  }
1115
- function y(x) {
1116
- const C = x === 0 ? 0 : t, E = c(x), I = `${C}px`, P = "100%", B = 0;
1115
+ function y(S) {
1116
+ const C = S === 0 ? 0 : t, E = c(S), I = `${C}px`, B = "100%", j = 0;
1117
1117
  return {
1118
1118
  ...{
1119
1119
  display: "flex",
@@ -1122,33 +1122,33 @@ function Columns(e) {
1122
1122
  },
1123
1123
  width: E,
1124
1124
  ["marginLeft"]: I,
1125
- "--column-width-mobile": d({
1126
- stackedStyle: P,
1125
+ "--column-width-mobile": u({
1126
+ stackedStyle: B,
1127
1127
  desktopStyle: E
1128
1128
  }),
1129
- "--column-margin-left-mobile": d({
1130
- stackedStyle: B,
1129
+ "--column-margin-left-mobile": u({
1130
+ stackedStyle: j,
1131
1131
  desktopStyle: I
1132
1132
  }),
1133
1133
  "--column-width-tablet": l({
1134
- stackedStyle: P,
1134
+ stackedStyle: B,
1135
1135
  desktopStyle: E
1136
1136
  }),
1137
1137
  "--column-margin-left-tablet": l({
1138
- stackedStyle: B,
1138
+ stackedStyle: j,
1139
1139
  desktopStyle: I
1140
1140
  })
1141
1141
  };
1142
1142
  }
1143
- function S(x) {
1143
+ function p(S) {
1144
1144
  var E, I;
1145
1145
  return getSizesForBreakpoints(
1146
1146
  ((I = (E = e.builderContext.content) == null ? void 0 : E.meta) == null ? void 0 : I.breakpoints) || {}
1147
- )[x].max;
1147
+ )[S].max;
1148
1148
  }
1149
1149
  function k() {
1150
1150
  return `
1151
- @media (max-width: ${S("medium")}px) {
1151
+ @media (max-width: ${p("medium")}px) {
1152
1152
  .${e.builderBlock.id}-breakpoints {
1153
1153
  flex-direction: var(--flex-dir-tablet);
1154
1154
  align-items: stretch;
@@ -1160,7 +1160,7 @@ function Columns(e) {
1160
1160
  }
1161
1161
  }
1162
1162
 
1163
- @media (max-width: ${S("small")}px) {
1163
+ @media (max-width: ${p("small")}px) {
1164
1164
  .${e.builderBlock.id}-breakpoints {
1165
1165
  flex-direction: var(--flex-dir);
1166
1166
  align-items: stretch;
@@ -1178,17 +1178,17 @@ function Columns(e) {
1178
1178
  "div",
1179
1179
  {
1180
1180
  className: `builder-columns ${e.builderBlock.id}-breakpoints div-003f4b1c`,
1181
- style: b(),
1181
+ style: h(),
1182
1182
  children: [
1183
1183
  /* @__PURE__ */ jsx(InlinedStyles, { id: "builderio-columns", styles: k() }),
1184
- (T = e.columns) == null ? void 0 : T.map((x, C) => /* @__PURE__ */ jsx(
1184
+ (T = e.columns) == null ? void 0 : T.map((S, C) => /* @__PURE__ */ jsx(
1185
1185
  DynamicRenderer,
1186
1186
  {
1187
- TagName: x.link ? e.builderLinkComponent || "a" : "div",
1187
+ TagName: S.link ? e.builderLinkComponent || "a" : "div",
1188
1188
  actionAttributes: {},
1189
1189
  attributes: {
1190
- ...x.link ? {
1191
- href: x.link
1190
+ ...S.link ? {
1191
+ href: S.link
1192
1192
  } : {},
1193
1193
  [getClassPropName()]: "builder-column",
1194
1194
  style: mapStyleObjToStrIfNeeded(y(C))
@@ -1204,7 +1204,7 @@ function Columns(e) {
1204
1204
  context: e.builderContext,
1205
1205
  registeredComponents: e.builderComponents,
1206
1206
  linkComponent: e.builderLinkComponent,
1207
- blocks: x.blocks
1207
+ blocks: S.blocks
1208
1208
  }
1209
1209
  )
1210
1210
  },
@@ -1255,13 +1255,13 @@ function getSrcSet(e) {
1255
1255
  function Image(e) {
1256
1256
  var o, a, r, s;
1257
1257
  function t() {
1258
- var d;
1258
+ var u;
1259
1259
  const l = e.image || e.src;
1260
1260
  if (!l || // We can auto add srcset for cdn.builder.io and shopify
1261
1261
  // images, otherwise you can supply this prop manually
1262
1262
  !(l.match(/builder\.io/) || l.match(/cdn\.shopify\.com/)))
1263
1263
  return e.srcset;
1264
- if (e.srcset && ((d = e.image) != null && d.includes("builder.io/api/v1/image"))) {
1264
+ if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
1265
1265
  if (!e.srcset.includes(e.image.split("?")[0]))
1266
1266
  return console.debug("Removed given srcset"), getSrcSet(l);
1267
1267
  } else if (e.image && !e.srcset)
@@ -1618,13 +1618,13 @@ const componentInfo$f = {
1618
1618
  e.delete("srcset"), e.delete("noWebp");
1619
1619
  function n(r, s = 6e4) {
1620
1620
  return new Promise((c, l) => {
1621
- const d = document.createElement("img");
1621
+ const u = document.createElement("img");
1622
1622
  let m = !1;
1623
- d.onload = () => {
1624
- m = !0, c(d);
1625
- }, d.addEventListener("error", (g) => {
1623
+ u.onload = () => {
1624
+ m = !0, c(u);
1625
+ }, u.addEventListener("error", (g) => {
1626
1626
  console.warn("Image load failed", g.error), l(g.error);
1627
- }), d.src = r, setTimeout(() => {
1627
+ }), u.src = r, setTimeout(() => {
1628
1628
  m || l(new Error("Image load timed out"));
1629
1629
  }, s);
1630
1630
  });
@@ -1873,8 +1873,8 @@ function CustomCode(e) {
1873
1873
  if (n.includes(l.src))
1874
1874
  continue;
1875
1875
  n.push(l.src);
1876
- const d = document.createElement("script");
1877
- d.async = !0, d.src = l.src, document.head.appendChild(d);
1876
+ const u = document.createElement("script");
1877
+ u.async = !0, u.src = l.src, document.head.appendChild(u);
1878
1878
  } else if (!l.type || [
1879
1879
  "text/javascript",
1880
1880
  "application/javascript",
@@ -1884,8 +1884,8 @@ function CustomCode(e) {
1884
1884
  continue;
1885
1885
  try {
1886
1886
  o.push(l.innerText), new Function(l.innerText)();
1887
- } catch (d) {
1888
- console.warn("`CustomCode`: Error running script:", d);
1887
+ } catch (u) {
1888
+ console.warn("`CustomCode`: Error running script:", u);
1889
1889
  }
1890
1890
  }
1891
1891
  }
@@ -1930,8 +1930,8 @@ function Embed(e) {
1930
1930
  if (!t.current || !t.current.getElementsByTagName)
1931
1931
  return;
1932
1932
  const l = t.current.getElementsByTagName("script");
1933
- for (let d = 0; d < l.length; d++) {
1934
- const m = l[d];
1933
+ for (let u = 0; u < l.length; u++) {
1934
+ const m = l[u];
1935
1935
  if (m.src && !n.includes(m.src)) {
1936
1936
  n.push(m.src);
1937
1937
  const g = document.createElement("script");
@@ -2196,110 +2196,110 @@ const componentInfo$5 = {
2196
2196
  function FormComponent(e) {
2197
2197
  var m, g;
2198
2198
  const t = useRef(null), [n, i] = useState(() => "unsubmitted"), [o, a] = useState(() => null), [r, s] = useState(() => "");
2199
- function c(b) {
2200
- var S, k;
2199
+ function c(h) {
2200
+ var p, k;
2201
2201
  const y = {
2202
2202
  ...e.builderContext.rootState,
2203
- ...b
2203
+ ...h
2204
2204
  };
2205
- e.builderContext.rootSetState ? (k = (S = e.builderContext).rootSetState) == null || k.call(S, y) : e.builderContext.rootState = y;
2205
+ e.builderContext.rootSetState ? (k = (p = e.builderContext).rootSetState) == null || k.call(p, y) : e.builderContext.rootState = y;
2206
2206
  }
2207
2207
  function l() {
2208
2208
  return isEditing() && e.previewState || n;
2209
2209
  }
2210
- function d(b) {
2211
- var S;
2210
+ function u(h) {
2211
+ var p;
2212
2212
  const y = e.sendWithJs || e.sendSubmissionsTo === "email";
2213
2213
  if (e.sendSubmissionsTo === "zapier")
2214
- b.preventDefault();
2214
+ h.preventDefault();
2215
2215
  else if (y) {
2216
2216
  if (!(e.action || e.sendSubmissionsTo === "email")) {
2217
- b.preventDefault();
2217
+ h.preventDefault();
2218
2218
  return;
2219
2219
  }
2220
- b.preventDefault();
2221
- const k = b.currentTarget, T = e.customHeaders || {};
2222
- let x;
2220
+ h.preventDefault();
2221
+ const k = h.currentTarget, T = e.customHeaders || {};
2222
+ let S;
2223
2223
  const C = new FormData(k), E = Array.from(
2224
- b.currentTarget.querySelectorAll("input,select,textarea")
2225
- ).filter((u) => !!u.name).map((u) => {
2224
+ h.currentTarget.querySelectorAll("input,select,textarea")
2225
+ ).filter((d) => !!d.name).map((d) => {
2226
2226
  let f;
2227
- const p = u.name;
2228
- if (u instanceof HTMLInputElement)
2229
- if (u.type === "radio") {
2230
- if (u.checked)
2231
- return f = u.name, {
2232
- key: p,
2227
+ const v = d.name;
2228
+ if (d instanceof HTMLInputElement)
2229
+ if (d.type === "radio") {
2230
+ if (d.checked)
2231
+ return f = d.name, {
2232
+ key: v,
2233
2233
  value: f
2234
2234
  };
2235
- } else if (u.type === "checkbox")
2236
- f = u.checked;
2237
- else if (u.type === "number" || u.type === "range") {
2238
- const h = u.valueAsNumber;
2239
- isNaN(h) || (f = h);
2235
+ } else if (d.type === "checkbox")
2236
+ f = d.checked;
2237
+ else if (d.type === "number" || d.type === "range") {
2238
+ const b = d.valueAsNumber;
2239
+ isNaN(b) || (f = b);
2240
2240
  } else
2241
- u.type === "file" ? f = u.files : f = u.value;
2241
+ d.type === "file" ? f = d.files : f = d.value;
2242
2242
  else
2243
- f = u.value;
2243
+ f = d.value;
2244
2244
  return {
2245
- key: p,
2245
+ key: v,
2246
2246
  value: f
2247
2247
  };
2248
2248
  });
2249
2249
  let I = e.contentType;
2250
- if (e.sendSubmissionsTo === "email" && (I = "multipart/form-data"), Array.from(E).forEach(({ value: u }) => {
2251
- (u instanceof File || Array.isArray(u) && u[0] instanceof File || u instanceof FileList) && (I = "multipart/form-data");
2250
+ if (e.sendSubmissionsTo === "email" && (I = "multipart/form-data"), Array.from(E).forEach(({ value: d }) => {
2251
+ (d instanceof File || Array.isArray(d) && d[0] instanceof File || d instanceof FileList) && (I = "multipart/form-data");
2252
2252
  }), I !== "application/json")
2253
- x = C;
2253
+ S = C;
2254
2254
  else {
2255
- const u = {};
2256
- Array.from(E).forEach(({ value: f, key: p }) => {
2257
- set(u, p, f);
2258
- }), x = JSON.stringify(u);
2255
+ const d = {};
2256
+ Array.from(E).forEach(({ value: f, key: v }) => {
2257
+ set(d, v, f);
2258
+ }), S = JSON.stringify(d);
2259
2259
  }
2260
- I && I !== "multipart/form-data" && (y && ((S = e.action) != null && S.includes("zapier.com")) || (T["content-type"] = I));
2261
- const P = new CustomEvent("presubmit", { detail: { body: x } });
2262
- if (t.current && (t.current.dispatchEvent(P), P.defaultPrevented))
2260
+ I && I !== "multipart/form-data" && (y && ((p = e.action) != null && p.includes("zapier.com")) || (T["content-type"] = I));
2261
+ const B = new CustomEvent("presubmit", { detail: { body: S } });
2262
+ if (t.current && (t.current.dispatchEvent(B), B.defaultPrevented))
2263
2263
  return;
2264
2264
  i("sending");
2265
- const B = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
2265
+ const j = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
2266
2266
  e.sendSubmissionsToEmail || ""
2267
2267
  )}&name=${encodeURIComponent(e.name || "")}`;
2268
2268
  fetch(
2269
- e.sendSubmissionsTo === "email" ? B : e.action,
2270
- { body: x, headers: T, method: e.method || "post" }
2269
+ e.sendSubmissionsTo === "email" ? j : e.action,
2270
+ { body: S, headers: T, method: e.method || "post" }
2271
2271
  ).then(
2272
- async (u) => {
2272
+ async (d) => {
2273
2273
  let f;
2274
- const p = u.headers.get("content-type");
2275
- if (p && p.indexOf("application/json") !== -1 ? f = await u.json() : f = await u.text(), !u.ok && e.errorMessagePath) {
2276
- let h = get(f, e.errorMessagePath);
2277
- h && (typeof h != "string" && (h = JSON.stringify(h)), s(h), c({ formErrorMessage: h }));
2274
+ const v = d.headers.get("content-type");
2275
+ if (v && v.indexOf("application/json") !== -1 ? f = await d.json() : f = await d.text(), !d.ok && e.errorMessagePath) {
2276
+ let b = get(f, e.errorMessagePath);
2277
+ b && (typeof b != "string" && (b = JSON.stringify(b)), s(b), c({ formErrorMessage: b }));
2278
2278
  }
2279
- if (a(f), i(u.ok ? "success" : "error"), u.ok) {
2280
- const h = new CustomEvent("submit:success", {
2281
- detail: { res: u, body: f }
2279
+ if (a(f), i(d.ok ? "success" : "error"), d.ok) {
2280
+ const b = new CustomEvent("submit:success", {
2281
+ detail: { res: d, body: f }
2282
2282
  });
2283
2283
  if (t.current) {
2284
- if (t.current.dispatchEvent(h), h.defaultPrevented)
2284
+ if (t.current.dispatchEvent(b), b.defaultPrevented)
2285
2285
  return;
2286
2286
  e.resetFormOnSubmit !== !1 && t.current.reset();
2287
2287
  }
2288
2288
  if (e.successUrl)
2289
2289
  if (t.current) {
2290
- const v = new CustomEvent("route", {
2290
+ const x = new CustomEvent("route", {
2291
2291
  detail: { url: e.successUrl }
2292
2292
  });
2293
- t.current.dispatchEvent(v), v.defaultPrevented || (location.href = e.successUrl);
2293
+ t.current.dispatchEvent(x), x.defaultPrevented || (location.href = e.successUrl);
2294
2294
  } else
2295
2295
  location.href = e.successUrl;
2296
2296
  }
2297
2297
  },
2298
- (u) => {
2298
+ (d) => {
2299
2299
  const f = new CustomEvent("submit:error", {
2300
- detail: { error: u }
2300
+ detail: { error: d }
2301
2301
  });
2302
- t.current && (t.current.dispatchEvent(f), f.defaultPrevented) || (a(u), i("error"));
2302
+ t.current && (t.current.dispatchEvent(f), f.defaultPrevented) || (a(d), i("error"));
2303
2303
  }
2304
2304
  );
2305
2305
  }
@@ -2314,13 +2314,13 @@ function FormComponent(e) {
2314
2314
  action: !e.sendWithJs && e.action,
2315
2315
  method: e.method,
2316
2316
  name: e.name,
2317
- onSubmit: (b) => d(b),
2317
+ onSubmit: (h) => u(h),
2318
2318
  ...e.attributes,
2319
2319
  children: [
2320
- e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ jsx(Fragment, { children: (g = (m = e.builderBlock) == null ? void 0 : m.children) == null ? void 0 : g.map((b, y) => /* @__PURE__ */ jsx(
2320
+ e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ jsx(Fragment, { children: (g = (m = e.builderBlock) == null ? void 0 : m.children) == null ? void 0 : g.map((h, y) => /* @__PURE__ */ jsx(
2321
2321
  Block,
2322
2322
  {
2323
- block: b,
2323
+ block: h,
2324
2324
  context: e.builderContext,
2325
2325
  registeredComponents: e.builderComponents,
2326
2326
  linkComponent: e.builderLinkComponent
@@ -2936,53 +2936,53 @@ const findParentElement = (e, t, n = !0) => {
2936
2936
  };
2937
2937
  };
2938
2938
  function EnableEditor(e) {
2939
- var T, x, C, E, I, P, B;
2939
+ var T, S, C, E, I, B, j;
2940
2940
  const t = useRef(null);
2941
- function n(u) {
2942
- var p, h;
2941
+ function n(d) {
2942
+ var v, b;
2943
2943
  const f = {
2944
2944
  ...e.builderContextSignal.rootState,
2945
- ...u
2945
+ ...d
2946
2946
  };
2947
- e.builderContextSignal.rootSetState ? (h = (p = e.builderContextSignal).rootSetState) == null || h.call(p, f) : e.setBuilderContextSignal((v) => ({
2948
- ...v,
2947
+ e.builderContextSignal.rootSetState ? (b = (v = e.builderContextSignal).rootSetState) == null || b.call(v, f) : e.setBuilderContextSignal((x) => ({
2948
+ ...x,
2949
2949
  rootState: f
2950
2950
  }));
2951
2951
  }
2952
- function i(u) {
2953
- var p, h, v, w, j;
2952
+ function i(d) {
2953
+ var v, b, x, w, A;
2954
2954
  const f = {
2955
2955
  ...e.builderContextSignal.content,
2956
- ...u,
2956
+ ...d,
2957
2957
  data: {
2958
- ...(p = e.builderContextSignal.content) == null ? void 0 : p.data,
2959
- ...u == null ? void 0 : u.data
2958
+ ...(v = e.builderContextSignal.content) == null ? void 0 : v.data,
2959
+ ...d == null ? void 0 : d.data
2960
2960
  },
2961
2961
  meta: {
2962
- ...(h = e.builderContextSignal.content) == null ? void 0 : h.meta,
2963
- ...u == null ? void 0 : u.meta,
2964
- breakpoints: ((v = u == null ? void 0 : u.meta) == null ? void 0 : v.breakpoints) || ((j = (w = e.builderContextSignal.content) == null ? void 0 : w.meta) == null ? void 0 : j.breakpoints)
2962
+ ...(b = e.builderContextSignal.content) == null ? void 0 : b.meta,
2963
+ ...d == null ? void 0 : d.meta,
2964
+ breakpoints: ((x = d == null ? void 0 : d.meta) == null ? void 0 : x.breakpoints) || ((A = (w = e.builderContextSignal.content) == null ? void 0 : w.meta) == null ? void 0 : A.breakpoints)
2965
2965
  }
2966
2966
  };
2967
- e.setBuilderContextSignal((A) => ({
2968
- ...A,
2967
+ e.setBuilderContextSignal((R) => ({
2968
+ ...R,
2969
2969
  content: f
2970
2970
  }));
2971
2971
  }
2972
2972
  const [o, a] = useState(
2973
2973
  () => e.contentWrapper || "div"
2974
2974
  );
2975
- function r(u) {
2975
+ function r(d) {
2976
2976
  return createEditorListener({
2977
2977
  model: e.model,
2978
2978
  trustedHosts: e.trustedHosts,
2979
2979
  callbacks: {
2980
2980
  configureSdk: (f) => {
2981
- var v;
2982
- const { breakpoints: p, contentId: h } = f;
2983
- !h || h !== ((v = e.builderContextSignal.content) == null ? void 0 : v.id) || p && i({
2981
+ var x;
2982
+ const { breakpoints: v, contentId: b } = f;
2983
+ !b || b !== ((x = e.builderContextSignal.content) == null ? void 0 : x.id) || v && i({
2984
2984
  meta: {
2985
- breakpoints: p
2985
+ breakpoints: v
2986
2986
  }
2987
2987
  });
2988
2988
  },
@@ -2993,13 +2993,13 @@ function EnableEditor(e) {
2993
2993
  i(f);
2994
2994
  }
2995
2995
  }
2996
- })(u);
2996
+ })(d);
2997
2997
  }
2998
2998
  function s() {
2999
- var f, p;
3000
- const u = (p = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : p.jsCode;
3001
- u && evaluate({
3002
- code: u,
2999
+ var f, v;
3000
+ const d = (v = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : v.jsCode;
3001
+ d && evaluate({
3002
+ code: d,
3003
3003
  context: e.context || {},
3004
3004
  localState: void 0,
3005
3005
  rootState: e.builderContextSignal.rootState,
@@ -3010,61 +3010,52 @@ function EnableEditor(e) {
3010
3010
  enableCache: !1
3011
3011
  });
3012
3012
  }
3013
- const [c, l] = useState(() => ({})), [d, m] = useState(() => !1);
3014
- function g(u) {
3015
- var f, p;
3013
+ const [c, l] = useState(() => ({})), [u, m] = useState(() => ({})), [g, h] = useState(() => !1);
3014
+ function y(d) {
3015
+ var f, v;
3016
3016
  if (e.builderContextSignal.content) {
3017
- const h = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, v = (p = e.builderContextSignal.content) == null ? void 0 : p.id;
3017
+ const b = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, x = (v = e.builderContextSignal.content) == null ? void 0 : v.id;
3018
3018
  _track({
3019
3019
  type: "click",
3020
3020
  canTrack: getDefaultCanTrack(e.canTrack),
3021
- contentId: v,
3021
+ contentId: x,
3022
3022
  apiKey: e.apiKey,
3023
- variationId: h !== v ? h : void 0,
3024
- ...getInteractionPropertiesForEvent(u),
3025
- unique: !d
3023
+ variationId: b !== x ? b : void 0,
3024
+ ...getInteractionPropertiesForEvent(d),
3025
+ unique: !g
3026
3026
  });
3027
3027
  }
3028
- d || m(!0);
3029
- }
3030
- function b(u) {
3031
- return u.replace(
3032
- /{{([^}]+)}}/g,
3033
- (f, p) => String(
3034
- evaluate({
3035
- code: p,
3036
- context: e.context || {},
3037
- localState: void 0,
3038
- rootState: e.builderContextSignal.rootState,
3039
- rootSetState: e.builderContextSignal.rootSetState,
3040
- enableCache: !0
3041
- })
3042
- )
3043
- );
3028
+ g || h(!0);
3044
3029
  }
3045
- function y({ url: u, key: f }) {
3046
- fetch$1(u).then((p) => p.json()).then((p) => {
3047
- var v, w;
3048
- const h = {
3049
- ...e.builderContextSignal.rootState,
3050
- [f]: p
3051
- };
3052
- (w = (v = e.builderContextSignal).rootSetState) == null || w.call(v, h), c[f] = !0;
3053
- }).catch((p) => {
3054
- console.error("error fetching dynamic data", u, p);
3055
- });
3056
- }
3057
- function S() {
3058
- var f, p, h;
3059
- const u = (h = (p = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : p.httpRequests) != null ? h : {};
3060
- Object.entries(u).forEach(([v, w]) => {
3061
- if (w && (!c[v] || isEditing())) {
3062
- const j = b(w);
3063
- y({
3064
- url: j,
3065
- key: v
3066
- });
3067
- }
3030
+ function p() {
3031
+ var f, v, b;
3032
+ const d = (b = (v = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : v.httpRequests) != null ? b : {};
3033
+ Object.entries(d).forEach(([x, w]) => {
3034
+ if (!w || u[x] || c[x] && !isEditing())
3035
+ return;
3036
+ u[x] = !0;
3037
+ const A = w.replace(
3038
+ /{{([^}]+)}}/g,
3039
+ (R, V) => String(
3040
+ evaluate({
3041
+ code: V,
3042
+ context: e.context || {},
3043
+ localState: void 0,
3044
+ rootState: e.builderContextSignal.rootState,
3045
+ rootSetState: e.builderContextSignal.rootSetState,
3046
+ enableCache: !0
3047
+ })
3048
+ )
3049
+ );
3050
+ fetch$1(A).then((R) => R.json()).then((R) => {
3051
+ n({
3052
+ [x]: R
3053
+ }), c[x] = !0;
3054
+ }).catch((R) => {
3055
+ console.error("error fetching dynamic data", w, R);
3056
+ }).finally(() => {
3057
+ u[x] = !1;
3058
+ });
3068
3059
  });
3069
3060
  }
3070
3061
  function k() {
@@ -3083,7 +3074,7 @@ function EnableEditor(e) {
3083
3074
  );
3084
3075
  }
3085
3076
  return useEffect(() => {
3086
- var u, f;
3077
+ var d, f;
3087
3078
  if (isBrowser()) {
3088
3079
  if (isEditing() && (window.addEventListener("message", r), registerInsertMenu(), setupBrowserForEditing({
3089
3080
  ...e.locale ? {
@@ -3097,46 +3088,46 @@ function EnableEditor(e) {
3097
3088
  } : {}
3098
3089
  }), Object.values(
3099
3090
  e.builderContextSignal.componentInfos
3100
- ).forEach((h) => {
3091
+ ).forEach((b) => {
3101
3092
  var w;
3102
- const v = createRegisterComponentMessage(h);
3103
- (w = window.parent) == null || w.postMessage(v, "*");
3093
+ const x = createRegisterComponentMessage(b);
3094
+ (w = window.parent) == null || w.postMessage(x, "*");
3104
3095
  }), window.addEventListener(
3105
3096
  "builder:component:stateChangeListenerActivated",
3106
3097
  k
3107
3098
  )), e.builderContextSignal.content && getDefaultCanTrack(e.canTrack)) {
3108
- const h = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, v = (f = e.builderContextSignal.content) == null ? void 0 : f.id, w = e.apiKey;
3099
+ const b = (d = e.builderContextSignal.content) == null ? void 0 : d.testVariationId, x = (f = e.builderContextSignal.content) == null ? void 0 : f.id, w = e.apiKey;
3109
3100
  _track({
3110
3101
  type: "impression",
3111
3102
  canTrack: !0,
3112
- contentId: v,
3103
+ contentId: x,
3113
3104
  apiKey: w,
3114
- variationId: h !== v ? h : void 0
3105
+ variationId: b !== x ? b : void 0
3115
3106
  });
3116
3107
  }
3117
3108
  if (isPreviewing()) {
3118
- const h = new URL(location.href).searchParams, v = h.get("builder.preview"), w = h.get(
3119
- `builder.preview.${v}`
3120
- ), j = h.get("apiKey") || h.get("builder.space");
3121
- v === e.model && j === e.apiKey && (!e.content || w === e.content.id) && fetchOneEntry({
3109
+ const b = new URL(location.href).searchParams, x = b.get("builder.preview"), w = b.get(
3110
+ `builder.preview.${x}`
3111
+ ), A = b.get("apiKey") || b.get("builder.space");
3112
+ x === e.model && A === e.apiKey && (!e.content || w === e.content.id) && fetchOneEntry({
3122
3113
  model: e.model,
3123
3114
  apiKey: e.apiKey,
3124
3115
  apiVersion: e.builderContextSignal.apiVersion
3125
- }).then((A) => {
3126
- A && i(A);
3116
+ }).then((R) => {
3117
+ R && i(R);
3127
3118
  });
3128
3119
  }
3129
3120
  }
3130
3121
  }, []), useEffect(() => {
3131
3122
  e.apiKey || logger.error(
3132
3123
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
3133
- ), s(), S(), k();
3124
+ ), s(), p(), k();
3134
3125
  }, []), useEffect(() => {
3135
3126
  e.content && i(e.content);
3136
3127
  }, [e.content]), useEffect(() => {
3137
3128
  s();
3138
- }, [(x = (T = e.builderContextSignal.content) == null ? void 0 : T.data) == null ? void 0 : x.jsCode]), useEffect(() => {
3139
- S();
3129
+ }, [(S = (T = e.builderContextSignal.content) == null ? void 0 : T.data) == null ? void 0 : S.jsCode]), useEffect(() => {
3130
+ p();
3140
3131
  }, [(E = (C = e.builderContextSignal.content) == null ? void 0 : C.data) == null ? void 0 : E.httpRequests]), useEffect(() => {
3141
3132
  k();
3142
3133
  }, [e.builderContextSignal.rootState]), useEffect(() => {
@@ -3154,7 +3145,7 @@ function EnableEditor(e) {
3154
3145
  o,
3155
3146
  {
3156
3147
  ref: t,
3157
- onClick: (u) => g(u),
3148
+ onClick: (d) => y(d),
3158
3149
  "builder-content-id": (I = e.builderContextSignal.content) == null ? void 0 : I.id,
3159
3150
  "builder-model": e.model,
3160
3151
  ...e.showContent ? {} : {
@@ -3162,7 +3153,7 @@ function EnableEditor(e) {
3162
3153
  "aria-hidden": !0
3163
3154
  },
3164
3155
  ...e.contentWrapperProps,
3165
- className: `variant-${((P = e.content) == null ? void 0 : P.testVariationId) || ((B = e.content) == null ? void 0 : B.id)}`,
3156
+ className: `variant-${((B = e.content) == null ? void 0 : B.testVariationId) || ((j = e.content) == null ? void 0 : j.id)}`,
3166
3157
  children: e.children
3167
3158
  }
3168
3159
  ) : null });
@@ -3263,22 +3254,22 @@ const getRootStateInitialValue = ({
3263
3254
  meta: e == null ? void 0 : e.meta
3264
3255
  } : void 0;
3265
3256
  function ContentComponent(e) {
3266
- var c, l, d, m, g, b, y;
3257
+ var c, l, u, m, g, h, y;
3267
3258
  const [t, n] = useState(
3268
3259
  () => {
3269
- var S, k;
3260
+ var p, k;
3270
3261
  return getUpdateVariantVisibilityScript({
3271
3262
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
3272
- variationId: (S = e.content) == null ? void 0 : S.testVariationId,
3263
+ variationId: (p = e.content) == null ? void 0 : p.testVariationId,
3273
3264
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
3274
3265
  contentId: (k = e.content) == null ? void 0 : k.id
3275
3266
  });
3276
3267
  }
3277
3268
  );
3278
- function i(S) {
3269
+ function i(p) {
3279
3270
  s((k) => ({
3280
3271
  ...k,
3281
- rootState: S
3272
+ rootState: p
3282
3273
  }));
3283
3274
  }
3284
3275
  const [o, a] = useState(
@@ -3286,8 +3277,8 @@ function ContentComponent(e) {
3286
3277
  ...getDefaultRegisteredComponents(),
3287
3278
  ...e.customComponents || []
3288
3279
  ].reduce(
3289
- (S, { component: k, ...T }) => ({
3290
- ...S,
3280
+ (p, { component: k, ...T }) => ({
3281
+ ...p,
3291
3282
  [T.name]: {
3292
3283
  component: k,
3293
3284
  ...serializeComponentInfo(T)
@@ -3314,8 +3305,8 @@ function ContentComponent(e) {
3314
3305
  ...getDefaultRegisteredComponents(),
3315
3306
  ...e.customComponents || []
3316
3307
  ].reduce(
3317
- (S, { component: k, ...T }) => ({
3318
- ...S,
3308
+ (p, { component: k, ...T }) => ({
3309
+ ...p,
3319
3310
  [T.name]: serializeComponentInfo(T)
3320
3311
  }),
3321
3312
  {}
@@ -3361,14 +3352,14 @@ function ContentComponent(e) {
3361
3352
  {
3362
3353
  isNestedRender: e.isNestedRender,
3363
3354
  contentId: (c = r.content) == null ? void 0 : c.id,
3364
- cssCode: (d = (l = r.content) == null ? void 0 : l.data) == null ? void 0 : d.cssCode,
3355
+ cssCode: (u = (l = r.content) == null ? void 0 : l.data) == null ? void 0 : u.cssCode,
3365
3356
  customFonts: (g = (m = r.content) == null ? void 0 : m.data) == null ? void 0 : g.customFonts
3366
3357
  }
3367
3358
  ),
3368
3359
  /* @__PURE__ */ jsx(
3369
3360
  Blocks,
3370
3361
  {
3371
- blocks: (y = (b = r.content) == null ? void 0 : b.data) == null ? void 0 : y.blocks,
3362
+ blocks: (y = (h = r.content) == null ? void 0 : h.data) == null ? void 0 : y.blocks,
3372
3363
  context: r,
3373
3364
  registeredComponents: o,
3374
3365
  linkComponent: e.linkComponent
@@ -3509,12 +3500,12 @@ const fetchSymbolContent = async ({
3509
3500
  function Symbol$1(e) {
3510
3501
  var a, r, s, c;
3511
3502
  function t() {
3512
- var l, d;
3503
+ var l, u;
3513
3504
  return [
3514
3505
  e.attributes[getClassPropName()],
3515
3506
  "builder-symbol",
3516
3507
  (l = e.symbol) != null && l.inline ? "builder-inline-symbol" : void 0,
3517
- (d = e.symbol) != null && d.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
3508
+ (u = e.symbol) != null && u.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
3518
3509
  ].filter(Boolean).join(" ");
3519
3510
  }
3520
3511
  const [n, i] = useState(() => {
@@ -3558,6 +3549,7 @@ function Symbol$1(e) {
3558
3549
  }
3559
3550
  export {
3560
3551
  Blocks,
3552
+ builderContext as BuilderContext,
3561
3553
  Button,
3562
3554
  Columns,
3563
3555
  ContentVariants as Content,