@builder.io/sdk-react 1.0.12 → 1.0.13

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 (53) hide show
  1. package/lib/browser/blocks-exports.cjs +21 -20
  2. package/lib/browser/blocks-exports.mjs +140 -136
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-34e4efb1.js → server-entry-1a840bf8.js} +1 -1
  6. package/lib/browser/{server-entry-60df1736.cjs → server-entry-20402a85.cjs} +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-03ffaaf9.cjs → blocks-ca61b343.cjs} +1 -1
  10. package/lib/edge/blocks-exports.cjs +1 -1
  11. package/lib/edge/blocks-exports.mjs +2 -2
  12. package/lib/edge/{blocks-f8d5d3a0.js → blocks-fd4ab30c.js} +2 -2
  13. package/lib/edge/{button-5543875e.js → button-45681a80.js} +2 -2
  14. package/lib/edge/{button-5137d1bc.cjs → button-6d8b002c.cjs} +1 -1
  15. package/lib/edge/{columns-a05f9fd8.js → columns-61e1043d.js} +3 -3
  16. package/lib/edge/{columns-ad62a5ce.cjs → columns-77e4f17d.cjs} +1 -1
  17. package/lib/edge/{content-variants-74109911.js → content-variants-c085fa7f.js} +58 -54
  18. package/lib/edge/{content-variants-e6ba9024.cjs → content-variants-c86fdb5a.cjs} +11 -10
  19. package/lib/edge/{form-67a4ec0b.js → form-4fae6192.js} +3 -3
  20. package/lib/edge/{form-ee52f842.cjs → form-b996f9f9.cjs} +1 -1
  21. package/lib/edge/{get-class-prop-name-25116ae3.js → get-class-prop-name-0e4b7b88.js} +1 -1
  22. package/lib/edge/{get-class-prop-name-7ab1534a.cjs → get-class-prop-name-14e14eea.cjs} +1 -1
  23. package/lib/edge/{img-43af4666.js → img-1259941e.js} +1 -1
  24. package/lib/edge/{img-147fc69c.cjs → img-c623011b.cjs} +1 -1
  25. package/lib/edge/index.cjs +1 -1
  26. package/lib/edge/index.mjs +1 -1
  27. package/lib/edge/{input-35088f50.js → input-02a1cd9f.js} +1 -1
  28. package/lib/edge/{input-90830684.cjs → input-2c618b06.cjs} +1 -1
  29. package/lib/edge/{select-1e63f097.cjs → select-3acbf5f6.cjs} +1 -1
  30. package/lib/edge/{select-ee16e4ee.js → select-b1b6d0bf.js} +1 -1
  31. package/lib/edge/{server-entry-f2d127da.js → server-entry-3f0061ea.js} +1 -1
  32. package/lib/edge/{server-entry-39e6b4a6.cjs → server-entry-d8f950e0.cjs} +1 -1
  33. package/lib/edge/server-entry.cjs +1 -1
  34. package/lib/edge/server-entry.mjs +1 -1
  35. package/lib/edge/{slot-45a2e0bf.js → slot-3cefe326.js} +3 -3
  36. package/lib/edge/{slot-3db582db.cjs → slot-92eac261.cjs} +1 -1
  37. package/lib/edge/{symbol-c533a54f.cjs → symbol-741f0aee.cjs} +1 -1
  38. package/lib/edge/{symbol-75231166.js → symbol-e2a47b92.js} +3 -3
  39. package/lib/node/blocks-exports.cjs +13 -12
  40. package/lib/node/blocks-exports.mjs +37 -33
  41. package/lib/node/index.cjs +1 -1
  42. package/lib/node/index.mjs +1 -1
  43. package/lib/node/{server-entry-a0cd9606.js → server-entry-383e8da6.js} +1 -1
  44. package/lib/node/{server-entry-81eab45c.cjs → server-entry-6d61d1cf.cjs} +1 -1
  45. package/lib/node/server-entry.cjs +1 -1
  46. package/lib/node/server-entry.mjs +1 -1
  47. package/package.json +1 -1
  48. package/types/components/content/components/enable-editor.d.ts +1 -1
  49. package/types/components/content/components/styles.d.ts +1 -0
  50. package/types/components/content/components/styles.helpers.d.ts +1 -0
  51. package/types/components/content/contentProps.types.d.ts +6 -1
  52. package/types/components/content-variants/content-variants.d.ts +1 -1
  53. package/types/constants/sdk-version.d.ts +1 -1
@@ -1,15 +1,15 @@
1
1
  "use client";
