@builder.io/sdk-react 0.7.1-1 → 0.7.1

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 (64) hide show
  1. package/lib/browser/index.cjs +26 -26
  2. package/lib/browser/index.mjs +942 -918
  3. package/lib/{node/server-entry-13b7e1e6.mjs → browser/server-entry-0aebe4be.mjs} +261 -261
  4. package/lib/browser/server-entry-a5d2c777.js +2 -0
  5. package/lib/browser/server-entry.cjs +1 -1
  6. package/lib/browser/server-entry.mjs +1 -1
  7. package/lib/edge/index.cjs +34 -34
  8. package/lib/edge/index.mjs +1056 -1032
  9. package/lib/edge/{server-entry-13b7e1e6.mjs → server-entry-0aebe4be.mjs} +261 -261
  10. package/lib/edge/server-entry-a5d2c777.js +2 -0
  11. package/lib/edge/server-entry.cjs +1 -1
  12. package/lib/edge/server-entry.mjs +1 -1
  13. package/lib/node/index.cjs +16 -16
  14. package/lib/node/index.mjs +796 -772
  15. package/lib/node/server-entry-a5d2c777.js +2 -0
  16. package/lib/{browser/server-entry-13b7e1e6.mjs → node/server-entry-e4cd1e05.mjs} +260 -260
  17. package/lib/node/server-entry.cjs +1 -1
  18. package/lib/node/server-entry.mjs +1 -1
  19. package/package.json +2 -2
  20. package/types/blocks/BaseText.d.ts +2 -2
  21. package/types/blocks/button/button.d.ts +4 -3
  22. package/types/blocks/columns/columns.d.ts +2 -2
  23. package/types/blocks/custom-code/custom-code.d.ts +2 -2
  24. package/types/blocks/embed/embed.d.ts +2 -2
  25. package/types/blocks/form/form.d.ts +2 -2
  26. package/types/blocks/fragment/fragment.d.ts +2 -2
  27. package/types/blocks/image/image.d.ts +2 -2
  28. package/types/blocks/img/img.d.ts +4 -3
  29. package/types/blocks/input/input.d.ts +4 -3
  30. package/types/blocks/raw-text/raw-text.d.ts +2 -2
  31. package/types/blocks/section/section.d.ts +4 -3
  32. package/types/blocks/select/select.d.ts +4 -3
  33. package/types/blocks/submit-button/submit-button.d.ts +4 -3
  34. package/types/blocks/symbol/symbol.d.ts +6 -4
  35. package/types/blocks/text/text.d.ts +2 -2
  36. package/types/blocks/textarea/textarea.d.ts +4 -3
  37. package/types/blocks/video/video.d.ts +2 -2
  38. package/types/components/block/block.d.ts +2 -2
  39. package/types/components/block/components/block-styles.d.ts +2 -2
  40. package/types/components/block/components/block-wrapper.d.ts +6 -5
  41. package/types/components/block/components/component-ref/component-ref.d.ts +2 -2
  42. package/types/components/block/components/interactive-element.d.ts +2 -2
  43. package/types/components/block/components/repeated-block.d.ts +2 -2
  44. package/types/components/blocks/blocks-wrapper.d.ts +2 -2
  45. package/types/components/blocks/blocks.d.ts +3 -3
  46. package/types/components/content/components/enable-editor.d.ts +2 -2
  47. package/types/components/content/components/styles.d.ts +2 -2
  48. package/types/components/content/content.d.ts +2 -2
  49. package/types/components/content-variants/content-variants.d.ts +2 -2
  50. package/types/components/inlined-script.d.ts +2 -2
  51. package/types/components/inlined-styles.d.ts +2 -2
  52. package/types/constants/sdk-version.d.ts +1 -1
  53. package/types/context/types.d.ts +1 -1
  54. package/types/functions/evaluate/node-runtime/safeDynamicRequire.d.ts +0 -2
  55. package/types/helpers/ab-tests.d.ts +1 -1
  56. package/types/server-index.d.ts +2 -2
  57. package/lib/browser/server-entry-c98db16c.js +0 -2
  58. package/lib/edge/server-entry-c98db16c.js +0 -2
  59. package/lib/index.cjs +0 -14
  60. package/lib/index.mjs +0 -10
  61. package/lib/node/server-entry-c98db16c.js +0 -2
  62. package/types/node-runtime/index.d.ts +0 -1
  63. package/types/node-runtime/node-runtime.d.ts +0 -1
  64. package/types/node-runtime.d.ts +0 -1
@@ -1,76 +1,57 @@
1
1
  "use client";
2
- import { jsxs as $, Fragment as g, jsx as c } from "react/jsx-runtime";
3
- import { createContext as Se, useState as I, useContext as oe, createElement as ve, useRef as Z, useEffect as P } from "react";
4
- import { j as ee, i as V, k as F, l as Ae, m as _, n as Y, T as M, r as Be, o as U, p as re, a as Ve, c as Fe, b as pe, q as Ne, u as le, v as ce, w as We } from "./server-entry-13b7e1e6.mjs";
5
- import { _ as ln, h as cn, f as sn, g as dn, e as un, d as mn, s as fn, t as hn } from "./server-entry-13b7e1e6.mjs";
2
+ import { jsxs as P, Fragment as g, jsx as s } from "react/jsx-runtime";
3
+ import { createContext as Se, useState as I, useContext as ae, createElement as ve, useRef as Z, useEffect as B } from "react";
4
+ import { i as V, j as F, k as $e, l as _, m as ee, n as Y, T as M, r as Ae, o as U, p as re, a as Ve, c as Fe, b as pe, q as Ne, u as le, v as ce, w as We } from "./server-entry-0aebe4be.mjs";
5
+ import { _ as ln, h as cn, f as sn, g as dn, e as un, d as mn, s as fn, t as hn } from "./server-entry-0aebe4be.mjs";
6
6
  function je(e) {
7
- return /* @__PURE__ */ $(g, { children: [
8
- e.link ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
7
+ return /* @__PURE__ */ P(g, { children: [
8
+ e.link ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
9
9
  "a",
10
10
  {
11
- role: "button",
12
11
  ...e.attributes,
13
12
  href: e.link,
14
13
  target: e.openLinkInNewTab ? "_blank" : void 0,
14
+ role: "button",
15
15
  children: e.text
16
16
  }
17
- ) }) : /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
17
+ ) }) : /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
18
18
  "button",
19
19
  {
20
20
  ...e.attributes,
21
21
  style: e.attributes.style,
22
- className: e.attributes.className + " button-35669e6c",
22
+ className: e.attributes.className + " button-5294b10c",
23
23
  children: e.text
24
24
  }
25
25
  ) }),
