@builder.io/sdk-vue 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.4667431d.js → block-styles.5729b057.js} +18 -17
- package/packages/_vue2/dist/block-styles.cb3c2dd0.cjs +1 -0
- package/packages/{_vue3/dist/css.3241302b.cjs → _vue2/dist/css.2efa95fa.cjs} +1 -1
- package/packages/{_vue3/dist/css.81a21c5a.js → _vue2/dist/css.a54ddc90.js} +1 -1
- package/packages/_vue2/dist/{index.eb91dc82.js → index.6a9eec41.js} +356 -354
- package/packages/_vue2/dist/index.8547cce2.cjs +29 -0
- package/packages/_vue2/dist/{render-block.6f9a607a.js → render-block.4c7d7ca1.js} +43 -42
- package/packages/_vue2/dist/render-block.753d2325.cjs +3 -0
- package/packages/_vue2/dist/render-component.84d45798.js +38 -0
- package/packages/_vue2/dist/render-component.90275cfa.cjs +1 -0
- package/packages/_vue2/dist/render-inlined-styles.1999f52e.cjs +1 -0
- package/packages/_vue2/dist/render-inlined-styles.1fa49816.js +34 -0
- package/packages/_vue2/dist/{render-repeated-block.1bb5c2fb.js → render-repeated-block.900e2543.js} +15 -13
- package/packages/_vue2/dist/render-repeated-block.f522a309.cjs +1 -0
- package/packages/_vue2/dist/render-styles.15b8cdf0.cjs +31 -0
- package/packages/_vue2/dist/{render-styles.0d1f8872.js → render-styles.591ca7be.js} +26 -25
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +23 -22
- package/packages/_vue2/dist/src/blocks/button/button.vue.d.ts +19 -8
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +29 -174
- package/packages/_vue2/dist/src/blocks/custom-code/custom-code.vue.d.ts +9 -13
- package/packages/_vue2/dist/src/blocks/embed/embed.vue.d.ts +13 -20
- package/packages/_vue2/dist/src/blocks/fragment/fragment.vue.d.ts +1 -4
- package/packages/_vue2/dist/src/blocks/image/image.vue.d.ts +72 -0
- package/packages/_vue2/dist/src/blocks/img/img.vue.d.ts +8 -11
- package/packages/_vue2/dist/src/blocks/section/section.vue.d.ts +12 -7
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +15 -245
- package/packages/_vue2/dist/src/blocks/text/text.vue.d.ts +7 -4
- package/packages/_vue2/dist/src/blocks/video/video.vue.d.ts +42 -7
- package/packages/_vue2/dist/src/components/render-block/block-styles.vue.d.ts +18 -27
- package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +3 -86
- package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +3 -86
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +19 -84
- package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +23 -127
- package/packages/_vue2/dist/src/components/render-content/components/render-styles.vue.d.ts +15 -18
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +46 -212
- package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +12 -11
- package/packages/_vue2/dist/src/index.d.ts +1 -0
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/block-styles.56f7b28a.cjs +1 -0
- package/packages/_vue3/dist/block-styles.f06f105b.js +69 -0
- package/packages/{_vue2/dist/css.468435de.js → _vue3/dist/css.2ff361fc.js} +1 -1
- package/packages/{_vue2/dist/css.dce6e4eb.cjs → _vue3/dist/css.f83437ab.cjs} +1 -1
- package/packages/_vue3/dist/{index.45ab85e5.js → index.0aed90df.js} +785 -784
- package/packages/_vue3/dist/index.d72bde22.cjs +29 -0
- package/packages/_vue3/dist/render-block.4e95bb8d.cjs +3 -0
- package/packages/_vue3/dist/{render-block.ec4c1913.js → render-block.905bcce5.js} +88 -109
- package/packages/_vue3/dist/render-component.0a7c094b.cjs +1 -0
- package/packages/_vue3/dist/render-component.b4a311b8.js +42 -0
- package/packages/_vue3/dist/render-inlined-styles.454bc38b.js +32 -0
- package/packages/_vue3/dist/render-inlined-styles.a596482a.cjs +1 -0
- package/packages/_vue3/dist/render-repeated-block.12894c71.js +38 -0
- package/packages/_vue3/dist/render-repeated-block.a95715ec.cjs +1 -0
- package/packages/_vue3/dist/{render-styles.cf6faa29.js → render-styles.90b25836.js} +33 -33
- package/packages/_vue3/dist/render-styles.b6bf070d.cjs +31 -0
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/blocks/button/button.vue.d.ts +19 -8
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +45 -91
- package/packages/_vue3/dist/src/blocks/custom-code/custom-code.vue.d.ts +16 -13
- package/packages/_vue3/dist/src/blocks/embed/embed.vue.d.ts +17 -20
- package/packages/_vue3/dist/src/blocks/fragment/fragment.vue.d.ts +1 -4
- package/packages/_vue3/dist/src/blocks/image/image.vue.d.ts +54 -14
- package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +27 -11
- package/packages/_vue3/dist/src/blocks/section/section.vue.d.ts +12 -7
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +25 -162
- package/packages/_vue3/dist/src/blocks/text/text.vue.d.ts +7 -4
- package/packages/_vue3/dist/src/blocks/video/video.vue.d.ts +42 -7
- package/packages/_vue3/dist/src/components/render-block/block-styles.vue.d.ts +18 -27
- package/packages/_vue3/dist/src/components/render-block/render-block.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +19 -8
- package/packages/_vue3/dist/src/components/render-blocks.vue.d.ts +23 -44
- package/packages/_vue3/dist/src/components/render-content/components/render-styles.vue.d.ts +15 -18
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +77 -129
- package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +12 -11
- package/packages/_vue3/dist/src/index.d.ts +1 -0
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.7c2a87df.cjs +0 -1
- package/packages/_vue2/dist/index.78ba6586.cjs +0 -29
- package/packages/_vue2/dist/render-block.67e4dd65.cjs +0 -3
- package/packages/_vue2/dist/render-component.10d6c8d2.js +0 -37
- package/packages/_vue2/dist/render-component.3578089b.cjs +0 -1
- package/packages/_vue2/dist/render-inlined-styles.56373d13.cjs +0 -1
- package/packages/_vue2/dist/render-inlined-styles.942eb38d.js +0 -33
- package/packages/_vue2/dist/render-repeated-block.18d7fc6e.cjs +0 -1
- package/packages/_vue2/dist/render-styles.de7287b6.cjs +0 -31
- package/packages/_vue3/dist/block-styles.09955b0c.cjs +0 -1
- package/packages/_vue3/dist/block-styles.6bd36a5a.js +0 -69
- package/packages/_vue3/dist/index.cca81180.cjs +0 -29
- package/packages/_vue3/dist/render-block.33cc5768.cjs +0 -3
- package/packages/_vue3/dist/render-component.3bd8dc76.js +0 -26
- package/packages/_vue3/dist/render-component.c0d5e797.cjs +0 -1
- package/packages/_vue3/dist/render-inlined-styles.952d2fff.js +0 -32
- package/packages/_vue3/dist/render-inlined-styles.b55b6667.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.263f0cec.js +0 -37
- package/packages/_vue3/dist/render-repeated-block.c3c9e926.cjs +0 -1
- package/packages/_vue3/dist/render-styles.d1ac3a18.cjs +0 -31
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { openBlock as d, createElementBlock as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as h, openBlock as d, createElementBlock as p, mergeProps as x, toHandlers as T, toDisplayString as H, defineAsyncComponent as S, resolveComponent as w, normalizeClass as V, normalizeStyle as R, createBlock as E, createCommentVNode as v, Fragment as A, renderList as U, createVNode as ee, renderSlot as j, createElementVNode as z } from "vue";
|
|
2
|
+
const fe = h({
|
|
3
3
|
name: "builder-button",
|
|
4
4
|
props: ["attributes", "text", "link", "openLinkInNewTab"],
|
|
5
5
|
methods: {
|
|
6
|
-
filterAttrs: function(
|
|
6
|
+
filterAttrs: function(t = {}, n) {
|
|
7
7
|
const o = "v-on:";
|
|
8
|
-
return Object.keys(
|
|
9
|
-
if (!
|
|
8
|
+
return Object.keys(t).filter((s) => {
|
|
9
|
+
if (!t[s])
|
|
10
10
|
return !1;
|
|
11
|
-
const r =
|
|
12
|
-
return
|
|
11
|
+
const r = s.startsWith(o);
|
|
12
|
+
return n ? r : !r;
|
|
13
13
|
}).reduce(
|
|
14
|
-
(
|
|
15
|
-
...
|
|
16
|
-
[r.replace(o, "")]:
|
|
14
|
+
(s, r) => ({
|
|
15
|
+
...s,
|
|
16
|
+
[r.replace(o, "")]: t[r]
|
|
17
17
|
}),
|
|
18
18
|
{}
|
|
19
19
|
);
|
|
20
20
|
},
|
|
21
21
|
_classStringToObject(e) {
|
|
22
|
-
const
|
|
22
|
+
const t = {};
|
|
23
23
|
if (typeof e != "string")
|
|
24
|
-
return
|
|
25
|
-
const
|
|
26
|
-
for (const o of
|
|
27
|
-
|
|
28
|
-
return
|
|
24
|
+
return t;
|
|
25
|
+
const n = e.trim().split(/\s+/);
|
|
26
|
+
for (const o of n)
|
|
27
|
+
t[o] = !0;
|
|
28
|
+
return t;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
};
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
for (const [o,
|
|
35
|
-
|
|
36
|
-
return
|
|
37
|
-
},
|
|
38
|
-
function
|
|
39
|
-
return
|
|
31
|
+
});
|
|
32
|
+
const f = (e, t) => {
|
|
33
|
+
const n = e.__vccOpts || e;
|
|
34
|
+
for (const [o, s] of t)
|
|
35
|
+
n[o] = s;
|
|
36
|
+
return n;
|
|
37
|
+
}, ge = ["href", "target"];
|
|
38
|
+
function be(e, t, n, o, s, r) {
|
|
39
|
+
return e.link ? (d(), p("a", x({
|
|
40
40
|
key: 0,
|
|
41
41
|
role: "button",
|
|
42
|
-
href:
|
|
43
|
-
target:
|
|
44
|
-
},
|
|
42
|
+
href: e.link,
|
|
43
|
+
target: e.openLinkInNewTab ? "_blank" : void 0
|
|
44
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17, ge)) : (d(), p("button", x({
|
|
45
45
|
key: 1,
|
|
46
|
-
class:
|
|
47
|
-
|
|
46
|
+
class: e._classStringToObject(
|
|
47
|
+
e.attributes.class + " button-1yj9n7yt24z"
|
|
48
48
|
)
|
|
49
|
-
},
|
|
49
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17));
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d"]]), L = (e) => JSON.parse(JSON.stringify(e)), te = {
|
|
52
52
|
small: {
|
|
53
53
|
min: 320,
|
|
54
54
|
default: 321,
|
|
@@ -64,29 +64,29 @@ const be = /* @__PURE__ */ h(he, [["render", ge], ["__scopeId", "data-v-fa5dea7e
|
|
|
64
64
|
default: 991,
|
|
65
65
|
max: 1200
|
|
66
66
|
}
|
|
67
|
-
},
|
|
68
|
-
const
|
|
69
|
-
if (!e || !
|
|
70
|
-
return
|
|
67
|
+
}, Vn = (e, t = te) => `@media (max-width: ${t[e].max}px)`, ve = ({ small: e, medium: t }) => {
|
|
68
|
+
const n = L(te);
|
|
69
|
+
if (!e || !t)
|
|
70
|
+
return n;
|
|
71
71
|
const o = Math.floor(e / 2);
|
|
72
|
-
|
|
72
|
+
n.small = {
|
|
73
73
|
max: e,
|
|
74
74
|
min: o,
|
|
75
75
|
default: o + 1
|
|
76
76
|
};
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
max:
|
|
80
|
-
min:
|
|
81
|
-
default:
|
|
77
|
+
const s = n.small.max + 1;
|
|
78
|
+
n.medium = {
|
|
79
|
+
max: t,
|
|
80
|
+
min: s,
|
|
81
|
+
default: s + 1
|
|
82
82
|
};
|
|
83
|
-
const r =
|
|
84
|
-
return
|
|
83
|
+
const r = n.medium.max + 1;
|
|
84
|
+
return n.large = {
|
|
85
85
|
max: 2e3,
|
|
86
86
|
min: r,
|
|
87
87
|
default: r + 1
|
|
88
|
-
},
|
|
89
|
-
},
|
|
88
|
+
}, n;
|
|
89
|
+
}, _ = "vue3", ke = Symbol(), P = {
|
|
90
90
|
Builder: {
|
|
91
91
|
content: null,
|
|
92
92
|
context: {},
|
|
@@ -98,22 +98,22 @@ const be = /* @__PURE__ */ h(he, [["render", ge], ["__scopeId", "data-v-fa5dea7e
|
|
|
98
98
|
registeredComponents: {},
|
|
99
99
|
inheritedStyles: {}
|
|
100
100
|
},
|
|
101
|
-
key:
|
|
102
|
-
},
|
|
101
|
+
key: ke
|
|
102
|
+
}, Se = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
|
|
103
103
|
throw console.error(
|
|
104
104
|
"Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
|
|
105
105
|
e
|
|
106
106
|
), e;
|
|
107
|
-
}),
|
|
107
|
+
}), we = () => import("./render-inlined-styles.454bc38b.js").then((e) => e.default).catch((e) => {
|
|
108
108
|
throw console.error(
|
|
109
109
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
|
|
110
110
|
e
|
|
111
111
|
), e;
|
|
112
|
-
}),
|
|
112
|
+
}), Ce = h({
|
|
113
113
|
name: "builder-columns",
|
|
114
114
|
components: {
|
|
115
|
-
RenderInlinedStyles:
|
|
116
|
-
RenderBlocks:
|
|
115
|
+
RenderInlinedStyles: S(we),
|
|
116
|
+
RenderBlocks: S(Se)
|
|
117
117
|
},
|
|
118
118
|
props: [
|
|
119
119
|
"space",
|
|
@@ -128,7 +128,7 @@ const be = /* @__PURE__ */ h(he, [["render", ge], ["__scopeId", "data-v-fa5dea7e
|
|
|
128
128
|
cols: this.columns || [],
|
|
129
129
|
stackAt: this.stackColumnsAt || "tablet",
|
|
130
130
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
131
|
-
TARGET:
|
|
131
|
+
TARGET: _
|
|
132
132
|
};
|
|
133
133
|
},
|
|
134
134
|
inject: {
|
|
@@ -146,123 +146,123 @@ const be = /* @__PURE__ */ h(he, [["render", ge], ["__scopeId", "data-v-fa5dea7e
|
|
|
146
146
|
},
|
|
147
147
|
columnsStyles() {
|
|
148
148
|
return `
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
150
|
+
.${this.builderBlock.id}-breakpoints {
|
|
151
|
+
flex-direction: var(--flex-dir-tablet);
|
|
152
|
+
align-items: stretch;
|
|
153
|
+
}
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
156
|
+
width: var(--column-width-tablet) !important;
|
|
157
|
+
margin-left: var(--column-margin-left-tablet) !important;
|
|
158
|
+
}
|
|
158
159
|
}
|
|
159
|
-
}
|
|
160
160
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
@media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
|
|
162
|
+
.${this.builderBlock.id}-breakpoints {
|
|
163
|
+
flex-direction: var(--flex-dir);
|
|
164
|
+
align-items: stretch;
|
|
165
|
+
}
|
|
166
166
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
168
|
+
width: var(--column-width-mobile) !important;
|
|
169
|
+
margin-left: var(--column-margin-left-mobile) !important;
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
`;
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
175
|
methods: {
|
|
176
176
|
getWidth(e) {
|
|
177
|
-
var
|
|
178
|
-
return ((
|
|
177
|
+
var t;
|
|
178
|
+
return ((t = this.cols[e]) == null ? void 0 : t.width) || 100 / this.cols.length;
|
|
179
179
|
},
|
|
180
180
|
getColumnCssWidth(e) {
|
|
181
|
-
const
|
|
182
|
-
return `calc(${this.getWidth(e)}% - ${
|
|
181
|
+
const t = this.gutterSize * (this.cols.length - 1) / this.cols.length;
|
|
182
|
+
return `calc(${this.getWidth(e)}% - ${t}px)`;
|
|
183
183
|
},
|
|
184
184
|
getTabletStyle({
|
|
185
185
|
stackedStyle: e,
|
|
186
|
-
desktopStyle:
|
|
186
|
+
desktopStyle: t
|
|
187
187
|
}) {
|
|
188
|
-
return this.stackAt === "tablet" ? e :
|
|
188
|
+
return this.stackAt === "tablet" ? e : t;
|
|
189
189
|
},
|
|
190
190
|
getMobileStyle({
|
|
191
191
|
stackedStyle: e,
|
|
192
|
-
desktopStyle:
|
|
192
|
+
desktopStyle: t
|
|
193
193
|
}) {
|
|
194
|
-
return this.stackAt === "never" ?
|
|
194
|
+
return this.stackAt === "never" ? t : e;
|
|
195
195
|
},
|
|
196
196
|
columnCssVars(e) {
|
|
197
197
|
e === 0 || this.gutterSize;
|
|
198
|
-
const
|
|
198
|
+
const t = this.getColumnCssWidth(e), n = `${this.gutterSize}px`, o = "100%", s = 0;
|
|
199
199
|
return {
|
|
200
|
-
width:
|
|
201
|
-
"margin-left":
|
|
200
|
+
width: t,
|
|
201
|
+
"margin-left": n,
|
|
202
202
|
"--column-width-mobile": this.getMobileStyle({
|
|
203
203
|
stackedStyle: o,
|
|
204
|
-
desktopStyle:
|
|
204
|
+
desktopStyle: t
|
|
205
205
|
}),
|
|
206
206
|
"--column-margin-left-mobile": this.getMobileStyle({
|
|
207
|
-
stackedStyle:
|
|
208
|
-
desktopStyle:
|
|
207
|
+
stackedStyle: s,
|
|
208
|
+
desktopStyle: n
|
|
209
209
|
}),
|
|
210
210
|
"--column-width-tablet": this.getTabletStyle({
|
|
211
211
|
stackedStyle: o,
|
|
212
|
-
desktopStyle:
|
|
212
|
+
desktopStyle: t
|
|
213
213
|
}),
|
|
214
214
|
"--column-margin-left-tablet": this.getTabletStyle({
|
|
215
|
-
stackedStyle:
|
|
216
|
-
desktopStyle:
|
|
215
|
+
stackedStyle: s,
|
|
216
|
+
desktopStyle: n
|
|
217
217
|
})
|
|
218
218
|
};
|
|
219
219
|
},
|
|
220
220
|
getWidthForBreakpointSize(e) {
|
|
221
|
-
var
|
|
222
|
-
return
|
|
223
|
-
((o = (
|
|
221
|
+
var n, o;
|
|
222
|
+
return ve(
|
|
223
|
+
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
224
224
|
)[e].max;
|
|
225
225
|
},
|
|
226
226
|
_classStringToObject(e) {
|
|
227
|
-
const
|
|
227
|
+
const t = {};
|
|
228
228
|
if (typeof e != "string")
|
|
229
|
-
return
|
|
230
|
-
const
|
|
231
|
-
for (const o of
|
|
232
|
-
|
|
233
|
-
return
|
|
229
|
+
return t;
|
|
230
|
+
const n = e.trim().split(/\s+/);
|
|
231
|
+
for (const o of n)
|
|
232
|
+
t[o] = !0;
|
|
233
|
+
return t;
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
};
|
|
237
|
-
function
|
|
238
|
-
const
|
|
239
|
-
return d(),
|
|
240
|
-
class:
|
|
241
|
-
|
|
242
|
-
`builder-columns ${
|
|
236
|
+
});
|
|
237
|
+
function xe(e, t, n, o, s, r) {
|
|
238
|
+
const i = w("render-inlined-styles"), l = w("render-blocks");
|
|
239
|
+
return d(), p("div", {
|
|
240
|
+
class: V(
|
|
241
|
+
e._classStringToObject(
|
|
242
|
+
`builder-columns ${e.builderBlock.id}-breakpoints div-361b1o6wv2k`
|
|
243
243
|
)
|
|
244
244
|
),
|
|
245
|
-
style:
|
|
245
|
+
style: R(e.columnsCssVars),
|
|
246
246
|
dataSet: {
|
|
247
247
|
"builder-block-name": "builder-columns"
|
|
248
248
|
}
|
|
249
249
|
}, [
|
|
250
|
-
|
|
250
|
+
e.TARGET !== "reactNative" ? (d(), E(i, {
|
|
251
251
|
key: 0,
|
|
252
|
-
styles:
|
|
253
|
-
}, null, 8, ["styles"])) :
|
|
254
|
-
(d(!0),
|
|
255
|
-
key:
|
|
256
|
-
class: "builder-column div-
|
|
257
|
-
style:
|
|
252
|
+
styles: e.columnsStyles
|
|
253
|
+
}, null, 8, ["styles"])) : v("", !0),
|
|
254
|
+
(d(!0), p(A, null, U(e.columns, (a, c) => (d(), p("div", {
|
|
255
|
+
key: c,
|
|
256
|
+
class: "builder-column div-361b1o6wv2k-2",
|
|
257
|
+
style: R(e.columnCssVars(c)),
|
|
258
258
|
dataSet: {
|
|
259
259
|
"builder-block-name": "builder-column"
|
|
260
260
|
}
|
|
261
261
|
}, [
|
|
262
|
-
|
|
262
|
+
ee(l, {
|
|
263
263
|
blocks: a.blocks,
|
|
264
|
-
path: `component.options.columns.${
|
|
265
|
-
parent:
|
|
264
|
+
path: `component.options.columns.${c}.blocks`,
|
|
265
|
+
parent: e.builderBlock.id,
|
|
266
266
|
styleProp: {
|
|
267
267
|
flexGrow: "1"
|
|
268
268
|
}
|
|
@@ -270,49 +270,49 @@ function _e(e, n, t, o, i, r) {
|
|
|
270
270
|
], 4))), 128))
|
|
271
271
|
], 6);
|
|
272
272
|
}
|
|
273
|
-
const
|
|
273
|
+
const Ie = /* @__PURE__ */ f(Ce, [["render", xe], ["__scopeId", "data-v-cb4e9d3e"]]), $e = h({
|
|
274
274
|
name: "builder-fragment-component",
|
|
275
275
|
props: []
|
|
276
|
-
};
|
|
277
|
-
function
|
|
278
|
-
return d(),
|
|
279
|
-
|
|
276
|
+
});
|
|
277
|
+
function Te(e, t, n, o, s, r) {
|
|
278
|
+
return d(), p("span", null, [
|
|
279
|
+
j(e.$slots, "default")
|
|
280
280
|
]);
|
|
281
281
|
}
|
|
282
|
-
const
|
|
283
|
-
function
|
|
282
|
+
const Re = /* @__PURE__ */ f($e, [["render", Te]]);
|
|
283
|
+
function K(e) {
|
|
284
284
|
return e.replace(/http(s)?:/, "");
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
const o = new RegExp("([?&])" +
|
|
288
|
-
return e.match(o) ? e.replace(o, "$1" +
|
|
286
|
+
function Ee(e = "", t, n) {
|
|
287
|
+
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), s = e.indexOf("?") !== -1 ? "&" : "?";
|
|
288
|
+
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + s + t + "=" + encodeURIComponent(n);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !
|
|
290
|
+
function _e(e, t) {
|
|
291
|
+
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
292
292
|
return e;
|
|
293
|
-
if (
|
|
294
|
-
return
|
|
295
|
-
const
|
|
293
|
+
if (t === "master")
|
|
294
|
+
return K(e);
|
|
295
|
+
const n = e.match(
|
|
296
296
|
/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
|
|
297
297
|
);
|
|
298
|
-
if (
|
|
299
|
-
const o = e.split(
|
|
300
|
-
return
|
|
298
|
+
if (n) {
|
|
299
|
+
const o = e.split(n[0]), s = n[3], r = t.match("x") ? t : `${t}x`;
|
|
300
|
+
return K(`${o[0]}_${r}${s}`);
|
|
301
301
|
}
|
|
302
302
|
return null;
|
|
303
303
|
}
|
|
304
304
|
function F(e) {
|
|
305
305
|
if (!e)
|
|
306
306
|
return e;
|
|
307
|
-
const
|
|
307
|
+
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
308
308
|
if (e.match(/builder\.io/)) {
|
|
309
|
-
let
|
|
309
|
+
let n = e;
|
|
310
310
|
const o = Number(e.split("?width=")[1]);
|
|
311
|
-
return isNaN(o) || (
|
|
311
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${Ee(e, "width", s)} ${s}w`).concat([n]).join(", ");
|
|
312
312
|
}
|
|
313
|
-
return e.match(/cdn\.shopify\.com/) ?
|
|
313
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [_e(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
314
314
|
}
|
|
315
|
-
const Ae = {
|
|
315
|
+
const Ae = h({
|
|
316
316
|
name: "builder-image",
|
|
317
317
|
props: [
|
|
318
318
|
"image",
|
|
@@ -330,16 +330,16 @@ const Ae = {
|
|
|
330
330
|
],
|
|
331
331
|
computed: {
|
|
332
332
|
srcSetToUse() {
|
|
333
|
-
var
|
|
334
|
-
const
|
|
335
|
-
if (!
|
|
333
|
+
var n;
|
|
334
|
+
const t = this.image || this.src;
|
|
335
|
+
if (!t || !(t.match(/builder\.io/) || t.match(/cdn\.shopify\.com/)))
|
|
336
336
|
return this.srcset;
|
|
337
|
-
if (this.srcset && ((
|
|
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"), F(
|
|
339
|
+
return console.debug("Removed given srcset"), F(t);
|
|
340
340
|
} else if (this.image && !this.srcset)
|
|
341
|
-
return F(
|
|
342
|
-
return F(
|
|
341
|
+
return F(t);
|
|
342
|
+
return F(t);
|
|
343
343
|
},
|
|
344
344
|
webpSrcSet() {
|
|
345
345
|
var e;
|
|
@@ -358,86 +358,86 @@ const Ae = {
|
|
|
358
358
|
},
|
|
359
359
|
methods: {
|
|
360
360
|
_classStringToObject(e) {
|
|
361
|
-
const
|
|
361
|
+
const t = {};
|
|
362
362
|
if (typeof e != "string")
|
|
363
|
-
return
|
|
364
|
-
const
|
|
365
|
-
for (const o of
|
|
366
|
-
|
|
367
|
-
return
|
|
363
|
+
return t;
|
|
364
|
+
const n = e.trim().split(/\s+/);
|
|
365
|
+
for (const o of n)
|
|
366
|
+
t[o] = !0;
|
|
367
|
+
return t;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
};
|
|
371
|
-
const
|
|
370
|
+
});
|
|
371
|
+
const je = ["srcset"], Ve = ["alt", "role", "src", "srcset", "sizes"], Pe = {
|
|
372
372
|
key: 2,
|
|
373
|
-
class: "div-
|
|
373
|
+
class: "div-7jvpanrlkn-2"
|
|
374
374
|
};
|
|
375
|
-
function Be(e,
|
|
376
|
-
var
|
|
377
|
-
return d(),
|
|
378
|
-
|
|
379
|
-
|
|
375
|
+
function Be(e, t, n, o, s, r) {
|
|
376
|
+
var i, l, a, c;
|
|
377
|
+
return d(), p(A, null, [
|
|
378
|
+
z("picture", null, [
|
|
379
|
+
e.webpSrcSet ? (d(), p("source", {
|
|
380
380
|
key: 0,
|
|
381
381
|
type: "image/webp",
|
|
382
|
-
srcset:
|
|
383
|
-
}, null, 8,
|
|
384
|
-
|
|
382
|
+
srcset: e.webpSrcSet
|
|
383
|
+
}, null, 8, je)) : v("", !0),
|
|
384
|
+
z("img", {
|
|
385
385
|
loading: "lazy",
|
|
386
|
-
alt:
|
|
387
|
-
role:
|
|
388
|
-
style:
|
|
389
|
-
objectPosition:
|
|
390
|
-
objectFit:
|
|
391
|
-
...
|
|
386
|
+
alt: e.altText,
|
|
387
|
+
role: e.altText ? "presentation" : void 0,
|
|
388
|
+
style: R({
|
|
389
|
+
objectPosition: e.backgroundPosition || "center",
|
|
390
|
+
objectFit: e.backgroundSize || "cover",
|
|
391
|
+
...e.aspectRatioCss
|
|
392
392
|
}),
|
|
393
|
-
class:
|
|
394
|
-
|
|
395
|
-
"builder-image" + (
|
|
393
|
+
class: V(
|
|
394
|
+
e._classStringToObject(
|
|
395
|
+
"builder-image" + (e.className ? " " + e.className : "") + " img-7jvpanrlkn"
|
|
396
396
|
)
|
|
397
397
|
),
|
|
398
|
-
src:
|
|
399
|
-
srcset:
|
|
400
|
-
sizes:
|
|
401
|
-
}, null, 14,
|
|
398
|
+
src: e.image,
|
|
399
|
+
srcset: e.srcSetToUse,
|
|
400
|
+
sizes: e.sizes
|
|
401
|
+
}, null, 14, Ve)
|
|
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
|
-
class: "builder-image-sizer div-
|
|
406
|
-
style:
|
|
407
|
-
paddingTop:
|
|
405
|
+
class: "builder-image-sizer div-7jvpanrlkn",
|
|
406
|
+
style: R({
|
|
407
|
+
paddingTop: e.aspectRatio * 100 + "%"
|
|
408
408
|
})
|
|
409
|
-
}, null, 4)) :
|
|
410
|
-
((
|
|
411
|
-
!
|
|
412
|
-
|
|
413
|
-
])) :
|
|
409
|
+
}, null, 4)) : v("", !0),
|
|
410
|
+
((c = (a = e.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length) && e.fitContent ? j(e.$slots, "default", { key: 1 }, void 0, !0) : v("", !0),
|
|
411
|
+
!e.fitContent && e.children ? (d(), p("div", Pe, [
|
|
412
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
413
|
+
])) : v("", !0)
|
|
414
414
|
], 64);
|
|
415
415
|
}
|
|
416
|
-
const Fe = /* @__PURE__ */
|
|
417
|
-
function
|
|
416
|
+
const Fe = /* @__PURE__ */ f(Ae, [["render", Be], ["__scopeId", "data-v-034e3c7d"]]);
|
|
417
|
+
function m() {
|
|
418
418
|
return typeof window < "u" && typeof document < "u";
|
|
419
419
|
}
|
|
420
420
|
function Oe() {
|
|
421
|
-
return
|
|
421
|
+
return m() && window.self !== window.top;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function k() {
|
|
424
424
|
return Oe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
425
425
|
}
|
|
426
|
-
const Ue = () => import("./block-styles.
|
|
426
|
+
const Ue = () => import("./block-styles.f06f105b.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
|
-
}), We = () => import("./render-block.
|
|
431
|
+
}), We = () => import("./render-block.905bcce5.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
|
-
}), Me = {
|
|
436
|
+
}), Me = h({
|
|
437
437
|
name: "render-blocks",
|
|
438
438
|
components: {
|
|
439
|
-
RenderBlock:
|
|
440
|
-
BlockStyles:
|
|
439
|
+
RenderBlock: S(We),
|
|
440
|
+
BlockStyles: S(Ue)
|
|
441
441
|
},
|
|
442
442
|
props: ["blocks", "parent", "path", "styleProp"],
|
|
443
443
|
inject: {
|
|
@@ -451,8 +451,8 @@ const Ue = () => import("./block-styles.6bd36a5a.js").then((e) => e.default).cat
|
|
|
451
451
|
},
|
|
452
452
|
methods: {
|
|
453
453
|
onClick() {
|
|
454
|
-
var e,
|
|
455
|
-
|
|
454
|
+
var e, t;
|
|
455
|
+
k() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
456
456
|
{
|
|
457
457
|
type: "builder.clickEmptyBlocks",
|
|
458
458
|
data: {
|
|
@@ -464,8 +464,8 @@ const Ue = () => import("./block-styles.6bd36a5a.js").then((e) => e.default).cat
|
|
|
464
464
|
));
|
|
465
465
|
},
|
|
466
466
|
onMouseEnter() {
|
|
467
|
-
var e,
|
|
468
|
-
|
|
467
|
+
var e, t;
|
|
468
|
+
k() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
469
469
|
{
|
|
470
470
|
type: "builder.hoverEmptyBlocks",
|
|
471
471
|
data: {
|
|
@@ -477,46 +477,46 @@ const Ue = () => import("./block-styles.6bd36a5a.js").then((e) => e.default).cat
|
|
|
477
477
|
));
|
|
478
478
|
},
|
|
479
479
|
_classStringToObject(e) {
|
|
480
|
-
const
|
|
480
|
+
const t = {};
|
|
481
481
|
if (typeof e != "string")
|
|
482
|
-
return
|
|
483
|
-
const
|
|
484
|
-
for (const o of
|
|
485
|
-
|
|
486
|
-
return
|
|
482
|
+
return t;
|
|
483
|
+
const n = e.trim().split(/\s+/);
|
|
484
|
+
for (const o of n)
|
|
485
|
+
t[o] = !0;
|
|
486
|
+
return t;
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
};
|
|
489
|
+
});
|
|
490
490
|
const Le = ["builder-path", "builder-parent-id", "dataSet"];
|
|
491
|
-
function Ne(e,
|
|
492
|
-
const
|
|
493
|
-
return d(),
|
|
494
|
-
class:
|
|
495
|
-
"builder-path":
|
|
496
|
-
"builder-parent-id":
|
|
491
|
+
function Ne(e, t, n, o, s, r) {
|
|
492
|
+
const i = w("render-block"), l = w("block-styles");
|
|
493
|
+
return d(), p("div", {
|
|
494
|
+
class: V(e._classStringToObject(e.className + " div-7fq9d0i380")),
|
|
495
|
+
"builder-path": e.path,
|
|
496
|
+
"builder-parent-id": e.parent,
|
|
497
497
|
dataSet: {
|
|
498
|
-
class:
|
|
498
|
+
class: e.className
|
|
499
499
|
},
|
|
500
|
-
style:
|
|
501
|
-
onClick:
|
|
502
|
-
onMouseenter:
|
|
500
|
+
style: R(e.styleProp),
|
|
501
|
+
onClick: t[0] || (t[0] = (a) => e.onClick()),
|
|
502
|
+
onMouseenter: t[1] || (t[1] = (a) => e.onMouseEnter())
|
|
503
503
|
}, [
|
|
504
|
-
|
|
504
|
+
e.blocks ? (d(!0), p(A, { key: 0 }, U(e.blocks, (a, c) => (d(), E(i, {
|
|
505
505
|
key: "render-block-" + a.id,
|
|
506
506
|
block: a,
|
|
507
|
-
context:
|
|
508
|
-
}, null, 8, ["block", "context"]))), 128)) :
|
|
509
|
-
|
|
507
|
+
context: e.builderContext
|
|
508
|
+
}, null, 8, ["block", "context"]))), 128)) : v("", !0),
|
|
509
|
+
e.blocks ? (d(!0), p(A, { key: 1 }, U(e.blocks, (a, c) => (d(), E(l, {
|
|
510
510
|
key: "block-style-" + a.id,
|
|
511
511
|
block: a,
|
|
512
|
-
context:
|
|
513
|
-
}, null, 8, ["block", "context"]))), 128)) :
|
|
512
|
+
context: e.builderContext
|
|
513
|
+
}, null, 8, ["block", "context"]))), 128)) : v("", !0)
|
|
514
514
|
], 46, Le);
|
|
515
515
|
}
|
|
516
|
-
const
|
|
516
|
+
const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b"]]), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
517
517
|
__proto__: null,
|
|
518
|
-
default:
|
|
519
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
518
|
+
default: He
|
|
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: {
|
|
@@ -553,9 +553,9 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
553
553
|
static: !0,
|
|
554
554
|
noWrap: !0
|
|
555
555
|
}, B = (e) => {
|
|
556
|
-
const
|
|
557
|
-
return `return (${!
|
|
558
|
-
},
|
|
556
|
+
const t = e.toString().trim();
|
|
557
|
+
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
558
|
+
}, Ke = {
|
|
559
559
|
name: "Columns",
|
|
560
560
|
inputs: [
|
|
561
561
|
{
|
|
@@ -743,17 +743,17 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
743
743
|
}
|
|
744
744
|
],
|
|
745
745
|
onChange: B((e) => {
|
|
746
|
-
function
|
|
747
|
-
|
|
746
|
+
function t() {
|
|
747
|
+
n.forEach((o) => {
|
|
748
748
|
o.delete("width");
|
|
749
749
|
});
|
|
750
750
|
}
|
|
751
|
-
const
|
|
752
|
-
Array.isArray(
|
|
753
|
-
(
|
|
754
|
-
) && (!!
|
|
751
|
+
const n = e.get("columns");
|
|
752
|
+
Array.isArray(n) && !!n.find(
|
|
753
|
+
(s) => s.get("width")
|
|
754
|
+
) && (!!n.find(
|
|
755
755
|
(r) => !r.get("width")
|
|
756
|
-
) ||
|
|
756
|
+
) || n.reduce((l, a) => l + a.get("width"), 0) !== 100) && t();
|
|
757
757
|
})
|
|
758
758
|
},
|
|
759
759
|
{
|
|
@@ -779,13 +779,13 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
779
779
|
advanced: !0
|
|
780
780
|
}
|
|
781
781
|
]
|
|
782
|
-
},
|
|
782
|
+
}, De = {
|
|
783
783
|
name: "Fragment",
|
|
784
784
|
static: !0,
|
|
785
785
|
hidden: !0,
|
|
786
786
|
canHaveChildren: !0,
|
|
787
787
|
noWrap: !0
|
|
788
|
-
},
|
|
788
|
+
}, qe = {
|
|
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",
|
|
@@ -807,29 +807,29 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
807
807
|
onChange: B(
|
|
808
808
|
(e) => {
|
|
809
809
|
e.delete("srcset"), e.delete("noWebp");
|
|
810
|
-
function
|
|
811
|
-
return new Promise((a,
|
|
810
|
+
function n(i, l = 6e4) {
|
|
811
|
+
return new Promise((a, c) => {
|
|
812
812
|
const u = document.createElement("img");
|
|
813
|
-
let
|
|
813
|
+
let b = !1;
|
|
814
814
|
u.onload = () => {
|
|
815
|
-
|
|
816
|
-
}, u.addEventListener("error", (
|
|
817
|
-
console.warn("Image load failed",
|
|
818
|
-
}), u.src =
|
|
819
|
-
|
|
820
|
-
},
|
|
815
|
+
b = !0, a(u);
|
|
816
|
+
}, u.addEventListener("error", (g) => {
|
|
817
|
+
console.warn("Image load failed", g.error), c(g.error);
|
|
818
|
+
}), u.src = i, setTimeout(() => {
|
|
819
|
+
b || c(new Error("Image load timed out"));
|
|
820
|
+
}, l);
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
|
-
function o(
|
|
824
|
-
return Math.round(
|
|
823
|
+
function o(i) {
|
|
824
|
+
return Math.round(i * 1e3) / 1e3;
|
|
825
825
|
}
|
|
826
|
-
const
|
|
827
|
-
if (fetch(
|
|
828
|
-
|
|
829
|
-
}),
|
|
830
|
-
return
|
|
831
|
-
const
|
|
832
|
-
e.get("image") ===
|
|
826
|
+
const s = e.get("image"), r = e.get("aspectRatio");
|
|
827
|
+
if (fetch(s).then((i) => i.blob()).then((i) => {
|
|
828
|
+
i.type.includes("svg") && e.set("noWebp", !0);
|
|
829
|
+
}), s && (!r || r === 0.7041))
|
|
830
|
+
return n(s).then((i) => {
|
|
831
|
+
const l = e.get("aspectRatio");
|
|
832
|
+
e.get("image") === s && (!l || l === 0.7041) && i.width && i.height && (e.set("aspectRatio", o(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
|
|
833
833
|
});
|
|
834
834
|
}
|
|
835
835
|
)
|
|
@@ -912,7 +912,7 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
912
912
|
defaultValue: 0.7041
|
|
913
913
|
}
|
|
914
914
|
]
|
|
915
|
-
},
|
|
915
|
+
}, Ge = {
|
|
916
916
|
name: "Core:Section",
|
|
917
917
|
static: !0,
|
|
918
918
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -956,46 +956,46 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
]
|
|
959
|
-
},
|
|
959
|
+
}, Je = h({
|
|
960
960
|
name: "builder-section-component",
|
|
961
961
|
props: ["maxWidth", "attributes"],
|
|
962
962
|
methods: {
|
|
963
|
-
filterAttrs: function(
|
|
963
|
+
filterAttrs: function(t = {}, n) {
|
|
964
964
|
const o = "v-on:";
|
|
965
|
-
return Object.keys(
|
|
966
|
-
if (!
|
|
965
|
+
return Object.keys(t).filter((s) => {
|
|
966
|
+
if (!t[s])
|
|
967
967
|
return !1;
|
|
968
|
-
const r =
|
|
969
|
-
return
|
|
968
|
+
const r = s.startsWith(o);
|
|
969
|
+
return n ? r : !r;
|
|
970
970
|
}).reduce(
|
|
971
|
-
(
|
|
972
|
-
...
|
|
973
|
-
[r.replace(o, "")]:
|
|
971
|
+
(s, r) => ({
|
|
972
|
+
...s,
|
|
973
|
+
[r.replace(o, "")]: t[r]
|
|
974
974
|
}),
|
|
975
975
|
{}
|
|
976
976
|
);
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
};
|
|
980
|
-
function
|
|
981
|
-
return d(),
|
|
979
|
+
});
|
|
980
|
+
function Xe(e, t, n, o, s, r) {
|
|
981
|
+
return d(), p("section", x({
|
|
982
982
|
style: {
|
|
983
983
|
width: "100%",
|
|
984
984
|
alignSelf: "stretch",
|
|
985
985
|
flexGrow: 1,
|
|
986
986
|
boxSizing: "border-box",
|
|
987
|
-
maxWidth:
|
|
987
|
+
maxWidth: e.maxWidth || 1200,
|
|
988
988
|
display: "flex",
|
|
989
989
|
flexDirection: "column",
|
|
990
990
|
alignItems: "stretch",
|
|
991
991
|
marginLeft: "auto",
|
|
992
992
|
marginRight: "auto"
|
|
993
993
|
}
|
|
994
|
-
},
|
|
995
|
-
|
|
994
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), [
|
|
995
|
+
j(e.$slots, "default")
|
|
996
996
|
], 16);
|
|
997
997
|
}
|
|
998
|
-
const
|
|
998
|
+
const Ye = /* @__PURE__ */ f(Je, [["render", Xe]]), Qe = {
|
|
999
999
|
name: "Symbol",
|
|
1000
1000
|
noWrap: !0,
|
|
1001
1001
|
static: !0,
|
|
@@ -1033,16 +1033,16 @@ const Xe = /* @__PURE__ */ h(Ge, [["render", Je]]), Ye = {
|
|
|
1033
1033
|
type: "boolean"
|
|
1034
1034
|
}
|
|
1035
1035
|
]
|
|
1036
|
-
}, O = "[Builder.io]: ",
|
|
1036
|
+
}, O = "[Builder.io]: ", C = {
|
|
1037
1037
|
log: (...e) => console.log(O, ...e),
|
|
1038
1038
|
error: (...e) => console.error(O, ...e),
|
|
1039
1039
|
warn: (...e) => console.warn(O, ...e)
|
|
1040
1040
|
};
|
|
1041
|
-
function
|
|
1041
|
+
function Ze() {
|
|
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 et() {
|
|
1045
|
+
const e = Ze().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,221 +1050,221 @@ function Ze() {
|
|
|
1050
1050
|
), new Error("Builder SDK could not find a global `fetch` function");
|
|
1051
1051
|
return e;
|
|
1052
1052
|
}
|
|
1053
|
-
const
|
|
1053
|
+
const oe = et(), I = (e) => e != null, tt = (e) => {
|
|
1054
1054
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1055
1055
|
return e;
|
|
1056
|
-
const
|
|
1057
|
-
return
|
|
1058
|
-
},
|
|
1056
|
+
const t = e.split(".");
|
|
1057
|
+
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
1058
|
+
}, se = async ({
|
|
1059
1059
|
name: e,
|
|
1060
|
-
canTrack:
|
|
1060
|
+
canTrack: t
|
|
1061
1061
|
}) => {
|
|
1062
|
-
var
|
|
1062
|
+
var n;
|
|
1063
1063
|
try {
|
|
1064
|
-
return
|
|
1064
|
+
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
1065
1065
|
} catch (o) {
|
|
1066
1066
|
console.debug("[COOKIE] GET error: ", o);
|
|
1067
1067
|
return;
|
|
1068
1068
|
}
|
|
1069
|
-
},
|
|
1069
|
+
}, nt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "), ot = [
|
|
1070
1070
|
["secure", ""],
|
|
1071
1071
|
["SameSite", "None"]
|
|
1072
|
-
],
|
|
1072
|
+
], st = ({
|
|
1073
1073
|
name: e,
|
|
1074
|
-
value:
|
|
1075
|
-
expires:
|
|
1074
|
+
value: t,
|
|
1075
|
+
expires: n
|
|
1076
1076
|
}) => {
|
|
1077
|
-
const
|
|
1078
|
-
[e,
|
|
1077
|
+
const s = (m() ? location.protocol === "https:" : !0) ? ot : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [
|
|
1078
|
+
[e, t],
|
|
1079
1079
|
...r,
|
|
1080
1080
|
["path", "/"],
|
|
1081
|
-
["domain",
|
|
1082
|
-
...
|
|
1081
|
+
["domain", tt(window.location.hostname)],
|
|
1082
|
+
...s
|
|
1083
1083
|
];
|
|
1084
|
-
return
|
|
1085
|
-
},
|
|
1084
|
+
return nt(i);
|
|
1085
|
+
}, re = async ({
|
|
1086
1086
|
name: e,
|
|
1087
|
-
value:
|
|
1088
|
-
expires:
|
|
1087
|
+
value: t,
|
|
1088
|
+
expires: n,
|
|
1089
1089
|
canTrack: o
|
|
1090
1090
|
}) => {
|
|
1091
1091
|
try {
|
|
1092
1092
|
if (!o)
|
|
1093
1093
|
return;
|
|
1094
|
-
const
|
|
1095
|
-
document.cookie =
|
|
1096
|
-
} catch (
|
|
1097
|
-
console.warn("[COOKIE] SET error: ",
|
|
1094
|
+
const s = st({ name: e, value: t, expires: n });
|
|
1095
|
+
document.cookie = s;
|
|
1096
|
+
} catch (s) {
|
|
1097
|
+
console.warn("[COOKIE] SET error: ", s);
|
|
1098
1098
|
}
|
|
1099
|
-
},
|
|
1099
|
+
}, rt = "builderio.variations", ie = (e) => `${rt}.${e}`, it = ({
|
|
1100
1100
|
contentId: e,
|
|
1101
|
-
canTrack:
|
|
1102
|
-
}) =>
|
|
1101
|
+
canTrack: t
|
|
1102
|
+
}) => se({ name: ie(e), canTrack: t }), at = ({
|
|
1103
1103
|
contentId: e,
|
|
1104
|
-
canTrack:
|
|
1105
|
-
value:
|
|
1106
|
-
}) =>
|
|
1104
|
+
canTrack: t,
|
|
1105
|
+
value: n
|
|
1106
|
+
}) => re({ name: ie(e), value: n, canTrack: t }), lt = (e) => I(e.id) && I(e.variations) && Object.keys(e.variations).length > 0, ct = ({
|
|
1107
1107
|
id: e,
|
|
1108
|
-
variations:
|
|
1108
|
+
variations: t
|
|
1109
1109
|
}) => {
|
|
1110
|
-
var
|
|
1111
|
-
let
|
|
1110
|
+
var s;
|
|
1111
|
+
let n = 0;
|
|
1112
1112
|
const o = Math.random();
|
|
1113
|
-
for (const r in
|
|
1114
|
-
const
|
|
1115
|
-
if (
|
|
1113
|
+
for (const r in t) {
|
|
1114
|
+
const i = (s = t[r]) == null ? void 0 : s.testRatio;
|
|
1115
|
+
if (n += i, o < n)
|
|
1116
1116
|
return r;
|
|
1117
1117
|
}
|
|
1118
1118
|
return e;
|
|
1119
|
-
},
|
|
1119
|
+
}, D = ({
|
|
1120
1120
|
item: e,
|
|
1121
|
-
testGroupId:
|
|
1121
|
+
testGroupId: t
|
|
1122
1122
|
}) => {
|
|
1123
|
-
const
|
|
1124
|
-
return
|
|
1123
|
+
const n = e.variations[t];
|
|
1124
|
+
return t === e.id || !n ? {
|
|
1125
1125
|
testVariationId: e.id,
|
|
1126
1126
|
testVariationName: "Default"
|
|
1127
1127
|
} : {
|
|
1128
|
-
data:
|
|
1129
|
-
testVariationId:
|
|
1130
|
-
testVariationName:
|
|
1128
|
+
data: n.data,
|
|
1129
|
+
testVariationId: n.id,
|
|
1130
|
+
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
1131
1131
|
};
|
|
1132
|
-
},
|
|
1132
|
+
}, dt = async ({
|
|
1133
1133
|
item: e,
|
|
1134
|
-
canTrack:
|
|
1134
|
+
canTrack: t
|
|
1135
1135
|
}) => {
|
|
1136
|
-
const
|
|
1137
|
-
canTrack:
|
|
1136
|
+
const n = await it({
|
|
1137
|
+
canTrack: t,
|
|
1138
1138
|
contentId: e.id
|
|
1139
|
-
}), o =
|
|
1139
|
+
}), o = n ? D({ item: e, testGroupId: n }) : void 0;
|
|
1140
1140
|
if (o)
|
|
1141
1141
|
return o;
|
|
1142
1142
|
{
|
|
1143
|
-
const
|
|
1143
|
+
const s = ct({
|
|
1144
1144
|
variations: e.variations,
|
|
1145
1145
|
id: e.id
|
|
1146
1146
|
});
|
|
1147
|
-
return
|
|
1147
|
+
return at({
|
|
1148
1148
|
contentId: e.id,
|
|
1149
|
-
value:
|
|
1150
|
-
canTrack:
|
|
1149
|
+
value: s,
|
|
1150
|
+
canTrack: t
|
|
1151
1151
|
}).catch((r) => {
|
|
1152
1152
|
console.error("could not store A/B test variation: ", r);
|
|
1153
|
-
}),
|
|
1153
|
+
}), D({ item: e, testGroupId: s });
|
|
1154
1154
|
}
|
|
1155
|
-
},
|
|
1155
|
+
}, ut = async ({
|
|
1156
1156
|
item: e,
|
|
1157
|
-
canTrack:
|
|
1157
|
+
canTrack: t
|
|
1158
1158
|
}) => {
|
|
1159
|
-
if (!
|
|
1159
|
+
if (!lt(e))
|
|
1160
1160
|
return;
|
|
1161
|
-
const
|
|
1162
|
-
Object.assign(e,
|
|
1161
|
+
const n = await dt({ item: e, canTrack: t });
|
|
1162
|
+
Object.assign(e, n);
|
|
1163
1163
|
};
|
|
1164
|
-
function W(e,
|
|
1165
|
-
return Object.keys(e).reduce((o,
|
|
1166
|
-
const r = e[
|
|
1164
|
+
function W(e, t = null, n = ".") {
|
|
1165
|
+
return Object.keys(e).reduce((o, s) => {
|
|
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, ...W(r,
|
|
1171
|
+
].every(Boolean) ? { ...o, ...W(r, i, n) } : { ...o, [i]: r };
|
|
1172
1172
|
}, {});
|
|
1173
1173
|
}
|
|
1174
|
-
const
|
|
1175
|
-
const
|
|
1176
|
-
return e.forEach((
|
|
1177
|
-
|
|
1178
|
-
}),
|
|
1179
|
-
},
|
|
1174
|
+
const q = "builder.", pt = "options.", mt = (e) => {
|
|
1175
|
+
const t = {};
|
|
1176
|
+
return e.forEach((n, o) => {
|
|
1177
|
+
t[o] = n;
|
|
1178
|
+
}), t;
|
|
1179
|
+
}, ht = (e) => {
|
|
1180
1180
|
if (!e)
|
|
1181
1181
|
return {};
|
|
1182
|
-
const
|
|
1183
|
-
return Object.keys(
|
|
1184
|
-
if (o.startsWith(
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1182
|
+
const t = ae(e), n = {};
|
|
1183
|
+
return Object.keys(t).forEach((o) => {
|
|
1184
|
+
if (o.startsWith(q)) {
|
|
1185
|
+
const s = o.replace(q, "").replace(pt, "");
|
|
1186
|
+
n[s] = t[o];
|
|
1187
1187
|
}
|
|
1188
|
-
}),
|
|
1189
|
-
},
|
|
1190
|
-
if (!
|
|
1188
|
+
}), n;
|
|
1189
|
+
}, ft = () => {
|
|
1190
|
+
if (!m())
|
|
1191
1191
|
return {};
|
|
1192
1192
|
const e = new URLSearchParams(window.location.search);
|
|
1193
|
-
return
|
|
1194
|
-
},
|
|
1193
|
+
return ht(e);
|
|
1194
|
+
}, ae = (e) => e instanceof URLSearchParams ? mt(e) : e, gt = "v3", bt = (e) => {
|
|
1195
1195
|
const {
|
|
1196
|
-
limit:
|
|
1197
|
-
userAttributes:
|
|
1196
|
+
limit: t = 30,
|
|
1197
|
+
userAttributes: n,
|
|
1198
1198
|
query: o,
|
|
1199
|
-
noTraverse:
|
|
1199
|
+
noTraverse: s = !1,
|
|
1200
1200
|
model: r,
|
|
1201
|
-
apiKey:
|
|
1202
|
-
includeRefs:
|
|
1201
|
+
apiKey: i,
|
|
1202
|
+
includeRefs: l = !0,
|
|
1203
1203
|
locale: a,
|
|
1204
|
-
apiVersion:
|
|
1204
|
+
apiVersion: c = gt
|
|
1205
1205
|
} = e;
|
|
1206
|
-
if (!
|
|
1206
|
+
if (!i)
|
|
1207
1207
|
throw new Error("Missing API key");
|
|
1208
|
-
if (!["v2", "v3"].includes(
|
|
1208
|
+
if (!["v2", "v3"].includes(c))
|
|
1209
1209
|
throw new Error(
|
|
1210
|
-
`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
1210
|
+
`Invalid apiVersion: expected 'v2' or 'v3', received '${c}'`
|
|
1211
1211
|
);
|
|
1212
1212
|
const u = new URL(
|
|
1213
|
-
`https://cdn.builder.io/api/${
|
|
1214
|
-
),
|
|
1215
|
-
...
|
|
1216
|
-
...
|
|
1217
|
-
},
|
|
1218
|
-
for (const
|
|
1219
|
-
u.searchParams.set(
|
|
1220
|
-
if (
|
|
1221
|
-
const
|
|
1222
|
-
for (const
|
|
1223
|
-
u.searchParams.set(
|
|
1213
|
+
`https://cdn.builder.io/api/${c}/content/${r}?apiKey=${i}&limit=${t}&noTraverse=${s}&includeRefs=${l}${a ? `&locale=${a}` : ""}`
|
|
1214
|
+
), b = {
|
|
1215
|
+
...ft(),
|
|
1216
|
+
...ae(e.options || {})
|
|
1217
|
+
}, g = W(b);
|
|
1218
|
+
for (const y in g)
|
|
1219
|
+
u.searchParams.set(y, String(g[y]));
|
|
1220
|
+
if (n && u.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
1221
|
+
const y = W({ query: o });
|
|
1222
|
+
for (const $ in y)
|
|
1223
|
+
u.searchParams.set($, JSON.stringify(y[$]));
|
|
1224
1224
|
}
|
|
1225
1225
|
return u;
|
|
1226
1226
|
};
|
|
1227
|
-
async function
|
|
1228
|
-
const
|
|
1229
|
-
return
|
|
1227
|
+
async function le(e) {
|
|
1228
|
+
const t = await yt({ ...e, limit: 1 });
|
|
1229
|
+
return t && "results" in t && (t == null ? void 0 : t.results[0]) || null;
|
|
1230
1230
|
}
|
|
1231
|
-
async function
|
|
1231
|
+
async function yt(e) {
|
|
1232
1232
|
try {
|
|
1233
|
-
const
|
|
1233
|
+
const t = bt(e), o = await (await oe(t.href)).json();
|
|
1234
1234
|
if ("status" in o && !("results" in o))
|
|
1235
|
-
return
|
|
1236
|
-
const
|
|
1235
|
+
return C.error("Error fetching data. ", { url: t, content: o, options: e }), o;
|
|
1236
|
+
const s = e.canTrack !== !1;
|
|
1237
1237
|
try {
|
|
1238
|
-
if (
|
|
1238
|
+
if (s && Array.isArray(o.results))
|
|
1239
1239
|
for (const r of o.results)
|
|
1240
|
-
await
|
|
1240
|
+
await ut({ item: r, canTrack: s });
|
|
1241
1241
|
} catch (r) {
|
|
1242
|
-
|
|
1242
|
+
C.error("Could not setup A/B testing. ", r);
|
|
1243
1243
|
}
|
|
1244
1244
|
return o;
|
|
1245
|
-
} catch (
|
|
1246
|
-
return
|
|
1245
|
+
} catch (t) {
|
|
1246
|
+
return C.error("Error fetching data. ", t), null;
|
|
1247
1247
|
}
|
|
1248
1248
|
}
|
|
1249
|
-
const
|
|
1249
|
+
const vt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((e) => {
|
|
1250
1250
|
throw console.error(
|
|
1251
1251
|
"Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
|
|
1252
1252
|
e
|
|
1253
1253
|
), e;
|
|
1254
|
-
}),
|
|
1254
|
+
}), kt = h({
|
|
1255
1255
|
name: "builder-symbol",
|
|
1256
|
-
components: { RenderContent:
|
|
1256
|
+
components: { RenderContent: S(vt) },
|
|
1257
1257
|
props: ["attributes", "symbol", "dynamic"],
|
|
1258
1258
|
data() {
|
|
1259
|
-
var e,
|
|
1259
|
+
var e, t, n;
|
|
1260
1260
|
return {
|
|
1261
1261
|
className: [
|
|
1262
1262
|
...Object.keys(this.attributes.class),
|
|
1263
1263
|
"builder-symbol",
|
|
1264
1264
|
(e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
|
|
1265
|
-
((
|
|
1265
|
+
((t = this.symbol) == null ? void 0 : t.dynamic) || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
1266
1266
|
].filter(Boolean).join(" "),
|
|
1267
|
-
contentToUse: (
|
|
1267
|
+
contentToUse: (n = this.symbol) == null ? void 0 : n.content
|
|
1268
1268
|
};
|
|
1269
1269
|
},
|
|
1270
1270
|
inject: {
|
|
@@ -1290,71 +1290,71 @@ const yt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((
|
|
|
1290
1290
|
},
|
|
1291
1291
|
methods: {
|
|
1292
1292
|
fetchContent() {
|
|
1293
|
-
var e,
|
|
1294
|
-
!this.contentToUse && ((e = this.symbol) == null ? void 0 : e.model) && ((
|
|
1293
|
+
var e, t;
|
|
1294
|
+
!this.contentToUse && ((e = this.symbol) == null ? void 0 : e.model) && ((t = this.builderContext) == null ? void 0 : t.apiKey) && le({
|
|
1295
1295
|
model: this.symbol.model,
|
|
1296
1296
|
apiKey: this.builderContext.apiKey,
|
|
1297
1297
|
apiVersion: this.builderContext.apiVersion,
|
|
1298
1298
|
query: {
|
|
1299
1299
|
id: this.symbol.entry
|
|
1300
1300
|
}
|
|
1301
|
-
}).then((
|
|
1302
|
-
|
|
1303
|
-
}).catch((
|
|
1304
|
-
|
|
1301
|
+
}).then((n) => {
|
|
1302
|
+
n && (this.contentToUse = n);
|
|
1303
|
+
}).catch((n) => {
|
|
1304
|
+
C.error("Could not fetch symbol content: ", n);
|
|
1305
1305
|
});
|
|
1306
1306
|
},
|
|
1307
|
-
filterAttrs: function(
|
|
1307
|
+
filterAttrs: function(t = {}, n) {
|
|
1308
1308
|
const o = "v-on:";
|
|
1309
|
-
return Object.keys(
|
|
1310
|
-
if (!
|
|
1309
|
+
return Object.keys(t).filter((s) => {
|
|
1310
|
+
if (!t[s])
|
|
1311
1311
|
return !1;
|
|
1312
|
-
const r =
|
|
1313
|
-
return
|
|
1312
|
+
const r = s.startsWith(o);
|
|
1313
|
+
return n ? r : !r;
|
|
1314
1314
|
}).reduce(
|
|
1315
|
-
(
|
|
1316
|
-
...
|
|
1317
|
-
[r.replace(o, "")]:
|
|
1315
|
+
(s, r) => ({
|
|
1316
|
+
...s,
|
|
1317
|
+
[r.replace(o, "")]: t[r]
|
|
1318
1318
|
}),
|
|
1319
1319
|
{}
|
|
1320
1320
|
);
|
|
1321
1321
|
},
|
|
1322
1322
|
_classStringToObject(e) {
|
|
1323
|
-
const
|
|
1323
|
+
const t = {};
|
|
1324
1324
|
if (typeof e != "string")
|
|
1325
|
-
return
|
|
1326
|
-
const
|
|
1327
|
-
for (const o of
|
|
1328
|
-
|
|
1329
|
-
return
|
|
1325
|
+
return t;
|
|
1326
|
+
const n = e.trim().split(/\s+/);
|
|
1327
|
+
for (const o of n)
|
|
1328
|
+
t[o] = !0;
|
|
1329
|
+
return t;
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
|
-
},
|
|
1333
|
-
function
|
|
1334
|
-
var
|
|
1335
|
-
const
|
|
1336
|
-
return d(),
|
|
1332
|
+
}), St = ["dataSet"];
|
|
1333
|
+
function wt(e, t, n, o, s, r) {
|
|
1334
|
+
var l, a, c, u;
|
|
1335
|
+
const i = w("render-content");
|
|
1336
|
+
return d(), p("div", x({
|
|
1337
1337
|
dataSet: {
|
|
1338
|
-
class:
|
|
1339
|
-
},
|
|
1340
|
-
class:
|
|
1341
|
-
},
|
|
1342
|
-
|
|
1343
|
-
apiVersion:
|
|
1344
|
-
apiKey:
|
|
1345
|
-
context:
|
|
1346
|
-
customComponents: Object.values(
|
|
1338
|
+
class: e.className
|
|
1339
|
+
},
|
|
1340
|
+
class: e._classStringToObject(e.className)
|
|
1341
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), [
|
|
1342
|
+
ee(i, {
|
|
1343
|
+
apiVersion: e.builderContext.apiVersion,
|
|
1344
|
+
apiKey: e.builderContext.apiKey,
|
|
1345
|
+
context: e.builderContext.context,
|
|
1346
|
+
customComponents: Object.values(e.builderContext.registeredComponents),
|
|
1347
1347
|
data: {
|
|
1348
|
-
...(
|
|
1349
|
-
...
|
|
1350
|
-
...(
|
|
1348
|
+
...(l = e.symbol) == null ? void 0 : l.data,
|
|
1349
|
+
...e.builderContext.state,
|
|
1350
|
+
...(c = (a = e.contentToUse) == null ? void 0 : a.data) == null ? void 0 : c.state
|
|
1351
1351
|
},
|
|
1352
|
-
model: (u =
|
|
1353
|
-
content:
|
|
1352
|
+
model: (u = e.symbol) == null ? void 0 : u.model,
|
|
1353
|
+
content: e.contentToUse
|
|
1354
1354
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content"])
|
|
1355
|
-
], 16,
|
|
1355
|
+
], 16, St);
|
|
1356
1356
|
}
|
|
1357
|
-
const
|
|
1357
|
+
const Ct = /* @__PURE__ */ f(kt, [["render", wt]]), xt = {
|
|
1358
1358
|
name: "Text",
|
|
1359
1359
|
static: !0,
|
|
1360
1360
|
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 +1373,20 @@ const St = /* @__PURE__ */ h(vt, [["render", kt]]), _t = {
|
|
|
1373
1373
|
height: "auto",
|
|
1374
1374
|
textAlign: "center"
|
|
1375
1375
|
}
|
|
1376
|
-
},
|
|
1376
|
+
}, It = h({
|
|
1377
1377
|
name: "builder-text",
|
|
1378
1378
|
props: ["text"]
|
|
1379
|
-
},
|
|
1380
|
-
function
|
|
1381
|
-
return d(),
|
|
1379
|
+
}), $t = ["innerHTML"];
|
|
1380
|
+
function Tt(e, t, n, o, s, r) {
|
|
1381
|
+
return d(), p("span", {
|
|
1382
1382
|
class: "builder-text",
|
|
1383
|
-
innerHTML:
|
|
1383
|
+
innerHTML: e.text,
|
|
1384
1384
|
style: {
|
|
1385
1385
|
outline: "none"
|
|
1386
1386
|
}
|
|
1387
|
-
}, null, 8,
|
|
1387
|
+
}, null, 8, $t);
|
|
1388
1388
|
}
|
|
1389
|
-
const
|
|
1389
|
+
const Rt = /* @__PURE__ */ f(It, [["render", Tt]]), Et = {
|
|
1390
1390
|
name: "Video",
|
|
1391
1391
|
canHaveChildren: !0,
|
|
1392
1392
|
defaultStyles: {
|
|
@@ -1487,7 +1487,7 @@ const Tt = /* @__PURE__ */ h(wt, [["render", It]]), Rt = {
|
|
|
1487
1487
|
advanced: !0
|
|
1488
1488
|
}
|
|
1489
1489
|
]
|
|
1490
|
-
},
|
|
1490
|
+
}, _t = h({
|
|
1491
1491
|
name: "builder-video",
|
|
1492
1492
|
props: [
|
|
1493
1493
|
"autoPlay",
|
|
@@ -1528,23 +1528,23 @@ const Tt = /* @__PURE__ */ h(wt, [["render", It]]), Rt = {
|
|
|
1528
1528
|
};
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
|
-
}, At = ["src", "poster"];
|
|
1532
|
-
function
|
|
1533
|
-
var
|
|
1534
|
-
return d(),
|
|
1531
|
+
}), At = ["src", "poster"];
|
|
1532
|
+
function jt(e, t, n, o, s, r) {
|
|
1533
|
+
var i;
|
|
1534
|
+
return d(), p("video", x({
|
|
1535
1535
|
style: {
|
|
1536
1536
|
width: "100%",
|
|
1537
1537
|
height: "100%",
|
|
1538
|
-
...(
|
|
1539
|
-
objectFit:
|
|
1540
|
-
objectPosition:
|
|
1538
|
+
...(i = e.attributes) == null ? void 0 : i.style,
|
|
1539
|
+
objectFit: e.fit,
|
|
1540
|
+
objectPosition: e.position,
|
|
1541
1541
|
borderRadius: 1
|
|
1542
1542
|
},
|
|
1543
|
-
src:
|
|
1544
|
-
poster:
|
|
1545
|
-
},
|
|
1543
|
+
src: e.video || "no-src",
|
|
1544
|
+
poster: e.posterImage
|
|
1545
|
+
}, e.spreadProps), null, 16, At);
|
|
1546
1546
|
}
|
|
1547
|
-
const
|
|
1547
|
+
const Vt = /* @__PURE__ */ f(_t, [["render", jt]]), Pt = {
|
|
1548
1548
|
name: "Embed",
|
|
1549
1549
|
static: !0,
|
|
1550
1550
|
inputs: [
|
|
@@ -1556,12 +1556,12 @@ const jt = /* @__PURE__ */ h(Et, [["render", Vt]]), Pt = {
|
|
|
1556
1556
|
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1557
1557
|
onChange: B(
|
|
1558
1558
|
(e) => {
|
|
1559
|
-
const
|
|
1560
|
-
if (
|
|
1559
|
+
const t = e.get("url");
|
|
1560
|
+
if (t)
|
|
1561
1561
|
return e.set("content", "Loading..."), fetch(
|
|
1562
|
-
`https://iframe.ly/api/iframely?url=${
|
|
1562
|
+
`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`
|
|
1563
1563
|
).then((o) => o.json()).then((o) => {
|
|
1564
|
-
e.get("url") ===
|
|
1564
|
+
e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
|
|
1565
1565
|
}).catch((o) => {
|
|
1566
1566
|
e.set(
|
|
1567
1567
|
"content",
|
|
@@ -1583,7 +1583,7 @@ const jt = /* @__PURE__ */ h(Et, [["render", Vt]]), Pt = {
|
|
|
1583
1583
|
"text/javascript",
|
|
1584
1584
|
"application/javascript",
|
|
1585
1585
|
"application/ecmascript"
|
|
1586
|
-
], Ft = (e) => Bt.includes(e.type), Ot = {
|
|
1586
|
+
], Ft = (e) => Bt.includes(e.type), Ot = h({
|
|
1587
1587
|
name: "builder-embed",
|
|
1588
1588
|
props: ["content"],
|
|
1589
1589
|
data() {
|
|
@@ -1610,30 +1610,30 @@ const jt = /* @__PURE__ */ h(Et, [["render", Vt]]), Pt = {
|
|
|
1610
1610
|
if (!this.$refs.elem || !this.$refs.elem.getElementsByTagName)
|
|
1611
1611
|
return;
|
|
1612
1612
|
const e = this.$refs.elem.getElementsByTagName("script");
|
|
1613
|
-
for (let
|
|
1614
|
-
const
|
|
1615
|
-
if (
|
|
1616
|
-
this.scriptsInserted.push(
|
|
1613
|
+
for (let t = 0; t < e.length; t++) {
|
|
1614
|
+
const n = e[t];
|
|
1615
|
+
if (n.src && !this.scriptsInserted.includes(n.src)) {
|
|
1616
|
+
this.scriptsInserted.push(n.src);
|
|
1617
1617
|
const o = document.createElement("script");
|
|
1618
|
-
o.async = !0, o.src =
|
|
1619
|
-
} else if (Ft(
|
|
1618
|
+
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
1619
|
+
} else if (Ft(n) && !this.scriptsRun.includes(n.innerText))
|
|
1620
1620
|
try {
|
|
1621
|
-
this.scriptsRun.push(
|
|
1621
|
+
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
1622
1622
|
} catch (o) {
|
|
1623
1623
|
console.warn("`Embed`: Error running script:", o);
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
}
|
|
1627
1627
|
}
|
|
1628
|
-
}, Ut = ["innerHTML"];
|
|
1629
|
-
function Wt(e,
|
|
1630
|
-
return d(),
|
|
1628
|
+
}), Ut = ["innerHTML"];
|
|
1629
|
+
function Wt(e, t, n, o, s, r) {
|
|
1630
|
+
return d(), p("div", {
|
|
1631
1631
|
class: "builder-embed",
|
|
1632
1632
|
ref: "elem",
|
|
1633
|
-
innerHTML:
|
|
1633
|
+
innerHTML: e.content
|
|
1634
1634
|
}, null, 8, Ut);
|
|
1635
1635
|
}
|
|
1636
|
-
const Mt = /* @__PURE__ */
|
|
1636
|
+
const Mt = /* @__PURE__ */ f(Ot, [["render", Wt]]), Lt = h({
|
|
1637
1637
|
name: "builder-img-component",
|
|
1638
1638
|
props: [
|
|
1639
1639
|
"backgroundSize",
|
|
@@ -1644,38 +1644,38 @@ const Mt = /* @__PURE__ */ h(Ot, [["render", Wt]]), Lt = {
|
|
|
1644
1644
|
"attributes"
|
|
1645
1645
|
],
|
|
1646
1646
|
data() {
|
|
1647
|
-
return { isEditing:
|
|
1647
|
+
return { isEditing: k };
|
|
1648
1648
|
},
|
|
1649
1649
|
methods: {
|
|
1650
|
-
filterAttrs: function(
|
|
1650
|
+
filterAttrs: function(t = {}, n) {
|
|
1651
1651
|
const o = "v-on:";
|
|
1652
|
-
return Object.keys(
|
|
1653
|
-
if (!
|
|
1652
|
+
return Object.keys(t).filter((s) => {
|
|
1653
|
+
if (!t[s])
|
|
1654
1654
|
return !1;
|
|
1655
|
-
const r =
|
|
1656
|
-
return
|
|
1655
|
+
const r = s.startsWith(o);
|
|
1656
|
+
return n ? r : !r;
|
|
1657
1657
|
}).reduce(
|
|
1658
|
-
(
|
|
1659
|
-
...
|
|
1660
|
-
[r.replace(o, "")]:
|
|
1658
|
+
(s, r) => ({
|
|
1659
|
+
...s,
|
|
1660
|
+
[r.replace(o, "")]: t[r]
|
|
1661
1661
|
}),
|
|
1662
1662
|
{}
|
|
1663
1663
|
);
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
|
-
}, Nt = ["alt", "src"];
|
|
1667
|
-
function
|
|
1668
|
-
return d(),
|
|
1666
|
+
}), Nt = ["alt", "src"];
|
|
1667
|
+
function Ht(e, t, n, o, s, r) {
|
|
1668
|
+
return d(), p("img", x({
|
|
1669
1669
|
style: {
|
|
1670
|
-
objectFit:
|
|
1671
|
-
objectPosition:
|
|
1670
|
+
objectFit: e.backgroundSize || "cover",
|
|
1671
|
+
objectPosition: e.backgroundPosition || "center"
|
|
1672
1672
|
},
|
|
1673
|
-
key:
|
|
1674
|
-
alt:
|
|
1675
|
-
src:
|
|
1676
|
-
},
|
|
1673
|
+
key: e.isEditing() && e.imgSrc || "default-key",
|
|
1674
|
+
alt: e.altText,
|
|
1675
|
+
src: e.imgSrc || e.image
|
|
1676
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), null, 16, Nt);
|
|
1677
1677
|
}
|
|
1678
|
-
const
|
|
1678
|
+
const zt = /* @__PURE__ */ f(Lt, [["render", Ht]]), Kt = {
|
|
1679
1679
|
name: "Raw:Img",
|
|
1680
1680
|
hideFromInsertMenu: !0,
|
|
1681
1681
|
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 +1690,7 @@ const Ht = /* @__PURE__ */ h(Lt, [["render", $t]]), zt = {
|
|
|
1690
1690
|
],
|
|
1691
1691
|
noWrap: !0,
|
|
1692
1692
|
static: !0
|
|
1693
|
-
},
|
|
1693
|
+
}, Dt = h({
|
|
1694
1694
|
name: "builder-custom-code",
|
|
1695
1695
|
props: ["replaceNodes", "code"],
|
|
1696
1696
|
data() {
|
|
@@ -1703,23 +1703,23 @@ const Ht = /* @__PURE__ */ h(Lt, [["render", $t]]), zt = {
|
|
|
1703
1703
|
findAndRunScripts() {
|
|
1704
1704
|
if (this.$refs.elem && this.$refs.elem.getElementsByTagName && typeof window < "u") {
|
|
1705
1705
|
const e = this.$refs.elem.getElementsByTagName("script");
|
|
1706
|
-
for (let
|
|
1707
|
-
const
|
|
1708
|
-
if (
|
|
1709
|
-
if (this.scriptsInserted.includes(
|
|
1706
|
+
for (let t = 0; t < e.length; t++) {
|
|
1707
|
+
const n = e[t];
|
|
1708
|
+
if (n.src) {
|
|
1709
|
+
if (this.scriptsInserted.includes(n.src))
|
|
1710
1710
|
continue;
|
|
1711
|
-
this.scriptsInserted.push(
|
|
1711
|
+
this.scriptsInserted.push(n.src);
|
|
1712
1712
|
const o = document.createElement("script");
|
|
1713
|
-
o.async = !0, o.src =
|
|
1714
|
-
} else if (!
|
|
1713
|
+
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
1714
|
+
} else if (!n.type || [
|
|
1715
1715
|
"text/javascript",
|
|
1716
1716
|
"application/javascript",
|
|
1717
1717
|
"application/ecmascript"
|
|
1718
|
-
].includes(
|
|
1719
|
-
if (this.scriptsRun.includes(
|
|
1718
|
+
].includes(n.type)) {
|
|
1719
|
+
if (this.scriptsRun.includes(n.innerText))
|
|
1720
1720
|
continue;
|
|
1721
1721
|
try {
|
|
1722
|
-
this.scriptsRun.push(
|
|
1722
|
+
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
1723
1723
|
} catch (o) {
|
|
1724
1724
|
console.warn("`CustomCode`: Error running script:", o);
|
|
1725
1725
|
}
|
|
@@ -1728,28 +1728,28 @@ const Ht = /* @__PURE__ */ h(Lt, [["render", $t]]), zt = {
|
|
|
1728
1728
|
}
|
|
1729
1729
|
},
|
|
1730
1730
|
_classStringToObject(e) {
|
|
1731
|
-
const
|
|
1731
|
+
const t = {};
|
|
1732
1732
|
if (typeof e != "string")
|
|
1733
|
-
return
|
|
1734
|
-
const
|
|
1735
|
-
for (const o of
|
|
1736
|
-
|
|
1737
|
-
return
|
|
1733
|
+
return t;
|
|
1734
|
+
const n = e.trim().split(/\s+/);
|
|
1735
|
+
for (const o of n)
|
|
1736
|
+
t[o] = !0;
|
|
1737
|
+
return t;
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
1740
|
-
},
|
|
1741
|
-
function
|
|
1742
|
-
return d(),
|
|
1740
|
+
}), qt = ["innerHTML"];
|
|
1741
|
+
function Gt(e, t, n, o, s, r) {
|
|
1742
|
+
return d(), p("div", {
|
|
1743
1743
|
ref: "elem",
|
|
1744
|
-
class:
|
|
1745
|
-
|
|
1746
|
-
"builder-custom-code" + (
|
|
1744
|
+
class: V(
|
|
1745
|
+
e._classStringToObject(
|
|
1746
|
+
"builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
|
|
1747
1747
|
)
|
|
1748
1748
|
),
|
|
1749
|
-
innerHTML:
|
|
1750
|
-
}, null, 10,
|
|
1749
|
+
innerHTML: e.code
|
|
1750
|
+
}, null, 10, qt);
|
|
1751
1751
|
}
|
|
1752
|
-
const
|
|
1752
|
+
const Jt = /* @__PURE__ */ f(Dt, [["render", Gt]]), Xt = {
|
|
1753
1753
|
name: "Custom Code",
|
|
1754
1754
|
static: !0,
|
|
1755
1755
|
requiredPermissions: ["editCode"],
|
|
@@ -1775,35 +1775,35 @@ const Gt = /* @__PURE__ */ h(Kt, [["render", qt]]), Jt = {
|
|
|
1775
1775
|
advanced: !0
|
|
1776
1776
|
}
|
|
1777
1777
|
]
|
|
1778
|
-
},
|
|
1779
|
-
{ component:
|
|
1780
|
-
{ component:
|
|
1781
|
-
{ component:
|
|
1778
|
+
}, Yt = () => [
|
|
1779
|
+
{ component: ye, ...ze },
|
|
1780
|
+
{ component: Ie, ...Ke },
|
|
1781
|
+
{ component: Jt, ...Xt },
|
|
1782
1782
|
{ component: Mt, ...Pt },
|
|
1783
|
-
{ component:
|
|
1784
|
-
{ component: Fe, ...
|
|
1785
|
-
{ component:
|
|
1786
|
-
{ component:
|
|
1787
|
-
{ component:
|
|
1788
|
-
{ component:
|
|
1789
|
-
{ component:
|
|
1783
|
+
{ component: Re, ...De },
|
|
1784
|
+
{ component: Fe, ...qe },
|
|
1785
|
+
{ component: zt, ...Kt },
|
|
1786
|
+
{ component: Ye, ...Ge },
|
|
1787
|
+
{ component: Ct, ...Qe },
|
|
1788
|
+
{ component: Rt, ...xt },
|
|
1789
|
+
{ component: Vt, ...Et }
|
|
1790
1790
|
];
|
|
1791
|
-
function
|
|
1791
|
+
function G({
|
|
1792
1792
|
code: e,
|
|
1793
|
-
context:
|
|
1794
|
-
state:
|
|
1793
|
+
context: t,
|
|
1794
|
+
state: n,
|
|
1795
1795
|
event: o,
|
|
1796
|
-
isExpression:
|
|
1796
|
+
isExpression: s = !0
|
|
1797
1797
|
}) {
|
|
1798
1798
|
if (e === "") {
|
|
1799
1799
|
console.warn("Skipping evaluation of empty code block.");
|
|
1800
1800
|
return;
|
|
1801
1801
|
}
|
|
1802
1802
|
const r = {
|
|
1803
|
-
isEditing:
|
|
1804
|
-
isBrowser:
|
|
1805
|
-
isServer: !
|
|
1806
|
-
},
|
|
1803
|
+
isEditing: k(),
|
|
1804
|
+
isBrowser: m(),
|
|
1805
|
+
isServer: !m()
|
|
1806
|
+
}, l = s && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
|
|
1807
1807
|
try {
|
|
1808
1808
|
return new Function(
|
|
1809
1809
|
"builder",
|
|
@@ -1811,127 +1811,127 @@ function q({
|
|
|
1811
1811
|
"state",
|
|
1812
1812
|
"context",
|
|
1813
1813
|
"event",
|
|
1814
|
-
|
|
1815
|
-
)(r, r,
|
|
1814
|
+
l
|
|
1815
|
+
)(r, r, n, t, o);
|
|
1816
1816
|
} catch (a) {
|
|
1817
1817
|
console.warn(
|
|
1818
1818
|
`Builder custom code error:
|
|
1819
1819
|
While Evaluating:
|
|
1820
1820
|
`,
|
|
1821
|
-
|
|
1821
|
+
l,
|
|
1822
1822
|
`
|
|
1823
1823
|
`,
|
|
1824
1824
|
a
|
|
1825
1825
|
);
|
|
1826
1826
|
}
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1829
|
-
return !
|
|
1828
|
+
function Qt() {
|
|
1829
|
+
return !m() || k() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1830
1830
|
}
|
|
1831
1831
|
const ce = [];
|
|
1832
|
-
function Pn(e,
|
|
1833
|
-
return ce.push({ component: e, ...
|
|
1832
|
+
function Pn(e, t) {
|
|
1833
|
+
return ce.push({ component: e, ...t }), console.warn(
|
|
1834
1834
|
"registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
|
|
1835
1835
|
), e;
|
|
1836
1836
|
}
|
|
1837
|
-
const
|
|
1837
|
+
const Zt = ({
|
|
1838
1838
|
component: e,
|
|
1839
|
-
...
|
|
1839
|
+
...t
|
|
1840
1840
|
}) => ({
|
|
1841
1841
|
type: "builder.registerComponent",
|
|
1842
|
-
data:
|
|
1843
|
-
}),
|
|
1842
|
+
data: tn(t)
|
|
1843
|
+
}), en = (e) => typeof e == "function" ? B(e) : L(e), tn = ({
|
|
1844
1844
|
inputs: e,
|
|
1845
|
-
...
|
|
1845
|
+
...t
|
|
1846
1846
|
}) => ({
|
|
1847
|
-
...L(
|
|
1847
|
+
...L(t),
|
|
1848
1848
|
inputs: e == null ? void 0 : e.map(
|
|
1849
|
-
(
|
|
1850
|
-
(o, [
|
|
1849
|
+
(n) => Object.entries(n).reduce(
|
|
1850
|
+
(o, [s, r]) => ({
|
|
1851
1851
|
...o,
|
|
1852
|
-
[
|
|
1852
|
+
[s]: en(r)
|
|
1853
1853
|
}),
|
|
1854
1854
|
{}
|
|
1855
1855
|
)
|
|
1856
1856
|
)
|
|
1857
1857
|
});
|
|
1858
|
-
function
|
|
1858
|
+
function nn() {
|
|
1859
1859
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1860
|
-
const
|
|
1861
|
-
return (e == "x" ?
|
|
1860
|
+
const t = Math.random() * 16 | 0;
|
|
1861
|
+
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1862
1862
|
});
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1865
|
-
return
|
|
1864
|
+
function de() {
|
|
1865
|
+
return nn().replace(/-/g, "");
|
|
1866
1866
|
}
|
|
1867
|
-
const
|
|
1867
|
+
const ue = "builderSessionId", on = async ({
|
|
1868
1868
|
canTrack: e
|
|
1869
1869
|
}) => {
|
|
1870
1870
|
if (!e)
|
|
1871
1871
|
return;
|
|
1872
|
-
const
|
|
1873
|
-
name:
|
|
1872
|
+
const t = await se({
|
|
1873
|
+
name: ue,
|
|
1874
1874
|
canTrack: e
|
|
1875
1875
|
});
|
|
1876
|
-
if (
|
|
1877
|
-
return
|
|
1876
|
+
if (I(t))
|
|
1877
|
+
return t;
|
|
1878
1878
|
{
|
|
1879
|
-
const
|
|
1880
|
-
return rn({ id:
|
|
1879
|
+
const n = sn();
|
|
1880
|
+
return rn({ id: n, canTrack: e }), n;
|
|
1881
1881
|
}
|
|
1882
|
-
},
|
|
1882
|
+
}, sn = () => de(), rn = ({
|
|
1883
1883
|
id: e,
|
|
1884
|
-
canTrack:
|
|
1885
|
-
}) =>
|
|
1884
|
+
canTrack: t
|
|
1885
|
+
}) => re({ name: ue, value: e, canTrack: t }), pe = () => m() && typeof localStorage < "u" ? localStorage : void 0, an = ({
|
|
1886
1886
|
key: e,
|
|
1887
|
-
canTrack:
|
|
1887
|
+
canTrack: t
|
|
1888
1888
|
}) => {
|
|
1889
|
-
var
|
|
1889
|
+
var n;
|
|
1890
1890
|
try {
|
|
1891
|
-
return
|
|
1891
|
+
return t ? (n = pe()) == null ? void 0 : n.getItem(e) : void 0;
|
|
1892
1892
|
} catch (o) {
|
|
1893
1893
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1894
1894
|
return;
|
|
1895
1895
|
}
|
|
1896
|
-
},
|
|
1896
|
+
}, ln = ({
|
|
1897
1897
|
key: e,
|
|
1898
|
-
canTrack:
|
|
1899
|
-
value:
|
|
1898
|
+
canTrack: t,
|
|
1899
|
+
value: n
|
|
1900
1900
|
}) => {
|
|
1901
1901
|
var o;
|
|
1902
1902
|
try {
|
|
1903
|
-
|
|
1904
|
-
} catch (
|
|
1905
|
-
console.debug("[LocalStorage] SET error: ",
|
|
1903
|
+
t && ((o = pe()) == null || o.setItem(e, n));
|
|
1904
|
+
} catch (s) {
|
|
1905
|
+
console.debug("[LocalStorage] SET error: ", s);
|
|
1906
1906
|
}
|
|
1907
1907
|
}, me = "builderVisitorId", cn = ({ canTrack: e }) => {
|
|
1908
1908
|
if (!e)
|
|
1909
1909
|
return;
|
|
1910
|
-
const
|
|
1910
|
+
const t = an({
|
|
1911
1911
|
key: me,
|
|
1912
1912
|
canTrack: e
|
|
1913
1913
|
});
|
|
1914
|
-
if (
|
|
1915
|
-
return
|
|
1914
|
+
if (I(t))
|
|
1915
|
+
return t;
|
|
1916
1916
|
{
|
|
1917
|
-
const
|
|
1918
|
-
return
|
|
1917
|
+
const n = dn();
|
|
1918
|
+
return un({ id: n, canTrack: e }), n;
|
|
1919
1919
|
}
|
|
1920
|
-
},
|
|
1920
|
+
}, dn = () => de(), un = ({
|
|
1921
1921
|
id: e,
|
|
1922
|
-
canTrack:
|
|
1923
|
-
}) =>
|
|
1922
|
+
canTrack: t
|
|
1923
|
+
}) => ln({
|
|
1924
1924
|
key: me,
|
|
1925
1925
|
value: e,
|
|
1926
|
-
canTrack:
|
|
1927
|
-
}),
|
|
1928
|
-
if (
|
|
1926
|
+
canTrack: t
|
|
1927
|
+
}), pn = () => {
|
|
1928
|
+
if (m()) {
|
|
1929
1929
|
const e = new URL(location.href);
|
|
1930
1930
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
1931
1931
|
} else
|
|
1932
1932
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
1933
|
-
}, mn = () => typeof navigator == "object" && navigator.userAgent || "",
|
|
1934
|
-
const e = mn(),
|
|
1933
|
+
}, mn = () => typeof navigator == "object" && navigator.userAgent || "", hn = () => {
|
|
1934
|
+
const e = mn(), t = {
|
|
1935
1935
|
Android() {
|
|
1936
1936
|
return e.match(/Android/i);
|
|
1937
1937
|
},
|
|
@@ -1948,84 +1948,84 @@ const de = "builderSessionId", nn = async ({
|
|
|
1948
1948
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
1949
1949
|
},
|
|
1950
1950
|
any() {
|
|
1951
|
-
return
|
|
1951
|
+
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || _ === "reactNative";
|
|
1952
1952
|
}
|
|
1953
|
-
},
|
|
1953
|
+
}, n = e.match(/Tablet|iPad/i), o = pn();
|
|
1954
1954
|
return {
|
|
1955
1955
|
urlPath: o == null ? void 0 : o.pathname,
|
|
1956
1956
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
1957
|
-
device:
|
|
1957
|
+
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
1958
1958
|
};
|
|
1959
|
-
},
|
|
1959
|
+
}, fn = async ({
|
|
1960
1960
|
canTrack: e
|
|
1961
1961
|
}) => {
|
|
1962
1962
|
if (!e)
|
|
1963
1963
|
return { visitorId: void 0, sessionId: void 0 };
|
|
1964
|
-
const
|
|
1964
|
+
const t = await on({ canTrack: e }), n = cn({ canTrack: e });
|
|
1965
1965
|
return {
|
|
1966
|
-
sessionId:
|
|
1967
|
-
visitorId:
|
|
1966
|
+
sessionId: t,
|
|
1967
|
+
visitorId: n
|
|
1968
1968
|
};
|
|
1969
|
-
},
|
|
1969
|
+
}, gn = async ({
|
|
1970
1970
|
type: e,
|
|
1971
|
-
canTrack:
|
|
1972
|
-
apiKey:
|
|
1971
|
+
canTrack: t,
|
|
1972
|
+
apiKey: n,
|
|
1973
1973
|
metadata: o,
|
|
1974
|
-
...
|
|
1974
|
+
...s
|
|
1975
1975
|
}) => ({
|
|
1976
1976
|
type: e,
|
|
1977
1977
|
data: {
|
|
1978
|
-
...
|
|
1978
|
+
...s,
|
|
1979
1979
|
metadata: {
|
|
1980
1980
|
url: location.href,
|
|
1981
1981
|
...o
|
|
1982
1982
|
},
|
|
1983
|
-
...await
|
|
1984
|
-
userAttributes:
|
|
1985
|
-
ownerId:
|
|
1983
|
+
...await fn({ canTrack: t }),
|
|
1984
|
+
userAttributes: hn(),
|
|
1985
|
+
ownerId: n
|
|
1986
1986
|
}
|
|
1987
1987
|
});
|
|
1988
1988
|
async function M(e) {
|
|
1989
1989
|
if (!e.apiKey) {
|
|
1990
|
-
|
|
1990
|
+
C.error(
|
|
1991
1991
|
"Missing API key for track call. Please provide your API key."
|
|
1992
1992
|
);
|
|
1993
1993
|
return;
|
|
1994
1994
|
}
|
|
1995
|
-
if (!!e.canTrack && !
|
|
1995
|
+
if (!!e.canTrack && !k() && !!(m() || _ === "reactNative"))
|
|
1996
1996
|
return fetch("https://builder.io/api/v1/track", {
|
|
1997
1997
|
method: "POST",
|
|
1998
1998
|
body: JSON.stringify({
|
|
1999
|
-
events: [await
|
|
1999
|
+
events: [await gn(e)]
|
|
2000
2000
|
}),
|
|
2001
2001
|
headers: {
|
|
2002
2002
|
"content-type": "application/json"
|
|
2003
2003
|
},
|
|
2004
2004
|
mode: "cors"
|
|
2005
|
-
}).catch((
|
|
2006
|
-
console.error("Failed to track: ",
|
|
2005
|
+
}).catch((t) => {
|
|
2006
|
+
console.error("Failed to track: ", t);
|
|
2007
2007
|
});
|
|
2008
2008
|
}
|
|
2009
|
-
const Bn = (e) => M({ ...e, canTrack: !0 }),
|
|
2010
|
-
function
|
|
2011
|
-
let
|
|
2012
|
-
if (
|
|
2009
|
+
const Bn = (e) => M({ ...e, canTrack: !0 }), J = {};
|
|
2010
|
+
function bn(e, t) {
|
|
2011
|
+
let n = J[e];
|
|
2012
|
+
if (n || (n = J[e] = []), n.push(t), m()) {
|
|
2013
2013
|
const o = {
|
|
2014
2014
|
type: "builder.register",
|
|
2015
2015
|
data: {
|
|
2016
2016
|
type: e,
|
|
2017
|
-
info:
|
|
2017
|
+
info: t
|
|
2018
2018
|
}
|
|
2019
2019
|
};
|
|
2020
2020
|
try {
|
|
2021
2021
|
parent.postMessage(o, "*"), parent !== window && window.postMessage(o, "*");
|
|
2022
|
-
} catch (
|
|
2023
|
-
console.debug("Could not postmessage",
|
|
2022
|
+
} catch (s) {
|
|
2023
|
+
console.debug("Could not postmessage", s);
|
|
2024
2024
|
}
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
2027
|
-
const
|
|
2028
|
-
|
|
2027
|
+
const yn = () => {
|
|
2028
|
+
bn("insertMenu", {
|
|
2029
2029
|
name: "_default",
|
|
2030
2030
|
default: !0,
|
|
2031
2031
|
items: [
|
|
@@ -2040,21 +2040,21 @@ const bn = () => {
|
|
|
2040
2040
|
]
|
|
2041
2041
|
});
|
|
2042
2042
|
};
|
|
2043
|
-
let
|
|
2044
|
-
const
|
|
2045
|
-
var
|
|
2046
|
-
|
|
2043
|
+
let X = !1;
|
|
2044
|
+
const vn = (e = {}) => {
|
|
2045
|
+
var t, n;
|
|
2046
|
+
X || (X = !0, m() && ((t = window.parent) == null || t.postMessage(
|
|
2047
2047
|
{
|
|
2048
2048
|
type: "builder.sdkInfo",
|
|
2049
2049
|
data: {
|
|
2050
|
-
target:
|
|
2050
|
+
target: _,
|
|
2051
2051
|
supportsPatchUpdates: !1,
|
|
2052
2052
|
supportsAddBlockScoping: !0,
|
|
2053
2053
|
supportsCustomBreakpoints: !0
|
|
2054
2054
|
}
|
|
2055
2055
|
},
|
|
2056
2056
|
"*"
|
|
2057
|
-
), (
|
|
2057
|
+
), (n = window.parent) == null || n.postMessage(
|
|
2058
2058
|
{
|
|
2059
2059
|
type: "builder.updateContent",
|
|
2060
2060
|
data: {
|
|
@@ -2063,29 +2063,29 @@ const yn = (e = {}) => {
|
|
|
2063
2063
|
},
|
|
2064
2064
|
"*"
|
|
2065
2065
|
), window.addEventListener("message", ({ data: o }) => {
|
|
2066
|
-
var
|
|
2066
|
+
var s, r;
|
|
2067
2067
|
if (!!(o != null && o.type))
|
|
2068
2068
|
switch (o.type) {
|
|
2069
2069
|
case "builder.evaluate": {
|
|
2070
|
-
const
|
|
2071
|
-
let u,
|
|
2070
|
+
const i = o.data.text, l = o.data.arguments || [], a = o.data.id, c = new Function(i);
|
|
2071
|
+
let u, b = null;
|
|
2072
2072
|
try {
|
|
2073
|
-
u =
|
|
2074
|
-
} catch (
|
|
2075
|
-
|
|
2073
|
+
u = c.apply(null, l);
|
|
2074
|
+
} catch (g) {
|
|
2075
|
+
b = g;
|
|
2076
2076
|
}
|
|
2077
|
-
|
|
2077
|
+
b ? (s = window.parent) == null || s.postMessage(
|
|
2078
2078
|
{
|
|
2079
2079
|
type: "builder.evaluateError",
|
|
2080
|
-
data: { id: a, error:
|
|
2080
|
+
data: { id: a, error: b.message }
|
|
2081
2081
|
},
|
|
2082
2082
|
"*"
|
|
2083
|
-
) : u && typeof u.then == "function" ? u.then((
|
|
2084
|
-
var
|
|
2085
|
-
(
|
|
2083
|
+
) : u && typeof u.then == "function" ? u.then((g) => {
|
|
2084
|
+
var y;
|
|
2085
|
+
(y = window.parent) == null || y.postMessage(
|
|
2086
2086
|
{
|
|
2087
2087
|
type: "builder.evaluateResult",
|
|
2088
|
-
data: { id: a, result:
|
|
2088
|
+
data: { id: a, result: g }
|
|
2089
2089
|
},
|
|
2090
2090
|
"*"
|
|
2091
2091
|
);
|
|
@@ -2101,84 +2101,84 @@ const yn = (e = {}) => {
|
|
|
2101
2101
|
}
|
|
2102
2102
|
})));
|
|
2103
2103
|
};
|
|
2104
|
-
function
|
|
2104
|
+
function Y(e) {
|
|
2105
2105
|
return Math.round(e * 1e3) / 1e3;
|
|
2106
2106
|
}
|
|
2107
|
-
const
|
|
2107
|
+
const kn = (e, t, n = !0) => {
|
|
2108
2108
|
if (!(e instanceof HTMLElement))
|
|
2109
2109
|
return null;
|
|
2110
|
-
let o =
|
|
2110
|
+
let o = n ? e : e.parentElement;
|
|
2111
2111
|
do {
|
|
2112
2112
|
if (!o)
|
|
2113
2113
|
return null;
|
|
2114
|
-
if (
|
|
2114
|
+
if (t(o))
|
|
2115
2115
|
return o;
|
|
2116
2116
|
} while (o = o.parentElement);
|
|
2117
2117
|
return null;
|
|
2118
|
-
},
|
|
2119
|
-
const
|
|
2120
|
-
return Boolean((
|
|
2121
|
-
}),
|
|
2118
|
+
}, Sn = (e) => kn(e, (t) => {
|
|
2119
|
+
const n = t.getAttribute("builder-id") || t.id;
|
|
2120
|
+
return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
|
|
2121
|
+
}), Q = ({
|
|
2122
2122
|
event: e,
|
|
2123
|
-
target:
|
|
2123
|
+
target: t
|
|
2124
2124
|
}) => {
|
|
2125
|
-
const
|
|
2125
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = Y(o / n.width), i = Y(s / n.height);
|
|
2126
2126
|
return {
|
|
2127
2127
|
x: r,
|
|
2128
|
-
y:
|
|
2128
|
+
y: i
|
|
2129
2129
|
};
|
|
2130
|
-
},
|
|
2131
|
-
const
|
|
2130
|
+
}, wn = (e) => {
|
|
2131
|
+
const t = e.target, n = t && Sn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2132
2132
|
return {
|
|
2133
2133
|
targetBuilderElement: o || void 0,
|
|
2134
2134
|
metadata: {
|
|
2135
|
-
targetOffset:
|
|
2136
|
-
builderTargetOffset:
|
|
2137
|
-
builderElementIndex:
|
|
2135
|
+
targetOffset: t ? Q({ event: e, target: t }) : void 0,
|
|
2136
|
+
builderTargetOffset: n ? Q({ event: e, target: n }) : void 0,
|
|
2137
|
+
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2138
2138
|
}
|
|
2139
2139
|
};
|
|
2140
|
-
},
|
|
2140
|
+
}, Cn = ({
|
|
2141
2141
|
content: e,
|
|
2142
|
-
data:
|
|
2143
|
-
locale:
|
|
2142
|
+
data: t,
|
|
2143
|
+
locale: n
|
|
2144
2144
|
}) => {
|
|
2145
|
-
var r,
|
|
2145
|
+
var r, i, l;
|
|
2146
2146
|
const o = {};
|
|
2147
|
-
(
|
|
2148
|
-
var
|
|
2149
|
-
a.name && a.defaultValue !== void 0 && ((
|
|
2147
|
+
(i = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || i.forEach((a) => {
|
|
2148
|
+
var c;
|
|
2149
|
+
a.name && a.defaultValue !== void 0 && ((c = e == null ? void 0 : e.data) == null ? void 0 : c.state) && e.data.state[a.name] === void 0 && (o[a.name] = a.defaultValue);
|
|
2150
2150
|
});
|
|
2151
|
-
const
|
|
2152
|
-
...(
|
|
2153
|
-
...
|
|
2154
|
-
...
|
|
2151
|
+
const s = {
|
|
2152
|
+
...(l = e == null ? void 0 : e.data) == null ? void 0 : l.state,
|
|
2153
|
+
...t,
|
|
2154
|
+
...n ? { locale: n } : {}
|
|
2155
2155
|
};
|
|
2156
|
-
return { ...o, ...
|
|
2157
|
-
},
|
|
2156
|
+
return { ...o, ...s };
|
|
2157
|
+
}, xn = ({
|
|
2158
2158
|
content: e,
|
|
2159
|
-
data:
|
|
2159
|
+
data: t
|
|
2160
2160
|
}) => e ? {
|
|
2161
2161
|
...e,
|
|
2162
2162
|
data: {
|
|
2163
2163
|
...e == null ? void 0 : e.data,
|
|
2164
|
-
...
|
|
2164
|
+
...t
|
|
2165
2165
|
},
|
|
2166
2166
|
meta: e == null ? void 0 : e.meta
|
|
2167
|
-
} : void 0,
|
|
2167
|
+
} : void 0, In = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
|
|
2168
2168
|
throw console.error(
|
|
2169
2169
|
"Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
|
|
2170
2170
|
e
|
|
2171
2171
|
), e;
|
|
2172
|
-
}),
|
|
2172
|
+
}), $n = () => import("./render-styles.90b25836.js").then((e) => e.default).catch((e) => {
|
|
2173
2173
|
throw console.error(
|
|
2174
2174
|
"Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
|
|
2175
2175
|
e
|
|
2176
2176
|
), e;
|
|
2177
|
-
}),
|
|
2177
|
+
}), Tn = h({
|
|
2178
2178
|
name: "render-content",
|
|
2179
2179
|
components: {
|
|
2180
|
-
RenderContentStyles:
|
|
2181
|
-
RenderBlocks:
|
|
2180
|
+
RenderContentStyles: S($n),
|
|
2181
|
+
RenderBlocks: S(In)
|
|
2182
2182
|
},
|
|
2183
2183
|
props: [
|
|
2184
2184
|
"content",
|
|
@@ -2196,31 +2196,31 @@ const vn = (e, n, t = !0) => {
|
|
|
2196
2196
|
return {
|
|
2197
2197
|
forceReRenderCount: 0,
|
|
2198
2198
|
overrideContent: null,
|
|
2199
|
-
useContent:
|
|
2199
|
+
useContent: xn({
|
|
2200
2200
|
content: this.content,
|
|
2201
2201
|
data: this.data
|
|
2202
2202
|
}),
|
|
2203
2203
|
update: 0,
|
|
2204
|
-
canTrackToUse:
|
|
2205
|
-
contentState:
|
|
2204
|
+
canTrackToUse: I(this.canTrack) ? this.canTrack : !0,
|
|
2205
|
+
contentState: Cn({
|
|
2206
2206
|
content: this.content,
|
|
2207
2207
|
data: this.data,
|
|
2208
2208
|
locale: this.locale
|
|
2209
2209
|
}),
|
|
2210
2210
|
allRegisteredComponents: [
|
|
2211
|
-
...
|
|
2211
|
+
...Yt(),
|
|
2212
2212
|
...ce,
|
|
2213
2213
|
...this.customComponents || []
|
|
2214
2214
|
].reduce(
|
|
2215
|
-
(e,
|
|
2215
|
+
(e, t) => ({
|
|
2216
2216
|
...e,
|
|
2217
|
-
[
|
|
2217
|
+
[t.name]: t
|
|
2218
2218
|
}),
|
|
2219
2219
|
{}
|
|
2220
2220
|
),
|
|
2221
2221
|
httpReqsData: {},
|
|
2222
2222
|
clicked: !1,
|
|
2223
|
-
TARGET:
|
|
2223
|
+
TARGET: _
|
|
2224
2224
|
};
|
|
2225
2225
|
},
|
|
2226
2226
|
provide() {
|
|
@@ -2233,16 +2233,17 @@ const vn = (e, n, t = !0) => {
|
|
|
2233
2233
|
context: e.context || {},
|
|
2234
2234
|
apiKey: e.apiKey,
|
|
2235
2235
|
apiVersion: e.apiVersion,
|
|
2236
|
-
registeredComponents: e.allRegisteredComponents
|
|
2236
|
+
registeredComponents: e.allRegisteredComponents,
|
|
2237
|
+
inheritedStyles: {}
|
|
2237
2238
|
}
|
|
2238
2239
|
};
|
|
2239
2240
|
},
|
|
2240
2241
|
mounted() {
|
|
2241
|
-
var e,
|
|
2242
|
-
if (this.apiKey ||
|
|
2242
|
+
var e, t;
|
|
2243
|
+
if (this.apiKey || C.error(
|
|
2243
2244
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2244
|
-
),
|
|
2245
|
-
if (
|
|
2245
|
+
), m()) {
|
|
2246
|
+
if (k() && (this.forceReRenderCount = this.forceReRenderCount + 1, yn(), vn({
|
|
2246
2247
|
...this.locale ? {
|
|
2247
2248
|
locale: this.locale
|
|
2248
2249
|
} : {},
|
|
@@ -2251,33 +2252,33 @@ const vn = (e, n, t = !0) => {
|
|
|
2251
2252
|
} : {}
|
|
2252
2253
|
}), Object.values(
|
|
2253
2254
|
this.allRegisteredComponents
|
|
2254
|
-
).forEach((
|
|
2255
|
-
var
|
|
2256
|
-
const o =
|
|
2257
|
-
(
|
|
2255
|
+
).forEach((n) => {
|
|
2256
|
+
var s;
|
|
2257
|
+
const o = Zt(n);
|
|
2258
|
+
(s = window.parent) == null || s.postMessage(o, "*");
|
|
2258
2259
|
}), window.addEventListener("message", this.processMessage), window.addEventListener(
|
|
2259
2260
|
"builder:component:stateChangeListenerActivated",
|
|
2260
2261
|
this.emitStateUpdate
|
|
2261
2262
|
)), this.useContent) {
|
|
2262
|
-
const
|
|
2263
|
+
const n = (e = this.useContent) == null ? void 0 : e.testVariationId, o = (t = this.useContent) == null ? void 0 : t.id;
|
|
2263
2264
|
M({
|
|
2264
2265
|
type: "impression",
|
|
2265
2266
|
canTrack: this.canTrackToUse,
|
|
2266
2267
|
contentId: o,
|
|
2267
2268
|
apiKey: this.apiKey,
|
|
2268
|
-
variationId:
|
|
2269
|
+
variationId: n !== o ? n : void 0
|
|
2269
2270
|
});
|
|
2270
2271
|
}
|
|
2271
|
-
if (
|
|
2272
|
-
const
|
|
2272
|
+
if (Qt()) {
|
|
2273
|
+
const n = new URL(location.href).searchParams, o = n.get("builder.preview"), s = n.get(
|
|
2273
2274
|
`builder.preview.${o}`
|
|
2274
|
-
), r =
|
|
2275
|
-
o === this.model && r === this.apiKey && (!this.content ||
|
|
2275
|
+
), r = n.get("apiKey") || n.get("builder.space");
|
|
2276
|
+
o === this.model && r === this.apiKey && (!this.content || s === this.content.id) && le({
|
|
2276
2277
|
model: this.model,
|
|
2277
2278
|
apiKey: this.apiKey,
|
|
2278
2279
|
apiVersion: this.apiVersion
|
|
2279
|
-
}).then((
|
|
2280
|
-
|
|
2280
|
+
}).then((i) => {
|
|
2281
|
+
i && this.mergeNewContent(i);
|
|
2281
2282
|
});
|
|
2282
2283
|
}
|
|
2283
2284
|
this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
|
|
@@ -2310,7 +2311,7 @@ const vn = (e, n, t = !0) => {
|
|
|
2310
2311
|
}
|
|
2311
2312
|
},
|
|
2312
2313
|
unmounted() {
|
|
2313
|
-
|
|
2314
|
+
m() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
|
|
2314
2315
|
"builder:component:stateChangeListenerActivated",
|
|
2315
2316
|
this.emitStateUpdate
|
|
2316
2317
|
));
|
|
@@ -2322,16 +2323,16 @@ const vn = (e, n, t = !0) => {
|
|
|
2322
2323
|
};
|
|
2323
2324
|
},
|
|
2324
2325
|
onUpdateHook1() {
|
|
2325
|
-
var e,
|
|
2326
|
+
var e, t;
|
|
2326
2327
|
return {
|
|
2327
|
-
0: (
|
|
2328
|
+
0: (t = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : t.jsCode,
|
|
2328
2329
|
1: this.contentState
|
|
2329
2330
|
};
|
|
2330
2331
|
},
|
|
2331
2332
|
onUpdateHook2() {
|
|
2332
|
-
var e,
|
|
2333
|
+
var e, t;
|
|
2333
2334
|
return {
|
|
2334
|
-
0: (
|
|
2335
|
+
0: (t = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : t.httpRequests
|
|
2335
2336
|
};
|
|
2336
2337
|
},
|
|
2337
2338
|
onUpdateHook3() {
|
|
@@ -2342,27 +2343,27 @@ const vn = (e, n, t = !0) => {
|
|
|
2342
2343
|
},
|
|
2343
2344
|
methods: {
|
|
2344
2345
|
mergeNewContent(e) {
|
|
2345
|
-
var
|
|
2346
|
+
var t, n, o, s, r;
|
|
2346
2347
|
this.useContent = {
|
|
2347
2348
|
...this.useContent,
|
|
2348
2349
|
...e,
|
|
2349
2350
|
data: {
|
|
2350
|
-
...(
|
|
2351
|
+
...(t = this.useContent) == null ? void 0 : t.data,
|
|
2351
2352
|
...e == null ? void 0 : e.data
|
|
2352
2353
|
},
|
|
2353
2354
|
meta: {
|
|
2354
|
-
...(
|
|
2355
|
+
...(n = this.useContent) == null ? void 0 : n.meta,
|
|
2355
2356
|
...e == null ? void 0 : e.meta,
|
|
2356
|
-
breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((r = (
|
|
2357
|
+
breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((r = (s = this.useContent) == null ? void 0 : s.meta) == null ? void 0 : r.breakpoints)
|
|
2357
2358
|
}
|
|
2358
2359
|
};
|
|
2359
2360
|
},
|
|
2360
2361
|
setBreakpoints(e) {
|
|
2361
|
-
var
|
|
2362
|
+
var t;
|
|
2362
2363
|
this.useContent = {
|
|
2363
2364
|
...this.useContent,
|
|
2364
2365
|
meta: {
|
|
2365
|
-
...(
|
|
2366
|
+
...(t = this.useContent) == null ? void 0 : t.meta,
|
|
2366
2367
|
breakpoints: e
|
|
2367
2368
|
}
|
|
2368
2369
|
};
|
|
@@ -2371,44 +2372,44 @@ const vn = (e, n, t = !0) => {
|
|
|
2371
2372
|
this.contentState = e;
|
|
2372
2373
|
},
|
|
2373
2374
|
processMessage(e) {
|
|
2374
|
-
var
|
|
2375
|
-
const { data:
|
|
2376
|
-
if (
|
|
2377
|
-
switch (
|
|
2375
|
+
var n;
|
|
2376
|
+
const { data: t } = e;
|
|
2377
|
+
if (t)
|
|
2378
|
+
switch (t.type) {
|
|
2378
2379
|
case "builder.configureSdk": {
|
|
2379
|
-
const o =
|
|
2380
|
-
if (!r || r !== ((
|
|
2380
|
+
const o = t.data, { breakpoints: s, contentId: r } = o;
|
|
2381
|
+
if (!r || r !== ((n = this.useContent) == null ? void 0 : n.id))
|
|
2381
2382
|
return;
|
|
2382
|
-
|
|
2383
|
+
s && this.setBreakpoints(s), this.forceReRenderCount = this.forceReRenderCount + 1;
|
|
2383
2384
|
break;
|
|
2384
2385
|
}
|
|
2385
2386
|
case "builder.contentUpdate": {
|
|
2386
|
-
const o =
|
|
2387
|
-
|
|
2387
|
+
const o = t.data, s = o.key || o.alias || o.entry || o.modelName, r = o.data;
|
|
2388
|
+
s === this.model && (this.mergeNewContent(r), this.forceReRenderCount = this.forceReRenderCount + 1);
|
|
2388
2389
|
break;
|
|
2389
2390
|
}
|
|
2390
2391
|
}
|
|
2391
2392
|
},
|
|
2392
2393
|
evaluateJsCode() {
|
|
2393
|
-
var
|
|
2394
|
-
const e = (
|
|
2395
|
-
e &&
|
|
2394
|
+
var t, n;
|
|
2395
|
+
const e = (n = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
|
|
2396
|
+
e && G({
|
|
2396
2397
|
code: e,
|
|
2397
2398
|
context: this.context || {},
|
|
2398
2399
|
state: this.contentState
|
|
2399
2400
|
});
|
|
2400
2401
|
},
|
|
2401
2402
|
onClick(e) {
|
|
2402
|
-
var
|
|
2403
|
+
var t, n;
|
|
2403
2404
|
if (this.useContent) {
|
|
2404
|
-
const o = (
|
|
2405
|
+
const o = (t = this.useContent) == null ? void 0 : t.testVariationId, s = (n = this.useContent) == null ? void 0 : n.id;
|
|
2405
2406
|
M({
|
|
2406
2407
|
type: "click",
|
|
2407
2408
|
canTrack: this.canTrackToUse,
|
|
2408
|
-
contentId:
|
|
2409
|
+
contentId: s,
|
|
2409
2410
|
apiKey: this.apiKey,
|
|
2410
|
-
variationId: o !==
|
|
2411
|
-
...
|
|
2411
|
+
variationId: o !== s ? o : void 0,
|
|
2412
|
+
...wn(e),
|
|
2412
2413
|
unique: !this.clicked
|
|
2413
2414
|
});
|
|
2414
2415
|
}
|
|
@@ -2417,39 +2418,39 @@ const vn = (e, n, t = !0) => {
|
|
|
2417
2418
|
evalExpression(e) {
|
|
2418
2419
|
return e.replace(
|
|
2419
2420
|
/{{([^}]+)}}/g,
|
|
2420
|
-
(
|
|
2421
|
-
code:
|
|
2421
|
+
(t, n) => G({
|
|
2422
|
+
code: n,
|
|
2422
2423
|
context: this.context || {},
|
|
2423
2424
|
state: this.contentState
|
|
2424
2425
|
})
|
|
2425
2426
|
);
|
|
2426
2427
|
},
|
|
2427
|
-
handleRequest({ url: e, key:
|
|
2428
|
-
|
|
2428
|
+
handleRequest({ url: e, key: t }) {
|
|
2429
|
+
oe(e).then((n) => n.json()).then((n) => {
|
|
2429
2430
|
const o = {
|
|
2430
2431
|
...this.contentState,
|
|
2431
|
-
[
|
|
2432
|
+
[t]: n
|
|
2432
2433
|
};
|
|
2433
2434
|
this.setContextState(o);
|
|
2434
|
-
}).catch((
|
|
2435
|
-
console.error("error fetching dynamic data", e,
|
|
2435
|
+
}).catch((n) => {
|
|
2436
|
+
console.error("error fetching dynamic data", e, n);
|
|
2436
2437
|
});
|
|
2437
2438
|
},
|
|
2438
2439
|
runHttpRequests() {
|
|
2439
|
-
var
|
|
2440
|
-
const e = (o = (
|
|
2441
|
-
Object.entries(e).forEach(([
|
|
2442
|
-
if (r && (!this.httpReqsData[
|
|
2443
|
-
const
|
|
2440
|
+
var t, n, o;
|
|
2441
|
+
const e = (o = (n = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) != null ? o : {};
|
|
2442
|
+
Object.entries(e).forEach(([s, r]) => {
|
|
2443
|
+
if (r && (!this.httpReqsData[s] || k())) {
|
|
2444
|
+
const i = this.evalExpression(r);
|
|
2444
2445
|
this.handleRequest({
|
|
2445
|
-
url:
|
|
2446
|
-
key:
|
|
2446
|
+
url: i,
|
|
2447
|
+
key: s
|
|
2447
2448
|
});
|
|
2448
2449
|
}
|
|
2449
2450
|
});
|
|
2450
2451
|
},
|
|
2451
2452
|
emitStateUpdate() {
|
|
2452
|
-
|
|
2453
|
+
k() && window.dispatchEvent(
|
|
2453
2454
|
new CustomEvent(
|
|
2454
2455
|
"builder:component:stateChange",
|
|
2455
2456
|
{
|
|
@@ -2464,74 +2465,74 @@ const vn = (e, n, t = !0) => {
|
|
|
2464
2465
|
);
|
|
2465
2466
|
}
|
|
2466
2467
|
}
|
|
2467
|
-
},
|
|
2468
|
-
function
|
|
2469
|
-
var a,
|
|
2470
|
-
const
|
|
2471
|
-
return
|
|
2468
|
+
}), Rn = ["builder-content-id", "builder-model"];
|
|
2469
|
+
function En(e, t, n, o, s, r) {
|
|
2470
|
+
var a, c, u, b, g, y, $, N;
|
|
2471
|
+
const i = w("render-content-styles"), l = w("render-blocks");
|
|
2472
|
+
return e.useContent ? (d(), p("div", {
|
|
2472
2473
|
key: 0,
|
|
2473
2474
|
ref: "elementRef",
|
|
2474
|
-
onClick:
|
|
2475
|
-
"builder-content-id": (a =
|
|
2476
|
-
"builder-model":
|
|
2475
|
+
onClick: t[0] || (t[0] = (he) => e.onClick(he)),
|
|
2476
|
+
"builder-content-id": (a = e.useContent) == null ? void 0 : a.id,
|
|
2477
|
+
"builder-model": e.model
|
|
2477
2478
|
}, [
|
|
2478
|
-
|
|
2479
|
+
e.TARGET !== "reactNative" ? (d(), E(i, {
|
|
2479
2480
|
key: 0,
|
|
2480
|
-
contentId: (
|
|
2481
|
-
cssCode: (
|
|
2482
|
-
customFonts: (
|
|
2483
|
-
}, null, 8, ["contentId", "cssCode", "customFonts"])) :
|
|
2484
|
-
(d(),
|
|
2485
|
-
blocks: (N = (
|
|
2486
|
-
key:
|
|
2481
|
+
contentId: (c = e.useContent) == null ? void 0 : c.id,
|
|
2482
|
+
cssCode: (b = (u = e.useContent) == null ? void 0 : u.data) == null ? void 0 : b.cssCode,
|
|
2483
|
+
customFonts: (y = (g = e.useContent) == null ? void 0 : g.data) == null ? void 0 : y.customFonts
|
|
2484
|
+
}, null, 8, ["contentId", "cssCode", "customFonts"])) : v("", !0),
|
|
2485
|
+
(d(), E(l, {
|
|
2486
|
+
blocks: (N = ($ = e.useContent) == null ? void 0 : $.data) == null ? void 0 : N.blocks,
|
|
2487
|
+
key: e.forceReRenderCount
|
|
2487
2488
|
}, null, 8, ["blocks"]))
|
|
2488
|
-
], 8,
|
|
2489
|
+
], 8, Rn)) : v("", !0);
|
|
2489
2490
|
}
|
|
2490
|
-
const
|
|
2491
|
+
const _n = /* @__PURE__ */ f(Tn, [["render", En]]), An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2491
2492
|
__proto__: null,
|
|
2492
|
-
default:
|
|
2493
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2493
|
+
default: _n
|
|
2494
|
+
}, Symbol.toStringTag, { value: "Module" })), Z = {};
|
|
2494
2495
|
function Fn(e) {
|
|
2495
|
-
if (
|
|
2496
|
-
Object.assign(
|
|
2497
|
-
const
|
|
2496
|
+
if (m()) {
|
|
2497
|
+
Object.assign(Z, e);
|
|
2498
|
+
const t = {
|
|
2498
2499
|
type: "builder.settingsChange",
|
|
2499
|
-
data:
|
|
2500
|
+
data: Z
|
|
2500
2501
|
};
|
|
2501
|
-
parent.postMessage(
|
|
2502
|
+
parent.postMessage(t, "*");
|
|
2502
2503
|
}
|
|
2503
2504
|
}
|
|
2504
2505
|
export {
|
|
2505
2506
|
P as B,
|
|
2506
|
-
|
|
2507
|
-
|
|
2507
|
+
Ie as C,
|
|
2508
|
+
Re as F,
|
|
2508
2509
|
Fe as I,
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2510
|
+
Ye as S,
|
|
2511
|
+
_ as T,
|
|
2512
|
+
Vt as V,
|
|
2513
|
+
f as _,
|
|
2514
|
+
Vn as a,
|
|
2515
|
+
ye as b,
|
|
2516
|
+
I as c,
|
|
2517
|
+
_n as d,
|
|
2518
|
+
G as e,
|
|
2518
2519
|
L as f,
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2520
|
+
ve as g,
|
|
2521
|
+
Ct as h,
|
|
2522
|
+
Rt as i,
|
|
2523
|
+
k as j,
|
|
2524
|
+
Qt as k,
|
|
2524
2525
|
ce as l,
|
|
2525
2526
|
Pn as m,
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2527
|
+
Zt as n,
|
|
2528
|
+
bn as o,
|
|
2529
|
+
le as p,
|
|
2530
|
+
yt as q,
|
|
2531
|
+
He as r,
|
|
2531
2532
|
Fn as s,
|
|
2532
2533
|
Bn as t,
|
|
2533
2534
|
mt as u,
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2535
|
+
ht as v,
|
|
2536
|
+
ft as w,
|
|
2537
|
+
ae as x
|
|
2537
2538
|
};
|