@builder.io/sdk-react 1.0.11 → 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 (67) hide show
  1. package/lib/browser/blocks-exports.cjs +32 -31
  2. package/lib/browser/blocks-exports.mjs +914 -877
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-acc5a9c8.js → server-entry-1a840bf8.js} +1 -1
  6. package/lib/browser/{server-entry-4829e1ce.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-ca61b343.cjs +32 -0
  10. package/lib/edge/blocks-exports.cjs +1 -1
  11. package/lib/edge/blocks-exports.mjs +2 -2
  12. package/lib/edge/{blocks-244199ab.js → blocks-fd4ab30c.js} +1003 -967
  13. package/lib/edge/{button-73916377.js → button-45681a80.js} +3 -3
  14. package/lib/edge/{button-8cd5d71a.cjs → button-6d8b002c.cjs} +1 -1
  15. package/lib/edge/{columns-c7d9b9f1.js → columns-61e1043d.js} +33 -33
  16. package/lib/edge/{columns-88c9df52.cjs → columns-77e4f17d.cjs} +2 -2
  17. package/lib/edge/{content-variants-d5455178.js → content-variants-c085fa7f.js} +135 -124
  18. package/lib/edge/{content-variants-1a65d814.cjs → content-variants-c86fdb5a.cjs} +13 -12
  19. package/lib/edge/dynamic-renderer-8b343325.js +8 -0
  20. package/lib/edge/{dynamic-renderer-1c9f24c0.cjs → dynamic-renderer-b29b45ca.cjs} +1 -1
  21. package/lib/edge/{form-ad532981.js → form-4fae6192.js} +56 -66
  22. package/lib/edge/form-b996f9f9.cjs +1 -0
  23. package/lib/edge/{get-class-prop-name-1178de8b.js → get-class-prop-name-0e4b7b88.js} +1 -1
  24. package/lib/edge/{get-class-prop-name-c082f4f3.cjs → get-class-prop-name-14e14eea.cjs} +1 -1
  25. package/lib/edge/{image-2cc909d9.js → image-0008c792.js} +25 -25
  26. package/lib/edge/image-ee3dd857.cjs +17 -0
  27. package/lib/edge/{img-749d10ed.js → img-1259941e.js} +1 -1
  28. package/lib/edge/{img-f61f7931.cjs → img-c623011b.cjs} +1 -1
  29. package/lib/edge/index.cjs +1 -1
  30. package/lib/edge/index.mjs +1 -1
  31. package/lib/edge/{input-ccec5aae.js → input-02a1cd9f.js} +1 -1
  32. package/lib/edge/{input-184da708.cjs → input-2c618b06.cjs} +1 -1
  33. package/lib/edge/{select-a5fc0333.cjs → select-3acbf5f6.cjs} +1 -1
  34. package/lib/edge/{select-50a6db92.js → select-b1b6d0bf.js} +1 -1
  35. package/lib/edge/{server-entry-1cbf5bef.js → server-entry-3f0061ea.js} +1 -1
  36. package/lib/edge/{server-entry-178f215d.cjs → server-entry-d8f950e0.cjs} +1 -1
  37. package/lib/edge/server-entry.cjs +1 -1
  38. package/lib/edge/server-entry.mjs +1 -1
  39. package/lib/edge/{slot-dad01f2d.js → slot-3cefe326.js} +4 -4
  40. package/lib/edge/{slot-d3ff8e4d.cjs → slot-92eac261.cjs} +1 -1
  41. package/lib/edge/{symbol-31283b30.cjs → symbol-741f0aee.cjs} +1 -1
  42. package/lib/edge/{symbol-b6db0014.js → symbol-e2a47b92.js} +3 -3
  43. package/lib/edge/{video-d02ff89b.js → video-58c2cc8d.js} +15 -15
  44. package/lib/edge/video-e20dcbbc.cjs +1 -0
  45. package/lib/node/blocks-exports.cjs +22 -21
  46. package/lib/node/blocks-exports.mjs +492 -455
  47. package/lib/node/index.cjs +1 -1
  48. package/lib/node/index.mjs +1 -1
  49. package/lib/node/{server-entry-09a75819.js → server-entry-383e8da6.js} +1 -1
  50. package/lib/node/{server-entry-856d379b.cjs → server-entry-6d61d1cf.cjs} +1 -1
  51. package/lib/node/server-entry.cjs +1 -1
  52. package/lib/node/server-entry.mjs +1 -1
  53. package/package.json +1 -1
  54. package/types/components/block/block.helpers.d.ts +4 -0
  55. package/types/components/content/components/enable-editor.d.ts +1 -1
  56. package/types/components/content/components/styles.d.ts +1 -0
  57. package/types/components/content/components/styles.helpers.d.ts +1 -0
  58. package/types/components/content/contentProps.types.d.ts +6 -1
  59. package/types/components/content-variants/content-variants.d.ts +1 -1
  60. package/types/constants/sdk-version.d.ts +1 -1
  61. package/types/functions/evaluate/evaluate.d.ts +3 -1
  62. package/types/functions/evaluate/helpers.d.ts +1 -0
  63. package/lib/edge/blocks-a05f6af2.cjs +0 -32
  64. package/lib/edge/dynamic-renderer-96ba4e48.js +0 -8
  65. package/lib/edge/form-713c6da6.cjs +0 -1
  66. package/lib/edge/image-7e1361ce.cjs +0 -17
  67. package/lib/edge/video-64014cc4.cjs +0 -1
@@ -1,10 +1,10 @@
1
- import { jsx as g, Fragment as V, jsxs as $ } from "react/jsx-runtime";
2
- import { lazy as C, useRef as oe, useState as b, useEffect as y, createElement as re } from "react";
3
- import { isBrowser as H, TARGET as Z, isEditing as U, registerInsertMenu as se, setupBrowserForEditing as le, createRegisterComponentMessage as de, getDefaultCanTrack as A, _track as O, isPreviewing as ce, fetchOneEntry as ue, logger as me, createEditorListener as pe, fastClone as ge, fetch as he, serializeComponentInfo as z, handleABTestingSync as fe } from "./server-entry-1cbf5bef.js";
1
+ import { jsx as b, jsxs as U, Fragment as M } from "react/jsx-runtime";
2
+ import { lazy as C, useRef as oe, useState as h, useEffect as y, createElement as re } from "react";
3
+ import { isBrowser as $, TARGET as Z, isEditing as P, registerInsertMenu as se, setupBrowserForEditing as le, createRegisterComponentMessage as de, getDefaultCanTrack as W, _track as O, isPreviewing as ce, fetchOneEntry as ue, logger as me, createEditorListener as pe, fastClone as ge, fetch as fe, serializeComponentInfo as z, handleABTestingSync as he } from "./server-entry-3f0061ea.js";
4
4
  import { Video as be, Button as ye, Columns as xe, Fragment as Se, Image as ve, Section as ke, Symbol as Ie, Text as Ce } from "./blocks-exports.mjs";
5
- import { builderContext as Te, triggerAnimation as we, evaluate as J, InlinedStyles as ee, ComponentsContext as Ve, Blocks as Re } from "./blocks-244199ab.js";
6
- import "./get-class-prop-name-1178de8b.js";
7
- import "./dynamic-renderer-96ba4e48.js";
5
+ import { builderContext as Te, triggerAnimation as we, evaluate as J, InlinedStyles as ee, ComponentsContext as Ve, Blocks as Re } from "./blocks-fd4ab30c.js";
6
+ import "./get-class-prop-name-0e4b7b88.js";
7
+ import "./dynamic-renderer-8b343325.js";
8
8
  const Ee = {
9
9
  name: "Core:Button",
10
10
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
@@ -397,7 +397,7 @@ const Ee = {
397
397
  required: !0,
398
398
  defaultValue: "children"
399
399
  }]
400
- }, $e = C(() => import("./slot-dad01f2d.js")), He = {
400
+ }, $e = C(() => import("./slot-3cefe326.js")), De = {
401
401
  name: "Symbol",
402
402
  noWrap: !0,
403
403
  static: !0,
@@ -430,7 +430,7 @@ const Ee = {
430
430
  hideFromUI: !0,
431
431
  type: "boolean"
432
432
  }]
