@builder.io/sdk-react 5.2.3 → 5.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +0 -4
  2. package/lib/browser/blocks-exports.cjs +32 -24
  3. package/lib/browser/blocks-exports.mjs +175 -169
  4. package/lib/browser/index.cjs +1 -1
  5. package/lib/browser/index.mjs +1 -1
  6. package/lib/browser/{server-entry-4bf14bc1.cjs → server-entry-db3e5491.cjs} +1 -1
  7. package/lib/browser/{server-entry-a6f43f98.js → server-entry-ed84f05b.js} +1 -1
  8. package/lib/browser/server-entry.cjs +1 -1
  9. package/lib/browser/server-entry.mjs +1 -1
  10. package/lib/edge/{accordion-52741334.js → accordion-97de712c.js} +1 -1
  11. package/lib/edge/{accordion-6c708d49.cjs → accordion-ee8b456b.cjs} +1 -1
  12. package/lib/edge/{blocks-af5e55f6.js → blocks-30fa0a83.js} +2 -2
  13. package/lib/edge/{blocks-e94e371c.cjs → blocks-a9309ecb.cjs} +1 -1
  14. package/lib/edge/blocks-exports.cjs +1 -1
  15. package/lib/edge/blocks-exports.mjs +2 -2
  16. package/lib/edge/{button-df76a8b2.cjs → button-b05134c3.cjs} +1 -1
  17. package/lib/edge/{button-2a5bf939.js → button-deb3931b.js} +2 -2
  18. package/lib/edge/{columns-044891a6.cjs → columns-653c6392.cjs} +1 -1
  19. package/lib/edge/{columns-dc5fc496.js → columns-ced9f729.js} +3 -3
  20. package/lib/edge/{content-variants-9ee0d895.cjs → content-variants-7f5bb324.cjs} +23 -15
  21. package/lib/edge/{content-variants-d950ffc8.js → content-variants-8d408a69.js} +104 -98
  22. package/lib/edge/{custom-code-685e8b43.js → custom-code-744f5ad4.js} +1 -1
  23. package/lib/edge/{custom-code-2403d3d3.cjs → custom-code-aa397209.cjs} +1 -1
  24. package/lib/edge/{embed-cdbaa40e.cjs → embed-0288e73a.cjs} +1 -1
  25. package/lib/edge/{embed-462f3730.js → embed-89aec80c.js} +1 -1
  26. package/lib/edge/{form-43c8dbf3.cjs → form-46a18f5c.cjs} +1 -1
  27. package/lib/edge/{form-1a9b42a0.js → form-6d81e9e1.js} +3 -3
  28. package/lib/edge/{get-class-prop-name-e944471a.js → get-class-prop-name-1b22254b.js} +1 -1
  29. package/lib/edge/{get-class-prop-name-fbedc76f.cjs → get-class-prop-name-32dc2306.cjs} +1 -1
  30. package/lib/edge/{img-d3819e49.cjs → img-57d025fd.cjs} +1 -1
  31. package/lib/edge/{img-fb540382.js → img-e324614f.js} +2 -2
  32. package/lib/edge/index.cjs +1 -1
  33. package/lib/edge/index.mjs +1 -1
  34. package/lib/edge/{input-6c53f2f3.cjs → input-38a98b25.cjs} +1 -1
  35. package/lib/edge/{input-0efc2cf0.js → input-85213ddc.js} +1 -1
  36. package/lib/edge/{personalization-container-63d25e42.js → personalization-container-95c36799.js} +4 -4
  37. package/lib/edge/{personalization-container-a9c09c80.cjs → personalization-container-bff639e8.cjs} +1 -1
  38. package/lib/edge/{select-61deb890.js → select-7ce7b157.js} +1 -1
  39. package/lib/edge/{select-391ac558.cjs → select-871410cd.cjs} +1 -1
  40. package/lib/edge/{server-entry-5182bda7.js → server-entry-1520920a.js} +1 -1
  41. package/lib/edge/{server-entry-4528f206.cjs → server-entry-5ed2b32b.cjs} +1 -1
  42. package/lib/edge/server-entry.cjs +1 -1
  43. package/lib/edge/server-entry.mjs +1 -1
  44. package/lib/edge/{slot-373f1e81.cjs → slot-41321948.cjs} +1 -1
  45. package/lib/edge/{slot-6f93fc15.js → slot-6b97f172.js} +3 -3
  46. package/lib/edge/{symbol-2ad1da28.js → symbol-40789e92.js} +2 -2
  47. package/lib/edge/{symbol-a1651207.cjs → symbol-5baec228.cjs} +1 -1
  48. package/lib/edge/{tabs-a0eccabc.cjs → tabs-73593fc8.cjs} +1 -1
  49. package/lib/edge/{tabs-c4e43a9c.js → tabs-d0f2c920.js} +3 -3
  50. package/lib/node/blocks-exports.cjs +29 -21
  51. package/lib/node/blocks-exports.mjs +130 -124
  52. package/lib/node/index.cjs +1 -1
  53. package/lib/node/index.mjs +3 -3
  54. package/lib/node/init.cjs +1 -1
  55. package/lib/node/init.mjs +3 -3
  56. package/lib/node/{server-entry-88c9db7d.cjs → server-entry-56a73dab.cjs} +1 -1
  57. package/lib/node/{server-entry-52b9a881.js → server-entry-57b25101.js} +1 -1
  58. package/lib/node/server-entry.cjs +1 -1
  59. package/lib/node/server-entry.mjs +1 -1
  60. package/lib/node/{setIvm-5e533ce2.cjs → setIvm-911b45e0.cjs} +1 -1
  61. package/lib/node/{setIvm-25463972.js → setIvm-ee365a66.js} +1 -1
  62. package/lib/node/setIvm.cjs +1 -1
  63. package/lib/node/setIvm.mjs +2 -2
  64. package/lib/node/{should-force-browser-runtime-in-node-a8019095.cjs → should-force-browser-runtime-in-node-12926830.cjs} +1 -1
  65. package/lib/node/{should-force-browser-runtime-in-node-d883c014.js → should-force-browser-runtime-in-node-dbead5da.js} +1 -1
  66. package/package.json +1 -1
  67. package/types/constants/sdk-version.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { TARGET as O, isEditing as _, isBrowser as J, getUserAttributes as ut, _track as ye, checkIsDefined as ae, logger as Q, isPreviewing as le, userAttributesService as Ie, getDefaultCanTrack as ee, logFetch as Le, setupBrowserForEditing as dt, createRegisterComponentMessage as mt, getCookieSync as ft, fetchOneEntry as _e, createEditorListener as ht, serializeIncludingFunctions as we, handleABTestingSync as bt } from "./server-entry-a6f43f98.js";
3
- import { setClientUserAttributes as Mi } from "./server-entry-a6f43f98.js";
2
+ import { TARGET as O, isEditing as _, isBrowser as J, getUserAttributes as ut, _track as ye, checkIsDefined as ae, logger as Q, isPreviewing as le, userAttributesService as Re, getDefaultCanTrack as ee, logFetch as He, setupBrowserForEditing as dt, createRegisterComponentMessage as mt, getCookieSync as ft, fetchOneEntry as Me, createEditorListener as ht, serializeIncludingFunctions as Pe, handleABTestingSync as bt } from "./server-entry-ed84f05b.js";
3
+ import { setClientUserAttributes as Mi } from "./server-entry-ed84f05b.js";
4
4
  import { jsx as s, Fragment as w, jsxs as D } from "react/jsx-runtime";
5
5
  import * as gt from "react";
6
- import { createContext as Ue, useEffect as B, useState as k, useContext as pe, useRef as z, createElement as He } from "react";
6
+ import { createContext as qe, useEffect as B, useState as k, useContext as pe, useRef as z, createElement as je } from "react";
7
7
  const yt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), pt = (e) => typeof e == "string" && yt.has(e.toLowerCase());
