@builder.io/sdk-vue 0.0.1 → 0.0.2-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/package.json +17 -13
  2. package/packages/_vue2/dist/block-styles.4b780e2e.js +56 -0
  3. package/packages/_vue2/dist/block-styles.d7caff48.cjs +10 -0
  4. package/packages/_vue2/dist/get-processed-block.1b0392ce.js +57 -0
  5. package/packages/_vue2/dist/get-processed-block.a69f90d1.cjs +1 -0
  6. package/{dist/vue-2/index.0622ae10.js → packages/_vue2/dist/index.35b10c2f.js} +771 -686
  7. package/packages/_vue2/dist/index.e881a81c.cjs +4 -0
  8. package/packages/_vue2/dist/render-block.3112f40b.js +237 -0
  9. package/packages/_vue2/dist/render-block.37a4bbe9.cjs +3 -0
  10. package/packages/_vue2/dist/render-component.3c148966.cjs +1 -0
  11. package/packages/_vue2/dist/render-component.7c5a2af0.js +38 -0
  12. package/{dist/vue-2/render-inlined-styles.b3a06398.cjs → packages/_vue2/dist/render-inlined-styles.c3478295.cjs} +1 -1
  13. package/{dist/vue-2/render-inlined-styles.7974da9f.js → packages/_vue2/dist/render-inlined-styles.f67a4c7d.js} +3 -3
  14. package/{dist/vue-2/render-repeated-block.c2b982e3.js → packages/_vue2/dist/render-repeated-block.006af118.js} +12 -7
  15. package/packages/_vue2/dist/render-repeated-block.ea4adce6.cjs +1 -0
  16. package/packages/_vue2/dist/render-styles.90704267.js +70 -0
  17. package/packages/_vue2/dist/render-styles.e6d20f13.cjs +17 -0
  18. package/{dist/vue-2 → packages/_vue2/dist}/sdk.cjs +1 -1
  19. package/{dist/vue-2 → packages/_vue2/dist}/sdk.js +1 -1
  20. package/packages/_vue2/dist/style.css +1 -0
  21. package/packages/_vue3/dist/block-styles.13caf8d7.js +53 -0
  22. package/packages/_vue3/dist/block-styles.8cb7f734.cjs +10 -0
  23. package/packages/_vue3/dist/get-processed-block.15d39b53.cjs +1 -0
  24. package/packages/_vue3/dist/get-processed-block.bebdc794.js +57 -0
  25. package/packages/_vue3/dist/index.f58628dd.cjs +4 -0
  26. package/{dist/vue-3/index.52915610.js → packages/_vue3/dist/index.fa54ce28.js} +727 -642
  27. package/packages/_vue3/dist/render-block.23c16bfb.cjs +3 -0
  28. package/packages/_vue3/dist/render-block.9c550b26.js +253 -0
  29. package/packages/_vue3/dist/render-component.9668419b.js +43 -0
  30. package/packages/_vue3/dist/render-component.c2e224cc.cjs +1 -0
  31. package/{dist/vue-3/render-inlined-styles.af201a11.js → packages/_vue3/dist/render-inlined-styles.08569ffb.js} +3 -3
  32. package/{dist/vue-3/render-inlined-styles.2a3eeef4.cjs → packages/_vue3/dist/render-inlined-styles.32f5f3bc.cjs} +1 -1
  33. package/{dist/vue-3/render-repeated-block.4266e559.js → packages/_vue3/dist/render-repeated-block.73309b84.js} +13 -8
  34. package/packages/_vue3/dist/render-repeated-block.8c10514d.cjs +1 -0
  35. package/packages/_vue3/dist/render-styles.22ddc0bf.cjs +17 -0
  36. package/{dist/vue-3/render-styles.1744d2eb.js → packages/_vue3/dist/render-styles.63eb2def.js} +19 -14
  37. package/{dist/vue-3 → packages/_vue3/dist}/sdk.cjs +1 -1
  38. package/{dist/vue-3 → packages/_vue3/dist}/sdk.js +1 -1
  39. package/packages/_vue3/dist/style.css +1 -0
  40. package/CHANGELOG.md +0 -53
  41. package/dist/vue-2/block-styles.3f130795.js +0 -67
  42. package/dist/vue-2/block-styles.da610cf5.cjs +0 -10
  43. package/dist/vue-2/get-processed-block.2bcd0d2b.cjs +0 -1
  44. package/dist/vue-2/get-processed-block.c01e4ddc.js +0 -44
  45. package/dist/vue-2/index.dcdf302c.cjs +0 -4
  46. package/dist/vue-2/render-block.bdaa8069.js +0 -243
  47. package/dist/vue-2/render-block.f41ce0b2.cjs +0 -3
  48. package/dist/vue-2/render-repeated-block.f36a831f.cjs +0 -1
  49. package/dist/vue-2/render-styles.354823a4.js +0 -65
  50. package/dist/vue-2/render-styles.4b5b2368.cjs +0 -17
  51. package/dist/vue-2/style.css +0 -1
  52. package/dist/vue-3/block-styles.76754b24.js +0 -64
  53. package/dist/vue-3/block-styles.e17850cc.cjs +0 -10
  54. package/dist/vue-3/get-processed-block.2dd25223.cjs +0 -1
  55. package/dist/vue-3/get-processed-block.6eaca128.js +0 -44
  56. package/dist/vue-3/index.3e132178.js +0 -78896
  57. package/dist/vue-3/index.475f52c7.cjs +0 -1
  58. package/dist/vue-3/index.91387fc2.cjs +0 -4
  59. package/dist/vue-3/render-block.369b7818.js +0 -255
  60. package/dist/vue-3/render-block.c9718d52.cjs +0 -3
  61. package/dist/vue-3/render-repeated-block.b4a6d591.cjs +0 -1
  62. package/dist/vue-3/render-styles.7d5898dd.cjs +0 -17
  63. package/dist/vue-3/style.css +0 -1
  64. package/nuxt.js +0 -25