2
- var je = Object.defineProperty;
3
- var Ue = (e, t, n) => t in e ? je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
- var oe = (e, t, n) => (Ue(e, typeof t != "symbol" ? t + "" : t, n), n);
5
- import { jsx as c, Fragment as E, jsxs as N } from "react/jsx-runtime";
6
- import { TARGET as Y, isEditing as L, isBrowser as q, getUserAttributes as He, checkIsDefined as Z, logger as _, fastClone as se, registerInsertMenu as Ke, setupBrowserForEditing as qe, createRegisterComponentMessage as _e, getDefaultCanTrack as ee, _track as be, isPreviewing as ze, fetchOneEntry as Ee, createEditorListener as Je, fetch as Ye, serializeComponentInfo as ye, handleABTestingSync as Ge } from "./server-entry-34e4efb1.js";
7
- import { createContext as Re, useState as S, useEffect as W, useContext as pe, useRef as ne, createElement as ce } from "react";
2
+ var Ue = Object.defineProperty;
3
+ var je = (e, t, n) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
+ var oe = (e, t, n) => (je(e, typeof t != "symbol" ? t + "" : t, n), n);
5
+ import { jsx as c, Fragment as E, jsxs as F } from "react/jsx-runtime";
6
+ import { TARGET as Y, isEditing as L, isBrowser as q, getUserAttributes as He, checkIsDefined as Z, logger as z, fastClone as se, registerInsertMenu as Ke, setupBrowserForEditing as qe, createRegisterComponentMessage as ze, getDefaultCanTrack as ee, _track as be, isPreviewing as _e, fetchOneEntry as Ee, createEditorListener as Je, fetch as Ye, serializeComponentInfo as ye, handleABTestingSync as Ge } from "./server-entry-1a840bf8.js";
7
+ import { createContext as Re, useState as S, useEffect as A, useContext as pe, useRef as ne, createElement as ce } from "react";
8
8
  const Qe = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Xe = (e) => typeof e == "string" && Qe.has(e.toLowerCase());
