@builder.io/sdk-vue 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/package.json +1 -1
  2. package/packages/_vue2/dist/{block-styles.c799c71a.cjs → block-styles.0c522549.cjs} +1 -1
  3. package/packages/_vue2/dist/{block-styles.062b71eb.js → block-styles.cf0de18b.js} +3 -3
  4. package/packages/{_vue3/dist/get-processed-block.b0588cd8.cjs → _vue2/dist/get-processed-block.100e890c.cjs} +1 -1
  5. package/packages/{_vue3/dist/get-processed-block.ab2d823c.js → _vue2/dist/get-processed-block.2cf53db5.js} +1 -1
  6. package/packages/_vue2/dist/{index.b2edb9b2.js → index.24f01638.js} +889 -807
  7. package/packages/_vue2/dist/index.e93e18ce.cjs +30 -0
  8. package/packages/_vue2/dist/{render-block.74bfd4ea.js → render-block.a8683c91.js} +40 -29
  9. package/packages/_vue2/dist/render-block.d4d3c07e.cjs +3 -0
  10. package/packages/_vue2/dist/{render-component.e59489c1.cjs → render-component.1220773f.cjs} +1 -1
  11. package/packages/_vue2/dist/{render-component.b325feac.js → render-component.aafdd999.js} +3 -3
  12. package/packages/_vue2/dist/{render-inlined-styles.14b606a5.cjs → render-inlined-styles.362de669.cjs} +1 -1
  13. package/packages/_vue2/dist/{render-inlined-styles.734fe2c9.js → render-inlined-styles.e770caf6.js} +1 -1
  14. package/packages/_vue2/dist/{render-repeated-block.e1d94c10.js → render-repeated-block.3fa28a72.js} +3 -2
  15. package/packages/_vue2/dist/render-repeated-block.8881a0f1.cjs +1 -0
  16. package/packages/_vue2/dist/render-styles.239d91cf.js +73 -0
  17. package/packages/_vue2/dist/render-styles.956991f6.cjs +18 -0
  18. package/packages/_vue2/dist/sdk.cjs +1 -1
  19. package/packages/_vue2/dist/sdk.js +1 -1
  20. package/packages/_vue2/dist/src/blocks/button/button.vue.d.ts +3 -0
  21. package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +1 -0
  22. package/packages/_vue2/dist/src/blocks/img/img.vue.d.ts +3 -0
  23. package/packages/_vue2/dist/src/blocks/section/section.vue.d.ts +3 -0
  24. package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +13 -17
  25. package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +1 -0
  26. package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +9 -1
  27. package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +1 -0
  28. package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +1 -0
  29. package/packages/_vue2/dist/src/components/render-content/components/render-styles.helpers.d.ts +15 -0
  30. package/packages/_vue2/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -9
  31. package/packages/_vue2/dist/src/components/render-content/render-content.helpers.d.ts +7 -0
  32. package/packages/_vue2/dist/src/components/render-content/render-content.types.d.ts +27 -0
  33. package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +11 -31
  34. package/packages/_vue2/dist/src/context/builder.context.d.ts +1 -0
  35. package/packages/_vue2/dist/src/context/types.d.ts +1 -0
  36. package/packages/_vue2/dist/src/index-helpers/blocks-exports.d.ts +6 -6
  37. package/packages/_vue2/dist/src/types/builder-content.d.ts +1 -2
  38. package/packages/_vue2/dist/style.css +1 -1
  39. package/packages/_vue3/dist/{block-styles.6e935df7.cjs → block-styles.666ee81f.cjs} +1 -1
  40. package/packages/_vue3/dist/{block-styles.413a68e9.js → block-styles.d05bbb48.js} +3 -3
  41. package/packages/{_vue2/dist/get-processed-block.44306844.js → _vue3/dist/get-processed-block.37c65d27.js} +1 -1
  42. package/packages/{_vue2/dist/get-processed-block.837e0313.cjs → _vue3/dist/get-processed-block.77446c19.cjs} +1 -1
  43. package/packages/_vue3/dist/index.6b1bc5ee.cjs +30 -0
  44. package/packages/_vue3/dist/{index.7db5ef7e.js → index.b1080e36.js} +914 -832
  45. package/packages/_vue3/dist/{render-block.a53e9af1.js → render-block.11e5a0d0.js} +42 -31
  46. package/packages/_vue3/dist/render-block.c674f764.cjs +3 -0
  47. package/packages/_vue3/dist/{render-component.adae07fa.cjs → render-component.2455895f.cjs} +1 -1
  48. package/packages/_vue3/dist/{render-component.41330655.js → render-component.3397c957.js} +3 -3
  49. package/packages/_vue3/dist/{render-inlined-styles.c80dee1c.cjs → render-inlined-styles.17e85155.cjs} +1 -1
  50. package/packages/_vue3/dist/{render-inlined-styles.47114c43.js → render-inlined-styles.ca824cfb.js} +1 -1
  51. package/packages/_vue3/dist/render-repeated-block.1b978fce.cjs +1 -0
  52. package/packages/_vue3/dist/{render-repeated-block.648adc14.js → render-repeated-block.645dd73e.js} +3 -2
  53. package/packages/_vue3/dist/render-styles.4d7ca33e.cjs +18 -0
  54. package/packages/_vue3/dist/render-styles.f59a1cf7.js +67 -0
  55. package/packages/_vue3/dist/sdk.cjs +1 -1
  56. package/packages/_vue3/dist/sdk.js +1 -1
  57. package/packages/_vue3/dist/src/blocks/button/button.vue.d.ts +3 -0
  58. package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +3 -0
  59. package/packages/_vue3/dist/src/blocks/section/section.vue.d.ts +3 -0
  60. package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +12 -17
  61. package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +8 -1
  62. package/packages/_vue3/dist/src/components/render-content/components/render-styles.helpers.d.ts +15 -0
  63. package/packages/_vue3/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -9
  64. package/packages/_vue3/dist/src/components/render-content/render-content.helpers.d.ts +7 -0
  65. package/packages/_vue3/dist/src/components/render-content/render-content.types.d.ts +27 -0
  66. package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +10 -31
  67. package/packages/_vue3/dist/src/context/builder.context.d.ts +1 -0
  68. package/packages/_vue3/dist/src/context/types.d.ts +1 -0
  69. package/packages/_vue3/dist/src/index-helpers/blocks-exports.d.ts +6 -6
  70. package/packages/_vue3/dist/src/types/builder-content.d.ts +1 -2
  71. package/packages/_vue3/dist/style.css +1 -1
  72. package/packages/_vue2/dist/index.59a0624f.cjs +0 -30
  73. package/packages/_vue2/dist/render-block.b97311ac.cjs +0 -3
  74. package/packages/_vue2/dist/render-repeated-block.bbbfafcc.cjs +0 -1
  75. package/packages/_vue2/dist/render-styles.0b296b86.js +0 -70
  76. package/packages/_vue2/dist/render-styles.6732290e.cjs +0 -17
  77. package/packages/_vue3/dist/index.218c45a5.cjs +0 -30
  78. package/packages/_vue3/dist/render-block.a9195cb6.cjs +0 -3
  79. package/packages/_vue3/dist/render-repeated-block.5b77dd2a.cjs +0 -1
  80. package/packages/_vue3/dist/render-styles.8780951f.js +0 -64
  81. package/packages/_vue3/dist/render-styles.9f30e56b.cjs +0 -17
@@ -1,12 +1,12 @@
1
- import { defineAsyncComponent as x, resolveComponent as k, openBlock as l, createElementBlock as u, normalizeClass as j, normalizeStyle as w, createBlock as I, createCommentVNode as b, Fragment as R, renderList as O, createVNode as X, createElementVNode as L, renderSlot as E, mergeProps as S, toDisplayString as W } from "vue";
2
- const T = "vue3";
1
+ import { openBlock as d, createElementBlock as u, mergeProps as _, toHandlers as w, toDisplayString as M, defineAsyncComponent as x, resolveComponent as k, normalizeClass as j, normalizeStyle as I, createBlock as T, createCommentVNode as b, Fragment as E, renderList as F, createVNode as Q, renderSlot as A, createElementVNode as $ } from "vue";
2
+ const R = "vue3";
3
3
  function f() {
4
4
  return typeof window < "u" && typeof document < "u";
5
5
  }