@@ -1,12 +1,12 @@
1
- const S = "vue2";
2
- function d() {
1
+ const _ = "reactNative";
2
+ function u() {
3
3
  return typeof window < "u" && typeof document < "u";
4
4
  }
5
- const T = {};
6
- function le(t, e) {
7
- let n = T[t];
8
- if (n || (n = T[t] = []), n.push(e), d()) {
9
- const r = {
5
+ const k = {};
6
+ function H(t, e) {
7
+ let n = k[t];
8
+ if (n || (n = k[t] = []), n.push(e), u()) {
9
+ const o = {
10
10
  type: "builder.register",
11
11
  data: {
12
12
  type: t,
@@ -14,101 +14,87 @@ function le(t, e) {
14
14
  }
15
15
  };
16
16
  try {
17
- parent.postMessage(r, "*"), parent !== window && window.postMessage(r, "*");
18
- } catch (o) {
19
- console.debug("Could not postmessage", o);
17
+ parent.postMessage(o, "*"), parent !== window && window.postMessage(o, "*");
18
+ } catch (s) {
19
+ console.debug("Could not postmessage", s);
20
20
  }
21
21
  }
22
22
  }
23
- const ce = () => {
24
- le("insertMenu", {
23
+ const q = () => {
24
+ H("insertMenu", {
25
25
  name: "_default",
26
26
  default: !0,
27
27
  items: [
28
28
  { name: "Box" },
29
29
  { name: "Text" },
30
30
  { name: "Image" },
31
- { name: "Columns" },
32
- { name: "Core:Section" },
33
- { name: "Core:Button" },
34
- { name: "Embed" },
35
- { name: "Custom Code" }
31
+ { name: "Columns" }
36
32
  ]
37
33
  });
38
- }, ue = () => {
34
+ }, D = () => {
39
35
  var t;
40
- d() && ((t = window.parent) == null || t.postMessage({
41
- type: "builder.sdkInfo",
42
- data: {
43
- target: S,
44
- supportsPatchUpdates: !1
45
- }
46
- }, "*"), window.addEventListener("message", ({ data: e }) => {
47
- var n, r;
36
+ u() && ((t = window.parent) == null || t.postMessage(
37
+ {
38
+ type: "builder.sdkInfo",
39
+ data: {
40
+ target: _,
41
+ supportsPatchUpdates: !1
42
+ }
43
+ },
44
+ "*"
45
+ ), window.addEventListener("message", ({ data: e }) => {
46
+ var n, o;
48
47
  if (e)
49
48
  switch (e.type) {
50
49
  case "builder.evaluate": {
51
- const o = e.data.text, i = e.data.arguments || [], a = e.data.id, l = new Function(o);
52
- let s, c = null;
50
+ const s = e.data.text, r = e.data.arguments || [], a = e.data.id, c = new Function(s);
51
+ let i, l = null;
53
52
  try {
54
- s = l.apply(null, i);
55
- } catch (u) {
56
- c = u;
53
+ i = c.apply(null, r);
54
+ } catch (d) {
55
+ l = d;
57
56
  }
58
- c ? (n = window.parent) == null || n.postMessage({
59
- type: "builder.evaluateError",
60
- data: { id: a, error: c.message }
61
- }, "*") : s && typeof s.then == "function" ? s.then((u) => {
62
- var f;
63
- (f = window.parent) == null || f.postMessage({
57
+ l ? (n = window.parent) == null || n.postMessage(
58
+ {
59
+ type: "builder.evaluateError",
60
+ data: { id: a, error: l.message }
61
+ },
62
+ "*"
63
+ ) : i && typeof i.then == "function" ? i.then((d) => {
64
+ var h;
65
+ (h = window.parent) == null || h.postMessage(
66
+ {
67
+ type: "builder.evaluateResult",
68
+ data: { id: a, result: d }
69
+ },
70
+ "*"
71
+ );
72
+ }).catch(console.error) : (o = window.parent) == null || o.postMessage(
73
+ {
64
74
  type: "builder.evaluateResult",
65
- data: { id: a, result: u }
66
- }, "*");
67
- }).catch(console.error) : (r = window.parent) == null || r.postMessage({
68
- type: "builder.evaluateResult",
69
- data: { result: s, id: a }
70
- }, "*");
75
+ data: { result: i, id: a }
76
+ },
77
+ "*"
78
+ );
71
79
  break;
72
80
  }
73
81
  }
74
82
  }));
75
83
  };
76
- function k(t) {
84
+ function y(t) {
77
85
  return t;
78
86
  }
79
- function Bn(t) {
87
+ function cn(t) {
80
88
  return t;
81
89
  }
82
- function m(t, e, n, r, o, i, a, l) {
83
- var s = typeof t == "function" ? t.options : t;
84
- e && (s.render = e, s.staticRenderFns = n, s._compiled = !0), r && (s.functional = !0), i && (s._scopeId = "data-v-" + i);
85
- var c;
86
- if (a ? (c = function(p) {
87
- p = p || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !p && typeof __VUE_SSR_CONTEXT__ < "u" && (p = __VUE_SSR_CONTEXT__), o && o.call(this, p), p && p._registeredComponents && p._registeredComponents.add(a);
88
- }, s._ssrRegister = c) : o && (c = l ? function() {
89
- o.call(
90
- this,
91
- (s.functional ? this.parent : this).$root.$options.shadowRoot
92
- );
93
- } : o), c)
94
- if (s.functional) {
95
- s._injectStyles = c;
96
- var u = s.render;
97
- s.render = function(ie, $) {
98
- return c.call($), u(ie, $);
99
- };
100
- } else {
101
- var f = s.beforeCreate;
102
- s.beforeCreate = f ? [].concat(f, c) : [c];
103
- }
104
- return {
105
- exports: t,
106
- options: s
107
- };
108
- }
109
- const de = () => Promise.resolve().then(() => ae).then((t) => t.default), pe = {
90
+ const K = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t) => {
91
+ throw console.error(
92
+ "Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
93
+ t
94
+ ), t;
95
+ }), J = {
110
96
  name: "builder-columns",
111
- components: { "render-blocks": de },
97
+ components: { "render-blocks": K },
112
98
  props: [
113
99
  "space",
114
100
  "columns",
@@ -116,7 +102,7 @@ const de = () => Promise.resolve().then(() => ae).then((t) => t.default), pe = {
116
102
  "reverseColumnsWhenStacked",
117
103
  "builderBlock"
118
104
  ],
119
- data: () => ({ markMutable: k }),
105
+ data: () => ({ markMutable: y }),
120
106
  computed: {
121
107
  columnsCssVars() {
122
108
  const t = this.stackColumnsAt === "never" ? "inherit" : this.reverseColumnsWhenStacked ? "column-reverse" : "column";
@@ -148,65 +134,94 @@ const de = () => Promise.resolve().then(() => ae).then((t) => t.default), pe = {
148
134
  return ((n = e[t]) == null ? void 0 : n.width) || 100 / e.length;
149
135
  },
150
136
  getColumnCssWidth(t) {
151
- const e = this.getColumns(), r = this.getGutterSize() * (e.length - 1) / e.length;
152
- return `calc(${this.getWidth(t)}% - ${r}px)`;
137
+ const e = this.getColumns(), o = this.getGutterSize() * (e.length - 1) / e.length;
138
+ return `calc(${this.getWidth(t)}% - ${o}px)`;
153
139
  },
154
140
  maybeApplyForTablet(t) {
155
141
  return (this.stackColumnsAt || "tablet") === "tablet" ? t : "inherit";
156
142
  }
157
143
  }
158
144
  };
159
- var me = function() {
145
+ function p(t, e, n, o, s, r, a, c) {
146
+ var i = typeof t == "function" ? t.options : t;
147
+ e && (i.render = e, i.staticRenderFns = n, i._compiled = !0), o && (i.functional = !0), r && (i._scopeId = "data-v-" + r);
148
+ var l;
149
+ if (a ? (l = function(m) {
150
+ m = m || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !m && typeof __VUE_SSR_CONTEXT__ < "u" && (m = __VUE_SSR_CONTEXT__), s && s.call(this, m), m && m._registeredComponents && m._registeredComponents.add(a);
151
+ }, i._ssrRegister = l) : s && (l = c ? function() {
152
+ s.call(
153
+ this,
154
+ (i.functional ? this.parent : this).$root.$options.shadowRoot
155
+ );
156
+ } : s), l)
157
+ if (i.functional) {
158
+ i._injectStyles = l;
159
+ var d = i.render;
160
+ i.render = function(z, C) {
161
+ return l.call(C), d(z, C);
162
+ };
163
+ } else {
164
+ var h = i.beforeCreate;
165
+ i.beforeCreate = h ? [].concat(h, l) : [l];
166
+ }
167
+ return {
168
+ exports: t,
169
+ options: i
170
+ };
171
+ }
172
+ var G = function() {
160
173
  var e = this, n = e._self._c;
161
- return n("div", { staticClass: "builder-columns div-20351ewpue7", style: e.columnsCssVars }, e._l(e.columns, function(r, o) {
162
- return n("div", { key: o, staticClass: "builder-column div-20351ewpue7-2", style: {
163
- width: e.getColumnCssWidth(o),
164
- marginLeft: `${o === 0 ? 0 : e.getGutterSize()}px`,
174
+ return n("div", { staticClass: "builder-columns div-2fnk003dqad", style: e.columnsCssVars }, e._l(e.columns, function(o, s) {
175
+ return n("div", { key: s, staticClass: "builder-column div-2fnk003dqad-2", style: {
176
+ width: e.getColumnCssWidth(s),
177
+ marginLeft: `${s === 0 ? 0 : e.getGutterSize()}px`,
165
178
  ...e.columnCssVars
166
- } }, [n("render-blocks", { attrs: { blocks: e.markMutable(r.blocks), path: `component.options.columns.${o}.blocks`, parent: e.builderBlock.id } })], 1);
179
+ } }, [n("render-blocks", { attrs: { blocks: e.markMutable(o.blocks), path: `component.options.columns.${s}.blocks`, parent: e.builderBlock.id } })], 1);
167
180
  }), 0);
168
- }, fe = [], he = /* @__PURE__ */ m(
169
- pe,
170
- me,
171
- fe,
181
+ }, X = [], Y = /* @__PURE__ */ p(
182
+ J,
183
+ G,
184
+ X,
172
185
  !1,
173
186
  null,
174
- "ef5ead4c",
187
+ "d3bc5674",
175
188
  null,
176
189
  null
177
190
  );
178
- const ge = he.exports;
179
- function R(t) {
191
+ const Q = Y.exports;
192
+ function w(t) {
180
193
  return t.replace(/http(s)?:/, "");
181
194
  }
182
- function be(t = "", e, n) {
183
- const r = new RegExp("([?&])" + e + "=.*?(&|$)", "i"), o = t.indexOf("?") !== -1 ? "&" : "?";
184
- return t.match(r) ? t.replace(r, "$1" + e + "=" + encodeURIComponent(n) + "$2") : t + o + e + "=" + encodeURIComponent(n);
195
+ function Z(t = "", e, n) {
196
+ const o = new RegExp("([?&])" + e + "=.*?(&|$)", "i"), s = t.indexOf("?") !== -1 ? "&" : "?";
197
+ return t.match(o) ? t.replace(o, "$1" + e + "=" + encodeURIComponent(n) + "$2") : t + s + e + "=" + encodeURIComponent(n);
185
198
  }
186
- function _e(t, e) {
199
+ function ee(t, e) {
187
200
  if (!t || !(t != null && t.match(/cdn\.shopify\.com/)) || !e)
188
201
  return t;
189
202
  if (e === "master")
190
- return R(t);
191
- const n = t.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
203
+ return w(t);
204
+ const n = t.match(
205
+ /(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
206
+ );
192
207
  if (n) {
193
- const r = t.split(n[0]), o = n[3], i = e.match("x") ? e : `${e}x`;
194
- return R(`${r[0]}_${i}${o}`);
208
+ const o = t.split(n[0]), s = n[3], r = e.match("x") ? e : `${e}x`;
209
+ return w(`${o[0]}_${r}${s}`);
195
210
  }
196
211
  return null;
197
212
  }
198
- function v(t) {
213
+ function b(t) {
199
214
  if (!t)
200
215
  return t;
201
216
  const e = [100, 200, 400, 800, 1200, 1600, 2e3];
202
217
  if (t.match(/builder\.io/)) {
203
218
  let n = t;
204
- const r = Number(t.split("?width=")[1]);
205
- return isNaN(r) || (n = `${n} ${r}w`), e.filter((o) => o !== r).map((o) => `${be(t, "width", o)} ${o}w`).concat([n]).join(", ");
219
+ const o = Number(t.split("?width=")[1]);
220
+ return isNaN(o) || (n = `${n} ${o}w`), e.filter((s) => s !== o).map((s) => `${Z(t, "width", s)} ${s}w`).concat([n]).join(", ");
206
221
  }
207
- return t.match(/cdn\.shopify\.com/) ? e.map((n) => [_e(t, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, r]) => `${n} ${r}w`).concat([t]).join(", ") : t;
222
+ return t.match(/cdn\.shopify\.com/) ? e.map((n) => [ee(t, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([t]).join(", ") : t;
208
223
  }
209
- const ve = {
224
+ const te = {
210
225
  name: "builder-image",
211
226
  props: [
212
227
  "image",
@@ -229,10 +244,10 @@ const ve = {
229
244
  return this.srcset;
230
245
  if (this.srcset && ((n = this.image) == null ? void 0 : n.includes("builder.io/api/v1/image"))) {
231
246
  if (!this.srcset.includes(this.image.split("?")[0]))
232
- return console.debug("Removed given srcset"), v(e);
247
+ return console.debug("Removed given srcset"), b(e);
233
248
  } else if (this.image && !this.srcset)
234
- return v(e);
235
- return v(e);
249
+ return b(e);
250
+ return b(e);
236
251
  },
237
252
  webpSrcSet() {
238
253
  var t;
@@ -245,51 +260,51 @@ const ve = {
245
260
  if (typeof t != "string")
246
261
  return e;
247
262
  const n = t.trim().split(/\s+/);
248
- for (const r of n)
249
- e[r] = !0;
263
+ for (const o of n)
264
+ e[o] = !0;
250
265
  return e;
251
266
  }
252
267
  }
253
268
  };
254
- var ye = function() {
255
- var r, o;
269
+ var ne = function() {
270
+ var o, s, r, a;
256
271
  var e = this, n = e._self._c;
257
- return n("div", { staticClass: "div-cvp1sc2nsao" }, [n("picture", [e.webpSrcSet ? n("source", { attrs: { type: "image/webp", srcset: e.webpSrcSet } }) : e._e(), n("img", { class: e._classStringToObject(
258
- "builder-image" + (e.className ? " " + e.className : "") + " img-cvp1sc2nsao"
272
+ return n("div", { staticClass: "div-1pl23ac79ld" }, [n("picture", [e.webpSrcSet ? [n("source", { attrs: { type: "image/webp", srcset: e.webpSrcSet } })] : e._e(), n("img", { class: e._classStringToObject(
273
+ "builder-image" + (e.className ? " " + e.className : "") + " img-1pl23ac79ld"
259
274
  ), style: {
260
275
  objectPosition: e.backgroundSize || "center",
261
276
  objectFit: e.backgroundSize || "cover"
262
- }, attrs: { loading: "lazy", alt: e.altText, role: e.altText ? "presentation" : void 0, src: e.image, srcset: e.srcSetToUse, sizes: e.sizes } }), n("source", { attrs: { srcset: e.srcSetToUse } })]), e.aspectRatio && !(e.fitContent && ((o = (r = e.builderBlock) == null ? void 0 : r.children) == null ? void 0 : o.length)) ? n("div", { staticClass: "builder-image-sizer div-cvp1sc2nsao-2", style: {
277
+ }, attrs: { loading: "lazy", alt: e.altText, role: e.altText ? "presentation" : void 0, src: e.image, srcset: e.srcSetToUse, sizes: e.sizes } }), n("source", { attrs: { srcset: e.srcSetToUse } })], 2), e.aspectRatio && !(e.fitContent && ((s = (o = e.builderBlock) == null ? void 0 : o.children) == null ? void 0 : s.length)) ? [n("div", { staticClass: "builder-image-sizer div-1pl23ac79ld-2", style: {
263
278
  paddingTop: e.aspectRatio * 100 + "%"
264
- } }) : e._e(), e._t("default"), e.fitContent ? e._e() : n("div", { staticClass: "div-cvp1sc2nsao-3" }, [e._t("default")], 2)], 2);
265
- }, xe = [], we = /* @__PURE__ */ m(
266
- ve,
267
- ye,
268
- xe,
279
+ } })] : e._e(), ((a = (r = e.builderBlock) == null ? void 0 : r.children) == null ? void 0 : a.length) && e.fitContent ? [e._t("default")] : e._e(), e.fitContent ? e._e() : [n("div", { staticClass: "div-1pl23ac79ld-3" }, [e._t("default")], 2)]], 2);
280
+ }, oe = [], se = /* @__PURE__ */ p(
281
+ te,
282
+ ne,
283
+ oe,
269
284
  !1,
270
285
  null,
271
- "269f9e87",
286
+ "6a74cb4f",
272
287
  null,
273
288
  null
274
289
  );
275
- const Ce = we.exports, Se = {
290
+ const re = se.exports, ae = {
276
291
  name: "builder-text",
277
292
  props: ["text"]
278
293
  };
279
- var ke = function() {
294
+ var ie = function() {
280
295
  var e = this, n = e._self._c;
281
- return n("div", { staticClass: "builder-text", domProps: { innerHTML: e._s(e.text) } });
282
- }, Ie = [], $e = /* @__PURE__ */ m(
283
- Se,
284
- ke,
285
- Ie,
296
+ return n("span", { staticClass: "builder-text", domProps: { innerHTML: e._s(e.text) } });
297
+ }, ce = [], le = /* @__PURE__ */ p(
298
+ ae,
299
+ ie,
300
+ ce,
286
301
  !1,
287
302
  null,
288
303
  null,
289
304
  null,
290
305
  null
291
306
  );
292
- const Te = $e.exports, Re = {
307
+ const de = le.exports, ue = {
293
308
  name: "builder-video",
294
309
  props: [
295
310
  "autoPlay",
@@ -325,184 +340,221 @@ const Te = $e.exports, Re = {
325
340
  }
326
341
  }
327
342
  };
328
- var Oe = function() {
329
- var r;
343
+ var pe = function() {
344
+ var o;
330
345
  var e = this, n = e._self._c;
331
346
  return n("video", e._b({ style: {
332
347
  width: "100%",
333
348
  height: "100%",
334
- ...(r = e.attributes) == null ? void 0 : r.style,
349
+ ...(o = e.attributes) == null ? void 0 : o.style,
335
350
  objectFit: e.fit,
336
351
  objectPosition: e.position,
337
352
  borderRadius: 1
338
353
  }, attrs: { src: e.video || "no-src", poster: e.posterImage } }, "video", e.videoProps, !1));
339
- }, Pe = [], je = /* @__PURE__ */ m(
340
- Re,
341
- Oe,
342
- Pe,
354
+ }, me = [], he = /* @__PURE__ */ p(
355
+ ue,
356
+ pe,
357
+ me,
343
358
  !1,
344
359
  null,
345
360
  null,
346
361
  null,
347
362
  null
348
363
  );
349
- const Ee = je.exports;
350
- var Fe = Object.defineProperty, Ue = Object.defineProperties, Ve = Object.getOwnPropertyDescriptors, O = Object.getOwnPropertySymbols, Ae = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable, P = (t, e, n) => e in t ? Fe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, y = (t, e) => {
351
- for (var n in e || (e = {}))
352
- Ae.call(e, n) && P(t, n, e[n]);
353
- if (O)
354
- for (var n of O(e))
355
- We.call(e, n) && P(t, n, e[n]);
356
- return t;
357
- }, Le = (t, e) => Ue(t, Ve(e));
358
- function x(t, e = null, n = ".") {
359
- return Object.keys(t).reduce((r, o) => {
360
- const i = t[o], a = [e, o].filter(Boolean).join(n);
364
+ const fe = he.exports;
365
+ function v(t, e = null, n = ".") {
366
+ return Object.keys(t).reduce((o, s) => {
367
+ const r = t[s], a = [e, s].filter(Boolean).join(n);
361
368
  return [
362
- typeof i == "object",
363
- i !== null,
364
- !(Array.isArray(i) && i.length === 0)
365
- ].every(Boolean) ? y(y({}, r), x(i, a, n)) : Le(y({}, r), { [a]: i });
369
+ typeof r == "object",
370
+ r !== null,
371
+ !(Array.isArray(r) && r.length === 0)
372
+ ].every(Boolean) ? { ...o, ...v(r, a, n) } : { ...o, [a]: r };
366
373
  }, {});
367
374
  }
368
- const j = "builder.", z = (t) => {
375
+ const S = "builder.", ge = (t) => {
369
376
  const e = {};
370
- return t.forEach((n, r) => {
371
- e[r] = n;
377
+ return t.forEach((n, o) => {
378
+ e[o] = n;
372
379
  }), e;
373
- }, Ne = (t) => {
374
- const e = {};
375
- return Object.keys(t).forEach((n) => {
376
- if (n.startsWith(j)) {
377
- const r = n.replace(j, "");
378
- e[r] = t[n];
380
+ }, be = (t) => {
381
+ if (!t)
382
+ return {};
383
+ const e = F(t), n = {};
384
+ return Object.keys(e).forEach((o) => {
385
+ if (o.startsWith(S)) {
386
+ const s = o.replace(S, "");
387
+ n[s] = e[o];
379
388
  }
380
- }), e;
381
- }, Me = () => {
382
- if (!d())
389
+ }), n;
390
+ }, ve = () => {
391
+ if (!u())
383
392
  return {};
384
393
  const t = new URLSearchParams(window.location.search);
385
- return Ne(z(t));
386
- }, Be = (t) => t instanceof URLSearchParams ? z(t) : t;
387
- function De() {
394
+ return be(t);
395
+ }, F = (t) => t instanceof URLSearchParams ? ge(t) : t;
396
+ function _e() {
388
397
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : null;
389
398
  }
390
- var ze = (t, e, n) => new Promise((r, o) => {
391
- var i = (s) => {
392
- try {
393
- l(n.next(s));
394
- } catch (c) {
395
- o(c);
396
- }
397
- }, a = (s) => {
398
- try {
399
- l(n.throw(s));
400
- } catch (c) {
401
- o(c);
402
- }
403
- }, l = (s) => s.done ? r(s.value) : Promise.resolve(s.value).then(i, a);
404
- l((n = n.apply(t, e)).next());
405
- });
406
- function H() {
407
- return ze(this, null, function* () {
408
- const t = De().fetch;
409
- if (typeof t > "u" && typeof global < "u") {
410
- const e = import("node-fetch").then((n) => n.default);
411
- return e.default || e;
412
- }
413
- return t.default || t;
414
- });
399
+ async function E() {
400
+ const t = _e().fetch;
401
+ if (typeof t > "u" && typeof global < "u") {
402
+ const e = import("node-fetch").then((n) => n.default);
403
+ return e.default || e;
404
+ }
405
+ return t.default || t;
415
406
  }
416
- const He = (t, e) => {
417
- if (t.variations && Object.keys(t.variations).length) {
418
- const n = t.id ? e[t.id] : void 0, r = n ? t.variations[n] : void 0;
419
- if (n && r)
420
- t.data = r.data, t.testVariationId = r.id, t.testVariationName = r.name;
421
- else {
422
- let o = 0;
423
- const i = Math.random();
424
- let a = !1;
425
- for (const l in t.variations) {
426
- const s = t.variations[l];
427
- if (o += s.testRatio, i < o) {
428
- const u = s.name || (s.id === t.id ? "Default variation" : "");
429
- a = !0, Object.assign(t, {
430
- data: s.data,
431
- testVariationId: s.id,
432
- testVariationName: u
433
- });
434
- }
435
- }
436
- a || Object.assign(t, {
437
- testVariationId: t.id,
438
- testVariationName: "Default"
439
- });
440
- }
407
+ const ye = (t) => {
408
+ const e = t.split(".");
409
+ return e.length > 2 ? e.slice(1).join(".") : t;
410
+ }, j = async ({
411
+ name: t,
412
+ canTrack: e
413
+ }) => {
414
+ var n;
415
+ try {
416
+ return e ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${t}=`))) == null ? void 0 : n.split("=")[1] : void 0;
417
+ } catch (o) {
418
+ console.debug("[COOKIE] GET error: ", o);
441
419
  }
442
- };
443
- var qe = Object.defineProperty, Ke = Object.defineProperties, Ge = Object.getOwnPropertyDescriptors, E = Object.getOwnPropertySymbols, Je = Object.prototype.hasOwnProperty, Xe = Object.prototype.propertyIsEnumerable, F = (t, e, n) => e in t ? qe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, w = (t, e) => {
444
- for (var n in e || (e = {}))
445
- Je.call(e, n) && F(t, n, e[n]);
446
- if (E)
447
- for (var n of E(e))
448
- Xe.call(e, n) && F(t, n, e[n]);
420
+ }, xe = (t) => t.map(([e, n]) => n ? `${e}=${n}` : e).join("; "), Ce = [
421
+ ["secure", ""],
422
+ ["SameSite", "None"]
423
+ ], ke = ({
424
+ name: t,
425
+ value: e,
426
+ expires: n
427
+ }) => {
428
+ const s = (u() ? location.protocol === "https:" : !0) ? Ce : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [
429
+ [t, e],
430
+ ...r,
431
+ ["path", "/"],
432
+ ["domain", ye(window.location.hostname)],
433
+ ...s
434
+ ];
435
+ return xe(a);
436
+ }, U = async ({
437
+ name: t,
438
+ value: e,
439
+ expires: n,
440
+ canTrack: o
441
+ }) => {
442
+ try {
443
+ if (!o)
444
+ return;
445
+ const s = ke({ name: t, value: e, expires: n });
446
+ document.cookie = s;
447
+ } catch (s) {
448
+ console.warn("[COOKIE] SET error: ", s);
449
+ }
450
+ }, we = "builderio.variations", V = (t) => `${we}.${t}`, Se = ({
451
+ contentId: t,
452
+ canTrack: e
453
+ }) => j({ name: V(t), canTrack: e }), Ie = ({
454
+ contentId: t,
455
+ canTrack: e,
456
+ value: n
457
+ }) => U({ name: V(t), value: n, canTrack: e }), g = (t) => t != null, Te = (t) => g(t.id) && g(t.variations) && Object.keys(t.variations).length > 0, Re = ({
458
+ id: t,
459
+ variations: e
460
+ }) => {
461
+ var s;
462
+ let n = 0;
463
+ const o = Math.random();
464
+ for (const r in e)
465
+ if (n += (s = e[r]) == null ? void 0 : s.testRatio, o < n)
466
+ return r;
449
467
  return t;
450
- }, Ye = (t, e) => Ke(t, Ge(e)), q = (t, e, n) => new Promise((r, o) => {
451
- var i = (s) => {
452
- try {
453
- l(n.next(s));
454
- } catch (c) {
455
- o(c);
456
- }
457
- }, a = (s) => {
458
- try {
459
- l(n.throw(s));
460
- } catch (c) {
461
- o(c);
462
- }
463
- }, l = (s) => s.done ? r(s.value) : Promise.resolve(s.value).then(i, a);
464
- l((n = n.apply(t, e)).next());
465
- });
466
- const Qe = H();
467
- function K(t) {
468
- return q(this, null, function* () {
469
- return (yield et(Ye(w({}, t), { limit: 1 }))).results[0] || null;
470
- });
468
+ }, I = ({
469
+ item: t,
470
+ testGroupId: e
471
+ }) => {
472
+ const n = t.variations[e];
473
+ return e === t.id || !n ? {
474
+ testVariationId: t.id,
475
+ testVariationName: "Default"
476
+ } : {
477
+ data: n.data,
478
+ testVariationId: n.id,
479
+ testVariationName: n.name || (n.id === t.id ? "Default" : "")
480
+ };
481
+ }, $e = async ({
482
+ item: t,
483
+ canTrack: e
484
+ }) => {
485
+ const n = await Se({
486
+ canTrack: e,
487
+ contentId: t.id
488
+ }), o = n ? I({ item: t, testGroupId: n }) : void 0;
489
+ if (o)
490
+ return o;
491
+ {
492
+ const s = Re({
493
+ variations: t.variations,
494
+ id: t.id
495
+ });
496
+ return Ie({
497
+ contentId: t.id,
498
+ value: s,
499
+ canTrack: e
500
+ }).catch((r) => {
501
+ console.error("could not store A/B test variation: ", r);
502
+ }), I({ item: t, testGroupId: s });
503
+ }
504
+ }, Fe = async ({
505
+ item: t,
506
+ canTrack: e
507
+ }) => {
508
+ if (!Te(t))
509
+ return;
510
+ const n = await $e({ item: t, canTrack: e });
511
+ Object.assign(t, n);
512
+ };
513
+ async function A(t) {
514
+ return (await je({ ...t, limit: 1 })).results[0] || null;
471
515
  }
472
- const Ze = (t) => {
516
+ const Ee = (t) => {
473
517
  const {
474
518
  limit: e = 30,
475
519
  userAttributes: n,
476
- query: r,
477
- noTraverse: o = !1,
478
- model: i,
520
+ query: o,
521
+ noTraverse: s = !1,
522
+ model: r,
479
523
  apiKey: a
480
- } = t, l = new URL(`https://cdn.builder.io/api/v2/content/${i}?apiKey=${a}&limit=${e}&noTraverse=${o}`), s = w(w({}, Me()), Be(t.options || {})), c = x(s);
481
- for (const u in c)
482
- l.searchParams.set(u, String(c[u]));
483
- if (n && l.searchParams.set("userAttributes", JSON.stringify(n)), r) {
484
- const u = x({ query: r });
485
- for (const f in u)
486
- l.searchParams.set(f, JSON.stringify(u[f]));
524
+ } = t, c = new URL(
525
+ `https://cdn.builder.io/api/v2/content/${r}?apiKey=${a}&limit=${e}&noTraverse=${s}`
526
+ ), i = {
527
+ ...ve(),
528
+ ...F(t.options || {})
529
+ }, l = v(i);
530
+ for (const d in l)
531
+ c.searchParams.set(d, String(l[d]));
532
+ if (n && c.searchParams.set("userAttributes", JSON.stringify(n)), o) {
533
+ const d = v({ query: o });
534
+ for (const h in d)
535
+ c.searchParams.set(h, JSON.stringify(d[h]));
487
536
  }
488
- return l;
537
+ return c;
489
538
  };
490
- function et(t) {
491
- return q(this, null, function* () {
492
- const e = Ze(t), r = yield (yield Qe)(e.href).then((o) => o.json());
493
- if (t.testGroups)
494
- for (const o of r.results)
495
- He(o, t.testGroups);
496
- return r;
497
- });
539
+ async function je(t) {
540
+ const e = Ee(t), o = await (await E())(e.href).then(
541
+ (r) => r.json()
542
+ ), s = t.canTrack !== !1;
543
+ if (s)
544
+ for (const r of o.results)
545
+ await Fe({ item: r, canTrack: s });
546
+ return o;
498
547
  }
499
- const tt = () => Promise.resolve().then(() => Fn).then(
500
- (t) => t.default
501
- ), nt = {
548
+ const Ue = () => Promise.resolve().then(() => Zt).then((t) => t.default).catch((t) => {
549
+ throw console.error(
550
+ "Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
551
+ t
552
+ ), t;
553
+ }), Ve = {
502
554
  name: "builder-symbol",
503
- components: { "render-content": tt },
555
+ components: { "render-content": Ue },
504
556
  props: ["symbol", "attributes"],
505
- data: () => ({ className: "builder-symbol", content: null, markMutable: k }),
557
+ data: () => ({ className: "builder-symbol", content: null, markMutable: y }),
506
558
  inject: {
507
559
  builderContext: "BuilderContext"
508
560
  },
@@ -513,7 +565,7 @@ const tt = () => Promise.resolve().then(() => Fn).then(
513
565
  watch: {
514
566
  onUpdateHook0() {
515
567
  const t = this.symbol;
516
- t && !t.content && !this.content && t.model && K({
568
+ t && !t.content && !this.content && t.model && A({
517
569
  model: t.model,
518
570
  apiKey: this.builderContext.apiKey,
519
571
  query: {
@@ -538,87 +590,86 @@ const tt = () => Promise.resolve().then(() => Fn).then(
538
590
  if (typeof t != "string")
539
591
  return e;
540
592
  const n = t.trim().split(/\s+/);
541
- for (const r of n)
542
- e[r] = !0;
593
+ for (const o of n)
594
+ e[o] = !0;
543
595
  return e;
544
596
  }
545
597
  }
546
598
  };
547
- var rt = function() {
548
- var r, o, i, a, l;
599
+ var Ae = function() {
600
+ var o, s, r, a, c;
549
601
  var e = this, n = e._self._c;
550
602
  return n("div", e._b({ class: e._classStringToObject(e.className), attrs: { dataSet: {
551
603
  class: e.className
552
604
  } } }, "div", e.attributes, !1), [n("render-content", { attrs: { apiKey: e.builderContext.apiKey, context: e.builderContext.context, customComponents: e.markMutable(Object.values(e.builderContext.registeredComponents)), data: e.markMutable({
553
- ...(r = e.symbol) == null ? void 0 : r.data,
605
+ ...(o = e.symbol) == null ? void 0 : o.data,
554
606
  ...e.builderContext.state,
555
- ...(a = (i = (o = e.symbol) == null ? void 0 : o.content) == null ? void 0 : i.data) == null ? void 0 : a.state
556
- }), model: (l = e.symbol) == null ? void 0 : l.model, content: e.markMutable(e.content) } })], 1);
557
- }, ot = [], st = /* @__PURE__ */ m(
558
- nt,
559
- rt,
560
- ot,
607
+ ...(a = (r = (s = e.symbol) == null ? void 0 : s.content) == null ? void 0 : r.data) == null ? void 0 : a.state
608
+ }), model: (c = e.symbol) == null ? void 0 : c.model, content: e.markMutable(e.content) } })], 1);
609
+ }, Oe = [], Pe = /* @__PURE__ */ p(
610
+ Ve,
611
+ Ae,
612
+ Oe,
561
613
  !1,
562
614
  null,
563
615
  null,
564
616
  null,
565
617
  null
566
618
  );
567
- const at = st.exports;
568
- const it = {
619
+ const We = Pe.exports, Be = {
569
620
  name: "builder-button",
570
621
  props: ["attributes", "text", "link", "openLinkInNewTab"]
571
622
  };
572
- var lt = function() {
623
+ var Le = function() {
573
624
  var e = this, n = e._self._c;
574
- return e.link ? n("a", e._b({ attrs: { role: "button", href: e.link, target: e.openLinkInNewTab ? "_blank" : void 0 } }, "a", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]) : n("button", e._b({ staticClass: "button-1be3j8m9ewb" }, "button", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]);
575
- }, ct = [], ut = /* @__PURE__ */ m(
576
- it,
577
- lt,
578
- ct,
625
+ return e.link ? n("a", e._b({ attrs: { role: "button", href: e.link, target: e.openLinkInNewTab ? "_blank" : void 0 } }, "a", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]) : n("button", e._b({ staticClass: "button-16nol0lwi20" }, "button", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]);
626
+ }, Me = [], Ne = /* @__PURE__ */ p(
627
+ Be,
628
+ Le,
629
+ Me,
579
630
  !1,
580
631
  null,
581
- "eaf78163",
632
+ "844ae72b",
582
633
  null,
583
634
  null
584
635
  );
585
- const dt = ut.exports, pt = {
636
+ const ze = Ne.exports, He = {
586
637
  name: "builder-section-component",
587
638
  props: ["attributes", "maxWidth"]
588
639
  };
589
- var mt = function() {
640
+ var qe = function() {
590
641
  var e = this, n = e._self._c;
591
642
  return n("section", e._b({ style: e.maxWidth && typeof e.maxWidth == "number" ? {
592
643
  maxWidth: e.maxWidth
593
644
  } : void 0 }, "section", e.attributes, !1), [e._t("default")], 2);
594
- }, ft = [], ht = /* @__PURE__ */ m(
595
- pt,
596
- mt,
597
- ft,
645
+ }, De = [], Ke = /* @__PURE__ */ p(
646
+ He,
647
+ qe,
648
+ De,
598
649
  !1,
599
650
  null,
600
651
  null,
601
652
  null,
602
653
  null
603
654
  );
604
- const gt = ht.exports, bt = {
655
+ const Je = Ke.exports, Ge = {
605
656
  name: "builder-fragment-component",
606
657
  props: []
607
658
  };
608
- var _t = function() {
659
+ var Xe = function() {
609
660
  var e = this, n = e._self._c;
610
661
  return n("span", [e._t("default")], 2);
611
- }, vt = [], yt = /* @__PURE__ */ m(
612
- bt,
613
- _t,
614
- vt,
662
+ }, Ye = [], Qe = /* @__PURE__ */ p(
663
+ Ge,
664
+ Xe,
665
+ Ye,
615
666
  !1,
616
667
  null,
617
668
  null,
618
669
  null,
619
670
  null
620
671
  );
621
- const xt = yt.exports, wt = {
672
+ const Ze = Qe.exports, et = {
622
673
  name: "Core:Button",
623
674
  builtIn: !0,
624
675
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
@@ -656,10 +707,10 @@ const xt = yt.exports, wt = {
656
707
  static: !0,
657
708
  noWrap: !0
658
709
  };
659
- function I(t) {
710
+ function x(t) {
660
711
  return t.__qwik_serializable__ = !0, t;
661
712
  }
662
- const Ct = {
713
+ const tt = {
663
714
  name: "Columns",
664
715
  builtIn: !0,
665
716
  inputs: [
@@ -847,14 +898,18 @@ const Ct = {
847
898
  ]
848
899
  }
849
900
  ],
850
- onChange: I((t) => {
901
+ onChange: x((t) => {
851
902
  function e() {
852
- n.forEach((r) => {
853
- r.delete("width");
903
+ n.forEach((o) => {
904
+ o.delete("width");
854
905
  });
855
906
  }
856
907
  const n = t.get("columns");
857
- Array.isArray(n) && !!n.find((o) => o.get("width")) && (!!n.find((i) => !i.get("width")) || n.reduce((l, s) => l + s.get("width"), 0) !== 100) && e();
908
+ Array.isArray(n) && !!n.find(
909
+ (s) => s.get("width")
910
+ ) && (!!n.find(
911
+ (r) => !r.get("width")
912
+ ) || n.reduce((c, i) => c + i.get("width"), 0) !== 100) && e();
858
913
  })
859
914
  },
860
915
  {
@@ -880,14 +935,14 @@ const Ct = {
880
935
  advanced: !0
881
936
  }
882
937
  ]
883
- }, St = {
938
+ }, nt = {
884
939
  name: "Fragment",
885
940
  static: !0,
886
941
  hidden: !0,
887
942
  builtIn: !0,
888
943
  canHaveChildren: !0,
889
944
  noWrap: !0
890
- }, kt = {
945
+ }, ot = {
891
946
  name: "Image",
892
947
  static: !0,
893
948
  builtIn: !0,
@@ -907,31 +962,31 @@ const Ct = {
907
962
  allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
908
963
  required: !0,
909
964
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
910
- onChange: I((t) => {
965
+ onChange: x((t) => {
911
966
  t.delete("srcset"), t.delete("noWebp");
912
- function n(a, l = 6e4) {
913
- return new Promise((s, c) => {
914
- const u = document.createElement("img");
915
- let f = !1;
916
- u.onload = () => {
917
- f = !0, s(u);
918
- }, u.addEventListener("error", (p) => {
919
- console.warn("Image load failed", p.error), c(p.error);
920
- }), u.src = a, setTimeout(() => {
921
- f || c(new Error("Image load timed out"));
922
- }, l);
967
+ function n(a, c = 6e4) {
968
+ return new Promise((i, l) => {
969
+ const d = document.createElement("img");
970
+ let h = !1;
971
+ d.onload = () => {
972
+ h = !0, i(d);
973
+ }, d.addEventListener("error", (m) => {
974
+ console.warn("Image load failed", m.error), l(m.error);
975
+ }), d.src = a, setTimeout(() => {
976
+ h || l(new Error("Image load timed out"));
977
+ }, c);
923
978
  });
924
979
  }
925
- function r(a) {
980
+ function o(a) {
926
981
  return Math.round(a * 1e3) / 1e3;
927
982
  }
928
- const o = t.get("image"), i = t.get("aspectRatio");
929
- if (fetch(o).then((a) => a.blob()).then((a) => {
983
+ const s = t.get("image"), r = t.get("aspectRatio");
984
+ if (fetch(s).then((a) => a.blob()).then((a) => {
930
985
  a.type.includes("svg") && t.set("noWebp", !0);
931
- }), o && (!i || i === 0.7041))
932
- return n(o).then((a) => {
933
- const l = t.get("aspectRatio");
934
- t.get("image") === o && (!l || l === 0.7041) && a.width && a.height && (t.set("aspectRatio", r(a.height / a.width)), t.set("height", a.height), t.set("width", a.width));
986
+ }), s && (!r || r === 0.7041))
987
+ return n(s).then((a) => {
988
+ const c = t.get("aspectRatio");
989
+ t.get("image") === s && (!c || c === 0.7041) && a.width && a.height && (t.set("aspectRatio", o(a.height / a.width)), t.set("height", a.height), t.set("width", a.width));
935
990
  });
936
991
  })
937
992
  },
@@ -1013,7 +1068,7 @@ const Ct = {
1013
1068
  defaultValue: 0.7041
1014
1069
  }
1015
1070
  ]
1016
- }, It = {
1071
+ }, st = {
1017
1072
  name: "Core:Section",
1018
1073
  static: !0,
1019
1074
  builtIn: !0,
@@ -1058,7 +1113,7 @@ const Ct = {
1058
1113
  }
1059
1114
  }
1060
1115
  ]
1061
- }, $t = {
1116
+ }, rt = {
1062
1117
  name: "Symbol",
1063
1118
  noWrap: !0,
1064
1119
  static: !0,
@@ -1097,7 +1152,7 @@ const Ct = {
1097
1152
  type: "boolean"
1098
1153
  }
1099
1154
  ]
1100
- }, Tt = {
1155
+ }, at = {
1101
1156
  name: "Text",
1102
1157
  static: !0,
1103
1158
  builtIn: !0,
@@ -1117,7 +1172,7 @@ const Ct = {
1117
1172
  height: "auto",
1118
1173
  textAlign: "center"
1119
1174
  }
1120
- }, Rt = {
1175
+ }, it = {
1121
1176
  name: "Video",
1122
1177
  canHaveChildren: !0,
1123
1178
  builtIn: !0,
@@ -1219,7 +1274,7 @@ const Ct = {
1219
1274
  advanced: !0
1220
1275
  }
1221
1276
  ]
1222
- }, Ot = {
1277
+ }, ct = {
1223
1278
  name: "Embed",
1224
1279
  static: !0,
1225
1280
  builtIn: !0,
@@ -1230,13 +1285,18 @@ const Ct = {
1230
1285
  required: !0,
1231
1286
  defaultValue: "",
1232
1287
  helperText: "e.g. enter a youtube url, google map, etc",
1233
- onChange: I((t) => {
1288
+ onChange: x((t) => {
1234
1289
  const e = t.get("url");
1235
1290
  if (e)
1236
- return t.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${e}&api_key=ae0e60e78201a3f2b0de4b`).then((r) => r.json()).then((r) => {
1237
- t.get("url") === e && (r.html ? t.set("content", r.html) : t.set("content", "Invalid url, please try another"));
1238
- }).catch((r) => {
1239
- t.set("content", "There was an error embedding this URL, please try again or another URL");
1291
+ return t.set("content", "Loading..."), fetch(
1292
+ `https://iframe.ly/api/iframely?url=${e}&api_key=ae0e60e78201a3f2b0de4b`
1293
+ ).then((o) => o.json()).then((o) => {
1294
+ t.get("url") === e && (o.html ? t.set("content", o.html) : t.set("content", "Invalid url, please try another"));
1295
+ }).catch((o) => {
1296
+ t.set(
1297
+ "content",
1298
+ "There was an error embedding this URL, please try again or another URL"
1299
+ );
1240
1300
  });
1241
1301
  t.delete("content");
1242
1302
  })
@@ -1248,11 +1308,11 @@ const Ct = {
1248
1308
  hideFromUI: !0
1249
1309
  }
1250
1310
  ]
1251
- }, Pt = [
1311
+ }, lt = [
1252
1312
  "text/javascript",
1253
1313
  "application/javascript",
1254
1314
  "application/ecmascript"
1255
- ], jt = (t) => Pt.includes(t.type), Et = {
1315
+ ], dt = (t) => lt.includes(t.type), ut = {
1256
1316
  name: "builder-embed",
1257
1317
  props: ["content"],
1258
1318
  data: () => ({ scriptsInserted: [], scriptsRun: [], ranInitFn: !1 }),
@@ -1271,44 +1331,46 @@ const Ct = {
1271
1331
  },
1272
1332
  methods: {
1273
1333
  findAndRunScripts() {
1334
+ if (!this.$refs.elem || !this.$refs.elem.getElementsByTagName)
1335
+ return;
1274
1336
  const t = this.$refs.elem.getElementsByTagName("script");
1275
1337
  for (let e = 0; e < t.length; e++) {
1276
1338
  const n = t[e];
1277
1339
  if (n.src && !this.scriptsInserted.includes(n.src)) {
1278
1340
  this.scriptsInserted.push(n.src);
1279
- const r = document.createElement("script");
1280
- r.async = !0, r.src = n.src, document.head.appendChild(r);
1281
- } else if (jt(n) && !this.scriptsRun.includes(n.innerText))
1341
+ const o = document.createElement("script");
1342
+ o.async = !0, o.src = n.src, document.head.appendChild(o);
1343
+ } else if (dt(n) && !this.scriptsRun.includes(n.innerText))
1282
1344
  try {
1283
1345
  this.scriptsRun.push(n.innerText), new Function(n.innerText)();
1284
- } catch (r) {
1285
- console.warn("`Embed`: Error running script:", r);
1346
+ } catch (o) {
1347
+ console.warn("`Embed`: Error running script:", o);
1286
1348
  }
1287
1349
  }
1288
1350
  }
1289
1351
  }
1290
1352
  };
1291
- var Ft = function() {
1353
+ var pt = function() {
1292
1354
  var e = this, n = e._self._c;
1293
1355
  return n("div", { ref: "elem", staticClass: "builder-embed", domProps: { innerHTML: e._s(e.content) } });
1294
- }, Ut = [], Vt = /* @__PURE__ */ m(
1295
- Et,
1296
- Ft,
1297
- Ut,
1356
+ }, mt = [], ht = /* @__PURE__ */ p(
1357
+ ut,
1358
+ pt,
1359
+ mt,
1298
1360
  !1,
1299
1361
  null,
1300
1362
  null,
1301
1363
  null,
1302
1364
  null
1303
1365
  );
1304
- const At = Vt.exports;
1305
- function Wt() {
1306
- return d() && window.self !== window.top;
1366
+ const ft = ht.exports;
1367
+ function gt() {
1368
+ return u() && window.self !== window.top;
1307
1369
  }
1308
- function g() {
1309
- return Wt() && window.location.search.indexOf("builder.frameEditing=") !== -1;
1370
+ function f() {
1371
+ return gt() && window.location.search.indexOf("builder.frameEditing=") !== -1;
1310
1372
  }
1311
- const Lt = {
1373
+ const bt = {
1312
1374
  name: "builder-img-component",
1313
1375
  props: [
1314
1376
  "backgroundSize",
@@ -1318,25 +1380,25 @@ const Lt = {
1318
1380
  "image",
1319
1381
  "attributes"
1320
1382
  ],
1321
- data: () => ({ isEditing: g })
1383
+ data: () => ({ isEditing: f })
1322
1384
  };
1323
- var Nt = function() {
1385
+ var vt = function() {
1324
1386
  var e = this, n = e._self._c;
1325
1387
  return n("img", e._b({ key: e.isEditing() && e.imgSrc || "default-key", style: {
1326
1388
  objectFit: e.backgroundSize || "cover",
1327
1389
  objectPosition: e.backgroundPosition || "center"
1328
1390
  }, attrs: { alt: e.altText, src: e.imgSrc || e.image } }, "img", e.attributes, !1));
1329
- }, Mt = [], Bt = /* @__PURE__ */ m(
1330
- Lt,
1331
- Nt,
1332
- Mt,
1391
+ }, _t = [], yt = /* @__PURE__ */ p(
1392
+ bt,
1393
+ vt,
1394
+ _t,
1333
1395
  !1,
1334
1396
  null,
1335
1397
  null,
1336
1398
  null,
1337
1399
  null
1338
1400
  );
1339
- const Dt = Bt.exports, zt = {
1401
+ const xt = yt.exports, Ct = {
1340
1402
  name: "Raw:Img",
1341
1403
  hideFromInsertMenu: !0,
1342
1404
  builtIn: !0,
@@ -1352,285 +1414,297 @@ const Dt = Bt.exports, zt = {
1352
1414
  ],
1353
1415
  noWrap: !0,
1354
1416
  static: !0
1417
+ }, kt = {
1418
+ name: "builder-custom-code",
1419
+ props: ["replaceNodes", "code"],
1420
+ data: () => ({ scriptsInserted: [], scriptsRun: [] }),
1421
+ mounted() {
1422
+ this.findAndRunScripts();
1423
+ },
1424
+ methods: {
1425
+ findAndRunScripts() {
1426
+ if (this.$refs.elem && this.$refs.elem.getElementsByTagName && typeof window < "u") {
1427
+ const t = this.$refs.elem.getElementsByTagName("script");
1428
+ for (let e = 0; e < t.length; e++) {
1429
+ const n = t[e];
1430
+ if (n.src) {
1431
+ if (this.scriptsInserted.includes(n.src))
1432
+ continue;
1433
+ this.scriptsInserted.push(n.src);
1434
+ const o = document.createElement("script");
1435
+ o.async = !0, o.src = n.src, document.head.appendChild(o);
1436
+ } else if (!n.type || [
1437
+ "text/javascript",
1438
+ "application/javascript",
1439
+ "application/ecmascript"
1440
+ ].includes(n.type)) {
1441
+ if (this.scriptsRun.includes(n.innerText))
1442
+ continue;
1443
+ try {
1444
+ this.scriptsRun.push(n.innerText), new Function(n.innerText)();
1445
+ } catch (o) {
1446
+ console.warn("`CustomCode`: Error running script:", o);
1447
+ }
1448
+ }
1449
+ }
1450
+ }
1451
+ },
1452
+ _classStringToObject(t) {
1453
+ const e = {};
1454
+ if (typeof t != "string")
1455
+ return e;
1456
+ const n = t.trim().split(/\s+/);
1457
+ for (const o of n)
1458
+ e[o] = !0;
1459
+ return e;
1460
+ }
1461
+ }
1355
1462
  };
1356
- var Ht = Object.defineProperty, U = Object.getOwnPropertySymbols, qt = Object.prototype.hasOwnProperty, Kt = Object.prototype.propertyIsEnumerable, V = (t, e, n) => e in t ? Ht(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, h = (t, e) => {
1357
- for (var n in e || (e = {}))
1358
- qt.call(e, n) && V(t, n, e[n]);
1359
- if (U)
1360
- for (var n of U(e))
1361
- Kt.call(e, n) && V(t, n, e[n]);
1362
- return t;
1363
- };
1364
- const Gt = () => [
1365
- h({ component: ge }, Ct),
1366
- h({ component: Ce }, kt),
1367
- h({ component: Dt }, zt),
1368
- h({ component: Te }, Tt),
1369
- h({ component: Ee }, Rt),
1370
- h({ component: at }, $t),
1371
- h({ component: dt }, wt),
1372
- h({ component: gt }, It),
1373
- h({ component: xt }, St),
1374
- h({ component: At }, Ot)
1463
+ var wt = function() {
1464
+ var e = this, n = e._self._c;
1465
+ return n("div", { ref: "elem", class: e._classStringToObject(
1466
+ "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
1467
+ ), domProps: { innerHTML: e._s(e.code) } });
1468
+ }, St = [], It = /* @__PURE__ */ p(
1469
+ kt,
1470
+ wt,
1471
+ St,
1472
+ !1,
1473
+ null,
1474
+ null,
1475
+ null,
1476
+ null
1477
+ );
1478
+ const Tt = It.exports, Rt = {
1479
+ name: "Custom Code",
1480
+ static: !0,
1481
+ builtIn: !0,
1482
+ requiredPermissions: ["editCode"],
1483
+ inputs: [
1484
+ {
1485
+ name: "code",
1486
+ type: "html",
1487
+ required: !0,
1488
+ defaultValue: "<p>Hello there, I am custom HTML code!</p>",
1489
+ code: !0
1490
+ },
1491
+ {
1492
+ name: "replaceNodes",
1493
+ type: "boolean",
1494
+ helperText: "Preserve server rendered dom nodes",
1495
+ advanced: !0
1496
+ },
1497
+ {
1498
+ name: "scriptsClientOnly",
1499
+ type: "boolean",
1500
+ defaultValue: !1,
1501
+ helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1502
+ advanced: !0
1503
+ }
1504
+ ]
1505
+ }, $t = () => [
1506
+ { component: Q, ...tt },
1507
+ { component: re, ...ot },
1508
+ { component: xt, ...Ct },
1509
+ { component: de, ...at },
1510
+ { component: fe, ...it },
1511
+ { component: We, ...rt },
1512
+ { component: ze, ...et },
1513
+ { component: Je, ...st },
1514
+ { component: Ze, ...nt },
1515
+ { component: ft, ...ct },
1516
+ { component: Tt, ...Rt }
1375
1517
  ];
1376
- function A({
1518
+ function T({
1377
1519
  code: t,
1378
1520
  context: e,
1379
1521
  state: n,
1380
- event: r
1522
+ event: o
1381
1523
  }) {
1382
1524
  if (t === "") {
1383
1525
  console.warn("Skipping evaluation of empty code block.");
1384
1526
  return;
1385
1527
  }
1386
- const o = {
1387
- isEditing: g(),
1388
- isBrowser: d(),
1389
- isServer: !d()
1528
+ const s = {
1529
+ isEditing: f(),
1530
+ isBrowser: u(),
1531
+ isServer: !u()
1390
1532
  }, a = !(t.includes(";") || t.includes(" return ") || t.trim().startsWith("return ")) ? `return (${t});` : t;
1391
1533
  try {
1392
- return new Function("builder", "Builder", "state", "context", "event", a)(o, o, n, e, r);
1393
- } catch (l) {
1394
- console.warn(`Builder custom code error:
1534
+ return new Function(
1535
+ "builder",
1536
+ "Builder",
1537
+ "state",
1538
+ "context",
1539
+ "event",
1540
+ a
1541
+ )(s, s, n, e, o);
1542
+ } catch (c) {
1543
+ console.warn(
1544
+ `Builder custom code error:
1395
1545
  While Evaluating:
1396
- `, a, `
1397
- `, l.message || l);
1546
+ `,
1547
+ a,
1548
+ `
1549
+ `,
1550
+ c.message || c
1551
+ );
1398
1552
  }
1399
1553
  }
1400
- function Jt() {
1401
- return !d() || g() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1554
+ function Ft() {
1555
+ return !u() || f() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1402
1556
  }
1403
- var Xt = Object.defineProperty, Yt = Object.defineProperties, Qt = Object.getOwnPropertyDescriptors, b = Object.getOwnPropertySymbols, G = Object.prototype.hasOwnProperty, J = Object.prototype.propertyIsEnumerable, W = (t, e, n) => e in t ? Xt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, C = (t, e) => {
1404
- for (var n in e || (e = {}))
1405
- G.call(e, n) && W(t, n, e[n]);
1406
- if (b)
1407
- for (var n of b(e))
1408
- J.call(e, n) && W(t, n, e[n]);
1409
- return t;
1410
- }, L = (t, e) => Yt(t, Qt(e)), X = (t, e) => {
1411
- var n = {};
1412
- for (var r in t)
1413
- G.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
1414
- if (t != null && b)
1415
- for (var r of b(t))
1416
- e.indexOf(r) < 0 && J.call(t, r) && (n[r] = t[r]);
1417
- return n;
1418
- };
1419
- const Y = [];
1420
- function Dn(t, e) {
1421
- return Y.push(C({ component: t }, e)), console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."), t;
1557
+ const O = [];
1558
+ function ln(t, e) {
1559
+ return O.push({ component: t, ...e }), console.warn(
1560
+ "registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
1561
+ ), t;
1422
1562
  }
1423
- const Zt = (t) => {
1424
- var e = t, n = X(e, [
1425
- "component"
1426
- ]);
1427
- return {
1428
- type: "builder.registerComponent",
1429
- data: nn(n)
1430
- };
1431
- }, Q = (t) => JSON.parse(JSON.stringify(t)), en = (t) => typeof t == "function" ? tn(t) : Q(t), tn = (t) => {
1563
+ const Et = ({
1564
+ component: t,
1565
+ ...e
1566
+ }) => ({
1567
+ type: "builder.registerComponent",
1568
+ data: Vt(e)
1569
+ }), P = (t) => JSON.parse(JSON.stringify(t)), jt = (t) => typeof t == "function" ? Ut(t) : P(t), Ut = (t) => {
1432
1570
  const e = t.toString().trim();
1433
1571
  return `return (${!e.startsWith("function") && !e.startsWith("(") ? "function " : ""}${e}).apply(this, arguments)`;
1434
- }, nn = (t) => {
1435
- var e = t, {
1436
- inputs: n
1437
- } = e, r = X(e, [
1438
- "inputs"
1439
- ]);
1440
- return L(C({}, Q(r)), {
1441
- inputs: n == null ? void 0 : n.map((o) => Object.entries(o).reduce((i, [a, l]) => L(C({}, i), {
1442
- [a]: en(l)
1443
- }), {}))
1444
- });
1445
- }, rn = (t) => {
1446
- const e = t.split(".");
1447
- return e.length > 2 ? e.slice(1).join(".") : t;
1448
- }, on = ({
1449
- name: t,
1450
- canTrack: e
1451
- }) => {
1452
- var n;
1453
- try {
1454
- return e ? (n = document.cookie.split("; ").find((r) => r.startsWith(`${t}=`))) == null ? void 0 : n.split("=")[1] : void 0;
1455
- } catch (r) {
1456
- console.debug("[COOKIE] GET error: ", r);
1457
- }
1458
- }, sn = (t) => t.map(([e, n]) => n ? `${e}=${n}` : e).join("; "), an = [
1459
- ["secure", ""],
1460
- ["SameSite", "None"]
1461
- ], ln = ({
1462
- name: t,
1463
- value: e,
1464
- expires: n
1465
- }) => {
1466
- const o = (d() ? location.protocol === "https:" : !0) ? an : [[]], i = n ? [["expires", n.toUTCString()]] : [[]], a = [
1467
- [t, e],
1468
- ...i,
1469
- ["path", "/"],
1470
- ["domain", rn(window.location.hostname)],
1471
- ...o
1472
- ];
1473
- return sn(a);
1474
- }, cn = ({
1475
- name: t,
1476
- value: e,
1477
- expires: n,
1478
- canTrack: r
1479
- }) => {
1480
- try {
1481
- if (!r)
1482
- return;
1483
- const o = ln({ name: t, value: e, expires: n });
1484
- document.cookie = o;
1485
- } catch (o) {
1486
- console.warn("[COOKIE] SET error: ", o);
1487
- }
1488
- }, Z = (t) => t != null;
1489
- function un() {
1572
+ }, Vt = ({
1573
+ inputs: t,
1574
+ ...e
1575
+ }) => ({
1576
+ ...P(e),
1577
+ inputs: t == null ? void 0 : t.map(
1578
+ (n) => Object.entries(n).reduce(
1579
+ (o, [s, r]) => ({
1580
+ ...o,
1581
+ [s]: jt(r)
1582
+ }),
1583
+ {}
1584
+ )
1585
+ )
1586
+ });
1587
+ function At() {
1490
1588
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
1491
1589
  const e = Math.random() * 16 | 0;
1492
1590
  return (t == "x" ? e : e & 3 | 8).toString(16);
1493
1591
  });
1494
1592
  }
1495
- function ee() {
1496
- return un().replace(/-/g, "");
1593
+ function W() {
1594
+ return At().replace(/-/g, "");
1497
1595
  }
1498
- const te = "builderSessionId", dn = ({ canTrack: t }) => {
1596
+ const B = "builderSessionId", Ot = async ({ canTrack: t }) => {
1499
1597
  if (!t)
1500
1598
  return;
1501
- const e = on({ name: te, canTrack: t });
1502
- if (Z(e))
1599
+ const e = await j({
1600
+ name: B,
1601
+ canTrack: t
1602
+ });
1603
+ if (g(e))
1503
1604
  return e;
1504
1605
  {
1505
- const n = pn();
1506
- mn({ id: n, canTrack: t });
1606
+ const n = Pt();
1607
+ Wt({ id: n, canTrack: t });
1507
1608
  }
1508
- }, pn = () => ee(), mn = ({
1609
+ }, Pt = () => W(), Wt = ({
1509
1610
  id: t,
1510
1611
  canTrack: e
1511
- }) => cn({ name: te, value: t, canTrack: e }), ne = () => d() && typeof localStorage < "u" ? localStorage : void 0, fn = ({
1612
+ }) => U({ name: B, value: t, canTrack: e }), L = () => u() && typeof localStorage < "u" ? localStorage : void 0, Bt = ({
1512
1613
  key: t,
1513
1614
  canTrack: e
1514
1615
  }) => {
1515
1616
  var n;
1516
1617
  try {
1517
- return e ? (n = ne()) == null ? void 0 : n.getItem(t) : void 0;
1518
- } catch (r) {
1519
- console.debug("[LocalStorage] GET error: ", r);
1618
+ return e ? (n = L()) == null ? void 0 : n.getItem(t) : void 0;
1619
+ } catch (o) {
1620
+ console.debug("[LocalStorage] GET error: ", o);
1520
1621
  }
1521
- }, hn = ({
1622
+ }, Lt = ({
1522
1623
  key: t,
1523
1624
  canTrack: e,
1524
1625
  value: n
1525
1626
  }) => {
1526
- var r;
1627
+ var o;
1527
1628
  try {
1528
- e && ((r = ne()) == null || r.setItem(t, n));
1529
- } catch (o) {
1530
- console.debug("[LocalStorage] SET error: ", o);
1629
+ e && ((o = L()) == null || o.setItem(t, n));
1630
+ } catch (s) {
1631
+ console.debug("[LocalStorage] SET error: ", s);
1531
1632
  }
1532
- }, re = "builderVisitorId", gn = ({ canTrack: t }) => {
1633
+ }, M = "builderVisitorId", Mt = ({ canTrack: t }) => {
1533
1634
  if (!t)
1534
1635
  return;
1535
- const e = fn({
1536
- key: re,
1636
+ const e = Bt({
1637
+ key: M,
1537
1638
  canTrack: t
1538
1639
  });
1539
- if (Z(e))
1640
+ if (g(e))
1540
1641
  return e;
1541
1642
  {
1542
- const n = bn();
1543
- _n({ id: n, canTrack: t });
1643
+ const n = Nt();
1644
+ zt({ id: n, canTrack: t });
1544
1645
  }
1545
- }, bn = () => ee(), _n = ({
1646
+ }, Nt = () => W(), zt = ({
1546
1647
  id: t,
1547
1648
  canTrack: e
1548
- }) => hn({
1549
- key: re,
1649
+ }) => Lt({
1650
+ key: M,
1550
1651
  value: t,
1551
1652
  canTrack: e
1552
- });
1553
- var vn = Object.defineProperty, yn = Object.defineProperties, xn = Object.getOwnPropertyDescriptors, _ = Object.getOwnPropertySymbols, oe = Object.prototype.hasOwnProperty, se = Object.prototype.propertyIsEnumerable, N = (t, e, n) => e in t ? vn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, M = (t, e) => {
1554
- for (var n in e || (e = {}))
1555
- oe.call(e, n) && N(t, n, e[n]);
1556
- if (_)
1557
- for (var n of _(e))
1558
- se.call(e, n) && N(t, n, e[n]);
1559
- return t;
1560
- }, wn = (t, e) => yn(t, xn(e)), Cn = (t, e) => {
1561
- var n = {};
1562
- for (var r in t)
1563
- oe.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
1564
- if (t != null && _)
1565
- for (var r of _(t))
1566
- e.indexOf(r) < 0 && se.call(t, r) && (n[r] = t[r]);
1567
- return n;
1568
- }, Sn = (t, e, n) => new Promise((r, o) => {
1569
- var i = (s) => {
1570
- try {
1571
- l(n.next(s));
1572
- } catch (c) {
1573
- o(c);
1574
- }
1575
- }, a = (s) => {
1576
- try {
1577
- l(n.throw(s));
1578
- } catch (c) {
1579
- o(c);
1580
- }
1581
- }, l = (s) => s.done ? r(s.value) : Promise.resolve(s.value).then(i, a);
1582
- l((n = n.apply(t, e)).next());
1583
- });
1584
- const kn = ({ canTrack: t }) => {
1653
+ }), Ht = async ({
1654
+ canTrack: t
1655
+ }) => {
1585
1656
  if (!t)
1586
1657
  return { visitorId: void 0, sessionId: void 0 };
1587
- const e = dn({ canTrack: t }), n = gn({ canTrack: t });
1658
+ const e = await Ot({ canTrack: t }), n = Mt({ canTrack: t });
1588
1659
  return {
1589
1660
  sessionId: e,
1590
1661
  visitorId: n
1591
1662
  };
1592
- }, In = (t) => {
1593
- var e = t, {
1594
- type: n,
1595
- canTrack: r,
1596
- orgId: o,
1597
- contentId: i
1598
- } = e, a = Cn(e, [
1599
- "type",
1600
- "canTrack",
1601
- "orgId",
1602
- "contentId"
1603
- ]);
1604
- return {
1605
- type: n,
1606
- data: wn(M(M({}, a), kn({ canTrack: r })), {
1607
- ownerId: o,
1608
- contentId: i
1609
- })
1610
- };
1611
- };
1612
- function B(t) {
1613
- return Sn(this, null, function* () {
1614
- if (!!t.canTrack && !g() && !!(d() || S === "reactNative"))
1615
- return fetch("https://builder.io/api/v1/track", {
1616
- method: "POST",
1617
- body: JSON.stringify({
1618
- events: [In(t)]
1619
- }),
1620
- headers: {
1621
- "content-type": "application/json"
1622
- },
1623
- mode: "cors"
1624
- }).catch((e) => {
1625
- console.error("Failed to track: ", e);
1626
- });
1627
- });
1663
+ }, qt = async ({
1664
+ type: t,
1665
+ canTrack: e,
1666
+ orgId: n,
1667
+ contentId: o,
1668
+ ...s
1669
+ }) => ({
1670
+ type: t,
1671
+ data: {
1672
+ ...s,
1673
+ ...await Ht({ canTrack: e }),
1674
+ ownerId: n,
1675
+ contentId: o
1676
+ }
1677
+ });
1678
+ async function R(t) {
1679
+ if (!!t.canTrack && !f() && !!(u() || _ === "reactNative"))
1680
+ return fetch("https://builder.io/api/v1/track", {
1681
+ method: "POST",
1682
+ body: JSON.stringify({
1683
+ events: [await qt(t)]
1684
+ }),
1685
+ headers: {
1686
+ "content-type": "application/json"
1687
+ },
1688
+ mode: "cors"
1689
+ }).catch((e) => {
1690
+ console.error("Failed to track: ", e);
1691
+ });
1628
1692
  }
1629
- const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = () => import("./render-styles.354823a4.js").then((t) => t.default), Rn = {
1693
+ const Dt = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t) => {
1694
+ throw console.error(
1695
+ "Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
1696
+ t
1697
+ ), t;
1698
+ }), Kt = () => import("./render-styles.90704267.js").then((t) => t.default).catch((t) => {
1699
+ throw console.error(
1700
+ "Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
1701
+ t
1702
+ ), t;
1703
+ }), Jt = {
1630
1704
  name: "render-content",
1631
1705
  components: {
1632
- "render-content-styles": Tn,
1633
- "render-blocks": $n
1706
+ "render-content-styles": Kt,
1707
+ "render-blocks": Dt
1634
1708
  },
1635
1709
  props: [
1636
1710
  "content",
@@ -1646,7 +1720,7 @@ const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = (
1646
1720
  overrideContent: null,
1647
1721
  update: 0,
1648
1722
  overrideState: {},
1649
- markMutable: k
1723
+ markMutable: y
1650
1724
  }),
1651
1725
  provide() {
1652
1726
  const t = this;
@@ -1671,30 +1745,31 @@ const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = (
1671
1745
  };
1672
1746
  },
1673
1747
  mounted() {
1674
- if (d()) {
1675
- if (g() && (this.forceReRenderCount = this.forceReRenderCount + 1, ce(), ue(), Object.values(this.allRegisteredComponents).forEach(
1676
- (t) => {
1677
- var n;
1678
- const e = Zt(t);
1679
- (n = window.parent) == null || n.postMessage(e, "*");
1748
+ var t;
1749
+ if (u()) {
1750
+ if (f() && (this.forceReRenderCount = this.forceReRenderCount + 1, q(), D(), Object.values(this.allRegisteredComponents).forEach(
1751
+ (e) => {
1752
+ var o;
1753
+ const n = Et(e);
1754
+ (o = window.parent) == null || o.postMessage(n, "*");
1680
1755
  }
1681
1756
  ), window.addEventListener("message", this.processMessage), window.addEventListener(
1682
1757
  "builder:component:stateChangeListenerActivated",
1683
1758
  this.emitStateUpdate
1684
- )), this.useContent && B({
1759
+ )), this.useContent && R({
1685
1760
  type: "impression",
1686
1761
  canTrack: this.canTrackToUse,
1687
- contentId: this.useContent.id,
1762
+ contentId: (t = this.useContent) == null ? void 0 : t.id,
1688
1763
  orgId: this.apiKey
1689
- }), Jt()) {
1690
- const t = new URL(location.href).searchParams;
1691
- if (this.model && t.get("builder.preview") === this.model) {
1692
- const e = t.get("apiKey") || t.get("builder.space");
1693
- e && K({
1764
+ }), Ft()) {
1765
+ const e = new URL(location.href).searchParams;
1766
+ if (this.model && e.get("builder.preview") === this.model) {
1767
+ const n = e.get("apiKey") || e.get("builder.space");
1768
+ n && A({
1694
1769
  model: this.model,
1695
- apiKey: e
1696
- }).then((n) => {
1697
- n && (this.overrideContent = n);
1770
+ apiKey: n
1771
+ }).then((o) => {
1772
+ o && (this.overrideContent = o);
1698
1773
  });
1699
1774
  }
1700
1775
  }
@@ -1713,7 +1788,7 @@ const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = (
1713
1788
  }
1714
1789
  },
1715
1790
  unmounted() {
1716
- d() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
1791
+ u() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
1717
1792
  "builder:component:stateChangeListenerActivated",
1718
1793
  this.emitStateUpdate
1719
1794
  ));
@@ -1721,7 +1796,7 @@ const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = (
1721
1796
  computed: {
1722
1797
  useContent() {
1723
1798
  var e, n;
1724
- return {
1799
+ return !this.content && !this.overrideContent ? void 0 : {
1725
1800
  ...this.content,
1726
1801
  ...this.overrideContent,
1727
1802
  data: {
@@ -1747,11 +1822,11 @@ const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = (
1747
1822
  },
1748
1823
  allRegisteredComponents() {
1749
1824
  return [
1750
- ...Gt(),
1751
- ...Y,
1825
+ ...$t(),
1826
+ ...O,
1752
1827
  ...this.customComponents || []
1753
1828
  ].reduce(
1754
- (n, r) => ({ ...n, [r.name]: r }),
1829
+ (n, o) => ({ ...n, [o.name]: o }),
1755
1830
  {}
1756
1831
  );
1757
1832
  },
@@ -1759,9 +1834,9 @@ const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = (
1759
1834
  return {};
1760
1835
  },
1761
1836
  shouldRenderContentStyles() {
1762
- var t, e, n, r, o;
1837
+ var t, e, n, o, s;
1763
1838
  return Boolean(
1764
- (((e = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : e.cssCode) || ((o = (r = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : r.customFonts) == null ? void 0 : o.length)) && S !== "reactNative"
1839
+ (((e = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : e.cssCode) || ((s = (o = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : o.customFonts) == null ? void 0 : s.length)) && _ !== "reactNative"
1765
1840
  );
1766
1841
  },
1767
1842
  onUpdateHook0() {
@@ -1788,8 +1863,8 @@ const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = (
1788
1863
  if (e)
1789
1864
  switch (e.type) {
1790
1865
  case "builder.contentUpdate": {
1791
- const n = e.data, r = n.key || n.alias || n.entry || n.modelName, o = n.data;
1792
- r === this.model && (this.overrideContent = o, this.forceReRenderCount = this.forceReRenderCount + 1);
1866
+ const n = e.data, o = n.key || n.alias || n.entry || n.modelName, s = n.data;
1867
+ o === this.model && (this.overrideContent = s, this.forceReRenderCount = this.forceReRenderCount + 1);
1793
1868
  break;
1794
1869
  }
1795
1870
  }
@@ -1797,24 +1872,25 @@ const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = (
1797
1872
  evaluateJsCode() {
1798
1873
  var e, n;
1799
1874
  const t = (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.jsCode;
1800
- t && A({
1875
+ t && T({
1801
1876
  code: t,
1802
1877
  context: this.contextContext,
1803
1878
  state: this.contentState
1804
1879
  });
1805
1880
  },
1806
1881
  onClick(t) {
1807
- this.useContent && B({
1882
+ var e;
1883
+ this.useContent && R({
1808
1884
  type: "click",
1809
1885
  canTrack: this.canTrackToUse,
1810
- contentId: this.useContent.id,
1886
+ contentId: (e = this.useContent) == null ? void 0 : e.id,
1811
1887
  orgId: this.apiKey
1812
1888
  });
1813
1889
  },
1814
1890
  evalExpression(t) {
1815
1891
  return t.replace(
1816
1892
  /{{([^}]+)}}/g,
1817
- (e, n) => A({
1893
+ (e, n) => T({
1818
1894
  code: n,
1819
1895
  context: this.contextContext,
1820
1896
  state: this.contentState
@@ -1822,28 +1898,28 @@ const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = (
1822
1898
  );
1823
1899
  },
1824
1900
  handleRequest({ url: t, key: e }) {
1825
- H().then((n) => n(t)).then((n) => n.json()).then((n) => {
1826
- const r = { ...this.overrideState, [e]: n };
1827
- this.overrideState = r;
1901
+ E().then((n) => n(t)).then((n) => n.json()).then((n) => {
1902
+ const o = { ...this.overrideState, [e]: n };
1903
+ this.overrideState = o;
1828
1904
  }).catch((n) => {
1829
1905
  console.log("error fetching dynamic data", t, n);
1830
1906
  });
1831
1907
  },
1832
1908
  runHttpRequests() {
1833
- var e, n, r;
1834
- const t = (r = (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.httpRequests) != null ? r : {};
1835
- Object.entries(t).forEach(([o, i]) => {
1836
- if (i && (!this.httpReqsData[o] || g())) {
1837
- const a = this.evalExpression(i);
1909
+ var e, n, o;
1910
+ const t = (o = (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.httpRequests) != null ? o : {};
1911
+ Object.entries(t).forEach(([s, r]) => {
1912
+ if (r && (!this.httpReqsData[s] || f())) {
1913
+ const a = this.evalExpression(r);
1838
1914
  this.handleRequest({
1839
1915
  url: a,
1840
- key: o
1916
+ key: s
1841
1917
  });
1842
1918
  }
1843
1919
  });
1844
1920
  },
1845
1921
  emitStateUpdate() {
1846
- g() && window.dispatchEvent(
1922
+ f() && window.dispatchEvent(
1847
1923
  new CustomEvent("builder:component:stateChange", {
1848
1924
  detail: {
1849
1925
  state: this.contentState,
@@ -1856,29 +1932,38 @@ const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = (
1856
1932
  }
1857
1933
  }
1858
1934
  };
1859
- var On = function() {
1860
- var r, o, i, a, l, s, c;
1935
+ var Gt = function() {
1936
+ var o, s, r, a, c, i, l;
1861
1937
  var e = this, n = e._self._c;
1862
- return e.useContent ? n("div", { ref: "elementRef", attrs: { "builder-content-id": (r = e.useContent) == null ? void 0 : r.id }, on: { click: function(u) {
1863
- return e.onClick(u);
1864
- } } }, [e.shouldRenderContentStyles ? n("render-content-styles", { attrs: { cssCode: (i = (o = e.useContent) == null ? void 0 : o.data) == null ? void 0 : i.cssCode, customFonts: (l = (a = e.useContent) == null ? void 0 : a.data) == null ? void 0 : l.customFonts } }) : e._e(), n("render-blocks", { key: e.forceReRenderCount, attrs: { blocks: e.markMutable((c = (s = e.useContent) == null ? void 0 : s.data) == null ? void 0 : c.blocks) } })], 1) : e._e();
1865
- }, Pn = [], jn = /* @__PURE__ */ m(
1866
- Rn,
1867
- On,
1868
- Pn,
1938
+ return e.useContent ? n("div", { ref: "elementRef", attrs: { "builder-content-id": (o = e.useContent) == null ? void 0 : o.id }, on: { click: function(d) {
1939
+ return e.onClick(d);
1940
+ } } }, [e.shouldRenderContentStyles ? [n("render-content-styles", { attrs: { cssCode: (r = (s = e.useContent) == null ? void 0 : s.data) == null ? void 0 : r.cssCode, customFonts: (c = (a = e.useContent) == null ? void 0 : a.data) == null ? void 0 : c.customFonts } })] : e._e(), n("render-blocks", { key: e.forceReRenderCount, attrs: { blocks: e.markMutable((l = (i = e.useContent) == null ? void 0 : i.data) == null ? void 0 : l.blocks) } })], 2) : e._e();
1941
+ }, Xt = [], Yt = /* @__PURE__ */ p(
1942
+ Jt,
1943
+ Gt,
1944
+ Xt,
1869
1945
  !1,
1870
1946
  null,
1871
1947
  null,
1872
1948
  null,
1873
1949
  null
1874
1950
  );
1875
- const En = jn.exports, Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1951
+ const Qt = Yt.exports, Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1876
1952
  __proto__: null,
1877
- default: En
1878
- }, Symbol.toStringTag, { value: "Module" }));
1879
- const Un = () => import("./block-styles.3f130795.js").then((t) => t.default), Vn = () => import("./render-block.bdaa8069.js").then((t) => t.default), An = {
1953
+ default: Qt
1954
+ }, Symbol.toStringTag, { value: "Module" })), en = () => import("./block-styles.4b780e2e.js").then((t) => t.default).catch((t) => {
1955
+ throw console.error(
1956
+ "Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
1957
+ t
1958
+ ), t;
1959
+ }), tn = () => import("./render-block.3112f40b.js").then((t) => t.default).catch((t) => {
1960
+ throw console.error(
1961
+ "Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
1962
+ t
1963
+ ), t;
1964
+ }), nn = {
1880
1965
  name: "render-blocks",
1881
- components: { "render-block": Vn, "block-styles": Un },
1966
+ components: { "render-block": tn, "block-styles": en },
1882
1967
  props: ["blocks", "parent", "path"],
1883
1968
  inject: {
1884
1969
  builderContext: "BuilderContext"
@@ -1892,7 +1977,7 @@ const Un = () => import("./block-styles.3f130795.js").then((t) => t.default), Vn
1892
1977
  methods: {
1893
1978
  onClick() {
1894
1979
  var t, e;
1895
- g() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
1980
+ f() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
1896
1981
  {
1897
1982
  type: "builder.clickEmptyBlocks",
1898
1983
  data: {
@@ -1905,7 +1990,7 @@ const Un = () => import("./block-styles.3f130795.js").then((t) => t.default), Vn
1905
1990
  },
1906
1991
  onMouseEnter() {
1907
1992
  var t, e;
1908
- g() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
1993
+ f() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
1909
1994
  {
1910
1995
  type: "builder.hoverEmptyBlocks",
1911
1996
  data: {
@@ -1921,76 +2006,76 @@ const Un = () => import("./block-styles.3f130795.js").then((t) => t.default), Vn
1921
2006
  if (typeof t != "string")
1922
2007
  return e;
1923
2008
  const n = t.trim().split(/\s+/);
1924
- for (const r of n)
1925
- e[r] = !0;
2009
+ for (const o of n)
2010
+ e[o] = !0;
1926
2011
  return e;
1927
2012
  }
1928
2013
  }
1929
2014
  };
1930
- var Wn = function() {
2015
+ var on = function() {
1931
2016
  var e = this, n = e._self._c;
1932
- return n("div", { class: e._classStringToObject(e.className + " div-23e8fqt91nf"), attrs: { "builder-path": e.path, "builder-parent-id": e.parent, dataSet: {
2017
+ return n("div", { class: e._classStringToObject(e.className + " div-21azgz5avex"), attrs: { "builder-path": e.path, "builder-parent-id": e.parent, dataSet: {
1933
2018
  class: e.className
1934
- } }, on: { click: function(r) {
2019
+ } }, on: { click: function(o) {
1935
2020
  return e.onClick();
1936
- }, mouseenter: function(r) {
2021
+ }, mouseenter: function(o) {
1937
2022
  return e.onMouseEnter();
1938
- } } }, [e._l(e.blocks, function(r, o) {
1939
- return e.blocks ? n("render-block", { key: "render-block-" + r.id, attrs: { block: r, context: e.builderContext } }) : e._e();
1940
- }), e._l(e.blocks, function(r, o) {
1941
- return e.blocks ? n("block-styles", { key: "block-style-" + r.id, attrs: { block: r, context: e.builderContext } }) : e._e();
1942
- })], 2);
1943
- }, Ln = [], Nn = /* @__PURE__ */ m(
1944
- An,
1945
- Wn,
1946
- Ln,
2023
+ } } }, [e.blocks ? e._l(e.blocks, function(o, s) {
2024
+ return n("render-block", { key: "render-block-" + o.id, attrs: { block: o, context: e.builderContext } });
2025
+ }) : e._e(), e.blocks ? e._l(e.blocks, function(o, s) {
2026
+ return n("block-styles", { key: "block-style-" + o.id, attrs: { block: o, context: e.builderContext } });
2027
+ }) : e._e()], 2);
2028
+ }, sn = [], rn = /* @__PURE__ */ p(
2029
+ nn,
2030
+ on,
2031
+ sn,
1947
2032
  !1,
1948
2033
  null,
1949
- "1e73bac5",
2034
+ "3c408a8a",
1950
2035
  null,
1951
2036
  null
1952
2037
  );
1953
- const Mn = Nn.exports, ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2038
+ const an = rn.exports, N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1954
2039
  __proto__: null,
1955
- default: Mn
1956
- }, Symbol.toStringTag, { value: "Module" })), D = {};
1957
- function zn(t) {
1958
- if (d()) {
1959
- Object.assign(D, t);
2040
+ default: an
2041
+ }, Symbol.toStringTag, { value: "Module" })), $ = {};
2042
+ function dn(t) {
2043
+ if (u()) {
2044
+ Object.assign($, t);
1960
2045
  const e = {
1961
2046
  type: "builder.settingsChange",
1962
- data: D
2047
+ data: $
1963
2048
  };
1964
2049
  parent.postMessage(e, "*");
1965
2050
  }
1966
2051
  }
1967
2052
  export {
1968
- dt as B,
1969
- ge as C,
1970
- xt as F,
1971
- Ce as I,
1972
- gt as S,
1973
- S as T,
1974
- Ee as V,
1975
- En as a,
1976
- at as b,
1977
- Te as c,
1978
- Jt as d,
1979
- A as e,
1980
- Y as f,
1981
- Zt as g,
1982
- Dn as h,
1983
- g as i,
1984
- le as j,
1985
- Ze as k,
1986
- et as l,
1987
- Bn as m,
1988
- m as n,
1989
- K as o,
1990
- z as p,
1991
- Ne as q,
1992
- Mn as r,
1993
- zn as s,
1994
- Me as t,
1995
- Be as u
2053
+ ze as B,
2054
+ Q as C,
2055
+ Ze as F,
2056
+ re as I,
2057
+ We as S,
2058
+ _ as T,
2059
+ fe as V,
2060
+ de as a,
2061
+ Je as b,
2062
+ an as c,
2063
+ Ft as d,
2064
+ T as e,
2065
+ O as f,
2066
+ ln as g,
2067
+ Et as h,
2068
+ f as i,
2069
+ H as j,
2070
+ A as k,
2071
+ Ee as l,
2072
+ cn as m,
2073
+ p as n,
2074
+ je as o,
2075
+ ge as p,
2076
+ be as q,
2077
+ Qt as r,
2078
+ dn as s,
2079
+ ve as t,
2080
+ F as u
1996
2081
  };