@builder.io/sdk-react 2.0.29 → 2.0.31

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 (69) hide show
  1. package/lib/browser/blocks-exports.cjs +18 -18
  2. package/lib/browser/blocks-exports.mjs +584 -587
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/{edge/server-entry-05dd3f4b.js → browser/server-entry-77f4513c.js} +245 -228
  6. package/lib/browser/server-entry-d7a13b14.cjs +2 -0
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-200ac141.cjs → accordion-696fad97.cjs} +1 -1
  10. package/lib/edge/{accordion-1fae9bd5.js → accordion-d1213549.js} +1 -1
  11. package/lib/edge/{blocks-b47cd3fc.js → blocks-9ef79098.js} +3 -3
  12. package/lib/edge/{blocks-fd9e445c.cjs → blocks-aa67fee8.cjs} +1 -1
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-ffe70d17.cjs → button-2ed05d22.cjs} +1 -1
  16. package/lib/edge/{button-5cc9a94f.js → button-b41f1129.js} +2 -2
  17. package/lib/edge/{columns-9ad996bb.js → columns-5f8497fb.js} +4 -4
  18. package/lib/edge/{columns-7651ba21.cjs → columns-ca9ac444.cjs} +1 -1
  19. package/lib/edge/{content-variants-a9017964.cjs → content-variants-2f5a6ccd.cjs} +4 -4
  20. package/lib/edge/{content-variants-0ece6057.js → content-variants-9c4db669.js} +118 -118
  21. package/lib/edge/{evaluate-73e0df40.cjs → evaluate-8453ffc0.cjs} +1 -1
  22. package/lib/edge/{evaluate-5cfe10b0.js → evaluate-f626f584.js} +1 -1
  23. package/lib/edge/{form-186bf59f.js → form-a5407307.js} +30 -33
  24. package/lib/edge/form-b0c5418b.cjs +1 -0
  25. package/lib/edge/{get-class-prop-name-7d6a77a4.js → get-class-prop-name-40d6defb.js} +1 -1
  26. package/lib/edge/{get-class-prop-name-11734dbc.cjs → get-class-prop-name-86f0330a.cjs} +1 -1
  27. package/lib/edge/{img-ef160d2b.cjs → img-83ed868e.cjs} +1 -1
  28. package/lib/edge/{img-6c1f4ea4.js → img-fa36f926.js} +1 -1
  29. package/lib/edge/index.cjs +1 -1
  30. package/lib/edge/index.mjs +1 -1
  31. package/lib/edge/{input-97dc199a.cjs → input-3106b577.cjs} +1 -1
  32. package/lib/edge/{input-b4ee4339.js → input-93e42e28.js} +1 -1
  33. package/lib/edge/{select-2cdf2c8f.cjs → select-29495824.cjs} +1 -1
  34. package/lib/edge/{select-e79d6e1b.js → select-4cf4356a.js} +1 -1
  35. package/lib/edge/server-entry-4cd5389e.cjs +2 -0
  36. package/lib/{node/server-entry-00c52924.js → edge/server-entry-ea35faa6.js} +243 -231
  37. package/lib/edge/server-entry.cjs +1 -1
  38. package/lib/edge/server-entry.mjs +1 -1
  39. package/lib/edge/{slot-680234a8.js → slot-6ad4152e.js} +4 -4
  40. package/lib/edge/{slot-66ba436b.cjs → slot-c8ab71b6.cjs} +1 -1
  41. package/lib/edge/{symbol-4d0b1228.cjs → symbol-74313a4b.cjs} +1 -1
  42. package/lib/edge/{symbol-e920f028.js → symbol-d2b48e54.js} +2 -2
  43. package/lib/edge/{tabs-1bea88d1.js → tabs-6d924c90.js} +4 -4
  44. package/lib/edge/{tabs-1f3f45cf.cjs → tabs-f699b318.cjs} +1 -1
  45. package/lib/edge/{text-9533b278.cjs → text-7120ee0c.cjs} +1 -1
  46. package/lib/edge/{text-fd78274f.js → text-7137a306.js} +2 -2
  47. package/lib/node/blocks-exports.cjs +20 -20
  48. package/lib/node/blocks-exports.mjs +576 -579
  49. package/lib/node/index.cjs +1 -1
  50. package/lib/node/index.mjs +3 -3
  51. package/lib/node/init.cjs +1 -1
  52. package/lib/node/init.mjs +3 -3
  53. package/lib/{browser/server-entry-712b1faa.js → node/server-entry-32ef60c0.js} +213 -197
  54. package/lib/node/server-entry-9c026e49.cjs +2 -0
  55. package/lib/node/server-entry.cjs +1 -1
  56. package/lib/node/server-entry.mjs +1 -1
  57. package/lib/node/{setIvm-156def75.js → setIvm-26e65816.js} +1 -1
  58. package/lib/node/{setIvm-ca4d1590.cjs → setIvm-bf1ad328.cjs} +1 -1
  59. package/lib/node/setIvm.cjs +1 -1
  60. package/lib/node/setIvm.mjs +2 -2
  61. package/lib/node/{should-force-browser-runtime-in-node-bc24fcdd.cjs → should-force-browser-runtime-in-node-000957e3.cjs} +1 -1
  62. package/lib/node/{should-force-browser-runtime-in-node-eb3eac6a.js → should-force-browser-runtime-in-node-343fd6c7.js} +1 -1
  63. package/package.json +1 -1
  64. package/types/constants/sdk-version.d.ts +1 -1
  65. package/types/functions/log-fetch.d.ts +1 -0
  66. package/lib/browser/server-entry-3e3279b7.cjs +0 -2
  67. package/lib/edge/form-c98c7fc1.cjs +0 -1
  68. package/lib/edge/server-entry-0224e0bb.cjs +0 -2
  69. package/lib/node/server-entry-0b1fe826.cjs +0 -2