6
- const M = {};
7
- function ue(e, n) {
8
- let t = M[e];
9
- if (t || (t = M[e] = []), t.push(n), f()) {
6
+ const z = {};
7
+ function pe(e, n) {
8
+ let t = z[e];
9
+ if (t || (t = z[e] = []), t.push(n), f()) {
10
10
  const o = {
11
11
  type: "builder.register",
12
12
  data: {
@@ -21,8 +21,8 @@ function ue(e, n) {
21
21
  }
22
22
  }
23
23
  }
24
- const me = () => {
25
- ue("insertMenu", {
24
+ const he = () => {
25
+ pe("insertMenu", {
26
26
  name: "_default",
27
27
  default: !0,
28
28
  items: [
@@ -37,14 +37,14 @@ const me = () => {
37
37
  ]
38
38
  });
39
39
  };
40
- let N = !1;
41
- const pe = (e = {}) => {
40
+ let K = !1;
41
+ const fe = (e = {}) => {
42
42
  var n, t;
43
- N || (N = !0, f() && ((n = window.parent) == null || n.postMessage(
43
+ K || (K = !0, f() && ((n = window.parent) == null || n.postMessage(
44
44
  {
45
45
  type: "builder.sdkInfo",
46
46
  data: {
47
- target: T,
47
+ target: R,
48
48
  supportsPatchUpdates: !1,
49
49
  supportsAddBlockScoping: !0,
50
50
  supportsCustomBreakpoints: !0
@@ -64,17 +64,17 @@ const pe = (e = {}) => {
64
64
  if (!!(o != null && o.type))
65
65
  switch (o.type) {
66
66
  case "builder.evaluate": {
67
- const i = o.data.text, c = o.data.arguments || [], a = o.data.id, d = new Function(i);
67
+ const a = o.data.text, i = o.data.arguments || [], c = o.data.id, l = new Function(a);
68
68
  let m, p = null;
69
69
  try {
70
- m = d.apply(null, c);
70
+ m = l.apply(null, i);
71
71
  } catch (h) {
72
72
  p = h;
73
73
  }
74
74
  p ? (r = window.parent) == null || r.postMessage(
75
75
  {
76
76
  type: "builder.evaluateError",
77
- data: { id: a, error: p.message }
77
+ data: { id: c, error: p.message }
78
78
  },
79
79
  "*"
80
80
  ) : m && typeof m.then == "function" ? m.then((h) => {
@@ -82,14 +82,14 @@ const pe = (e = {}) => {
82
82
  (v = window.parent) == null || v.postMessage(
83
83
  {
84
84
  type: "builder.evaluateResult",
85
- data: { id: a, result: h }
85
+ data: { id: c, result: h }
86
86
  },
87
87
  "*"
88
88
  );
89
89
  }).catch(console.error) : (s = window.parent) == null || s.postMessage(
90
90
  {
91
91
  type: "builder.evaluateResult",
92
- data: { result: m, id: a }
92
+ data: { result: m, id: c }
93
93
  },
94
94
  "*"
95
95
  );
@@ -97,7 +97,40 @@ const pe = (e = {}) => {
97
97
  }
98
98
  }
99
99
  })));
100
- }, U = (e) => JSON.parse(JSON.stringify(e)), Y = {
100
+ }, ge = {
101
+ name: "builder-button",
102
+ props: ["attributes", "text", "link", "openLinkInNewTab"],
103
+ methods: {
104
+ filterAttrs: function(n = {}, t) {
105
+ const o = "v-on:", r = (i) => i.startsWith(o), s = (i) => !i.startsWith(o), a = (i) => i.replace(o, "");
106
+ return Object.keys(n).filter(t ? r : s).reduce(
107
+ (i, c) => ({
108
+ ...i,
109
+ [a(c)]: n[c]
110
+ }),
111
+ {}
112
+ );
113
+ }
114
+ }
115
+ };
116
+ const g = (e, n) => {
117
+ const t = e.__vccOpts || e;
118
+ for (const [o, r] of n)
119
+ t[o] = r;
120
+ return t;
121
+ }, be = ["href", "target"];
122
+ function ye(e, n, t, o, r, s) {
123
+ return t.link ? (d(), u("a", _({
124
+ key: 0,
125
+ role: "button",
126
+ href: t.link,
127
+ target: t.openLinkInNewTab ? "_blank" : void 0
128
+ }, s.filterAttrs(t.attributes, !1), w(s.filterAttrs(t.attributes, !0), !0)), M(t.text), 17, be)) : (d(), u("button", _({
129
+ key: 1,
130
+ class: "button-1yj9n7yt24z"
131
+ }, s.filterAttrs(t.attributes, !1), w(s.filterAttrs(t.attributes, !0), !0)), M(t.text), 17));
132
+ }
133
+ const ve = /* @__PURE__ */ g(ge, [["render", ye], ["__scopeId", "data-v-44d936dc"]]), V = (e) => JSON.parse(JSON.stringify(e)), Z = {
101
134
  small: {
102
135
  min: 320,
103
136
  default: 321,
@@ -113,8 +146,8 @@ const pe = (e = {}) => {
113
146
  default: 991,
114
147
  max: 1200
115
148
  }
116
- }, Rn = (e, n = Y) => `@media (max-width: ${n[e].max}px)`, he = ({ small: e, medium: n }) => {
117
- const t = U(Y);
149
+ }, Pn = (e, n = Z) => `@media (max-width: ${n[e].max}px)`, xe = ({ small: e, medium: n }) => {
150
+ const t = V(Z);
118
151
  if (!e || !n)
119
152
  return t;
120
153
  const o = Math.floor(e / 2);
@@ -135,36 +168,36 @@ const pe = (e = {}) => {
135
168
  min: s,
136
169
  default: s + 1
137
170
  }, t;
138
- }, fe = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), C = (e) => e != null, ge = (e) => Object.entries(e).map(([t, o]) => {
171
+ }, ke = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), S = (e) => e != null, Se = (e) => Object.entries(e).map(([t, o]) => {
139
172
  if (typeof o == "string")
140
- return `${fe(t)}: ${o};`;
141
- }).filter(C), _ = (e) => ge(e).join(`
142
- `), En = ({
173
+ return `${ke(t)}: ${o};`;
174
+ }).filter(S), C = (e) => Se(e).join(`
175
+ `), On = ({
143
176
  mediaQuery: e,
144
177
  className: n,
145
178
  styles: t
146
179
  }) => {
147
180
  const o = `.${n} {
148
- ${_(t)}
181
+ ${C(t)}
149
182
  }`;
150
183
  return e ? `${e} {
151
184
  ${o}
152
185
  }` : o;
153
- }, be = () => Promise.resolve().then(() => le).then((e) => e.default).catch((e) => {
186
+ }, _e = () => Promise.resolve().then(() => ee).then((e) => e.default).catch((e) => {
154
187
  throw console.error(
155
188
  "Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
156
189
  e
157
190
  ), e;
158
- }), ye = () => import("./render-inlined-styles.47114c43.js").then((e) => e.default).catch((e) => {
191
+ }), Ce = () => import("./render-inlined-styles.ca824cfb.js").then((e) => e.default).catch((e) => {
159
192
  throw console.error(
160
193
  "Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
161
194
  e
162
195
  ), e;
163
- }), ve = {
196
+ }), we = {
164
197
  name: "builder-columns",
165
198
  components: {
166
- RenderInlinedStyles: x(ye),
167
- RenderBlocks: x(be)
199
+ RenderInlinedStyles: x(Ce),
200
+ RenderBlocks: x(_e)
168
201
  },
169
202
  props: [
170
203
  "space",
@@ -175,7 +208,7 @@ const pe = (e = {}) => {
175
208
  "builderBlock"
176
209
  ],
177
210
  data() {
178
- return { TARGET: T };
211
+ return { TARGET: R };
179
212
  },
180
213
  computed: {
181
214
  columnsCssVars() {
@@ -222,21 +255,21 @@ const pe = (e = {}) => {
222
255
  return `
223
256
  @media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
224
257
  .${this.builderBlock.id}-breakpoints {
225
- ${_(this.columnStyleObjects.columns.medium)}
258
+ ${C(this.columnStyleObjects.columns.medium)}
226
259
  }
227
260
 
228
261
  .${this.builderBlock.id}-breakpoints > .builder-column {
229
- ${_(this.columnStyleObjects.column.medium)}
262
+ ${C(this.columnStyleObjects.column.medium)}
230
263
  }
231
264
  }
232
265
 
233
266
  @media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
234
267
  .${this.builderBlock.id}-breakpoints {
235
- ${_(this.columnStyleObjects.columns.small)}
268
+ ${C(this.columnStyleObjects.columns.small)}
236
269
  }
237
270
 
238
271
  .${this.builderBlock.id}-breakpoints > .builder-column {
239
- ${_(this.columnStyleObjects.column.small)}
272
+ ${C(this.columnStyleObjects.column.small)}
240
273
  }
241
274
  },
242
275
  `;
@@ -268,7 +301,7 @@ const pe = (e = {}) => {
268
301
  return (this.stackColumnsAt || "tablet") === "tablet" ? e : "inherit";
269
302
  },
270
303
  getWidthForBreakpointSize(e) {
271
- return he(
304
+ return xe(
272
305
  this.customBreakpoints || {}
273
306
  )[e].max;
274
307
  },
@@ -283,42 +316,36 @@ const pe = (e = {}) => {
283
316
  }
284
317
  }
285
318
  };
286
- const g = (e, n) => {
287
- const t = e.__vccOpts || e;
288
- for (const [o, r] of n)
289
- t[o] = r;
290
- return t;
291
- };
292
- function xe(e, n, t, o, r, s) {
293
- const i = k("render-inlined-styles"), c = k("render-blocks");
294
- return l(), u("div", {
319
+ function Ie(e, n, t, o, r, s) {
320
+ const a = k("render-inlined-styles"), i = k("render-blocks");
321
+ return d(), u("div", {
295
322
  class: j(
296
323
  s._classStringToObject(
297
- `builder-columns ${t.builderBlock.id}-breakpoints div-7fq9d0i380`
324
+ `builder-columns ${t.builderBlock.id}-breakpoints div-361b1o6wv2k`
298
325
  )
299
326
  ),
300
- style: w({
327
+ style: I({
301
328
  ...r.TARGET === "reactNative" ? s.reactNativeColumnsStyles : {},
302
329
  ...s.columnsCssVars
303
330
  })
304
331
  }, [
305
- r.TARGET !== "reactNative" ? (l(), I(i, {
332
+ r.TARGET !== "reactNative" ? (d(), T(a, {
306
333
  key: 0,
307
334
  styles: s.columnsStyles
308
335
  }, null, 8, ["styles"])) : b("", !0),
309
- (l(!0), u(R, null, O(t.columns, (a, d) => (l(), u("div", {
310
- key: d,
311
- class: "builder-column div-7fq9d0i380-2",
312
- style: w({
313
- width: s.getColumnCssWidth(d),
314
- marginLeft: `${d === 0 ? 0 : s.getGutterSize()}px`,
336
+ (d(!0), u(E, null, F(t.columns, (c, l) => (d(), u("div", {
337
+ key: l,
338
+ class: "builder-column div-361b1o6wv2k-2",
339
+ style: I({
340
+ width: s.getColumnCssWidth(l),
341
+ marginLeft: `${l === 0 ? 0 : s.getGutterSize()}px`,
315
342
  ...r.TARGET === "reactNative" ? s.reactNativeColumnStyles : {},
316
343
  ...s.columnCssVars
317
344
  })
318
345
  }, [
319
- X(c, {
320
- blocks: a.blocks,
321
- path: `component.options.columns.${d}.blocks`,
346
+ Q(i, {
347
+ blocks: c.blocks,
348
+ path: `component.options.columns.${l}.blocks`,
322
349
  parent: t.builderBlock.id,
323
350
  styleProp: {
324
351
  flexGrow: "1"
@@ -327,40 +354,49 @@ function xe(e, n, t, o, r, s) {
327
354
  ], 4))), 128))
328
355
  ], 6);
329
356
  }
330
- const ke = /* @__PURE__ */ g(ve, [["render", xe], ["__scopeId", "data-v-1c640f4f"]]);
331
- function z(e) {
357
+ const Te = /* @__PURE__ */ g(we, [["render", Ie], ["__scopeId", "data-v-154d097e"]]), Re = {
358
+ name: "builder-fragment-component",
359
+ props: []
360
+ };
361
+ function Ee(e, n, t, o, r, s) {
362
+ return d(), u("span", null, [
363
+ A(e.$slots, "default")
364
+ ]);
365
+ }
366
+ const Ae = /* @__PURE__ */ g(Re, [["render", Ee]]);
367
+ function H(e) {
332
368
  return e.replace(/http(s)?:/, "");
333
369
  }
334
- function Ce(e = "", n, t) {
370
+ function je(e = "", n, t) {
335
371
  const o = new RegExp("([?&])" + n + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
336
372
  return e.match(o) ? e.replace(o, "$1" + n + "=" + encodeURIComponent(t) + "$2") : e + r + n + "=" + encodeURIComponent(t);
337
373
  }
338
- function Se(e, n) {
374
+ function Pe(e, n) {
339
375
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !n)
340
376
  return e;
341
377
  if (n === "master")
342
- return z(e);
378
+ return H(e);
343
379
  const t = e.match(
344
380
  /(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
345
381
  );
346
382
  if (t) {
347
383
  const o = e.split(t[0]), r = t[3], s = n.match("x") ? n : `${n}x`;
348
- return z(`${o[0]}_${s}${r}`);
384
+ return H(`${o[0]}_${s}${r}`);
349
385
  }
350
386
  return null;
351
387
  }
352
- function F(e) {
388
+ function O(e) {
353
389
  if (!e)
354
390
  return e;
355
391
  const n = [100, 200, 400, 800, 1200, 1600, 2e3];
356
392
  if (e.match(/builder\.io/)) {
357
393
  let t = e;
358
394
  const o = Number(e.split("?width=")[1]);
359
- return isNaN(o) || (t = `${t} ${o}w`), n.filter((r) => r !== o).map((r) => `${Ce(e, "width", r)} ${r}w`).concat([t]).join(", ");
395
+ return isNaN(o) || (t = `${t} ${o}w`), n.filter((r) => r !== o).map((r) => `${je(e, "width", r)} ${r}w`).concat([t]).join(", ");
360
396
  }
361
- return e.match(/cdn\.shopify\.com/) ? n.map((t) => [Se(e, `${t}x${t}`), t]).filter(([t]) => !!t).map(([t, o]) => `${t} ${o}w`).concat([e]).join(", ") : e;
397
+ return e.match(/cdn\.shopify\.com/) ? n.map((t) => [Pe(e, `${t}x${t}`), t]).filter(([t]) => !!t).map(([t, o]) => `${t} ${o}w`).concat([e]).join(", ") : e;
362
398
  }
363
- const _e = {
399
+ const Oe = {
364
400
  name: "builder-image",
365
401
  props: [
366
402
  "image",
@@ -384,10 +420,10 @@ const _e = {
384
420
  return this.srcset;
385
421
  if (this.srcset && ((t = this.image) == null ? void 0 : t.includes("builder.io/api/v1/image"))) {
386
422
  if (!this.srcset.includes(this.image.split("?")[0]))
387
- return console.debug("Removed given srcset"), F(n);
423
+ return console.debug("Removed given srcset"), O(n);
388
424
  } else if (this.image && !this.srcset)
389
- return F(n);
390
- return F(n);
425
+ return O(n);
426
+ return O(n);
391
427
  },
392
428
  webpSrcSet() {
393
429
  var e;
@@ -416,455 +452,164 @@ const _e = {
416
452
  }
417
453
  }
418
454
  };
419
- const we = ["srcset"], Ie = ["alt", "role", "src", "srcset", "sizes"], Te = {
455
+ const Fe = ["srcset"], Be = ["alt", "role", "src", "srcset", "sizes"], Ue = {
420
456
  key: 2,
421
- class: "div-2pqqf5a7788-2"
457
+ class: "div-7jvpanrlkn-2"
422
458
  };
423
- function Re(e, n, t, o, r, s) {
424
- var i, c, a, d;
425
- return l(), u(R, null, [
426
- L("picture", null, [
427
- s.webpSrcSet ? (l(), u("source", {
459
+ function Ve(e, n, t, o, r, s) {
460
+ var a, i, c, l;
461
+ return d(), u(E, null, [
462
+ $("picture", null, [
463
+ s.webpSrcSet ? (d(), u("source", {
428
464
  key: 0,
429
465
  type: "image/webp",
430
466
  srcset: s.webpSrcSet
431
- }, null, 8, we)) : b("", !0),
432
- L("img", {
467
+ }, null, 8, Fe)) : b("", !0),
468
+ $("img", {
433
469
  loading: "lazy",
434
470
  alt: t.altText,
435
471
  role: t.altText ? "presentation" : void 0,
436
- style: w({
472
+ style: I({
437
473
  objectPosition: t.backgroundPosition || "center",
438
474
  objectFit: t.backgroundSize || "cover",
439
475
  ...s.aspectRatioCss
440
476
  }),
441
477
  class: j(
442
478
  s._classStringToObject(
443
- "builder-image" + (t.className ? " " + t.className : "") + " img-2pqqf5a7788"
479
+ "builder-image" + (t.className ? " " + t.className : "") + " img-7jvpanrlkn"
444
480
  )
445
481
  ),
446
482
  src: t.image,
447
483
  srcset: s.srcSetToUse,
448
484
  sizes: t.sizes
449
- }, null, 14, Ie)
485
+ }, null, 14, Be)
450
486
  ]),
451
- t.aspectRatio && !(((c = (i = t.builderBlock) == null ? void 0 : i.children) == null ? void 0 : c.length) && t.fitContent) ? (l(), u("div", {
487
+ t.aspectRatio && !(((i = (a = t.builderBlock) == null ? void 0 : a.children) == null ? void 0 : i.length) && t.fitContent) ? (d(), u("div", {
452
488
  key: 0,
453
- class: "builder-image-sizer div-2pqqf5a7788",
454
- style: w({
489
+ class: "builder-image-sizer div-7jvpanrlkn",
490
+ style: I({
455
491
  paddingTop: t.aspectRatio * 100 + "%"
456
492
  })
457
493
  }, null, 4)) : b("", !0),
458
- ((d = (a = t.builderBlock) == null ? void 0 : a.children) == null ? void 0 : d.length) && t.fitContent ? E(e.$slots, "default", { key: 1 }, void 0, !0) : b("", !0),
459
- !t.fitContent && e.children ? (l(), u("div", Te, [
460
- E(e.$slots, "default", {}, void 0, !0)
494
+ ((l = (c = t.builderBlock) == null ? void 0 : c.children) == null ? void 0 : l.length) && t.fitContent ? A(e.$slots, "default", { key: 1 }, void 0, !0) : b("", !0),
495
+ !t.fitContent && e.children ? (d(), u("div", Ue, [
496
+ A(e.$slots, "default", {}, void 0, !0)
461
497
  ])) : b("", !0)
462
498
  ], 64);
463
499
  }
464
- const Ee = /* @__PURE__ */ g(_e, [["render", Re], ["__scopeId", "data-v-50c3283d"]]), je = {
465
- name: "builder-text",
466
- props: ["text"]
467
- }, Be = ["innerHTML"];
468
- function Fe(e, n, t, o, r, s) {
469
- return l(), u("span", {
470
- class: "builder-text",
471
- innerHTML: t.text
472
- }, null, 8, Be);
473
- }
474
- const Oe = /* @__PURE__ */ g(je, [["render", Fe]]), Ae = {
475
- name: "builder-video",
476
- props: [
477
- "autoPlay",
478
- "muted",
479
- "controls",
480
- "loop",
481
- "playsInline",
482
- "attributes",
483
- "fit",
484
- "position",
485
- "video",
486
- "posterImage"
487
- ],
488
- computed: {
489
- videoProps() {
490
- return {
491
- ...this.autoPlay === !0 ? {
492
- autoPlay: !0
493
- } : {},
494
- ...this.muted === !0 ? {
495
- muted: !0
496
- } : {},
497
- ...this.controls === !0 ? {
498
- controls: !0
499
- } : {},
500
- ...this.loop === !0 ? {
501
- loop: !0
502
- } : {},
503
- ...this.playsInline === !0 ? {
504
- playsInline: !0
505
- } : {}
506
- };
507
- },
508
- spreadProps() {
509
- return {
510
- ...this.attributes,
511
- ...this.videoProps
512
- };
513
- }
514
- }
515
- }, Pe = ["src", "poster"];
516
- function Ue(e, n, t, o, r, s) {
517
- var i;
518
- return l(), u("video", S({
519
- style: {
520
- width: "100%",
521
- height: "100%",
522
- ...(i = t.attributes) == null ? void 0 : i.style,
523
- objectFit: t.fit,
524
- objectPosition: t.position,
525
- borderRadius: 1
526
- },
527
- src: t.video || "no-src",
528
- poster: t.posterImage
529
- }, s.spreadProps), null, 16, Pe);
530
- }
531
- const $e = /* @__PURE__ */ g(Ae, [["render", Ue]]), Ve = Symbol(), $ = {
500
+ const We = /* @__PURE__ */ g(Oe, [["render", Ve], ["__scopeId", "data-v-22833d9f"]]), Ne = Symbol(), W = {
532
501
  Builder: {
533
502
  content: null,
534
503
  context: {},
535
504
  state: {},
505
+ setState() {
506
+ },
536
507
  apiKey: null,
537
508
  registeredComponents: {},
538
509
  inheritedStyles: {}
539
510
  },
540
- key: Ve
511
+ key: Ne
541
512
  };
542
513
  function Le() {
543
- return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
544
- }
545
- function We() {
546
- const e = Le().fetch;
547
- if (typeof e > "u")
548
- throw console.warn(
549
- `Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
550
- For more information, read https://github.com/BuilderIO/this-package-uses-fetch`
551
- ), new Error("Builder SDK could not find a global `fetch` function");
552
- return e;
553
- }
554
- const Q = We(), Me = (e) => {
555
- if (e === "localhost" || e === "127.0.0.1")
556
- return e;
557
- const n = e.split(".");
558
- return n.length > 2 ? n.slice(1).join(".") : e;
559
- }, Z = async ({
560
- name: e,
561
- canTrack: n
562
- }) => {
563
- var t;
564
- try {
565
- return n ? (t = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : t.split("=")[1] : void 0;
566
- } catch (o) {
567
- console.debug("[COOKIE] GET error: ", o);
568
- return;
569
- }
570
- }, Ne = (e) => e.map(([n, t]) => t ? `${n}=${t}` : n).filter(C).join("; "), ze = [
571
- ["secure", ""],
572
- ["SameSite", "None"]
573
- ], Ke = ({
574
- name: e,
575
- value: n,
576
- expires: t
577
- }) => {
578
- const r = (f() ? location.protocol === "https:" : !0) ? ze : [[]], s = t ? [["expires", t.toUTCString()]] : [[]], i = [
579
- [e, n],
580
- ...s,
581
- ["path", "/"],
582
- ["domain", Me(window.location.hostname)],
583
- ...r
584
- ];
585
- return Ne(i);
586
- }, ee = async ({
587
- name: e,
588
- value: n,
589
- expires: t,
590
- canTrack: o
591
- }) => {
592
- try {
593
- if (!o)
594
- return;
595
- const r = Ke({ name: e, value: n, expires: t });
596
- document.cookie = r;
597
- } catch (r) {
598
- console.warn("[COOKIE] SET error: ", r);
599
- }
600
- }, He = "builderio.variations", te = (e) => `${He}.${e}`, qe = ({
601
- contentId: e,
602
- canTrack: n
603
- }) => Z({ name: te(e), canTrack: n }), De = ({
604
- contentId: e,
605
- canTrack: n,
606
- value: t
607
- }) => ee({ name: te(e), value: t, canTrack: n }), Ge = (e) => C(e.id) && C(e.variations) && Object.keys(e.variations).length > 0, Je = ({
608
- id: e,
609
- variations: n
610
- }) => {
611
- var r;
612
- let t = 0;
613
- const o = Math.random();
614
- for (const s in n)
615
- if (t += (r = n[s]) == null ? void 0 : r.testRatio, o < t)
616
- return s;
617
- return e;
618
- }, K = ({
619
- item: e,
620
- testGroupId: n
621
- }) => {
622
- const t = e.variations[n];
623
- return n === e.id || !t ? {
624
- testVariationId: e.id,
625
- testVariationName: "Default"
626
- } : {
627
- data: t.data,
628
- testVariationId: t.id,
629
- testVariationName: t.name || (t.id === e.id ? "Default" : "")
630
- };
631
- }, Xe = async ({
632
- item: e,
633
- canTrack: n
634
- }) => {
635
- const t = await qe({
636
- canTrack: n,
637
- contentId: e.id
638
- }), o = t ? K({ item: e, testGroupId: t }) : void 0;
639
- if (o)
640
- return o;
641
- {
642
- const r = Je({
643
- variations: e.variations,
644
- id: e.id
645
- });
646
- return De({
647
- contentId: e.id,
648
- value: r,
649
- canTrack: n
650
- }).catch((s) => {
651
- console.error("could not store A/B test variation: ", s);
652
- }), K({ item: e, testGroupId: r });
653
- }
654
- }, Ye = async ({
655
- item: e,
656
- canTrack: n
657
- }) => {
658
- if (!Ge(e))
659
- return;
660
- const t = await Xe({ item: e, canTrack: n });
661
- Object.assign(e, t);
662
- };
663
- function A(e, n = null, t = ".") {
664
- return Object.keys(e).reduce((o, r) => {
665
- const s = e[r], i = [n, r].filter(Boolean).join(t);
666
- return [
667
- typeof s == "object",
668
- s !== null,
669
- !(Array.isArray(s) && s.length === 0)
670
- ].every(Boolean) ? { ...o, ...A(s, i, t) } : { ...o, [i]: s };
671
- }, {});
672
- }
673
- const H = "builder.", Qe = "options.", Ze = (e) => {
674
- const n = {};
675
- return e.forEach((t, o) => {
676
- n[o] = t;
677
- }), n;
678
- }, et = (e) => {
679
- if (!e)
680
- return {};
681
- const n = ne(e), t = {};
682
- return Object.keys(n).forEach((o) => {
683
- if (o.startsWith(H)) {
684
- const r = o.replace(H, "").replace(Qe, "");
685
- t[r] = n[o];
686
- }
687
- }), t;
688
- }, tt = () => {
689
- if (!f())
690
- return {};
691
- const e = new URLSearchParams(window.location.search);
692
- return et(e);
693
- }, ne = (e) => e instanceof URLSearchParams ? Ze(e) : e, nt = (e) => {
694
- const {
695
- limit: n = 30,
696
- userAttributes: t,
697
- query: o,
698
- noTraverse: r = !1,
699
- model: s,
700
- apiKey: i,
701
- includeRefs: c = !0,
702
- locale: a
703
- } = e;
704
- if (!i)
705
- throw new Error("Missing API key");
706
- const d = new URL(
707
- `https://cdn.builder.io/api/v2/content/${s}?apiKey=${i}&limit=${n}&noTraverse=${r}&includeRefs=${c}${a ? `&locale=${a}` : ""}`
708
- ), m = {
709
- ...tt(),
710
- ...ne(e.options || {})
711
- }, p = A(m);
712
- for (const h in p)
713
- d.searchParams.set(h, String(p[h]));
714
- if (t && d.searchParams.set("userAttributes", JSON.stringify(t)), o) {
715
- const h = A({ query: o });
716
- for (const v in h)
717
- d.searchParams.set(v, JSON.stringify(h[v]));
718
- }
719
- return d;
720
- };
721
- async function oe(e) {
722
- return (await ot({ ...e, limit: 1 })).results[0] || null;
514
+ return f() && window.self !== window.top;
723
515
  }
724
- async function ot(e) {
725
- const n = nt(e), o = await (await Q(n.href)).json(), r = e.canTrack !== !1;
726
- if (r && Array.isArray(o.results))
727
- for (const s of o.results)
728
- await Ye({ item: s, canTrack: r });
729
- return o;
516
+ function y() {
517
+ return Le() && window.location.search.indexOf("builder.frameEditing=") !== -1;
730
518
  }
731
- const st = () => Promise.resolve().then(() => xn).then((e) => e.default).catch((e) => {
519
+ const Me = () => import("./block-styles.d05bbb48.js").then((e) => e.default).catch((e) => {
732
520
  throw console.error(
733
- "Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
521
+ "Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
734
522
  e
735
523
  ), e;
736
- }), rt = {
737
- name: "builder-symbol",
738
- components: { RenderContent: x(st) },
739
- props: ["attributes", "symbol", "dynamic"],
740
- data() {
741
- return { fetchedContent: null };
524
+ }), $e = () => import("./render-block.11e5a0d0.js").then((e) => e.default).catch((e) => {
525
+ throw console.error(
526
+ "Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
527
+ e
528
+ ), e;
529
+ }), ze = {
530
+ name: "render-blocks",
531
+ components: {
532
+ RenderBlock: x($e),
533
+ BlockStyles: x(Me)
742
534
  },
535
+ props: ["blocks", "parent", "path", "styleProp"],
743
536
  inject: {
744
- builderContext: $.key
745
- },
746
- watch: {
747
- onUpdateHook0: {
748
- handler() {
749
- var n;
750
- const e = this.symbol;
751
- e && !e.content && !this.fetchedContent && e.model && ((n = this.builderContext) == null ? void 0 : n.apiKey) && oe({
752
- model: e.model,
753
- apiKey: this.builderContext.apiKey,
754
- query: {
755
- id: e.entry
756
- }
757
- }).then((t) => {
758
- this.fetchedContent = t;
759
- });
760
- },
761
- immediate: !0
762
- }
537
+ builderContext: W.key
763
538
  },
764
539
  computed: {
765
540
  className() {
766
- var e, n;
767
- return [
768
- ...Object.keys(this.attributes.class),
769
- "builder-symbol",
770
- (e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
771
- ((n = this.symbol) == null ? void 0 : n.dynamic) || this.dynamic ? "builder-dynamic-symbol" : void 0
772
- ].filter(Boolean).join(" ");
773
- },
774
- contentToUse() {
775
541
  var e;
776
- return ((e = this.symbol) == null ? void 0 : e.content) || this.fetchedContent;
777
- },
778
- onUpdateHook0() {
779
- return {
780
- 0: this.symbol,
781
- 1: this.fetchedContent
782
- };
542
+ return "builder-blocks" + ((e = this.blocks) != null && e.length ? "" : " no-blocks");
783
543
  }
784
544
  },
785
545
  methods: {
786
- _classStringToObject(e) {
787
- const n = {};
788
- if (typeof e != "string")
789
- return n;
790
- const t = e.trim().split(/\s+/);
791
- for (const o of t)
792
- n[o] = !0;
793
- return n;
794
- }
795
- }
796
- }, it = ["dataSet"];
797
- function at(e, n, t, o, r, s) {
798
- var c, a, d, m, p;
799
- const i = k("render-content");
800
- return l(), u("div", S({
801
- dataSet: {
802
- class: s.className
546
+ onClick() {
547
+ var e, n;
548
+ y() && !((e = this.blocks) != null && e.length) && ((n = window.parent) == null || n.postMessage(
549
+ {
550
+ type: "builder.clickEmptyBlocks",
551
+ data: {
552
+ parentElementId: this.parent,
553
+ dataPath: this.path
554
+ }
555
+ },
556
+ "*"
557
+ ));
803
558
  },
804
- class: s._classStringToObject(s.className)
805
- }, t.attributes), [
806
- X(i, {
807
- apiKey: s.builderContext.apiKey,
808
- context: s.builderContext.context,
809
- customComponents: Object.values(s.builderContext.registeredComponents),
810
- data: {
811
- ...(c = t.symbol) == null ? void 0 : c.data,
812
- ...s.builderContext.state,
813
- ...(m = (d = (a = t.symbol) == null ? void 0 : a.content) == null ? void 0 : d.data) == null ? void 0 : m.state
814
- },
815
- model: (p = t.symbol) == null ? void 0 : p.model,
816
- content: s.contentToUse
817
- }, null, 8, ["apiKey", "context", "customComponents", "data", "model", "content"])
818
- ], 16, it);
819
- }
820
- const ct = /* @__PURE__ */ g(rt, [["render", at]]), lt = {
821
- name: "builder-button",
822
- props: ["attributes", "text", "link", "openLinkInNewTab"]
823
- };
824
- const dt = ["href", "target"];
825
- function ut(e, n, t, o, r, s) {
826
- return t.link ? (l(), u("a", S({
827
- key: 0,
828
- role: "button",
829
- href: t.link,
830
- target: t.openLinkInNewTab ? "_blank" : void 0
831
- }, t.attributes), W(t.text), 17, dt)) : (l(), u("button", S({
832
- key: 1,
833
- class: "button-4o9pb21oca6"
834
- }, t.attributes), W(t.text), 17));
835
- }
836
- const mt = /* @__PURE__ */ g(lt, [["render", ut], ["__scopeId", "data-v-f9067262"]]), pt = {
837
- name: "builder-section-component",
838
- props: ["attributes", "maxWidth"]
839
- };
840
- function ht(e, n, t, o, r, s) {
841
- return l(), u("section", S({
842
- style: {
843
- width: "100%",
844
- alignSelf: "stretch",
845
- flexGrow: "1",
846
- boxSizing: "border-box",
847
- maxWidth: `${t.maxWidth && typeof t.maxWidth == "number" ? t.maxWidth : 1200}px`,
848
- display: "flex",
849
- flexDirection: "column",
850
- alignItems: "stretch",
851
- marginLeft: "auto",
852
- marginRight: "auto"
559
+ onMouseEnter() {
560
+ var e, n;
561
+ y() && !((e = this.blocks) != null && e.length) && ((n = window.parent) == null || n.postMessage(
562
+ {
563
+ type: "builder.hoverEmptyBlocks",
564
+ data: {
565
+ parentElementId: this.parent,
566
+ dataPath: this.path
567
+ }
568
+ },
569
+ "*"
570
+ ));
571
+ },
572
+ _classStringToObject(e) {
573
+ const n = {};
574
+ if (typeof e != "string")
575
+ return n;
576
+ const t = e.trim().split(/\s+/);
577
+ for (const o of t)
578
+ n[o] = !0;
579
+ return n;
853
580
  }
854
- }, t.attributes), [
855
- E(e.$slots, "default")
856
- ], 16);
857
- }
858
- const ft = /* @__PURE__ */ g(pt, [["render", ht]]), gt = {
859
- name: "builder-fragment-component",
860
- props: []
581
+ }
861
582
  };
862
- function bt(e, n, t, o, r, s) {
863
- return l(), u("span", null, [
864
- E(e.$slots, "default")
865
- ]);
583
+ const Ke = ["builder-path", "builder-parent-id", "dataSet"];
584
+ function He(e, n, t, o, r, s) {
585
+ const a = k("render-block"), i = k("block-styles");
586
+ return d(), u("div", {
587
+ class: j(s._classStringToObject(s.className + " div-7fq9d0i380")),
588
+ "builder-path": t.path,
589
+ "builder-parent-id": t.parent,
590
+ dataSet: {
591
+ class: s.className
592
+ },
593
+ style: I(t.styleProp),
594
+ onClick: n[0] || (n[0] = (c) => s.onClick()),
595
+ onMouseenter: n[1] || (n[1] = (c) => s.onMouseEnter())
596
+ }, [
597
+ t.blocks ? (d(!0), u(E, { key: 0 }, F(t.blocks, (c, l) => (d(), T(a, {
598
+ key: "render-block-" + c.id,
599
+ block: c,
600
+ context: s.builderContext
601
+ }, null, 8, ["block", "context"]))), 128)) : b("", !0),
602
+ t.blocks ? (d(!0), u(E, { key: 1 }, F(t.blocks, (c, l) => (d(), T(i, {
603
+ key: "block-style-" + c.id,
604
+ block: c,
605
+ context: s.builderContext
606
+ }, null, 8, ["block", "context"]))), 128)) : b("", !0)
607
+ ], 46, Ke);
866
608
  }
867
- const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
609
+ const De = /* @__PURE__ */ g(ze, [["render", He], ["__scopeId", "data-v-1112d180"]]), ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
610
+ __proto__: null,
611
+ default: De
612
+ }, Symbol.toStringTag, { value: "Module" })), qe = {
868
613
  name: "Core:Button",
869
614
  builtIn: !0,
870
615
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
@@ -901,10 +646,10 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
901
646
  ],
902
647
  static: !0,
903
648
  noWrap: !0
904
- }, B = (e) => {
649
+ }, P = (e) => {
905
650
  const n = e.toString().trim();
906
651
  return `return (${!n.startsWith("function") && !n.startsWith("(") ? "function " : ""}${n}).apply(this, arguments)`;
907
- }, xt = {
652
+ }, Ge = {
908
653
  name: "Columns",
909
654
  builtIn: !0,
910
655
  inputs: [
@@ -1092,7 +837,7 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1092
837
  ]
1093
838
  }
1094
839
  ],
1095
- onChange: B((e) => {
840
+ onChange: P((e) => {
1096
841
  function n() {
1097
842
  t.forEach((o) => {
1098
843
  o.delete("width");
@@ -1103,7 +848,7 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1103
848
  (r) => r.get("width")
1104
849
  ) && (!!t.find(
1105
850
  (s) => !s.get("width")
1106
- ) || t.reduce((c, a) => c + a.get("width"), 0) !== 100) && n();
851
+ ) || t.reduce((i, c) => i + c.get("width"), 0) !== 100) && n();
1107
852
  })
1108
853
  },
1109
854
  {
@@ -1129,14 +874,14 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1129
874
  advanced: !0
1130
875
  }
1131
876
  ]
1132
- }, kt = {
877
+ }, Je = {
1133
878
  name: "Fragment",
1134
879
  static: !0,
1135
880
  hidden: !0,
1136
881
  builtIn: !0,
1137
882
  canHaveChildren: !0,
1138
883
  noWrap: !0
1139
- }, Ct = {
884
+ }, Xe = {
1140
885
  name: "Image",
1141
886
  static: !0,
1142
887
  builtIn: !0,
@@ -1156,32 +901,32 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1156
901
  allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
1157
902
  required: !0,
1158
903
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
1159
- onChange: B(
904
+ onChange: P(
1160
905
  (e) => {
1161
906
  e.delete("srcset"), e.delete("noWebp");
1162
- function t(i, c = 6e4) {
1163
- return new Promise((a, d) => {
907
+ function t(a, i = 6e4) {
908
+ return new Promise((c, l) => {
1164
909
  const m = document.createElement("img");
1165
910
  let p = !1;
1166
911
  m.onload = () => {
1167
- p = !0, a(m);
912
+ p = !0, c(m);
1168
913
  }, m.addEventListener("error", (h) => {
1169
- console.warn("Image load failed", h.error), d(h.error);
1170
- }), m.src = i, setTimeout(() => {
1171
- p || d(new Error("Image load timed out"));
1172
- }, c);
914
+ console.warn("Image load failed", h.error), l(h.error);
915
+ }), m.src = a, setTimeout(() => {
916
+ p || l(new Error("Image load timed out"));
917
+ }, i);
1173
918
  });
1174
919
  }
1175
- function o(i) {
1176
- return Math.round(i * 1e3) / 1e3;
920
+ function o(a) {
921
+ return Math.round(a * 1e3) / 1e3;
1177
922
  }
1178
923
  const r = e.get("image"), s = e.get("aspectRatio");
1179
- if (fetch(r).then((i) => i.blob()).then((i) => {
1180
- i.type.includes("svg") && e.set("noWebp", !0);
924
+ if (fetch(r).then((a) => a.blob()).then((a) => {
925
+ a.type.includes("svg") && e.set("noWebp", !0);
1181
926
  }), r && (!s || s === 0.7041))
1182
- return t(r).then((i) => {
1183
- const c = e.get("aspectRatio");
1184
- e.get("image") === r && (!c || c === 0.7041) && i.width && i.height && (e.set("aspectRatio", o(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
927
+ return t(r).then((a) => {
928
+ const i = e.get("aspectRatio");
929
+ e.get("image") === r && (!i || i === 0.7041) && a.width && a.height && (e.set("aspectRatio", o(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
1185
930
  });
1186
931
  }
1187
932
  )
@@ -1264,7 +1009,7 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1264
1009
  defaultValue: 0.7041
1265
1010
  }
1266
1011
  ]
1267
- }, St = {
1012
+ }, Ye = {
1268
1013
  name: "Core:Section",
1269
1014
  static: !0,
1270
1015
  builtIn: !0,
@@ -1308,47 +1053,370 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1308
1053
  }
1309
1054
  }
1310
1055
  }
1311
- ]
1312
- }, _t = {
1313
- name: "Symbol",
1314
- noWrap: !0,
1315
- static: !0,
1316
- builtIn: !0,
1317
- inputs: [
1318
- {
1319
- name: "symbol",
1320
- type: "uiSymbol"
1321
- },
1322
- {
1323
- name: "dataOnly",
1324
- helperText: "Make this a data symbol that doesn't display any UI",
1325
- type: "boolean",
1326
- defaultValue: !1,
1327
- advanced: !0,
1328
- hideFromUI: !0
1056
+ ]
1057
+ }, Qe = {
1058
+ name: "builder-section-component",
1059
+ props: ["maxWidth", "attributes"],
1060
+ methods: {
1061
+ filterAttrs: function(n = {}, t) {
1062
+ const o = "v-on:", r = (i) => i.startsWith(o), s = (i) => !i.startsWith(o), a = (i) => i.replace(o, "");
1063
+ return Object.keys(n).filter(t ? r : s).reduce(
1064
+ (i, c) => ({
1065
+ ...i,
1066
+ [a(c)]: n[c]
1067
+ }),
1068
+ {}
1069
+ );
1070
+ }
1071
+ }
1072
+ };
1073
+ function Ze(e, n, t, o, r, s) {
1074
+ return d(), u("section", _({
1075
+ style: {
1076
+ width: "100%",
1077
+ alignSelf: "stretch",
1078
+ flexGrow: "1",
1079
+ boxSizing: "border-box",
1080
+ maxWidth: `${t.maxWidth && typeof t.maxWidth == "number" ? t.maxWidth : 1200}px`,
1081
+ display: "flex",
1082
+ flexDirection: "column",
1083
+ alignItems: "stretch",
1084
+ marginLeft: "auto",
1085
+ marginRight: "auto"
1086
+ }
1087
+ }, s.filterAttrs(t.attributes, !1), w(s.filterAttrs(t.attributes, !0), !0)), [
1088
+ A(e.$slots, "default")
1089
+ ], 16);
1090
+ }
1091
+ const et = /* @__PURE__ */ g(Qe, [["render", Ze]]), tt = {
1092
+ name: "Symbol",
1093
+ noWrap: !0,
1094
+ static: !0,
1095
+ builtIn: !0,
1096
+ inputs: [
1097
+ {
1098
+ name: "symbol",
1099
+ type: "uiSymbol"
1100
+ },
1101
+ {
1102
+ name: "dataOnly",
1103
+ helperText: "Make this a data symbol that doesn't display any UI",
1104
+ type: "boolean",
1105
+ defaultValue: !1,
1106
+ advanced: !0,
1107
+ hideFromUI: !0
1108
+ },
1109
+ {
1110
+ name: "inheritState",
1111
+ helperText: "Inherit the parent component state and data",
1112
+ type: "boolean",
1113
+ defaultValue: !1,
1114
+ advanced: !0
1115
+ },
1116
+ {
1117
+ name: "renderToLiquid",
1118
+ helperText: "Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",
1119
+ type: "boolean",
1120
+ defaultValue: !1,
1121
+ advanced: !0,
1122
+ hideFromUI: !0
1123
+ },
1124
+ {
1125
+ name: "useChildren",
1126
+ hideFromUI: !0,
1127
+ type: "boolean"
1128
+ }
1129
+ ]
1130
+ };
1131
+ function nt() {
1132
+ return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
1133
+ }
1134
+ function ot() {
1135
+ const e = nt().fetch;
1136
+ if (typeof e > "u")
1137
+ throw console.warn(
1138
+ `Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
1139
+ For more information, read https://github.com/BuilderIO/this-package-uses-fetch`
1140
+ ), new Error("Builder SDK could not find a global `fetch` function");
1141
+ return e;
1142
+ }
1143
+ const te = ot(), st = (e) => {
1144
+ if (e === "localhost" || e === "127.0.0.1")
1145
+ return e;
1146
+ const n = e.split(".");
1147
+ return n.length > 2 ? n.slice(1).join(".") : e;
1148
+ }, ne = async ({
1149
+ name: e,
1150
+ canTrack: n
1151
+ }) => {
1152
+ var t;
1153
+ try {
1154
+ return n ? (t = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : t.split("=")[1] : void 0;
1155
+ } catch (o) {
1156
+ console.debug("[COOKIE] GET error: ", o);
1157
+ return;
1158
+ }
1159
+ }, rt = (e) => e.map(([n, t]) => t ? `${n}=${t}` : n).filter(S).join("; "), it = [
1160
+ ["secure", ""],
1161
+ ["SameSite", "None"]
1162
+ ], at = ({
1163
+ name: e,
1164
+ value: n,
1165
+ expires: t
1166
+ }) => {
1167
+ const r = (f() ? location.protocol === "https:" : !0) ? it : [[]], s = t ? [["expires", t.toUTCString()]] : [[]], a = [
1168
+ [e, n],
1169
+ ...s,
1170
+ ["path", "/"],
1171
+ ["domain", st(window.location.hostname)],
1172
+ ...r
1173
+ ];
1174
+ return rt(a);
1175
+ }, oe = async ({
1176
+ name: e,
1177
+ value: n,
1178
+ expires: t,
1179
+ canTrack: o
1180
+ }) => {
1181
+ try {
1182
+ if (!o)
1183
+ return;
1184
+ const r = at({ name: e, value: n, expires: t });
1185
+ document.cookie = r;
1186
+ } catch (r) {
1187
+ console.warn("[COOKIE] SET error: ", r);
1188
+ }
1189
+ }, ct = "builderio.variations", se = (e) => `${ct}.${e}`, lt = ({
1190
+ contentId: e,
1191
+ canTrack: n
1192
+ }) => ne({ name: se(e), canTrack: n }), dt = ({
1193
+ contentId: e,
1194
+ canTrack: n,
1195
+ value: t
1196
+ }) => oe({ name: se(e), value: t, canTrack: n }), ut = (e) => S(e.id) && S(e.variations) && Object.keys(e.variations).length > 0, mt = ({
1197
+ id: e,
1198
+ variations: n
1199
+ }) => {
1200
+ var r;
1201
+ let t = 0;
1202
+ const o = Math.random();
1203
+ for (const s in n)
1204
+ if (t += (r = n[s]) == null ? void 0 : r.testRatio, o < t)
1205
+ return s;
1206
+ return e;
1207
+ }, D = ({
1208
+ item: e,
1209
+ testGroupId: n
1210
+ }) => {
1211
+ const t = e.variations[n];
1212
+ return n === e.id || !t ? {
1213
+ testVariationId: e.id,
1214
+ testVariationName: "Default"
1215
+ } : {
1216
+ data: t.data,
1217
+ testVariationId: t.id,
1218
+ testVariationName: t.name || (t.id === e.id ? "Default" : "")
1219
+ };
1220
+ }, pt = async ({
1221
+ item: e,
1222
+ canTrack: n
1223
+ }) => {
1224
+ const t = await lt({
1225
+ canTrack: n,
1226
+ contentId: e.id
1227
+ }), o = t ? D({ item: e, testGroupId: t }) : void 0;
1228
+ if (o)
1229
+ return o;
1230
+ {
1231
+ const r = mt({
1232
+ variations: e.variations,
1233
+ id: e.id
1234
+ });
1235
+ return dt({
1236
+ contentId: e.id,
1237
+ value: r,
1238
+ canTrack: n
1239
+ }).catch((s) => {
1240
+ console.error("could not store A/B test variation: ", s);
1241
+ }), D({ item: e, testGroupId: r });
1242
+ }
1243
+ }, ht = async ({
1244
+ item: e,
1245
+ canTrack: n
1246
+ }) => {
1247
+ if (!ut(e))
1248
+ return;
1249
+ const t = await pt({ item: e, canTrack: n });
1250
+ Object.assign(e, t);
1251
+ };
1252
+ function B(e, n = null, t = ".") {
1253
+ return Object.keys(e).reduce((o, r) => {
1254
+ const s = e[r], a = [n, r].filter(Boolean).join(t);
1255
+ return [
1256
+ typeof s == "object",
1257
+ s !== null,
1258
+ !(Array.isArray(s) && s.length === 0)
1259
+ ].every(Boolean) ? { ...o, ...B(s, a, t) } : { ...o, [a]: s };
1260
+ }, {});
1261
+ }
1262
+ const q = "builder.", ft = "options.", gt = (e) => {
1263
+ const n = {};
1264
+ return e.forEach((t, o) => {
1265
+ n[o] = t;
1266
+ }), n;
1267
+ }, bt = (e) => {
1268
+ if (!e)
1269
+ return {};
1270
+ const n = re(e), t = {};
1271
+ return Object.keys(n).forEach((o) => {
1272
+ if (o.startsWith(q)) {
1273
+ const r = o.replace(q, "").replace(ft, "");
1274
+ t[r] = n[o];
1275
+ }
1276
+ }), t;
1277
+ }, yt = () => {
1278
+ if (!f())
1279
+ return {};
1280
+ const e = new URLSearchParams(window.location.search);
1281
+ return bt(e);
1282
+ }, re = (e) => e instanceof URLSearchParams ? gt(e) : e, vt = (e) => {
1283
+ const {
1284
+ limit: n = 30,
1285
+ userAttributes: t,
1286
+ query: o,
1287
+ noTraverse: r = !1,
1288
+ model: s,
1289
+ apiKey: a,
1290
+ includeRefs: i = !0,
1291
+ locale: c
1292
+ } = e;
1293
+ if (!a)
1294
+ throw new Error("Missing API key");
1295
+ const l = new URL(
1296
+ `https://cdn.builder.io/api/v2/content/${s}?apiKey=${a}&limit=${n}&noTraverse=${r}&includeRefs=${i}${c ? `&locale=${c}` : ""}`
1297
+ ), m = {
1298
+ ...yt(),
1299
+ ...re(e.options || {})
1300
+ }, p = B(m);
1301
+ for (const h in p)
1302
+ l.searchParams.set(h, String(p[h]));
1303
+ if (t && l.searchParams.set("userAttributes", JSON.stringify(t)), o) {
1304
+ const h = B({ query: o });
1305
+ for (const v in h)
1306
+ l.searchParams.set(v, JSON.stringify(h[v]));
1307
+ }
1308
+ return l;
1309
+ };
1310
+ async function ie(e) {
1311
+ return (await xt({ ...e, limit: 1 })).results[0] || null;
1312
+ }
1313
+ async function xt(e) {
1314
+ const n = vt(e), o = await (await te(n.href)).json(), r = e.canTrack !== !1;
1315
+ if (r && Array.isArray(o.results))
1316
+ for (const s of o.results)
1317
+ await ht({ item: s, canTrack: r });
1318
+ return o;
1319
+ }
1320
+ const kt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((e) => {
1321
+ throw console.error(
1322
+ "Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
1323
+ e
1324
+ ), e;
1325
+ }), St = {
1326
+ name: "builder-symbol",
1327
+ components: { RenderContent: x(kt) },
1328
+ props: ["attributes", "symbol", "dynamic"],
1329
+ data() {
1330
+ return { fetchedContent: null };
1331
+ },
1332
+ inject: {
1333
+ builderContext: W.key
1334
+ },
1335
+ watch: {
1336
+ onUpdateHook0: {
1337
+ handler() {
1338
+ var n;
1339
+ const e = this.symbol;
1340
+ e && !e.content && !this.fetchedContent && e.model && ((n = this.builderContext) == null ? void 0 : n.apiKey) && ie({
1341
+ model: e.model,
1342
+ apiKey: this.builderContext.apiKey,
1343
+ query: {
1344
+ id: e.entry
1345
+ }
1346
+ }).then((t) => {
1347
+ this.fetchedContent = t;
1348
+ });
1349
+ },
1350
+ immediate: !0
1351
+ }
1352
+ },
1353
+ computed: {
1354
+ className() {
1355
+ var e, n;
1356
+ return [
1357
+ ...Object.keys(this.attributes.class),
1358
+ "builder-symbol",
1359
+ (e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
1360
+ ((n = this.symbol) == null ? void 0 : n.dynamic) || this.dynamic ? "builder-dynamic-symbol" : void 0
1361
+ ].filter(Boolean).join(" ");
1329
1362
  },
1330
- {
1331
- name: "inheritState",
1332
- helperText: "Inherit the parent component state and data",
1333
- type: "boolean",
1334
- defaultValue: !1,
1335
- advanced: !0
1363
+ contentToUse() {
1364
+ var e;
1365
+ return ((e = this.symbol) == null ? void 0 : e.content) || this.fetchedContent;
1336
1366
  },
1337
- {
1338
- name: "renderToLiquid",
1339
- helperText: "Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",
1340
- type: "boolean",
1341
- defaultValue: !1,
1342
- advanced: !0,
1343
- hideFromUI: !0
1367
+ onUpdateHook0() {
1368
+ return {
1369
+ 0: this.symbol,
1370
+ 1: this.fetchedContent
1371
+ };
1372
+ }
1373
+ },
1374
+ methods: {
1375
+ filterAttrs: function(n = {}, t) {
1376
+ const o = "v-on:", r = (i) => i.startsWith(o), s = (i) => !i.startsWith(o), a = (i) => i.replace(o, "");
1377
+ return Object.keys(n).filter(t ? r : s).reduce(
1378
+ (i, c) => ({
1379
+ ...i,
1380
+ [a(c)]: n[c]
1381
+ }),
1382
+ {}
1383
+ );
1344
1384
  },
1345
- {
1346
- name: "useChildren",
1347
- hideFromUI: !0,
1348
- type: "boolean"
1385
+ _classStringToObject(e) {
1386
+ const n = {};
1387
+ if (typeof e != "string")
1388
+ return n;
1389
+ const t = e.trim().split(/\s+/);
1390
+ for (const o of t)
1391
+ n[o] = !0;
1392
+ return n;
1349
1393
  }
1350
- ]
1351
- }, wt = {
1394
+ }
1395
+ }, _t = ["dataSet"];
1396
+ function Ct(e, n, t, o, r, s) {
1397
+ var i, c, l, m, p;
1398
+ const a = k("render-content");
1399
+ return d(), u("div", _({
1400
+ dataSet: {
1401
+ class: s.className
1402
+ },
1403
+ class: s._classStringToObject(s.className)
1404
+ }, s.filterAttrs(t.attributes, !1), w(s.filterAttrs(t.attributes, !0), !0)), [
1405
+ Q(a, {
1406
+ apiKey: s.builderContext.apiKey,
1407
+ context: s.builderContext.context,
1408
+ customComponents: Object.values(s.builderContext.registeredComponents),
1409
+ data: {
1410
+ ...(i = t.symbol) == null ? void 0 : i.data,
1411
+ ...s.builderContext.state,
1412
+ ...(m = (l = (c = t.symbol) == null ? void 0 : c.content) == null ? void 0 : l.data) == null ? void 0 : m.state
1413
+ },
1414
+ model: (p = t.symbol) == null ? void 0 : p.model,
1415
+ content: s.contentToUse
1416
+ }, null, 8, ["apiKey", "context", "customComponents", "data", "model", "content"])
1417
+ ], 16, _t);
1418
+ }
1419
+ const wt = /* @__PURE__ */ g(St, [["render", Ct]]), It = {
1352
1420
  name: "Text",
1353
1421
  static: !0,
1354
1422
  builtIn: !0,
@@ -1368,7 +1436,17 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1368
1436
  height: "auto",
1369
1437
  textAlign: "center"
1370
1438
  }
1371
- }, It = {
1439
+ }, Tt = {
1440
+ name: "builder-text",
1441
+ props: ["text"]
1442
+ }, Rt = ["innerHTML"];
1443
+ function Et(e, n, t, o, r, s) {
1444
+ return d(), u("span", {
1445
+ class: "builder-text",
1446
+ innerHTML: t.text
1447
+ }, null, 8, Rt);
1448
+ }
1449
+ const At = /* @__PURE__ */ g(Tt, [["render", Et]]), jt = {
1372
1450
  name: "Video",
1373
1451
  canHaveChildren: !0,
1374
1452
  builtIn: !0,
@@ -1470,7 +1548,64 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1470
1548
  advanced: !0
1471
1549
  }
1472
1550
  ]
1473
- }, Tt = {
1551
+ }, Pt = {
1552
+ name: "builder-video",
1553
+ props: [
1554
+ "autoPlay",
1555
+ "muted",
1556
+ "controls",
1557
+ "loop",
1558
+ "playsInline",
1559
+ "attributes",
1560
+ "fit",
1561
+ "position",
1562
+ "video",
1563
+ "posterImage"
1564
+ ],
1565
+ computed: {
1566
+ videoProps() {
1567
+ return {
1568
+ ...this.autoPlay === !0 ? {
1569
+ autoPlay: !0
1570
+ } : {},
1571
+ ...this.muted === !0 ? {
1572
+ muted: !0
1573
+ } : {},
1574
+ ...this.controls === !0 ? {
1575
+ controls: !0
1576
+ } : {},
1577
+ ...this.loop === !0 ? {
1578
+ loop: !0
1579
+ } : {},
1580
+ ...this.playsInline === !0 ? {
1581
+ playsInline: !0
1582
+ } : {}
1583
+ };
1584
+ },
1585
+ spreadProps() {
1586
+ return {
1587
+ ...this.attributes,
1588
+ ...this.videoProps
1589
+ };
1590
+ }
1591
+ }
1592
+ }, Ot = ["src", "poster"];
1593
+ function Ft(e, n, t, o, r, s) {
1594
+ var a;
1595
+ return d(), u("video", _({
1596
+ style: {
1597
+ width: "100%",
1598
+ height: "100%",
1599
+ ...(a = t.attributes) == null ? void 0 : a.style,
1600
+ objectFit: t.fit,
1601
+ objectPosition: t.position,
1602
+ borderRadius: 1
1603
+ },
1604
+ src: t.video || "no-src",
1605
+ poster: t.posterImage
1606
+ }, s.spreadProps), null, 16, Ot);
1607
+ }
1608
+ const Bt = /* @__PURE__ */ g(Pt, [["render", Ft]]), Ut = {
1474
1609
  name: "Embed",
1475
1610
  static: !0,
1476
1611
  builtIn: !0,
@@ -1481,7 +1616,7 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1481
1616
  required: !0,
1482
1617
  defaultValue: "",
1483
1618
  helperText: "e.g. enter a youtube url, google map, etc",
1484
- onChange: B(
1619
+ onChange: P(
1485
1620
  (e) => {
1486
1621
  const n = e.get("url");
1487
1622
  if (n)
@@ -1506,11 +1641,11 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1506
1641
  hideFromUI: !0
1507
1642
  }
1508
1643
  ]
1509
- }, Rt = [
1644
+ }, Vt = [
1510
1645
  "text/javascript",
1511
1646
  "application/javascript",
1512
1647
  "application/ecmascript"
1513
- ], Et = (e) => Rt.includes(e.type), jt = {
1648
+ ], Wt = (e) => Vt.includes(e.type), Nt = {
1514
1649
  name: "builder-embed",
1515
1650
  props: ["content"],
1516
1651
  data() {
@@ -1543,7 +1678,7 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1543
1678
  this.scriptsInserted.push(t.src);
1544
1679
  const o = document.createElement("script");
1545
1680
  o.async = !0, o.src = t.src, document.head.appendChild(o);
1546
- } else if (Et(t) && !this.scriptsRun.includes(t.innerText))
1681
+ } else if (Wt(t) && !this.scriptsRun.includes(t.innerText))
1547
1682
  try {
1548
1683
  this.scriptsRun.push(t.innerText), new Function(t.innerText)();
1549
1684
  } catch (o) {
@@ -1552,22 +1687,15 @@ const yt = /* @__PURE__ */ g(gt, [["render", bt]]), vt = {
1552
1687
  }
1553
1688
  }
1554
1689
  }
1555
- }, Bt = ["innerHTML"];
1556
- function Ft(e, n, t, o, r, s) {
1557
- return l(), u("div", {
1690
+ }, Lt = ["innerHTML"];
1691
+ function Mt(e, n, t, o, r, s) {
1692
+ return d(), u("div", {
1558
1693
  class: "builder-embed",
1559
1694
  ref: "elem",
1560
1695
  innerHTML: t.content
1561
- }, null, 8, Bt);
1562
- }
1563
- const Ot = /* @__PURE__ */ g(jt, [["render", Ft]]);
1564
- function At() {
1565
- return f() && window.self !== window.top;
1566
- }
1567
- function y() {
1568
- return At() && window.location.search.indexOf("builder.frameEditing=") !== -1;
1696
+ }, null, 8, Lt);
1569
1697
  }
1570
- const Pt = {
1698
+ const $t = /* @__PURE__ */ g(Nt, [["render", Mt]]), zt = {
1571
1699
  name: "builder-img-component",
1572
1700
  props: [
1573
1701
  "backgroundSize",
@@ -1579,10 +1707,22 @@ const Pt = {
1579
1707
  ],
1580
1708
  data() {
1581
1709
  return { isEditing: y };
1710
+ },
1711
+ methods: {
1712
+ filterAttrs: function(n = {}, t) {
1713
+ const o = "v-on:", r = (i) => i.startsWith(o), s = (i) => !i.startsWith(o), a = (i) => i.replace(o, "");
1714
+ return Object.keys(n).filter(t ? r : s).reduce(
1715
+ (i, c) => ({
1716
+ ...i,
1717
+ [a(c)]: n[c]
1718
+ }),
1719
+ {}
1720
+ );
1721
+ }
1582
1722
  }
1583
- }, Ut = ["alt", "src"];
1584
- function $t(e, n, t, o, r, s) {
1585
- return l(), u("img", S({
1723
+ }, Kt = ["alt", "src"];
1724
+ function Ht(e, n, t, o, r, s) {
1725
+ return d(), u("img", _({
1586
1726
  style: {
1587
1727
  objectFit: t.backgroundSize || "cover",
1588
1728
  objectPosition: t.backgroundPosition || "center"
@@ -1590,9 +1730,9 @@ function $t(e, n, t, o, r, s) {
1590
1730
  key: r.isEditing() && t.imgSrc || "default-key",
1591
1731
  alt: t.altText,
1592
1732
  src: t.imgSrc || t.image
1593
- }, t.attributes), null, 16, Ut);
1733
+ }, s.filterAttrs(t.attributes, !1), w(s.filterAttrs(t.attributes, !0), !0)), null, 16, Kt);
1594
1734
  }
1595
- const Vt = /* @__PURE__ */ g(Pt, [["render", $t]]), Lt = {
1735
+ const Dt = /* @__PURE__ */ g(zt, [["render", Ht]]), qt = {
1596
1736
  name: "Raw:Img",
1597
1737
  hideFromInsertMenu: !0,
1598
1738
  builtIn: !0,
@@ -1608,7 +1748,7 @@ const Vt = /* @__PURE__ */ g(Pt, [["render", $t]]), Lt = {
1608
1748
  ],
1609
1749
  noWrap: !0,
1610
1750
  static: !0
1611
- }, Wt = {
1751
+ }, Gt = {
1612
1752
  name: "builder-custom-code",
1613
1753
  props: ["replaceNodes", "code"],
1614
1754
  data() {
@@ -1655,9 +1795,9 @@ const Vt = /* @__PURE__ */ g(Pt, [["render", $t]]), Lt = {
1655
1795
  return n;
1656
1796
  }
1657
1797
  }
1658
- }, Mt = ["innerHTML"];
1659
- function Nt(e, n, t, o, r, s) {
1660
- return l(), u("div", {
1798
+ }, Jt = ["innerHTML"];
1799
+ function Xt(e, n, t, o, r, s) {
1800
+ return d(), u("div", {
1661
1801
  ref: "elem",
1662
1802
  class: j(
1663
1803
  s._classStringToObject(
@@ -1665,9 +1805,9 @@ function Nt(e, n, t, o, r, s) {
1665
1805
  )
1666
1806
  ),
1667
1807
  innerHTML: t.code
1668
- }, null, 10, Mt);
1808
+ }, null, 10, Jt);
1669
1809
  }
1670
- const zt = /* @__PURE__ */ g(Wt, [["render", Nt]]), Kt = {
1810
+ const Yt = /* @__PURE__ */ g(Gt, [["render", Xt]]), Qt = {
1671
1811
  name: "Custom Code",
1672
1812
  static: !0,
1673
1813
  builtIn: !0,
@@ -1694,20 +1834,20 @@ const zt = /* @__PURE__ */ g(Wt, [["render", Nt]]), Kt = {
1694
1834
  advanced: !0
1695
1835
  }
1696
1836
  ]
1697
- }, Ht = () => [
1698
- { component: ke, ...xt },
1699
- { component: Ee, ...Ct },
1700
- { component: Vt, ...Lt },
1701
- { component: Oe, ...wt },
1702
- { component: $e, ...It },
1703
- { component: ct, ..._t },
1704
- { component: mt, ...vt },
1705
- { component: ft, ...St },
1706
- { component: yt, ...kt },
1707
- { component: Ot, ...Tt },
1708
- { component: zt, ...Kt }
1837
+ }, Zt = () => [
1838
+ { component: ve, ...qe },
1839
+ { component: Te, ...Ge },
1840
+ { component: Yt, ...Qt },
1841
+ { component: $t, ...Ut },
1842
+ { component: Ae, ...Je },
1843
+ { component: We, ...Xe },
1844
+ { component: Dt, ...qt },
1845
+ { component: et, ...Ye },
1846
+ { component: wt, ...tt },
1847
+ { component: At, ...It },
1848
+ { component: Bt, ...jt }
1709
1849
  ];
1710
- function q({
1850
+ function G({
1711
1851
  code: e,
1712
1852
  context: n,
1713
1853
  state: t,
@@ -1722,7 +1862,7 @@ function q({
1722
1862
  isEditing: y(),
1723
1863
  isBrowser: f(),
1724
1864
  isServer: !f()
1725
- }, c = r && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
1865
+ }, i = r && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
1726
1866
  try {
1727
1867
  return new Function(
1728
1868
  "builder",
@@ -1730,127 +1870,127 @@ function q({
1730
1870
  "state",
1731
1871
  "context",
1732
1872
  "event",
1733
- c
1873
+ i
1734
1874
  )(s, s, t, n, o);
1735
- } catch (a) {
1875
+ } catch (c) {
1736
1876
  console.warn(
1737
1877
  `Builder custom code error:
1738
1878
  While Evaluating:
1739
1879
  `,
1740
- c,
1880
+ i,
1741
1881
  `
1742
1882
  `,
1743
- a
1883
+ c
1744
1884
  );
1745
1885
  }
1746
1886
  }
1747
- function qt() {
1887
+ function en() {
1748
1888
  return !f() || y() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1749
1889
  }
1750
- const se = [];
1751
- function jn(e, n) {
1752
- return se.push({ component: e, ...n }), console.warn(
1890
+ const ae = [];
1891
+ function Fn(e, n) {
1892
+ return ae.push({ component: e, ...n }), console.warn(
1753
1893
  "registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
1754
1894
  ), e;
1755
1895
  }
1756
- const Dt = ({
1896
+ const tn = ({
1757
1897
  component: e,
1758
1898
  ...n
1759
1899
  }) => ({
1760
1900
  type: "builder.registerComponent",
1761
- data: Jt(n)
1762
- }), Gt = (e) => typeof e == "function" ? B(e) : U(e), Jt = ({
1901
+ data: on(n)
1902
+ }), nn = (e) => typeof e == "function" ? P(e) : V(e), on = ({
1763
1903
  inputs: e,
1764
1904
  ...n
1765
1905
  }) => ({
1766
- ...U(n),
1906
+ ...V(n),
1767
1907
  inputs: e == null ? void 0 : e.map(
1768
1908
  (t) => Object.entries(t).reduce(
1769
1909
  (o, [r, s]) => ({
1770
1910
  ...o,
1771
- [r]: Gt(s)
1911
+ [r]: nn(s)
1772
1912
  }),
1773
1913
  {}
1774
1914
  )
1775
1915
  )
1776
1916
  });
1777
- function Xt() {
1917
+ function sn() {
1778
1918
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1779
1919
  const n = Math.random() * 16 | 0;
1780
1920
  return (e == "x" ? n : n & 3 | 8).toString(16);
1781
1921
  });
1782
1922
  }
1783
- function re() {
1784
- return Xt().replace(/-/g, "");
1923
+ function ce() {
1924
+ return sn().replace(/-/g, "");
1785
1925
  }
1786
- const ie = "builderSessionId", Yt = async ({
1926
+ const le = "builderSessionId", rn = async ({
1787
1927
  canTrack: e
1788
1928
  }) => {
1789
1929
  if (!e)
1790
1930
  return;
1791
- const n = await Z({
1792
- name: ie,
1931
+ const n = await ne({
1932
+ name: le,
1793
1933
  canTrack: e
1794
1934
  });
1795
- if (C(n))
1935
+ if (S(n))
1796
1936
  return n;
1797
1937
  {
1798
- const t = Qt();
1799
- return Zt({ id: t, canTrack: e }), t;
1938
+ const t = an();
1939
+ return cn({ id: t, canTrack: e }), t;
1800
1940
  }
1801
- }, Qt = () => re(), Zt = ({
1941
+ }, an = () => ce(), cn = ({
1802
1942
  id: e,
1803
1943
  canTrack: n
1804
- }) => ee({ name: ie, value: e, canTrack: n }), ae = () => f() && typeof localStorage < "u" ? localStorage : void 0, en = ({
1944
+ }) => oe({ name: le, value: e, canTrack: n }), de = () => f() && typeof localStorage < "u" ? localStorage : void 0, ln = ({
1805
1945
  key: e,
1806
1946
  canTrack: n
1807
1947
  }) => {
1808
1948
  var t;
1809
1949
  try {
1810
- return n ? (t = ae()) == null ? void 0 : t.getItem(e) : void 0;
1950
+ return n ? (t = de()) == null ? void 0 : t.getItem(e) : void 0;
1811
1951
  } catch (o) {
1812
1952
  console.debug("[LocalStorage] GET error: ", o);
1813
1953
  return;
1814
1954
  }
1815
- }, tn = ({
1955
+ }, dn = ({
1816
1956
  key: e,
1817
1957
  canTrack: n,
1818
1958
  value: t
1819
1959
  }) => {
1820
1960
  var o;
1821
1961
  try {
1822
- n && ((o = ae()) == null || o.setItem(e, t));
1962
+ n && ((o = de()) == null || o.setItem(e, t));
1823
1963
  } catch (r) {
1824
1964
  console.debug("[LocalStorage] SET error: ", r);
1825
1965
  }
1826
- }, ce = "builderVisitorId", nn = ({ canTrack: e }) => {
1966
+ }, ue = "builderVisitorId", un = ({ canTrack: e }) => {
1827
1967
  if (!e)
1828
1968
  return;
1829
- const n = en({
1830
- key: ce,
1969
+ const n = ln({
1970
+ key: ue,
1831
1971
  canTrack: e
1832
1972
  });
1833
- if (C(n))
1973
+ if (S(n))
1834
1974
  return n;
1835
1975
  {
1836
- const t = on();
1837
- return sn({ id: t, canTrack: e }), t;
1976
+ const t = mn();
1977
+ return pn({ id: t, canTrack: e }), t;
1838
1978
  }
1839
- }, on = () => re(), sn = ({
1979
+ }, mn = () => ce(), pn = ({
1840
1980
  id: e,
1841
1981
  canTrack: n
1842
- }) => tn({
1843
- key: ce,
1982
+ }) => dn({
1983
+ key: ue,
1844
1984
  value: e,
1845
1985
  canTrack: n
1846
- }), rn = () => {
1986
+ }), hn = () => {
1847
1987
  if (f()) {
1848
1988
  const e = new URL(location.href);
1849
1989
  return e.pathname === "" && (e.pathname = "/"), e;
1850
1990
  } else
1851
1991
  return console.warn("Cannot get location for tracking in non-browser environment"), null;
1852
- }, an = () => typeof navigator == "object" && navigator.userAgent || "", cn = () => {
1853
- const e = an(), n = {
1992
+ }, fn = () => typeof navigator == "object" && navigator.userAgent || "", gn = () => {
1993
+ const e = fn(), n = {
1854
1994
  Android() {
1855
1995
  return e.match(/Android/i);
1856
1996
  },
@@ -1867,25 +2007,25 @@ const ie = "builderSessionId", Yt = async ({
1867
2007
  return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
1868
2008
  },
1869
2009
  any() {
1870
- return n.Android() || n.BlackBerry() || n.iOS() || n.Opera() || n.Windows() || T === "reactNative";
2010
+ return n.Android() || n.BlackBerry() || n.iOS() || n.Opera() || n.Windows() || R === "reactNative";
1871
2011
  }
1872
- }, t = e.match(/Tablet|iPad/i), o = rn();
2012
+ }, t = e.match(/Tablet|iPad/i), o = hn();
1873
2013
  return {
1874
2014
  urlPath: o == null ? void 0 : o.pathname,
1875
2015
  host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
1876
2016
  device: t ? "tablet" : n.any() ? "mobile" : "desktop"
1877
2017
  };
1878
- }, ln = async ({
2018
+ }, bn = async ({
1879
2019
  canTrack: e
1880
2020
  }) => {
1881
2021
  if (!e)
1882
2022
  return { visitorId: void 0, sessionId: void 0 };
1883
- const n = await Yt({ canTrack: e }), t = nn({ canTrack: e });
2023
+ const n = await rn({ canTrack: e }), t = un({ canTrack: e });
1884
2024
  return {
1885
2025
  sessionId: n,
1886
2026
  visitorId: t
1887
2027
  };
1888
- }, dn = async ({
2028
+ }, yn = async ({
1889
2029
  type: e,
1890
2030
  canTrack: n,
1891
2031
  apiKey: t,
@@ -1899,23 +2039,23 @@ const ie = "builderSessionId", Yt = async ({
1899
2039
  url: location.href,
1900
2040
  ...o
1901
2041
  },
1902
- ...await ln({ canTrack: n }),
1903
- userAttributes: cn(),
2042
+ ...await bn({ canTrack: n }),
2043
+ userAttributes: gn(),
1904
2044
  ownerId: t
1905
2045
  }
1906
2046
  });
1907
- async function P(e) {
2047
+ async function U(e) {
1908
2048
  if (!e.apiKey) {
1909
2049
  console.error(
1910
2050
  "[Builder.io]: Missing API key for track call. Please provide your API key."
1911
2051
  );
1912
2052
  return;
1913
2053
  }
1914
- if (!!e.canTrack && !y() && !!(f() || T === "reactNative"))
2054
+ if (!!e.canTrack && !y() && !!(f() || R === "reactNative"))
1915
2055
  return fetch("https://builder.io/api/v1/track", {
1916
2056
  method: "POST",
1917
2057
  body: JSON.stringify({
1918
- events: [await dn(e)]
2058
+ events: [await yn(e)]
1919
2059
  }),
1920
2060
  headers: {
1921
2061
  "content-type": "application/json"
@@ -1925,11 +2065,11 @@ async function P(e) {
1925
2065
  console.error("Failed to track: ", n);
1926
2066
  });
1927
2067
  }
1928
- const Bn = (e) => P({ ...e, canTrack: !0 });
1929
- function D(e) {
2068
+ const Bn = (e) => U({ ...e, canTrack: !0 });
2069
+ function J(e) {
1930
2070
  return Math.round(e * 1e3) / 1e3;
1931
2071
  }
1932
- const un = (e, n, t = !0) => {
2072
+ const vn = (e, n, t = !0) => {
1933
2073
  if (!(e instanceof HTMLElement))
1934
2074
  return null;
1935
2075
  let o = t ? e : e.parentElement;
@@ -1940,52 +2080,79 @@ const un = (e, n, t = !0) => {
1940
2080
  return o;
1941
2081
  } while (o = o.parentElement);
1942
2082
  return null;
1943
- }, mn = (e) => un(e, (n) => {
2083
+ }, xn = (e) => vn(e, (n) => {
1944
2084
  const t = n.getAttribute("builder-id") || n.id;
1945
2085
  return Boolean((t == null ? void 0 : t.indexOf("builder-")) === 0);
1946
- }), G = ({
2086
+ }), X = ({
1947
2087
  event: e,
1948
2088
  target: n
1949
2089
  }) => {
1950
- const t = n.getBoundingClientRect(), o = e.clientX - t.left, r = e.clientY - t.top, s = D(o / t.width), i = D(r / t.height);
2090
+ const t = n.getBoundingClientRect(), o = e.clientX - t.left, r = e.clientY - t.top, s = J(o / t.width), a = J(r / t.height);
1951
2091
  return {
1952
2092
  x: s,
1953
- y: i
2093
+ y: a
1954
2094
  };
1955
- }, pn = (e) => {
1956
- const n = e.target, t = n && mn(n), o = (t == null ? void 0 : t.getAttribute("builder-id")) || (t == null ? void 0 : t.id);
2095
+ }, kn = (e) => {
2096
+ const n = e.target, t = n && xn(n), o = (t == null ? void 0 : t.getAttribute("builder-id")) || (t == null ? void 0 : t.id);
1957
2097
  return {
1958
2098
  targetBuilderElement: o || void 0,
1959
2099
  metadata: {
1960
- targetOffset: n ? G({ event: e, target: n }) : void 0,
1961
- builderTargetOffset: t ? G({ event: e, target: t }) : void 0,
2100
+ targetOffset: n ? X({ event: e, target: n }) : void 0,
2101
+ builderTargetOffset: t ? X({ event: e, target: t }) : void 0,
1962
2102
  builderElementIndex: t && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(t) : void 0
1963
2103
  }
1964
2104
  };
1965
- }, hn = () => Promise.resolve().then(() => le).then((e) => e.default).catch((e) => {
2105
+ }, Sn = ({
2106
+ content: e,
2107
+ data: n,
2108
+ locale: t
2109
+ }) => {
2110
+ var s, a, i;
2111
+ const o = {};
2112
+ (a = (s = e == null ? void 0 : e.data) == null ? void 0 : s.inputs) == null || a.forEach((c) => {
2113
+ var l;
2114
+ c.name && c.defaultValue !== void 0 && ((l = e == null ? void 0 : e.data) == null ? void 0 : l.state) && e.data.state[c.name] === void 0 && (o[c.name] = c.defaultValue);
2115
+ });
2116
+ const r = {
2117
+ ...(i = e == null ? void 0 : e.data) == null ? void 0 : i.state,
2118
+ ...n,
2119
+ ...t ? { locale: t } : {}
2120
+ };
2121
+ return { ...o, ...r };
2122
+ }, _n = ({
2123
+ content: e,
2124
+ data: n
2125
+ }) => e ? {
2126
+ ...e,
2127
+ data: {
2128
+ ...e == null ? void 0 : e.data,
2129
+ ...n
2130
+ },
2131
+ meta: e == null ? void 0 : e.meta
2132
+ } : void 0, Cn = () => Promise.resolve().then(() => ee).then((e) => e.default).catch((e) => {
1966
2133
  throw console.error(
1967
2134
  "Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
1968
2135
  e
1969
2136
  ), e;
1970
- }), fn = () => import("./render-styles.8780951f.js").then((e) => e.default).catch((e) => {
2137
+ }), wn = () => import("./render-styles.f59a1cf7.js").then((e) => e.default).catch((e) => {
1971
2138
  throw console.error(
1972
2139
  "Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
1973
2140
  e
1974
2141
  ), e;
1975
- }), gn = {
2142
+ }), In = {
1976
2143
  name: "render-content",
1977
2144
  components: {
1978
- RenderContentStyles: x(fn),
1979
- RenderBlocks: x(hn)
2145
+ RenderContentStyles: x(wn),
2146
+ RenderBlocks: x(Cn)
1980
2147
  },
1981
2148
  props: [
1982
2149
  "content",
1983
2150
  "data",
1984
2151
  "canTrack",
1985
2152
  "locale",
1986
- "context",
1987
2153
  "customComponents",
1988
2154
  "model",
2155
+ "context",
1989
2156
  "apiKey",
1990
2157
  "includeRefs"
1991
2158
  ],
@@ -1993,14 +2160,20 @@ const un = (e, n, t = !0) => {
1993
2160
  return {
1994
2161
  forceReRenderCount: 0,
1995
2162
  overrideContent: null,
2163
+ useContent: _n({
2164
+ content: this.content,
2165
+ data: this.data
2166
+ }),
1996
2167
  update: 0,
1997
- useBreakpoints: null,
1998
- canTrackToUse: C(this.canTrack) ? this.canTrack : !0,
1999
- overrideState: {},
2000
- contextContext: this.context || {},
2168
+ canTrackToUse: S(this.canTrack) ? this.canTrack : !0,
2169
+ contentState: Sn({
2170
+ content: this.content,
2171
+ data: this.data,
2172
+ locale: this.locale
2173
+ }),
2001
2174
  allRegisteredComponents: [
2002
- ...Ht(),
2003
- ...se,
2175
+ ...Zt(),
2176
+ ...ae,
2004
2177
  ...this.customComponents || []
2005
2178
  ].reduce(
2006
2179
  (e, n) => ({
@@ -2016,10 +2189,11 @@ const un = (e, n, t = !0) => {
2016
2189
  provide() {
2017
2190
  const e = this;
2018
2191
  return {
2019
- [$.key]: {
2192
+ [W.key]: {
2020
2193
  content: e.useContent,
2021
2194
  state: e.contentState,
2022
- context: e.contextContext,
2195
+ setState: e.setContextState,
2196
+ context: e.context || {},
2023
2197
  apiKey: e.apiKey,
2024
2198
  registeredComponents: e.allRegisteredComponents
2025
2199
  }
@@ -2030,7 +2204,7 @@ const un = (e, n, t = !0) => {
2030
2204
  if (this.apiKey || console.error(
2031
2205
  "[Builder.io]: No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2032
2206
  ), f()) {
2033
- if (y() && (this.forceReRenderCount = this.forceReRenderCount + 1, me(), pe({
2207
+ if (y() && (this.forceReRenderCount = this.forceReRenderCount + 1, he(), fe({
2034
2208
  ...this.locale ? {
2035
2209
  locale: this.locale
2036
2210
  } : {},
@@ -2040,7 +2214,7 @@ const un = (e, n, t = !0) => {
2040
2214
  }), Object.values(this.allRegisteredComponents).forEach(
2041
2215
  (t) => {
2042
2216
  var r;
2043
- const o = Dt(t);
2217
+ const o = tn(t);
2044
2218
  (r = window.parent) == null || r.postMessage(o, "*");
2045
2219
  }
2046
2220
  ), window.addEventListener("message", this.processMessage), window.addEventListener(
@@ -2048,7 +2222,7 @@ const un = (e, n, t = !0) => {
2048
2222
  this.emitStateUpdate
2049
2223
  )), this.useContent) {
2050
2224
  const t = (e = this.useContent) == null ? void 0 : e.testVariationId, o = (n = this.useContent) == null ? void 0 : n.id;
2051
- P({
2225
+ U({
2052
2226
  type: "impression",
2053
2227
  canTrack: this.canTrackToUse,
2054
2228
  contentId: o,
@@ -2056,13 +2230,13 @@ const un = (e, n, t = !0) => {
2056
2230
  variationId: t !== o ? t : void 0
2057
2231
  });
2058
2232
  }
2059
- if (qt()) {
2233
+ if (en()) {
2060
2234
  const t = new URL(location.href).searchParams, o = t.get("builder.preview"), r = t.get("apiKey") || t.get("builder.space");
2061
- o === this.model && r === this.apiKey && oe({
2235
+ o === this.model && r === this.apiKey && ie({
2062
2236
  model: this.model,
2063
2237
  apiKey: this.apiKey
2064
2238
  }).then((s) => {
2065
- s && (this.overrideContent = s);
2239
+ s && this.mergeNewContent(s);
2066
2240
  });
2067
2241
  }
2068
2242
  this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
@@ -2095,39 +2269,10 @@ const un = (e, n, t = !0) => {
2095
2269
  ));
2096
2270
  },
2097
2271
  computed: {
2098
- useContent() {
2099
- var e, n, t, o, r, s, i, c;
2100
- if (!(!this.content && !this.overrideContent))
2101
- return {
2102
- ...this.content,
2103
- ...this.overrideContent,
2104
- data: {
2105
- ...(e = this.content) == null ? void 0 : e.data,
2106
- ...this.data,
2107
- ...(n = this.overrideContent) == null ? void 0 : n.data
2108
- },
2109
- meta: {
2110
- ...(t = this.content) == null ? void 0 : t.meta,
2111
- ...(o = this.overrideContent) == null ? void 0 : o.meta,
2112
- breakpoints: this.useBreakpoints || ((s = (r = this.overrideContent) == null ? void 0 : r.meta) == null ? void 0 : s.breakpoints) || ((c = (i = this.content) == null ? void 0 : i.meta) == null ? void 0 : c.breakpoints)
2113
- }
2114
- };
2115
- },
2116
- contentState() {
2117
- var e, n;
2118
- return {
2119
- ...(n = (e = this.content) == null ? void 0 : e.data) == null ? void 0 : n.state,
2120
- ...this.data,
2121
- ...this.locale ? {
2122
- locale: this.locale
2123
- } : {},
2124
- ...this.overrideState
2125
- };
2126
- },
2127
2272
  shouldRenderContentStyles() {
2128
2273
  var e, n, t, o, r;
2129
2274
  return Boolean(
2130
- (((n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.cssCode) || ((r = (o = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : o.customFonts) == null ? void 0 : r.length)) && T !== "reactNative"
2275
+ (((n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.cssCode) || ((r = (o = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : o.customFonts) == null ? void 0 : r.length)) && R !== "reactNative"
2131
2276
  );
2132
2277
  },
2133
2278
  onUpdateHook0() {
@@ -2150,6 +2295,35 @@ const un = (e, n, t = !0) => {
2150
2295
  }
2151
2296
  },
2152
2297
  methods: {
2298
+ mergeNewContent(e) {
2299
+ var n, t, o, r, s;
2300
+ this.useContent = {
2301
+ ...this.useContent,
2302
+ ...e,
2303
+ data: {
2304
+ ...(n = this.useContent) == null ? void 0 : n.data,
2305
+ ...e == null ? void 0 : e.data
2306
+ },
2307
+ meta: {
2308
+ ...(t = this.useContent) == null ? void 0 : t.meta,
2309
+ ...e == null ? void 0 : e.meta,
2310
+ breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((s = (r = this.useContent) == null ? void 0 : r.meta) == null ? void 0 : s.breakpoints)
2311
+ }
2312
+ };
2313
+ },
2314
+ setBreakpoints(e) {
2315
+ var n;
2316
+ this.useContent = {
2317
+ ...this.useContent,
2318
+ meta: {
2319
+ ...(n = this.useContent) == null ? void 0 : n.meta,
2320
+ breakpoints: e
2321
+ }
2322
+ };
2323
+ },
2324
+ setContextState(e) {
2325
+ this.contentState = e;
2326
+ },
2153
2327
  processMessage(e) {
2154
2328
  var t;
2155
2329
  const { data: n } = e;
@@ -2159,12 +2333,12 @@ const un = (e, n, t = !0) => {
2159
2333
  const o = n.data, { breakpoints: r, contentId: s } = o;
2160
2334
  if (!s || s !== ((t = this.useContent) == null ? void 0 : t.id))
2161
2335
  return;
2162
- this.useBreakpoints = r, this.forceReRenderCount = this.forceReRenderCount + 1;
2336
+ r && this.setBreakpoints(r), this.forceReRenderCount = this.forceReRenderCount + 1;
2163
2337
  break;
2164
2338
  }
2165
2339
  case "builder.contentUpdate": {
2166
2340
  const o = n.data, r = o.key || o.alias || o.entry || o.modelName, s = o.data;
2167
- r === this.model && (this.overrideContent = s, this.forceReRenderCount = this.forceReRenderCount + 1);
2341
+ r === this.model && (this.mergeNewContent(s), this.forceReRenderCount = this.forceReRenderCount + 1);
2168
2342
  break;
2169
2343
  }
2170
2344
  }
@@ -2172,9 +2346,9 @@ const un = (e, n, t = !0) => {
2172
2346
  evaluateJsCode() {
2173
2347
  var n, t;
2174
2348
  const e = (t = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : t.jsCode;
2175
- e && q({
2349
+ e && G({
2176
2350
  code: e,
2177
- context: this.contextContext,
2351
+ context: this.context || {},
2178
2352
  state: this.contentState
2179
2353
  });
2180
2354
  },
@@ -2182,13 +2356,13 @@ const un = (e, n, t = !0) => {
2182
2356
  var n, t;
2183
2357
  if (this.useContent) {
2184
2358
  const o = (n = this.useContent) == null ? void 0 : n.testVariationId, r = (t = this.useContent) == null ? void 0 : t.id;
2185
- P({
2359
+ U({
2186
2360
  type: "click",
2187
2361
  canTrack: this.canTrackToUse,
2188
2362
  contentId: r,
2189
2363
  apiKey: this.apiKey,
2190
2364
  variationId: o !== r ? o : void 0,
2191
- ...pn(e),
2365
+ ...kn(e),
2192
2366
  unique: !this.clicked
2193
2367
  });
2194
2368
  }
@@ -2197,20 +2371,20 @@ const un = (e, n, t = !0) => {
2197
2371
  evalExpression(e) {
2198
2372
  return e.replace(
2199
2373
  /{{([^}]+)}}/g,
2200
- (n, t) => q({
2374
+ (n, t) => G({
2201
2375
  code: t,
2202
- context: this.contextContext,
2376
+ context: this.context || {},
2203
2377
  state: this.contentState
2204
2378
  })
2205
2379
  );
2206
2380
  },
2207
2381
  handleRequest({ url: e, key: n }) {
2208
- Q(e).then((t) => t.json()).then((t) => {
2382
+ te(e).then((t) => t.json()).then((t) => {
2209
2383
  const o = {
2210
- ...this.overrideState,
2384
+ ...this.contentState,
2211
2385
  [n]: t
2212
2386
  };
2213
- this.overrideState = o;
2387
+ this.setContextState(o);
2214
2388
  }).catch((t) => {
2215
2389
  console.log("error fetching dynamic data", e, t);
2216
2390
  });
@@ -2220,9 +2394,9 @@ const un = (e, n, t = !0) => {
2220
2394
  const e = (o = (t = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : t.httpRequests) != null ? o : {};
2221
2395
  Object.entries(e).forEach(([r, s]) => {
2222
2396
  if (s && (!this.httpReqsData[r] || y())) {
2223
- const i = this.evalExpression(s);
2397
+ const a = this.evalExpression(s);
2224
2398
  this.handleRequest({
2225
- url: i,
2399
+ url: a,
2226
2400
  key: r
2227
2401
  });
2228
2402
  }
@@ -2241,167 +2415,75 @@ const un = (e, n, t = !0) => {
2241
2415
  );
2242
2416
  }
2243
2417
  }
2244
- }, bn = ["builder-content-id", "builder-model"];
2245
- function yn(e, n, t, o, r, s) {
2246
- var a, d, m, p, h, v, V;
2247
- const i = k("render-content-styles"), c = k("render-blocks");
2248
- return s.useContent ? (l(), u("div", {
2418
+ }, Tn = ["builder-content-id", "builder-model"];
2419
+ function Rn(e, n, t, o, r, s) {
2420
+ var c, l, m, p, h, v, N, L;
2421
+ const a = k("render-content-styles"), i = k("render-blocks");
2422
+ return r.useContent ? (d(), u("div", {
2249
2423
  key: 0,
2250
2424
  ref: "elementRef",
2251
- onClick: n[0] || (n[0] = (de) => s.onClick(de)),
2252
- "builder-content-id": (a = s.useContent) == null ? void 0 : a.id,
2425
+ onClick: n[0] || (n[0] = (me) => s.onClick(me)),
2426
+ "builder-content-id": (c = r.useContent) == null ? void 0 : c.id,
2253
2427
  "builder-model": t.model
2254
2428
  }, [
2255
- s.shouldRenderContentStyles ? (l(), I(i, {
2429
+ s.shouldRenderContentStyles ? (d(), T(a, {
2256
2430
  key: 0,
2257
- cssCode: (m = (d = s.useContent) == null ? void 0 : d.data) == null ? void 0 : m.cssCode,
2258
- customFonts: (h = (p = s.useContent) == null ? void 0 : p.data) == null ? void 0 : h.customFonts
2259
- }, null, 8, ["cssCode", "customFonts"])) : b("", !0),
2260
- (l(), I(c, {
2261
- blocks: (V = (v = s.useContent) == null ? void 0 : v.data) == null ? void 0 : V.blocks,
2431
+ contentId: (l = r.useContent) == null ? void 0 : l.id,
2432
+ cssCode: (p = (m = r.useContent) == null ? void 0 : m.data) == null ? void 0 : p.cssCode,
2433
+ customFonts: (v = (h = r.useContent) == null ? void 0 : h.data) == null ? void 0 : v.customFonts
2434
+ }, null, 8, ["contentId", "cssCode", "customFonts"])) : b("", !0),
2435
+ (d(), T(i, {
2436
+ blocks: (L = (N = r.useContent) == null ? void 0 : N.data) == null ? void 0 : L.blocks,
2262
2437
  key: r.forceReRenderCount
2263
2438
  }, null, 8, ["blocks"]))
2264
- ], 8, bn)) : b("", !0);
2265
- }
2266
- const vn = /* @__PURE__ */ g(gn, [["render", yn]]), xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2267
- __proto__: null,
2268
- default: vn
2269
- }, Symbol.toStringTag, { value: "Module" })), kn = () => import("./block-styles.413a68e9.js").then((e) => e.default).catch((e) => {
2270
- throw console.error(
2271
- "Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
2272
- e
2273
- ), e;
2274
- }), Cn = () => import("./render-block.a53e9af1.js").then((e) => e.default).catch((e) => {
2275
- throw console.error(
2276
- "Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
2277
- e
2278
- ), e;
2279
- }), Sn = {
2280
- name: "render-blocks",
2281
- components: {
2282
- RenderBlock: x(Cn),
2283
- BlockStyles: x(kn)
2284
- },
2285
- props: ["blocks", "parent", "path", "styleProp"],
2286
- inject: {
2287
- builderContext: $.key
2288
- },
2289
- computed: {
2290
- className() {
2291
- var e;
2292
- return "builder-blocks" + ((e = this.blocks) != null && e.length ? "" : " no-blocks");
2293
- }
2294
- },
2295
- methods: {
2296
- onClick() {
2297
- var e, n;
2298
- y() && !((e = this.blocks) != null && e.length) && ((n = window.parent) == null || n.postMessage(
2299
- {
2300
- type: "builder.clickEmptyBlocks",
2301
- data: {
2302
- parentElementId: this.parent,
2303
- dataPath: this.path
2304
- }
2305
- },
2306
- "*"
2307
- ));
2308
- },
2309
- onMouseEnter() {
2310
- var e, n;
2311
- y() && !((e = this.blocks) != null && e.length) && ((n = window.parent) == null || n.postMessage(
2312
- {
2313
- type: "builder.hoverEmptyBlocks",
2314
- data: {
2315
- parentElementId: this.parent,
2316
- dataPath: this.path
2317
- }
2318
- },
2319
- "*"
2320
- ));
2321
- },
2322
- _classStringToObject(e) {
2323
- const n = {};
2324
- if (typeof e != "string")
2325
- return n;
2326
- const t = e.trim().split(/\s+/);
2327
- for (const o of t)
2328
- n[o] = !0;
2329
- return n;
2330
- }
2331
- }
2332
- };
2333
- const _n = ["builder-path", "builder-parent-id", "dataSet"];
2334
- function wn(e, n, t, o, r, s) {
2335
- const i = k("render-block"), c = k("block-styles");
2336
- return l(), u("div", {
2337
- class: j(s._classStringToObject(s.className + " div-361b1o6wv2k")),
2338
- "builder-path": t.path,
2339
- "builder-parent-id": t.parent,
2340
- dataSet: {
2341
- class: s.className
2342
- },
2343
- style: w(t.styleProp),
2344
- onClick: n[0] || (n[0] = (a) => s.onClick()),
2345
- onMouseenter: n[1] || (n[1] = (a) => s.onMouseEnter())
2346
- }, [
2347
- t.blocks ? (l(!0), u(R, { key: 0 }, O(t.blocks, (a, d) => (l(), I(i, {
2348
- key: "render-block-" + a.id,
2349
- block: a,
2350
- context: s.builderContext
2351
- }, null, 8, ["block", "context"]))), 128)) : b("", !0),
2352
- t.blocks ? (l(!0), u(R, { key: 1 }, O(t.blocks, (a, d) => (l(), I(c, {
2353
- key: "block-style-" + a.id,
2354
- block: a,
2355
- context: s.builderContext
2356
- }, null, 8, ["block", "context"]))), 128)) : b("", !0)
2357
- ], 46, _n);
2439
+ ], 8, Tn)) : b("", !0);
2358
2440
  }
2359
- const In = /* @__PURE__ */ g(Sn, [["render", wn], ["__scopeId", "data-v-69d4cd84"]]), le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2441
+ const En = /* @__PURE__ */ g(In, [["render", Rn]]), An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2360
2442
  __proto__: null,
2361
- default: In
2362
- }, Symbol.toStringTag, { value: "Module" })), J = {};
2363
- function Fn(e) {
2443
+ default: En
2444
+ }, Symbol.toStringTag, { value: "Module" })), Y = {};
2445
+ function Un(e) {
2364
2446
  if (f()) {
2365
- Object.assign(J, e);
2447
+ Object.assign(Y, e);
2366
2448
  const n = {
2367
2449
  type: "builder.settingsChange",
2368
- data: J
2450
+ data: Y
2369
2451
  };
2370
2452
  parent.postMessage(n, "*");
2371
2453
  }
2372
2454
  }
2373
2455
  export {
2374
- $ as B,
2375
- ke as C,
2376
- yt as F,
2377
- Ee as I,
2378
- ct as S,
2379
- T,
2380
- $e as V,
2456
+ W as B,
2457
+ Te as C,
2458
+ Ae as F,
2459
+ We as I,
2460
+ et as S,
2461
+ R as T,
2462
+ Bt as V,
2381
2463
  g as _,
2382
- Rn as a,
2383
- ge as b,
2384
- En as c,
2385
- Oe as d,
2386
- q as e,
2387
- U as f,
2388
- he as g,
2389
- mt as h,
2390
- ft as i,
2391
- In as j,
2464
+ Pn as a,
2465
+ Se as b,
2466
+ On as c,
2467
+ ve as d,
2468
+ G as e,
2469
+ V as f,
2470
+ xe as g,
2471
+ En as h,
2472
+ wt as i,
2473
+ At as j,
2392
2474
  y as k,
2393
- qt as l,
2394
- se as m,
2395
- jn as n,
2396
- Dt as o,
2397
- ue as p,
2398
- oe as q,
2399
- vn as r,
2400
- Fn as s,
2475
+ en as l,
2476
+ ae as m,
2477
+ Fn as n,
2478
+ tn as o,
2479
+ pe as p,
2480
+ ie as q,
2481
+ De as r,
2482
+ Un as s,
2401
2483
  Bn as t,
2402
- ot as u,
2403
- Ze as v,
2404
- et as w,
2405
- tt as x,
2406
- ne as y
2484
+ xt as u,
2485
+ gt as v,
2486
+ bt as w,
2487
+ yt as x,
2488
+ re as y
2407
2489
  };