@builder.io/sdk-vue 0.1.1 → 0.1.3

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 (104) hide show
  1. package/package.json +1 -1
  2. package/packages/_vue2/dist/block-styles.426683e4.cjs +1 -0
  3. package/packages/_vue2/dist/{block-styles.41c88ebb.js → block-styles.d52d65f7.js} +6 -4
  4. package/packages/{_vue3/dist/get-processed-block.6a1b1b3d.cjs → _vue2/dist/get-processed-block.25e77989.cjs} +1 -1
  5. package/packages/{_vue3/dist/get-processed-block.b14f89d8.js → _vue2/dist/get-processed-block.b1e9044b.js} +1 -1
  6. package/packages/_vue2/dist/{index.c72e7c74.js → index.3403bf5e.js} +579 -473
  7. package/packages/_vue2/dist/index.57d3bafb.cjs +30 -0
  8. package/packages/_vue2/dist/render-block.5069cc94.js +249 -0
  9. package/packages/_vue2/dist/render-block.93fcfc84.cjs +3 -0
  10. package/packages/_vue2/dist/{render-component.1561ae1b.js → render-component.5e59a26d.js} +3 -3
  11. package/packages/_vue2/dist/{render-component.e5dac3a3.cjs → render-component.697eb0f0.cjs} +1 -1
  12. package/packages/_vue2/dist/{render-inlined-styles.e8e46149.js → render-inlined-styles.c4ede85b.js} +4 -2
  13. package/packages/_vue2/dist/render-inlined-styles.d6107d6b.cjs +1 -0
  14. package/packages/_vue2/dist/render-repeated-block.82ac5fdf.cjs +1 -0
  15. package/packages/_vue2/dist/render-repeated-block.88a83bb3.js +41 -0
  16. package/packages/_vue2/dist/{render-styles.571858fa.js → render-styles.78a78d13.js} +2 -2
  17. package/packages/_vue2/dist/{render-styles.29424659.cjs → render-styles.95a1cf8d.cjs} +1 -1
  18. package/packages/_vue2/dist/sdk.cjs +1 -1
  19. package/packages/_vue2/dist/sdk.js +3 -3
  20. package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +35 -175
  21. package/packages/_vue2/dist/src/blocks/custom-code/custom-code.vue.d.ts +1 -1
  22. package/packages/_vue2/dist/src/blocks/embed/embed.vue.d.ts +5 -2
  23. package/packages/_vue2/dist/src/blocks/img/img.vue.d.ts +1 -1
  24. package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +65 -192
  25. package/packages/_vue2/dist/src/components/render-block/block-styles.vue.d.ts +2 -2
  26. package/packages/_vue2/dist/src/components/render-block/render-block.helpers.d.ts +11 -0
  27. package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +30 -170
  28. package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +7 -57
  29. package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +28 -168
  30. package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +33 -173
  31. package/packages/_vue2/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -1
  32. package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +59 -189
  33. package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
  34. package/packages/_vue2/dist/src/context/builder.context.d.ts +11 -1
  35. package/packages/_vue2/dist/src/functions/track/helpers.d.ts +5 -0
  36. package/packages/{_vue3/dist/src/functions/track.d.ts → _vue2/dist/src/functions/track/index.d.ts} +5 -10
  37. package/packages/_vue2/dist/src/functions/track/interaction.d.ts +13 -0
  38. package/packages/_vue2/dist/src/helpers/ab-tests.d.ts +1 -1
  39. package/packages/_vue2/dist/src/helpers/cookie.d.ts +1 -1
  40. package/packages/_vue2/dist/src/helpers/localStorage.d.ts +2 -1
  41. package/packages/_vue2/dist/src/helpers/sessionId.d.ts +2 -2
  42. package/packages/_vue2/dist/src/index.d.ts +1 -1
  43. package/packages/_vue2/dist/style.css +1 -1
  44. package/packages/_vue3/dist/{block-styles.fee20f95.js → block-styles.b1836f48.js} +19 -17
  45. package/packages/_vue3/dist/block-styles.b81e8e00.cjs +1 -0
  46. package/packages/{_vue2/dist/get-processed-block.7744e4bc.cjs → _vue3/dist/get-processed-block.7681705a.cjs} +1 -1
  47. package/packages/{_vue2/dist/get-processed-block.e326a312.js → _vue3/dist/get-processed-block.aed48c68.js} +1 -1
  48. package/packages/_vue3/dist/index.0bf7b9df.cjs +30 -0
  49. package/packages/_vue3/dist/{index.7a69508d.js → index.dfbf4ad8.js} +537 -432
  50. package/packages/_vue3/dist/render-block.7d6c9594.cjs +3 -0
  51. package/packages/_vue3/dist/render-block.bd00521b.js +258 -0
  52. package/packages/_vue3/dist/{render-component.66d935aa.cjs → render-component.7b0412f1.cjs} +1 -1
  53. package/packages/_vue3/dist/{render-component.12bec717.js → render-component.98c61732.js} +3 -3
  54. package/packages/_vue3/dist/{render-inlined-styles.87ca82f0.js → render-inlined-styles.dc458558.js} +9 -7
  55. package/packages/_vue3/dist/render-inlined-styles.fb31ff26.cjs +1 -0
  56. package/packages/_vue3/dist/render-repeated-block.c0e57489.js +36 -0
  57. package/packages/_vue3/dist/render-repeated-block.dc67945a.cjs +1 -0
  58. package/packages/_vue3/dist/{render-styles.2274749d.cjs → render-styles.c2fe7073.cjs} +1 -1
  59. package/packages/_vue3/dist/{render-styles.e9da8e6c.js → render-styles.c739f8f5.js} +2 -2
  60. package/packages/_vue3/dist/sdk.cjs +1 -1
  61. package/packages/_vue3/dist/sdk.js +6 -6
  62. package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +5 -5
  63. package/packages/_vue3/dist/src/blocks/custom-code/custom-code.vue.d.ts +1 -1
  64. package/packages/_vue3/dist/src/blocks/embed/embed.vue.d.ts +5 -2
  65. package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +1 -1
  66. package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +35 -22
  67. package/packages/_vue3/dist/src/components/render-block/block-styles.vue.d.ts +2 -2
  68. package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +11 -0
  69. package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +1 -31
  70. package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +8 -1
  71. package/packages/_vue3/dist/src/components/render-blocks.vue.d.ts +3 -3
  72. package/packages/_vue3/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -1
  73. package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +29 -19
  74. package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
  75. package/packages/_vue3/dist/src/context/builder.context.d.ts +11 -1
  76. package/packages/_vue3/dist/src/functions/track/helpers.d.ts +5 -0
  77. package/packages/{_vue2/dist/src/functions/track.d.ts → _vue3/dist/src/functions/track/index.d.ts} +5 -10
  78. package/packages/_vue3/dist/src/functions/track/interaction.d.ts +13 -0
  79. package/packages/_vue3/dist/src/helpers/ab-tests.d.ts +1 -1
  80. package/packages/_vue3/dist/src/helpers/cookie.d.ts +1 -1
  81. package/packages/_vue3/dist/src/helpers/localStorage.d.ts +2 -1
  82. package/packages/_vue3/dist/src/helpers/sessionId.d.ts +2 -2
  83. package/packages/_vue3/dist/src/index.d.ts +1 -1
  84. package/packages/_vue3/dist/style.css +1 -1
  85. package/packages/_vue2/dist/block-styles.57bb90ae.cjs +0 -1
  86. package/packages/_vue2/dist/index.edd725b5.cjs +0 -30
  87. package/packages/_vue2/dist/render-block.55447f79.js +0 -251
  88. package/packages/_vue2/dist/render-block.fed38662.cjs +0 -3
  89. package/packages/_vue2/dist/render-component-with-context.6996f337.cjs +0 -1
  90. package/packages/_vue2/dist/render-component-with-context.e7fa8487.js +0 -53
  91. package/packages/_vue2/dist/render-inlined-styles.0be888b3.cjs +0 -1
  92. package/packages/_vue2/dist/render-repeated-block.e916911e.js +0 -53
  93. package/packages/_vue2/dist/render-repeated-block.f6ac2dc0.cjs +0 -1
  94. package/packages/_vue2/dist/src/components/render-block/render-component-with-context.vue.d.ts +0 -114
  95. package/packages/_vue3/dist/block-styles.6b0bbe3d.cjs +0 -1
  96. package/packages/_vue3/dist/index.a102bdda.cjs +0 -30
  97. package/packages/_vue3/dist/render-block.4a0e514b.cjs +0 -3
  98. package/packages/_vue3/dist/render-block.9cdf5af8.js +0 -262
  99. package/packages/_vue3/dist/render-component-with-context.7d2eb137.js +0 -50
  100. package/packages/_vue3/dist/render-component-with-context.a37b552e.cjs +0 -1
  101. package/packages/_vue3/dist/render-inlined-styles.540df9a2.cjs +0 -1
  102. package/packages/_vue3/dist/render-repeated-block.0360d32e.js +0 -48
  103. package/packages/_vue3/dist/render-repeated-block.8da78c07.cjs +0 -1
  104. package/packages/_vue3/dist/src/components/render-block/render-component-with-context.vue.d.ts +0 -48
@@ -1,11 +1,11 @@
1
1
  const v = "vue2";
