@builder.io/sdk-react-nextjs 0.12.5 → 0.12.7

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 (33) hide show
  1. package/lib/{node/USE_CLIENT_BUNDLE-4ba4594d.js → browser/USE_CLIENT_BUNDLE-456ca2b5.js} +46 -45
  2. package/lib/browser/{USE_CLIENT_BUNDLE-70be4cc5.cjs → USE_CLIENT_BUNDLE-9d2b983d.cjs} +2 -2
  3. package/lib/{edge/USE_SERVER_BUNDLE-36de460d.js → browser/USE_SERVER_BUNDLE-e0f1c15b.js} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-50c2f18b.cjs → browser/USE_SERVER_BUNDLE-ee4a5d19.cjs} +1 -1
  5. package/lib/browser/{bundle-f9f52242.js → bundle-56e0b400.js} +499 -439
  6. package/lib/browser/{bundle-bd9886c9.cjs → bundle-a408994f.cjs} +21 -21
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +6 -6
  9. package/lib/{browser/USE_CLIENT_BUNDLE-7492ecd8.js → edge/USE_CLIENT_BUNDLE-789e694f.js} +46 -45
  10. package/lib/{node/USE_CLIENT_BUNDLE-2f43c320.cjs → edge/USE_CLIENT_BUNDLE-a6a0becc.cjs} +2 -2
  11. package/lib/{node/USE_SERVER_BUNDLE-473d50ad.cjs → edge/USE_SERVER_BUNDLE-dbf92938.cjs} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-2534ef71.js → edge/USE_SERVER_BUNDLE-dffaa191.js} +1 -1
  13. package/lib/edge/{bundle-765860e3.js → bundle-4bf88f38.js} +812 -752
  14. package/lib/edge/{bundle-71cfdd3e.cjs → bundle-97ad81d1.cjs} +32 -32
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +6 -6
  17. package/lib/{edge/USE_CLIENT_BUNDLE-cb840c0f.js → node/USE_CLIENT_BUNDLE-499aeaa2.js} +46 -45
  18. package/lib/{edge/USE_CLIENT_BUNDLE-1148158d.cjs → node/USE_CLIENT_BUNDLE-b2f9be29.cjs} +2 -2
  19. package/lib/{browser/USE_SERVER_BUNDLE-875d4629.cjs → node/USE_SERVER_BUNDLE-b3ad9a89.cjs} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-fe386ed3.js → node/USE_SERVER_BUNDLE-e3da6caa.js} +1 -1
  21. package/lib/node/{bundle-1c54df65.cjs → bundle-97b4832a.cjs} +4 -4
  22. package/lib/node/{bundle-305bb463.js → bundle-d3f89e99.js} +228 -168
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +6 -6
  25. package/package.json +1 -1
  26. package/types/cjs/components/block/animator.d.ts +5 -0
  27. package/types/cjs/constants/sdk-version.d.ts +1 -1
  28. package/types/cjs/functions/evaluate/browser-runtime/browser.d.ts +5 -1
  29. package/types/cjs/types/builder-block.d.ts +18 -1
  30. package/types/esm/components/block/animator.d.ts +5 -0
  31. package/types/esm/constants/sdk-version.d.ts +1 -1
  32. package/types/esm/functions/evaluate/browser-runtime/browser.d.ts +5 -1
  33. package/types/esm/types/builder-block.d.ts +18 -1
@@ -1,9 +1,9 @@
1
- import { LRUCache as Ae } from "lru-cache";
2
- import { jsx as l, Fragment as k, jsxs as R } from "react/jsx-runtime";
3
- import { I as Ve, B as Be, a as We, D as $e, b as Oe, C as Ne, E as Fe, F as Le, c as _e, d as Ue, S as De, V as Me, e as je } from "./USE_CLIENT_BUNDLE-7492ecd8.js";
1
+ import { LRUCache as Ve } from "lru-cache";
2
+ import { jsx as l, Fragment as S, jsxs as R } from "react/jsx-runtime";
3
+ import { I as $e, B as We, a as Oe, D as Ne, b as Fe, C as Le, E as Ue, F as _e, c as De, d as Me, S as je, V as He, e as Ke } from "./USE_CLIENT_BUNDLE-456ca2b5.js";
4
4
  import "react";
5
5
  import "next/navigation";