8
- function xe(e) {
8
+ function ke(e) {
9
9
  return /* @__PURE__ */ s(w, { children: pt(e.TagName) ? /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ s(w, { children: typeof e.TagName == "string" ? /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
10
10
  }
11
11
  const K = () => {
@@ -37,7 +37,7 @@ function vt(e) {
37
37
  };
38
38
  }
39
39
  return /* @__PURE__ */ s(
40
- xe,
40
+ ke,
41
41
  {
42
42
  attributes: t(),
43
43
  TagName: e.link ? e.builderLinkComponent || "a" : "button",
@@ -46,7 +46,7 @@ function vt(e) {
46
46
  }
47
47
  );
48
48
  }
49
- const se = Ue({
49
+ const se = qe({
50
50
  content: null,
51
51
  context: {},
52
52
  localState: void 0,
@@ -61,7 +61,7 @@ const se = Ue({
61
61
  BlocksWrapperProps: {},
62
62
  nonce: "",
63
63
  model: ""
64
- }), Me = Ue({ registeredComponents: {} }), qe = (e, t, n) => {
64
+ }), ze = qe({ registeredComponents: {} }), Ke = (e, t, n) => {
65
65
  const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r, a) => r != null ? r[a] : r, e);
66
66
  return i === void 0 || i === e ? n : i;
67
67
  }, xt = ({
@@ -100,7 +100,7 @@ const se = Ue({
100
100
  }), kt = (e, {
101
101
  isExpression: t = !0
102
102
  }) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
103
- function je({
103
+ function Je({
104
104
  rootState: e,
105
105
  localState: t,
106
106
  rootSetState: n
@@ -110,7 +110,7 @@ function je({
110
110
  if (t && r in t)
111
111
  return t[r];
112
112
  const a = i[r];
113
- return typeof a == "object" && a !== null ? je({
113
+ return typeof a == "object" && a !== null ? Je({
114
114
  rootState: a,
115
115
  localState: void 0,
116
116
  rootSetState: n ? (o) => {
@@ -125,7 +125,7 @@ function je({
125
125
  }
126
126
  });
127
127
  }
128
- const Ee = ({
128
+ const Ve = ({
129
129
  code: e,
130
130
  builder: t,
131
131
  context: n,
@@ -138,7 +138,7 @@ const Ee = ({
138
138
  builder: t,
139
139
  context: n,
140
140
  event: i,
141
- state: je({
141
+ state: Je({
142
142
  rootState: o,
143
143
  localState: r,
144
144
  rootSetState: a
@@ -160,7 +160,7 @@ const Tt = ({
160
160
  return t && n && !i ? (e && Q.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;
161
161
  }, It = (e) => (J() || Tt({
162
162
  shouldLogWarning: !0
163
- }), Ee(e)), wt = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, Et = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, Rt = (e) => {
163
+ }), Ve(e)), wt = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, Et = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, Rt = (e) => {
164
164
  var t, n, i, r, a, o;
165
165
  return ((i = (n = (t = wt.exec(e.trim())) == null ? void 0 : t.groups) == null ? void 0 : n.getPath) == null ? void 0 : i.slice(1)) || ((o = (a = (r = Et.exec(e.trim())) == null ? void 0 : r.groups) == null ? void 0 : a.getPath) == null ? void 0 : o.slice(1));
166
166
  };
@@ -178,7 +178,7 @@ function Y({
178
178
  return;
179
179
  const c = Rt(e.trim());
180
180
  if (c)
181
- return qe({
181
+ return Ke({
182
182
  ...i,
183
183
  ...n
184
184
  }, c);
@@ -247,7 +247,7 @@ function oe(e, t, n = null, i = null, r = /* @__PURE__ */ new WeakSet()) {
247
247
  }), oe(o, t, e, a, r);
248
248
  }));
249
249
  }
250
- function ze(e) {
250
+ function Ge(e) {
251
251
  return e && typeof e == "object" && e["@type"] === "@builder.io/core:LocalizedValue";
252
252
  }
253
253
  function Bt(e) {
@@ -255,7 +255,7 @@ function Bt(e) {
255
255
  return !1;
256
256
  let t = !1;
257
257
  return oe(e, (n) => {
258
- if (ze(n)) {
258
+ if (Ge(n)) {
259
259
  t = !0;
260
260
  return;
261
261
  }
@@ -264,14 +264,14 @@ function Bt(e) {
264
264
  function Nt(e, t) {
265
265
  return !e || !Object.getOwnPropertyNames(e).length ? {} : (oe(e, (n, i) => {
266
266
  var r;
267
- ze(n) && i((r = n[t]) != null ? r : void 0);
267
+ Ge(n) && i((r = n[t]) != null ? r : void 0);
268
268
  }), e);
269
269
  }
270
- function Wt(e, t) {
270
+ function $t(e, t) {
271
271
  var n, i;
272
272
  return (n = e.component) != null && n.options && Bt((i = e.component) == null ? void 0 : i.options) && (t || console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"), e.component.options = Nt(e.component.options, t != null ? t : "Default")), e;
273
273
  }
274
- const Se = (e) => JSON.parse(JSON.stringify(e)), Ke = (e, t, n) => {
274
+ const Ce = (e) => JSON.parse(JSON.stringify(e)), Qe = (e, t, n) => {
275
275
  if (Object(e) !== e)
276
276
  return e;
277
277
  const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
@@ -289,9 +289,9 @@ function ve(e) {
289
289
  n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = ve(e[n]));
290
290
  return t;
291
291
  }
292
- const $t = ["svelte", "vue", "angular", "qwik", "solid"].includes(O), Dt = (e) => {
293
- if ($t) {
294
- const t = Se(e);
292
+ const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(O), Dt = (e) => {
293
+ if (Wt) {
294
+ const t = Ce(e);
295
295
  return {
296
296
  ...t,
297
297
  properties: {
@@ -333,7 +333,7 @@ const $t = ["svelte", "vue", "angular", "qwik", "solid"].includes(O), Dt = (e) =
333
333
  rootSetState: r,
334
334
  context: t
335
335
  });
336
- Ke(a, o, c);
336
+ Qe(a, o, c);
337
337
  }
338
338
  return a;
339
339
  };
@@ -351,7 +351,7 @@ function Ft({
351
351
  rootState: i,
352
352
  rootSetState: r,
353
353
  context: t
354
- }), a = Wt(a, i.locale), a;
354
+ }), a = $t(a, i.locale), a;
355
355
  }
356
356
  const ce = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
357
357
  function Lt(e, t, n = {}) {
@@ -380,17 +380,17 @@ function _t(e) {
380
380
  for (const t of e)
381
381
  switch (t.trigger) {
382
382
  case "pageLoad":
383
- Qe(t);
383
+ Ze(t);
384
384
  break;
385
385
  case "scrollInView":
386
386
  Ht(t);
387
387
  break;
388
388
  }
389
389
  }
390
- function Je(e) {
390
+ function Ye(e) {
391
391
  console.warn(`Cannot animate element: element with ID ${e} not found!`);
392
392
  }
393
- function Ge(e, t) {
393
+ function Xe(e, t) {
394
394
  const n = Ut(e), i = getComputedStyle(t), r = e.steps[0].styles, a = e.steps[e.steps.length - 1].styles, o = [r, a];
395
395
  for (const l of o)
396
396
  for (const c of n)
@@ -403,14 +403,14 @@ function Ut(e) {
403
403
  t.indexOf(i) === -1 && t.push(i);
404
404
  return t;
405
405
  }
406
- function Qe(e) {
406
+ function Ze(e) {
407
407
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
408
408
  if (!t.length) {
409
- Je(e.elementId || e.id || "");
409
+ Ye(e.elementId || e.id || "");
410
410
  return;
411
411
  }
412
412
  Array.from(t).forEach((n) => {
413
- Ge(e, n), n.style.transition = "none", n.style.transitionDelay = "0", Z(n.style, e.steps[0].styles), setTimeout(() => {
413
+ Xe(e, n), n.style.transition = "none", n.style.transitionDelay = "0", Z(n.style, e.steps[0].styles), setTimeout(() => {
414
414
  n.style.transition = `all ${e.duration}s ${ce(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), Z(n.style, e.steps[1].styles), setTimeout(() => {
415
415
  n.style.transition = "", n.style.transitionDelay = "";
416
416
  }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
@@ -420,11 +420,11 @@ function Qe(e) {
420
420
  function Ht(e) {
421
421
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
422
422
  if (!t.length) {
423
- Je(e.elementId || e.id || "");
423
+ Ye(e.elementId || e.id || "");
424
424
  return;
425
425
  }
426
426
  Array.from(t).forEach((n) => {
427
- Ge(e, n);
427
+ Xe(e, n);
428
428
  let i = !1, r = !1;
429
429
  function a() {
430
430
  !i && l(n) ? (i = !0, r = !0, setTimeout(() => {
@@ -452,10 +452,10 @@ function Ht(e) {
452
452
  }), a();
453
453
  });
454
454
  }
455
- const Ye = (e) => Object.entries(e).map(([n, i]) => {
455
+ const et = (e) => Object.entries(e).map(([n, i]) => {
456
456
  if (typeof i == "string")
457
457
  return `${ce(n)}: ${i};`;
458
- }).filter(ae), Mt = (e) => Ye(e).join(`
458
+ }).filter(ae), Mt = (e) => et(e).join(`
459
459
  `), X = ({
460
460
  mediaQuery: e,
461
461
  className: t,
@@ -476,18 +476,18 @@ function qt({
476
476
  const jt = ({
477
477
  block: e,
478
478
  context: t
479
- }) => Xe(qt({
479
+ }) => tt(qt({
480
480
  style: e.style || {},
481
481
  context: t,
482
482
  block: e
483
483
  }));
484
- function Xe(e) {
484
+ function tt(e) {
485
485
  switch (O) {
486
486
  case "svelte":
487
487
  case "vue":
488
488
  case "solid":
489
489
  case "angular":
490
- return Ye(e).join(" ");
490
+ return et(e).join(" ");
491
491
  case "qwik":
492
492
  case "reactNative":
493
493
  case "react":
@@ -495,7 +495,7 @@ function Xe(e) {
495
495
  return e;
496
496
  }
497
497
  }
498
- const Ze = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includes(t) : !1 : !0, zt = ({
498
+ const nt = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includes(t) : !1 : !0, zt = ({
499
499
  block: e,
500
500
  registeredComponents: t,
501
501
  model: n
@@ -505,7 +505,7 @@ const Ze = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
505
505
  if (!i)
506
506
  return null;
507
507
  const r = t[i];
508
- if (!r || Ze(r, n)) {
508
+ if (!r || nt(r, n)) {
509
509
  console.warn(`
510
510
  Could not find a registered component named "${i}".
511
511
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
@@ -553,7 +553,7 @@ const Ze = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
553
553
  }, Gt = (e, t, n) => {
554
554
  var i;
555
555
  return (i = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && i.builderComponents ? {
556
- builderComponents: Object.fromEntries(Object.entries(t).filter(([a, o]) => !Ze(o, n)))
556
+ builderComponents: Object.fromEntries(Object.entries(t).filter(([a, o]) => !nt(o, n)))
557
557
  } : {};
558
558
  }, Qt = (e, t) => {
559
559
  var n;
@@ -565,7 +565,7 @@ const Ze = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
565
565
  return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
566
566
  builderContext: t
567
567
  } : {};
568
- }, Re = (e) => e.toString();
568
+ }, Ae = (e) => e.toString();
569
569
  function Xt(e) {
570
570
  return e.charAt(0).toUpperCase() + e.slice(1);
571
571
  }
@@ -579,7 +579,7 @@ const Zt = (e) => `on${Xt(e)}`, en = (e, t) => (n) => Y({
579
579
  isExpression: !1,
580
580
  trackingContext: t.trackingContext
581
581
  });
582
- function et(e) {
582
+ function it(e) {
583
583
  var i;
584
584
  const t = {}, n = (i = e.block.actions) != null ? i : {};
585
585
  for (const r in n) {
@@ -608,7 +608,7 @@ function tn({
608
608
  const nn = (e) => ({
609
609
  href: e.href
610
610
  });
611
- function ke({
611
+ function Te({
612
612
  block: e,
613
613
  context: t
614
614
  }) {
@@ -632,14 +632,14 @@ function ke({
632
632
  function rn(e) {
633
633
  var t, n, i;
634
634
  return /* @__PURE__ */ s(
635
- xe,
635
+ ke,
636
636
  {
637
637
  TagName: e.Wrapper,
638
- attributes: ke({
638
+ attributes: Te({
639
639
  block: e.block,
640
640
  context: e.context
641
641
  }),
642
- actionAttributes: et({
642
+ actionAttributes: it({
643
643
  block: e.block,
644
644
  rootState: e.context.rootState,
645
645
  rootSetState: e.context.rootSetState,
@@ -667,11 +667,11 @@ function on(e) {
667
667
  function t() {
668
668
  var a, o, l;
669
669
  return e.includeBlockProps ? {
670
- ...ke({
670
+ ...Te({
671
671
  block: e.block,
672
672
  context: e.context
673
673
  }),
674
- ...et({
674
+ ...it({
675
675
  block: e.block,
676
676
  rootState: e.context.rootState,
677
677
  rootSetState: e.context.rootSetState,
@@ -717,7 +717,7 @@ const ln = ({
717
717
  * component itself directly. Otherwise, they are provided to the wrapper element.
718
718
  */
719
719
  ...r ? {
720
- attributes: ke({
720
+ attributes: Te({
721
721
  block: t,
722
722
  context: o
723
723
  })
@@ -731,7 +731,7 @@ const ln = ({
731
731
  includeBlockProps: r
732
732
  } : l;
733
733
  };
734
- function Pe(e) {
734
+ function Be(e) {
735
735
  var r;
736
736
  k(() => !1);
737
737
  const [t, n] = k(
@@ -766,7 +766,7 @@ function Pe(e) {
766
766
  }
767
767
  ) }) : null });
768
768
  }
769
- function Ve(e) {
769
+ function Ne(e) {
770
770
  const [t, n] = k(() => e.repeatContext);
771
771
  return B(() => {
772
772
  n(e.repeatContext);
@@ -780,7 +780,7 @@ function Ve(e) {
780
780
  }
781
781
  ) });
782
782
  }
783
- const tt = {
783
+ const rt = {
784
784
  xsmall: {
785
785
  min: 0,
786
786
  default: 160,
@@ -801,8 +801,8 @@ const tt = {
801
801
  default: 991,
802
802
  max: 1200
803
803
  }
804
- }, de = (e, t = tt) => `@media (max-width: ${t[e].max}px)`, nt = (e) => {
805
- const t = Se(tt);
804
+ }, de = (e, t = rt) => `@media (max-width: ${t[e].max}px)`, at = (e) => {
805
+ const t = Ce(rt);
806
806
  if (!e)
807
807
  return t;
808
808
  const {
@@ -850,14 +850,14 @@ function te(e) {
850
850
  }
851
851
  );
852
852
  }
853
- function Ae(e) {
853
+ function $e(e) {
854
854
  function t() {
855
855
  const i = e.block;
856
856
  return ae(i.hide) ? !i.hide : ae(i.show) ? i.show : !0;
857
857
  }
858
858
  function n() {
859
859
  var T, E, U, H, q;
860
- const i = e.block, r = i.responsiveStyles, a = e.context.content, o = nt(
860
+ const i = e.block, r = i.responsiveStyles, a = e.context.content, o = at(
861
861
  ((T = a == null ? void 0 : a.meta) == null ? void 0 : T.breakpoints) || {}
862
862
  ), l = !!((U = (E = a == null ? void 0 : a.meta) == null ? void 0 : E.breakpoints) != null && U.xsmall), c = r == null ? void 0 : r.large, d = r == null ? void 0 : r.medium, h = r == null ? void 0 : r.small, g = r == null ? void 0 : r.xsmall, u = i.id;
863
863
  if (!u)
@@ -922,7 +922,7 @@ function sn(e) {
922
922
  k(() => !1);
923
923
  const [t, n] = k(() => !1);
924
924
  return pe(se), B(() => {
925
- }, []), /* @__PURE__ */ s(w, { children: t ? /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(Ae, { block: e.block, context: e.context }) }) }) : /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(Ae, { block: e.block, context: e.context }) }) });
925
+ }, []), /* @__PURE__ */ s(w, { children: t ? /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s($e, { block: e.block, context: e.context }) }) }) : /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s($e, { block: e.block, context: e.context }) }) });
926
926
  }
927
927
  function ue(e) {
928
928
  var h, g, u, S;
@@ -1015,16 +1015,16 @@ function ue(e) {
1015
1015
  }
1016
1016
  ),
1017
1017
  (h = a == null ? void 0 : a()) != null && h.noWrap ? t() ? /* @__PURE__ */ s(w, { children: (S = t()) == null ? void 0 : S.map((m, b) => /* @__PURE__ */ s(
1018
- Ve,
1018
+ Ne,
1019
1019
  {
1020
1020
  repeatContext: m.context,
1021
1021
  block: m.block,
1022
1022
  registeredComponents: e.registeredComponents,
1023
1023
  linkComponent: e.linkComponent
1024
1024
  },
1025
- Re(b)
1025
+ Ae(b)
1026
1026
  )) }) : /* @__PURE__ */ s(
1027
- Pe,
1027
+ Be,
1028
1028
  {
1029
1029
  componentRef: d().componentRef,
1030
1030
  componentOptions: d().componentOptions,
@@ -1037,14 +1037,14 @@ function ue(e) {
1037
1037
  isInteractive: d().isInteractive
1038
1038
  }
1039
1039
  ) : /* @__PURE__ */ s(w, { children: t() ? /* @__PURE__ */ s(w, { children: (u = t()) == null ? void 0 : u.map((m, b) => /* @__PURE__ */ s(
1040
- Ve,
1040
+ Ne,
1041
1041
  {
1042
1042
  repeatContext: m.context,
1043
1043
  block: m.block,
1044
1044
  registeredComponents: e.registeredComponents,
1045
1045
  linkComponent: e.linkComponent
1046
1046
  },
1047
- Re(b)
1047
+ Ae(b)
1048
1048
  )) }) : /* @__PURE__ */ D(
1049
1049
  rn,
1050
1050
  {
@@ -1053,7 +1053,7 @@ function ue(e) {
1053
1053
  context: e.context,
1054
1054
  children: [
1055
1055
  /* @__PURE__ */ s(
1056
- Pe,
1056
+ Be,
1057
1057
  {
1058
1058
  componentRef: d().componentRef,
1059
1059
  componentOptions: d().componentOptions,
@@ -1151,7 +1151,7 @@ function cn(e) {
1151
1151
  }
1152
1152
  function M(e) {
1153
1153
  var i, r, a;
1154
- const t = pe(se), n = pe(Me);
1154
+ const t = pe(se), n = pe(ze);
1155
1155
  return /* @__PURE__ */ D(
1156
1156
  cn,
1157
1157
  {
@@ -1255,7 +1255,7 @@ function dn(e) {
1255
1255
  }
1256
1256
  function u(f) {
1257
1257
  var T, E;
1258
- return nt(
1258
+ return at(
1259
1259
  ((E = (T = e.builderContext.content) == null ? void 0 : T.meta) == null ? void 0 : E.breakpoints) || {}
1260
1260
  )[f].max;
1261
1261
  }
@@ -1293,7 +1293,7 @@ function dn(e) {
1293
1293
  href: f.link
1294
1294
  } : {},
1295
1295
  [K()]: "builder-column",
1296
- style: Xe(g(v))
1296
+ style: tt(g(v))
1297
1297
  };
1298
1298
  }
1299
1299
  return /* @__PURE__ */ D(w, { children: [
@@ -1317,7 +1317,7 @@ function dn(e) {
1317
1317
  }
1318
1318
  ),
1319
1319
  (p = e.columns) == null ? void 0 : p.map((f, v) => /* @__PURE__ */ s(
1320
- xe,
1320
+ ke,
1321
1321
  {
1322
1322
  TagName: r(f),
1323
1323
  actionAttributes: {},
@@ -1347,7 +1347,7 @@ function dn(e) {
1347
1347
  function mn(e) {
1348
1348
  return /* @__PURE__ */ s("span", { children: e.children });
1349
1349
  }
1350
- function Be(e) {
1350
+ function We(e) {
1351
1351
  return e.replace(/http(s)?:/, "");
1352
1352
  }
1353
1353
  function fn(e = "", t, n) {
@@ -1358,11 +1358,11 @@ function hn(e, t) {
1358
1358
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
1359
1359
  return e;
1360
1360
  if (t === "master")
1361
- return Be(e);
1361
+ return We(e);
1362
1362
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
1363
1363
  if (n) {
1364
1364
  const i = e.split(n[0]), r = n[3], a = t.match("x") ? t : `${t}x`;
1365
- return Be(`${i[0]}_${a}${r}`);
1365
+ return We(`${i[0]}_${a}${r}`);
1366
1366
  }
1367
1367
  return null;
1368
1368
  }
@@ -1704,7 +1704,7 @@ const pn = `function getPersonalizedVariant(variants, blockId, isHydrationTarget
1704
1704
  visibilityStylesEl.innerHTML = newStyleStr;
1705
1705
  }
1706
1706
  }
1707
- }`, ne = "default", Sn = "filterWithCustomTargeting", it = "builderIoPersonalization", rt = "updateVisibilityStylesScript", at = ["react", "vue", "svelte", "qwik"], ie = ["vue", "svelte", "qwik"];
1707
+ }`, ne = "default", Sn = "filterWithCustomTargeting", ot = "builderIoPersonalization", lt = "updateVisibilityStylesScript", st = ["react", "vue", "svelte", "qwik"], ie = ["vue", "svelte", "qwik"];
1708
1708
  function kn(e, t) {
1709
1709
  return !(e && e.length > 0) || !t ? !1 : ie.includes(O) ? !0 : !J();
1710
1710
  }
@@ -1749,9 +1749,9 @@ function Cn({
1749
1749
  }
1750
1750
  const Tn = () => `
1751
1751
  window.${Sn} = ${vn}
1752
- window.${it} = ${pn}
1753
- window.${rt} = ${xn}
1754
- `, ot = O === "react", In = (e, t, n) => `window.${it}(${JSON.stringify(e)}, "${t}", ${ot}${n ? `, "${n}"` : ""})`, wn = (e, t, n) => `window.${rt}(${JSON.stringify(e)}, "${t}", ${ot}${n ? `, "${n}"` : ""})`, fe = {
1752
+ window.${ot} = ${pn}
1753
+ window.${lt} = ${xn}
1754
+ `, ct = O === "react", In = (e, t, n) => `window.${ot}(${JSON.stringify(e)}, "${t}", ${ct}${n ? `, "${n}"` : ""})`, wn = (e, t, n) => `window.${lt}(${JSON.stringify(e)}, "${t}", ${ct}${n ? `, "${n}"` : ""})`, fe = {
1755
1755
  "@type": "@builder.io/sdk:Element",
1756
1756
  layerName: "Accordion item title",
1757
1757
  responsiveStyles: {
@@ -1875,7 +1875,7 @@ const Tn = () => `
1875
1875
  builderComponents: !0,
1876
1876
  builderLinkComponent: !0
1877
1877
  }
1878
- }, Ne = (e) => e.toString();
1878
+ }, De = (e) => e.toString();
1879
1879
  function Rn(e) {
1880
1880
  var g;
1881
1881
  const [t, n] = k(() => []);
@@ -1963,7 +1963,7 @@ function Rn(e) {
1963
1963
  ...a(),
1964
1964
  ...e.grid && {
1965
1965
  width: e.gridRowWidth,
1966
- order: c() !== null ? Ne(S) : Ne(S + 1)
1966
+ order: c() !== null ? De(S) : De(S + 1)
1967
1967
  }
1968
1968
  },
1969
1969
  "data-index": S,
@@ -2250,7 +2250,7 @@ const Pn = {
2250
2250
  hidden: !0,
2251
2251
  canHaveChildren: !0,
2252
2252
  noWrap: !0
2253
- }, Ce = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"], Bn = ["mp4", "webm", "mkv", "flv", "vob", "ogv", "ogg", "drc", "gif", "gifv", "mng", "avi", "mov", "qt", "mts", "m2ts", "ts", "wmv", "yuv", "rm", "rmvb", "viv", "asf", "amv", "m4p", "mpeg", "mpe", "m2v", "m4v", "svi", "3gp", "3g2", "mxf", "roq", "nsv", "f4v", "f4p", "f4a", "f4b"], Nn = {
2253
+ }, Ie = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"], Bn = ["mp4", "webm", "mkv", "flv", "vob", "ogv", "ogg", "drc", "gif", "gifv", "mng", "avi", "mov", "qt", "mts", "m2ts", "ts", "wmv", "yuv", "rm", "rmvb", "viv", "asf", "amv", "m4p", "mpeg", "mpe", "m2v", "m4v", "svi", "3gp", "3g2", "mxf", "roq", "nsv", "f4v", "f4p", "f4a", "f4b"], Nn = {
2254
2254
  name: "Image",
2255
2255
  static: !0,
2256
2256
  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",
@@ -2265,7 +2265,7 @@ const Pn = {
2265
2265
  name: "image",
2266
2266
  type: "file",
2267
2267
  bubble: !0,
2268
- allowedFileTypes: Ce,
2268
+ allowedFileTypes: Ie,
2269
2269
  required: !0,
2270
2270
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
2271
2271
  onChange: (e) => {
@@ -2362,7 +2362,7 @@ const Pn = {
2362
2362
  shouldReceiveBuilderProps: {
2363
2363
  builderBlock: !0
2364
2364
  }
2365
- }, Wn = {
2365
+ }, $n = {
2366
2366
  name: "PersonalizationContainer",
2367
2367
  shouldReceiveBuilderProps: {
2368
2368
  builderBlock: !0,
@@ -2409,10 +2409,10 @@ function G(e) {
2409
2409
  }
2410
2410
  );
2411
2411
  }
2412
- function $n(e) {
2413
- var v, T, E, U, H, q, y, x, V, A, W, R, P;
2412
+ function Wn(e) {
2413
+ var v, T, E, U, H, q, y, x, V, A, $, R, P;
2414
2414
  const t = z(null), [n, i] = k(
2415
- () => Ie.getUserAttributes()
2415
+ () => Re.getUserAttributes()
2416
2416
  ), [r, a] = k(
2417
2417
  () => {
2418
2418
  var I, N, C;
@@ -2448,11 +2448,11 @@ function $n(e) {
2448
2448
  }
2449
2449
  function b() {
2450
2450
  return (e.variants || []).filter((I) => {
2451
- var N, C, $, F;
2451
+ var N, C, W, F;
2452
2452
  return yn(
2453
2453
  {
2454
2454
  ...(C = (N = e.builderContext) == null ? void 0 : N.rootState) != null && C.locale ? {
2455
- locale: (F = ($ = e.builderContext) == null ? void 0 : $.rootState) == null ? void 0 : F.locale
2455
+ locale: (F = (W = e.builderContext) == null ? void 0 : W.rootState) == null ? void 0 : F.locale
2456
2456
  } : {},
2457
2457
  ...n
2458
2458
  },
@@ -2483,7 +2483,7 @@ function $n(e) {
2483
2483
  return B(() => {
2484
2484
  var N;
2485
2485
  S(!0);
2486
- const I = Ie.subscribeOnUserAttributesChange(
2486
+ const I = Re.subscribeOnUserAttributesChange(
2487
2487
  (C) => {
2488
2488
  i(C);
2489
2489
  },
@@ -2553,7 +2553,7 @@ function $n(e) {
2553
2553
  }
2554
2554
  ),
2555
2555
  (x = e.variants) == null ? void 0 : x.map((I, N) => {
2556
- var C, $, F, L, j, Te;
2556
+ var C, W, F, L, j, Ee;
2557
2557
  return /* @__PURE__ */ s(
2558
2558
  M,
2559
2559
  {
@@ -2561,7 +2561,7 @@ function $n(e) {
2561
2561
  ...(C = e.builderContext) == null ? void 0 : C.BlocksWrapperProps,
2562
2562
  "aria-hidden": !0,
2563
2563
  hidden: !0,
2564
- "data-variant-id": `${($ = e.builderBlock) == null ? void 0 : $.id}-${N}`
2564
+ "data-variant-id": `${(W = e.builderBlock) == null ? void 0 : W.id}-${N}`
2565
2565
  },
2566
2566
  blocks: I.blocks,
2567
2567
  parent: (F = e.builderBlock) == null ? void 0 : F.id,
@@ -2577,7 +2577,7 @@ function $n(e) {
2577
2577
  }
2578
2578
  )
2579
2579
  },
2580
- `${(Te = e.builderBlock) == null ? void 0 : Te.id}-${N}`
2580
+ `${(Ee = e.builderBlock) == null ? void 0 : Ee.id}-${N}`
2581
2581
  );
2582
2582
  })
2583
2583
  ] }) : null,
@@ -2591,7 +2591,7 @@ function $n(e) {
2591
2591
  registeredComponents: e.builderComponents,
2592
2592
  BlocksWrapperProps: {
2593
2593
  ...(A = e.builderContext) == null ? void 0 : A.BlocksWrapperProps,
2594
- "data-variant-id": `${(W = e.builderBlock) == null ? void 0 : W.id}-${p().index}`
2594
+ "data-variant-id": `${($ = e.builderBlock) == null ? void 0 : $.id}-${p().index}`
2595
2595
  },
2596
2596
  children: h ? /* @__PURE__ */ s(
2597
2597
  G,
@@ -3380,7 +3380,7 @@ function Zn(e) {
3380
3380
  else {
3381
3381
  const y = {};
3382
3382
  Array.from(T).forEach(({ value: x, key: V }) => {
3383
- Ke(y, V, x);
3383
+ Qe(y, V, x);
3384
3384
  }), f = JSON.stringify(y);
3385
3385
  }
3386
3386
  E && E !== "multipart/form-data" && (S && ((m = e.action) != null && m.includes("zapier.com")) || (p["content-type"] = E));
@@ -3395,19 +3395,19 @@ function Zn(e) {
3395
3395
  const H = `${Xn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
3396
3396
  e.sendSubmissionsToEmail || ""
3397
3397
  )}&name=${encodeURIComponent(e.name || "")}`, q = e.sendSubmissionsTo === "email" ? H : e.action;
3398
- Le(q), fetch(q, { body: f, headers: p, method: e.method || "post" }).then(
3398
+ He(q), fetch(q, { body: f, headers: p, method: e.method || "post" }).then(
3399
3399
  async (y) => {
3400
- var A, W;
3400
+ var A, $;
3401
3401
  let x;
3402
3402
  const V = y.headers.get("content-type");
3403
3403
  if (V && V.indexOf("application/json") !== -1 ? x = await y.json() : x = await y.text(), !y.ok) {
3404
3404
  const R = new CustomEvent("submit:error", {
3405
3405
  detail: { error: x, status: y.status }
3406
3406
  });
3407
- if ((A = t.current) != null && A.nativeElement && ((W = t.current) == null || W.nativeElement.dispatchEvent(R), R.defaultPrevented))
3407
+ if ((A = t.current) != null && A.nativeElement && (($ = t.current) == null || $.nativeElement.dispatchEvent(R), R.defaultPrevented))
3408
3408
  return;
3409
3409
  a(x), i("error");
3410
- let P = e.errorMessagePath ? qe(x, e.errorMessagePath) : x.message || x.error || x;
3410
+ let P = e.errorMessagePath ? Ke(x, e.errorMessagePath) : x.message || x.error || x;
3411
3411
  typeof P != "string" && (P = JSON.stringify(P)), l(P), c({ formErrorMessage: P });
3412
3412
  return;
3413
3413
  }
@@ -3539,7 +3539,7 @@ const ei = {
3539
3539
  }
3540
3540
  };
3541
3541
  function ti(e) {
3542
- return /* @__PURE__ */ He(
3542
+ return /* @__PURE__ */ je(
3543
3543
  "input",
3544
3544
  {
3545
3545
  ...e.attributes,
@@ -3598,7 +3598,7 @@ const ni = {
3598
3598
  };
3599
3599
  function ii(e) {
3600
3600
  var t;
3601
- return /* @__PURE__ */ He(
3601
+ return /* @__PURE__ */ je(
3602
3602
  "select",
3603
3603
  {
3604
3604
  ...e.attributes,
@@ -3698,7 +3698,7 @@ const si = {
3698
3698
  name: "image",
3699
3699
  bubble: !0,
3700
3700
  type: "file",
3701
- allowedFileTypes: Ce,
3701
+ allowedFileTypes: Ie,
3702
3702
  required: !0
3703
3703
  }, {
3704
3704
  name: "backgroundSize",
@@ -3780,7 +3780,7 @@ const ui = {
3780
3780
  }, {
3781
3781
  name: "posterImage",
3782
3782
  type: "file",
3783
- allowedFileTypes: Ce,
3783
+ allowedFileTypes: Ie,
3784
3784
  helperText: "Image to show before the video plays"
3785
3785
  }, {
3786
3786
  name: "autoPlay",
@@ -4010,7 +4010,7 @@ const mi = () => [{
4010
4010
  }, {
4011
4011
  component: di,
4012
4012
  ...ui
4013
- }], We = () => [{
4013
+ }], Oe = () => [{
4014
4014
  component: vt,
4015
4015
  ...Pn
4016
4016
  }, {
@@ -4034,9 +4034,9 @@ const mi = () => [{
4034
4034
  }, {
4035
4035
  component: Mn,
4036
4036
  ...Hn
4037
- }, ...at.includes(O) ? [{
4038
- component: $n,
4039
- ...Wn
4037
+ }, ...st.includes(O) ? [{
4038
+ component: Wn,
4039
+ ...$n
4040
4040
  }] : [], {
4041
4041
  component: Un,
4042
4042
  ..._n
@@ -4136,26 +4136,34 @@ const mi = () => [{
4136
4136
  thisScriptEl?.remove();
4137
4137
  }
4138
4138
  return;
4139
- }`, lt = "builderIoAbTest", st = "builderIoRenderContent", re = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
4139
+ }`, xe = "builderIoAbTest", Se = "builderIoRenderContent", re = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
4140
4140
  ...t,
4141
4141
  testVariationId: t.id,
4142
4142
  id: e == null ? void 0 : e.id
4143
4143
  })), bi = ({
4144
4144
  canTrack: e,
4145
4145
  content: t
4146
- }) => !(!(re(t).length > 0) || !e || J()), gi = (e) => e === "react" || e === "reactNative", yi = O === "angular", ct = gi(O), pi = () => `
4147
- window.${lt} = ${fi}
4148
- window.${st} = ${hi}
4146
+ }) => !(!(re(t).length > 0) || !e || J()), gi = (e) => e === "react" || e === "reactNative", yi = O === "angular", we = gi(O), pi = () => `
4147
+ (function() {
4148
+ if (!window.${xe}) {
4149
+ window.${xe} = ${fi};
4150
+ }
4151
+ if (!window.${Se}) {
4152
+ window.${Se} = ${hi};
4153
+ }${we ? `
4154
+ var thisScriptEl = document.currentScript;
4155
+ if (thisScriptEl) { thisScriptEl.remove(); }` : ""}
4156
+ })();
4149
4157
  `, vi = (e, t) => `
4150
- window.${lt}(
4151
- "${t}",${JSON.stringify(e)}, ${ct}, ${yi}
4158
+ window.${xe}(
4159
+ "${t}",${JSON.stringify(e)}, ${we}, ${yi}
4152
4160
  )`, xi = ({
4153
4161
  contentId: e,
4154
4162
  variationId: t
4155
- }) => `window.${st}(
4156
- "${t}", "${e}", ${ct}
4163
+ }) => `window.${Se}(
4164
+ "${t}", "${e}", ${we}
4157
4165
  )`;
4158
- function $e(e) {
4166
+ function Fe(e) {
4159
4167
  return Math.round(e * 1e3) / 1e3;
4160
4168
  }
4161
4169
  const Si = (e, t, n = !0) => {
@@ -4172,11 +4180,11 @@ const Si = (e, t, n = !0) => {
4172
4180
  }, ki = (e) => Si(e, (t) => {
4173
4181
  const n = t.getAttribute("builder-id") || t.id;
4174
4182
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
4175
- }), De = ({
4183
+ }), Le = ({
4176
4184
  event: e,
4177
4185
  target: t
4178
4186
  }) => {
4179
- const n = t.getBoundingClientRect(), i = e.clientX - n.left, r = e.clientY - n.top, a = $e(i / n.width), o = $e(r / n.height);
4187
+ const n = t.getBoundingClientRect(), i = e.clientX - n.left, r = e.clientY - n.top, a = Fe(i / n.width), o = Fe(r / n.height);
4180
4188
  return {
4181
4189
  x: a,
4182
4190
  y: o
@@ -4186,18 +4194,18 @@ const Si = (e, t, n = !0) => {
4186
4194
  return {
4187
4195
  targetBuilderElement: i || void 0,
4188
4196
  metadata: {
4189
- targetOffset: t ? De({
4197
+ targetOffset: t ? Le({
4190
4198
  event: e,
4191
4199
  target: t
4192
4200
  }) : void 0,
4193
- builderTargetOffset: n ? De({
4201
+ builderTargetOffset: n ? Le({
4194
4202
  event: e,
4195
4203
  target: n
4196
4204
  }) : void 0,
4197
4205
  builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
4198
4206
  }
4199
4207
  };
4200
- }, Ti = ["svelte", "qwik", "vue"], Oe = () => Ti.includes(O) && (_() || le()), Ii = (e) => {
4208
+ }, Ti = ["svelte", "qwik", "vue"], _e = () => Ti.includes(O) && (_() || le()), Ii = (e) => {
4201
4209
  var a, o;
4202
4210
  const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (o = e.fileUrl) != null ? o : (a = e == null ? void 0 : e.files) == null ? void 0 : a.regular;
4203
4211
  let r = "";
@@ -4257,12 +4265,12 @@ function Ai(e) {
4257
4265
  );
4258
4266
  const [n, i] = k(() => null), [r, a] = k(() => "");
4259
4267
  function o(x, V) {
4260
- var W, R;
4268
+ var $, R;
4261
4269
  const A = {
4262
4270
  ...e.builderContextSignal.rootState,
4263
4271
  ...x
4264
4272
  };
4265
- e.builderContextSignal.rootSetState ? (R = (W = e.builderContextSignal).rootSetState) == null || R.call(W, A) : e.setBuilderContextSignal((P) => ({
4273
+ e.builderContextSignal.rootSetState ? (R = ($ = e.builderContextSignal).rootSetState) == null || R.call($, A) : e.setBuilderContextSignal((P) => ({
4266
4274
  ...P,
4267
4275
  rootState: A
4268
4276
  })), e.builderContextSignal.rootSetState ? e.builderContextSignal.rootSetState(A) : e.setBuilderContextSignal((P) => ({
@@ -4271,12 +4279,12 @@ function Ai(e) {
4271
4279
  }));
4272
4280
  }
4273
4281
  function l(x, V) {
4274
- var W, R, P, I, N;
4282
+ var $, R, P, I, N;
4275
4283
  const A = {
4276
4284
  ...e.builderContextSignal.content,
4277
4285
  ...x,
4278
4286
  data: {
4279
- ...(W = e.builderContextSignal.content) == null ? void 0 : W.data,
4287
+ ...($ = e.builderContextSignal.content) == null ? void 0 : $.data,
4280
4288
  ...x == null ? void 0 : x.data
4281
4289
  },
4282
4290
  meta: {
@@ -4306,15 +4314,15 @@ function Ai(e) {
4306
4314
  callbacks: {
4307
4315
  configureSdk: (V) => {
4308
4316
  var R;
4309
- const { breakpoints: A, contentId: W } = V;
4310
- !W || W !== ((R = e.builderContextSignal.content) == null ? void 0 : R.id) || A && l({
4317
+ const { breakpoints: A, contentId: $ } = V;
4318
+ !$ || $ !== ((R = e.builderContextSignal.content) == null ? void 0 : R.id) || A && l({
4311
4319
  meta: {
4312
4320
  breakpoints: A
4313
4321
  }
4314
4322
  });
4315
4323
  },
4316
4324
  animation: (V) => {
4317
- Qe(V);
4325
+ Ze(V);
4318
4326
  },
4319
4327
  contentUpdate: (V, A) => {
4320
4328
  l(V);
@@ -4329,14 +4337,14 @@ function Ai(e) {
4329
4337
  function v(x) {
4330
4338
  var V, A;
4331
4339
  if (e.builderContextSignal.content) {
4332
- const W = (V = e.builderContextSignal.content) == null ? void 0 : V.testVariationId, R = (A = e.builderContextSignal.content) == null ? void 0 : A.id;
4340
+ const $ = (V = e.builderContextSignal.content) == null ? void 0 : V.testVariationId, R = (A = e.builderContextSignal.content) == null ? void 0 : A.id;
4333
4341
  ye({
4334
4342
  apiHost: e.apiHost,
4335
4343
  type: "click",
4336
4344
  canTrack: ee(e.canTrack),
4337
4345
  contentId: R,
4338
4346
  apiKey: e.apiKey,
4339
- variationId: W !== R ? W : void 0,
4347
+ variationId: $ !== R ? $ : void 0,
4340
4348
  ...Ci(x),
4341
4349
  unique: !p
4342
4350
  });
@@ -4344,8 +4352,8 @@ function Ai(e) {
4344
4352
  p || f(!0);
4345
4353
  }
4346
4354
  function T() {
4347
- var V, A, W;
4348
- const x = (W = (A = (V = e.builderContextSignal.content) == null ? void 0 : V.data) == null ? void 0 : A.httpRequests) != null ? W : {};
4355
+ var V, A, $;
4356
+ const x = ($ = (A = (V = e.builderContextSignal.content) == null ? void 0 : V.data) == null ? void 0 : A.httpRequests) != null ? $ : {};
4349
4357
  Object.entries(x).forEach(
4350
4358
  ([R, P]) => {
4351
4359
  if (!P)
@@ -4366,7 +4374,7 @@ function Ai(e) {
4366
4374
  rootSetState: e.builderContextSignal.rootSetState
4367
4375
  })
4368
4376
  )
4369
- ), $ = I ? {
4377
+ ), W = I ? {
4370
4378
  url: C,
4371
4379
  method: P.request.method,
4372
4380
  headers: P.request.headers,
@@ -4375,13 +4383,13 @@ function Ai(e) {
4375
4383
  url: C,
4376
4384
  method: "GET"
4377
4385
  };
4378
- Le(JSON.stringify($));
4386
+ He(JSON.stringify(W));
4379
4387
  const F = {
4380
- method: $.method,
4381
- headers: $.headers,
4382
- body: $.body
4388
+ method: W.method,
4389
+ headers: W.headers,
4390
+ body: W.body
4383
4391
  };
4384
- $.method === "GET" && delete F.body, fetch($.url, F).then((L) => L.json()).then((L) => {
4392
+ W.method === "GET" && delete F.body, fetch(W.url, F).then((L) => L.json()).then((L) => {
4385
4393
  o({
4386
4394
  [R]: L
4387
4395
  }), u[R] = !0;
@@ -4403,7 +4411,7 @@ function Ai(e) {
4403
4411
  "builder:component:stateChange",
4404
4412
  {
4405
4413
  detail: {
4406
- state: Se(e.builderContextSignal.rootState),
4414
+ state: Ce(e.builderContextSignal.rootState),
4407
4415
  ref: {
4408
4416
  name: e.model
4409
4417
  }
@@ -4414,7 +4422,7 @@ function Ai(e) {
4414
4422
  }
4415
4423
  const U = z(!1);
4416
4424
  return U.current || (T(), E(), U.current = !0), B(() => {
4417
- var x, V, A, W, R;
4425
+ var x, V, A, $, R;
4418
4426
  if (J()) {
4419
4427
  _() && !e.isNestedRender && (window.addEventListener("message", g), dt({
4420
4428
  ...e.locale ? {
@@ -4431,8 +4439,8 @@ function Ai(e) {
4431
4439
  }), Object.values(
4432
4440
  e.builderContextSignal.componentInfos
4433
4441
  ).forEach((C) => {
4434
- var $, F;
4435
- if (!(($ = C.models) != null && $.length) || C.models.includes(e.model)) {
4442
+ var W, F;
4443
+ if (!((W = C.models) != null && W.length) || C.models.includes(e.model)) {
4436
4444
  const L = mt(C);
4437
4445
  (F = window.parent) == null || F.postMessage(L, "*");
4438
4446
  }
@@ -4445,25 +4453,25 @@ function Ai(e) {
4445
4453
  canTrack: !0
4446
4454
  }), N = (A = e.builderContextSignal.content) == null ? void 0 : A.testVariationId;
4447
4455
  if (P && N === I) {
4448
- const C = (W = e.builderContextSignal.content) == null ? void 0 : W.id, $ = e.apiKey;
4456
+ const C = ($ = e.builderContextSignal.content) == null ? void 0 : $.id, W = e.apiKey;
4449
4457
  ye({
4450
4458
  apiHost: e.apiHost,
4451
4459
  type: "impression",
4452
4460
  canTrack: !0,
4453
4461
  contentId: C,
4454
- apiKey: $,
4462
+ apiKey: W,
4455
4463
  variationId: I !== C ? I : void 0
4456
4464
  });
4457
4465
  }
4458
4466
  if (le() && !_()) {
4459
- const C = new URL(location.href).searchParams, $ = C.get("builder.preview"), F = C.get(
4460
- `builder.overrides.${$}`
4467
+ const C = new URL(location.href).searchParams, W = C.get("builder.preview"), F = C.get(
4468
+ `builder.overrides.${W}`
4461
4469
  ), L = C.get("apiKey") || C.get("builder.space");
4462
- ($ === "BUILDER_STUDIO" || $ === e.model && L === e.apiKey && (!e.content || F === e.content.id)) && _e({
4470
+ (W === "BUILDER_STUDIO" || W === e.model && L === e.apiKey && (!e.content || F === e.content.id)) && Me({
4463
4471
  model: e.model,
4464
4472
  apiKey: e.apiKey,
4465
4473
  apiVersion: e.builderContextSignal.apiVersion,
4466
- ...$ === "BUILDER_STUDIO" && ((R = e.context) != null && R.symbolId) ? {
4474
+ ...W === "BUILDER_STUDIO" && ((R = e.context) != null && R.symbolId) ? {
4467
4475
  query: {
4468
4476
  id: e.context.symbolId
4469
4477
  }
@@ -4496,7 +4504,7 @@ function Ai(e) {
4496
4504
  "builder:component:stateChangeListenerActivated",
4497
4505
  E
4498
4506
  ));
4499
- }, []), /* @__PURE__ */ s(se.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || Oe() ? /* @__PURE__ */ s(
4507
+ }, []), /* @__PURE__ */ s(se.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || _e() ? /* @__PURE__ */ s(
4500
4508
  d,
4501
4509
  {
4502
4510
  ref: t,
@@ -4507,7 +4515,7 @@ function Ai(e) {
4507
4515
  ((q = e.content) == null ? void 0 : q.testVariationId) || ((y = e.content) == null ? void 0 : y.id)
4508
4516
  ),
4509
4517
  style: {
4510
- display: !e.builderContextSignal.content && Oe() ? "none" : void 0
4518
+ display: !e.builderContextSignal.content && _e() ? "none" : void 0
4511
4519
  },
4512
4520
  ...c(),
4513
4521
  ...e.contentWrapperProps,
@@ -4554,7 +4562,7 @@ const Ni = ({
4554
4562
  locale: n
4555
4563
  } : {}
4556
4564
  };
4557
- }, Wi = ({
4565
+ }, $i = ({
4558
4566
  content: e,
4559
4567
  data: t
4560
4568
  }) => e ? {
@@ -4565,7 +4573,7 @@ const Ni = ({
4565
4573
  },
4566
4574
  meta: e == null ? void 0 : e.meta
4567
4575
  } : void 0;
4568
- function Fe(e) {
4576
+ function Ue(e) {
4569
4577
  var d, h, g, u, S, m, b, p, f;
4570
4578
  const [t, n] = k(
4571
4579
  () => {
@@ -4586,20 +4594,20 @@ function Fe(e) {
4586
4594
  }
4587
4595
  const [r, a] = k(
4588
4596
  () => [
4589
- ...We(),
4597
+ ...Oe(),
4590
4598
  ...e.customComponents || []
4591
4599
  ].reduce(
4592
4600
  (v, { component: T, ...E }) => ({
4593
4601
  ...v,
4594
4602
  [E.name]: {
4595
4603
  component: T,
4596
- ...we(E)
4604
+ ...Pe(E)
4597
4605
  }
4598
4606
  }),
4599
4607
  {}
4600
4608
  )
4601
4609
  ), [o, l] = k(() => ({
4602
- content: Wi({
4610
+ content: $i({
4603
4611
  content: e.content,
4604
4612
  data: e.data
4605
4613
  }),
@@ -4615,12 +4623,12 @@ function Fe(e) {
4615
4623
  apiKey: e.apiKey,
4616
4624
  apiVersion: e.apiVersion,
4617
4625
  componentInfos: [
4618
- ...We(),
4626
+ ...Oe(),
4619
4627
  ...e.customComponents || []
4620
4628
  ].reduce(
4621
4629
  (v, { component: T, ...E }) => ({
4622
4630
  ...v,
4623
- [E.name]: we(E)
4631
+ [E.name]: Pe(E)
4624
4632
  }),
4625
4633
  {}
4626
4634
  ),
@@ -4648,7 +4656,7 @@ function Fe(e) {
4648
4656
  }
4649
4657
  return B(() => {
4650
4658
  }, [e.content, e.data, e.locale]), /* @__PURE__ */ s(
4651
- Me.Provider,
4659
+ ze.Provider,
4652
4660
  {
4653
4661
  value: {
4654
4662
  registeredComponents: r
@@ -4707,7 +4715,7 @@ function Fe(e) {
4707
4715
  }
4708
4716
  );
4709
4717
  }
4710
- function $i(e) {
4718
+ function Wi(e) {
4711
4719
  var o;
4712
4720
  const [t, n] = k(
4713
4721
  () => bi({
@@ -4740,7 +4748,15 @@ function $i(e) {
4740
4748
  }
4741
4749
  return B(() => {
4742
4750
  }, []), /* @__PURE__ */ D(w, { children: [
4743
- !e.isNestedRender && O !== "reactNative" ? /* @__PURE__ */ D(w, { children: [
4751
+ !e.isNestedRender && O !== "reactNative" ? /* @__PURE__ */ s(w, { children: st.includes(O) ? /* @__PURE__ */ s(
4752
+ G,
4753
+ {
4754
+ id: "builderio-init-personalization-variants-fns",
4755
+ nonce: e.nonce || "",
4756
+ scriptStr: Tn()
4757
+ }
4758
+ ) : null }) : null,
4759
+ t ? /* @__PURE__ */ D(w, { children: [
4744
4760
  /* @__PURE__ */ s(
4745
4761
  G,
4746
4762
  {
@@ -4749,16 +4765,6 @@ function $i(e) {
4749
4765
  nonce: e.nonce || ""
4750
4766
  }
4751
4767
  ),
4752
- at.includes(O) ? /* @__PURE__ */ s(
4753
- G,
4754
- {
4755
- id: "builderio-init-personalization-variants-fns",
4756
- nonce: e.nonce || "",
4757
- scriptStr: Tn()
4758
- }
4759
- ) : null
4760
- ] }) : null,
4761
- t ? /* @__PURE__ */ D(w, { children: [
4762
4768
  /* @__PURE__ */ s(
4763
4769
  te,
4764
4770
  {
@@ -4776,7 +4782,7 @@ function $i(e) {
4776
4782
  }
4777
4783
  ),
4778
4784
  (o = re(e.content)) == null ? void 0 : o.map((l) => /* @__PURE__ */ s(
4779
- Fe,
4785
+ Ue,
4780
4786
  {
4781
4787
  apiHost: e.apiHost,
4782
4788
  isNestedRender: e.isNestedRender,
@@ -4804,7 +4810,7 @@ function $i(e) {
4804
4810
  ))
4805
4811
  ] }) : null,
4806
4812
  /* @__PURE__ */ s(
4807
- Fe,
4813
+ Ue,
4808
4814
  {
4809
4815
  apiHost: e.apiHost,
4810
4816
  nonce: e.nonce,
@@ -4837,7 +4843,7 @@ const Di = async ({
4837
4843
  }) => {
4838
4844
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
4839
4845
  (e != null && e.apiKey))
4840
- return _e({
4846
+ return Me({
4841
4847
  model: t.model,
4842
4848
  apiKey: t.global && t.ownerId ? t.ownerId : e.apiKey,
4843
4849
  apiVersion: e.apiVersion,
@@ -4891,7 +4897,7 @@ function Oi(e) {
4891
4897
  }, []), B(() => {
4892
4898
  d();
4893
4899
  }, [e.symbol]), /* @__PURE__ */ s("div", { ...e.attributes, className: r(), children: /* @__PURE__ */ s(
4894
- $i,
4900
+ Wi,
4895
4901
  {
4896
4902
  nonce: e.builderContext.nonce,
4897
4903
  isNestedRender: !0,
@@ -4921,7 +4927,7 @@ export {
4921
4927
  se as BuilderContext,
4922
4928
  vt as Button,
4923
4929
  dn as Columns,
4924
- $i as Content,
4930
+ Wi as Content,
4925
4931
  mn as Fragment,
4926
4932
  bn as Image,
4927
4933
  gn as Section,