@@ -1,10 +1,10 @@
1
1
  import { jsx as b, jsxs as $, Fragment as M } from "react/jsx-runtime";
2
- import { lazy as v, useRef as q, useState as T, useEffect as C } from "react";
3
- import { isBrowser as j, TARGET as G, isEditing as A, registerInsertMenu as ie, setupBrowserForEditing as oe, createRegisterComponentMessage as re, getDefaultCanTrack as H, _track as O, isPreviewing as le, fetchOneEntry as se, createEditorListener as de, serializeIncludingFunctions as _, logger as ue, handleABTestingSync as ce } from "./server-entry-05dd3f4b.js";
4
- import { Video as me, Button as pe, Columns as ge, Fragment as fe, Image as he, Section as be, Symbol as ye, Text as xe, BuilderContext as ve } from "./blocks-exports.mjs";
5
- import { triggerAnimation as Se, fastClone as Te, InlinedStyles as X, ComponentsContext as ke, Blocks as Ie } from "./blocks-b47cd3fc.js";
6
- import { evaluate as Z } from "./evaluate-5cfe10b0.js";
7
- import "./get-class-prop-name-7d6a77a4.js";
2
+ import { lazy as v, useRef as q, useState as T, useEffect as w } from "react";
3
+ import { isBrowser as j, TARGET as G, isEditing as A, registerInsertMenu as ie, setupBrowserForEditing as oe, createRegisterComponentMessage as re, getDefaultCanTrack as H, _track as O, isPreviewing as le, fetchOneEntry as se, createEditorListener as de, logFetch as ue, serializeIncludingFunctions as _, logger as ce, handleABTestingSync as me } from "./server-entry-ea35faa6.js";
4
+ import { Video as pe, Button as ge, Columns as fe, Fragment as he, Image as be, Section as ye, Symbol as xe, Text as ve, BuilderContext as Se } from "./blocks-exports.mjs";
5
+ import { triggerAnimation as Te, fastClone as ke, InlinedStyles as X, ComponentsContext as Ie, Blocks as Ce } from "./blocks-9ef79098.js";
6
+ import { evaluate as Z } from "./evaluate-f626f584.js";
7
+ import "./get-class-prop-name-40d6defb.js";
8
8
  import "./dynamic-renderer-8b343325.js";
9
9
  const D = {
10
10
  "@type": "@builder.io/sdk:Element",
@@ -66,7 +66,7 @@ const D = {
66
66
  }
67
67
  }
68
68
  }]