9
9
  function de(e) {
10
10
  return /* @__PURE__ */ c(E, { children: Xe(e.TagName) ? /* @__PURE__ */ c(E, { children: /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ c(E, { children: typeof e.TagName == "string" ? /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
11
11
  }
12
- const z = () => {
12
+ const _ = () => {
13
13
  switch (Y) {
14
14
  case "react":
15
15
  case "reactNative":
@@ -28,7 +28,7 @@ function Ze(e) {
28
28
  {
29
29
  attributes: {
30
30
  ...e.attributes,
31
- [z()]: `${e.link ? "" : "builder-button"} ${e.attributes[z()] || ""}`,
31
+ [_()]: `${e.link ? "" : "builder-button"} ${e.attributes[_()] || ""}`,
32
32
  ...e.link ? {
33
33
  href: e.link,
34
34
  target: e.openLinkInNewTab ? "_blank" : void 0,
@@ -142,7 +142,7 @@ const at = () => {
142
142
  if (!ot())
143
143
  return !1;
144
144
  const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
145
- return e && t && !n ? (_.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;
145
+ return e && t && !n ? (z.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;
146
146
  }, rt = (e) => (q() || at(), Se(e)), D = class D {
147
147
  static getCacheKey(t) {
148
148
  return JSON.stringify({
@@ -174,7 +174,7 @@ function J({
174
174
  enableCache: l
175
175
  }) {
176
176
  if (e === "") {
177
- _.warn("Skipping evaluation of empty code block.");
177
+ z.warn("Skipping evaluation of empty code block.");
178
178
  return;
179
179
  }
180
180
  const d = {
@@ -201,7 +201,7 @@ function J({
201
201
  }
202
202
  return s;
203
203
  } catch (s) {
204
- _.error("Failed code evaluation: " + s.message, {
204
+ z.error("Failed code evaluation: " + s.message, {
205
205
  code: e
206
206
  });
207
207
  return;
@@ -273,7 +273,7 @@ function st(e, t, n = {}) {
273
273
  return i = this, o = arguments, u <= 0 || u > t ? (r && (clearTimeout(r), r = null), l = s, a = e.apply(i, o), r || (i = o = null)) : !r && n.trailing !== !1 && (r = setTimeout(d, u)), a;
274
274
  };
275
275
  }
276
- function j(e, ...t) {
276
+ function U(e, ...t) {
277
277
  const n = Object(e);
278
278
  for (let i = 1; i < arguments.length; i++) {
279
279
  const o = arguments[i];
@@ -288,7 +288,7 @@ function ct(e) {
288
288
  for (const t of e)
289
289
  switch (t.trigger) {
290
290
  case "pageLoad":
291
- We(t);
291
+ Ae(t);
292
292
  break;
293
293
  case "hover":
294
294
  ut(t);
@@ -314,15 +314,15 @@ function dt(e) {
314
314
  t.indexOf(i) === -1 && t.push(i);
315
315
  return t;
316
316
  }
317
- function We(e) {
317
+ function Ae(e) {
318
318
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
319
319
  if (!t.length) {
320
320
  fe(e.elementId || e.id || "");
321
321
  return;
322
322
  }
323
323
  Array.from(t).forEach((n) => {
324
- he(e, n), n.style.transition = "none", n.style.transitionDelay = "0", j(n.style, e.steps[0].styles), setTimeout(() => {
325
- n.style.transition = `all ${e.duration}s ${me(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), j(n.style, e.steps[1].styles), setTimeout(() => {
324
+ he(e, n), n.style.transition = "none", n.style.transitionDelay = "0", U(n.style, e.steps[0].styles), setTimeout(() => {
325
+ n.style.transition = `all ${e.duration}s ${me(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), U(n.style, e.steps[1].styles), setTimeout(() => {
326
326
  n.style.transition = "", n.style.transitionDelay = "";
327
327
  }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
328
328
  });
@@ -338,10 +338,10 @@ function ut(e) {
338
338
  he(e, n);
339
339
  const i = e.steps[0].styles, o = e.steps[1].styles;
340
340
  function a() {
341
- j(n.style, i);
341
+ U(n.style, i);
342
342
  }
343
343
  function r() {
344
- j(n.style, o);
344
+ U(n.style, o);
345
345
  }
346
346
  a(), n.addEventListener("mouseenter", r), n.addEventListener("mouseleave", a), setTimeout(() => {
347
347
  n.style.transition = `all ${e.duration}s ${me(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
@@ -359,10 +359,10 @@ function mt(e) {
359
359
  let i = !1, o = !1;
360
360
  function a() {
361
361
  !i && l(n) ? (i = !0, o = !0, setTimeout(() => {
362
- j(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", r), setTimeout(() => {
362
+ U(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", r), setTimeout(() => {
363
363
  o = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
364
364
  }, (e.duration + (e.delay || 0)) * 1e3 + 100);
365
- })) : e.repeat && i && !o && !l(n) && (i = !1, j(n.style, e.steps[0].styles));
365
+ })) : e.repeat && i && !o && !l(n) && (i = !1, U(n.style, e.steps[0].styles));
366
366
  }
367
367
  const r = st(a, 200, {
368
368
  leading: !1
@@ -373,7 +373,7 @@ function mt(e) {
373
373
  }
374
374
  const d = e.steps[0].styles;
375
375
  function s() {
376
- j(n.style, d);
376
+ U(n.style, d);
377
377
  }
378
378
  s(), setTimeout(() => {
379
379
  n.style.transition = `all ${e.duration}s ${me(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
@@ -383,10 +383,10 @@ function mt(e) {
383
383
  }), a();
384
384
  });
385
385
  }
386
- const ft = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Ae = (e) => Object.entries(e).map(([n, i]) => {
386
+ const ft = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), We = (e) => Object.entries(e).map(([n, i]) => {
387
387
  if (typeof i == "string")
388
388
  return `${ft(n)}: ${i};`;
389
- }).filter(Z), ht = (e) => Ae(e).join(`
389
+ }).filter(Z), ht = (e) => We(e).join(`
390
390
  `), ae = ({
391
391
  mediaQuery: e,
392
392
  className: t,
@@ -407,17 +407,17 @@ function gt({
407
407
  const bt = ({
408
408
  block: e,
409
409
  context: t
410
- }) => Fe(gt({
410
+ }) => Ne(gt({
411
411
  style: e.style || {},
412
412
  context: t,
413
413
  block: e
414
414
  }));
415
- function Fe(e) {
415
+ function Ne(e) {
416
416
  switch (Y) {
417
417
  case "svelte":
418
418
  case "vue":
419
419
  case "solid":
420
- return Ae(e).join(" ");
420
+ return We(e).join(" ");
421
421
  case "qwik":
422
422
  case "reactNative":
423
423
  case "react":
@@ -481,7 +481,7 @@ const yt = ({
481
481
  },
482
482
  block: i
483
483
  }));
484
- }, Ne = {
484
+ }, Fe = {
485
485
  small: {
486
486
  min: 320,
487
487
  default: 321,
@@ -497,11 +497,11 @@ const yt = ({
497
497
  default: 991,
498
498
  max: 1200
499
499
  }
500
- }, xe = (e, t = Ne) => `@media (max-width: ${t[e].max}px)`, $e = ({
500
+ }, xe = (e, t = Fe) => `@media (max-width: ${t[e].max}px)`, $e = ({
501
501
  small: e,
502
502
  medium: t
503
503
  }) => {
504
- const n = se(Ne);
504
+ const n = se(Fe);
505
505
  if (!e || !t)
506
506
  return n;
507
507
  const i = Math.floor(e / 2);
@@ -630,7 +630,7 @@ function ge({
630
630
  block: e,
631
631
  context: t
632
632
  }),
633
- [z()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
633
+ [_()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
634
634
  };
635
635
  return Ct({
636
636
  properties: n,
@@ -818,7 +818,7 @@ function G(e) {
818
818
  isInteractive: !((P = t == null ? void 0 : t()) != null && P.isRSC)
819
819
  };
820
820
  }
821
- return W(() => {
821
+ return A(() => {
822
822
  const m = i().id, h = i().animations;
823
823
  h && m && ct(
824
824
  h.filter((b) => b.trigger !== "hover").map((b) => ({
@@ -826,7 +826,7 @@ function G(e) {
826
826
  elementId: m
827
827
  }))
828
828
  );
829
- }, []), /* @__PURE__ */ c(E, { children: a() ? /* @__PURE__ */ N(E, { children: [
829
+ }, []), /* @__PURE__ */ c(E, { children: a() ? /* @__PURE__ */ F(E, { children: [
830
830
  /* @__PURE__ */ c(St, { block: e.block, context: e.context }),
831
831
  (d = t == null ? void 0 : t()) != null && d.noWrap ? /* @__PURE__ */ c(E, { children: /* @__PURE__ */ c(
832
832
  ve,
@@ -850,7 +850,7 @@ function G(e) {
850
850
  linkComponent: e.linkComponent
851
851
  },
852
852
  h
853
- )) }) : /* @__PURE__ */ N(
853
+ )) }) : /* @__PURE__ */ F(
854
854
  It,
855
855
  {
856
856
  Wrapper: o(),
@@ -918,7 +918,7 @@ function Pt(e) {
918
918
  "*"
919
919
  ));
920
920
  }
921
- return /* @__PURE__ */ N(E, { children: [
921
+ return /* @__PURE__ */ F(E, { children: [
922
922
  /* @__PURE__ */ c(
923
923
  e.BlocksWrapper,
924
924
  {
@@ -1065,8 +1065,8 @@ function Vt(e) {
1065
1065
  },
1066
1066
  `;
1067
1067
  }
1068
- return /* @__PURE__ */ N(E, { children: [
1069
- /* @__PURE__ */ N(
1068
+ return /* @__PURE__ */ F(E, { children: [
1069
+ /* @__PURE__ */ F(
1070
1070
  "div",
1071
1071
  {
1072
1072
  className: `builder-columns ${e.builderBlock.id}-breakpoints div-5e636bea`,
@@ -1082,8 +1082,8 @@ function Vt(e) {
1082
1082
  ...p.link ? {
1083
1083
  href: p.link
1084
1084
  } : {},
1085
- [z()]: "builder-column",
1086
- style: Fe(y(w))
1085
+ [_()]: "builder-column",
1086
+ style: Ne(y(w))
1087
1087
  },
1088
1088
  children: /* @__PURE__ */ c(
1089
1089
  K,
@@ -1117,11 +1117,11 @@ function Bt(e) {
1117
1117
  function ke(e) {
1118
1118
  return e.replace(/http(s)?:/, "");
1119
1119
  }
1120
- function Wt(e = "", t, n) {
1120
+ function At(e = "", t, n) {
1121
1121
  const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
1122
1122
  return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
1123
1123
  }
1124
- function At(e, t) {
1124
+ function Wt(e, t) {
1125
1125
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
1126
1126
  return e;
1127
1127
  if (t === "master")
@@ -1140,11 +1140,11 @@ function re(e) {
1140
1140
  if (e.match(/builder\.io/)) {
1141
1141
  let n = e;
1142
1142
  const i = Number(e.split("?width=")[1]);
1143
- return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${Wt(e, "width", o)} ${o}w`).concat([n]).join(", ");
1143
+ return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${At(e, "width", o)} ${o}w`).concat([n]).join(", ");
1144
1144
  }
1145
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [At(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
1145
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Wt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
1146
1146
  }
1147
- function Ft(e) {
1147
+ function Nt(e) {
1148
1148
  var o, a, r, l;
1149
1149
  function t() {
1150
1150
  var u;
@@ -1174,9 +1174,9 @@ function Ft(e) {
1174
1174
  };
1175
1175
  return e.aspectRatio ? d : void 0;
1176
1176
  }
1177
- return /* @__PURE__ */ N(E, { children: [
1178
- /* @__PURE__ */ N(E, { children: [
1179
- /* @__PURE__ */ N("picture", { children: [
1177
+ return /* @__PURE__ */ F(E, { children: [
1178
+ /* @__PURE__ */ F(E, { children: [
1179
+ /* @__PURE__ */ F("picture", { children: [
1180
1180
  n() ? /* @__PURE__ */ c("source", { type: "image/webp", srcSet: n() }) : null,
1181
1181
  /* @__PURE__ */ c(
1182
1182
  "img",
@@ -1227,7 +1227,7 @@ function Ft(e) {
1227
1227
  }` })
1228
1228
  ] });
1229
1229
  }
1230
- function Nt(e) {
1230
+ function Ft(e) {
1231
1231
  return /* @__PURE__ */ c(
1232
1232
  "section",
1233
1233
  {
@@ -1627,7 +1627,7 @@ const $t = {
1627
1627
  }
1628
1628
  }
1629
1629
  }]
1630
- }, jt = {
1630
+ }, Ut = {
1631
1631
  name: "Slot",
1632
1632
  isRSC: !0,
1633
1633
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -1641,7 +1641,7 @@ const $t = {
1641
1641
  defaultValue: "children"
1642
1642
  }]
1643
1643
  };
1644
- function Ut(e) {
1644
+ function jt(e) {
1645
1645
  var t, n, i;
1646
1646
  return /* @__PURE__ */ c(
1647
1647
  "div",
@@ -1729,7 +1729,7 @@ function qt(e) {
1729
1729
  }
1730
1730
  );
1731
1731
  }
1732
- const _t = {
1732
+ const zt = {
1733
1733
  name: "Custom Code",
1734
1734
  static: !0,
1735
1735
  requiredPermissions: ["editCode"],
@@ -1752,9 +1752,9 @@ const _t = {
1752
1752
  advanced: !0
1753
1753
  }]
1754
1754
  };
1755
- function zt(e) {
1755
+ function _t(e) {
1756
1756
  const t = ne(null), [n, i] = S(() => []), [o, a] = S(() => []);
1757
- return W(() => {
1757
+ return A(() => {
1758
1758
  var l;
1759
1759
  if (!((l = t.current) != null && l.getElementsByTagName) || typeof window == "undefined")
1760
1760
  return;
@@ -1836,7 +1836,7 @@ function Qt(e) {
1836
1836
  }
1837
1837
  }
1838
1838
  }
1839
- return W(() => {
1839
+ return A(() => {
1840
1840
  t.current && !r && (l(!0), d());
1841
1841
  }, [t.current, r]), /* @__PURE__ */ c(
1842
1842
  "div",
@@ -2127,8 +2127,8 @@ function nn(e) {
2127
2127
  } else if (f.type === "checkbox")
2128
2128
  I = f.checked;
2129
2129
  else if (f.type === "number" || f.type === "range") {
2130
- const A = f.valueAsNumber;
2131
- isNaN(A) || (I = A);
2130
+ const W = f.valueAsNumber;
2131
+ isNaN(W) || (I = W);
2132
2132
  } else
2133
2133
  f.type === "file" ? I = f.files : I = f.value;
2134
2134
  else
@@ -2165,15 +2165,15 @@ function nn(e) {
2165
2165
  let I;
2166
2166
  const $ = f.headers.get("content-type");
2167
2167
  if ($ && $.indexOf("application/json") !== -1 ? I = await f.json() : I = await f.text(), !f.ok && e.errorMessagePath) {
2168
- let A = tn(I, e.errorMessagePath);
2169
- A && (typeof A != "string" && (A = JSON.stringify(A)), l(A), d({ formErrorMessage: A }));
2168
+ let W = tn(I, e.errorMessagePath);
2169
+ W && (typeof W != "string" && (W = JSON.stringify(W)), l(W), d({ formErrorMessage: W }));
2170
2170
  }
2171
2171
  if (a(I), i(f.ok ? "success" : "error"), f.ok) {
2172
- const A = new CustomEvent("submit:success", {
2172
+ const W = new CustomEvent("submit:success", {
2173
2173
  detail: { res: f, body: I }
2174
2174
  });
2175
2175
  if (t.current) {
2176
- if (t.current.dispatchEvent(A), A.defaultPrevented)
2176
+ if (t.current.dispatchEvent(W), W.defaultPrevented)
2177
2177
  return;
2178
2178
  e.resetFormOnSubmit !== !1 && t.current.reset();
2179
2179
  }
@@ -2196,9 +2196,9 @@ function nn(e) {
2196
2196
  );
2197
2197
  }
2198
2198
  }
2199
- return /* @__PURE__ */ N(E, { children: [
2199
+ return /* @__PURE__ */ F(E, { children: [
2200
2200
  " ",
2201
- /* @__PURE__ */ N(
2201
+ /* @__PURE__ */ F(
2202
2202
  "form",
2203
2203
  {
2204
2204
  validate: e.validate,
@@ -2543,7 +2543,7 @@ function fn(e) {
2543
2543
  ...t()
2544
2544
  };
2545
2545
  }
2546
- return /* @__PURE__ */ N(
2546
+ return /* @__PURE__ */ F(
2547
2547
  "div",
2548
2548
  {
2549
2549
  style: {
@@ -2619,8 +2619,8 @@ function fn(e) {
2619
2619
  );
2620
2620
  }
2621
2621
  const hn = () => [{
2622
- component: zt,
2623
- ..._t
2622
+ component: _t,
2623
+ ...zt
2624
2624
  }, {
2625
2625
  component: Qt,
2626
2626
  ...Jt
@@ -2652,16 +2652,16 @@ const hn = () => [{
2652
2652
  component: Bt,
2653
2653
  ...Dt
2654
2654
  }, {
2655
- component: Ft,
2655
+ component: Nt,
2656
2656
  ...Mt
2657
2657
  }, {
2658
- component: Nt,
2658
+ component: Ft,
2659
2659
  ...Ot
2660
2660
  }, {
2661
- component: Ut,
2662
- ...jt
2661
+ component: jt,
2662
+ ...Ut
2663
2663
  }, {
2664
- component: Fn,
2664
+ component: $n,
2665
2665
  ...Ht
2666
2666
  }, {
2667
2667
  component: qt,
@@ -2828,7 +2828,7 @@ const kn = (e, t, n = !0) => {
2828
2828
  };
2829
2829
  };
2830
2830
  function In(e) {
2831
- var P, M, O, f, I, $, A;
2831
+ var P, M, O, f, I, $, W;
2832
2832
  const t = ne(null), [n, i] = S(() => 0);
2833
2833
  S(() => !0);
2834
2834
  function o(g) {
@@ -2843,7 +2843,7 @@ function In(e) {
2843
2843
  }));
2844
2844
  }
2845
2845
  function a(g) {
2846
- var v, k, C, F, U;
2846
+ var v, k, C, N, j;
2847
2847
  const x = {
2848
2848
  ...e.builderContextSignal.content,
2849
2849
  ...g,
@@ -2854,7 +2854,7 @@ function In(e) {
2854
2854
  meta: {
2855
2855
  ...(k = e.builderContextSignal.content) == null ? void 0 : k.meta,
2856
2856
  ...g == null ? void 0 : g.meta,
2857
- breakpoints: ((C = g == null ? void 0 : g.meta) == null ? void 0 : C.breakpoints) || ((U = (F = e.builderContextSignal.content) == null ? void 0 : F.meta) == null ? void 0 : U.breakpoints)
2857
+ breakpoints: ((C = g == null ? void 0 : g.meta) == null ? void 0 : C.breakpoints) || ((j = (N = e.builderContextSignal.content) == null ? void 0 : N.meta) == null ? void 0 : j.breakpoints)
2858
2858
  }
2859
2859
  };
2860
2860
  e.setBuilderContextSignal((Q) => ({
@@ -2883,7 +2883,7 @@ function In(e) {
2883
2883
  }), i(n + 1));
2884
2884
  },
2885
2885
  animation: (x) => {
2886
- We(x);
2886
+ Ae(x);
2887
2887
  },
2888
2888
  contentUpdate: (x) => {
2889
2889
  a(x), i(n + 1);
@@ -2940,12 +2940,12 @@ function In(e) {
2940
2940
  }
2941
2941
  function p({ url: g, key: x }) {
2942
2942
  Ye(g).then((v) => v.json()).then((v) => {
2943
- var C, F;
2943
+ var C, N;
2944
2944
  const k = {
2945
2945
  ...e.builderContextSignal.rootState,
2946
2946
  [x]: v
2947
2947
  };
2948
- (F = (C = e.builderContextSignal).rootSetState) == null || F.call(C, k), h[x] = !0;
2948
+ (N = (C = e.builderContextSignal).rootSetState) == null || N.call(C, k), h[x] = !0;
2949
2949
  }).catch((v) => {
2950
2950
  console.error("error fetching dynamic data", g, v);
2951
2951
  });
@@ -2953,11 +2953,11 @@ function In(e) {
2953
2953
  function w() {
2954
2954
  var x, v, k;
2955
2955
  const g = (k = (v = (x = e.builderContextSignal.content) == null ? void 0 : x.data) == null ? void 0 : v.httpRequests) != null ? k : {};
2956
- Object.entries(g).forEach(([C, F]) => {
2957
- if (F && (!h[C] || L())) {
2958
- const U = B(F);
2956
+ Object.entries(g).forEach(([C, N]) => {
2957
+ if (N && (!h[C] || L())) {
2958
+ const j = B(N);
2959
2959
  p({
2960
- url: U,
2960
+ url: j,
2961
2961
  key: C
2962
2962
  });
2963
2963
  }
@@ -2978,7 +2978,7 @@ function In(e) {
2978
2978
  )
2979
2979
  );
2980
2980
  }
2981
- return W(() => {
2981
+ return A(() => {
2982
2982
  var g, x;
2983
2983
  if (q()) {
2984
2984
  if (L() && (i(n + 1), window.addEventListener("message", u), Ke(), qe({
@@ -2994,27 +2994,27 @@ function In(e) {
2994
2994
  }), Object.values(
2995
2995
  e.builderContextSignal.componentInfos
2996
2996
  ).forEach((k) => {
2997
- var F;
2998
- const C = _e(k);
2999
- (F = window.parent) == null || F.postMessage(C, "*");
2997
+ var N;
2998
+ const C = ze(k);
2999
+ (N = window.parent) == null || N.postMessage(C, "*");
3000
3000
  }), window.addEventListener(
3001
3001
  "builder:component:stateChangeListenerActivated",
3002
3002
  V
3003
3003
  )), e.builderContextSignal.content && ee(e.canTrack)) {
3004
- const k = (g = e.builderContextSignal.content) == null ? void 0 : g.testVariationId, C = (x = e.builderContextSignal.content) == null ? void 0 : x.id, F = e.apiKey;
3004
+ const k = (g = e.builderContextSignal.content) == null ? void 0 : g.testVariationId, C = (x = e.builderContextSignal.content) == null ? void 0 : x.id, N = e.apiKey;
3005
3005
  be({
3006
3006
  type: "impression",
3007
3007
  canTrack: !0,
3008
3008
  contentId: C,
3009
- apiKey: F,
3009
+ apiKey: N,
3010
3010
  variationId: k !== C ? k : void 0
3011
3011
  });
3012
3012
  }
3013
- if (ze()) {
3014
- const k = new URL(location.href).searchParams, C = k.get("builder.preview"), F = k.get(
3013
+ if (_e()) {
3014
+ const k = new URL(location.href).searchParams, C = k.get("builder.preview"), N = k.get(
3015
3015
  `builder.preview.${C}`
3016
- ), U = k.get("apiKey") || k.get("builder.space");
3017
- C === e.model && U === e.apiKey && (!e.content || F === e.content.id) && Ee({
3016
+ ), j = k.get("apiKey") || k.get("builder.space");
3017
+ C === e.model && j === e.apiKey && (!e.content || N === e.content.id) && Ee({
3018
3018
  model: e.model,
3019
3019
  apiKey: e.apiKey,
3020
3020
  apiVersion: e.builderContextSignal.apiVersion
@@ -3023,26 +3023,26 @@ function In(e) {
3023
3023
  });
3024
3024
  }
3025
3025
  }
3026
- }, []), W(() => {
3027
- e.apiKey || _.error(
3026
+ }, []), A(() => {
3027
+ e.apiKey || z.error(
3028
3028
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
3029
3029
  ), m(), w(), V();
3030
- }, []), W(() => {
3030
+ }, []), A(() => {
3031
3031
  e.content && a(e.content);
3032
- }, [e.content]), W(() => {
3033
- }, [r]), W(() => {
3032
+ }, [e.content]), A(() => {
3033
+ }, [r]), A(() => {
3034
3034
  m();
3035
- }, [(M = (P = e.builderContextSignal.content) == null ? void 0 : P.data) == null ? void 0 : M.jsCode]), W(() => {
3035
+ }, [(M = (P = e.builderContextSignal.content) == null ? void 0 : P.data) == null ? void 0 : M.jsCode]), A(() => {
3036
3036
  w();
3037
- }, [(f = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : f.httpRequests]), W(() => {
3037
+ }, [(f = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : f.httpRequests]), A(() => {
3038
3038
  V();
3039
- }, [e.builderContextSignal.rootState]), W(() => {
3039
+ }, [e.builderContextSignal.rootState]), A(() => {
3040
3040
  e.data && o(e.data);
3041
- }, [e.data]), W(() => {
3041
+ }, [e.data]), A(() => {
3042
3042
  e.locale && o({
3043
3043
  locale: e.locale
3044
3044
  });
3045
- }, [e.locale]), W(() => () => {
3045
+ }, [e.locale]), A(() => () => {
3046
3046
  q() && (window.removeEventListener("message", u), window.removeEventListener(
3047
3047
  "builder:component:stateChangeListenerActivated",
3048
3048
  V
@@ -3060,7 +3060,7 @@ function In(e) {
3060
3060
  "aria-hidden": !0
3061
3061
  },
3062
3062
  ...e.contentWrapperProps,
3063
- className: `variant-${(($ = e.content) == null ? void 0 : $.testVariationId) || ((A = e.content) == null ? void 0 : A.id)}`
3063
+ className: `variant-${(($ = e.content) == null ? void 0 : $.testVariationId) || ((W = e.content) == null ? void 0 : W.id)}`
3064
3064
  },
3065
3065
  e.children
3066
3066
  ) : null });
@@ -3099,18 +3099,7 @@ font-weight: ${l};
3099
3099
  }, Rn = ({
3100
3100
  cssCode: e,
3101
3101
  contentId: t
3102
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
3103
- function Pn(e) {
3104
- const [t, n] = S(
3105
- () => `
3106
- ${Rn({
3107
- cssCode: e.cssCode,
3108
- contentId: e.contentId
3109
- })}
3110
- ${En({
3111
- customFonts: e.customFonts
3112
- })}
3113
-
3102
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Pn = `
3114
3103
  .builder-button {
3115
3104
  all: unset;
3116
3105
  }
@@ -3127,11 +3116,23 @@ ${En({
3127
3116
  text-align: inherit;
3128
3117
  font-family: inherit;
3129
3118
  }
3119
+ `, Vn = (e) => e ? "" : Pn;
3120
+ function Bn(e) {
3121
+ const [t, n] = S(
3122
+ () => `
3123
+ ${Rn({
3124
+ cssCode: e.cssCode,
3125
+ contentId: e.contentId
3126
+ })}
3127
+ ${En({
3128
+ customFonts: e.customFonts
3129
+ })}
3130
+ ${Vn(e.isNestedRender)}
3130
3131
  `.trim()
3131
3132
  );
3132
3133
  return /* @__PURE__ */ c(ie, { styles: t });
3133
3134
  }
3134
- const Vn = ({
3135
+ const An = ({
3135
3136
  content: e,
3136
3137
  data: t,
3137
3138
  locale: n
@@ -3148,7 +3149,7 @@ const Vn = ({
3148
3149
  locale: n
3149
3150
  } : {}
3150
3151
  };
3151
- }, Bn = ({
3152
+ }, Wn = ({
3152
3153
  content: e,
3153
3154
  data: t
3154
3155
  }) => e ? {
@@ -3193,12 +3194,12 @@ function Te(e) {
3193
3194
  {}
3194
3195
  )
3195
3196
  ), [r, l] = S(() => ({
3196
- content: Bn({
3197
+ content: Wn({
3197
3198
  content: e.content,
3198
3199
  data: e.data
3199
3200
  }),
3200
3201
  localState: void 0,
3201
- rootState: Vn({
3202
+ rootState: An({
3202
3203
  content: e.content,
3203
3204
  data: e.data,
3204
3205
  locale: e.locale
@@ -3227,7 +3228,7 @@ function Te(e) {
3227
3228
  value: {
3228
3229
  registeredComponents: o
3229
3230
  },
3230
- children: /* @__PURE__ */ N(
3231
+ children: /* @__PURE__ */ F(
3231
3232
  In,
3232
3233
  {
3233
3234
  content: e.content,
@@ -3248,8 +3249,9 @@ function Te(e) {
3248
3249
  children: [
3249
3250
  e.isSsrAbTest ? /* @__PURE__ */ c(le, { scriptStr: t }) : null,
3250
3251
  /* @__PURE__ */ c(
3251
- Pn,
3252
+ Bn,
3252
3253
  {
3254
+ isNestedRender: e.isNestedRender,
3253
3255
  contentId: (d = r.content) == null ? void 0 : d.id,
3254
3256
  cssCode: (u = (s = r.content) == null ? void 0 : s.data) == null ? void 0 : u.cssCode,
3255
3257
  customFonts: (h = (m = r.content) == null ? void 0 : m.data) == null ? void 0 : h.customFonts
@@ -3270,7 +3272,7 @@ function Te(e) {
3270
3272
  }
3271
3273
  );
3272
3274
  }
3273
- function Wn(e) {
3275
+ function Nn(e) {
3274
3276
  var r, l;
3275
3277
  const [t, n] = S(
3276
3278
  () => yn({
@@ -3301,10 +3303,10 @@ function Wn(e) {
3301
3303
  canTrack: ee(e.canTrack)
3302
3304
  });
3303
3305
  }
3304
- return W(() => {
3305
- }, []), /* @__PURE__ */ N(E, { children: [
3306
- !e.__isNestedRender && Y !== "reactNative" ? /* @__PURE__ */ c(le, { scriptStr: Sn() }) : null,
3307
- t ? /* @__PURE__ */ N(E, { children: [
3306
+ return A(() => {
3307
+ }, []), /* @__PURE__ */ F(E, { children: [
3308
+ !e.isNestedRender && Y !== "reactNative" ? /* @__PURE__ */ c(le, { scriptStr: Sn() }) : null,
3309
+ t ? /* @__PURE__ */ F(E, { children: [
3308
3310
  /* @__PURE__ */ c(
3309
3311
  ie,
3310
3312
  {
@@ -3316,6 +3318,7 @@ function Wn(e) {
3316
3318
  (l = X(e.content)) == null ? void 0 : l.map((d) => /* @__PURE__ */ c(
3317
3319
  Te,
3318
3320
  {
3321
+ isNestedRender: e.isNestedRender,
3319
3322
  content: d,
3320
3323
  showContent: !1,
3321
3324
  model: e.model,
@@ -3341,6 +3344,7 @@ function Wn(e) {
3341
3344
  /* @__PURE__ */ c(
3342
3345
  Te,
3343
3346
  {
3347
+ isNestedRender: e.isNestedRender,
3344
3348
  content: a(),
3345
3349
  showContent: !0,
3346
3350
  model: e.model,
@@ -3363,7 +3367,7 @@ function Wn(e) {
3363
3367
  )
3364
3368
  ] });
3365
3369
  }
3366
- const An = async ({
3370
+ const Fn = async ({
3367
3371
  builderContextValue: e,
3368
3372
  symbol: t
3369
3373
  }) => {
@@ -3379,15 +3383,15 @@ const An = async ({
3379
3383
  }
3380
3384
  }
3381
3385
  }).catch((n) => {
3382
- _.error("Could not fetch symbol content: ", n);
3386
+ z.error("Could not fetch symbol content: ", n);
3383
3387
  });
3384
3388
  };
3385
- function Fn(e) {
3389
+ function $n(e) {
3386
3390
  var a, r, l, d;
3387
3391
  function t() {
3388
3392
  var s, u;
3389
3393
  return [
3390
- e.attributes[z()],
3394
+ e.attributes[_()],
3391
3395
  "builder-symbol",
3392
3396
  (s = e.symbol) != null && s.inline ? "builder-inline-symbol" : void 0,
3393
3397
  (u = e.symbol) != null && u.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
@@ -3398,20 +3402,20 @@ function Fn(e) {
3398
3402
  return (s = e.symbol) == null ? void 0 : s.content;
3399
3403
  });
3400
3404
  function o() {
3401
- n || An({
3405
+ n || Fn({
3402
3406
  symbol: e.symbol,
3403
3407
  builderContextValue: e.builderContext
3404
3408
  }).then((s) => {
3405
3409
  s && i(s);
3406
3410
  });
3407
3411
  }
3408
- return W(() => {
3409
- }, []), W(() => {
3412
+ return A(() => {
3413
+ }, []), A(() => {
3410
3414
  o();
3411
3415
  }, [e.symbol]), /* @__PURE__ */ c("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ c(
3412
- Wn,
3416
+ Nn,
3413
3417
  {
3414
- __isNestedRender: !0,
3418
+ isNestedRender: !0,
3415
3419
  apiVersion: e.builderContext.apiVersion,
3416
3420
  apiKey: e.builderContext.apiKey,
3417
3421
  context: {
@@ -3436,11 +3440,11 @@ export {
3436
3440
  K as Blocks,
3437
3441
  Ze as Button,
3438
3442
  Vt as Columns,
3439
- Wn as Content,
3443
+ Nn as Content,
3440
3444
  Bt as Fragment,
3441
- Ft as Image,
3442
- Nt as Section,
3443
- Fn as Symbol,
3445
+ Nt as Image,
3446
+ Ft as Section,
3447
+ $n as Symbol,
3444
3448
  qt as Text,
3445
3449
  fn as Video
3446
3450
  };