@builder.io/sdk-react 0.12.2 → 0.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/lib/browser/index.cjs +31 -33
  2. package/lib/browser/index.mjs +707 -650
  3. package/lib/browser/{server-entry-f978b3a5.js → server-entry-0e4f0637.js} +1 -2
  4. package/lib/browser/{server-entry-df9eba5d.cjs → server-entry-bcb725be.cjs} +1 -1
  5. package/lib/browser/server-entry.cjs +1 -1
  6. package/lib/browser/server-entry.mjs +1 -1
  7. package/lib/edge/index.cjs +41 -43
  8. package/lib/edge/index.mjs +1293 -1236
  9. package/lib/edge/{server-entry-f978b3a5.js → server-entry-0e4f0637.js} +1 -2
  10. package/lib/{node/server-entry-df9eba5d.cjs → edge/server-entry-bcb725be.cjs} +1 -1
  11. package/lib/edge/server-entry.cjs +1 -1
  12. package/lib/edge/server-entry.mjs +1 -1
  13. package/lib/node/index.cjs +10 -12
  14. package/lib/node/index.mjs +369 -312
  15. package/lib/node/{server-entry-46908b1b.js → server-entry-9aa733e8.js} +1 -2
  16. package/lib/{edge/server-entry-df9eba5d.cjs → node/server-entry-bcb725be.cjs} +1 -1
  17. package/lib/node/server-entry.cjs +1 -1
  18. package/lib/node/server-entry.mjs +1 -1
  19. package/package.json +1 -1
  20. package/types/blocks/button/button.types.d.ts +2 -1
  21. package/types/blocks/columns/columns.types.d.ts +3 -3
  22. package/types/blocks/symbol/symbol.types.d.ts +2 -2
  23. package/types/components/block/block.d.ts +1 -0
  24. package/types/components/block/components/block-wrapper.d.ts +1 -0
  25. package/types/components/block/components/component-ref/component-ref.helpers.d.ts +4 -1
  26. package/types/components/block/components/repeated-block.d.ts +3 -5
  27. package/types/components/blocks/blocks.types.d.ts +1 -0
  28. package/types/components/content-variants/content-variants.types.d.ts +6 -2
  29. package/types/constants/sdk-version.d.ts +1 -1
  30. package/types/functions/get-block-properties.d.ts +5 -1
  31. package/types/functions/get-class-prop-name.d.ts +1 -0
  32. package/types/functions/get-style.d.ts +12 -0
  33. package/types/functions/transform-block-properties.d.ts +7 -5
  34. package/types/functions/transform-style-property.d.ts +7 -0
  35. package/types/helpers/omit.d.ts +1 -0
  36. package/types/types/builder-block.d.ts +1 -0
  37. package/types/types/builder-props.d.ts +3 -0
@@ -1,34 +1,47 @@
1
1
  "use client";
2
- import { jsxs as B, Fragment as h, jsx as o } from "react/jsx-runtime";
3
- import { createContext as ve, useState as S, useContext as ce, createElement as pe, useRef as X, useEffect as E } from "react";
4
- import { i as V, j as $, k as $e, l as U, m as Z, n as G, T as L, r as Ne, o as D, p as le, a as Fe, c as _e, b as ke, q as Le, u as se, v as de, w as je } from "./server-entry-f978b3a5.js";
5
- import { _ as xn, h as yn, f as Sn, g as vn, e as pn, d as kn, s as Cn, t as wn } from "./server-entry-f978b3a5.js";
6
- function Me(e) {
7
- return /* @__PURE__ */ B(h, { children: [
8
- e.link ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(
9
- "a",
10
- {
11
- ...e.attributes,
12
- href: e.link,
13
- target: e.openLinkInNewTab ? "_blank" : void 0,
14
- role: "button",
15
- children: e.text
16
- }
17
- ) }) : /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(
18
- "button",
19
- {
2
+ import { jsx as l, Fragment as h, jsxs as A } from "react/jsx-runtime";
3
+ import { createContext as pe, useState as v, useContext as se, useRef as ee, useEffect as E, createElement as Fe } from "react";
4
+ import { T as N, i as V, j as $, k as Le, l as D, m as te, n as X, r as _e, o as H, p as de, a as je, c as Ue, b as Ce, q as Me, u as ue, v as me, w as De } from "./server-entry-0e4f0637.js";
5
+ import { _ as vn, h as kn, f as pn, g as Cn, e as wn, d as In, s as Tn, t as Rn } from "./server-entry-0e4f0637.js";
6
+ const He = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Oe = (e) => typeof e == "string" && He.has(e.toLowerCase());
7
+ function ne(e) {
8
+ return /* @__PURE__ */ l(h, { children: Oe(e.TagName) ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(h, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
9
+ }
10
+ const _ = () => {
11
+ switch (N) {
12
+ case "react":
13
+ case "reactNative":
14
+ case "rsc":
15
+ return "className";
16
+ case "svelte":
17
+ case "vue":
18
+ case "solid":
19
+ case "qwik":
20
+ return "class";
21
+ }
22
+ };
23
+ function Ke(e) {
24
+ return /* @__PURE__ */ l(
25
+ ne,
26
+ {
27
+ TagName: e.link ? e.builderLinkComponent || "a" : "button",
28
+ attributes: {
20
29
  ...e.attributes,
21
- style: e.attributes.style,
22
- className: e.attributes.className + " button-fdf49de0",
23
- children: e.text
24
- }
25
- ) }),
26
- /* @__PURE__ */ o("style", { children: `.button-fdf49de0 {
27
- all: unset;
28
- }` })
29
- ] });
30
+ [_()]: `${e.link ? "" : "builder-button"} ${e.attributes[_()] || ""}`,
31
+ ...e.link ? {
32
+ href: e.link,
33
+ target: e.openLinkInNewTab ? "_blank" : void 0,
34
+ role: "link"
35
+ } : {
36
+ role: "button"
37
+ }
38
+ },
39
+ actionAttributes: {},
40
+ children: e.text
41
+ }
42
+ );
30
43
  }