433
- }, De = {
433
+ }, He = {
434
434
  name: "Text",
435
435
  static: !0,
436
436
  isRSC: !0,
@@ -470,7 +470,7 @@ const Ee = {
470
470
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
471
471
  advanced: !0
472
472
  }]
473
- }, je = C(() => import("./custom-code-7786788e.js")), qe = {
473
+ }, Ne = C(() => import("./custom-code-7786788e.js")), je = {
474
474
  name: "Embed",
475
475
  static: !0,
476
476
  inputs: [{
@@ -495,7 +495,7 @@ const Ee = {
495
495
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
496
496
  hideFromUI: !0
497
497
  }]
498
- }, Ke = C(() => import("./embed-5c1bbe12.js")), _e = {
498
+ }, qe = C(() => import("./embed-5c1bbe12.js")), Ke = {
499
499
  name: "Form:Form",
500
500
  // editableTags: ['builder-form-error']
501
501
  defaults: {
@@ -726,7 +726,7 @@ const Ee = {
726
726
  }
727
727
  }
728
728
  }]
729
- }, Be = C(() => import("./form-ad532981.js")), Me = {
729
+ }, _e = C(() => import("./form-4fae6192.js")), Be = {
730
730
  name: "Form:Input",
731
731
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
732
732
  inputs: [
@@ -777,7 +777,7 @@ const Ee = {
777
777
  borderStyle: "solid",
778
778
  borderColor: "#ccc"
779
779
  }
780
- }, Ne = C(() => import("./input-ccec5aae.js")), Oe = {
780
+ }, Me = C(() => import("./input-02a1cd9f.js")), Oe = {
781
781
  name: "Form:Select",
782
782
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
783
783
  defaultStyles: {
@@ -819,7 +819,7 @@ const Ee = {
819
819
  }],
820
820
  static: !0,
821
821
  noWrap: !0
822
- }, ze = C(() => import("./select-50a6db92.js")), Je = {
822
+ }, ze = C(() => import("./select-b1b6d0bf.js")), Je = {
823
823
  name: "Form:SubmitButton",
824
824
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
825
825
  defaultStyles: {
@@ -858,7 +858,7 @@ const Ee = {
858
858
  }],
859
859
  noWrap: !0,
860
860
  static: !0
861
- }, Ge = C(() => import("./img-749d10ed.js")), Xe = {
861
+ }, Ge = C(() => import("./img-1259941e.js")), Xe = {
862
862
  name: "Video",
863
863
  canHaveChildren: !0,
864
864
  defaultStyles: {
@@ -940,17 +940,17 @@ const Ee = {
940
940
  advanced: !0
941
941
  }]
942
942
  }, Ze = () => [{
943
- component: je,
943
+ component: Ne,
944
944
  ...Le
945
945
  }, {
946
- component: Ke,
947
- ...qe
946
+ component: qe,
947
+ ...je
948
948
  }, {
949
- component: Be,
950
- ..._e
949
+ component: _e,
950
+ ...Ke
951
951
  }, {
952
- component: Ne,
953
- ...Me
952
+ component: Me,
953
+ ...Be
954
954
  }, {
955
955
  component: Ye,
956
956
  ...Je
@@ -983,10 +983,10 @@ const Ee = {
983
983
  ...Ue
984
984
  }, {
985
985
  component: Ie,
986
- ...He
986
+ ...De
987
987
  }, {
988
988
  component: Ce,
989
- ...De
989
+ ...He
990
990
  }, ...Ze()], et = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
991
991
  function getAndSetVariantId() {
992
992
  function setCookie(name, value, days) {
@@ -1077,14 +1077,14 @@ const Ee = {
1077
1077
  thisScriptEl?.remove();
1078
1078
  }
1079
1079
  return;
1080
- }`, te = "builderIoAbTest", ne = "builderIoRenderContent", W = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1080
+ }`, te = "builderIoAbTest", ne = "builderIoRenderContent", F = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1081
1081
  ...t,
1082
1082
  testVariationId: t.id,
1083
1083
  id: e == null ? void 0 : e.id
1084
1084
  })), nt = ({
1085
1085
  canTrack: e,
1086
1086
  content: t
1087
- }) => !(!(W(t).length > 0) || !e || H()), at = (e) => e === "react" || e === "reactNative", ae = at(Z), it = () => `
1087
+ }) => !(!(F(t).length > 0) || !e || $()), at = (e) => e === "react" || e === "reactNative", ae = at(Z), it = () => `
1088
1088
  window.${te} = ${et}