26
- /* @__PURE__ */ c("style", { children: `.button-35669e6c {
26
+ /* @__PURE__ */ s("style", { children: `.button-5294b10c {
27
27
  all: unset;
28
28
  }` })
29
29
  ] });
30
30
  }
31
- const ke = {
32
- small: {
33
- min: 320,
34
- default: 321,
35
- max: 640
36
- },
37
- medium: {
38
- min: 641,
39
- default: 642,
40
- max: 991
31
+ const te = Se({
32
+ content: null,
33
+ context: {},
34
+ localState: void 0,
35
+ rootSetState() {
41
36
  },
42
- large: {
43
- min: 990,
44
- default: 991,
45
- max: 1200
46
- }
47
- }, se = (e, t = ke) => `@media (max-width: ${t[e].max}px)`, Ce = ({
48
- small: e,
49
- medium: t
50
- }) => {
51
- const n = ee(ke);
52
- if (!e || !t)
53
- return n;
54
- const i = Math.floor(e / 2);
55
- n.small = {
56
- max: e,
57
- min: i,
58
- default: i + 1
59
- };
60
- const a = n.small.max + 1;
61
- n.medium = {
62
- max: t,
63
- min: a,
64
- default: a + 1
37
+ rootState: {},
38
+ apiKey: null,
39
+ apiVersion: void 0,
40
+ componentInfos: {},
41
+ inheritedStyles: {}
42
+ }), ke = Se({ registeredComponents: {} });
43
+ function Me(e) {
44
+ var t;
45
+ return {
46
+ ...(t = e.component) == null ? void 0 : t.options,
47
+ ...e.options,
48
+ /**
49
+ * Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
50
+ */
51
+ builderBlock: e
65
52
  };
66
- const o = n.medium.max + 1;
67
- return n.large = {
68
- max: 2e3,
69
- // TODO: decide upper limit
70
- min: o,
71
- default: o + 1
72
- }, n;
73
- }, Me = ({
53
+ }
54
+ const Le = ({
74
55
  builder: e,
75
56
  context: t,
76
57
  event: n,
@@ -82,151 +63,248 @@ const ke = {
82
63
  builder: e,
83
64
  context: t,
84
65
  event: n
85
- }), Le = () => ({
66
+ }), _e = () => ({
86
67
  isEditing: V(),
87
68
  isBrowser: F(),
88
69
  isServer: !F(),
89
- getUserAttributes: () => Ae()
90
- }), _e = (e, {
70
+ getUserAttributes: () => $e()
71
+ }), Ue = (e, {
91
72
  isExpression: t = !0
92
- }) => /* 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, de = ({
73
+ }) => /* 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, se = ({
93
74
  code: e,
94
75
  builder: t,
95
76
  context: n,
96
77
  event: i,
97
- localState: a,
98
- rootSetState: o,
78
+ localState: o,
79
+ rootSetState: a,
99
80
  rootState: r
100
81
  }) => {
101
- const d = Me({
82
+ const l = Le({
102
83
  builder: t,
103
84
  context: n,
104
85
  event: i,
105
- state: Ue(r, a, o)
86
+ state: Oe(r, o, a)
106
87
  });
107
- return new Function(...d.map(([l]) => l), e)(...d.map(([, l]) => l));
88
+ return new Function(...l.map(([c]) => c), e)(...l.map(([, c]) => c));
108
89
  };
109
- function Ue(e, t, n) {
90
+ function Oe(e, t, n) {
110
91
  if (e === t)
111
92
  throw new Error("rootState === localState");
112
93
  return new Proxy(e, {
113
- get: (i, a) => t && a in t ? t[a] : e[a],
114
- set: (i, a, o) => {
115
- if (t && a in t)
94
+ get: (i, o) => t && o in t ? t[o] : e[o],
95
+ set: (i, o, a) => {
96
+ if (t && o in t)
116
97
  throw new Error("Writing to local state is not allowed as it is read-only.");
117
- return e[a] = o, n == null || n(e), !0;
98
+ return e[o] = a, n == null || n(e), !0;
118
99
  }
119
100
  });
120
101
  }
121
- const Ke = (e) => (F(), de(e));
102
+ const Ke = (e) => (F(), se(e));
122
103
  function j({
123
104
  code: e,
124
105
  context: t,
125
106
  localState: n,
126
107
  rootState: i,
127
- rootSetState: a,
128
- event: o,
108
+ rootSetState: o,
109
+ event: a,
129
110
  isExpression: r = !0
130
111
  }) {
131
112
  if (e === "") {
132
113
  _.warn("Skipping evaluation of empty code block.");
133
114
  return;
134
115
  }
135
- const d = {
136
- code: _e(e, {
116
+ const l = {
117
+ code: Ue(e, {
137
118
  isExpression: r
138
119
  }),
139
- builder: Le(),
120
+ builder: _e(),
140
121
  context: t,
141
- event: o,
142
- rootSetState: a,
122
+ event: a,
123
+ rootSetState: o,
143
124
  rootState: i,
144
125
  localState: n
145
126
  };
146
127
  try {
147
- return Ke(d);
148
- } catch (l) {
149
- _.error("Failed code evaluation: " + l.message, {
128
+ return Ke(l);
129
+ } catch (c) {
130
+ _.error("Failed code evaluation: " + c.message, {
150
131
  code: e
151
132
  });
152
133
  return;
153
134
  }
154
135
  }
155
- const Oe = (e, t, n) => {
136
+ const He = (e, t, n) => {
156
137
  if (Object(e) !== e)
157
138
  return e;
158
139
  const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
159
- return i.slice(0, -1).reduce((a, o, r) => Object(a[o]) === a[o] ? a[o] : a[o] = Math.abs(Number(i[r + 1])) >> 0 === +i[r + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
140
+ return i.slice(0, -1).reduce((o, a, r) => Object(o[a]) === o[a] ? o[a] : o[a] = Math.abs(Number(i[r + 1])) >> 0 === +i[r + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
160
141
  };
161
- const He = ({
142
+ const ze = ({
162
143
  block: e,
163
144
  context: t,
164
145
  localState: n,
165
146
  rootState: i,
166
- rootSetState: a
147
+ rootSetState: o
167
148
  }) => {
168
149
  if (!e.bindings)
169
150
  return e;
170
- const o = ee(e), r = {
171
- ...o,
151
+ const a = ee(e), r = {
152
+ ...a,
172
153
  properties: {
173
- ...o.properties
154
+ ...a.properties
174
155
  },
175
156
  actions: {
176
- ...o.actions
157
+ ...a.actions
177
158
  }
178
159
  };
179
- for (const d in e.bindings) {
180
- const l = e.bindings[d], s = j({
181
- code: l,
160
+ for (const l in e.bindings) {
161
+ const c = e.bindings[l], d = j({
162
+ code: c,
182
163
  localState: n,
183
164
  rootState: i,
184
- rootSetState: a,
165
+ rootSetState: o,
185
166
  context: t
186
167
  });
187
- Oe(r, d, s);
168
+ He(r, l, d);
188
169
  }
189
170
  return r;
190
171
  };
191
- function K({
172
+ function O({
192
173
  block: e,
193
174
  context: t,
194
175
  shouldEvaluateBindings: n,
195
176
  localState: i,
196
- rootState: a,
197
- rootSetState: o
177
+ rootState: o,
178
+ rootSetState: a
198
179
  }) {
199
180
  const r = e;
200
- return n ? He({
181
+ return n ? ze({
201
182
  block: r,
202
183
  localState: i,
203
- rootState: a,
204
- rootSetState: o,
184
+ rootState: o,
185
+ rootSetState: a,
205
186
  context: t
206
187
  }) : r;
207
188
  }
208
- const ze = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), we = (e) => Object.entries(e).map(([n, i]) => {
189
+ const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], D = (e) => typeof e == "string" && qe.includes(e.toLowerCase()), De = ({
190
+ block: e,
191
+ context: t,
192
+ registeredComponents: n
193
+ }) => {
194
+ var a;
195
+ const i = (a = O({
196
+ block: e,
197
+ localState: t.localState,
198
+ rootState: t.rootState,
199
+ rootSetState: t.rootSetState,
200
+ context: t.context,
201
+ shouldEvaluateBindings: !1
202
+ }).component) == null ? void 0 : a.name;
203
+ if (!i)
204
+ return null;
205
+ const o = n[i];
206
+ if (o)
207
+ return o;
208
+ console.warn(`
209
+ Could not find a registered component named "${i}".
210
+ If you registered it, is the file that registered it imported by the file that needs to render it?`);
211
+ }, Ge = ({
212
+ block: e,
213
+ context: t
214
+ }) => {
215
+ const {
216
+ repeat: n,
217
+ ...i
218
+ } = e;
219
+ if (!(n != null && n.collection))
220
+ return;
221
+ const o = j({
222
+ code: n.collection,
223
+ localState: t.localState,
224
+ rootState: t.rootState,
225
+ rootSetState: t.rootSetState,
226
+ context: t.context
227
+ });
228
+ if (!Array.isArray(o))
229
+ return;
230
+ const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
231
+ return o.map((c, d) => ({
232
+ context: {
233
+ ...t,
234
+ localState: {
235
+ ...t.localState,
236
+ $index: d,
237
+ $item: c,
238
+ [r]: c,
239
+ [`$${r}Index`]: d
240
+ }
241
+ },
242
+ block: i
243
+ }));
244
+ }, Ce = {
245
+ small: {
246
+ min: 320,
247
+ default: 321,
248
+ max: 640
249
+ },
250
+ medium: {
251
+ min: 641,
252
+ default: 642,
253
+ max: 991
254
+ },
255
+ large: {
256
+ min: 990,
257
+ default: 991,
258
+ max: 1200
259
+ }
260
+ }, de = (e, t = Ce) => `@media (max-width: ${t[e].max}px)`, we = ({
261
+ small: e,
262
+ medium: t
263
+ }) => {
264
+ const n = ee(Ce);
265
+ if (!e || !t)
266
+ return n;
267
+ const i = Math.floor(e / 2);
268
+ n.small = {
269
+ max: e,
270
+ min: i,
271
+ default: i + 1
272
+ };
273
+ const o = n.small.max + 1;
274
+ n.medium = {
275
+ max: t,
276
+ min: o,
277
+ default: o + 1
278
+ };
279
+ const a = n.medium.max + 1;
280
+ return n.large = {
281
+ max: 2e3,
282
+ // TODO: decide upper limit
283
+ min: a,
284
+ default: a + 1
285
+ }, n;
286
+ }, Je = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Ie = (e) => Object.entries(e).map(([n, i]) => {
209
287
  if (typeof i == "string")
210
- return `${ze(n)}: ${i};`;
211
- }).filter(Y), qe = (e) => we(e).join(`
212
- `), D = ({
288
+ return `${Je(n)}: ${i};`;
289
+ }).filter(Y), Ye = (e) => Ie(e).join(`
290
+ `), G = ({
213
291
  mediaQuery: e,
214
292
  className: t,
215
293
  styles: n
216
294
  }) => {
217
295
  const i = `.${t} {
218
- ${qe(n)}
296
+ ${Ye(n)}
219
297
  }`;
220
298
  return e ? `${e} {
221
299
  ${i}
222
300
  }` : i;
223
301
  };
224
302
  function H(e) {
225
- return /* @__PURE__ */ c("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
303
+ return /* @__PURE__ */ s("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
226
304
  }
227
- function te(e) {
305
+ function ne(e) {
228
306
  function t() {
229
- const i = K({
307
+ const i = O({
230
308
  block: e.block,
231
309
  localState: e.context.localState,
232
310
  rootState: e.context.rootState,
@@ -238,133 +316,44 @@ function te(e) {
238
316
  }
239
317
  function n() {
240
318
  var b;
241
- const i = K({
319
+ const i = O({
242
320
  block: e.block,
243
321
  localState: e.context.localState,
244
322
  rootState: e.context.rootState,
245
323
  rootSetState: e.context.rootSetState,
246
324
  context: e.context.context,
247
325
  shouldEvaluateBindings: !0
248
- }), a = i.responsiveStyles, o = e.context.content, r = Ce(
249
- ((b = o == null ? void 0 : o.meta) == null ? void 0 : b.breakpoints) || {}
250
- ), d = a == null ? void 0 : a.large, l = a == null ? void 0 : a.medium, s = a == null ? void 0 : a.small, u = i.id;
326
+ }), o = i.responsiveStyles, a = e.context.content, r = we(
327
+ ((b = a == null ? void 0 : a.meta) == null ? void 0 : b.breakpoints) || {}
328
+ ), l = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, d = o == null ? void 0 : o.small, u = i.id;
251
329
  if (!u)
252
330
  return "";
253
- const h = d ? D({
331
+ const h = l ? G({
254
332
  className: u,
255
- styles: d
256
- }) : "", y = l ? D({
333
+ styles: l
334
+ }) : "", y = c ? G({
257
335
  className: u,
258
- styles: l,
259
- mediaQuery: se(
336
+ styles: c,
337
+ mediaQuery: de(
260
338
  "medium",
261
339
  r
262
340
  )
263
- }) : "", k = s ? D({
341
+ }) : "", k = d ? G({
264
342
  className: u,
265
- styles: s,
266
- mediaQuery: se(
343
+ styles: d,
344
+ mediaQuery: de(
267
345
  "small",
268
346
  r
269
347
  )
270
348
  }) : "";
271
349
  return [h, y, k].join(" ");
272
350
  }
273
- return /* @__PURE__ */ c(g, { children: n() && t() ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(H, { styles: n() }) }) : null });
274
- }
275
- function De(e) {
276
- var t;
277
- return {
278
- ...(t = e.component) == null ? void 0 : t.options,
279
- ...e.options,
280
- /**
281
- * Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
282
- */
283
- builderBlock: e
284
- };
351
+ return /* @__PURE__ */ s(g, { children: n() && t() ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(H, { styles: n() }) }) : null });
285
352
  }
286
- const Ge = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], G = (e) => typeof e == "string" && Ge.includes(e.toLowerCase()), Je = ({
287
- block: e,
288
- context: t,
289
- registeredComponents: n
290
- }) => {
291
- var o;
292
- const i = (o = K({
293
- block: e,
294
- localState: t.localState,
295
- rootState: t.rootState,
296
- rootSetState: t.rootSetState,
297
- context: t.context,
298
- shouldEvaluateBindings: !1
299
- }).component) == null ? void 0 : o.name;
300
- if (!i)
301
- return null;
302
- const a = n[i];
303
- if (a)
304
- return a;
305
- console.warn(`
306
- Could not find a registered component named "${i}".
307
- If you registered it, is the file that registered it imported by the file that needs to render it?`);
308
- }, Ye = ({
309
- block: e,
310
- context: t
311
- }) => {
312
- const {
313
- repeat: n,
314
- ...i
315
- } = e;
316
- if (!(n != null && n.collection))
317
- return;
318
- const a = j({
319
- code: n.collection,
320
- localState: t.localState,
321
- rootState: t.rootState,
322
- rootSetState: t.rootSetState,
323
- context: t.context
324
- });
325
- if (!Array.isArray(a))
326
- return;
327
- const o = n.collection.split(".").pop(), r = n.itemName || (o ? o + "Item" : "item");
328
- return a.map((l, s) => ({
329
- context: {
330
- ...t,
331
- localState: {
332
- ...t.localState,
333
- $index: s,
334
- $item: l,
335
- [r]: l,
336
- [`$${r}Index`]: s
337
- }
338
- },
339
- block: i
340
- }));
341
- }, ne = Se({
342
- content: null,
343
- context: {},
344
- localState: void 0,
345
- rootSetState() {
346
- },
347
- rootState: {},
348
- apiKey: null,
349
- apiVersion: void 0,
350
- componentInfos: {},
351
- inheritedStyles: {}
352
- });
353
353
  function Qe(e) {
354
- const [t, n] = I(() => e.repeatContext);
355
- return /* @__PURE__ */ c(ne.Provider, { value: t, children: /* @__PURE__ */ c(
356
- z,
357
- {
358
- block: e.block,
359
- context: t,
360
- registeredComponents: e.registeredComponents
361
- }
362
- ) });
363
- }
364
- function Xe(e) {
365
354
  return e.charAt(0).toUpperCase() + e.slice(1);
366
355
  }
367
- const Ze = (e) => `on${Xe(e)}`, et = (e, t) => (n) => j({
356
+ const Xe = (e) => `on${Qe(e)}`, Ze = (e, t) => (n) => j({
368
357
  code: e,
369
358
  context: t.context,
370
359
  localState: t.localState,
@@ -378,49 +367,49 @@ function Q(e) {
378
367
  for (const i in n) {
379
368
  if (!n.hasOwnProperty(i))
380
369
  continue;
381
- const a = n[i];
382
- let o = Ze(i);
370
+ const o = n[i];
371
+ let a = Xe(i);
383
372
  if (e.stripPrefix)
384
373
  switch (M) {
385
374
  case "vue2":
386
375
  case "vue3":
387
- o = o.replace("v-on:", "");
376
+ a = a.replace("v-on:", "");
388
377
  break;
389
378
  case "svelte":
390
- o = o.replace("on:", "");
379
+ a = a.replace("on:", "");
391
380
  break;
392
381
  }
393
- t[o] = et(a, e);
382
+ t[a] = Ze(o, e);
394
383
  }
395
384
  return t;
396
385
  }
397
- function tt(e) {
386
+ function et(e) {
398
387
  return e.className = e.class, delete e.class, e;
399
388
  }
400
- const nt = (e) => ({
389
+ const tt = (e) => ({
401
390
  href: e.href
402
391
  });
403
- function O({
392
+ function K({
404
393
  block: e,
405
394
  context: t
406
395
  }) {
407
396
  var i;
408
397
  const n = {
409
- ...nt(e),
398
+ ...tt(e),
410
399
  ...e.properties,
411
400
  "builder-id": e.id,
412
- style: e.style ? it(e.style) : void 0,
401
+ style: e.style ? nt(e.style) : void 0,
413
402
  class: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
414
403
  };
415
- return tt(n);
404
+ return et(n);
416
405
  }
417
- function it(e) {
406
+ function nt(e) {
418
407
  switch (M) {
419
408
  case "svelte":
420
409
  case "vue2":
421
410
  case "vue3":
422
411
  case "solid":
423
- return we(e).join(" ");
412
+ return Ie(e).join(" ");
424
413
  case "qwik":
425
414
  case "reactNative":
426
415
  case "react":
@@ -428,13 +417,57 @@ function it(e) {
428
417
  return e;
429
418
  }
430
419
  }
431
- function at(e) {
432
- return /* @__PURE__ */ c(
420
+ function ue(e) {
421
+ return /* @__PURE__ */ P(g, { children: [
422
+ " ",
423
+ e.hasChildren ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ P(
424
+ e.Wrapper,
425
+ {
426
+ ...K({
427
+ block: e.block,
428
+ context: e.context
429
+ }),
430
+ ...Q({
431
+ block: e.block,
432
+ rootState: e.context.rootState,
433
+ rootSetState: e.context.rootSetState,
434
+ localState: e.context.localState,
435
+ context: e.context.context,
436
+ stripPrefix: !0
437
+ }),
438
+ children: [
439
+ " ",
440
+ e.children,
441
+ " "
442
+ ]
443
+ }
444
+ ) }) : /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
445
+ e.Wrapper,
446
+ {
447
+ ...K({
448
+ block: e.block,
449
+ context: e.context
450
+ }),
451
+ ...Q({
452
+ block: e.block,
453
+ rootState: e.context.rootState,
454
+ rootSetState: e.context.rootSetState,
455
+ localState: e.context.localState,
456
+ context: e.context.context,
457
+ stripPrefix: !0
458
+ })
459
+ }
460
+ ) }),
461
+ " "
462
+ ] });
463
+ }
464
+ function it(e) {
465
+ return /* @__PURE__ */ s(
433
466
  e.Wrapper,
434
467
  {
435
468
  ...e.wrapperProps,
436
469
  attributes: {
437
- ...O({
470
+ ...K({
438
471
  block: e.block,
439
472
  context: e.context
440
473
  }),
@@ -455,10 +488,10 @@ const ot = ({
455
488
  builderBlock: t,
456
489
  context: n,
457
490
  componentRef: i,
458
- includeBlockProps: a,
459
- isInteractive: o,
491
+ includeBlockProps: o,
492
+ isInteractive: a,
460
493
  contextValue: r
461
- }) => o ? {
494
+ }) => a ? {
462
495
  Wrapper: i,
463
496
  block: t,
464
497
  context: n,
@@ -469,19 +502,19 @@ const ot = ({
469
502
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
470
503
  * component itself directly. Otherwise, they are provided to the wrapper element.
471
504
  */
472
- ...a ? {
473
- attributes: O({
505
+ ...o ? {
506
+ attributes: K({
474
507
  block: t,
475
508
  context: r
476
509
  })
477
510
  } : {}
478
511
  };
479
- function ue(e) {
480
- var i, a;
512
+ function me(e) {
513
+ var i, o;
481
514
  const [t, n] = I(
482
- () => e.isInteractive ? at : e.componentRef
515
+ () => e.isInteractive ? it : e.componentRef
483
516
  );
484
- return /* @__PURE__ */ c(g, { children: e.componentRef ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ $(
517
+ return /* @__PURE__ */ s(g, { children: e.componentRef ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ P(
485
518
  t,
486
519
  {
487
520
  ...ot({
@@ -494,88 +527,55 @@ function ue(e) {
494
527
  contextValue: e.context
495
528
  }),
496
529
  children: [
497
- (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ c(
530
+ (i = e.blockChildren) == null ? void 0 : i.map((a) => /* @__PURE__ */ s(
498
531
  z,
499
532
  {
500
- block: o,
533
+ block: a,
501
534
  context: e.context,
502
535
  registeredComponents: e.registeredComponents
503
536
  },
504
- "block-" + o.id
537
+ "block-" + a.id
505
538
  )),
506
- (a = e.blockChildren) == null ? void 0 : a.map((o) => /* @__PURE__ */ c(
507
- te,
539
+ (o = e.blockChildren) == null ? void 0 : o.map((a) => /* @__PURE__ */ s(
540
+ ne,
508
541
  {
509
- block: o,
542
+ block: a,
510
543
  context: e.context
511
544
  },
512
- "block-style-" + o.id
545
+ "block-style-" + a.id
513
546
  ))
514
547
  ]
515
548
  }
516
549
  ) }) : null });
517
550
  }
518
- function me(e) {
519
- return /* @__PURE__ */ $(g, { children: [
520
- " ",
521
- e.hasChildren ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ $(
522
- e.Wrapper,
523
- {
524
- ...O({
525
- block: e.block,
526
- context: e.context
527
- }),
528
- ...Q({
529
- block: e.block,
530
- rootState: e.context.rootState,
531
- rootSetState: e.context.rootSetState,
532
- localState: e.context.localState,
533
- context: e.context.context,
534
- stripPrefix: !0
535
- }),
536
- children: [
537
- " ",
538
- e.children,
539
- " "
540
- ]
541
- }
542
- ) }) : /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
543
- e.Wrapper,
544
- {
545
- ...O({
546
- block: e.block,
547
- context: e.context
548
- }),
549
- ...Q({
550
- block: e.block,
551
- rootState: e.context.rootState,
552
- rootSetState: e.context.rootSetState,
553
- localState: e.context.localState,
554
- context: e.context.context,
555
- stripPrefix: !0
556
- })
557
- }
558
- ) }),
559
- " "
560
- ] });
551
+ function at(e) {
552
+ const [t, n] = I(() => e.repeatContext);
553
+ return /* @__PURE__ */ s(te.Provider, { value: t, children: /* @__PURE__ */ s(
554
+ z,
555
+ {
556
+ block: e.block,
557
+ context: t,
558
+ registeredComponents: e.registeredComponents
559
+ }
560
+ ) });
561
561
  }
562
562
  function z(e) {
563
563
  var u, h, y, k;
564
564
  function t() {
565
- return Je({
565
+ return De({
566
566
  block: e.block,
567
567
  context: e.context,
568
568
  registeredComponents: e.registeredComponents
569
569
  });
570
570
  }
571
571
  function n() {
572
- return Ye({
572
+ return Ge({
573
573
  block: e.block,
574
574
  context: e.context
575
575
  });
576
576
  }
577
577
  function i() {
578
- return n() ? e.block : K({
578
+ return n() ? e.block : O({
579
579
  block: e.block,
580
580
  localState: e.context.localState,
581
581
  rootState: e.context.rootState,
@@ -584,48 +584,60 @@ function z(e) {
584
584
  shouldEvaluateBindings: !0
585
585
  });
586
586
  }
587
- function a() {
587
+ function o() {
588
588
  return e.block.tagName || "div";
589
589
  }
590
- function o() {
590
+ function a() {
591
591
  return "hide" in i() ? !i().hide : "show" in i() ? i().show : !0;
592
592
  }
593
593
  function r() {
594
594
  var S;
595
595
  return !((S = t == null ? void 0 : t()) != null && S.component) && !n() ? i().children ?? [] : [];
596
596
  }
597
- function d() {
597
+ function l() {
598
598
  var b, S, C, w, x;
599
599
  return {
600
600
  blockChildren: i().children ?? [],
601
601
  componentRef: (b = t == null ? void 0 : t()) == null ? void 0 : b.component,
602
602
  componentOptions: {
603
- ...De(i()),
603
+ ...Me(i()),
604
604
  builderContext: e.context,
605
605
  ...((S = t == null ? void 0 : t()) == null ? void 0 : S.name) === "Symbol" || ((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Columns" ? {
606
606
  builderComponents: e.registeredComponents
607
607
  } : {}
608
608
  },
609
- context: l,
609
+ context: c,
610
610
  registeredComponents: e.registeredComponents,
611
611
  builderBlock: i(),
612
612
  includeBlockProps: ((w = t == null ? void 0 : t()) == null ? void 0 : w.noWrap) === !0,
613
613
  isInteractive: !((x = t == null ? void 0 : t()) != null && x.isRSC)
614
614
  };
615
615
  }
616
- const [l, s] = I(() => e.context);
617
- return /* @__PURE__ */ c(g, { children: o() ? /* @__PURE__ */ c(g, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(ue, { ...d() }) }) : /* @__PURE__ */ $(g, { children: [
618
- G(a()) ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
619
- me,
616
+ const [c, d] = I(() => e.context);
617
+ return /* @__PURE__ */ s(g, { children: a() ? /* @__PURE__ */ s(g, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
618
+ me,
619
+ {
620
+ componentRef: l().componentRef,
621
+ componentOptions: l().componentOptions,
622
+ blockChildren: l().blockChildren,
623
+ context: l().context,
624
+ registeredComponents: l().registeredComponents,
625
+ builderBlock: l().builderBlock,
626
+ includeBlockProps: l().includeBlockProps,
627
+ isInteractive: l().isInteractive
628
+ }
629
+ ) }) : /* @__PURE__ */ P(g, { children: [
630
+ D(o()) ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
631
+ ue,
620
632
  {
621
- Wrapper: a(),
633
+ Wrapper: o(),
622
634
  block: i(),
623
635
  context: e.context,
624
636
  hasChildren: !1
625
637
  }
626
638
  ) }) : null,
627
- !G(a()) && n() ? /* @__PURE__ */ c(g, { children: (h = n()) == null ? void 0 : h.map((b, S) => /* @__PURE__ */ c(
628
- Qe,
639
+ !D(o()) && n() ? /* @__PURE__ */ s(g, { children: (h = n()) == null ? void 0 : h.map((b, S) => /* @__PURE__ */ s(
640
+ at,
629
641
  {
630
642
  repeatContext: b.context,
631
643
  block: b.block,
@@ -633,29 +645,41 @@ function z(e) {
633
645
  },
634
646
  S
635
647
  )) }) : null,
636
- !G(a()) && !n() ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ $(
637
- me,
648
+ !D(o()) && !n() ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ P(
649
+ ue,
638
650
  {
639
- Wrapper: a(),
651
+ Wrapper: o(),
640
652
  block: i(),
641
653
  context: e.context,
642
654
  hasChildren: !0,
643
655
  children: [
644
- /* @__PURE__ */ c(ue, { ...d() }),
645
- (y = r()) == null ? void 0 : y.map((b) => /* @__PURE__ */ c(
656
+ /* @__PURE__ */ s(
657
+ me,
658
+ {
659
+ componentRef: l().componentRef,
660
+ componentOptions: l().componentOptions,
661
+ blockChildren: l().blockChildren,
662
+ context: l().context,
663
+ registeredComponents: l().registeredComponents,
664
+ builderBlock: l().builderBlock,
665
+ includeBlockProps: l().includeBlockProps,
666
+ isInteractive: l().isInteractive
667
+ }
668
+ ),
669
+ (y = r()) == null ? void 0 : y.map((b) => /* @__PURE__ */ s(
646
670
  z,
647
671
  {
648
672
  block: b,
649
- context: l,
673
+ context: c,
650
674
  registeredComponents: e.registeredComponents
651
675
  },
652
676
  "block-" + b.id
653
677
  )),
654
- (k = r()) == null ? void 0 : k.map((b) => /* @__PURE__ */ c(
655
- te,
678
+ (k = r()) == null ? void 0 : k.map((b) => /* @__PURE__ */ s(
679
+ ne,
656
680
  {
657
681
  block: b,
658
- context: l
682
+ context: c
659
683
  },
660
684
  "block-style-" + b.id
661
685
  ))
@@ -666,12 +690,12 @@ function z(e) {
666
690
  }
667
691
  function rt(e) {
668
692
  function t() {
669
- var a;
670
- return "builder-blocks" + ((a = e.blocks) != null && a.length ? "" : " no-blocks");
693
+ var o;
694
+ return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
671
695
  }
672
696
  function n() {
673
- var a, o;
674
- V() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
697
+ var o, a;
698
+ V() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
675
699
  {
676
700
  type: "builder.clickEmptyBlocks",
677
701
  data: {
@@ -683,8 +707,8 @@ function rt(e) {
683
707
  ));
684
708
  }
685
709
  function i() {
686
- var a, o;
687
- V() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
710
+ var o, a;
711
+ V() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
688
712
  {
689
713
  type: "builder.hoverEmptyBlocks",
690
714
  data: {
@@ -695,32 +719,31 @@ function rt(e) {
695
719
  "*"
696
720
  ));
697
721
  }
698
- return /* @__PURE__ */ $(g, { children: [
699
- /* @__PURE__ */ c(
722
+ return /* @__PURE__ */ P(g, { children: [
723
+ /* @__PURE__ */ s(
700
724
  "div",
701
725
  {
702
726
  className: t() + " div-02c7a115",
703
727
  "builder-path": e.path,
704
728
  "builder-parent-id": e.parent,
705
729
  style: e.styleProp,
706
- onClick: (a) => n(),
707
- onMouseEnter: (a) => i(),
708
- onKeyPress: (a) => n(),
730
+ onClick: (o) => n(),
731
+ onMouseEnter: (o) => i(),
732
+ onKeyPress: (o) => n(),
709
733
  children: e.children
710
734
  }
711
735
  ),
712
- /* @__PURE__ */ c("style", { children: `.div-02c7a115 {
736
+ /* @__PURE__ */ s("style", { children: `.div-02c7a115 {
713
737
  display: flex;
714
738
  flex-direction: column;
715
739
  align-items: stretch;
716
740
  }` })
717
741
  ] });
