@builder.io/sdk-react-nextjs 0.12.0 → 0.12.2

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 (50) hide show
  1. package/lib/browser/USE_CLIENT_BUNDLE-4b1b3c99.cjs +23 -0
  2. package/lib/browser/{USE_CLIENT_BUNDLE-109dedea.js → USE_CLIENT_BUNDLE-550679f9.js} +250 -265
  3. package/lib/{edge/USE_SERVER_BUNDLE-35036883.js → browser/USE_SERVER_BUNDLE-464dccd7.js} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-ab530745.cjs → browser/USE_SERVER_BUNDLE-6234c5ea.cjs} +1 -1
  5. package/lib/browser/bundle-1d763be7.cjs +168 -0
  6. package/lib/browser/{bundle-f769d53a.js → bundle-d905bf70.js} +614 -572
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +17 -17
  9. package/lib/{node/USE_CLIENT_BUNDLE-f1c14740.js → edge/USE_CLIENT_BUNDLE-aa38a343.js} +250 -265
  10. package/lib/edge/USE_CLIENT_BUNDLE-edb18eb8.cjs +23 -0
  11. package/lib/{node/USE_SERVER_BUNDLE-a546a48c.js → edge/USE_SERVER_BUNDLE-70c27ea1.js} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-ce3684c3.cjs → edge/USE_SERVER_BUNDLE-f0eeb33e.cjs} +1 -1
  13. package/lib/edge/{bundle-593d3883.cjs → bundle-25fa71b1.cjs} +31 -31
  14. package/lib/edge/{bundle-80ec9a4d.js → bundle-834dbf29.js} +873 -831
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +17 -17
  17. package/lib/{edge/USE_CLIENT_BUNDLE-bffeb179.js → node/USE_CLIENT_BUNDLE-d30db795.js} +250 -265
  18. package/lib/node/USE_CLIENT_BUNDLE-def5165a.cjs +23 -0
  19. package/lib/{browser/USE_SERVER_BUNDLE-a36e67c3.js → node/USE_SERVER_BUNDLE-610c83b3.js} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-7d41532a.cjs → node/USE_SERVER_BUNDLE-a5db98bc.cjs} +1 -1
  21. package/lib/node/{bundle-fd27db7d.js → bundle-1f73ead0.js} +236 -194
  22. package/lib/node/bundle-4efd9623.cjs +208 -0
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +17 -17
  25. package/package.json +1 -1
  26. package/types/cjs/blocks/slot/component-info.d.ts +2 -0
  27. package/types/cjs/blocks/slot/slot.d.ts +11 -0
  28. package/types/cjs/components/block/block.helpers.d.ts +0 -1
  29. package/types/cjs/components/block/components/block-wrapper.d.ts +2 -6
  30. package/types/cjs/components/content-variants/content-variants.types.d.ts +4 -0
  31. package/types/cjs/components/dynamic-renderer/dynamic-renderer.d.ts +8 -0
  32. package/types/cjs/components/dynamic-renderer/dynamic-renderer.helpers.d.ts +1 -0
  33. package/types/cjs/constants/sdk-version.d.ts +1 -1
  34. package/types/cjs/functions/is-from-trusted-host.d.ts +3 -0
  35. package/types/cjs/scripts/init-editing.d.ts +1 -0
  36. package/types/esm/blocks/slot/component-info.d.ts +2 -0
  37. package/types/esm/blocks/slot/slot.d.ts +11 -0
  38. package/types/esm/components/block/block.helpers.d.ts +0 -1
  39. package/types/esm/components/block/components/block-wrapper.d.ts +2 -6
  40. package/types/esm/components/content-variants/content-variants.types.d.ts +4 -0
  41. package/types/esm/components/dynamic-renderer/dynamic-renderer.d.ts +8 -0
  42. package/types/esm/components/dynamic-renderer/dynamic-renderer.helpers.d.ts +1 -0
  43. package/types/esm/constants/sdk-version.d.ts +1 -1
  44. package/types/esm/functions/is-from-trusted-host.d.ts +3 -0
  45. package/types/esm/scripts/init-editing.d.ts +1 -0
  46. package/lib/browser/USE_CLIENT_BUNDLE-c6f253a6.cjs +0 -23
  47. package/lib/browser/bundle-ff1186e7.cjs +0 -168
  48. package/lib/edge/USE_CLIENT_BUNDLE-23097d3f.cjs +0 -23
  49. package/lib/node/USE_CLIENT_BUNDLE-ff4465dc.cjs +0 -23
  50. package/lib/node/bundle-6e88a55c.cjs +0 -208
@@ -1,9 +1,9 @@
1
- import { LRUCache as Ae } from "lru-cache";
2
- import { jsx as l, Fragment as y, jsxs as I } from "react/jsx-runtime";
3
- import { createElement as Ve } from "react";
4
- import { I as Be, B as G, a as We, b as $e, C as Oe, E as Fe, F as Ne, c as _e, d as Le, S as Ue, V as Me, e as De } from "./USE_CLIENT_BUNDLE-109dedea.js";
1
+ import { LRUCache as Re } from "lru-cache";
2
+ import { jsx as l, Fragment as S, jsxs as T } from "react/jsx-runtime";
3
+ import { createElement as Ae } from "react";
4
+ import { I as Pe, B as Ve, a as Be, b as We, C as $e, E as Oe, F as Fe, c as Ne, d as _e, S as Le, V as Ue, e as Me } from "./USE_CLIENT_BUNDLE-550679f9.js";
5
5
  import "next/navigation";