6
- const He = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Gn = (e) => typeof e == "string" && He.has(e.toLowerCase()), I = "rsc", M = () => {
6
+ const ze = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Zn = (e) => typeof e == "string" && ze.has(e.toLowerCase()), I = "rsc", M = () => {
7
7
  switch (I) {
8
8
  case "react":
9
9
  case "reactNative":
@@ -16,7 +16,7 @@ const He = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr",
16
16
  return "class";
17
17
  }
18
18
  };
19
- function Ke(e) {
19
+ function qe(e) {
20
20
  var t;
21
21
  return {
22
22
  ...(t = e.component) == null ? void 0 : t.options,
@@ -27,29 +27,29 @@ function Ke(e) {
27
27
  builderBlock: e
28
28
  };
29
29
  }
30
- const A = "[Builder.io]: ", x = {
31
- log: (...e) => console.log(A, ...e),
32
- error: (...e) => console.error(A, ...e),
33
- warn: (...e) => console.warn(A, ...e),
34
- debug: (...e) => console.debug(A, ...e)
30
+ const P = "[Builder.io]: ", x = {
31
+ log: (...e) => console.log(P, ...e),
32
+ error: (...e) => console.error(P, ...e),
33
+ warn: (...e) => console.warn(P, ...e),
34
+ debug: (...e) => console.debug(P, ...e)
35
35
  };
36
- function S() {
36
+ function k() {
37
37
  return typeof window < "u" && typeof document < "u";
38
38
  }
39
- function ze() {
40
- return S() && window.self !== window.top;
39
+ function Ge() {
40
+ return k() && window.self !== window.top;
41
41
  }
42
42
  function j() {
43
- return ze() && window.location.search.indexOf("builder.frameEditing=") !== -1;
43
+ return Ge() && window.location.search.indexOf("builder.frameEditing=") !== -1;
44
44
  }
45
- const qe = () => {
46
- if (S()) {
45
+ const Ye = () => {
46
+ if (k()) {
47
47
  const e = new URL(location.href);
48
48
  return e.pathname === "" && (e.pathname = "/"), e;
49
49
  } else
50
50
  return console.warn("Cannot get location for tracking in non-browser environment"), null;
51
- }, Ge = () => typeof navigator == "object" && navigator.userAgent || "", ce = () => {
52
- const e = Ge(), t = {
51
+ }, Je = () => typeof navigator == "object" && navigator.userAgent || "", le = () => {
52
+ const e = Je(), t = {
53
53
  Android() {
54
54
  return e.match(/Android/i);
55
55
  },
@@ -68,13 +68,13 @@ const qe = () => {
68
68
  any() {
69
69
  return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || I === "reactNative";
70
70
  }
71
- }, n = e.match(/Tablet|iPad/i), o = qe();
71
+ }, n = e.match(/Tablet|iPad/i), o = Ye();
72
72
  return {
73
73
  urlPath: o == null ? void 0 : o.pathname,
74
74
  host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
75
75
  device: n ? "tablet" : t.any() ? "mobile" : "desktop"
76
76
  };
77
- }, Ye = ({
77
+ }, Qe = ({
78
78
  builder: e,
79
79
  context: t,
80
80
  event: n,
@@ -86,12 +86,12 @@ const qe = () => {
86
86
  builder: e,
87
87
  context: t,
88
88
  event: n
89
- }), Je = () => ({
89
+ }), Xe = () => ({
90
90
  isEditing: j(),
91
- isBrowser: S(),
92
- isServer: !S(),
93
- getUserAttributes: () => ce()
94
- }), Qe = (e, {
91
+ isBrowser: k(),
92
+ isServer: !k(),
93
+ getUserAttributes: () => le()
94
+ }), Ze = (e, {
95
95
  isExpression: t = !0
96
96
  }) => /* 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, G = ({
97
97
  code: e,
@@ -99,67 +99,84 @@ const qe = () => {
99
99
  context: n,
100
100
  event: o,
101
101
  localState: i,
102
- rootSetState: a,
103
- rootState: r
102
+ rootSetState: r,
103
+ rootState: a
104
104
  }) => {
105
- const s = Ye({
105
+ const s = Qe({
106
106
  builder: t,
107
107
  context: n,
108
108
  event: o,
109
- state: Xe(r, i, a)
109
+ state: de({
110
+ rootState: a,
111
+ localState: i,
112
+ rootSetState: r
113
+ })
110
114
  });
111
115
  return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
112
116
  };
113
- function Xe(e, t, n) {
114
- if (e === t)
115
- throw new Error("rootState === localState");
117
+ function de({
118
+ rootState: e,
119
+ localState: t,
120
+ rootSetState: n
121
+ }) {
116
122
  return new Proxy(e, {
117
- get: (o, i) => t && i in t ? t[i] : e[i],
118
- set: (o, i, a) => {
123
+ get: (o, i) => {
124
+ if (t && i in t)
125
+ return t[i];
126
+ const r = o[i];
127
+ return typeof r == "object" ? de({
128
+ rootState: r,
129
+ localState: void 0,
130
+ rootSetState: n ? (a) => {
131
+ o[i] = a, n(o);
132
+ } : void 0
133
+ }) : r;
134
+ },
135
+ set: (o, i, r) => {
119
136
  if (t && i in t)
120
137
  throw new Error("Writing to local state is not allowed as it is read-only.");
121
- return e[i] = a, n == null || n(e), !0;
138
+ return o[i] = r, n == null || n(o), !0;
122
139
  }
123
140
  });
124
141
  }
125
142
  const C = (e) => e != null;
126
- function Ze() {
143
+ function et() {
127
144
  var e;
128
145
  return typeof process < "u" && C((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
129
146
  }
130
- const et = () => {
147
+ const tt = () => {
131
148
  var o;
132
- if (!Ze())
149
+ if (!et())
133
150
  return !1;
134
151
  const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
135
152
  return e && t && !n ? (x.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;
136
- }, tt = (e) => (S() || et(), G(e));
153
+ }, nt = (e) => (k() || tt(), G(e));
137
154
  function H({
138
155
  code: e,
139
156
  context: t,
140
157
  localState: n,
141
158
  rootState: o,
142
159
  rootSetState: i,
143
- event: a,
144
- isExpression: r = !0
160
+ event: r,
161
+ isExpression: a = !0
145
162
  }) {
146
163
  if (e === "") {
147
164
  x.warn("Skipping evaluation of empty code block.");
148
165
  return;
149
166
  }
150
167
  const s = {
151
- code: Qe(e, {
152
- isExpression: r
168
+ code: Ze(e, {
169
+ isExpression: a
153
170
  }),
154
- builder: Je(),
171
+ builder: Xe(),
155
172
  context: t,
156
- event: a,
173
+ event: r,
157
174
  rootSetState: i,
158
175
  rootState: o,
159
176
  localState: n
160
177
  };
161
178
  try {
162
- return tt(s);
179
+ return nt(s);
163
180
  } catch (c) {
164
181
  x.error("Failed code evaluation: " + c.message, {
165
182
  code: e
@@ -167,13 +184,13 @@ function H({
167
184
  return;
168
185
  }
169
186
  }
170
- const $ = (e) => JSON.parse(JSON.stringify(e)), nt = (e, t, n) => {
187
+ const W = (e) => JSON.parse(JSON.stringify(e)), ot = (e, t, n) => {
171
188
  if (Object(e) !== e)
172
189
  return e;
173
190
  const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
174
- 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;
191
+ 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;
175
192
  };
176
- const ot = ({
193
+ const it = ({
177
194
  block: e,
178
195
  context: t,
179
196
  localState: n,
@@ -182,13 +199,13 @@ const ot = ({
182
199
  }) => {
183
200
  if (!e.bindings)
184
201
  return e;
185
- const a = $(e), r = {
186
- ...a,
202
+ const r = W(e), a = {
203
+ ...r,
187
204
  properties: {
188
- ...a.properties
205
+ ...r.properties
189
206
  },
190
207
  actions: {
191
- ...a.actions
208
+ ...r.actions
192
209
  }
193
210
  };
194
211
  for (const s in e.bindings) {
@@ -199,41 +216,41 @@ const ot = ({
199
216
  rootSetState: i,
200
217
  context: t
201
218
  });
202
- nt(r, s, m);
219
+ ot(a, s, m);
203
220
  }
204
- return r;
221
+ return a;
205
222
  };
206
- function W({
223
+ function $({
207
224
  block: e,
208
225
  context: t,
209
226
  shouldEvaluateBindings: n,
210
227
  localState: o,
211
228
  rootState: i,
212
- rootSetState: a
229
+ rootSetState: r
213
230
  }) {
214
- const r = e;
215
- return n ? ot({
216
- block: r,
231
+ const a = e;
232
+ return n ? it({
233
+ block: a,
217
234
  localState: o,
218
235
  rootState: i,
219
- rootSetState: a,
236
+ rootSetState: r,
220
237
  context: t
221
- }) : r;
238
+ }) : a;
222
239
  }
223
- const it = ({
240
+ const rt = ({
224
241
  block: e,
225
242
  context: t,
226
243
  registeredComponents: n
227
244
  }) => {
228
- var a;
229
- const o = (a = W({
245
+ var r;
246
+ const o = (r = $({
230
247
  block: e,
231
248
  localState: t.localState,
232
249
  rootState: t.rootState,
233
250
  rootSetState: t.rootSetState,
234
251
  context: t.context,
235
252
  shouldEvaluateBindings: !1
236
- }).component) == null ? void 0 : a.name;
253
+ }).component) == null ? void 0 : r.name;
237
254
  if (!o)
238
255
  return null;
239
256
  const i = n[o];
@@ -261,7 +278,7 @@ const it = ({
261
278
  });
262
279
  if (!Array.isArray(i))
263
280
  return;
264
- const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
281
+ const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
265
282
  return i.map((c, m) => ({
266
283
  context: {
267
284
  ...t,
@@ -269,13 +286,13 @@ const it = ({
269
286
  ...t.localState,
270
287
  $index: m,
271
288
  $item: c,
272
- [r]: c,
273
- [`$${r}Index`]: m
289
+ [a]: c,
290
+ [`$${a}Index`]: m
274
291
  }
275
292
  },
276
293
  block: o
277
294
  }));
278
- }, le = {
295
+ }, ue = {
279
296
  small: {
280
297
  min: 320,
281
298
  default: 321,
@@ -291,11 +308,11 @@ const it = ({
291
308
  default: 991,
292
309
  max: 1200
293
310
  }
294
- }, Y = (e, t = le) => `@media (max-width: ${t[e].max}px)`, de = ({
311
+ }, Y = (e, t = ue) => `@media (max-width: ${t[e].max}px)`, me = ({
295
312
  small: e,
296
313
  medium: t
297
314
  }) => {
298
- const n = $(le);
315
+ const n = W(ue);
299
316
  if (!e || !t)
300
317
  return n;
301
318
  const o = Math.floor(e / 2);
@@ -310,24 +327,24 @@ const it = ({
310
327
  min: i,
311
328
  default: i + 1
312
329
  };
313
- const a = n.medium.max + 1;
330
+ const r = n.medium.max + 1;
314
331
  return n.large = {
315
332
  max: 2e3,
316
333
  // TODO: decide upper limit
317
- min: a,
318
- default: a + 1
334
+ min: r,
335
+ default: r + 1
319
336
  }, n;
320
- }, rt = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), ue = (e) => Object.entries(e).map(([n, o]) => {
337
+ }, st = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), fe = (e) => Object.entries(e).map(([n, o]) => {
321
338
  if (typeof o == "string")
322
- return `${rt(n)}: ${o};`;
323
- }).filter(C), st = (e) => ue(e).join(`
339
+ return `${st(n)}: ${o};`;
340
+ }).filter(C), ct = (e) => fe(e).join(`
324
341
  `), L = ({
325
342
  mediaQuery: e,
326
343
  className: t,
327
344
  styles: n
328
345
  }) => {
329
346
  const o = `.${t} {
330
- ${st(n)}
347
+ ${ct(n)}
331
348
  }`;
332
349
  return e ? `${e} {
333
350
  ${o}
@@ -336,9 +353,9 @@ const it = ({
336
353
  function O(e) {
337
354
  return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
338
355
  }
339
- function ct(e) {
356
+ function lt(e) {
340
357
  const t = function() {
341
- const i = W({
358
+ const i = $({
342
359
  block: e.block,
343
360
  localState: e.context.localState,
344
361
  rootState: e.context.rootState,
@@ -349,16 +366,16 @@ function ct(e) {
349
366
  return C(i.hide) ? !i.hide : C(i.show) ? i.show : !0;
350
367
  }, n = function() {
351
368
  var d;
352
- const i = W({
369
+ const i = $({
353
370
  block: e.block,
354
371
  localState: e.context.localState,
355
372
  rootState: e.context.rootState,
356
373
  rootSetState: e.context.rootSetState,
357
374
  context: e.context.context,
358
375
  shouldEvaluateBindings: !0
359
- }), a = i.responsiveStyles, r = e.context.content, s = de(
360
- ((d = r == null ? void 0 : r.meta) == null ? void 0 : d.breakpoints) || {}
361
- ), c = a == null ? void 0 : a.large, m = a == null ? void 0 : a.medium, g = a == null ? void 0 : a.small, p = i.id;
376
+ }), r = i.responsiveStyles, a = e.context.content, s = me(
377
+ ((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
378
+ ), c = r == null ? void 0 : r.large, m = r == null ? void 0 : r.medium, g = r == null ? void 0 : r.small, p = i.id;
362
379
  if (!p)
363
380
  return "";
364
381
  const f = c ? L({
@@ -381,12 +398,12 @@ function ct(e) {
381
398
  }) : "";
382
399
  return [f, h, u].join(" ");
383
400
  };
384
- return /* @__PURE__ */ l(k, { children: n() && t() ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
401
+ return /* @__PURE__ */ l(S, { children: n() && t() ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
385
402
  }
386
- function lt(e) {
403
+ function dt(e) {
387
404
  return e.charAt(0).toUpperCase() + e.slice(1);
388
405
  }
389
- const dt = (e) => `on${lt(e)}`, ut = (e, t) => (n) => H({
406
+ const ut = (e) => `on${dt(e)}`, mt = (e, t) => (n) => H({
390
407
  code: e,
391
408
  context: t.context,
392
409
  localState: t.localState,
@@ -395,45 +412,45 @@ const dt = (e) => `on${lt(e)}`, ut = (e, t) => (n) => H({
395
412
  event: n,
396
413
  isExpression: !1
397
414
  });
398
- function Yn(e) {
415
+ function eo(e) {
399
416
  const t = {}, n = e.block.actions ?? {};
400
417
  for (const o in n) {
401
418
  if (!n.hasOwnProperty(o))
402
419
  continue;
403
420
  const i = n[o];
404
- let a = dt(o);
421
+ let r = ut(o);
405
422
  if (e.stripPrefix)
406
423
  switch (I) {
407
424
  case "vue":
408
- a = a.replace("v-on:", "");
425
+ r = r.replace("v-on:", "");
409
426
  break;
410
427
  case "svelte":
411
- a = a.replace("on:", "");
428
+ r = r.replace("on:", "");
412
429
  break;
413
430
  }
414
- t[a] = ut(i, e);
431
+ t[r] = mt(i, e);
415
432
  }
416
433
  return t;
417
434
  }
418
- function mt({
435
+ function ft({
419
436
  style: e
420
437
  }) {
421
438
  return e;
422
439
  }
423
- const ft = ({
440
+ const ht = ({
424
441
  block: e,
425
442
  context: t
426
- }) => me(mt({
443
+ }) => he(ft({
427
444
  style: e.style || {},
428
445
  context: t,
429
446
  block: e
430
447
  }));
431
- function me(e) {
448
+ function he(e) {
432
449
  switch (I) {
433
450
  case "svelte":
434
451
  case "vue":
435
452
  case "solid":
436
- return ue(e).join(" ");
453
+ return fe(e).join(" ");
437
454
  case "qwik":
438
455
  case "reactNative":
439
456
  case "react":
@@ -441,43 +458,43 @@ function me(e) {
441
458
  return e;
442
459
  }
443
460
  }
444
- function ht({
461
+ function pt({
445
462
  properties: e
446
463
  }) {
447
464
  return e;
448
465
  }
449
- const pt = (e) => ({
466
+ const gt = (e) => ({
450
467
  href: e.href
451
468
  });
452
- function gt({
469
+ function bt({
453
470
  block: e,
454
471
  context: t
455
472
  }) {
456
473
  var o;
457
474
  const n = {
458
- ...pt(e),
475
+ ...gt(e),
459
476
  ...e.properties,
460
477
  "builder-id": e.id,
461
- style: ft({
478
+ style: ht({
462
479
  block: e,
463
480
  context: t
464
481
  }),
465
482
  [M()]: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
466
483
  };
467
- return ht({
484
+ return pt({
468
485
  properties: n,
469
486
  context: t,
470
487
  block: e
471
488
  });
472
489
  }
473
- const bt = ({
490
+ const yt = ({
474
491
  componentOptions: e,
475
492
  builderBlock: t,
476
493
  context: n,
477
494
  componentRef: o,
478
495
  includeBlockProps: i,
479
- isInteractive: a,
480
- contextValue: r
496
+ isInteractive: r,
497
+ contextValue: a
481
498
  }) => {
482
499
  const s = {
483
500
  ...e,
@@ -486,13 +503,13 @@ const bt = ({
486
503
  * component itself directly. Otherwise, they are provided to the wrapper element.
487
504
  */
488
505
  ...i ? {
489
- attributes: gt({
506
+ attributes: bt({
490
507
  block: t,
491
- context: r
508
+ context: a
492
509
  })
493
510
  } : {}
494
511
  };
495
- return a ? {
512
+ return r ? {
496
513
  Wrapper: o,
497
514
  block: t,
498
515
  context: n,
@@ -502,11 +519,11 @@ const bt = ({
502
519
  };
503
520
  function J(e) {
504
521
  var n;
505
- const t = e.isInteractive ? Ve : e.componentRef;
506
- return /* @__PURE__ */ l(k, { children: e.componentRef ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
522
+ const t = e.isInteractive ? $e : e.componentRef;
523
+ return /* @__PURE__ */ l(S, { children: e.componentRef ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
507
524
  t,
508
525
  {
509
- ...bt({
526
+ ...yt({
510
527
  componentOptions: e.componentOptions,
511
528
  builderBlock: e.builderBlock,
512
529
  context: e.context,
@@ -529,7 +546,7 @@ function J(e) {
529
546
  }
530
547
  ) }) : null });
531
548
  }
532
- function yt(e) {
549
+ function St(e) {
533
550
  const t = e.repeatContext;
534
551
  return /* @__PURE__ */ l(
535
552
  N,
@@ -544,7 +561,7 @@ function yt(e) {
544
561
  function N(e) {
545
562
  var m, g, p;
546
563
  const t = function() {
547
- return it({
564
+ return rt({
548
565
  block: e.block,
549
566
  context: e.context,
550
567
  registeredComponents: e.registeredComponents
@@ -556,7 +573,7 @@ function N(e) {
556
573
  });
557
574
  }, o = function() {
558
575
  var h;
559
- return (h = e.block.repeat) != null && h.collection ? e.block : W({
576
+ return (h = e.block.repeat) != null && h.collection ? e.block : $({
560
577
  block: e.block,
561
578
  localState: e.context.localState,
562
579
  rootState: e.context.rootState,
@@ -567,13 +584,13 @@ function N(e) {
567
584
  }, i = function() {
568
585
  var u;
569
586
  return e.block.tagName === "a" || ((u = o().properties) == null ? void 0 : u.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
570
- }, a = function() {
587
+ }, r = function() {
571
588
  var d, y;
572
589
  if ((d = e.block.repeat) != null && d.collection)
573
590
  return !!((y = n()) != null && y.length);
574
591
  const h = "hide" in o() ? o().hide : !1;
575
592
  return ("show" in o() ? o().show : !0) && !h;
576
- }, r = function() {
593
+ }, a = function() {
577
594
  var u;
578
595
  return !((u = t()) != null && u.component) && !n() ? o().children ?? [] : [];
579
596
  }, s = function() {
@@ -582,7 +599,7 @@ function N(e) {
582
599
  blockChildren: o().children ?? [],
583
600
  componentRef: (h = t()) == null ? void 0 : h.component,
584
601
  componentOptions: {
585
- ...Ke(o()),
602
+ ...qe(o()),
586
603
  builderContext: e.context,
587
604
  ...((u = t()) == null ? void 0 : u.name) === "Core:Button" || ((d = t()) == null ? void 0 : d.name) === "Symbol" || ((y = t()) == null ? void 0 : y.name) === "Columns" ? {
588
605
  builderLinkComponent: e.linkComponent
@@ -599,9 +616,9 @@ function N(e) {
599
616
  isInteractive: !((T = t()) != null && T.isRSC)
600
617
  };
601
618
  }, c = e.context;
602
- return /* @__PURE__ */ l(k, { children: a() ? /* @__PURE__ */ R(k, { children: [
603
- /* @__PURE__ */ l(ct, { block: e.block, context: e.context }),
604
- (m = t()) != null && m.noWrap ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
619
+ return /* @__PURE__ */ l(S, { children: r() ? /* @__PURE__ */ R(S, { children: [
620
+ /* @__PURE__ */ l(lt, { block: e.block, context: e.context }),
621
+ (m = t()) != null && m.noWrap ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
605
622
  J,
606
623
  {
607
624
  componentRef: s().componentRef,
@@ -614,8 +631,8 @@ function N(e) {
614
631
  includeBlockProps: s().includeBlockProps,
615
632
  isInteractive: s().isInteractive
616
633
  }
617
- ) }) : /* @__PURE__ */ l(k, { children: n() ? /* @__PURE__ */ l(k, { children: (p = n()) == null ? void 0 : p.map((f, h) => /* @__PURE__ */ l(
618
- yt,
634
+ ) }) : /* @__PURE__ */ l(S, { children: n() ? /* @__PURE__ */ l(S, { children: (p = n()) == null ? void 0 : p.map((f, h) => /* @__PURE__ */ l(
635
+ St,
619
636
  {
620
637
  repeatContext: f.context,
621
638
  block: f.block,
@@ -623,8 +640,8 @@ function N(e) {
623
640
  linkComponent: e.linkComponent
624
641
  },
625
642
  h
626
- )) }) : /* @__PURE__ */ l(k, { children: /* @__PURE__ */ R(
627
- Be,
643
+ )) }) : /* @__PURE__ */ l(S, { children: /* @__PURE__ */ R(
644
+ We,
628
645
  {
629
646
  Wrapper: i(),
630
647
  block: o(),
@@ -645,7 +662,7 @@ function N(e) {
645
662
  isInteractive: s().isInteractive
646
663
  }
647
664
  ),
648
- (g = r()) == null ? void 0 : g.map((f) => /* @__PURE__ */ l(
665
+ (g = a()) == null ? void 0 : g.map((f) => /* @__PURE__ */ l(
649
666
  N,
650
667
  {
651
668
  block: f,
@@ -663,7 +680,7 @@ function N(e) {
663
680
  function F(e) {
664
681
  var t, n, o;
665
682
  return /* @__PURE__ */ l(
666
- We,
683
+ Oe,
667
684
  {
668
685
  blocks: e.blocks,
669
686
  parent: e.parent,
@@ -671,7 +688,7 @@ function F(e) {
671
688
  styleProp: e.styleProp,
672
689
  BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
673
690
  BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
674
- children: e.blocks ? /* @__PURE__ */ l(k, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
691
+ children: e.blocks ? /* @__PURE__ */ l(S, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
675
692
  N,
676
693
  {
677
694
  block: i,
@@ -689,10 +706,10 @@ function kt(e) {
689
706
  const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
690
707
  var y;
691
708
  return ((y = n[d]) == null ? void 0 : y.width) || 100 / n.length;
692
- }, a = function(d) {
709
+ }, r = function(d) {
693
710
  const y = t * (n.length - 1) / n.length;
694
711
  return `calc(${i(d)}% - ${y}px)`;
695
- }, r = function({
712
+ }, a = function({
696
713
  stackedStyle: d,
697
714
  desktopStyle: y
698
715
  }) {
@@ -705,13 +722,13 @@ function kt(e) {
705
722
  }, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", m = function() {
706
723
  return {
707
724
  "--flex-dir": c,
708
- "--flex-dir-tablet": r({
725
+ "--flex-dir-tablet": a({
709
726
  stackedStyle: c,
710
727
  desktopStyle: "row"
711
728
  })
712
729
  };
713
730
  }, g = function(d) {
714
- const y = d === 0 ? 0 : t, v = a(d), b = `${y}px`, E = "100%", T = 0;
731
+ const y = d === 0 ? 0 : t, v = r(d), b = `${y}px`, E = "100%", T = 0;
715
732
  return {
716
733
  ...{
717
734
  display: "flex",
@@ -728,18 +745,18 @@ function kt(e) {
728
745
  stackedStyle: T,
729
746
  desktopStyle: b
730
747
  }),
731
- "--column-width-tablet": r({
748
+ "--column-width-tablet": a({
732
749
  stackedStyle: E,
733
750
  desktopStyle: v
734
751
  }),
735
- "--column-margin-left-tablet": r({
752
+ "--column-margin-left-tablet": a({
736
753
  stackedStyle: T,
737
754
  desktopStyle: b
738
755
  })
739
756
  };
740
757
  }, p = function(d) {
741
758
  var v, b;
742
- return de(
759
+ return me(
743
760
  ((b = (v = e.builderContext.content) == null ? void 0 : v.meta) == null ? void 0 : b.breakpoints) || {}
744
761
  )[d].max;
745
762
  }, f = function() {
@@ -769,16 +786,16 @@ function kt(e) {
769
786
  },
770
787
  `;
771
788
  };
772
- return /* @__PURE__ */ R(k, { children: [
789
+ return /* @__PURE__ */ R(S, { children: [
773
790
  /* @__PURE__ */ R(
774
791
  "div",
775
792
  {
776
793
  className: `builder-columns ${e.builderBlock.id}-breakpoints div-3d816b82`,
777
794
  style: m(),
778
795
  children: [
779
- /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(O, { styles: f() }) }),
796
+ /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: f() }) }),
780
797
  (h = e.columns) == null ? void 0 : h.map((u, d) => /* @__PURE__ */ l(
781
- $e,
798
+ Ne,
782
799
  {
783
800
  TagName: u.link ? e.builderLinkComponent || "a" : "div",
784
801
  actionAttributes: {},
@@ -787,7 +804,7 @@ function kt(e) {
787
804
  href: u.link
788
805
  } : {},
789
806
  [M()]: "builder-column",
790
- style: me(g(d))
807
+ style: he(g(d))
791
808
  },
792
809
  children: /* @__PURE__ */ l(
793
810
  F,
@@ -818,39 +835,39 @@ function kt(e) {
818
835
  function Q(e) {
819
836
  return e.replace(/http(s)?:/, "");
820
837
  }
821
- function St(e = "", t, n) {
838
+ function vt(e = "", t, n) {
822
839
  const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
823
840
  return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
824
841
  }
825
- function vt(e, t) {
842
+ function xt(e, t) {
826
843
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
827
844
  return e;
828
845
  if (t === "master")
829
846
  return Q(e);
830
847
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
831
848
  if (n) {
832
- const o = e.split(n[0]), i = n[3], a = t.match("x") ? t : `${t}x`;
833
- return Q(`${o[0]}_${a}${i}`);
849
+ const o = e.split(n[0]), i = n[3], r = t.match("x") ? t : `${t}x`;
850
+ return Q(`${o[0]}_${r}${i}`);
834
851
  }
835
852
  return null;
836
853
  }
837
- function Jn(e) {
854
+ function to(e) {
838
855
  if (!e)
839
856
  return e;
840
857
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
841
858
  if (e.match(/builder\.io/)) {
842
859
  let n = e;
843
860
  const o = Number(e.split("?width=")[1]);
844
- return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${St(e, "width", i)} ${i}w`).concat([n]).join(", ");
861
+ return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${vt(e, "width", i)} ${i}w`).concat([n]).join(", ");
845
862
  }
846
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [vt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
863
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [xt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
847
864
  }
848
- const xt = (e) => {
865
+ const Ct = (e) => {
849
866
  if (e === "localhost" || e === "127.0.0.1")
850
867
  return e;
851
868
  const t = e.split(".");
852
869
  return t.length > 2 ? t.slice(1).join(".") : e;
853
- }, fe = ({
870
+ }, pe = ({
854
871
  name: e,
855
872
  canTrack: t
856
873
  }) => {
@@ -861,14 +878,14 @@ const xt = (e) => {
861
878
  x.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
862
879
  return;
863
880
  }
864
- }, he = async (e) => fe(e), Ct = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(C).join("; "), wt = [["secure", ""], ["SameSite", "None"]], It = ({
881
+ }, ge = async (e) => pe(e), wt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(C).join("; "), It = [["secure", ""], ["SameSite", "None"]], Tt = ({
865
882
  name: e,
866
883
  value: t,
867
884
  expires: n
868
885
  }) => {
869
- const i = (S() ? location.protocol === "https:" : !0) ? wt : [[]], a = n ? [["expires", n.toUTCString()]] : [[]], r = [[e, t], ...a, ["path", "/"], ["domain", xt(window.location.hostname)], ...i];
870
- return Ct(r);
871
- }, pe = async ({
886
+ const i = (k() ? location.protocol === "https:" : !0) ? It : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", Ct(window.location.hostname)], ...i];
887
+ return wt(a);
888
+ }, be = async ({
872
889
  name: e,
873
890
  value: t,
874
891
  expires: n,
@@ -877,7 +894,7 @@ const xt = (e) => {
877
894
  try {
878
895
  if (!o)
879
896
  return;
880
- const i = It({
897
+ const i = Tt({
881
898
  name: e,
882
899
  value: t,
883
900
  expires: n
@@ -886,45 +903,45 @@ const xt = (e) => {
886
903
  } catch (i) {
887
904
  x.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
888
905
  }
889
- }, Tt = "builder.tests", K = (e) => `${Tt}.${e}`, Et = ({
906
+ }, Et = "builder.tests", K = (e) => `${Et}.${e}`, Rt = ({
890
907
  contentId: e
891
- }) => he({
908
+ }) => ge({
892
909
  name: K(e),
893
910
  canTrack: !0
894
- }), Rt = ({
911
+ }), At = ({
895
912
  contentId: e
896
- }) => fe({
913
+ }) => pe({
897
914
  name: K(e),
898
915
  canTrack: !0
899
916
  }), Pt = ({
900
917
  contentId: e,
901
918
  value: t
902
- }) => pe({
919
+ }) => be({
903
920
  name: K(e),
904
921
  value: t,
905
922
  canTrack: !0
906
- }), ge = (e) => C(e.id) && C(e.variations) && Object.keys(e.variations).length > 0, At = ({
923
+ }), ye = (e) => C(e.id) && C(e.variations) && Object.keys(e.variations).length > 0, Bt = ({
907
924
  id: e,
908
925
  variations: t
909
926
  }) => {
910
927
  var i;
911
928
  let n = 0;
912
929
  const o = Math.random();
913
- for (const a in t) {
914
- const r = (i = t[a]) == null ? void 0 : i.testRatio;
915
- if (n += r, o < n)
916
- return a;
930
+ for (const r in t) {
931
+ const a = (i = t[r]) == null ? void 0 : i.testRatio;
932
+ if (n += a, o < n)
933
+ return r;
917
934
  }
918
935
  return e;
919
- }, be = (e) => {
920
- const t = At(e);
936
+ }, Se = (e) => {
937
+ const t = Bt(e);
921
938
  return Pt({
922
939
  contentId: e.id,
923
940
  value: t
924
941
  }).catch((n) => {
925
942
  x.error("could not store A/B test variation: ", n);
926
943
  }), t;
927
- }, ye = ({
944
+ }, ke = ({
928
945
  item: e,
929
946
  testGroupId: t
930
947
  }) => {
@@ -946,14 +963,14 @@ const xt = (e) => {
946
963
  return e;
947
964
  if (!e)
948
965
  return;
949
- if (!ge(e))
966
+ if (!ye(e))
950
967
  return e;
951
- const n = Rt({
968
+ const n = At({
952
969
  contentId: e.id
953
- }) || be({
970
+ }) || Se({
954
971
  variations: e.variations,
955
972
  id: e.id
956
- }), o = ye({
973
+ }), o = ke({
957
974
  item: e,
958
975
  testGroupId: n
959
976
  });
@@ -961,18 +978,18 @@ const xt = (e) => {
961
978
  ...e,
962
979
  ...o
963
980
  };
964
- }, Bt = async ({
981
+ }, $t = async ({
965
982
  item: e,
966
983
  canTrack: t
967
984
  }) => {
968
- if (!t || !ge(e))
985
+ if (!t || !ye(e))
969
986
  return e;
970
- const o = await Et({
987
+ const o = await Rt({
971
988
  contentId: e.id
972
- }) || be({
989
+ }) || Se({
973
990
  variations: e.variations,
974
991
  id: e.id
975
- }), i = ye({
992
+ }), i = ke({
976
993
  item: e,
977
994
  testGroupId: o
978
995
  });
@@ -980,7 +997,7 @@ const xt = (e) => {
980
997
  ...e,
981
998
  ...i
982
999
  };
983
- }, _ = (e) => C(e) ? e : !0, Wt = {
1000
+ }, U = (e) => C(e) ? e : !0, Wt = {
984
1001
  name: "Core:Button",
985
1002
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
986
1003
  defaultStyles: {
@@ -1013,7 +1030,7 @@ const xt = (e) => {
1013
1030
  }],
1014
1031
  static: !0,
1015
1032
  noWrap: !0
1016
- }, $t = {
1033
+ }, Ot = {
1017
1034
  // TODO: ways to statically preprocess JSON for references, functions, etc
1018
1035
  name: "Columns",
1019
1036
  isRSC: !0,
@@ -1192,7 +1209,7 @@ const xt = (e) => {
1192
1209
  });
1193
1210
  }
1194
1211
  const n = e.get("columns");
1195
- 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();
1212
+ 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();
1196
1213
  }
1197
1214
  }, {
1198
1215
  name: "space",
@@ -1214,7 +1231,7 @@ const xt = (e) => {
1214
1231
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1215
1232
  advanced: !0
1216
1233
  }]
1217
- }, Ot = {
1234
+ }, Nt = {
1218
1235
  name: "Custom Code",
1219
1236
  static: !0,
1220
1237
  requiredPermissions: ["editCode"],
@@ -1236,7 +1253,7 @@ const xt = (e) => {
1236
1253
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1237
1254
  advanced: !0
1238
1255
  }]
1239
- }, Nt = {
1256
+ }, Ft = {
1240
1257
  name: "Embed",
1241
1258
  static: !0,
1242
1259
  inputs: [{
@@ -1261,7 +1278,7 @@ const xt = (e) => {
1261
1278
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1262
1279
  hideFromUI: !0
1263
1280
  }]
1264
- }, Ft = ["text/javascript", "application/javascript", "application/ecmascript"], Qn = (e) => Ft.includes(e.type), Lt = {
1281
+ }, Lt = ["text/javascript", "application/javascript", "application/ecmascript"], no = (e) => Lt.includes(e.type), Ut = {
1265
1282
  name: "Fragment",
1266
1283
  static: !0,
1267
1284
  hidden: !0,
@@ -1287,7 +1304,7 @@ const xt = (e) => {
1287
1304
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1288
1305
  onChange: (e) => {
1289
1306
  e.delete("srcset"), e.delete("noWebp");
1290
- function n(r, s = 6e4) {
1307
+ function n(a, s = 6e4) {
1291
1308
  return new Promise((c, m) => {
1292
1309
  const g = document.createElement("img");
1293
1310
  let p = !1;
@@ -1295,21 +1312,21 @@ const xt = (e) => {
1295
1312
  p = !0, c(g);
1296
1313
  }, g.addEventListener("error", (f) => {
1297
1314
  console.warn("Image load failed", f.error), m(f.error);
1298
- }), g.src = r, setTimeout(() => {
1315
+ }), g.src = a, setTimeout(() => {
1299
1316
  p || m(new Error("Image load timed out"));
1300
1317
  }, s);
1301
1318
  });
1302
1319
  }
1303
- function o(r) {
1304
- return Math.round(r * 1e3) / 1e3;
1320
+ function o(a) {
1321
+ return Math.round(a * 1e3) / 1e3;
1305
1322
  }
1306
- const i = e.get("image"), a = e.get("aspectRatio");
1307
- if (fetch(i).then((r) => r.blob()).then((r) => {
1308
- r.type.includes("svg") && e.set("noWebp", !0);
1309
- }), i && (!a || a === 0.7041))
1310
- return n(i).then((r) => {
1323
+ const i = e.get("image"), r = e.get("aspectRatio");
1324
+ if (fetch(i).then((a) => a.blob()).then((a) => {
1325
+ a.type.includes("svg") && e.set("noWebp", !0);
1326
+ }), i && (!r || r === 0.7041))
1327
+ return n(i).then((a) => {
1311
1328
  const s = e.get("aspectRatio");
1312
- 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));
1329
+ 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));
1313
1330
  });
1314
1331
  }
1315
1332
  }, {
@@ -1367,7 +1384,7 @@ const xt = (e) => {
1367
1384
  advanced: !0,
1368
1385
  defaultValue: 0.7041
1369
1386
  }]
1370
- }, Ut = {
1387
+ }, Dt = {
1371
1388
  // friendlyName?
1372
1389
  name: "Raw:Img",
1373
1390
  hideFromInsertMenu: !0,
@@ -1381,7 +1398,7 @@ const xt = (e) => {
1381
1398
  }],
1382
1399
  noWrap: !0,
1383
1400
  static: !0
1384
- }, Dt = {
1401
+ }, Mt = {
1385
1402
  name: "Core:Section",
1386
1403
  static: !0,
1387
1404
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1420,7 +1437,7 @@ const xt = (e) => {
1420
1437
  }
1421
1438
  }
1422
1439
  }]
1423
- }, Mt = {
1440
+ }, jt = {
1424
1441
  name: "Slot",
1425
1442
  isRSC: !0,
1426
1443
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -1434,7 +1451,7 @@ const xt = (e) => {
1434
1451
  defaultValue: "children"
1435
1452
  }]
1436
1453
  };
1437
- function jt(e) {
1454
+ function Ht(e) {
1438
1455
  var t, n, o;
1439
1456
  return /* @__PURE__ */ l(
1440
1457
  "div",
@@ -1457,7 +1474,7 @@ function jt(e) {
1457
1474
  }
1458
1475
  );
1459
1476
  }
1460
- const Ht = {
1477
+ const Kt = {
1461
1478
  name: "Symbol",
1462
1479
  noWrap: !0,
1463
1480
  static: !0,
@@ -1490,7 +1507,7 @@ const Ht = {
1490
1507
  hideFromUI: !0,
1491
1508
  type: "boolean"
1492
1509
  }]
1493
- }, Kt = {
1510
+ }, zt = {
1494
1511
  name: "Text",
1495
1512
  static: !0,
1496
1513
  isRSC: !0,
@@ -1509,7 +1526,7 @@ const Ht = {
1509
1526
  textAlign: "center"
1510
1527
  }
1511
1528
  };
1512
- function zt(e) {
1529
+ function qt(e) {
1513
1530
  var t;
1514
1531
  return /* @__PURE__ */ l(
1515
1532
  "div",
@@ -1522,7 +1539,7 @@ function zt(e) {
1522
1539
  }
1523
1540
  );
1524
1541
  }
1525
- const qt = {
1542
+ const Gt = {
1526
1543
  name: "Video",
1527
1544
  canHaveChildren: !0,
1528
1545
  defaultStyles: {
@@ -1604,57 +1621,57 @@ const qt = {
1604
1621
  advanced: !0
1605
1622
  }]
1606
1623
  }, X = () => [{
1607
- component: Oe,
1624
+ component: Fe,
1608
1625
  ...Wt
1609
1626
  }, {
1610
1627
  component: kt,
1611
- ...$t
1612
- }, {
1613
- component: Ne,
1614
1628
  ...Ot
1615
1629
  }, {
1616
- component: Fe,
1630
+ component: Le,
1617
1631
  ...Nt
1618
1632
  }, {
1619
- component: Le,
1620
- ...Lt
1633
+ component: Ue,
1634
+ ...Ft
1621
1635
  }, {
1622
1636
  component: _e,
1623
- ..._t
1624
- }, {
1625
- component: Ue,
1626
1637
  ...Ut
1627
1638
  }, {
1628
1639
  component: De,
1640
+ ..._t
1641
+ }, {
1642
+ component: Me,
1629
1643
  ...Dt
1630
1644
  }, {
1631
- component: Mn,
1632
- ...Ht
1645
+ component: je,
1646
+ ...Mt
1633
1647
  }, {
1634
- component: zt,
1648
+ component: qn,
1635
1649
  ...Kt
1636
1650
  }, {
1637
- component: Me,
1638
- ...qt
1651
+ component: qt,
1652
+ ...zt
1639
1653
  }, {
1640
- component: jt,
1641
- ...Mt
1642
- }], Z = [], Xn = (e) => ({
1654
+ component: He,
1655
+ ...Gt
1656
+ }, {
1657
+ component: Ht,
1658
+ ...jt
1659
+ }], Z = [], oo = (e) => ({
1643
1660
  type: "builder.registerComponent",
1644
- data: U(e)
1645
- }), Gt = (e) => {
1661
+ data: _(e)
1662
+ }), Yt = (e) => {
1646
1663
  const t = e.toString().trim();
1647
1664
  return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
1648
- }, Yt = (e) => typeof e == "function" ? Gt(e) : $(e), U = ({
1665
+ }, Jt = (e) => typeof e == "function" ? Yt(e) : W(e), _ = ({
1649
1666
  inputs: e,
1650
1667
  ...t
1651
1668
  }) => ({
1652
- ...$(t),
1653
- inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, a]) => ({
1669
+ ...W(t),
1670
+ inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
1654
1671
  ...o,
1655
- [i]: Yt(a)
1672
+ [i]: Jt(r)
1656
1673
  }), {}))
1657
- }), Jt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1674
+ }), Qt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1658
1675
  function getAndSetVariantId() {
1659
1676
  function setCookie(name, value, days) {
1660
1677
  let expires = '';
@@ -1710,7 +1727,7 @@ const qt = {
1710
1727
  }).join('');
1711
1728
  styleEl.innerHTML = newStyleStr;
1712
1729
  }
1713
- }`, Qt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1730
+ }`, Xt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1714
1731
  if (!navigator.cookieEnabled) {
1715
1732
  return;
1716
1733
  }
@@ -1744,24 +1761,24 @@ const qt = {
1744
1761
  thisScriptEl?.remove();
1745
1762
  }
1746
1763
  return;
1747
- }`, ke = "builderIoAbTest", Se = "builderIoRenderContent", V = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1764
+ }`, ve = "builderIoAbTest", xe = "builderIoRenderContent", B = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1748
1765
  ...t,
1749
1766
  testVariationId: t.id,
1750
1767
  id: e == null ? void 0 : e.id
1751
- })), Xt = ({
1768
+ })), Zt = ({
1752
1769
  canTrack: e,
1753
1770
  content: t
1754
- }) => !(!(V(t).length > 0) || !e || S()), Zt = (e) => e === "react" || e === "reactNative", ve = Zt(I), en = () => `
1755
- window.${ke} = ${Jt}
1756
- window.${Se} = ${Qt}
1757
- `, tn = (e, t) => `
1758
- window.${ke}(
1759
- "${t}",${JSON.stringify(e)}, ${ve}
1760
- )`, nn = ({
1771
+ }) => !(!(B(t).length > 0) || !e || k()), en = (e) => e === "react" || e === "reactNative", Ce = en(I), tn = () => `
1772
+ window.${ve} = ${Qt}
1773
+ window.${xe} = ${Xt}
1774
+ `, nn = (e, t) => `
1775
+ window.${ve}(
1776
+ "${t}",${JSON.stringify(e)}, ${Ce}
1777
+ )`, on = ({
1761
1778
  contentId: e,
1762
1779
  variationId: t
1763
- }) => `window.${Se}(
1764
- "${t}", "${e}", ${ve}
1780
+ }) => `window.${xe}(
1781
+ "${t}", "${e}", ${Ce}
1765
1782
  )`;
1766
1783
  function D(e) {
1767
1784
  return /* @__PURE__ */ l(
@@ -1772,66 +1789,66 @@ function D(e) {
1772
1789
  }
1773
1790
  );
1774
1791
  }
1775
- const on = (e) => {
1792
+ const rn = (e) => {
1776
1793
  const t = e.get("preview"), n = e.get("overrides." + t);
1777
1794
  return n || x.warn("No previewed ID found in search params."), n;
1778
1795
  };
1779
1796
  function an() {
1780
- globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Ae({
1797
+ globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Ve({
1781
1798
  max: 500,
1782
1799
  // how long to live in ms
1783
1800
  ttl: 1e3 * 60 * 5
1784
1801
  }));
1785
1802
  }
1786
- function rn(e) {
1803
+ function sn(e) {
1787
1804
  an();
1788
- const t = on(e);
1805
+ const t = rn(e);
1789
1806
  return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
1790
1807
  }
1791
- function sn() {
1808
+ function cn() {
1792
1809
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
1793
1810
  }
1794
- function cn() {
1795
- const e = sn().fetch;
1811
+ function ln() {
1812
+ const e = cn().fetch;
1796
1813
  if (typeof e > "u")
1797
1814
  throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
1798
1815
  For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
1799
1816
  return e;
1800
1817
  }
1801
- const ln = cn();
1802
- function B(e, t = null, n = ".") {
1818
+ const dn = ln();
1819
+ function V(e, t = null, n = ".") {
1803
1820
  return Object.keys(e).reduce((o, i) => {
1804
- const a = e[i], r = [t, i].filter(Boolean).join(n);
1805
- return [typeof a == "object", a !== null, !(Array.isArray(a) && a.length === 0)].every(Boolean) ? {
1821
+ const r = e[i], a = [t, i].filter(Boolean).join(n);
1822
+ return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
1806
1823
  ...o,
1807
- ...B(a, r, n)
1824
+ ...V(r, a, n)
1808
1825
  } : {
1809
1826
  ...o,
1810
- [r]: a
1827
+ [a]: r
1811
1828
  };
1812
1829
  }, {});
1813
1830
  }
1814
- const dn = "v3", ee = "builder.", un = "options.", mn = (e) => {
1831
+ const un = "v3", ee = "builder.", mn = "options.", fn = (e) => {
1815
1832
  const t = {};
1816
1833
  return e.forEach((n, o) => {
1817
1834
  t[o] = n;
1818
1835
  }), t;
1819
- }, xe = (e) => {
1836
+ }, we = (e) => {
1820
1837
  if (!e)
1821
1838
  return {};
1822
- const t = Ce(e), n = {};
1839
+ const t = Ie(e), n = {};
1823
1840
  return Object.keys(t).forEach((o) => {
1824
1841
  if (o.startsWith(ee)) {
1825
- const i = o.replace(ee, "").replace(un, "");
1842
+ const i = o.replace(ee, "").replace(mn, "");
1826
1843
  n[i] = t[o];
1827
1844
  }
1828
1845
  }), n;
1829
- }, fn = () => {
1830
- if (!S())
1846
+ }, hn = () => {
1847
+ if (!k())
1831
1848
  return {};
1832
1849
  const e = new URLSearchParams(window.location.search);
1833
- return xe(e);
1834
- }, Ce = (e) => e instanceof URLSearchParams ? mn(e) : e, te = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
1850
+ return we(e);
1851
+ }, Ie = (e) => e instanceof URLSearchParams ? fn(e) : e, te = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
1835
1852
  let {
1836
1853
  noTraverse: t = !1
1837
1854
  } = e;
@@ -1839,12 +1856,12 @@ const dn = "v3", ee = "builder.", un = "options.", mn = (e) => {
1839
1856
  limit: n = 30,
1840
1857
  userAttributes: o,
1841
1858
  query: i,
1842
- model: a,
1843
- apiKey: r,
1859
+ model: r,
1860
+ apiKey: a,
1844
1861
  includeRefs: s = !0,
1845
1862
  enrich: c,
1846
1863
  locale: m,
1847
- apiVersion: g = dn,
1864
+ apiVersion: g = un,
1848
1865
  fields: p,
1849
1866
  omit: f,
1850
1867
  offset: h,
@@ -1853,73 +1870,73 @@ const dn = "v3", ee = "builder.", un = "options.", mn = (e) => {
1853
1870
  sort: y,
1854
1871
  includeUnpublished: v
1855
1872
  } = e;
1856
- if (!r)
1873
+ if (!a)
1857
1874
  throw new Error("Missing API key");
1858
1875
  if (!["v2", "v3"].includes(g))
1859
1876
  throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${g}'`);
1860
1877
  (e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
1861
- const b = new URL(`https://cdn.builder.io/api/${g}/content/${a}?apiKey=${r}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m ? `&locale=${m}` : ""}${c ? `&enrich=${c}` : ""}`);
1878
+ const b = new URL(`https://cdn.builder.io/api/${g}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m ? `&locale=${m}` : ""}${c ? `&enrich=${c}` : ""}`);
1862
1879
  if (b.searchParams.set("omit", f || "meta.componentsUsed"), p && b.searchParams.set("fields", p), Number.isFinite(h) && h > -1 && b.searchParams.set("offset", String(Math.floor(h))), typeof v == "boolean" && b.searchParams.set("includeUnpublished", String(v)), u && te(u) && b.searchParams.set("cacheSeconds", String(u)), d && te(d) && b.searchParams.set("staleCacheSeconds", String(d)), y) {
1863
- const w = B({
1880
+ const w = V({
1864
1881
  sort: y
1865
1882
  });
1866
- for (const P in w)
1867
- b.searchParams.set(P, JSON.stringify(w[P]));
1883
+ for (const A in w)
1884
+ b.searchParams.set(A, JSON.stringify(w[A]));
1868
1885
  }
1869
1886
  const E = {
1870
- ...fn(),
1871
- ...Ce(e.options || {})
1872
- }, T = B(E);
1887
+ ...hn(),
1888
+ ...Ie(e.options || {})
1889
+ }, T = V(E);
1873
1890
  for (const w in T)
1874
1891
  b.searchParams.set(w, String(T[w]));
1875
1892
  if (o && b.searchParams.set("userAttributes", JSON.stringify(o)), i) {
1876
- const w = B({
1893
+ const w = V({
1877
1894
  query: i
1878
1895
  });
1879
- for (const P in w)
1880
- b.searchParams.set(P, JSON.stringify(w[P]));
1896
+ for (const A in w)
1897
+ b.searchParams.set(A, JSON.stringify(w[A]));
1881
1898
  }
1882
1899
  return b;
1883
- }, hn = (e) => "results" in e;
1900
+ }, pn = (e) => "results" in e;
1884
1901
  async function q(e) {
1885
- const t = await we({
1902
+ const t = await Te({
1886
1903
  ...e,
1887
1904
  limit: 1
1888
1905
  });
1889
1906
  return t && t[0] || null;
1890
1907
  }
1891
- const Zn = q, pn = async (e) => {
1908
+ const io = q, gn = async (e) => {
1892
1909
  const t = z(e);
1893
- return await (await ln(t.href)).json();
1894
- }, gn = async (e, t, n = z(e)) => {
1895
- const o = _(e.canTrack);
1910
+ return await (await dn(t.href)).json();
1911
+ }, bn = async (e, t, n = z(e)) => {
1912
+ const o = U(e.canTrack);
1896
1913
  if (n.search.includes("preview=")) {
1897
- const a = [];
1898
- for (const r of t.results) {
1899
- const s = rn(n.searchParams);
1900
- a.push(s || r);
1914
+ const r = [];
1915
+ for (const a of t.results) {
1916
+ const s = sn(n.searchParams);
1917
+ r.push(s || a);
1901
1918
  }
1902
- t.results = a;
1919
+ t.results = r;
1903
1920
  }
1904
- if (!o || !(S() || I === "reactNative"))
1921
+ if (!o || !(k() || I === "reactNative"))
1905
1922
  return t.results;
1906
1923
  try {
1907
- const a = [];
1908
- for (const r of t.results)
1909
- a.push(await Bt({
1910
- item: r,
1924
+ const r = [];
1925
+ for (const a of t.results)
1926
+ r.push(await $t({
1927
+ item: a,
1911
1928
  canTrack: o
1912
1929
  }));
1913
- t.results = a;
1914
- } catch (a) {
1915
- x.error("Could not process A/B tests. ", a);
1930
+ t.results = r;
1931
+ } catch (r) {
1932
+ x.error("Could not process A/B tests. ", r);
1916
1933
  }
1917
1934
  return t.results;
1918
1935
  };
1919
- async function we(e) {
1936
+ async function Te(e) {
1920
1937
  try {
1921
- const t = z(e), n = await pn(e);
1922
- return hn(n) ? gn(e, n) : (x.error("Error fetching data. ", {
1938
+ const t = z(e), n = await gn(e);
1939
+ return pn(n) ? bn(e, n) : (x.error("Error fetching data. ", {
1923
1940
  url: t,
1924
1941
  content: n,
1925
1942
  options: e
@@ -1928,13 +1945,13 @@ async function we(e) {
1928
1945
  return x.error("Error fetching data. ", t), null;
1929
1946
  }
1930
1947
  }
1931
- const eo = we, bn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
1932
- function yn(e, t) {
1948
+ const ro = Te, yn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
1949
+ function Sn(e, t) {
1933
1950
  const n = new URL(t.origin), o = n.hostname;
1934
- return (e || bn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
1951
+ return (e || yn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
1935
1952
  }
1936
- function to() {
1937
- return !S() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
1953
+ function ao() {
1954
+ return !k() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
1938
1955
  }
1939
1956
  function kn() {
1940
1957
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
@@ -1942,82 +1959,82 @@ function kn() {
1942
1959
  return (e == "x" ? t : t & 3 | 8).toString(16);
1943
1960
  });
1944
1961
  }
1945
- function Ie() {
1962
+ function Ee() {
1946
1963
  return kn().replace(/-/g, "");
1947
1964
  }
1948
- const Te = "builderSessionId", Sn = async ({
1965
+ const Re = "builderSessionId", vn = async ({
1949
1966
  canTrack: e
1950
1967
  }) => {
1951
1968
  if (!e)
1952
1969
  return;
1953
- const t = await he({
1954
- name: Te,
1970
+ const t = await ge({
1971
+ name: Re,
1955
1972
  canTrack: e
1956
1973
  });
1957
1974
  if (C(t))
1958
1975
  return t;
1959
1976
  {
1960
- const n = vn();
1961
- return xn({
1977
+ const n = xn();
1978
+ return Cn({
1962
1979
  id: n,
1963
1980
  canTrack: e
1964
1981
  }), n;
1965
1982
  }
1966
- }, vn = () => Ie(), xn = ({
1983
+ }, xn = () => Ee(), Cn = ({
1967
1984
  id: e,
1968
1985
  canTrack: t
1969
- }) => pe({
1970
- name: Te,
1986
+ }) => be({
1987
+ name: Re,
1971
1988
  value: e,
1972
1989
  canTrack: t
1973
- }), Ee = () => S() && typeof localStorage < "u" ? localStorage : void 0, Cn = ({
1990
+ }), Ae = () => k() && typeof localStorage < "u" ? localStorage : void 0, wn = ({
1974
1991
  key: e,
1975
1992
  canTrack: t
1976
1993
  }) => {
1977
1994
  var n;
1978
1995
  try {
1979
- return t ? (n = Ee()) == null ? void 0 : n.getItem(e) : void 0;
1996
+ return t ? (n = Ae()) == null ? void 0 : n.getItem(e) : void 0;
1980
1997
  } catch (o) {
1981
1998
  console.debug("[LocalStorage] GET error: ", o);
1982
1999
  return;
1983
2000
  }
1984
- }, wn = ({
2001
+ }, In = ({
1985
2002
  key: e,
1986
2003
  canTrack: t,
1987
2004
  value: n
1988
2005
  }) => {
1989
2006
  var o;
1990
2007
  try {
1991
- t && ((o = Ee()) == null || o.setItem(e, n));
2008
+ t && ((o = Ae()) == null || o.setItem(e, n));
1992
2009
  } catch (i) {
1993
2010
  console.debug("[LocalStorage] SET error: ", i);
1994
2011
  }
1995
- }, Re = "builderVisitorId", In = ({
2012
+ }, Pe = "builderVisitorId", Tn = ({
1996
2013
  canTrack: e
1997
2014
  }) => {
1998
2015
  if (!e)
1999
2016
  return;
2000
- const t = Cn({
2001
- key: Re,
2017
+ const t = wn({
2018
+ key: Pe,
2002
2019
  canTrack: e
2003
2020
  });
2004
2021
  if (C(t))
2005
2022
  return t;
2006
2023
  {
2007
- const n = Tn();
2008
- return En({
2024
+ const n = En();
2025
+ return Rn({
2009
2026
  id: n,
2010
2027
  canTrack: e
2011
2028
  }), n;
2012
2029
  }
2013
- }, Tn = () => Ie(), En = ({
2030
+ }, En = () => Ee(), Rn = ({
2014
2031
  id: e,
2015
2032
  canTrack: t
2016
- }) => wn({
2017
- key: Re,
2033
+ }) => In({
2034
+ key: Pe,
2018
2035
  value: e,
2019
2036
  canTrack: t
2020
- }), Rn = async ({
2037
+ }), An = async ({
2021
2038
  canTrack: e
2022
2039
  }) => {
2023
2040
  if (!e)
@@ -2025,9 +2042,9 @@ const Te = "builderSessionId", Sn = async ({
2025
2042
  visitorId: void 0,
2026
2043
  sessionId: void 0
2027
2044
  };
2028
- const t = await Sn({
2045
+ const t = await vn({
2029
2046
  canTrack: e
2030
- }), n = In({
2047
+ }), n = Tn({
2031
2048
  canTrack: e
2032
2049
  });
2033
2050
  return {
@@ -2048,19 +2065,19 @@ const Te = "builderSessionId", Sn = async ({
2048
2065
  url: location.href,
2049
2066
  ...o
2050
2067
  },
2051
- ...await Rn({
2068
+ ...await An({
2052
2069
  canTrack: t
2053
2070
  }),
2054
- userAttributes: ce(),
2071
+ userAttributes: le(),
2055
2072
  ownerId: n
2056
2073
  }
2057
2074
  });
2058
- async function An(e) {
2075
+ async function Bn(e) {
2059
2076
  if (!e.apiKey) {
2060
2077
  x.error("Missing API key for track call. Please provide your API key.");
2061
2078
  return;
2062
2079
  }
2063
- if (e.canTrack && !j() && (S() || I === "reactNative"))
2080
+ if (e.canTrack && !j() && (k() || I === "reactNative"))
2064
2081
  return fetch("https://cdn.builder.io/api/v1/track", {
2065
2082
  method: "POST",
2066
2083
  body: JSON.stringify({
@@ -2074,7 +2091,7 @@ async function An(e) {
2074
2091
  console.error("Failed to track: ", t);
2075
2092
  });
2076
2093
  }
2077
- const no = (e) => An({
2094
+ const so = (e) => Bn({
2078
2095
  ...e,
2079
2096
  canTrack: !0
2080
2097
  });
@@ -2092,20 +2109,20 @@ const Vn = (e, t, n = !0) => {
2092
2109
  return o;
2093
2110
  } while (o = o.parentElement);
2094
2111
  return null;
2095
- }, Bn = (e) => Vn(e, (t) => {
2112
+ }, $n = (e) => Vn(e, (t) => {
2096
2113
  const n = t.getAttribute("builder-id") || t.id;
2097
2114
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
2098
2115
  }), oe = ({
2099
2116
  event: e,
2100
2117
  target: t
2101
2118
  }) => {
2102
- const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, a = ne(o / n.width), r = ne(i / n.height);
2119
+ const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ne(o / n.width), a = ne(i / n.height);
2103
2120
  return {
2104
- x: a,
2105
- y: r
2121
+ x: r,
2122
+ y: a
2106
2123
  };
2107
- }, oo = (e) => {
2108
- const t = e.target, n = t && Bn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2124
+ }, co = (e) => {
2125
+ const t = e.target, n = t && $n(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2109
2126
  return {
2110
2127
  targetBuilderElement: o || void 0,
2111
2128
  metadata: {
@@ -2120,10 +2137,10 @@ const Vn = (e, t, n = !0) => {
2120
2137
  builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2121
2138
  }
2122
2139
  };
2123
- }, Wn = "0.12.5", ie = {};
2124
- function $n(e, t) {
2140
+ }, Wn = "0.12.7", ie = {};
2141
+ function On(e, t) {
2125
2142
  let n = ie[e];
2126
- if (n || (n = ie[e] = []), n.push(t), S()) {
2143
+ if (n || (n = ie[e] = []), n.push(t), k()) {
2127
2144
  const o = {
2128
2145
  type: "builder.register",
2129
2146
  data: {
@@ -2138,8 +2155,8 @@ function $n(e, t) {
2138
2155
  }
2139
2156
  }
2140
2157
  }
2141
- const io = () => {
2142
- $n("insertMenu", {
2158
+ const lo = () => {
2159
+ On("insertMenu", {
2143
2160
  name: "_default",
2144
2161
  default: !0,
2145
2162
  items: [{
@@ -2161,10 +2178,10 @@ const io = () => {
2161
2178
  }]
2162
2179
  });
2163
2180
  };
2164
- let ae = !1;
2165
- const ao = (e = {}) => {
2181
+ let re = !1;
2182
+ const uo = (e = {}) => {
2166
2183
  var t, n;
2167
- ae || (ae = !0, S() && ((t = window.parent) == null || t.postMessage({
2184
+ re || (re = !0, k() && ((t = window.parent) == null || t.postMessage({
2168
2185
  type: "builder.sdkInfo",
2169
2186
  data: {
2170
2187
  target: I,
@@ -2181,8 +2198,8 @@ const ao = (e = {}) => {
2181
2198
  options: e
2182
2199
  }
2183
2200
  }, "*"), window.addEventListener("message", (o) => {
2184
- var a, r;
2185
- if (!yn(e.trustedHosts, o))
2201
+ var r, a;
2202
+ if (!Sn(e.trustedHosts, o))
2186
2203
  return;
2187
2204
  const {
2188
2205
  data: i
@@ -2197,7 +2214,7 @@ const ao = (e = {}) => {
2197
2214
  } catch (h) {
2198
2215
  f = h;
2199
2216
  }
2200
- f ? (a = window.parent) == null || a.postMessage({
2217
+ f ? (r = window.parent) == null || r.postMessage({
2201
2218
  type: "builder.evaluateError",
2202
2219
  data: {
2203
2220
  id: m,
@@ -2212,7 +2229,7 @@ const ao = (e = {}) => {
2212
2229
  result: h
2213
2230
  }
2214
2231
  }, "*");
2215
- }).catch(console.error) : (r = window.parent) == null || r.postMessage({
2232
+ }).catch(console.error) : (a = window.parent) == null || a.postMessage({
2216
2233
  type: "builder.evaluateResult",
2217
2234
  data: {
2218
2235
  result: p,
@@ -2223,9 +2240,51 @@ const ao = (e = {}) => {
2223
2240
  }
2224
2241
  }
2225
2242
  })));
2226
- }, On = (e) => {
2227
- var a;
2228
- 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);
2243
+ };
2244
+ function ae(e, ...t) {
2245
+ const n = Object(e);
2246
+ for (let o = 1; o < arguments.length; o++) {
2247
+ const i = arguments[o];
2248
+ if (i != null)
2249
+ for (const r in i)
2250
+ Object.prototype.hasOwnProperty.call(i, r) && (n[r] = i[r]);
2251
+ }
2252
+ return n;
2253
+ }
2254
+ const Nn = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
2255
+ function Fn(e) {
2256
+ console.warn(`Cannot animate element: element with ID ${e} not found!`);
2257
+ }
2258
+ function Ln(e, t) {
2259
+ const n = Un(e), o = getComputedStyle(t), i = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, a = [i, r];
2260
+ for (const s of a)
2261
+ for (const c of n)
2262
+ c in s || (s[c] = o[c]);
2263
+ }
2264
+ function Un(e) {
2265
+ const t = [];
2266
+ for (const n of e.steps)
2267
+ for (const o in n.styles)
2268
+ t.indexOf(o) === -1 && t.push(o);
2269
+ return t;
2270
+ }
2271
+ function mo(e) {
2272
+ const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
2273
+ if (!t.length) {
2274
+ Fn(e.elementId || e.id || "");
2275
+ return;
2276
+ }
2277
+ Array.from(t).forEach((n) => {
2278
+ Ln(e, n), n.style.transition = "none", n.style.transitionDelay = "0", ae(n.style, e.steps[0].styles), setTimeout(() => {
2279
+ n.style.transition = `all ${e.duration}s ${Nn(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), ae(n.style, e.steps[1].styles), setTimeout(() => {
2280
+ n.style.transition = "", n.style.transitionDelay = "";
2281
+ }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
2282
+ });
2283
+ });
2284
+ }
2285
+ const _n = (e) => {
2286
+ var r;
2287
+ 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);
2229
2288
  let i = "";
2230
2289
  if (o && t && n && (i += `
2231
2290
  @font-face {
@@ -2235,36 +2294,36 @@ font-display: fallback;
2235
2294
  font-weight: 400;
2236
2295
  }
2237
2296
  `.trim()), e.files)
2238
- for (const r in e.files) {
2239
- if (!(String(Number(r)) === r))
2297
+ for (const a in e.files) {
2298
+ if (!(String(Number(a)) === a))
2240
2299
  continue;
2241
- const c = e.files[r];
2300
+ const c = e.files[a];
2242
2301
  c && c !== o && (i += `
2243
2302
  @font-face {
2244
2303
  font-family: "${t}";
2245
2304
  src: url('${c}') format('woff2');
2246
2305
  font-display: fallback;
2247
- font-weight: ${r};
2306
+ font-weight: ${a};
2248
2307
  }
2249
2308
  `.trim());
2250
2309
  }
2251
2310
  return i;
2252
- }, Nn = ({
2311
+ }, Dn = ({
2253
2312
  customFonts: e
2254
2313
  }) => {
2255
2314
  var t;
2256
- return ((t = e == null ? void 0 : e.map((n) => On(n))) == null ? void 0 : t.join(" ")) || "";
2257
- }, Fn = ({
2315
+ return ((t = e == null ? void 0 : e.map((n) => _n(n))) == null ? void 0 : t.join(" ")) || "";
2316
+ }, Mn = ({
2258
2317
  cssCode: e,
2259
2318
  contentId: t
2260
2319
  }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
2261
- function Ln(e) {
2320
+ function jn(e) {
2262
2321
  const t = `
2263
- ${Fn({
2322
+ ${Mn({
2264
2323
  cssCode: e.cssCode,
2265
2324
  contentId: e.contentId
2266
2325
  })}
2267
- ${Nn({
2326
+ ${Dn({
2268
2327
  customFonts: e.customFonts
2269
2328
  })}
2270
2329
 
@@ -2287,14 +2346,14 @@ ${Nn({
2287
2346
  `.trim();
2288
2347
  return /* @__PURE__ */ l(O, { styles: t });
2289
2348
  }
2290
- const _n = ({
2349
+ const Hn = ({
2291
2350
  content: e,
2292
2351
  data: t,
2293
2352
  locale: n
2294
2353
  }) => {
2295
- var a, r, s;
2296
- const o = {}, i = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
2297
- return (s = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || s.forEach((c) => {
2354
+ var r, a, s;
2355
+ const o = {}, i = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.state) || {};
2356
+ return (s = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || s.forEach((c) => {
2298
2357
  c.name && c.defaultValue !== void 0 && (o[c.name] = c.defaultValue);
2299
2358
  }), {
2300
2359
  ...o,
@@ -2304,7 +2363,7 @@ const _n = ({
2304
2363
  locale: n
2305
2364
  } : {}
2306
2365
  };
2307
- }, Un = ({
2366
+ }, Kn = ({
2308
2367
  content: e,
2309
2368
  data: t
2310
2369
  }) => e ? {
@@ -2315,13 +2374,13 @@ const _n = ({
2315
2374
  },
2316
2375
  meta: e == null ? void 0 : e.meta
2317
2376
  } : void 0;
2318
- function re(e) {
2319
- var i, a, r, s, c, m, g, p, f;
2320
- const t = nn({
2377
+ function se(e) {
2378
+ var i, r, a, s, c, m, g, p, f;
2379
+ const t = on({
2321
2380
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2322
2381
  variationId: (i = e.content) == null ? void 0 : i.testVariationId,
2323
2382
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2324
- contentId: (a = e.content) == null ? void 0 : a.id
2383
+ contentId: (r = e.content) == null ? void 0 : r.id
2325
2384
  }), n = [
2326
2385
  ...X(),
2327
2386
  // While this `components` object is deprecated, we must maintain support for it.
@@ -2336,17 +2395,17 @@ function re(e) {
2336
2395
  ...h,
2337
2396
  [d.name]: {
2338
2397
  component: u,
2339
- ...U(d)
2398
+ ..._(d)
2340
2399
  }
2341
2400
  }),
2342
2401
  {}
2343
2402
  ), o = {
2344
- content: Un({
2403
+ content: Kn({
2345
2404
  content: e.content,
2346
2405
  data: e.data
2347
2406
  }),
2348
2407
  localState: void 0,
2349
- rootState: _n({
2408
+ rootState: Hn({
2350
2409
  content: e.content,
2351
2410
  data: e.data,
2352
2411
  locale: e.locale
@@ -2367,7 +2426,7 @@ function re(e) {
2367
2426
  ].reduce(
2368
2427
  (h, { component: u, ...d }) => ({
2369
2428
  ...h,
2370
- [d.name]: U(d)
2429
+ [d.name]: _(d)
2371
2430
  }),
2372
2431
  {}
2373
2432
  ),
@@ -2376,7 +2435,7 @@ function re(e) {
2376
2435
  BlocksWrapperProps: e.blocksWrapperProps || {}
2377
2436
  };
2378
2437
  return /* @__PURE__ */ R(
2379
- je,
2438
+ Ke,
2380
2439
  {
2381
2440
  content: e.content,
2382
2441
  data: e.data,
@@ -2394,11 +2453,11 @@ function re(e) {
2394
2453
  linkComponent: e.linkComponent,
2395
2454
  trustedHosts: e.trustedHosts,
2396
2455
  children: [
2397
- e.isSsrAbTest ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(D, { scriptStr: t }) }) : null,
2398
- /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
2399
- Ln,
2456
+ e.isSsrAbTest ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(D, { scriptStr: t }) }) : null,
2457
+ /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
2458
+ jn,
2400
2459
  {
2401
- contentId: (r = o.content) == null ? void 0 : r.id,
2460
+ contentId: (a = o.content) == null ? void 0 : a.id,
2402
2461
  cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
2403
2462
  customFonts: (g = (m = o.content) == null ? void 0 : m.data) == null ? void 0 : g.customFonts
2404
2463
  }
@@ -2416,22 +2475,22 @@ function re(e) {
2416
2475
  }
2417
2476
  );
2418
2477
  }
2419
- function Pe(e) {
2420
- var a, r;
2421
- const t = Xt({
2422
- canTrack: _(e.canTrack),
2478
+ function Be(e) {
2479
+ var r, a;
2480
+ const t = Zt({
2481
+ canTrack: U(e.canTrack),
2423
2482
  content: e.content
2424
2483
  }), n = function() {
2425
2484
  var c;
2426
- return tn(
2427
- V(e.content).map((m) => ({
2485
+ return nn(
2486
+ B(e.content).map((m) => ({
2428
2487
  id: m.testVariationId,
2429
2488
  testRatio: m.testRatio
2430
2489
  })),
2431
2490
  ((c = e.content) == null ? void 0 : c.id) || ""
2432
2491
  );
2433
2492
  }, o = function() {
2434
- return V(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
2493
+ return B(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
2435
2494
  }, i = function() {
2436
2495
  var c;
2437
2496
  return t ? {
@@ -2439,22 +2498,22 @@ function Pe(e) {
2439
2498
  testVariationId: (c = e.content) == null ? void 0 : c.id
2440
2499
  } : Vt({
2441
2500
  item: e.content,
2442
- canTrack: _(e.canTrack)
2501
+ canTrack: U(e.canTrack)
2443
2502
  });
2444
2503
  };
2445
- return /* @__PURE__ */ R(k, { children: [
2446
- !e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(D, { scriptStr: en() }) }) : null,
2447
- t ? /* @__PURE__ */ R(k, { children: [
2504
+ return /* @__PURE__ */ R(S, { children: [
2505
+ !e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(D, { scriptStr: tn() }) }) : null,
2506
+ t ? /* @__PURE__ */ R(S, { children: [
2448
2507
  /* @__PURE__ */ l(
2449
2508
  O,
2450
2509
  {
2451
- id: `variants-styles-${(a = e.content) == null ? void 0 : a.id}`,
2510
+ id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
2452
2511
  styles: o()
2453
2512
  }
2454
2513
  ),
2455
2514
  /* @__PURE__ */ l(D, { scriptStr: n() }),
2456
- (r = V(e.content)) == null ? void 0 : r.map((s) => /* @__PURE__ */ l(
2457
- re,
2515
+ (a = B(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
2516
+ se,
2458
2517
  {
2459
2518
  content: s,
2460
2519
  showContent: !1,
@@ -2480,7 +2539,7 @@ function Pe(e) {
2480
2539
  ))
2481
2540
  ] }) : null,
2482
2541
  /* @__PURE__ */ l(
2483
- re,
2542
+ se,
2484
2543
  {
2485
2544
  content: i(),
2486
2545
  showContent: !0,
@@ -2505,7 +2564,7 @@ function Pe(e) {
2505
2564
  )
2506
2565
  ] });
2507
2566
  }
2508
- const Dn = async ({
2567
+ const zn = async ({
2509
2568
  builderContextValue: e,
2510
2569
  symbol: t
2511
2570
  }) => {
@@ -2524,8 +2583,8 @@ const Dn = async ({
2524
2583
  x.error("Could not fetch symbol content: ", n);
2525
2584
  });
2526
2585
  };
2527
- async function Mn(e) {
2528
- var o, i, a, r, s;
2586
+ async function qn(e) {
2587
+ var o, i, r, a, s;
2529
2588
  const t = function() {
2530
2589
  var m, g;
2531
2590
  return [
@@ -2534,12 +2593,12 @@ async function Mn(e) {
2534
2593
  (m = e.symbol) != null && m.inline ? "builder-inline-symbol" : void 0,
2535
2594
  (g = e.symbol) != null && g.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2536
2595
  ].filter(Boolean).join(" ");
2537
- }, n = ((o = e.symbol) == null ? void 0 : o.content) || await Dn({
2596
+ }, n = ((o = e.symbol) == null ? void 0 : o.content) || await zn({
2538
2597
  symbol: e.symbol,
2539
2598
  builderContextValue: e.builderContext
2540
2599
  });
2541
2600
  return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
2542
- Pe,
2601
+ Be,
2543
2602
  {
2544
2603
  __isNestedRender: !0,
2545
2604
  apiVersion: e.builderContext.apiVersion,
@@ -2550,9 +2609,9 @@ async function Mn(e) {
2550
2609
  },
2551
2610
  customComponents: Object.values(e.builderComponents),
2552
2611
  data: {
2553
- ...(a = e.symbol) == null ? void 0 : a.data,
2612
+ ...(r = e.symbol) == null ? void 0 : r.data,
2554
2613
  ...e.builderContext.localState,
2555
- ...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
2614
+ ...(a = n == null ? void 0 : n.data) == null ? void 0 : a.state
2556
2615
  },
2557
2616
  model: (s = e.symbol) == null ? void 0 : s.model,
2558
2617
  content: n,
@@ -2560,19 +2619,19 @@ async function Mn(e) {
2560
2619
  }
2561
2620
  ) });
2562
2621
  }
2563
- const ro = F, so = Pe, se = {};
2564
- function co(e) {
2565
- if (S()) {
2566
- Object.assign(se, e);
2622
+ const fo = F, ho = Be, ce = {};
2623
+ function po(e) {
2624
+ if (k()) {
2625
+ Object.assign(ce, e);
2567
2626
  const t = {
2568
2627
  type: "builder.settingsChange",
2569
- data: se
2628
+ data: ce
2570
2629
  };
2571
2630
  parent.postMessage(t, "*");
2572
2631
  }
2573
2632
  }
2574
- const lo = async (e) => {
2575
- var o, i, a;
2633
+ const go = async (e) => {
2634
+ var o, i, r;
2576
2635
  const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
2577
2636
  ...e,
2578
2637
  apiKey: e.apiKey,
@@ -2583,7 +2642,7 @@ const lo = async (e) => {
2583
2642
  urlPath: t
2584
2643
  } : {}
2585
2644
  },
2586
- options: xe(e.searchParams || ((a = e.url) == null ? void 0 : a.searchParams) || e.options)
2645
+ options: we(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
2587
2646
  };
2588
2647
  return {
2589
2648
  apiKey: n.apiKey,
@@ -2592,42 +2651,43 @@ const lo = async (e) => {
2592
2651
  };
2593
2652
  };
2594
2653
  export {
2595
- we as A,
2654
+ bn as A,
2596
2655
  F as B,
2597
- Pe as C,
2598
- eo as D,
2599
- Zn as E,
2600
- xe as F,
2601
- no as G,
2602
- lo as H,
2603
- ro as R,
2604
- Mn as S,
2605
- zt as T,
2606
- An as _,
2607
- gt as a,
2608
- Yn as b,
2656
+ Be as C,
2657
+ Te as D,
2658
+ ro as E,
2659
+ io as F,
2660
+ we as G,
2661
+ so as H,
2662
+ go as I,
2663
+ fo as R,
2664
+ qn as S,
2665
+ qt as T,
2666
+ Bn as _,
2667
+ bt as a,
2668
+ eo as b,
2609
2669
  j as c,
2610
- Jn as d,
2611
- Qn as e,
2612
- S as f,
2670
+ to as d,
2671
+ no as e,
2672
+ k as f,
2613
2673
  M as g,
2614
- _ as h,
2615
- Gn as i,
2616
- to as j,
2617
- yn as k,
2674
+ U as h,
2675
+ Zn as i,
2676
+ ao as j,
2677
+ Sn as k,
2618
2678
  x as l,
2619
2679
  H as m,
2620
- oo as n,
2621
- $ as o,
2622
- Xn as p,
2680
+ co as n,
2681
+ W as o,
2682
+ oo as p,
2623
2683
  q,
2624
- io as r,
2625
- ao as s,
2626
- ln as t,
2627
- an as u,
2628
- so as v,
2629
- kt as w,
2630
- $n as x,
2631
- co as y,
2632
- gn as z
2684
+ lo as r,
2685
+ uo as s,
2686
+ mo as t,
2687
+ dn as u,
2688
+ an as v,
2689
+ ho as w,
2690
+ kt as x,
2691
+ On as y,
2692
+ po as z
2633
2693
  };