718
742
  }
719
- const Ie = Se({ registeredComponents: {} });
720
743
  function ie(e) {
721
- var i, a;
722
- const t = oe(ne), n = oe(Ie);
723
- return /* @__PURE__ */ $(
744
+ var i, o;
745
+ const t = ae(te), n = ae(ke);
746
+ return /* @__PURE__ */ P(
724
747
  rt,
725
748
  {
726
749
  blocks: e.blocks,
@@ -728,22 +751,22 @@ function ie(e) {
728
751
  path: e.path,
729
752
  styleProp: e.styleProp,
730
753
  children: [
731
- e.blocks ? /* @__PURE__ */ c(g, { children: (i = e.blocks) == null ? void 0 : i.map((o) => /* @__PURE__ */ c(
754
+ e.blocks ? /* @__PURE__ */ s(g, { children: (i = e.blocks) == null ? void 0 : i.map((a) => /* @__PURE__ */ s(
732
755
  z,
733
756
  {
734
- block: o,
757
+ block: a,
735
758
  context: e.context || t,
736
759
  registeredComponents: e.registeredComponents || n.registeredComponents
737
760
  },
738
- "render-block-" + o.id
761
+ "render-block-" + a.id
739
762
  )) }) : null,
740
- e.blocks ? /* @__PURE__ */ c(g, { children: (a = e.blocks) == null ? void 0 : a.map((o) => /* @__PURE__ */ c(
741
- te,
763
+ e.blocks ? /* @__PURE__ */ s(g, { children: (o = e.blocks) == null ? void 0 : o.map((a) => /* @__PURE__ */ s(
764
+ ne,
742
765
  {
743
- block: o,
766
+ block: a,
744
767
  context: e.context || t
745
768
  },
746
- "block-style-" + o.id
769
+ "block-style-" + a.id
747
770
  )) }) : null
748
771
  ]
749
772
  }
@@ -753,28 +776,28 @@ function lt(e) {
753
776
  var w;
754
777
  const [t, n] = I(
755
778
  () => typeof e.space == "number" ? e.space || 0 : 20
756
- ), [i, a] = I(() => e.columns || []), [o, r] = I(
779
+ ), [i, o] = I(() => e.columns || []), [a, r] = I(
757
780
  () => e.stackColumnsAt || "tablet"
758
781
  );
759
- function d(x) {
782
+ function l(x) {
760
783
  var R;
761
784
  return ((R = i[x]) == null ? void 0 : R.width) || 100 / i.length;
762
785
  }
763
- function l(x) {
786
+ function c(x) {
764
787
  const R = t * (i.length - 1) / i.length;
765
- return `calc(${d(x)}% - ${R}px)`;
788
+ return `calc(${l(x)}% - ${R}px)`;
766
789
  }
767
- function s({
790
+ function d({
768
791
  stackedStyle: x,
769
792
  desktopStyle: R
770
793
  }) {
771
- return o === "tablet" ? x : R;
794
+ return a === "tablet" ? x : R;
772
795
  }
773
796
  function u({
774
797
  stackedStyle: x,
775
798
  desktopStyle: R
776
799
  }) {
777
- return o === "never" ? R : x;
800
+ return a === "never" ? R : x;
778
801
  }
779
802
  const [h, y] = I(
780
803
  () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
@@ -782,39 +805,39 @@ function lt(e) {
782
805
  function k() {
783
806
  return {
784
807
  "--flex-dir": h,
785
- "--flex-dir-tablet": s({
808
+ "--flex-dir-tablet": d({
786
809
  stackedStyle: h,
787
810
  desktopStyle: "row"
788
811
  })
789
812
  };
790
813
  }
791
814
  function b(x) {
792
- const R = x === 0 ? 0 : t, A = l(x), B = `${R}px`, N = "100%", W = 0;
815
+ const R = x === 0 ? 0 : t, $ = c(x), A = `${R}px`, N = "100%", W = 0;
793
816
  return {
794
- width: A,
795
- ["marginLeft"]: B,
817
+ width: $,
818
+ ["marginLeft"]: A,
796
819
  "--column-width-mobile": u({
797
820
  stackedStyle: N,
798
- desktopStyle: A
821
+ desktopStyle: $
799
822
  }),
800
823
  "--column-margin-left-mobile": u({
801
824
  stackedStyle: W,
802
- desktopStyle: B
825
+ desktopStyle: A
803
826
  }),
804
- "--column-width-tablet": s({
827
+ "--column-width-tablet": d({
805
828
  stackedStyle: N,
806
- desktopStyle: A
829
+ desktopStyle: $
807
830
  }),
808
- "--column-margin-left-tablet": s({
831
+ "--column-margin-left-tablet": d({
809
832
  stackedStyle: W,
810
- desktopStyle: B
833
+ desktopStyle: A
811
834
  })
812
835
  };
813
836
  }
814
837
  function S(x) {
815
- var A, B;
816
- return Ce(
817
- ((B = (A = e.builderContext.content) == null ? void 0 : A.meta) == null ? void 0 : B.breakpoints) || {}
838
+ var $, A;
839
+ return we(
840
+ ((A = ($ = e.builderContext.content) == null ? void 0 : $.meta) == null ? void 0 : A.breakpoints) || {}
818
841
  )[x].max;
819
842
  }
820
843
  function C() {
@@ -844,22 +867,22 @@ function lt(e) {
844
867
  },
845
868
  `;
846
869
  }
847
- return /* @__PURE__ */ $(g, { children: [
848
- /* @__PURE__ */ $(
870
+ return /* @__PURE__ */ P(g, { children: [
871
+ /* @__PURE__ */ P(
849
872
  "div",
850
873
  {
851
- className: `builder-columns ${e.builderBlock.id}-breakpoints div-ac8f4142`,
874
+ className: `builder-columns ${e.builderBlock.id}-breakpoints div-53636e90`,
852
875
  style: k(),
853
876
  children: [
854
- /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(H, { styles: C() }) }),
877
+ /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(H, { styles: C() }) }),
855
878
  (w = e.columns) == null ? void 0 : w.map((x, R) => /* @__PURE__ */ ve(
856
879
  "div",
857
880
  {
858
- className: "builder-column div-ac8f4142-2",
881
+ className: "builder-column div-53636e90-2",
859
882
  style: b(R),
860
883
  key: R
861
884
  },
862
- /* @__PURE__ */ c(
885
+ /* @__PURE__ */ s(
863
886
  ie,
864
887
  {
865
888
  path: `component.options.columns.${R}.blocks`,
@@ -876,10 +899,10 @@ function lt(e) {
876
899
  ]
877
900
  }
878
901
  ),
879
- /* @__PURE__ */ c("style", { children: `.div-ac8f4142 {
902
+ /* @__PURE__ */ s("style", { children: `.div-53636e90 {
880
903
  display: flex;
881
904
  line-height: normal;
882
- }.div-ac8f4142-2 {
905
+ }.div-53636e90-2 {
883
906
  display: flex;
884
907
  flex-direction: column;
885
908
  align-items: stretch;
@@ -887,14 +910,14 @@ function lt(e) {
887
910
  ] });
888
911
  }
889
912
  function ct(e) {
890
- return /* @__PURE__ */ c("span", { children: e.children });
913
+ return /* @__PURE__ */ s("span", { children: e.children });
891
914
  }
892
915
  function fe(e) {
893
916
  return e.replace(/http(s)?:/, "");
894
917
  }
895
918
  function st(e = "", t, n) {
896
- const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), a = e.indexOf("?") !== -1 ? "&" : "?";
897
- return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + a + t + "=" + encodeURIComponent(n);
919
+ const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
920
+ return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
898
921
  }
899
922
  function dt(e, t) {
900
923
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
@@ -903,8 +926,8 @@ function dt(e, t) {
903
926
  return fe(e);
904
927
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
905
928
  if (n) {
906
- const i = e.split(n[0]), a = n[3], o = t.match("x") ? t : `${t}x`;
907
- return fe(`${i[0]}_${o}${a}`);
929
+ const i = e.split(n[0]), o = n[3], a = t.match("x") ? t : `${t}x`;
930
+ return fe(`${i[0]}_${a}${o}`);
908
931
  }
909
932
  return null;
910
933
  }
@@ -915,45 +938,45 @@ function J(e) {
915
938
  if (e.match(/builder\.io/)) {
916
939
  let n = e;
917
940
  const i = Number(e.split("?width=")[1]);
918
- return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${st(e, "width", a)} ${a}w`).concat([n]).join(", ");
941
+ return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${st(e, "width", o)} ${o}w`).concat([n]).join(", ");
919
942
  }
920
943
  return e.match(/cdn\.shopify\.com/) ? t.map((n) => [dt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
921
944
  }
922
945
  function ut(e) {
923
- var a, o, r, d;
946
+ var o, a, r, l;
924
947
  function t() {
925
948
  var u;
926
- const s = e.image || e.src;
927
- if (!s || // We can auto add srcset for cdn.builder.io and shopify
949
+ const d = e.image || e.src;
950
+ if (!d || // We can auto add srcset for cdn.builder.io and shopify
928
951
  // images, otherwise you can supply this prop manually
929
- !(s.match(/builder\.io/) || s.match(/cdn\.shopify\.com/)))
952
+ !(d.match(/builder\.io/) || d.match(/cdn\.shopify\.com/)))
930
953
  return e.srcset;
931
954
  if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
932
955
  if (!e.srcset.includes(e.image.split("?")[0]))
933
- return console.debug("Removed given srcset"), J(s);
956
+ return console.debug("Removed given srcset"), J(d);
934
957
  } else if (e.image && !e.srcset)
935
- return J(s);
936
- return J(s);
958
+ return J(d);
959
+ return J(d);
937
960
  }
938
961
  function n() {
939
- var l;
940
- return (l = t == null ? void 0 : t()) != null && l.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
962
+ var c;
963
+ return (c = t == null ? void 0 : t()) != null && c.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
941
964
  }
942
965
  function i() {
943
- const l = {
966
+ const c = {
944
967
  position: "absolute",
945
968
  height: "100%",
946
969
  width: "100%",
947
970
  left: "0px",
948
971
  top: "0px"
949
972
  };
950
- return e.aspectRatio ? l : void 0;
973
+ return e.aspectRatio ? c : void 0;
951
974
  }
952
- return /* @__PURE__ */ $(g, { children: [
953
- /* @__PURE__ */ $(g, { children: [
954
- /* @__PURE__ */ $("picture", { children: [
955
- n() ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c("source", { type: "image/webp", srcSet: n() }) }) : null,
956
- /* @__PURE__ */ c(
975
+ return /* @__PURE__ */ P(g, { children: [
976
+ /* @__PURE__ */ P(g, { children: [
977
+ /* @__PURE__ */ P("picture", { children: [
978
+ n() ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s("source", { type: "image/webp", srcSet: n() }) }) : null,
979
+ /* @__PURE__ */ s(
957
980
  "img",
958
981
  {
959
982
  loading: "lazy",
@@ -964,33 +987,33 @@ function ut(e) {
964
987
  objectFit: e.backgroundSize || "cover",
965
988
  ...i()
966
989
  },
967
- className: "builder-image" + (e.className ? " " + e.className : "") + " img-497e0136",
990
+ className: "builder-image" + (e.className ? " " + e.className : "") + " img-dbab4030",
968
991
  src: e.image,
969
992
  srcSet: t(),
970
993
  sizes: e.sizes
971
994
  }
972
995
  )
973
996
  ] }),
974
- e.aspectRatio && !((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length && e.fitContent) ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
997
+ e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
975
998
  "div",
976
999
  {
977
- className: "builder-image-sizer div-497e0136",
1000
+ className: "builder-image-sizer div-dbab4030",
978
1001
  style: {
979
1002
  paddingTop: e.aspectRatio * 100 + "%"
980
1003
  }
981
1004
  }
982
1005
  ) }) : null,
983
- (d = (r = e.builderBlock) == null ? void 0 : r.children) != null && d.length && e.fitContent ? /* @__PURE__ */ c(g, { children: e.children }) : null,
984
- !e.fitContent && e.children ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c("div", { className: "div-497e0136-2", children: e.children }) }) : null
1006
+ (l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ s(g, { children: e.children }) : null,
1007
+ !e.fitContent && e.children ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s("div", { className: "div-dbab4030-2", children: e.children }) }) : null
985
1008
  ] }),
986
- /* @__PURE__ */ c("style", { children: `.img-497e0136 {
1009
+ /* @__PURE__ */ s("style", { children: `.img-dbab4030 {
987
1010
  opacity: 1;
988
1011
  transition: opacity 0.2s ease-in-out;
989
- }.div-497e0136 {
1012
+ }.div-dbab4030 {
990
1013
  width: 100%;
991
1014
  pointer-events: none;
992
1015
  font-size: 0;
993
- }.div-497e0136-2 {
1016
+ }.div-dbab4030-2 {
994
1017
  display: flex;
995
1018
  flex-direction: column;
996
1019
  align-items: stretch;
@@ -1003,7 +1026,7 @@ function ut(e) {
1003
1026
  ] });
1004
1027
  }
1005
1028
  function mt(e) {
1006
- return /* @__PURE__ */ c(
1029
+ return /* @__PURE__ */ s(
1007
1030
  "section",
1008
1031
  {
1009
1032
  ...e.attributes,
@@ -1023,98 +1046,7 @@ function mt(e) {
1023
1046
  }
1024
1047
  );
1025
1048
  }
1026
- const L = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1027
- ...t,
1028
- testVariationId: t.id,
1029
- id: e == null ? void 0 : e.id
1030
- })), ft = ({
1031
- canTrack: e,
1032
- content: t
1033
- }) => !(!(L(t).length > 0) || !e || F());
1034
- function ht(e, t, n) {
1035
- var r;
1036
- function i() {
1037
- function d(b, S, C) {
1038
- let w = "";
1039
- if (C) {
1040
- const x = /* @__PURE__ */ new Date();
1041
- x.setTime(x.getTime() + C * 24 * 60 * 60 * 1e3), w = "; expires=" + x.toUTCString();
1042
- }
1043
- document.cookie = b + "=" + (S || "") + w + "; path=/; Secure; SameSite=None";
1044
- }
1045
- function l(b) {
1046
- const S = b + "=", C = document.cookie.split(";");
1047
- for (let w = 0; w < C.length; w++) {
1048
- let x = C[w];
1049
- for (; x.charAt(0) === " "; )
1050
- x = x.substring(1, x.length);
1051
- if (x.indexOf(S) === 0)
1052
- return x.substring(S.length, x.length);
1053
- }
1054
- return null;
1055
- }
1056
- const s = `builder.tests.${e}`, u = l(s), h = t.map((b) => b.id).concat(e);
1057
- if (u && h.includes(u))
1058
- return u;
1059
- let y = 0;
1060
- const k = Math.random();
1061
- for (let b = 0; b < t.length; b++) {
1062
- const S = t[b], C = S.testRatio;
1063
- if (y += C, k < y)
1064
- return d(s, S.id), S.id;
1065
- }
1066
- return d(s, e), e;
1067
- }
1068
- const a = i(), o = (r = document.currentScript) == null ? void 0 : r.previousElementSibling;
1069
- if (n) {
1070
- o.remove();
1071
- const d = document.currentScript;
1072
- d == null || d.remove();
1073
- } else {
1074
- const d = t.concat({
1075
- id: e
1076
- }).filter((l) => l.id !== a).map((l) => `.variant-${l.id} { display: none; }
1077
- `).join("");
1078
- o.innerHTML = d;
1079
- }
1080
- }
1081
- function gt(e, t, n) {
1082
- var l;
1083
- if (!navigator.cookieEnabled)
1084
- return;
1085
- function i(s) {
1086
- const u = s + "=", h = document.cookie.split(";");
1087
- for (let y = 0; y < h.length; y++) {
1088
- let k = h[y];
1089
- for (; k.charAt(0) === " "; )
1090
- k = k.substring(1, k.length);
1091
- if (k.indexOf(u) === 0)
1092
- return k.substring(u.length, k.length);
1093
- }
1094
- return null;
1095
- }
1096
- const a = `builder.tests.${t}`, o = i(a), r = (l = document.currentScript) == null ? void 0 : l.parentElement, d = e === t;
1097
- if (o === e) {
1098
- if (d)
1099
- return;
1100
- r == null || r.removeAttribute("hidden"), r == null || r.removeAttribute("aria-hidden");
1101
- } else {
1102
- d && (n ? r == null || r.remove() : (r == null || r.setAttribute("hidden", "true"), r == null || r.setAttribute("aria-hidden", "true")));
1103
- return;
1104
- }
1105
- }
1106
- const bt = (e) => e === "react" || e === "reactNative", Te = bt(M), Re = "builderIoAbTest", Ee = "builderIoRenderContent", xt = () => {
1107
- const e = ht.toString().replace(/\s+/g, " "), t = gt.toString().replace(/\s+/g, " ");
1108
- return `
1109
- window.${Re} = ${e}
1110
- window.${Ee} = ${t}
1111
- `;
1112
- }, yt = (e, t) => `
1113
- window.${Re}("${t}",${JSON.stringify(e)}, ${Te})`, St = ({
1114
- contentId: e,
1115
- variationId: t
1116
- }) => `
1117
- window.${Ee}("${t}", "${e}", ${Te})`, vt = {
1049
+ const ft = {
1118
1050
  name: "Core:Button",
1119
1051
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1120
1052
  defaultStyles: {
@@ -1147,7 +1079,7 @@ const bt = (e) => e === "react" || e === "reactNative", Te = bt(M), Re = "builde
1147
1079
  }],
1148
1080
  static: !0,
1149
1081
  noWrap: !0
1150
- }, pt = {
1082
+ }, ht = {
1151
1083
  // TODO: ways to statically preprocess JSON for references, functions, etc
1152
1084
  name: "Columns",
1153
1085
  isRSC: !0,
@@ -1326,7 +1258,7 @@ const bt = (e) => e === "react" || e === "reactNative", Te = bt(M), Re = "builde
1326
1258
  });
1327
1259
  }
1328
1260
  const n = e.get("columns");
1329
- Array.isArray(n) && n.find((a) => a.get("width")) && (n.find((o) => !o.get("width")) || n.reduce((d, l) => d + l.get("width"), 0) !== 100) && t();
1261
+ Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((l, c) => l + c.get("width"), 0) !== 100) && t();
1330
1262
  }
1331
1263
  }, {
1332
1264
  name: "space",
@@ -1342,19 +1274,137 @@ const bt = (e) => e === "react" || e === "reactNative", Te = bt(M), Re = "builde
1342
1274
  enum: ["tablet", "mobile", "never"],
1343
1275
  advanced: !0
1344
1276
  }, {
1345
- name: "reverseColumnsWhenStacked",
1277
+ name: "reverseColumnsWhenStacked",
1278
+ type: "boolean",
1279
+ defaultValue: !1,
1280
+ helperText: "When stacking columns for mobile devices, reverse the ordering",
1281
+ advanced: !0
1282
+ }]
1283
+ }, gt = {
1284
+ name: "Custom Code",
1285
+ static: !0,
1286
+ requiredPermissions: ["editCode"],
1287
+ inputs: [{
1288
+ name: "code",
1289
+ type: "html",
1290
+ required: !0,
1291
+ defaultValue: "<p>Hello there, I am custom HTML code!</p>",
1292
+ code: !0
1293
+ }, {
1294
+ name: "replaceNodes",
1295
+ type: "boolean",
1296
+ helperText: "Preserve server rendered dom nodes",
1297
+ advanced: !0
1298
+ }, {
1299
+ name: "scriptsClientOnly",
1346
1300
  type: "boolean",
1347
1301
  defaultValue: !1,
1348
- helperText: "When stacking columns for mobile devices, reverse the ordering",
1302
+ helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1349
1303
  advanced: !0
1350
1304
  }]
1351
- }, kt = {
1305
+ };
1306
+ function bt(e) {
1307
+ const t = Z(null), [n, i] = I(() => []), [o, a] = I(() => []);
1308
+ return B(() => {
1309
+ var l;
1310
+ if (!((l = t.current) != null && l.getElementsByTagName) || typeof window > "u")
1311
+ return;
1312
+ const r = t.current.getElementsByTagName("script");
1313
+ for (let c = 0; c < r.length; c++) {
1314
+ const d = r[c];
1315
+ if (d.src) {
1316
+ if (n.includes(d.src))
1317
+ continue;
1318
+ n.push(d.src);
1319
+ const u = document.createElement("script");
1320
+ u.async = !0, u.src = d.src, document.head.appendChild(u);
1321
+ } else if (!d.type || [
1322
+ "text/javascript",
1323
+ "application/javascript",
1324
+ "application/ecmascript"
1325
+ ].includes(d.type)) {
1326
+ if (o.includes(d.innerText))
1327
+ continue;
1328
+ try {
1329
+ o.push(d.innerText), new Function(d.innerText)();
1330
+ } catch (u) {
1331
+ console.warn("`CustomCode`: Error running script:", u);
1332
+ }
1333
+ }
1334
+ }
1335
+ }, []), /* @__PURE__ */ s(
1336
+ "div",
1337
+ {
1338
+ ref: t,
1339
+ className: "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : ""),
1340
+ dangerouslySetInnerHTML: { __html: e.code }
1341
+ }
1342
+ );
1343
+ }
1344
+ const xt = {
1345
+ name: "Embed",
1346
+ static: !0,
1347
+ inputs: [{
1348
+ name: "url",
1349
+ type: "url",
1350
+ required: !0,
1351
+ defaultValue: "",
1352
+ helperText: "e.g. enter a youtube url, google map, etc",
1353
+ onChange: (e) => {
1354
+ const t = e.get("url");
1355
+ if (t)
1356
+ return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((i) => i.json()).then((i) => {
1357
+ e.get("url") === t && (i.html ? e.set("content", i.html) : e.set("content", "Invalid url, please try another"));
1358
+ }).catch((i) => {
1359
+ e.set("content", "There was an error embedding this URL, please try again or another URL");
1360
+ });
1361
+ e.delete("content");
1362
+ }
1363
+ }, {
1364
+ name: "content",
1365
+ type: "html",
1366
+ defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1367
+ hideFromUI: !0
1368
+ }]
1369
+ }, yt = ["text/javascript", "application/javascript", "application/ecmascript"], St = (e) => yt.includes(e.type);
1370
+ function vt(e) {
1371
+ const t = Z(null), [n, i] = I(() => []), [o, a] = I(() => []), [r, l] = I(() => !1);
1372
+ function c() {
1373
+ if (!t.current || !t.current.getElementsByTagName)
1374
+ return;
1375
+ const d = t.current.getElementsByTagName("script");
1376
+ for (let u = 0; u < d.length; u++) {
1377
+ const h = d[u];
1378
+ if (h.src && !n.includes(h.src)) {
1379
+ n.push(h.src);
1380
+ const y = document.createElement("script");
1381
+ y.async = !0, y.src = h.src, document.head.appendChild(y);
1382
+ } else if (St(h) && !o.includes(h.innerText))
1383
+ try {
1384
+ o.push(h.innerText), new Function(h.innerText)();
1385
+ } catch (y) {
1386
+ console.warn("`Embed`: Error running script:", y);
1387
+ }
1388
+ }
1389
+ }
1390
+ return B(() => {
1391
+ t.current && !r && (l(!0), c());
1392
+ }, [t.current, r]), /* @__PURE__ */ s(
1393
+ "div",
1394
+ {
1395
+ className: "builder-embed",
1396
+ ref: t,
1397
+ dangerouslySetInnerHTML: { __html: e.content }
1398
+ }
1399
+ );
1400
+ }
1401
+ const pt = {
1352
1402
  name: "Fragment",
1353
1403
  static: !0,
1354
1404
  hidden: !0,
1355
1405
  canHaveChildren: !0,
1356
1406
  noWrap: !0
1357
- }, Ct = {
1407
+ }, kt = {
1358
1408
  name: "Image",
1359
1409
  static: !0,
1360
1410
  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",
@@ -1374,29 +1424,29 @@ const bt = (e) => e === "react" || e === "reactNative", Te = bt(M), Re = "builde
1374
1424
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1375
1425
  onChange: (e) => {
1376
1426
  e.delete("srcset"), e.delete("noWebp");
1377
- function n(r, d = 6e4) {
1378
- return new Promise((l, s) => {
1427
+ function n(r, l = 6e4) {
1428
+ return new Promise((c, d) => {
1379
1429
  const u = document.createElement("img");
1380
1430
  let h = !1;
1381
1431
  u.onload = () => {
1382
- h = !0, l(u);
1432
+ h = !0, c(u);
1383
1433
  }, u.addEventListener("error", (y) => {
1384
- console.warn("Image load failed", y.error), s(y.error);
1434
+ console.warn("Image load failed", y.error), d(y.error);
1385
1435
  }), u.src = r, setTimeout(() => {
1386
- h || s(new Error("Image load timed out"));
1387
- }, d);
1436
+ h || d(new Error("Image load timed out"));
1437
+ }, l);
1388
1438
  });
1389
1439
  }
1390
1440
  function i(r) {
1391
1441
  return Math.round(r * 1e3) / 1e3;
1392
1442
  }
1393
- const a = e.get("image"), o = e.get("aspectRatio");
1394
- if (fetch(a).then((r) => r.blob()).then((r) => {
1443
+ const o = e.get("image"), a = e.get("aspectRatio");
1444
+ if (fetch(o).then((r) => r.blob()).then((r) => {
1395
1445
  r.type.includes("svg") && e.set("noWebp", !0);
1396
- }), a && (!o || o === 0.7041))
1397
- return n(a).then((r) => {
1398
- const d = e.get("aspectRatio");
1399
- e.get("image") === a && (!d || d === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1446
+ }), o && (!a || a === 0.7041))
1447
+ return n(o).then((r) => {
1448
+ const l = e.get("aspectRatio");
1449
+ e.get("image") === o && (!l || l === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1400
1450
  });
1401
1451
  }
1402
1452
  }, {
@@ -1454,7 +1504,37 @@ const bt = (e) => e === "react" || e === "reactNative", Te = bt(M), Re = "builde
1454
1504
  advanced: !0,
1455
1505
  defaultValue: 0.7041
1456
1506
  }]
1457
- }, wt = {
1507
+ }, Ct = {
1508
+ // friendlyName?
1509
+ name: "Raw:Img",
1510
+ hideFromInsertMenu: !0,
1511
+ 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",
1512
+ inputs: [{
1513
+ name: "image",
1514
+ bubble: !0,
1515
+ type: "file",
1516
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
1517
+ required: !0
1518
+ }],
1519
+ noWrap: !0,
1520
+ static: !0
1521
+ };
1522
+ function wt(e) {
1523
+ return /* @__PURE__ */ s(
1524
+ "img",
1525
+ {
1526
+ style: {
1527
+ objectFit: e.backgroundSize || "cover",
1528
+ objectPosition: e.backgroundPosition || "center"
1529
+ },
1530
+ alt: e.altText,
1531
+ src: e.imgSrc || e.image,
1532
+ ...e.attributes
1533
+ },
1534
+ V() && e.imgSrc || "default-key"
1535
+ );
1536
+ }
1537
+ const It = {
1458
1538
  name: "Core:Section",
1459
1539
  static: !0,
1460
1540
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1493,7 +1573,7 @@ const bt = (e) => e === "react" || e === "reactNative", Te = bt(M), Re = "builde
1493
1573
  }
1494
1574
  }
1495
1575
  }]
1496
- }, It = {
1576
+ }, Tt = {
1497
1577
  name: "Symbol",
1498
1578
  noWrap: !0,
1499
1579
  static: !0,
@@ -1526,7 +1606,7 @@ const bt = (e) => e === "react" || e === "reactNative", Te = bt(M), Re = "builde
1526
1606
  hideFromUI: !0,
1527
1607
  type: "boolean"
1528
1608
  }]
1529
- }, Tt = {
1609
+ }, Rt = {
1530
1610
  name: "Text",
1531
1611
  static: !0,
1532
1612
  isRSC: !0,
@@ -1545,9 +1625,9 @@ const bt = (e) => e === "react" || e === "reactNative", Te = bt(M), Re = "builde
1545
1625
  textAlign: "center"
1546
1626
  }
1547
1627
  };
1548
- function Rt(e) {
1628
+ function Et(e) {
1549
1629
  var t;
1550
- return /* @__PURE__ */ c(
1630
+ return /* @__PURE__ */ s(
1551
1631
  "div",
1552
1632
  {
1553
1633
  className: "builder-text",
@@ -1558,7 +1638,7 @@ function Rt(e) {
1558
1638
  }
1559
1639
  );
1560
1640
  }
1561
- const Et = {
1641
+ const Pt = {
1562
1642
  name: "Video",
1563
1643
  canHaveChildren: !0,
1564
1644
  defaultStyles: {
@@ -1640,7 +1720,7 @@ const Et = {
1640
1720
  advanced: !0
1641
1721
  }]
1642
1722
  };
1643
- function $t(e) {
1723
+ function Bt(e) {
1644
1724
  var i;
1645
1725
  function t() {
1646
1726
  return {
@@ -1667,7 +1747,7 @@ function $t(e) {
1667
1747
  ...t()
1668
1748
  };
1669
1749
  }
1670
- return /* @__PURE__ */ c(
1750
+ return /* @__PURE__ */ s(
1671
1751
  "video",
1672
1752
  {
1673
1753
  ...n(),
@@ -1687,282 +1767,184 @@ function $t(e) {
1687
1767
  }
1688
1768
  );
1689
1769
  }
1690
- const Pt = {
1691
- name: "Embed",
1692
- static: !0,
1693
- inputs: [{
1694
- name: "url",
1695
- type: "url",
1696
- required: !0,
1697
- defaultValue: "",
1698
- helperText: "e.g. enter a youtube url, google map, etc",
1699
- onChange: (e) => {
1700
- const t = e.get("url");
1701
- if (t)
1702
- return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((i) => i.json()).then((i) => {
1703
- e.get("url") === t && (i.html ? e.set("content", i.html) : e.set("content", "Invalid url, please try another"));
1704
- }).catch((i) => {
1705
- e.set("content", "There was an error embedding this URL, please try again or another URL");
1706
- });
1707
- e.delete("content");
1708
- }
1709
- }, {
1710
- name: "content",
1711
- type: "html",
1712
- defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1713
- hideFromUI: !0
1714
- }]
1715
- }, At = ["text/javascript", "application/javascript", "application/ecmascript"], Bt = (e) => At.includes(e.type);
1716
- function Vt(e) {
1717
- const t = Z(null), [n, i] = I(() => []), [a, o] = I(() => []), [r, d] = I(() => !1);
1718
- function l() {
1719
- if (!t.current || !t.current.getElementsByTagName)
1720
- return;
1721
- const s = t.current.getElementsByTagName("script");
1722
- for (let u = 0; u < s.length; u++) {
1723
- const h = s[u];
1724
- if (h.src && !n.includes(h.src)) {
1725
- n.push(h.src);
1726
- const y = document.createElement("script");
1727
- y.async = !0, y.src = h.src, document.head.appendChild(y);
1728
- } else if (Bt(h) && !a.includes(h.innerText))
1729
- try {
1730
- a.push(h.innerText), new Function(h.innerText)();
1731
- } catch (y) {
1732
- console.warn("`Embed`: Error running script:", y);
1733
- }
1734
- }
1735
- }
1736
- return P(() => {
1737
- t.current && !r && (d(!0), l());
1738
- }, [t.current, r]), /* @__PURE__ */ c(
1739
- "div",
1740
- {
1741
- className: "builder-embed",
1742
- ref: t,
1743
- dangerouslySetInnerHTML: { __html: e.content }
1744
- }
1745
- );
1746
- }
1747
- function Ft(e) {
1748
- return /* @__PURE__ */ c(
1749
- "img",
1750
- {
1751
- style: {
1752
- objectFit: e.backgroundSize || "cover",
1753
- objectPosition: e.backgroundPosition || "center"
1754
- },
1755
- alt: e.altText,
1756
- src: e.imgSrc || e.image,
1757
- ...e.attributes
1758
- },
1759
- V() && e.imgSrc || "default-key"
1760
- );
1761
- }
1762
- const Nt = {
1763
- // friendlyName?
1764
- name: "Raw:Img",
1765
- hideFromInsertMenu: !0,
1766
- 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",
1767
- inputs: [{
1768
- name: "image",
1769
- bubble: !0,
1770
- type: "file",
1771
- allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
1772
- required: !0
1773
- }],
1774
- noWrap: !0,
1775
- static: !0
1776
- };
1777
- function Wt(e) {
1778
- const t = Z(null), [n, i] = I(() => []), [a, o] = I(() => []);
1779
- return P(() => {
1780
- var d;
1781
- if (!((d = t.current) != null && d.getElementsByTagName) || typeof window > "u")
1782
- return;
1783
- const r = t.current.getElementsByTagName("script");
1784
- for (let l = 0; l < r.length; l++) {
1785
- const s = r[l];
1786
- if (s.src) {
1787
- if (n.includes(s.src))
1788
- continue;
1789
- n.push(s.src);
1790
- const u = document.createElement("script");
1791
- u.async = !0, u.src = s.src, document.head.appendChild(u);
1792
- } else if (!s.type || [
1793
- "text/javascript",
1794
- "application/javascript",
1795
- "application/ecmascript"
1796
- ].includes(s.type)) {
1797
- if (a.includes(s.innerText))
1798
- continue;
1799
- try {
1800
- a.push(s.innerText), new Function(s.innerText)();
1801
- } catch (u) {
1802
- console.warn("`CustomCode`: Error running script:", u);
1803
- }
1804
- }
1805
- }
1806
- }, []), /* @__PURE__ */ c(
1807
- "div",
1808
- {
1809
- ref: t,
1810
- className: "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : ""),
1811
- dangerouslySetInnerHTML: { __html: e.code }
1812
- }
1813
- );
1814
- }
1815
- const jt = {
1816
- name: "Custom Code",
1817
- static: !0,
1818
- requiredPermissions: ["editCode"],
1819
- inputs: [{
1820
- name: "code",
1821
- type: "html",
1822
- required: !0,
1823
- defaultValue: "<p>Hello there, I am custom HTML code!</p>",
1824
- code: !0
1825
- }, {
1826
- name: "replaceNodes",
1827
- type: "boolean",
1828
- helperText: "Preserve server rendered dom nodes",
1829
- advanced: !0
1830
- }, {
1831
- name: "scriptsClientOnly",
1832
- type: "boolean",
1833
- defaultValue: !1,
1834
- helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1835
- advanced: !0
1836
- }]
1837
- }, he = () => [{
1770
+ const he = () => [{
1838
1771
  component: je,
1839
- ...vt
1772
+ ...ft
1840
1773
  }, {
1841
1774
  component: lt,
1842
- ...pt
1775
+ ...ht
1843
1776
  }, {
1844
- component: Wt,
1845
- ...jt
1777
+ component: bt,
1778
+ ...gt
1846
1779
  }, {
1847
- component: Vt,
1848
- ...Pt
1780
+ component: vt,
1781
+ ...xt
1849
1782
  }, {
1850
1783
  component: ct,
1851
- ...kt
1784
+ ...pt
1852
1785
  }, {
1853
1786
  component: ut,
1854
- ...Ct
1787
+ ...kt
1855
1788
  }, {
1856
- component: Ft,
1857
- ...Nt
1789
+ component: wt,
1790
+ ...Ct
1858
1791
  }, {
1859
1792
  component: mt,
1860
- ...wt
1861
- }, {
1862
- component: Xt,
1863
1793
  ...It
1864
1794
  }, {
1865
- component: Rt,
1795
+ component: Xt,
1866
1796
  ...Tt
1867
1797
  }, {
1868
- component: $t,
1869
- ...Et
1870
- }], Mt = (e) => {
1871
- var o;
1872
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = e.fileUrl ?? ((o = e == null ? void 0 : e.files) == null ? void 0 : o.regular);
1873
- let a = "";
1874
- if (i && t && n && (a += `
1875
- @font-face {
1876
- font-family: "${t}";
1877
- src: local("${n}"), url('${i}') format('woff2');
1878
- font-display: fallback;
1879
- font-weight: 400;
1880
- }
1881
- `.trim()), e.files)
1882
- for (const r in e.files) {
1883
- if (!(String(Number(r)) === r))
1884
- continue;
1885
- const l = e.files[r];
1886
- l && l !== i && (a += `
1887
- @font-face {
1888
- font-family: "${t}";
1889
- src: url('${l}') format('woff2');
1890
- font-display: fallback;
1891
- font-weight: ${r};
1892
- }
1893
- `.trim());
1798
+ component: Et,
1799
+ ...Rt
1800
+ }, {
1801
+ component: Bt,
1802
+ ...Pt
1803
+ }], L = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1804
+ ...t,
1805
+ testVariationId: t.id,
1806
+ id: e == null ? void 0 : e.id
1807
+ })), $t = ({
1808
+ canTrack: e,
1809
+ content: t
1810
+ }) => !(!(L(t).length > 0) || !e || F());
1811
+ function At(e, t, n) {
1812
+ var r;
1813
+ function i() {
1814
+ function l(b, S, C) {
1815
+ let w = "";
1816
+ if (C) {
1817
+ const x = /* @__PURE__ */ new Date();
1818
+ x.setTime(x.getTime() + C * 24 * 60 * 60 * 1e3), w = "; expires=" + x.toUTCString();
1819
+ }
1820
+ document.cookie = b + "=" + (S || "") + w + "; path=/; Secure; SameSite=None";
1894
1821
  }
1895
- return a;
1896
- }, Lt = ({
1897
- customFonts: e
1898
- }) => {
1899
- var t;
1900
- return ((t = e == null ? void 0 : e.map((n) => Mt(n))) == null ? void 0 : t.join(" ")) || "";
1901
- }, _t = ({
1902
- cssCode: e,
1903
- contentId: t
1904
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
1905
- function Ut(e) {
1906
- const [t, n] = I(
1907
- () => `
1908
- ${_t({
1909
- cssCode: e.cssCode,
1910
- contentId: e.contentId
1911
- })}
1912
- ${Lt({
1913
- customFonts: e.customFonts
1914
- })}
1915
-
1916
- .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
1917
- margin: 0;
1822
+ function c(b) {
1823
+ const S = b + "=", C = document.cookie.split(";");
1824
+ for (let w = 0; w < C.length; w++) {
1825
+ let x = C[w];
1826
+ for (; x.charAt(0) === " "; )
1827
+ x = x.substring(1, x.length);
1828
+ if (x.indexOf(S) === 0)
1829
+ return x.substring(S.length, x.length);
1830
+ }
1831
+ return null;
1832
+ }
1833
+ const d = `builder.tests.${e}`, u = c(d), h = t.map((b) => b.id).concat(e);
1834
+ if (u && h.includes(u))
1835
+ return u;
1836
+ let y = 0;
1837
+ const k = Math.random();
1838
+ for (let b = 0; b < t.length; b++) {
1839
+ const S = t[b], C = S.testRatio;
1840
+ if (y += C, k < y)
1841
+ return l(d, S.id), S.id;
1842
+ }
1843
+ return l(d, e), e;
1844
+ }
1845
+ const o = i(), a = (r = document.currentScript) == null ? void 0 : r.previousElementSibling;
1846
+ if (n) {
1847
+ a.remove();
1848
+ const l = document.currentScript;
1849
+ l == null || l.remove();
1850
+ } else {
1851
+ const l = t.concat({
1852
+ id: e
1853
+ }).filter((c) => c.id !== o).map((c) => `.variant-${c.id} { display: none; }
1854
+ `).join("");
1855
+ a.innerHTML = l;
1856
+ }
1918
1857
  }
1919
- .builder-text > p, .builder-text > .builder-paragraph {
1920
- color: inherit;
1921
- line-height: inherit;
1922
- letter-spacing: inherit;
1923
- font-weight: inherit;
1924
- font-size: inherit;
1925
- text-align: inherit;
1926
- font-family: inherit;
1858
+ function Vt(e, t, n) {
1859
+ var c;
1860
+ if (!navigator.cookieEnabled)
1861
+ return;
1862
+ function i(d) {
1863
+ const u = d + "=", h = document.cookie.split(";");
1864
+ for (let y = 0; y < h.length; y++) {
1865
+ let k = h[y];
1866
+ for (; k.charAt(0) === " "; )
1867
+ k = k.substring(1, k.length);
1868
+ if (k.indexOf(u) === 0)
1869
+ return k.substring(u.length, k.length);
1870
+ }
1871
+ return null;
1872
+ }
1873
+ const o = `builder.tests.${t}`, a = i(o), r = (c = document.currentScript) == null ? void 0 : c.parentElement, l = e === t;
1874
+ if (a === e) {
1875
+ if (l)
1876
+ return;
1877
+ r == null || r.removeAttribute("hidden"), r == null || r.removeAttribute("aria-hidden");
1878
+ } else {
1879
+ l && (n ? r == null || r.remove() : (r == null || r.setAttribute("hidden", "true"), r == null || r.setAttribute("aria-hidden", "true")));
1880
+ return;
1881
+ }
1927
1882
  }
1928
- `.trim()
1883
+ const Ft = (e) => e === "react" || e === "reactNative", Te = Ft(M), Re = "builderIoAbTest", Ee = "builderIoRenderContent", Nt = () => {
1884
+ const e = At.toString().replace(/\s+/g, " "), t = Vt.toString().replace(/\s+/g, " ");
1885
+ return `
1886
+ window.${Re} = ${e}
1887
+ window.${Ee} = ${t}
1888
+ `;
1889
+ }, Wt = (e, t) => `
1890
+ window.${Re}("${t}",${JSON.stringify(e)}, ${Te})`, jt = ({
1891
+ contentId: e,
1892
+ variationId: t
1893
+ }) => `
1894
+ window.${Ee}("${t}", "${e}", ${Te})`;
1895
+ function X(e) {
1896
+ return /* @__PURE__ */ s(
1897
+ "script",
1898
+ {
1899
+ dangerouslySetInnerHTML: { __html: e.scriptStr },
1900
+ id: e.id
1901
+ }
1929
1902
  );
1930
- return /* @__PURE__ */ c(H, { styles: t });
1931
1903
  }
1932
- const Kt = ({
1933
- content: e,
1934
- data: t,
1935
- locale: n
1904
+ function ge(e) {
1905
+ return Math.round(e * 1e3) / 1e3;
1906
+ }
1907
+ const Mt = (e, t, n = !0) => {
1908
+ if (!(e instanceof HTMLElement))
1909
+ return null;
1910
+ let i = n ? e : e.parentElement;
1911
+ do {
1912
+ if (!i)
1913
+ return null;
1914
+ if (t(i))
1915
+ return i;
1916
+ } while (i = i.parentElement);
1917
+ return null;
1918
+ }, Lt = (e) => Mt(e, (t) => {
1919
+ const n = t.getAttribute("builder-id") || t.id;
1920
+ return (n == null ? void 0 : n.indexOf("builder-")) === 0;
1921
+ }), be = ({
1922
+ event: e,
1923
+ target: t
1936
1924
  }) => {
1937
- var o, r, d;
1938
- const i = {};
1939
- (r = (o = e == null ? void 0 : e.data) == null ? void 0 : o.inputs) == null || r.forEach((l) => {
1940
- var s;
1941
- l.name && l.defaultValue !== void 0 && ((s = e == null ? void 0 : e.data) != null && s.state) && e.data.state[l.name] === void 0 && (i[l.name] = l.defaultValue);
1942
- });
1943
- const a = {
1944
- ...(d = e == null ? void 0 : e.data) == null ? void 0 : d.state,
1945
- ...t,
1946
- ...n ? {
1947
- locale: n
1948
- } : {}
1925
+ const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = ge(i / n.width), r = ge(o / n.height);
1926
+ return {
1927
+ x: a,
1928
+ y: r
1949
1929
  };
1930
+ }, _t = (e) => {
1931
+ const t = e.target, n = t && Lt(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1950
1932
  return {
1951
- ...i,
1952
- ...a
1933
+ targetBuilderElement: i || void 0,
1934
+ metadata: {
1935
+ targetOffset: t ? be({
1936
+ event: e,
1937
+ target: t
1938
+ }) : void 0,
1939
+ builderTargetOffset: n ? be({
1940
+ event: e,
1941
+ target: n
1942
+ }) : void 0,
1943
+ builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
1944
+ }
1953
1945
  };
1954
- }, Ot = ({
1955
- content: e,
1956
- data: t
1957
- }) => e ? {
1958
- ...e,
1959
- data: {
1960
- ...e == null ? void 0 : e.data,
1961
- ...t
1962
- },
1963
- meta: e == null ? void 0 : e.meta
1964
- } : void 0, Ht = "0.7.1-1", zt = () => {
1965
- Be("insertMenu", {
1946
+ }, Ut = "0.7.1", Ot = () => {
1947
+ Ae("insertMenu", {
1966
1948
  name: "_default",
1967
1949
  default: !0,
1968
1950
  items: [{
@@ -1984,14 +1966,14 @@ const Kt = ({
1984
1966
  }]
1985
1967
  });
1986
1968
  };
1987
- let ge = !1;
1988
- const qt = (e = {}) => {
1969
+ let xe = !1;
1970
+ const Kt = (e = {}) => {
1989
1971
  var t, n;
1990
- ge || (ge = !0, F() && ((t = window.parent) == null || t.postMessage({
1972
+ xe || (xe = !0, F() && ((t = window.parent) == null || t.postMessage({
1991
1973
  type: "builder.sdkInfo",
1992
1974
  data: {
1993
1975
  target: M,
1994
- version: Ht,
1976
+ version: Ut,
1995
1977
  supportsPatchUpdates: !1,
1996
1978
  // Supports builder-model="..." attribute which is needed to
1997
1979
  // scope our '+ add block' button styling
@@ -2006,21 +1988,21 @@ const qt = (e = {}) => {
2006
1988
  }, "*"), window.addEventListener("message", ({
2007
1989
  data: i
2008
1990
  }) => {
2009
- var a, o;
1991
+ var o, a;
2010
1992
  if (i != null && i.type)
2011
1993
  switch (i.type) {
2012
1994
  case "builder.evaluate": {
2013
- const r = i.data.text, d = i.data.arguments || [], l = i.data.id, s = new Function(r);
1995
+ const r = i.data.text, l = i.data.arguments || [], c = i.data.id, d = new Function(r);
2014
1996
  let u, h = null;
2015
1997
  try {
2016
- u = s.apply(null, d);
1998
+ u = d.apply(null, l);
2017
1999
  } catch (y) {
2018
2000
  h = y;
2019
2001
  }
2020
- h ? (a = window.parent) == null || a.postMessage({
2002
+ h ? (o = window.parent) == null || o.postMessage({
2021
2003
  type: "builder.evaluateError",
2022
2004
  data: {
2023
- id: l,
2005
+ id: c,
2024
2006
  error: h.message
2025
2007
  }
2026
2008
  }, "*") : u && typeof u.then == "function" ? u.then((y) => {
@@ -2028,15 +2010,15 @@ const qt = (e = {}) => {
2028
2010
  (k = window.parent) == null || k.postMessage({
2029
2011
  type: "builder.evaluateResult",
2030
2012
  data: {
2031
- id: l,
2013
+ id: c,
2032
2014
  result: y
2033
2015
  }
2034
2016
  }, "*");
2035
- }).catch(console.error) : (o = window.parent) == null || o.postMessage({
2017
+ }).catch(console.error) : (a = window.parent) == null || a.postMessage({
2036
2018
  type: "builder.evaluateResult",
2037
2019
  data: {
2038
2020
  result: u,
2039
- id: l
2021
+ id: c
2040
2022
  }
2041
2023
  }, "*");
2042
2024
  break;
@@ -2044,54 +2026,11 @@ const qt = (e = {}) => {
2044
2026
  }
2045
2027
  })));
2046
2028
  };
2047
- function be(e) {
2048
- return Math.round(e * 1e3) / 1e3;
2049
- }
2050
- const Dt = (e, t, n = !0) => {
2051
- if (!(e instanceof HTMLElement))
2052
- return null;
2053
- let i = n ? e : e.parentElement;
2054
- do {
2055
- if (!i)
2056
- return null;
2057
- if (t(i))
2058
- return i;
2059
- } while (i = i.parentElement);
2060
- return null;
2061
- }, Gt = (e) => Dt(e, (t) => {
2062
- const n = t.getAttribute("builder-id") || t.id;
2063
- return (n == null ? void 0 : n.indexOf("builder-")) === 0;
2064
- }), xe = ({
2065
- event: e,
2066
- target: t
2067
- }) => {
2068
- const n = t.getBoundingClientRect(), i = e.clientX - n.left, a = e.clientY - n.top, o = be(i / n.width), r = be(a / n.height);
2069
- return {
2070
- x: o,
2071
- y: r
2072
- };
2073
- }, Jt = (e) => {
2074
- const t = e.target, n = t && Gt(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2075
- return {
2076
- targetBuilderElement: i || void 0,
2077
- metadata: {
2078
- targetOffset: t ? xe({
2079
- event: e,
2080
- target: t
2081
- }) : void 0,
2082
- builderTargetOffset: n ? xe({
2083
- event: e,
2084
- target: n
2085
- }) : void 0,
2086
- builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
2087
- }
2088
- };
2089
- };
2090
- function Yt(e) {
2091
- var A, B, N, W, q;
2029
+ function Ht(e) {
2030
+ var $, A, N, W, q;
2092
2031
  const t = Z(null), [n, i] = I(() => 0);
2093
- function a(m) {
2094
- var v, p, T, E, ae;
2032
+ function o(m) {
2033
+ var v, p, T, E, oe;
2095
2034
  const f = {
2096
2035
  ...e.builderContextSignal.content,
2097
2036
  ...m,
@@ -2102,19 +2041,19 @@ function Yt(e) {
2102
2041
  meta: {
2103
2042
  ...(p = e.builderContextSignal.content) == null ? void 0 : p.meta,
2104
2043
  ...m == null ? void 0 : m.meta,
2105
- breakpoints: ((T = m == null ? void 0 : m.meta) == null ? void 0 : T.breakpoints) || ((ae = (E = e.builderContextSignal.content) == null ? void 0 : E.meta) == null ? void 0 : ae.breakpoints)
2044
+ breakpoints: ((T = m == null ? void 0 : m.meta) == null ? void 0 : T.breakpoints) || ((oe = (E = e.builderContextSignal.content) == null ? void 0 : E.meta) == null ? void 0 : oe.breakpoints)
2106
2045
  }
2107
2046
  };
2108
- e.setBuilderContextSignal((Pe) => ({
2109
- ...Pe,
2047
+ e.setBuilderContextSignal((Be) => ({
2048
+ ...Be,
2110
2049
  content: f
2111
2050
  }));
2112
2051
  }
2113
2052
  I(() => 0);
2114
- const [o, r] = I(
2053
+ const [a, r] = I(
2115
2054
  () => !1
2116
2055
  );
2117
- function d(m) {
2056
+ function l(m) {
2118
2057
  var v;
2119
2058
  const { data: f } = m;
2120
2059
  if (f)
@@ -2123,7 +2062,7 @@ function Yt(e) {
2123
2062
  const p = f.data, { breakpoints: T, contentId: E } = p;
2124
2063
  if (!E || E !== ((v = e.builderContextSignal.content) == null ? void 0 : v.id))
2125
2064
  return;
2126
- T && a({
2065
+ T && o({
2127
2066
  meta: {
2128
2067
  breakpoints: T
2129
2068
  }
@@ -2132,12 +2071,12 @@ function Yt(e) {
2132
2071
  }
2133
2072
  case "builder.contentUpdate": {
2134
2073
  const p = f.data, T = p.key || p.alias || p.entry || p.modelName, E = p.data;
2135
- T === e.model && (a(E), i(n + 1));
2074
+ T === e.model && (o(E), i(n + 1));
2136
2075
  break;
2137
2076
  }
2138
2077
  }
2139
2078
  }
2140
- function l() {
2079
+ function c() {
2141
2080
  var f, v;
2142
2081
  const m = (v = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : v.jsCode;
2143
2082
  m && j({
@@ -2148,7 +2087,7 @@ function Yt(e) {
2148
2087
  rootSetState: e.builderContextSignal.rootSetState
2149
2088
  });
2150
2089
  }
2151
- const [s, u] = I(() => ({})), [h, y] = I(() => !1);
2090
+ const [d, u] = I(() => ({})), [h, y] = I(() => !1);
2152
2091
  function k(m) {
2153
2092
  var f, v;
2154
2093
  if (e.builderContextSignal.content) {
@@ -2159,7 +2098,7 @@ function Yt(e) {
2159
2098
  contentId: T,
2160
2099
  apiKey: e.apiKey,
2161
2100
  variationId: p !== T ? p : void 0,
2162
- ...Jt(m),
2101
+ ..._t(m),
2163
2102
  unique: !h
2164
2103
  });
2165
2104
  }
@@ -2184,7 +2123,7 @@ function Yt(e) {
2184
2123
  ...e.builderContextSignal.rootState,
2185
2124
  [f]: v
2186
2125
  };
2187
- (E = (T = e.builderContextSignal).rootSetState) == null || E.call(T, p), s[f] = !0;
2126
+ (E = (T = e.builderContextSignal).rootSetState) == null || E.call(T, p), d[f] = !0;
2188
2127
  }).catch((v) => {
2189
2128
  console.error("error fetching dynamic data", m, v);
2190
2129
  });
@@ -2193,7 +2132,7 @@ function Yt(e) {
2193
2132
  var f, v;
2194
2133
  const m = ((v = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : v.httpRequests) ?? {};
2195
2134
  Object.entries(m).forEach(([p, T]) => {
2196
- if (T && (!s[p] || V())) {
2135
+ if (T && (!d[p] || V())) {
2197
2136
  const E = b(T);
2198
2137
  S({
2199
2138
  url: E,
@@ -2218,7 +2157,7 @@ function Yt(e) {
2218
2157
  );
2219
2158
  }
2220
2159
  function x(m) {
2221
- i(n + 1), window.addEventListener("message", d), zt(), qt({
2160
+ i(n + 1), window.addEventListener("message", l), Ot(), Kt({
2222
2161
  ...e.locale ? {
2223
2162
  locale: e.locale
2224
2163
  } : {},
@@ -2248,10 +2187,10 @@ function Yt(e) {
2248
2187
  apiKey: e.apiKey,
2249
2188
  apiVersion: e.builderContextSignal.apiVersion
2250
2189
  }).then((E) => {
2251
- E && a(E);
2190
+ E && o(E);
2252
2191
  });
2253
2192
  }
2254
- return P(() => {
2193
+ return B(() => {
2255
2194
  var m;
2256
2195
  return (m = t.current) == null || m.addEventListener(
2257
2196
  "initeditingbldr",
@@ -2263,7 +2202,7 @@ function Yt(e) {
2263
2202
  x
2264
2203
  );
2265
2204
  };
2266
- }, []), P(() => {
2205
+ }, []), B(() => {
2267
2206
  var m;
2268
2207
  return (m = t.current) == null || m.addEventListener(
2269
2208
  "initpreviewingbldr",
@@ -2275,7 +2214,7 @@ function Yt(e) {
2275
2214
  R
2276
2215
  );
2277
2216
  };
2278
- }, []), P(() => {
2217
+ }, []), B(() => {
2279
2218
  var m, f;
2280
2219
  if (F()) {
2281
2220
  if (V() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && U(e.canTrack)) {
@@ -2290,28 +2229,28 @@ function Yt(e) {
2290
2229
  }
2291
2230
  Ve() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
2292
2231
  }
2293
- }, []), P(() => {
2232
+ }, []), B(() => {
2294
2233
  e.apiKey || _.error(
2295
2234
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2296
- ), l(), C(), w();
2297
- }, []), P(() => {
2298
- e.content && a(e.content);
2299
- }, [e.content]), P(() => {
2300
- }, [o]), P(() => {
2301
- l();
2235
+ ), c(), C(), w();
2236
+ }, []), B(() => {
2237
+ e.content && o(e.content);
2238
+ }, [e.content]), B(() => {
2239
+ }, [a]), B(() => {
2240
+ c();
2302
2241
  }, [
2303
- (B = (A = e.builderContextSignal.content) == null ? void 0 : A.data) == null ? void 0 : B.jsCode,
2242
+ (A = ($ = e.builderContextSignal.content) == null ? void 0 : $.data) == null ? void 0 : A.jsCode,
2304
2243
  e.builderContextSignal.rootState
2305
- ]), P(() => {
2244
+ ]), B(() => {
2306
2245
  C();
2307
- }, [(W = (N = e.builderContextSignal.content) == null ? void 0 : N.data) == null ? void 0 : W.httpRequests]), P(() => {
2246
+ }, [(W = (N = e.builderContextSignal.content) == null ? void 0 : N.data) == null ? void 0 : W.httpRequests]), B(() => {
2308
2247
  w();
2309
- }, [e.builderContextSignal.rootState]), P(() => () => {
2310
- F() && (window.removeEventListener("message", d), window.removeEventListener(
2248
+ }, [e.builderContextSignal.rootState]), B(() => () => {
2249
+ F() && (window.removeEventListener("message", l), window.removeEventListener(
2311
2250
  "builder:component:stateChangeListenerActivated",
2312
2251
  w
2313
2252
  ));
2314
- }, []), /* @__PURE__ */ c(ne.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ ve(
2253
+ }, []), /* @__PURE__ */ s(te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ ve(
2315
2254
  "div",
2316
2255
  {
2317
2256
  key: n,
@@ -2328,21 +2267,107 @@ function Yt(e) {
2328
2267
  e.children
2329
2268
  ) }) : null });
2330
2269
  }
2331
- function X(e) {
2332
- return /* @__PURE__ */ c(
2333
- "script",
2334
- {
2335
- dangerouslySetInnerHTML: { __html: e.scriptStr },
2336
- id: e.id
2270
+ const zt = (e) => {
2271
+ var a;
2272
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = e.fileUrl ?? ((a = e == null ? void 0 : e.files) == null ? void 0 : a.regular);
2273
+ let o = "";
2274
+ if (i && t && n && (o += `
2275
+ @font-face {
2276
+ font-family: "${t}";
2277
+ src: local("${n}"), url('${i}') format('woff2');
2278
+ font-display: fallback;
2279
+ font-weight: 400;
2280
+ }
2281
+ `.trim()), e.files)
2282
+ for (const r in e.files) {
2283
+ if (!(String(Number(r)) === r))
2284
+ continue;
2285
+ const c = e.files[r];
2286
+ c && c !== i && (o += `
2287
+ @font-face {
2288
+ font-family: "${t}";
2289
+ src: url('${c}') format('woff2');
2290
+ font-display: fallback;
2291
+ font-weight: ${r};
2292
+ }
2293
+ `.trim());
2337
2294
  }
2295
+ return o;
2296
+ }, qt = ({
2297
+ customFonts: e
2298
+ }) => {
2299
+ var t;
2300
+ return ((t = e == null ? void 0 : e.map((n) => zt(n))) == null ? void 0 : t.join(" ")) || "";
2301
+ }, Dt = ({
2302
+ cssCode: e,
2303
+ contentId: t
2304
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
2305
+ function Gt(e) {
2306
+ const [t, n] = I(
2307
+ () => `
2308
+ ${Dt({
2309
+ cssCode: e.cssCode,
2310
+ contentId: e.contentId
2311
+ })}
2312
+ ${qt({
2313
+ customFonts: e.customFonts
2314
+ })}
2315
+
2316
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
2317
+ margin: 0;
2318
+ }
2319
+ .builder-text > p, .builder-text > .builder-paragraph {
2320
+ color: inherit;
2321
+ line-height: inherit;
2322
+ letter-spacing: inherit;
2323
+ font-weight: inherit;
2324
+ font-size: inherit;
2325
+ text-align: inherit;
2326
+ font-family: inherit;
2327
+ }
2328
+ `.trim()
2338
2329
  );
2330
+ return /* @__PURE__ */ s(H, { styles: t });
2339
2331
  }
2332
+ const Jt = ({
2333
+ content: e,
2334
+ data: t,
2335
+ locale: n
2336
+ }) => {
2337
+ var a, r, l;
2338
+ const i = {};
2339
+ (r = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || r.forEach((c) => {
2340
+ var d;
2341
+ c.name && c.defaultValue !== void 0 && ((d = e == null ? void 0 : e.data) != null && d.state) && e.data.state[c.name] === void 0 && (i[c.name] = c.defaultValue);
2342
+ });
2343
+ const o = {
2344
+ ...(l = e == null ? void 0 : e.data) == null ? void 0 : l.state,
2345
+ ...t,
2346
+ ...n ? {
2347
+ locale: n
2348
+ } : {}
2349
+ };
2350
+ return {
2351
+ ...i,
2352
+ ...o
2353
+ };
2354
+ }, Yt = ({
2355
+ content: e,
2356
+ data: t
2357
+ }) => e ? {
2358
+ ...e,
2359
+ data: {
2360
+ ...e == null ? void 0 : e.data,
2361
+ ...t
2362
+ },
2363
+ meta: e == null ? void 0 : e.meta
2364
+ } : void 0;
2340
2365
  function ye(e) {
2341
- var l, s, u, h, y, k, b;
2366
+ var c, d, u, h, y, k, b;
2342
2367
  const [t, n] = I(
2343
2368
  () => {
2344
2369
  var S, C;
2345
- return St({
2370
+ return jt({
2346
2371
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2347
2372
  variationId: (S = e.content) == null ? void 0 : S.testVariationId,
2348
2373
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
@@ -2351,12 +2376,12 @@ function ye(e) {
2351
2376
  }
2352
2377
  );
2353
2378
  function i(S) {
2354
- d((C) => ({
2379
+ l((C) => ({
2355
2380
  ...C,
2356
2381
  rootState: S
2357
2382
  }));
2358
2383
  }
2359
- const [a, o] = I(
2384
+ const [o, a] = I(
2360
2385
  () => [
2361
2386
  ...he(),
2362
2387
  // While this `components` object is deprecated, we must maintain support for it.
@@ -2376,13 +2401,13 @@ function ye(e) {
2376
2401
  }),
2377
2402
  {}
2378
2403
  )
2379
- ), [r, d] = I(() => ({
2380
- content: Ot({
2404
+ ), [r, l] = I(() => ({
2405
+ content: Yt({
2381
2406
  content: e.content,
2382
2407
  data: e.data
2383
2408
  }),
2384
2409
  localState: void 0,
2385
- rootState: Kt({
2410
+ rootState: Jt({
2386
2411
  content: e.content,
2387
2412
  data: e.data,
2388
2413
  locale: e.locale
@@ -2409,14 +2434,14 @@ function ye(e) {
2409
2434
  ),
2410
2435
  inheritedStyles: {}
2411
2436
  }));
2412
- return /* @__PURE__ */ c(
2413
- Ie.Provider,
2437
+ return /* @__PURE__ */ s(
2438
+ ke.Provider,
2414
2439
  {
2415
2440
  value: {
2416
- registeredComponents: a
2441
+ registeredComponents: o
2417
2442
  },
2418
- children: /* @__PURE__ */ $(
2419
- Yt,
2443
+ children: /* @__PURE__ */ P(
2444
+ Ht,
2420
2445
  {
2421
2446
  content: e.content,
2422
2447
  model: e.model,
@@ -2429,23 +2454,23 @@ function ye(e) {
2429
2454
  classNameProp: e.classNameProp,
2430
2455
  showContent: e.showContent,
2431
2456
  builderContextSignal: r,
2432
- setBuilderContextSignal: d,
2457
+ setBuilderContextSignal: l,
2433
2458
  children: [
2434
- e.isSsrAbTest ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(X, { scriptStr: t }) }) : null,
2435
- /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
2436
- Ut,
2459
+ e.isSsrAbTest ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(X, { scriptStr: t }) }) : null,
2460
+ /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
2461
+ Gt,
2437
2462
  {
2438
- contentId: (l = r.content) == null ? void 0 : l.id,
2439
- cssCode: (u = (s = r.content) == null ? void 0 : s.data) == null ? void 0 : u.cssCode,
2463
+ contentId: (c = r.content) == null ? void 0 : c.id,
2464
+ cssCode: (u = (d = r.content) == null ? void 0 : d.data) == null ? void 0 : u.cssCode,
2440
2465
  customFonts: (y = (h = r.content) == null ? void 0 : h.data) == null ? void 0 : y.customFonts
2441
2466
  }
2442
2467
  ) }),
2443
- /* @__PURE__ */ c(
2468
+ /* @__PURE__ */ s(
2444
2469
  ie,
2445
2470
  {
2446
2471
  blocks: (b = (k = r.content) == null ? void 0 : k.data) == null ? void 0 : b.blocks,
2447
2472
  context: r,
2448
- registeredComponents: a
2473
+ registeredComponents: o
2449
2474
  }
2450
2475
  )
2451
2476
  ]
@@ -2454,53 +2479,53 @@ function ye(e) {
2454
2479
  }
2455
2480
  );
2456
2481
  }
2457
- function $e(e) {
2458
- var r, d, l;
2482
+ function Pe(e) {
2483
+ var r, l, c;
2459
2484
  const [t, n] = I(
2460
- () => ft({
2485
+ () => $t({
2461
2486
  canTrack: U(e.canTrack),
2462
2487
  content: e.content
2463
2488
  })
2464
2489
  );
2465
2490
  function i() {
2466
- var s;
2467
- return yt(
2491
+ var d;
2492
+ return Wt(
2468
2493
  L(e.content).map((u) => ({
2469
2494
  id: u.testVariationId,
2470
2495
  testRatio: u.testRatio
2471
2496
  })),
2472
- ((s = e.content) == null ? void 0 : s.id) || ""
2497
+ ((d = e.content) == null ? void 0 : d.id) || ""
2473
2498
  );
2474
2499
  }
2475
- function a() {
2476
- return L(e.content).map((s) => `.variant-${s.testVariationId} { display: none; } `).join("");
2477
- }
2478
2500
  function o() {
2479
- var s;
2501
+ return L(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
2502
+ }
2503
+ function a() {
2504
+ var d;
2480
2505
  return t ? {
2481
2506
  ...e.content,
2482
- testVariationId: (s = e.content) == null ? void 0 : s.id
2507
+ testVariationId: (d = e.content) == null ? void 0 : d.id
2483
2508
  } : We({
2484
2509
  item: e.content,
2485
2510
  canTrack: U(e.canTrack)
2486
2511
  });
2487
2512
  }
2488
- return P(() => {
2489
- }, []), /* @__PURE__ */ $(g, { children: [
2490
- !e.__isNestedRender && M !== "reactNative" ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(X, { scriptStr: xt() }) }) : null,
2491
- t ? /* @__PURE__ */ $(g, { children: [
2492
- /* @__PURE__ */ c(
2513
+ return B(() => {
2514
+ }, []), /* @__PURE__ */ P(g, { children: [
2515
+ !e.__isNestedRender && M !== "reactNative" ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(X, { scriptStr: Nt() }) }) : null,
2516
+ t ? /* @__PURE__ */ P(g, { children: [
2517
+ /* @__PURE__ */ s(
2493
2518
  H,
2494
2519
  {
2495
2520
  id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
2496
- styles: a()
2521
+ styles: o()
2497
2522
  }
2498
2523
  ),
2499
- /* @__PURE__ */ c(X, { scriptStr: i() }),
2500
- (d = L(e.content)) == null ? void 0 : d.map((s) => /* @__PURE__ */ c(
2524
+ /* @__PURE__ */ s(X, { scriptStr: i() }),
2525
+ (l = L(e.content)) == null ? void 0 : l.map((d) => /* @__PURE__ */ s(
2501
2526
  ye,
2502
2527
  {
2503
- content: s,
2528
+ content: d,
2504
2529
  showContent: !1,
2505
2530
  classNameProp: void 0,
2506
2531
  model: e.model,
@@ -2515,14 +2540,14 @@ function $e(e) {
2515
2540
  enrich: e.enrich,
2516
2541
  isSsrAbTest: t
2517
2542
  },
2518
- s.testVariationId
2543
+ d.testVariationId
2519
2544
  ))
2520
2545
  ] }) : null,
2521
- /* @__PURE__ */ c(
2546
+ /* @__PURE__ */ s(
2522
2547
  ye,
2523
2548
  {
2524
- content: o(),
2525
- classNameProp: `variant-${(l = e.content) == null ? void 0 : l.id}`,
2549
+ content: a(),
2550
+ classNameProp: `variant-${(c = e.content) == null ? void 0 : c.id}`,
2526
2551
  showContent: !0,
2527
2552
  model: e.model,
2528
2553
  data: e.data,
@@ -2559,34 +2584,33 @@ const Qt = async ({
2559
2584
  });
2560
2585
  };
2561
2586
  function Xt(e) {
2562
- var o, r, d;
2587
+ var a, r, l;
2563
2588
  function t() {
2564
- var l, s;
2589
+ var c, d;
2565
2590
  return [
2566
2591
  e.attributes.className,
2567
2592
  "builder-symbol",
2568
- (l = e.symbol) != null && l.inline ? "builder-inline-symbol" : void 0,
2569
- (s = e.symbol) != null && s.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2593
+ (c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
2594
+ (d = e.symbol) != null && d.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2570
2595
  ].filter(Boolean).join(" ");
2571
2596
  }
2572
2597
  const [n, i] = I(() => {
2573
- var l;
2574
- return (l = e.symbol) == null ? void 0 : l.content;
2598
+ var c;
2599
+ return (c = e.symbol) == null ? void 0 : c.content;
2575
2600
  });
2576
- function a() {
2601
+ function o() {
2577
2602
  n || Qt({
2578
2603
  symbol: e.symbol,
2579
2604
  builderContextValue: e.builderContext
2580
- }).then((l) => {
2581
- l && i(l);
2605
+ }).then((c) => {
2606
+ c && i(c);
2582
2607
  });
2583
2608
  }
2584
- return P(() => {
2585
- a();
2586
- }, []), P(() => {
2587
- a();
2588
- }, [e.symbol]), /* @__PURE__ */ c("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ c(
2589
- $e,
2609
+ return B(() => {
2610
+ }, []), B(() => {
2611
+ o();
2612
+ }, [e.symbol]), /* @__PURE__ */ s("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ s(
2613
+ Pe,
2590
2614
  {
2591
2615
  __isNestedRender: !0,
2592
2616
  apiVersion: e.builderContext.apiVersion,
@@ -2594,29 +2618,29 @@ function Xt(e) {
2594
2618
  context: e.builderContext.context,
2595
2619
  customComponents: Object.values(e.builderComponents),
2596
2620
  data: {
2597
- ...(o = e.symbol) == null ? void 0 : o.data,
2621
+ ...(a = e.symbol) == null ? void 0 : a.data,
2598
2622
  ...e.builderContext.localState,
2599
2623
  ...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
2600
2624
  },
2601
- model: (d = e.symbol) == null ? void 0 : d.model,
2625
+ model: (l = e.symbol) == null ? void 0 : l.model,
2602
2626
  content: n
2603
2627
  }
2604
2628
  ) });
2605
2629
  }
2606
- const nn = ie, an = $e;
2630
+ const nn = ie, on = Pe;
2607
2631
  export {
2608
2632
  ie as Blocks,
2609
2633
  je as Button,
2610
2634
  lt as Columns,
2611
- $e as Content,
2635
+ Pe as Content,
2612
2636
  ct as Fragment,
2613
2637
  ut as Image,
2614
2638
  nn as RenderBlocks,
2615
- an as RenderContent,
2639
+ on as RenderContent,
2616
2640
  mt as Section,
2617
2641
  Xt as Symbol,
2618
- Rt as Text,
2619
- $t as Video,
2642
+ Et as Text,
2643
+ Bt as Video,
2620
2644
  ln as _processContentResult,
2621
2645
  Fe as createRegisterComponentMessage,
2622
2646
  cn as fetchBuilderProps,
@@ -2627,7 +2651,7 @@ export {
2627
2651
  mn as getContent,
2628
2652
  V as isEditing,
2629
2653
  Ve as isPreviewing,
2630
- Be as register,
2654
+ Ae as register,
2631
2655
  fn as setEditorSettings,
2632
2656
  hn as track
2633
2657
  };