@builder.io/sdk-vue 0.3.1 → 0.3.2-0
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.
- package/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.b09f50da.js → block-styles.22c50e60.js} +3 -3
- package/packages/_vue2/dist/{block-styles.ae2c8895.cjs → block-styles.82ffdfab.cjs} +1 -1
- package/packages/{_vue3/dist/css.c52c28f5.js → _vue2/dist/css.d1f35fa9.js} +1 -1
- package/packages/{_vue3/dist/css.eaf664fa.cjs → _vue2/dist/css.d67364ee.cjs} +1 -1
- package/packages/_vue2/dist/{index.36f3710d.js → index.1955e2ac.js} +453 -445
- package/packages/_vue2/dist/index.2eccdb53.cjs +29 -0
- package/packages/_vue2/dist/{render-block.c14ab4be.js → render-block.11a66585.js} +5 -5
- package/packages/_vue2/dist/{render-block.74bc834e.cjs → render-block.742f7d9b.cjs} +2 -2
- package/packages/_vue2/dist/{render-component.2b74ef23.cjs → render-component.8f5204ca.cjs} +1 -1
- package/packages/_vue2/dist/{render-component.d7f78e3d.js → render-component.dc53dbd0.js} +3 -3
- package/packages/_vue2/dist/{render-inlined-styles.c8d80bc4.cjs → render-inlined-styles.1887b766.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.04d09a3c.js → render-inlined-styles.955770d4.js} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.58333f68.cjs → render-repeated-block.1cb6b42e.cjs} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.a8717618.js → render-repeated-block.7b83bd13.js} +2 -2
- package/packages/_vue2/dist/{render-styles.a49c2339.js → render-styles.37cf66d9.js} +2 -2
- package/packages/_vue2/dist/{render-styles.4a1edc25.cjs → render-styles.fe76b092.cjs} +3 -3
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/src/components/render-content/render-content.types.d.ts +2 -0
- package/packages/_vue2/dist/src/components/render-content/wrap-component-ref.d.ts +6 -0
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-content/types.d.ts +6 -0
- package/packages/_vue2/dist/src/scripts/init-editing.d.ts +1 -0
- package/packages/_vue3/dist/{block-styles.a1577ff9.cjs → block-styles.18a1a0e6.cjs} +1 -1
- package/packages/_vue3/dist/{block-styles.ae0db517.js → block-styles.c0e7bfbe.js} +3 -3
- package/packages/{_vue2/dist/css.e6670a83.cjs → _vue3/dist/css.7a6108f3.cjs} +1 -1
- package/packages/{_vue2/dist/css.fb10bcf8.js → _vue3/dist/css.ee7d0ab8.js} +1 -1
- package/packages/_vue3/dist/{index.d8d44f06.js → index.c3536d81.js} +353 -345
- package/packages/_vue3/dist/index.e7a22b43.cjs +29 -0
- package/packages/_vue3/dist/{render-block.8f200c30.cjs → render-block.bcafe494.cjs} +2 -2
- package/packages/_vue3/dist/{render-block.c70eab34.js → render-block.d0ed34b4.js} +5 -5
- package/packages/_vue3/dist/{render-component.9b027ad2.js → render-component.268e7bd8.js} +3 -3
- package/packages/_vue3/dist/{render-component.023d5d67.cjs → render-component.77f33093.cjs} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.0b6cafc4.js → render-inlined-styles.5aa04bb8.js} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.e3ea32fb.cjs → render-inlined-styles.86c0a89d.cjs} +1 -1
- package/packages/_vue3/dist/{render-repeated-block.1743f160.cjs → render-repeated-block.0d46ab69.cjs} +1 -1
- package/packages/_vue3/dist/{render-repeated-block.1b229997.js → render-repeated-block.b1101852.js} +2 -2
- package/packages/_vue3/dist/{render-styles.70e1b259.cjs → render-styles.5073866f.cjs} +2 -2
- package/packages/_vue3/dist/{render-styles.f8cb298d.js → render-styles.7f31b369.js} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/components/render-content/render-content.types.d.ts +2 -0
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +3 -0
- package/packages/_vue3/dist/src/components/render-content/wrap-component-ref.d.ts +6 -0
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-content/types.d.ts +6 -0
- package/packages/_vue3/dist/src/scripts/init-editing.d.ts +1 -0
- package/packages/_vue2/dist/index.ae3f58f8.cjs +0 -29
- package/packages/_vue3/dist/index.8ed3c046.cjs +0 -29
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as f, openBlock as d, createElementBlock as p, mergeProps as x, toHandlers as R, toDisplayString as H, defineAsyncComponent as w, resolveComponent as C, normalizeClass as P, normalizeStyle as E, createBlock as _, createCommentVNode as y, Fragment as j, renderList as W, createVNode as ee, renderSlot as V, createElementVNode as K, markRaw as fe } from "vue";
|
|
2
|
+
const ge = f({
|
|
3
3
|
name: "builder-button",
|
|
4
4
|
props: ["attributes", "text", "link", "openLinkInNewTab"],
|
|
5
5
|
methods: {
|
|
@@ -29,26 +29,26 @@ const fe = h({
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
-
const
|
|
32
|
+
const g = (e, t) => {
|
|
33
33
|
const n = e.__vccOpts || e;
|
|
34
34
|
for (const [o, s] of t)
|
|
35
35
|
n[o] = s;
|
|
36
36
|
return n;
|
|
37
|
-
},
|
|
38
|
-
function
|
|
39
|
-
return e.link ? (d(), p("a",
|
|
37
|
+
}, be = ["href", "target"];
|
|
38
|
+
function ye(e, t, n, o, s, r) {
|
|
39
|
+
return e.link ? (d(), p("a", x({
|
|
40
40
|
key: 0,
|
|
41
41
|
role: "button",
|
|
42
42
|
href: e.link,
|
|
43
43
|
target: e.openLinkInNewTab ? "_blank" : void 0
|
|
44
|
-
}, e.filterAttrs(e.attributes, !1),
|
|
44
|
+
}, e.filterAttrs(e.attributes, !1), R(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17, be)) : (d(), p("button", x({
|
|
45
45
|
key: 1,
|
|
46
46
|
class: e._classStringToObject(
|
|
47
47
|
e.attributes.class + " button-1yj9n7yt24z"
|
|
48
48
|
)
|
|
49
|
-
}, e.filterAttrs(e.attributes, !1),
|
|
49
|
+
}, e.filterAttrs(e.attributes, !1), R(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17));
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const ve = /* @__PURE__ */ g(ge, [["render", ye], ["__scopeId", "data-v-3b72112d"]]), N = (e) => JSON.parse(JSON.stringify(e)), te = {
|
|
52
52
|
small: {
|
|
53
53
|
min: 320,
|
|
54
54
|
default: 321,
|
|
@@ -64,8 +64,8 @@ const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d
|
|
|
64
64
|
default: 991,
|
|
65
65
|
max: 1200
|
|
66
66
|
}
|
|
67
|
-
},
|
|
68
|
-
const n =
|
|
67
|
+
}, Fn = (e, t = te) => `@media (max-width: ${t[e].max}px)`, ke = ({ small: e, medium: t }) => {
|
|
68
|
+
const n = N(te);
|
|
69
69
|
if (!e || !t)
|
|
70
70
|
return n;
|
|
71
71
|
const o = Math.floor(e / 2);
|
|
@@ -86,7 +86,7 @@ const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d
|
|
|
86
86
|
min: r,
|
|
87
87
|
default: r + 1
|
|
88
88
|
}, n;
|
|
89
|
-
},
|
|
89
|
+
}, A = "vue3", Se = Symbol(), O = {
|
|
90
90
|
Builder: {
|
|
91
91
|
content: null,
|
|
92
92
|
context: {},
|
|
@@ -99,22 +99,22 @@ const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d
|
|
|
99
99
|
registeredComponents: {},
|
|
100
100
|
inheritedStyles: {}
|
|
101
101
|
},
|
|
102
|
-
key:
|
|
103
|
-
},
|
|
102
|
+
key: Se
|
|
103
|
+
}, we = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
|
|
104
104
|
throw console.error(
|
|
105
105
|
"Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
|
|
106
106
|
e
|
|
107
107
|
), e;
|
|
108
|
-
}),
|
|
108
|
+
}), Ce = () => import("./render-inlined-styles.5aa04bb8.js").then((e) => e.default).catch((e) => {
|
|
109
109
|
throw console.error(
|
|
110
110
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
|
|
111
111
|
e
|
|
112
112
|
), e;
|
|
113
|
-
}),
|
|
113
|
+
}), Ie = f({
|
|
114
114
|
name: "builder-columns",
|
|
115
115
|
components: {
|
|
116
|
-
RenderInlinedStyles:
|
|
117
|
-
RenderBlocks:
|
|
116
|
+
RenderInlinedStyles: w(Ce),
|
|
117
|
+
RenderBlocks: w(we)
|
|
118
118
|
},
|
|
119
119
|
props: [
|
|
120
120
|
"space",
|
|
@@ -129,11 +129,11 @@ const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d
|
|
|
129
129
|
cols: this.columns || [],
|
|
130
130
|
stackAt: this.stackColumnsAt || "tablet",
|
|
131
131
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
132
|
-
TARGET:
|
|
132
|
+
TARGET: A
|
|
133
133
|
};
|
|
134
134
|
},
|
|
135
135
|
inject: {
|
|
136
|
-
builderContext:
|
|
136
|
+
builderContext: O.key
|
|
137
137
|
},
|
|
138
138
|
computed: {
|
|
139
139
|
columnsCssVars() {
|
|
@@ -219,7 +219,7 @@ const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d
|
|
|
219
219
|
},
|
|
220
220
|
getWidthForBreakpointSize(e) {
|
|
221
221
|
var n, o;
|
|
222
|
-
return
|
|
222
|
+
return ke(
|
|
223
223
|
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
224
224
|
)[e].max;
|
|
225
225
|
},
|
|
@@ -234,27 +234,27 @@ const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
});
|
|
237
|
-
function
|
|
238
|
-
const i =
|
|
237
|
+
function xe(e, t, n, o, s, r) {
|
|
238
|
+
const i = C("render-inlined-styles"), l = C("render-blocks");
|
|
239
239
|
return d(), p("div", {
|
|
240
|
-
class:
|
|
240
|
+
class: P(
|
|
241
241
|
e._classStringToObject(
|
|
242
242
|
`builder-columns ${e.builderBlock.id}-breakpoints div-361b1o6wv2k`
|
|
243
243
|
)
|
|
244
244
|
),
|
|
245
|
-
style:
|
|
245
|
+
style: E(e.columnsCssVars),
|
|
246
246
|
dataSet: {
|
|
247
247
|
"builder-block-name": "builder-columns"
|
|
248
248
|
}
|
|
249
249
|
}, [
|
|
250
|
-
e.TARGET !== "reactNative" ? (d(),
|
|
250
|
+
e.TARGET !== "reactNative" ? (d(), _(i, {
|
|
251
251
|
key: 0,
|
|
252
252
|
styles: e.columnsStyles
|
|
253
|
-
}, null, 8, ["styles"])) :
|
|
254
|
-
(d(!0), p(
|
|
253
|
+
}, null, 8, ["styles"])) : y("", !0),
|
|
254
|
+
(d(!0), p(j, null, W(e.columns, (a, c) => (d(), p("div", {
|
|
255
255
|
key: c,
|
|
256
256
|
class: "builder-column div-361b1o6wv2k-2",
|
|
257
|
-
style:
|
|
257
|
+
style: E(e.columnCssVars(c)),
|
|
258
258
|
dataSet: {
|
|
259
259
|
"builder-block-name": "builder-column"
|
|
260
260
|
}
|
|
@@ -270,24 +270,24 @@ function Ie(e, t, n, o, s, r) {
|
|
|
270
270
|
], 4))), 128))
|
|
271
271
|
], 6);
|
|
272
272
|
}
|
|
273
|
-
const
|
|
273
|
+
const $e = /* @__PURE__ */ g(Ie, [["render", xe], ["__scopeId", "data-v-fae985f2"]]), Te = f({
|
|
274
274
|
name: "builder-fragment-component",
|
|
275
275
|
props: []
|
|
276
276
|
});
|
|
277
|
-
function
|
|
277
|
+
function Re(e, t, n, o, s, r) {
|
|
278
278
|
return d(), p("span", null, [
|
|
279
|
-
|
|
279
|
+
V(e.$slots, "default")
|
|
280
280
|
]);
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const Ee = /* @__PURE__ */ g(Te, [["render", Re]]);
|
|
283
283
|
function z(e) {
|
|
284
284
|
return e.replace(/http(s)?:/, "");
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function _e(e = "", t, n) {
|
|
287
287
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), s = e.indexOf("?") !== -1 ? "&" : "?";
|
|
288
288
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + s + t + "=" + encodeURIComponent(n);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function Ae(e, t) {
|
|
291
291
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
292
292
|
return e;
|
|
293
293
|
if (t === "master")
|
|
@@ -301,18 +301,18 @@ function _e(e, t) {
|
|
|
301
301
|
}
|
|
302
302
|
return null;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function F(e) {
|
|
305
305
|
if (!e)
|
|
306
306
|
return e;
|
|
307
307
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
308
308
|
if (e.match(/builder\.io/)) {
|
|
309
309
|
let n = e;
|
|
310
310
|
const o = Number(e.split("?width=")[1]);
|
|
311
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${
|
|
311
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${_e(e, "width", s)} ${s}w`).concat([n]).join(", ");
|
|
312
312
|
}
|
|
313
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
313
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Ae(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
314
314
|
}
|
|
315
|
-
const
|
|
315
|
+
const je = f({
|
|
316
316
|
name: "builder-image",
|
|
317
317
|
props: [
|
|
318
318
|
"image",
|
|
@@ -336,10 +336,10 @@ const Ae = h({
|
|
|
336
336
|
return this.srcset;
|
|
337
337
|
if (this.srcset && ((n = this.image) == null ? void 0 : n.includes("builder.io/api/v1/image"))) {
|
|
338
338
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
339
|
-
return console.debug("Removed given srcset"),
|
|
339
|
+
return console.debug("Removed given srcset"), F(t);
|
|
340
340
|
} else if (this.image && !this.srcset)
|
|
341
|
-
return
|
|
342
|
-
return
|
|
341
|
+
return F(t);
|
|
342
|
+
return F(t);
|
|
343
343
|
},
|
|
344
344
|
webpSrcSet() {
|
|
345
345
|
var e;
|
|
@@ -368,29 +368,29 @@ const Ae = h({
|
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
|
-
const
|
|
371
|
+
const Ve = ["srcset"], Pe = ["alt", "role", "src", "srcset", "sizes"], Oe = {
|
|
372
372
|
key: 2,
|
|
373
373
|
class: "div-7jvpanrlkn-2"
|
|
374
374
|
};
|
|
375
|
-
function
|
|
375
|
+
function Be(e, t, n, o, s, r) {
|
|
376
376
|
var i, l, a, c;
|
|
377
|
-
return d(), p(
|
|
377
|
+
return d(), p(j, null, [
|
|
378
378
|
K("picture", null, [
|
|
379
379
|
e.webpSrcSet ? (d(), p("source", {
|
|
380
380
|
key: 0,
|
|
381
381
|
type: "image/webp",
|
|
382
382
|
srcset: e.webpSrcSet
|
|
383
|
-
}, null, 8,
|
|
383
|
+
}, null, 8, Ve)) : y("", !0),
|
|
384
384
|
K("img", {
|
|
385
385
|
loading: "lazy",
|
|
386
386
|
alt: e.altText,
|
|
387
387
|
role: e.altText ? "presentation" : void 0,
|
|
388
|
-
style:
|
|
388
|
+
style: E({
|
|
389
389
|
objectPosition: e.backgroundPosition || "center",
|
|
390
390
|
objectFit: e.backgroundSize || "cover",
|
|
391
391
|
...e.aspectRatioCss
|
|
392
392
|
}),
|
|
393
|
-
class:
|
|
393
|
+
class: P(
|
|
394
394
|
e._classStringToObject(
|
|
395
395
|
"builder-image" + (e.className ? " " + e.className : "") + " img-7jvpanrlkn"
|
|
396
396
|
)
|
|
@@ -398,50 +398,50 @@ function Oe(e, t, n, o, s, r) {
|
|
|
398
398
|
src: e.image,
|
|
399
399
|
srcset: e.srcSetToUse,
|
|
400
400
|
sizes: e.sizes
|
|
401
|
-
}, null, 14,
|
|
401
|
+
}, null, 14, Pe)
|
|
402
402
|
]),
|
|
403
403
|
e.aspectRatio && !(((l = (i = e.builderBlock) == null ? void 0 : i.children) == null ? void 0 : l.length) && e.fitContent) ? (d(), p("div", {
|
|
404
404
|
key: 0,
|
|
405
405
|
class: "builder-image-sizer div-7jvpanrlkn",
|
|
406
|
-
style:
|
|
406
|
+
style: E({
|
|
407
407
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
408
408
|
})
|
|
409
|
-
}, null, 4)) :
|
|
410
|
-
((c = (a = e.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length) && e.fitContent ?
|
|
411
|
-
!e.fitContent && e.children ? (d(), p("div",
|
|
412
|
-
|
|
413
|
-
])) :
|
|
409
|
+
}, null, 4)) : y("", !0),
|
|
410
|
+
((c = (a = e.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length) && e.fitContent ? V(e.$slots, "default", { key: 1 }, void 0, !0) : y("", !0),
|
|
411
|
+
!e.fitContent && e.children ? (d(), p("div", Oe, [
|
|
412
|
+
V(e.$slots, "default", {}, void 0, !0)
|
|
413
|
+
])) : y("", !0)
|
|
414
414
|
], 64);
|
|
415
415
|
}
|
|
416
|
-
const
|
|
417
|
-
function
|
|
416
|
+
const Fe = /* @__PURE__ */ g(je, [["render", Be], ["__scopeId", "data-v-034e3c7d"]]);
|
|
417
|
+
function h() {
|
|
418
418
|
return typeof window < "u" && typeof document < "u";
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
return
|
|
420
|
+
function Ue() {
|
|
421
|
+
return h() && window.self !== window.top;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
return
|
|
423
|
+
function v() {
|
|
424
|
+
return Ue() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
425
425
|
}
|
|
426
|
-
const
|
|
426
|
+
const We = () => import("./block-styles.c0e7bfbe.js").then((e) => e.default).catch((e) => {
|
|
427
427
|
throw console.error(
|
|
428
428
|
"Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
|
|
429
429
|
e
|
|
430
430
|
), e;
|
|
431
|
-
}),
|
|
431
|
+
}), Me = () => import("./render-block.d0ed34b4.js").then((e) => e.default).catch((e) => {
|
|
432
432
|
throw console.error(
|
|
433
433
|
"Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
|
|
434
434
|
e
|
|
435
435
|
), e;
|
|
436
|
-
}),
|
|
436
|
+
}), Le = f({
|
|
437
437
|
name: "render-blocks",
|
|
438
438
|
components: {
|
|
439
|
-
RenderBlock:
|
|
440
|
-
BlockStyles:
|
|
439
|
+
RenderBlock: w(Me),
|
|
440
|
+
BlockStyles: w(We)
|
|
441
441
|
},
|
|
442
442
|
props: ["blocks", "parent", "path", "styleProp"],
|
|
443
443
|
inject: {
|
|
444
|
-
builderContext:
|
|
444
|
+
builderContext: O.key
|
|
445
445
|
},
|
|
446
446
|
computed: {
|
|
447
447
|
className() {
|
|
@@ -452,7 +452,7 @@ const Ue = () => import("./block-styles.ae0db517.js").then((e) => e.default).cat
|
|
|
452
452
|
methods: {
|
|
453
453
|
onClick() {
|
|
454
454
|
var e, t;
|
|
455
|
-
|
|
455
|
+
v() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
456
456
|
{
|
|
457
457
|
type: "builder.clickEmptyBlocks",
|
|
458
458
|
data: {
|
|
@@ -465,7 +465,7 @@ const Ue = () => import("./block-styles.ae0db517.js").then((e) => e.default).cat
|
|
|
465
465
|
},
|
|
466
466
|
onMouseEnter() {
|
|
467
467
|
var e, t;
|
|
468
|
-
|
|
468
|
+
v() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
469
469
|
{
|
|
470
470
|
type: "builder.hoverEmptyBlocks",
|
|
471
471
|
data: {
|
|
@@ -487,36 +487,36 @@ const Ue = () => import("./block-styles.ae0db517.js").then((e) => e.default).cat
|
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
});
|
|
490
|
-
const
|
|
491
|
-
function
|
|
492
|
-
const i =
|
|
490
|
+
const Ne = ["builder-path", "builder-parent-id", "dataSet"];
|
|
491
|
+
function He(e, t, n, o, s, r) {
|
|
492
|
+
const i = C("render-block"), l = C("block-styles");
|
|
493
493
|
return d(), p("div", {
|
|
494
|
-
class:
|
|
494
|
+
class: P(e._classStringToObject(e.className + " div-7fq9d0i380")),
|
|
495
495
|
"builder-path": e.path,
|
|
496
496
|
"builder-parent-id": e.parent,
|
|
497
497
|
dataSet: {
|
|
498
498
|
class: e.className
|
|
499
499
|
},
|
|
500
|
-
style:
|
|
500
|
+
style: E(e.styleProp),
|
|
501
501
|
onClick: t[0] || (t[0] = (a) => e.onClick()),
|
|
502
502
|
onMouseenter: t[1] || (t[1] = (a) => e.onMouseEnter())
|
|
503
503
|
}, [
|
|
504
|
-
e.blocks ? (d(!0), p(
|
|
504
|
+
e.blocks ? (d(!0), p(j, { key: 0 }, W(e.blocks, (a, c) => (d(), _(i, {
|
|
505
505
|
key: "render-block-" + a.id,
|
|
506
506
|
block: a,
|
|
507
507
|
context: e.builderContext
|
|
508
|
-
}, null, 8, ["block", "context"]))), 128)) :
|
|
509
|
-
e.blocks ? (d(!0), p(
|
|
508
|
+
}, null, 8, ["block", "context"]))), 128)) : y("", !0),
|
|
509
|
+
e.blocks ? (d(!0), p(j, { key: 1 }, W(e.blocks, (a, c) => (d(), _(l, {
|
|
510
510
|
key: "block-style-" + a.id,
|
|
511
511
|
block: a,
|
|
512
512
|
context: e.builderContext
|
|
513
|
-
}, null, 8, ["block", "context"]))), 128)) :
|
|
514
|
-
], 46,
|
|
513
|
+
}, null, 8, ["block", "context"]))), 128)) : y("", !0)
|
|
514
|
+
], 46, Ne);
|
|
515
515
|
}
|
|
516
|
-
const
|
|
516
|
+
const Ke = /* @__PURE__ */ g(Le, [["render", He], ["__scopeId", "data-v-ff3cb99b"]]), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
517
517
|
__proto__: null,
|
|
518
|
-
default:
|
|
519
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
518
|
+
default: Ke
|
|
519
|
+
}, Symbol.toStringTag, { value: "Module" })), ze = {
|
|
520
520
|
name: "Core:Button",
|
|
521
521
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
522
522
|
defaultStyles: {
|
|
@@ -552,10 +552,10 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
|
|
|
552
552
|
],
|
|
553
553
|
static: !0,
|
|
554
554
|
noWrap: !0
|
|
555
|
-
},
|
|
555
|
+
}, B = (e) => {
|
|
556
556
|
const t = e.toString().trim();
|
|
557
557
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
558
|
-
},
|
|
558
|
+
}, De = {
|
|
559
559
|
name: "Columns",
|
|
560
560
|
inputs: [
|
|
561
561
|
{
|
|
@@ -742,7 +742,7 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
|
|
|
742
742
|
]
|
|
743
743
|
}
|
|
744
744
|
],
|
|
745
|
-
onChange:
|
|
745
|
+
onChange: B((e) => {
|
|
746
746
|
function t() {
|
|
747
747
|
n.forEach((o) => {
|
|
748
748
|
o.delete("width");
|
|
@@ -779,13 +779,13 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
|
|
|
779
779
|
advanced: !0
|
|
780
780
|
}
|
|
781
781
|
]
|
|
782
|
-
},
|
|
782
|
+
}, qe = {
|
|
783
783
|
name: "Fragment",
|
|
784
784
|
static: !0,
|
|
785
785
|
hidden: !0,
|
|
786
786
|
canHaveChildren: !0,
|
|
787
787
|
noWrap: !0
|
|
788
|
-
},
|
|
788
|
+
}, Ge = {
|
|
789
789
|
name: "Image",
|
|
790
790
|
static: !0,
|
|
791
791
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -804,19 +804,19 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
|
|
|
804
804
|
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
805
805
|
required: !0,
|
|
806
806
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
807
|
-
onChange:
|
|
807
|
+
onChange: B(
|
|
808
808
|
(e) => {
|
|
809
809
|
e.delete("srcset"), e.delete("noWebp");
|
|
810
810
|
function n(i, l = 6e4) {
|
|
811
811
|
return new Promise((a, c) => {
|
|
812
812
|
const u = document.createElement("img");
|
|
813
|
-
let
|
|
813
|
+
let m = !1;
|
|
814
814
|
u.onload = () => {
|
|
815
|
-
|
|
816
|
-
}, u.addEventListener("error", (
|
|
817
|
-
console.warn("Image load failed",
|
|
815
|
+
m = !0, a(u);
|
|
816
|
+
}, u.addEventListener("error", (b) => {
|
|
817
|
+
console.warn("Image load failed", b.error), c(b.error);
|
|
818
818
|
}), u.src = i, setTimeout(() => {
|
|
819
|
-
|
|
819
|
+
m || c(new Error("Image load timed out"));
|
|
820
820
|
}, l);
|
|
821
821
|
});
|
|
822
822
|
}
|
|
@@ -912,7 +912,7 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
|
|
|
912
912
|
defaultValue: 0.7041
|
|
913
913
|
}
|
|
914
914
|
]
|
|
915
|
-
},
|
|
915
|
+
}, Je = {
|
|
916
916
|
name: "Core:Section",
|
|
917
917
|
static: !0,
|
|
918
918
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -956,7 +956,7 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
|
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
]
|
|
959
|
-
},
|
|
959
|
+
}, Xe = f({
|
|
960
960
|
name: "builder-section-component",
|
|
961
961
|
props: ["maxWidth", "attributes"],
|
|
962
962
|
methods: {
|
|
@@ -977,8 +977,8 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
|
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
979
|
});
|
|
980
|
-
function
|
|
981
|
-
return d(), p("section",
|
|
980
|
+
function Ye(e, t, n, o, s, r) {
|
|
981
|
+
return d(), p("section", x({
|
|
982
982
|
style: {
|
|
983
983
|
width: "100%",
|
|
984
984
|
alignSelf: "stretch",
|
|
@@ -991,11 +991,11 @@ function Xe(e, t, n, o, s, r) {
|
|
|
991
991
|
marginLeft: "auto",
|
|
992
992
|
marginRight: "auto"
|
|
993
993
|
}
|
|
994
|
-
}, e.filterAttrs(e.attributes, !1),
|
|
995
|
-
|
|
994
|
+
}, e.filterAttrs(e.attributes, !1), R(e.filterAttrs(e.attributes, !0), !0)), [
|
|
995
|
+
V(e.$slots, "default")
|
|
996
996
|
], 16);
|
|
997
997
|
}
|
|
998
|
-
const
|
|
998
|
+
const Qe = /* @__PURE__ */ g(Xe, [["render", Ye]]), Ze = {
|
|
999
999
|
name: "Symbol",
|
|
1000
1000
|
noWrap: !0,
|
|
1001
1001
|
static: !0,
|
|
@@ -1033,16 +1033,16 @@ const Ye = /* @__PURE__ */ f(Je, [["render", Xe]]), Qe = {
|
|
|
1033
1033
|
type: "boolean"
|
|
1034
1034
|
}
|
|
1035
1035
|
]
|
|
1036
|
-
},
|
|
1037
|
-
log: (...e) => console.log(
|
|
1038
|
-
error: (...e) => console.error(
|
|
1039
|
-
warn: (...e) => console.warn(
|
|
1036
|
+
}, U = "[Builder.io]: ", I = {
|
|
1037
|
+
log: (...e) => console.log(U, ...e),
|
|
1038
|
+
error: (...e) => console.error(U, ...e),
|
|
1039
|
+
warn: (...e) => console.warn(U, ...e)
|
|
1040
1040
|
};
|
|
1041
|
-
function
|
|
1041
|
+
function et() {
|
|
1042
1042
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1045
|
-
const e =
|
|
1044
|
+
function tt() {
|
|
1045
|
+
const e = et().fetch;
|
|
1046
1046
|
if (typeof e > "u")
|
|
1047
1047
|
throw console.warn(
|
|
1048
1048
|
`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
@@ -1050,7 +1050,7 @@ function et() {
|
|
|
1050
1050
|
), new Error("Builder SDK could not find a global `fetch` function");
|
|
1051
1051
|
return e;
|
|
1052
1052
|
}
|
|
1053
|
-
const oe =
|
|
1053
|
+
const oe = tt(), $ = (e) => e != null, nt = (e) => {
|
|
1054
1054
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1055
1055
|
return e;
|
|
1056
1056
|
const t = e.split(".");
|
|
@@ -1066,22 +1066,22 @@ const oe = et(), x = (e) => e != null, tt = (e) => {
|
|
|
1066
1066
|
console.debug("[COOKIE] GET error: ", o);
|
|
1067
1067
|
return;
|
|
1068
1068
|
}
|
|
1069
|
-
},
|
|
1069
|
+
}, ot = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter($).join("; "), st = [
|
|
1070
1070
|
["secure", ""],
|
|
1071
1071
|
["SameSite", "None"]
|
|
1072
|
-
],
|
|
1072
|
+
], rt = ({
|
|
1073
1073
|
name: e,
|
|
1074
1074
|
value: t,
|
|
1075
1075
|
expires: n
|
|
1076
1076
|
}) => {
|
|
1077
|
-
const s = (
|
|
1077
|
+
const s = (h() ? location.protocol === "https:" : !0) ? st : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [
|
|
1078
1078
|
[e, t],
|
|
1079
1079
|
...r,
|
|
1080
1080
|
["path", "/"],
|
|
1081
|
-
["domain",
|
|
1081
|
+
["domain", nt(window.location.hostname)],
|
|
1082
1082
|
...s
|
|
1083
1083
|
];
|
|
1084
|
-
return
|
|
1084
|
+
return ot(i);
|
|
1085
1085
|
}, re = async ({
|
|
1086
1086
|
name: e,
|
|
1087
1087
|
value: t,
|
|
@@ -1091,19 +1091,19 @@ const oe = et(), x = (e) => e != null, tt = (e) => {
|
|
|
1091
1091
|
try {
|
|
1092
1092
|
if (!o)
|
|
1093
1093
|
return;
|
|
1094
|
-
const s =
|
|
1094
|
+
const s = rt({ name: e, value: t, expires: n });
|
|
1095
1095
|
document.cookie = s;
|
|
1096
1096
|
} catch (s) {
|
|
1097
1097
|
console.warn("[COOKIE] SET error: ", s);
|
|
1098
1098
|
}
|
|
1099
|
-
},
|
|
1099
|
+
}, it = "builderio.variations", ie = (e) => `${it}.${e}`, at = ({
|
|
1100
1100
|
contentId: e,
|
|
1101
1101
|
canTrack: t
|
|
1102
|
-
}) => se({ name: ie(e), canTrack: t }),
|
|
1102
|
+
}) => se({ name: ie(e), canTrack: t }), lt = ({
|
|
1103
1103
|
contentId: e,
|
|
1104
1104
|
canTrack: t,
|
|
1105
1105
|
value: n
|
|
1106
|
-
}) => re({ name: ie(e), value: n, canTrack: t }),
|
|
1106
|
+
}) => re({ name: ie(e), value: n, canTrack: t }), ct = (e) => $(e.id) && $(e.variations) && Object.keys(e.variations).length > 0, dt = ({
|
|
1107
1107
|
id: e,
|
|
1108
1108
|
variations: t
|
|
1109
1109
|
}) => {
|
|
@@ -1129,22 +1129,22 @@ const oe = et(), x = (e) => e != null, tt = (e) => {
|
|
|
1129
1129
|
testVariationId: n.id,
|
|
1130
1130
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
1131
1131
|
};
|
|
1132
|
-
},
|
|
1132
|
+
}, ut = async ({
|
|
1133
1133
|
item: e,
|
|
1134
1134
|
canTrack: t
|
|
1135
1135
|
}) => {
|
|
1136
|
-
const n = await
|
|
1136
|
+
const n = await at({
|
|
1137
1137
|
canTrack: t,
|
|
1138
1138
|
contentId: e.id
|
|
1139
1139
|
}), o = n ? D({ item: e, testGroupId: n }) : void 0;
|
|
1140
1140
|
if (o)
|
|
1141
1141
|
return o;
|
|
1142
1142
|
{
|
|
1143
|
-
const s =
|
|
1143
|
+
const s = dt({
|
|
1144
1144
|
variations: e.variations,
|
|
1145
1145
|
id: e.id
|
|
1146
1146
|
});
|
|
1147
|
-
return
|
|
1147
|
+
return lt({
|
|
1148
1148
|
contentId: e.id,
|
|
1149
1149
|
value: s,
|
|
1150
1150
|
canTrack: t
|
|
@@ -1152,46 +1152,46 @@ const oe = et(), x = (e) => e != null, tt = (e) => {
|
|
|
1152
1152
|
console.error("could not store A/B test variation: ", r);
|
|
1153
1153
|
}), D({ item: e, testGroupId: s });
|
|
1154
1154
|
}
|
|
1155
|
-
},
|
|
1155
|
+
}, pt = async ({
|
|
1156
1156
|
item: e,
|
|
1157
1157
|
canTrack: t
|
|
1158
1158
|
}) => {
|
|
1159
|
-
if (!
|
|
1159
|
+
if (!ct(e))
|
|
1160
1160
|
return;
|
|
1161
|
-
const n = await
|
|
1161
|
+
const n = await ut({ item: e, canTrack: t });
|
|
1162
1162
|
Object.assign(e, n);
|
|
1163
1163
|
};
|
|
1164
|
-
function
|
|
1164
|
+
function M(e, t = null, n = ".") {
|
|
1165
1165
|
return Object.keys(e).reduce((o, s) => {
|
|
1166
1166
|
const r = e[s], i = [t, s].filter(Boolean).join(n);
|
|
1167
1167
|
return [
|
|
1168
1168
|
typeof r == "object",
|
|
1169
1169
|
r !== null,
|
|
1170
1170
|
!(Array.isArray(r) && r.length === 0)
|
|
1171
|
-
].every(Boolean) ? { ...o, ...
|
|
1171
|
+
].every(Boolean) ? { ...o, ...M(r, i, n) } : { ...o, [i]: r };
|
|
1172
1172
|
}, {});
|
|
1173
1173
|
}
|
|
1174
|
-
const q = "builder.",
|
|
1174
|
+
const q = "builder.", mt = "options.", ht = (e) => {
|
|
1175
1175
|
const t = {};
|
|
1176
1176
|
return e.forEach((n, o) => {
|
|
1177
1177
|
t[o] = n;
|
|
1178
1178
|
}), t;
|
|
1179
|
-
},
|
|
1179
|
+
}, ft = (e) => {
|
|
1180
1180
|
if (!e)
|
|
1181
1181
|
return {};
|
|
1182
1182
|
const t = ae(e), n = {};
|
|
1183
1183
|
return Object.keys(t).forEach((o) => {
|
|
1184
1184
|
if (o.startsWith(q)) {
|
|
1185
|
-
const s = o.replace(q, "").replace(
|
|
1185
|
+
const s = o.replace(q, "").replace(mt, "");
|
|
1186
1186
|
n[s] = t[o];
|
|
1187
1187
|
}
|
|
1188
1188
|
}), n;
|
|
1189
|
-
},
|
|
1190
|
-
if (!
|
|
1189
|
+
}, gt = () => {
|
|
1190
|
+
if (!h())
|
|
1191
1191
|
return {};
|
|
1192
1192
|
const e = new URLSearchParams(window.location.search);
|
|
1193
|
-
return
|
|
1194
|
-
}, ae = (e) => e instanceof URLSearchParams ?
|
|
1193
|
+
return ft(e);
|
|
1194
|
+
}, ae = (e) => e instanceof URLSearchParams ? ht(e) : e, bt = "v3", yt = (e) => {
|
|
1195
1195
|
const {
|
|
1196
1196
|
limit: t = 30,
|
|
1197
1197
|
userAttributes: n,
|
|
@@ -1200,60 +1200,61 @@ const q = "builder.", pt = "options.", mt = (e) => {
|
|
|
1200
1200
|
model: r,
|
|
1201
1201
|
apiKey: i,
|
|
1202
1202
|
includeRefs: l = !0,
|
|
1203
|
-
|
|
1204
|
-
|
|
1203
|
+
enrich: a,
|
|
1204
|
+
locale: c,
|
|
1205
|
+
apiVersion: u = bt
|
|
1205
1206
|
} = e;
|
|
1206
1207
|
if (!i)
|
|
1207
1208
|
throw new Error("Missing API key");
|
|
1208
|
-
if (!["v2", "v3"].includes(
|
|
1209
|
+
if (!["v2", "v3"].includes(u))
|
|
1209
1210
|
throw new Error(
|
|
1210
|
-
`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
1211
|
+
`Invalid apiVersion: expected 'v2' or 'v3', received '${u}'`
|
|
1211
1212
|
);
|
|
1212
|
-
const
|
|
1213
|
-
`https://cdn.builder.io/api/${
|
|
1213
|
+
const m = new URL(
|
|
1214
|
+
`https://cdn.builder.io/api/${u}/content/${r}?apiKey=${i}&limit=${t}&noTraverse=${s}&includeRefs=${l}${c ? `&locale=${c}` : ""}${a ? `&enrich=${a}` : ""}`
|
|
1214
1215
|
), b = {
|
|
1215
|
-
...
|
|
1216
|
+
...gt(),
|
|
1216
1217
|
...ae(e.options || {})
|
|
1217
|
-
},
|
|
1218
|
-
for (const
|
|
1219
|
-
|
|
1220
|
-
if (n &&
|
|
1221
|
-
const
|
|
1222
|
-
for (const
|
|
1223
|
-
|
|
1218
|
+
}, k = M(b);
|
|
1219
|
+
for (const S in k)
|
|
1220
|
+
m.searchParams.set(S, String(k[S]));
|
|
1221
|
+
if (n && m.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
1222
|
+
const S = M({ query: o });
|
|
1223
|
+
for (const T in S)
|
|
1224
|
+
m.searchParams.set(T, JSON.stringify(S[T]));
|
|
1224
1225
|
}
|
|
1225
|
-
return
|
|
1226
|
+
return m;
|
|
1226
1227
|
};
|
|
1227
1228
|
async function le(e) {
|
|
1228
|
-
const t = await
|
|
1229
|
+
const t = await vt({ ...e, limit: 1 });
|
|
1229
1230
|
return t && "results" in t && (t == null ? void 0 : t.results[0]) || null;
|
|
1230
1231
|
}
|
|
1231
|
-
async function
|
|
1232
|
+
async function vt(e) {
|
|
1232
1233
|
try {
|
|
1233
|
-
const t =
|
|
1234
|
+
const t = yt(e), o = await (await oe(t.href)).json();
|
|
1234
1235
|
if ("status" in o && !("results" in o))
|
|
1235
|
-
return
|
|
1236
|
+
return I.error("Error fetching data. ", { url: t, content: o, options: e }), o;
|
|
1236
1237
|
const s = e.canTrack !== !1;
|
|
1237
1238
|
try {
|
|
1238
1239
|
if (s && Array.isArray(o.results))
|
|
1239
1240
|
for (const r of o.results)
|
|
1240
|
-
await
|
|
1241
|
+
await pt({ item: r, canTrack: s });
|
|
1241
1242
|
} catch (r) {
|
|
1242
|
-
|
|
1243
|
+
I.error("Could not setup A/B testing. ", r);
|
|
1243
1244
|
}
|
|
1244
1245
|
return o;
|
|
1245
1246
|
} catch (t) {
|
|
1246
|
-
return
|
|
1247
|
+
return I.error("Error fetching data. ", t), null;
|
|
1247
1248
|
}
|
|
1248
1249
|
}
|
|
1249
|
-
const
|
|
1250
|
+
const kt = () => Promise.resolve().then(() => On).then((e) => e.default).catch((e) => {
|
|
1250
1251
|
throw console.error(
|
|
1251
1252
|
"Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
|
|
1252
1253
|
e
|
|
1253
1254
|
), e;
|
|
1254
|
-
}),
|
|
1255
|
+
}), St = f({
|
|
1255
1256
|
name: "builder-symbol",
|
|
1256
|
-
components: { RenderContent:
|
|
1257
|
+
components: { RenderContent: w(kt) },
|
|
1257
1258
|
props: ["attributes", "symbol", "dynamic"],
|
|
1258
1259
|
data() {
|
|
1259
1260
|
var e, t, n;
|
|
@@ -1268,7 +1269,7 @@ const vt = () => Promise.resolve().then(() => Vn).then((e) => e.default).catch((
|
|
|
1268
1269
|
};
|
|
1269
1270
|
},
|
|
1270
1271
|
inject: {
|
|
1271
|
-
builderContext:
|
|
1272
|
+
builderContext: O.key
|
|
1272
1273
|
},
|
|
1273
1274
|
mounted() {
|
|
1274
1275
|
this.fetchContent();
|
|
@@ -1301,7 +1302,7 @@ const vt = () => Promise.resolve().then(() => Vn).then((e) => e.default).catch((
|
|
|
1301
1302
|
}).then((n) => {
|
|
1302
1303
|
n && (this.contentToUse = n);
|
|
1303
1304
|
}).catch((n) => {
|
|
1304
|
-
|
|
1305
|
+
I.error("Could not fetch symbol content: ", n);
|
|
1305
1306
|
});
|
|
1306
1307
|
},
|
|
1307
1308
|
filterAttrs: function(t = {}, n) {
|
|
@@ -1329,16 +1330,16 @@ const vt = () => Promise.resolve().then(() => Vn).then((e) => e.default).catch((
|
|
|
1329
1330
|
return t;
|
|
1330
1331
|
}
|
|
1331
1332
|
}
|
|
1332
|
-
}),
|
|
1333
|
-
function
|
|
1333
|
+
}), wt = ["dataSet"];
|
|
1334
|
+
function Ct(e, t, n, o, s, r) {
|
|
1334
1335
|
var l, a, c, u;
|
|
1335
|
-
const i =
|
|
1336
|
-
return d(), p("div",
|
|
1336
|
+
const i = C("render-content");
|
|
1337
|
+
return d(), p("div", x({
|
|
1337
1338
|
dataSet: {
|
|
1338
1339
|
class: e.className
|
|
1339
1340
|
},
|
|
1340
1341
|
class: e._classStringToObject(e.className)
|
|
1341
|
-
}, e.filterAttrs(e.attributes, !1),
|
|
1342
|
+
}, e.filterAttrs(e.attributes, !1), R(e.filterAttrs(e.attributes, !0), !0)), [
|
|
1342
1343
|
ee(i, {
|
|
1343
1344
|
apiVersion: e.builderContext.apiVersion,
|
|
1344
1345
|
apiKey: e.builderContext.apiKey,
|
|
@@ -1352,9 +1353,9 @@ function wt(e, t, n, o, s, r) {
|
|
|
1352
1353
|
model: (u = e.symbol) == null ? void 0 : u.model,
|
|
1353
1354
|
content: e.contentToUse
|
|
1354
1355
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content"])
|
|
1355
|
-
], 16,
|
|
1356
|
+
], 16, wt);
|
|
1356
1357
|
}
|
|
1357
|
-
const
|
|
1358
|
+
const It = /* @__PURE__ */ g(St, [["render", Ct]]), xt = {
|
|
1358
1359
|
name: "Text",
|
|
1359
1360
|
static: !0,
|
|
1360
1361
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
|
|
@@ -1373,20 +1374,20 @@ const Ct = /* @__PURE__ */ f(kt, [["render", wt]]), It = {
|
|
|
1373
1374
|
height: "auto",
|
|
1374
1375
|
textAlign: "center"
|
|
1375
1376
|
}
|
|
1376
|
-
},
|
|
1377
|
+
}, $t = f({
|
|
1377
1378
|
name: "builder-text",
|
|
1378
1379
|
props: ["text"]
|
|
1379
|
-
}),
|
|
1380
|
-
function
|
|
1380
|
+
}), Tt = ["innerHTML"];
|
|
1381
|
+
function Rt(e, t, n, o, s, r) {
|
|
1381
1382
|
return d(), p("span", {
|
|
1382
1383
|
class: "builder-text",
|
|
1383
1384
|
innerHTML: e.text,
|
|
1384
1385
|
style: {
|
|
1385
1386
|
outline: "none"
|
|
1386
1387
|
}
|
|
1387
|
-
}, null, 8,
|
|
1388
|
+
}, null, 8, Tt);
|
|
1388
1389
|
}
|
|
1389
|
-
const
|
|
1390
|
+
const Et = /* @__PURE__ */ g($t, [["render", Rt]]), _t = {
|
|
1390
1391
|
name: "Video",
|
|
1391
1392
|
canHaveChildren: !0,
|
|
1392
1393
|
defaultStyles: {
|
|
@@ -1487,7 +1488,7 @@ const Rt = /* @__PURE__ */ f(xt, [["render", Tt]]), Et = {
|
|
|
1487
1488
|
advanced: !0
|
|
1488
1489
|
}
|
|
1489
1490
|
]
|
|
1490
|
-
},
|
|
1491
|
+
}, At = f({
|
|
1491
1492
|
name: "builder-video",
|
|
1492
1493
|
props: [
|
|
1493
1494
|
"autoPlay",
|
|
@@ -1528,10 +1529,10 @@ const Rt = /* @__PURE__ */ f(xt, [["render", Tt]]), Et = {
|
|
|
1528
1529
|
};
|
|
1529
1530
|
}
|
|
1530
1531
|
}
|
|
1531
|
-
}),
|
|
1532
|
-
function
|
|
1532
|
+
}), jt = ["src", "poster"];
|
|
1533
|
+
function Vt(e, t, n, o, s, r) {
|
|
1533
1534
|
var i;
|
|
1534
|
-
return d(), p("video",
|
|
1535
|
+
return d(), p("video", x({
|
|
1535
1536
|
style: {
|
|
1536
1537
|
width: "100%",
|
|
1537
1538
|
height: "100%",
|
|
@@ -1542,9 +1543,9 @@ function jt(e, t, n, o, s, r) {
|
|
|
1542
1543
|
},
|
|
1543
1544
|
src: e.video || "no-src",
|
|
1544
1545
|
poster: e.posterImage
|
|
1545
|
-
}, e.spreadProps), null, 16,
|
|
1546
|
+
}, e.spreadProps), null, 16, jt);
|
|
1546
1547
|
}
|
|
1547
|
-
const
|
|
1548
|
+
const Pt = /* @__PURE__ */ g(At, [["render", Vt]]), Ot = {
|
|
1548
1549
|
name: "Embed",
|
|
1549
1550
|
static: !0,
|
|
1550
1551
|
inputs: [
|
|
@@ -1554,7 +1555,7 @@ const Vt = /* @__PURE__ */ f(_t, [["render", jt]]), Pt = {
|
|
|
1554
1555
|
required: !0,
|
|
1555
1556
|
defaultValue: "",
|
|
1556
1557
|
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1557
|
-
onChange:
|
|
1558
|
+
onChange: B(
|
|
1558
1559
|
(e) => {
|
|
1559
1560
|
const t = e.get("url");
|
|
1560
1561
|
if (t)
|
|
@@ -1579,11 +1580,11 @@ const Vt = /* @__PURE__ */ f(_t, [["render", jt]]), Pt = {
|
|
|
1579
1580
|
hideFromUI: !0
|
|
1580
1581
|
}
|
|
1581
1582
|
]
|
|
1582
|
-
},
|
|
1583
|
+
}, Bt = [
|
|
1583
1584
|
"text/javascript",
|
|
1584
1585
|
"application/javascript",
|
|
1585
1586
|
"application/ecmascript"
|
|
1586
|
-
],
|
|
1587
|
+
], Ft = (e) => Bt.includes(e.type), Ut = f({
|
|
1587
1588
|
name: "builder-embed",
|
|
1588
1589
|
props: ["content"],
|
|
1589
1590
|
data() {
|
|
@@ -1616,7 +1617,7 @@ const Vt = /* @__PURE__ */ f(_t, [["render", jt]]), Pt = {
|
|
|
1616
1617
|
this.scriptsInserted.push(n.src);
|
|
1617
1618
|
const o = document.createElement("script");
|
|
1618
1619
|
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
1619
|
-
} else if (
|
|
1620
|
+
} else if (Ft(n) && !this.scriptsRun.includes(n.innerText))
|
|
1620
1621
|
try {
|
|
1621
1622
|
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
1622
1623
|
} catch (o) {
|
|
@@ -1625,15 +1626,15 @@ const Vt = /* @__PURE__ */ f(_t, [["render", jt]]), Pt = {
|
|
|
1625
1626
|
}
|
|
1626
1627
|
}
|
|
1627
1628
|
}
|
|
1628
|
-
}),
|
|
1629
|
-
function
|
|
1629
|
+
}), Wt = ["innerHTML"];
|
|
1630
|
+
function Mt(e, t, n, o, s, r) {
|
|
1630
1631
|
return d(), p("div", {
|
|
1631
1632
|
class: "builder-embed",
|
|
1632
1633
|
ref: "elem",
|
|
1633
1634
|
innerHTML: e.content
|
|
1634
|
-
}, null, 8,
|
|
1635
|
+
}, null, 8, Wt);
|
|
1635
1636
|
}
|
|
1636
|
-
const
|
|
1637
|
+
const Lt = /* @__PURE__ */ g(Ut, [["render", Mt]]), Nt = f({
|
|
1637
1638
|
name: "builder-img-component",
|
|
1638
1639
|
props: [
|
|
1639
1640
|
"backgroundSize",
|
|
@@ -1644,7 +1645,7 @@ const Mt = /* @__PURE__ */ f(Ft, [["render", Wt]]), Lt = h({
|
|
|
1644
1645
|
"attributes"
|
|
1645
1646
|
],
|
|
1646
1647
|
data() {
|
|
1647
|
-
return { isEditing:
|
|
1648
|
+
return { isEditing: v };
|
|
1648
1649
|
},
|
|
1649
1650
|
methods: {
|
|
1650
1651
|
filterAttrs: function(t = {}, n) {
|
|
@@ -1663,9 +1664,9 @@ const Mt = /* @__PURE__ */ f(Ft, [["render", Wt]]), Lt = h({
|
|
|
1663
1664
|
);
|
|
1664
1665
|
}
|
|
1665
1666
|
}
|
|
1666
|
-
}),
|
|
1667
|
-
function
|
|
1668
|
-
return d(), p("img",
|
|
1667
|
+
}), Ht = ["alt", "src"];
|
|
1668
|
+
function Kt(e, t, n, o, s, r) {
|
|
1669
|
+
return d(), p("img", x({
|
|
1669
1670
|
style: {
|
|
1670
1671
|
objectFit: e.backgroundSize || "cover",
|
|
1671
1672
|
objectPosition: e.backgroundPosition || "center"
|
|
@@ -1673,9 +1674,9 @@ function Ht(e, t, n, o, s, r) {
|
|
|
1673
1674
|
key: e.isEditing() && e.imgSrc || "default-key",
|
|
1674
1675
|
alt: e.altText,
|
|
1675
1676
|
src: e.imgSrc || e.image
|
|
1676
|
-
}, e.filterAttrs(e.attributes, !1),
|
|
1677
|
+
}, e.filterAttrs(e.attributes, !1), R(e.filterAttrs(e.attributes, !0), !0)), null, 16, Ht);
|
|
1677
1678
|
}
|
|
1678
|
-
const
|
|
1679
|
+
const zt = /* @__PURE__ */ g(Nt, [["render", Kt]]), Dt = {
|
|
1679
1680
|
name: "Raw:Img",
|
|
1680
1681
|
hideFromInsertMenu: !0,
|
|
1681
1682
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -1690,7 +1691,7 @@ const Kt = /* @__PURE__ */ f(Lt, [["render", Ht]]), zt = {
|
|
|
1690
1691
|
],
|
|
1691
1692
|
noWrap: !0,
|
|
1692
1693
|
static: !0
|
|
1693
|
-
},
|
|
1694
|
+
}, qt = f({
|
|
1694
1695
|
name: "builder-custom-code",
|
|
1695
1696
|
props: ["replaceNodes", "code"],
|
|
1696
1697
|
data() {
|
|
@@ -1737,19 +1738,19 @@ const Kt = /* @__PURE__ */ f(Lt, [["render", Ht]]), zt = {
|
|
|
1737
1738
|
return t;
|
|
1738
1739
|
}
|
|
1739
1740
|
}
|
|
1740
|
-
}),
|
|
1741
|
-
function
|
|
1741
|
+
}), Gt = ["innerHTML"];
|
|
1742
|
+
function Jt(e, t, n, o, s, r) {
|
|
1742
1743
|
return d(), p("div", {
|
|
1743
1744
|
ref: "elem",
|
|
1744
|
-
class:
|
|
1745
|
+
class: P(
|
|
1745
1746
|
e._classStringToObject(
|
|
1746
1747
|
"builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
|
|
1747
1748
|
)
|
|
1748
1749
|
),
|
|
1749
1750
|
innerHTML: e.code
|
|
1750
|
-
}, null, 10,
|
|
1751
|
+
}, null, 10, Gt);
|
|
1751
1752
|
}
|
|
1752
|
-
const
|
|
1753
|
+
const Xt = /* @__PURE__ */ g(qt, [["render", Jt]]), Yt = {
|
|
1753
1754
|
name: "Custom Code",
|
|
1754
1755
|
static: !0,
|
|
1755
1756
|
requiredPermissions: ["editCode"],
|
|
@@ -1775,18 +1776,18 @@ const Jt = /* @__PURE__ */ f(Dt, [["render", Gt]]), Xt = {
|
|
|
1775
1776
|
advanced: !0
|
|
1776
1777
|
}
|
|
1777
1778
|
]
|
|
1778
|
-
},
|
|
1779
|
-
{ component:
|
|
1780
|
-
{ component:
|
|
1781
|
-
{ component:
|
|
1782
|
-
{ component:
|
|
1783
|
-
{ component:
|
|
1784
|
-
{ component:
|
|
1785
|
-
{ component:
|
|
1786
|
-
{ component:
|
|
1787
|
-
{ component:
|
|
1788
|
-
{ component:
|
|
1789
|
-
{ component:
|
|
1779
|
+
}, Qt = () => [
|
|
1780
|
+
{ component: ve, ...ze },
|
|
1781
|
+
{ component: $e, ...De },
|
|
1782
|
+
{ component: Xt, ...Yt },
|
|
1783
|
+
{ component: Lt, ...Ot },
|
|
1784
|
+
{ component: Ee, ...qe },
|
|
1785
|
+
{ component: Fe, ...Ge },
|
|
1786
|
+
{ component: zt, ...Dt },
|
|
1787
|
+
{ component: Qe, ...Je },
|
|
1788
|
+
{ component: It, ...Ze },
|
|
1789
|
+
{ component: Et, ...xt },
|
|
1790
|
+
{ component: Pt, ..._t }
|
|
1790
1791
|
];
|
|
1791
1792
|
function G({
|
|
1792
1793
|
code: e,
|
|
@@ -1802,9 +1803,9 @@ function G({
|
|
|
1802
1803
|
return;
|
|
1803
1804
|
}
|
|
1804
1805
|
const l = {
|
|
1805
|
-
isEditing:
|
|
1806
|
-
isBrowser:
|
|
1807
|
-
isServer: !
|
|
1806
|
+
isEditing: v(),
|
|
1807
|
+
isBrowser: h(),
|
|
1808
|
+
isServer: !h()
|
|
1808
1809
|
}, c = i && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
|
|
1809
1810
|
try {
|
|
1810
1811
|
return new Function(
|
|
@@ -1817,7 +1818,7 @@ function G({
|
|
|
1817
1818
|
)(
|
|
1818
1819
|
l,
|
|
1819
1820
|
l,
|
|
1820
|
-
|
|
1821
|
+
Zt(o, n, s),
|
|
1821
1822
|
t,
|
|
1822
1823
|
r
|
|
1823
1824
|
);
|
|
@@ -1833,7 +1834,7 @@ function G({
|
|
|
1833
1834
|
);
|
|
1834
1835
|
}
|
|
1835
1836
|
}
|
|
1836
|
-
function
|
|
1837
|
+
function Zt(e, t, n) {
|
|
1837
1838
|
if (e === t)
|
|
1838
1839
|
throw new Error("rootState === localState");
|
|
1839
1840
|
return new Proxy(e, {
|
|
@@ -1847,46 +1848,46 @@ function Qt(e, t, n) {
|
|
|
1847
1848
|
}
|
|
1848
1849
|
});
|
|
1849
1850
|
}
|
|
1850
|
-
function
|
|
1851
|
-
return !
|
|
1851
|
+
function en() {
|
|
1852
|
+
return !h() || v() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1852
1853
|
}
|
|
1853
1854
|
const ce = [];
|
|
1854
|
-
function
|
|
1855
|
+
function Un(e, t) {
|
|
1855
1856
|
return ce.push({ component: e, ...t }), console.warn(
|
|
1856
1857
|
"registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
|
|
1857
1858
|
), e;
|
|
1858
1859
|
}
|
|
1859
|
-
const
|
|
1860
|
+
const tn = ({
|
|
1860
1861
|
component: e,
|
|
1861
1862
|
...t
|
|
1862
1863
|
}) => ({
|
|
1863
1864
|
type: "builder.registerComponent",
|
|
1864
|
-
data:
|
|
1865
|
-
}),
|
|
1865
|
+
data: on(t)
|
|
1866
|
+
}), nn = (e) => typeof e == "function" ? B(e) : N(e), on = ({
|
|
1866
1867
|
inputs: e,
|
|
1867
1868
|
...t
|
|
1868
1869
|
}) => ({
|
|
1869
|
-
...
|
|
1870
|
+
...N(t),
|
|
1870
1871
|
inputs: e == null ? void 0 : e.map(
|
|
1871
1872
|
(n) => Object.entries(n).reduce(
|
|
1872
1873
|
(o, [s, r]) => ({
|
|
1873
1874
|
...o,
|
|
1874
|
-
[s]:
|
|
1875
|
+
[s]: nn(r)
|
|
1875
1876
|
}),
|
|
1876
1877
|
{}
|
|
1877
1878
|
)
|
|
1878
1879
|
)
|
|
1879
1880
|
});
|
|
1880
|
-
function
|
|
1881
|
+
function sn() {
|
|
1881
1882
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1882
1883
|
const t = Math.random() * 16 | 0;
|
|
1883
1884
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1884
1885
|
});
|
|
1885
1886
|
}
|
|
1886
1887
|
function de() {
|
|
1887
|
-
return
|
|
1888
|
+
return sn().replace(/-/g, "");
|
|
1888
1889
|
}
|
|
1889
|
-
const ue = "builderSessionId",
|
|
1890
|
+
const ue = "builderSessionId", rn = async ({
|
|
1890
1891
|
canTrack: e
|
|
1891
1892
|
}) => {
|
|
1892
1893
|
if (!e)
|
|
@@ -1895,16 +1896,16 @@ const ue = "builderSessionId", sn = async ({
|
|
|
1895
1896
|
name: ue,
|
|
1896
1897
|
canTrack: e
|
|
1897
1898
|
});
|
|
1898
|
-
if (
|
|
1899
|
+
if ($(t))
|
|
1899
1900
|
return t;
|
|
1900
1901
|
{
|
|
1901
|
-
const n =
|
|
1902
|
-
return
|
|
1902
|
+
const n = an();
|
|
1903
|
+
return ln({ id: n, canTrack: e }), n;
|
|
1903
1904
|
}
|
|
1904
|
-
},
|
|
1905
|
+
}, an = () => de(), ln = ({
|
|
1905
1906
|
id: e,
|
|
1906
1907
|
canTrack: t
|
|
1907
|
-
}) => re({ name: ue, value: e, canTrack: t }), pe = () =>
|
|
1908
|
+
}) => re({ name: ue, value: e, canTrack: t }), pe = () => h() && typeof localStorage < "u" ? localStorage : void 0, cn = ({
|
|
1908
1909
|
key: e,
|
|
1909
1910
|
canTrack: t
|
|
1910
1911
|
}) => {
|
|
@@ -1915,7 +1916,7 @@ const ue = "builderSessionId", sn = async ({
|
|
|
1915
1916
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1916
1917
|
return;
|
|
1917
1918
|
}
|
|
1918
|
-
},
|
|
1919
|
+
}, dn = ({
|
|
1919
1920
|
key: e,
|
|
1920
1921
|
canTrack: t,
|
|
1921
1922
|
value: n
|
|
@@ -1926,34 +1927,34 @@ const ue = "builderSessionId", sn = async ({
|
|
|
1926
1927
|
} catch (s) {
|
|
1927
1928
|
console.debug("[LocalStorage] SET error: ", s);
|
|
1928
1929
|
}
|
|
1929
|
-
}, me = "builderVisitorId",
|
|
1930
|
+
}, me = "builderVisitorId", un = ({ canTrack: e }) => {
|
|
1930
1931
|
if (!e)
|
|
1931
1932
|
return;
|
|
1932
|
-
const t =
|
|
1933
|
+
const t = cn({
|
|
1933
1934
|
key: me,
|
|
1934
1935
|
canTrack: e
|
|
1935
1936
|
});
|
|
1936
|
-
if (
|
|
1937
|
+
if ($(t))
|
|
1937
1938
|
return t;
|
|
1938
1939
|
{
|
|
1939
|
-
const n =
|
|
1940
|
-
return
|
|
1940
|
+
const n = pn();
|
|
1941
|
+
return mn({ id: n, canTrack: e }), n;
|
|
1941
1942
|
}
|
|
1942
|
-
},
|
|
1943
|
+
}, pn = () => de(), mn = ({
|
|
1943
1944
|
id: e,
|
|
1944
1945
|
canTrack: t
|
|
1945
|
-
}) =>
|
|
1946
|
+
}) => dn({
|
|
1946
1947
|
key: me,
|
|
1947
1948
|
value: e,
|
|
1948
1949
|
canTrack: t
|
|
1949
|
-
}),
|
|
1950
|
-
if (
|
|
1950
|
+
}), hn = () => {
|
|
1951
|
+
if (h()) {
|
|
1951
1952
|
const e = new URL(location.href);
|
|
1952
1953
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
1953
1954
|
} else
|
|
1954
1955
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
1955
|
-
},
|
|
1956
|
-
const e =
|
|
1956
|
+
}, fn = () => typeof navigator == "object" && navigator.userAgent || "", gn = () => {
|
|
1957
|
+
const e = fn(), t = {
|
|
1957
1958
|
Android() {
|
|
1958
1959
|
return e.match(/Android/i);
|
|
1959
1960
|
},
|
|
@@ -1970,25 +1971,25 @@ const ue = "builderSessionId", sn = async ({
|
|
|
1970
1971
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
1971
1972
|
},
|
|
1972
1973
|
any() {
|
|
1973
|
-
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() ||
|
|
1974
|
+
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || A === "reactNative";
|
|
1974
1975
|
}
|
|
1975
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
1976
|
+
}, n = e.match(/Tablet|iPad/i), o = hn();
|
|
1976
1977
|
return {
|
|
1977
1978
|
urlPath: o == null ? void 0 : o.pathname,
|
|
1978
1979
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
1979
1980
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
1980
1981
|
};
|
|
1981
|
-
},
|
|
1982
|
+
}, bn = async ({
|
|
1982
1983
|
canTrack: e
|
|
1983
1984
|
}) => {
|
|
1984
1985
|
if (!e)
|
|
1985
1986
|
return { visitorId: void 0, sessionId: void 0 };
|
|
1986
|
-
const t = await
|
|
1987
|
+
const t = await rn({ canTrack: e }), n = un({ canTrack: e });
|
|
1987
1988
|
return {
|
|
1988
1989
|
sessionId: t,
|
|
1989
1990
|
visitorId: n
|
|
1990
1991
|
};
|
|
1991
|
-
},
|
|
1992
|
+
}, yn = async ({
|
|
1992
1993
|
type: e,
|
|
1993
1994
|
canTrack: t,
|
|
1994
1995
|
apiKey: n,
|
|
@@ -2002,23 +2003,23 @@ const ue = "builderSessionId", sn = async ({
|
|
|
2002
2003
|
url: location.href,
|
|
2003
2004
|
...o
|
|
2004
2005
|
},
|
|
2005
|
-
...await
|
|
2006
|
-
userAttributes:
|
|
2006
|
+
...await bn({ canTrack: t }),
|
|
2007
|
+
userAttributes: gn(),
|
|
2007
2008
|
ownerId: n
|
|
2008
2009
|
}
|
|
2009
2010
|
});
|
|
2010
|
-
async function
|
|
2011
|
+
async function L(e) {
|
|
2011
2012
|
if (!e.apiKey) {
|
|
2012
|
-
|
|
2013
|
+
I.error(
|
|
2013
2014
|
"Missing API key for track call. Please provide your API key."
|
|
2014
2015
|
);
|
|
2015
2016
|
return;
|
|
2016
2017
|
}
|
|
2017
|
-
if (!!e.canTrack && !
|
|
2018
|
+
if (!!e.canTrack && !v() && !!(h() || A === "reactNative"))
|
|
2018
2019
|
return fetch("https://builder.io/api/v1/track", {
|
|
2019
2020
|
method: "POST",
|
|
2020
2021
|
body: JSON.stringify({
|
|
2021
|
-
events: [await
|
|
2022
|
+
events: [await yn(e)]
|
|
2022
2023
|
}),
|
|
2023
2024
|
headers: {
|
|
2024
2025
|
"content-type": "application/json"
|
|
@@ -2028,10 +2029,10 @@ async function M(e) {
|
|
|
2028
2029
|
console.error("Failed to track: ", t);
|
|
2029
2030
|
});
|
|
2030
2031
|
}
|
|
2031
|
-
const
|
|
2032
|
-
function
|
|
2032
|
+
const Wn = (e) => L({ ...e, canTrack: !0 }), vn = "0.3.2-0", J = {};
|
|
2033
|
+
function kn(e, t) {
|
|
2033
2034
|
let n = J[e];
|
|
2034
|
-
if (n || (n = J[e] = []), n.push(t),
|
|
2035
|
+
if (n || (n = J[e] = []), n.push(t), h()) {
|
|
2035
2036
|
const o = {
|
|
2036
2037
|
type: "builder.register",
|
|
2037
2038
|
data: {
|
|
@@ -2046,8 +2047,8 @@ function vn(e, t) {
|
|
|
2046
2047
|
}
|
|
2047
2048
|
}
|
|
2048
2049
|
}
|
|
2049
|
-
const
|
|
2050
|
-
|
|
2050
|
+
const Sn = () => {
|
|
2051
|
+
kn("insertMenu", {
|
|
2051
2052
|
name: "_default",
|
|
2052
2053
|
default: !0,
|
|
2053
2054
|
items: [
|
|
@@ -2063,14 +2064,14 @@ const kn = () => {
|
|
|
2063
2064
|
});
|
|
2064
2065
|
};
|
|
2065
2066
|
let X = !1;
|
|
2066
|
-
const
|
|
2067
|
+
const wn = (e = {}) => {
|
|
2067
2068
|
var t, n;
|
|
2068
|
-
X || (X = !0,
|
|
2069
|
+
X || (X = !0, h() && ((t = window.parent) == null || t.postMessage(
|
|
2069
2070
|
{
|
|
2070
2071
|
type: "builder.sdkInfo",
|
|
2071
2072
|
data: {
|
|
2072
|
-
target:
|
|
2073
|
-
version:
|
|
2073
|
+
target: A,
|
|
2074
|
+
version: vn,
|
|
2074
2075
|
supportsPatchUpdates: !1,
|
|
2075
2076
|
supportsAddBlockScoping: !0,
|
|
2076
2077
|
supportsCustomBreakpoints: !0
|
|
@@ -2091,24 +2092,24 @@ const Sn = (e = {}) => {
|
|
|
2091
2092
|
switch (o.type) {
|
|
2092
2093
|
case "builder.evaluate": {
|
|
2093
2094
|
const i = o.data.text, l = o.data.arguments || [], a = o.data.id, c = new Function(i);
|
|
2094
|
-
let u,
|
|
2095
|
+
let u, m = null;
|
|
2095
2096
|
try {
|
|
2096
2097
|
u = c.apply(null, l);
|
|
2097
|
-
} catch (
|
|
2098
|
-
|
|
2098
|
+
} catch (b) {
|
|
2099
|
+
m = b;
|
|
2099
2100
|
}
|
|
2100
|
-
|
|
2101
|
+
m ? (s = window.parent) == null || s.postMessage(
|
|
2101
2102
|
{
|
|
2102
2103
|
type: "builder.evaluateError",
|
|
2103
|
-
data: { id: a, error:
|
|
2104
|
+
data: { id: a, error: m.message }
|
|
2104
2105
|
},
|
|
2105
2106
|
"*"
|
|
2106
|
-
) : u && typeof u.then == "function" ? u.then((
|
|
2107
|
-
var
|
|
2108
|
-
(
|
|
2107
|
+
) : u && typeof u.then == "function" ? u.then((b) => {
|
|
2108
|
+
var k;
|
|
2109
|
+
(k = window.parent) == null || k.postMessage(
|
|
2109
2110
|
{
|
|
2110
2111
|
type: "builder.evaluateResult",
|
|
2111
|
-
data: { id: a, result:
|
|
2112
|
+
data: { id: a, result: b }
|
|
2112
2113
|
},
|
|
2113
2114
|
"*"
|
|
2114
2115
|
);
|
|
@@ -2127,7 +2128,7 @@ const Sn = (e = {}) => {
|
|
|
2127
2128
|
function Y(e) {
|
|
2128
2129
|
return Math.round(e * 1e3) / 1e3;
|
|
2129
2130
|
}
|
|
2130
|
-
const
|
|
2131
|
+
const Cn = (e, t, n = !0) => {
|
|
2131
2132
|
if (!(e instanceof HTMLElement))
|
|
2132
2133
|
return null;
|
|
2133
2134
|
let o = n ? e : e.parentElement;
|
|
@@ -2138,7 +2139,7 @@ const wn = (e, t, n = !0) => {
|
|
|
2138
2139
|
return o;
|
|
2139
2140
|
} while (o = o.parentElement);
|
|
2140
2141
|
return null;
|
|
2141
|
-
},
|
|
2142
|
+
}, In = (e) => Cn(e, (t) => {
|
|
2142
2143
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2143
2144
|
return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
|
|
2144
2145
|
}), Q = ({
|
|
@@ -2150,8 +2151,8 @@ const wn = (e, t, n = !0) => {
|
|
|
2150
2151
|
x: r,
|
|
2151
2152
|
y: i
|
|
2152
2153
|
};
|
|
2153
|
-
},
|
|
2154
|
-
const t = e.target, n = t &&
|
|
2154
|
+
}, xn = (e) => {
|
|
2155
|
+
const t = e.target, n = t && In(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2155
2156
|
return {
|
|
2156
2157
|
targetBuilderElement: o || void 0,
|
|
2157
2158
|
metadata: {
|
|
@@ -2160,7 +2161,7 @@ const wn = (e, t, n = !0) => {
|
|
|
2160
2161
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2161
2162
|
}
|
|
2162
2163
|
};
|
|
2163
|
-
},
|
|
2164
|
+
}, $n = ({
|
|
2164
2165
|
content: e,
|
|
2165
2166
|
data: t,
|
|
2166
2167
|
locale: n
|
|
@@ -2177,7 +2178,7 @@ const wn = (e, t, n = !0) => {
|
|
|
2177
2178
|
...n ? { locale: n } : {}
|
|
2178
2179
|
};
|
|
2179
2180
|
return { ...o, ...s };
|
|
2180
|
-
},
|
|
2181
|
+
}, Tn = ({
|
|
2181
2182
|
content: e,
|
|
2182
2183
|
data: t
|
|
2183
2184
|
}) => e ? {
|
|
@@ -2187,21 +2188,21 @@ const wn = (e, t, n = !0) => {
|
|
|
2187
2188
|
...t
|
|
2188
2189
|
},
|
|
2189
2190
|
meta: e == null ? void 0 : e.meta
|
|
2190
|
-
} : void 0,
|
|
2191
|
+
} : void 0, Rn = fe, En = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
|
|
2191
2192
|
throw console.error(
|
|
2192
2193
|
"Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
|
|
2193
2194
|
e
|
|
2194
2195
|
), e;
|
|
2195
|
-
}),
|
|
2196
|
+
}), _n = () => import("./render-styles.7f31b369.js").then((e) => e.default).catch((e) => {
|
|
2196
2197
|
throw console.error(
|
|
2197
2198
|
"Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
|
|
2198
2199
|
e
|
|
2199
2200
|
), e;
|
|
2200
|
-
}),
|
|
2201
|
+
}), An = f({
|
|
2201
2202
|
name: "render-content",
|
|
2202
2203
|
components: {
|
|
2203
|
-
RenderContentStyles:
|
|
2204
|
-
RenderBlocks:
|
|
2204
|
+
RenderContentStyles: w(_n),
|
|
2205
|
+
RenderBlocks: w(En)
|
|
2205
2206
|
},
|
|
2206
2207
|
props: [
|
|
2207
2208
|
"content",
|
|
@@ -2213,43 +2214,47 @@ const wn = (e, t, n = !0) => {
|
|
|
2213
2214
|
"context",
|
|
2214
2215
|
"apiKey",
|
|
2215
2216
|
"includeRefs",
|
|
2217
|
+
"enrich",
|
|
2216
2218
|
"apiVersion"
|
|
2217
2219
|
],
|
|
2218
2220
|
data() {
|
|
2219
2221
|
return {
|
|
2220
2222
|
forceReRenderCount: 0,
|
|
2221
2223
|
overrideContent: null,
|
|
2222
|
-
useContent:
|
|
2224
|
+
useContent: Tn({
|
|
2223
2225
|
content: this.content,
|
|
2224
2226
|
data: this.data
|
|
2225
2227
|
}),
|
|
2226
2228
|
update: 0,
|
|
2227
|
-
canTrackToUse:
|
|
2228
|
-
contentState:
|
|
2229
|
+
canTrackToUse: $(this.canTrack) ? this.canTrack : !0,
|
|
2230
|
+
contentState: $n({
|
|
2229
2231
|
content: this.content,
|
|
2230
2232
|
data: this.data,
|
|
2231
2233
|
locale: this.locale
|
|
2232
2234
|
}),
|
|
2233
2235
|
allRegisteredComponents: [
|
|
2234
|
-
...
|
|
2236
|
+
...Qt(),
|
|
2235
2237
|
...ce,
|
|
2236
2238
|
...this.customComponents || []
|
|
2237
2239
|
].reduce(
|
|
2238
|
-
(e, t) => ({
|
|
2240
|
+
(e, { component: t, ...n }) => ({
|
|
2239
2241
|
...e,
|
|
2240
|
-
[
|
|
2242
|
+
[n.name]: {
|
|
2243
|
+
component: Rn(t),
|
|
2244
|
+
...n
|
|
2245
|
+
}
|
|
2241
2246
|
}),
|
|
2242
2247
|
{}
|
|
2243
2248
|
),
|
|
2244
2249
|
httpReqsData: {},
|
|
2245
2250
|
clicked: !1,
|
|
2246
|
-
TARGET:
|
|
2251
|
+
TARGET: A
|
|
2247
2252
|
};
|
|
2248
2253
|
},
|
|
2249
2254
|
provide() {
|
|
2250
2255
|
const e = this;
|
|
2251
2256
|
return {
|
|
2252
|
-
[
|
|
2257
|
+
[O.key]: {
|
|
2253
2258
|
content: e.useContent,
|
|
2254
2259
|
localState: void 0,
|
|
2255
2260
|
rootState: e.contentState,
|
|
@@ -2264,28 +2269,31 @@ const wn = (e, t, n = !0) => {
|
|
|
2264
2269
|
},
|
|
2265
2270
|
mounted() {
|
|
2266
2271
|
var e, t;
|
|
2267
|
-
if (this.apiKey ||
|
|
2272
|
+
if (this.apiKey || I.error(
|
|
2268
2273
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2269
|
-
),
|
|
2270
|
-
if (
|
|
2274
|
+
), h()) {
|
|
2275
|
+
if (v() && (this.forceReRenderCount = this.forceReRenderCount + 1, Sn(), wn({
|
|
2271
2276
|
...this.locale ? {
|
|
2272
2277
|
locale: this.locale
|
|
2273
2278
|
} : {},
|
|
2274
2279
|
...this.includeRefs ? {
|
|
2275
2280
|
includeRefs: this.includeRefs
|
|
2281
|
+
} : {},
|
|
2282
|
+
...this.enrich ? {
|
|
2283
|
+
enrich: this.enrich
|
|
2276
2284
|
} : {}
|
|
2277
2285
|
}), Object.values(
|
|
2278
2286
|
this.allRegisteredComponents
|
|
2279
2287
|
).forEach((n) => {
|
|
2280
2288
|
var s;
|
|
2281
|
-
const o =
|
|
2289
|
+
const o = tn(n);
|
|
2282
2290
|
(s = window.parent) == null || s.postMessage(o, "*");
|
|
2283
2291
|
}), window.addEventListener("message", this.processMessage), window.addEventListener(
|
|
2284
2292
|
"builder:component:stateChangeListenerActivated",
|
|
2285
2293
|
this.emitStateUpdate
|
|
2286
2294
|
)), this.useContent) {
|
|
2287
2295
|
const n = (e = this.useContent) == null ? void 0 : e.testVariationId, o = (t = this.useContent) == null ? void 0 : t.id;
|
|
2288
|
-
|
|
2296
|
+
L({
|
|
2289
2297
|
type: "impression",
|
|
2290
2298
|
canTrack: this.canTrackToUse,
|
|
2291
2299
|
contentId: o,
|
|
@@ -2293,7 +2301,7 @@ const wn = (e, t, n = !0) => {
|
|
|
2293
2301
|
variationId: n !== o ? n : void 0
|
|
2294
2302
|
});
|
|
2295
2303
|
}
|
|
2296
|
-
if (
|
|
2304
|
+
if (en()) {
|
|
2297
2305
|
const n = new URL(location.href).searchParams, o = n.get("builder.preview"), s = n.get(
|
|
2298
2306
|
`builder.preview.${o}`
|
|
2299
2307
|
), r = n.get("apiKey") || n.get("builder.space");
|
|
@@ -2335,7 +2343,7 @@ const wn = (e, t, n = !0) => {
|
|
|
2335
2343
|
}
|
|
2336
2344
|
},
|
|
2337
2345
|
unmounted() {
|
|
2338
|
-
|
|
2346
|
+
h() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
|
|
2339
2347
|
"builder:component:stateChangeListenerActivated",
|
|
2340
2348
|
this.emitStateUpdate
|
|
2341
2349
|
));
|
|
@@ -2429,13 +2437,13 @@ const wn = (e, t, n = !0) => {
|
|
|
2429
2437
|
var t, n;
|
|
2430
2438
|
if (this.useContent) {
|
|
2431
2439
|
const o = (t = this.useContent) == null ? void 0 : t.testVariationId, s = (n = this.useContent) == null ? void 0 : n.id;
|
|
2432
|
-
|
|
2440
|
+
L({
|
|
2433
2441
|
type: "click",
|
|
2434
2442
|
canTrack: this.canTrackToUse,
|
|
2435
2443
|
contentId: s,
|
|
2436
2444
|
apiKey: this.apiKey,
|
|
2437
2445
|
variationId: o !== s ? o : void 0,
|
|
2438
|
-
...
|
|
2446
|
+
...xn(e),
|
|
2439
2447
|
unique: !this.clicked
|
|
2440
2448
|
});
|
|
2441
2449
|
}
|
|
@@ -2468,7 +2476,7 @@ const wn = (e, t, n = !0) => {
|
|
|
2468
2476
|
var t, n, o;
|
|
2469
2477
|
const e = (o = (n = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) != null ? o : {};
|
|
2470
2478
|
Object.entries(e).forEach(([s, r]) => {
|
|
2471
|
-
if (r && (!this.httpReqsData[s] ||
|
|
2479
|
+
if (r && (!this.httpReqsData[s] || v())) {
|
|
2472
2480
|
const i = this.evalExpression(r);
|
|
2473
2481
|
this.handleRequest({
|
|
2474
2482
|
url: i,
|
|
@@ -2478,7 +2486,7 @@ const wn = (e, t, n = !0) => {
|
|
|
2478
2486
|
});
|
|
2479
2487
|
},
|
|
2480
2488
|
emitStateUpdate() {
|
|
2481
|
-
|
|
2489
|
+
v() && window.dispatchEvent(
|
|
2482
2490
|
new CustomEvent(
|
|
2483
2491
|
"builder:component:stateChange",
|
|
2484
2492
|
{
|
|
@@ -2493,10 +2501,10 @@ const wn = (e, t, n = !0) => {
|
|
|
2493
2501
|
);
|
|
2494
2502
|
}
|
|
2495
2503
|
}
|
|
2496
|
-
}),
|
|
2497
|
-
function
|
|
2498
|
-
var a, c, u, b,
|
|
2499
|
-
const i =
|
|
2504
|
+
}), jn = ["builder-content-id", "builder-model"];
|
|
2505
|
+
function Vn(e, t, n, o, s, r) {
|
|
2506
|
+
var a, c, u, m, b, k, S, T;
|
|
2507
|
+
const i = C("render-content-styles"), l = C("render-blocks");
|
|
2500
2508
|
return e.useContent ? (d(), p("div", {
|
|
2501
2509
|
key: 0,
|
|
2502
2510
|
ref: "elementRef",
|
|
@@ -2504,24 +2512,24 @@ function An(e, t, n, o, s, r) {
|
|
|
2504
2512
|
"builder-content-id": (a = e.useContent) == null ? void 0 : a.id,
|
|
2505
2513
|
"builder-model": e.model
|
|
2506
2514
|
}, [
|
|
2507
|
-
e.TARGET !== "reactNative" ? (d(),
|
|
2515
|
+
e.TARGET !== "reactNative" ? (d(), _(i, {
|
|
2508
2516
|
key: 0,
|
|
2509
2517
|
contentId: (c = e.useContent) == null ? void 0 : c.id,
|
|
2510
|
-
cssCode: (
|
|
2511
|
-
customFonts: (
|
|
2512
|
-
}, null, 8, ["contentId", "cssCode", "customFonts"])) :
|
|
2513
|
-
(d(),
|
|
2514
|
-
blocks: (
|
|
2518
|
+
cssCode: (m = (u = e.useContent) == null ? void 0 : u.data) == null ? void 0 : m.cssCode,
|
|
2519
|
+
customFonts: (k = (b = e.useContent) == null ? void 0 : b.data) == null ? void 0 : k.customFonts
|
|
2520
|
+
}, null, 8, ["contentId", "cssCode", "customFonts"])) : y("", !0),
|
|
2521
|
+
(d(), _(l, {
|
|
2522
|
+
blocks: (T = (S = e.useContent) == null ? void 0 : S.data) == null ? void 0 : T.blocks,
|
|
2515
2523
|
key: e.forceReRenderCount
|
|
2516
2524
|
}, null, 8, ["blocks"]))
|
|
2517
|
-
], 8,
|
|
2525
|
+
], 8, jn)) : y("", !0);
|
|
2518
2526
|
}
|
|
2519
|
-
const
|
|
2527
|
+
const Pn = /* @__PURE__ */ g(An, [["render", Vn]]), On = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2520
2528
|
__proto__: null,
|
|
2521
|
-
default:
|
|
2529
|
+
default: Pn
|
|
2522
2530
|
}, Symbol.toStringTag, { value: "Module" })), Z = {};
|
|
2523
|
-
function
|
|
2524
|
-
if (
|
|
2531
|
+
function Mn(e) {
|
|
2532
|
+
if (h()) {
|
|
2525
2533
|
Object.assign(Z, e);
|
|
2526
2534
|
const t = {
|
|
2527
2535
|
type: "builder.settingsChange",
|
|
@@ -2531,36 +2539,36 @@ function Un(e) {
|
|
|
2531
2539
|
}
|
|
2532
2540
|
}
|
|
2533
2541
|
export {
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2542
|
+
O as B,
|
|
2543
|
+
$e as C,
|
|
2544
|
+
Ee as F,
|
|
2545
|
+
Fe as I,
|
|
2546
|
+
Qe as S,
|
|
2547
|
+
A as T,
|
|
2548
|
+
Pt as V,
|
|
2549
|
+
g as _,
|
|
2550
|
+
Fn as a,
|
|
2551
|
+
ve as b,
|
|
2552
|
+
$ as c,
|
|
2553
|
+
Pn as d,
|
|
2546
2554
|
G as e,
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2555
|
+
N as f,
|
|
2556
|
+
ke as g,
|
|
2557
|
+
It as h,
|
|
2558
|
+
Et as i,
|
|
2559
|
+
v as j,
|
|
2560
|
+
en as k,
|
|
2553
2561
|
ce as l,
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2562
|
+
Un as m,
|
|
2563
|
+
tn as n,
|
|
2564
|
+
kn as o,
|
|
2557
2565
|
le as p,
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2566
|
+
vt as q,
|
|
2567
|
+
Ke as r,
|
|
2568
|
+
Mn as s,
|
|
2569
|
+
Wn as t,
|
|
2570
|
+
ht as u,
|
|
2571
|
+
ft as v,
|
|
2572
|
+
gt as w,
|
|
2565
2573
|
ae as x
|
|
2566
2574
|
};
|