1089
1089
  window.${ne} = ${tt}
1090
1090
  `, ot = (e, t) => `
@@ -1097,7 +1097,7 @@ const Ee = {
1097
1097
  "${t}", "${e}", ${ae}
1098
1098
  )`;
1099
1099
  function D(e) {
1100
- return /* @__PURE__ */ g(
1100
+ return /* @__PURE__ */ b(
1101
1101
  "script",
1102
1102
  {
1103
1103
  dangerouslySetInnerHTML: { __html: e.scriptStr },
@@ -1149,9 +1149,9 @@ const st = (e, t, n = !0) => {
1149
1149
  };
1150
1150
  };
1151
1151
  function ct(e) {
1152
- var j, q, K, _, B, M, N;
1153
- const t = oe(null), [n, a] = b(() => 0);
1154
- b(() => !0);
1152
+ var L, N, j, q, K, _, B;
1153
+ const t = oe(null), [n, a] = h(() => 0);
1154
+ h(() => !0);
1155
1155
  function c(o) {
1156
1156
  var s, l;
1157
1157
  const r = {
@@ -1164,7 +1164,7 @@ function ct(e) {
1164
1164
  }));
1165
1165
  }
1166
1166
  function m(o) {
1167
- var s, l, u, h, w;
1167
+ var s, l, u, g, w;
1168
1168
  const r = {
1169
1169
  ...e.builderContextSignal.content,
1170
1170
  ...o,
@@ -1175,18 +1175,18 @@ function ct(e) {
1175
1175
  meta: {
1176
1176
  ...(l = e.builderContextSignal.content) == null ? void 0 : l.meta,
1177
1177
  ...o == null ? void 0 : o.meta,
1178
- breakpoints: ((u = o == null ? void 0 : o.meta) == null ? void 0 : u.breakpoints) || ((w = (h = e.builderContextSignal.content) == null ? void 0 : h.meta) == null ? void 0 : w.breakpoints)
1178
+ breakpoints: ((u = o == null ? void 0 : o.meta) == null ? void 0 : u.breakpoints) || ((w = (g = e.builderContextSignal.content) == null ? void 0 : g.meta) == null ? void 0 : w.breakpoints)
1179
1179
  }
1180
1180
  };
1181
- e.setBuilderContextSignal((F) => ({
1182
- ...F,
1181
+ e.setBuilderContextSignal((E) => ({
1182
+ ...E,
1183
1183
  content: r
1184
1184
  }));
1185
1185
  }
1186
- b(() => 0);
1187
- const [i, p] = b(
1186
+ h(() => 0);
1187
+ const [i, p] = h(
1188
1188
  () => !1
1189
- ), [d, f] = b(
1189
+ ), [d, f] = h(
1190
1190
  () => e.contentWrapper || "div"
1191
1191
  );
1192
1192
  function x(o) {
@@ -1220,56 +1220,63 @@ function ct(e) {
1220
1220
  context: e.context || {},
1221
1221
  localState: void 0,
1222
1222
  rootState: e.builderContextSignal.rootState,
1223
- rootSetState: e.builderContextSignal.rootSetState
1223
+ rootSetState: e.builderContextSignal.rootSetState,
1224
+ /**
1225
+ * We don't want to cache the result of the JS code, since it's arbitrary side effect code.
1226
+ */
1227
+ enableCache: !1
1224
1228
  });
1225
1229
  }
1226
- const [I, P] = b(() => ({})), [R, S] = b(() => !1);
1230
+ const [I, A] = h(() => ({})), [V, S] = h(() => !1);
1227
1231
  function v(o) {
1228
1232
  var r, s;
1229
1233
  if (e.builderContextSignal.content) {
1230
1234
  const l = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, u = (s = e.builderContextSignal.content) == null ? void 0 : s.id;
1231
1235
  O({
1232
1236
  type: "click",
1233
- canTrack: A(e.canTrack),
1237
+ canTrack: W(e.canTrack),
1234
1238
  contentId: u,
1235
1239
  apiKey: e.apiKey,
1236
1240
  variationId: l !== u ? l : void 0,
1237
1241
  ...dt(o),
1238
- unique: !R
1242
+ unique: !V
1239
1243
  });
1240
1244
  }
1241
- R || S(!0);
1245
+ V || S(!0);
1242
1246
  }
1243
1247
  function T(o) {
1244
1248
  return o.replace(
1245
1249
  /{{([^}]+)}}/g,
1246
- (r, s) => J({
1247
- code: s,
1248
- context: e.context || {},
1249
- localState: void 0,
1250
- rootState: e.builderContextSignal.rootState,
1251
- rootSetState: e.builderContextSignal.rootSetState
1252
- })
1250
+ (r, s) => String(
1251
+ J({
1252
+ code: s,
1253
+ context: e.context || {},
1254
+ localState: void 0,
1255
+ rootState: e.builderContextSignal.rootState,
1256
+ rootSetState: e.builderContextSignal.rootSetState,
1257
+ enableCache: !0
1258
+ })
1259
+ )
1253
1260
  );
1254
1261
  }
1255
1262
  function ie({ url: o, key: r }) {
1256
- he(o).then((s) => s.json()).then((s) => {
1257
- var u, h;
1263
+ fe(o).then((s) => s.json()).then((s) => {
1264
+ var u, g;
1258
1265
  const l = {
1259
1266
  ...e.builderContextSignal.rootState,
1260
1267
  [r]: s
1261
1268
  };
1262
- (h = (u = e.builderContextSignal).rootSetState) == null || h.call(u, l), I[r] = !0;
1269
+ (g = (u = e.builderContextSignal).rootSetState) == null || g.call(u, l), I[r] = !0;
1263
1270
  }).catch((s) => {
1264
1271
  console.error("error fetching dynamic data", o, s);
1265
1272
  });
1266
1273
  }
1267
- function L() {
1274
+ function H() {
1268
1275
  var r, s, l;
1269
1276
  const o = (l = (s = (r = e.builderContextSignal.content) == null ? void 0 : r.data) == null ? void 0 : s.httpRequests) != null ? l : {};
1270
- Object.entries(o).forEach(([u, h]) => {
1271
- if (h && (!I[u] || U())) {
1272
- const w = T(h);
1277
+ Object.entries(o).forEach(([u, g]) => {
1278
+ if (g && (!I[u] || P())) {
1279
+ const w = T(g);
1273
1280
  ie({
1274
1281
  url: w,
1275
1282
  key: u
@@ -1277,8 +1284,8 @@ function ct(e) {
1277
1284
  }
1278
1285
  });
1279
1286
  }
1280
- function E() {
1281
- U() && window.dispatchEvent(
1287
+ function R() {
1288
+ P() && window.dispatchEvent(
1282
1289
  new CustomEvent(
1283
1290
  "builder:component:stateChange",
1284
1291
  {
@@ -1294,8 +1301,8 @@ function ct(e) {
1294
1301
  }
1295
1302
  return y(() => {
1296
1303
  var o, r;
1297
- if (H()) {
1298
- if (U() && (a(n + 1), window.addEventListener("message", x), se(), le({
1304
+ if ($()) {
1305
+ if (P() && (a(n + 1), window.addEventListener("message", x), se(), le({
1299
1306
  ...e.locale ? {
1300
1307
  locale: e.locale
1301
1308
  } : {},
@@ -1308,48 +1315,48 @@ function ct(e) {
1308
1315
  }), Object.values(
1309
1316
  e.builderContextSignal.componentInfos
1310
1317
  ).forEach((l) => {
1311
- var h;
1318
+ var g;
1312
1319
  const u = de(l);
1313
- (h = window.parent) == null || h.postMessage(u, "*");
1320
+ (g = window.parent) == null || g.postMessage(u, "*");
1314
1321
  }), window.addEventListener(
1315
1322
  "builder:component:stateChangeListenerActivated",
1316
- E
1317
- )), e.builderContextSignal.content && A(e.canTrack)) {
1318
- const l = (o = e.builderContextSignal.content) == null ? void 0 : o.testVariationId, u = (r = e.builderContextSignal.content) == null ? void 0 : r.id, h = e.apiKey;
1323
+ R
1324
+ )), e.builderContextSignal.content && W(e.canTrack)) {
1325
+ const l = (o = e.builderContextSignal.content) == null ? void 0 : o.testVariationId, u = (r = e.builderContextSignal.content) == null ? void 0 : r.id, g = e.apiKey;
1319
1326
  O({
1320
1327
  type: "impression",
1321
1328
  canTrack: !0,
1322
1329
  contentId: u,
1323
- apiKey: h,
1330
+ apiKey: g,
1324
1331
  variationId: l !== u ? l : void 0
1325
1332
  });
1326
1333
  }
1327
1334
  if (ce()) {
1328
- const l = new URL(location.href).searchParams, u = l.get("builder.preview"), h = l.get(
1335
+ const l = new URL(location.href).searchParams, u = l.get("builder.preview"), g = l.get(
1329
1336
  `builder.preview.${u}`
1330
1337
  ), w = l.get("apiKey") || l.get("builder.space");
1331
- u === e.model && w === e.apiKey && (!e.content || h === e.content.id) && ue({
1338
+ u === e.model && w === e.apiKey && (!e.content || g === e.content.id) && ue({
1332
1339
  model: e.model,
1333
1340
  apiKey: e.apiKey,
1334
1341
  apiVersion: e.builderContextSignal.apiVersion
1335
- }).then((F) => {
1336
- F && m(F);
1342
+ }).then((E) => {
1343
+ E && m(E);
1337
1344
  });
1338
1345
  }
1339
1346
  }
1340
1347
  }, []), y(() => {
1341
1348
  e.apiKey || me.error(
1342
1349
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
1343
- ), k(), L(), E();
1350
+ ), k(), H(), R();
1344
1351
  }, []), y(() => {
1345
1352
  e.content && m(e.content);
1346
1353
  }, [e.content]), y(() => {
1347
1354
  }, [i]), y(() => {
1348
1355
  k();
1349
- }, [(q = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : q.jsCode]), y(() => {
1350
- L();
1351
- }, [(_ = (K = e.builderContextSignal.content) == null ? void 0 : K.data) == null ? void 0 : _.httpRequests]), y(() => {
1352
- E();
1356
+ }, [(N = (L = e.builderContextSignal.content) == null ? void 0 : L.data) == null ? void 0 : N.jsCode]), y(() => {
1357
+ H();
1358
+ }, [(q = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : q.httpRequests]), y(() => {
1359
+ R();
1353
1360
  }, [e.builderContextSignal.rootState]), y(() => {
1354
1361
  e.data && c(e.data);
1355
1362
  }, [e.data]), y(() => {
@@ -1357,27 +1364,27 @@ function ct(e) {
1357
1364
  locale: e.locale
1358
1365
  });
1359
1366
  }, [e.locale]), y(() => () => {
1360
- H() && (window.removeEventListener("message", x), window.removeEventListener(
1367
+ $() && (window.removeEventListener("message", x), window.removeEventListener(
1361
1368
  "builder:component:stateChangeListenerActivated",
1362
- E
1369
+ R
1363
1370
  ));
1364
- }, []), /* @__PURE__ */ g(Te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ g(V, { children: /* @__PURE__ */ re(
1371
+ }, []), /* @__PURE__ */ b(Te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ re(
1365
1372
  d,
1366
1373
  {
1367
1374
  key: n,
1368
1375
  ref: t,
1369
1376
  onClick: (o) => v(o),
1370
- "builder-content-id": (B = e.builderContextSignal.content) == null ? void 0 : B.id,
1377
+ "builder-content-id": (K = e.builderContextSignal.content) == null ? void 0 : K.id,
1371
1378
  "builder-model": e.model,
1372
1379
  ...e.showContent ? {} : {
1373
1380
  hidden: !0,
1374
1381
  "aria-hidden": !0
1375
1382
  },
1376
1383
  ...e.contentWrapperProps,
1377
- className: `variant-${((M = e.content) == null ? void 0 : M.testVariationId) || ((N = e.content) == null ? void 0 : N.id)}`
1384
+ className: `variant-${((_ = e.content) == null ? void 0 : _.testVariationId) || ((B = e.content) == null ? void 0 : B.id)}`
1378
1385
  },
1379
1386
  e.children
1380
- ) }) : null });
1387
+ ) : null });
1381
1388
  }
1382
1389
  const ut = (e) => {
1383
1390
  var m, i;
@@ -1413,18 +1420,7 @@ font-weight: ${p};
1413
1420
  }, pt = ({
1414
1421
  cssCode: e,
1415
1422
  contentId: t
1416
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
1417
- function gt(e) {
1418
- const [t, n] = b(
1419
- () => `
1420
- ${pt({
1421
- cssCode: e.cssCode,
1422
- contentId: e.contentId
1423
- })}
1424
- ${mt({
1425
- customFonts: e.customFonts
1426
- })}
1427
-
1423
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", gt = `
1428
1424
  .builder-button {
1429
1425
  all: unset;
1430
1426
  }