31
- const ee = ve({
44
+ const ie = pe({
32
45
  content: null,
33
46
  context: {},
34
47
  localState: void 0,
@@ -41,8 +54,8 @@ const ee = ve({
41
54
  inheritedStyles: {},
42
55
  BlocksWrapper: "div",
43
56
  BlocksWrapperProps: {}
44
- }), Ce = ve({ registeredComponents: {} });
45
- function Ue(e) {
57
+ }), we = pe({ registeredComponents: {} });
58
+ function ze(e) {
46
59
  var t;
47
60
  return {
48
61
  ...(t = e.component) == null ? void 0 : t.options,
@@ -53,7 +66,7 @@ function Ue(e) {
53
66
  builderBlock: e
54
67
  };
55
68
  }
56
- const De = ({
69
+ const qe = ({
57
70
  builder: e,
58
71
  context: t,
59
72
  event: n,
@@ -65,83 +78,83 @@ const De = ({
65
78
  builder: e,
66
79
  context: t,
67
80
  event: n
68
- }), He = () => ({
81
+ }), Ye = () => ({
69
82
  isEditing: V(),
70
83
  isBrowser: $(),
71
84
  isServer: !$(),
72
- getUserAttributes: () => $e()
73
- }), Oe = (e, {
85
+ getUserAttributes: () => Le()
86
+ }), Qe = (e, {
74
87
  isExpression: t = !0
75
- }) => /* 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, ue = ({
88
+ }) => /* 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, fe = ({
76
89
  code: e,
77
90
  builder: t,
78
91
  context: n,
79
92
  event: i,
80
93
  localState: a,
81
- rootSetState: c,
82
- rootState: r
94
+ rootSetState: r,
95
+ rootState: o
83
96
  }) => {
84
- const l = De({
97
+ const c = qe({
85
98
  builder: t,
86
99
  context: n,
87
100
  event: i,
88
- state: Ke(r, a, c)
101
+ state: Ge(o, a, r)
89
102
  });
90
- return new Function(...l.map(([s]) => s), e)(...l.map(([, s]) => s));
103
+ return new Function(...c.map(([s]) => s), e)(...c.map(([, s]) => s));
91
104
  };
92
- function Ke(e, t, n) {
105
+ function Ge(e, t, n) {
93
106
  if (e === t)
94
107
  throw new Error("rootState === localState");
95
108
  return new Proxy(e, {
96
109
  get: (i, a) => t && a in t ? t[a] : e[a],
97
- set: (i, a, c) => {
110
+ set: (i, a, r) => {
98
111
  if (t && a in t)
99
112
  throw new Error("Writing to local state is not allowed as it is read-only.");
100
- return e[a] = c, n == null || n(e), !0;
113
+ return e[a] = r, n == null || n(e), !0;
101
114
  }
102
115
  });
103
116
  }
104
- const ze = (e) => ($(), ue(e));
105
- function _({
117
+ const Je = (e) => ($(), fe(e));
118
+ function j({
106
119
  code: e,
107
120
  context: t,
108
121
  localState: n,
109
122
  rootState: i,
110
123
  rootSetState: a,
111
- event: c,
112
- isExpression: r = !0
124
+ event: r,
125
+ isExpression: o = !0
113
126
  }) {
114
127
  if (e === "") {
115
- U.warn("Skipping evaluation of empty code block.");
128
+ D.warn("Skipping evaluation of empty code block.");
116
129
  return;
117
130
  }
118
- const l = {
119
- code: Oe(e, {
120
- isExpression: r
131
+ const c = {
132
+ code: Qe(e, {
133
+ isExpression: o
121
134
  }),
122
- builder: He(),
135
+ builder: Ye(),
123
136
  context: t,
124
- event: c,
137
+ event: r,
125
138
  rootSetState: a,
126
139
  rootState: i,
127
140
  localState: n
128
141
  };
129
142
  try {
130
- return ze(l);
143
+ return Je(c);
131
144
  } catch (s) {
132
- U.error("Failed code evaluation: " + s.message, {
145
+ D.error("Failed code evaluation: " + s.message, {
133
146
  code: e
134
147
  });
135
148
  return;
136
149
  }
137
150
  }
138
- const qe = (e, t, n) => {
151
+ const Xe = (e, t, n) => {
139
152
  if (Object(e) !== e)
140
153
  return e;
141
154
  const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
142
- return i.slice(0, -1).reduce((a, c, r) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(i[r + 1])) >> 0 === +i[r + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
155
+ return i.slice(0, -1).reduce((a, r, o) => Object(a[r]) === a[r] ? a[r] : a[r] = Math.abs(Number(i[o + 1])) >> 0 === +i[o + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
143
156
  };
144
- const Ye = ({
157
+ const Ze = ({
145
158
  block: e,
146
159
  context: t,
147
160
  localState: n,
@@ -150,58 +163,58 @@ const Ye = ({
150
163
  }) => {
151
164
  if (!e.bindings)
152
165
  return e;
153
- const c = Z(e), r = {
154
- ...c,
166
+ const r = te(e), o = {
167
+ ...r,
155
168
  properties: {
156
- ...c.properties
169
+ ...r.properties
157
170
  },
158
171
  actions: {
159
- ...c.actions
172
+ ...r.actions
160
173
  }
161
174
  };
162
- for (const l in e.bindings) {
163
- const s = e.bindings[l], d = _({
175
+ for (const c in e.bindings) {
176
+ const s = e.bindings[c], d = j({
164
177
  code: s,
165
178
  localState: n,
166
179
  rootState: i,
167
180
  rootSetState: a,
168
181
  context: t
169
182
  });
170
- qe(r, l, d);
183
+ Xe(o, c, d);
171
184
  }
172
- return r;
185
+ return o;
173
186
  };
174
- function H({
187
+ function O({
175
188
  block: e,
176
189
  context: t,
177
190
  shouldEvaluateBindings: n,
178
191
  localState: i,
179
192
  rootState: a,
180
- rootSetState: c
193
+ rootSetState: r
181
194
  }) {
182
- const r = e;
183
- return n ? Ye({
184
- block: r,
195
+ const o = e;
196
+ return n ? Ze({
197
+ block: o,
185
198
  localState: i,
186
199
  rootState: a,
187
- rootSetState: c,
200
+ rootSetState: r,
188
201
  context: t
189
- }) : r;
202
+ }) : o;
190
203
  }
191
- const Qe = ({
204
+ const et = ({
192
205
  block: e,
193
206
  context: t,
194
207
  registeredComponents: n
195
208
  }) => {
196
- var c;
197
- const i = (c = H({
209
+ var r;
210
+ const i = (r = O({
198
211
  block: e,
199
212
  localState: t.localState,
200
213
  rootState: t.rootState,
201
214
  rootSetState: t.rootSetState,
202
215
  context: t.context,
203
216
  shouldEvaluateBindings: !1
204
- }).component) == null ? void 0 : c.name;
217
+ }).component) == null ? void 0 : r.name;
205
218
  if (!i)
206
219
  return null;
207
220
  const a = n[i];
@@ -210,7 +223,7 @@ const Qe = ({
210
223
  console.warn(`
211
224
  Could not find a registered component named "${i}".
212
225
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
213
- }, Ge = ({
226
+ }, tt = ({
214
227
  block: e,
215
228
  context: t
216
229
  }) => {
@@ -220,7 +233,7 @@ const Qe = ({
220
233
  } = e;
221
234
  if (!(n != null && n.collection))
222
235
  return;
223
- const a = _({
236
+ const a = j({
224
237
  code: n.collection,
225
238
  localState: t.localState,
226
239
  rootState: t.rootState,
@@ -229,7 +242,7 @@ const Qe = ({
229
242
  });
230
243
  if (!Array.isArray(a))
231
244
  return;
232
- const c = n.collection.split(".").pop(), r = n.itemName || (c ? c + "Item" : "item");
245
+ const r = n.collection.split(".").pop(), o = n.itemName || (r ? r + "Item" : "item");
233
246
  return a.map((s, d) => ({
234
247
  context: {
235
248
  ...t,
@@ -237,13 +250,13 @@ const Qe = ({
237
250
  ...t.localState,
238
251
  $index: d,
239
252
  $item: s,
240
- [r]: s,
241
- [`$${r}Index`]: d
253
+ [o]: s,
254
+ [`$${o}Index`]: d
242
255
  }
243
256
  },
244
257
  block: i
245
258
  }));
246
- }, we = {
259
+ }, Ie = {
247
260
  small: {
248
261
  min: 320,
249
262
  default: 321,
@@ -259,11 +272,11 @@ const Qe = ({
259
272
  default: 991,
260
273
  max: 1200
261
274
  }
262
- }, me = (e, t = we) => `@media (max-width: ${t[e].max}px)`, Ie = ({
275
+ }, he = (e, t = Ie) => `@media (max-width: ${t[e].max}px)`, Te = ({
263
276
  small: e,
264
277
  medium: t
265
278
  }) => {
266
- const n = Z(we);
279
+ const n = te(Ie);
267
280
  if (!e || !t)
268
281
  return n;
269
282
  const i = Math.floor(e / 2);
@@ -278,35 +291,35 @@ const Qe = ({
278
291
  min: a,
279
292
  default: a + 1
280
293
  };
281
- const c = n.medium.max + 1;
294
+ const r = n.medium.max + 1;
282
295
  return n.large = {
283
296
  max: 2e3,
284
297
  // TODO: decide upper limit
285
- min: c,
286
- default: c + 1
298
+ min: r,
299
+ default: r + 1
287
300
  }, n;
288
- }, Je = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Te = (e) => Object.entries(e).map(([n, i]) => {
301
+ }, nt = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Re = (e) => Object.entries(e).map(([n, i]) => {
289
302
  if (typeof i == "string")
290
- return `${Je(n)}: ${i};`;
291
- }).filter(G), Xe = (e) => Te(e).join(`
292
- `), Y = ({
303
+ return `${nt(n)}: ${i};`;
304
+ }).filter(X), it = (e) => Re(e).join(`
305
+ `), G = ({
293
306
  mediaQuery: e,
294
307
  className: t,
295
308
  styles: n
296
309
  }) => {
297
310
  const i = `.${t} {
298
- ${Xe(n)}
311
+ ${it(n)}
299
312
  }`;
300
313
  return e ? `${e} {
301
314
  ${i}
302
315
  }` : i;
303
316
  };
304
- function O(e) {
305
- return /* @__PURE__ */ o("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
317
+ function K(e) {
318
+ return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
306
319
  }
307
- function Ze(e) {
320
+ function at(e) {
308
321
  function t() {
309
- const i = H({
322
+ const i = O({
310
323
  block: e.block,
311
324
  localState: e.context.localState,
312
325
  rootState: e.context.rootState,
@@ -314,48 +327,48 @@ function Ze(e) {
314
327
  context: e.context.context,
315
328
  shouldEvaluateBindings: !0
316
329
  });
317
- return G(i.hide) ? !i.hide : G(i.show) ? i.show : !0;
330
+ return X(i.hide) ? !i.hide : X(i.show) ? i.show : !0;
318
331
  }
319
332
  function n() {
320
- var k;
321
- const i = H({
333
+ var S;
334
+ const i = O({
322
335
  block: e.block,
323
336
  localState: e.context.localState,
324
337
  rootState: e.context.rootState,
325
338
  rootSetState: e.context.rootSetState,
326
339
  context: e.context.context,
327
340
  shouldEvaluateBindings: !0
328
- }), a = i.responsiveStyles, c = e.context.content, r = Ie(
329
- ((k = c == null ? void 0 : c.meta) == null ? void 0 : k.breakpoints) || {}
330
- ), l = a == null ? void 0 : a.large, s = a == null ? void 0 : a.medium, d = a == null ? void 0 : a.small, m = i.id;
341
+ }), a = i.responsiveStyles, r = e.context.content, o = Te(
342
+ ((S = r == null ? void 0 : r.meta) == null ? void 0 : S.breakpoints) || {}
343
+ ), c = a == null ? void 0 : a.large, s = a == null ? void 0 : a.medium, d = a == null ? void 0 : a.small, m = i.id;
331
344
  if (!m)
332
345
  return "";
333
- const g = l ? Y({
346
+ const g = c ? G({
334
347
  className: m,
335
- styles: l
336
- }) : "", v = s ? Y({
348
+ styles: c
349
+ }) : "", k = s ? G({
337
350
  className: m,
338
351
  styles: s,
339
- mediaQuery: me(
352
+ mediaQuery: he(
340
353
  "medium",
341
- r
354
+ o
342
355
  )
343
- }) : "", y = d ? Y({
356
+ }) : "", x = d ? G({
344
357
  className: m,
345
358
  styles: d,
346
- mediaQuery: me(
359
+ mediaQuery: he(
347
360
  "small",
348
- r
361
+ o
349
362
  )
350
363
  }) : "";
351
- return [g, v, y].join(" ");
364
+ return [g, k, x].join(" ");
352
365
  }
353
- return /* @__PURE__ */ o(h, { children: n() && t() ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(O, { styles: n() }) }) : null });
366
+ return /* @__PURE__ */ l(h, { children: n() && t() ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(K, { styles: n() }) }) : null });
354
367
  }
355
- function et(e) {
368
+ function ot(e) {
356
369
  return e.charAt(0).toUpperCase() + e.slice(1);
357
370
  }
358
- const tt = (e) => `on${et(e)}`, nt = (e, t) => (n) => _({
371
+ const rt = (e) => `on${ot(e)}`, lt = (e, t) => (n) => j({
359
372
  code: e,
360
373
  context: t.context,
361
374
  localState: t.localState,
@@ -364,80 +377,92 @@ const tt = (e) => `on${et(e)}`, nt = (e, t) => (n) => _({
364
377
  event: n,
365
378
  isExpression: !1
366
379
  });
367
- function Re(e) {
380
+ function Ee(e) {
368
381
  var i;
369
382
  const t = {}, n = (i = e.block.actions) != null ? i : {};
370
383
  for (const a in n) {
371
384
  if (!n.hasOwnProperty(a))
372
385
  continue;
373
- const c = n[a];
374
- let r = tt(a);
386
+ const r = n[a];
387
+ let o = rt(a);
375
388
  if (e.stripPrefix)
376
- switch (L) {
389
+ switch (N) {
377
390
  case "vue":
378
- r = r.replace("v-on:", "");
391
+ o = o.replace("v-on:", "");
379
392
  break;
380
393
  case "svelte":
381
- r = r.replace("on:", "");
394
+ o = o.replace("on:", "");
382
395
  break;
383
396
  }
384
- t[r] = nt(c, e);
397
+ t[o] = lt(r, e);
385
398
  }
386
399
  return t;
387
400
  }
388
- function it({
401
+ function ct({
402
+ style: e
403
+ }) {
404
+ return e;
405
+ }
406
+ const st = ({
407
+ block: e,
408
+ context: t
409
+ }) => Pe(ct({
410
+ style: e.style || {},
411
+ context: t,
412
+ block: e
413
+ }));
414
+ function Pe(e) {
415
+ switch (N) {
416
+ case "svelte":
417
+ case "vue":
418
+ case "solid":
419
+ return Re(e).join(" ");
420
+ case "qwik":
421
+ case "reactNative":
422
+ case "react":
423
+ case "rsc":
424
+ return e;
425
+ }
426
+ }
427
+ function dt({
389
428
  properties: e
390
429
  }) {
391
- return e.className = e.class, delete e.class, e;
430
+ return e;
392
431
  }
393
- const at = (e) => ({
432
+ const ut = (e) => ({
394
433
  href: e.href
395
434
  });
396
- function te({
435
+ function ae({
397
436
  block: e,
398
437
  context: t
399
438
  }) {
400
439
  var i;
401
440
  const n = {
402
- ...at(e),
441
+ ...ut(e),
403
442
  ...e.properties,
404
443
  "builder-id": e.id,
405
- style: e.style ? ot(e.style) : void 0,
406
- class: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
444
+ style: st({
445
+ block: e,
446
+ context: t
447
+ }),
448
+ [_()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
407
449
  };
408
- return it({
450
+ return dt({
409
451
  properties: n,
410
452
  context: t,
411
453
  block: e
412
454
  });
413
455
  }
414
- function ot(e) {
415
- switch (L) {
416
- case "svelte":
417
- case "vue":
418
- case "solid":
419
- return Te(e).join(" ");
420
- case "qwik":
421
- case "reactNative":
422
- case "react":
423
- case "rsc":
424
- return e;
425
- }
426
- }
427
- const rt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), ct = (e) => typeof e == "string" && rt.has(e.toLowerCase());
428
- function lt(e) {
429
- return /* @__PURE__ */ o(h, { children: ct(e.TagName) ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ o(h, { children: typeof e.TagName == "string" ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
430
- }
431
- function st(e) {
432
- return /* @__PURE__ */ o(
433
- lt,
456
+ function mt(e) {
457
+ return /* @__PURE__ */ l(
458
+ ne,
434
459
  {
435
460
  TagName: e.Wrapper,
436
- attributes: te({
461
+ attributes: ae({
437
462
  block: e.block,
438
463
  context: e.context
439
464
  }),
440
- actionAttributes: Re({
465
+ actionAttributes: Ee({
441
466
  block: e.block,
442
467
  rootState: e.context.rootState,
443
468
  rootSetState: e.context.rootSetState,
@@ -449,17 +474,17 @@ function st(e) {
449
474
  }
450
475
  );
451
476
  }
452
- function dt(e) {
453
- return /* @__PURE__ */ o(
477
+ function ft(e) {
478
+ return /* @__PURE__ */ l(
454
479
  e.Wrapper,
455
480
  {
456
481
  ...e.wrapperProps,
457
482
  attributes: e.includeBlockProps ? {
458
- ...te({
483
+ ...ae({
459
484
  block: e.block,
460
485
  context: e.context
461
486
  }),
462
- ...Re({
487
+ ...Ee({
463
488
  block: e.block,
464
489
  rootState: e.context.rootState,
465
490
  rootSetState: e.context.rootSetState,
@@ -471,94 +496,97 @@ function dt(e) {
471
496
  }
472
497
  );
473
498
  }
474
- const ut = ({
499
+ const ht = ({
475
500
  componentOptions: e,
476
501
  builderBlock: t,
477
502
  context: n,
478
503
  componentRef: i,
479
504
  includeBlockProps: a,
480
- isInteractive: c,
481
- contextValue: r
505
+ isInteractive: r,
506
+ contextValue: o
482
507
  }) => {
483
- const l = {
508
+ const c = {
484
509
  ...e,
485
510
  /**
486
511
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
487
512
  * component itself directly. Otherwise, they are provided to the wrapper element.
488
513
  */
489
514
  ...a ? {
490
- attributes: te({
515
+ attributes: ae({
491
516
  block: t,
492
- context: r
517
+ context: o
493
518
  })
494
519
  } : {}
495
520
  };
496
- return c ? {
521
+ return r ? {
497
522
  Wrapper: i,
498
523
  block: t,
499
524
  context: n,
500
525
  wrapperProps: e,
501
526
  includeBlockProps: a
502
- } : l;
527
+ } : c;
503
528
  };
504
- function fe(e) {
529
+ function ge(e) {
505
530
  var i;
506
- const [t, n] = S(
507
- () => e.isInteractive ? dt : e.componentRef
531
+ const [t, n] = v(
532
+ () => e.isInteractive ? ft : e.componentRef
508
533
  );
509
- return /* @__PURE__ */ o(h, { children: e.componentRef ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(
534
+ return /* @__PURE__ */ l(h, { children: e.componentRef ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
510
535
  t,
511
536
  {
512
- ...ut({
537
+ ...ht({
513
538
  componentOptions: e.componentOptions,
514
539
  builderBlock: e.builderBlock,
515
540
  context: e.context,
516
541
  componentRef: e.componentRef,
542
+ linkComponent: e.linkComponent,
517
543
  includeBlockProps: e.includeBlockProps,
518
544
  isInteractive: e.isInteractive,
519
545
  contextValue: e.context
520
546
  }),
521
- children: (i = e.blockChildren) == null ? void 0 : i.map((a) => /* @__PURE__ */ o(
522
- K,
547
+ children: (i = e.blockChildren) == null ? void 0 : i.map((a) => /* @__PURE__ */ l(
548
+ z,
523
549
  {
524
550
  block: a,
525
551
  context: e.context,
526
- registeredComponents: e.registeredComponents
552
+ registeredComponents: e.registeredComponents,
553
+ linkComponent: e.linkComponent
527
554
  },
528
555
  a.id
529
556
  ))
530
557
  }
531
558
  ) }) : null });
532
559
  }
533
- function mt(e) {
534
- const [t, n] = S(() => e.repeatContext);
535
- return /* @__PURE__ */ o(ee.Provider, { value: t, children: /* @__PURE__ */ o(
536
- K,
560
+ function gt(e) {
561
+ const [t, n] = v(() => e.repeatContext);
562
+ return /* @__PURE__ */ l(ie.Provider, { value: t, children: /* @__PURE__ */ l(
563
+ z,
537
564
  {
538
565
  block: e.block,
539
566
  context: t,
540
- registeredComponents: e.registeredComponents
567
+ registeredComponents: e.registeredComponents,
568
+ linkComponent: e.linkComponent
541
569
  }
542
570
  ) });
543
571
  }
544
- function K(e) {
545
- var m, g, v;
572
+ function z(e) {
573
+ var m, g, k;
546
574
  function t() {
547
- return Qe({
575
+ return et({
548
576
  block: e.block,
549
577
  context: e.context,
550
578
  registeredComponents: e.registeredComponents
551
579
  });
552
580
  }
553
581
  function n() {
554
- return Ge({
582
+ return tt({
555
583
  block: e.block,
556
584
  context: e.context
557
585
  });
558
586
  }
559
587
  function i() {
560
- var y;
561
- return (y = e.block.repeat) != null && y.collection ? e.block : H({
588
+ var x;
589
+ return (x = e.block.repeat) != null && x.collection ? e.block : O({
562
590
  block: e.block,
563
591
  localState: e.context.localState,
564
592
  rootState: e.context.rootState,
@@ -568,103 +596,113 @@ function K(e) {
568
596
  });
569
597
  }
570
598
  function a() {
571
- return e.block.tagName || "div";
599
+ var S;
600
+ return e.block.tagName === "a" || ((S = i().properties) == null ? void 0 : S.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
572
601
  }
573
- function c() {
602
+ function r() {
574
603
  var C, R;
575
604
  if ((C = e.block.repeat) != null && C.collection)
576
605
  return !!((R = n == null ? void 0 : n()) != null && R.length);
577
- const y = "hide" in i() ? i().hide : !1;
578
- return ("show" in i() ? i().show : !0) && !y;
606
+ const x = "hide" in i() ? i().hide : !1;
607
+ return ("show" in i() ? i().show : !0) && !x;
579
608
  }
580
- function r() {
581
- var k, C;
582
- return !((k = t == null ? void 0 : t()) != null && k.component) && !n() ? (C = i().children) != null ? C : [] : [];
609
+ function o() {
610
+ var S, C;
611
+ return !((S = t == null ? void 0 : t()) != null && S.component) && !n() ? (C = i().children) != null ? C : [] : [];
583
612
  }
584
- function l() {
585
- var y, k, C, R, P, w;
613
+ function c() {
614
+ var x, S, C, R, B, w, I, P, W;
586
615
  return {
587
- blockChildren: (y = i().children) != null ? y : [],
588
- componentRef: (k = t == null ? void 0 : t()) == null ? void 0 : k.component,
616
+ blockChildren: (x = i().children) != null ? x : [],
617
+ componentRef: (S = t == null ? void 0 : t()) == null ? void 0 : S.component,
589
618
  componentOptions: {
590
- ...Ue(i()),
619
+ ...ze(i()),
591
620
  builderContext: e.context,
592
- ...((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Symbol" || ((R = t == null ? void 0 : t()) == null ? void 0 : R.name) === "Columns" ? {
621
+ ...((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Core:Button" || ((R = t == null ? void 0 : t()) == null ? void 0 : R.name) === "Symbol" || ((B = t == null ? void 0 : t()) == null ? void 0 : B.name) === "Columns" ? {
622
+ builderLinkComponent: e.linkComponent
623
+ } : {},
624
+ ...((w = t == null ? void 0 : t()) == null ? void 0 : w.name) === "Symbol" || ((I = t == null ? void 0 : t()) == null ? void 0 : I.name) === "Columns" ? {
593
625
  builderComponents: e.registeredComponents
594
626
  } : {}
595
627
  },
596
628
  context: s,
629
+ linkComponent: e.linkComponent,
597
630
  registeredComponents: e.registeredComponents,
598
631
  builderBlock: i(),
599
632
  includeBlockProps: ((P = t == null ? void 0 : t()) == null ? void 0 : P.noWrap) === !0,
600
- isInteractive: !((w = t == null ? void 0 : t()) != null && w.isRSC)
633
+ isInteractive: !((W = t == null ? void 0 : t()) != null && W.isRSC)
601
634
  };
602
635
  }
603
- const [s, d] = S(() => e.context);
604
- return /* @__PURE__ */ o(h, { children: c() ? /* @__PURE__ */ B(h, { children: [
605
- /* @__PURE__ */ o(Ze, { block: e.block, context: e.context }),
606
- (m = t == null ? void 0 : t()) != null && m.noWrap ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(
607
- fe,
636
+ const [s, d] = v(() => e.context);
637
+ return /* @__PURE__ */ l(h, { children: r() ? /* @__PURE__ */ A(h, { children: [
638
+ /* @__PURE__ */ l(at, { block: e.block, context: e.context }),
639
+ (m = t == null ? void 0 : t()) != null && m.noWrap ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
640
+ ge,
608
641
  {
609
- componentRef: l().componentRef,
610
- componentOptions: l().componentOptions,
611
- blockChildren: l().blockChildren,
612
- context: l().context,
613
- registeredComponents: l().registeredComponents,
614
- builderBlock: l().builderBlock,
615
- includeBlockProps: l().includeBlockProps,
616
- isInteractive: l().isInteractive
642
+ componentRef: c().componentRef,
643
+ componentOptions: c().componentOptions,
644
+ blockChildren: c().blockChildren,
645
+ context: c().context,
646
+ registeredComponents: c().registeredComponents,
647
+ linkComponent: c().linkComponent,
648
+ builderBlock: c().builderBlock,
649
+ includeBlockProps: c().includeBlockProps,
650
+ isInteractive: c().isInteractive
617
651
  }
618
- ) }) : /* @__PURE__ */ o(h, { children: n() ? /* @__PURE__ */ o(h, { children: (v = n()) == null ? void 0 : v.map((y, k) => /* @__PURE__ */ o(
619
- mt,
652
+ ) }) : /* @__PURE__ */ l(h, { children: n() ? /* @__PURE__ */ l(h, { children: (k = n()) == null ? void 0 : k.map((x, S) => /* @__PURE__ */ l(
653
+ gt,
620
654
  {
621
- repeatContext: y.context,
622
- block: y.block,
623
- registeredComponents: e.registeredComponents
655
+ repeatContext: x.context,
656
+ block: x.block,
657
+ registeredComponents: e.registeredComponents,
658
+ linkComponent: e.linkComponent
624
659
  },
625
- k
626
- )) }) : /* @__PURE__ */ o(h, { children: /* @__PURE__ */ B(
627
- st,
660
+ S
661
+ )) }) : /* @__PURE__ */ l(h, { children: /* @__PURE__ */ A(
662
+ mt,
628
663
  {
629
664
  Wrapper: a(),
630
665
  block: i(),
631
666
  context: e.context,
667
+ linkComponent: e.linkComponent,
632
668
  children: [
633
- /* @__PURE__ */ o(
634
- fe,
669
+ /* @__PURE__ */ l(
670
+ ge,
635
671
  {
636
- componentRef: l().componentRef,
637
- componentOptions: l().componentOptions,
638
- blockChildren: l().blockChildren,
639
- context: l().context,
640
- registeredComponents: l().registeredComponents,
641
- builderBlock: l().builderBlock,
642
- includeBlockProps: l().includeBlockProps,
643
- isInteractive: l().isInteractive
672
+ componentRef: c().componentRef,
673
+ componentOptions: c().componentOptions,
674
+ blockChildren: c().blockChildren,
675
+ context: c().context,
676
+ registeredComponents: c().registeredComponents,
677
+ linkComponent: c().linkComponent,
678
+ builderBlock: c().builderBlock,
679
+ includeBlockProps: c().includeBlockProps,
680
+ isInteractive: c().isInteractive
644
681
  }
645
682
  ),
646
- (g = r()) == null ? void 0 : g.map((y) => /* @__PURE__ */ o(
647
- K,
683
+ (g = o()) == null ? void 0 : g.map((x) => /* @__PURE__ */ l(
684
+ z,
648
685
  {
649
- block: y,
686
+ block: x,
650
687
  context: s,
651
- registeredComponents: e.registeredComponents
688
+ registeredComponents: e.registeredComponents,
689
+ linkComponent: e.linkComponent
652
690
  },
653
- y.id
691
+ x.id
654
692
  ))
655
693
  ]
656
694
  }
657
695
  ) }) })
658
696
  ] }) : null });
659
697
  }
660
- function ft(e) {
698
+ function bt(e) {
661
699
  function t() {
662
700
  var a;
663
701
  return "builder-blocks" + ((a = e.blocks) != null && a.length ? "" : " no-blocks");
664
702
  }
665
703
  function n() {
666
- var a, c;
667
- V() && !((a = e.blocks) != null && a.length) && ((c = window.parent) == null || c.postMessage(
704
+ var a, r;
705
+ V() && !((a = e.blocks) != null && a.length) && ((r = window.parent) == null || r.postMessage(
668
706
  {
669
707
  type: "builder.clickEmptyBlocks",
670
708
  data: {
@@ -676,8 +714,8 @@ function ft(e) {
676
714
  ));
677
715
  }
678
716
  function i() {
679
- var a, c;
680
- V() && !((a = e.blocks) != null && a.length) && ((c = window.parent) == null || c.postMessage(
717
+ var a, r;
718
+ V() && !((a = e.blocks) != null && a.length) && ((r = window.parent) == null || r.postMessage(
681
719
  {
682
720
  type: "builder.hoverEmptyBlocks",
683
721
  data: {
@@ -688,8 +726,8 @@ function ft(e) {
688
726
  "*"
689
727
  ));
690
728
  }
691
- return /* @__PURE__ */ B(h, { children: [
692
- /* @__PURE__ */ o(
729
+ return /* @__PURE__ */ A(h, { children: [
730
+ /* @__PURE__ */ l(
693
731
  e.BlocksWrapper,
694
732
  {
695
733
  className: t() + " props-blocks-wrapper-4f2c12d8",
@@ -703,18 +741,18 @@ function ft(e) {
703
741
  children: e.children
704
742
  }
705
743
  ),
706
- /* @__PURE__ */ o("style", { children: `.props-blocks-wrapper-4f2c12d8 {
744
+ /* @__PURE__ */ l("style", { children: `.props-blocks-wrapper-4f2c12d8 {
707
745
  display: flex;
708
746
  flex-direction: column;
709
747
  align-items: stretch;
710
748
  }` })
711
749
  ] });
712
750
  }
713
- function z(e) {
714
- var i, a, c;
715
- const t = ce(ee), n = ce(Ce);
716
- return /* @__PURE__ */ o(
717
- ft,
751
+ function q(e) {
752
+ var i, a, r;
753
+ const t = se(ie), n = se(we);
754
+ return /* @__PURE__ */ l(
755
+ bt,
718
756
  {
719
757
  blocks: e.blocks,
720
758
  parent: e.parent,
@@ -722,49 +760,50 @@ function z(e) {
722
760
  styleProp: e.styleProp,
723
761
  BlocksWrapper: (i = e.context) == null ? void 0 : i.BlocksWrapper,
724
762
  BlocksWrapperProps: (a = e.context) == null ? void 0 : a.BlocksWrapperProps,
725
- children: e.blocks ? /* @__PURE__ */ o(h, { children: (c = e.blocks) == null ? void 0 : c.map((r) => /* @__PURE__ */ o(
726
- K,
763
+ children: e.blocks ? /* @__PURE__ */ l(h, { children: (r = e.blocks) == null ? void 0 : r.map((o) => /* @__PURE__ */ l(
764
+ z,
727
765
  {
728
- block: r,
766
+ block: o,
767
+ linkComponent: e.linkComponent,
729
768
  context: e.context || t,
730
769
  registeredComponents: e.registeredComponents || n.registeredComponents
731
770
  },
732
- r.id
771
+ o.id
733
772
  )) }) : null
734
773
  }
735
774
  );
736
775
  }
737
- function ht(e) {
738
- var P;
739
- const [t, n] = S(
776
+ function yt(e) {
777
+ var B;
778
+ const [t, n] = v(
740
779
  () => typeof e.space == "number" ? e.space || 0 : 20
741
- ), [i, a] = S(() => e.columns || []), [c, r] = S(
780
+ ), [i, a] = v(() => e.columns || []), [r, o] = v(
742
781
  () => e.stackColumnsAt || "tablet"
743
782
  );
744
- function l(w) {
783
+ function c(w) {
745
784
  var I;
746
785
  return ((I = i[w]) == null ? void 0 : I.width) || 100 / i.length;
747
786
  }
748
787
  function s(w) {
749
788
  const I = t * (i.length - 1) / i.length;
750
- return `calc(${l(w)}% - ${I}px)`;
789
+ return `calc(${c(w)}% - ${I}px)`;
751
790
  }
752
791
  function d({
753
792
  stackedStyle: w,
754
793
  desktopStyle: I
755
794
  }) {
756
- return c === "tablet" ? w : I;
795
+ return r === "tablet" ? w : I;
757
796
  }
758
797
  function m({
759
798
  stackedStyle: w,
760
799
  desktopStyle: I
761
800
  }) {
762
- return c === "never" ? I : w;
801
+ return r === "never" ? I : w;
763
802
  }
764
- const [g, v] = S(
803
+ const [g, k] = v(
765
804
  () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
766
805
  );
767
- function y() {
806
+ function x() {
768
807
  return {
769
808
  "--flex-dir": g,
770
809
  "--flex-dir-tablet": d({
@@ -773,33 +812,38 @@ function ht(e) {
773
812
  })
774
813
  };
775
814
  }
776
- function k(w) {
777
- const I = w === 0 ? 0 : t, W = s(w), A = `${I}px`, N = "100%", F = 0;
815
+ function S(w) {
816
+ const I = w === 0 ? 0 : t, P = s(w), W = `${I}px`, F = "100%", L = 0;
778
817
  return {
779
- width: W,
780
- ["marginLeft"]: A,
818
+ ...{
819
+ display: "flex",
820
+ flexDirection: "column",
821
+ alignItems: "stretch"
822
+ },
823
+ width: P,
824
+ ["marginLeft"]: W,
781
825
  "--column-width-mobile": m({
782
- stackedStyle: N,
783
- desktopStyle: W
826
+ stackedStyle: F,
827
+ desktopStyle: P
784
828
  }),
785
829
  "--column-margin-left-mobile": m({
786
- stackedStyle: F,
787
- desktopStyle: A
830
+ stackedStyle: L,
831
+ desktopStyle: W
788
832
  }),
789
833
  "--column-width-tablet": d({
790
- stackedStyle: N,
791
- desktopStyle: W
834
+ stackedStyle: F,
835
+ desktopStyle: P
792
836
  }),
793
837
  "--column-margin-left-tablet": d({
794
- stackedStyle: F,
795
- desktopStyle: A
838
+ stackedStyle: L,
839
+ desktopStyle: W
796
840
  })
797
841
  };
798
842
  }
799
843
  function C(w) {
800
- var W, A;
801
- return Ie(
802
- ((A = (W = e.builderContext.content) == null ? void 0 : W.meta) == null ? void 0 : A.breakpoints) || {}
844
+ var P, W;
845
+ return Te(
846
+ ((W = (P = e.builderContext.content) == null ? void 0 : P.meta) == null ? void 0 : W.breakpoints) || {}
803
847
  )[w].max;
804
848
  }
805
849
  function R() {
@@ -829,83 +873,87 @@ function ht(e) {
829
873
  },
830
874
  `;
831
875
  }
832
- return /* @__PURE__ */ B(h, { children: [
833
- /* @__PURE__ */ B(
876
+ return /* @__PURE__ */ A(h, { children: [
877
+ /* @__PURE__ */ A(
834
878
  "div",
835
879
  {
836
- className: `builder-columns ${e.builderBlock.id}-breakpoints div-3c01d6ec`,
837
- style: y(),
880
+ className: `builder-columns ${e.builderBlock.id}-breakpoints div-6f826264`,
881
+ style: x(),
838
882
  children: [
839
- /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(O, { styles: R() }) }),
840
- (P = e.columns) == null ? void 0 : P.map((w, I) => /* @__PURE__ */ pe(
841
- "div",
883
+ /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(K, { styles: R() }) }),
884
+ (B = e.columns) == null ? void 0 : B.map((w, I) => /* @__PURE__ */ l(
885
+ ne,
842
886
  {
843
- className: "builder-column div-3c01d6ec-2",
844
- style: k(I),
845
- key: I
887
+ TagName: w.link ? e.builderLinkComponent || "a" : "div",
888
+ actionAttributes: {},
889
+ attributes: {
890
+ ...w.link ? {
891
+ href: w.link
892
+ } : {},
893
+ [_()]: "builder-column",
894
+ style: Pe(S(I))
895
+ },
896
+ children: /* @__PURE__ */ l(
897
+ q,
898
+ {
899
+ path: `component.options.columns.${I}.blocks`,
900
+ parent: e.builderBlock.id,
901
+ styleProp: {
902
+ flexGrow: "1"
903
+ },
904
+ context: e.builderContext,
905
+ registeredComponents: e.builderComponents,
906
+ linkComponent: e.builderLinkComponent,
907
+ blocks: w.blocks
908
+ }
909
+ )
846
910
  },
847
- /* @__PURE__ */ o(
848
- z,
849
- {
850
- path: `component.options.columns.${I}.blocks`,
851
- parent: e.builderBlock.id,
852
- styleProp: {
853
- flexGrow: "1"
854
- },
855
- context: e.builderContext,
856
- registeredComponents: e.builderComponents,
857
- blocks: w.blocks
858
- }
859
- )
911
+ I
860
912
  ))
861
913
  ]
862
914
  }
863
915
  ),
864
- /* @__PURE__ */ o("style", { children: `.div-3c01d6ec {
916
+ /* @__PURE__ */ l("style", { children: `.div-6f826264 {
865
917
  display: flex;
866
918
  line-height: normal;
867
- }.div-3c01d6ec-2 {
868
- display: flex;
869
- flex-direction: column;
870
- align-items: stretch;
871
919
  }` })
872
920
  ] });
873
921
  }
874
- function gt(e) {
875
- return /* @__PURE__ */ o("span", { children: e.children });
922
+ function xt(e) {
923
+ return /* @__PURE__ */ l("span", { children: e.children });
876
924
  }
877
- function he(e) {
925
+ function be(e) {
878
926
  return e.replace(/http(s)?:/, "");
879
927
  }
880
- function bt(e = "", t, n) {
928
+ function St(e = "", t, n) {
881
929
  const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), a = e.indexOf("?") !== -1 ? "&" : "?";
882
930
  return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + a + t + "=" + encodeURIComponent(n);
883
931
  }
884
- function xt(e, t) {
932
+ function vt(e, t) {
885
933
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
886
934
  return e;
887
935
  if (t === "master")
888
- return he(e);
936
+ return be(e);
889
937
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
890
938
  if (n) {
891
- const i = e.split(n[0]), a = n[3], c = t.match("x") ? t : `${t}x`;
892
- return he(`${i[0]}_${c}${a}`);
939
+ const i = e.split(n[0]), a = n[3], r = t.match("x") ? t : `${t}x`;
940
+ return be(`${i[0]}_${r}${a}`);
893
941
  }
894
942
  return null;
895
943
  }
896
- function Q(e) {
944
+ function J(e) {
897
945
  if (!e)
898
946
  return e;
899
947
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
900
948
  if (e.match(/builder\.io/)) {
901
949
  let n = e;
902
950
  const i = Number(e.split("?width=")[1]);
903
- return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${bt(e, "width", a)} ${a}w`).concat([n]).join(", ");
951
+ return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${St(e, "width", a)} ${a}w`).concat([n]).join(", ");
904
952
  }
905
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [xt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
953
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [vt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
906
954
  }
907
- function yt(e) {
908
- var a, c, r, l;
955
+ function kt(e) {
956
+ var a, r, o, c;
909
957
  function t() {
910
958
  var m;
911
959
  const d = e.image || e.src;
@@ -915,10 +963,10 @@ function yt(e) {
915
963
  return e.srcset;
916
964
  if (e.srcset && ((m = e.image) != null && m.includes("builder.io/api/v1/image"))) {
917
965
  if (!e.srcset.includes(e.image.split("?")[0]))
918
- return console.debug("Removed given srcset"), Q(d);
966
+ return console.debug("Removed given srcset"), J(d);
919
967
  } else if (e.image && !e.srcset)
920
- return Q(d);
921
- return Q(d);
968
+ return J(d);
969
+ return J(d);
922
970
  }
923
971
  function n() {
924
972
  var s;
@@ -934,11 +982,11 @@ function yt(e) {
934
982
  };
935
983
  return e.aspectRatio ? s : void 0;
936
984
  }
937
- return /* @__PURE__ */ B(h, { children: [
938
- /* @__PURE__ */ B(h, { children: [
939
- /* @__PURE__ */ B("picture", { children: [
940
- n() ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o("source", { type: "image/webp", srcSet: n() }) }) : null,
941
- /* @__PURE__ */ o(
985
+ return /* @__PURE__ */ A(h, { children: [
986
+ /* @__PURE__ */ A(h, { children: [
987
+ /* @__PURE__ */ A("picture", { children: [
988
+ n() ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) }) : null,
989
+ /* @__PURE__ */ l(
942
990
  "img",
943
991
  {
944
992
  loading: "lazy",
@@ -956,7 +1004,7 @@ function yt(e) {
956
1004
  }
957
1005
  )
958
1006
  ] }),
959
- e.aspectRatio && !((c = (a = e.builderBlock) == null ? void 0 : a.children) != null && c.length && e.fitContent) ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(
1007
+ e.aspectRatio && !((r = (a = e.builderBlock) == null ? void 0 : a.children) != null && r.length && e.fitContent) ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
960
1008
  "div",
961
1009
  {
962
1010
  className: "builder-image-sizer div-40c70c9b",
@@ -965,10 +1013,10 @@ function yt(e) {
965
1013
  }
966
1014
  }
967
1015
  ) }) : null,
968
- (l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ o(h, { children: e.children }) : null,
969
- !e.fitContent && e.children ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o("div", { className: "div-40c70c9b-2", children: e.children }) }) : null
1016
+ (c = (o = e.builderBlock) == null ? void 0 : o.children) != null && c.length && e.fitContent ? /* @__PURE__ */ l(h, { children: e.children }) : null,
1017
+ !e.fitContent && e.children ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l("div", { className: "div-40c70c9b-2", children: e.children }) }) : null
970
1018
  ] }),
971
- /* @__PURE__ */ o("style", { children: `.img-40c70c9b {
1019
+ /* @__PURE__ */ l("style", { children: `.img-40c70c9b {
972
1020
  opacity: 1;
973
1021
  transition: opacity 0.2s ease-in-out;
974
1022
  }.div-40c70c9b {
@@ -987,8 +1035,8 @@ function yt(e) {
987
1035
  }` })
988
1036
  ] });
989
1037
  }
990
- function St(e) {
991
- return /* @__PURE__ */ o(
1038
+ function pt(e) {
1039
+ return /* @__PURE__ */ l(
992
1040
  "section",
993
1041
  {
994
1042
  ...e.attributes,
@@ -1008,7 +1056,7 @@ function St(e) {
1008
1056
  }
1009
1057
  );
1010
1058
  }
1011
- const vt = {
1059
+ const Ct = {
1012
1060
  name: "Core:Button",
1013
1061
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1014
1062
  defaultStyles: {
@@ -1041,7 +1089,7 @@ const vt = {
1041
1089
  }],
1042
1090
  static: !0,
1043
1091
  noWrap: !0
1044
- }, pt = {
1092
+ }, wt = {
1045
1093
  // TODO: ways to statically preprocess JSON for references, functions, etc
1046
1094
  name: "Columns",
1047
1095
  isRSC: !0,
@@ -1220,7 +1268,7 @@ const vt = {
1220
1268
  });
1221
1269
  }
1222
1270
  const n = e.get("columns");
1223
- Array.isArray(n) && n.find((a) => a.get("width")) && (n.find((c) => !c.get("width")) || n.reduce((l, s) => l + s.get("width"), 0) !== 100) && t();
1271
+ Array.isArray(n) && n.find((a) => a.get("width")) && (n.find((r) => !r.get("width")) || n.reduce((c, s) => c + s.get("width"), 0) !== 100) && t();
1224
1272
  }
1225
1273
  }, {
1226
1274
  name: "space",
@@ -1242,7 +1290,7 @@ const vt = {
1242
1290
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1243
1291
  advanced: !0
1244
1292
  }]
1245
- }, kt = {
1293
+ }, It = {
1246
1294
  name: "Custom Code",
1247
1295
  static: !0,
1248
1296
  requiredPermissions: ["editCode"],
@@ -1265,15 +1313,15 @@ const vt = {
1265
1313
  advanced: !0
1266
1314
  }]
1267
1315
  };
1268
- function Ct(e) {
1269
- const t = X(null), [n, i] = S(() => []), [a, c] = S(() => []);
1316
+ function Tt(e) {
1317
+ const t = ee(null), [n, i] = v(() => []), [a, r] = v(() => []);
1270
1318
  return E(() => {
1271
- var l;
1272
- if (!((l = t.current) != null && l.getElementsByTagName) || typeof window == "undefined")
1319
+ var c;
1320
+ if (!((c = t.current) != null && c.getElementsByTagName) || typeof window == "undefined")
1273
1321
  return;
1274
- const r = t.current.getElementsByTagName("script");
1275
- for (let s = 0; s < r.length; s++) {
1276
- const d = r[s];
1322
+ const o = t.current.getElementsByTagName("script");
1323
+ for (let s = 0; s < o.length; s++) {
1324
+ const d = o[s];
1277
1325
  if (d.src) {
1278
1326
  if (n.includes(d.src))
1279
1327
  continue;
@@ -1294,7 +1342,7 @@ function Ct(e) {
1294
1342
  }
1295
1343
  }
1296
1344
  }
1297
- }, []), /* @__PURE__ */ o(
1345
+ }, []), /* @__PURE__ */ l(
1298
1346
  "div",
1299
1347
  {
1300
1348
  ref: t,
@@ -1303,7 +1351,7 @@ function Ct(e) {
1303
1351
  }
1304
1352
  );
1305
1353
  }
1306
- const wt = {
1354
+ const Rt = {
1307
1355
  name: "Embed",
1308
1356
  static: !0,
1309
1357
  inputs: [{
@@ -1328,9 +1376,9 @@ const wt = {
1328
1376
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1329
1377
  hideFromUI: !0
1330
1378
  }]
1331
- }, It = ["text/javascript", "application/javascript", "application/ecmascript"], Tt = (e) => It.includes(e.type);
1332
- function Rt(e) {
1333
- const t = X(null), [n, i] = S(() => []), [a, c] = S(() => []), [r, l] = S(() => !1);
1379
+ }, Et = ["text/javascript", "application/javascript", "application/ecmascript"], Pt = (e) => Et.includes(e.type);
1380
+ function Bt(e) {
1381
+ const t = ee(null), [n, i] = v(() => []), [a, r] = v(() => []), [o, c] = v(() => !1);
1334
1382
  function s() {
1335
1383
  if (!t.current || !t.current.getElementsByTagName)
1336
1384
  return;
@@ -1339,19 +1387,19 @@ function Rt(e) {
1339
1387
  const g = d[m];
1340
1388
  if (g.src && !n.includes(g.src)) {
1341
1389
  n.push(g.src);
1342
- const v = document.createElement("script");
1343
- v.async = !0, v.src = g.src, document.head.appendChild(v);
1344
- } else if (Tt(g) && !a.includes(g.innerText))
1390
+ const k = document.createElement("script");
1391
+ k.async = !0, k.src = g.src, document.head.appendChild(k);
1392
+ } else if (Pt(g) && !a.includes(g.innerText))
1345
1393
  try {
1346
1394
  a.push(g.innerText), new Function(g.innerText)();
1347
- } catch (v) {
1348
- console.warn("`Embed`: Error running script:", v);
1395
+ } catch (k) {
1396
+ console.warn("`Embed`: Error running script:", k);
1349
1397
  }
1350
1398
  }
1351
1399
  }
1352
1400
  return E(() => {
1353
- t.current && !r && (l(!0), s());
1354
- }, [t.current, r]), /* @__PURE__ */ o(
1401
+ t.current && !o && (c(!0), s());
1402
+ }, [t.current, o]), /* @__PURE__ */ l(
1355
1403
  "div",
1356
1404
  {
1357
1405
  className: "builder-embed",
@@ -1360,13 +1408,13 @@ function Rt(e) {
1360
1408
  }
1361
1409
  );
1362
1410
  }
1363
- const Et = {
1411
+ const Wt = {
1364
1412
  name: "Fragment",
1365
1413
  static: !0,
1366
1414
  hidden: !0,
1367
1415
  canHaveChildren: !0,
1368
1416
  noWrap: !0
1369
- }, Pt = {
1417
+ }, At = {
1370
1418
  name: "Image",
1371
1419
  static: !0,
1372
1420
  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",
@@ -1386,29 +1434,29 @@ const Et = {
1386
1434
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1387
1435
  onChange: (e) => {
1388
1436
  e.delete("srcset"), e.delete("noWebp");
1389
- function n(r, l = 6e4) {
1437
+ function n(o, c = 6e4) {
1390
1438
  return new Promise((s, d) => {
1391
1439
  const m = document.createElement("img");
1392
1440
  let g = !1;
1393
1441
  m.onload = () => {
1394
1442
  g = !0, s(m);
1395
- }, m.addEventListener("error", (v) => {
1396
- console.warn("Image load failed", v.error), d(v.error);
1397
- }), m.src = r, setTimeout(() => {
1443
+ }, m.addEventListener("error", (k) => {
1444
+ console.warn("Image load failed", k.error), d(k.error);
1445
+ }), m.src = o, setTimeout(() => {
1398
1446
  g || d(new Error("Image load timed out"));
1399
- }, l);
1447
+ }, c);
1400
1448
  });
1401
1449
  }
1402
- function i(r) {
1403
- return Math.round(r * 1e3) / 1e3;
1450
+ function i(o) {
1451
+ return Math.round(o * 1e3) / 1e3;
1404
1452
  }
1405
- const a = e.get("image"), c = e.get("aspectRatio");
1406
- if (fetch(a).then((r) => r.blob()).then((r) => {
1407
- r.type.includes("svg") && e.set("noWebp", !0);
1408
- }), a && (!c || c === 0.7041))
1409
- return n(a).then((r) => {
1410
- const l = e.get("aspectRatio");
1411
- e.get("image") === a && (!l || l === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1453
+ const a = e.get("image"), r = e.get("aspectRatio");
1454
+ if (fetch(a).then((o) => o.blob()).then((o) => {
1455
+ o.type.includes("svg") && e.set("noWebp", !0);
1456
+ }), a && (!r || r === 0.7041))
1457
+ return n(a).then((o) => {
1458
+ const c = e.get("aspectRatio");
1459
+ e.get("image") === a && (!c || c === 0.7041) && o.width && o.height && (e.set("aspectRatio", i(o.height / o.width)), e.set("height", o.height), e.set("width", o.width));
1412
1460
  });
1413
1461
  }
1414
1462
  }, {
@@ -1466,7 +1514,7 @@ const Et = {
1466
1514
  advanced: !0,
1467
1515
  defaultValue: 0.7041
1468
1516
  }]
1469
- }, Bt = {
1517
+ }, Vt = {
1470
1518
  // friendlyName?
1471
1519
  name: "Raw:Img",
1472
1520
  hideFromInsertMenu: !0,
@@ -1481,8 +1529,8 @@ const Et = {
1481
1529
  noWrap: !0,
1482
1530
  static: !0
1483
1531
  };
1484
- function Wt(e) {
1485
- return /* @__PURE__ */ o(
1532
+ function $t(e) {
1533
+ return /* @__PURE__ */ l(
1486
1534
  "img",
1487
1535
  {
1488
1536
  style: {
@@ -1496,7 +1544,7 @@ function Wt(e) {
1496
1544
  V() && e.imgSrc || "default-key"
1497
1545
  );
1498
1546
  }
1499
- const At = {
1547
+ const Nt = {
1500
1548
  name: "Core:Section",
1501
1549
  static: !0,
1502
1550
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1535,7 +1583,7 @@ const At = {
1535
1583
  }
1536
1584
  }
1537
1585
  }]
1538
- }, Vt = {
1586
+ }, Ft = {
1539
1587
  name: "Slot",
1540
1588
  isRSC: !0,
1541
1589
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -1549,9 +1597,9 @@ const At = {
1549
1597
  defaultValue: "children"
1550
1598
  }]
1551
1599
  };
1552
- function $t(e) {
1600
+ function Lt(e) {
1553
1601
  var t, n, i;
1554
- return /* @__PURE__ */ o(
1602
+ return /* @__PURE__ */ l(
1555
1603
  "div",
1556
1604
  {
1557
1605
  style: {
@@ -1560,8 +1608,8 @@ function $t(e) {
1560
1608
  ...!((t = e.builderContext.context) != null && t.symbolId) && {
1561
1609
  "builder-slot": e.name
1562
1610
  },
1563
- children: /* @__PURE__ */ o(
1564
- z,
1611
+ children: /* @__PURE__ */ l(
1612
+ q,
1565
1613
  {
1566
1614
  parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
1567
1615
  path: `symbol.data.${e.name}`,
@@ -1572,7 +1620,7 @@ function $t(e) {
1572
1620
  }
1573
1621
  );
1574
1622
  }
1575
- const Nt = {
1623
+ const _t = {
1576
1624
  name: "Symbol",
1577
1625
  noWrap: !0,
1578
1626
  static: !0,
@@ -1605,7 +1653,7 @@ const Nt = {
1605
1653
  hideFromUI: !0,
1606
1654
  type: "boolean"
1607
1655
  }]
1608
- }, Ft = {
1656
+ }, jt = {
1609
1657
  name: "Text",
1610
1658
  static: !0,
1611
1659
  isRSC: !0,
@@ -1624,9 +1672,9 @@ const Nt = {
1624
1672
  textAlign: "center"
1625
1673
  }
1626
1674
  };
1627
- function _t(e) {
1675
+ function Ut(e) {
1628
1676
  var t;
1629
- return /* @__PURE__ */ o(
1677
+ return /* @__PURE__ */ l(
1630
1678
  "div",
1631
1679
  {
1632
1680
  className: "builder-text",
@@ -1637,7 +1685,7 @@ function _t(e) {
1637
1685
  }
1638
1686
  );
1639
1687
  }
1640
- const Lt = {
1688
+ const Mt = {
1641
1689
  name: "Video",
1642
1690
  canHaveChildren: !0,
1643
1691
  defaultStyles: {
@@ -1719,8 +1767,8 @@ const Lt = {
1719
1767
  advanced: !0
1720
1768
  }]
1721
1769
  };
1722
- function jt(e) {
1723
- var i, a, c, r, l, s, d;
1770
+ function Dt(e) {
1771
+ var i, a, r, o, c, s, d;
1724
1772
  function t() {
1725
1773
  return {
1726
1774
  ...e.autoPlay === !0 ? {
@@ -1745,14 +1793,14 @@ function jt(e) {
1745
1793
  ...t()
1746
1794
  };
1747
1795
  }
1748
- return /* @__PURE__ */ B(
1796
+ return /* @__PURE__ */ A(
1749
1797
  "div",
1750
1798
  {
1751
1799
  style: {
1752
1800
  position: "relative"
1753
1801
  },
1754
1802
  children: [
1755
- /* @__PURE__ */ o(
1803
+ /* @__PURE__ */ l(
1756
1804
  "video",
1757
1805
  {
1758
1806
  className: "builder-video",
@@ -1774,10 +1822,10 @@ function jt(e) {
1774
1822
  },
1775
1823
  src: e.video || "no-src",
1776
1824
  poster: e.posterImage,
1777
- children: e.lazyLoad ? null : /* @__PURE__ */ o("source", { type: "video/mp4", src: e.video })
1825
+ children: e.lazyLoad ? null : /* @__PURE__ */ l("source", { type: "video/mp4", src: e.video })
1778
1826
  }
1779
1827
  ),
1780
- e.aspectRatio && !(e.fitContent && ((c = (a = e.builderBlock) == null ? void 0 : a.children) != null && c.length)) ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(
1828
+ e.aspectRatio && !(e.fitContent && ((r = (a = e.builderBlock) == null ? void 0 : a.children) != null && r.length)) ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
1781
1829
  "div",
1782
1830
  {
1783
1831
  style: {
@@ -1788,7 +1836,7 @@ function jt(e) {
1788
1836
  }
1789
1837
  }
1790
1838
  ) }) : null,
1791
- (l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(
1839
+ (c = (o = e.builderBlock) == null ? void 0 : o.children) != null && c.length && e.fitContent ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
1792
1840
  "div",
1793
1841
  {
1794
1842
  style: {
@@ -1799,7 +1847,7 @@ function jt(e) {
1799
1847
  children: e.children
1800
1848
  }
1801
1849
  ) }) : null,
1802
- (d = (s = e.builderBlock) == null ? void 0 : s.children) != null && d.length && !e.fitContent ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(
1850
+ (d = (s = e.builderBlock) == null ? void 0 : s.children) != null && d.length && !e.fitContent ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
1803
1851
  "div",
1804
1852
  {
1805
1853
  style: {
@@ -1820,43 +1868,43 @@ function jt(e) {
1820
1868
  }
1821
1869
  );
1822
1870
  }
1823
- const ge = () => [{
1824
- component: Me,
1825
- ...vt
1826
- }, {
1827
- component: ht,
1828
- ...pt
1871
+ const ye = () => [{
1872
+ component: Ke,
1873
+ ...Ct
1829
1874
  }, {
1830
- component: Ct,
1831
- ...kt
1832
- }, {
1833
- component: Rt,
1875
+ component: yt,
1834
1876
  ...wt
1835
1877
  }, {
1836
- component: gt,
1837
- ...Et
1878
+ component: Tt,
1879
+ ...It
1838
1880
  }, {
1839
- component: yt,
1840
- ...Pt
1881
+ component: Bt,
1882
+ ...Rt
1841
1883
  }, {
1842
- component: Wt,
1843
- ...Bt
1884
+ component: xt,
1885
+ ...Wt
1844
1886
  }, {
1845
- component: St,
1887
+ component: kt,
1846
1888
  ...At
1847
1889
  }, {
1848
- component: sn,
1890
+ component: $t,
1891
+ ...Vt
1892
+ }, {
1893
+ component: pt,
1849
1894
  ...Nt
1850
1895
  }, {
1851
- component: _t,
1852
- ...Ft
1896
+ component: mn,
1897
+ ..._t
1853
1898
  }, {
1854
- component: jt,
1855
- ...Lt
1899
+ component: Ut,
1900
+ ...jt
1856
1901
  }, {
1857
- component: $t,
1858
- ...Vt
1859
- }], Mt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1902
+ component: Dt,
1903
+ ...Mt
1904
+ }, {
1905
+ component: Lt,
1906
+ ...Ft
1907
+ }], Ht = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1860
1908
  function getAndSetVariantId() {
1861
1909
  function setCookie(name, value, days) {
1862
1910
  let expires = '';
@@ -1912,7 +1960,7 @@ const ge = () => [{
1912
1960
  }).join('');
1913
1961
  styleEl.innerHTML = newStyleStr;
1914
1962
  }
1915
- }`, Ut = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1963
+ }`, Ot = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1916
1964
  if (!navigator.cookieEnabled) {
1917
1965
  return;
1918
1966
  }
@@ -1946,27 +1994,27 @@ const ge = () => [{
1946
1994
  thisScriptEl?.remove();
1947
1995
  }
1948
1996
  return;
1949
- }`, Ee = "builderIoAbTest", Pe = "builderIoRenderContent", M = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1997
+ }`, Be = "builderIoAbTest", We = "builderIoRenderContent", M = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1950
1998
  ...t,
1951
1999
  testVariationId: t.id,
1952
2000
  id: e == null ? void 0 : e.id
1953
- })), Dt = ({
2001
+ })), Kt = ({
1954
2002
  canTrack: e,
1955
2003
  content: t
1956
- }) => !(!(M(t).length > 0) || !e || $()), Ht = (e) => e === "react" || e === "reactNative", Be = Ht(L), Ot = () => `
1957
- window.${Ee} = ${Mt}
1958
- window.${Pe} = ${Ut}
1959
- `, Kt = (e, t) => `
1960
- window.${Ee}(
1961
- "${t}",${JSON.stringify(e)}, ${Be}
1962
- )`, zt = ({
2004
+ }) => !(!(M(t).length > 0) || !e || $()), zt = (e) => e === "react" || e === "reactNative", Ae = zt(N), qt = () => `
2005
+ window.${Be} = ${Ht}
2006
+ window.${We} = ${Ot}
2007
+ `, Yt = (e, t) => `
2008
+ window.${Be}(
2009
+ "${t}",${JSON.stringify(e)}, ${Ae}
2010
+ )`, Qt = ({
1963
2011
  contentId: e,
1964
2012
  variationId: t
1965
- }) => `window.${Pe}(
1966
- "${t}", "${e}", ${Be}
2013
+ }) => `window.${We}(
2014
+ "${t}", "${e}", ${Ae}
1967
2015
  )`;
1968
- function J(e) {
1969
- return /* @__PURE__ */ o(
2016
+ function Z(e) {
2017
+ return /* @__PURE__ */ l(
1970
2018
  "script",
1971
2019
  {
1972
2020
  dangerouslySetInnerHTML: { __html: e.scriptStr },
@@ -1974,15 +2022,15 @@ function J(e) {
1974
2022
  }
1975
2023
  );
1976
2024
  }
1977
- const qt = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
1978
- function We(e, t) {
2025
+ const Gt = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
2026
+ function Ve(e, t) {
1979
2027
  const n = new URL(t.origin), i = n.hostname;
1980
- return (e || qt).findIndex((a) => a.startsWith("*.") ? i.endsWith(a.slice(1)) : a === i) > -1;
2028
+ return (e || Gt).findIndex((a) => a.startsWith("*.") ? i.endsWith(a.slice(1)) : a === i) > -1;
1981
2029
  }
1982
- function be(e) {
2030
+ function xe(e) {
1983
2031
  return Math.round(e * 1e3) / 1e3;
1984
2032
  }
1985
- const Yt = (e, t, n = !0) => {
2033
+ const Jt = (e, t, n = !0) => {
1986
2034
  if (!(e instanceof HTMLElement))
1987
2035
  return null;
1988
2036
  let i = n ? e : e.parentElement;
@@ -1993,36 +2041,36 @@ const Yt = (e, t, n = !0) => {
1993
2041
  return i;
1994
2042
  } while (i = i.parentElement);
1995
2043
  return null;
1996
- }, Qt = (e) => Yt(e, (t) => {
2044
+ }, Xt = (e) => Jt(e, (t) => {
1997
2045
  const n = t.getAttribute("builder-id") || t.id;
1998
2046
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
1999
- }), xe = ({
2047
+ }), Se = ({
2000
2048
  event: e,
2001
2049
  target: t
2002
2050
  }) => {
2003
- const n = t.getBoundingClientRect(), i = e.clientX - n.left, a = e.clientY - n.top, c = be(i / n.width), r = be(a / n.height);
2051
+ const n = t.getBoundingClientRect(), i = e.clientX - n.left, a = e.clientY - n.top, r = xe(i / n.width), o = xe(a / n.height);
2004
2052
  return {
2005
- x: c,
2006
- y: r
2053
+ x: r,
2054
+ y: o
2007
2055
  };
2008
- }, Gt = (e) => {
2009
- const t = e.target, n = t && Qt(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2056
+ }, Zt = (e) => {
2057
+ const t = e.target, n = t && Xt(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2010
2058
  return {
2011
2059
  targetBuilderElement: i || void 0,
2012
2060
  metadata: {
2013
- targetOffset: t ? xe({
2061
+ targetOffset: t ? Se({
2014
2062
  event: e,
2015
2063
  target: t
2016
2064
  }) : void 0,
2017
- builderTargetOffset: n ? xe({
2065
+ builderTargetOffset: n ? Se({
2018
2066
  event: e,
2019
2067
  target: n
2020
2068
  }) : void 0,
2021
2069
  builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
2022
2070
  }
2023
2071
  };
2024
- }, Jt = "0.12.2", Xt = () => {
2025
- Ne("insertMenu", {
2072
+ }, en = "0.12.4", tn = () => {
2073
+ _e("insertMenu", {
2026
2074
  name: "_default",
2027
2075
  default: !0,
2028
2076
  items: [{
@@ -2044,14 +2092,14 @@ const Yt = (e, t, n = !0) => {
2044
2092
  }]
2045
2093
  });
2046
2094
  };
2047
- let ye = !1;
2048
- const Zt = (e = {}) => {
2095
+ let ve = !1;
2096
+ const nn = (e = {}) => {
2049
2097
  var t, n;
2050
- ye || (ye = !0, $() && ((t = window.parent) == null || t.postMessage({
2098
+ ve || (ve = !0, $() && ((t = window.parent) == null || t.postMessage({
2051
2099
  type: "builder.sdkInfo",
2052
2100
  data: {
2053
- target: L,
2054
- version: Jt,
2101
+ target: N,
2102
+ version: en,
2055
2103
  supportsPatchUpdates: !1,
2056
2104
  // Supports builder-model="..." attribute which is needed to
2057
2105
  // scope our '+ add block' button styling
@@ -2064,8 +2112,8 @@ const Zt = (e = {}) => {
2064
2112
  options: e
2065
2113
  }
2066
2114
  }, "*"), window.addEventListener("message", (i) => {
2067
- var c, r;
2068
- if (!We(e.trustedHosts, i))
2115
+ var r, o;
2116
+ if (!Ve(e.trustedHosts, i))
2069
2117
  return;
2070
2118
  const {
2071
2119
  data: a
@@ -2073,29 +2121,29 @@ const Zt = (e = {}) => {
2073
2121
  if (a != null && a.type)
2074
2122
  switch (a.type) {
2075
2123
  case "builder.evaluate": {
2076
- const l = a.data.text, s = a.data.arguments || [], d = a.data.id, m = new Function(l);
2077
- let g, v = null;
2124
+ const c = a.data.text, s = a.data.arguments || [], d = a.data.id, m = new Function(c);
2125
+ let g, k = null;
2078
2126
  try {
2079
2127
  g = m.apply(null, s);
2080
- } catch (y) {
2081
- v = y;
2128
+ } catch (x) {
2129
+ k = x;
2082
2130
  }
2083
- v ? (c = window.parent) == null || c.postMessage({
2131
+ k ? (r = window.parent) == null || r.postMessage({
2084
2132
  type: "builder.evaluateError",
2085
2133
  data: {
2086
2134
  id: d,
2087
- error: v.message
2135
+ error: k.message
2088
2136
  }
2089
- }, "*") : g && typeof g.then == "function" ? g.then((y) => {
2090
- var k;
2091
- (k = window.parent) == null || k.postMessage({
2137
+ }, "*") : g && typeof g.then == "function" ? g.then((x) => {
2138
+ var S;
2139
+ (S = window.parent) == null || S.postMessage({
2092
2140
  type: "builder.evaluateResult",
2093
2141
  data: {
2094
2142
  id: d,
2095
- result: y
2143
+ result: x
2096
2144
  }
2097
2145
  }, "*");
2098
- }).catch(console.error) : (r = window.parent) == null || r.postMessage({
2146
+ }).catch(console.error) : (o = window.parent) == null || o.postMessage({
2099
2147
  type: "builder.evaluateResult",
2100
2148
  data: {
2101
2149
  result: g,
@@ -2107,23 +2155,23 @@ const Zt = (e = {}) => {
2107
2155
  }
2108
2156
  })));
2109
2157
  };
2110
- function en(e) {
2111
- var F, q, ne, ie, ae, oe, re;
2112
- const t = X(null), [n, i] = S(() => 0);
2113
- S(() => !0);
2158
+ function an(e) {
2159
+ var L, Y, Q, oe, re, le, ce;
2160
+ const t = ee(null), [n, i] = v(() => 0);
2161
+ v(() => !0);
2114
2162
  function a(u) {
2115
- var b, x;
2163
+ var b, y;
2116
2164
  const f = {
2117
2165
  ...e.builderContextSignal.rootState,
2118
2166
  ...u
2119
2167
  };
2120
- e.builderContextSignal.rootSetState ? (x = (b = e.builderContextSignal).rootSetState) == null || x.call(b, f) : e.setBuilderContextSignal((p) => ({
2168
+ e.builderContextSignal.rootSetState ? (y = (b = e.builderContextSignal).rootSetState) == null || y.call(b, f) : e.setBuilderContextSignal((p) => ({
2121
2169
  ...p,
2122
2170
  rootState: f
2123
2171
  }));
2124
2172
  }
2125
- function c(u) {
2126
- var b, x, p, T, j;
2173
+ function r(u) {
2174
+ var b, y, p, T, U;
2127
2175
  const f = {
2128
2176
  ...e.builderContextSignal.content,
2129
2177
  ...u,
@@ -2132,34 +2180,34 @@ function en(e) {
2132
2180
  ...u == null ? void 0 : u.data
2133
2181
  },
2134
2182
  meta: {
2135
- ...(x = e.builderContextSignal.content) == null ? void 0 : x.meta,
2183
+ ...(y = e.builderContextSignal.content) == null ? void 0 : y.meta,
2136
2184
  ...u == null ? void 0 : u.meta,
2137
- breakpoints: ((p = u == null ? void 0 : u.meta) == null ? void 0 : p.breakpoints) || ((j = (T = e.builderContextSignal.content) == null ? void 0 : T.meta) == null ? void 0 : j.breakpoints)
2185
+ breakpoints: ((p = u == null ? void 0 : u.meta) == null ? void 0 : p.breakpoints) || ((U = (T = e.builderContextSignal.content) == null ? void 0 : T.meta) == null ? void 0 : U.breakpoints)
2138
2186
  }
2139
2187
  };
2140
- e.setBuilderContextSignal((Ve) => ({
2141
- ...Ve,
2188
+ e.setBuilderContextSignal((Ne) => ({
2189
+ ...Ne,
2142
2190
  content: f
2143
2191
  }));
2144
2192
  }
2145
- S(() => 0);
2146
- const [r, l] = S(
2193
+ v(() => 0);
2194
+ const [o, c] = v(
2147
2195
  () => !1
2148
- ), [s, d] = S(
2196
+ ), [s, d] = v(
2149
2197
  () => e.contentWrapper || "div"
2150
2198
  );
2151
2199
  function m(u) {
2152
2200
  var b;
2153
- if (!We(e.trustedHosts, u))
2201
+ if (!Ve(e.trustedHosts, u))
2154
2202
  return;
2155
2203
  const { data: f } = u;
2156
2204
  if (f)
2157
2205
  switch (f.type) {
2158
2206
  case "builder.configureSdk": {
2159
- const x = f.data, { breakpoints: p, contentId: T } = x;
2207
+ const y = f.data, { breakpoints: p, contentId: T } = y;
2160
2208
  if (!T || T !== ((b = e.builderContextSignal.content) == null ? void 0 : b.id))
2161
2209
  return;
2162
- p && c({
2210
+ p && r({
2163
2211
  meta: {
2164
2212
  breakpoints: p
2165
2213
  }
@@ -2167,8 +2215,8 @@ function en(e) {
2167
2215
  break;
2168
2216
  }
2169
2217
  case "builder.contentUpdate": {
2170
- const x = f.data, p = x.key || x.alias || x.entry || x.modelName, T = x.data;
2171
- p === e.model && (c(T), i(n + 1));
2218
+ const y = f.data, p = y.key || y.alias || y.entry || y.modelName, T = y.data;
2219
+ p === e.model && (r(T), i(n + 1));
2172
2220
  break;
2173
2221
  }
2174
2222
  }
@@ -2176,7 +2224,7 @@ function en(e) {
2176
2224
  function g() {
2177
2225
  var f, b;
2178
2226
  const u = (b = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : b.jsCode;
2179
- u && _({
2227
+ u && j({
2180
2228
  code: u,
2181
2229
  context: e.context || {},
2182
2230
  localState: void 0,
@@ -2184,27 +2232,27 @@ function en(e) {
2184
2232
  rootSetState: e.builderContextSignal.rootSetState
2185
2233
  });
2186
2234
  }
2187
- const [v, y] = S(() => ({})), [k, C] = S(() => !1);
2235
+ const [k, x] = v(() => ({})), [S, C] = v(() => !1);
2188
2236
  function R(u) {
2189
2237
  var f, b;
2190
2238
  if (e.builderContextSignal.content) {
2191
- const x = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, p = (b = e.builderContextSignal.content) == null ? void 0 : b.id;
2192
- le({
2239
+ const y = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, p = (b = e.builderContextSignal.content) == null ? void 0 : b.id;
2240
+ de({
2193
2241
  type: "click",
2194
- canTrack: D(e.canTrack),
2242
+ canTrack: H(e.canTrack),
2195
2243
  contentId: p,
2196
2244
  apiKey: e.apiKey,
2197
- variationId: x !== p ? x : void 0,
2198
- ...Gt(u),
2199
- unique: !k
2245
+ variationId: y !== p ? y : void 0,
2246
+ ...Zt(u),
2247
+ unique: !S
2200
2248
  });
2201
2249
  }
2202
- k || C(!0);
2250
+ S || C(!0);
2203
2251
  }
2204
- function P(u) {
2252
+ function B(u) {
2205
2253
  return u.replace(
2206
2254
  /{{([^}]+)}}/g,
2207
- (f, b) => _({
2255
+ (f, b) => j({
2208
2256
  code: b,
2209
2257
  context: e.context || {},
2210
2258
  localState: void 0,
@@ -2214,37 +2262,37 @@ function en(e) {
2214
2262
  );
2215
2263
  }
2216
2264
  function w({ url: u, key: f }) {
2217
- Le(u).then((b) => b.json()).then((b) => {
2265
+ Me(u).then((b) => b.json()).then((b) => {
2218
2266
  var p, T;
2219
- const x = {
2267
+ const y = {
2220
2268
  ...e.builderContextSignal.rootState,
2221
2269
  [f]: b
2222
2270
  };
2223
- (T = (p = e.builderContextSignal).rootSetState) == null || T.call(p, x), v[f] = !0;
2271
+ (T = (p = e.builderContextSignal).rootSetState) == null || T.call(p, y), k[f] = !0;
2224
2272
  }).catch((b) => {
2225
2273
  console.error("error fetching dynamic data", u, b);
2226
2274
  });
2227
2275
  }
2228
2276
  function I() {
2229
- var f, b, x;
2230
- const u = (x = (b = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : b.httpRequests) != null ? x : {};
2277
+ var f, b, y;
2278
+ const u = (y = (b = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : b.httpRequests) != null ? y : {};
2231
2279
  Object.entries(u).forEach(([p, T]) => {
2232
- if (T && (!v[p] || V())) {
2233
- const j = P(T);
2280
+ if (T && (!k[p] || V())) {
2281
+ const U = B(T);
2234
2282
  w({
2235
- url: j,
2283
+ url: U,
2236
2284
  key: p
2237
2285
  });
2238
2286
  }
2239
2287
  });
2240
2288
  }
2241
- function W() {
2289
+ function P() {
2242
2290
  V() && window.dispatchEvent(
2243
2291
  new CustomEvent(
2244
2292
  "builder:component:stateChange",
2245
2293
  {
2246
2294
  detail: {
2247
- state: Z(e.builderContextSignal.rootState),
2295
+ state: te(e.builderContextSignal.rootState),
2248
2296
  ref: {
2249
2297
  name: e.model
2250
2298
  }
@@ -2253,8 +2301,8 @@ function en(e) {
2253
2301
  )
2254
2302
  );
2255
2303
  }
2256
- function A(u) {
2257
- i(n + 1), window.addEventListener("message", m), Xt(), Zt({
2304
+ function W(u) {
2305
+ i(n + 1), window.addEventListener("message", m), tn(), nn({
2258
2306
  ...e.locale ? {
2259
2307
  locale: e.locale
2260
2308
  } : {},
@@ -2270,81 +2318,81 @@ function en(e) {
2270
2318
  }), Object.values(
2271
2319
  e.builderContextSignal.componentInfos
2272
2320
  ).forEach((f) => {
2273
- var x;
2274
- const b = _e(f);
2275
- (x = window.parent) == null || x.postMessage(b, "*");
2321
+ var y;
2322
+ const b = Ue(f);
2323
+ (y = window.parent) == null || y.postMessage(b, "*");
2276
2324
  }), window.addEventListener(
2277
2325
  "builder:component:stateChangeListenerActivated",
2278
- W
2326
+ P
2279
2327
  );
2280
2328
  }
2281
- function N(u) {
2282
- const f = new URL(location.href).searchParams, b = f.get("builder.preview"), x = f.get(
2329
+ function F(u) {
2330
+ const f = new URL(location.href).searchParams, b = f.get("builder.preview"), y = f.get(
2283
2331
  `builder.preview.${b}`
2284
2332
  ), p = f.get("apiKey") || f.get("builder.space");
2285
- b === e.model && p === e.apiKey && (!e.content || x === e.content.id) && ke({
2333
+ b === e.model && p === e.apiKey && (!e.content || y === e.content.id) && Ce({
2286
2334
  model: e.model,
2287
2335
  apiKey: e.apiKey,
2288
2336
  apiVersion: e.builderContextSignal.apiVersion
2289
2337
  }).then((T) => {
2290
- T && c(T);
2338
+ T && r(T);
2291
2339
  });
2292
2340
  }
2293
2341
  return E(() => {
2294
2342
  var u;
2295
2343
  return (u = t.current) == null || u.addEventListener(
2296
2344
  "initeditingbldr",
2297
- A
2345
+ W
2298
2346
  ), () => {
2299
2347
  var f;
2300
2348
  return (f = t.current) == null ? void 0 : f.removeEventListener(
2301
2349
  "initeditingbldr",
2302
- A
2350
+ W
2303
2351
  );
2304
2352
  };
2305
2353
  }, []), E(() => {
2306
2354
  var u;
2307
2355
  return (u = t.current) == null || u.addEventListener(
2308
2356
  "initpreviewingbldr",
2309
- N
2357
+ F
2310
2358
  ), () => {
2311
2359
  var f;
2312
2360
  return (f = t.current) == null ? void 0 : f.removeEventListener(
2313
2361
  "initpreviewingbldr",
2314
- N
2362
+ F
2315
2363
  );
2316
2364
  };
2317
2365
  }, []), E(() => {
2318
2366
  var u, f;
2319
2367
  if ($()) {
2320
- if (V() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && D(e.canTrack)) {
2321
- const x = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, p = (f = e.builderContextSignal.content) == null ? void 0 : f.id, T = e.apiKey;
2322
- le({
2368
+ if (V() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && H(e.canTrack)) {
2369
+ const y = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, p = (f = e.builderContextSignal.content) == null ? void 0 : f.id, T = e.apiKey;
2370
+ de({
2323
2371
  type: "impression",
2324
2372
  canTrack: !0,
2325
2373
  contentId: p,
2326
2374
  apiKey: T,
2327
- variationId: x !== p ? x : void 0
2375
+ variationId: y !== p ? y : void 0
2328
2376
  });
2329
2377
  }
2330
- Fe() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
2378
+ je() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
2331
2379
  }
2332
2380
  }, []), E(() => {
2333
- e.apiKey || U.error(
2381
+ e.apiKey || D.error(
2334
2382
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2335
- ), g(), I(), W();
2383
+ ), g(), I(), P();
2336
2384
  }, []), E(() => {
2337
- e.content && c(e.content);
2385
+ e.content && r(e.content);
2338
2386
  }, [e.content]), E(() => {
2339
- }, [r]), E(() => {
2387
+ }, [o]), E(() => {
2340
2388
  g();
2341
2389
  }, [
2342
- (q = (F = e.builderContextSignal.content) == null ? void 0 : F.data) == null ? void 0 : q.jsCode,
2390
+ (Y = (L = e.builderContextSignal.content) == null ? void 0 : L.data) == null ? void 0 : Y.jsCode,
2343
2391
  e.builderContextSignal.rootState
2344
2392
  ]), E(() => {
2345
2393
  I();
2346
- }, [(ie = (ne = e.builderContextSignal.content) == null ? void 0 : ne.data) == null ? void 0 : ie.httpRequests]), E(() => {
2347
- W();
2394
+ }, [(oe = (Q = e.builderContextSignal.content) == null ? void 0 : Q.data) == null ? void 0 : oe.httpRequests]), E(() => {
2395
+ P();
2348
2396
  }, [e.builderContextSignal.rootState]), E(() => {
2349
2397
  e.data && a(e.data);
2350
2398
  }, [e.data]), E(() => {
@@ -2354,29 +2402,29 @@ function en(e) {
2354
2402
  }, [e.locale]), E(() => () => {
2355
2403
  $() && (window.removeEventListener("message", m), window.removeEventListener(
2356
2404
  "builder:component:stateChangeListenerActivated",
2357
- W
2405
+ P
2358
2406
  ));
2359
- }, []), /* @__PURE__ */ o(ee.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ pe(
2407
+ }, []), /* @__PURE__ */ l(ie.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ Fe(
2360
2408
  s,
2361
2409
  {
2362
2410
  key: n,
2363
2411
  ref: t,
2364
2412
  onClick: (u) => R(u),
2365
- "builder-content-id": (ae = e.builderContextSignal.content) == null ? void 0 : ae.id,
2413
+ "builder-content-id": (re = e.builderContextSignal.content) == null ? void 0 : re.id,
2366
2414
  "builder-model": e.model,
2367
2415
  ...e.showContent ? {} : {
2368
2416
  hidden: !0,
2369
2417
  "aria-hidden": !0
2370
2418
  },
2371
2419
  ...e.contentWrapperProps,
2372
- className: `variant-${((oe = e.content) == null ? void 0 : oe.testVariationId) || ((re = e.content) == null ? void 0 : re.id)}`
2420
+ className: `variant-${((le = e.content) == null ? void 0 : le.testVariationId) || ((ce = e.content) == null ? void 0 : ce.id)}`
2373
2421
  },
2374
2422
  e.children
2375
2423
  ) }) : null });
2376
2424
  }
2377
- const tn = (e) => {
2378
- var c, r;
2379
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (r = e.fileUrl) != null ? r : (c = e == null ? void 0 : e.files) == null ? void 0 : c.regular;
2425
+ const on = (e) => {
2426
+ var r, o;
2427
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (o = e.fileUrl) != null ? o : (r = e == null ? void 0 : e.files) == null ? void 0 : r.regular;
2380
2428
  let a = "";
2381
2429
  if (i && t && n && (a += `
2382
2430
  @font-face {
@@ -2386,40 +2434,44 @@ font-display: fallback;
2386
2434
  font-weight: 400;
2387
2435
  }
2388
2436
  `.trim()), e.files)
2389
- for (const l in e.files) {
2390
- if (!(String(Number(l)) === l))
2437
+ for (const c in e.files) {
2438
+ if (!(String(Number(c)) === c))
2391
2439
  continue;
2392
- const d = e.files[l];
2440
+ const d = e.files[c];
2393
2441
  d && d !== i && (a += `
2394
2442
  @font-face {
2395
2443
  font-family: "${t}";
2396
2444
  src: url('${d}') format('woff2');
2397
2445
  font-display: fallback;
2398
- font-weight: ${l};
2446
+ font-weight: ${c};
2399
2447
  }
2400
2448
  `.trim());
2401
2449
  }
2402
2450
  return a;
2403
- }, nn = ({
2451
+ }, rn = ({
2404
2452
  customFonts: e
2405
2453
  }) => {
2406
2454
  var t;
2407
- return ((t = e == null ? void 0 : e.map((n) => tn(n))) == null ? void 0 : t.join(" ")) || "";
2408
- }, an = ({
2455
+ return ((t = e == null ? void 0 : e.map((n) => on(n))) == null ? void 0 : t.join(" ")) || "";
2456
+ }, ln = ({
2409
2457
  cssCode: e,
2410
2458
  contentId: t
2411
2459
  }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
2412
- function on(e) {
2413
- const [t, n] = S(
2460
+ function cn(e) {
2461
+ const [t, n] = v(
2414
2462
  () => `
2415
- ${an({
2463
+ ${ln({
2416
2464
  cssCode: e.cssCode,
2417
2465
  contentId: e.contentId
2418
2466
  })}
2419
- ${nn({
2467
+ ${rn({
2420
2468
  customFonts: e.customFonts
2421
2469
  })}
2422
2470
 
2471
+ .builder-button {
2472
+ all: unset;
2473
+ }
2474
+
2423
2475
  .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
2424
2476
  margin: 0;
2425
2477
  }
@@ -2434,16 +2486,16 @@ ${nn({
2434
2486
  }
2435
2487
  `.trim()
2436
2488
  );
2437
- return /* @__PURE__ */ o(O, { styles: t });
2489
+ return /* @__PURE__ */ l(K, { styles: t });
2438
2490
  }
2439
- const rn = ({
2491
+ const sn = ({
2440
2492
  content: e,
2441
2493
  data: t,
2442
2494
  locale: n
2443
2495
  }) => {
2444
- var c, r, l;
2445
- const i = {}, a = ((c = e == null ? void 0 : e.data) == null ? void 0 : c.state) || {};
2446
- return (l = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || l.forEach((s) => {
2496
+ var r, o, c;
2497
+ const i = {}, a = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.state) || {};
2498
+ return (c = (o = e == null ? void 0 : e.data) == null ? void 0 : o.inputs) == null || c.forEach((s) => {
2447
2499
  s.name && s.defaultValue !== void 0 && (i[s.name] = s.defaultValue);
2448
2500
  }), {
2449
2501
  ...i,
@@ -2453,7 +2505,7 @@ const rn = ({
2453
2505
  locale: n
2454
2506
  } : {}
2455
2507
  };
2456
- }, cn = ({
2508
+ }, dn = ({
2457
2509
  content: e,
2458
2510
  data: t
2459
2511
  }) => e ? {
@@ -2464,12 +2516,12 @@ const rn = ({
2464
2516
  },
2465
2517
  meta: e == null ? void 0 : e.meta
2466
2518
  } : void 0;
2467
- function Se(e) {
2468
- var s, d, m, g, v, y, k;
2469
- const [t, n] = S(
2519
+ function ke(e) {
2520
+ var s, d, m, g, k, x, S;
2521
+ const [t, n] = v(
2470
2522
  () => {
2471
2523
  var C, R;
2472
- return zt({
2524
+ return Qt({
2473
2525
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2474
2526
  variationId: (C = e.content) == null ? void 0 : C.testVariationId,
2475
2527
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
@@ -2478,38 +2530,38 @@ function Se(e) {
2478
2530
  }
2479
2531
  );
2480
2532
  function i(C) {
2481
- l((R) => ({
2533
+ c((R) => ({
2482
2534
  ...R,
2483
2535
  rootState: C
2484
2536
  }));
2485
2537
  }
2486
- const [a, c] = S(
2538
+ const [a, r] = v(
2487
2539
  () => [
2488
- ...ge(),
2540
+ ...ye(),
2489
2541
  // While this `components` object is deprecated, we must maintain support for it.
2490
2542
  // Since users are able to override our default components, we need to make sure that we do not break such
2491
2543
  // existing usage.
2492
2544
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2493
2545
  // which is the new standard way of providing custom components, and must therefore take precedence.
2494
- ...se,
2546
+ ...ue,
2495
2547
  ...e.customComponents || []
2496
2548
  ].reduce(
2497
- (C, { component: R, ...P }) => ({
2549
+ (C, { component: R, ...B }) => ({
2498
2550
  ...C,
2499
- [P.name]: {
2551
+ [B.name]: {
2500
2552
  component: R,
2501
- ...de(P)
2553
+ ...me(B)
2502
2554
  }
2503
2555
  }),
2504
2556
  {}
2505
2557
  )
2506
- ), [r, l] = S(() => ({
2507
- content: cn({
2558
+ ), [o, c] = v(() => ({
2559
+ content: dn({
2508
2560
  content: e.content,
2509
2561
  data: e.data
2510
2562
  }),
2511
2563
  localState: void 0,
2512
- rootState: rn({
2564
+ rootState: sn({
2513
2565
  content: e.content,
2514
2566
  data: e.data,
2515
2567
  locale: e.locale
@@ -2519,18 +2571,18 @@ function Se(e) {
2519
2571
  apiKey: e.apiKey,
2520
2572
  apiVersion: e.apiVersion,
2521
2573
  componentInfos: [
2522
- ...ge(),
2574
+ ...ye(),
2523
2575
  // While this `components` object is deprecated, we must maintain support for it.
2524
2576
  // Since users are able to override our default components, we need to make sure that we do not break such
2525
2577
  // existing usage.
2526
2578
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2527
2579
  // which is the new standard way of providing custom components, and must therefore take precedence.
2528
- ...se,
2580
+ ...ue,
2529
2581
  ...e.customComponents || []
2530
2582
  ].reduce(
2531
- (C, { component: R, ...P }) => ({
2583
+ (C, { component: R, ...B }) => ({
2532
2584
  ...C,
2533
- [P.name]: de(P)
2585
+ [B.name]: me(B)
2534
2586
  }),
2535
2587
  {}
2536
2588
  ),
@@ -2538,14 +2590,14 @@ function Se(e) {
2538
2590
  BlocksWrapper: e.blocksWrapper || "div",
2539
2591
  BlocksWrapperProps: e.blocksWrapperProps || {}
2540
2592
  }));
2541
- return /* @__PURE__ */ o(
2542
- Ce.Provider,
2593
+ return /* @__PURE__ */ l(
2594
+ we.Provider,
2543
2595
  {
2544
2596
  value: {
2545
2597
  registeredComponents: a
2546
2598
  },
2547
- children: /* @__PURE__ */ B(
2548
- en,
2599
+ children: /* @__PURE__ */ A(
2600
+ an,
2549
2601
  {
2550
2602
  content: e.content,
2551
2603
  data: e.data,
@@ -2557,27 +2609,29 @@ function Se(e) {
2557
2609
  includeRefs: e.includeRefs,
2558
2610
  enrich: e.enrich,
2559
2611
  showContent: e.showContent,
2560
- builderContextSignal: r,
2612
+ builderContextSignal: o,
2561
2613
  contentWrapper: e.contentWrapper,
2562
2614
  contentWrapperProps: e.contentWrapperProps,
2615
+ linkComponent: e.linkComponent,
2563
2616
  trustedHosts: e.trustedHosts,
2564
- setBuilderContextSignal: l,
2617
+ setBuilderContextSignal: c,
2565
2618
  children: [
2566
- e.isSsrAbTest ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(J, { scriptStr: t }) }) : null,
2567
- /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(
2568
- on,
2619
+ e.isSsrAbTest ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(Z, { scriptStr: t }) }) : null,
2620
+ /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
2621
+ cn,
2569
2622
  {
2570
- contentId: (s = r.content) == null ? void 0 : s.id,
2571
- cssCode: (m = (d = r.content) == null ? void 0 : d.data) == null ? void 0 : m.cssCode,
2572
- customFonts: (v = (g = r.content) == null ? void 0 : g.data) == null ? void 0 : v.customFonts
2623
+ contentId: (s = o.content) == null ? void 0 : s.id,
2624
+ cssCode: (m = (d = o.content) == null ? void 0 : d.data) == null ? void 0 : m.cssCode,
2625
+ customFonts: (k = (g = o.content) == null ? void 0 : g.data) == null ? void 0 : k.customFonts
2573
2626
  }
2574
2627
  ) }),
2575
- /* @__PURE__ */ o(
2576
- z,
2628
+ /* @__PURE__ */ l(
2629
+ q,
2577
2630
  {
2578
- blocks: (k = (y = r.content) == null ? void 0 : y.data) == null ? void 0 : k.blocks,
2579
- context: r,
2580
- registeredComponents: a
2631
+ blocks: (S = (x = o.content) == null ? void 0 : x.data) == null ? void 0 : S.blocks,
2632
+ context: o,
2633
+ registeredComponents: a,
2634
+ linkComponent: e.linkComponent
2581
2635
  }
2582
2636
  )
2583
2637
  ]
@@ -2586,17 +2640,17 @@ function Se(e) {
2586
2640
  }
2587
2641
  );
2588
2642
  }
2589
- function Ae(e) {
2590
- var r, l;
2591
- const [t, n] = S(
2592
- () => Dt({
2593
- canTrack: D(e.canTrack),
2643
+ function $e(e) {
2644
+ var o, c;
2645
+ const [t, n] = v(
2646
+ () => Kt({
2647
+ canTrack: H(e.canTrack),
2594
2648
  content: e.content
2595
2649
  })
2596
2650
  );
2597
2651
  function i() {
2598
2652
  var s;
2599
- return Kt(
2653
+ return Yt(
2600
2654
  M(e.content).map((d) => ({
2601
2655
  id: d.testVariationId,
2602
2656
  testRatio: d.testRatio
@@ -2607,30 +2661,30 @@ function Ae(e) {
2607
2661
  function a() {
2608
2662
  return M(e.content).map((s) => `.variant-${s.testVariationId} { display: none; } `).join("");
2609
2663
  }
2610
- function c() {
2664
+ function r() {
2611
2665
  var s;
2612
2666
  return t ? {
2613
2667
  ...e.content,
2614
2668
  testVariationId: (s = e.content) == null ? void 0 : s.id
2615
- } : je({
2669
+ } : De({
2616
2670
  item: e.content,
2617
- canTrack: D(e.canTrack)
2671
+ canTrack: H(e.canTrack)
2618
2672
  });
2619
2673
  }
2620
2674
  return E(() => {
2621
- }, []), /* @__PURE__ */ B(h, { children: [
2622
- !e.__isNestedRender && L !== "reactNative" ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(J, { scriptStr: Ot() }) }) : null,
2623
- t ? /* @__PURE__ */ B(h, { children: [
2624
- /* @__PURE__ */ o(
2625
- O,
2675
+ }, []), /* @__PURE__ */ A(h, { children: [
2676
+ !e.__isNestedRender && N !== "reactNative" ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(Z, { scriptStr: qt() }) }) : null,
2677
+ t ? /* @__PURE__ */ A(h, { children: [
2678
+ /* @__PURE__ */ l(
2679
+ K,
2626
2680
  {
2627
- id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
2681
+ id: `variants-styles-${(o = e.content) == null ? void 0 : o.id}`,
2628
2682
  styles: a()
2629
2683
  }
2630
2684
  ),
2631
- /* @__PURE__ */ o(J, { scriptStr: i() }),
2632
- (l = M(e.content)) == null ? void 0 : l.map((s) => /* @__PURE__ */ o(
2633
- Se,
2685
+ /* @__PURE__ */ l(Z, { scriptStr: i() }),
2686
+ (c = M(e.content)) == null ? void 0 : c.map((s) => /* @__PURE__ */ l(
2687
+ ke,
2634
2688
  {
2635
2689
  content: s,
2636
2690
  showContent: !1,
@@ -2640,6 +2694,7 @@ function Ae(e) {
2640
2694
  apiKey: e.apiKey,
2641
2695
  apiVersion: e.apiVersion,
2642
2696
  customComponents: e.customComponents,
2697
+ linkComponent: e.linkComponent,
2643
2698
  canTrack: e.canTrack,
2644
2699
  locale: e.locale,
2645
2700
  includeRefs: e.includeRefs,
@@ -2654,10 +2709,10 @@ function Ae(e) {
2654
2709
  s.testVariationId
2655
2710
  ))
2656
2711
  ] }) : null,
2657
- /* @__PURE__ */ o(
2658
- Se,
2712
+ /* @__PURE__ */ l(
2713
+ ke,
2659
2714
  {
2660
- content: c(),
2715
+ content: r(),
2661
2716
  showContent: !0,
2662
2717
  model: e.model,
2663
2718
  data: e.data,
@@ -2665,6 +2720,7 @@ function Ae(e) {
2665
2720
  apiKey: e.apiKey,
2666
2721
  apiVersion: e.apiVersion,
2667
2722
  customComponents: e.customComponents,
2723
+ linkComponent: e.linkComponent,
2668
2724
  canTrack: e.canTrack,
2669
2725
  locale: e.locale,
2670
2726
  includeRefs: e.includeRefs,
@@ -2679,13 +2735,13 @@ function Ae(e) {
2679
2735
  )
2680
2736
  ] });
2681
2737
  }
2682
- const ln = async ({
2738
+ const un = async ({
2683
2739
  builderContextValue: e,
2684
2740
  symbol: t
2685
2741
  }) => {
2686
2742
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
2687
2743
  (e != null && e.apiKey))
2688
- return ke({
2744
+ return Ce({
2689
2745
  model: t.model,
2690
2746
  apiKey: e.apiKey,
2691
2747
  apiVersion: e.apiVersion,
@@ -2695,26 +2751,26 @@ const ln = async ({
2695
2751
  }
2696
2752
  }
2697
2753
  }).catch((n) => {
2698
- U.error("Could not fetch symbol content: ", n);
2754
+ D.error("Could not fetch symbol content: ", n);
2699
2755
  });
2700
2756
  };
2701
- function sn(e) {
2702
- var c, r, l, s;
2757
+ function mn(e) {
2758
+ var r, o, c, s;
2703
2759
  function t() {
2704
2760
  var d, m;
2705
2761
  return [
2706
- e.attributes.className,
2762
+ e.attributes[_()],
2707
2763
  "builder-symbol",
2708
2764
  (d = e.symbol) != null && d.inline ? "builder-inline-symbol" : void 0,
2709
2765
  (m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2710
2766
  ].filter(Boolean).join(" ");
2711
2767
  }
2712
- const [n, i] = S(() => {
2768
+ const [n, i] = v(() => {
2713
2769
  var d;
2714
2770
  return (d = e.symbol) == null ? void 0 : d.content;
2715
2771
  });
2716
2772
  function a() {
2717
- n || ln({
2773
+ n || un({
2718
2774
  symbol: e.symbol,
2719
2775
  builderContextValue: e.builderContext
2720
2776
  }).then((d) => {
@@ -2724,52 +2780,53 @@ function sn(e) {
2724
2780
  return E(() => {
2725
2781
  }, []), E(() => {
2726
2782
  a();
2727
- }, [e.symbol]), /* @__PURE__ */ o("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ o(
2728
- Ae,
2783
+ }, [e.symbol]), /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
2784
+ $e,
2729
2785
  {
2730
2786
  __isNestedRender: !0,
2731
2787
  apiVersion: e.builderContext.apiVersion,
2732
2788
  apiKey: e.builderContext.apiKey,
2733
2789
  context: {
2734
2790
  ...e.builderContext.context,
2735
- symbolId: (c = e.builderBlock) == null ? void 0 : c.id
2791
+ symbolId: (r = e.builderBlock) == null ? void 0 : r.id
2736
2792
  },
2737
2793
  customComponents: Object.values(e.builderComponents),
2738
2794
  data: {
2739
- ...(r = e.symbol) == null ? void 0 : r.data,
2795
+ ...(o = e.symbol) == null ? void 0 : o.data,
2740
2796
  ...e.builderContext.localState,
2741
- ...(l = n == null ? void 0 : n.data) == null ? void 0 : l.state
2797
+ ...(c = n == null ? void 0 : n.data) == null ? void 0 : c.state
2742
2798
  },
2743
2799
  model: (s = e.symbol) == null ? void 0 : s.model,
2744
- content: n
2800
+ content: n,
2801
+ linkComponent: e.builderLinkComponent
2745
2802
  }
2746
2803
  ) });
2747
2804
  }
2748
- const fn = z, hn = Ae;
2805
+ const bn = q, yn = $e;
2749
2806
  export {
2750
- z as Blocks,
2751
- Me as Button,
2752
- ht as Columns,
2753
- Ae as Content,
2754
- gt as Fragment,
2755
- yt as Image,
2756
- fn as RenderBlocks,
2757
- hn as RenderContent,
2758
- St as Section,
2759
- sn as Symbol,
2760
- _t as Text,
2761
- jt as Video,
2762
- xn as _processContentResult,
2763
- _e as createRegisterComponentMessage,
2764
- yn as fetchBuilderProps,
2765
- Sn as fetchEntries,
2766
- ke as fetchOneEntry,
2767
- vn as getAllContent,
2768
- pn as getBuilderSearchParams,
2769
- kn as getContent,
2807
+ q as Blocks,
2808
+ Ke as Button,
2809
+ yt as Columns,
2810
+ $e as Content,
2811
+ xt as Fragment,
2812
+ kt as Image,
2813
+ bn as RenderBlocks,
2814
+ yn as RenderContent,
2815
+ pt as Section,
2816
+ mn as Symbol,
2817
+ Ut as Text,
2818
+ Dt as Video,
2819
+ vn as _processContentResult,
2820
+ Ue as createRegisterComponentMessage,
2821
+ kn as fetchBuilderProps,
2822
+ pn as fetchEntries,
2823
+ Ce as fetchOneEntry,
2824
+ Cn as getAllContent,
2825
+ wn as getBuilderSearchParams,
2826
+ In as getContent,
2770
2827
  V as isEditing,
2771
- Fe as isPreviewing,
2772
- Ne as register,
2773
- Cn as setEditorSettings,
2774
- wn as track
2828
+ je as isPreviewing,
2829
+ _e as register,
2830
+ Tn as setEditorSettings,
2831
+ Rn as track
2775
2832
  };