69
- }, Ce = {
69
+ }, we = {
70
70
  name: "Builder:Accordion",
71
71
  canHaveChildren: !0,
72
72
  image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
@@ -130,7 +130,7 @@ const D = {
130
130
  builderComponents: !0,
131
131
  builderLinkComponent: !0
132
132
  }
133
- }, we = v(() => import("./accordion-1fae9bd5.js")), Ve = {
133
+ }, Ve = v(() => import("./accordion-d1213549.js")), Re = {
134
134
  name: "Core:Button",
135
135
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
136
136
  defaultStyles: {
@@ -166,7 +166,7 @@ const D = {
166
166
  shouldReceiveBuilderProps: {
167
167
  builderLinkComponent: !0
168
168
  }
169
- }, Re = {
169
+ }, Ee = {
170
170
  // TODO: ways to statically preprocess JSON for references, functions, etc
171
171
  name: "Columns",
172
172
  isRSC: !0,
@@ -373,13 +373,13 @@ const D = {
373
373
  builderComponents: !0,
374
374
  builderLinkComponent: !0
375
375
  }
376
- }, Ee = {
376
+ }, Fe = {
377
377
  name: "Fragment",
378
378
  static: !0,
379
379
  hidden: !0,
380
380
  canHaveChildren: !0,
381
381
  noWrap: !0
382
- }, Fe = {
382
+ }, Pe = {
383
383
  name: "Image",
384
384
  static: !0,
385
385
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
@@ -402,13 +402,13 @@ const D = {
402
402
  function n(a, o = 6e4) {
403
403
  return new Promise((p, S) => {
404
404
  const y = document.createElement("img");
405
- let w = !1;
405
+ let V = !1;
406
406
  y.onload = () => {
407
- w = !0, p(y);
407
+ V = !0, p(y);
408
408
  }, y.addEventListener("error", (k) => {
409
409
  console.warn("Image load failed", k.error), S(k.error);
410
410
  }), y.src = a, setTimeout(() => {
411
- w || S(new Error("Image load timed out"));
411
+ V || S(new Error("Image load timed out"));
412
412
  }, o);
413
413
  });
414
414
  }
@@ -487,7 +487,7 @@ const D = {
487
487
  shouldReceiveBuilderProps: {
488
488
  builderBlock: !0
489
489
  }
490
- }, Pe = {
490
+ }, We = {
491
491
  name: "Core:Section",
492
492
  static: !0,
493
493
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -526,7 +526,7 @@ const D = {
526
526
  }
527
527
  }
528
528
  }]
529
- }, We = {
529
+ }, Ae = {
530
530
  name: "Slot",
531
531
  isRSC: !0,
532
532
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -543,7 +543,7 @@ const D = {
543
543
  builderContext: !0,
544
544
  builderComponents: !0
545
545
  }
546
- }, Ae = v(() => import("./slot-680234a8.js")), Be = {
546
+ }, Be = v(() => import("./slot-6ad4152e.js")), He = {
547
547
  name: "Symbol",
548
548
  noWrap: !0,
549
549
  static: !0,
@@ -620,7 +620,7 @@ const D = {
620
620
  text: "New tab content "
621
621
  }
622
622
  }
623
- }, He = {
623
+ }, De = {
624
624
  name: "Builder: Tabs",
625
625
  inputs: [{
626
626
  name: "tabs",
@@ -723,7 +723,7 @@ const D = {
723
723
  builderComponents: !0,
724
724
  builderLinkComponent: !0
725
725
  }
726
- }, De = v(() => import("./tabs-1bea88d1.js")), Ue = {
726
+ }, Ue = v(() => import("./tabs-6d924c90.js")), Le = {
727
727
  shouldReceiveBuilderProps: {
728
728
  builderBlock: !1,
729
729
  builderContext: !0
@@ -745,7 +745,7 @@ const D = {
745
745
  height: "auto",
746
746
  textAlign: "center"
747
747
  }
748
- }, Le = {
748
+ }, Ne = {
749
749
  name: "Custom Code",
750
750
  static: !0,
751
751
  requiredPermissions: ["editCode"],
@@ -767,7 +767,7 @@ const D = {
767
767
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
768
768
  advanced: !0
769
769
  }]
770
- }, Ne = v(() => import("./custom-code-7786788e.js")), $e = {
770
+ }, $e = v(() => import("./custom-code-7786788e.js")), qe = {
771
771
  name: "Embed",
772
772
  static: !0,
773
773
  inputs: [{
@@ -782,7 +782,7 @@ const D = {
782
782
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
783
783
  hideFromUI: !0
784
784
  }]
785
- }, qe = v(() => import("./embed-5c1bbe12.js")), je = {
785
+ }, je = v(() => import("./embed-5c1bbe12.js")), Ke = {
786
786
  name: "Form:Form",
787
787
  // editableTags: ['builder-form-error']
788
788
  defaults: {
@@ -1019,7 +1019,7 @@ const D = {
1019
1019
  builderComponents: !0,
1020
1020
  builderLinkComponent: !0
1021
1021
  }
1022
- }, Ke = v(() => import("./form-186bf59f.js")), Me = {
1022
+ }, Me = v(() => import("./form-a5407307.js")), Oe = {
1023
1023
  name: "Form:Input",
1024
1024
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
1025
1025
  inputs: [
@@ -1070,7 +1070,7 @@ const D = {
1070
1070
  borderStyle: "solid",
1071
1071
  borderColor: "#ccc"
1072
1072
  }
1073
- }, Oe = v(() => import("./input-b4ee4339.js")), _e = {
1073
+ }, _e = v(() => import("./input-93e42e28.js")), ze = {
1074
1074
  name: "Form:Select",
1075
1075
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
1076
1076
  defaultStyles: {
@@ -1112,7 +1112,7 @@ const D = {
1112
1112
  }],
1113
1113
  static: !0,
1114
1114
  noWrap: !0
1115
- }, ze = v(() => import("./select-e79d6e1b.js")), Je = {
1115
+ }, Je = v(() => import("./select-4cf4356a.js")), Ye = {
1116
1116
  name: "Form:SubmitButton",
1117
1117
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
1118
1118
  defaultStyles: {
@@ -1137,7 +1137,7 @@ const D = {
1137
1137
  // that only shows if advanced setting is flipped
1138
1138
  // TODO: defaultChildren
1139
1139
  // canHaveChildren: true,
1140
- }, Ye = v(() => import("./submit-button-b48361a7.js")), Qe = {
1140
+ }, Qe = v(() => import("./submit-button-b48361a7.js")), Ge = {
1141
1141
  name: "Form:TextArea",
1142
1142
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
1143
1143
  inputs: [{
@@ -1173,7 +1173,7 @@ const D = {
1173
1173
  },
1174
1174
  static: !0,
1175
1175
  noWrap: !0
1176
- }, Ge = v(() => import("./textarea-d29025e9.js")), Xe = {
1176
+ }, Xe = v(() => import("./textarea-d29025e9.js")), Ze = {
1177
1177
  // friendlyName?
1178
1178
  name: "Raw:Img",
1179
1179
  hideFromInsertMenu: !0,
@@ -1187,7 +1187,7 @@ const D = {
1187
1187
  }],
1188
1188
  noWrap: !0,
1189
1189
  static: !0
1190
- }, Ze = v(() => import("./img-6c1f4ea4.js")), et = {
1190
+ }, et = v(() => import("./img-fa36f926.js")), tt = {
1191
1191
  name: "Video",
1192
1192
  canHaveChildren: !0,
1193
1193
  defaultStyles: {
@@ -1271,37 +1271,34 @@ const D = {
1271
1271
  shouldReceiveBuilderProps: {
1272
1272
  builderBlock: !0
1273
1273
  }
1274
- }, tt = () => [{
1275
- component: Ne,
1276
- ...Le
1274
+ }, nt = () => [{
1275
+ component: $e,
1276
+ ...Ne
1277
1277
  }, {
1278
- component: qe,
1279
- ...$e
1278
+ component: je,
1279
+ ...qe
1280
1280
  }, {
1281
- component: Ke,
1282
- ...je
1281
+ component: Me,
1282
+ ...Ke
1283
1283
  }, {
1284
- component: Oe,
1285
- ...Me
1284
+ component: _e,
1285
+ ...Oe
1286
1286
  }, {
1287
- component: Ye,
1288
- ...Je
1287
+ component: Qe,
1288
+ ...Ye
1289
1289
  }, {
1290
- component: ze,
1291
- ..._e
1290
+ component: Je,
1291
+ ...ze
1292
1292
  }, {
1293
- component: Ge,
1294
- ...Qe
1293
+ component: Xe,
1294
+ ...Ge
1295
1295
  }, {
1296
- component: Ze,
1297
- ...Xe
1296
+ component: et,
1297
+ ...Ze
1298
1298
  }, {
1299
- component: me,
1300
- ...et
1301
- }], z = () => [{
1302
1299
  component: pe,
1303
- ...Ve
1304
- }, {
1300
+ ...tt
1301
+ }], z = () => [{
1305
1302
  component: ge,
1306
1303
  ...Re
1307
1304
  }, {
@@ -1314,21 +1311,24 @@ const D = {
1314
1311
  component: be,
1315
1312
  ...Pe
1316
1313
  }, {
1317
- component: Ae,
1314
+ component: ye,
1318
1315
  ...We
1319
1316
  }, {
1320
- component: ye,
1321
- ...Be
1317
+ component: Be,
1318
+ ...Ae
1322
1319
  }, {
1323
1320
  component: xe,
1324
- ...Ue
1325
- }, {
1326
- component: De,
1327
1321
  ...He
1328
1322
  }, {
1329
- component: we,
1330
- ...Ce
1331
- }, ...tt()], nt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1323
+ component: ve,
1324
+ ...Le
1325
+ }, {
1326
+ component: Ue,
1327
+ ...De
1328
+ }, {
1329
+ component: Ve,
1330
+ ...we
1331
+ }, ...nt()], at = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1332
1332
  function getAndSetVariantId() {
1333
1333
  function setCookie(name, value, days) {
1334
1334
  let expires = '';
@@ -1384,7 +1384,7 @@ const D = {
1384
1384
  }).join('');
1385
1385
  styleEl.innerHTML = newStyleStr;
1386
1386
  }
1387
- }`, at = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1387
+ }`, it = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1388
1388
  if (!navigator.cookieEnabled) {
1389
1389
  return;
1390
1390
  }
@@ -1422,16 +1422,16 @@ const D = {
1422
1422
  ...t,
1423
1423
  testVariationId: t.id,
1424
1424
  id: e == null ? void 0 : e.id
1425
- })), it = ({
1425
+ })), ot = ({
1426
1426
  canTrack: e,
1427
1427
  content: t
1428
- }) => !(!(B(t).length > 0) || !e || j()), ot = (e) => e === "react" || e === "reactNative", ne = ot(G), rt = () => `
1429
- window.${ee} = ${nt}
1430
- window.${te} = ${at}
1431
- `, lt = (e, t) => `
1428
+ }) => !(!(B(t).length > 0) || !e || j()), rt = (e) => e === "react" || e === "reactNative", ne = rt(G), lt = () => `
1429
+ window.${ee} = ${at}
1430
+ window.${te} = ${it}
1431
+ `, st = (e, t) => `
1432
1432
  window.${ee}(
1433
1433
  "${t}",${JSON.stringify(e)}, ${ne}
1434
- )`, st = ({
1434
+ )`, dt = ({
1435
1435
  contentId: e,
1436
1436
  variationId: t
1437
1437
  }) => `window.${te}(
@@ -1450,7 +1450,7 @@ function K(e) {
1450
1450
  function J(e) {
1451
1451
  return Math.round(e * 1e3) / 1e3;
1452
1452
  }
1453
- const dt = (e, t, n = !0) => {
1453
+ const ut = (e, t, n = !0) => {
1454
1454
  if (!(e instanceof HTMLElement))
1455
1455
  return null;
1456
1456
  let i = n ? e : e.parentElement;
@@ -1461,7 +1461,7 @@ const dt = (e, t, n = !0) => {
1461
1461
  return i;
1462
1462
  } while (i = i.parentElement);
1463
1463
  return null;
1464
- }, ut = (e) => dt(e, (t) => {
1464
+ }, ct = (e) => ut(e, (t) => {
1465
1465
  const n = t.getAttribute("builder-id") || t.id;
1466
1466
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
1467
1467
  }), Y = ({
@@ -1473,8 +1473,8 @@ const dt = (e, t, n = !0) => {
1473
1473
  x: m,
1474
1474
  y: a
1475
1475
  };
1476
- }, ct = (e) => {
1477
- const t = e.target, n = t && ut(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1476
+ }, mt = (e) => {
1477
+ const t = e.target, n = t && ct(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1478
1478
  return {
1479
1479
  targetBuilderElement: i || void 0,
1480
1480
  metadata: {
@@ -1489,7 +1489,7 @@ const dt = (e, t, n = !0) => {
1489
1489
  builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
1490
1490
  }
1491
1491
  };
1492
- }, mt = (e) => {
1492
+ }, pt = (e) => {
1493
1493
  var m, a;
1494
1494
  const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (m = e == null ? void 0 : e.files) == null ? void 0 : m.regular;
1495
1495
  let d = "";
@@ -1515,15 +1515,15 @@ font-weight: ${o};
1515
1515
  `.trim());
1516
1516
  }
1517
1517
  return d;
1518
- }, pt = ({
1518
+ }, gt = ({
1519
1519
  customFonts: e
1520
1520
  }) => {
1521
1521
  var t;
1522
- return ((t = e == null ? void 0 : e.map((n) => mt(n))) == null ? void 0 : t.join(" ")) || "";
1523
- }, gt = ({
1522
+ return ((t = e == null ? void 0 : e.map((n) => pt(n))) == null ? void 0 : t.join(" ")) || "";
1523
+ }, ft = ({
1524
1524
  cssCode: e,
1525
1525
  contentId: t
1526
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", ft = `
1526
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", ht = `
1527
1527
  .builder-button {
1528
1528
  all: unset;
1529
1529
  }
@@ -1540,8 +1540,8 @@ font-weight: ${o};
1540
1540
  text-align: inherit;
1541
1541
  font-family: inherit;
1542
1542
  }
1543
- `, ht = (e) => e ? "" : ft, bt = (e) => `variant-${e}`;
1544
- function yt(e) {
1543
+ `, bt = (e) => e ? "" : ht, yt = (e) => `variant-${e}`;
1544
+ function xt(e) {
1545
1545
  var g, u, E;
1546
1546
  const t = q(null);
1547
1547
  function n(r) {
@@ -1556,7 +1556,7 @@ function yt(e) {
1556
1556
  }));
1557
1557
  }
1558
1558
  function i(r) {
1559
- var f, s, l, h, V;
1559
+ var f, s, l, h, C;
1560
1560
  const c = {
1561
1561
  ...e.builderContextSignal.content,
1562
1562
  ...r,
@@ -1567,7 +1567,7 @@ function yt(e) {
1567
1567
  meta: {
1568
1568
  ...(s = e.builderContextSignal.content) == null ? void 0 : s.meta,
1569
1569
  ...r == null ? void 0 : r.meta,
1570
- breakpoints: ((l = r == null ? void 0 : r.meta) == null ? void 0 : l.breakpoints) || ((V = (h = e.builderContextSignal.content) == null ? void 0 : h.meta) == null ? void 0 : V.breakpoints)
1570
+ breakpoints: ((l = r == null ? void 0 : r.meta) == null ? void 0 : l.breakpoints) || ((C = (h = e.builderContextSignal.content) == null ? void 0 : h.meta) == null ? void 0 : C.breakpoints)
1571
1571
  }
1572
1572
  };
1573
1573
  e.setBuilderContextSignal((x) => ({
@@ -1599,7 +1599,7 @@ function yt(e) {
1599
1599
  });
1600
1600
  },
1601
1601
  animation: (c) => {
1602
- Se(c);
1602
+ Te(c);
1603
1603
  },
1604
1604
  contentUpdate: (c) => {
1605
1605
  i(c);
@@ -1607,7 +1607,7 @@ function yt(e) {
1607
1607
  }
1608
1608
  })(r);
1609
1609
  }
1610
- const [p, S] = T(() => ({})), [y, w] = T(() => ({})), [k, F] = T(() => !1);
1610
+ const [p, S] = T(() => ({})), [y, V] = T(() => ({})), [k, F] = T(() => !1);
1611
1611
  function P(r) {
1612
1612
  var c, f;
1613
1613
  if (e.builderContextSignal.content) {
@@ -1619,7 +1619,7 @@ function yt(e) {
1619
1619
  contentId: l,
1620
1620
  apiKey: e.apiKey,
1621
1621
  variationId: s !== l ? s : void 0,
1622
- ...ct(r),
1622
+ ...mt(r),
1623
1623
  unique: !k
1624
1624
  });
1625
1625
  }
@@ -1632,7 +1632,7 @@ function yt(e) {
1632
1632
  if (!h || y[l] || p[l] && !A())
1633
1633
  return;
1634
1634
  y[l] = !0;
1635
- const V = h.replace(
1635
+ const C = h.replace(
1636
1636
  /{{([^}]+)}}/g,
1637
1637
  (x, ae) => String(
1638
1638
  Z({
@@ -1644,7 +1644,7 @@ function yt(e) {
1644
1644
  })
1645
1645
  )
1646
1646
  );
1647
- fetch(V).then((x) => x.json()).then((x) => {
1647
+ ue(C), fetch(C).then((x) => x.json()).then((x) => {
1648
1648
  n({
1649
1649
  [l]: x
1650
1650
  }), p[l] = !0;
@@ -1661,7 +1661,7 @@ function yt(e) {
1661
1661
  "builder:component:stateChange",
1662
1662
  {
1663
1663
  detail: {
1664
- state: Te(e.builderContextSignal.rootState),
1664
+ state: ke(e.builderContextSignal.rootState),
1665
1665
  ref: {
1666
1666
  name: e.model
1667
1667
  }
@@ -1671,7 +1671,7 @@ function yt(e) {
1671
1671
  );
1672
1672
  }
1673
1673
  const R = q(!1);
1674
- return R.current || (W(), I(), R.current = !0), C(() => {
1674
+ return R.current || (W(), I(), R.current = !0), w(() => {
1675
1675
  var r, c;
1676
1676
  if (j()) {
1677
1677
  if (A() && !e.isNestedRender && (window.addEventListener("message", o), ie(), oe({
@@ -1707,8 +1707,8 @@ function yt(e) {
1707
1707
  if (le() && !A()) {
1708
1708
  const s = new URL(location.href).searchParams, l = s.get("builder.preview"), h = s.get(
1709
1709
  `builder.overrides.${l}`
1710
- ), V = s.get("apiKey") || s.get("builder.space");
1711
- l === e.model && V === e.apiKey && (!e.content || h === e.content.id) && se({
1710
+ ), C = s.get("apiKey") || s.get("builder.space");
1711
+ l === e.model && C === e.apiKey && (!e.content || h === e.content.id) && se({
1712
1712
  model: e.model,
1713
1713
  apiKey: e.apiKey,
1714
1714
  apiVersion: e.builderContextSignal.apiVersion
@@ -1717,29 +1717,29 @@ function yt(e) {
1717
1717
  });
1718
1718
  }
1719
1719
  }
1720
- }, []), C(() => {
1720
+ }, []), w(() => {
1721
1721
  e.content && i(e.content);
1722
- }, [e.content]), C(() => {
1722
+ }, [e.content]), w(() => {
1723
1723
  I();
1724
- }, [e.builderContextSignal.rootState]), C(() => {
1724
+ }, [e.builderContextSignal.rootState]), w(() => {
1725
1725
  e.data && n(e.data);
1726
- }, [e.data]), C(() => {
1726
+ }, [e.data]), w(() => {
1727
1727
  e.locale && n({
1728
1728
  locale: e.locale
1729
1729
  });
1730
- }, [e.locale]), C(() => () => {
1730
+ }, [e.locale]), w(() => () => {
1731
1731
  j() && (window.removeEventListener("message", o), window.removeEventListener(
1732
1732
  "builder:component:stateChangeListenerActivated",
1733
1733
  I
1734
1734
  ));
1735
- }, []), /* @__PURE__ */ b(ve.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ b(
1735
+ }, []), /* @__PURE__ */ b(Se.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ b(
1736
1736
  m,
1737
1737
  {
1738
1738
  ref: t,
1739
1739
  onClick: (r) => P(r),
1740
1740
  "builder-content-id": (g = e.builderContextSignal.content) == null ? void 0 : g.id,
1741
1741
  "builder-model": e.model,
1742
- className: bt(
1742
+ className: yt(
1743
1743
  ((u = e.content) == null ? void 0 : u.testVariationId) || ((E = e.content) == null ? void 0 : E.id)
1744
1744
  ),
1745
1745
  ...d(),
@@ -1748,17 +1748,17 @@ function yt(e) {
1748
1748
  }
1749
1749
  ) : null });
1750
1750
  }
1751
- function xt(e) {
1751
+ function vt(e) {
1752
1752
  const [t, n] = T(
1753
1753
  () => `
1754
- ${gt({
1754
+ ${ft({
1755
1755
  cssCode: e.cssCode,
1756
1756
  contentId: e.contentId
1757
1757
  })}
1758
- ${pt({
1758
+ ${gt({
1759
1759
  customFonts: e.customFonts
1760
1760
  })}
1761
- ${ht(e.isNestedRender)}
1761
+ ${bt(e.isNestedRender)}
1762
1762
  `.trim()
1763
1763
  );
1764
1764
  return /* @__PURE__ */ b(
@@ -1770,7 +1770,7 @@ ${ht(e.isNestedRender)}
1770
1770
  }
1771
1771
  );
1772
1772
  }
1773
- const vt = ({
1773
+ const St = ({
1774
1774
  content: e,
1775
1775
  data: t,
1776
1776
  locale: n
@@ -1787,7 +1787,7 @@ const vt = ({
1787
1787
  locale: n
1788
1788
  } : {}
1789
1789
  };
1790
- }, St = ({
1790
+ }, Tt = ({
1791
1791
  content: e,
1792
1792
  data: t
1793
1793
  }) => e ? {
@@ -1799,11 +1799,11 @@ const vt = ({
1799
1799
  meta: e == null ? void 0 : e.meta
1800
1800
  } : void 0;
1801
1801
  function Q(e) {
1802
- var S, y, w, k, F, P, W, I, R;
1802
+ var S, y, V, k, F, P, W, I, R;
1803
1803
  const [t, n] = T(
1804
1804
  () => {
1805
1805
  var g, u;
1806
- return st({
1806
+ return dt({
1807
1807
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
1808
1808
  variationId: (g = e.content) == null ? void 0 : g.testVariationId,
1809
1809
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
@@ -1837,12 +1837,12 @@ function Q(e) {
1837
1837
  ), [a, o] = T(() => {
1838
1838
  var g;
1839
1839
  return {
1840
- content: St({
1840
+ content: Tt({
1841
1841
  content: e.content,
1842
1842
  data: e.data
1843
1843
  }),
1844
1844
  localState: void 0,
1845
- rootState: vt({
1845
+ rootState: St({
1846
1846
  content: e.content,
1847
1847
  data: e.data,
1848
1848
  locale: e.locale
@@ -1869,7 +1869,7 @@ function Q(e) {
1869
1869
  };
1870
1870
  }), p = q(!1);
1871
1871
  if (!p.current) {
1872
- e.apiKey || ue.error(
1872
+ e.apiKey || ce.error(
1873
1873
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
1874
1874
  );
1875
1875
  const g = (y = (S = a.content) == null ? void 0 : S.data) == null ? void 0 : y.jsCode;
@@ -1885,13 +1885,13 @@ function Q(e) {
1885
1885
  }), p.current = !0;
1886
1886
  }
1887
1887
  return /* @__PURE__ */ b(
1888
- ke.Provider,
1888
+ Ie.Provider,
1889
1889
  {
1890
1890
  value: {
1891
1891
  registeredComponents: d
1892
1892
  },
1893
1893
  children: /* @__PURE__ */ $(
1894
- yt,
1894
+ xt,
1895
1895
  {
1896
1896
  apiHost: e.apiHost,
1897
1897
  nonce: e.nonce,
@@ -1920,17 +1920,17 @@ function Q(e) {
1920
1920
  }
1921
1921
  ) : null,
1922
1922
  /* @__PURE__ */ b(
1923
- xt,
1923
+ vt,
1924
1924
  {
1925
1925
  nonce: e.nonce || "",
1926
1926
  isNestedRender: e.isNestedRender,
1927
- contentId: (w = a.content) == null ? void 0 : w.id,
1927
+ contentId: (V = a.content) == null ? void 0 : V.id,
1928
1928
  cssCode: (F = (k = a.content) == null ? void 0 : k.data) == null ? void 0 : F.cssCode,
1929
1929
  customFonts: (W = (P = a.content) == null ? void 0 : P.data) == null ? void 0 : W.customFonts
1930
1930
  }
1931
1931
  ),
1932
1932
  /* @__PURE__ */ b(
1933
- Ie,
1933
+ Ce,
1934
1934
  {
1935
1935
  blocks: (R = (I = a.content) == null ? void 0 : I.data) == null ? void 0 : R.blocks,
1936
1936
  context: a,
@@ -1944,17 +1944,17 @@ function Q(e) {
1944
1944
  }
1945
1945
  );
1946
1946
  }
1947
- function Ft(e) {
1947
+ function Pt(e) {
1948
1948
  var a;
1949
1949
  const [t, n] = T(
1950
- () => it({
1950
+ () => ot({
1951
1951
  canTrack: H(e.canTrack),
1952
1952
  content: e.content
1953
1953
  })
1954
1954
  );
1955
1955
  function i() {
1956
1956
  var o;
1957
- return lt(
1957
+ return st(
1958
1958
  B(e.content).map((p) => ({
1959
1959
  id: p.testVariationId,
1960
1960
  testRatio: p.testRatio
@@ -1970,18 +1970,18 @@ function Ft(e) {
1970
1970
  return t ? {
1971
1971
  ...e.content,
1972
1972
  testVariationId: (o = e.content) == null ? void 0 : o.id
1973
- } : ce({
1973
+ } : me({
1974
1974
  item: e.content,
1975
1975
  canTrack: H(e.canTrack)
1976
1976
  });
1977
1977
  }
1978
- return C(() => {
1978
+ return w(() => {
1979
1979
  }, []), /* @__PURE__ */ $(M, { children: [
1980
1980
  !e.isNestedRender && G !== "reactNative" ? /* @__PURE__ */ b(
1981
1981
  K,
1982
1982
  {
1983
1983
  id: "builderio-init-variants-fns",
1984
- scriptStr: rt(),
1984
+ scriptStr: lt(),
1985
1985
  nonce: e.nonce || ""
1986
1986
  }
1987
1987
  ) : null,
@@ -2059,5 +2059,5 @@ function Ft(e) {
2059
2059
  ] });
2060
2060
  }
2061
2061
  export {
2062
- Ft as default
2062
+ Pt as default
2063
2063
  };