@builder.io/sdk-vue 0.1.10 → 0.1.12
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.a206dd50.js → block-styles.1fddeaa3.js} +3 -3
- package/packages/_vue2/dist/{block-styles.3b3ffdbf.cjs → block-styles.d2bf860b.cjs} +1 -1
- package/packages/{_vue3/dist/get-processed-block.956c12d9.cjs → _vue2/dist/get-processed-block.a5da75d9.cjs} +1 -1
- package/packages/{_vue3/dist/get-processed-block.c6dad91c.js → _vue2/dist/get-processed-block.b381a0f8.js} +1 -1
- package/packages/_vue2/dist/{index.e8dd60dc.js → index.02b9d9df.js} +214 -188
- package/packages/_vue2/dist/index.9cf67370.cjs +30 -0
- package/packages/_vue2/dist/{render-block.fd86fb8a.js → render-block.9b751cde.js} +5 -5
- package/packages/_vue2/dist/{render-block.065c34a7.cjs → render-block.b35b22c6.cjs} +2 -2
- package/packages/_vue2/dist/{render-component.f953c827.js → render-component.f245018a.js} +3 -3
- package/packages/_vue2/dist/{render-component.933ccff1.cjs → render-component.ffb3d2c6.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.fee45ae3.cjs → render-inlined-styles.25f2e4db.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.9195825e.js → render-inlined-styles.7a493822.js} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.7f32ee89.cjs → render-repeated-block.870ca664.cjs} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.9721be56.js → render-repeated-block.da052a0e.js} +2 -2
- package/packages/_vue2/dist/{render-styles.7f8fcf1c.cjs → render-styles.3f363471.cjs} +2 -2
- package/packages/_vue2/dist/{render-styles.c4b6de30.js → render-styles.a04e3469.js} +2 -2
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +11 -5
- package/packages/_vue2/dist/src/components/render-content/render-content.types.d.ts +2 -0
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +6 -0
- package/packages/_vue2/dist/src/context/builder.context.d.ts +1 -0
- package/packages/_vue2/dist/src/context/types.d.ts +2 -0
- package/packages/_vue2/dist/src/functions/get-content/types.d.ts +6 -0
- package/packages/_vue2/dist/src/types/api-version.d.ts +1 -0
- package/packages/_vue3/dist/{block-styles.6603a147.cjs → block-styles.031c9667.cjs} +1 -1
- package/packages/_vue3/dist/{block-styles.ccb131cb.js → block-styles.aabb6710.js} +3 -3
- package/packages/{_vue2/dist/get-processed-block.c3bfda4f.cjs → _vue3/dist/get-processed-block.2a2ed55d.cjs} +1 -1
- package/packages/{_vue2/dist/get-processed-block.34a63cf8.js → _vue3/dist/get-processed-block.bbef5e53.js} +1 -1
- package/packages/_vue3/dist/{index.a4af8d34.cjs → index.07006be4.cjs} +10 -10
- package/packages/_vue3/dist/{index.e6017963.js → index.10a2a72a.js} +250 -223
- package/packages/_vue3/dist/{render-block.7d476a41.cjs → render-block.6fa7a4e6.cjs} +2 -2
- package/packages/_vue3/dist/{render-block.433cd92c.js → render-block.ec594132.js} +5 -5
- package/packages/_vue3/dist/{render-component.54264dc4.js → render-component.009b30ef.js} +3 -3
- package/packages/_vue3/dist/{render-component.44ee48cd.cjs → render-component.65256ccd.cjs} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.4a982631.js → render-inlined-styles.b27ba505.js} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.9d6df3cd.cjs → render-inlined-styles.fd94a00d.cjs} +1 -1
- package/packages/_vue3/dist/{render-repeated-block.0ea95b83.cjs → render-repeated-block.aeaae10c.cjs} +1 -1
- package/packages/_vue3/dist/{render-repeated-block.87f57d29.js → render-repeated-block.e6298c37.js} +2 -2
- package/packages/_vue3/dist/{render-styles.04b3dbe6.js → render-styles.7efeec10.js} +2 -2
- package/packages/_vue3/dist/{render-styles.830f02aa.cjs → render-styles.a17481e5.cjs} +5 -5
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +11 -5
- 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 +6 -0
- package/packages/_vue3/dist/src/context/builder.context.d.ts +1 -0
- package/packages/_vue3/dist/src/context/types.d.ts +2 -0
- package/packages/_vue3/dist/src/functions/get-content/types.d.ts +6 -0
- package/packages/_vue3/dist/src/types/api-version.d.ts +1 -0
- package/packages/_vue2/dist/index.ffa2cf17.cjs +0 -30
|
@@ -17,7 +17,7 @@ const J = {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
function
|
|
20
|
+
function h(t, e, n, o, s, r, i, l) {
|
|
21
21
|
var a = typeof t == "function" ? t.options : t;
|
|
22
22
|
e && (a.render = e, a.staticRenderFns = n, a._compiled = !0), o && (a.functional = !0), r && (a._scopeId = "data-v-" + r);
|
|
23
23
|
var c;
|
|
@@ -32,12 +32,12 @@ function f(t, e, n, o, s, r, i, l) {
|
|
|
32
32
|
if (a.functional) {
|
|
33
33
|
a._injectStyles = c;
|
|
34
34
|
var d = a.render;
|
|
35
|
-
a.render = function(
|
|
36
|
-
return c.call(
|
|
35
|
+
a.render = function(f, y) {
|
|
36
|
+
return c.call(y), d(f, y);
|
|
37
37
|
};
|
|
38
38
|
} else {
|
|
39
|
-
var
|
|
40
|
-
a.beforeCreate =
|
|
39
|
+
var p = a.beforeCreate;
|
|
40
|
+
a.beforeCreate = p ? [].concat(p, c) : [c];
|
|
41
41
|
}
|
|
42
42
|
return {
|
|
43
43
|
exports: t,
|
|
@@ -47,7 +47,7 @@ function f(t, e, n, o, s, r, i, l) {
|
|
|
47
47
|
var X = function() {
|
|
48
48
|
var e = this, n = e._self._c;
|
|
49
49
|
return e.link ? n("a", e._g(e._b({ attrs: { role: "button", href: e.link, target: e.openLinkInNewTab ? "_blank" : void 0 } }, "a", e.filterAttrs(e.attributes, !1), !1), e.filterAttrs(e.attributes, !0)), [e._v(" " + e._s(e.text) + " ")]) : n("button", e._g(e._b({ staticClass: "button-2fnk003dqad" }, "button", e.filterAttrs(e.attributes, !1), !1), e.filterAttrs(e.attributes, !0)), [e._v(" " + e._s(e.text) + " ")]);
|
|
50
|
-
}, Y = [], Q = /* @__PURE__ */
|
|
50
|
+
}, Y = [], Q = /* @__PURE__ */ h(
|
|
51
51
|
J,
|
|
52
52
|
X,
|
|
53
53
|
Y,
|
|
@@ -57,7 +57,7 @@ var X = function() {
|
|
|
57
57
|
null,
|
|
58
58
|
null
|
|
59
59
|
);
|
|
60
|
-
const Z = Q.exports,
|
|
60
|
+
const Z = Q.exports, T = (t) => JSON.parse(JSON.stringify(t)), V = {
|
|
61
61
|
small: {
|
|
62
62
|
min: 320,
|
|
63
63
|
default: 321,
|
|
@@ -73,8 +73,8 @@ const Z = Q.exports, w = (t) => JSON.parse(JSON.stringify(t)), B = {
|
|
|
73
73
|
default: 991,
|
|
74
74
|
max: 1200
|
|
75
75
|
}
|
|
76
|
-
}, Rn = (t, e =
|
|
77
|
-
const n =
|
|
76
|
+
}, Rn = (t, e = V) => `@media (max-width: ${e[t].max}px)`, ee = ({ small: t, medium: e }) => {
|
|
77
|
+
const n = T(V);
|
|
78
78
|
if (!t || !e)
|
|
79
79
|
return n;
|
|
80
80
|
const o = Math.floor(t / 2);
|
|
@@ -95,22 +95,22 @@ const Z = Q.exports, w = (t) => JSON.parse(JSON.stringify(t)), B = {
|
|
|
95
95
|
min: r,
|
|
96
96
|
default: r + 1
|
|
97
97
|
}, n;
|
|
98
|
-
},
|
|
98
|
+
}, _ = "vue2", te = (t) => t.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), b = (t) => t != null, ne = (t) => Object.entries(t).map(([n, o]) => {
|
|
99
99
|
if (typeof o == "string")
|
|
100
100
|
return `${te(n)}: ${o};`;
|
|
101
|
-
}).filter(b),
|
|
101
|
+
}).filter(b), v = (t) => ne(t).join(`
|
|
102
102
|
`), In = ({
|
|
103
103
|
mediaQuery: t,
|
|
104
104
|
className: e,
|
|
105
105
|
styles: n
|
|
106
106
|
}) => {
|
|
107
107
|
const o = `.${e} {
|
|
108
|
-
${
|
|
108
|
+
${v(n)}
|
|
109
109
|
}`;
|
|
110
110
|
return t ? `${t} {
|
|
111
111
|
${o}
|
|
112
112
|
}` : o;
|
|
113
|
-
}, oe = Symbol(),
|
|
113
|
+
}, oe = Symbol(), x = {
|
|
114
114
|
Builder: {
|
|
115
115
|
content: null,
|
|
116
116
|
context: {},
|
|
@@ -118,16 +118,17 @@ const Z = Q.exports, w = (t) => JSON.parse(JSON.stringify(t)), B = {
|
|
|
118
118
|
setState() {
|
|
119
119
|
},
|
|
120
120
|
apiKey: null,
|
|
121
|
+
apiVersion: void 0,
|
|
121
122
|
registeredComponents: {},
|
|
122
123
|
inheritedStyles: {}
|
|
123
124
|
},
|
|
124
125
|
key: oe
|
|
125
|
-
}, se = () => Promise.resolve().then(() =>
|
|
126
|
+
}, se = () => Promise.resolve().then(() => B).then((t) => t.default).catch((t) => {
|
|
126
127
|
throw console.error(
|
|
127
128
|
"Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
|
|
128
129
|
t
|
|
129
130
|
), t;
|
|
130
|
-
}), re = () => import("./render-inlined-styles.
|
|
131
|
+
}), re = () => import("./render-inlined-styles.7a493822.js").then((t) => t.default).catch((t) => {
|
|
131
132
|
throw console.error(
|
|
132
133
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
|
|
133
134
|
t
|
|
@@ -146,10 +147,10 @@ const Z = Q.exports, w = (t) => JSON.parse(JSON.stringify(t)), B = {
|
|
|
146
147
|
"builderBlock"
|
|
147
148
|
],
|
|
148
149
|
data() {
|
|
149
|
-
return { TARGET:
|
|
150
|
+
return { TARGET: _ };
|
|
150
151
|
},
|
|
151
152
|
inject: {
|
|
152
|
-
builderContext:
|
|
153
|
+
builderContext: x.key
|
|
153
154
|
},
|
|
154
155
|
computed: {
|
|
155
156
|
columnsCssVars() {
|
|
@@ -196,21 +197,21 @@ const Z = Q.exports, w = (t) => JSON.parse(JSON.stringify(t)), B = {
|
|
|
196
197
|
return `
|
|
197
198
|
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
198
199
|
.${this.builderBlock.id}-breakpoints {
|
|
199
|
-
${
|
|
200
|
+
${v(this.columnStyleObjects.columns.medium)}
|
|
200
201
|
}
|
|
201
202
|
|
|
202
203
|
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
203
|
-
${
|
|
204
|
+
${v(this.columnStyleObjects.column.medium)}
|
|
204
205
|
}
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
@media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
|
|
208
209
|
.${this.builderBlock.id}-breakpoints {
|
|
209
|
-
${
|
|
210
|
+
${v(this.columnStyleObjects.columns.small)}
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
213
|
-
${
|
|
214
|
+
${v(this.columnStyleObjects.column.small)}
|
|
214
215
|
}
|
|
215
216
|
},
|
|
216
217
|
`;
|
|
@@ -275,7 +276,7 @@ var ae = function() {
|
|
|
275
276
|
flexGrow: "1"
|
|
276
277
|
} } })], 1);
|
|
277
278
|
})], 2);
|
|
278
|
-
}, le = [], ce = /* @__PURE__ */
|
|
279
|
+
}, le = [], ce = /* @__PURE__ */ h(
|
|
279
280
|
ie,
|
|
280
281
|
ae,
|
|
281
282
|
le,
|
|
@@ -285,15 +286,15 @@ var ae = function() {
|
|
|
285
286
|
null,
|
|
286
287
|
null
|
|
287
288
|
);
|
|
288
|
-
const
|
|
289
|
+
const de = ce.exports, ue = {
|
|
289
290
|
name: "builder-fragment-component",
|
|
290
291
|
props: []
|
|
291
292
|
};
|
|
292
293
|
var me = function() {
|
|
293
294
|
var e = this, n = e._self._c;
|
|
294
295
|
return n("span", [e._t("default")], 2);
|
|
295
|
-
}, pe = [],
|
|
296
|
-
|
|
296
|
+
}, pe = [], he = /* @__PURE__ */ h(
|
|
297
|
+
ue,
|
|
297
298
|
me,
|
|
298
299
|
pe,
|
|
299
300
|
!1,
|
|
@@ -302,7 +303,7 @@ var me = function() {
|
|
|
302
303
|
null,
|
|
303
304
|
null
|
|
304
305
|
);
|
|
305
|
-
const
|
|
306
|
+
const fe = he.exports;
|
|
306
307
|
function R(t) {
|
|
307
308
|
return t.replace(/http(s)?:/, "");
|
|
308
309
|
}
|
|
@@ -324,7 +325,7 @@ function be(t, e) {
|
|
|
324
325
|
}
|
|
325
326
|
return null;
|
|
326
327
|
}
|
|
327
|
-
function
|
|
328
|
+
function C(t) {
|
|
328
329
|
if (!t)
|
|
329
330
|
return t;
|
|
330
331
|
const e = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
@@ -359,10 +360,10 @@ const ye = {
|
|
|
359
360
|
return this.srcset;
|
|
360
361
|
if (this.srcset && ((n = this.image) == null ? void 0 : n.includes("builder.io/api/v1/image"))) {
|
|
361
362
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
362
|
-
return console.debug("Removed given srcset"),
|
|
363
|
+
return console.debug("Removed given srcset"), C(e);
|
|
363
364
|
} else if (this.image && !this.srcset)
|
|
364
|
-
return
|
|
365
|
-
return
|
|
365
|
+
return C(e);
|
|
366
|
+
return C(e);
|
|
366
367
|
},
|
|
367
368
|
webpSrcSet() {
|
|
368
369
|
var t;
|
|
@@ -403,7 +404,7 @@ var ve = function() {
|
|
|
403
404
|
}, 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-1pl23ac79ld", style: {
|
|
404
405
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
405
406
|
} })] : 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-1pl23ac79ld-2" }, [e._t("default")], 2)] : e._e()], 2);
|
|
406
|
-
}, _e = [], xe = /* @__PURE__ */
|
|
407
|
+
}, _e = [], xe = /* @__PURE__ */ h(
|
|
407
408
|
ye,
|
|
408
409
|
ve,
|
|
409
410
|
_e,
|
|
@@ -414,21 +415,21 @@ var ve = function() {
|
|
|
414
415
|
null
|
|
415
416
|
);
|
|
416
417
|
const ke = xe.exports;
|
|
417
|
-
function
|
|
418
|
+
function m() {
|
|
418
419
|
return typeof window < "u" && typeof document < "u";
|
|
419
420
|
}
|
|
420
421
|
function Ce() {
|
|
421
|
-
return
|
|
422
|
+
return m() && window.self !== window.top;
|
|
422
423
|
}
|
|
423
|
-
function
|
|
424
|
+
function g() {
|
|
424
425
|
return Ce() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
425
426
|
}
|
|
426
|
-
const Se = () => import("./block-styles.
|
|
427
|
+
const Se = () => import("./block-styles.1fddeaa3.js").then((t) => t.default).catch((t) => {
|
|
427
428
|
throw console.error(
|
|
428
429
|
"Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
|
|
429
430
|
t
|
|
430
431
|
), t;
|
|
431
|
-
}), we = () => import("./render-block.
|
|
432
|
+
}), we = () => import("./render-block.9b751cde.js").then((t) => t.default).catch((t) => {
|
|
432
433
|
throw console.error(
|
|
433
434
|
"Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
|
|
434
435
|
t
|
|
@@ -438,7 +439,7 @@ const Se = () => import("./block-styles.a206dd50.js").then((t) => t.default).cat
|
|
|
438
439
|
components: { RenderBlock: we, BlockStyles: Se },
|
|
439
440
|
props: ["blocks", "parent", "path", "styleProp"],
|
|
440
441
|
inject: {
|
|
441
|
-
builderContext:
|
|
442
|
+
builderContext: x.key
|
|
442
443
|
},
|
|
443
444
|
computed: {
|
|
444
445
|
className() {
|
|
@@ -449,7 +450,7 @@ const Se = () => import("./block-styles.a206dd50.js").then((t) => t.default).cat
|
|
|
449
450
|
methods: {
|
|
450
451
|
onClick() {
|
|
451
452
|
var t, e;
|
|
452
|
-
|
|
453
|
+
g() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
|
|
453
454
|
{
|
|
454
455
|
type: "builder.clickEmptyBlocks",
|
|
455
456
|
data: {
|
|
@@ -462,7 +463,7 @@ const Se = () => import("./block-styles.a206dd50.js").then((t) => t.default).cat
|
|
|
462
463
|
},
|
|
463
464
|
onMouseEnter() {
|
|
464
465
|
var t, e;
|
|
465
|
-
|
|
466
|
+
g() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
|
|
466
467
|
{
|
|
467
468
|
type: "builder.hoverEmptyBlocks",
|
|
468
469
|
data: {
|
|
@@ -497,7 +498,7 @@ var Re = function() {
|
|
|
497
498
|
}) : e._e(), e.blocks ? e._l(e.blocks, function(o, s) {
|
|
498
499
|
return n("block-styles", { key: "block-style-" + o.id, attrs: { block: o, context: e.builderContext } });
|
|
499
500
|
}) : e._e()], 2);
|
|
500
|
-
}, Ie = [], $e = /* @__PURE__ */
|
|
501
|
+
}, Ie = [], $e = /* @__PURE__ */ h(
|
|
501
502
|
Te,
|
|
502
503
|
Re,
|
|
503
504
|
Ie,
|
|
@@ -507,7 +508,7 @@ var Re = function() {
|
|
|
507
508
|
null,
|
|
508
509
|
null
|
|
509
510
|
);
|
|
510
|
-
const Ee = $e.exports,
|
|
511
|
+
const Ee = $e.exports, B = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
511
512
|
__proto__: null,
|
|
512
513
|
default: Ee
|
|
513
514
|
}, Symbol.toStringTag, { value: "Module" })), Ae = {
|
|
@@ -546,7 +547,7 @@ const Ee = $e.exports, U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
546
547
|
],
|
|
547
548
|
static: !0,
|
|
548
549
|
noWrap: !0
|
|
549
|
-
},
|
|
550
|
+
}, k = (t) => {
|
|
550
551
|
const e = t.toString().trim();
|
|
551
552
|
return `return (${!e.startsWith("function") && !e.startsWith("(") ? "function " : ""}${e}).apply(this, arguments)`;
|
|
552
553
|
}, Fe = {
|
|
@@ -736,7 +737,7 @@ const Ee = $e.exports, U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
736
737
|
]
|
|
737
738
|
}
|
|
738
739
|
],
|
|
739
|
-
onChange:
|
|
740
|
+
onChange: k((t) => {
|
|
740
741
|
function e() {
|
|
741
742
|
n.forEach((o) => {
|
|
742
743
|
o.delete("width");
|
|
@@ -798,19 +799,19 @@ const Ee = $e.exports, U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
798
799
|
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
799
800
|
required: !0,
|
|
800
801
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
801
|
-
onChange:
|
|
802
|
+
onChange: k(
|
|
802
803
|
(t) => {
|
|
803
804
|
t.delete("srcset"), t.delete("noWebp");
|
|
804
805
|
function n(i, l = 6e4) {
|
|
805
806
|
return new Promise((a, c) => {
|
|
806
807
|
const d = document.createElement("img");
|
|
807
|
-
let
|
|
808
|
+
let p = !1;
|
|
808
809
|
d.onload = () => {
|
|
809
|
-
|
|
810
|
+
p = !0, a(d);
|
|
810
811
|
}, d.addEventListener("error", (u) => {
|
|
811
812
|
console.warn("Image load failed", u.error), c(u.error);
|
|
812
813
|
}), d.src = i, setTimeout(() => {
|
|
813
|
-
|
|
814
|
+
p || c(new Error("Image load timed out"));
|
|
814
815
|
}, l);
|
|
815
816
|
});
|
|
816
817
|
}
|
|
@@ -950,7 +951,7 @@ const Ee = $e.exports, U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
950
951
|
}
|
|
951
952
|
}
|
|
952
953
|
]
|
|
953
|
-
},
|
|
954
|
+
}, Ve = {
|
|
954
955
|
name: "builder-section-component",
|
|
955
956
|
props: ["maxWidth", "attributes"],
|
|
956
957
|
methods: {
|
|
@@ -969,7 +970,7 @@ const Ee = $e.exports, U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
969
970
|
}
|
|
970
971
|
}
|
|
971
972
|
};
|
|
972
|
-
var
|
|
973
|
+
var Be = function() {
|
|
973
974
|
var e = this, n = e._self._c;
|
|
974
975
|
return n("section", e._g(e._b({ style: {
|
|
975
976
|
width: "100%",
|
|
@@ -983,10 +984,10 @@ var Ue = function() {
|
|
|
983
984
|
marginLeft: "auto",
|
|
984
985
|
marginRight: "auto"
|
|
985
986
|
} }, "section", e.filterAttrs(e.attributes, !1), !1), e.filterAttrs(e.attributes, !0)), [e._t("default")], 2);
|
|
986
|
-
},
|
|
987
|
+
}, Ue = [], We = /* @__PURE__ */ h(
|
|
988
|
+
Ve,
|
|
987
989
|
Be,
|
|
988
990
|
Ue,
|
|
989
|
-
Ve,
|
|
990
991
|
!1,
|
|
991
992
|
null,
|
|
992
993
|
null,
|
|
@@ -1044,7 +1045,7 @@ function ze() {
|
|
|
1044
1045
|
), new Error("Builder SDK could not find a global `fetch` function");
|
|
1045
1046
|
return t;
|
|
1046
1047
|
}
|
|
1047
|
-
const
|
|
1048
|
+
const U = ze(), Ke = (t) => {
|
|
1048
1049
|
if (t === "localhost" || t === "127.0.0.1")
|
|
1049
1050
|
return t;
|
|
1050
1051
|
const e = t.split(".");
|
|
@@ -1060,7 +1061,7 @@ const V = ze(), Ke = (t) => {
|
|
|
1060
1061
|
console.debug("[COOKIE] GET error: ", o);
|
|
1061
1062
|
return;
|
|
1062
1063
|
}
|
|
1063
|
-
},
|
|
1064
|
+
}, He = (t) => t.map(([e, n]) => n ? `${e}=${n}` : e).filter(b).join("; "), De = [
|
|
1064
1065
|
["secure", ""],
|
|
1065
1066
|
["SameSite", "None"]
|
|
1066
1067
|
], qe = ({
|
|
@@ -1068,14 +1069,14 @@ const V = ze(), Ke = (t) => {
|
|
|
1068
1069
|
value: e,
|
|
1069
1070
|
expires: n
|
|
1070
1071
|
}) => {
|
|
1071
|
-
const s = (
|
|
1072
|
+
const s = (m() ? location.protocol === "https:" : !0) ? De : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [
|
|
1072
1073
|
[t, e],
|
|
1073
1074
|
...r,
|
|
1074
1075
|
["path", "/"],
|
|
1075
1076
|
["domain", Ke(window.location.hostname)],
|
|
1076
1077
|
...s
|
|
1077
1078
|
];
|
|
1078
|
-
return
|
|
1079
|
+
return He(i);
|
|
1079
1080
|
}, N = async ({
|
|
1080
1081
|
name: t,
|
|
1081
1082
|
value: e,
|
|
@@ -1155,14 +1156,14 @@ const V = ze(), Ke = (t) => {
|
|
|
1155
1156
|
const n = await Ze({ item: t, canTrack: e });
|
|
1156
1157
|
Object.assign(t, n);
|
|
1157
1158
|
};
|
|
1158
|
-
function
|
|
1159
|
+
function S(t, e = null, n = ".") {
|
|
1159
1160
|
return Object.keys(t).reduce((o, s) => {
|
|
1160
1161
|
const r = t[s], i = [e, s].filter(Boolean).join(n);
|
|
1161
1162
|
return [
|
|
1162
1163
|
typeof r == "object",
|
|
1163
1164
|
r !== null,
|
|
1164
1165
|
!(Array.isArray(r) && r.length === 0)
|
|
1165
|
-
].every(Boolean) ? { ...o, ...
|
|
1166
|
+
].every(Boolean) ? { ...o, ...S(r, i, n) } : { ...o, [i]: r };
|
|
1166
1167
|
}, {});
|
|
1167
1168
|
}
|
|
1168
1169
|
const $ = "builder.", tt = "options.", nt = (t) => {
|
|
@@ -1181,7 +1182,7 @@ const $ = "builder.", tt = "options.", nt = (t) => {
|
|
|
1181
1182
|
}
|
|
1182
1183
|
}), n;
|
|
1183
1184
|
}, st = () => {
|
|
1184
|
-
if (!
|
|
1185
|
+
if (!m())
|
|
1185
1186
|
return {};
|
|
1186
1187
|
const t = new URLSearchParams(window.location.search);
|
|
1187
1188
|
return ot(t);
|
|
@@ -1194,30 +1195,35 @@ const $ = "builder.", tt = "options.", nt = (t) => {
|
|
|
1194
1195
|
model: r,
|
|
1195
1196
|
apiKey: i,
|
|
1196
1197
|
includeRefs: l = !0,
|
|
1197
|
-
locale: a
|
|
1198
|
+
locale: a,
|
|
1199
|
+
apiVersion: c = "v2"
|
|
1198
1200
|
} = t;
|
|
1199
1201
|
if (!i)
|
|
1200
1202
|
throw new Error("Missing API key");
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1203
|
+
if (!["v2", "v3"].includes(c))
|
|
1204
|
+
throw new Error(
|
|
1205
|
+
`Invalid apiVersion: expected 'v2' or 'v3', received '${c}'`
|
|
1206
|
+
);
|
|
1207
|
+
const d = new URL(
|
|
1208
|
+
`https://cdn.builder.io/api/${c}/content/${r}?apiKey=${i}&limit=${e}&noTraverse=${s}&includeRefs=${l}${a ? `&locale=${a}` : ""}`
|
|
1209
|
+
), p = {
|
|
1204
1210
|
...st(),
|
|
1205
1211
|
...M(t.options || {})
|
|
1206
|
-
},
|
|
1207
|
-
for (const
|
|
1208
|
-
|
|
1209
|
-
if (n &&
|
|
1210
|
-
const
|
|
1211
|
-
for (const
|
|
1212
|
-
|
|
1212
|
+
}, u = S(p);
|
|
1213
|
+
for (const f in u)
|
|
1214
|
+
d.searchParams.set(f, String(u[f]));
|
|
1215
|
+
if (n && d.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
1216
|
+
const f = S({ query: o });
|
|
1217
|
+
for (const y in f)
|
|
1218
|
+
d.searchParams.set(y, JSON.stringify(f[y]));
|
|
1213
1219
|
}
|
|
1214
|
-
return
|
|
1220
|
+
return d;
|
|
1215
1221
|
};
|
|
1216
1222
|
async function z(t) {
|
|
1217
1223
|
return (await it({ ...t, limit: 1 })).results[0] || null;
|
|
1218
1224
|
}
|
|
1219
1225
|
async function it(t) {
|
|
1220
|
-
const e = rt(t), o = await (await
|
|
1226
|
+
const e = rt(t), o = await (await U(e.href)).json(), s = t.canTrack !== !1;
|
|
1221
1227
|
if (s && Array.isArray(o.results))
|
|
1222
1228
|
for (const r of o.results)
|
|
1223
1229
|
await et({ item: r, canTrack: s });
|
|
@@ -1233,51 +1239,57 @@ const at = () => Promise.resolve().then(() => Tn).then((t) => t.default).catch((
|
|
|
1233
1239
|
components: { RenderContent: at },
|
|
1234
1240
|
props: ["attributes", "symbol", "dynamic"],
|
|
1235
1241
|
data() {
|
|
1236
|
-
|
|
1242
|
+
var t, e, n;
|
|
1243
|
+
return {
|
|
1244
|
+
className: [
|
|
1245
|
+
...Object.keys(this.attributes.class),
|
|
1246
|
+
"builder-symbol",
|
|
1247
|
+
(t = this.symbol) != null && t.inline ? "builder-inline-symbol" : void 0,
|
|
1248
|
+
((e = this.symbol) == null ? void 0 : e.dynamic) || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
1249
|
+
].filter(Boolean).join(" "),
|
|
1250
|
+
contentToUse: (n = this.symbol) == null ? void 0 : n.content
|
|
1251
|
+
};
|
|
1237
1252
|
},
|
|
1238
1253
|
inject: {
|
|
1239
|
-
builderContext:
|
|
1254
|
+
builderContext: x.key
|
|
1255
|
+
},
|
|
1256
|
+
mounted() {
|
|
1257
|
+
this.fetchContent();
|
|
1240
1258
|
},
|
|
1241
1259
|
watch: {
|
|
1242
1260
|
onUpdateHook0: {
|
|
1243
1261
|
handler() {
|
|
1244
|
-
|
|
1245
|
-
const t = this.symbol;
|
|
1246
|
-
t && !t.content && !this.fetchedContent && t.model && ((e = this.builderContext) == null ? void 0 : e.apiKey) && z({
|
|
1247
|
-
model: t.model,
|
|
1248
|
-
apiKey: this.builderContext.apiKey,
|
|
1249
|
-
query: {
|
|
1250
|
-
id: t.entry
|
|
1251
|
-
}
|
|
1252
|
-
}).then((n) => {
|
|
1253
|
-
this.fetchedContent = n;
|
|
1254
|
-
});
|
|
1262
|
+
this.fetchContent();
|
|
1255
1263
|
},
|
|
1256
1264
|
immediate: !0
|
|
1257
1265
|
}
|
|
1258
1266
|
},
|
|
1259
1267
|
computed: {
|
|
1260
|
-
className() {
|
|
1261
|
-
var t, e;
|
|
1262
|
-
return [
|
|
1263
|
-
...Object.keys(this.attributes.class),
|
|
1264
|
-
"builder-symbol",
|
|
1265
|
-
(t = this.symbol) != null && t.inline ? "builder-inline-symbol" : void 0,
|
|
1266
|
-
((e = this.symbol) == null ? void 0 : e.dynamic) || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
1267
|
-
].filter(Boolean).join(" ");
|
|
1268
|
-
},
|
|
1269
|
-
contentToUse() {
|
|
1270
|
-
var t;
|
|
1271
|
-
return ((t = this.symbol) == null ? void 0 : t.content) || this.fetchedContent;
|
|
1272
|
-
},
|
|
1273
1268
|
onUpdateHook0() {
|
|
1274
1269
|
return {
|
|
1275
|
-
0: this.symbol
|
|
1276
|
-
1: this.fetchedContent
|
|
1270
|
+
0: this.symbol
|
|
1277
1271
|
};
|
|
1278
1272
|
}
|
|
1279
1273
|
},
|
|
1280
1274
|
methods: {
|
|
1275
|
+
fetchContent() {
|
|
1276
|
+
var t, e;
|
|
1277
|
+
!this.contentToUse && ((t = this.symbol) == null ? void 0 : t.model) && ((e = this.builderContext) == null ? void 0 : e.apiKey) && z({
|
|
1278
|
+
model: this.symbol.model,
|
|
1279
|
+
apiKey: this.builderContext.apiKey,
|
|
1280
|
+
apiVersion: this.builderContext.apiVersion,
|
|
1281
|
+
query: {
|
|
1282
|
+
id: this.symbol.entry
|
|
1283
|
+
}
|
|
1284
|
+
}).then((n) => {
|
|
1285
|
+
n && (this.contentToUse = n);
|
|
1286
|
+
}).catch((n) => {
|
|
1287
|
+
console.error(
|
|
1288
|
+
"[Builder.io]: Could not fetch symbol content: ",
|
|
1289
|
+
n
|
|
1290
|
+
);
|
|
1291
|
+
});
|
|
1292
|
+
},
|
|
1281
1293
|
filterAttrs: function(e = {}, n) {
|
|
1282
1294
|
const o = "v-on:";
|
|
1283
1295
|
return Object.keys(e).filter((s) => {
|
|
@@ -1303,26 +1315,26 @@ const at = () => Promise.resolve().then(() => Tn).then((t) => t.default).catch((
|
|
|
1303
1315
|
}
|
|
1304
1316
|
};
|
|
1305
1317
|
var ct = function() {
|
|
1306
|
-
var o, s, r, i
|
|
1318
|
+
var o, s, r, i;
|
|
1307
1319
|
var e = this, n = e._self._c;
|
|
1308
1320
|
return n("div", e._g(e._b({ class: e._classStringToObject(e.className), attrs: { dataSet: {
|
|
1309
1321
|
class: e.className
|
|
1310
|
-
} } }, "div", e.filterAttrs(e.attributes, !1), !1), e.filterAttrs(e.attributes, !0)), [n("render-content", { attrs: { apiKey: e.builderContext.apiKey, context: e.builderContext.context, customComponents: Object.values(e.builderContext.registeredComponents), data: {
|
|
1322
|
+
} } }, "div", e.filterAttrs(e.attributes, !1), !1), e.filterAttrs(e.attributes, !0)), [n("render-content", { attrs: { apiVersion: e.builderContext.apiVersion, apiKey: e.builderContext.apiKey, context: e.builderContext.context, customComponents: Object.values(e.builderContext.registeredComponents), data: {
|
|
1311
1323
|
...(o = e.symbol) == null ? void 0 : o.data,
|
|
1312
1324
|
...e.builderContext.state,
|
|
1313
|
-
...(
|
|
1314
|
-
}, model: (
|
|
1315
|
-
},
|
|
1325
|
+
...(r = (s = e.contentToUse) == null ? void 0 : s.data) == null ? void 0 : r.state
|
|
1326
|
+
}, model: (i = e.symbol) == null ? void 0 : i.model, content: e.contentToUse } })], 1);
|
|
1327
|
+
}, dt = [], ut = /* @__PURE__ */ h(
|
|
1316
1328
|
lt,
|
|
1317
1329
|
ct,
|
|
1318
|
-
|
|
1330
|
+
dt,
|
|
1319
1331
|
!1,
|
|
1320
1332
|
null,
|
|
1321
1333
|
null,
|
|
1322
1334
|
null,
|
|
1323
1335
|
null
|
|
1324
1336
|
);
|
|
1325
|
-
const mt =
|
|
1337
|
+
const mt = ut.exports, pt = {
|
|
1326
1338
|
name: "Text",
|
|
1327
1339
|
static: !0,
|
|
1328
1340
|
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",
|
|
@@ -1341,18 +1353,18 @@ const mt = dt.exports, pt = {
|
|
|
1341
1353
|
height: "auto",
|
|
1342
1354
|
textAlign: "center"
|
|
1343
1355
|
}
|
|
1344
|
-
},
|
|
1356
|
+
}, ht = {
|
|
1345
1357
|
name: "builder-text",
|
|
1346
1358
|
props: ["text"]
|
|
1347
1359
|
};
|
|
1348
|
-
var
|
|
1360
|
+
var ft = function() {
|
|
1349
1361
|
var e = this, n = e._self._c;
|
|
1350
1362
|
return n("span", { staticClass: "builder-text", style: {
|
|
1351
1363
|
outline: "none"
|
|
1352
1364
|
}, domProps: { innerHTML: e._s(e.text) } });
|
|
1353
|
-
}, gt = [], bt = /* @__PURE__ */
|
|
1354
|
-
ft,
|
|
1365
|
+
}, gt = [], bt = /* @__PURE__ */ h(
|
|
1355
1366
|
ht,
|
|
1367
|
+
ft,
|
|
1356
1368
|
gt,
|
|
1357
1369
|
!1,
|
|
1358
1370
|
null,
|
|
@@ -1514,7 +1526,7 @@ var xt = function() {
|
|
|
1514
1526
|
objectPosition: e.position,
|
|
1515
1527
|
borderRadius: 1
|
|
1516
1528
|
}, attrs: { src: e.video || "no-src", poster: e.posterImage } }, "video", e.spreadProps, !1));
|
|
1517
|
-
}, kt = [], Ct = /* @__PURE__ */
|
|
1529
|
+
}, kt = [], Ct = /* @__PURE__ */ h(
|
|
1518
1530
|
_t,
|
|
1519
1531
|
xt,
|
|
1520
1532
|
kt,
|
|
@@ -1534,7 +1546,7 @@ const St = Ct.exports, wt = {
|
|
|
1534
1546
|
required: !0,
|
|
1535
1547
|
defaultValue: "",
|
|
1536
1548
|
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1537
|
-
onChange:
|
|
1549
|
+
onChange: k(
|
|
1538
1550
|
(t) => {
|
|
1539
1551
|
const e = t.get("url");
|
|
1540
1552
|
if (e)
|
|
@@ -1609,7 +1621,7 @@ const St = Ct.exports, wt = {
|
|
|
1609
1621
|
var $t = function() {
|
|
1610
1622
|
var e = this, n = e._self._c;
|
|
1611
1623
|
return n("div", { ref: "elem", staticClass: "builder-embed", domProps: { innerHTML: e._s(e.content) } });
|
|
1612
|
-
}, Et = [], At = /* @__PURE__ */
|
|
1624
|
+
}, Et = [], At = /* @__PURE__ */ h(
|
|
1613
1625
|
It,
|
|
1614
1626
|
$t,
|
|
1615
1627
|
Et,
|
|
@@ -1630,7 +1642,7 @@ const Ft = At.exports, jt = {
|
|
|
1630
1642
|
"attributes"
|
|
1631
1643
|
],
|
|
1632
1644
|
data() {
|
|
1633
|
-
return { isEditing:
|
|
1645
|
+
return { isEditing: g };
|
|
1634
1646
|
},
|
|
1635
1647
|
methods: {
|
|
1636
1648
|
filterAttrs: function(e = {}, n) {
|
|
@@ -1654,7 +1666,7 @@ var Ot = function() {
|
|
|
1654
1666
|
objectFit: e.backgroundSize || "cover",
|
|
1655
1667
|
objectPosition: e.backgroundPosition || "center"
|
|
1656
1668
|
}, attrs: { alt: e.altText, src: e.imgSrc || e.image } }, "img", e.filterAttrs(e.attributes, !1), !1), e.filterAttrs(e.attributes, !0)));
|
|
1657
|
-
}, Pt = [],
|
|
1669
|
+
}, Pt = [], Vt = /* @__PURE__ */ h(
|
|
1658
1670
|
jt,
|
|
1659
1671
|
Ot,
|
|
1660
1672
|
Pt,
|
|
@@ -1664,7 +1676,7 @@ var Ot = function() {
|
|
|
1664
1676
|
null,
|
|
1665
1677
|
null
|
|
1666
1678
|
);
|
|
1667
|
-
const
|
|
1679
|
+
const Bt = Vt.exports, Ut = {
|
|
1668
1680
|
name: "Raw:Img",
|
|
1669
1681
|
hideFromInsertMenu: !0,
|
|
1670
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",
|
|
@@ -1732,7 +1744,7 @@ var Nt = function() {
|
|
|
1732
1744
|
return n("div", { ref: "elem", class: e._classStringToObject(
|
|
1733
1745
|
"builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
|
|
1734
1746
|
), domProps: { innerHTML: e._s(e.code) } });
|
|
1735
|
-
}, Lt = [], Mt = /* @__PURE__ */
|
|
1747
|
+
}, Lt = [], Mt = /* @__PURE__ */ h(
|
|
1736
1748
|
Wt,
|
|
1737
1749
|
Nt,
|
|
1738
1750
|
Lt,
|
|
@@ -1768,14 +1780,14 @@ const zt = Mt.exports, Kt = {
|
|
|
1768
1780
|
advanced: !0
|
|
1769
1781
|
}
|
|
1770
1782
|
]
|
|
1771
|
-
},
|
|
1783
|
+
}, Ht = () => [
|
|
1772
1784
|
{ component: Z, ...Ae },
|
|
1773
|
-
{ component:
|
|
1785
|
+
{ component: de, ...Fe },
|
|
1774
1786
|
{ component: zt, ...Kt },
|
|
1775
1787
|
{ component: Ft, ...wt },
|
|
1776
|
-
{ component:
|
|
1788
|
+
{ component: fe, ...je },
|
|
1777
1789
|
{ component: ke, ...Oe },
|
|
1778
|
-
{ component:
|
|
1790
|
+
{ component: Bt, ...Ut },
|
|
1779
1791
|
{ component: Ne, ...Pe },
|
|
1780
1792
|
{ component: mt, ...Le },
|
|
1781
1793
|
{ component: yt, ...pt },
|
|
@@ -1793,9 +1805,9 @@ function E({
|
|
|
1793
1805
|
return;
|
|
1794
1806
|
}
|
|
1795
1807
|
const r = {
|
|
1796
|
-
isEditing:
|
|
1797
|
-
isBrowser:
|
|
1798
|
-
isServer: !
|
|
1808
|
+
isEditing: g(),
|
|
1809
|
+
isBrowser: m(),
|
|
1810
|
+
isServer: !m()
|
|
1799
1811
|
}, l = s && !(t.includes(";") || t.includes(" return ") || t.trim().startsWith("return ")) ? `return (${t});` : t;
|
|
1800
1812
|
try {
|
|
1801
1813
|
return new Function(
|
|
@@ -1818,8 +1830,8 @@ function E({
|
|
|
1818
1830
|
);
|
|
1819
1831
|
}
|
|
1820
1832
|
}
|
|
1821
|
-
function
|
|
1822
|
-
return !
|
|
1833
|
+
function Dt() {
|
|
1834
|
+
return !m() || g() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1823
1835
|
}
|
|
1824
1836
|
const K = [];
|
|
1825
1837
|
function $n(t, e) {
|
|
@@ -1833,11 +1845,11 @@ const qt = ({
|
|
|
1833
1845
|
}) => ({
|
|
1834
1846
|
type: "builder.registerComponent",
|
|
1835
1847
|
data: Jt(e)
|
|
1836
|
-
}), Gt = (t) => typeof t == "function" ?
|
|
1848
|
+
}), Gt = (t) => typeof t == "function" ? k(t) : T(t), Jt = ({
|
|
1837
1849
|
inputs: t,
|
|
1838
1850
|
...e
|
|
1839
1851
|
}) => ({
|
|
1840
|
-
...
|
|
1852
|
+
...T(e),
|
|
1841
1853
|
inputs: t == null ? void 0 : t.map(
|
|
1842
1854
|
(n) => Object.entries(n).reduce(
|
|
1843
1855
|
(o, [s, r]) => ({
|
|
@@ -1854,16 +1866,16 @@ function Xt() {
|
|
|
1854
1866
|
return (t == "x" ? e : e & 3 | 8).toString(16);
|
|
1855
1867
|
});
|
|
1856
1868
|
}
|
|
1857
|
-
function
|
|
1869
|
+
function H() {
|
|
1858
1870
|
return Xt().replace(/-/g, "");
|
|
1859
1871
|
}
|
|
1860
|
-
const
|
|
1872
|
+
const D = "builderSessionId", Yt = async ({
|
|
1861
1873
|
canTrack: t
|
|
1862
1874
|
}) => {
|
|
1863
1875
|
if (!t)
|
|
1864
1876
|
return;
|
|
1865
1877
|
const e = await W({
|
|
1866
|
-
name:
|
|
1878
|
+
name: D,
|
|
1867
1879
|
canTrack: t
|
|
1868
1880
|
});
|
|
1869
1881
|
if (b(e))
|
|
@@ -1872,10 +1884,10 @@ const H = "builderSessionId", Yt = async ({
|
|
|
1872
1884
|
const n = Qt();
|
|
1873
1885
|
return Zt({ id: n, canTrack: t }), n;
|
|
1874
1886
|
}
|
|
1875
|
-
}, Qt = () =>
|
|
1887
|
+
}, Qt = () => H(), Zt = ({
|
|
1876
1888
|
id: t,
|
|
1877
1889
|
canTrack: e
|
|
1878
|
-
}) => N({ name:
|
|
1890
|
+
}) => N({ name: D, value: t, canTrack: e }), q = () => m() && typeof localStorage < "u" ? localStorage : void 0, en = ({
|
|
1879
1891
|
key: t,
|
|
1880
1892
|
canTrack: e
|
|
1881
1893
|
}) => {
|
|
@@ -1910,7 +1922,7 @@ const H = "builderSessionId", Yt = async ({
|
|
|
1910
1922
|
const n = on();
|
|
1911
1923
|
return sn({ id: n, canTrack: t }), n;
|
|
1912
1924
|
}
|
|
1913
|
-
}, on = () =>
|
|
1925
|
+
}, on = () => H(), sn = ({
|
|
1914
1926
|
id: t,
|
|
1915
1927
|
canTrack: e
|
|
1916
1928
|
}) => tn({
|
|
@@ -1918,7 +1930,7 @@ const H = "builderSessionId", Yt = async ({
|
|
|
1918
1930
|
value: t,
|
|
1919
1931
|
canTrack: e
|
|
1920
1932
|
}), rn = () => {
|
|
1921
|
-
if (
|
|
1933
|
+
if (m()) {
|
|
1922
1934
|
const t = new URL(location.href);
|
|
1923
1935
|
return t.pathname === "" && (t.pathname = "/"), t;
|
|
1924
1936
|
} else
|
|
@@ -1941,7 +1953,7 @@ const H = "builderSessionId", Yt = async ({
|
|
|
1941
1953
|
return t.match(/IEMobile/i) || t.match(/WPDesktop/i);
|
|
1942
1954
|
},
|
|
1943
1955
|
any() {
|
|
1944
|
-
return e.Android() || e.BlackBerry() || e.iOS() || e.Opera() || e.Windows() ||
|
|
1956
|
+
return e.Android() || e.BlackBerry() || e.iOS() || e.Opera() || e.Windows() || _ === "reactNative";
|
|
1945
1957
|
}
|
|
1946
1958
|
}, n = t.match(/Tablet|iPad/i), o = rn();
|
|
1947
1959
|
return {
|
|
@@ -1959,7 +1971,7 @@ const H = "builderSessionId", Yt = async ({
|
|
|
1959
1971
|
sessionId: e,
|
|
1960
1972
|
visitorId: n
|
|
1961
1973
|
};
|
|
1962
|
-
},
|
|
1974
|
+
}, dn = async ({
|
|
1963
1975
|
type: t,
|
|
1964
1976
|
canTrack: e,
|
|
1965
1977
|
apiKey: n,
|
|
@@ -1978,18 +1990,18 @@ const H = "builderSessionId", Yt = async ({
|
|
|
1978
1990
|
ownerId: n
|
|
1979
1991
|
}
|
|
1980
1992
|
});
|
|
1981
|
-
async function
|
|
1993
|
+
async function w(t) {
|
|
1982
1994
|
if (!t.apiKey) {
|
|
1983
1995
|
console.error(
|
|
1984
1996
|
"[Builder.io]: Missing API key for track call. Please provide your API key."
|
|
1985
1997
|
);
|
|
1986
1998
|
return;
|
|
1987
1999
|
}
|
|
1988
|
-
if (!!t.canTrack && !
|
|
2000
|
+
if (!!t.canTrack && !g() && !!(m() || _ === "reactNative"))
|
|
1989
2001
|
return fetch("https://builder.io/api/v1/track", {
|
|
1990
2002
|
method: "POST",
|
|
1991
2003
|
body: JSON.stringify({
|
|
1992
|
-
events: [await
|
|
2004
|
+
events: [await dn(t)]
|
|
1993
2005
|
}),
|
|
1994
2006
|
headers: {
|
|
1995
2007
|
"content-type": "application/json"
|
|
@@ -1999,10 +2011,10 @@ async function S(t) {
|
|
|
1999
2011
|
console.error("Failed to track: ", e);
|
|
2000
2012
|
});
|
|
2001
2013
|
}
|
|
2002
|
-
const En = (t) =>
|
|
2003
|
-
function
|
|
2014
|
+
const En = (t) => w({ ...t, canTrack: !0 }), A = {};
|
|
2015
|
+
function un(t, e) {
|
|
2004
2016
|
let n = A[t];
|
|
2005
|
-
if (n || (n = A[t] = []), n.push(e),
|
|
2017
|
+
if (n || (n = A[t] = []), n.push(e), m()) {
|
|
2006
2018
|
const o = {
|
|
2007
2019
|
type: "builder.register",
|
|
2008
2020
|
data: {
|
|
@@ -2018,7 +2030,7 @@ function dn(t, e) {
|
|
|
2018
2030
|
}
|
|
2019
2031
|
}
|
|
2020
2032
|
const mn = () => {
|
|
2021
|
-
|
|
2033
|
+
un("insertMenu", {
|
|
2022
2034
|
name: "_default",
|
|
2023
2035
|
default: !0,
|
|
2024
2036
|
items: [
|
|
@@ -2036,11 +2048,11 @@ const mn = () => {
|
|
|
2036
2048
|
let F = !1;
|
|
2037
2049
|
const pn = (t = {}) => {
|
|
2038
2050
|
var e, n;
|
|
2039
|
-
F || (F = !0,
|
|
2051
|
+
F || (F = !0, m() && ((e = window.parent) == null || e.postMessage(
|
|
2040
2052
|
{
|
|
2041
2053
|
type: "builder.sdkInfo",
|
|
2042
2054
|
data: {
|
|
2043
|
-
target:
|
|
2055
|
+
target: _,
|
|
2044
2056
|
supportsPatchUpdates: !1,
|
|
2045
2057
|
supportsAddBlockScoping: !0,
|
|
2046
2058
|
supportsCustomBreakpoints: !0
|
|
@@ -2061,21 +2073,21 @@ const pn = (t = {}) => {
|
|
|
2061
2073
|
switch (o.type) {
|
|
2062
2074
|
case "builder.evaluate": {
|
|
2063
2075
|
const i = o.data.text, l = o.data.arguments || [], a = o.data.id, c = new Function(i);
|
|
2064
|
-
let d,
|
|
2076
|
+
let d, p = null;
|
|
2065
2077
|
try {
|
|
2066
2078
|
d = c.apply(null, l);
|
|
2067
2079
|
} catch (u) {
|
|
2068
|
-
|
|
2080
|
+
p = u;
|
|
2069
2081
|
}
|
|
2070
|
-
|
|
2082
|
+
p ? (s = window.parent) == null || s.postMessage(
|
|
2071
2083
|
{
|
|
2072
2084
|
type: "builder.evaluateError",
|
|
2073
|
-
data: { id: a, error:
|
|
2085
|
+
data: { id: a, error: p.message }
|
|
2074
2086
|
},
|
|
2075
2087
|
"*"
|
|
2076
2088
|
) : d && typeof d.then == "function" ? d.then((u) => {
|
|
2077
|
-
var
|
|
2078
|
-
(
|
|
2089
|
+
var f;
|
|
2090
|
+
(f = window.parent) == null || f.postMessage(
|
|
2079
2091
|
{
|
|
2080
2092
|
type: "builder.evaluateResult",
|
|
2081
2093
|
data: { id: a, result: u }
|
|
@@ -2097,7 +2109,7 @@ const pn = (t = {}) => {
|
|
|
2097
2109
|
function j(t) {
|
|
2098
2110
|
return Math.round(t * 1e3) / 1e3;
|
|
2099
2111
|
}
|
|
2100
|
-
const
|
|
2112
|
+
const hn = (t, e, n = !0) => {
|
|
2101
2113
|
if (!(t instanceof HTMLElement))
|
|
2102
2114
|
return null;
|
|
2103
2115
|
let o = n ? t : t.parentElement;
|
|
@@ -2108,7 +2120,7 @@ const fn = (t, e, n = !0) => {
|
|
|
2108
2120
|
return o;
|
|
2109
2121
|
} while (o = o.parentElement);
|
|
2110
2122
|
return null;
|
|
2111
|
-
},
|
|
2123
|
+
}, fn = (t) => hn(t, (e) => {
|
|
2112
2124
|
const n = e.getAttribute("builder-id") || e.id;
|
|
2113
2125
|
return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
|
|
2114
2126
|
}), O = ({
|
|
@@ -2121,7 +2133,7 @@ const fn = (t, e, n = !0) => {
|
|
|
2121
2133
|
y: i
|
|
2122
2134
|
};
|
|
2123
2135
|
}, gn = (t) => {
|
|
2124
|
-
const e = t.target, n = e &&
|
|
2136
|
+
const e = t.target, n = e && fn(e), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2125
2137
|
return {
|
|
2126
2138
|
targetBuilderElement: o || void 0,
|
|
2127
2139
|
metadata: {
|
|
@@ -2157,12 +2169,12 @@ const fn = (t, e, n = !0) => {
|
|
|
2157
2169
|
...e
|
|
2158
2170
|
},
|
|
2159
2171
|
meta: t == null ? void 0 : t.meta
|
|
2160
|
-
} : void 0, vn = () => Promise.resolve().then(() =>
|
|
2172
|
+
} : void 0, vn = () => Promise.resolve().then(() => B).then((t) => t.default).catch((t) => {
|
|
2161
2173
|
throw console.error(
|
|
2162
2174
|
"Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
|
|
2163
2175
|
t
|
|
2164
2176
|
), t;
|
|
2165
|
-
}), _n = () => import("./render-styles.
|
|
2177
|
+
}), _n = () => import("./render-styles.a04e3469.js").then((t) => t.default).catch((t) => {
|
|
2166
2178
|
throw console.error(
|
|
2167
2179
|
"Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
|
|
2168
2180
|
t
|
|
@@ -2182,7 +2194,8 @@ const fn = (t, e, n = !0) => {
|
|
|
2182
2194
|
"model",
|
|
2183
2195
|
"context",
|
|
2184
2196
|
"apiKey",
|
|
2185
|
-
"includeRefs"
|
|
2197
|
+
"includeRefs",
|
|
2198
|
+
"apiVersion"
|
|
2186
2199
|
],
|
|
2187
2200
|
data() {
|
|
2188
2201
|
return {
|
|
@@ -2200,7 +2213,7 @@ const fn = (t, e, n = !0) => {
|
|
|
2200
2213
|
locale: this.locale
|
|
2201
2214
|
}),
|
|
2202
2215
|
allRegisteredComponents: [
|
|
2203
|
-
...
|
|
2216
|
+
...Ht(),
|
|
2204
2217
|
...K,
|
|
2205
2218
|
...this.customComponents || []
|
|
2206
2219
|
].reduce(
|
|
@@ -2212,18 +2225,19 @@ const fn = (t, e, n = !0) => {
|
|
|
2212
2225
|
),
|
|
2213
2226
|
httpReqsData: {},
|
|
2214
2227
|
clicked: !1,
|
|
2215
|
-
TARGET:
|
|
2228
|
+
TARGET: _
|
|
2216
2229
|
};
|
|
2217
2230
|
},
|
|
2218
2231
|
provide() {
|
|
2219
2232
|
const t = this;
|
|
2220
2233
|
return {
|
|
2221
|
-
[
|
|
2234
|
+
[x.key]: {
|
|
2222
2235
|
content: t.useContent,
|
|
2223
2236
|
state: t.contentState,
|
|
2224
2237
|
setState: t.setContextState,
|
|
2225
2238
|
context: t.context || {},
|
|
2226
2239
|
apiKey: t.apiKey,
|
|
2240
|
+
apiVersion: t.apiVersion,
|
|
2227
2241
|
registeredComponents: t.allRegisteredComponents
|
|
2228
2242
|
}
|
|
2229
2243
|
};
|
|
@@ -2232,8 +2246,8 @@ const fn = (t, e, n = !0) => {
|
|
|
2232
2246
|
var t, e;
|
|
2233
2247
|
if (this.apiKey || console.error(
|
|
2234
2248
|
"[Builder.io]: No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2235
|
-
),
|
|
2236
|
-
if (
|
|
2249
|
+
), m()) {
|
|
2250
|
+
if (g() && (this.forceReRenderCount = this.forceReRenderCount + 1, mn(), pn({
|
|
2237
2251
|
...this.locale ? {
|
|
2238
2252
|
locale: this.locale
|
|
2239
2253
|
} : {},
|
|
@@ -2251,7 +2265,7 @@ const fn = (t, e, n = !0) => {
|
|
|
2251
2265
|
this.emitStateUpdate
|
|
2252
2266
|
)), this.useContent) {
|
|
2253
2267
|
const n = (t = this.useContent) == null ? void 0 : t.testVariationId, o = (e = this.useContent) == null ? void 0 : e.id;
|
|
2254
|
-
|
|
2268
|
+
w({
|
|
2255
2269
|
type: "impression",
|
|
2256
2270
|
canTrack: this.canTrackToUse,
|
|
2257
2271
|
contentId: o,
|
|
@@ -2259,11 +2273,12 @@ const fn = (t, e, n = !0) => {
|
|
|
2259
2273
|
variationId: n !== o ? n : void 0
|
|
2260
2274
|
});
|
|
2261
2275
|
}
|
|
2262
|
-
if (
|
|
2276
|
+
if (Dt()) {
|
|
2263
2277
|
const n = new URL(location.href).searchParams, o = n.get("builder.preview"), s = n.get("apiKey") || n.get("builder.space");
|
|
2264
2278
|
o === this.model && s === this.apiKey && z({
|
|
2265
2279
|
model: this.model,
|
|
2266
|
-
apiKey: this.apiKey
|
|
2280
|
+
apiKey: this.apiKey,
|
|
2281
|
+
apiVersion: this.apiVersion
|
|
2267
2282
|
}).then((r) => {
|
|
2268
2283
|
r && this.mergeNewContent(r);
|
|
2269
2284
|
});
|
|
@@ -2274,17 +2289,23 @@ const fn = (t, e, n = !0) => {
|
|
|
2274
2289
|
watch: {
|
|
2275
2290
|
onUpdateHook0: {
|
|
2276
2291
|
handler() {
|
|
2277
|
-
this.
|
|
2292
|
+
this.content && this.mergeNewContent(this.content);
|
|
2278
2293
|
},
|
|
2279
2294
|
immediate: !0
|
|
2280
2295
|
},
|
|
2281
2296
|
onUpdateHook1: {
|
|
2282
2297
|
handler() {
|
|
2283
|
-
this.
|
|
2298
|
+
this.evaluateJsCode();
|
|
2284
2299
|
},
|
|
2285
2300
|
immediate: !0
|
|
2286
2301
|
},
|
|
2287
2302
|
onUpdateHook2: {
|
|
2303
|
+
handler() {
|
|
2304
|
+
this.runHttpRequests();
|
|
2305
|
+
},
|
|
2306
|
+
immediate: !0
|
|
2307
|
+
},
|
|
2308
|
+
onUpdateHook3: {
|
|
2288
2309
|
handler() {
|
|
2289
2310
|
this.emitStateUpdate();
|
|
2290
2311
|
},
|
|
@@ -2292,26 +2313,31 @@ const fn = (t, e, n = !0) => {
|
|
|
2292
2313
|
}
|
|
2293
2314
|
},
|
|
2294
2315
|
unmounted() {
|
|
2295
|
-
|
|
2316
|
+
m() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
|
|
2296
2317
|
"builder:component:stateChangeListenerActivated",
|
|
2297
2318
|
this.emitStateUpdate
|
|
2298
2319
|
));
|
|
2299
2320
|
},
|
|
2300
2321
|
computed: {
|
|
2301
2322
|
onUpdateHook0() {
|
|
2323
|
+
return {
|
|
2324
|
+
0: this.content
|
|
2325
|
+
};
|
|
2326
|
+
},
|
|
2327
|
+
onUpdateHook1() {
|
|
2302
2328
|
var t, e;
|
|
2303
2329
|
return {
|
|
2304
2330
|
0: (e = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : e.jsCode,
|
|
2305
2331
|
1: this.contentState
|
|
2306
2332
|
};
|
|
2307
2333
|
},
|
|
2308
|
-
|
|
2334
|
+
onUpdateHook2() {
|
|
2309
2335
|
var t, e;
|
|
2310
2336
|
return {
|
|
2311
2337
|
0: (e = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : e.httpRequests
|
|
2312
2338
|
};
|
|
2313
2339
|
},
|
|
2314
|
-
|
|
2340
|
+
onUpdateHook3() {
|
|
2315
2341
|
return {
|
|
2316
2342
|
0: this.contentState
|
|
2317
2343
|
};
|
|
@@ -2379,7 +2405,7 @@ const fn = (t, e, n = !0) => {
|
|
|
2379
2405
|
var e, n;
|
|
2380
2406
|
if (this.useContent) {
|
|
2381
2407
|
const o = (e = this.useContent) == null ? void 0 : e.testVariationId, s = (n = this.useContent) == null ? void 0 : n.id;
|
|
2382
|
-
|
|
2408
|
+
w({
|
|
2383
2409
|
type: "click",
|
|
2384
2410
|
canTrack: this.canTrackToUse,
|
|
2385
2411
|
contentId: s,
|
|
@@ -2402,7 +2428,7 @@ const fn = (t, e, n = !0) => {
|
|
|
2402
2428
|
);
|
|
2403
2429
|
},
|
|
2404
2430
|
handleRequest({ url: t, key: e }) {
|
|
2405
|
-
|
|
2431
|
+
U(t).then((n) => n.json()).then((n) => {
|
|
2406
2432
|
const o = {
|
|
2407
2433
|
...this.contentState,
|
|
2408
2434
|
[e]: n
|
|
@@ -2416,7 +2442,7 @@ const fn = (t, e, n = !0) => {
|
|
|
2416
2442
|
var e, n, o;
|
|
2417
2443
|
const t = (o = (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.httpRequests) != null ? o : {};
|
|
2418
2444
|
Object.entries(t).forEach(([s, r]) => {
|
|
2419
|
-
if (r && (!this.httpReqsData[s] ||
|
|
2445
|
+
if (r && (!this.httpReqsData[s] || g())) {
|
|
2420
2446
|
const i = this.evalExpression(r);
|
|
2421
2447
|
this.handleRequest({
|
|
2422
2448
|
url: i,
|
|
@@ -2426,7 +2452,7 @@ const fn = (t, e, n = !0) => {
|
|
|
2426
2452
|
});
|
|
2427
2453
|
},
|
|
2428
2454
|
emitStateUpdate() {
|
|
2429
|
-
|
|
2455
|
+
g() && window.dispatchEvent(
|
|
2430
2456
|
new CustomEvent("builder:component:stateChange", {
|
|
2431
2457
|
detail: {
|
|
2432
2458
|
state: this.contentState,
|
|
@@ -2442,10 +2468,10 @@ const fn = (t, e, n = !0) => {
|
|
|
2442
2468
|
var kn = function() {
|
|
2443
2469
|
var o, s, r, i, l, a, c, d;
|
|
2444
2470
|
var e = this, n = e._self._c;
|
|
2445
|
-
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(
|
|
2446
|
-
return e.onClick(
|
|
2471
|
+
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(p) {
|
|
2472
|
+
return e.onClick(p);
|
|
2447
2473
|
} } }, [e.TARGET !== "reactNative" ? [n("render-content-styles", { attrs: { contentId: (s = e.useContent) == null ? void 0 : s.id, cssCode: (i = (r = e.useContent) == null ? void 0 : r.data) == null ? void 0 : i.cssCode, customFonts: (a = (l = e.useContent) == null ? void 0 : l.data) == null ? void 0 : a.customFonts } })] : e._e(), n("render-blocks", { key: e.forceReRenderCount, attrs: { blocks: (d = (c = e.useContent) == null ? void 0 : c.data) == null ? void 0 : d.blocks } })], 2) : e._e();
|
|
2448
|
-
}, Cn = [], Sn = /* @__PURE__ */
|
|
2474
|
+
}, Cn = [], Sn = /* @__PURE__ */ h(
|
|
2449
2475
|
xn,
|
|
2450
2476
|
kn,
|
|
2451
2477
|
Cn,
|
|
@@ -2460,7 +2486,7 @@ const wn = Sn.exports, Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
|
|
|
2460
2486
|
default: wn
|
|
2461
2487
|
}, Symbol.toStringTag, { value: "Module" })), P = {};
|
|
2462
2488
|
function An(t) {
|
|
2463
|
-
if (
|
|
2489
|
+
if (m()) {
|
|
2464
2490
|
Object.assign(P, t);
|
|
2465
2491
|
const e = {
|
|
2466
2492
|
type: "builder.settingsChange",
|
|
@@ -2471,32 +2497,32 @@ function An(t) {
|
|
|
2471
2497
|
}
|
|
2472
2498
|
export {
|
|
2473
2499
|
M as A,
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2500
|
+
x as B,
|
|
2501
|
+
de as C,
|
|
2502
|
+
fe as F,
|
|
2477
2503
|
ke as I,
|
|
2478
2504
|
Ne as S,
|
|
2479
|
-
|
|
2505
|
+
_ as T,
|
|
2480
2506
|
St as V,
|
|
2481
2507
|
In as a,
|
|
2482
2508
|
Rn as b,
|
|
2483
2509
|
b as c,
|
|
2484
2510
|
ne as d,
|
|
2485
2511
|
E as e,
|
|
2486
|
-
|
|
2512
|
+
T as f,
|
|
2487
2513
|
ee as g,
|
|
2488
2514
|
Z as h,
|
|
2489
2515
|
wn as i,
|
|
2490
2516
|
mt as j,
|
|
2491
2517
|
yt as k,
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2518
|
+
g as l,
|
|
2519
|
+
Dt as m,
|
|
2520
|
+
h as n,
|
|
2495
2521
|
K as o,
|
|
2496
2522
|
$n as p,
|
|
2497
2523
|
qt as q,
|
|
2498
2524
|
Ee as r,
|
|
2499
|
-
|
|
2525
|
+
un as s,
|
|
2500
2526
|
En as t,
|
|
2501
2527
|
An as u,
|
|
2502
2528
|
z as v,
|