@builder.io/sdk-react 0.12.3 → 0.12.5

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