2
- function p() {
2
+ function m() {
3
3
  return typeof window < "u" && typeof document < "u";
4
4
  }
5
- const I = {};
6
- function H(t, e) {
7
- let n = I[t];
8
- if (n || (n = I[t] = []), n.push(e), p()) {
5
+ const R = {};
6
+ function J(t, e) {
7
+ let n = R[t];
8
+ if (n || (n = R[t] = []), n.push(e), m()) {
9
9
  const o = {
10
10
  type: "builder.register",
11
11
  data: {
@@ -20,8 +20,8 @@ function H(t, e) {
20
20
  }
21
21
  }
22
22
  }
23
- const q = () => {
24
- H("insertMenu", {
23
+ const X = () => {
24
+ J("insertMenu", {
25
25
  name: "_default",
26
26
  default: !0,
27
27
  items: [
@@ -36,10 +36,10 @@ const q = () => {
36
36
  ]
37
37
  });
38
38
  };
39
- let R = !1;
40
- const G = (t = {}) => {
39
+ let T = !1;
40
+ const Y = (t = {}) => {
41
41
  var e, n;
42
- R || (R = !0, p() && ((e = window.parent) == null || e.postMessage(
42
+ T || (T = !0, m() && ((e = window.parent) == null || e.postMessage(
43
43
  {
44
44
  type: "builder.sdkInfo",
45
45
  data: {
@@ -63,12 +63,12 @@ const G = (t = {}) => {
63
63
  if (!!(o != null && o.type))
64
64
  switch (o.type) {
65
65
  case "builder.evaluate": {
66
- const i = o.data.text, l = o.data.arguments || [], a = o.data.id, u = new Function(i);
67
- let d, h = null;
66
+ const i = o.data.text, c = o.data.arguments || [], a = o.data.id, d = new Function(i);
67
+ let u, h = null;
68
68
  try {
69
- d = u.apply(null, l);
70
- } catch (c) {
71
- h = c;
69
+ u = d.apply(null, c);
70
+ } catch (l) {
71
+ h = l;
72
72
  }
73
73
  h ? (s = window.parent) == null || s.postMessage(
74
74
  {
@@ -76,19 +76,19 @@ const G = (t = {}) => {
76
76
  data: { id: a, error: h.message }
77
77
  },
78
78
  "*"
79
- ) : d && typeof d.then == "function" ? d.then((c) => {
79
+ ) : u && typeof u.then == "function" ? u.then((l) => {
80
80
  var g;
81
81
  (g = window.parent) == null || g.postMessage(
82
82
  {
83
83
  type: "builder.evaluateResult",
84
- data: { id: a, result: c }
84
+ data: { id: a, result: l }
85
85
  },
86
86
  "*"
87
87
  );
88
88
  }).catch(console.error) : (r = window.parent) == null || r.postMessage(
89
89
  {
90
90
  type: "builder.evaluateResult",
91
- data: { result: d, id: a }
91
+ data: { result: u, id: a }
92
92
  },
93
93
  "*"
94
94
  );
@@ -96,7 +96,7 @@ const G = (t = {}) => {
96
96
  }
97
97
  }
98
98
  })));
99
- }, S = (t) => JSON.parse(JSON.stringify(t)), O = {
99
+ }, w = (t) => JSON.parse(JSON.stringify(t)), P = {
100
100
  small: {
101
101
  min: 320,
102
102
  default: 321,
@@ -112,8 +112,8 @@ const G = (t = {}) => {
112
112
  default: 991,
113
113
  max: 1200
114
114
  }
115
- }, fn = (t, e = O) => `@media (max-width: ${e[t].max}px)`, J = ({ small: t, medium: e }) => {
116
- const n = S(O);
115
+ }, Sn = (t, e = P) => `@media (max-width: ${e[t].max}px)`, Q = ({ small: t, medium: e }) => {
116
+ const n = w(P);
117
117
  if (!t || !e)
118
118
  return n;
119
119
  const o = Math.floor(t / 2);
@@ -134,36 +134,36 @@ const G = (t = {}) => {
134
134
  min: r,
135
135
  default: r + 1
136
136
  }, n;
137
- }, X = (t) => t.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), y = (t) => t != null, Y = (t) => Object.entries(t).map(([n, o]) => {
137
+ }, Z = (t) => t.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), b = (t) => t != null, ee = (t) => Object.entries(t).map(([n, o]) => {
138
138
  if (typeof o == "string")
139
- return `${X(n)}: ${o};`;
140
- }).filter(y), b = (t) => Y(t).join(`
141
- `), gn = ({
139
+ return `${Z(n)}: ${o};`;
140
+ }).filter(b), y = (t) => ee(t).join(`
141
+ `), In = ({
142
142
  mediaQuery: t,
143
143
  className: e,
144
144
  styles: n
145
145
  }) => {
146
146
  const o = `.${e} {
147
- ${b(n)}
147
+ ${y(n)}
148
148
  }`;
149
149
  return t ? `${t} {
150
150
  ${o}
151
151
  }` : o;
152
- }, Q = () => Promise.resolve().then(() => D).then((t) => t.default).catch((t) => {
152
+ }, te = () => Promise.resolve().then(() => G).then((t) => t.default).catch((t) => {
153
153
  throw console.error(
154
154
  "Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
155
155
  t
156
156
  ), t;
157
- }), Z = () => import("./render-inlined-styles.e8e46149.js").then((t) => t.default).catch((t) => {
157
+ }), ne = () => import("./render-inlined-styles.c4ede85b.js").then((t) => t.default).catch((t) => {
158
158
  throw console.error(
159
159
  "Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
160
160
  t
161
161
  ), t;
162
- }), ee = {
162
+ }), oe = {
163
163
  name: "builder-columns",
164
164
  components: {
165
- RenderInlinedStyles: Z,
166
- RenderBlocks: Q
165
+ RenderInlinedStyles: ne,
166
+ RenderBlocks: te
167
167
  },
168
168
  props: [
169
169
  "space",
@@ -173,7 +173,9 @@ const G = (t = {}) => {
173
173
  "customBreakpoints",
174
174
  "builderBlock"
175
175
  ],
176
- data: () => ({ TARGET: v }),
176
+ data() {
177
+ return { TARGET: v };
178
+ },
177
179
  computed: {
178
180
  columnsCssVars() {
179
181
  const t = this.stackColumnsAt === "never" ? "inherit" : this.reverseColumnsWhenStacked ? "column-reverse" : "column";
@@ -219,21 +221,21 @@ const G = (t = {}) => {
219
221
  return `
220
222
  @media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
221
223
  .${this.builderBlock.id}-breakpoints {
222
- ${b(this.columnStyleObjects.columns.medium)}
224
+ ${y(this.columnStyleObjects.columns.medium)}
223
225
  }
224
226
 
225
227
  .${this.builderBlock.id}-breakpoints > .builder-column {
226
- ${b(this.columnStyleObjects.column.medium)}
228
+ ${y(this.columnStyleObjects.column.medium)}
227
229
  }
228
230
  }
229
231
 
230
232
  @media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
231
233
  .${this.builderBlock.id}-breakpoints {
232
- ${b(this.columnStyleObjects.columns.small)}
234
+ ${y(this.columnStyleObjects.columns.small)}
233
235
  }
234
236
 
235
237
  .${this.builderBlock.id}-breakpoints > .builder-column {
236
- ${b(this.columnStyleObjects.column.small)}
238
+ ${y(this.columnStyleObjects.column.small)}
237
239
  }
238
240
  },
239
241
  `;
@@ -265,7 +267,7 @@ const G = (t = {}) => {
265
267
  return (this.stackColumnsAt || "tablet") === "tablet" ? t : "inherit";
266
268
  },
267
269
  getWidthForBreakpointSize(t) {
268
- return J(
270
+ return Q(
269
271
  this.customBreakpoints || {}
270
272
  )[t].max;
271
273
  },
@@ -280,42 +282,42 @@ const G = (t = {}) => {
280
282
  }
281
283
  }
282
284
  };
283
- function m(t, e, n, o, s, r, i, l) {
285
+ function p(t, e, n, o, s, r, i, c) {
284
286
  var a = typeof t == "function" ? t.options : t;
285
287
  e && (a.render = e, a.staticRenderFns = n, a._compiled = !0), o && (a.functional = !0), r && (a._scopeId = "data-v-" + r);
286
- var u;
287
- if (i ? (u = function(c) {
288
- c = c || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !c && typeof __VUE_SSR_CONTEXT__ < "u" && (c = __VUE_SSR_CONTEXT__), s && s.call(this, c), c && c._registeredComponents && c._registeredComponents.add(i);
289
- }, a._ssrRegister = u) : s && (u = l ? function() {
288
+ var d;
289
+ if (i ? (d = function(l) {
290
+ l = l || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !l && typeof __VUE_SSR_CONTEXT__ < "u" && (l = __VUE_SSR_CONTEXT__), s && s.call(this, l), l && l._registeredComponents && l._registeredComponents.add(i);
291
+ }, a._ssrRegister = d) : s && (d = c ? function() {
290
292
  s.call(
291
293
  this,
292
294
  (a.functional ? this.parent : this).$root.$options.shadowRoot
293
295
  );
294
- } : s), u)
296
+ } : s), d)
295
297
  if (a.functional) {
296
- a._injectStyles = u;
297
- var d = a.render;
298
- a.render = function(g, w) {
299
- return u.call(w), d(g, w);
298
+ a._injectStyles = d;
299
+ var u = a.render;
300
+ a.render = function(g, I) {
301
+ return d.call(I), u(g, I);
300
302
  };
301
303
  } else {
302
304
  var h = a.beforeCreate;
303
- a.beforeCreate = h ? [].concat(h, u) : [u];
305
+ a.beforeCreate = h ? [].concat(h, d) : [d];
304
306
  }
305
307
  return {
306
308
  exports: t,
307
309
  options: a
308
310
  };
309
311
  }
310
- var te = function() {
312
+ var se = function() {
311
313
  var e = this, n = e._self._c;
312
314
  return n("div", { class: e._classStringToObject(
313
- `builder-columns ${e.builderBlock.id}-breakpoints div-t43jfuqn6g`
315
+ `builder-columns ${e.builderBlock.id}-breakpoints div-29wpyomtntv`
314
316
  ), style: {
315
317
  ...e.TARGET === "reactNative" ? e.reactNativeColumnsStyles : {},
316
318
  ...e.columnsCssVars
317
319
  } }, [e.TARGET !== "reactNative" ? [n("render-inlined-styles", { attrs: { styles: e.columnsStyles } })] : e._e(), e._l(e.columns, function(o, s) {
318
- return n("div", { key: s, staticClass: "builder-column div-t43jfuqn6g-2", style: {
320
+ return n("div", { key: s, staticClass: "builder-column div-29wpyomtntv-2", style: {
319
321
  width: e.getColumnCssWidth(s),
320
322
  marginLeft: `${s === 0 ? 0 : e.getGutterSize()}px`,
321
323
  ...e.TARGET === "reactNative" ? e.reactNativeColumnStyles : {},
@@ -324,35 +326,35 @@ var te = function() {
324
326
  flexGrow: "1"
325
327
  } } })], 1);
326
328
  })], 2);
327
- }, ne = [], oe = /* @__PURE__ */ m(
328
- ee,
329
- te,
330
- ne,
329
+ }, re = [], ie = /* @__PURE__ */ p(
330
+ oe,
331
+ se,
332
+ re,
331
333
  !1,
332
334
  null,
333
- "a99b6f14",
335
+ "a89ca538",
334
336
  null,
335
337
  null
336
338
  );
337
- const se = oe.exports;
338
- function T(t) {
339
+ const ae = ie.exports;
340
+ function $(t) {
339
341
  return t.replace(/http(s)?:/, "");
340
342
  }
341
- function re(t = "", e, n) {
343
+ function ce(t = "", e, n) {
342
344
  const o = new RegExp("([?&])" + e + "=.*?(&|$)", "i"), s = t.indexOf("?") !== -1 ? "&" : "?";
343
345
  return t.match(o) ? t.replace(o, "$1" + e + "=" + encodeURIComponent(n) + "$2") : t + s + e + "=" + encodeURIComponent(n);
344
346
  }
345
- function ie(t, e) {
347
+ function le(t, e) {
346
348
  if (!t || !(t != null && t.match(/cdn\.shopify\.com/)) || !e)
347
349
  return t;
348
350
  if (e === "master")
349
- return T(t);
351
+ return $(t);
350
352
  const n = t.match(
351
353
  /(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
352
354
  );
353
355
  if (n) {
354
356
  const o = t.split(n[0]), s = n[3], r = e.match("x") ? e : `${e}x`;
355
- return T(`${o[0]}_${r}${s}`);
357
+ return $(`${o[0]}_${r}${s}`);
356
358
  }
357
359
  return null;
358
360
  }
@@ -363,11 +365,11 @@ function x(t) {
363
365
  if (t.match(/builder\.io/)) {
364
366
  let n = t;
365
367
  const o = Number(t.split("?width=")[1]);
366
- return isNaN(o) || (n = `${n} ${o}w`), e.filter((s) => s !== o).map((s) => `${re(t, "width", s)} ${s}w`).concat([n]).join(", ");
368
+ return isNaN(o) || (n = `${n} ${o}w`), e.filter((s) => s !== o).map((s) => `${ce(t, "width", s)} ${s}w`).concat([n]).join(", ");
367
369
  }
368
- return t.match(/cdn\.shopify\.com/) ? e.map((n) => [ie(t, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([t]).join(", ") : t;
370
+ return t.match(/cdn\.shopify\.com/) ? e.map((n) => [le(t, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([t]).join(", ") : t;
369
371
  }
370
- const ae = {
372
+ const de = {
371
373
  name: "builder-image",
372
374
  props: [
373
375
  "image",
@@ -423,46 +425,46 @@ const ae = {
423
425
  }
424
426
  }
425
427
  };
426
- var le = function() {
428
+ var ue = function() {
427
429
  var o, s, r, i;
428
430
  var e = this, n = e._self._c;
429
431
  return n("div", [n("picture", [e.webpSrcSet ? [n("source", { attrs: { type: "image/webp", srcset: e.webpSrcSet } })] : e._e(), n("img", { class: e._classStringToObject(
430
- "builder-image" + (e.className ? " " + e.className : "") + " img-b1turyjjkok"
432
+ "builder-image" + (e.className ? " " + e.className : "") + " img-1j57pcfa436"
431
433
  ), style: {
432
434
  objectPosition: e.backgroundPosition || "center",
433
435
  objectFit: e.backgroundSize || "cover",
434
436
  ...e.aspectRatioCss
435
- }, 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 && !(((s = (o = e.builderBlock) == null ? void 0 : o.children) == null ? void 0 : s.length) && e.fitContent) ? [n("div", { staticClass: "builder-image-sizer div-b1turyjjkok", style: {
437
+ }, attrs: { loading: "lazy", alt: e.altText, role: e.altText ? "presentation" : void 0, src: e.image, srcset: e.srcSetToUse, sizes: e.sizes } })], 2), e.aspectRatio && !(((s = (o = e.builderBlock) == null ? void 0 : o.children) == null ? void 0 : s.length) && e.fitContent) ? [n("div", { staticClass: "builder-image-sizer div-1j57pcfa436", style: {
436
438
  paddingTop: e.aspectRatio * 100 + "%"
437
- } })] : e._e(), ((i = (r = e.builderBlock) == null ? void 0 : r.children) == null ? void 0 : i.length) && e.fitContent ? [e._t("default")] : e._e(), !e.fitContent && e.children ? [n("div", { staticClass: "div-b1turyjjkok-2" }, [e._t("default")], 2)] : e._e()], 2);
438
- }, ce = [], ue = /* @__PURE__ */ m(
439
- ae,
440
- le,
441
- ce,
439
+ } })] : e._e(), ((i = (r = e.builderBlock) == null ? void 0 : r.children) == null ? void 0 : i.length) && e.fitContent ? [e._t("default")] : e._e(), !e.fitContent && e.children ? [n("div", { staticClass: "div-1j57pcfa436-2" }, [e._t("default")], 2)] : e._e()], 2);
440
+ }, me = [], pe = /* @__PURE__ */ p(
441
+ de,
442
+ ue,
443
+ me,
442
444
  !1,
443
445
  null,
444
- "e3e7800f",
446
+ "76004f06",
445
447
  null,
446
448
  null
447
449
  );
448
- const de = ue.exports, pe = {
450
+ const he = pe.exports, fe = {
449
451
  name: "builder-text",
450
452
  props: ["text"]
451
453
  };
452
- var me = function() {
454
+ var ge = function() {
453
455
  var e = this, n = e._self._c;
454
456
  return n("span", { staticClass: "builder-text", domProps: { innerHTML: e._s(e.text) } });
455
- }, he = [], fe = /* @__PURE__ */ m(
456
- pe,
457
- me,
458
- he,
457
+ }, be = [], ye = /* @__PURE__ */ p(
458
+ fe,
459
+ ge,
460
+ be,
459
461
  !1,
460
462
  null,
461
463
  null,
462
464
  null,
463
465
  null
464
466
  );
465
- const ge = fe.exports, be = {
467
+ const ve = ye.exports, _e = {
466
468
  name: "builder-video",
467
469
  props: [
468
470
  "autoPlay",
@@ -504,7 +506,7 @@ const ge = fe.exports, be = {
504
506
  }
505
507
  }
506
508
  };
507
- var ye = function() {
509
+ var xe = function() {
508
510
  var o;
509
511
  var e = this, n = e._self._c;
510
512
  return n("video", e._b({ style: {
@@ -515,22 +517,32 @@ var ye = function() {
515
517
  objectPosition: e.position,
516
518
  borderRadius: 1
517
519
  }, attrs: { src: e.video || "no-src", poster: e.posterImage } }, "video", e.spreadProps, !1));
518
- }, ve = [], _e = /* @__PURE__ */ m(
519
- be,
520
- ye,
521
- ve,
520
+ }, Ce = [], ke = /* @__PURE__ */ p(
521
+ _e,
522
+ xe,
523
+ Ce,
522
524
  !1,
523
525
  null,
524
526
  null,
525
527
  null,
526
528
  null
527
529
  );
528
- const xe = _e.exports;
529
- function Ce() {
530
+ const we = ke.exports, Se = Symbol(), S = {
531
+ Builder: {
532
+ content: null,
533
+ context: {},
534
+ state: {},
535
+ apiKey: null,
536
+ registeredComponents: {},
537
+ inheritedStyles: {}
538
+ },
539
+ key: Se
540
+ };
541
+ function Ie() {
530
542
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
531
543
  }
532
- function ke() {
533
- const t = Ce().fetch;
544
+ function Re() {
545
+ const t = Ie().fetch;
534
546
  if (typeof t > "u")
535
547
  throw console.warn(
536
548
  `Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
@@ -538,10 +550,12 @@ function ke() {
538
550
  ), new Error("Builder SDK could not find a global `fetch` function");
539
551
  return t;
540
552
  }
541
- const A = ke(), Se = (t) => {
553
+ const U = Re(), Te = (t) => {
554
+ if (t === "localhost" || t === "127.0.0.1")
555
+ return t;
542
556
  const e = t.split(".");
543
557
  return e.length > 2 ? e.slice(1).join(".") : t;
544
- }, B = async ({
558
+ }, V = async ({
545
559
  name: t,
546
560
  canTrack: e
547
561
  }) => {
@@ -550,24 +564,25 @@ const A = ke(), Se = (t) => {
550
564
  return e ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${t}=`))) == null ? void 0 : n.split("=")[1] : void 0;
551
565
  } catch (o) {
552
566
  console.debug("[COOKIE] GET error: ", o);
567
+ return;
553
568
  }
554
- }, we = (t) => t.map(([e, n]) => n ? `${e}=${n}` : e).join("; "), Ie = [
569
+ }, $e = (t) => t.map(([e, n]) => n ? `${e}=${n}` : e).filter(b).join("; "), Ee = [
555
570
  ["secure", ""],
556
571
  ["SameSite", "None"]
557
- ], Re = ({
572
+ ], Fe = ({
558
573
  name: t,
559
574
  value: e,
560
575
  expires: n
561
576
  }) => {
562
- const s = (p() ? location.protocol === "https:" : !0) ? Ie : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [
577
+ const s = (m() ? location.protocol === "https:" : !0) ? Ee : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [
563
578
  [t, e],
564
579
  ...r,
565
580
  ["path", "/"],
566
- ["domain", Se(window.location.hostname)],
581
+ ["domain", Te(window.location.hostname)],
567
582
  ...s
568
583
  ];
569
- return we(i);
570
- }, P = async ({
584
+ return $e(i);
585
+ }, W = async ({
571
586
  name: t,
572
587
  value: e,
573
588
  expires: n,
@@ -576,19 +591,19 @@ const A = ke(), Se = (t) => {
576
591
  try {
577
592
  if (!o)
578
593
  return;
579
- const s = Re({ name: t, value: e, expires: n });
594
+ const s = Fe({ name: t, value: e, expires: n });
580
595
  document.cookie = s;
581
596
  } catch (s) {
582
597
  console.warn("[COOKIE] SET error: ", s);
583
598
  }
584
- }, Te = "builderio.variations", U = (t) => `${Te}.${t}`, $e = ({
599
+ }, je = "builderio.variations", L = (t) => `${je}.${t}`, Oe = ({
585
600
  contentId: t,
586
601
  canTrack: e
587
- }) => B({ name: U(t), canTrack: e }), Ee = ({
602
+ }) => V({ name: L(t), canTrack: e }), Ae = ({
588
603
  contentId: t,
589
604
  canTrack: e,
590
605
  value: n
591
- }) => P({ name: U(t), value: n, canTrack: e }), Fe = (t) => y(t.id) && y(t.variations) && Object.keys(t.variations).length > 0, je = ({
606
+ }) => W({ name: L(t), value: n, canTrack: e }), Be = (t) => b(t.id) && b(t.variations) && Object.keys(t.variations).length > 0, Pe = ({
592
607
  id: t,
593
608
  variations: e
594
609
  }) => {
@@ -599,7 +614,7 @@ const A = ke(), Se = (t) => {
599
614
  if (n += (s = e[r]) == null ? void 0 : s.testRatio, o < n)
600
615
  return r;
601
616
  return t;
602
- }, $ = ({
617
+ }, E = ({
603
618
  item: t,
604
619
  testGroupId: e
605
620
  }) => {
@@ -612,36 +627,36 @@ const A = ke(), Se = (t) => {
612
627
  testVariationId: n.id,
613
628
  testVariationName: n.name || (n.id === t.id ? "Default" : "")
614
629
  };
615
- }, Oe = async ({
630
+ }, Ue = async ({
616
631
  item: t,
617
632
  canTrack: e
618
633
  }) => {
619
- const n = await $e({
634
+ const n = await Oe({
620
635
  canTrack: e,
621
636
  contentId: t.id
622
- }), o = n ? $({ item: t, testGroupId: n }) : void 0;
637
+ }), o = n ? E({ item: t, testGroupId: n }) : void 0;
623
638
  if (o)
624
639
  return o;
625
640
  {
626
- const s = je({
641
+ const s = Pe({
627
642
  variations: t.variations,
628
643
  id: t.id
629
644
  });
630
- return Ee({
645
+ return Ae({
631
646
  contentId: t.id,
632
647
  value: s,
633
648
  canTrack: e
634
649
  }).catch((r) => {
635
650
  console.error("could not store A/B test variation: ", r);
636
- }), $({ item: t, testGroupId: s });
651
+ }), E({ item: t, testGroupId: s });
637
652
  }
638
- }, Ae = async ({
653
+ }, Ve = async ({
639
654
  item: t,
640
655
  canTrack: e
641
656
  }) => {
642
- if (!Fe(t))
657
+ if (!Be(t))
643
658
  return;
644
- const n = await Oe({ item: t, canTrack: e });
659
+ const n = await Ue({ item: t, canTrack: e });
645
660
  Object.assign(t, n);
646
661
  };
647
662
  function C(t, e = null, n = ".") {
@@ -654,27 +669,27 @@ function C(t, e = null, n = ".") {
654
669
  ].every(Boolean) ? { ...o, ...C(r, i, n) } : { ...o, [i]: r };
655
670
  }, {});
656
671
  }
657
- const E = "builder.", Be = "options.", Pe = (t) => {
672
+ const F = "builder.", We = "options.", Le = (t) => {
658
673
  const e = {};
659
674
  return t.forEach((n, o) => {
660
675
  e[o] = n;
661
676
  }), e;
662
- }, Ue = (t) => {
677
+ }, Ne = (t) => {
663
678
  if (!t)
664
679
  return {};
665
- const e = V(t), n = {};
680
+ const e = N(t), n = {};
666
681
  return Object.keys(e).forEach((o) => {
667
- if (o.startsWith(E)) {
668
- const s = o.replace(E, "").replace(Be, "");
682
+ if (o.startsWith(F)) {
683
+ const s = o.replace(F, "").replace(We, "");
669
684
  n[s] = e[o];
670
685
  }
671
686
  }), n;
672
- }, Ve = () => {
673
- if (!p())
687
+ }, Me = () => {
688
+ if (!m())
674
689
  return {};
675
690
  const t = new URLSearchParams(window.location.search);
676
- return Ue(t);
677
- }, V = (t) => t instanceof URLSearchParams ? Pe(t) : t, We = (t) => {
691
+ return Ne(t);
692
+ }, N = (t) => t instanceof URLSearchParams ? Le(t) : t, ze = (t) => {
678
693
  const {
679
694
  limit: e = 30,
680
695
  userAttributes: n,
@@ -682,61 +697,67 @@ const E = "builder.", Be = "options.", Pe = (t) => {
682
697
  noTraverse: s = !1,
683
698
  model: r,
684
699
  apiKey: i,
685
- includeRefs: l = !0,
700
+ includeRefs: c = !0,
686
701
  locale: a
687
702
  } = t;
688
703
  if (!i)
689
704
  throw new Error("Missing API key");
690
- const u = new URL(
691
- `https://cdn.builder.io/api/v2/content/${r}?apiKey=${i}&limit=${e}&noTraverse=${s}&includeRefs=${l}${a ? `&locale=${a}` : ""}`
692
- ), d = {
693
- ...Ve(),
694
- ...V(t.options || {})
695
- }, h = C(d);
696
- for (const c in h)
697
- u.searchParams.set(c, String(h[c]));
698
- if (n && u.searchParams.set("userAttributes", JSON.stringify(n)), o) {
699
- const c = C({ query: o });
700
- for (const g in c)
701
- u.searchParams.set(g, JSON.stringify(c[g]));
705
+ const d = new URL(
706
+ `https://cdn.builder.io/api/v2/content/${r}?apiKey=${i}&limit=${e}&noTraverse=${s}&includeRefs=${c}${a ? `&locale=${a}` : ""}`
707
+ ), u = {
708
+ ...Me(),
709
+ ...N(t.options || {})
710
+ }, h = C(u);
711
+ for (const l in h)
712
+ d.searchParams.set(l, String(h[l]));
713
+ if (n && d.searchParams.set("userAttributes", JSON.stringify(n)), o) {
714
+ const l = C({ query: o });
715
+ for (const g in l)
716
+ d.searchParams.set(g, JSON.stringify(l[g]));
702
717
  }
703
- return u;
718
+ return d;
704
719
  };
705
- async function W(t) {
706
- return (await Ne({ ...t, limit: 1 })).results[0] || null;
720
+ async function M(t) {
721
+ return (await Ke({ ...t, limit: 1 })).results[0] || null;
707
722
  }
708
- async function Ne(t) {
709
- const e = We(t), o = await (await A(e.href)).json(), s = t.canTrack !== !1;
723
+ async function Ke(t) {
724
+ const e = ze(t), o = await (await U(e.href)).json(), s = t.canTrack !== !1;
710
725
  if (s && Array.isArray(o.results))
711
726
  for (const r of o.results)
712
- await Ae({ item: r, canTrack: s });
727
+ await Ve({ item: r, canTrack: s });
713
728
  return o;
714
729
  }
715
- const Le = () => Promise.resolve().then(() => an).then((t) => t.default).catch((t) => {
730
+ const De = () => Promise.resolve().then(() => bn).then((t) => t.default).catch((t) => {
716
731
  throw console.error(
717
732
  "Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
718
733
  t
719
734
  ), t;
720
- }), Me = {
735
+ }), He = {
721
736
  name: "builder-symbol",
722
- components: { RenderContent: Le },
737
+ components: { RenderContent: De },
723
738
  props: ["attributes", "symbol", "dynamic"],
724
- data: () => ({ fetchedContent: null }),
739
+ data() {
740
+ return { fetchedContent: null };
741
+ },
725
742
  inject: {
726
- builderContext: "BuilderContext"
743
+ builderContext: S.key
727
744
  },
728
745
  watch: {
729
- onUpdateHook0() {
730
- const t = this.symbol;
731
- t && !t.content && !this.fetchedContent && t.model && W({
732
- model: t.model,
733
- apiKey: this.builderContext.apiKey,
734
- query: {
735
- id: t.entry
736
- }
737
- }).then((e) => {
738
- this.fetchedContent = e;
739
- });
746
+ onUpdateHook0: {
747
+ handler() {
748
+ var e;
749
+ const t = this.symbol;
750
+ t && !t.content && !this.fetchedContent && t.model && ((e = this.builderContext) == null ? void 0 : e.apiKey) && M({
751
+ model: t.model,
752
+ apiKey: this.builderContext.apiKey,
753
+ query: {
754
+ id: t.entry
755
+ }
756
+ }).then((n) => {
757
+ this.fetchedContent = n;
758
+ });
759
+ },
760
+ immediate: !0
740
761
  }
741
762
  },
742
763
  computed: {
@@ -772,8 +793,8 @@ const Le = () => Promise.resolve().then(() => an).then((t) => t.default).catch((
772
793
  }
773
794
  }
774
795
  };
775
- var ze = function() {
776
- var o, s, r, i, l;
796
+ var qe = function() {
797
+ var o, s, r, i, c;
777
798
  var e = this, n = e._self._c;
778
799
  return n("div", e._b({ class: e._classStringToObject(e.className), attrs: { dataSet: {
779
800
  class: e.className
@@ -781,39 +802,39 @@ var ze = function() {
781
802
  ...(o = e.symbol) == null ? void 0 : o.data,
782
803
  ...e.builderContext.state,
783
804
  ...(i = (r = (s = e.symbol) == null ? void 0 : s.content) == null ? void 0 : r.data) == null ? void 0 : i.state
784
- }, model: (l = e.symbol) == null ? void 0 : l.model, content: e.contentToUse } })], 1);
785
- }, Ke = [], De = /* @__PURE__ */ m(
786
- Me,
787
- ze,
788
- Ke,
805
+ }, model: (c = e.symbol) == null ? void 0 : c.model, content: e.contentToUse } })], 1);
806
+ }, Ge = [], Je = /* @__PURE__ */ p(
807
+ He,
808
+ qe,
809
+ Ge,
789
810
  !1,
790
811
  null,
791
812
  null,
792
813
  null,
793
814
  null
794
815
  );
795
- const He = De.exports, qe = {
816
+ const Xe = Je.exports, Ye = {
796
817
  name: "builder-button",
797
818
  props: ["attributes", "text", "link", "openLinkInNewTab"]
798
819
  };
799
- var Ge = function() {
820
+ var Qe = function() {
800
821
  var e = this, n = e._self._c;
801
- 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-2fnk003dqad" }, "button", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]);
802
- }, Je = [], Xe = /* @__PURE__ */ m(
803
- qe,
804
- Ge,
805
- Je,
822
+ 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-1pl23ac79ld" }, "button", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]);
823
+ }, Ze = [], et = /* @__PURE__ */ p(
824
+ Ye,
825
+ Qe,
826
+ Ze,
806
827
  !1,
807
828
  null,
808
- "b5c6b7e4",
829
+ "9d610bd1",
809
830
  null,
810
831
  null
811
832
  );
812
- const Ye = Xe.exports, Qe = {
833
+ const tt = et.exports, nt = {
813
834
  name: "builder-section-component",
814
835
  props: ["attributes", "maxWidth"]
815
836
  };
816
- var Ze = function() {
837
+ var ot = function() {
817
838
  var e = this, n = e._self._c;
818
839
  return n("section", e._b({ style: {
819
840
  width: "100%",
@@ -827,34 +848,34 @@ var Ze = function() {
827
848
  marginLeft: "auto",
828
849
  marginRight: "auto"
829
850
  } }, "section", e.attributes, !1), [e._t("default")], 2);
830
- }, et = [], tt = /* @__PURE__ */ m(
831
- Qe,
832
- Ze,
833
- et,
851
+ }, st = [], rt = /* @__PURE__ */ p(
852
+ nt,
853
+ ot,
854
+ st,
834
855
  !1,
835
856
  null,
836
857
  null,
837
858
  null,
838
859
  null
839
860
  );
840
- const nt = tt.exports, ot = {
861
+ const it = rt.exports, at = {
841
862
  name: "builder-fragment-component",
842
863
  props: []
843
864
  };
844
- var st = function() {
865
+ var ct = function() {
845
866
  var e = this, n = e._self._c;
846
867
  return n("span", [e._t("default")], 2);
847
- }, rt = [], it = /* @__PURE__ */ m(
848
- ot,
849
- st,
850
- rt,
868
+ }, lt = [], dt = /* @__PURE__ */ p(
869
+ at,
870
+ ct,
871
+ lt,
851
872
  !1,
852
873
  null,
853
874
  null,
854
875
  null,
855
876
  null
856
877
  );
857
- const at = it.exports, lt = {
878
+ const ut = dt.exports, mt = {
858
879
  name: "Core:Button",
859
880
  builtIn: !0,
860
881
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
@@ -894,7 +915,7 @@ const at = it.exports, lt = {
894
915
  }, _ = (t) => {
895
916
  const e = t.toString().trim();
896
917
  return `return (${!e.startsWith("function") && !e.startsWith("(") ? "function " : ""}${e}).apply(this, arguments)`;
897
- }, ct = {
918
+ }, pt = {
898
919
  name: "Columns",
899
920
  builtIn: !0,
900
921
  inputs: [
@@ -1093,7 +1114,7 @@ const at = it.exports, lt = {
1093
1114
  (s) => s.get("width")
1094
1115
  ) && (!!n.find(
1095
1116
  (r) => !r.get("width")
1096
- ) || n.reduce((l, a) => l + a.get("width"), 0) !== 100) && e();
1117
+ ) || n.reduce((c, a) => c + a.get("width"), 0) !== 100) && e();
1097
1118
  })
1098
1119
  },
1099
1120
  {
@@ -1119,14 +1140,14 @@ const at = it.exports, lt = {
1119
1140
  advanced: !0
1120
1141
  }
1121
1142
  ]
1122
- }, ut = {
1143
+ }, ht = {
1123
1144
  name: "Fragment",
1124
1145
  static: !0,
1125
1146
  hidden: !0,
1126
1147
  builtIn: !0,
1127
1148
  canHaveChildren: !0,
1128
1149
  noWrap: !0
1129
- }, dt = {
1150
+ }, ft = {
1130
1151
  name: "Image",
1131
1152
  static: !0,
1132
1153
  builtIn: !0,
@@ -1146,33 +1167,35 @@ const at = it.exports, lt = {
1146
1167
  allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
1147
1168
  required: !0,
1148
1169
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
1149
- onChange: _((t) => {
1150
- t.delete("srcset"), t.delete("noWebp");
1151
- function n(i, l = 6e4) {
1152
- return new Promise((a, u) => {
1153
- const d = document.createElement("img");
1154
- let h = !1;
1155
- d.onload = () => {
1156
- h = !0, a(d);
1157
- }, d.addEventListener("error", (c) => {
1158
- console.warn("Image load failed", c.error), u(c.error);
1159
- }), d.src = i, setTimeout(() => {
1160
- h || u(new Error("Image load timed out"));
1161
- }, l);
1162
- });
1163
- }
1164
- function o(i) {
1165
- return Math.round(i * 1e3) / 1e3;
1170
+ onChange: _(
1171
+ (t) => {
1172
+ t.delete("srcset"), t.delete("noWebp");
1173
+ function n(i, c = 6e4) {
1174
+ return new Promise((a, d) => {
1175
+ const u = document.createElement("img");
1176
+ let h = !1;
1177
+ u.onload = () => {
1178
+ h = !0, a(u);
1179
+ }, u.addEventListener("error", (l) => {
1180
+ console.warn("Image load failed", l.error), d(l.error);
1181
+ }), u.src = i, setTimeout(() => {
1182
+ h || d(new Error("Image load timed out"));
1183
+ }, c);
1184
+ });
1185
+ }
1186
+ function o(i) {
1187
+ return Math.round(i * 1e3) / 1e3;
1188
+ }
1189
+ const s = t.get("image"), r = t.get("aspectRatio");
1190
+ if (fetch(s).then((i) => i.blob()).then((i) => {
1191
+ i.type.includes("svg") && t.set("noWebp", !0);
1192
+ }), s && (!r || r === 0.7041))
1193
+ return n(s).then((i) => {
1194
+ const c = t.get("aspectRatio");
1195
+ t.get("image") === s && (!c || c === 0.7041) && i.width && i.height && (t.set("aspectRatio", o(i.height / i.width)), t.set("height", i.height), t.set("width", i.width));
1196
+ });
1166
1197
  }
1167
- const s = t.get("image"), r = t.get("aspectRatio");
1168
- if (fetch(s).then((i) => i.blob()).then((i) => {
1169
- i.type.includes("svg") && t.set("noWebp", !0);
1170
- }), s && (!r || r === 0.7041))
1171
- return n(s).then((i) => {
1172
- const l = t.get("aspectRatio");
1173
- t.get("image") === s && (!l || l === 0.7041) && i.width && i.height && (t.set("aspectRatio", o(i.height / i.width)), t.set("height", i.height), t.set("width", i.width));
1174
- });
1175
- })
1198
+ )
1176
1199
  },
1177
1200
  {
1178
1201
  name: "backgroundSize",
@@ -1252,7 +1275,7 @@ const at = it.exports, lt = {
1252
1275
  defaultValue: 0.7041
1253
1276
  }
1254
1277
  ]
1255
- }, pt = {
1278
+ }, gt = {
1256
1279
  name: "Core:Section",
1257
1280
  static: !0,
1258
1281
  builtIn: !0,
@@ -1297,7 +1320,7 @@ const at = it.exports, lt = {
1297
1320
  }
1298
1321
  }
1299
1322
  ]
1300
- }, mt = {
1323
+ }, bt = {
1301
1324
  name: "Symbol",
1302
1325
  noWrap: !0,
1303
1326
  static: !0,
@@ -1336,7 +1359,7 @@ const at = it.exports, lt = {
1336
1359
  type: "boolean"
1337
1360
  }
1338
1361
  ]
1339
- }, ht = {
1362
+ }, yt = {
1340
1363
  name: "Text",
1341
1364
  static: !0,
1342
1365
  builtIn: !0,
@@ -1356,7 +1379,7 @@ const at = it.exports, lt = {
1356
1379
  height: "auto",
1357
1380
  textAlign: "center"
1358
1381
  }
1359
- }, ft = {
1382
+ }, vt = {
1360
1383
  name: "Video",
1361
1384
  canHaveChildren: !0,
1362
1385
  builtIn: !0,
@@ -1458,7 +1481,7 @@ const at = it.exports, lt = {
1458
1481
  advanced: !0
1459
1482
  }
1460
1483
  ]
1461
- }, gt = {
1484
+ }, _t = {
1462
1485
  name: "Embed",
1463
1486
  static: !0,
1464
1487
  builtIn: !0,
@@ -1469,21 +1492,23 @@ const at = it.exports, lt = {
1469
1492
  required: !0,
1470
1493
  defaultValue: "",
1471
1494
  helperText: "e.g. enter a youtube url, google map, etc",
1472
- onChange: _((t) => {
1473
- const e = t.get("url");
1474
- if (e)
1475
- return t.set("content", "Loading..."), fetch(
1476
- `https://iframe.ly/api/iframely?url=${e}&api_key=ae0e60e78201a3f2b0de4b`
1477
- ).then((o) => o.json()).then((o) => {
1478
- t.get("url") === e && (o.html ? t.set("content", o.html) : t.set("content", "Invalid url, please try another"));
1479
- }).catch((o) => {
1480
- t.set(
1481
- "content",
1482
- "There was an error embedding this URL, please try again or another URL"
1483
- );
1484
- });
1485
- t.delete("content");
1486
- })
1495
+ onChange: _(
1496
+ (t) => {
1497
+ const e = t.get("url");
1498
+ if (e)
1499
+ return t.set("content", "Loading..."), fetch(
1500
+ `https://iframe.ly/api/iframely?url=${e}&api_key=ae0e60e78201a3f2b0de4b`
1501
+ ).then((o) => o.json()).then((o) => {
1502
+ t.get("url") === e && (o.html ? t.set("content", o.html) : t.set("content", "Invalid url, please try another"));
1503
+ }).catch((o) => {
1504
+ t.set(
1505
+ "content",
1506
+ "There was an error embedding this URL, please try again or another URL"
1507
+ );
1508
+ });
1509
+ t.delete("content");
1510
+ }
1511
+ )
1487
1512
  },
1488
1513
  {
1489
1514
  name: "content",
@@ -1492,17 +1517,22 @@ const at = it.exports, lt = {
1492
1517
  hideFromUI: !0
1493
1518
  }
1494
1519
  ]
1495
- }, bt = [
1520
+ }, xt = [
1496
1521
  "text/javascript",
1497
1522
  "application/javascript",
1498
1523
  "application/ecmascript"
1499
- ], yt = (t) => bt.includes(t.type), vt = {
1524
+ ], Ct = (t) => xt.includes(t.type), kt = {
1500
1525
  name: "builder-embed",
1501
1526
  props: ["content"],
1502
- data: () => ({ scriptsInserted: [], scriptsRun: [], ranInitFn: !1 }),
1527
+ data() {
1528
+ return { scriptsInserted: [], scriptsRun: [], ranInitFn: !1 };
1529
+ },
1503
1530
  watch: {
1504
- onUpdateHook0() {
1505
- this.$refs.elem && !this.ranInitFn && (this.ranInitFn = !0, this.findAndRunScripts());
1531
+ onUpdateHook0: {
1532
+ handler() {
1533
+ this.$refs.elem && !this.ranInitFn && (this.ranInitFn = !0, this.findAndRunScripts());
1534
+ },
1535
+ immediate: !0
1506
1536
  }
1507
1537
  },
1508
1538
  computed: {
@@ -1524,7 +1554,7 @@ const at = it.exports, lt = {
1524
1554
  this.scriptsInserted.push(n.src);
1525
1555
  const o = document.createElement("script");
1526
1556
  o.async = !0, o.src = n.src, document.head.appendChild(o);
1527
- } else if (yt(n) && !this.scriptsRun.includes(n.innerText))
1557
+ } else if (Ct(n) && !this.scriptsRun.includes(n.innerText))
1528
1558
  try {
1529
1559
  this.scriptsRun.push(n.innerText), new Function(n.innerText)();
1530
1560
  } catch (o) {
@@ -1534,27 +1564,27 @@ const at = it.exports, lt = {
1534
1564
  }
1535
1565
  }
1536
1566
  };
1537
- var _t = function() {
1567
+ var wt = function() {
1538
1568
  var e = this, n = e._self._c;
1539
1569
  return n("div", { ref: "elem", staticClass: "builder-embed", domProps: { innerHTML: e._s(e.content) } });
1540
- }, xt = [], Ct = /* @__PURE__ */ m(
1541
- vt,
1542
- _t,
1543
- xt,
1570
+ }, St = [], It = /* @__PURE__ */ p(
1571
+ kt,
1572
+ wt,
1573
+ St,
1544
1574
  !1,
1545
1575
  null,
1546
1576
  null,
1547
1577
  null,
1548
1578
  null
1549
1579
  );
1550
- const kt = Ct.exports;
1551
- function St() {
1552
- return p() && window.self !== window.top;
1580
+ const Rt = It.exports;
1581
+ function Tt() {
1582
+ return m() && window.self !== window.top;
1553
1583
  }
1554
1584
  function f() {
1555
- return St() && window.location.search.indexOf("builder.frameEditing=") !== -1;
1585
+ return Tt() && window.location.search.indexOf("builder.frameEditing=") !== -1;
1556
1586
  }
1557
- const wt = {
1587
+ const $t = {
1558
1588
  name: "builder-img-component",
1559
1589
  props: [
1560
1590
  "backgroundSize",
@@ -1564,25 +1594,27 @@ const wt = {
1564
1594
  "image",
1565
1595
  "attributes"
1566
1596
  ],
1567
- data: () => ({ isEditing: f })
1597
+ data() {
1598
+ return { isEditing: f };
1599
+ }
1568
1600
  };
1569
- var It = function() {
1601
+ var Et = function() {
1570
1602
  var e = this, n = e._self._c;
1571
1603
  return n("img", e._b({ key: e.isEditing() && e.imgSrc || "default-key", style: {
1572
1604
  objectFit: e.backgroundSize || "cover",
1573
1605
  objectPosition: e.backgroundPosition || "center"
1574
1606
  }, attrs: { alt: e.altText, src: e.imgSrc || e.image } }, "img", e.attributes, !1));
1575
- }, Rt = [], Tt = /* @__PURE__ */ m(
1576
- wt,
1577
- It,
1578
- Rt,
1607
+ }, Ft = [], jt = /* @__PURE__ */ p(
1608
+ $t,
1609
+ Et,
1610
+ Ft,
1579
1611
  !1,
1580
1612
  null,
1581
1613
  null,
1582
1614
  null,
1583
1615
  null
1584
1616
  );
1585
- const $t = Tt.exports, Et = {
1617
+ const Ot = jt.exports, At = {
1586
1618
  name: "Raw:Img",
1587
1619
  hideFromInsertMenu: !0,
1588
1620
  builtIn: !0,
@@ -1598,10 +1630,12 @@ const $t = Tt.exports, Et = {
1598
1630
  ],
1599
1631
  noWrap: !0,
1600
1632
  static: !0
1601
- }, Ft = {
1633
+ }, Bt = {
1602
1634
  name: "builder-custom-code",
1603
1635
  props: ["replaceNodes", "code"],
1604
- data: () => ({ scriptsInserted: [], scriptsRun: [] }),
1636
+ data() {
1637
+ return { scriptsInserted: [], scriptsRun: [] };
1638
+ },
1605
1639
  mounted() {
1606
1640
  this.findAndRunScripts();
1607
1641
  },
@@ -1644,22 +1678,22 @@ const $t = Tt.exports, Et = {
1644
1678
  }
1645
1679
  }
1646
1680
  };
1647
- var jt = function() {
1681
+ var Pt = function() {
1648
1682
  var e = this, n = e._self._c;
1649
1683
  return n("div", { ref: "elem", class: e._classStringToObject(
1650
1684
  "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
1651
1685
  ), domProps: { innerHTML: e._s(e.code) } });
1652
- }, Ot = [], At = /* @__PURE__ */ m(
1653
- Ft,
1654
- jt,
1655
- Ot,
1686
+ }, Ut = [], Vt = /* @__PURE__ */ p(
1687
+ Bt,
1688
+ Pt,
1689
+ Ut,
1656
1690
  !1,
1657
1691
  null,
1658
1692
  null,
1659
1693
  null,
1660
1694
  null
1661
1695
  );
1662
- const Bt = At.exports, Pt = {
1696
+ const Wt = Vt.exports, Lt = {
1663
1697
  name: "Custom Code",
1664
1698
  static: !0,
1665
1699
  builtIn: !0,
@@ -1686,20 +1720,20 @@ const Bt = At.exports, Pt = {
1686
1720
  advanced: !0
1687
1721
  }
1688
1722
  ]
1689
- }, Ut = () => [
1690
- { component: se, ...ct },
1691
- { component: de, ...dt },
1692
- { component: $t, ...Et },
1693
- { component: ge, ...ht },
1694
- { component: xe, ...ft },
1695
- { component: He, ...mt },
1696
- { component: Ye, ...lt },
1697
- { component: nt, ...pt },
1698
- { component: at, ...ut },
1699
- { component: kt, ...gt },
1700
- { component: Bt, ...Pt }
1723
+ }, Nt = () => [
1724
+ { component: ae, ...pt },
1725
+ { component: he, ...ft },
1726
+ { component: Ot, ...At },
1727
+ { component: ve, ...yt },
1728
+ { component: we, ...vt },
1729
+ { component: Xe, ...bt },
1730
+ { component: tt, ...mt },
1731
+ { component: it, ...gt },
1732
+ { component: ut, ...ht },
1733
+ { component: Rt, ..._t },
1734
+ { component: Wt, ...Lt }
1701
1735
  ];
1702
- function F({
1736
+ function j({
1703
1737
  code: t,
1704
1738
  context: e,
1705
1739
  state: n,
@@ -1712,9 +1746,9 @@ function F({
1712
1746
  }
1713
1747
  const r = {
1714
1748
  isEditing: f(),
1715
- isBrowser: p(),
1716
- isServer: !p()
1717
- }, l = s && !(t.includes(";") || t.includes(" return ") || t.trim().startsWith("return ")) ? `return (${t});` : t;
1749
+ isBrowser: m(),
1750
+ isServer: !m()
1751
+ }, c = s && !(t.includes(";") || t.includes(" return ") || t.trim().startsWith("return ")) ? `return (${t});` : t;
1718
1752
  try {
1719
1753
  return new Function(
1720
1754
  "builder",
@@ -1722,127 +1756,162 @@ function F({
1722
1756
  "state",
1723
1757
  "context",
1724
1758
  "event",
1725
- l
1759
+ c
1726
1760
  )(r, r, n, e, o);
1727
1761
  } catch (a) {
1728
1762
  console.warn(
1729
1763
  `Builder custom code error:
1730
1764
  While Evaluating:
1731
1765
  `,
1732
- l,
1766
+ c,
1733
1767
  `
1734
1768
  `,
1735
1769
  a
1736
1770
  );
1737
1771
  }
1738
1772
  }
1739
- function Vt() {
1740
- return !p() || f() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1773
+ function Mt() {
1774
+ return !m() || f() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1741
1775
  }
1742
- const N = [];
1743
- function bn(t, e) {
1744
- return N.push({ component: t, ...e }), console.warn(
1776
+ const z = [];
1777
+ function Rn(t, e) {
1778
+ return z.push({ component: t, ...e }), console.warn(
1745
1779
  "registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
1746
1780
  ), t;
1747
1781
  }
1748
- const Wt = ({
1782
+ const zt = ({
1749
1783
  component: t,
1750
1784
  ...e
1751
1785
  }) => ({
1752
1786
  type: "builder.registerComponent",
1753
- data: Lt(e)
1754
- }), Nt = (t) => typeof t == "function" ? _(t) : S(t), Lt = ({
1787
+ data: Dt(e)
1788
+ }), Kt = (t) => typeof t == "function" ? _(t) : w(t), Dt = ({
1755
1789
  inputs: t,
1756
1790
  ...e
1757
1791
  }) => ({
1758
- ...S(e),
1792
+ ...w(e),
1759
1793
  inputs: t == null ? void 0 : t.map(
1760
1794
  (n) => Object.entries(n).reduce(
1761
1795
  (o, [s, r]) => ({
1762
1796
  ...o,
1763
- [s]: Nt(r)
1797
+ [s]: Kt(r)
1764
1798
  }),
1765
1799
  {}
1766
1800
  )
1767
1801
  )
1768
1802
  });
1769
- function Mt() {
1803
+ function Ht() {
1770
1804
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
1771
1805
  const e = Math.random() * 16 | 0;
1772
1806
  return (t == "x" ? e : e & 3 | 8).toString(16);
1773
1807
  });
1774
1808
  }
1775
- function L() {
1776
- return Mt().replace(/-/g, "");
1809
+ function K() {
1810
+ return Ht().replace(/-/g, "");
1777
1811
  }
1778
- const M = "builderSessionId", zt = async ({ canTrack: t }) => {
1812
+ const D = "builderSessionId", qt = async ({
1813
+ canTrack: t
1814
+ }) => {
1779
1815
  if (!t)
1780
1816
  return;
1781
- const e = await B({
1782
- name: M,
1817
+ const e = await V({
1818
+ name: D,
1783
1819
  canTrack: t
1784
1820
  });
1785
- if (y(e))
1821
+ if (b(e))
1786
1822
  return e;
1787
1823
  {
1788
- const n = Kt();
1789
- Dt({ id: n, canTrack: t });
1824
+ const n = Gt();
1825
+ return Jt({ id: n, canTrack: t }), n;
1790
1826
  }
1791
- }, Kt = () => L(), Dt = ({
1827
+ }, Gt = () => K(), Jt = ({
1792
1828
  id: t,
1793
1829
  canTrack: e
1794
- }) => P({ name: M, value: t, canTrack: e }), z = () => p() && typeof localStorage < "u" ? localStorage : void 0, Ht = ({
1830
+ }) => W({ name: D, value: t, canTrack: e }), H = () => m() && typeof localStorage < "u" ? localStorage : void 0, Xt = ({
1795
1831
  key: t,
1796
1832
  canTrack: e
1797
1833
  }) => {
1798
1834
  var n;
1799
1835
  try {
1800
- return e ? (n = z()) == null ? void 0 : n.getItem(t) : void 0;
1836
+ return e ? (n = H()) == null ? void 0 : n.getItem(t) : void 0;
1801
1837
  } catch (o) {
1802
1838
  console.debug("[LocalStorage] GET error: ", o);
1839
+ return;
1803
1840
  }
1804
- }, qt = ({
1841
+ }, Yt = ({
1805
1842
  key: t,
1806
1843
  canTrack: e,
1807
1844
  value: n
1808
1845
  }) => {
1809
1846
  var o;
1810
1847
  try {
1811
- e && ((o = z()) == null || o.setItem(t, n));
1848
+ e && ((o = H()) == null || o.setItem(t, n));
1812
1849
  } catch (s) {
1813
1850
  console.debug("[LocalStorage] SET error: ", s);
1814
1851
  }
1815
- }, K = "builderVisitorId", Gt = ({ canTrack: t }) => {
1852
+ }, q = "builderVisitorId", Qt = ({ canTrack: t }) => {
1816
1853
  if (!t)
1817
1854
  return;
1818
- const e = Ht({
1819
- key: K,
1855
+ const e = Xt({
1856
+ key: q,
1820
1857
  canTrack: t
1821
1858
  });
1822
- if (y(e))
1859
+ if (b(e))
1823
1860
  return e;
1824
1861
  {
1825
- const n = Jt();
1826
- Xt({ id: n, canTrack: t });
1862
+ const n = Zt();
1863
+ return en({ id: n, canTrack: t }), n;
1827
1864
  }
1828
- }, Jt = () => L(), Xt = ({
1865
+ }, Zt = () => K(), en = ({
1829
1866
  id: t,
1830
1867
  canTrack: e
1831
- }) => qt({
1832
- key: K,
1868
+ }) => Yt({
1869
+ key: q,
1833
1870
  value: t,
1834
1871
  canTrack: e
1835
- }), Yt = async ({
1872
+ }), tn = () => {
1873
+ if (m()) {
1874
+ const t = new URL(location.href);
1875
+ return t.pathname === "" && (t.pathname = "/"), t;
1876
+ } else
1877
+ return console.warn("Cannot get location for tracking in non-browser environment"), null;
1878
+ }, nn = () => typeof navigator == "object" && navigator.userAgent || "", on = () => {
1879
+ const t = nn(), e = {
1880
+ Android() {
1881
+ return t.match(/Android/i);
1882
+ },
1883
+ BlackBerry() {
1884
+ return t.match(/BlackBerry/i);
1885
+ },
1886
+ iOS() {
1887
+ return t.match(/iPhone|iPod/i);
1888
+ },
1889
+ Opera() {
1890
+ return t.match(/Opera Mini/i);
1891
+ },
1892
+ Windows() {
1893
+ return t.match(/IEMobile/i) || t.match(/WPDesktop/i);
1894
+ },
1895
+ any() {
1896
+ return e.Android() || e.BlackBerry() || e.iOS() || e.Opera() || e.Windows() || v === "reactNative";
1897
+ }
1898
+ }, n = t.match(/Tablet|iPad/i), o = tn();
1899
+ return {
1900
+ urlPath: o == null ? void 0 : o.pathname,
1901
+ host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
1902
+ device: n ? "tablet" : e.any() ? "mobile" : "desktop"
1903
+ };
1904
+ }, sn = async ({
1836
1905
  canTrack: t
1837
1906
  }) => {
1838
1907
  if (!t)
1839
1908
  return { visitorId: void 0, sessionId: void 0 };
1840
- const e = await zt({ canTrack: t }), n = Gt({ canTrack: t });
1909
+ const e = await qt({ canTrack: t }), n = Qt({ canTrack: t });
1841
1910
  return {
1842
1911
  sessionId: e,
1843
1912
  visitorId: n
1844
1913
  };
1845
- }, Qt = async ({
1914
+ }, rn = async ({
1846
1915
  type: t,
1847
1916
  canTrack: e,
1848
1917
  apiKey: n,
@@ -1852,8 +1921,12 @@ const M = "builderSessionId", zt = async ({ canTrack: t }) => {
1852
1921
  type: t,
1853
1922
  data: {
1854
1923
  ...s,
1855
- metadata: JSON.stringify(o),
1856
- ...await Yt({ canTrack: e }),
1924
+ metadata: {
1925
+ url: location.href,
1926
+ ...o
1927
+ },
1928
+ ...await sn({ canTrack: e }),
1929
+ userAttributes: on(),
1857
1930
  ownerId: n
1858
1931
  }
1859
1932
  });
@@ -1864,11 +1937,11 @@ async function k(t) {
1864
1937
  );
1865
1938
  return;
1866
1939
  }
1867
- if (!!t.canTrack && !f() && !!(p() || v === "reactNative"))
1940
+ if (!!t.canTrack && !f() && !!(m() || v === "reactNative"))
1868
1941
  return fetch("https://builder.io/api/v1/track", {
1869
1942
  method: "POST",
1870
1943
  body: JSON.stringify({
1871
- events: [await Qt(t)]
1944
+ events: [await rn(t)]
1872
1945
  }),
1873
1946
  headers: {
1874
1947
  "content-type": "application/json"
@@ -1878,21 +1951,58 @@ async function k(t) {
1878
1951
  console.error("Failed to track: ", e);
1879
1952
  });
1880
1953
  }
1881
- const yn = (t) => k({ ...t, canTrack: !0 }), Zt = () => Promise.resolve().then(() => D).then((t) => t.default).catch((t) => {
1954
+ const Tn = (t) => k({ ...t, canTrack: !0 });
1955
+ function O(t) {
1956
+ return Math.round(t * 1e3) / 1e3;
1957
+ }
1958
+ const an = (t, e, n = !0) => {
1959
+ if (!(t instanceof HTMLElement))
1960
+ return null;
1961
+ let o = n ? t : t.parentElement;
1962
+ do {
1963
+ if (!o)
1964
+ return null;
1965
+ if (e(o))
1966
+ return o;
1967
+ } while (o = o.parentElement);
1968
+ return null;
1969
+ }, cn = (t) => an(t, (e) => {
1970
+ const n = e.getAttribute("builder-id") || e.id;
1971
+ return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
1972
+ }), A = ({
1973
+ event: t,
1974
+ target: e
1975
+ }) => {
1976
+ const n = e.getBoundingClientRect(), o = t.clientX - n.left, s = t.clientY - n.top, r = O(o / n.width), i = O(s / n.height);
1977
+ return {
1978
+ x: r,
1979
+ y: i
1980
+ };
1981
+ }, ln = (t) => {
1982
+ const e = t.target, n = e && cn(e), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1983
+ return {
1984
+ targetBuilderElement: o || void 0,
1985
+ metadata: {
1986
+ targetOffset: e ? A({ event: t, target: e }) : void 0,
1987
+ builderTargetOffset: n ? A({ event: t, target: n }) : void 0,
1988
+ builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
1989
+ }
1990
+ };
1991
+ }, dn = () => Promise.resolve().then(() => G).then((t) => t.default).catch((t) => {
1882
1992
  throw console.error(
1883
1993
  "Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
1884
1994
  t
1885
1995
  ), t;
1886
- }), en = () => import("./render-styles.571858fa.js").then((t) => t.default).catch((t) => {
1996
+ }), un = () => import("./render-styles.78a78d13.js").then((t) => t.default).catch((t) => {
1887
1997
  throw console.error(
1888
1998
  "Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
1889
1999
  t
1890
2000
  ), t;
1891
- }), tn = {
2001
+ }), mn = {
1892
2002
  name: "render-content",
1893
2003
  components: {
1894
- RenderContentStyles: en,
1895
- RenderBlocks: Zt
2004
+ RenderContentStyles: un,
2005
+ RenderBlocks: dn
1896
2006
  },
1897
2007
  props: [
1898
2008
  "content",
@@ -1905,32 +2015,39 @@ const yn = (t) => k({ ...t, canTrack: !0 }), Zt = () => Promise.resolve().then((
1905
2015
  "apiKey",
1906
2016
  "includeRefs"
1907
2017
  ],
1908
- data: () => ({
1909
- forceReRenderCount: 0,
1910
- overrideContent: null,
1911
- update: 0,
1912
- useBreakpoints: null,
1913
- overrideState: {}
1914
- }),
2018
+ data() {
2019
+ return {
2020
+ forceReRenderCount: 0,
2021
+ overrideContent: null,
2022
+ update: 0,
2023
+ useBreakpoints: null,
2024
+ canTrackToUse: b(this.canTrack) ? this.canTrack : !0,
2025
+ overrideState: {},
2026
+ contextContext: this.context || {},
2027
+ allRegisteredComponents: [
2028
+ ...Nt(),
2029
+ ...z,
2030
+ ...this.customComponents || []
2031
+ ].reduce(
2032
+ (t, e) => ({
2033
+ ...t,
2034
+ [e.name]: e
2035
+ }),
2036
+ {}
2037
+ ),
2038
+ httpReqsData: {},
2039
+ clicked: !1
2040
+ };
2041
+ },
1915
2042
  provide() {
1916
2043
  const t = this;
1917
2044
  return {
1918
- BuilderContext: {
1919
- get content() {
1920
- return t.useContent;
1921
- },
1922
- get state() {
1923
- return t.contentState;
1924
- },
1925
- get context() {
1926
- return t.contextContext;
1927
- },
1928
- get apiKey() {
1929
- return t.apiKey;
1930
- },
1931
- get registeredComponents() {
1932
- return t.allRegisteredComponents;
1933
- }
2045
+ [S.key]: {
2046
+ content: t.useContent,
2047
+ state: t.contentState,
2048
+ context: t.contextContext,
2049
+ apiKey: t.apiKey,
2050
+ registeredComponents: t.allRegisteredComponents
1934
2051
  }
1935
2052
  };
1936
2053
  },
@@ -1938,8 +2055,8 @@ const yn = (t) => k({ ...t, canTrack: !0 }), Zt = () => Promise.resolve().then((
1938
2055
  var t, e;
1939
2056
  if (this.apiKey || console.error(
1940
2057
  "[Builder.io]: No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
1941
- ), p()) {
1942
- if (f() && (this.forceReRenderCount = this.forceReRenderCount + 1, q(), G({
2058
+ ), m()) {
2059
+ if (f() && (this.forceReRenderCount = this.forceReRenderCount + 1, X(), Y({
1943
2060
  ...this.locale ? {
1944
2061
  locale: this.locale
1945
2062
  } : {},
@@ -1949,7 +2066,7 @@ const yn = (t) => k({ ...t, canTrack: !0 }), Zt = () => Promise.resolve().then((
1949
2066
  }), Object.values(this.allRegisteredComponents).forEach(
1950
2067
  (n) => {
1951
2068
  var s;
1952
- const o = Wt(n);
2069
+ const o = zt(n);
1953
2070
  (s = window.parent) == null || s.postMessage(o, "*");
1954
2071
  }
1955
2072
  ), window.addEventListener("message", this.processMessage), window.addEventListener(
@@ -1965,58 +2082,62 @@ const yn = (t) => k({ ...t, canTrack: !0 }), Zt = () => Promise.resolve().then((
1965
2082
  variationId: n !== o ? n : void 0
1966
2083
  });
1967
2084
  }
1968
- if (Vt()) {
1969
- const n = new URL(location.href).searchParams;
1970
- if (this.model && n.get("builder.preview") === this.model) {
1971
- const o = n.get("apiKey") || n.get("builder.space");
1972
- o && W({
1973
- model: this.model,
1974
- apiKey: o
1975
- }).then((s) => {
1976
- s && (this.overrideContent = s);
1977
- });
1978
- }
2085
+ if (Mt()) {
2086
+ const n = new URL(location.href).searchParams, o = n.get("builder.preview"), s = n.get("apiKey") || n.get("builder.space");
2087
+ o === this.model && s === this.apiKey && M({
2088
+ model: this.model,
2089
+ apiKey: this.apiKey
2090
+ }).then((r) => {
2091
+ r && (this.overrideContent = r);
2092
+ });
1979
2093
  }
1980
2094
  this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
1981
2095
  }
1982
2096
  },
1983
2097
  watch: {
1984
- onUpdateHook0() {
1985
- this.evaluateJsCode();
2098
+ onUpdateHook0: {
2099
+ handler() {
2100
+ this.evaluateJsCode();
2101
+ },
2102
+ immediate: !0
1986
2103
  },
1987
- onUpdateHook1() {
1988
- this.runHttpRequests();
2104
+ onUpdateHook1: {
2105
+ handler() {
2106
+ this.runHttpRequests();
2107
+ },
2108
+ immediate: !0
1989
2109
  },
1990
- onUpdateHook2() {
1991
- this.emitStateUpdate();
2110
+ onUpdateHook2: {
2111
+ handler() {
2112
+ this.emitStateUpdate();
2113
+ },
2114
+ immediate: !0
1992
2115
  }
1993
2116
  },
1994
2117
  unmounted() {
1995
- p() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
2118
+ m() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
1996
2119
  "builder:component:stateChangeListenerActivated",
1997
2120
  this.emitStateUpdate
1998
2121
  ));
1999
2122
  },
2000
2123
  computed: {
2001
2124
  useContent() {
2002
- var e, n, o, s, r, i, l, a;
2003
- return !this.content && !this.overrideContent ? void 0 : {
2004
- ...this.content,
2005
- ...this.overrideContent,
2006
- data: {
2007
- ...(e = this.content) == null ? void 0 : e.data,
2008
- ...this.data,
2009
- ...(n = this.overrideContent) == null ? void 0 : n.data
2010
- },
2011
- meta: {
2012
- ...(o = this.content) == null ? void 0 : o.meta,
2013
- ...(s = this.overrideContent) == null ? void 0 : s.meta,
2014
- breakpoints: this.useBreakpoints || ((i = (r = this.overrideContent) == null ? void 0 : r.meta) == null ? void 0 : i.breakpoints) || ((a = (l = this.content) == null ? void 0 : l.meta) == null ? void 0 : a.breakpoints)
2015
- }
2016
- };
2017
- },
2018
- canTrackToUse() {
2019
- return this.canTrack || !0;
2125
+ var t, e, n, o, s, r, i, c;
2126
+ if (!(!this.content && !this.overrideContent))
2127
+ return {
2128
+ ...this.content,
2129
+ ...this.overrideContent,
2130
+ data: {
2131
+ ...(t = this.content) == null ? void 0 : t.data,
2132
+ ...this.data,
2133
+ ...(e = this.overrideContent) == null ? void 0 : e.data
2134
+ },
2135
+ meta: {
2136
+ ...(n = this.content) == null ? void 0 : n.meta,
2137
+ ...(o = this.overrideContent) == null ? void 0 : o.meta,
2138
+ breakpoints: this.useBreakpoints || ((r = (s = this.overrideContent) == null ? void 0 : s.meta) == null ? void 0 : r.breakpoints) || ((c = (i = this.content) == null ? void 0 : i.meta) == null ? void 0 : c.breakpoints)
2139
+ }
2140
+ };
2020
2141
  },
2021
2142
  contentState() {
2022
2143
  var t, e;
@@ -2029,25 +2150,6 @@ const yn = (t) => k({ ...t, canTrack: !0 }), Zt = () => Promise.resolve().then((
2029
2150
  ...this.overrideState
2030
2151
  };
2031
2152
  },
2032
- contextContext() {
2033
- return this.context || {};
2034
- },
2035
- allRegisteredComponents() {
2036
- return [
2037
- ...Ut(),
2038
- ...N,
2039
- ...this.customComponents || []
2040
- ].reduce(
2041
- (n, o) => ({
2042
- ...n,
2043
- [o.name]: o
2044
- }),
2045
- {}
2046
- );
2047
- },
2048
- httpReqsData() {
2049
- return {};
2050
- },
2051
2153
  shouldRenderContentStyles() {
2052
2154
  var t, e, n, o, s;
2053
2155
  return Boolean(
@@ -2096,7 +2198,7 @@ const yn = (t) => k({ ...t, canTrack: !0 }), Zt = () => Promise.resolve().then((
2096
2198
  evaluateJsCode() {
2097
2199
  var e, n;
2098
2200
  const t = (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.jsCode;
2099
- t && F({
2201
+ t && j({
2100
2202
  code: t,
2101
2203
  context: this.contextContext,
2102
2204
  state: this.contentState
@@ -2111,14 +2213,17 @@ const yn = (t) => k({ ...t, canTrack: !0 }), Zt = () => Promise.resolve().then((
2111
2213
  canTrack: this.canTrackToUse,
2112
2214
  contentId: s,
2113
2215
  apiKey: this.apiKey,
2114
- variationId: o !== s ? o : void 0
2216
+ variationId: o !== s ? o : void 0,
2217
+ ...ln(t),
2218
+ unique: !this.clicked
2115
2219
  });
2116
2220
  }
2221
+ this.clicked || (this.clicked = !0);
2117
2222
  },
2118
2223
  evalExpression(t) {
2119
2224
  return t.replace(
2120
2225
  /{{([^}]+)}}/g,
2121
- (e, n) => F({
2226
+ (e, n) => j({
2122
2227
  code: n,
2123
2228
  context: this.contextContext,
2124
2229
  state: this.contentState
@@ -2126,7 +2231,7 @@ const yn = (t) => k({ ...t, canTrack: !0 }), Zt = () => Promise.resolve().then((
2126
2231
  );
2127
2232
  },
2128
2233
  handleRequest({ url: t, key: e }) {
2129
- A(t).then((n) => n.json()).then((n) => {
2234
+ U(t).then((n) => n.json()).then((n) => {
2130
2235
  const o = {
2131
2236
  ...this.overrideState,
2132
2237
  [e]: n
@@ -2163,41 +2268,41 @@ const yn = (t) => k({ ...t, canTrack: !0 }), Zt = () => Promise.resolve().then((
2163
2268
  }
2164
2269
  }
2165
2270
  };
2166
- var nn = function() {
2167
- var o, s, r, i, l, a, u;
2271
+ var pn = function() {
2272
+ var o, s, r, i, c, a, d;
2168
2273
  var e = this, n = e._self._c;
2169
- return e.useContent ? n("div", { ref: "elementRef", attrs: { "builder-content-id": (o = e.useContent) == null ? void 0 : o.id, "builder-model": e.model }, on: { click: function(d) {
2170
- return e.onClick(d);
2171
- } } }, [e.shouldRenderContentStyles ? [n("render-content-styles", { attrs: { cssCode: (r = (s = e.useContent) == null ? void 0 : s.data) == null ? void 0 : r.cssCode, customFonts: (l = (i = e.useContent) == null ? void 0 : i.data) == null ? void 0 : l.customFonts } })] : e._e(), n("render-blocks", { key: e.forceReRenderCount, attrs: { blocks: (u = (a = e.useContent) == null ? void 0 : a.data) == null ? void 0 : u.blocks } })], 2) : e._e();
2172
- }, on = [], sn = /* @__PURE__ */ m(
2173
- tn,
2174
- nn,
2175
- on,
2274
+ return e.useContent ? n("div", { ref: "elementRef", attrs: { "builder-content-id": (o = e.useContent) == null ? void 0 : o.id, "builder-model": e.model }, on: { click: function(u) {
2275
+ return e.onClick(u);
2276
+ } } }, [e.shouldRenderContentStyles ? [n("render-content-styles", { attrs: { cssCode: (r = (s = e.useContent) == null ? void 0 : s.data) == null ? void 0 : r.cssCode, customFonts: (c = (i = e.useContent) == null ? void 0 : i.data) == null ? void 0 : c.customFonts } })] : e._e(), n("render-blocks", { key: e.forceReRenderCount, attrs: { blocks: (d = (a = e.useContent) == null ? void 0 : a.data) == null ? void 0 : d.blocks } })], 2) : e._e();
2277
+ }, hn = [], fn = /* @__PURE__ */ p(
2278
+ mn,
2279
+ pn,
2280
+ hn,
2176
2281
  !1,
2177
2282
  null,
2178
2283
  null,
2179
2284
  null,
2180
2285
  null
2181
2286
  );
2182
- const rn = sn.exports, an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2287
+ const gn = fn.exports, bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2183
2288
  __proto__: null,
2184
- default: rn
2185
- }, Symbol.toStringTag, { value: "Module" })), ln = () => import("./block-styles.41c88ebb.js").then((t) => t.default).catch((t) => {
2289
+ default: gn
2290
+ }, Symbol.toStringTag, { value: "Module" })), yn = () => import("./block-styles.d52d65f7.js").then((t) => t.default).catch((t) => {
2186
2291
  throw console.error(
2187
2292
  "Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
2188
2293
  t
2189
2294
  ), t;
2190
- }), cn = () => import("./render-block.55447f79.js").then((t) => t.default).catch((t) => {
2295
+ }), vn = () => import("./render-block.5069cc94.js").then((t) => t.default).catch((t) => {
2191
2296
  throw console.error(
2192
2297
  "Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
2193
2298
  t
2194
2299
  ), t;
2195
- }), un = {
2300
+ }), _n = {
2196
2301
  name: "render-blocks",
2197
- components: { RenderBlock: cn, BlockStyles: ln },
2302
+ components: { RenderBlock: vn, BlockStyles: yn },
2198
2303
  props: ["blocks", "parent", "path", "styleProp"],
2199
2304
  inject: {
2200
- builderContext: "BuilderContext"
2305
+ builderContext: S.key
2201
2306
  },
2202
2307
  computed: {
2203
2308
  className() {
@@ -2243,7 +2348,7 @@ const rn = sn.exports, an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
2243
2348
  }
2244
2349
  }
2245
2350
  };
2246
- var dn = function() {
2351
+ var xn = function() {
2247
2352
  var e = this, n = e._self._c;
2248
2353
  return n("div", { class: e._classStringToObject(e.className + " div-23e8fqt91nf"), style: e.styleProp, attrs: { "builder-path": e.path, "builder-parent-id": e.parent, dataSet: {
2249
2354
  class: e.className
@@ -2256,61 +2361,62 @@ var dn = function() {
2256
2361
  }) : e._e(), e.blocks ? e._l(e.blocks, function(o, s) {
2257
2362
  return n("block-styles", { key: "block-style-" + o.id, attrs: { block: o, context: e.builderContext } });
2258
2363
  }) : e._e()], 2);
2259
- }, pn = [], mn = /* @__PURE__ */ m(
2260
- un,
2261
- dn,
2262
- pn,
2364
+ }, Cn = [], kn = /* @__PURE__ */ p(
2365
+ _n,
2366
+ xn,
2367
+ Cn,
2263
2368
  !1,
2264
2369
  null,
2265
- "713efc9e",
2370
+ "7c56f14d",
2266
2371
  null,
2267
2372
  null
2268
2373
  );
2269
- const hn = mn.exports, D = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2374
+ const wn = kn.exports, G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2270
2375
  __proto__: null,
2271
- default: hn
2272
- }, Symbol.toStringTag, { value: "Module" })), j = {};
2273
- function vn(t) {
2274
- if (p()) {
2275
- Object.assign(j, t);
2376
+ default: wn
2377
+ }, Symbol.toStringTag, { value: "Module" })), B = {};
2378
+ function $n(t) {
2379
+ if (m()) {
2380
+ Object.assign(B, t);
2276
2381
  const e = {
2277
2382
  type: "builder.settingsChange",
2278
- data: j
2383
+ data: B
2279
2384
  };
2280
2385
  parent.postMessage(e, "*");
2281
2386
  }
2282
2387
  }
2283
2388
  export {
2284
- Ye as B,
2285
- se as C,
2286
- at as F,
2287
- de as I,
2288
- He as S,
2389
+ S as B,
2390
+ ae as C,
2391
+ ut as F,
2392
+ he as I,
2393
+ Xe as S,
2289
2394
  v as T,
2290
- xe as V,
2291
- fn as a,
2292
- Y as b,
2293
- gn as c,
2294
- ge as d,
2295
- F as e,
2296
- S as f,
2297
- J as g,
2298
- nt as h,
2299
- hn as i,
2300
- f as j,
2301
- Vt as k,
2302
- N as l,
2303
- bn as m,
2304
- m as n,
2305
- Wt as o,
2306
- H as p,
2307
- W as q,
2308
- rn as r,
2309
- vn as s,
2310
- yn as t,
2311
- Ne as u,
2312
- Pe as v,
2313
- Ue as w,
2314
- Ve as x,
2315
- V as y
2395
+ we as V,
2396
+ Sn as a,
2397
+ ee as b,
2398
+ In as c,
2399
+ ve as d,
2400
+ j as e,
2401
+ w as f,
2402
+ Q as g,
2403
+ tt as h,
2404
+ it as i,
2405
+ wn as j,
2406
+ f as k,
2407
+ Mt as l,
2408
+ z as m,
2409
+ p as n,
2410
+ Rn as o,
2411
+ zt as p,
2412
+ J as q,
2413
+ gn as r,
2414
+ $n as s,
2415
+ Tn as t,
2416
+ M as u,
2417
+ Ke as v,
2418
+ Le as w,
2419
+ Ne as x,
2420
+ Me as y,
2421
+ N as z
2316
2422
  };