6
- function je(e) {
6
+ function De(e) {
7
7
  var t;
8
8
  return {
9
9
  ...(t = e.component) == null ? void 0 : t.options,
@@ -14,30 +14,30 @@ function je(e) {
14
14
  builderBlock: e
15
15
  };
16
16
  }
17
- const A = "[Builder.io]: ", k = {
18
- log: (...e) => console.log(A, ...e),
19
- error: (...e) => console.error(A, ...e),
20
- warn: (...e) => console.warn(A, ...e),
21
- debug: (...e) => console.debug(A, ...e)
17
+ const P = "[Builder.io]: ", k = {
18
+ log: (...e) => console.log(P, ...e),
19
+ error: (...e) => console.error(P, ...e),
20
+ warn: (...e) => console.warn(P, ...e),
21
+ debug: (...e) => console.debug(P, ...e)
22
22
  };
23
- function S() {
23
+ function v() {
24
24
  return typeof window < "u" && typeof document < "u";
25
25
  }
26
- const T = "rsc";
27
- function Ke() {
28
- return S() && window.self !== window.top;
26
+ const I = "rsc";
27
+ function je() {
28
+ return v() && window.self !== window.top;
29
29
  }
30
30
  function D() {
31
- return Ke() && window.location.search.indexOf("builder.frameEditing=") !== -1;
31
+ return je() && window.location.search.indexOf("builder.frameEditing=") !== -1;
32
32
  }
33
33
  const He = () => {
34
- if (S()) {
34
+ if (v()) {
35
35
  const e = new URL(location.href);
36
36
  return e.pathname === "" && (e.pathname = "/"), e;
37
37
  } else
38
38
  return console.warn("Cannot get location for tracking in non-browser environment"), null;
39
- }, ze = () => typeof navigator == "object" && navigator.userAgent || "", le = () => {
40
- const e = ze(), t = {
39
+ }, Ke = () => typeof navigator == "object" && navigator.userAgent || "", se = () => {
40
+ const e = Ke(), t = {
41
41
  Android() {
42
42
  return e.match(/Android/i);
43
43
  },
@@ -54,7 +54,7 @@ const He = () => {
54
54
  return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
55
55
  },
56
56
  any() {
57
- return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || T === "reactNative";
57
+ return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || I === "reactNative";
58
58
  }
59
59
  }, n = e.match(/Tablet|iPad/i), o = He();
60
60
  return {
@@ -62,7 +62,7 @@ const He = () => {
62
62
  host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
63
63
  device: n ? "tablet" : t.any() ? "mobile" : "desktop"
64
64
  };
65
- }, qe = ({
65
+ }, ze = ({
66
66
  builder: e,
67
67
  context: t,
68
68
  event: n,
@@ -74,69 +74,69 @@ const He = () => {
74
74
  builder: e,
75
75
  context: t,
76
76
  event: n
77
- }), Ge = () => ({
77
+ }), qe = () => ({
78
78
  isEditing: D(),
79
- isBrowser: S(),
80
- isServer: !S(),
81
- getUserAttributes: () => le()
82
- }), Ye = (e, {
79
+ isBrowser: v(),
80
+ isServer: !v(),
81
+ getUserAttributes: () => se()
82
+ }), Ge = (e, {
83
83
  isExpression: t = !0
84
- }) => /* 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, Y = ({
84
+ }) => /* 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, q = ({
85
85
  code: e,
86
86
  builder: t,
87
87
  context: n,
88
88
  event: o,
89
89
  localState: i,
90
- rootSetState: r,
91
- rootState: a
90
+ rootSetState: a,
91
+ rootState: r
92
92
  }) => {
93
- const s = qe({
93
+ const s = ze({
94
94
  builder: t,
95
95
  context: n,
96
96
  event: o,
97
- state: Je(a, i, r)
97
+ state: Ye(r, i, a)
98
98
  });
99
99
  return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
100
100
  };
101
- function Je(e, t, n) {
101
+ function Ye(e, t, n) {
102
102
  if (e === t)
103
103
  throw new Error("rootState === localState");
104
104
  return new Proxy(e, {
105
105
  get: (o, i) => t && i in t ? t[i] : e[i],
106
- set: (o, i, r) => {
106
+ set: (o, i, a) => {
107
107
  if (t && i in t)
108
108
  throw new Error("Writing to local state is not allowed as it is read-only.");
109
- return e[i] = r, n == null || n(e), !0;
109
+ return e[i] = a, n == null || n(e), !0;
110
110
  }
111
111
  });
112
112
  }
113
- const Qe = (e) => (S(), Y(e));
113
+ const Je = (e) => (v(), q(e));
114
114
  function j({
115
115
  code: e,
116
116
  context: t,
117
117
  localState: n,
118
118
  rootState: o,
119
119
  rootSetState: i,
120
- event: r,
121
- isExpression: a = !0
120
+ event: a,
121
+ isExpression: r = !0
122
122
  }) {
123
123
  if (e === "") {
124
124
  k.warn("Skipping evaluation of empty code block.");
125
125
  return;
126
126
  }
127
127
  const s = {
128
- code: Ye(e, {
129
- isExpression: a
128
+ code: Ge(e, {
129
+ isExpression: r
130
130
  }),
131
- builder: Ge(),
131
+ builder: qe(),
132
132
  context: t,
133
- event: r,
133
+ event: a,
134
134
  rootSetState: i,
135
135
  rootState: o,
136
136
  localState: n
137
137
  };
138
138
  try {
139
- return Qe(s);
139
+ return Je(s);
140
140
  } catch (c) {
141
141
  k.error("Failed code evaluation: " + c.message, {
142
142
  code: e
@@ -144,13 +144,13 @@ function j({
144
144
  return;
145
145
  }
146
146
  }
147
- const $ = (e) => JSON.parse(JSON.stringify(e)), Xe = (e, t, n) => {
147
+ const $ = (e) => JSON.parse(JSON.stringify(e)), Qe = (e, t, n) => {
148
148
  if (Object(e) !== e)
149
149
  return e;
150
150
  const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
151
- return o.slice(0, -1).reduce((i, r, a) => Object(i[r]) === i[r] ? i[r] : i[r] = Math.abs(Number(o[a + 1])) >> 0 === +o[a + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
151
+ return o.slice(0, -1).reduce((i, a, r) => Object(i[a]) === i[a] ? i[a] : i[a] = Math.abs(Number(o[r + 1])) >> 0 === +o[r + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
152
152
  };
153
- const Ze = ({
153
+ const Xe = ({
154
154
  block: e,
155
155
  context: t,
156
156
  localState: n,
@@ -159,13 +159,13 @@ const Ze = ({
159
159
  }) => {
160
160
  if (!e.bindings)
161
161
  return e;
162
- const r = $(e), a = {
163
- ...r,
162
+ const a = $(e), r = {
163
+ ...a,
164
164
  properties: {
165
- ...r.properties
165
+ ...a.properties
166
166
  },
167
167
  actions: {
168
- ...r.actions
168
+ ...a.actions
169
169
  }
170
170
  };
171
171
  for (const s in e.bindings) {
@@ -176,9 +176,9 @@ const Ze = ({
176
176
  rootSetState: i,
177
177
  context: t
178
178
  });
179
- Xe(a, s, u);
179
+ Qe(r, s, u);
180
180
  }
181
- return a;
181
+ return r;
182
182
  };
183
183
  function W({
184
184
  block: e,
@@ -186,31 +186,31 @@ function W({
186
186
  shouldEvaluateBindings: n,
187
187
  localState: o,
188
188
  rootState: i,
189
- rootSetState: r
189
+ rootSetState: a
190
190
  }) {
191
- const a = e;
192
- return n ? Ze({
193
- block: a,
191
+ const r = e;
192
+ return n ? Xe({
193
+ block: r,
194
194
  localState: o,
195
195
  rootState: i,
196
- rootSetState: r,
196
+ rootSetState: a,
197
197
  context: t
198
- }) : a;
198
+ }) : r;
199
199
  }
200
- const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], N = (e) => typeof e == "string" && et.includes(e.toLowerCase()), tt = ({
200
+ const Ze = ({
201
201
  block: e,
202
202
  context: t,
203
203
  registeredComponents: n
204
204
  }) => {
205
- var r;
206
- const o = (r = W({
205
+ var a;
206
+ const o = (a = W({
207
207
  block: e,
208
208
  localState: t.localState,
209
209
  rootState: t.rootState,
210
210
  rootSetState: t.rootSetState,
211
211
  context: t.context,
212
212
  shouldEvaluateBindings: !1
213
- }).component) == null ? void 0 : r.name;
213
+ }).component) == null ? void 0 : a.name;
214
214
  if (!o)
215
215
  return null;
216
216
  const i = n[o];
@@ -219,7 +219,7 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
219
219
  console.warn(`
220
220
  Could not find a registered component named "${o}".
221
221
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
222
- }, nt = ({
222
+ }, et = ({
223
223
  block: e,
224
224
  context: t
225
225
  }) => {
@@ -238,7 +238,7 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
238
238
  });
239
239
  if (!Array.isArray(i))
240
240
  return;
241
- const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
241
+ const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
242
242
  return i.map((c, u) => ({
243
243
  context: {
244
244
  ...t,
@@ -246,13 +246,13 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
246
246
  ...t.localState,
247
247
  $index: u,
248
248
  $item: c,
249
- [a]: c,
250
- [`$${a}Index`]: u
249
+ [r]: c,
250
+ [`$${r}Index`]: u
251
251
  }
252
252
  },
253
253
  block: o
254
254
  }));
255
- }, de = {
255
+ }, ce = {
256
256
  small: {
257
257
  min: 320,
258
258
  default: 321,
@@ -268,11 +268,11 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
268
268
  default: 991,
269
269
  max: 1200
270
270
  }
271
- }, J = (e, t = de) => `@media (max-width: ${t[e].max}px)`, ue = ({
271
+ }, G = (e, t = ce) => `@media (max-width: ${t[e].max}px)`, le = ({
272
272
  small: e,
273
273
  medium: t
274
274
  }) => {
275
- const n = $(de);
275
+ const n = $(ce);
276
276
  if (!e || !t)
277
277
  return n;
278
278
  const o = Math.floor(e / 2);
@@ -287,24 +287,24 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
287
287
  min: i,
288
288
  default: i + 1
289
289
  };
290
- const r = n.medium.max + 1;
290
+ const a = n.medium.max + 1;
291
291
  return n.large = {
292
292
  max: 2e3,
293
293
  // TODO: decide upper limit
294
- min: r,
295
- default: r + 1
294
+ min: a,
295
+ default: a + 1
296
296
  }, n;
297
- }, ot = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), w = (e) => e != null, me = (e) => Object.entries(e).map(([n, o]) => {
297
+ }, tt = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), w = (e) => e != null, de = (e) => Object.entries(e).map(([n, o]) => {
298
298
  if (typeof o == "string")
299
- return `${ot(n)}: ${o};`;
300
- }).filter(w), it = (e) => me(e).join(`
299
+ return `${tt(n)}: ${o};`;
300
+ }).filter(w), nt = (e) => de(e).join(`
301
301
  `), _ = ({
302
302
  mediaQuery: e,
303
303
  className: t,
304
304
  styles: n
305
305
  }) => {
306
306
  const o = `.${t} {
307
- ${it(n)}
307
+ ${nt(n)}
308
308
  }`;
309
309
  return e ? `${e} {
310
310
  ${o}
@@ -313,7 +313,7 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
313
313
  function O(e) {
314
314
  return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
315
315
  }
316
- function rt(e) {
316
+ function ot(e) {
317
317
  const t = function() {
318
318
  const i = W({
319
319
  block: e.block,
@@ -333,37 +333,37 @@ function rt(e) {
333
333
  rootSetState: e.context.rootSetState,
334
334
  context: e.context.context,
335
335
  shouldEvaluateBindings: !0
336
- }), r = i.responsiveStyles, a = e.context.content, s = ue(
337
- ((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
338
- ), c = r == null ? void 0 : r.large, u = r == null ? void 0 : r.medium, h = r == null ? void 0 : r.small, g = i.id;
339
- if (!g)
336
+ }), a = i.responsiveStyles, r = e.context.content, s = le(
337
+ ((d = r == null ? void 0 : r.meta) == null ? void 0 : d.breakpoints) || {}
338
+ ), c = a == null ? void 0 : a.large, u = a == null ? void 0 : a.medium, g = a == null ? void 0 : a.small, p = i.id;
339
+ if (!p)
340
340
  return "";
341
341
  const m = c ? _({
342
- className: g,
342
+ className: p,
343
343
  styles: c
344
- }) : "", f = u ? _({
345
- className: g,
344
+ }) : "", h = u ? _({
345
+ className: p,
346
346
  styles: u,
347
- mediaQuery: J(
347
+ mediaQuery: G(
348
348
  "medium",
349
349
  s
350
350
  )
351
- }) : "", p = h ? _({
352
- className: g,
353
- styles: h,
354
- mediaQuery: J(
351
+ }) : "", f = g ? _({
352
+ className: p,
353
+ styles: g,
354
+ mediaQuery: G(
355
355
  "small",
356
356
  s
357
357
  )
358
358
  }) : "";
359
- return [m, f, p].join(" ");
359
+ return [m, h, f].join(" ");
360
360
  };
361
- return /* @__PURE__ */ l(y, { children: n() && t() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
361
+ return /* @__PURE__ */ l(S, { children: n() && t() ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
362
362
  }
363
- function at(e) {
363
+ function it(e) {
364
364
  return e.charAt(0).toUpperCase() + e.slice(1);
365
365
  }
366
- const st = (e) => `on${at(e)}`, ct = (e, t) => (n) => j({
366
+ const at = (e) => `on${it(e)}`, rt = (e, t) => (n) => j({
367
367
  code: e,
368
368
  context: t.context,
369
369
  localState: t.localState,
@@ -372,58 +372,58 @@ const st = (e) => `on${at(e)}`, ct = (e, t) => (n) => j({
372
372
  event: n,
373
373
  isExpression: !1
374
374
  });
375
- function Un(e) {
375
+ function jn(e) {
376
376
  const t = {}, n = e.block.actions ?? {};
377
377
  for (const o in n) {
378
378
  if (!n.hasOwnProperty(o))
379
379
  continue;
380
380
  const i = n[o];
381
- let r = st(o);
381
+ let a = at(o);
382
382
  if (e.stripPrefix)
383
- switch (T) {
383
+ switch (I) {
384
384
  case "vue":
385
- r = r.replace("v-on:", "");
385
+ a = a.replace("v-on:", "");
386
386
  break;
387
387
  case "svelte":
388
- r = r.replace("on:", "");
388
+ a = a.replace("on:", "");
389
389
  break;
390
390
  }
391
- t[r] = ct(i, e);
391
+ t[a] = rt(i, e);
392
392
  }
393
393
  return t;
394
394
  }
395
- function lt({
395
+ function st({
396
396
  properties: e
397
397
  }) {
398
398
  return e.className = e.class, delete e.class, e;
399
399
  }
400
- const dt = (e) => ({
400
+ const ct = (e) => ({
401
401
  href: e.href
402
402
  });
403
- function ut({
403
+ function lt({
404
404
  block: e,
405
405
  context: t
406
406
  }) {
407
407
  var o;
408
408
  const n = {
409
- ...dt(e),
409
+ ...ct(e),
410
410
  ...e.properties,
411
411
  "builder-id": e.id,
412
- style: e.style ? mt(e.style) : void 0,
412
+ style: e.style ? dt(e.style) : void 0,
413
413
  class: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
414
414
  };
415
- return lt({
415
+ return st({
416
416
  properties: n,
417
417
  context: t,
418
418
  block: e
419
419
  });
420
420
  }
421
- function mt(e) {
422
- switch (T) {
421
+ function dt(e) {
422
+ switch (I) {
423
423
  case "svelte":
424
424
  case "vue":
425
425
  case "solid":
426
- return me(e).join(" ");
426
+ return de(e).join(" ");
427
427
  case "qwik":
428
428
  case "reactNative":
429
429
  case "react":
@@ -431,14 +431,14 @@ function mt(e) {
431
431
  return e;
432
432
  }
433
433
  }
434
- const ft = ({
434
+ const ut = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Hn = (e) => typeof e == "string" && ut.has(e.toLowerCase()), mt = ({
435
435
  componentOptions: e,
436
436
  builderBlock: t,
437
437
  context: n,
438
438
  componentRef: o,
439
439
  includeBlockProps: i,
440
- isInteractive: r,
441
- contextValue: a
440
+ isInteractive: a,
441
+ contextValue: r
442
442
  }) => {
443
443
  const s = {
444
444
  ...e,
@@ -447,13 +447,13 @@ const ft = ({
447
447
  * component itself directly. Otherwise, they are provided to the wrapper element.
448
448
  */
449
449
  ...i ? {
450
- attributes: ut({
450
+ attributes: lt({
451
451
  block: t,
452
- context: a
452
+ context: r
453
453
  })
454
454
  } : {}
455
455
  };
456
- return r ? {
456
+ return a ? {
457
457
  Wrapper: o,
458
458
  block: t,
459
459
  context: n,
@@ -461,13 +461,13 @@ const ft = ({
461
461
  includeBlockProps: i
462
462
  } : s;
463
463
  };
464
- function Q(e) {
464
+ function Y(e) {
465
465
  var n;
466
- const t = e.isInteractive ? Be : e.componentRef;
467
- return /* @__PURE__ */ l(y, { children: e.componentRef ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
466
+ const t = e.isInteractive ? Pe : e.componentRef;
467
+ return /* @__PURE__ */ l(S, { children: e.componentRef ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
468
468
  t,
469
469
  {
470
- ...ft({
470
+ ...mt({
471
471
  componentOptions: e.componentOptions,
472
472
  builderBlock: e.builderBlock,
473
473
  context: e.context,
@@ -488,7 +488,7 @@ function Q(e) {
488
488
  }
489
489
  ) }) : null });
490
490
  }
491
- function ht(e) {
491
+ function ft(e) {
492
492
  const t = e.repeatContext;
493
493
  return /* @__PURE__ */ l(
494
494
  F,
@@ -500,21 +500,21 @@ function ht(e) {
500
500
  );
501
501
  }
502
502
  function F(e) {
503
- var u, h, g;
503
+ var u, g, p;
504
504
  const t = function() {
505
- return tt({
505
+ return Ze({
506
506
  block: e.block,
507
507
  context: e.context,
508
508
  registeredComponents: e.registeredComponents
509
509
  });
510
510
  }, n = function() {
511
- return nt({
511
+ return et({
512
512
  block: e.block,
513
513
  context: e.context
514
514
  });
515
515
  }, o = function() {
516
- var f;
517
- return (f = e.block.repeat) != null && f.collection ? e.block : W({
516
+ var h;
517
+ return (h = e.block.repeat) != null && h.collection ? e.block : W({
518
518
  block: e.block,
519
519
  localState: e.context.localState,
520
520
  rootState: e.context.rootState,
@@ -524,24 +524,24 @@ function F(e) {
524
524
  });
525
525
  }, i = function() {
526
526
  return e.block.tagName || "div";
527
- }, r = function() {
527
+ }, a = function() {
528
528
  var d, b;
529
529
  if ((d = e.block.repeat) != null && d.collection)
530
530
  return !!((b = n()) != null && b.length);
531
- const f = "hide" in o() ? o().hide : !1;
532
- return ("show" in o() ? o().show : !0) && !f;
533
- }, a = function() {
534
- var p;
535
- return !((p = t()) != null && p.component) && !n() ? o().children ?? [] : [];
531
+ const h = "hide" in o() ? o().hide : !1;
532
+ return ("show" in o() ? o().show : !0) && !h;
533
+ }, r = function() {
534
+ var f;
535
+ return !((f = t()) != null && f.component) && !n() ? o().children ?? [] : [];
536
536
  }, s = function() {
537
- var f, p, d, b, x;
537
+ var h, f, d, b, x;
538
538
  return {
539
539
  blockChildren: o().children ?? [],
540
- componentRef: (f = t()) == null ? void 0 : f.component,
540
+ componentRef: (h = t()) == null ? void 0 : h.component,
541
541
  componentOptions: {
542
- ...je(o()),
542
+ ...De(o()),
543
543
  builderContext: e.context,
544
- ...((p = t()) == null ? void 0 : p.name) === "Symbol" || ((d = t()) == null ? void 0 : d.name) === "Columns" ? {
544
+ ...((f = t()) == null ? void 0 : f.name) === "Symbol" || ((d = t()) == null ? void 0 : d.name) === "Columns" ? {
545
545
  builderComponents: e.registeredComponents
546
546
  } : {}
547
547
  },
@@ -552,10 +552,10 @@ function F(e) {
552
552
  isInteractive: !((x = t()) != null && x.isRSC)
553
553
  };
554
554
  }, c = e.context;
555
- return /* @__PURE__ */ l(y, { children: r() ? /* @__PURE__ */ I(y, { children: [
556
- /* @__PURE__ */ l(rt, { block: e.block, context: e.context }),
557
- (u = t()) != null && u.noWrap ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
558
- Q,
555
+ return /* @__PURE__ */ l(S, { children: a() ? /* @__PURE__ */ T(S, { children: [
556
+ /* @__PURE__ */ l(ot, { block: e.block, context: e.context }),
557
+ (u = t()) != null && u.noWrap ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
558
+ Y,
559
559
  {
560
560
  componentRef: s().componentRef,
561
561
  componentOptions: s().componentOptions,
@@ -566,65 +566,52 @@ function F(e) {
566
566
  includeBlockProps: s().includeBlockProps,
567
567
  isInteractive: s().isInteractive
568
568
  }
569
- ) }) : /* @__PURE__ */ I(y, { children: [
570
- N(i()) ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
571
- G,
572
- {
573
- Wrapper: i(),
574
- block: o(),
575
- context: e.context,
576
- hasChildren: !1
577
- }
578
- ) }) : null,
579
- !N(i()) && n() ? /* @__PURE__ */ l(y, { children: (h = n()) == null ? void 0 : h.map((m, f) => /* @__PURE__ */ l(
580
- ht,
581
- {
582
- repeatContext: m.context,
583
- block: m.block,
584
- registeredComponents: e.registeredComponents
585
- },
586
- f
587
- )) }) : null,
588
- !N(i()) && !n() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ I(
589
- G,
590
- {
591
- Wrapper: i(),
592
- block: o(),
593
- context: e.context,
594
- hasChildren: !0,
595
- children: [
596
- /* @__PURE__ */ l(
597
- Q,
598
- {
599
- componentRef: s().componentRef,
600
- componentOptions: s().componentOptions,
601
- blockChildren: s().blockChildren,
602
- context: s().context,
603
- registeredComponents: s().registeredComponents,
604
- builderBlock: s().builderBlock,
605
- includeBlockProps: s().includeBlockProps,
606
- isInteractive: s().isInteractive
607
- }
608
- ),
609
- (g = a()) == null ? void 0 : g.map((m) => /* @__PURE__ */ l(
610
- F,
611
- {
612
- block: m,
613
- context: c,
614
- registeredComponents: e.registeredComponents
615
- },
616
- m.id
617
- ))
618
- ]
619
- }
620
- ) }) : null
621
- ] })
569
+ ) }) : /* @__PURE__ */ l(S, { children: n() ? /* @__PURE__ */ l(S, { children: (p = n()) == null ? void 0 : p.map((m, h) => /* @__PURE__ */ l(
570
+ ft,
571
+ {
572
+ repeatContext: m.context,
573
+ block: m.block,
574
+ registeredComponents: e.registeredComponents
575
+ },
576
+ h
577
+ )) }) : /* @__PURE__ */ l(S, { children: /* @__PURE__ */ T(
578
+ Ve,
579
+ {
580
+ Wrapper: i(),
581
+ block: o(),
582
+ context: e.context,
583
+ children: [
584
+ /* @__PURE__ */ l(
585
+ Y,
586
+ {
587
+ componentRef: s().componentRef,
588
+ componentOptions: s().componentOptions,
589
+ blockChildren: s().blockChildren,
590
+ context: s().context,
591
+ registeredComponents: s().registeredComponents,
592
+ builderBlock: s().builderBlock,
593
+ includeBlockProps: s().includeBlockProps,
594
+ isInteractive: s().isInteractive
595
+ }
596
+ ),
597
+ (g = r()) == null ? void 0 : g.map((m) => /* @__PURE__ */ l(
598
+ F,
599
+ {
600
+ block: m,
601
+ context: c,
602
+ registeredComponents: e.registeredComponents
603
+ },
604
+ m.id
605
+ ))
606
+ ]
607
+ }
608
+ ) }) })
622
609
  ] }) : null });
623
610
  }
624
- function K(e) {
611
+ function N(e) {
625
612
  var t, n, o;
626
613
  return /* @__PURE__ */ l(
627
- We,
614
+ Be,
628
615
  {
629
616
  blocks: e.blocks,
630
617
  parent: e.parent,
@@ -632,7 +619,7 @@ function K(e) {
632
619
  styleProp: e.styleProp,
633
620
  BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
634
621
  BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
635
- children: e.blocks ? /* @__PURE__ */ l(y, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
622
+ children: e.blocks ? /* @__PURE__ */ l(S, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
636
623
  F,
637
624
  {
638
625
  block: i,
@@ -644,15 +631,15 @@ function K(e) {
644
631
  }
645
632
  );
646
633
  }
647
- function pt(e) {
648
- var f;
634
+ function ht(e) {
635
+ var h;
649
636
  const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
650
637
  var b;
651
638
  return ((b = n[d]) == null ? void 0 : b.width) || 100 / n.length;
652
- }, r = function(d) {
639
+ }, a = function(d) {
653
640
  const b = t * (n.length - 1) / n.length;
654
641
  return `calc(${i(d)}% - ${b}px)`;
655
- }, a = function({
642
+ }, r = function({
656
643
  stackedStyle: d,
657
644
  desktopStyle: b
658
645
  }) {
@@ -665,41 +652,41 @@ function pt(e) {
665
652
  }, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", u = function() {
666
653
  return {
667
654
  "--flex-dir": c,
668
- "--flex-dir-tablet": a({
655
+ "--flex-dir-tablet": r({
669
656
  stackedStyle: c,
670
657
  desktopStyle: "row"
671
658
  })
672
659
  };
673
- }, h = function(d) {
674
- const b = d === 0 ? 0 : t, x = r(d), v = `${b}px`, P = "100%", E = 0;
660
+ }, g = function(d) {
661
+ const b = d === 0 ? 0 : t, x = a(d), y = `${b}px`, A = "100%", E = 0;
675
662
  return {
676
663
  width: x,
677
- ["marginLeft"]: v,
664
+ ["marginLeft"]: y,
678
665
  "--column-width-mobile": s({
679
- stackedStyle: P,
666
+ stackedStyle: A,
680
667
  desktopStyle: x
681
668
  }),
682
669
  "--column-margin-left-mobile": s({
683
670
  stackedStyle: E,
684
- desktopStyle: v
671
+ desktopStyle: y
685
672
  }),
686
- "--column-width-tablet": a({
687
- stackedStyle: P,
673
+ "--column-width-tablet": r({
674
+ stackedStyle: A,
688
675
  desktopStyle: x
689
676
  }),
690
- "--column-margin-left-tablet": a({
677
+ "--column-margin-left-tablet": r({
691
678
  stackedStyle: E,
692
- desktopStyle: v
679
+ desktopStyle: y
693
680
  })
694
681
  };
695
- }, g = function(d) {
696
- var x, v;
697
- return ue(
698
- ((v = (x = e.builderContext.content) == null ? void 0 : x.meta) == null ? void 0 : v.breakpoints) || {}
682
+ }, p = function(d) {
683
+ var x, y;
684
+ return le(
685
+ ((y = (x = e.builderContext.content) == null ? void 0 : x.meta) == null ? void 0 : y.breakpoints) || {}
699
686
  )[d].max;
700
687
  }, m = function() {
701
688
  return `
702
- @media (max-width: ${g("medium")}px) {
689
+ @media (max-width: ${p("medium")}px) {
703
690
  .${e.builderBlock.id}-breakpoints {
704
691
  flex-direction: var(--flex-dir-tablet);
705
692
  align-items: stretch;
@@ -711,7 +698,7 @@ function pt(e) {
711
698
  }
712
699
  }
713
700
 
714
- @media (max-width: ${g("small")}px) {
701
+ @media (max-width: ${p("small")}px) {
715
702
  .${e.builderBlock.id}-breakpoints {
716
703
  flex-direction: var(--flex-dir);
717
704
  align-items: stretch;
@@ -724,23 +711,23 @@ function pt(e) {
724
711
  },
725
712
  `;
726
713
  };
727
- return /* @__PURE__ */ I(y, { children: [
728
- /* @__PURE__ */ I(
714
+ return /* @__PURE__ */ T(S, { children: [
715
+ /* @__PURE__ */ T(
729
716
  "div",
730
717
  {
731
718
  className: `builder-columns ${e.builderBlock.id}-breakpoints div-39daef82`,
732
719
  style: u(),
733
720
  children: [
734
- /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles: m() }) }),
735
- (f = e.columns) == null ? void 0 : f.map((p, d) => /* @__PURE__ */ Ve(
721
+ /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: m() }) }),
722
+ (h = e.columns) == null ? void 0 : h.map((f, d) => /* @__PURE__ */ Ae(
736
723
  "div",
737
724
  {
738
725
  className: "builder-column div-39daef82-2",
739
- style: h(d),
726
+ style: g(d),
740
727
  key: d
741
728
  },
742
729
  /* @__PURE__ */ l(
743
- K,
730
+ N,
744
731
  {
745
732
  path: `component.options.columns.${d}.blocks`,
746
733
  parent: e.builderBlock.id,
@@ -749,7 +736,7 @@ function pt(e) {
749
736
  },
750
737
  context: e.builderContext,
751
738
  registeredComponents: e.builderComponents,
752
- blocks: p.blocks
739
+ blocks: f.blocks
753
740
  }
754
741
  )
755
742
  ))
@@ -766,42 +753,42 @@ function pt(e) {
766
753
  }` })
767
754
  ] });
768
755
  }
769
- function X(e) {
756
+ function J(e) {
770
757
  return e.replace(/http(s)?:/, "");
771
758
  }
772
- function gt(e = "", t, n) {
759
+ function pt(e = "", t, n) {
773
760
  const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
774
761
  return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
775
762
  }
776
- function bt(e, t) {
763
+ function gt(e, t) {
777
764
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
778
765
  return e;
779
766
  if (t === "master")
780
- return X(e);
767
+ return J(e);
781
768
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
782
769
  if (n) {
783
- const o = e.split(n[0]), i = n[3], r = t.match("x") ? t : `${t}x`;
784
- return X(`${o[0]}_${r}${i}`);
770
+ const o = e.split(n[0]), i = n[3], a = t.match("x") ? t : `${t}x`;
771
+ return J(`${o[0]}_${a}${i}`);
785
772
  }
786
773
  return null;
787
774
  }
788
- function Mn(e) {
775
+ function Kn(e) {
789
776
  if (!e)
790
777
  return e;
791
778
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
792
779
  if (e.match(/builder\.io/)) {
793
780
  let n = e;
794
781
  const o = Number(e.split("?width=")[1]);
795
- return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${gt(e, "width", i)} ${i}w`).concat([n]).join(", ");
782
+ return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${pt(e, "width", i)} ${i}w`).concat([n]).join(", ");
796
783
  }
797
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [bt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
784
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [gt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
798
785
  }
799
- const yt = (e) => {
786
+ const bt = (e) => {
800
787
  if (e === "localhost" || e === "127.0.0.1")
801
788
  return e;
802
789
  const t = e.split(".");
803
790
  return t.length > 2 ? t.slice(1).join(".") : e;
804
- }, fe = ({
791
+ }, ue = ({
805
792
  name: e,
806
793
  canTrack: t
807
794
  }) => {
@@ -812,14 +799,14 @@ const yt = (e) => {
812
799
  k.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
813
800
  return;
814
801
  }
815
- }, he = async (e) => fe(e), vt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(w).join("; "), St = [["secure", ""], ["SameSite", "None"]], xt = ({
802
+ }, me = async (e) => ue(e), yt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(w).join("; "), St = [["secure", ""], ["SameSite", "None"]], vt = ({
816
803
  name: e,
817
804
  value: t,
818
805
  expires: n
819
806
  }) => {
820
- const i = (S() ? location.protocol === "https:" : !0) ? St : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", yt(window.location.hostname)], ...i];
821
- return vt(a);
822
- }, pe = async ({
807
+ const i = (v() ? location.protocol === "https:" : !0) ? St : [[]], a = n ? [["expires", n.toUTCString()]] : [[]], r = [[e, t], ...a, ["path", "/"], ["domain", bt(window.location.hostname)], ...i];
808
+ return yt(r);
809
+ }, fe = async ({
823
810
  name: e,
824
811
  value: t,
825
812
  expires: n,
@@ -828,7 +815,7 @@ const yt = (e) => {
828
815
  try {
829
816
  if (!o)
830
817
  return;
831
- const i = xt({
818
+ const i = vt({
832
819
  name: e,
833
820
  value: t,
834
821
  expires: n
@@ -837,45 +824,45 @@ const yt = (e) => {
837
824
  } catch (i) {
838
825
  k.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
839
826
  }
840
- }, kt = "builder.tests", H = (e) => `${kt}.${e}`, Ct = ({
827
+ }, xt = "builder.tests", H = (e) => `${xt}.${e}`, kt = ({
841
828
  contentId: e
842
- }) => he({
829
+ }) => me({
843
830
  name: H(e),
844
831
  canTrack: !0
845
- }), wt = ({
832
+ }), Ct = ({
846
833
  contentId: e
847
- }) => fe({
834
+ }) => ue({
848
835
  name: H(e),
849
836
  canTrack: !0
850
- }), It = ({
837
+ }), wt = ({
851
838
  contentId: e,
852
839
  value: t
853
- }) => pe({
840
+ }) => fe({
854
841
  name: H(e),
855
842
  value: t,
856
843
  canTrack: !0
857
- }), ge = (e) => w(e.id) && w(e.variations) && Object.keys(e.variations).length > 0, Tt = ({
844
+ }), he = (e) => w(e.id) && w(e.variations) && Object.keys(e.variations).length > 0, It = ({
858
845
  id: e,
859
846
  variations: t
860
847
  }) => {
861
848
  var i;
862
849
  let n = 0;
863
850
  const o = Math.random();
864
- for (const r in t) {
865
- const a = (i = t[r]) == null ? void 0 : i.testRatio;
866
- if (n += a, o < n)
867
- return r;
851
+ for (const a in t) {
852
+ const r = (i = t[a]) == null ? void 0 : i.testRatio;
853
+ if (n += r, o < n)
854
+ return a;
868
855
  }
869
856
  return e;
870
- }, be = (e) => {
871
- const t = Tt(e);
872
- return It({
857
+ }, pe = (e) => {
858
+ const t = It(e);
859
+ return wt({
873
860
  contentId: e.id,
874
861
  value: t
875
862
  }).catch((n) => {
876
863
  k.error("could not store A/B test variation: ", n);
877
864
  }), t;
878
- }, ye = ({
865
+ }, ge = ({
879
866
  item: e,
880
867
  testGroupId: t
881
868
  }) => {
@@ -889,7 +876,7 @@ const yt = (e) => {
889
876
  testVariationId: n.id,
890
877
  testVariationName: n.name || (n.id === e.id ? "Default" : "")
891
878
  };
892
- }, Et = ({
879
+ }, Tt = ({
893
880
  item: e,
894
881
  canTrack: t
895
882
  }) => {
@@ -897,14 +884,14 @@ const yt = (e) => {
897
884
  return e;
898
885
  if (!e)
899
886
  return;
900
- if (!ge(e))
887
+ if (!he(e))
901
888
  return e;
902
- const n = wt({
889
+ const n = Ct({
903
890
  contentId: e.id
904
- }) || be({
891
+ }) || pe({
905
892
  variations: e.variations,
906
893
  id: e.id
907
- }), o = ye({
894
+ }), o = ge({
908
895
  item: e,
909
896
  testGroupId: n
910
897
  });
@@ -912,18 +899,18 @@ const yt = (e) => {
912
899
  ...e,
913
900
  ...o
914
901
  };
915
- }, Rt = async ({
902
+ }, Et = async ({
916
903
  item: e,
917
904
  canTrack: t
918
905
  }) => {
919
- if (!t || !ge(e))
906
+ if (!t || !he(e))
920
907
  return e;
921
- const o = await Ct({
908
+ const o = await kt({
922
909
  contentId: e.id
923
- }) || be({
910
+ }) || pe({
924
911
  variations: e.variations,
925
912
  id: e.id
926
- }), i = ye({
913
+ }), i = ge({
927
914
  item: e,
928
915
  testGroupId: o
929
916
  });
@@ -931,7 +918,7 @@ const yt = (e) => {
931
918
  ...e,
932
919
  ...i
933
920
  };
934
- }, L = (e) => w(e) ? e : !0, Pt = {
921
+ }, L = (e) => w(e) ? e : !0, Rt = {
935
922
  name: "Core:Button",
936
923
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
937
924
  defaultStyles: {
@@ -1143,7 +1130,7 @@ const yt = (e) => {
1143
1130
  });
1144
1131
  }
1145
1132
  const n = e.get("columns");
1146
- Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((r) => !r.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
1133
+ Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
1147
1134
  }
1148
1135
  }, {
1149
1136
  name: "space",
@@ -1165,7 +1152,7 @@ const yt = (e) => {
1165
1152
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1166
1153
  advanced: !0
1167
1154
  }]
1168
- }, Vt = {
1155
+ }, Pt = {
1169
1156
  name: "Custom Code",
1170
1157
  static: !0,
1171
1158
  requiredPermissions: ["editCode"],
@@ -1187,7 +1174,7 @@ const yt = (e) => {
1187
1174
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1188
1175
  advanced: !0
1189
1176
  }]
1190
- }, Bt = {
1177
+ }, Vt = {
1191
1178
  name: "Embed",
1192
1179
  static: !0,
1193
1180
  inputs: [{
@@ -1212,13 +1199,13 @@ const yt = (e) => {
1212
1199
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1213
1200
  hideFromUI: !0
1214
1201
  }]
1215
- }, Wt = ["text/javascript", "application/javascript", "application/ecmascript"], Dn = (e) => Wt.includes(e.type), $t = {
1202
+ }, Bt = ["text/javascript", "application/javascript", "application/ecmascript"], zn = (e) => Bt.includes(e.type), Wt = {
1216
1203
  name: "Fragment",
1217
1204
  static: !0,
1218
1205
  hidden: !0,
1219
1206
  canHaveChildren: !0,
1220
1207
  noWrap: !0
1221
- }, Ot = {
1208
+ }, $t = {
1222
1209
  name: "Image",
1223
1210
  static: !0,
1224
1211
  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",
@@ -1238,29 +1225,29 @@ const yt = (e) => {
1238
1225
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1239
1226
  onChange: (e) => {
1240
1227
  e.delete("srcset"), e.delete("noWebp");
1241
- function n(a, s = 6e4) {
1228
+ function n(r, s = 6e4) {
1242
1229
  return new Promise((c, u) => {
1243
- const h = document.createElement("img");
1244
- let g = !1;
1245
- h.onload = () => {
1246
- g = !0, c(h);
1247
- }, h.addEventListener("error", (m) => {
1230
+ const g = document.createElement("img");
1231
+ let p = !1;
1232
+ g.onload = () => {
1233
+ p = !0, c(g);
1234
+ }, g.addEventListener("error", (m) => {
1248
1235
  console.warn("Image load failed", m.error), u(m.error);
1249
- }), h.src = a, setTimeout(() => {
1250
- g || u(new Error("Image load timed out"));
1236
+ }), g.src = r, setTimeout(() => {
1237
+ p || u(new Error("Image load timed out"));
1251
1238
  }, s);
1252
1239
  });
1253
1240
  }
1254
- function o(a) {
1255
- return Math.round(a * 1e3) / 1e3;
1241
+ function o(r) {
1242
+ return Math.round(r * 1e3) / 1e3;
1256
1243
  }
1257
- const i = e.get("image"), r = e.get("aspectRatio");
1258
- if (fetch(i).then((a) => a.blob()).then((a) => {
1259
- a.type.includes("svg") && e.set("noWebp", !0);
1260
- }), i && (!r || r === 0.7041))
1261
- return n(i).then((a) => {
1244
+ const i = e.get("image"), a = e.get("aspectRatio");
1245
+ if (fetch(i).then((r) => r.blob()).then((r) => {
1246
+ r.type.includes("svg") && e.set("noWebp", !0);
1247
+ }), i && (!a || a === 0.7041))
1248
+ return n(i).then((r) => {
1262
1249
  const s = e.get("aspectRatio");
1263
- e.get("image") === i && (!s || s === 0.7041) && a.width && a.height && (e.set("aspectRatio", o(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
1250
+ e.get("image") === i && (!s || s === 0.7041) && r.width && r.height && (e.set("aspectRatio", o(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1264
1251
  });
1265
1252
  }
1266
1253
  }, {
@@ -1318,7 +1305,7 @@ const yt = (e) => {
1318
1305
  advanced: !0,
1319
1306
  defaultValue: 0.7041
1320
1307
  }]
1321
- }, Ft = {
1308
+ }, Ot = {
1322
1309
  // friendlyName?
1323
1310
  name: "Raw:Img",
1324
1311
  hideFromInsertMenu: !0,
@@ -1332,7 +1319,7 @@ const yt = (e) => {
1332
1319
  }],
1333
1320
  noWrap: !0,
1334
1321
  static: !0
1335
- }, Nt = {
1322
+ }, Ft = {
1336
1323
  name: "Core:Section",
1337
1324
  static: !0,
1338
1325
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1371,7 +1358,44 @@ const yt = (e) => {
1371
1358
  }
1372
1359
  }
1373
1360
  }]
1374
- }, _t = {
1361
+ }, Nt = {
1362
+ name: "Slot",
1363
+ isRSC: !0,
1364
+ description: "Allow child blocks to be inserted into this content when used as a Symbol",
1365
+ docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
1366
+ image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
1367
+ // Maybe wrap this for canHaveChildren so bind children to this hm
1368
+ inputs: [{
1369
+ name: "name",
1370
+ type: "string",
1371
+ required: !0,
1372
+ defaultValue: "children"
1373
+ }]
1374
+ };
1375
+ function _t(e) {
1376
+ var t, n, o;
1377
+ return /* @__PURE__ */ l(
1378
+ "div",
1379
+ {
1380
+ style: {
1381
+ pointerEvents: "auto"
1382
+ },
1383
+ ...!((t = e.builderContext.context) != null && t.symbolId) && {
1384
+ "builder-slot": e.name
1385
+ },
1386
+ children: /* @__PURE__ */ l(
1387
+ N,
1388
+ {
1389
+ parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
1390
+ path: `symbol.data.${e.name}`,
1391
+ context: e.builderContext,
1392
+ blocks: (o = e.builderContext.rootState) == null ? void 0 : o[e.name]
1393
+ }
1394
+ )
1395
+ }
1396
+ );
1397
+ }
1398
+ const Lt = {
1375
1399
  name: "Symbol",
1376
1400
  noWrap: !0,
1377
1401
  static: !0,
@@ -1404,7 +1428,7 @@ const yt = (e) => {
1404
1428
  hideFromUI: !0,
1405
1429
  type: "boolean"
1406
1430
  }]
1407
- }, Lt = {
1431
+ }, Ut = {
1408
1432
  name: "Text",
1409
1433
  static: !0,
1410
1434
  isRSC: !0,
@@ -1423,7 +1447,7 @@ const yt = (e) => {
1423
1447
  textAlign: "center"
1424
1448
  }
1425
1449
  };
1426
- function Ut(e) {
1450
+ function Mt(e) {
1427
1451
  var t;
1428
1452
  return /* @__PURE__ */ l(
1429
1453
  "div",
@@ -1436,7 +1460,7 @@ function Ut(e) {
1436
1460
  }
1437
1461
  );
1438
1462
  }
1439
- const Mt = {
1463
+ const Dt = {
1440
1464
  name: "Video",
1441
1465
  canHaveChildren: !0,
1442
1466
  defaultStyles: {
@@ -1517,18 +1541,21 @@ const Mt = {
1517
1541
  defaultValue: !0,
1518
1542
  advanced: !0
1519
1543
  }]
1520
- }, Z = () => [{
1521
- component: $e,
1522
- ...Pt
1544
+ }, Q = () => [{
1545
+ component: We,
1546
+ ...Rt
1523
1547
  }, {
1524
- component: pt,
1548
+ component: ht,
1525
1549
  ...At
1550
+ }, {
1551
+ component: $e,
1552
+ ...Pt
1526
1553
  }, {
1527
1554
  component: Oe,
1528
1555
  ...Vt
1529
1556
  }, {
1530
1557
  component: Fe,
1531
- ...Bt
1558
+ ...Wt
1532
1559
  }, {
1533
1560
  component: Ne,
1534
1561
  ...$t
@@ -1539,31 +1566,31 @@ const Mt = {
1539
1566
  component: Le,
1540
1567
  ...Ft
1541
1568
  }, {
1542
- component: Ue,
1543
- ...Nt
1569
+ component: Nn,
1570
+ ...Lt
1544
1571
  }, {
1545
- component: $n,
1546
- ..._t
1572
+ component: Mt,
1573
+ ...Ut
1547
1574
  }, {
1548
- component: Ut,
1549
- ...Lt
1575
+ component: Ue,
1576
+ ...Dt
1550
1577
  }, {
1551
- component: Me,
1552
- ...Mt
1553
- }], ee = [], jn = (e) => ({
1578
+ component: _t,
1579
+ ...Nt
1580
+ }], X = [], qn = (e) => ({
1554
1581
  type: "builder.registerComponent",
1555
1582
  data: U(e)
1556
- }), Dt = (e) => {
1583
+ }), jt = (e) => {
1557
1584
  const t = e.toString().trim();
1558
1585
  return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
1559
- }, jt = (e) => typeof e == "function" ? Dt(e) : $(e), U = ({
1586
+ }, Ht = (e) => typeof e == "function" ? jt(e) : $(e), U = ({
1560
1587
  inputs: e,
1561
1588
  ...t
1562
1589
  }) => ({
1563
1590
  ...$(t),
1564
- inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
1591
+ inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, a]) => ({
1565
1592
  ...o,
1566
- [i]: jt(r)
1593
+ [i]: Ht(a)
1567
1594
  }), {}))
1568
1595
  }), Kt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1569
1596
  function getAndSetVariantId() {
@@ -1621,7 +1648,7 @@ const Mt = {
1621
1648
  }).join('');
1622
1649
  styleEl.innerHTML = newStyleStr;
1623
1650
  }
1624
- }`, Ht = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1651
+ }`, zt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1625
1652
  if (!navigator.cookieEnabled) {
1626
1653
  return;
1627
1654
  }
@@ -1655,24 +1682,24 @@ const Mt = {
1655
1682
  thisScriptEl?.remove();
1656
1683
  }
1657
1684
  return;
1658
- }`, ve = "builderIoAbTest", Se = "builderIoRenderContent", V = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1685
+ }`, be = "builderIoAbTest", ye = "builderIoRenderContent", V = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1659
1686
  ...t,
1660
1687
  testVariationId: t.id,
1661
1688
  id: e == null ? void 0 : e.id
1662
- })), zt = ({
1689
+ })), qt = ({
1663
1690
  canTrack: e,
1664
1691
  content: t
1665
- }) => !(!(V(t).length > 0) || !e || S()), qt = (e) => e === "react" || e === "reactNative", xe = qt(T), Gt = () => `
1666
- window.${ve} = ${Kt}
1667
- window.${Se} = ${Ht}
1668
- `, Yt = (e, t) => `
1669
- window.${ve}(
1670
- "${t}",${JSON.stringify(e)}, ${xe}
1671
- )`, Jt = ({
1692
+ }) => !(!(V(t).length > 0) || !e || v()), Gt = (e) => e === "react" || e === "reactNative", Se = Gt(I), Yt = () => `
1693
+ window.${be} = ${Kt}
1694
+ window.${ye} = ${zt}
1695
+ `, Jt = (e, t) => `
1696
+ window.${be}(
1697
+ "${t}",${JSON.stringify(e)}, ${Se}
1698
+ )`, Qt = ({
1672
1699
  contentId: e,
1673
1700
  variationId: t
1674
- }) => `window.${Se}(
1675
- "${t}", "${e}", ${xe}
1701
+ }) => `window.${ye}(
1702
+ "${t}", "${e}", ${Se}
1676
1703
  )`;
1677
1704
  function M(e) {
1678
1705
  return /* @__PURE__ */ l(
@@ -1683,66 +1710,66 @@ function M(e) {
1683
1710
  }
1684
1711
  );
1685
1712
  }
1686
- const Qt = (e) => {
1713
+ const Xt = (e) => {
1687
1714
  const t = e.get("preview"), n = e.get("overrides." + t);
1688
1715
  return n || k.warn("No previewed ID found in search params."), n;
1689
1716
  };
1690
- function Xt() {
1691
- globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Ae({
1717
+ function Zt() {
1718
+ globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Re({
1692
1719
  max: 500,
1693
1720
  // how long to live in ms
1694
1721
  ttl: 1e3 * 60 * 5
1695
1722
  }));
1696
1723
  }
1697
- function Zt(e) {
1698
- Xt();
1699
- const t = Qt(e);
1724
+ function en(e) {
1725
+ Zt();
1726
+ const t = Xt(e);
1700
1727
  return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
1701
1728
  }
1702
- function en() {
1729
+ function tn() {
1703
1730
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
1704
1731
  }
1705
- function tn() {
1706
- const e = en().fetch;
1732
+ function nn() {
1733
+ const e = tn().fetch;
1707
1734
  if (typeof e > "u")
1708
1735
  throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
1709
1736
  For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
1710
1737
  return e;
1711
1738
  }
1712
- const nn = tn();
1739
+ const on = nn();
1713
1740
  function B(e, t = null, n = ".") {
1714
1741
  return Object.keys(e).reduce((o, i) => {
1715
- const r = e[i], a = [t, i].filter(Boolean).join(n);
1716
- return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
1742
+ const a = e[i], r = [t, i].filter(Boolean).join(n);
1743
+ return [typeof a == "object", a !== null, !(Array.isArray(a) && a.length === 0)].every(Boolean) ? {
1717
1744
  ...o,
1718
- ...B(r, a, n)
1745
+ ...B(a, r, n)
1719
1746
  } : {
1720
1747
  ...o,
1721
- [a]: r
1748
+ [r]: a
1722
1749
  };
1723
1750
  }, {});
1724
1751
  }
1725
- const on = "v3", te = "builder.", rn = "options.", an = (e) => {
1752
+ const an = "v3", Z = "builder.", rn = "options.", sn = (e) => {
1726
1753
  const t = {};
1727
1754
  return e.forEach((n, o) => {
1728
1755
  t[o] = n;
1729
1756
  }), t;
1730
- }, ke = (e) => {
1757
+ }, ve = (e) => {
1731
1758
  if (!e)
1732
1759
  return {};
1733
- const t = Ce(e), n = {};
1760
+ const t = xe(e), n = {};
1734
1761
  return Object.keys(t).forEach((o) => {
1735
- if (o.startsWith(te)) {
1736
- const i = o.replace(te, "").replace(rn, "");
1762
+ if (o.startsWith(Z)) {
1763
+ const i = o.replace(Z, "").replace(rn, "");
1737
1764
  n[i] = t[o];
1738
1765
  }
1739
1766
  }), n;
1740
- }, sn = () => {
1741
- if (!S())
1767
+ }, cn = () => {
1768
+ if (!v())
1742
1769
  return {};
1743
1770
  const e = new URLSearchParams(window.location.search);
1744
- return ke(e);
1745
- }, Ce = (e) => e instanceof URLSearchParams ? an(e) : e, ne = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
1771
+ return ve(e);
1772
+ }, xe = (e) => e instanceof URLSearchParams ? sn(e) : e, ee = (e) => typeof e == "number" && !isNaN(e) && e >= 0, K = (e) => {
1746
1773
  let {
1747
1774
  noTraverse: t = !1
1748
1775
  } = e;
@@ -1750,87 +1777,87 @@ const on = "v3", te = "builder.", rn = "options.", an = (e) => {
1750
1777
  limit: n = 30,
1751
1778
  userAttributes: o,
1752
1779
  query: i,
1753
- model: r,
1754
- apiKey: a,
1780
+ model: a,
1781
+ apiKey: r,
1755
1782
  includeRefs: s = !0,
1756
1783
  enrich: c,
1757
1784
  locale: u,
1758
- apiVersion: h = on,
1759
- fields: g,
1785
+ apiVersion: g = an,
1786
+ fields: p,
1760
1787
  omit: m,
1761
- offset: f,
1762
- cacheSeconds: p,
1788
+ offset: h,
1789
+ cacheSeconds: f,
1763
1790
  staleCacheSeconds: d,
1764
1791
  sort: b,
1765
1792
  includeUnpublished: x
1766
1793
  } = e;
1767
- if (!a)
1794
+ if (!r)
1768
1795
  throw new Error("Missing API key");
1769
- if (!["v2", "v3"].includes(h))
1770
- throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${h}'`);
1796
+ if (!["v2", "v3"].includes(g))
1797
+ throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${g}'`);
1771
1798
  (e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
1772
- const v = new URL(`https://cdn.builder.io/api/${h}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${u ? `&locale=${u}` : ""}${c ? `&enrich=${c}` : ""}`);
1773
- if (v.searchParams.set("omit", m || "meta.componentsUsed"), g && v.searchParams.set("fields", g), Number.isFinite(f) && f > -1 && v.searchParams.set("offset", String(Math.floor(f))), typeof x == "boolean" && v.searchParams.set("includeUnpublished", String(x)), p && ne(p) && v.searchParams.set("cacheSeconds", String(p)), d && ne(d) && v.searchParams.set("staleCacheSeconds", String(d)), b) {
1799
+ const y = new URL(`https://cdn.builder.io/api/${g}/content/${a}?apiKey=${r}&limit=${n}&noTraverse=${t}&includeRefs=${s}${u ? `&locale=${u}` : ""}${c ? `&enrich=${c}` : ""}`);
1800
+ if (y.searchParams.set("omit", m || "meta.componentsUsed"), p && y.searchParams.set("fields", p), Number.isFinite(h) && h > -1 && y.searchParams.set("offset", String(Math.floor(h))), typeof x == "boolean" && y.searchParams.set("includeUnpublished", String(x)), f && ee(f) && y.searchParams.set("cacheSeconds", String(f)), d && ee(d) && y.searchParams.set("staleCacheSeconds", String(d)), b) {
1774
1801
  const C = B({
1775
1802
  sort: b
1776
1803
  });
1777
1804
  for (const R in C)
1778
- v.searchParams.set(R, JSON.stringify(C[R]));
1805
+ y.searchParams.set(R, JSON.stringify(C[R]));
1779
1806
  }
1780
- const P = {
1781
- ...sn(),
1782
- ...Ce(e.options || {})
1783
- }, E = B(P);
1807
+ const A = {
1808
+ ...cn(),
1809
+ ...xe(e.options || {})
1810
+ }, E = B(A);
1784
1811
  for (const C in E)
1785
- v.searchParams.set(C, String(E[C]));
1786
- if (o && v.searchParams.set("userAttributes", JSON.stringify(o)), i) {
1812
+ y.searchParams.set(C, String(E[C]));
1813
+ if (o && y.searchParams.set("userAttributes", JSON.stringify(o)), i) {
1787
1814
  const C = B({
1788
1815
  query: i
1789
1816
  });
1790
1817
  for (const R in C)
1791
- v.searchParams.set(R, JSON.stringify(C[R]));
1818
+ y.searchParams.set(R, JSON.stringify(C[R]));
1792
1819
  }
1793
- return v;
1794
- }, cn = (e) => "results" in e;
1795
- async function q(e) {
1796
- const t = await we({
1820
+ return y;
1821
+ }, ln = (e) => "results" in e;
1822
+ async function z(e) {
1823
+ const t = await ke({
1797
1824
  ...e,
1798
1825
  limit: 1
1799
1826
  });
1800
1827
  return t && t[0] || null;
1801
1828
  }
1802
- const Kn = q, ln = async (e) => {
1803
- const t = z(e);
1804
- return await (await nn(t.href)).json();
1805
- }, dn = async (e, t, n = z(e)) => {
1829
+ const Gn = z, dn = async (e) => {
1830
+ const t = K(e);
1831
+ return await (await on(t.href)).json();
1832
+ }, un = async (e, t, n = K(e)) => {
1806
1833
  const o = L(e.canTrack);
1807
1834
  if (n.search.includes("preview=")) {
1808
- const r = [];
1809
- for (const a of t.results) {
1810
- const s = Zt(n.searchParams);
1811
- r.push(s || a);
1835
+ const a = [];
1836
+ for (const r of t.results) {
1837
+ const s = en(n.searchParams);
1838
+ a.push(s || r);
1812
1839
  }
1813
- t.results = r;
1840
+ t.results = a;
1814
1841
  }
1815
- if (!o || !(S() || T === "reactNative"))
1842
+ if (!o || !(v() || I === "reactNative"))
1816
1843
  return t.results;
1817
1844
  try {
1818
- const r = [];
1819
- for (const a of t.results)
1820
- r.push(await Rt({
1821
- item: a,
1845
+ const a = [];
1846
+ for (const r of t.results)
1847
+ a.push(await Et({
1848
+ item: r,
1822
1849
  canTrack: o
1823
1850
  }));
1824
- t.results = r;
1825
- } catch (r) {
1826
- k.error("Could not process A/B tests. ", r);
1851
+ t.results = a;
1852
+ } catch (a) {
1853
+ k.error("Could not process A/B tests. ", a);
1827
1854
  }
1828
1855
  return t.results;
1829
1856
  };
1830
- async function we(e) {
1857
+ async function ke(e) {
1831
1858
  try {
1832
- const t = z(e), n = await ln(e);
1833
- return cn(n) ? dn(e, n) : (k.error("Error fetching data. ", {
1859
+ const t = K(e), n = await dn(e);
1860
+ return ln(n) ? un(e, n) : (k.error("Error fetching data. ", {
1834
1861
  url: t,
1835
1862
  content: n,
1836
1863
  options: e
@@ -1839,92 +1866,96 @@ async function we(e) {
1839
1866
  return k.error("Error fetching data. ", t), null;
1840
1867
  }
1841
1868
  }
1842
- const Hn = we;
1843
- function zn() {
1844
- return !S() || D() ? !1 : location.search.indexOf("builder.preview=") !== -1;
1869
+ const Yn = ke, mn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
1870
+ function fn(e, t) {
1871
+ const n = new URL(t.origin), o = n.hostname;
1872
+ return (e || mn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
1873
+ }
1874
+ function Jn() {
1875
+ return !v() || D() ? !1 : location.search.indexOf("builder.preview=") !== -1;
1845
1876
  }
1846
- function un() {
1877
+ function hn() {
1847
1878
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1848
1879
  const t = Math.random() * 16 | 0;
1849
1880
  return (e == "x" ? t : t & 3 | 8).toString(16);
1850
1881
  });
1851
1882
  }
1852
- function Ie() {
1853
- return un().replace(/-/g, "");
1883
+ function Ce() {
1884
+ return hn().replace(/-/g, "");
1854
1885
  }
1855
- const Te = "builderSessionId", mn = async ({
1886
+ const we = "builderSessionId", pn = async ({
1856
1887
  canTrack: e
1857
1888
  }) => {
1858
1889
  if (!e)
1859
1890
  return;
1860
- const t = await he({
1861
- name: Te,
1891
+ const t = await me({
1892
+ name: we,
1862
1893
  canTrack: e
1863
1894
  });
1864
1895
  if (w(t))
1865
1896
  return t;
1866
1897
  {
1867
- const n = fn();
1868
- return hn({
1898
+ const n = gn();
1899
+ return bn({
1869
1900
  id: n,
1870
1901
  canTrack: e
1871
1902
  }), n;
1872
1903
  }
1873
- }, fn = () => Ie(), hn = ({
1904
+ }, gn = () => Ce(), bn = ({
1874
1905
  id: e,
1875
1906
  canTrack: t
1876
- }) => pe({
1877
- name: Te,
1907
+ }) => fe({
1908
+ name: we,
1878
1909
  value: e,
1879
1910
  canTrack: t
1880
- }), Ee = () => S() && typeof localStorage < "u" ? localStorage : void 0, pn = ({
1911
+ }), Ie = () => v() && typeof localStorage < "u" ? localStorage : void 0, yn = ({
1881
1912
  key: e,
1882
1913
  canTrack: t
1883
1914
  }) => {
1884
1915
  var n;
1885
1916
  try {
1886
- return t ? (n = Ee()) == null ? void 0 : n.getItem(e) : void 0;
1917
+ return t ? (n = Ie()) == null ? void 0 : n.getItem(e) : void 0;
1887
1918
  } catch (o) {
1888
1919
  console.debug("[LocalStorage] GET error: ", o);
1889
1920
  return;
1890
1921
  }
1891
- }, gn = ({
1922
+ }, Sn = ({
1892
1923
  key: e,
1893
1924
  canTrack: t,
1894
1925
  value: n
1895
1926
  }) => {
1896
1927
  var o;
1897
1928
  try {
1898
- t && ((o = Ee()) == null || o.setItem(e, n));
1929
+ t && ((o = Ie()) == null || o.setItem(e, n));
1899
1930
  } catch (i) {
1900
1931
  console.debug("[LocalStorage] SET error: ", i);
1901
1932
  }
1902
- }, Re = "builderVisitorId", bn = ({
1933
+ }, Te = "builderVisitorId", vn = ({
1903
1934
  canTrack: e
1904
1935
  }) => {
1905
1936
  if (!e)
1906
1937
  return;
1907
- const t = pn({
1908
- key: Re,
1938
+ const t = yn({
1939
+ key: Te,
1909
1940
  canTrack: e
1910
1941
  });
1911
1942
  if (w(t))
1912
1943
  return t;
1913
1944
  {
1914
- const n = yn();
1915
- return vn({
1945
+ const n = xn();
1946
+ return kn({
1916
1947
  id: n,
1917
1948
  canTrack: e
1918
1949
  }), n;
1919
1950
  }
1920
- }, yn = () => Ie(), vn = ({
1951
+ }, xn = () => Ce(), kn = ({
1921
1952
  id: e,
1922
1953
  canTrack: t
1923
- }) => gn({
1924
- key: Re,
1954
+ }) => Sn({
1955
+ key: Te,
1925
1956
  value: e,
1926
1957
  canTrack: t
1927
- }), Sn = async ({
1958
+ }), Cn = async ({
1928
1959
  canTrack: e
1929
1960
  }) => {
1930
1961
  if (!e)
@@ -1932,16 +1963,16 @@ const Te = "builderSessionId", mn = async ({
1932
1963
  visitorId: void 0,
1933
1964
  sessionId: void 0
1934
1965
  };
1935
- const t = await mn({
1966
+ const t = await pn({
1936
1967
  canTrack: e
1937
- }), n = bn({
1968
+ }), n = vn({
1938
1969
  canTrack: e
1939
1970
  });
1940
1971
  return {
1941
1972
  sessionId: t,
1942
1973
  visitorId: n
1943
1974
  };
1944
- }, xn = async ({
1975
+ }, wn = async ({
1945
1976
  type: e,
1946
1977
  canTrack: t,
1947
1978
  apiKey: n,
@@ -1955,23 +1986,23 @@ const Te = "builderSessionId", mn = async ({
1955
1986
  url: location.href,
1956
1987
  ...o
1957
1988
  },
1958
- ...await Sn({
1989
+ ...await Cn({
1959
1990
  canTrack: t
1960
1991
  }),
1961
- userAttributes: le(),
1992
+ userAttributes: se(),
1962
1993
  ownerId: n
1963
1994
  }
1964
1995
  });
1965
- async function kn(e) {
1996
+ async function In(e) {
1966
1997
  if (!e.apiKey) {
1967
1998
  k.error("Missing API key for track call. Please provide your API key.");
1968
1999
  return;
1969
2000
  }
1970
- if (e.canTrack && !D() && (S() || T === "reactNative"))
2001
+ if (e.canTrack && !D() && (v() || I === "reactNative"))
1971
2002
  return fetch("https://cdn.builder.io/api/v1/track", {
1972
2003
  method: "POST",
1973
2004
  body: JSON.stringify({
1974
- events: [await xn(e)]
2005
+ events: [await wn(e)]
1975
2006
  }),
1976
2007
  headers: {
1977
2008
  "content-type": "application/json"
@@ -1981,14 +2012,14 @@ async function kn(e) {
1981
2012
  console.error("Failed to track: ", t);
1982
2013
  });
1983
2014
  }
1984
- const qn = (e) => kn({
2015
+ const Qn = (e) => In({
1985
2016
  ...e,
1986
2017
  canTrack: !0
1987
2018
  });
1988
- function oe(e) {
2019
+ function te(e) {
1989
2020
  return Math.round(e * 1e3) / 1e3;
1990
2021
  }
1991
- const Cn = (e, t, n = !0) => {
2022
+ const Tn = (e, t, n = !0) => {
1992
2023
  if (!(e instanceof HTMLElement))
1993
2024
  return null;
1994
2025
  let o = n ? e : e.parentElement;
@@ -1999,38 +2030,38 @@ const Cn = (e, t, n = !0) => {
1999
2030
  return o;
2000
2031
  } while (o = o.parentElement);
2001
2032
  return null;
2002
- }, wn = (e) => Cn(e, (t) => {
2033
+ }, En = (e) => Tn(e, (t) => {
2003
2034
  const n = t.getAttribute("builder-id") || t.id;
2004
2035
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
2005
- }), ie = ({
2036
+ }), ne = ({
2006
2037
  event: e,
2007
2038
  target: t
2008
2039
  }) => {
2009
- const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = oe(o / n.width), a = oe(i / n.height);
2040
+ const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, a = te(o / n.width), r = te(i / n.height);
2010
2041
  return {
2011
- x: r,
2012
- y: a
2042
+ x: a,
2043
+ y: r
2013
2044
  };
2014
- }, Gn = (e) => {
2015
- const t = e.target, n = t && wn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2045
+ }, Xn = (e) => {
2046
+ const t = e.target, n = t && En(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2016
2047
  return {
2017
2048
  targetBuilderElement: o || void 0,
2018
2049
  metadata: {
2019
- targetOffset: t ? ie({
2050
+ targetOffset: t ? ne({
2020
2051
  event: e,
2021
2052
  target: t
2022
2053
  }) : void 0,
2023
- builderTargetOffset: n ? ie({
2054
+ builderTargetOffset: n ? ne({
2024
2055
  event: e,
2025
2056
  target: n
2026
2057
  }) : void 0,
2027
2058
  builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2028
2059
  }
2029
2060
  };
2030
- }, In = "0.12.0", re = {};
2031
- function Tn(e, t) {
2032
- let n = re[e];
2033
- if (n || (n = re[e] = []), n.push(t), S()) {
2061
+ }, Rn = "0.12.2", oe = {};
2062
+ function An(e, t) {
2063
+ let n = oe[e];
2064
+ if (n || (n = oe[e] = []), n.push(t), v()) {
2034
2065
  const o = {
2035
2066
  type: "builder.register",
2036
2067
  data: {
@@ -2045,8 +2076,8 @@ function Tn(e, t) {
2045
2076
  }
2046
2077
  }
2047
2078
  }
2048
- const Yn = () => {
2049
- Tn("insertMenu", {
2079
+ const Zn = () => {
2080
+ An("insertMenu", {
2050
2081
  name: "_default",
2051
2082
  default: !0,
2052
2083
  items: [{
@@ -2068,14 +2099,14 @@ const Yn = () => {
2068
2099
  }]
2069
2100
  });
2070
2101
  };
2071
- let ae = !1;
2072
- const Jn = (e = {}) => {
2102
+ let ie = !1;
2103
+ const eo = (e = {}) => {
2073
2104
  var t, n;
2074
- ae || (ae = !0, S() && ((t = window.parent) == null || t.postMessage({
2105
+ ie || (ie = !0, v() && ((t = window.parent) == null || t.postMessage({
2075
2106
  type: "builder.sdkInfo",
2076
2107
  data: {
2077
- target: T,
2078
- version: In,
2108
+ target: I,
2109
+ version: Rn,
2079
2110
  supportsPatchUpdates: !1,
2080
2111
  // Supports builder-model="..." attribute which is needed to
2081
2112
  // scope our '+ add block' button styling
@@ -2087,49 +2118,52 @@ const Jn = (e = {}) => {
2087
2118
  data: {
2088
2119
  options: e
2089
2120
  }
2090
- }, "*"), window.addEventListener("message", ({
2091
- data: o
2092
- }) => {
2093
- var i, r;
2094
- if (o != null && o.type)
2095
- switch (o.type) {
2121
+ }, "*"), window.addEventListener("message", (o) => {
2122
+ var a, r;
2123
+ if (!fn(e.trustedHosts, o))
2124
+ return;
2125
+ const {
2126
+ data: i
2127
+ } = o;
2128
+ if (i != null && i.type)
2129
+ switch (i.type) {
2096
2130
  case "builder.evaluate": {
2097
- const a = o.data.text, s = o.data.arguments || [], c = o.data.id, u = new Function(a);
2098
- let h, g = null;
2131
+ const s = i.data.text, c = i.data.arguments || [], u = i.data.id, g = new Function(s);
2132
+ let p, m = null;
2099
2133
  try {
2100
- h = u.apply(null, s);
2101
- } catch (m) {
2102
- g = m;
2134
+ p = g.apply(null, c);
2135
+ } catch (h) {
2136
+ m = h;
2103
2137
  }
2104
- g ? (i = window.parent) == null || i.postMessage({
2138
+ m ? (a = window.parent) == null || a.postMessage({
2105
2139
  type: "builder.evaluateError",
2106
2140
  data: {
2107
- id: c,
2108
- error: g.message
2141
+ id: u,
2142
+ error: m.message
2109
2143
  }
2110
- }, "*") : h && typeof h.then == "function" ? h.then((m) => {
2144
+ }, "*") : p && typeof p.then == "function" ? p.then((h) => {
2111
2145
  var f;
2112
2146
  (f = window.parent) == null || f.postMessage({
2113
2147
  type: "builder.evaluateResult",
2114
2148
  data: {
2115
- id: c,
2116
- result: m
2149
+ id: u,
2150
+ result: h
2117
2151
  }
2118
2152
  }, "*");
2119
2153
  }).catch(console.error) : (r = window.parent) == null || r.postMessage({
2120
2154
  type: "builder.evaluateResult",
2121
2155
  data: {
2122
- result: h,
2123
- id: c
2156
+ result: p,
2157
+ id: u
2124
2158
  }
2125
2159
  }, "*");
2126
2160
  break;
2127
2161
  }
2128
2162
  }
2129
2163
  })));
2130
- }, En = (e) => {
2131
- var r;
2132
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((r = e == null ? void 0 : e.files) == null ? void 0 : r.regular);
2164
+ }, Pn = (e) => {
2165
+ var a;
2166
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((a = e == null ? void 0 : e.files) == null ? void 0 : a.regular);
2133
2167
  let i = "";
2134
2168
  if (o && t && n && (i += `
2135
2169
  @font-face {
@@ -2139,36 +2173,36 @@ font-display: fallback;
2139
2173
  font-weight: 400;
2140
2174
  }
2141
2175
  `.trim()), e.files)
2142
- for (const a in e.files) {
2143
- if (!(String(Number(a)) === a))
2176
+ for (const r in e.files) {
2177
+ if (!(String(Number(r)) === r))
2144
2178
  continue;
2145
- const c = e.files[a];
2179
+ const c = e.files[r];
2146
2180
  c && c !== o && (i += `
2147
2181
  @font-face {
2148
2182
  font-family: "${t}";
2149
2183
  src: url('${c}') format('woff2');
2150
2184
  font-display: fallback;
2151
- font-weight: ${a};
2185
+ font-weight: ${r};
2152
2186
  }
2153
2187
  `.trim());
2154
2188
  }
2155
2189
  return i;
2156
- }, Rn = ({
2190
+ }, Vn = ({
2157
2191
  customFonts: e
2158
2192
  }) => {
2159
2193
  var t;
2160
- return ((t = e == null ? void 0 : e.map((n) => En(n))) == null ? void 0 : t.join(" ")) || "";
2161
- }, Pn = ({
2194
+ return ((t = e == null ? void 0 : e.map((n) => Pn(n))) == null ? void 0 : t.join(" ")) || "";
2195
+ }, Bn = ({
2162
2196
  cssCode: e,
2163
2197
  contentId: t
2164
2198
  }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
2165
- function An(e) {
2199
+ function Wn(e) {
2166
2200
  const t = `
2167
- ${Pn({
2201
+ ${Bn({
2168
2202
  cssCode: e.cssCode,
2169
2203
  contentId: e.contentId
2170
2204
  })}
2171
- ${Rn({
2205
+ ${Vn({
2172
2206
  customFonts: e.customFonts
2173
2207
  })}
2174
2208
 
@@ -2187,14 +2221,14 @@ ${Rn({
2187
2221
  `.trim();
2188
2222
  return /* @__PURE__ */ l(O, { styles: t });
2189
2223
  }
2190
- const Vn = ({
2224
+ const $n = ({
2191
2225
  content: e,
2192
2226
  data: t,
2193
2227
  locale: n
2194
2228
  }) => {
2195
- var r, a, s;
2196
- const o = {}, i = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.state) || {};
2197
- return (s = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || s.forEach((c) => {
2229
+ var a, r, s;
2230
+ const o = {}, i = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
2231
+ return (s = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || s.forEach((c) => {
2198
2232
  c.name && c.defaultValue !== void 0 && (o[c.name] = c.defaultValue);
2199
2233
  }), {
2200
2234
  ...o,
@@ -2204,7 +2238,7 @@ const Vn = ({
2204
2238
  locale: n
2205
2239
  } : {}
2206
2240
  };
2207
- }, Bn = ({
2241
+ }, On = ({
2208
2242
  content: e,
2209
2243
  data: t
2210
2244
  }) => e ? {
@@ -2215,38 +2249,38 @@ const Vn = ({
2215
2249
  },
2216
2250
  meta: e == null ? void 0 : e.meta
2217
2251
  } : void 0;
2218
- function se(e) {
2219
- var i, r, a, s, c, u, h, g, m;
2220
- const t = Jt({
2252
+ function ae(e) {
2253
+ var i, a, r, s, c, u, g, p, m;
2254
+ const t = Qt({
2221
2255
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2222
2256
  variationId: (i = e.content) == null ? void 0 : i.testVariationId,
2223
2257
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2224
- contentId: (r = e.content) == null ? void 0 : r.id
2258
+ contentId: (a = e.content) == null ? void 0 : a.id
2225
2259
  }), n = [
2226
- ...Z(),
2260
+ ...Q(),
2227
2261
  // While this `components` object is deprecated, we must maintain support for it.
2228
2262
  // Since users are able to override our default components, we need to make sure that we do not break such
2229
2263
  // existing usage.
2230
2264
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2231
2265
  // which is the new standard way of providing custom components, and must therefore take precedence.
2232
- ...ee,
2266
+ ...X,
2233
2267
  ...e.customComponents || []
2234
2268
  ].reduce(
2235
- (f, { component: p, ...d }) => ({
2236
- ...f,
2269
+ (h, { component: f, ...d }) => ({
2270
+ ...h,
2237
2271
  [d.name]: {
2238
- component: p,
2272
+ component: f,
2239
2273
  ...U(d)
2240
2274
  }
2241
2275
  }),
2242
2276
  {}
2243
2277
  ), o = {
2244
- content: Bn({
2278
+ content: On({
2245
2279
  content: e.content,
2246
2280
  data: e.data
2247
2281
  }),
2248
2282
  localState: void 0,
2249
- rootState: Vn({
2283
+ rootState: $n({
2250
2284
  content: e.content,
2251
2285
  data: e.data,
2252
2286
  locale: e.locale
@@ -2256,17 +2290,17 @@ function se(e) {
2256
2290
  apiKey: e.apiKey,
2257
2291
  apiVersion: e.apiVersion,
2258
2292
  componentInfos: [
2259
- ...Z(),
2293
+ ...Q(),
2260
2294
  // While this `components` object is deprecated, we must maintain support for it.
2261
2295
  // Since users are able to override our default components, we need to make sure that we do not break such
2262
2296
  // existing usage.
2263
2297
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2264
2298
  // which is the new standard way of providing custom components, and must therefore take precedence.
2265
- ...ee,
2299
+ ...X,
2266
2300
  ...e.customComponents || []
2267
2301
  ].reduce(
2268
- (f, { component: p, ...d }) => ({
2269
- ...f,
2302
+ (h, { component: f, ...d }) => ({
2303
+ ...h,
2270
2304
  [d.name]: U(d)
2271
2305
  }),
2272
2306
  {}
@@ -2275,8 +2309,8 @@ function se(e) {
2275
2309
  BlocksWrapper: e.blocksWrapper || "div",
2276
2310
  BlocksWrapperProps: e.blocksWrapperProps || {}
2277
2311
  };
2278
- return /* @__PURE__ */ I(
2279
- De,
2312
+ return /* @__PURE__ */ T(
2313
+ Me,
2280
2314
  {
2281
2315
  content: e.content,
2282
2316
  data: e.data,
@@ -2291,20 +2325,21 @@ function se(e) {
2291
2325
  builderContextSignal: o,
2292
2326
  contentWrapper: e.contentWrapper,
2293
2327
  contentWrapperProps: e.contentWrapperProps,
2328
+ trustedHosts: e.trustedHosts,
2294
2329
  children: [
2295
- e.isSsrAbTest ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(M, { scriptStr: t }) }) : null,
2296
- /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
2297
- An,
2330
+ e.isSsrAbTest ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(M, { scriptStr: t }) }) : null,
2331
+ /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
2332
+ Wn,
2298
2333
  {
2299
- contentId: (a = o.content) == null ? void 0 : a.id,
2334
+ contentId: (r = o.content) == null ? void 0 : r.id,
2300
2335
  cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
2301
- customFonts: (h = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : h.customFonts
2336
+ customFonts: (g = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : g.customFonts
2302
2337
  }
2303
2338
  ) }),
2304
2339
  /* @__PURE__ */ l(
2305
- K,
2340
+ N,
2306
2341
  {
2307
- blocks: (m = (g = o.content) == null ? void 0 : g.data) == null ? void 0 : m.blocks,
2342
+ blocks: (m = (p = o.content) == null ? void 0 : p.data) == null ? void 0 : m.blocks,
2308
2343
  context: o,
2309
2344
  registeredComponents: n
2310
2345
  }
@@ -2313,14 +2348,14 @@ function se(e) {
2313
2348
  }
2314
2349
  );
2315
2350
  }
2316
- function Pe(e) {
2317
- var r, a;
2318
- const t = zt({
2351
+ function Ee(e) {
2352
+ var a, r;
2353
+ const t = qt({
2319
2354
  canTrack: L(e.canTrack),
2320
2355
  content: e.content
2321
2356
  }), n = function() {
2322
2357
  var c;
2323
- return Yt(
2358
+ return Jt(
2324
2359
  V(e.content).map((u) => ({
2325
2360
  id: u.testVariationId,
2326
2361
  testRatio: u.testRatio
@@ -2334,24 +2369,24 @@ function Pe(e) {
2334
2369
  return t ? {
2335
2370
  ...e.content,
2336
2371
  testVariationId: (c = e.content) == null ? void 0 : c.id
2337
- } : Et({
2372
+ } : Tt({
2338
2373
  item: e.content,
2339
2374
  canTrack: L(e.canTrack)
2340
2375
  });
2341
2376
  };
2342
- return /* @__PURE__ */ I(y, { children: [
2343
- !e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(M, { scriptStr: Gt() }) }) : null,
2344
- t ? /* @__PURE__ */ I(y, { children: [
2377
+ return /* @__PURE__ */ T(S, { children: [
2378
+ !e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(M, { scriptStr: Yt() }) }) : null,
2379
+ t ? /* @__PURE__ */ T(S, { children: [
2345
2380
  /* @__PURE__ */ l(
2346
2381
  O,
2347
2382
  {
2348
- id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
2383
+ id: `variants-styles-${(a = e.content) == null ? void 0 : a.id}`,
2349
2384
  styles: o()
2350
2385
  }
2351
2386
  ),
2352
2387
  /* @__PURE__ */ l(M, { scriptStr: n() }),
2353
- (a = V(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
2354
- se,
2388
+ (r = V(e.content)) == null ? void 0 : r.map((s) => /* @__PURE__ */ l(
2389
+ ae,
2355
2390
  {
2356
2391
  content: s,
2357
2392
  showContent: !1,
@@ -2369,13 +2404,14 @@ function Pe(e) {
2369
2404
  blocksWrapper: e.blocksWrapper,
2370
2405
  blocksWrapperProps: e.blocksWrapperProps,
2371
2406
  contentWrapper: e.contentWrapper,
2372
- contentWrapperProps: e.contentWrapperProps
2407
+ contentWrapperProps: e.contentWrapperProps,
2408
+ trustedHosts: e.trustedHosts
2373
2409
  },
2374
2410
  s.testVariationId
2375
2411
  ))
2376
2412
  ] }) : null,
2377
2413
  /* @__PURE__ */ l(
2378
- se,
2414
+ ae,
2379
2415
  {
2380
2416
  content: i(),
2381
2417
  showContent: !0,
@@ -2393,18 +2429,19 @@ function Pe(e) {
2393
2429
  blocksWrapper: e.blocksWrapper,
2394
2430
  blocksWrapperProps: e.blocksWrapperProps,
2395
2431
  contentWrapper: e.contentWrapper,
2396
- contentWrapperProps: e.contentWrapperProps
2432
+ contentWrapperProps: e.contentWrapperProps,
2433
+ trustedHosts: e.trustedHosts
2397
2434
  }
2398
2435
  )
2399
2436
  ] });
2400
2437
  }
2401
- const Wn = async ({
2438
+ const Fn = async ({
2402
2439
  builderContextValue: e,
2403
2440
  symbol: t
2404
2441
  }) => {
2405
2442
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
2406
2443
  (e != null && e.apiKey))
2407
- return q({
2444
+ return z({
2408
2445
  model: t.model,
2409
2446
  apiKey: e.apiKey,
2410
2447
  apiVersion: e.apiVersion,
@@ -2417,51 +2454,54 @@ const Wn = async ({
2417
2454
  k.error("Could not fetch symbol content: ", n);
2418
2455
  });
2419
2456
  };
2420
- async function $n(e) {
2421
- var o, i, r, a;
2457
+ async function Nn(e) {
2458
+ var o, i, a, r, s;
2422
2459
  const t = function() {
2423
- var c, u;
2460
+ var u, g;
2424
2461
  return [
2425
2462
  e.attributes.className,
2426
2463
  "builder-symbol",
2427
- (c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
2428
- (u = e.symbol) != null && u.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2464
+ (u = e.symbol) != null && u.inline ? "builder-inline-symbol" : void 0,
2465
+ (g = e.symbol) != null && g.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2429
2466
  ].filter(Boolean).join(" ");
2430
- }, n = ((o = e.symbol) == null ? void 0 : o.content) || await Wn({
2467
+ }, n = ((o = e.symbol) == null ? void 0 : o.content) || await Fn({
2431
2468
  symbol: e.symbol,
2432
2469
  builderContextValue: e.builderContext
2433
2470
  });
2434
2471
  return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
2435
- Pe,
2472
+ Ee,
2436
2473
  {
2437
2474
  __isNestedRender: !0,
2438
2475
  apiVersion: e.builderContext.apiVersion,
2439
2476
  apiKey: e.builderContext.apiKey,
2440
- context: e.builderContext.context,
2477
+ context: {
2478
+ ...e.builderContext.context,
2479
+ symbolId: (i = e.builderBlock) == null ? void 0 : i.id
2480
+ },
2441
2481
  customComponents: Object.values(e.builderComponents),
2442
2482
  data: {
2443
- ...(i = e.symbol) == null ? void 0 : i.data,
2483
+ ...(a = e.symbol) == null ? void 0 : a.data,
2444
2484
  ...e.builderContext.localState,
2445
2485
  ...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
2446
2486
  },
2447
- model: (a = e.symbol) == null ? void 0 : a.model,
2487
+ model: (s = e.symbol) == null ? void 0 : s.model,
2448
2488
  content: n
2449
2489
  }
2450
2490
  ) });
2451
2491
  }
2452
- const Qn = K, Xn = Pe, ce = {};
2453
- function Zn(e) {
2454
- if (S()) {
2455
- Object.assign(ce, e);
2492
+ const to = N, no = Ee, re = {};
2493
+ function oo(e) {
2494
+ if (v()) {
2495
+ Object.assign(re, e);
2456
2496
  const t = {
2457
2497
  type: "builder.settingsChange",
2458
- data: ce
2498
+ data: re
2459
2499
  };
2460
2500
  parent.postMessage(t, "*");
2461
2501
  }
2462
2502
  }
2463
- const eo = async (e) => {
2464
- var o, i, r;
2503
+ const io = async (e) => {
2504
+ var o, i, a;
2465
2505
  const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
2466
2506
  ...e,
2467
2507
  apiKey: e.apiKey,
@@ -2472,48 +2512,50 @@ const eo = async (e) => {
2472
2512
  urlPath: t
2473
2513
  } : {}
2474
2514
  },
2475
- options: ke(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
2515
+ options: ve(e.searchParams || ((a = e.url) == null ? void 0 : a.searchParams) || e.options)
2476
2516
  };
2477
2517
  return {
2478
2518
  apiKey: n.apiKey,
2479
2519
  model: n.model,
2480
- content: await q(n)
2520
+ content: await z(n)
2481
2521
  };
2482
2522
  };
2483
2523
  export {
2484
- ke as A,
2485
- K as B,
2486
- Pe as C,
2487
- qn as D,
2488
- eo as E,
2489
- Qn as R,
2490
- $n as S,
2491
- Ut as T,
2492
- kn as _,
2493
- Un as a,
2494
- Mn as b,
2495
- Dn as c,
2496
- S as d,
2497
- L as e,
2498
- zn as f,
2499
- ut as g,
2500
- j as h,
2501
- D as i,
2502
- Gn as j,
2503
- $ as k,
2524
+ Yn as A,
2525
+ N as B,
2526
+ Ee as C,
2527
+ Gn as D,
2528
+ ve as E,
2529
+ Qn as F,
2530
+ io as G,
2531
+ to as R,
2532
+ Nn as S,
2533
+ Mt as T,
2534
+ In as _,
2535
+ jn as a,
2536
+ D as b,
2537
+ Kn as c,
2538
+ zn as d,
2539
+ v as e,
2540
+ L as f,
2541
+ lt as g,
2542
+ Jn as h,
2543
+ Hn as i,
2544
+ fn as j,
2545
+ j as k,
2504
2546
  k as l,
2505
- jn as m,
2506
- q as n,
2507
- nn as o,
2508
- Xt as p,
2509
- Xn as q,
2510
- Yn as r,
2511
- Jn as s,
2512
- pt as t,
2513
- Tn as u,
2514
- Zn as v,
2515
- dn as w,
2516
- we as x,
2517
- Hn as y,
2518
- Kn as z
2547
+ Xn as m,
2548
+ $ as n,
2549
+ qn as o,
2550
+ z as p,
2551
+ on as q,
2552
+ Zn as r,
2553
+ eo as s,
2554
+ Zt as t,
2555
+ no as u,
2556
+ ht as v,
2557
+ An as w,
2558
+ oo as x,
2559
+ un as y,
2560
+ ke as z
2519
2561
  };