@@ -1441,11 +1437,23 @@ ${mt({
1441
1437
  text-align: inherit;
1442
1438
  font-family: inherit;
1443
1439
  }
1440
+ `, ft = (e) => e ? "" : gt;
1441
+ function ht(e) {
1442
+ const [t, n] = h(
1443
+ () => `
1444
+ ${pt({
1445
+ cssCode: e.cssCode,
1446
+ contentId: e.contentId
1447
+ })}
1448
+ ${mt({
1449
+ customFonts: e.customFonts
1450
+ })}
1451
+ ${ft(e.isNestedRender)}
1444
1452
  `.trim()
1445
1453
  );
1446
- return /* @__PURE__ */ g(ee, { styles: t });
1454
+ return /* @__PURE__ */ b(ee, { styles: t });
1447
1455
  }
1448
- const ht = ({
1456
+ const bt = ({
1449
1457
  content: e,
1450
1458
  data: t,
1451
1459
  locale: n
@@ -1462,7 +1470,7 @@ const ht = ({
1462
1470
  locale: n
1463
1471
  } : {}
1464
1472
  };
1465
- }, ft = ({
1473
+ }, yt = ({
1466
1474
  content: e,
1467
1475
  data: t
1468
1476
  }) => e ? {
@@ -1474,8 +1482,8 @@ const ht = ({
1474
1482
  meta: e == null ? void 0 : e.meta
1475
1483
  } : void 0;
1476
1484
  function X(e) {
1477
- var d, f, x, k, I, P, R;
1478
- const [t, n] = b(
1485
+ var d, f, x, k, I, A, V;
1486
+ const [t, n] = h(
1479
1487
  () => {
1480
1488
  var S, v;
1481
1489
  return rt({
@@ -1492,7 +1500,7 @@ function X(e) {
1492
1500
  rootState: S
1493
1501
  }));
1494
1502
  }
1495
- const [c, m] = b(
1503
+ const [c, m] = h(
1496
1504
  () => [
1497
1505
  ...Y(),
1498
1506
  ...e.customComponents || []
@@ -1506,13 +1514,13 @@ function X(e) {
1506
1514
  }),
1507
1515
  {}
1508
1516
  )
1509
- ), [i, p] = b(() => ({
1510
- content: ft({
1517
+ ), [i, p] = h(() => ({
1518
+ content: yt({
1511
1519
  content: e.content,
1512
1520
  data: e.data
1513
1521
  }),
1514
1522
  localState: void 0,
1515
- rootState: ht({
1523
+ rootState: bt({
1516
1524
  content: e.content,
1517
1525
  data: e.data,
1518
1526
  locale: e.locale
@@ -1535,13 +1543,13 @@ function X(e) {
1535
1543
  BlocksWrapper: e.blocksWrapper || "div",
1536
1544
  BlocksWrapperProps: e.blocksWrapperProps || {}
1537
1545
  }));
1538
- return /* @__PURE__ */ g(
1546
+ return /* @__PURE__ */ b(
1539
1547
  Ve.Provider,
1540
1548
  {
1541
1549
  value: {
1542
1550
  registeredComponents: c
1543
1551
  },
1544
- children: /* @__PURE__ */ $(
1552
+ children: /* @__PURE__ */ U(
1545
1553
  ct,
1546
1554
  {
1547
1555
  content: e.content,
@@ -1560,19 +1568,20 @@ function X(e) {
1560
1568
  trustedHosts: e.trustedHosts,
1561
1569
  setBuilderContextSignal: p,
1562
1570
  children: [
1563
- e.isSsrAbTest ? /* @__PURE__ */ g(V, { children: /* @__PURE__ */ g(D, { scriptStr: t }) }) : null,
1564
- /* @__PURE__ */ g(V, { children: /* @__PURE__ */ g(
1565
- gt,
1571
+ e.isSsrAbTest ? /* @__PURE__ */ b(D, { scriptStr: t }) : null,
1572
+ /* @__PURE__ */ b(
1573
+ ht,
1566
1574
  {
1575
+ isNestedRender: e.isNestedRender,
1567
1576
  contentId: (d = i.content) == null ? void 0 : d.id,
1568
1577
  cssCode: (x = (f = i.content) == null ? void 0 : f.data) == null ? void 0 : x.cssCode,
1569
1578
  customFonts: (I = (k = i.content) == null ? void 0 : k.data) == null ? void 0 : I.customFonts
1570
1579
  }
1571
- ) }),
1572
- /* @__PURE__ */ g(
1580
+ ),
1581
+ /* @__PURE__ */ b(
1573
1582
  Re,
1574
1583
  {
1575
- blocks: (R = (P = i.content) == null ? void 0 : P.data) == null ? void 0 : R.blocks,
1584
+ blocks: (V = (A = i.content) == null ? void 0 : A.data) == null ? void 0 : V.blocks,
1576
1585
  context: i,
1577
1586
  registeredComponents: c,
1578
1587
  linkComponent: e.linkComponent
@@ -1584,18 +1593,18 @@ function X(e) {
1584
1593
  }
1585
1594
  );
1586
1595
  }
1587
- function Ct(e) {
1596
+ function wt(e) {
1588
1597
  var i, p;
1589
- const [t, n] = b(
1598
+ const [t, n] = h(
1590
1599
  () => nt({
1591
- canTrack: A(e.canTrack),
1600
+ canTrack: W(e.canTrack),
1592
1601
  content: e.content
1593
1602
  })
1594
1603
  );
1595
1604
  function a() {
1596
1605
  var d;
1597
1606
  return ot(
1598
- W(e.content).map((f) => ({
1607
+ F(e.content).map((f) => ({
1599
1608
  id: f.testVariationId,
1600
1609
  testRatio: f.testRatio
1601
1610
  })),
@@ -1603,33 +1612,34 @@ function Ct(e) {
1603
1612
  );
1604
1613
  }
1605
1614
  function c() {
1606
- return W(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
1615
+ return F(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
1607
1616
  }
1608
1617
  function m() {
1609
1618
  var d;
1610
1619
  return t ? {
1611
1620
  ...e.content,
1612
1621
  testVariationId: (d = e.content) == null ? void 0 : d.id
1613
- } : fe({
1622
+ } : he({
1614
1623
  item: e.content,
1615
- canTrack: A(e.canTrack)
1624
+ canTrack: W(e.canTrack)
1616
1625
  });
1617
1626
  }
1618
1627
  return y(() => {
1619
- }, []), /* @__PURE__ */ $(V, { children: [
1620
- !e.__isNestedRender && Z !== "reactNative" ? /* @__PURE__ */ g(V, { children: /* @__PURE__ */ g(D, { scriptStr: it() }) }) : null,
1621
- t ? /* @__PURE__ */ $(V, { children: [
1622
- /* @__PURE__ */ g(
1628
+ }, []), /* @__PURE__ */ U(M, { children: [
1629
+ !e.isNestedRender && Z !== "reactNative" ? /* @__PURE__ */ b(D, { scriptStr: it() }) : null,
1630
+ t ? /* @__PURE__ */ U(M, { children: [
1631
+ /* @__PURE__ */ b(
1623
1632
  ee,
1624
1633
  {
1625
1634
  id: `variants-styles-${(i = e.content) == null ? void 0 : i.id}`,
1626
1635
  styles: c()
1627
1636
  }
1628
1637
  ),
1629
- /* @__PURE__ */ g(D, { scriptStr: a() }),
1630
- (p = W(e.content)) == null ? void 0 : p.map((d) => /* @__PURE__ */ g(
1638
+ /* @__PURE__ */ b(D, { scriptStr: a() }),
1639
+ (p = F(e.content)) == null ? void 0 : p.map((d) => /* @__PURE__ */ b(
1631
1640
  X,
1632
1641
  {
1642
+ isNestedRender: e.isNestedRender,
1633
1643
  content: d,
1634
1644
  showContent: !1,
1635
1645
  model: e.model,
@@ -1652,9 +1662,10 @@ function Ct(e) {
1652
1662
  d.testVariationId
1653
1663
  ))
1654
1664
  ] }) : null,
1655
- /* @__PURE__ */ g(
1665
+ /* @__PURE__ */ b(
1656
1666
  X,
1657
1667
  {
1668
+ isNestedRender: e.isNestedRender,
1658
1669
  content: m(),
1659
1670
  showContent: !0,
1660
1671
  model: e.model,
@@ -1678,5 +1689,5 @@ function Ct(e) {
1678
1689
  ] });
1679
1690
  }
1680
1691
  export {
1681
- Ct as default
1692
+ wt as default
1682
1693
  };