@builder.io/sdk-vue 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/{awaiter-pA1AuJSn.js → awaiter-W9NCtbGd.js} +1 -1
- package/lib/browser/{awaiter-XqdWIlSd.cjs → awaiter-mEQ0ZDTH.cjs} +1 -1
- package/lib/browser/{block-styles-ytvCIXMJ.js → block-styles-YR66YUMW.js} +1 -1
- package/lib/browser/{block-styles-i6cpfJgi.cjs → block-styles-iE_AMMov.cjs} +1 -1
- package/lib/browser/{block-wrapper-4Ddr9Ro1.cjs → block-wrapper-uCoTCnWV.cjs} +1 -1
- package/lib/browser/{block-wrapper-UdxI8OCZ.js → block-wrapper-zPfAxV1K.js} +3 -3
- package/lib/browser/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/browser/{component-ref-CKlhzm4D.js → component-ref-1sJWCSnM.js} +3 -3
- package/lib/browser/{component-ref-1UbPu9gf.cjs → component-ref-KQElTQuz.cjs} +1 -1
- package/lib/browser/components/block/block.helpers.d.ts +4 -3
- package/lib/browser/components/content/components/enable-editor.helpers.d.ts +11 -0
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +8 -6
- package/lib/browser/components/content/content.vue.d.ts +7 -6
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +6 -6
- package/lib/browser/constants/file-types.d.ts +2 -0
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/context/builder.context.d.ts +1 -0
- package/lib/browser/context/types.d.ts +1 -0
- package/lib/browser/functions/extract-localized-values.d.ts +2 -0
- package/lib/browser/functions/traverse.d.ts +34 -0
- package/lib/browser/{get-block-properties-pUTK7jyd.cjs → get-block-properties-28x9iJbv.cjs} +1 -1
- package/lib/browser/{get-block-properties-C5uVrmU3.js → get-block-properties-6nHJC7Bl.js} +1 -1
- package/lib/browser/{index-tDGIvfSj.js → index-96lMP92Z.js} +689 -636
- package/lib/browser/index-vh-1AohY.cjs +166 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{repeated-block-h7zSwvTu.cjs → repeated-block-alcf4ekM.cjs} +1 -1
- package/lib/browser/{repeated-block-9RoptQEu.js → repeated-block-zdJEPXeM.js} +2 -2
- package/lib/browser/style.css +1 -1
- package/lib/browser/types/components.d.ts +3 -0
- package/lib/edge/{awaiter-yLbJL6E0.js → awaiter-AmWo0klS.js} +1 -1
- package/lib/edge/{awaiter-V9rb_a7Q.cjs → awaiter-b7-kYxAd.cjs} +1 -1
- package/lib/edge/{block-styles-ZvyyqPxg.cjs → block-styles-ZxATOs5j.cjs} +1 -1
- package/lib/edge/{block-styles-8rJVuUSs.js → block-styles-p5UoOXs6.js} +1 -1
- package/lib/edge/{block-wrapper-jr4gy0mp.js → block-wrapper-7wzSncci.js} +3 -3
- package/lib/edge/{block-wrapper-m7_ZegT7.cjs → block-wrapper-M-L3jacN.cjs} +1 -1
- package/lib/edge/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/edge/{component-ref-_qPvv-Qb.cjs → component-ref-ObIZSCWX.cjs} +1 -1
- package/lib/edge/{component-ref-uZEXLaN7.js → component-ref-fsAjiPgJ.js} +3 -3
- package/lib/edge/components/block/block.helpers.d.ts +4 -3
- package/lib/edge/components/content/components/enable-editor.helpers.d.ts +11 -0
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +8 -6
- package/lib/edge/components/content/content.vue.d.ts +7 -6
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +6 -6
- package/lib/edge/constants/file-types.d.ts +2 -0
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/context/builder.context.d.ts +1 -0
- package/lib/edge/context/types.d.ts +1 -0
- package/lib/edge/functions/extract-localized-values.d.ts +2 -0
- package/lib/edge/functions/traverse.d.ts +34 -0
- package/lib/edge/{get-block-properties-4gxUIMch.cjs → get-block-properties-BwEXZmo9.cjs} +1 -1
- package/lib/edge/{get-block-properties-IQuU2YJ7.js → get-block-properties-pBTZazws.js} +1 -1
- package/lib/edge/index-8CRS7AwO.cjs +184 -0
- package/lib/edge/{index-Qfd4FC6c.js → index-8E5G8ahg.js} +1289 -1236
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/{node/repeated-block-sc5a_YJK.cjs → edge/repeated-block-G7v60Rfo.cjs} +1 -1
- package/lib/edge/{repeated-block-J3gmF8cW.js → repeated-block-kbuQgIKA.js} +2 -2
- package/lib/edge/style.css +1 -1
- package/lib/edge/types/components.d.ts +3 -0
- package/lib/node/{awaiter-pBLgVddK.cjs → awaiter--VUu-0lf.cjs} +1 -1
- package/lib/node/{awaiter-yHq7zte0.js → awaiter-mRA2J5Tn.js} +1 -1
- package/lib/node/{block-styles-JKmWb0f1.cjs → block-styles-m8QMKLNf.cjs} +1 -1
- package/lib/node/{block-styles-UKsSQRSe.js → block-styles-mnvxO4c9.js} +1 -1
- package/lib/node/{block-wrapper-Ql9JBZTu.js → block-wrapper-TDtFNLpV.js} +3 -3
- package/lib/node/{block-wrapper-UkD5beND.cjs → block-wrapper-nmivaReB.cjs} +1 -1
- package/lib/node/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/node/{component-ref-KSw6L492.cjs → component-ref-G822HD6s.cjs} +1 -1
- package/lib/node/{component-ref-GQuqlfCd.js → component-ref-nu3ur2Zz.js} +3 -3
- package/lib/node/components/block/block.helpers.d.ts +4 -3
- package/lib/node/components/content/components/enable-editor.helpers.d.ts +11 -0
- package/lib/node/components/content/components/enable-editor.vue.d.ts +8 -6
- package/lib/node/components/content/content.vue.d.ts +7 -6
- package/lib/node/components/content-variants/content-variants.vue.d.ts +6 -6
- package/lib/node/constants/file-types.d.ts +2 -0
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/context/builder.context.d.ts +1 -0
- package/lib/node/context/types.d.ts +1 -0
- package/lib/node/functions/extract-localized-values.d.ts +2 -0
- package/lib/node/functions/traverse.d.ts +34 -0
- package/lib/node/{get-block-properties-y-gYAn-I.js → get-block-properties-2BCkBOZG.js} +1 -1
- package/lib/node/{get-block-properties-RPZW1-a0.cjs → get-block-properties-fBgYSGfR.cjs} +1 -1
- package/lib/node/index-SmPbrgmX.cjs +166 -0
- package/lib/node/{index-5bUk_uLu.js → index-dZfvXbI_.js} +789 -736
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +1 -1
- package/lib/{edge/repeated-block-48-vVIqv.cjs → node/repeated-block-WDR29-D_.cjs} +1 -1
- package/lib/node/{repeated-block-_Z2mgv3f.js → repeated-block-XwjQQ8Do.js} +2 -2
- package/lib/node/style.css +1 -1
- package/lib/node/types/components.d.ts +3 -0
- package/package.json +1 -1
- package/lib/browser/index-N0sk5VKQ.cjs +0 -166
- package/lib/edge/index-LY5CDeZs.cjs +0 -184
- package/lib/node/index-W6CSiGOt.cjs +0 -166
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as b, openBlock as c, createElementBlock as p, Fragment as w, createBlock as y, resolveDynamicComponent as j, mergeProps as C, toHandlers as B, withCtx as N, renderSlot as x, resolveComponent as k, createTextVNode as
|
|
2
|
-
import { T as E, g as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as b, openBlock as c, createElementBlock as p, Fragment as w, createBlock as y, resolveDynamicComponent as j, mergeProps as C, toHandlers as B, withCtx as N, renderSlot as x, resolveComponent as k, createTextVNode as bt, toDisplayString as te, defineAsyncComponent as M, createVNode as $, renderList as V, createCommentVNode as v, h as Ae, createElementVNode as q, normalizeStyle as O, normalizeClass as z, markRaw as gt } from "vue";
|
|
2
|
+
import { T as E, g as yt, f as kt, i as R, s as vt, r as St, p as Ct, a as Tt, l as A, b as Ve, c as pe, d as wt, n as We, e as L, h as P, j as It } from "./should-force-browser-runtime-in-node-ikxWrCvn.js";
|
|
3
|
+
const $t = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Rt = (e) => typeof e == "string" && $t.has(e.toLowerCase());
|
|
4
4
|
function W(e = {}, t, n) {
|
|
5
5
|
const o = {};
|
|
6
6
|
for (const r in e) {
|
|
7
7
|
if (!e[r] || n && !r.startsWith(t))
|
|
8
8
|
continue;
|
|
9
|
-
const
|
|
10
|
-
o[
|
|
9
|
+
const s = n ? r.replace(t, "") : r;
|
|
10
|
+
o[s] = e[r];
|
|
11
11
|
}
|
|
12
12
|
return o;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const Et = b({
|
|
15
15
|
name: "dynamic-renderer",
|
|
16
16
|
props: ["TagName", "attributes", "actionAttributes"],
|
|
17
17
|
data() {
|
|
18
|
-
return { isEmptyElement:
|
|
18
|
+
return { isEmptyElement: Rt };
|
|
19
19
|
}
|
|
20
20
|
}), g = (e, t) => {
|
|
21
21
|
const n = e.__vccOpts || e;
|
|
@@ -23,7 +23,7 @@ const Tt = b({
|
|
|
23
23
|
n[o] = r;
|
|
24
24
|
return n;
|
|
25
25
|
};
|
|
26
|
-
function
|
|
26
|
+
function Pt(e, t, n, o, r, s) {
|
|
27
27
|
return e.isEmptyElement(e.TagName) ? (c(), y(j(e.TagName), C({ key: 1 }, e.attributes, B(e.actionAttributes)), null, 16)) : (c(), p(w, { key: 0 }, [
|
|
28
28
|
typeof e.TagName == "string" ? (c(), y(j(e.TagName), C({ key: 0 }, e.attributes, B(e.actionAttributes)), {
|
|
29
29
|
default: N(() => [
|
|
@@ -38,9 +38,9 @@ function wt(e, t, n, o, r, i) {
|
|
|
38
38
|
}, 16))
|
|
39
39
|
], 64));
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const me = /* @__PURE__ */ g(Et, [["render", Pt]]), Us = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42
42
|
__proto__: null,
|
|
43
|
-
default:
|
|
43
|
+
default: me
|
|
44
44
|
}, Symbol.toStringTag, { value: "Module" })), Z = () => {
|
|
45
45
|
switch (E) {
|
|
46
46
|
case "react":
|
|
@@ -54,9 +54,9 @@ const pe = /* @__PURE__ */ g(Tt, [["render", wt]]), Bs = /* @__PURE__ */ Object.
|
|
|
54
54
|
case "angular":
|
|
55
55
|
return "class";
|
|
56
56
|
}
|
|
57
|
-
},
|
|
57
|
+
}, Bt = b({
|
|
58
58
|
name: "builder-button",
|
|
59
|
-
components: { DynamicRenderer:
|
|
59
|
+
components: { DynamicRenderer: me },
|
|
60
60
|
props: [
|
|
61
61
|
"attributes",
|
|
62
62
|
"link",
|
|
@@ -83,20 +83,20 @@ const pe = /* @__PURE__ */ g(Tt, [["render", wt]]), Bs = /* @__PURE__ */ Object.
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
function
|
|
87
|
-
const
|
|
88
|
-
return c(), y(
|
|
86
|
+
function xt(e, t, n, o, r, s) {
|
|
87
|
+
const i = k("DynamicRenderer");
|
|
88
|
+
return c(), y(i, {
|
|
89
89
|
attributes: e.attrs(),
|
|
90
90
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
91
91
|
actionAttributes: e.filterAttrs(e.attributes, "v-on:", !0)
|
|
92
92
|
}, {
|
|
93
93
|
default: N(() => [
|
|
94
|
-
|
|
94
|
+
bt(te(e.text), 1)
|
|
95
95
|
]),
|
|
96
96
|
_: 1
|
|
97
97
|
}, 8, ["attributes", "TagName", "actionAttributes"]);
|
|
98
98
|
}
|
|
99
|
-
const
|
|
99
|
+
const At = /* @__PURE__ */ g(Bt, [["render", xt]]), Vt = Symbol(), le = {
|
|
100
100
|
Builder: {
|
|
101
101
|
content: null,
|
|
102
102
|
context: {},
|
|
@@ -110,54 +110,55 @@ const Rt = /* @__PURE__ */ g(It, [["render", $t]]), Et = Symbol(), ae = {
|
|
|
110
110
|
inheritedStyles: {},
|
|
111
111
|
BlocksWrapper: "div",
|
|
112
112
|
BlocksWrapperProps: {},
|
|
113
|
-
nonce: ""
|
|
113
|
+
nonce: "",
|
|
114
|
+
model: ""
|
|
114
115
|
},
|
|
115
|
-
key:
|
|
116
|
-
},
|
|
116
|
+
key: Vt
|
|
117
|
+
}, Wt = Symbol(), Ne = {
|
|
117
118
|
Components: { registeredComponents: {} },
|
|
118
|
-
key:
|
|
119
|
+
key: Wt
|
|
119
120
|
};
|
|
120
|
-
function
|
|
121
|
+
function Nt(e) {
|
|
121
122
|
var t;
|
|
122
123
|
return {
|
|
123
124
|
...(t = e.component) == null ? void 0 : t.options,
|
|
124
125
|
...e.options
|
|
125
126
|
};
|
|
126
127
|
}
|
|
127
|
-
function
|
|
128
|
+
function Ft(e, ...t) {
|
|
128
129
|
const n = Object.assign({}, e);
|
|
129
130
|
for (const o of t)
|
|
130
131
|
delete n[o];
|
|
131
132
|
return n;
|
|
132
133
|
}
|
|
133
|
-
const
|
|
134
|
-
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r,
|
|
134
|
+
const Fe = (e, t, n) => {
|
|
135
|
+
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r, s) => r != null ? r[s] : r, e);
|
|
135
136
|
return o === void 0 || o === e ? n : o;
|
|
136
|
-
},
|
|
137
|
+
}, Ot = ({
|
|
137
138
|
code: e,
|
|
138
139
|
builder: t,
|
|
139
140
|
context: n,
|
|
140
141
|
event: o,
|
|
141
142
|
localState: r,
|
|
142
|
-
rootSetState:
|
|
143
|
-
rootState:
|
|
143
|
+
rootSetState: s,
|
|
144
|
+
rootState: i
|
|
144
145
|
}) => {
|
|
145
|
-
const l =
|
|
146
|
+
const l = yt({
|
|
146
147
|
builder: t,
|
|
147
148
|
context: n,
|
|
148
149
|
event: o,
|
|
149
|
-
state:
|
|
150
|
-
rootState:
|
|
150
|
+
state: kt({
|
|
151
|
+
rootState: i,
|
|
151
152
|
localState: r,
|
|
152
|
-
rootSetState:
|
|
153
|
+
rootSetState: s
|
|
153
154
|
})
|
|
154
155
|
});
|
|
155
156
|
return new Function(...l.map(([a]) => a), e)(...l.map(([, a]) => a));
|
|
156
|
-
},
|
|
157
|
+
}, Dt = (e) => R() || vt({
|
|
157
158
|
shouldLogWarning: !0
|
|
158
|
-
}) ?
|
|
159
|
-
var t, n, o, r,
|
|
160
|
-
return ((o = (n = (t =
|
|
159
|
+
}) ? Ot(e) : St(e), Lt = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, Ut = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, Ht = (e) => {
|
|
160
|
+
var t, n, o, r, s, i;
|
|
161
|
+
return ((o = (n = (t = Lt.exec(e.trim())) == null ? void 0 : t.groups) == null ? void 0 : n.getPath) == null ? void 0 : o.slice(1)) || ((i = (s = (r = Ut.exec(e.trim())) == null ? void 0 : r.groups) == null ? void 0 : s.getPath) == null ? void 0 : i.slice(1));
|
|
161
162
|
};
|
|
162
163
|
function J({
|
|
163
164
|
code: e,
|
|
@@ -165,30 +166,30 @@ function J({
|
|
|
165
166
|
localState: n,
|
|
166
167
|
rootState: o,
|
|
167
168
|
rootSetState: r,
|
|
168
|
-
event:
|
|
169
|
-
isExpression:
|
|
169
|
+
event: s,
|
|
170
|
+
isExpression: i = !0
|
|
170
171
|
}) {
|
|
171
172
|
if (e.trim() === "")
|
|
172
173
|
return;
|
|
173
|
-
const l =
|
|
174
|
+
const l = Ht(e.trim());
|
|
174
175
|
if (l)
|
|
175
|
-
return
|
|
176
|
+
return Fe({
|
|
176
177
|
...o,
|
|
177
178
|
...n
|
|
178
179
|
}, l);
|
|
179
180
|
const a = {
|
|
180
|
-
code:
|
|
181
|
-
isExpression:
|
|
181
|
+
code: Ct(e, {
|
|
182
|
+
isExpression: i
|
|
182
183
|
}),
|
|
183
|
-
builder:
|
|
184
|
+
builder: Tt(),
|
|
184
185
|
context: t,
|
|
185
|
-
event:
|
|
186
|
+
event: s,
|
|
186
187
|
rootSetState: r,
|
|
187
188
|
rootState: o,
|
|
188
189
|
localState: n
|
|
189
190
|
};
|
|
190
191
|
try {
|
|
191
|
-
return
|
|
192
|
+
return Dt(a);
|
|
192
193
|
} catch (u) {
|
|
193
194
|
A.error("Failed code evaluation: " + u.message, {
|
|
194
195
|
code: e
|
|
@@ -196,21 +197,61 @@ function J({
|
|
|
196
197
|
return;
|
|
197
198
|
}
|
|
198
199
|
}
|
|
199
|
-
function
|
|
200
|
+
function _(e, t, n = null, o = null, r = /* @__PURE__ */ new WeakSet()) {
|
|
201
|
+
if (e == null || typeof e != "object") {
|
|
202
|
+
t(e, (s) => {
|
|
203
|
+
n !== null && o !== null && (n[o] = s);
|
|
204
|
+
});
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
r.has(e) || (r.add(e), Array.isArray(e) ? e.forEach((s, i) => {
|
|
208
|
+
t(s, (a) => {
|
|
209
|
+
e[i] = a;
|
|
210
|
+
}), _(s, t, e, i, r);
|
|
211
|
+
}) : Object.entries(e).forEach(([s, i]) => {
|
|
212
|
+
t(i, (a) => {
|
|
213
|
+
e[s] = a;
|
|
214
|
+
}), _(i, t, e, s, r);
|
|
215
|
+
}));
|
|
216
|
+
}
|
|
217
|
+
function Oe(e) {
|
|
218
|
+
return e && typeof e == "object" && e["@type"] === "@builder.io/core:LocalizedValue";
|
|
219
|
+
}
|
|
220
|
+
function Mt(e) {
|
|
221
|
+
if (!e || !Object.getOwnPropertyNames(e).length)
|
|
222
|
+
return !1;
|
|
223
|
+
let t = !1;
|
|
224
|
+
return _(e, (n) => {
|
|
225
|
+
if (Oe(n)) {
|
|
226
|
+
t = !0;
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
}), t;
|
|
230
|
+
}
|
|
231
|
+
function jt(e, t) {
|
|
232
|
+
return !e || !Object.getOwnPropertyNames(e).length ? {} : (_(e, (n, o) => {
|
|
233
|
+
Oe(n) && o(n[t] ?? void 0);
|
|
234
|
+
}), e);
|
|
235
|
+
}
|
|
236
|
+
function Kt(e, t) {
|
|
237
|
+
var n, o;
|
|
238
|
+
return (n = e.component) != null && n.options && Mt((o = e.component) == null ? void 0 : o.options) && (t || console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"), e.component.options = jt(e.component.options, t ?? "Default")), e;
|
|
239
|
+
}
|
|
240
|
+
function ce(e) {
|
|
200
241
|
if (e === null || typeof e != "object")
|
|
201
242
|
return e;
|
|
202
243
|
if (Array.isArray(e))
|
|
203
|
-
return e.map((n) =>
|
|
244
|
+
return e.map((n) => ce(n));
|
|
204
245
|
if (e["@type"] === "@builder.io/sdk:Element")
|
|
205
246
|
return e;
|
|
206
247
|
const t = {};
|
|
207
248
|
for (const n in e)
|
|
208
|
-
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
249
|
+
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = ce(e[n]));
|
|
209
250
|
return t;
|
|
210
251
|
}
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
213
|
-
const t =
|
|
252
|
+
const qt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), zt = (e) => {
|
|
253
|
+
if (qt) {
|
|
254
|
+
const t = pe(e);
|
|
214
255
|
return {
|
|
215
256
|
...t,
|
|
216
257
|
properties: {
|
|
@@ -221,7 +262,7 @@ const Dt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Ot = (e) =
|
|
|
221
262
|
}
|
|
222
263
|
};
|
|
223
264
|
} else {
|
|
224
|
-
const t =
|
|
265
|
+
const t = ce(Ft(e, "children", "meta"));
|
|
225
266
|
return {
|
|
226
267
|
...t,
|
|
227
268
|
properties: {
|
|
@@ -234,7 +275,7 @@ const Dt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Ot = (e) =
|
|
|
234
275
|
meta: e.meta
|
|
235
276
|
};
|
|
236
277
|
}
|
|
237
|
-
},
|
|
278
|
+
}, Gt = ({
|
|
238
279
|
block: e,
|
|
239
280
|
context: t,
|
|
240
281
|
localState: n,
|
|
@@ -243,55 +284,55 @@ const Dt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Ot = (e) =
|
|
|
243
284
|
}) => {
|
|
244
285
|
if (!e.bindings)
|
|
245
286
|
return e;
|
|
246
|
-
const
|
|
247
|
-
for (const
|
|
248
|
-
const l = e.bindings[
|
|
287
|
+
const s = zt(e);
|
|
288
|
+
for (const i in e.bindings) {
|
|
289
|
+
const l = e.bindings[i], a = J({
|
|
249
290
|
code: l,
|
|
250
291
|
localState: n,
|
|
251
292
|
rootState: o,
|
|
252
293
|
rootSetState: r,
|
|
253
294
|
context: t
|
|
254
295
|
});
|
|
255
|
-
|
|
296
|
+
Ve(s, i, a);
|
|
256
297
|
}
|
|
257
|
-
return
|
|
298
|
+
return s;
|
|
258
299
|
};
|
|
259
|
-
function
|
|
300
|
+
function Jt({
|
|
260
301
|
block: e,
|
|
261
302
|
context: t,
|
|
262
303
|
shouldEvaluateBindings: n,
|
|
263
304
|
localState: o,
|
|
264
305
|
rootState: r,
|
|
265
|
-
rootSetState:
|
|
306
|
+
rootSetState: s
|
|
266
307
|
}) {
|
|
267
|
-
|
|
268
|
-
return n ?
|
|
269
|
-
block:
|
|
308
|
+
let i = Kt(e, r.locale);
|
|
309
|
+
return i = i, n ? Gt({
|
|
310
|
+
block: i,
|
|
270
311
|
localState: o,
|
|
271
312
|
rootState: r,
|
|
272
|
-
rootSetState:
|
|
313
|
+
rootSetState: s,
|
|
273
314
|
context: t
|
|
274
|
-
}) :
|
|
315
|
+
}) : i;
|
|
275
316
|
}
|
|
276
|
-
function
|
|
317
|
+
function De(e) {
|
|
277
318
|
const t = e || (R() ? window.location.search : void 0);
|
|
278
|
-
return t ?
|
|
319
|
+
return t ? wt(t).indexOf("builder.preview=") !== -1 : !1;
|
|
279
320
|
}
|
|
280
|
-
const
|
|
321
|
+
const Yt = (e) => ({
|
|
281
322
|
type: "builder.registerComponent",
|
|
282
|
-
data:
|
|
283
|
-
}),
|
|
323
|
+
data: ee(e)
|
|
324
|
+
}), Xt = (e) => {
|
|
284
325
|
const t = e.toString().trim(), n = /^[a-zA-Z0-9_]+\s*=>/i.test(t);
|
|
285
|
-
return `return (${!t.startsWith("function") && !t.startsWith("(") && !n ? "function " : ""}${t}).apply(this, arguments)`;
|
|
326
|
+
return `return (${!t.startsWith("function") && !t.startsWith("async") && !t.startsWith("(") && !n ? "function " : ""}${t}).apply(this, arguments)`;
|
|
286
327
|
};
|
|
287
|
-
function
|
|
288
|
-
return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ?
|
|
328
|
+
function ee(e) {
|
|
329
|
+
return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ? Xt(n) : n));
|
|
289
330
|
}
|
|
290
|
-
const
|
|
291
|
-
function
|
|
292
|
-
e === "plugin" && (t =
|
|
293
|
-
let n =
|
|
294
|
-
if (n || (n =
|
|
331
|
+
const Te = {};
|
|
332
|
+
function Qt(e, t) {
|
|
333
|
+
e === "plugin" && (t = ee(t));
|
|
334
|
+
let n = Te[e];
|
|
335
|
+
if (n || (n = Te[e] = []), n.push(t), R()) {
|
|
295
336
|
const o = {
|
|
296
337
|
type: "builder.register",
|
|
297
338
|
data: {
|
|
@@ -306,42 +347,42 @@ function Kt(e, t) {
|
|
|
306
347
|
}
|
|
307
348
|
}
|
|
308
349
|
}
|
|
309
|
-
const
|
|
310
|
-
function
|
|
350
|
+
const we = {};
|
|
351
|
+
function Hs(e) {
|
|
311
352
|
if (R()) {
|
|
312
|
-
Object.assign(
|
|
353
|
+
Object.assign(we, e);
|
|
313
354
|
const t = {
|
|
314
355
|
type: "builder.settingsChange",
|
|
315
|
-
data:
|
|
356
|
+
data: we
|
|
316
357
|
};
|
|
317
358
|
parent.postMessage(t, "*");
|
|
318
359
|
}
|
|
319
360
|
}
|
|
320
|
-
const
|
|
361
|
+
const Ie = "builder.", Zt = "options.", Le = (e) => {
|
|
321
362
|
if (!e)
|
|
322
363
|
return {};
|
|
323
|
-
const t =
|
|
364
|
+
const t = We(e), n = {};
|
|
324
365
|
return Object.keys(t).forEach((o) => {
|
|
325
|
-
if (o.startsWith(
|
|
326
|
-
const r = o.replace(
|
|
366
|
+
if (o.startsWith(Ie)) {
|
|
367
|
+
const r = o.replace(Ie, "").replace(Zt, "");
|
|
327
368
|
n[r] = t[o];
|
|
328
369
|
}
|
|
329
370
|
}), n;
|
|
330
|
-
},
|
|
371
|
+
}, _t = () => {
|
|
331
372
|
if (!R())
|
|
332
373
|
return {};
|
|
333
374
|
const e = new URLSearchParams(window.location.search);
|
|
334
|
-
return
|
|
335
|
-
},
|
|
375
|
+
return Le(e);
|
|
376
|
+
}, Ue = "3.0.1", He = () => ({
|
|
336
377
|
"X-Builder-SDK": E,
|
|
337
378
|
"X-Builder-SDK-GEN": "2",
|
|
338
|
-
"X-Builder-SDK-Version":
|
|
339
|
-
}),
|
|
379
|
+
"X-Builder-SDK-Version": Ue
|
|
380
|
+
}), en = (e) => {
|
|
340
381
|
if (e === "localhost" || e === "127.0.0.1")
|
|
341
382
|
return e;
|
|
342
383
|
const t = e.split(".");
|
|
343
384
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
344
|
-
},
|
|
385
|
+
}, Me = ({
|
|
345
386
|
name: e,
|
|
346
387
|
canTrack: t
|
|
347
388
|
}) => {
|
|
@@ -352,14 +393,14 @@ const Te = "builder.", qt = "options.", Ne = (e) => {
|
|
|
352
393
|
A.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
353
394
|
return;
|
|
354
395
|
}
|
|
355
|
-
},
|
|
396
|
+
}, je = async (e) => Me(e), tn = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(L).join("; "), nn = [["secure", ""], ["SameSite", "None"]], on = ({
|
|
356
397
|
name: e,
|
|
357
398
|
value: t,
|
|
358
399
|
expires: n
|
|
359
400
|
}) => {
|
|
360
|
-
const r = (R() ? location.protocol === "https:" : !0) ?
|
|
361
|
-
return
|
|
362
|
-
},
|
|
401
|
+
const r = (R() ? location.protocol === "https:" : !0) ? nn : [[]], s = n ? [["expires", n.toUTCString()]] : [[]], i = [[e, t], ...s, ["path", "/"], ["domain", en(window.location.hostname)], ...r];
|
|
402
|
+
return tn(i);
|
|
403
|
+
}, Ke = async ({
|
|
363
404
|
name: e,
|
|
364
405
|
value: t,
|
|
365
406
|
expires: n,
|
|
@@ -368,7 +409,7 @@ const Te = "builder.", qt = "options.", Ne = (e) => {
|
|
|
368
409
|
try {
|
|
369
410
|
if (!o)
|
|
370
411
|
return;
|
|
371
|
-
const r =
|
|
412
|
+
const r = on({
|
|
372
413
|
name: e,
|
|
373
414
|
value: t,
|
|
374
415
|
expires: n
|
|
@@ -378,93 +419,93 @@ const Te = "builder.", qt = "options.", Ne = (e) => {
|
|
|
378
419
|
A.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
|
|
379
420
|
}
|
|
380
421
|
};
|
|
381
|
-
function
|
|
422
|
+
function rn() {
|
|
382
423
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
383
424
|
const t = Math.random() * 16 | 0;
|
|
384
425
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
385
426
|
});
|
|
386
427
|
}
|
|
387
|
-
function
|
|
388
|
-
return
|
|
428
|
+
function qe() {
|
|
429
|
+
return rn().replace(/-/g, "");
|
|
389
430
|
}
|
|
390
|
-
const
|
|
431
|
+
const ze = "builderSessionId", sn = async ({
|
|
391
432
|
canTrack: e
|
|
392
433
|
}) => {
|
|
393
434
|
if (!e)
|
|
394
435
|
return;
|
|
395
|
-
const t = await
|
|
396
|
-
name:
|
|
436
|
+
const t = await je({
|
|
437
|
+
name: ze,
|
|
397
438
|
canTrack: e
|
|
398
439
|
});
|
|
399
440
|
if (L(t))
|
|
400
441
|
return t;
|
|
401
442
|
{
|
|
402
|
-
const n =
|
|
403
|
-
return
|
|
443
|
+
const n = an();
|
|
444
|
+
return ln({
|
|
404
445
|
id: n,
|
|
405
446
|
canTrack: e
|
|
406
447
|
}), n;
|
|
407
448
|
}
|
|
408
|
-
},
|
|
449
|
+
}, an = () => qe(), ln = ({
|
|
409
450
|
id: e,
|
|
410
451
|
canTrack: t
|
|
411
|
-
}) =>
|
|
412
|
-
name:
|
|
452
|
+
}) => Ke({
|
|
453
|
+
name: ze,
|
|
413
454
|
value: e,
|
|
414
455
|
canTrack: t
|
|
415
|
-
}),
|
|
456
|
+
}), Ge = () => R() && typeof localStorage < "u" ? localStorage : void 0, cn = ({
|
|
416
457
|
key: e,
|
|
417
458
|
canTrack: t
|
|
418
459
|
}) => {
|
|
419
460
|
var n;
|
|
420
461
|
try {
|
|
421
|
-
return t ? (n =
|
|
462
|
+
return t ? (n = Ge()) == null ? void 0 : n.getItem(e) : void 0;
|
|
422
463
|
} catch (o) {
|
|
423
464
|
console.debug("[LocalStorage] GET error: ", o);
|
|
424
465
|
return;
|
|
425
466
|
}
|
|
426
|
-
},
|
|
467
|
+
}, dn = ({
|
|
427
468
|
key: e,
|
|
428
469
|
canTrack: t,
|
|
429
470
|
value: n
|
|
430
471
|
}) => {
|
|
431
472
|
var o;
|
|
432
473
|
try {
|
|
433
|
-
t && ((o =
|
|
474
|
+
t && ((o = Ge()) == null || o.setItem(e, n));
|
|
434
475
|
} catch (r) {
|
|
435
476
|
console.debug("[LocalStorage] SET error: ", r);
|
|
436
477
|
}
|
|
437
|
-
},
|
|
478
|
+
}, Je = "builderVisitorId", un = ({
|
|
438
479
|
canTrack: e
|
|
439
480
|
}) => {
|
|
440
481
|
if (!e)
|
|
441
482
|
return;
|
|
442
|
-
const t =
|
|
443
|
-
key:
|
|
483
|
+
const t = cn({
|
|
484
|
+
key: Je,
|
|
444
485
|
canTrack: e
|
|
445
486
|
});
|
|
446
487
|
if (L(t))
|
|
447
488
|
return t;
|
|
448
489
|
{
|
|
449
|
-
const n =
|
|
450
|
-
return
|
|
490
|
+
const n = pn();
|
|
491
|
+
return mn({
|
|
451
492
|
id: n,
|
|
452
493
|
canTrack: e
|
|
453
494
|
}), n;
|
|
454
495
|
}
|
|
455
|
-
},
|
|
496
|
+
}, pn = () => qe(), mn = ({
|
|
456
497
|
id: e,
|
|
457
498
|
canTrack: t
|
|
458
|
-
}) =>
|
|
459
|
-
key:
|
|
499
|
+
}) => dn({
|
|
500
|
+
key: Je,
|
|
460
501
|
value: e,
|
|
461
502
|
canTrack: t
|
|
462
503
|
});
|
|
463
|
-
function
|
|
504
|
+
function he(e) {
|
|
464
505
|
var t;
|
|
465
506
|
typeof process < "u" && ((t = process.env) != null && t.DEBUG) && String(process.env.DEBUG) == "true" && A.log(e);
|
|
466
507
|
}
|
|
467
|
-
const
|
|
508
|
+
const hn = async ({
|
|
468
509
|
canTrack: e
|
|
469
510
|
}) => {
|
|
470
511
|
if (!e)
|
|
@@ -472,16 +513,16 @@ const an = async ({
|
|
|
472
513
|
visitorId: void 0,
|
|
473
514
|
sessionId: void 0
|
|
474
515
|
};
|
|
475
|
-
const t = await
|
|
516
|
+
const t = await sn({
|
|
476
517
|
canTrack: e
|
|
477
|
-
}), n =
|
|
518
|
+
}), n = un({
|
|
478
519
|
canTrack: e
|
|
479
520
|
});
|
|
480
521
|
return {
|
|
481
522
|
sessionId: t,
|
|
482
523
|
visitorId: n
|
|
483
524
|
};
|
|
484
|
-
},
|
|
525
|
+
}, fn = async ({
|
|
485
526
|
type: e,
|
|
486
527
|
canTrack: t,
|
|
487
528
|
apiKey: n,
|
|
@@ -495,14 +536,14 @@ const an = async ({
|
|
|
495
536
|
url: location.href,
|
|
496
537
|
...o
|
|
497
538
|
},
|
|
498
|
-
...await
|
|
539
|
+
...await hn({
|
|
499
540
|
canTrack: t
|
|
500
541
|
}),
|
|
501
|
-
userAttributes:
|
|
542
|
+
userAttributes: It(),
|
|
502
543
|
ownerId: n
|
|
503
544
|
}
|
|
504
545
|
});
|
|
505
|
-
async function
|
|
546
|
+
async function de({
|
|
506
547
|
apiHost: e,
|
|
507
548
|
...t
|
|
508
549
|
}) {
|
|
@@ -513,32 +554,32 @@ async function ce({
|
|
|
513
554
|
if (!t.canTrack || P() || !(R() || E === "reactNative"))
|
|
514
555
|
return;
|
|
515
556
|
const o = `${e || "https://cdn.builder.io"}/api/v1/track`;
|
|
516
|
-
return
|
|
557
|
+
return he(o), fetch(o, {
|
|
517
558
|
method: "POST",
|
|
518
559
|
body: JSON.stringify({
|
|
519
|
-
events: [await
|
|
560
|
+
events: [await fn(t)]
|
|
520
561
|
}),
|
|
521
562
|
headers: {
|
|
522
563
|
"content-type": "application/json",
|
|
523
|
-
...
|
|
564
|
+
...He()
|
|
524
565
|
},
|
|
525
566
|
mode: "cors"
|
|
526
567
|
}).catch((r) => {
|
|
527
568
|
console.error("Failed to track: ", r);
|
|
528
569
|
});
|
|
529
570
|
}
|
|
530
|
-
const
|
|
571
|
+
const Ms = (e) => de({
|
|
531
572
|
...e,
|
|
532
573
|
canTrack: !0
|
|
533
|
-
}),
|
|
534
|
-
function
|
|
574
|
+
}), bn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
575
|
+
function Ye(e, t) {
|
|
535
576
|
if (!t.origin.startsWith("http") && !t.origin.startsWith("https"))
|
|
536
577
|
return !1;
|
|
537
578
|
const n = new URL(t.origin), o = n.hostname;
|
|
538
|
-
return (e ||
|
|
579
|
+
return (e || bn).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
539
580
|
}
|
|
540
|
-
const
|
|
541
|
-
|
|
581
|
+
const gn = () => {
|
|
582
|
+
Qt("insertMenu", {
|
|
542
583
|
name: "_default",
|
|
543
584
|
default: !0,
|
|
544
585
|
items: [{
|
|
@@ -560,14 +601,14 @@ const dn = () => {
|
|
|
560
601
|
}]
|
|
561
602
|
});
|
|
562
603
|
};
|
|
563
|
-
let
|
|
564
|
-
const
|
|
604
|
+
let $e = !1;
|
|
605
|
+
const Xe = (e = {}) => {
|
|
565
606
|
var t, n;
|
|
566
|
-
|
|
607
|
+
$e || ($e = !0, R() && ((t = window.parent) == null || t.postMessage({
|
|
567
608
|
type: "builder.sdkInfo",
|
|
568
609
|
data: {
|
|
569
610
|
target: E,
|
|
570
|
-
version:
|
|
611
|
+
version: Ue,
|
|
571
612
|
supportsPatchUpdates: !1,
|
|
572
613
|
// Supports builder-model="..." attribute which is needed to
|
|
573
614
|
// scope our '+ add block' button styling
|
|
@@ -580,8 +621,8 @@ const ze = (e = {}) => {
|
|
|
580
621
|
options: e
|
|
581
622
|
}
|
|
582
623
|
}, "*"), window.addEventListener("message", (o) => {
|
|
583
|
-
var
|
|
584
|
-
if (!
|
|
624
|
+
var s, i;
|
|
625
|
+
if (!Ye(e.trustedHosts, o))
|
|
585
626
|
return;
|
|
586
627
|
const {
|
|
587
628
|
data: r
|
|
@@ -596,7 +637,7 @@ const ze = (e = {}) => {
|
|
|
596
637
|
} catch (f) {
|
|
597
638
|
d = f;
|
|
598
639
|
}
|
|
599
|
-
d ? (
|
|
640
|
+
d ? (s = window.parent) == null || s.postMessage({
|
|
600
641
|
type: "builder.evaluateError",
|
|
601
642
|
data: {
|
|
602
643
|
id: u,
|
|
@@ -611,7 +652,7 @@ const ze = (e = {}) => {
|
|
|
611
652
|
result: f
|
|
612
653
|
}
|
|
613
654
|
}, "*");
|
|
614
|
-
}).catch(console.error) : (
|
|
655
|
+
}).catch(console.error) : (i = window.parent) == null || i.postMessage({
|
|
615
656
|
type: "builder.evaluateResult",
|
|
616
657
|
data: {
|
|
617
658
|
result: h,
|
|
@@ -622,12 +663,12 @@ const ze = (e = {}) => {
|
|
|
622
663
|
}
|
|
623
664
|
}
|
|
624
665
|
})));
|
|
625
|
-
},
|
|
666
|
+
}, Qe = ({
|
|
626
667
|
model: e,
|
|
627
668
|
trustedHosts: t,
|
|
628
669
|
callbacks: n
|
|
629
670
|
}) => (o) => {
|
|
630
|
-
if (!
|
|
671
|
+
if (!Ye(t, o))
|
|
631
672
|
return;
|
|
632
673
|
const {
|
|
633
674
|
data: r
|
|
@@ -643,17 +684,17 @@ const ze = (e = {}) => {
|
|
|
643
684
|
break;
|
|
644
685
|
}
|
|
645
686
|
case "builder.contentUpdate": {
|
|
646
|
-
const
|
|
647
|
-
|
|
687
|
+
const s = r.data, i = s.key || s.alias || s.entry || s.modelName, l = s.data;
|
|
688
|
+
i === e && n.contentUpdate(l);
|
|
648
689
|
break;
|
|
649
690
|
}
|
|
650
691
|
}
|
|
651
|
-
},
|
|
692
|
+
}, js = (e, t, n) => {
|
|
652
693
|
if (!R)
|
|
653
694
|
return A.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
654
695
|
};
|
|
655
|
-
|
|
656
|
-
const o =
|
|
696
|
+
Xe();
|
|
697
|
+
const o = Qe({
|
|
657
698
|
callbacks: {
|
|
658
699
|
contentUpdate: t,
|
|
659
700
|
animation: () => {
|
|
@@ -667,45 +708,45 @@ const ze = (e = {}) => {
|
|
|
667
708
|
return window.addEventListener("message", o), () => {
|
|
668
709
|
window.removeEventListener("message", o);
|
|
669
710
|
};
|
|
670
|
-
},
|
|
711
|
+
}, yn = "builder.tests", fe = (e) => `${yn}.${e}`, kn = ({
|
|
671
712
|
contentId: e
|
|
672
|
-
}) =>
|
|
673
|
-
name:
|
|
713
|
+
}) => je({
|
|
714
|
+
name: fe(e),
|
|
674
715
|
canTrack: !0
|
|
675
|
-
}),
|
|
716
|
+
}), vn = ({
|
|
676
717
|
contentId: e
|
|
677
|
-
}) =>
|
|
678
|
-
name:
|
|
718
|
+
}) => Me({
|
|
719
|
+
name: fe(e),
|
|
679
720
|
canTrack: !0
|
|
680
|
-
}),
|
|
721
|
+
}), Sn = ({
|
|
681
722
|
contentId: e,
|
|
682
723
|
value: t
|
|
683
|
-
}) =>
|
|
684
|
-
name:
|
|
724
|
+
}) => Ke({
|
|
725
|
+
name: fe(e),
|
|
685
726
|
value: t,
|
|
686
727
|
canTrack: !0
|
|
687
|
-
}),
|
|
728
|
+
}), Ze = (e) => L(e.id) && L(e.variations) && Object.keys(e.variations).length > 0, Cn = ({
|
|
688
729
|
id: e,
|
|
689
730
|
variations: t
|
|
690
731
|
}) => {
|
|
691
732
|
var r;
|
|
692
733
|
let n = 0;
|
|
693
734
|
const o = Math.random();
|
|
694
|
-
for (const
|
|
695
|
-
const
|
|
696
|
-
if (n +=
|
|
697
|
-
return
|
|
735
|
+
for (const s in t) {
|
|
736
|
+
const i = (r = t[s]) == null ? void 0 : r.testRatio;
|
|
737
|
+
if (n += i, o < n)
|
|
738
|
+
return s;
|
|
698
739
|
}
|
|
699
740
|
return e;
|
|
700
|
-
},
|
|
701
|
-
const t =
|
|
702
|
-
return
|
|
741
|
+
}, _e = (e) => {
|
|
742
|
+
const t = Cn(e);
|
|
743
|
+
return Sn({
|
|
703
744
|
contentId: e.id,
|
|
704
745
|
value: t
|
|
705
746
|
}).catch((n) => {
|
|
706
747
|
A.error("could not store A/B test variation: ", n);
|
|
707
748
|
}), t;
|
|
708
|
-
},
|
|
749
|
+
}, et = ({
|
|
709
750
|
item: e,
|
|
710
751
|
testGroupId: t
|
|
711
752
|
}) => {
|
|
@@ -719,7 +760,7 @@ const ze = (e = {}) => {
|
|
|
719
760
|
testVariationId: n.id,
|
|
720
761
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
721
762
|
};
|
|
722
|
-
},
|
|
763
|
+
}, Tn = ({
|
|
723
764
|
item: e,
|
|
724
765
|
canTrack: t
|
|
725
766
|
}) => {
|
|
@@ -727,14 +768,14 @@ const ze = (e = {}) => {
|
|
|
727
768
|
return e;
|
|
728
769
|
if (!e)
|
|
729
770
|
return;
|
|
730
|
-
if (!
|
|
771
|
+
if (!Ze(e))
|
|
731
772
|
return e;
|
|
732
|
-
const n =
|
|
773
|
+
const n = vn({
|
|
733
774
|
contentId: e.id
|
|
734
|
-
}) ||
|
|
775
|
+
}) || _e({
|
|
735
776
|
variations: e.variations,
|
|
736
777
|
id: e.id
|
|
737
|
-
}), o =
|
|
778
|
+
}), o = et({
|
|
738
779
|
item: e,
|
|
739
780
|
testGroupId: n
|
|
740
781
|
});
|
|
@@ -742,18 +783,18 @@ const ze = (e = {}) => {
|
|
|
742
783
|
...e,
|
|
743
784
|
...o
|
|
744
785
|
};
|
|
745
|
-
},
|
|
786
|
+
}, wn = async ({
|
|
746
787
|
item: e,
|
|
747
788
|
canTrack: t
|
|
748
789
|
}) => {
|
|
749
|
-
if (!t || !
|
|
790
|
+
if (!t || !Ze(e))
|
|
750
791
|
return e;
|
|
751
|
-
const o = await
|
|
792
|
+
const o = await kn({
|
|
752
793
|
contentId: e.id
|
|
753
|
-
}) ||
|
|
794
|
+
}) || _e({
|
|
754
795
|
variations: e.variations,
|
|
755
796
|
id: e.id
|
|
756
|
-
}), r =
|
|
797
|
+
}), r = et({
|
|
757
798
|
item: e,
|
|
758
799
|
testGroupId: o
|
|
759
800
|
});
|
|
@@ -762,46 +803,46 @@ const ze = (e = {}) => {
|
|
|
762
803
|
...r
|
|
763
804
|
};
|
|
764
805
|
}, G = (e) => L(e) ? e : !0;
|
|
765
|
-
function
|
|
806
|
+
function In() {
|
|
766
807
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
767
808
|
}
|
|
768
|
-
function
|
|
769
|
-
const e =
|
|
809
|
+
function $n() {
|
|
810
|
+
const e = In().fetch;
|
|
770
811
|
if (typeof e > "u")
|
|
771
812
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
772
813
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
773
814
|
return e;
|
|
774
815
|
}
|
|
775
|
-
const
|
|
776
|
-
function
|
|
816
|
+
const Rn = $n();
|
|
817
|
+
function ue(e, t = null, n = ".") {
|
|
777
818
|
return Object.keys(e).reduce((o, r) => {
|
|
778
|
-
const
|
|
779
|
-
return [typeof
|
|
819
|
+
const s = e[r], i = [t, r].filter(Boolean).join(n);
|
|
820
|
+
return [typeof s == "object", s !== null, !(Array.isArray(s) && s.length === 0)].every(Boolean) ? {
|
|
780
821
|
...o,
|
|
781
|
-
...
|
|
822
|
+
...ue(s, i, n)
|
|
782
823
|
} : {
|
|
783
824
|
...o,
|
|
784
|
-
[
|
|
825
|
+
[i]: s
|
|
785
826
|
};
|
|
786
827
|
}, {});
|
|
787
828
|
}
|
|
788
|
-
function
|
|
829
|
+
function tt(e, t, n = {}) {
|
|
789
830
|
for (const o in e) {
|
|
790
|
-
const r = e[o],
|
|
791
|
-
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((
|
|
831
|
+
const r = e[o], s = t ? t + "." + o : o;
|
|
832
|
+
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((i) => i.startsWith("$")) ? tt(r, s, n) : n[s] = r;
|
|
792
833
|
}
|
|
793
834
|
return n;
|
|
794
835
|
}
|
|
795
|
-
const
|
|
836
|
+
const En = "v3", Re = (e) => typeof e == "number" && !isNaN(e) && e >= 0, be = (e) => {
|
|
796
837
|
const {
|
|
797
838
|
limit: t = 30,
|
|
798
839
|
userAttributes: n,
|
|
799
840
|
query: o,
|
|
800
841
|
model: r,
|
|
801
|
-
apiKey:
|
|
802
|
-
enrich:
|
|
842
|
+
apiKey: s,
|
|
843
|
+
enrich: i,
|
|
803
844
|
locale: l,
|
|
804
|
-
apiVersion: a =
|
|
845
|
+
apiVersion: a = En,
|
|
805
846
|
fields: u,
|
|
806
847
|
omit: m,
|
|
807
848
|
offset: h,
|
|
@@ -809,67 +850,67 @@ const Sn = "v3", Ie = (e) => typeof e == "number" && !isNaN(e) && e >= 0, fe = (
|
|
|
809
850
|
staleCacheSeconds: f,
|
|
810
851
|
sort: S,
|
|
811
852
|
includeUnpublished: T,
|
|
812
|
-
apiHost:
|
|
853
|
+
apiHost: D
|
|
813
854
|
} = e;
|
|
814
|
-
if (!
|
|
855
|
+
if (!s)
|
|
815
856
|
throw new Error("Missing API key");
|
|
816
857
|
if (!["v3"].includes(a))
|
|
817
858
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${a}'`);
|
|
818
|
-
const
|
|
819
|
-
I.searchParams.set("apiKey",
|
|
820
|
-
const
|
|
859
|
+
const mt = t !== 1, ht = D || "https://cdn.builder.io", I = new URL(`${ht}/api/${a}/content/${r}`);
|
|
860
|
+
I.searchParams.set("apiKey", s), I.searchParams.set("limit", String(t)), I.searchParams.set("noTraverse", String(mt)), I.searchParams.set("includeRefs", String(!0));
|
|
861
|
+
const ne = l || (n == null ? void 0 : n.locale);
|
|
821
862
|
let X = n;
|
|
822
|
-
if (
|
|
823
|
-
locale:
|
|
863
|
+
if (ne && (I.searchParams.set("locale", ne), X = {
|
|
864
|
+
locale: ne,
|
|
824
865
|
...X
|
|
825
|
-
}),
|
|
826
|
-
const F =
|
|
866
|
+
}), i && I.searchParams.set("enrich", String(i)), I.searchParams.set("omit", m || "meta.componentsUsed"), u && I.searchParams.set("fields", u), Number.isFinite(h) && h > -1 && I.searchParams.set("offset", String(Math.floor(h))), typeof T == "boolean" && I.searchParams.set("includeUnpublished", String(T)), d && Re(d) && I.searchParams.set("cacheSeconds", String(d)), f && Re(f) && I.searchParams.set("staleCacheSeconds", String(f)), S) {
|
|
867
|
+
const F = ue({
|
|
827
868
|
sort: S
|
|
828
869
|
});
|
|
829
870
|
for (const H in F)
|
|
830
871
|
I.searchParams.set(H, JSON.stringify(F[H]));
|
|
831
872
|
}
|
|
832
|
-
const
|
|
833
|
-
...
|
|
834
|
-
...
|
|
835
|
-
},
|
|
836
|
-
for (const F in
|
|
837
|
-
I.searchParams.set(F, String(
|
|
873
|
+
const ft = {
|
|
874
|
+
..._t(),
|
|
875
|
+
...We(e.options || {})
|
|
876
|
+
}, Ce = ue(ft);
|
|
877
|
+
for (const F in Ce)
|
|
878
|
+
I.searchParams.set(F, String(Ce[F]));
|
|
838
879
|
if (X && I.searchParams.set("userAttributes", JSON.stringify(X)), o) {
|
|
839
|
-
const F =
|
|
880
|
+
const F = tt({
|
|
840
881
|
query: o
|
|
841
882
|
});
|
|
842
883
|
for (const H in F)
|
|
843
884
|
I.searchParams.set(H, JSON.stringify(F[H]));
|
|
844
885
|
}
|
|
845
886
|
return I;
|
|
846
|
-
},
|
|
847
|
-
async function
|
|
848
|
-
const t = await
|
|
887
|
+
}, Pn = (e) => "results" in e;
|
|
888
|
+
async function ge(e) {
|
|
889
|
+
const t = await An({
|
|
849
890
|
...e,
|
|
850
891
|
limit: 1
|
|
851
892
|
});
|
|
852
893
|
return t && t[0] || null;
|
|
853
894
|
}
|
|
854
|
-
const
|
|
855
|
-
var
|
|
856
|
-
const t =
|
|
895
|
+
const Bn = async (e) => {
|
|
896
|
+
var i;
|
|
897
|
+
const t = be(e), n = e.fetch ?? Rn, o = {
|
|
857
898
|
...e.fetchOptions,
|
|
858
899
|
headers: {
|
|
859
|
-
...(
|
|
860
|
-
...
|
|
900
|
+
...(i = e.fetchOptions) == null ? void 0 : i.headers,
|
|
901
|
+
...He()
|
|
861
902
|
}
|
|
862
903
|
};
|
|
863
904
|
return await (await n(t.href, o)).json();
|
|
864
|
-
},
|
|
905
|
+
}, xn = async (e, t, n = be(e)) => {
|
|
865
906
|
const o = G(e.canTrack);
|
|
866
907
|
if (n.search.includes("preview="), !o || !(R() || E === "reactNative"))
|
|
867
908
|
return t.results;
|
|
868
909
|
try {
|
|
869
910
|
const r = [];
|
|
870
|
-
for (const
|
|
871
|
-
r.push(await
|
|
872
|
-
item:
|
|
911
|
+
for (const s of t.results)
|
|
912
|
+
r.push(await wn({
|
|
913
|
+
item: s,
|
|
873
914
|
canTrack: o
|
|
874
915
|
}));
|
|
875
916
|
t.results = r;
|
|
@@ -878,18 +919,18 @@ const Tn = async (e) => {
|
|
|
878
919
|
}
|
|
879
920
|
return t.results;
|
|
880
921
|
};
|
|
881
|
-
async function
|
|
882
|
-
const t =
|
|
883
|
-
if (!
|
|
922
|
+
async function An(e) {
|
|
923
|
+
const t = be(e), n = await Bn(e);
|
|
924
|
+
if (!Pn(n))
|
|
884
925
|
throw A.error("Error fetching data. ", {
|
|
885
926
|
url: t,
|
|
886
927
|
content: n,
|
|
887
928
|
options: e
|
|
888
929
|
}), n;
|
|
889
|
-
return
|
|
930
|
+
return xn(e, n);
|
|
890
931
|
}
|
|
891
|
-
const
|
|
892
|
-
var o, r,
|
|
932
|
+
const Ks = async (e) => {
|
|
933
|
+
var o, r, s;
|
|
893
934
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((r = e.userAttributes) == null ? void 0 : r.urlPath), n = {
|
|
894
935
|
...e,
|
|
895
936
|
apiKey: e.apiKey,
|
|
@@ -900,24 +941,24 @@ const Ws = async (e) => {
|
|
|
900
941
|
urlPath: t
|
|
901
942
|
} : {}
|
|
902
943
|
},
|
|
903
|
-
options:
|
|
944
|
+
options: Le(e.searchParams || ((s = e.url) == null ? void 0 : s.searchParams) || e.options)
|
|
904
945
|
};
|
|
905
946
|
return {
|
|
906
947
|
apiKey: n.apiKey,
|
|
907
948
|
model: n.model,
|
|
908
|
-
content: await
|
|
949
|
+
content: await ge(n)
|
|
909
950
|
};
|
|
910
|
-
},
|
|
911
|
-
function
|
|
912
|
-
let o, r,
|
|
951
|
+
}, ye = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
952
|
+
function Vn(e, t, n = {}) {
|
|
953
|
+
let o, r, s, i = null, l = 0;
|
|
913
954
|
const a = function() {
|
|
914
|
-
l = n.leading === !1 ? 0 : Date.now(),
|
|
955
|
+
l = n.leading === !1 ? 0 : Date.now(), i = null, s = e.apply(o, r), i || (o = r = null);
|
|
915
956
|
};
|
|
916
957
|
return function() {
|
|
917
958
|
const u = Date.now();
|
|
918
959
|
!l && n.leading === !1 && (l = u);
|
|
919
960
|
const m = t - (u - l);
|
|
920
|
-
return o = this, r = arguments, m <= 0 || m > t ? (
|
|
961
|
+
return o = this, r = arguments, m <= 0 || m > t ? (i && (clearTimeout(i), i = null), l = u, s = e.apply(o, r), i || (o = r = null)) : !i && n.trailing !== !1 && (i = setTimeout(a, m)), s;
|
|
921
962
|
};
|
|
922
963
|
}
|
|
923
964
|
function K(e, ...t) {
|
|
@@ -925,69 +966,69 @@ function K(e, ...t) {
|
|
|
925
966
|
for (let o = 1; o < arguments.length; o++) {
|
|
926
967
|
const r = arguments[o];
|
|
927
968
|
if (r != null)
|
|
928
|
-
for (const
|
|
929
|
-
Object.prototype.hasOwnProperty.call(r,
|
|
969
|
+
for (const s in r)
|
|
970
|
+
Object.prototype.hasOwnProperty.call(r, s) && (n[s] = r[s]);
|
|
930
971
|
}
|
|
931
972
|
return n;
|
|
932
973
|
}
|
|
933
|
-
function
|
|
974
|
+
function Wn(e) {
|
|
934
975
|
for (const t of e)
|
|
935
976
|
switch (t.trigger) {
|
|
936
977
|
case "pageLoad":
|
|
937
|
-
|
|
978
|
+
rt(t);
|
|
938
979
|
break;
|
|
939
980
|
case "scrollInView":
|
|
940
|
-
|
|
981
|
+
Fn(t);
|
|
941
982
|
break;
|
|
942
983
|
}
|
|
943
984
|
}
|
|
944
|
-
function
|
|
985
|
+
function nt(e) {
|
|
945
986
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
946
987
|
}
|
|
947
|
-
function
|
|
948
|
-
const n =
|
|
949
|
-
for (const l of
|
|
988
|
+
function ot(e, t) {
|
|
989
|
+
const n = Nn(e), o = getComputedStyle(t), r = e.steps[0].styles, s = e.steps[e.steps.length - 1].styles, i = [r, s];
|
|
990
|
+
for (const l of i)
|
|
950
991
|
for (const a of n)
|
|
951
992
|
a in l || (l[a] = o[a]);
|
|
952
993
|
}
|
|
953
|
-
function
|
|
994
|
+
function Nn(e) {
|
|
954
995
|
const t = [];
|
|
955
996
|
for (const n of e.steps)
|
|
956
997
|
for (const o in n.styles)
|
|
957
998
|
t.indexOf(o) === -1 && t.push(o);
|
|
958
999
|
return t;
|
|
959
1000
|
}
|
|
960
|
-
function
|
|
1001
|
+
function rt(e) {
|
|
961
1002
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
962
1003
|
if (!t.length) {
|
|
963
|
-
|
|
1004
|
+
nt(e.elementId || e.id || "");
|
|
964
1005
|
return;
|
|
965
1006
|
}
|
|
966
1007
|
Array.from(t).forEach((n) => {
|
|
967
|
-
|
|
968
|
-
n.style.transition = `all ${e.duration}s ${
|
|
1008
|
+
ot(e, n), n.style.transition = "none", n.style.transitionDelay = "0", K(n.style, e.steps[0].styles), setTimeout(() => {
|
|
1009
|
+
n.style.transition = `all ${e.duration}s ${ye(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), K(n.style, e.steps[1].styles), setTimeout(() => {
|
|
969
1010
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
970
1011
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
971
1012
|
});
|
|
972
1013
|
});
|
|
973
1014
|
}
|
|
974
|
-
function
|
|
1015
|
+
function Fn(e) {
|
|
975
1016
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
976
1017
|
if (!t.length) {
|
|
977
|
-
|
|
1018
|
+
nt(e.elementId || e.id || "");
|
|
978
1019
|
return;
|
|
979
1020
|
}
|
|
980
1021
|
Array.from(t).forEach((n) => {
|
|
981
|
-
|
|
1022
|
+
ot(e, n);
|
|
982
1023
|
let o = !1, r = !1;
|
|
983
|
-
function
|
|
1024
|
+
function s() {
|
|
984
1025
|
!o && l(n) ? (o = !0, r = !0, setTimeout(() => {
|
|
985
|
-
K(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll",
|
|
1026
|
+
K(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", i), setTimeout(() => {
|
|
986
1027
|
r = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
987
1028
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
988
1029
|
})) : e.repeat && o && !r && !l(n) && (o = !1, K(n.style, e.steps[0].styles));
|
|
989
1030
|
}
|
|
990
|
-
const
|
|
1031
|
+
const i = Vn(s, 200, {
|
|
991
1032
|
leading: !1
|
|
992
1033
|
});
|
|
993
1034
|
function l(m) {
|
|
@@ -999,49 +1040,49 @@ function Pn(e) {
|
|
|
999
1040
|
K(n.style, a);
|
|
1000
1041
|
}
|
|
1001
1042
|
u(), setTimeout(() => {
|
|
1002
|
-
n.style.transition = `all ${e.duration}s ${
|
|
1003
|
-
}), document.addEventListener("scroll",
|
|
1043
|
+
n.style.transition = `all ${e.duration}s ${ye(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
1044
|
+
}), document.addEventListener("scroll", i, {
|
|
1004
1045
|
capture: !0,
|
|
1005
1046
|
passive: !0
|
|
1006
|
-
}),
|
|
1047
|
+
}), s();
|
|
1007
1048
|
});
|
|
1008
1049
|
}
|
|
1009
|
-
const
|
|
1050
|
+
const st = (e) => Object.entries(e).map(([n, o]) => {
|
|
1010
1051
|
if (typeof o == "string")
|
|
1011
|
-
return `${
|
|
1012
|
-
}).filter(L),
|
|
1013
|
-
`),
|
|
1052
|
+
return `${ye(n)}: ${o};`;
|
|
1053
|
+
}).filter(L), On = (e) => st(e).join(`
|
|
1054
|
+
`), qs = ({
|
|
1014
1055
|
mediaQuery: e,
|
|
1015
1056
|
className: t,
|
|
1016
1057
|
styles: n
|
|
1017
1058
|
}) => {
|
|
1018
1059
|
const o = `.${t} {
|
|
1019
|
-
${
|
|
1060
|
+
${On(n)}
|
|
1020
1061
|
}`;
|
|
1021
1062
|
return e ? `${e} {
|
|
1022
1063
|
${o}
|
|
1023
1064
|
}` : o;
|
|
1024
1065
|
};
|
|
1025
|
-
function
|
|
1066
|
+
function Dn({
|
|
1026
1067
|
style: e
|
|
1027
1068
|
}) {
|
|
1028
1069
|
return e;
|
|
1029
1070
|
}
|
|
1030
|
-
const
|
|
1071
|
+
const zs = ({
|
|
1031
1072
|
block: e,
|
|
1032
1073
|
context: t
|
|
1033
|
-
}) =>
|
|
1074
|
+
}) => it(Dn({
|
|
1034
1075
|
style: e.style || {},
|
|
1035
1076
|
context: t,
|
|
1036
1077
|
block: e
|
|
1037
1078
|
}));
|
|
1038
|
-
function
|
|
1079
|
+
function it(e) {
|
|
1039
1080
|
switch (E) {
|
|
1040
1081
|
case "svelte":
|
|
1041
1082
|
case "vue":
|
|
1042
1083
|
case "solid":
|
|
1043
1084
|
case "angular":
|
|
1044
|
-
return
|
|
1085
|
+
return st(e).join(" ");
|
|
1045
1086
|
case "qwik":
|
|
1046
1087
|
case "reactNative":
|
|
1047
1088
|
case "react":
|
|
@@ -1049,21 +1090,24 @@ function nt(e) {
|
|
|
1049
1090
|
return e;
|
|
1050
1091
|
}
|
|
1051
1092
|
}
|
|
1052
|
-
const
|
|
1093
|
+
const at = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includes(t) : !1 : !0, Ln = ({
|
|
1053
1094
|
block: e,
|
|
1054
|
-
registeredComponents: t
|
|
1095
|
+
registeredComponents: t,
|
|
1096
|
+
model: n
|
|
1055
1097
|
}) => {
|
|
1056
|
-
var
|
|
1057
|
-
const
|
|
1058
|
-
if (!
|
|
1098
|
+
var s;
|
|
1099
|
+
const o = (s = e.component) == null ? void 0 : s.name;
|
|
1100
|
+
if (!o)
|
|
1059
1101
|
return null;
|
|
1060
|
-
const
|
|
1061
|
-
if (
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
Could not find a registered component named "${n}".
|
|
1102
|
+
const r = t[o];
|
|
1103
|
+
if (!r || at(r, n)) {
|
|
1104
|
+
console.warn(`
|
|
1105
|
+
Could not find a registered component named "${o}".
|
|
1065
1106
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
1066
|
-
|
|
1107
|
+
return;
|
|
1108
|
+
} else
|
|
1109
|
+
return r;
|
|
1110
|
+
}, Un = ({
|
|
1067
1111
|
block: e,
|
|
1068
1112
|
context: t
|
|
1069
1113
|
}) => {
|
|
@@ -1082,7 +1126,7 @@ const An = ({
|
|
|
1082
1126
|
});
|
|
1083
1127
|
if (!Array.isArray(r))
|
|
1084
1128
|
return;
|
|
1085
|
-
const
|
|
1129
|
+
const s = n.collection.split(".").pop(), i = n.itemName || (s ? s + "Item" : "item");
|
|
1086
1130
|
return r.map((a, u) => ({
|
|
1087
1131
|
context: {
|
|
1088
1132
|
...t,
|
|
@@ -1090,65 +1134,65 @@ const An = ({
|
|
|
1090
1134
|
...t.localState,
|
|
1091
1135
|
$index: u,
|
|
1092
1136
|
$item: a,
|
|
1093
|
-
[
|
|
1094
|
-
[`$${
|
|
1137
|
+
[i]: a,
|
|
1138
|
+
[`$${i}Index`]: u
|
|
1095
1139
|
}
|
|
1096
1140
|
},
|
|
1097
1141
|
block: o
|
|
1098
1142
|
}));
|
|
1099
|
-
},
|
|
1143
|
+
}, Hn = (e, t) => {
|
|
1100
1144
|
var n;
|
|
1101
1145
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderLinkComponent ? {
|
|
1102
1146
|
builderLinkComponent: t
|
|
1103
1147
|
} : {};
|
|
1104
|
-
},
|
|
1105
|
-
var
|
|
1106
|
-
return (
|
|
1107
|
-
builderComponents: t
|
|
1148
|
+
}, Mn = (e, t, n) => {
|
|
1149
|
+
var o;
|
|
1150
|
+
return (o = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && o.builderComponents ? {
|
|
1151
|
+
builderComponents: Object.fromEntries(Object.entries(t).filter(([s, i]) => !at(i, n)))
|
|
1108
1152
|
} : {};
|
|
1109
|
-
},
|
|
1153
|
+
}, jn = (e, t) => {
|
|
1110
1154
|
var n;
|
|
1111
1155
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderBlock ? {
|
|
1112
1156
|
builderBlock: t
|
|
1113
1157
|
} : {};
|
|
1114
|
-
},
|
|
1158
|
+
}, Kn = (e, t) => {
|
|
1115
1159
|
var n;
|
|
1116
1160
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
|
|
1117
1161
|
builderContext: t
|
|
1118
1162
|
} : {};
|
|
1119
|
-
},
|
|
1163
|
+
}, qn = () => Promise.resolve().then(() => so).then((e) => e.default).catch((e) => {
|
|
1120
1164
|
throw console.error(
|
|
1121
1165
|
"Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
|
|
1122
1166
|
e
|
|
1123
1167
|
), e;
|
|
1124
|
-
}),
|
|
1168
|
+
}), zn = () => import("./block-styles-mnvxO4c9.js").then((e) => e.default).catch((e) => {
|
|
1125
1169
|
throw console.error(
|
|
1126
1170
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
1127
1171
|
e
|
|
1128
1172
|
), e;
|
|
1129
|
-
}),
|
|
1173
|
+
}), Gn = () => import("./block-wrapper-TDtFNLpV.js").then((e) => e.default).catch((e) => {
|
|
1130
1174
|
throw console.error(
|
|
1131
1175
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
1132
1176
|
e
|
|
1133
1177
|
), e;
|
|
1134
|
-
}),
|
|
1178
|
+
}), Jn = () => import("./component-ref-nu3ur2Zz.js").then((e) => e.default).catch((e) => {
|
|
1135
1179
|
throw console.error(
|
|
1136
1180
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
1137
1181
|
e
|
|
1138
1182
|
), e;
|
|
1139
|
-
}),
|
|
1183
|
+
}), Yn = () => import("./repeated-block-XwjQQ8Do.js").then((e) => e.default).catch((e) => {
|
|
1140
1184
|
throw console.error(
|
|
1141
1185
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
1142
1186
|
e
|
|
1143
1187
|
), e;
|
|
1144
|
-
}),
|
|
1188
|
+
}), Xn = b({
|
|
1145
1189
|
name: "block",
|
|
1146
1190
|
components: {
|
|
1147
|
-
BlockStyles: M(
|
|
1148
|
-
RepeatedBlock: M(
|
|
1149
|
-
ComponentRef: M(
|
|
1150
|
-
BlockWrapper: M(
|
|
1151
|
-
DynamicDiv: M(
|
|
1191
|
+
BlockStyles: M(zn),
|
|
1192
|
+
RepeatedBlock: M(Yn),
|
|
1193
|
+
ComponentRef: M(Jn),
|
|
1194
|
+
BlockWrapper: M(Gn),
|
|
1195
|
+
DynamicDiv: M(qn)
|
|
1152
1196
|
},
|
|
1153
1197
|
props: ["block", "context", "registeredComponents", "linkComponent"],
|
|
1154
1198
|
data() {
|
|
@@ -1161,7 +1205,7 @@ const An = ({
|
|
|
1161
1205
|
},
|
|
1162
1206
|
mounted() {
|
|
1163
1207
|
const e = this.processedBlock.id, t = this.processedBlock.animations;
|
|
1164
|
-
t && e &&
|
|
1208
|
+
t && e && Wn(
|
|
1165
1209
|
t.map((n) => ({
|
|
1166
1210
|
...n,
|
|
1167
1211
|
elementId: e
|
|
@@ -1172,14 +1216,14 @@ const An = ({
|
|
|
1172
1216
|
},
|
|
1173
1217
|
computed: {
|
|
1174
1218
|
repeatItem() {
|
|
1175
|
-
return
|
|
1219
|
+
return Un({
|
|
1176
1220
|
block: this.block,
|
|
1177
1221
|
context: this.context
|
|
1178
1222
|
});
|
|
1179
1223
|
},
|
|
1180
1224
|
processedBlock() {
|
|
1181
1225
|
var t;
|
|
1182
|
-
return (t = this.block.repeat) != null && t.collection ? this.block :
|
|
1226
|
+
return (t = this.block.repeat) != null && t.collection ? this.block : Jt({
|
|
1183
1227
|
block: this.block,
|
|
1184
1228
|
localState: this.context.localState,
|
|
1185
1229
|
rootState: this.context.rootState,
|
|
@@ -1189,9 +1233,10 @@ const An = ({
|
|
|
1189
1233
|
});
|
|
1190
1234
|
},
|
|
1191
1235
|
blockComponent() {
|
|
1192
|
-
return
|
|
1236
|
+
return Ln({
|
|
1193
1237
|
block: this.processedBlock,
|
|
1194
|
-
registeredComponents: this.registeredComponents
|
|
1238
|
+
registeredComponents: this.registeredComponents,
|
|
1239
|
+
model: this.context.model
|
|
1195
1240
|
});
|
|
1196
1241
|
},
|
|
1197
1242
|
Tag() {
|
|
@@ -1215,13 +1260,14 @@ const An = ({
|
|
|
1215
1260
|
blockChildren: this.processedBlock.children ?? [],
|
|
1216
1261
|
componentRef: (e = this.blockComponent) == null ? void 0 : e.component,
|
|
1217
1262
|
componentOptions: {
|
|
1218
|
-
...
|
|
1219
|
-
...
|
|
1220
|
-
...
|
|
1221
|
-
...
|
|
1222
|
-
...
|
|
1263
|
+
...Nt(this.processedBlock),
|
|
1264
|
+
...jn(this.blockComponent, this.processedBlock),
|
|
1265
|
+
...Kn(this.blockComponent, this.context),
|
|
1266
|
+
...Hn(this.blockComponent, this.linkComponent),
|
|
1267
|
+
...Mn(
|
|
1223
1268
|
this.blockComponent,
|
|
1224
|
-
this.registeredComponents
|
|
1269
|
+
this.registeredComponents,
|
|
1270
|
+
this.context.model
|
|
1225
1271
|
)
|
|
1226
1272
|
},
|
|
1227
1273
|
context: this.context,
|
|
@@ -1234,11 +1280,11 @@ const An = ({
|
|
|
1234
1280
|
}
|
|
1235
1281
|
}
|
|
1236
1282
|
});
|
|
1237
|
-
function
|
|
1283
|
+
function Qn(e, t, n, o, r, s) {
|
|
1238
1284
|
var h;
|
|
1239
|
-
const
|
|
1285
|
+
const i = k("BlockStyles"), l = k("ComponentRef"), a = k("Block", !0), u = k("BlockWrapper"), m = k("RepeatedBlock");
|
|
1240
1286
|
return e.canShowBlock ? (c(), p(w, { key: 0 }, [
|
|
1241
|
-
$(
|
|
1287
|
+
$(i, {
|
|
1242
1288
|
block: e.processedBlock,
|
|
1243
1289
|
context: e.context
|
|
1244
1290
|
}, null, 8, ["block", "context"]),
|
|
@@ -1299,10 +1345,10 @@ function Kn(e, t, n, o, r, i) {
|
|
|
1299
1345
|
], 64))
|
|
1300
1346
|
], 64)) : v("", !0);
|
|
1301
1347
|
}
|
|
1302
|
-
const
|
|
1348
|
+
const ke = /* @__PURE__ */ g(Xn, [["render", Qn]]), Gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1303
1349
|
__proto__: null,
|
|
1304
|
-
default:
|
|
1305
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1350
|
+
default: ke
|
|
1351
|
+
}, Symbol.toStringTag, { value: "Module" })), Zn = b({
|
|
1306
1352
|
name: "builder-blocks-wrapper",
|
|
1307
1353
|
props: [
|
|
1308
1354
|
"blocks",
|
|
@@ -1360,16 +1406,16 @@ const ye = /* @__PURE__ */ g(jn, [["render", Kn]]), Ds = /* @__PURE__ */ Object.
|
|
|
1360
1406
|
}
|
|
1361
1407
|
}
|
|
1362
1408
|
});
|
|
1363
|
-
function
|
|
1409
|
+
function _n(e, t, n, o, r, s) {
|
|
1364
1410
|
return c(), y(j(e.BlocksWrapper), C({
|
|
1365
1411
|
ref: "blocksWrapperRef",
|
|
1366
1412
|
class: e.className + " component-1k2igrjdg3x",
|
|
1367
1413
|
"builder-path": e.dataPath,
|
|
1368
1414
|
"builder-parent-id": e.parent,
|
|
1369
1415
|
style: e.styleProp,
|
|
1370
|
-
onClick: (
|
|
1371
|
-
onMouseEnter: (
|
|
1372
|
-
onKeyPress: (
|
|
1416
|
+
onClick: (i) => e.onClick(),
|
|
1417
|
+
onMouseEnter: (i) => e.onMouseEnter(),
|
|
1418
|
+
onKeyPress: (i) => e.onClick()
|
|
1373
1419
|
}, { ...e.BlocksWrapperProps }), {
|
|
1374
1420
|
default: N(() => [
|
|
1375
1421
|
x(e.$slots, "default", {}, void 0, !0)
|
|
@@ -1377,9 +1423,9 @@ function zn(e, t, n, o, r, i) {
|
|
|
1377
1423
|
_: 3
|
|
1378
1424
|
}, 16, ["class", "builder-path", "builder-parent-id", "style", "onClick", "onMouseEnter", "onKeyPress"]);
|
|
1379
1425
|
}
|
|
1380
|
-
const
|
|
1426
|
+
const eo = /* @__PURE__ */ g(Zn, [["render", _n], ["__scopeId", "data-v-ba2bc5c0"]]), to = b({
|
|
1381
1427
|
name: "builder-blocks",
|
|
1382
|
-
components: { BlocksWrapper:
|
|
1428
|
+
components: { BlocksWrapper: eo, Block: ke },
|
|
1383
1429
|
props: [
|
|
1384
1430
|
"blocks",
|
|
1385
1431
|
"parent",
|
|
@@ -1391,13 +1437,13 @@ const Gn = /* @__PURE__ */ g(qn, [["render", zn], ["__scopeId", "data-v-ba2bc5c0
|
|
|
1391
1437
|
"registeredComponents"
|
|
1392
1438
|
],
|
|
1393
1439
|
inject: {
|
|
1394
|
-
builderContext:
|
|
1395
|
-
componentsContext:
|
|
1440
|
+
builderContext: le.key,
|
|
1441
|
+
componentsContext: Ne.key
|
|
1396
1442
|
}
|
|
1397
1443
|
});
|
|
1398
|
-
function
|
|
1444
|
+
function no(e, t, n, o, r, s) {
|
|
1399
1445
|
var a, u, m, h;
|
|
1400
|
-
const
|
|
1446
|
+
const i = k("Block"), l = k("BlocksWrapper");
|
|
1401
1447
|
return c(), y(l, {
|
|
1402
1448
|
blocks: e.blocks,
|
|
1403
1449
|
parent: e.parent,
|
|
@@ -1410,7 +1456,7 @@ function Yn(e, t, n, o, r, i) {
|
|
|
1410
1456
|
default: N(() => [
|
|
1411
1457
|
e.blocks ? (c(!0), p(w, { key: 0 }, V(e.blocks, (d, f) => {
|
|
1412
1458
|
var S;
|
|
1413
|
-
return c(), y(
|
|
1459
|
+
return c(), y(i, {
|
|
1414
1460
|
key: d.id,
|
|
1415
1461
|
block: d,
|
|
1416
1462
|
linkComponent: e.linkComponent,
|
|
@@ -1422,21 +1468,21 @@ function Yn(e, t, n, o, r, i) {
|
|
|
1422
1468
|
_: 1
|
|
1423
1469
|
}, 8, ["blocks", "parent", "path", "styleProp", "classNameProp", "BlocksWrapper", "BlocksWrapperProps"]);
|
|
1424
1470
|
}
|
|
1425
|
-
const U = /* @__PURE__ */ g(
|
|
1471
|
+
const U = /* @__PURE__ */ g(to, [["render", no]]), oo = b({
|
|
1426
1472
|
name: "dynamic-div",
|
|
1427
1473
|
props: []
|
|
1428
1474
|
});
|
|
1429
|
-
function
|
|
1475
|
+
function ro(e, t, n, o, r, s) {
|
|
1430
1476
|
return c(), p("div", null, [
|
|
1431
1477
|
x(e.$slots, "default")
|
|
1432
1478
|
]);
|
|
1433
1479
|
}
|
|
1434
|
-
const Y = /* @__PURE__ */ g(
|
|
1480
|
+
const Y = /* @__PURE__ */ g(oo, [["render", ro]]), so = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1435
1481
|
__proto__: null,
|
|
1436
1482
|
default: Y
|
|
1437
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1483
|
+
}, Symbol.toStringTag, { value: "Module" })), ve = b({
|
|
1438
1484
|
render() {
|
|
1439
|
-
return
|
|
1485
|
+
return Ae("style", {
|
|
1440
1486
|
innerHTML: this.styles,
|
|
1441
1487
|
"data-id": this.id,
|
|
1442
1488
|
nonce: this.nonce
|
|
@@ -1444,7 +1490,7 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1444
1490
|
},
|
|
1445
1491
|
name: "inlined-styles",
|
|
1446
1492
|
props: ["styles", "id", "nonce"]
|
|
1447
|
-
}),
|
|
1493
|
+
}), lt = {
|
|
1448
1494
|
small: {
|
|
1449
1495
|
min: 320,
|
|
1450
1496
|
default: 321,
|
|
@@ -1460,11 +1506,11 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1460
1506
|
default: 991,
|
|
1461
1507
|
max: 1200
|
|
1462
1508
|
}
|
|
1463
|
-
},
|
|
1509
|
+
}, Js = (e, t = lt) => `@media (max-width: ${t[e].max}px)`, io = ({
|
|
1464
1510
|
small: e,
|
|
1465
1511
|
medium: t
|
|
1466
1512
|
}) => {
|
|
1467
|
-
const n =
|
|
1513
|
+
const n = pe(lt);
|
|
1468
1514
|
if (!e || !t)
|
|
1469
1515
|
return n;
|
|
1470
1516
|
const o = Math.floor(e / 2);
|
|
@@ -1479,18 +1525,18 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1479
1525
|
min: r,
|
|
1480
1526
|
default: r + 1
|
|
1481
1527
|
};
|
|
1482
|
-
const
|
|
1528
|
+
const s = n.medium.max + 1;
|
|
1483
1529
|
return n.large = {
|
|
1484
1530
|
max: 2e3,
|
|
1485
1531
|
// TODO: decide upper limit
|
|
1486
|
-
min:
|
|
1487
|
-
default:
|
|
1532
|
+
min: s,
|
|
1533
|
+
default: s + 1
|
|
1488
1534
|
}, n;
|
|
1489
|
-
},
|
|
1535
|
+
}, ao = (e) => `builder-columns ${e}-breakpoints`, lo = b({
|
|
1490
1536
|
name: "builder-columns",
|
|
1491
1537
|
components: {
|
|
1492
|
-
InlinedStyles:
|
|
1493
|
-
DynamicRenderer:
|
|
1538
|
+
InlinedStyles: ve,
|
|
1539
|
+
DynamicRenderer: me,
|
|
1494
1540
|
Blocks: U,
|
|
1495
1541
|
DynamicDiv: Y
|
|
1496
1542
|
},
|
|
@@ -1505,7 +1551,7 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1505
1551
|
"builderComponents"
|
|
1506
1552
|
],
|
|
1507
1553
|
data() {
|
|
1508
|
-
return { TARGET: E, getColumnsClass:
|
|
1554
|
+
return { TARGET: E, getColumnsClass: ao };
|
|
1509
1555
|
},
|
|
1510
1556
|
computed: {
|
|
1511
1557
|
gutterSize() {
|
|
@@ -1555,7 +1601,7 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1555
1601
|
};
|
|
1556
1602
|
},
|
|
1557
1603
|
columnCssVars(e) {
|
|
1558
|
-
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%",
|
|
1604
|
+
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%", s = 0;
|
|
1559
1605
|
return {
|
|
1560
1606
|
...{
|
|
1561
1607
|
display: "flex",
|
|
@@ -1569,7 +1615,7 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1569
1615
|
desktopStyle: n
|
|
1570
1616
|
}),
|
|
1571
1617
|
"--column-margin-left-mobile": this.getMobileStyle({
|
|
1572
|
-
stackedStyle:
|
|
1618
|
+
stackedStyle: s,
|
|
1573
1619
|
desktopStyle: o
|
|
1574
1620
|
}),
|
|
1575
1621
|
"--column-width-tablet": this.getTabletStyle({
|
|
@@ -1577,14 +1623,14 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1577
1623
|
desktopStyle: n
|
|
1578
1624
|
}),
|
|
1579
1625
|
"--column-margin-left-tablet": this.getTabletStyle({
|
|
1580
|
-
stackedStyle:
|
|
1626
|
+
stackedStyle: s,
|
|
1581
1627
|
desktopStyle: o
|
|
1582
1628
|
})
|
|
1583
1629
|
};
|
|
1584
1630
|
},
|
|
1585
1631
|
getWidthForBreakpointSize(e) {
|
|
1586
1632
|
var n, o;
|
|
1587
|
-
return
|
|
1633
|
+
return io(
|
|
1588
1634
|
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
1589
1635
|
)[e].max;
|
|
1590
1636
|
},
|
|
@@ -1622,19 +1668,19 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1622
1668
|
href: e.link
|
|
1623
1669
|
} : {},
|
|
1624
1670
|
[Z()]: "builder-column",
|
|
1625
|
-
style:
|
|
1671
|
+
style: it(this.columnCssVars(t))
|
|
1626
1672
|
};
|
|
1627
1673
|
}
|
|
1628
1674
|
}
|
|
1629
1675
|
});
|
|
1630
|
-
function
|
|
1676
|
+
function co(e, t, n, o, r, s) {
|
|
1631
1677
|
var u;
|
|
1632
|
-
const
|
|
1678
|
+
const i = k("InlinedStyles"), l = k("Blocks"), a = k("DynamicRenderer");
|
|
1633
1679
|
return c(), p("div", C({
|
|
1634
1680
|
class: e.getColumnsClass((u = e.builderBlock) == null ? void 0 : u.id) + " div-4wbls88y960",
|
|
1635
1681
|
style: e.columnsCssVars()
|
|
1636
1682
|
}, {}), [
|
|
1637
|
-
e.TARGET !== "reactNative" ? (c(), y(
|
|
1683
|
+
e.TARGET !== "reactNative" ? (c(), y(i, {
|
|
1638
1684
|
key: 0,
|
|
1639
1685
|
id: "builderio-columns",
|
|
1640
1686
|
styles: e.columnsStyles(),
|
|
@@ -1663,47 +1709,47 @@ function no(e, t, n, o, r, i) {
|
|
|
1663
1709
|
}, 1032, ["TagName", "attributes"]))), 128))
|
|
1664
1710
|
], 16);
|
|
1665
1711
|
}
|
|
1666
|
-
const
|
|
1712
|
+
const uo = /* @__PURE__ */ g(lo, [["render", co], ["__scopeId", "data-v-3354f136"]]), po = b({
|
|
1667
1713
|
name: "builder-fragment-component",
|
|
1668
1714
|
props: []
|
|
1669
1715
|
});
|
|
1670
|
-
function
|
|
1716
|
+
function mo(e, t, n, o, r, s) {
|
|
1671
1717
|
return c(), p("span", null, [
|
|
1672
1718
|
x(e.$slots, "default")
|
|
1673
1719
|
]);
|
|
1674
1720
|
}
|
|
1675
|
-
const
|
|
1676
|
-
function
|
|
1721
|
+
const ho = /* @__PURE__ */ g(po, [["render", mo]]);
|
|
1722
|
+
function Ee(e) {
|
|
1677
1723
|
return e.replace(/http(s)?:/, "");
|
|
1678
1724
|
}
|
|
1679
|
-
function
|
|
1725
|
+
function fo(e = "", t, n) {
|
|
1680
1726
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1681
1727
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + r + t + "=" + encodeURIComponent(n);
|
|
1682
1728
|
}
|
|
1683
|
-
function
|
|
1729
|
+
function bo(e, t) {
|
|
1684
1730
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1685
1731
|
return e;
|
|
1686
1732
|
if (t === "master")
|
|
1687
|
-
return
|
|
1733
|
+
return Ee(e);
|
|
1688
1734
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1689
1735
|
if (n) {
|
|
1690
|
-
const o = e.split(n[0]), r = n[3],
|
|
1691
|
-
return
|
|
1736
|
+
const o = e.split(n[0]), r = n[3], s = t.match("x") ? t : `${t}x`;
|
|
1737
|
+
return Ee(`${o[0]}_${s}${r}`);
|
|
1692
1738
|
}
|
|
1693
1739
|
return null;
|
|
1694
1740
|
}
|
|
1695
|
-
function
|
|
1741
|
+
function oe(e) {
|
|
1696
1742
|
if (!e)
|
|
1697
1743
|
return e;
|
|
1698
1744
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
1699
1745
|
if (e.match(/builder\.io/)) {
|
|
1700
1746
|
let n = e;
|
|
1701
1747
|
const o = Number(e.split("?width=")[1]);
|
|
1702
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${
|
|
1748
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${fo(e, "width", r)} ${r}w`).concat([n]).join(", ");
|
|
1703
1749
|
}
|
|
1704
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1750
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [bo(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
1705
1751
|
}
|
|
1706
|
-
const
|
|
1752
|
+
const go = b({
|
|
1707
1753
|
name: "builder-image",
|
|
1708
1754
|
props: [
|
|
1709
1755
|
"image",
|
|
@@ -1728,15 +1774,15 @@ const co = b({
|
|
|
1728
1774
|
const t = this.image || this.src;
|
|
1729
1775
|
if (!t || // We can auto add srcset for cdn.builder.io and shopify
|
|
1730
1776
|
// images, otherwise you can supply this prop manually
|
|
1731
|
-
!(t.match(/builder\.io/) || t.match(/cdn\.shopify\.com/)))
|
|
1777
|
+
!(typeof t == "string" && (t.match(/builder\.io/) || t.match(/cdn\.shopify\.com/))))
|
|
1732
1778
|
return this.srcset;
|
|
1733
1779
|
if (!this.noWebp) {
|
|
1734
1780
|
if (this.srcset && ((n = this.image) != null && n.includes("builder.io/api/v1/image"))) {
|
|
1735
1781
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
1736
|
-
return console.debug("Removed given srcset"),
|
|
1782
|
+
return console.debug("Removed given srcset"), oe(t);
|
|
1737
1783
|
} else if (this.image && !this.srcset)
|
|
1738
|
-
return
|
|
1739
|
-
return
|
|
1784
|
+
return oe(t);
|
|
1785
|
+
return oe(t);
|
|
1740
1786
|
}
|
|
1741
1787
|
},
|
|
1742
1788
|
webpSrcSet() {
|
|
@@ -1754,25 +1800,25 @@ const co = b({
|
|
|
1754
1800
|
return this.aspectRatio ? e : void 0;
|
|
1755
1801
|
}
|
|
1756
1802
|
}
|
|
1757
|
-
}),
|
|
1803
|
+
}), yo = ["srcset"], ko = ["loading", "fetchpriority", "alt", "role", "src", "srcset", "sizes"], vo = {
|
|
1758
1804
|
key: 2,
|
|
1759
1805
|
class: "div-29wpyomtntv-2"
|
|
1760
1806
|
};
|
|
1761
|
-
function
|
|
1762
|
-
var
|
|
1807
|
+
function So(e, t, n, o, r, s) {
|
|
1808
|
+
var i, l, a, u, m, h;
|
|
1763
1809
|
return c(), p(w, null, [
|
|
1764
1810
|
q("picture", null, [
|
|
1765
1811
|
e.webpSrcSet ? (c(), p("source", {
|
|
1766
1812
|
key: 0,
|
|
1767
1813
|
type: "image/webp",
|
|
1768
1814
|
srcset: e.webpSrcSet
|
|
1769
|
-
}, null, 8,
|
|
1815
|
+
}, null, 8, yo)) : v("", !0),
|
|
1770
1816
|
q("img", {
|
|
1771
1817
|
loading: e.highPriority ? "eager" : "lazy",
|
|
1772
1818
|
fetchpriority: e.highPriority ? "high" : "auto",
|
|
1773
1819
|
alt: e.altText,
|
|
1774
1820
|
role: e.altText ? void 0 : "presentation",
|
|
1775
|
-
style:
|
|
1821
|
+
style: O({
|
|
1776
1822
|
objectPosition: e.backgroundPosition || "center",
|
|
1777
1823
|
objectFit: e.backgroundSize || "cover",
|
|
1778
1824
|
...e.aspectRatioCss
|
|
@@ -1783,29 +1829,29 @@ function ho(e, t, n, o, r, i) {
|
|
|
1783
1829
|
src: e.image,
|
|
1784
1830
|
srcset: e.srcSetToUse,
|
|
1785
1831
|
sizes: e.sizes
|
|
1786
|
-
}, null, 14,
|
|
1832
|
+
}, null, 14, ko)
|
|
1787
1833
|
]),
|
|
1788
|
-
e.aspectRatio && !((l = (
|
|
1834
|
+
e.aspectRatio && !((l = (i = e.builderBlock) == null ? void 0 : i.children) != null && l.length && e.fitContent) ? (c(), p("div", {
|
|
1789
1835
|
key: 0,
|
|
1790
1836
|
class: "builder-image-sizer div-29wpyomtntv",
|
|
1791
|
-
style:
|
|
1837
|
+
style: O({
|
|
1792
1838
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1793
1839
|
})
|
|
1794
1840
|
}, null, 4)) : v("", !0),
|
|
1795
1841
|
(u = (a = e.builderBlock) == null ? void 0 : a.children) != null && u.length && e.fitContent ? x(e.$slots, "default", { key: 1 }, void 0, !0) : v("", !0),
|
|
1796
|
-
!e.fitContent && ((h = (m = e.builderBlock) == null ? void 0 : m.children) != null && h.length) ? (c(), p("div",
|
|
1842
|
+
!e.fitContent && ((h = (m = e.builderBlock) == null ? void 0 : m.children) != null && h.length) ? (c(), p("div", vo, [
|
|
1797
1843
|
x(e.$slots, "default", {}, void 0, !0)
|
|
1798
1844
|
])) : v("", !0)
|
|
1799
1845
|
], 64);
|
|
1800
1846
|
}
|
|
1801
|
-
const
|
|
1847
|
+
const Co = /* @__PURE__ */ g(go, [["render", So], ["__scopeId", "data-v-a3766aaf"]]), To = b({
|
|
1802
1848
|
name: "builder-section-component",
|
|
1803
1849
|
props: ["attributes", "maxWidth"],
|
|
1804
1850
|
data() {
|
|
1805
1851
|
return { filterAttrs: W };
|
|
1806
1852
|
}
|
|
1807
1853
|
});
|
|
1808
|
-
function
|
|
1854
|
+
function wo(e, t, n, o, r, s) {
|
|
1809
1855
|
return c(), p("section", C({
|
|
1810
1856
|
style: {
|
|
1811
1857
|
width: "100%",
|
|
@@ -1823,7 +1869,7 @@ function go(e, t, n, o, r, i) {
|
|
|
1823
1869
|
x(e.$slots, "default")
|
|
1824
1870
|
], 16);
|
|
1825
1871
|
}
|
|
1826
|
-
const
|
|
1872
|
+
const Io = /* @__PURE__ */ g(To, [["render", wo]]), re = {
|
|
1827
1873
|
"@type": "@builder.io/sdk:Element",
|
|
1828
1874
|
layerName: "Accordion item title",
|
|
1829
1875
|
responsiveStyles: {
|
|
@@ -1852,7 +1898,7 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
1852
1898
|
}
|
|
1853
1899
|
}
|
|
1854
1900
|
}]
|
|
1855
|
-
},
|
|
1901
|
+
}, se = {
|
|
1856
1902
|
"@type": "@builder.io/sdk:Element",
|
|
1857
1903
|
layerName: "Accordion item detail",
|
|
1858
1904
|
responsiveStyles: {
|
|
@@ -1883,7 +1929,7 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
1883
1929
|
}
|
|
1884
1930
|
}
|
|
1885
1931
|
}]
|
|
1886
|
-
},
|
|
1932
|
+
}, $o = {
|
|
1887
1933
|
name: "Builder:Accordion",
|
|
1888
1934
|
canHaveChildren: !0,
|
|
1889
1935
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -1900,19 +1946,19 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
1900
1946
|
name: "title",
|
|
1901
1947
|
type: "uiBlocks",
|
|
1902
1948
|
hideFromUI: !0,
|
|
1903
|
-
defaultValue: [
|
|
1949
|
+
defaultValue: [re]
|
|
1904
1950
|
}, {
|
|
1905
1951
|
name: "detail",
|
|
1906
1952
|
type: "uiBlocks",
|
|
1907
1953
|
hideFromUI: !0,
|
|
1908
|
-
defaultValue: [
|
|
1954
|
+
defaultValue: [se]
|
|
1909
1955
|
}],
|
|
1910
1956
|
defaultValue: [{
|
|
1911
|
-
title: [
|
|
1912
|
-
detail: [
|
|
1957
|
+
title: [re],
|
|
1958
|
+
detail: [se]
|
|
1913
1959
|
}, {
|
|
1914
|
-
title: [
|
|
1915
|
-
detail: [
|
|
1960
|
+
title: [re],
|
|
1961
|
+
detail: [se]
|
|
1916
1962
|
}],
|
|
1917
1963
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
1918
1964
|
}, {
|
|
@@ -1947,7 +1993,7 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
1947
1993
|
builderComponents: !0,
|
|
1948
1994
|
builderLinkComponent: !0
|
|
1949
1995
|
}
|
|
1950
|
-
},
|
|
1996
|
+
}, Ro = (e) => e.toString(), Eo = b({
|
|
1951
1997
|
name: "builder-accordion",
|
|
1952
1998
|
components: { Blocks: U },
|
|
1953
1999
|
props: [
|
|
@@ -1961,7 +2007,7 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
1961
2007
|
"builderLinkComponent"
|
|
1962
2008
|
],
|
|
1963
2009
|
data() {
|
|
1964
|
-
return { open: [], convertOrderNumberToString:
|
|
2010
|
+
return { open: [], convertOrderNumberToString: Ro };
|
|
1965
2011
|
},
|
|
1966
2012
|
computed: {
|
|
1967
2013
|
onlyOneAtATime() {
|
|
@@ -2000,18 +2046,18 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
2000
2046
|
`.builder-accordion-title[data-index="${n}"]`
|
|
2001
2047
|
);
|
|
2002
2048
|
if (e = n, r) {
|
|
2003
|
-
let
|
|
2049
|
+
let s = r.getBoundingClientRect();
|
|
2004
2050
|
for (; r = r && r.nextElementSibling; )
|
|
2005
2051
|
if (r) {
|
|
2006
2052
|
if (r.classList.contains("builder-accordion-detail"))
|
|
2007
2053
|
continue;
|
|
2008
|
-
const
|
|
2009
|
-
if (
|
|
2054
|
+
const i = r.getBoundingClientRect();
|
|
2055
|
+
if (i.left > s.left) {
|
|
2010
2056
|
const l = parseInt(
|
|
2011
2057
|
r.getAttribute("data-index") || "",
|
|
2012
2058
|
10
|
|
2013
2059
|
);
|
|
2014
|
-
isNaN(l) || (
|
|
2060
|
+
isNaN(l) || (s = i, e = l);
|
|
2015
2061
|
} else
|
|
2016
2062
|
break;
|
|
2017
2063
|
}
|
|
@@ -2042,17 +2088,17 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
2042
2088
|
this.open.includes(e) ? this.open = this.onlyOneAtATime ? [] : this.open.filter((t) => t !== e) : this.open = this.onlyOneAtATime ? [e] : this.open.concat(e);
|
|
2043
2089
|
}
|
|
2044
2090
|
}
|
|
2045
|
-
}),
|
|
2046
|
-
function
|
|
2047
|
-
const
|
|
2091
|
+
}), Po = ["data-index", "onClick"];
|
|
2092
|
+
function Bo(e, t, n, o, r, s) {
|
|
2093
|
+
const i = k("Blocks");
|
|
2048
2094
|
return c(), p("div", {
|
|
2049
2095
|
class: "builder-accordion",
|
|
2050
|
-
style:
|
|
2096
|
+
style: O(e.accordionStyles)
|
|
2051
2097
|
}, [
|
|
2052
2098
|
(c(!0), p(w, null, V(e.items, (l, a) => (c(), p(w, { key: a }, [
|
|
2053
2099
|
q("div", {
|
|
2054
2100
|
class: z(e.getAccordionTitleClassName(a)),
|
|
2055
|
-
style:
|
|
2101
|
+
style: O({
|
|
2056
2102
|
...e.accordionTitleStyles,
|
|
2057
2103
|
...e.grid && {
|
|
2058
2104
|
width: e.gridRowWidth,
|
|
@@ -2062,7 +2108,7 @@ function To(e, t, n, o, r, i) {
|
|
|
2062
2108
|
"data-index": a,
|
|
2063
2109
|
onClick: (u) => e.onClick(a)
|
|
2064
2110
|
}, [
|
|
2065
|
-
$(
|
|
2111
|
+
$(i, {
|
|
2066
2112
|
blocks: l.title,
|
|
2067
2113
|
path: `items.${a}.title`,
|
|
2068
2114
|
parent: e.builderBlock.id,
|
|
@@ -2070,13 +2116,13 @@ function To(e, t, n, o, r, i) {
|
|
|
2070
2116
|
registeredComponents: e.builderComponents,
|
|
2071
2117
|
linkComponent: e.builderLinkComponent
|
|
2072
2118
|
}, null, 8, ["blocks", "path", "parent", "context", "registeredComponents", "linkComponent"])
|
|
2073
|
-
], 14,
|
|
2119
|
+
], 14, Po),
|
|
2074
2120
|
e.open.includes(a) ? (c(), p("div", {
|
|
2075
2121
|
key: 0,
|
|
2076
2122
|
class: z(e.getAccordionDetailClassName(a)),
|
|
2077
|
-
style:
|
|
2123
|
+
style: O(e.accordionDetailStyles)
|
|
2078
2124
|
}, [
|
|
2079
|
-
$(
|
|
2125
|
+
$(i, {
|
|
2080
2126
|
blocks: l.detail,
|
|
2081
2127
|
path: `items.${a}.detail`,
|
|
2082
2128
|
parent: e.builderBlock.id,
|
|
@@ -2088,7 +2134,7 @@ function To(e, t, n, o, r, i) {
|
|
|
2088
2134
|
], 64))), 128))
|
|
2089
2135
|
], 4);
|
|
2090
2136
|
}
|
|
2091
|
-
const
|
|
2137
|
+
const xo = /* @__PURE__ */ g(Eo, [["render", Bo]]), Ao = {
|
|
2092
2138
|
name: "Core:Button",
|
|
2093
2139
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
2094
2140
|
defaultStyles: {
|
|
@@ -2124,7 +2170,7 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2124
2170
|
shouldReceiveBuilderProps: {
|
|
2125
2171
|
builderLinkComponent: !0
|
|
2126
2172
|
}
|
|
2127
|
-
},
|
|
2173
|
+
}, Vo = {
|
|
2128
2174
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
2129
2175
|
name: "Columns",
|
|
2130
2176
|
isRSC: !0,
|
|
@@ -2303,7 +2349,7 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2303
2349
|
});
|
|
2304
2350
|
}
|
|
2305
2351
|
const n = e.get("columns");
|
|
2306
|
-
Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((
|
|
2352
|
+
Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((s) => !s.get("width")) || n.reduce((l, a) => l + a.get("width"), 0) !== 100) && t();
|
|
2307
2353
|
}
|
|
2308
2354
|
}, {
|
|
2309
2355
|
name: "space",
|
|
@@ -2331,13 +2377,13 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2331
2377
|
builderComponents: !0,
|
|
2332
2378
|
builderLinkComponent: !0
|
|
2333
2379
|
}
|
|
2334
|
-
},
|
|
2380
|
+
}, Wo = {
|
|
2335
2381
|
name: "Fragment",
|
|
2336
2382
|
static: !0,
|
|
2337
2383
|
hidden: !0,
|
|
2338
2384
|
canHaveChildren: !0,
|
|
2339
2385
|
noWrap: !0
|
|
2340
|
-
},
|
|
2386
|
+
}, Se = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"], No = ["mp4", "webm", "mkv", "flv", "vob", "ogv", "ogg", "drc", "gif", "gifv", "mng", "avi", "mov", "qt", "mts", "m2ts", "ts", "wmv", "yuv", "rm", "rmvb", "viv", "asf", "amv", "m4p", "mpeg", "mpe", "m2v", "m4v", "svi", "3gp", "3g2", "mxf", "roq", "nsv", "f4v", "f4p", "f4a", "f4b"], Fo = {
|
|
2341
2387
|
name: "Image",
|
|
2342
2388
|
static: !0,
|
|
2343
2389
|
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",
|
|
@@ -2352,12 +2398,12 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2352
2398
|
name: "image",
|
|
2353
2399
|
type: "file",
|
|
2354
2400
|
bubble: !0,
|
|
2355
|
-
allowedFileTypes:
|
|
2401
|
+
allowedFileTypes: Se,
|
|
2356
2402
|
required: !0,
|
|
2357
2403
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
2358
2404
|
onChange: (e) => {
|
|
2359
2405
|
e.delete("srcset"), e.delete("noWebp");
|
|
2360
|
-
function n(
|
|
2406
|
+
function n(i, l = 6e4) {
|
|
2361
2407
|
return new Promise((a, u) => {
|
|
2362
2408
|
const m = document.createElement("img");
|
|
2363
2409
|
let h = !1;
|
|
@@ -2365,21 +2411,21 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2365
2411
|
h = !0, a(m);
|
|
2366
2412
|
}, m.addEventListener("error", (d) => {
|
|
2367
2413
|
console.warn("Image load failed", d.error), u(d.error);
|
|
2368
|
-
}), m.src =
|
|
2414
|
+
}), m.src = i, setTimeout(() => {
|
|
2369
2415
|
h || u(new Error("Image load timed out"));
|
|
2370
2416
|
}, l);
|
|
2371
2417
|
});
|
|
2372
2418
|
}
|
|
2373
|
-
function o(
|
|
2374
|
-
return Math.round(
|
|
2419
|
+
function o(i) {
|
|
2420
|
+
return Math.round(i * 1e3) / 1e3;
|
|
2375
2421
|
}
|
|
2376
|
-
const r = e.get("image"),
|
|
2377
|
-
if (fetch(r).then((
|
|
2378
|
-
|
|
2379
|
-
}), r && (!
|
|
2380
|
-
return n(r).then((
|
|
2422
|
+
const r = e.get("image"), s = e.get("aspectRatio");
|
|
2423
|
+
if (fetch(r).then((i) => i.blob()).then((i) => {
|
|
2424
|
+
i.type.includes("svg") && e.set("noWebp", !0);
|
|
2425
|
+
}), r && (!s || s === 0.7041))
|
|
2426
|
+
return n(r).then((i) => {
|
|
2381
2427
|
const l = e.get("aspectRatio");
|
|
2382
|
-
e.get("image") === r && (!l || l === 0.7041) &&
|
|
2428
|
+
e.get("image") === r && (!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));
|
|
2383
2429
|
});
|
|
2384
2430
|
}
|
|
2385
2431
|
}, {
|
|
@@ -2445,7 +2491,7 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2445
2491
|
shouldReceiveBuilderProps: {
|
|
2446
2492
|
builderBlock: !0
|
|
2447
2493
|
}
|
|
2448
|
-
},
|
|
2494
|
+
}, Oo = {
|
|
2449
2495
|
name: "Core:Section",
|
|
2450
2496
|
static: !0,
|
|
2451
2497
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2484,7 +2530,7 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2484
2530
|
}
|
|
2485
2531
|
}
|
|
2486
2532
|
}]
|
|
2487
|
-
},
|
|
2533
|
+
}, Do = {
|
|
2488
2534
|
name: "Slot",
|
|
2489
2535
|
isRSC: !0,
|
|
2490
2536
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -2501,14 +2547,14 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2501
2547
|
builderContext: !0,
|
|
2502
2548
|
builderComponents: !0
|
|
2503
2549
|
}
|
|
2504
|
-
},
|
|
2550
|
+
}, Lo = b({
|
|
2505
2551
|
name: "builder-slot",
|
|
2506
2552
|
components: { Blocks: U },
|
|
2507
2553
|
props: ["builderContext", "name", "builderComponents"]
|
|
2508
2554
|
});
|
|
2509
|
-
function
|
|
2555
|
+
function Uo(e, t, n, o, r, s) {
|
|
2510
2556
|
var l, a, u;
|
|
2511
|
-
const
|
|
2557
|
+
const i = k("Blocks");
|
|
2512
2558
|
return c(), p("div", C(
|
|
2513
2559
|
{ style: {
|
|
2514
2560
|
pointerEvents: "auto"
|
|
@@ -2517,7 +2563,7 @@ function Ao(e, t, n, o, r, i) {
|
|
|
2517
2563
|
"builder-slot": e.name
|
|
2518
2564
|
}
|
|
2519
2565
|
), [
|
|
2520
|
-
$(
|
|
2566
|
+
$(i, {
|
|
2521
2567
|
parent: (a = e.builderContext.context) == null ? void 0 : a.symbolId,
|
|
2522
2568
|
path: `symbol.data.${e.name}`,
|
|
2523
2569
|
context: e.builderContext,
|
|
@@ -2526,7 +2572,7 @@ function Ao(e, t, n, o, r, i) {
|
|
|
2526
2572
|
}, null, 8, ["parent", "path", "context", "registeredComponents", "blocks"])
|
|
2527
2573
|
], 16);
|
|
2528
2574
|
}
|
|
2529
|
-
const
|
|
2575
|
+
const Ho = /* @__PURE__ */ g(Lo, [["render", Uo]]), Mo = {
|
|
2530
2576
|
name: "Symbol",
|
|
2531
2577
|
noWrap: !0,
|
|
2532
2578
|
static: !0,
|
|
@@ -2565,7 +2611,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2565
2611
|
builderComponents: !0,
|
|
2566
2612
|
builderLinkComponent: !0
|
|
2567
2613
|
}
|
|
2568
|
-
},
|
|
2614
|
+
}, ie = {
|
|
2569
2615
|
"@type": "@builder.io/sdk:Element",
|
|
2570
2616
|
responsiveStyles: {
|
|
2571
2617
|
large: {
|
|
@@ -2587,7 +2633,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2587
2633
|
text: "New tab"
|
|
2588
2634
|
}
|
|
2589
2635
|
}
|
|
2590
|
-
},
|
|
2636
|
+
}, ae = {
|
|
2591
2637
|
"@type": "@builder.io/sdk:Element",
|
|
2592
2638
|
responsiveStyles: {
|
|
2593
2639
|
large: {
|
|
@@ -2603,7 +2649,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2603
2649
|
text: "New tab content "
|
|
2604
2650
|
}
|
|
2605
2651
|
}
|
|
2606
|
-
},
|
|
2652
|
+
}, jo = {
|
|
2607
2653
|
name: "Builder: Tabs",
|
|
2608
2654
|
inputs: [{
|
|
2609
2655
|
name: "tabs",
|
|
@@ -2613,16 +2659,16 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2613
2659
|
name: "label",
|
|
2614
2660
|
type: "uiBlocks",
|
|
2615
2661
|
hideFromUI: !0,
|
|
2616
|
-
defaultValue: [
|
|
2662
|
+
defaultValue: [ie]
|
|
2617
2663
|
}, {
|
|
2618
2664
|
name: "content",
|
|
2619
2665
|
type: "uiBlocks",
|
|
2620
2666
|
hideFromUI: !0,
|
|
2621
|
-
defaultValue: [
|
|
2667
|
+
defaultValue: [ae]
|
|
2622
2668
|
}],
|
|
2623
2669
|
defaultValue: [{
|
|
2624
2670
|
label: [{
|
|
2625
|
-
...
|
|
2671
|
+
...ie,
|
|
2626
2672
|
component: {
|
|
2627
2673
|
name: "Text",
|
|
2628
2674
|
options: {
|
|
@@ -2631,7 +2677,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2631
2677
|
}
|
|
2632
2678
|
}],
|
|
2633
2679
|
content: [{
|
|
2634
|
-
...
|
|
2680
|
+
...ae,
|
|
2635
2681
|
component: {
|
|
2636
2682
|
name: "Text",
|
|
2637
2683
|
options: {
|
|
@@ -2641,7 +2687,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2641
2687
|
}]
|
|
2642
2688
|
}, {
|
|
2643
2689
|
label: [{
|
|
2644
|
-
...
|
|
2690
|
+
...ie,
|
|
2645
2691
|
component: {
|
|
2646
2692
|
name: "Text",
|
|
2647
2693
|
options: {
|
|
@@ -2650,7 +2696,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2650
2696
|
}
|
|
2651
2697
|
}],
|
|
2652
2698
|
content: [{
|
|
2653
|
-
...
|
|
2699
|
+
...ae,
|
|
2654
2700
|
component: {
|
|
2655
2701
|
name: "Text",
|
|
2656
2702
|
options: {
|
|
@@ -2706,7 +2752,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2706
2752
|
builderComponents: !0,
|
|
2707
2753
|
builderLinkComponent: !0
|
|
2708
2754
|
}
|
|
2709
|
-
},
|
|
2755
|
+
}, Ko = b({
|
|
2710
2756
|
name: "builder-tabs",
|
|
2711
2757
|
components: { Blocks: U },
|
|
2712
2758
|
props: [
|
|
@@ -2731,13 +2777,13 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2731
2777
|
e === this.activeTab && this.collapsible ? this.activeTab = -1 : this.activeTab = e;
|
|
2732
2778
|
}
|
|
2733
2779
|
}
|
|
2734
|
-
}),
|
|
2735
|
-
function
|
|
2736
|
-
const
|
|
2780
|
+
}), qo = ["onClick"], zo = { key: 0 };
|
|
2781
|
+
function Go(e, t, n, o, r, s) {
|
|
2782
|
+
const i = k("Blocks");
|
|
2737
2783
|
return c(), p("div", null, [
|
|
2738
2784
|
q("div", {
|
|
2739
2785
|
class: "builder-tabs-wrap",
|
|
2740
|
-
style:
|
|
2786
|
+
style: O({
|
|
2741
2787
|
display: "flex",
|
|
2742
2788
|
flexDirection: "row",
|
|
2743
2789
|
justifyContent: e.tabHeaderLayout || "flex-start",
|
|
@@ -2747,12 +2793,12 @@ function Lo(e, t, n, o, r, i) {
|
|
|
2747
2793
|
(c(!0), p(w, null, V(e.tabs, (l, a) => (c(), p("span", {
|
|
2748
2794
|
key: a,
|
|
2749
2795
|
class: z(`builder-tab-wrap ${e.activeTab === a ? "builder-tab-active" : ""}`),
|
|
2750
|
-
style:
|
|
2796
|
+
style: O({
|
|
2751
2797
|
...e.activeTab === a ? e.activeTabStyle : {}
|
|
2752
2798
|
}),
|
|
2753
2799
|
onClick: (u) => e.onClick(a)
|
|
2754
2800
|
}, [
|
|
2755
|
-
$(
|
|
2801
|
+
$(i, {
|
|
2756
2802
|
parent: e.builderBlock.id,
|
|
2757
2803
|
path: `tabs.${a}.label`,
|
|
2758
2804
|
blocks: l.label,
|
|
@@ -2760,10 +2806,10 @@ function Lo(e, t, n, o, r, i) {
|
|
|
2760
2806
|
registeredComponents: e.builderComponents,
|
|
2761
2807
|
linkComponent: e.builderLinkComponent
|
|
2762
2808
|
}, null, 8, ["parent", "path", "blocks", "context", "registeredComponents", "linkComponent"])
|
|
2763
|
-
], 14,
|
|
2809
|
+
], 14, qo))), 128))
|
|
2764
2810
|
], 4),
|
|
2765
|
-
e.activeTabContent(e.activeTab) ? (c(), p("div",
|
|
2766
|
-
$(
|
|
2811
|
+
e.activeTabContent(e.activeTab) ? (c(), p("div", zo, [
|
|
2812
|
+
$(i, {
|
|
2767
2813
|
parent: e.builderBlock.id,
|
|
2768
2814
|
path: `tabs.${e.activeTab}.content`,
|
|
2769
2815
|
blocks: e.activeTabContent(e.activeTab),
|
|
@@ -2774,7 +2820,7 @@ function Lo(e, t, n, o, r, i) {
|
|
|
2774
2820
|
])) : v("", !0)
|
|
2775
2821
|
]);
|
|
2776
2822
|
}
|
|
2777
|
-
const
|
|
2823
|
+
const Jo = /* @__PURE__ */ g(Ko, [["render", Go]]), Yo = {
|
|
2778
2824
|
shouldReceiveBuilderProps: {
|
|
2779
2825
|
builderBlock: !1,
|
|
2780
2826
|
builderContext: !0
|
|
@@ -2796,21 +2842,21 @@ const Uo = /* @__PURE__ */ g(Fo, [["render", Lo]]), Ho = {
|
|
|
2796
2842
|
height: "auto",
|
|
2797
2843
|
textAlign: "center"
|
|
2798
2844
|
}
|
|
2799
|
-
},
|
|
2845
|
+
}, Xo = b({
|
|
2800
2846
|
name: "builder-text",
|
|
2801
2847
|
props: ["builderContext", "text"],
|
|
2802
2848
|
computed: {
|
|
2803
2849
|
processedText() {
|
|
2804
|
-
var
|
|
2850
|
+
var s;
|
|
2805
2851
|
const e = this.builderContext, {
|
|
2806
2852
|
context: t,
|
|
2807
2853
|
localState: n,
|
|
2808
2854
|
rootState: o,
|
|
2809
2855
|
rootSetState: r
|
|
2810
2856
|
} = e;
|
|
2811
|
-
return String(((
|
|
2857
|
+
return String(((s = this.text) == null ? void 0 : s.toString()) || "").replace(
|
|
2812
2858
|
/{{([^}]+)}}/g,
|
|
2813
|
-
(
|
|
2859
|
+
(i, l) => J({
|
|
2814
2860
|
code: l,
|
|
2815
2861
|
context: t,
|
|
2816
2862
|
localState: n,
|
|
@@ -2820,17 +2866,17 @@ const Uo = /* @__PURE__ */ g(Fo, [["render", Lo]]), Ho = {
|
|
|
2820
2866
|
);
|
|
2821
2867
|
}
|
|
2822
2868
|
}
|
|
2823
|
-
}),
|
|
2824
|
-
function
|
|
2869
|
+
}), Qo = ["innerHTML"];
|
|
2870
|
+
function Zo(e, t, n, o, r, s) {
|
|
2825
2871
|
return c(), p("div", {
|
|
2826
2872
|
class: "builder-text",
|
|
2827
2873
|
innerHTML: e.processedText,
|
|
2828
2874
|
style: {
|
|
2829
2875
|
outline: "none"
|
|
2830
2876
|
}
|
|
2831
|
-
}, null, 8,
|
|
2877
|
+
}, null, 8, Qo);
|
|
2832
2878
|
}
|
|
2833
|
-
const
|
|
2879
|
+
const _o = /* @__PURE__ */ g(Xo, [["render", Zo]]), er = {
|
|
2834
2880
|
name: "Custom Code",
|
|
2835
2881
|
static: !0,
|
|
2836
2882
|
requiredPermissions: ["editCode"],
|
|
@@ -2852,7 +2898,7 @@ const qo = /* @__PURE__ */ g(Mo, [["render", Ko]]), zo = {
|
|
|
2852
2898
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
2853
2899
|
advanced: !0
|
|
2854
2900
|
}]
|
|
2855
|
-
},
|
|
2901
|
+
}, tr = b({
|
|
2856
2902
|
name: "builder-custom-code",
|
|
2857
2903
|
props: ["replaceNodes", "code"],
|
|
2858
2904
|
data() {
|
|
@@ -2886,15 +2932,15 @@ const qo = /* @__PURE__ */ g(Mo, [["render", Ko]]), zo = {
|
|
|
2886
2932
|
}
|
|
2887
2933
|
}
|
|
2888
2934
|
}
|
|
2889
|
-
}),
|
|
2890
|
-
function
|
|
2935
|
+
}), nr = ["innerHTML"];
|
|
2936
|
+
function or(e, t, n, o, r, s) {
|
|
2891
2937
|
return c(), p("div", {
|
|
2892
2938
|
ref: "elementRef",
|
|
2893
2939
|
class: z("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
|
|
2894
2940
|
innerHTML: e.code
|
|
2895
|
-
}, null, 10,
|
|
2941
|
+
}, null, 10, nr);
|
|
2896
2942
|
}
|
|
2897
|
-
const
|
|
2943
|
+
const rr = /* @__PURE__ */ g(tr, [["render", or]]), sr = {
|
|
2898
2944
|
name: "Embed",
|
|
2899
2945
|
static: !0,
|
|
2900
2946
|
inputs: [{
|
|
@@ -2909,7 +2955,7 @@ const Xo = /* @__PURE__ */ g(Go, [["render", Yo]]), Qo = {
|
|
|
2909
2955
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
2910
2956
|
hideFromUI: !0
|
|
2911
2957
|
}]
|
|
2912
|
-
},
|
|
2958
|
+
}, ir = ["text/javascript", "application/javascript", "application/ecmascript"], ar = (e) => ir.includes(e.type), lr = b({
|
|
2913
2959
|
name: "builder-embed",
|
|
2914
2960
|
props: ["content"],
|
|
2915
2961
|
data() {
|
|
@@ -2942,7 +2988,7 @@ const Xo = /* @__PURE__ */ g(Go, [["render", Yo]]), Qo = {
|
|
|
2942
2988
|
this.scriptsInserted.push(n.src);
|
|
2943
2989
|
const o = document.createElement("script");
|
|
2944
2990
|
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
2945
|
-
} else if (
|
|
2991
|
+
} else if (ar(n) && !this.scriptsRun.includes(n.innerText))
|
|
2946
2992
|
try {
|
|
2947
2993
|
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
2948
2994
|
} catch (o) {
|
|
@@ -2951,15 +2997,15 @@ const Xo = /* @__PURE__ */ g(Go, [["render", Yo]]), Qo = {
|
|
|
2951
2997
|
}
|
|
2952
2998
|
}
|
|
2953
2999
|
}
|
|
2954
|
-
}),
|
|
2955
|
-
function
|
|
3000
|
+
}), cr = ["innerHTML"];
|
|
3001
|
+
function dr(e, t, n, o, r, s) {
|
|
2956
3002
|
return c(), p("div", {
|
|
2957
3003
|
class: "builder-embed",
|
|
2958
3004
|
ref: "elem",
|
|
2959
3005
|
innerHTML: e.content
|
|
2960
|
-
}, null, 8,
|
|
3006
|
+
}, null, 8, cr);
|
|
2961
3007
|
}
|
|
2962
|
-
const
|
|
3008
|
+
const ur = /* @__PURE__ */ g(lr, [["render", dr]]), pr = {
|
|
2963
3009
|
name: "Form:Form",
|
|
2964
3010
|
// editableTags: ['builder-form-error']
|
|
2965
3011
|
defaults: {
|
|
@@ -3196,12 +3242,12 @@ const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
|
3196
3242
|
builderComponents: !0,
|
|
3197
3243
|
builderLinkComponent: !0
|
|
3198
3244
|
}
|
|
3199
|
-
},
|
|
3245
|
+
}, mr = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], hr = () => {
|
|
3200
3246
|
const e = process.env.NODE_ENV || "production";
|
|
3201
|
-
return
|
|
3202
|
-
},
|
|
3247
|
+
return mr.includes(e) ? e : "production";
|
|
3248
|
+
}, fr = b({
|
|
3203
3249
|
name: "builder-form-component",
|
|
3204
|
-
components: { Block:
|
|
3250
|
+
components: { Block: ke, Blocks: U },
|
|
3205
3251
|
props: [
|
|
3206
3252
|
"builderContext",
|
|
3207
3253
|
"previewState",
|
|
@@ -3257,8 +3303,8 @@ const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
|
3257
3303
|
}
|
|
3258
3304
|
e.preventDefault();
|
|
3259
3305
|
const o = e.currentTarget || e.target, r = this.customHeaders || {};
|
|
3260
|
-
let
|
|
3261
|
-
const
|
|
3306
|
+
let s;
|
|
3307
|
+
const i = new FormData(o), l = Array.from(o.querySelectorAll("input,select,textarea")).filter((d) => !!d.name).map((d) => {
|
|
3262
3308
|
let f;
|
|
3263
3309
|
const S = d.name;
|
|
3264
3310
|
if (d instanceof HTMLInputElement)
|
|
@@ -3286,27 +3332,27 @@ const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
|
3286
3332
|
if (this.sendSubmissionsTo === "email" && (a = "multipart/form-data"), Array.from(l).forEach(({ value: d }) => {
|
|
3287
3333
|
(d instanceof File || Array.isArray(d) && d[0] instanceof File || d instanceof FileList) && (a = "multipart/form-data");
|
|
3288
3334
|
}), a !== "application/json")
|
|
3289
|
-
|
|
3335
|
+
s = i;
|
|
3290
3336
|
else {
|
|
3291
3337
|
const d = {};
|
|
3292
3338
|
Array.from(l).forEach(({ value: f, key: S }) => {
|
|
3293
|
-
|
|
3294
|
-
}),
|
|
3339
|
+
Ve(d, S, f);
|
|
3340
|
+
}), s = JSON.stringify(d);
|
|
3295
3341
|
}
|
|
3296
3342
|
a && a !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (r["content-type"] = a));
|
|
3297
3343
|
const u = new CustomEvent("presubmit", {
|
|
3298
3344
|
detail: {
|
|
3299
|
-
body:
|
|
3345
|
+
body: s
|
|
3300
3346
|
}
|
|
3301
3347
|
});
|
|
3302
3348
|
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(u), u.defaultPrevented))
|
|
3303
3349
|
return;
|
|
3304
3350
|
this.formState = "sending";
|
|
3305
|
-
const m = `${
|
|
3351
|
+
const m = `${hr() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
|
|
3306
3352
|
this.sendSubmissionsToEmail || ""
|
|
3307
3353
|
)}&name=${encodeURIComponent(this.name || "")}`, h = this.sendSubmissionsTo === "email" ? m : this.action;
|
|
3308
|
-
|
|
3309
|
-
body:
|
|
3354
|
+
he(h), fetch(h, {
|
|
3355
|
+
body: s,
|
|
3310
3356
|
headers: r,
|
|
3311
3357
|
method: this.method || "post"
|
|
3312
3358
|
}).then(
|
|
@@ -3314,7 +3360,7 @@ const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
|
3314
3360
|
let f;
|
|
3315
3361
|
const S = d.headers.get("content-type");
|
|
3316
3362
|
if (S && S.indexOf("application/json") !== -1 ? f = await d.json() : f = await d.text(), !d.ok && this.errorMessagePath) {
|
|
3317
|
-
let T =
|
|
3363
|
+
let T = Fe(f, this.errorMessagePath);
|
|
3318
3364
|
T && (typeof T != "string" && (T = JSON.stringify(T)), this.formErrorMessage = T, this.mergeNewRootState({
|
|
3319
3365
|
formErrorMessage: T
|
|
3320
3366
|
}));
|
|
@@ -3333,12 +3379,12 @@ const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
|
3333
3379
|
}
|
|
3334
3380
|
if (this.successUrl)
|
|
3335
3381
|
if (this.$refs.formRef) {
|
|
3336
|
-
const
|
|
3382
|
+
const D = new CustomEvent("route", {
|
|
3337
3383
|
detail: {
|
|
3338
3384
|
url: this.successUrl
|
|
3339
3385
|
}
|
|
3340
3386
|
});
|
|
3341
|
-
this.$refs.formRef.dispatchEvent(
|
|
3387
|
+
this.$refs.formRef.dispatchEvent(D), D.defaultPrevented || (location.href = this.successUrl);
|
|
3342
3388
|
} else
|
|
3343
3389
|
location.href = this.successUrl;
|
|
3344
3390
|
}
|
|
@@ -3355,13 +3401,13 @@ const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
|
3355
3401
|
}
|
|
3356
3402
|
}
|
|
3357
3403
|
}
|
|
3358
|
-
}),
|
|
3404
|
+
}), br = ["validate", "action", "method", "name"], gr = {
|
|
3359
3405
|
key: 3,
|
|
3360
3406
|
class: "builder-form-error-text pre-3q96myty4lk"
|
|
3361
3407
|
};
|
|
3362
|
-
function
|
|
3408
|
+
function yr(e, t, n, o, r, s) {
|
|
3363
3409
|
var a;
|
|
3364
|
-
const
|
|
3410
|
+
const i = k("Block"), l = k("Blocks");
|
|
3365
3411
|
return c(), p("form", C({
|
|
3366
3412
|
validate: e.validate,
|
|
3367
3413
|
ref: "formRef",
|
|
@@ -3370,7 +3416,7 @@ function dr(e, t, n, o, r, i) {
|
|
|
3370
3416
|
name: e.name,
|
|
3371
3417
|
onSubmit: t[0] || (t[0] = (u) => e.onSubmit(u))
|
|
3372
3418
|
}, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3373
|
-
e.builderBlock && e.builderBlock.children ? (c(!0), p(w, { key: 0 }, V((a = e.builderBlock) == null ? void 0 : a.children, (u, m) => (c(), y(
|
|
3419
|
+
e.builderBlock && e.builderBlock.children ? (c(!0), p(w, { key: 0 }, V((a = e.builderBlock) == null ? void 0 : a.children, (u, m) => (c(), y(i, {
|
|
3374
3420
|
key: `form-block-${e.idx}`,
|
|
3375
3421
|
block: u,
|
|
3376
3422
|
context: e.builderContext,
|
|
@@ -3389,16 +3435,16 @@ function dr(e, t, n, o, r, i) {
|
|
|
3389
3435
|
blocks: e.sendingMessage,
|
|
3390
3436
|
context: e.builderContext
|
|
3391
3437
|
}, null, 8, ["blocks", "context"])) : v("", !0),
|
|
3392
|
-
e.submissionState() === "error" && e.responseData ? (c(), p("pre",
|
|
3438
|
+
e.submissionState() === "error" && e.responseData ? (c(), p("pre", gr, te(JSON.stringify(e.responseData, null, 2)), 1)) : v("", !0),
|
|
3393
3439
|
e.submissionState() === "success" ? (c(), y(l, {
|
|
3394
3440
|
key: 4,
|
|
3395
3441
|
path: "successMessage",
|
|
3396
3442
|
blocks: e.successMessage,
|
|
3397
3443
|
context: e.builderContext
|
|
3398
3444
|
}, null, 8, ["blocks", "context"])) : v("", !0)
|
|
3399
|
-
], 16,
|
|
3445
|
+
], 16, br);
|
|
3400
3446
|
}
|
|
3401
|
-
const
|
|
3447
|
+
const kr = /* @__PURE__ */ g(fr, [["render", yr], ["__scopeId", "data-v-cd94d6c1"]]), vr = {
|
|
3402
3448
|
name: "Form:Input",
|
|
3403
3449
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3404
3450
|
inputs: [
|
|
@@ -3449,7 +3495,7 @@ const ur = /* @__PURE__ */ g(ar, [["render", dr], ["__scopeId", "data-v-cd94d6c1
|
|
|
3449
3495
|
borderStyle: "solid",
|
|
3450
3496
|
borderColor: "#ccc"
|
|
3451
3497
|
}
|
|
3452
|
-
},
|
|
3498
|
+
}, Sr = b({
|
|
3453
3499
|
name: "builder-form-input-component",
|
|
3454
3500
|
props: [
|
|
3455
3501
|
"attributes",
|
|
@@ -3463,8 +3509,8 @@ const ur = /* @__PURE__ */ g(ar, [["render", dr], ["__scopeId", "data-v-cd94d6c1
|
|
|
3463
3509
|
data() {
|
|
3464
3510
|
return { isEditing: P, filterAttrs: W };
|
|
3465
3511
|
}
|
|
3466
|
-
}),
|
|
3467
|
-
function
|
|
3512
|
+
}), Cr = ["placeholder", "type", "name", "value", "defaultValue", "required"];
|
|
3513
|
+
function Tr(e, t, n, o, r, s) {
|
|
3468
3514
|
return c(), p("input", C({
|
|
3469
3515
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
3470
3516
|
placeholder: e.placeholder,
|
|
@@ -3473,9 +3519,9 @@ function fr(e, t, n, o, r, i) {
|
|
|
3473
3519
|
value: e.value,
|
|
3474
3520
|
defaultValue: e.defaultValue,
|
|
3475
3521
|
required: e.required
|
|
3476
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16,
|
|
3522
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, Cr);
|
|
3477
3523
|
}
|
|
3478
|
-
const
|
|
3524
|
+
const wr = /* @__PURE__ */ g(Sr, [["render", Tr]]), Ir = {
|
|
3479
3525
|
name: "Form:Select",
|
|
3480
3526
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
3481
3527
|
defaultStyles: {
|
|
@@ -3517,14 +3563,14 @@ const br = /* @__PURE__ */ g(mr, [["render", fr]]), gr = {
|
|
|
3517
3563
|
}],
|
|
3518
3564
|
static: !0,
|
|
3519
3565
|
noWrap: !0
|
|
3520
|
-
},
|
|
3566
|
+
}, $r = b({
|
|
3521
3567
|
name: "builder-select-component",
|
|
3522
3568
|
props: ["attributes", "value", "defaultValue", "name", "required", "options"],
|
|
3523
3569
|
data() {
|
|
3524
3570
|
return { isEditing: P, filterAttrs: W };
|
|
3525
3571
|
}
|
|
3526
|
-
}),
|
|
3527
|
-
function
|
|
3572
|
+
}), Rr = ["value", "defaultValue", "name", "required"], Er = ["value"];
|
|
3573
|
+
function Pr(e, t, n, o, r, s) {
|
|
3528
3574
|
return c(), p("select", C({
|
|
3529
3575
|
value: e.value,
|
|
3530
3576
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
@@ -3532,13 +3578,13 @@ function Sr(e, t, n, o, r, i) {
|
|
|
3532
3578
|
name: e.name,
|
|
3533
3579
|
required: e.required
|
|
3534
3580
|
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3535
|
-
(c(!0), p(w, null, V(e.options, (
|
|
3536
|
-
key: `${
|
|
3537
|
-
value:
|
|
3538
|
-
},
|
|
3539
|
-
], 16,
|
|
3581
|
+
(c(!0), p(w, null, V(e.options, (i, l) => (c(), p("option", {
|
|
3582
|
+
key: `${i.name}-${l}`,
|
|
3583
|
+
value: i.value
|
|
3584
|
+
}, te(i.name || i.value), 9, Er))), 128))
|
|
3585
|
+
], 16, Rr);
|
|
3540
3586
|
}
|
|
3541
|
-
const
|
|
3587
|
+
const Br = /* @__PURE__ */ g($r, [["render", Pr]]), xr = {
|
|
3542
3588
|
name: "Form:SubmitButton",
|
|
3543
3589
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
3544
3590
|
defaultStyles: {
|
|
@@ -3563,17 +3609,17 @@ const Cr = /* @__PURE__ */ g(yr, [["render", Sr]]), Tr = {
|
|
|
3563
3609
|
// that only shows if advanced setting is flipped
|
|
3564
3610
|
// TODO: defaultChildren
|
|
3565
3611
|
// canHaveChildren: true,
|
|
3566
|
-
},
|
|
3612
|
+
}, Ar = b({
|
|
3567
3613
|
name: "builder-submit-button",
|
|
3568
3614
|
props: ["attributes", "text"],
|
|
3569
3615
|
data() {
|
|
3570
3616
|
return { filterAttrs: W };
|
|
3571
3617
|
}
|
|
3572
3618
|
});
|
|
3573
|
-
function
|
|
3574
|
-
return c(), p("button", C({ type: "submit" }, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)),
|
|
3619
|
+
function Vr(e, t, n, o, r, s) {
|
|
3620
|
+
return c(), p("button", C({ type: "submit" }, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), te(e.text), 17);
|
|
3575
3621
|
}
|
|
3576
|
-
const
|
|
3622
|
+
const Wr = /* @__PURE__ */ g(Ar, [["render", Vr]]), Nr = {
|
|
3577
3623
|
name: "Form:TextArea",
|
|
3578
3624
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
3579
3625
|
inputs: [{
|
|
@@ -3609,7 +3655,7 @@ const $r = /* @__PURE__ */ g(wr, [["render", Ir]]), Rr = {
|
|
|
3609
3655
|
},
|
|
3610
3656
|
static: !0,
|
|
3611
3657
|
noWrap: !0
|
|
3612
|
-
},
|
|
3658
|
+
}, Fr = b({
|
|
3613
3659
|
name: "builder-textarea",
|
|
3614
3660
|
props: [
|
|
3615
3661
|
"attributes",
|
|
@@ -3622,17 +3668,17 @@ const $r = /* @__PURE__ */ g(wr, [["render", Ir]]), Rr = {
|
|
|
3622
3668
|
data() {
|
|
3623
3669
|
return { filterAttrs: W };
|
|
3624
3670
|
}
|
|
3625
|
-
}),
|
|
3626
|
-
function
|
|
3671
|
+
}), Or = ["placeholder", "name", "value", "defaultValue", "required"];
|
|
3672
|
+
function Dr(e, t, n, o, r, s) {
|
|
3627
3673
|
return c(), p("textarea", C({
|
|
3628
3674
|
placeholder: e.placeholder,
|
|
3629
3675
|
name: e.name,
|
|
3630
3676
|
value: e.value,
|
|
3631
3677
|
defaultValue: e.defaultValue,
|
|
3632
3678
|
required: e.required
|
|
3633
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16,
|
|
3679
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, Or);
|
|
3634
3680
|
}
|
|
3635
|
-
const
|
|
3681
|
+
const Lr = /* @__PURE__ */ g(Fr, [["render", Dr]]), Ur = {
|
|
3636
3682
|
// friendlyName?
|
|
3637
3683
|
name: "Raw:Img",
|
|
3638
3684
|
hideFromInsertMenu: !0,
|
|
@@ -3641,12 +3687,12 @@ const xr = /* @__PURE__ */ g(Er, [["render", Br]]), Ar = {
|
|
|
3641
3687
|
name: "image",
|
|
3642
3688
|
bubble: !0,
|
|
3643
3689
|
type: "file",
|
|
3644
|
-
allowedFileTypes:
|
|
3690
|
+
allowedFileTypes: Se,
|
|
3645
3691
|
required: !0
|
|
3646
3692
|
}],
|
|
3647
3693
|
noWrap: !0,
|
|
3648
3694
|
static: !0
|
|
3649
|
-
},
|
|
3695
|
+
}, Hr = b({
|
|
3650
3696
|
name: "builder-img-component",
|
|
3651
3697
|
props: [
|
|
3652
3698
|
"backgroundSize",
|
|
@@ -3659,8 +3705,8 @@ const xr = /* @__PURE__ */ g(Er, [["render", Br]]), Ar = {
|
|
|
3659
3705
|
data() {
|
|
3660
3706
|
return { isEditing: P, filterAttrs: W };
|
|
3661
3707
|
}
|
|
3662
|
-
}),
|
|
3663
|
-
function
|
|
3708
|
+
}), Mr = ["alt", "src"];
|
|
3709
|
+
function jr(e, t, n, o, r, s) {
|
|
3664
3710
|
return c(), p("img", C({
|
|
3665
3711
|
style: {
|
|
3666
3712
|
objectFit: e.backgroundSize || "cover",
|
|
@@ -3669,9 +3715,9 @@ function Nr(e, t, n, o, r, i) {
|
|
|
3669
3715
|
key: e.isEditing() && e.imgSrc || "default-key",
|
|
3670
3716
|
alt: e.altText,
|
|
3671
3717
|
src: e.imgSrc || e.image
|
|
3672
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16,
|
|
3718
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, Mr);
|
|
3673
3719
|
}
|
|
3674
|
-
const
|
|
3720
|
+
const Kr = /* @__PURE__ */ g(Hr, [["render", jr]]), qr = {
|
|
3675
3721
|
name: "Video",
|
|
3676
3722
|
canHaveChildren: !0,
|
|
3677
3723
|
defaultStyles: {
|
|
@@ -3682,14 +3728,14 @@ const Fr = /* @__PURE__ */ g(Vr, [["render", Nr]]), Dr = {
|
|
|
3682
3728
|
inputs: [{
|
|
3683
3729
|
name: "video",
|
|
3684
3730
|
type: "file",
|
|
3685
|
-
allowedFileTypes:
|
|
3731
|
+
allowedFileTypes: No,
|
|
3686
3732
|
bubble: !0,
|
|
3687
3733
|
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
3688
3734
|
required: !0
|
|
3689
3735
|
}, {
|
|
3690
3736
|
name: "posterImage",
|
|
3691
3737
|
type: "file",
|
|
3692
|
-
allowedFileTypes:
|
|
3738
|
+
allowedFileTypes: Se,
|
|
3693
3739
|
helperText: "Image to show before the video plays"
|
|
3694
3740
|
}, {
|
|
3695
3741
|
name: "autoPlay",
|
|
@@ -3755,7 +3801,7 @@ const Fr = /* @__PURE__ */ g(Vr, [["render", Nr]]), Dr = {
|
|
|
3755
3801
|
shouldReceiveBuilderProps: {
|
|
3756
3802
|
builderBlock: !0
|
|
3757
3803
|
}
|
|
3758
|
-
},
|
|
3804
|
+
}, zr = b({
|
|
3759
3805
|
name: "builder-video",
|
|
3760
3806
|
props: [
|
|
3761
3807
|
"autoPlay",
|
|
@@ -3800,16 +3846,16 @@ const Fr = /* @__PURE__ */ g(Vr, [["render", Nr]]), Dr = {
|
|
|
3800
3846
|
};
|
|
3801
3847
|
}
|
|
3802
3848
|
}
|
|
3803
|
-
}),
|
|
3849
|
+
}), Gr = { style: {
|
|
3804
3850
|
position: "relative"
|
|
3805
|
-
} },
|
|
3851
|
+
} }, Jr = ["preload", "src", "poster"], Yr = ["src"], Xr = {
|
|
3806
3852
|
key: 1,
|
|
3807
3853
|
style: {
|
|
3808
3854
|
display: "flex",
|
|
3809
3855
|
flexDirection: "column",
|
|
3810
3856
|
alignItems: "stretch"
|
|
3811
3857
|
}
|
|
3812
|
-
},
|
|
3858
|
+
}, Qr = {
|
|
3813
3859
|
key: 2,
|
|
3814
3860
|
style: {
|
|
3815
3861
|
pointerEvents: "none",
|
|
@@ -3823,16 +3869,16 @@ const Fr = /* @__PURE__ */ g(Vr, [["render", Nr]]), Dr = {
|
|
|
3823
3869
|
height: "100%"
|
|
3824
3870
|
}
|
|
3825
3871
|
};
|
|
3826
|
-
function
|
|
3827
|
-
var
|
|
3828
|
-
return c(), p("div",
|
|
3872
|
+
function Zr(e, t, n, o, r, s) {
|
|
3873
|
+
var i, l, a, u, m, h, d;
|
|
3874
|
+
return c(), p("div", Gr, [
|
|
3829
3875
|
q("video", C({
|
|
3830
3876
|
class: "builder-video",
|
|
3831
3877
|
preload: e.preload || "metadata",
|
|
3832
3878
|
style: {
|
|
3833
3879
|
width: "100%",
|
|
3834
3880
|
height: "100%",
|
|
3835
|
-
...(
|
|
3881
|
+
...(i = e.attributes) == null ? void 0 : i.style,
|
|
3836
3882
|
objectFit: e.fit,
|
|
3837
3883
|
objectPosition: e.position,
|
|
3838
3884
|
// Hack to get object fit to work as expected and
|
|
@@ -3850,83 +3896,83 @@ function Kr(e, t, n, o, r, i) {
|
|
|
3850
3896
|
key: 0,
|
|
3851
3897
|
type: "video/mp4",
|
|
3852
3898
|
src: e.video
|
|
3853
|
-
}, null, 8,
|
|
3854
|
-
], 16,
|
|
3899
|
+
}, null, 8, Yr))
|
|
3900
|
+
], 16, Jr),
|
|
3855
3901
|
e.aspectRatio && !(e.fitContent && ((a = (l = e.builderBlock) == null ? void 0 : l.children) != null && a.length)) ? (c(), p("div", {
|
|
3856
3902
|
key: 0,
|
|
3857
|
-
style:
|
|
3903
|
+
style: O({
|
|
3858
3904
|
width: "100%",
|
|
3859
3905
|
paddingTop: e.aspectRatio * 100 + "%",
|
|
3860
3906
|
pointerEvents: "none",
|
|
3861
3907
|
fontSize: "0px"
|
|
3862
3908
|
})
|
|
3863
3909
|
}, null, 4)) : v("", !0),
|
|
3864
|
-
(m = (u = e.builderBlock) == null ? void 0 : u.children) != null && m.length && e.fitContent ? (c(), p("div",
|
|
3910
|
+
(m = (u = e.builderBlock) == null ? void 0 : u.children) != null && m.length && e.fitContent ? (c(), p("div", Xr, [
|
|
3865
3911
|
x(e.$slots, "default")
|
|
3866
3912
|
])) : v("", !0),
|
|
3867
|
-
(d = (h = e.builderBlock) == null ? void 0 : h.children) != null && d.length && !e.fitContent ? (c(), p("div",
|
|
3913
|
+
(d = (h = e.builderBlock) == null ? void 0 : h.children) != null && d.length && !e.fitContent ? (c(), p("div", Qr, [
|
|
3868
3914
|
x(e.$slots, "default")
|
|
3869
3915
|
])) : v("", !0)
|
|
3870
3916
|
]);
|
|
3871
3917
|
}
|
|
3872
|
-
const
|
|
3873
|
-
component:
|
|
3874
|
-
...
|
|
3875
|
-
}, {
|
|
3876
|
-
component: or,
|
|
3877
|
-
...Qo
|
|
3918
|
+
const _r = /* @__PURE__ */ g(zr, [["render", Zr]]), es = () => [{
|
|
3919
|
+
component: rr,
|
|
3920
|
+
...er
|
|
3878
3921
|
}, {
|
|
3879
3922
|
component: ur,
|
|
3880
|
-
...
|
|
3923
|
+
...sr
|
|
3881
3924
|
}, {
|
|
3882
|
-
component:
|
|
3925
|
+
component: kr,
|
|
3883
3926
|
...pr
|
|
3884
3927
|
}, {
|
|
3885
|
-
component:
|
|
3886
|
-
...
|
|
3928
|
+
component: wr,
|
|
3929
|
+
...vr
|
|
3887
3930
|
}, {
|
|
3888
|
-
component:
|
|
3889
|
-
...
|
|
3931
|
+
component: Wr,
|
|
3932
|
+
...xr
|
|
3890
3933
|
}, {
|
|
3891
|
-
component:
|
|
3892
|
-
...
|
|
3934
|
+
component: Br,
|
|
3935
|
+
...Ir
|
|
3893
3936
|
}, {
|
|
3894
|
-
component:
|
|
3895
|
-
...
|
|
3937
|
+
component: Lr,
|
|
3938
|
+
...Nr
|
|
3896
3939
|
}, {
|
|
3897
|
-
component:
|
|
3898
|
-
...
|
|
3899
|
-
}], Re = () => [{
|
|
3900
|
-
component: Rt,
|
|
3901
|
-
...Io
|
|
3940
|
+
component: Kr,
|
|
3941
|
+
...Ur
|
|
3902
3942
|
}, {
|
|
3903
|
-
component:
|
|
3904
|
-
|
|
3943
|
+
component: _r,
|
|
3944
|
+
...qr
|
|
3945
|
+
}], Pe = () => [{
|
|
3946
|
+
component: At,
|
|
3947
|
+
...Ao
|
|
3948
|
+
}, {
|
|
3949
|
+
component: uo,
|
|
3950
|
+
...Vo
|
|
3905
3951
|
}, {
|
|
3906
|
-
component:
|
|
3907
|
-
...
|
|
3952
|
+
component: ho,
|
|
3953
|
+
...Wo
|
|
3908
3954
|
}, {
|
|
3909
|
-
component:
|
|
3910
|
-
...
|
|
3955
|
+
component: Co,
|
|
3956
|
+
...Fo
|
|
3911
3957
|
}, {
|
|
3912
|
-
component:
|
|
3913
|
-
...
|
|
3958
|
+
component: Io,
|
|
3959
|
+
...Oo
|
|
3914
3960
|
}, {
|
|
3915
|
-
component:
|
|
3916
|
-
...
|
|
3961
|
+
component: Ho,
|
|
3962
|
+
...Do
|
|
3917
3963
|
}, {
|
|
3918
|
-
component:
|
|
3919
|
-
...
|
|
3964
|
+
component: Os,
|
|
3965
|
+
...Mo
|
|
3920
3966
|
}, {
|
|
3921
|
-
component:
|
|
3922
|
-
...
|
|
3967
|
+
component: _o,
|
|
3968
|
+
...Yo
|
|
3923
3969
|
}, {
|
|
3924
|
-
component:
|
|
3925
|
-
...
|
|
3970
|
+
component: Jo,
|
|
3971
|
+
...jo
|
|
3926
3972
|
}, {
|
|
3927
|
-
component:
|
|
3928
|
-
|
|
3929
|
-
}, ...
|
|
3973
|
+
component: xo,
|
|
3974
|
+
...$o
|
|
3975
|
+
}, ...es()], ts = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
3930
3976
|
function getAndSetVariantId() {
|
|
3931
3977
|
function setCookie(name, value, days) {
|
|
3932
3978
|
let expires = '';
|
|
@@ -3982,7 +4028,7 @@ const qr = /* @__PURE__ */ g(Or, [["render", Kr]]), zr = () => [{
|
|
|
3982
4028
|
}).join('');
|
|
3983
4029
|
styleEl.innerHTML = newStyleStr;
|
|
3984
4030
|
}
|
|
3985
|
-
}`,
|
|
4031
|
+
}`, ns = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
3986
4032
|
if (!navigator.cookieEnabled) {
|
|
3987
4033
|
return;
|
|
3988
4034
|
}
|
|
@@ -4016,27 +4062,27 @@ const qr = /* @__PURE__ */ g(Or, [["render", Kr]]), zr = () => [{
|
|
|
4016
4062
|
thisScriptEl?.remove();
|
|
4017
4063
|
}
|
|
4018
4064
|
return;
|
|
4019
|
-
}`,
|
|
4065
|
+
}`, ct = "builderIoAbTest", dt = "builderIoRenderContent", Q = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
4020
4066
|
...t,
|
|
4021
4067
|
testVariationId: t.id,
|
|
4022
4068
|
id: e == null ? void 0 : e.id
|
|
4023
|
-
})),
|
|
4069
|
+
})), os = ({
|
|
4024
4070
|
canTrack: e,
|
|
4025
4071
|
content: t
|
|
4026
|
-
}) => !(!(Q(t).length > 0) || !e),
|
|
4027
|
-
window.${
|
|
4028
|
-
window.${
|
|
4029
|
-
`,
|
|
4030
|
-
window.${
|
|
4031
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
4032
|
-
)`,
|
|
4072
|
+
}) => !(!(Q(t).length > 0) || !e), rs = (e) => e === "react" || e === "reactNative", ut = rs(E), ss = () => `
|
|
4073
|
+
window.${ct} = ${ts}
|
|
4074
|
+
window.${dt} = ${ns}
|
|
4075
|
+
`, is = (e, t) => `
|
|
4076
|
+
window.${ct}(
|
|
4077
|
+
"${t}",${JSON.stringify(e)}, ${ut}
|
|
4078
|
+
)`, as = ({
|
|
4033
4079
|
contentId: e,
|
|
4034
4080
|
variationId: t
|
|
4035
|
-
}) => `window.${
|
|
4036
|
-
"${t}", "${e}", ${
|
|
4037
|
-
)`,
|
|
4081
|
+
}) => `window.${dt}(
|
|
4082
|
+
"${t}", "${e}", ${ut}
|
|
4083
|
+
)`, pt = b({
|
|
4038
4084
|
render() {
|
|
4039
|
-
return
|
|
4085
|
+
return Ae("script", {
|
|
4040
4086
|
innerHTML: this.scriptStr,
|
|
4041
4087
|
"data-id": this.id,
|
|
4042
4088
|
nonce: this.nonce
|
|
@@ -4045,10 +4091,10 @@ const qr = /* @__PURE__ */ g(Or, [["render", Kr]]), zr = () => [{
|
|
|
4045
4091
|
name: "inlined-script",
|
|
4046
4092
|
props: ["scriptStr", "id", "nonce"]
|
|
4047
4093
|
});
|
|
4048
|
-
function
|
|
4094
|
+
function Be(e) {
|
|
4049
4095
|
return Math.round(e * 1e3) / 1e3;
|
|
4050
4096
|
}
|
|
4051
|
-
const
|
|
4097
|
+
const ls = (e, t, n = !0) => {
|
|
4052
4098
|
if (!(e instanceof HTMLElement))
|
|
4053
4099
|
return null;
|
|
4054
4100
|
let o = n ? e : e.parentElement;
|
|
@@ -4059,37 +4105,37 @@ const es = (e, t, n = !0) => {
|
|
|
4059
4105
|
return o;
|
|
4060
4106
|
} while (o = o.parentElement);
|
|
4061
4107
|
return null;
|
|
4062
|
-
},
|
|
4108
|
+
}, cs = (e) => ls(e, (t) => {
|
|
4063
4109
|
const n = t.getAttribute("builder-id") || t.id;
|
|
4064
4110
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
4065
|
-
}),
|
|
4111
|
+
}), xe = ({
|
|
4066
4112
|
event: e,
|
|
4067
4113
|
target: t
|
|
4068
4114
|
}) => {
|
|
4069
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top,
|
|
4115
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, s = Be(o / n.width), i = Be(r / n.height);
|
|
4070
4116
|
return {
|
|
4071
|
-
x:
|
|
4072
|
-
y:
|
|
4117
|
+
x: s,
|
|
4118
|
+
y: i
|
|
4073
4119
|
};
|
|
4074
|
-
},
|
|
4075
|
-
const t = e.target, n = t &&
|
|
4120
|
+
}, ds = (e) => {
|
|
4121
|
+
const t = e.target, n = t && cs(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
4076
4122
|
return {
|
|
4077
4123
|
targetBuilderElement: o || void 0,
|
|
4078
4124
|
metadata: {
|
|
4079
|
-
targetOffset: t ?
|
|
4125
|
+
targetOffset: t ? xe({
|
|
4080
4126
|
event: e,
|
|
4081
4127
|
target: t
|
|
4082
4128
|
}) : void 0,
|
|
4083
|
-
builderTargetOffset: n ?
|
|
4129
|
+
builderTargetOffset: n ? xe({
|
|
4084
4130
|
event: e,
|
|
4085
4131
|
target: n
|
|
4086
4132
|
}) : void 0,
|
|
4087
4133
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
4088
4134
|
}
|
|
4089
4135
|
};
|
|
4090
|
-
},
|
|
4091
|
-
var
|
|
4092
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((
|
|
4136
|
+
}, us = ["svelte", "qwik", "vue"], ps = () => us.includes(E) && (P() || De()), ms = (e) => {
|
|
4137
|
+
var s;
|
|
4138
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((s = e == null ? void 0 : e.files) == null ? void 0 : s.regular);
|
|
4093
4139
|
let r = "";
|
|
4094
4140
|
if (o && t && n && (r += `
|
|
4095
4141
|
@font-face {
|
|
@@ -4099,29 +4145,29 @@ font-display: fallback;
|
|
|
4099
4145
|
font-weight: 400;
|
|
4100
4146
|
}
|
|
4101
4147
|
`.trim()), e.files)
|
|
4102
|
-
for (const
|
|
4103
|
-
if (!(String(Number(
|
|
4148
|
+
for (const i in e.files) {
|
|
4149
|
+
if (!(String(Number(i)) === i))
|
|
4104
4150
|
continue;
|
|
4105
|
-
const a = e.files[
|
|
4151
|
+
const a = e.files[i];
|
|
4106
4152
|
a && a !== o && (r += `
|
|
4107
4153
|
@font-face {
|
|
4108
4154
|
font-family: "${t}";
|
|
4109
4155
|
src: url('${a}') format('woff2');
|
|
4110
4156
|
font-display: fallback;
|
|
4111
|
-
font-weight: ${
|
|
4157
|
+
font-weight: ${i};
|
|
4112
4158
|
}
|
|
4113
4159
|
`.trim());
|
|
4114
4160
|
}
|
|
4115
4161
|
return r;
|
|
4116
|
-
},
|
|
4162
|
+
}, hs = ({
|
|
4117
4163
|
customFonts: e
|
|
4118
4164
|
}) => {
|
|
4119
4165
|
var t;
|
|
4120
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
4121
|
-
},
|
|
4166
|
+
return ((t = e == null ? void 0 : e.map((n) => ms(n))) == null ? void 0 : t.join(" ")) || "";
|
|
4167
|
+
}, fs = ({
|
|
4122
4168
|
cssCode: e,
|
|
4123
4169
|
contentId: t
|
|
4124
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
4170
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", bs = `
|
|
4125
4171
|
.builder-button {
|
|
4126
4172
|
all: unset;
|
|
4127
4173
|
}
|
|
@@ -4138,7 +4184,7 @@ font-weight: ${s};
|
|
|
4138
4184
|
text-align: inherit;
|
|
4139
4185
|
font-family: inherit;
|
|
4140
4186
|
}
|
|
4141
|
-
`,
|
|
4187
|
+
`, gs = (e) => e ? "" : bs, ys = (e) => `variant-${e}`, ks = b({
|
|
4142
4188
|
name: "enable-editor",
|
|
4143
4189
|
components: { DynamicDiv: Y },
|
|
4144
4190
|
props: [
|
|
@@ -4164,14 +4210,15 @@ font-weight: ${s};
|
|
|
4164
4210
|
httpReqsData: {},
|
|
4165
4211
|
httpReqsPending: {},
|
|
4166
4212
|
clicked: !1,
|
|
4167
|
-
builderContext:
|
|
4168
|
-
|
|
4213
|
+
builderContext: le,
|
|
4214
|
+
needsElementRefDivForEditing: ps,
|
|
4215
|
+
getWrapperClassName: ys
|
|
4169
4216
|
};
|
|
4170
4217
|
},
|
|
4171
4218
|
provide() {
|
|
4172
4219
|
const e = this;
|
|
4173
4220
|
return {
|
|
4174
|
-
[
|
|
4221
|
+
[le.key]: e.builderContextSignal
|
|
4175
4222
|
};
|
|
4176
4223
|
},
|
|
4177
4224
|
created() {
|
|
@@ -4183,17 +4230,17 @@ font-weight: ${s};
|
|
|
4183
4230
|
if (P() && !this.isNestedRender && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4184
4231
|
new CustomEvent("initeditingbldr")
|
|
4185
4232
|
), this.builderContextSignal.content && G(this.canTrack)) {
|
|
4186
|
-
const o = (e = this.builderContextSignal.content) == null ? void 0 : e.testVariationId, r = (t = this.builderContextSignal.content) == null ? void 0 : t.id,
|
|
4187
|
-
|
|
4233
|
+
const o = (e = this.builderContextSignal.content) == null ? void 0 : e.testVariationId, r = (t = this.builderContextSignal.content) == null ? void 0 : t.id, s = this.apiKey;
|
|
4234
|
+
de({
|
|
4188
4235
|
apiHost: this.apiHost,
|
|
4189
4236
|
type: "impression",
|
|
4190
4237
|
canTrack: !0,
|
|
4191
4238
|
contentId: r,
|
|
4192
|
-
apiKey:
|
|
4239
|
+
apiKey: s,
|
|
4193
4240
|
variationId: o !== r ? o : void 0
|
|
4194
4241
|
});
|
|
4195
4242
|
}
|
|
4196
|
-
|
|
4243
|
+
De() && !P() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4197
4244
|
new CustomEvent("initpreviewingbldr")
|
|
4198
4245
|
);
|
|
4199
4246
|
}
|
|
@@ -4270,7 +4317,7 @@ font-weight: ${s};
|
|
|
4270
4317
|
this.builderContextSignal.rootSetState ? (o = (n = this.builderContextSignal).rootSetState) == null || o.call(n, t) : this.builderContextSignal.rootState = t;
|
|
4271
4318
|
},
|
|
4272
4319
|
mergeNewContent(e) {
|
|
4273
|
-
var n, o, r,
|
|
4320
|
+
var n, o, r, s, i;
|
|
4274
4321
|
const t = {
|
|
4275
4322
|
...this.builderContextSignal.content,
|
|
4276
4323
|
...e,
|
|
@@ -4281,13 +4328,13 @@ font-weight: ${s};
|
|
|
4281
4328
|
meta: {
|
|
4282
4329
|
...(o = this.builderContextSignal.content) == null ? void 0 : o.meta,
|
|
4283
4330
|
...e == null ? void 0 : e.meta,
|
|
4284
|
-
breakpoints: ((r = e == null ? void 0 : e.meta) == null ? void 0 : r.breakpoints) || ((
|
|
4331
|
+
breakpoints: ((r = e == null ? void 0 : e.meta) == null ? void 0 : r.breakpoints) || ((i = (s = this.builderContextSignal.content) == null ? void 0 : s.meta) == null ? void 0 : i.breakpoints)
|
|
4285
4332
|
}
|
|
4286
4333
|
};
|
|
4287
4334
|
this.builderContextSignal.content = t;
|
|
4288
4335
|
},
|
|
4289
4336
|
processMessage(e) {
|
|
4290
|
-
return
|
|
4337
|
+
return Qe({
|
|
4291
4338
|
model: this.model,
|
|
4292
4339
|
trustedHosts: this.trustedHosts,
|
|
4293
4340
|
callbacks: {
|
|
@@ -4301,7 +4348,7 @@ font-weight: ${s};
|
|
|
4301
4348
|
});
|
|
4302
4349
|
},
|
|
4303
4350
|
animation: (t) => {
|
|
4304
|
-
|
|
4351
|
+
rt(t);
|
|
4305
4352
|
},
|
|
4306
4353
|
contentUpdate: (t) => {
|
|
4307
4354
|
this.mergeNewContent(t);
|
|
@@ -4313,14 +4360,14 @@ font-weight: ${s};
|
|
|
4313
4360
|
var t, n;
|
|
4314
4361
|
if (this.builderContextSignal.content) {
|
|
4315
4362
|
const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, r = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
|
|
4316
|
-
|
|
4363
|
+
de({
|
|
4317
4364
|
apiHost: this.apiHost,
|
|
4318
4365
|
type: "click",
|
|
4319
4366
|
canTrack: G(this.canTrack),
|
|
4320
4367
|
contentId: r,
|
|
4321
4368
|
apiKey: this.apiKey,
|
|
4322
4369
|
variationId: o !== r ? o : void 0,
|
|
4323
|
-
...
|
|
4370
|
+
...ds(e),
|
|
4324
4371
|
unique: !this.clicked
|
|
4325
4372
|
});
|
|
4326
4373
|
}
|
|
@@ -4333,9 +4380,9 @@ font-weight: ${s};
|
|
|
4333
4380
|
if (!r || this.httpReqsPending[o] || this.httpReqsData[o] && !P())
|
|
4334
4381
|
return;
|
|
4335
4382
|
this.httpReqsPending[o] = !0;
|
|
4336
|
-
const
|
|
4383
|
+
const s = r.replace(
|
|
4337
4384
|
/{{([^}]+)}}/g,
|
|
4338
|
-
(
|
|
4385
|
+
(i, l) => String(
|
|
4339
4386
|
J({
|
|
4340
4387
|
code: l,
|
|
4341
4388
|
context: this.context || {},
|
|
@@ -4345,12 +4392,12 @@ font-weight: ${s};
|
|
|
4345
4392
|
})
|
|
4346
4393
|
)
|
|
4347
4394
|
);
|
|
4348
|
-
|
|
4395
|
+
he(s), fetch(s).then((i) => i.json()).then((i) => {
|
|
4349
4396
|
this.mergeNewRootState({
|
|
4350
|
-
[o]:
|
|
4397
|
+
[o]: i
|
|
4351
4398
|
}), this.httpReqsData[o] = !0;
|
|
4352
|
-
}).catch((
|
|
4353
|
-
console.error("error fetching dynamic data", r,
|
|
4399
|
+
}).catch((i) => {
|
|
4400
|
+
console.error("error fetching dynamic data", r, i);
|
|
4354
4401
|
}).finally(() => {
|
|
4355
4402
|
this.httpReqsPending[o] = !1;
|
|
4356
4403
|
});
|
|
@@ -4362,7 +4409,7 @@ font-weight: ${s};
|
|
|
4362
4409
|
"builder:component:stateChange",
|
|
4363
4410
|
{
|
|
4364
4411
|
detail: {
|
|
4365
|
-
state:
|
|
4412
|
+
state: pe(this.builderContextSignal.rootState),
|
|
4366
4413
|
ref: {
|
|
4367
4414
|
name: this.model
|
|
4368
4415
|
}
|
|
@@ -4372,7 +4419,7 @@ font-weight: ${s};
|
|
|
4372
4419
|
);
|
|
4373
4420
|
},
|
|
4374
4421
|
elementRef_onIniteditingbldr(e) {
|
|
4375
|
-
window.addEventListener("message", this.processMessage),
|
|
4422
|
+
window.addEventListener("message", this.processMessage), gn(), Xe({
|
|
4376
4423
|
...this.locale ? {
|
|
4377
4424
|
locale: this.locale
|
|
4378
4425
|
} : {},
|
|
@@ -4385,9 +4432,11 @@ font-weight: ${s};
|
|
|
4385
4432
|
}), Object.values(
|
|
4386
4433
|
this.builderContextSignal.componentInfos
|
|
4387
4434
|
).forEach((t) => {
|
|
4388
|
-
var o;
|
|
4389
|
-
|
|
4390
|
-
|
|
4435
|
+
var n, o;
|
|
4436
|
+
if (!this.model || !((n = t.models) != null && n.length) || t.models.includes(this.model)) {
|
|
4437
|
+
const r = Yt(t);
|
|
4438
|
+
(o = window.parent) == null || o.postMessage(r, "*");
|
|
4439
|
+
}
|
|
4391
4440
|
}), window.addEventListener(
|
|
4392
4441
|
"builder:component:stateChangeListenerActivated",
|
|
4393
4442
|
this.emitStateUpdate
|
|
@@ -4397,25 +4446,28 @@ font-weight: ${s};
|
|
|
4397
4446
|
const t = new URL(location.href).searchParams, n = t.get("builder.preview"), o = t.get(
|
|
4398
4447
|
`builder.overrides.${n}`
|
|
4399
4448
|
), r = t.get("apiKey") || t.get("builder.space");
|
|
4400
|
-
n === this.model && r === this.apiKey && (!this.content || o === this.content.id) &&
|
|
4449
|
+
n === this.model && r === this.apiKey && (!this.content || o === this.content.id) && ge({
|
|
4401
4450
|
model: this.model,
|
|
4402
4451
|
apiKey: this.apiKey,
|
|
4403
4452
|
apiVersion: this.builderContextSignal.apiVersion
|
|
4404
|
-
}).then((
|
|
4405
|
-
|
|
4453
|
+
}).then((s) => {
|
|
4454
|
+
s && this.mergeNewContent(s);
|
|
4406
4455
|
});
|
|
4407
4456
|
}
|
|
4408
4457
|
}
|
|
4409
4458
|
});
|
|
4410
|
-
function
|
|
4411
|
-
var
|
|
4412
|
-
return e.builderContextSignal.content ? (c(), y(j(e.ContentWrapper), C({
|
|
4459
|
+
function vs(e, t, n, o, r, s) {
|
|
4460
|
+
var i, l, a;
|
|
4461
|
+
return e.builderContextSignal.content || e.needsElementRefDivForEditing() ? (c(), y(j(e.ContentWrapper), C({
|
|
4413
4462
|
key: 0,
|
|
4414
4463
|
ref: "elementRef",
|
|
4415
4464
|
onClick: (u) => e.onClick(u),
|
|
4416
|
-
"builder-content-id": (
|
|
4465
|
+
"builder-content-id": (i = e.builderContextSignal.content) == null ? void 0 : i.id,
|
|
4417
4466
|
"builder-model": e.model,
|
|
4418
4467
|
className: e.getWrapperClassName(((l = e.content) == null ? void 0 : l.testVariationId) || ((a = e.content) == null ? void 0 : a.id)),
|
|
4468
|
+
style: {
|
|
4469
|
+
display: !e.builderContextSignal.content && e.needsElementRefDivForEditing() ? "none" : void 0
|
|
4470
|
+
},
|
|
4419
4471
|
onIniteditingbldr: (u) => e.elementRef_onIniteditingbldr(u),
|
|
4420
4472
|
onInitpreviewingbldr: (u) => e.elementRef_onInitpreviewingbldr(u)
|
|
4421
4473
|
}, { ...e.showContentProps, ...e.contentWrapperProps }), {
|
|
@@ -4423,43 +4475,43 @@ function ds(e, t, n, o, r, i) {
|
|
|
4423
4475
|
x(e.$slots, "default")
|
|
4424
4476
|
]),
|
|
4425
4477
|
_: 3
|
|
4426
|
-
}, 16, ["onClick", "builder-content-id", "builder-model", "className", "onIniteditingbldr", "onInitpreviewingbldr"])) : v("", !0);
|
|
4478
|
+
}, 16, ["onClick", "builder-content-id", "builder-model", "className", "style", "onIniteditingbldr", "onInitpreviewingbldr"])) : v("", !0);
|
|
4427
4479
|
}
|
|
4428
|
-
const
|
|
4480
|
+
const Ss = /* @__PURE__ */ g(ks, [["render", vs]]), Cs = b({
|
|
4429
4481
|
name: "content-styles",
|
|
4430
|
-
components: { InlinedStyles:
|
|
4482
|
+
components: { InlinedStyles: ve },
|
|
4431
4483
|
props: ["cssCode", "contentId", "customFonts", "isNestedRender", "nonce"],
|
|
4432
4484
|
data() {
|
|
4433
4485
|
return {
|
|
4434
4486
|
injectedStyles: `
|
|
4435
|
-
${
|
|
4487
|
+
${fs({
|
|
4436
4488
|
cssCode: this.cssCode,
|
|
4437
4489
|
contentId: this.contentId
|
|
4438
4490
|
})}
|
|
4439
|
-
${
|
|
4491
|
+
${hs({
|
|
4440
4492
|
customFonts: this.customFonts
|
|
4441
4493
|
})}
|
|
4442
|
-
${
|
|
4494
|
+
${gs(this.isNestedRender)}
|
|
4443
4495
|
`.trim()
|
|
4444
4496
|
};
|
|
4445
4497
|
}
|
|
4446
4498
|
});
|
|
4447
|
-
function
|
|
4448
|
-
const
|
|
4449
|
-
return c(), y(
|
|
4499
|
+
function Ts(e, t, n, o, r, s) {
|
|
4500
|
+
const i = k("InlinedStyles");
|
|
4501
|
+
return c(), y(i, {
|
|
4450
4502
|
id: "builderio-content",
|
|
4451
4503
|
styles: e.injectedStyles,
|
|
4452
4504
|
nonce: e.nonce
|
|
4453
4505
|
}, null, 8, ["styles", "nonce"]);
|
|
4454
4506
|
}
|
|
4455
|
-
const
|
|
4507
|
+
const ws = /* @__PURE__ */ g(Cs, [["render", Ts]]), Is = ({
|
|
4456
4508
|
content: e,
|
|
4457
4509
|
data: t,
|
|
4458
4510
|
locale: n
|
|
4459
4511
|
}) => {
|
|
4460
|
-
var
|
|
4461
|
-
const o = {}, r = ((
|
|
4462
|
-
return (l = (
|
|
4512
|
+
var s, i, l;
|
|
4513
|
+
const o = {}, r = ((s = e == null ? void 0 : e.data) == null ? void 0 : s.state) || {};
|
|
4514
|
+
return (l = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || l.forEach((a) => {
|
|
4463
4515
|
a.name && a.defaultValue !== void 0 && (o[a.name] = a.defaultValue);
|
|
4464
4516
|
}), {
|
|
4465
4517
|
...o,
|
|
@@ -4469,7 +4521,7 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4469
4521
|
locale: n
|
|
4470
4522
|
} : {}
|
|
4471
4523
|
};
|
|
4472
|
-
},
|
|
4524
|
+
}, $s = ({
|
|
4473
4525
|
content: e,
|
|
4474
4526
|
data: t
|
|
4475
4527
|
}) => e ? {
|
|
@@ -4479,12 +4531,12 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4479
4531
|
...t
|
|
4480
4532
|
},
|
|
4481
4533
|
meta: e == null ? void 0 : e.meta
|
|
4482
|
-
} : void 0,
|
|
4534
|
+
} : void 0, Rs = gt, Es = b({
|
|
4483
4535
|
name: "content-component",
|
|
4484
4536
|
components: {
|
|
4485
|
-
EnableEditor:
|
|
4486
|
-
InlinedScript:
|
|
4487
|
-
ContentStyles:
|
|
4537
|
+
EnableEditor: Ss,
|
|
4538
|
+
InlinedScript: pt,
|
|
4539
|
+
ContentStyles: ws,
|
|
4488
4540
|
Blocks: U,
|
|
4489
4541
|
DynamicDiv: Y
|
|
4490
4542
|
},
|
|
@@ -4493,7 +4545,6 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4493
4545
|
"context",
|
|
4494
4546
|
"content",
|
|
4495
4547
|
"customComponents",
|
|
4496
|
-
"model",
|
|
4497
4548
|
"data",
|
|
4498
4549
|
"locale",
|
|
4499
4550
|
"canTrack",
|
|
@@ -4501,6 +4552,7 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4501
4552
|
"blocksWrapper",
|
|
4502
4553
|
"blocksWrapperProps",
|
|
4503
4554
|
"nonce",
|
|
4555
|
+
"model",
|
|
4504
4556
|
"apiHost",
|
|
4505
4557
|
"enrich",
|
|
4506
4558
|
"showContent",
|
|
@@ -4512,34 +4564,34 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4512
4564
|
"linkComponent"
|
|
4513
4565
|
],
|
|
4514
4566
|
data() {
|
|
4515
|
-
var e, t
|
|
4567
|
+
var e, t;
|
|
4516
4568
|
return {
|
|
4517
|
-
scriptStr:
|
|
4569
|
+
scriptStr: as({
|
|
4518
4570
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
4519
4571
|
variationId: (e = this.content) == null ? void 0 : e.testVariationId,
|
|
4520
4572
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
4521
4573
|
contentId: (t = this.content) == null ? void 0 : t.id
|
|
4522
4574
|
}),
|
|
4523
4575
|
registeredComponents: [
|
|
4524
|
-
...
|
|
4525
|
-
...
|
|
4576
|
+
...Pe(),
|
|
4577
|
+
...this.customComponents || []
|
|
4526
4578
|
].reduce(
|
|
4527
|
-
(
|
|
4528
|
-
...
|
|
4529
|
-
[
|
|
4530
|
-
component:
|
|
4531
|
-
...
|
|
4579
|
+
(n, { component: o, ...r }) => ({
|
|
4580
|
+
...n,
|
|
4581
|
+
[r.name]: {
|
|
4582
|
+
component: Rs(o),
|
|
4583
|
+
...ee(r)
|
|
4532
4584
|
}
|
|
4533
4585
|
}),
|
|
4534
4586
|
{}
|
|
4535
4587
|
),
|
|
4536
4588
|
builderContextSignal: {
|
|
4537
|
-
content:
|
|
4589
|
+
content: $s({
|
|
4538
4590
|
content: this.content,
|
|
4539
4591
|
data: this.data
|
|
4540
4592
|
}),
|
|
4541
4593
|
localState: void 0,
|
|
4542
|
-
rootState:
|
|
4594
|
+
rootState: Is({
|
|
4543
4595
|
content: this.content,
|
|
4544
4596
|
data: this.data,
|
|
4545
4597
|
locale: this.locale
|
|
@@ -4550,19 +4602,20 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4550
4602
|
apiKey: this.apiKey,
|
|
4551
4603
|
apiVersion: this.apiVersion,
|
|
4552
4604
|
componentInfos: [
|
|
4553
|
-
...
|
|
4554
|
-
...
|
|
4605
|
+
...Pe(),
|
|
4606
|
+
...this.customComponents || []
|
|
4555
4607
|
].reduce(
|
|
4556
|
-
(
|
|
4557
|
-
...
|
|
4558
|
-
[
|
|
4608
|
+
(n, { component: o, ...r }) => ({
|
|
4609
|
+
...n,
|
|
4610
|
+
[r.name]: ee(r)
|
|
4559
4611
|
}),
|
|
4560
4612
|
{}
|
|
4561
4613
|
),
|
|
4562
4614
|
inheritedStyles: {},
|
|
4563
4615
|
BlocksWrapper: this.blocksWrapper || "div",
|
|
4564
4616
|
BlocksWrapperProps: this.blocksWrapperProps || {},
|
|
4565
|
-
nonce: this.nonce || ""
|
|
4617
|
+
nonce: this.nonce || "",
|
|
4618
|
+
model: this.model || ""
|
|
4566
4619
|
},
|
|
4567
4620
|
TARGET: E
|
|
4568
4621
|
};
|
|
@@ -4570,7 +4623,7 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4570
4623
|
provide() {
|
|
4571
4624
|
const e = this;
|
|
4572
4625
|
return {
|
|
4573
|
-
[
|
|
4626
|
+
[Ne.key]: {
|
|
4574
4627
|
registeredComponents: e.registeredComponents
|
|
4575
4628
|
}
|
|
4576
4629
|
};
|
|
@@ -4598,8 +4651,8 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4598
4651
|
}
|
|
4599
4652
|
}
|
|
4600
4653
|
});
|
|
4601
|
-
function
|
|
4602
|
-
const
|
|
4654
|
+
function Ps(e, t, n, o, r, s) {
|
|
4655
|
+
const i = k("InlinedScript"), l = k("ContentStyles"), a = k("Blocks"), u = k("EnableEditor");
|
|
4603
4656
|
return c(), y(u, C({
|
|
4604
4657
|
apiHost: e.apiHost,
|
|
4605
4658
|
nonce: e.nonce,
|
|
@@ -4619,9 +4672,9 @@ function ks(e, t, n, o, r, i) {
|
|
|
4619
4672
|
isNestedRender: e.isNestedRender
|
|
4620
4673
|
}, {}), {
|
|
4621
4674
|
default: N(() => {
|
|
4622
|
-
var m, h, d, f, S, T,
|
|
4675
|
+
var m, h, d, f, S, T, D;
|
|
4623
4676
|
return [
|
|
4624
|
-
e.isSsrAbTest ? (c(), y(
|
|
4677
|
+
e.isSsrAbTest ? (c(), y(i, {
|
|
4625
4678
|
key: 0,
|
|
4626
4679
|
id: "builderio-variant-visibility",
|
|
4627
4680
|
scriptStr: e.scriptStr,
|
|
@@ -4636,7 +4689,7 @@ function ks(e, t, n, o, r, i) {
|
|
|
4636
4689
|
customFonts: (S = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : S.customFonts
|
|
4637
4690
|
}, null, 8, ["nonce", "isNestedRender", "contentId", "cssCode", "customFonts"])) : v("", !0),
|
|
4638
4691
|
$(a, {
|
|
4639
|
-
blocks: (
|
|
4692
|
+
blocks: (D = (T = e.builderContextSignal.content) == null ? void 0 : T.data) == null ? void 0 : D.blocks,
|
|
4640
4693
|
context: e.builderContextSignal,
|
|
4641
4694
|
registeredComponents: e.registeredComponents,
|
|
4642
4695
|
linkComponent: e.linkComponent
|
|
@@ -4646,12 +4699,12 @@ function ks(e, t, n, o, r, i) {
|
|
|
4646
4699
|
_: 1
|
|
4647
4700
|
}, 16, ["apiHost", "nonce", "content", "data", "model", "context", "apiKey", "canTrack", "locale", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "trustedHosts", "isNestedRender"]);
|
|
4648
4701
|
}
|
|
4649
|
-
const
|
|
4702
|
+
const Bs = /* @__PURE__ */ g(Es, [["render", Ps]]), xs = b({
|
|
4650
4703
|
name: "content-variants",
|
|
4651
4704
|
components: {
|
|
4652
|
-
InlinedScript:
|
|
4653
|
-
InlinedStyles:
|
|
4654
|
-
ContentComponent:
|
|
4705
|
+
InlinedScript: pt,
|
|
4706
|
+
InlinedStyles: ve,
|
|
4707
|
+
ContentComponent: Bs
|
|
4655
4708
|
},
|
|
4656
4709
|
props: [
|
|
4657
4710
|
"canTrack",
|
|
@@ -4676,12 +4729,12 @@ const vs = /* @__PURE__ */ g(ys, [["render", ks]]), Ss = b({
|
|
|
4676
4729
|
],
|
|
4677
4730
|
data() {
|
|
4678
4731
|
return {
|
|
4679
|
-
shouldRenderVariants:
|
|
4732
|
+
shouldRenderVariants: os({
|
|
4680
4733
|
canTrack: G(this.canTrack),
|
|
4681
4734
|
content: this.content
|
|
4682
4735
|
}),
|
|
4683
4736
|
TARGET: E,
|
|
4684
|
-
getInitVariantsFnsScriptString:
|
|
4737
|
+
getInitVariantsFnsScriptString: ss,
|
|
4685
4738
|
getVariants: Q
|
|
4686
4739
|
};
|
|
4687
4740
|
},
|
|
@@ -4690,7 +4743,7 @@ const vs = /* @__PURE__ */ g(ys, [["render", ks]]), Ss = b({
|
|
|
4690
4743
|
computed: {
|
|
4691
4744
|
updateCookieAndStylesScriptStr() {
|
|
4692
4745
|
var e;
|
|
4693
|
-
return
|
|
4746
|
+
return is(
|
|
4694
4747
|
Q(this.content).map((t) => ({
|
|
4695
4748
|
id: t.testVariationId,
|
|
4696
4749
|
testRatio: t.testRatio
|
|
@@ -4706,17 +4759,17 @@ const vs = /* @__PURE__ */ g(ys, [["render", ks]]), Ss = b({
|
|
|
4706
4759
|
return this.shouldRenderVariants ? {
|
|
4707
4760
|
...this.content,
|
|
4708
4761
|
testVariationId: (e = this.content) == null ? void 0 : e.id
|
|
4709
|
-
} :
|
|
4762
|
+
} : Tn({
|
|
4710
4763
|
item: this.content,
|
|
4711
4764
|
canTrack: G(this.canTrack)
|
|
4712
4765
|
});
|
|
4713
4766
|
}
|
|
4714
4767
|
}
|
|
4715
4768
|
});
|
|
4716
|
-
function
|
|
4717
|
-
const
|
|
4769
|
+
function As(e, t, n, o, r, s) {
|
|
4770
|
+
const i = k("InlinedScript"), l = k("InlinedStyles"), a = k("ContentComponent");
|
|
4718
4771
|
return c(), p(w, null, [
|
|
4719
|
-
!e.isNestedRender && e.TARGET !== "reactNative" ? (c(), y(
|
|
4772
|
+
!e.isNestedRender && e.TARGET !== "reactNative" ? (c(), y(i, {
|
|
4720
4773
|
key: 0,
|
|
4721
4774
|
id: "builderio-init-variants-fns",
|
|
4722
4775
|
scriptStr: e.getInitVariantsFnsScriptString(),
|
|
@@ -4728,7 +4781,7 @@ function Cs(e, t, n, o, r, i) {
|
|
|
4728
4781
|
styles: e.hideVariantsStyleString,
|
|
4729
4782
|
nonce: e.nonce || ""
|
|
4730
4783
|
}, null, 8, ["styles", "nonce"]),
|
|
4731
|
-
$(
|
|
4784
|
+
$(i, {
|
|
4732
4785
|
id: "builderio-variants-visibility",
|
|
4733
4786
|
scriptStr: e.updateCookieAndStylesScriptStr,
|
|
4734
4787
|
nonce: e.nonce || ""
|
|
@@ -4785,13 +4838,13 @@ function Cs(e, t, n, o, r, i) {
|
|
|
4785
4838
|
}), null, 16, ["apiHost", "nonce", "isNestedRender", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
4786
4839
|
], 64);
|
|
4787
4840
|
}
|
|
4788
|
-
const
|
|
4841
|
+
const Vs = /* @__PURE__ */ g(xs, [["render", As]]), Ws = async ({
|
|
4789
4842
|
builderContextValue: e,
|
|
4790
4843
|
symbol: t
|
|
4791
4844
|
}) => {
|
|
4792
4845
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
4793
4846
|
(e != null && e.apiKey))
|
|
4794
|
-
return
|
|
4847
|
+
return ge({
|
|
4795
4848
|
model: t.model,
|
|
4796
4849
|
apiKey: e.apiKey,
|
|
4797
4850
|
apiVersion: e.apiVersion,
|
|
@@ -4803,9 +4856,9 @@ const Ts = /* @__PURE__ */ g(Ss, [["render", Cs]]), ws = async ({
|
|
|
4803
4856
|
}).catch((n) => {
|
|
4804
4857
|
A.error("Could not fetch symbol content: ", n);
|
|
4805
4858
|
});
|
|
4806
|
-
},
|
|
4859
|
+
}, Ns = b({
|
|
4807
4860
|
name: "builder-symbol",
|
|
4808
|
-
components: { ContentVariants:
|
|
4861
|
+
components: { ContentVariants: Vs, DynamicDiv: Y },
|
|
4809
4862
|
props: [
|
|
4810
4863
|
"symbol",
|
|
4811
4864
|
"attributes",
|
|
@@ -4854,7 +4907,7 @@ const Ts = /* @__PURE__ */ g(Ss, [["render", Cs]]), ws = async ({
|
|
|
4854
4907
|
},
|
|
4855
4908
|
methods: {
|
|
4856
4909
|
setContent() {
|
|
4857
|
-
this.contentToUse ||
|
|
4910
|
+
this.contentToUse || Ws({
|
|
4858
4911
|
symbol: this.symbol,
|
|
4859
4912
|
builderContextValue: this.builderContext
|
|
4860
4913
|
}).then((e) => {
|
|
@@ -4863,11 +4916,11 @@ const Ts = /* @__PURE__ */ g(Ss, [["render", Cs]]), ws = async ({
|
|
|
4863
4916
|
}
|
|
4864
4917
|
}
|
|
4865
4918
|
});
|
|
4866
|
-
function
|
|
4919
|
+
function Fs(e, t, n, o, r, s) {
|
|
4867
4920
|
var l, a, u, m, h;
|
|
4868
|
-
const
|
|
4921
|
+
const i = k("ContentVariants");
|
|
4869
4922
|
return c(), p("div", C({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
4870
|
-
$(
|
|
4923
|
+
$(i, {
|
|
4871
4924
|
nonce: e.builderContext.nonce,
|
|
4872
4925
|
isNestedRender: !0,
|
|
4873
4926
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -4891,41 +4944,41 @@ function $s(e, t, n, o, r, i) {
|
|
|
4891
4944
|
}, null, 8, ["nonce", "apiVersion", "apiKey", "context", "customComponents", "data", "canTrack", "model", "content", "linkComponent", "blocksWrapper", "contentWrapper"])
|
|
4892
4945
|
], 16);
|
|
4893
4946
|
}
|
|
4894
|
-
const
|
|
4947
|
+
const Os = /* @__PURE__ */ g(Ns, [["render", Fs]]);
|
|
4895
4948
|
export {
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4949
|
+
Gs as A,
|
|
4950
|
+
ke as B,
|
|
4951
|
+
uo as C,
|
|
4952
|
+
ho as F,
|
|
4953
|
+
Co as I,
|
|
4954
|
+
Io as S,
|
|
4955
|
+
_o as T,
|
|
4956
|
+
_r as V,
|
|
4957
|
+
ve as _,
|
|
4958
|
+
Js as a,
|
|
4959
|
+
ye as b,
|
|
4960
|
+
qs as c,
|
|
4908
4961
|
g as d,
|
|
4909
4962
|
J as e,
|
|
4910
|
-
|
|
4911
|
-
|
|
4963
|
+
zs as f,
|
|
4964
|
+
io as g,
|
|
4912
4965
|
Z as h,
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4966
|
+
le as i,
|
|
4967
|
+
At as j,
|
|
4968
|
+
Os as k,
|
|
4916
4969
|
U as l,
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4970
|
+
Vs as m,
|
|
4971
|
+
De as n,
|
|
4972
|
+
Yt as o,
|
|
4973
|
+
Le as p,
|
|
4974
|
+
js as q,
|
|
4975
|
+
Qt as r,
|
|
4976
|
+
Hs as s,
|
|
4977
|
+
Ms as t,
|
|
4978
|
+
Ks as u,
|
|
4979
|
+
xn as v,
|
|
4980
|
+
Rs as w,
|
|
4981
|
+
An as x,
|
|
4982
|
+
ge as y,
|
|
4983
|
+
Us as z
|
|
4931
4984
|
};
|