@builder.io/sdk-vue 3.0.0 → 3.0.2
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-XqdWIlSd.cjs → awaiter-Go_v9R-Q.cjs} +1 -1
- package/lib/browser/{awaiter-pA1AuJSn.js → awaiter-f2v25MXG.js} +1 -1
- package/lib/browser/{block-styles-i6cpfJgi.cjs → block-styles-VvtOwAna.cjs} +1 -1
- package/lib/browser/{block-styles-ytvCIXMJ.js → block-styles-zLkeE8Yo.js} +1 -1
- package/lib/browser/{block-wrapper-UdxI8OCZ.js → block-wrapper-RHvSza0L.js} +3 -3
- package/lib/browser/{block-wrapper-4Ddr9Ro1.cjs → block-wrapper-W_D_Bb2d.cjs} +1 -1
- package/lib/browser/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/browser/blocks/text/text.vue.d.ts +1 -6
- package/lib/browser/{component-ref-1UbPu9gf.cjs → component-ref-OuSuLJu3.cjs} +1 -1
- package/lib/browser/{component-ref-CKlhzm4D.js → component-ref-QZVWIf-w.js} +3 -3
- package/lib/browser/components/block/block.helpers.d.ts +4 -3
- package/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +2 -2
- 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/get-block-component-options.d.ts +2 -1
- package/lib/browser/functions/get-processed-block.d.ts +1 -6
- package/lib/browser/functions/traverse.d.ts +34 -0
- package/lib/browser/{get-block-properties-pUTK7jyd.cjs → get-block-properties-COMGTr9K.cjs} +1 -1
- package/lib/browser/{get-block-properties-C5uVrmU3.js → get-block-properties-IUSNX0SS.js} +1 -1
- package/lib/browser/helpers/flatten.d.ts +6 -0
- package/lib/browser/index-M-gfkd7t.cjs +166 -0
- package/lib/browser/{index-tDGIvfSj.js → index-mAw516k1.js} +969 -887
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{repeated-block-9RoptQEu.js → repeated-block-9wsw76F2.js} +2 -2
- package/lib/browser/{repeated-block-h7zSwvTu.cjs → repeated-block-nE8lZjb_.cjs} +1 -1
- package/lib/browser/server-index.d.ts +1 -1
- package/lib/browser/style.css +1 -1
- package/lib/browser/types/components.d.ts +3 -0
- package/lib/edge/{awaiter-yLbJL6E0.js → awaiter-4_rv9wh9.js} +1 -1
- package/lib/edge/{awaiter-V9rb_a7Q.cjs → awaiter-e1RaAwPG.cjs} +1 -1
- package/lib/edge/{block-styles-ZvyyqPxg.cjs → block-styles-83ja5Ixf.cjs} +1 -1
- package/lib/edge/{block-styles-8rJVuUSs.js → block-styles-KCVLt7eI.js} +1 -1
- package/lib/edge/{block-wrapper-jr4gy0mp.js → block-wrapper-FpChCEPR.js} +3 -3
- package/lib/edge/{block-wrapper-m7_ZegT7.cjs → block-wrapper-z1tA6pLu.cjs} +1 -1
- package/lib/edge/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/edge/blocks/text/text.vue.d.ts +1 -6
- package/lib/edge/{component-ref-_qPvv-Qb.cjs → component-ref-hZs-PJf_.cjs} +1 -1
- package/lib/edge/{component-ref-uZEXLaN7.js → component-ref-oYtINbYY.js} +3 -3
- package/lib/edge/components/block/block.helpers.d.ts +4 -3
- package/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +2 -2
- 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/get-block-component-options.d.ts +2 -1
- package/lib/edge/functions/get-processed-block.d.ts +1 -6
- package/lib/edge/functions/traverse.d.ts +34 -0
- package/lib/edge/{get-block-properties-4gxUIMch.cjs → get-block-properties-WHU9TAQT.cjs} +1 -1
- package/lib/edge/{get-block-properties-IQuU2YJ7.js → get-block-properties-g6seSIll.js} +1 -1
- package/lib/edge/helpers/flatten.d.ts +6 -0
- package/lib/edge/index-Gb_tMZnR.cjs +184 -0
- package/lib/edge/{index-Qfd4FC6c.js → index-fTtKR2Pq.js} +1515 -1435
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{repeated-block-J3gmF8cW.js → repeated-block-_kwPuyY0.js} +2 -2
- package/lib/{node/repeated-block-sc5a_YJK.cjs → edge/repeated-block-o16gyhl8.cjs} +1 -1
- package/lib/edge/server-index.d.ts +1 -1
- package/lib/edge/style.css +1 -1
- package/lib/edge/types/components.d.ts +3 -0
- package/lib/node/{awaiter-pBLgVddK.cjs → awaiter-EKc5xDU7.cjs} +1 -1
- package/lib/node/{awaiter-yHq7zte0.js → awaiter-yTUISQzQ.js} +1 -1
- package/lib/node/{block-styles-JKmWb0f1.cjs → block-styles-KsyPudvY.cjs} +1 -1
- package/lib/node/{block-styles-UKsSQRSe.js → block-styles-Z4CBN1bX.js} +1 -1
- package/lib/node/{block-wrapper-Ql9JBZTu.js → block-wrapper-KpJ-EQWT.js} +3 -3
- package/lib/node/{block-wrapper-UkD5beND.cjs → block-wrapper-wfmJ-Is8.cjs} +1 -1
- package/lib/node/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/node/blocks/text/text.vue.d.ts +1 -6
- package/lib/node/{component-ref-GQuqlfCd.js → component-ref-PIZE59-x.js} +3 -3
- package/lib/node/{component-ref-KSw6L492.cjs → component-ref-dZr5pqVw.cjs} +1 -1
- package/lib/node/components/block/block.helpers.d.ts +4 -3
- package/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +2 -2
- 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/get-block-component-options.d.ts +2 -1
- package/lib/node/functions/get-processed-block.d.ts +1 -6
- package/lib/node/functions/traverse.d.ts +34 -0
- package/lib/node/{get-block-properties-RPZW1-a0.cjs → get-block-properties-XFifmVHz.cjs} +1 -1
- package/lib/node/{get-block-properties-y-gYAn-I.js → get-block-properties-YmWkYu_d.js} +1 -1
- package/lib/node/helpers/flatten.d.ts +6 -0
- package/lib/node/{index-5bUk_uLu.js → index-PmCPg9YL.js} +901 -819
- package/lib/node/index-_D8PBs-1.cjs +166 -0
- 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-p1vrucwi.cjs} +1 -1
- package/lib/node/{repeated-block-_Z2mgv3f.js → repeated-block-qSSzvRZP.js} +2 -2
- package/lib/node/server-index.d.ts +1 -1
- 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
|
|
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 K, mergeProps as C, toHandlers as B, withCtx as N, renderSlot as x, resolveComponent as k, createTextVNode as bt, toDisplayString as te, defineAsyncComponent as j, createVNode as R, renderList as V, createCommentVNode as v, h as Ve, createElementVNode as z, normalizeStyle as D, normalizeClass as G, markRaw as gt } from "vue";
|
|
2
|
+
import { T as E, g as yt, f as kt, i as $, s as vt, r as St, p as Ct, a as Tt, l as A, b as We, c as pe, d as wt, n as Ne, 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,14 +23,14 @@ const Tt = b({
|
|
|
23
23
|
n[o] = r;
|
|
24
24
|
return n;
|
|
25
25
|
};
|
|
26
|
-
function
|
|
27
|
-
return e.isEmptyElement(e.TagName) ? (c(), y(
|
|
28
|
-
typeof e.TagName == "string" ? (c(), y(
|
|
26
|
+
function Pt(e, t, n, o, r, s) {
|
|
27
|
+
return e.isEmptyElement(e.TagName) ? (c(), y(K(e.TagName), C({ key: 1 }, e.attributes, B(e.actionAttributes)), null, 16)) : (c(), p(w, { key: 0 }, [
|
|
28
|
+
typeof e.TagName == "string" ? (c(), y(K(e.TagName), C({ key: 0 }, e.attributes, B(e.actionAttributes)), {
|
|
29
29
|
default: N(() => [
|
|
30
30
|
x(e.$slots, "default")
|
|
31
31
|
]),
|
|
32
32
|
_: 3
|
|
33
|
-
}, 16)) : (c(), y(
|
|
33
|
+
}, 16)) : (c(), y(K(e.TagName), C({ key: 1 }, e.attributes, B(e.actionAttributes)), {
|
|
34
34
|
default: N(() => [
|
|
35
35
|
x(e.$slots, "default")
|
|
36
36
|
]),
|
|
@@ -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]]), Ks = /* @__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,85 +110,72 @@ 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(), Fe = {
|
|
117
118
|
Components: { registeredComponents: {} },
|
|
118
|
-
key:
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
var t;
|
|
122
|
-
return {
|
|
123
|
-
...(t = e.component) == null ? void 0 : t.options,
|
|
124
|
-
...e.options
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
function xt(e, ...t) {
|
|
128
|
-
const n = Object.assign({}, e);
|
|
129
|
-
for (const o of t)
|
|
130
|
-
delete n[o];
|
|
131
|
-
return n;
|
|
132
|
-
}
|
|
133
|
-
const We = (e, t, n) => {
|
|
134
|
-
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r, i) => r != null ? r[i] : r, e);
|
|
119
|
+
key: Wt
|
|
120
|
+
}, De = (e, t, n) => {
|
|
121
|
+
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r, s) => r != null ? r[s] : r, e);
|
|
135
122
|
return o === void 0 || o === e ? n : o;
|
|
136
|
-
},
|
|
123
|
+
}, Nt = ({
|
|
137
124
|
code: e,
|
|
138
125
|
builder: t,
|
|
139
126
|
context: n,
|
|
140
127
|
event: o,
|
|
141
128
|
localState: r,
|
|
142
|
-
rootSetState:
|
|
143
|
-
rootState:
|
|
129
|
+
rootSetState: s,
|
|
130
|
+
rootState: i
|
|
144
131
|
}) => {
|
|
145
|
-
const l =
|
|
132
|
+
const l = yt({
|
|
146
133
|
builder: t,
|
|
147
134
|
context: n,
|
|
148
135
|
event: o,
|
|
149
|
-
state:
|
|
150
|
-
rootState:
|
|
136
|
+
state: kt({
|
|
137
|
+
rootState: i,
|
|
151
138
|
localState: r,
|
|
152
|
-
rootSetState:
|
|
139
|
+
rootSetState: s
|
|
153
140
|
})
|
|
154
141
|
});
|
|
155
142
|
return new Function(...l.map(([a]) => a), e)(...l.map(([, a]) => a));
|
|
156
|
-
},
|
|
143
|
+
}, Ft = (e) => $() || vt({
|
|
157
144
|
shouldLogWarning: !0
|
|
158
|
-
}) ?
|
|
159
|
-
var t, n, o, r,
|
|
160
|
-
return ((o = (n = (t =
|
|
145
|
+
}) ? Nt(e) : St(e), Dt = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, Ot = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, Lt = (e) => {
|
|
146
|
+
var t, n, o, r, s, i;
|
|
147
|
+
return ((o = (n = (t = Dt.exec(e.trim())) == null ? void 0 : t.groups) == null ? void 0 : n.getPath) == null ? void 0 : o.slice(1)) || ((i = (s = (r = Ot.exec(e.trim())) == null ? void 0 : r.groups) == null ? void 0 : s.getPath) == null ? void 0 : i.slice(1));
|
|
161
148
|
};
|
|
162
|
-
function
|
|
149
|
+
function Y({
|
|
163
150
|
code: e,
|
|
164
151
|
context: t,
|
|
165
152
|
localState: n,
|
|
166
153
|
rootState: o,
|
|
167
154
|
rootSetState: r,
|
|
168
|
-
event:
|
|
169
|
-
isExpression:
|
|
155
|
+
event: s,
|
|
156
|
+
isExpression: i = !0
|
|
170
157
|
}) {
|
|
171
158
|
if (e.trim() === "")
|
|
172
159
|
return;
|
|
173
|
-
const l =
|
|
160
|
+
const l = Lt(e.trim());
|
|
174
161
|
if (l)
|
|
175
|
-
return
|
|
162
|
+
return De({
|
|
176
163
|
...o,
|
|
177
164
|
...n
|
|
178
165
|
}, l);
|
|
179
166
|
const a = {
|
|
180
|
-
code:
|
|
181
|
-
isExpression:
|
|
167
|
+
code: Ct(e, {
|
|
168
|
+
isExpression: i
|
|
182
169
|
}),
|
|
183
|
-
builder:
|
|
170
|
+
builder: Tt(),
|
|
184
171
|
context: t,
|
|
185
|
-
event:
|
|
172
|
+
event: s,
|
|
186
173
|
rootSetState: r,
|
|
187
174
|
rootState: o,
|
|
188
175
|
localState: n
|
|
189
176
|
};
|
|
190
177
|
try {
|
|
191
|
-
return
|
|
178
|
+
return Ft(a);
|
|
192
179
|
} catch (u) {
|
|
193
180
|
A.error("Failed code evaluation: " + u.message, {
|
|
194
181
|
code: e
|
|
@@ -196,21 +183,89 @@ function J({
|
|
|
196
183
|
return;
|
|
197
184
|
}
|
|
198
185
|
}
|
|
199
|
-
function
|
|
186
|
+
function Ut(e, t) {
|
|
187
|
+
var n;
|
|
188
|
+
return {
|
|
189
|
+
...(n = e.component) == null ? void 0 : n.options,
|
|
190
|
+
...e.options,
|
|
191
|
+
...Ht(e, t)
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
const Ht = (e, t) => {
|
|
195
|
+
var n, o;
|
|
196
|
+
if (((n = e.component) == null ? void 0 : n.name) === "Text" && ((o = e.component.options) != null && o.text) && typeof e.component.options.text == "string")
|
|
197
|
+
return {
|
|
198
|
+
...e.component.options,
|
|
199
|
+
text: e.component.options.text.replace(/{{([^}]+)}}/g, (r, s) => Y({
|
|
200
|
+
code: s,
|
|
201
|
+
context: t,
|
|
202
|
+
localState: t.localState,
|
|
203
|
+
rootState: t.rootState,
|
|
204
|
+
rootSetState: t.rootSetState
|
|
205
|
+
}))
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
function Mt(e, ...t) {
|
|
209
|
+
const n = Object.assign({}, e);
|
|
210
|
+
for (const o of t)
|
|
211
|
+
delete n[o];
|
|
212
|
+
return n;
|
|
213
|
+
}
|
|
214
|
+
function _(e, t, n = null, o = null, r = /* @__PURE__ */ new WeakSet()) {
|
|
215
|
+
if (e == null || typeof e != "object") {
|
|
216
|
+
t(e, (s) => {
|
|
217
|
+
n !== null && o !== null && (n[o] = s);
|
|
218
|
+
});
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
r.has(e) || (r.add(e), Array.isArray(e) ? e.forEach((s, i) => {
|
|
222
|
+
t(s, (a) => {
|
|
223
|
+
e[i] = a;
|
|
224
|
+
}), _(s, t, e, i, r);
|
|
225
|
+
}) : Object.entries(e).forEach(([s, i]) => {
|
|
226
|
+
t(i, (a) => {
|
|
227
|
+
e[s] = a;
|
|
228
|
+
}), _(i, t, e, s, r);
|
|
229
|
+
}));
|
|
230
|
+
}
|
|
231
|
+
function Oe(e) {
|
|
232
|
+
return e && typeof e == "object" && e["@type"] === "@builder.io/core:LocalizedValue";
|
|
233
|
+
}
|
|
234
|
+
function jt(e) {
|
|
235
|
+
if (!e || !Object.getOwnPropertyNames(e).length)
|
|
236
|
+
return !1;
|
|
237
|
+
let t = !1;
|
|
238
|
+
return _(e, (n) => {
|
|
239
|
+
if (Oe(n)) {
|
|
240
|
+
t = !0;
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
}), t;
|
|
244
|
+
}
|
|
245
|
+
function Kt(e, t) {
|
|
246
|
+
return !e || !Object.getOwnPropertyNames(e).length ? {} : (_(e, (n, o) => {
|
|
247
|
+
Oe(n) && o(n[t] ?? void 0);
|
|
248
|
+
}), e);
|
|
249
|
+
}
|
|
250
|
+
function qt(e, t) {
|
|
251
|
+
var n, o;
|
|
252
|
+
return (n = e.component) != null && n.options && jt((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 = Kt(e.component.options, t ?? "Default")), e;
|
|
253
|
+
}
|
|
254
|
+
function ce(e) {
|
|
200
255
|
if (e === null || typeof e != "object")
|
|
201
256
|
return e;
|
|
202
257
|
if (Array.isArray(e))
|
|
203
|
-
return e.map((n) =>
|
|
258
|
+
return e.map((n) => ce(n));
|
|
204
259
|
if (e["@type"] === "@builder.io/sdk:Element")
|
|
205
260
|
return e;
|
|
206
261
|
const t = {};
|
|
207
262
|
for (const n in e)
|
|
208
|
-
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
263
|
+
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = ce(e[n]));
|
|
209
264
|
return t;
|
|
210
265
|
}
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
213
|
-
const t =
|
|
266
|
+
const zt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Gt = (e) => {
|
|
267
|
+
if (zt) {
|
|
268
|
+
const t = pe(e);
|
|
214
269
|
return {
|
|
215
270
|
...t,
|
|
216
271
|
properties: {
|
|
@@ -221,7 +276,7 @@ const Dt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Ot = (e) =
|
|
|
221
276
|
}
|
|
222
277
|
};
|
|
223
278
|
} else {
|
|
224
|
-
const t =
|
|
279
|
+
const t = ce(Mt(e, "children", "meta"));
|
|
225
280
|
return {
|
|
226
281
|
...t,
|
|
227
282
|
properties: {
|
|
@@ -234,7 +289,7 @@ const Dt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Ot = (e) =
|
|
|
234
289
|
meta: e.meta
|
|
235
290
|
};
|
|
236
291
|
}
|
|
237
|
-
},
|
|
292
|
+
}, Jt = ({
|
|
238
293
|
block: e,
|
|
239
294
|
context: t,
|
|
240
295
|
localState: n,
|
|
@@ -243,55 +298,54 @@ const Dt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Ot = (e) =
|
|
|
243
298
|
}) => {
|
|
244
299
|
if (!e.bindings)
|
|
245
300
|
return e;
|
|
246
|
-
const
|
|
247
|
-
for (const
|
|
248
|
-
const l = e.bindings[
|
|
301
|
+
const s = Gt(e);
|
|
302
|
+
for (const i in e.bindings) {
|
|
303
|
+
const l = e.bindings[i], a = Y({
|
|
249
304
|
code: l,
|
|
250
305
|
localState: n,
|
|
251
306
|
rootState: o,
|
|
252
307
|
rootSetState: r,
|
|
253
308
|
context: t
|
|
254
309
|
});
|
|
255
|
-
|
|
310
|
+
We(s, i, a);
|
|
256
311
|
}
|
|
257
|
-
return
|
|
312
|
+
return s;
|
|
258
313
|
};
|
|
259
|
-
function
|
|
314
|
+
function Yt({
|
|
260
315
|
block: e,
|
|
261
316
|
context: t,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
rootSetState: i
|
|
317
|
+
localState: n,
|
|
318
|
+
rootState: o,
|
|
319
|
+
rootSetState: r
|
|
266
320
|
}) {
|
|
267
|
-
|
|
268
|
-
return
|
|
321
|
+
let s = qt(e, o.locale);
|
|
322
|
+
return s = s, Jt({
|
|
269
323
|
block: s,
|
|
270
|
-
localState:
|
|
271
|
-
rootState:
|
|
272
|
-
rootSetState:
|
|
324
|
+
localState: n,
|
|
325
|
+
rootState: o,
|
|
326
|
+
rootSetState: r,
|
|
273
327
|
context: t
|
|
274
|
-
})
|
|
328
|
+
});
|
|
275
329
|
}
|
|
276
|
-
function
|
|
277
|
-
const t = e || (
|
|
278
|
-
return t ?
|
|
330
|
+
function Le(e) {
|
|
331
|
+
const t = e || ($() ? window.location.search : void 0);
|
|
332
|
+
return t ? wt(t).indexOf("builder.preview=") !== -1 : !1;
|
|
279
333
|
}
|
|
280
|
-
const
|
|
334
|
+
const Xt = (e) => ({
|
|
281
335
|
type: "builder.registerComponent",
|
|
282
|
-
data:
|
|
283
|
-
}),
|
|
336
|
+
data: ee(e)
|
|
337
|
+
}), Qt = (e) => {
|
|
284
338
|
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)`;
|
|
339
|
+
return `return (${!t.startsWith("function") && !t.startsWith("async") && !t.startsWith("(") && !n ? "function " : ""}${t}).apply(this, arguments)`;
|
|
286
340
|
};
|
|
287
|
-
function
|
|
288
|
-
return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ?
|
|
341
|
+
function ee(e) {
|
|
342
|
+
return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ? Qt(n) : n));
|
|
289
343
|
}
|
|
290
|
-
const
|
|
291
|
-
function
|
|
292
|
-
e === "plugin" && (t =
|
|
293
|
-
let n =
|
|
294
|
-
if (n || (n =
|
|
344
|
+
const we = {};
|
|
345
|
+
function Zt(e, t) {
|
|
346
|
+
e === "plugin" && (t = ee(t));
|
|
347
|
+
let n = we[e];
|
|
348
|
+
if (n || (n = we[e] = []), n.push(t), $()) {
|
|
295
349
|
const o = {
|
|
296
350
|
type: "builder.register",
|
|
297
351
|
data: {
|
|
@@ -306,42 +360,42 @@ function Kt(e, t) {
|
|
|
306
360
|
}
|
|
307
361
|
}
|
|
308
362
|
}
|
|
309
|
-
const
|
|
310
|
-
function
|
|
311
|
-
if (
|
|
312
|
-
Object.assign(
|
|
363
|
+
const Ie = {};
|
|
364
|
+
function qs(e) {
|
|
365
|
+
if ($()) {
|
|
366
|
+
Object.assign(Ie, e);
|
|
313
367
|
const t = {
|
|
314
368
|
type: "builder.settingsChange",
|
|
315
|
-
data:
|
|
369
|
+
data: Ie
|
|
316
370
|
};
|
|
317
371
|
parent.postMessage(t, "*");
|
|
318
372
|
}
|
|
319
373
|
}
|
|
320
|
-
const
|
|
374
|
+
const $e = "builder.", _t = "options.", Ue = (e) => {
|
|
321
375
|
if (!e)
|
|
322
376
|
return {};
|
|
323
|
-
const t =
|
|
377
|
+
const t = Ne(e), n = {};
|
|
324
378
|
return Object.keys(t).forEach((o) => {
|
|
325
|
-
if (o.startsWith(
|
|
326
|
-
const r = o.replace(
|
|
379
|
+
if (o.startsWith($e)) {
|
|
380
|
+
const r = o.replace($e, "").replace(_t, "");
|
|
327
381
|
n[r] = t[o];
|
|
328
382
|
}
|
|
329
383
|
}), n;
|
|
330
|
-
},
|
|
331
|
-
if (
|
|
384
|
+
}, en = () => {
|
|
385
|
+
if (!$())
|
|
332
386
|
return {};
|
|
333
387
|
const e = new URLSearchParams(window.location.search);
|
|
334
|
-
return
|
|
335
|
-
},
|
|
388
|
+
return Ue(e);
|
|
389
|
+
}, He = "3.0.2", Me = () => ({
|
|
336
390
|
"X-Builder-SDK": E,
|
|
337
391
|
"X-Builder-SDK-GEN": "2",
|
|
338
|
-
"X-Builder-SDK-Version":
|
|
339
|
-
}),
|
|
392
|
+
"X-Builder-SDK-Version": He
|
|
393
|
+
}), tn = (e) => {
|
|
340
394
|
if (e === "localhost" || e === "127.0.0.1")
|
|
341
395
|
return e;
|
|
342
396
|
const t = e.split(".");
|
|
343
397
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
344
|
-
},
|
|
398
|
+
}, je = ({
|
|
345
399
|
name: e,
|
|
346
400
|
canTrack: t
|
|
347
401
|
}) => {
|
|
@@ -352,14 +406,14 @@ const Te = "builder.", qt = "options.", Ne = (e) => {
|
|
|
352
406
|
A.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
353
407
|
return;
|
|
354
408
|
}
|
|
355
|
-
},
|
|
409
|
+
}, Ke = async (e) => je(e), nn = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(L).join("; "), on = [["secure", ""], ["SameSite", "None"]], rn = ({
|
|
356
410
|
name: e,
|
|
357
411
|
value: t,
|
|
358
412
|
expires: n
|
|
359
413
|
}) => {
|
|
360
|
-
const r = (
|
|
361
|
-
return
|
|
362
|
-
},
|
|
414
|
+
const r = ($() ? location.protocol === "https:" : !0) ? on : [[]], s = n ? [["expires", n.toUTCString()]] : [[]], i = [[e, t], ...s, ["path", "/"], ["domain", tn(window.location.hostname)], ...r];
|
|
415
|
+
return nn(i);
|
|
416
|
+
}, qe = async ({
|
|
363
417
|
name: e,
|
|
364
418
|
value: t,
|
|
365
419
|
expires: n,
|
|
@@ -368,7 +422,7 @@ const Te = "builder.", qt = "options.", Ne = (e) => {
|
|
|
368
422
|
try {
|
|
369
423
|
if (!o)
|
|
370
424
|
return;
|
|
371
|
-
const r =
|
|
425
|
+
const r = rn({
|
|
372
426
|
name: e,
|
|
373
427
|
value: t,
|
|
374
428
|
expires: n
|
|
@@ -378,93 +432,93 @@ const Te = "builder.", qt = "options.", Ne = (e) => {
|
|
|
378
432
|
A.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
|
|
379
433
|
}
|
|
380
434
|
};
|
|
381
|
-
function
|
|
435
|
+
function sn() {
|
|
382
436
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
383
437
|
const t = Math.random() * 16 | 0;
|
|
384
438
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
385
439
|
});
|
|
386
440
|
}
|
|
387
|
-
function
|
|
388
|
-
return
|
|
441
|
+
function ze() {
|
|
442
|
+
return sn().replace(/-/g, "");
|
|
389
443
|
}
|
|
390
|
-
const
|
|
444
|
+
const Ge = "builderSessionId", an = async ({
|
|
391
445
|
canTrack: e
|
|
392
446
|
}) => {
|
|
393
447
|
if (!e)
|
|
394
448
|
return;
|
|
395
|
-
const t = await
|
|
396
|
-
name:
|
|
449
|
+
const t = await Ke({
|
|
450
|
+
name: Ge,
|
|
397
451
|
canTrack: e
|
|
398
452
|
});
|
|
399
453
|
if (L(t))
|
|
400
454
|
return t;
|
|
401
455
|
{
|
|
402
|
-
const n =
|
|
403
|
-
return
|
|
456
|
+
const n = ln();
|
|
457
|
+
return cn({
|
|
404
458
|
id: n,
|
|
405
459
|
canTrack: e
|
|
406
460
|
}), n;
|
|
407
461
|
}
|
|
408
|
-
},
|
|
462
|
+
}, ln = () => ze(), cn = ({
|
|
409
463
|
id: e,
|
|
410
464
|
canTrack: t
|
|
411
|
-
}) =>
|
|
412
|
-
name:
|
|
465
|
+
}) => qe({
|
|
466
|
+
name: Ge,
|
|
413
467
|
value: e,
|
|
414
468
|
canTrack: t
|
|
415
|
-
}),
|
|
469
|
+
}), Je = () => $() && typeof localStorage < "u" ? localStorage : void 0, dn = ({
|
|
416
470
|
key: e,
|
|
417
471
|
canTrack: t
|
|
418
472
|
}) => {
|
|
419
473
|
var n;
|
|
420
474
|
try {
|
|
421
|
-
return t ? (n =
|
|
475
|
+
return t ? (n = Je()) == null ? void 0 : n.getItem(e) : void 0;
|
|
422
476
|
} catch (o) {
|
|
423
477
|
console.debug("[LocalStorage] GET error: ", o);
|
|
424
478
|
return;
|
|
425
479
|
}
|
|
426
|
-
},
|
|
480
|
+
}, un = ({
|
|
427
481
|
key: e,
|
|
428
482
|
canTrack: t,
|
|
429
483
|
value: n
|
|
430
484
|
}) => {
|
|
431
485
|
var o;
|
|
432
486
|
try {
|
|
433
|
-
t && ((o =
|
|
487
|
+
t && ((o = Je()) == null || o.setItem(e, n));
|
|
434
488
|
} catch (r) {
|
|
435
489
|
console.debug("[LocalStorage] SET error: ", r);
|
|
436
490
|
}
|
|
437
|
-
},
|
|
491
|
+
}, Ye = "builderVisitorId", pn = ({
|
|
438
492
|
canTrack: e
|
|
439
493
|
}) => {
|
|
440
494
|
if (!e)
|
|
441
495
|
return;
|
|
442
|
-
const t =
|
|
443
|
-
key:
|
|
496
|
+
const t = dn({
|
|
497
|
+
key: Ye,
|
|
444
498
|
canTrack: e
|
|
445
499
|
});
|
|
446
500
|
if (L(t))
|
|
447
501
|
return t;
|
|
448
502
|
{
|
|
449
|
-
const n =
|
|
450
|
-
return
|
|
503
|
+
const n = mn();
|
|
504
|
+
return hn({
|
|
451
505
|
id: n,
|
|
452
506
|
canTrack: e
|
|
453
507
|
}), n;
|
|
454
508
|
}
|
|
455
|
-
},
|
|
509
|
+
}, mn = () => ze(), hn = ({
|
|
456
510
|
id: e,
|
|
457
511
|
canTrack: t
|
|
458
|
-
}) =>
|
|
459
|
-
key:
|
|
512
|
+
}) => un({
|
|
513
|
+
key: Ye,
|
|
460
514
|
value: e,
|
|
461
515
|
canTrack: t
|
|
462
516
|
});
|
|
463
|
-
function
|
|
517
|
+
function he(e) {
|
|
464
518
|
var t;
|
|
465
519
|
typeof process < "u" && ((t = process.env) != null && t.DEBUG) && String(process.env.DEBUG) == "true" && A.log(e);
|
|
466
520
|
}
|
|
467
|
-
const
|
|
521
|
+
const fn = async ({
|
|
468
522
|
canTrack: e
|
|
469
523
|
}) => {
|
|
470
524
|
if (!e)
|
|
@@ -472,16 +526,16 @@ const an = async ({
|
|
|
472
526
|
visitorId: void 0,
|
|
473
527
|
sessionId: void 0
|
|
474
528
|
};
|
|
475
|
-
const t = await
|
|
529
|
+
const t = await an({
|
|
476
530
|
canTrack: e
|
|
477
|
-
}), n =
|
|
531
|
+
}), n = pn({
|
|
478
532
|
canTrack: e
|
|
479
533
|
});
|
|
480
534
|
return {
|
|
481
535
|
sessionId: t,
|
|
482
536
|
visitorId: n
|
|
483
537
|
};
|
|
484
|
-
},
|
|
538
|
+
}, bn = async ({
|
|
485
539
|
type: e,
|
|
486
540
|
canTrack: t,
|
|
487
541
|
apiKey: n,
|
|
@@ -495,14 +549,14 @@ const an = async ({
|
|
|
495
549
|
url: location.href,
|
|
496
550
|
...o
|
|
497
551
|
},
|
|
498
|
-
...await
|
|
552
|
+
...await fn({
|
|
499
553
|
canTrack: t
|
|
500
554
|
}),
|
|
501
|
-
userAttributes:
|
|
555
|
+
userAttributes: It(),
|
|
502
556
|
ownerId: n
|
|
503
557
|
}
|
|
504
558
|
});
|
|
505
|
-
async function
|
|
559
|
+
async function de({
|
|
506
560
|
apiHost: e,
|
|
507
561
|
...t
|
|
508
562
|
}) {
|
|
@@ -510,35 +564,35 @@ async function ce({
|
|
|
510
564
|
A.error("Missing API key for track call. Please provide your API key.");
|
|
511
565
|
return;
|
|
512
566
|
}
|
|
513
|
-
if (!t.canTrack || P() || !(
|
|
567
|
+
if (!t.canTrack || P() || !($() || E === "reactNative"))
|
|
514
568
|
return;
|
|
515
569
|
const o = `${e || "https://cdn.builder.io"}/api/v1/track`;
|
|
516
|
-
return
|
|
570
|
+
return he(o), fetch(o, {
|
|
517
571
|
method: "POST",
|
|
518
572
|
body: JSON.stringify({
|
|
519
|
-
events: [await
|
|
573
|
+
events: [await bn(t)]
|
|
520
574
|
}),
|
|
521
575
|
headers: {
|
|
522
576
|
"content-type": "application/json",
|
|
523
|
-
...
|
|
577
|
+
...Me()
|
|
524
578
|
},
|
|
525
579
|
mode: "cors"
|
|
526
580
|
}).catch((r) => {
|
|
527
581
|
console.error("Failed to track: ", r);
|
|
528
582
|
});
|
|
529
583
|
}
|
|
530
|
-
const
|
|
584
|
+
const zs = (e) => de({
|
|
531
585
|
...e,
|
|
532
586
|
canTrack: !0
|
|
533
|
-
}),
|
|
534
|
-
function
|
|
587
|
+
}), gn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
588
|
+
function Xe(e, t) {
|
|
535
589
|
if (!t.origin.startsWith("http") && !t.origin.startsWith("https"))
|
|
536
590
|
return !1;
|
|
537
591
|
const n = new URL(t.origin), o = n.hostname;
|
|
538
|
-
return (e ||
|
|
592
|
+
return (e || gn).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
539
593
|
}
|
|
540
|
-
const
|
|
541
|
-
|
|
594
|
+
const yn = () => {
|
|
595
|
+
Zt("insertMenu", {
|
|
542
596
|
name: "_default",
|
|
543
597
|
default: !0,
|
|
544
598
|
items: [{
|
|
@@ -560,14 +614,14 @@ const dn = () => {
|
|
|
560
614
|
}]
|
|
561
615
|
});
|
|
562
616
|
};
|
|
563
|
-
let
|
|
564
|
-
const
|
|
617
|
+
let Re = !1;
|
|
618
|
+
const Qe = (e = {}) => {
|
|
565
619
|
var t, n;
|
|
566
|
-
|
|
620
|
+
Re || (Re = !0, $() && ((t = window.parent) == null || t.postMessage({
|
|
567
621
|
type: "builder.sdkInfo",
|
|
568
622
|
data: {
|
|
569
623
|
target: E,
|
|
570
|
-
version:
|
|
624
|
+
version: He,
|
|
571
625
|
supportsPatchUpdates: !1,
|
|
572
626
|
// Supports builder-model="..." attribute which is needed to
|
|
573
627
|
// scope our '+ add block' button styling
|
|
@@ -580,8 +634,8 @@ const ze = (e = {}) => {
|
|
|
580
634
|
options: e
|
|
581
635
|
}
|
|
582
636
|
}, "*"), window.addEventListener("message", (o) => {
|
|
583
|
-
var
|
|
584
|
-
if (!
|
|
637
|
+
var s, i;
|
|
638
|
+
if (!Xe(e.trustedHosts, o))
|
|
585
639
|
return;
|
|
586
640
|
const {
|
|
587
641
|
data: r
|
|
@@ -596,7 +650,7 @@ const ze = (e = {}) => {
|
|
|
596
650
|
} catch (f) {
|
|
597
651
|
d = f;
|
|
598
652
|
}
|
|
599
|
-
d ? (
|
|
653
|
+
d ? (s = window.parent) == null || s.postMessage({
|
|
600
654
|
type: "builder.evaluateError",
|
|
601
655
|
data: {
|
|
602
656
|
id: u,
|
|
@@ -611,7 +665,7 @@ const ze = (e = {}) => {
|
|
|
611
665
|
result: f
|
|
612
666
|
}
|
|
613
667
|
}, "*");
|
|
614
|
-
}).catch(console.error) : (
|
|
668
|
+
}).catch(console.error) : (i = window.parent) == null || i.postMessage({
|
|
615
669
|
type: "builder.evaluateResult",
|
|
616
670
|
data: {
|
|
617
671
|
result: h,
|
|
@@ -622,12 +676,12 @@ const ze = (e = {}) => {
|
|
|
622
676
|
}
|
|
623
677
|
}
|
|
624
678
|
})));
|
|
625
|
-
},
|
|
679
|
+
}, Ze = ({
|
|
626
680
|
model: e,
|
|
627
681
|
trustedHosts: t,
|
|
628
682
|
callbacks: n
|
|
629
683
|
}) => (o) => {
|
|
630
|
-
if (!
|
|
684
|
+
if (!Xe(t, o))
|
|
631
685
|
return;
|
|
632
686
|
const {
|
|
633
687
|
data: r
|
|
@@ -643,17 +697,17 @@ const ze = (e = {}) => {
|
|
|
643
697
|
break;
|
|
644
698
|
}
|
|
645
699
|
case "builder.contentUpdate": {
|
|
646
|
-
const
|
|
647
|
-
|
|
700
|
+
const s = r.data, i = s.key || s.alias || s.entry || s.modelName, l = s.data;
|
|
701
|
+
i === e && n.contentUpdate(l);
|
|
648
702
|
break;
|
|
649
703
|
}
|
|
650
704
|
}
|
|
651
|
-
},
|
|
652
|
-
if (
|
|
705
|
+
}, Gs = (e, t, n) => {
|
|
706
|
+
if (!$)
|
|
653
707
|
return A.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
654
708
|
};
|
|
655
|
-
|
|
656
|
-
const o =
|
|
709
|
+
Qe();
|
|
710
|
+
const o = Ze({
|
|
657
711
|
callbacks: {
|
|
658
712
|
contentUpdate: t,
|
|
659
713
|
animation: () => {
|
|
@@ -667,45 +721,45 @@ const ze = (e = {}) => {
|
|
|
667
721
|
return window.addEventListener("message", o), () => {
|
|
668
722
|
window.removeEventListener("message", o);
|
|
669
723
|
};
|
|
670
|
-
},
|
|
724
|
+
}, kn = "builder.tests", fe = (e) => `${kn}.${e}`, vn = ({
|
|
671
725
|
contentId: e
|
|
672
|
-
}) =>
|
|
673
|
-
name:
|
|
726
|
+
}) => Ke({
|
|
727
|
+
name: fe(e),
|
|
674
728
|
canTrack: !0
|
|
675
|
-
}),
|
|
729
|
+
}), Sn = ({
|
|
676
730
|
contentId: e
|
|
677
|
-
}) =>
|
|
678
|
-
name:
|
|
731
|
+
}) => je({
|
|
732
|
+
name: fe(e),
|
|
679
733
|
canTrack: !0
|
|
680
|
-
}),
|
|
734
|
+
}), Cn = ({
|
|
681
735
|
contentId: e,
|
|
682
736
|
value: t
|
|
683
|
-
}) =>
|
|
684
|
-
name:
|
|
737
|
+
}) => qe({
|
|
738
|
+
name: fe(e),
|
|
685
739
|
value: t,
|
|
686
740
|
canTrack: !0
|
|
687
|
-
}),
|
|
741
|
+
}), _e = (e) => L(e.id) && L(e.variations) && Object.keys(e.variations).length > 0, Tn = ({
|
|
688
742
|
id: e,
|
|
689
743
|
variations: t
|
|
690
744
|
}) => {
|
|
691
745
|
var r;
|
|
692
746
|
let n = 0;
|
|
693
747
|
const o = Math.random();
|
|
694
|
-
for (const
|
|
695
|
-
const
|
|
696
|
-
if (n +=
|
|
697
|
-
return
|
|
748
|
+
for (const s in t) {
|
|
749
|
+
const i = (r = t[s]) == null ? void 0 : r.testRatio;
|
|
750
|
+
if (n += i, o < n)
|
|
751
|
+
return s;
|
|
698
752
|
}
|
|
699
753
|
return e;
|
|
700
|
-
},
|
|
701
|
-
const t =
|
|
702
|
-
return
|
|
754
|
+
}, et = (e) => {
|
|
755
|
+
const t = Tn(e);
|
|
756
|
+
return Cn({
|
|
703
757
|
contentId: e.id,
|
|
704
758
|
value: t
|
|
705
759
|
}).catch((n) => {
|
|
706
760
|
A.error("could not store A/B test variation: ", n);
|
|
707
761
|
}), t;
|
|
708
|
-
},
|
|
762
|
+
}, tt = ({
|
|
709
763
|
item: e,
|
|
710
764
|
testGroupId: t
|
|
711
765
|
}) => {
|
|
@@ -719,7 +773,7 @@ const ze = (e = {}) => {
|
|
|
719
773
|
testVariationId: n.id,
|
|
720
774
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
721
775
|
};
|
|
722
|
-
},
|
|
776
|
+
}, wn = ({
|
|
723
777
|
item: e,
|
|
724
778
|
canTrack: t
|
|
725
779
|
}) => {
|
|
@@ -727,14 +781,14 @@ const ze = (e = {}) => {
|
|
|
727
781
|
return e;
|
|
728
782
|
if (!e)
|
|
729
783
|
return;
|
|
730
|
-
if (!
|
|
784
|
+
if (!_e(e))
|
|
731
785
|
return e;
|
|
732
|
-
const n =
|
|
786
|
+
const n = Sn({
|
|
733
787
|
contentId: e.id
|
|
734
|
-
}) ||
|
|
788
|
+
}) || et({
|
|
735
789
|
variations: e.variations,
|
|
736
790
|
id: e.id
|
|
737
|
-
}), o =
|
|
791
|
+
}), o = tt({
|
|
738
792
|
item: e,
|
|
739
793
|
testGroupId: n
|
|
740
794
|
});
|
|
@@ -742,18 +796,18 @@ const ze = (e = {}) => {
|
|
|
742
796
|
...e,
|
|
743
797
|
...o
|
|
744
798
|
};
|
|
745
|
-
},
|
|
799
|
+
}, In = async ({
|
|
746
800
|
item: e,
|
|
747
801
|
canTrack: t
|
|
748
802
|
}) => {
|
|
749
|
-
if (!t || !
|
|
803
|
+
if (!t || !_e(e))
|
|
750
804
|
return e;
|
|
751
|
-
const o = await
|
|
805
|
+
const o = await vn({
|
|
752
806
|
contentId: e.id
|
|
753
|
-
}) ||
|
|
807
|
+
}) || et({
|
|
754
808
|
variations: e.variations,
|
|
755
809
|
id: e.id
|
|
756
|
-
}), r =
|
|
810
|
+
}), r = tt({
|
|
757
811
|
item: e,
|
|
758
812
|
testGroupId: o
|
|
759
813
|
});
|
|
@@ -761,47 +815,59 @@ const ze = (e = {}) => {
|
|
|
761
815
|
...e,
|
|
762
816
|
...r
|
|
763
817
|
};
|
|
764
|
-
},
|
|
765
|
-
function
|
|
818
|
+
}, J = (e) => L(e) ? e : !0;
|
|
819
|
+
function $n() {
|
|
766
820
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
767
821
|
}
|
|
768
|
-
function
|
|
769
|
-
const e =
|
|
822
|
+
function Rn() {
|
|
823
|
+
const e = $n().fetch;
|
|
770
824
|
if (typeof e > "u")
|
|
771
825
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
772
826
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
773
827
|
return e;
|
|
774
828
|
}
|
|
775
|
-
const
|
|
776
|
-
function
|
|
829
|
+
const En = Rn();
|
|
830
|
+
function ue(e, t = null, n = ".") {
|
|
777
831
|
return Object.keys(e).reduce((o, r) => {
|
|
778
|
-
const
|
|
779
|
-
return [typeof
|
|
832
|
+
const s = e[r], i = [t, r].filter(Boolean).join(n);
|
|
833
|
+
return [typeof s == "object", s !== null, !(Array.isArray(s) && s.length === 0)].every(Boolean) ? {
|
|
780
834
|
...o,
|
|
781
|
-
...
|
|
835
|
+
...ue(s, i, n)
|
|
782
836
|
} : {
|
|
783
837
|
...o,
|
|
784
|
-
[
|
|
838
|
+
[i]: s
|
|
785
839
|
};
|
|
786
840
|
}, {});
|
|
787
841
|
}
|
|
788
|
-
function
|
|
842
|
+
function nt(e, t, n = {}) {
|
|
789
843
|
for (const o in e) {
|
|
790
|
-
const r = e[o],
|
|
791
|
-
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((
|
|
844
|
+
const r = e[o], s = t ? t + "." + o : o;
|
|
845
|
+
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((i) => i.startsWith("$")) ? nt(r, s, n) : n[s] = r;
|
|
792
846
|
}
|
|
793
847
|
return n;
|
|
794
848
|
}
|
|
795
|
-
|
|
849
|
+
function Pn(e) {
|
|
850
|
+
const t = {};
|
|
851
|
+
for (const n in e) {
|
|
852
|
+
const o = n.split(".");
|
|
853
|
+
let r = t;
|
|
854
|
+
for (let s = 0; s < o.length; s++) {
|
|
855
|
+
const i = o[s];
|
|
856
|
+
s === o.length - 1 ? r[i] = e[n] : (r[i] = r[i] || {}, r = r[i]);
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
return t;
|
|
860
|
+
}
|
|
861
|
+
const Bn = "v3", Ee = (e) => typeof e == "number" && !isNaN(e) && e >= 0, be = (e) => {
|
|
796
862
|
const {
|
|
797
863
|
limit: t = 30,
|
|
798
864
|
userAttributes: n,
|
|
799
865
|
query: o,
|
|
800
866
|
model: r,
|
|
801
|
-
apiKey:
|
|
802
|
-
enrich:
|
|
867
|
+
apiKey: s,
|
|
868
|
+
enrich: i,
|
|
803
869
|
locale: l,
|
|
804
|
-
apiVersion: a =
|
|
870
|
+
apiVersion: a = Bn,
|
|
805
871
|
fields: u,
|
|
806
872
|
omit: m,
|
|
807
873
|
offset: h,
|
|
@@ -811,65 +877,84 @@ const Sn = "v3", Ie = (e) => typeof e == "number" && !isNaN(e) && e >= 0, fe = (
|
|
|
811
877
|
includeUnpublished: T,
|
|
812
878
|
apiHost: O
|
|
813
879
|
} = e;
|
|
814
|
-
if (!
|
|
880
|
+
if (!s)
|
|
815
881
|
throw new Error("Missing API key");
|
|
816
882
|
if (!["v3"].includes(a))
|
|
817
883
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${a}'`);
|
|
818
|
-
const
|
|
819
|
-
I.searchParams.set("apiKey",
|
|
820
|
-
const
|
|
821
|
-
let
|
|
822
|
-
if (
|
|
823
|
-
locale:
|
|
824
|
-
...
|
|
825
|
-
}),
|
|
826
|
-
const F =
|
|
884
|
+
const ht = t !== 1, ft = O || "https://cdn.builder.io", I = new URL(`${ft}/api/${a}/content/${r}`);
|
|
885
|
+
I.searchParams.set("apiKey", s), I.searchParams.set("limit", String(t)), I.searchParams.set("noTraverse", String(ht)), I.searchParams.set("includeRefs", String(!0));
|
|
886
|
+
const ne = l || (n == null ? void 0 : n.locale);
|
|
887
|
+
let U = n || {};
|
|
888
|
+
if (ne && (I.searchParams.set("locale", ne), U = {
|
|
889
|
+
locale: ne,
|
|
890
|
+
...U
|
|
891
|
+
}), 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 && Ee(d) && I.searchParams.set("cacheSeconds", String(d)), f && Ee(f) && I.searchParams.set("staleCacheSeconds", String(f)), S) {
|
|
892
|
+
const F = ue({
|
|
827
893
|
sort: S
|
|
828
894
|
});
|
|
829
|
-
for (const
|
|
830
|
-
I.searchParams.set(
|
|
895
|
+
for (const M in F)
|
|
896
|
+
I.searchParams.set(M, JSON.stringify(F[M]));
|
|
831
897
|
}
|
|
832
|
-
const
|
|
833
|
-
...
|
|
834
|
-
...
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
898
|
+
const Ce = {
|
|
899
|
+
...en(),
|
|
900
|
+
...Ne(e.options || {})
|
|
901
|
+
};
|
|
902
|
+
U = {
|
|
903
|
+
...U,
|
|
904
|
+
...An(Ce)
|
|
905
|
+
};
|
|
906
|
+
const Te = ue(Ce);
|
|
907
|
+
for (const F in Te)
|
|
908
|
+
I.searchParams.set(F, String(Te[F]));
|
|
909
|
+
if (Object.keys(U).length > 0 && I.searchParams.set("userAttributes", JSON.stringify(U)), o) {
|
|
910
|
+
const F = nt({
|
|
840
911
|
query: o
|
|
841
912
|
});
|
|
842
|
-
for (const
|
|
843
|
-
I.searchParams.set(
|
|
913
|
+
for (const M in F)
|
|
914
|
+
I.searchParams.set(M, JSON.stringify(F[M]));
|
|
844
915
|
}
|
|
845
916
|
return I;
|
|
846
|
-
},
|
|
847
|
-
|
|
848
|
-
const
|
|
917
|
+
}, xn = (e) => {
|
|
918
|
+
const t = {};
|
|
919
|
+
for (const n in e)
|
|
920
|
+
n.startsWith("userAttributes.") && (t[n] = e[n], delete e[n]);
|
|
921
|
+
return t;
|
|
922
|
+
}, An = (e) => {
|
|
923
|
+
if ($() && e.preview === "BUILDER_STUDIO") {
|
|
924
|
+
e["userAttributes.urlPath"] = window.location.pathname, e["userAttributes.host"] = window.location.host;
|
|
925
|
+
const t = xn(e), {
|
|
926
|
+
userAttributes: n
|
|
927
|
+
} = Pn(t);
|
|
928
|
+
return n;
|
|
929
|
+
}
|
|
930
|
+
return {};
|
|
931
|
+
}, Vn = (e) => "results" in e;
|
|
932
|
+
async function ge(e) {
|
|
933
|
+
const t = await Fn({
|
|
849
934
|
...e,
|
|
850
935
|
limit: 1
|
|
851
936
|
});
|
|
852
937
|
return t && t[0] || null;
|
|
853
938
|
}
|
|
854
|
-
const
|
|
855
|
-
var
|
|
856
|
-
const t =
|
|
939
|
+
const Wn = async (e) => {
|
|
940
|
+
var i;
|
|
941
|
+
const t = be(e), n = e.fetch ?? En, o = {
|
|
857
942
|
...e.fetchOptions,
|
|
858
943
|
headers: {
|
|
859
|
-
...(
|
|
860
|
-
...
|
|
944
|
+
...(i = e.fetchOptions) == null ? void 0 : i.headers,
|
|
945
|
+
...Me()
|
|
861
946
|
}
|
|
862
947
|
};
|
|
863
948
|
return await (await n(t.href, o)).json();
|
|
864
|
-
},
|
|
865
|
-
const o =
|
|
866
|
-
if (n.search.includes("preview="), !o || !(
|
|
949
|
+
}, Nn = async (e, t, n = be(e)) => {
|
|
950
|
+
const o = J(e.canTrack);
|
|
951
|
+
if (n.search.includes("preview="), !o || !($() || E === "reactNative"))
|
|
867
952
|
return t.results;
|
|
868
953
|
try {
|
|
869
954
|
const r = [];
|
|
870
|
-
for (const
|
|
871
|
-
r.push(await
|
|
872
|
-
item:
|
|
955
|
+
for (const s of t.results)
|
|
956
|
+
r.push(await In({
|
|
957
|
+
item: s,
|
|
873
958
|
canTrack: o
|
|
874
959
|
}));
|
|
875
960
|
t.results = r;
|
|
@@ -878,18 +963,18 @@ const Tn = async (e) => {
|
|
|
878
963
|
}
|
|
879
964
|
return t.results;
|
|
880
965
|
};
|
|
881
|
-
async function
|
|
882
|
-
const t =
|
|
883
|
-
if (!
|
|
966
|
+
async function Fn(e) {
|
|
967
|
+
const t = be(e), n = await Wn(e);
|
|
968
|
+
if (!Vn(n))
|
|
884
969
|
throw A.error("Error fetching data. ", {
|
|
885
970
|
url: t,
|
|
886
971
|
content: n,
|
|
887
972
|
options: e
|
|
888
973
|
}), n;
|
|
889
|
-
return
|
|
974
|
+
return Nn(e, n);
|
|
890
975
|
}
|
|
891
|
-
const
|
|
892
|
-
var o, r,
|
|
976
|
+
const Js = async (e) => {
|
|
977
|
+
var o, r, s;
|
|
893
978
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((r = e.userAttributes) == null ? void 0 : r.urlPath), n = {
|
|
894
979
|
...e,
|
|
895
980
|
apiKey: e.apiKey,
|
|
@@ -900,94 +985,94 @@ const Ws = async (e) => {
|
|
|
900
985
|
urlPath: t
|
|
901
986
|
} : {}
|
|
902
987
|
},
|
|
903
|
-
options:
|
|
988
|
+
options: Ue(e.searchParams || ((s = e.url) == null ? void 0 : s.searchParams) || e.options)
|
|
904
989
|
};
|
|
905
990
|
return {
|
|
906
991
|
apiKey: n.apiKey,
|
|
907
992
|
model: n.model,
|
|
908
|
-
content: await
|
|
993
|
+
content: await ge(n)
|
|
909
994
|
};
|
|
910
|
-
},
|
|
911
|
-
function
|
|
912
|
-
let o, r,
|
|
995
|
+
}, ye = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
996
|
+
function Dn(e, t, n = {}) {
|
|
997
|
+
let o, r, s, i = null, l = 0;
|
|
913
998
|
const a = function() {
|
|
914
|
-
l = n.leading === !1 ? 0 : Date.now(),
|
|
999
|
+
l = n.leading === !1 ? 0 : Date.now(), i = null, s = e.apply(o, r), i || (o = r = null);
|
|
915
1000
|
};
|
|
916
1001
|
return function() {
|
|
917
1002
|
const u = Date.now();
|
|
918
1003
|
!l && n.leading === !1 && (l = u);
|
|
919
1004
|
const m = t - (u - l);
|
|
920
|
-
return o = this, r = arguments, m <= 0 || m > t ? (
|
|
1005
|
+
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
1006
|
};
|
|
922
1007
|
}
|
|
923
|
-
function
|
|
1008
|
+
function q(e, ...t) {
|
|
924
1009
|
const n = Object(e);
|
|
925
1010
|
for (let o = 1; o < arguments.length; o++) {
|
|
926
1011
|
const r = arguments[o];
|
|
927
1012
|
if (r != null)
|
|
928
|
-
for (const
|
|
929
|
-
Object.prototype.hasOwnProperty.call(r,
|
|
1013
|
+
for (const s in r)
|
|
1014
|
+
Object.prototype.hasOwnProperty.call(r, s) && (n[s] = r[s]);
|
|
930
1015
|
}
|
|
931
1016
|
return n;
|
|
932
1017
|
}
|
|
933
|
-
function
|
|
1018
|
+
function On(e) {
|
|
934
1019
|
for (const t of e)
|
|
935
1020
|
switch (t.trigger) {
|
|
936
1021
|
case "pageLoad":
|
|
937
|
-
|
|
1022
|
+
st(t);
|
|
938
1023
|
break;
|
|
939
1024
|
case "scrollInView":
|
|
940
|
-
|
|
1025
|
+
Un(t);
|
|
941
1026
|
break;
|
|
942
1027
|
}
|
|
943
1028
|
}
|
|
944
|
-
function
|
|
1029
|
+
function ot(e) {
|
|
945
1030
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
946
1031
|
}
|
|
947
|
-
function
|
|
948
|
-
const n =
|
|
949
|
-
for (const l of
|
|
1032
|
+
function rt(e, t) {
|
|
1033
|
+
const n = Ln(e), o = getComputedStyle(t), r = e.steps[0].styles, s = e.steps[e.steps.length - 1].styles, i = [r, s];
|
|
1034
|
+
for (const l of i)
|
|
950
1035
|
for (const a of n)
|
|
951
1036
|
a in l || (l[a] = o[a]);
|
|
952
1037
|
}
|
|
953
|
-
function
|
|
1038
|
+
function Ln(e) {
|
|
954
1039
|
const t = [];
|
|
955
1040
|
for (const n of e.steps)
|
|
956
1041
|
for (const o in n.styles)
|
|
957
1042
|
t.indexOf(o) === -1 && t.push(o);
|
|
958
1043
|
return t;
|
|
959
1044
|
}
|
|
960
|
-
function
|
|
1045
|
+
function st(e) {
|
|
961
1046
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
962
1047
|
if (!t.length) {
|
|
963
|
-
|
|
1048
|
+
ot(e.elementId || e.id || "");
|
|
964
1049
|
return;
|
|
965
1050
|
}
|
|
966
1051
|
Array.from(t).forEach((n) => {
|
|
967
|
-
|
|
968
|
-
n.style.transition = `all ${e.duration}s ${
|
|
1052
|
+
rt(e, n), n.style.transition = "none", n.style.transitionDelay = "0", q(n.style, e.steps[0].styles), setTimeout(() => {
|
|
1053
|
+
n.style.transition = `all ${e.duration}s ${ye(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), q(n.style, e.steps[1].styles), setTimeout(() => {
|
|
969
1054
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
970
1055
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
971
1056
|
});
|
|
972
1057
|
});
|
|
973
1058
|
}
|
|
974
|
-
function
|
|
1059
|
+
function Un(e) {
|
|
975
1060
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
976
1061
|
if (!t.length) {
|
|
977
|
-
|
|
1062
|
+
ot(e.elementId || e.id || "");
|
|
978
1063
|
return;
|
|
979
1064
|
}
|
|
980
1065
|
Array.from(t).forEach((n) => {
|
|
981
|
-
|
|
1066
|
+
rt(e, n);
|
|
982
1067
|
let o = !1, r = !1;
|
|
983
|
-
function
|
|
1068
|
+
function s() {
|
|
984
1069
|
!o && l(n) ? (o = !0, r = !0, setTimeout(() => {
|
|
985
|
-
|
|
1070
|
+
q(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", i), setTimeout(() => {
|
|
986
1071
|
r = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
987
1072
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
988
|
-
})) : e.repeat && o && !r && !l(n) && (o = !1,
|
|
1073
|
+
})) : e.repeat && o && !r && !l(n) && (o = !1, q(n.style, e.steps[0].styles));
|
|
989
1074
|
}
|
|
990
|
-
const
|
|
1075
|
+
const i = Dn(s, 200, {
|
|
991
1076
|
leading: !1
|
|
992
1077
|
});
|
|
993
1078
|
function l(m) {
|
|
@@ -996,52 +1081,52 @@ function Pn(e) {
|
|
|
996
1081
|
}
|
|
997
1082
|
const a = e.steps[0].styles;
|
|
998
1083
|
function u() {
|
|
999
|
-
|
|
1084
|
+
q(n.style, a);
|
|
1000
1085
|
}
|
|
1001
1086
|
u(), setTimeout(() => {
|
|
1002
|
-
n.style.transition = `all ${e.duration}s ${
|
|
1003
|
-
}), document.addEventListener("scroll",
|
|
1087
|
+
n.style.transition = `all ${e.duration}s ${ye(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
1088
|
+
}), document.addEventListener("scroll", i, {
|
|
1004
1089
|
capture: !0,
|
|
1005
1090
|
passive: !0
|
|
1006
|
-
}),
|
|
1091
|
+
}), s();
|
|
1007
1092
|
});
|
|
1008
1093
|
}
|
|
1009
|
-
const
|
|
1094
|
+
const it = (e) => Object.entries(e).map(([n, o]) => {
|
|
1010
1095
|
if (typeof o == "string")
|
|
1011
|
-
return `${
|
|
1012
|
-
}).filter(L),
|
|
1013
|
-
`),
|
|
1096
|
+
return `${ye(n)}: ${o};`;
|
|
1097
|
+
}).filter(L), Hn = (e) => it(e).join(`
|
|
1098
|
+
`), Ys = ({
|
|
1014
1099
|
mediaQuery: e,
|
|
1015
1100
|
className: t,
|
|
1016
1101
|
styles: n
|
|
1017
1102
|
}) => {
|
|
1018
1103
|
const o = `.${t} {
|
|
1019
|
-
${
|
|
1104
|
+
${Hn(n)}
|
|
1020
1105
|
}`;
|
|
1021
1106
|
return e ? `${e} {
|
|
1022
1107
|
${o}
|
|
1023
1108
|
}` : o;
|
|
1024
1109
|
};
|
|
1025
|
-
function
|
|
1110
|
+
function Mn({
|
|
1026
1111
|
style: e
|
|
1027
1112
|
}) {
|
|
1028
1113
|
return e;
|
|
1029
1114
|
}
|
|
1030
|
-
const
|
|
1115
|
+
const Xs = ({
|
|
1031
1116
|
block: e,
|
|
1032
1117
|
context: t
|
|
1033
|
-
}) =>
|
|
1118
|
+
}) => at(Mn({
|
|
1034
1119
|
style: e.style || {},
|
|
1035
1120
|
context: t,
|
|
1036
1121
|
block: e
|
|
1037
1122
|
}));
|
|
1038
|
-
function
|
|
1123
|
+
function at(e) {
|
|
1039
1124
|
switch (E) {
|
|
1040
1125
|
case "svelte":
|
|
1041
1126
|
case "vue":
|
|
1042
1127
|
case "solid":
|
|
1043
1128
|
case "angular":
|
|
1044
|
-
return
|
|
1129
|
+
return it(e).join(" ");
|
|
1045
1130
|
case "qwik":
|
|
1046
1131
|
case "reactNative":
|
|
1047
1132
|
case "react":
|
|
@@ -1049,21 +1134,24 @@ function nt(e) {
|
|
|
1049
1134
|
return e;
|
|
1050
1135
|
}
|
|
1051
1136
|
}
|
|
1052
|
-
const
|
|
1137
|
+
const lt = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includes(t) : !1 : !0, jn = ({
|
|
1053
1138
|
block: e,
|
|
1054
|
-
registeredComponents: t
|
|
1139
|
+
registeredComponents: t,
|
|
1140
|
+
model: n
|
|
1055
1141
|
}) => {
|
|
1056
|
-
var
|
|
1057
|
-
const
|
|
1058
|
-
if (!
|
|
1142
|
+
var s;
|
|
1143
|
+
const o = (s = e.component) == null ? void 0 : s.name;
|
|
1144
|
+
if (!o)
|
|
1059
1145
|
return null;
|
|
1060
|
-
const
|
|
1061
|
-
if (
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
Could not find a registered component named "${n}".
|
|
1146
|
+
const r = t[o];
|
|
1147
|
+
if (!r || lt(r, n)) {
|
|
1148
|
+
console.warn(`
|
|
1149
|
+
Could not find a registered component named "${o}".
|
|
1065
1150
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
1066
|
-
|
|
1151
|
+
return;
|
|
1152
|
+
} else
|
|
1153
|
+
return r;
|
|
1154
|
+
}, Kn = ({
|
|
1067
1155
|
block: e,
|
|
1068
1156
|
context: t
|
|
1069
1157
|
}) => {
|
|
@@ -1073,7 +1161,7 @@ const An = ({
|
|
|
1073
1161
|
} = e;
|
|
1074
1162
|
if (!(n != null && n.collection))
|
|
1075
1163
|
return;
|
|
1076
|
-
const r =
|
|
1164
|
+
const r = Y({
|
|
1077
1165
|
code: n.collection,
|
|
1078
1166
|
localState: t.localState,
|
|
1079
1167
|
rootState: t.rootState,
|
|
@@ -1082,7 +1170,7 @@ const An = ({
|
|
|
1082
1170
|
});
|
|
1083
1171
|
if (!Array.isArray(r))
|
|
1084
1172
|
return;
|
|
1085
|
-
const
|
|
1173
|
+
const s = n.collection.split(".").pop(), i = n.itemName || (s ? s + "Item" : "item");
|
|
1086
1174
|
return r.map((a, u) => ({
|
|
1087
1175
|
context: {
|
|
1088
1176
|
...t,
|
|
@@ -1090,65 +1178,65 @@ const An = ({
|
|
|
1090
1178
|
...t.localState,
|
|
1091
1179
|
$index: u,
|
|
1092
1180
|
$item: a,
|
|
1093
|
-
[
|
|
1094
|
-
[`$${
|
|
1181
|
+
[i]: a,
|
|
1182
|
+
[`$${i}Index`]: u
|
|
1095
1183
|
}
|
|
1096
1184
|
},
|
|
1097
1185
|
block: o
|
|
1098
1186
|
}));
|
|
1099
|
-
},
|
|
1187
|
+
}, qn = (e, t) => {
|
|
1100
1188
|
var n;
|
|
1101
1189
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderLinkComponent ? {
|
|
1102
1190
|
builderLinkComponent: t
|
|
1103
1191
|
} : {};
|
|
1104
|
-
},
|
|
1105
|
-
var
|
|
1106
|
-
return (
|
|
1107
|
-
builderComponents: t
|
|
1192
|
+
}, zn = (e, t, n) => {
|
|
1193
|
+
var o;
|
|
1194
|
+
return (o = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && o.builderComponents ? {
|
|
1195
|
+
builderComponents: Object.fromEntries(Object.entries(t).filter(([s, i]) => !lt(i, n)))
|
|
1108
1196
|
} : {};
|
|
1109
|
-
},
|
|
1197
|
+
}, Gn = (e, t) => {
|
|
1110
1198
|
var n;
|
|
1111
1199
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderBlock ? {
|
|
1112
1200
|
builderBlock: t
|
|
1113
1201
|
} : {};
|
|
1114
|
-
},
|
|
1202
|
+
}, Jn = (e, t) => {
|
|
1115
1203
|
var n;
|
|
1116
1204
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
|
|
1117
1205
|
builderContext: t
|
|
1118
1206
|
} : {};
|
|
1119
|
-
},
|
|
1207
|
+
}, Yn = () => Promise.resolve().then(() => co).then((e) => e.default).catch((e) => {
|
|
1120
1208
|
throw console.error(
|
|
1121
1209
|
"Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
|
|
1122
1210
|
e
|
|
1123
1211
|
), e;
|
|
1124
|
-
}),
|
|
1212
|
+
}), Xn = () => import("./block-styles-Z4CBN1bX.js").then((e) => e.default).catch((e) => {
|
|
1125
1213
|
throw console.error(
|
|
1126
1214
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
1127
1215
|
e
|
|
1128
1216
|
), e;
|
|
1129
|
-
}),
|
|
1217
|
+
}), Qn = () => import("./block-wrapper-KpJ-EQWT.js").then((e) => e.default).catch((e) => {
|
|
1130
1218
|
throw console.error(
|
|
1131
1219
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
1132
1220
|
e
|
|
1133
1221
|
), e;
|
|
1134
|
-
}),
|
|
1222
|
+
}), Zn = () => import("./component-ref-PIZE59-x.js").then((e) => e.default).catch((e) => {
|
|
1135
1223
|
throw console.error(
|
|
1136
1224
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
1137
1225
|
e
|
|
1138
1226
|
), e;
|
|
1139
|
-
}),
|
|
1227
|
+
}), _n = () => import("./repeated-block-qSSzvRZP.js").then((e) => e.default).catch((e) => {
|
|
1140
1228
|
throw console.error(
|
|
1141
1229
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
1142
1230
|
e
|
|
1143
1231
|
), e;
|
|
1144
|
-
}),
|
|
1232
|
+
}), eo = b({
|
|
1145
1233
|
name: "block",
|
|
1146
1234
|
components: {
|
|
1147
|
-
BlockStyles:
|
|
1148
|
-
RepeatedBlock:
|
|
1149
|
-
ComponentRef:
|
|
1150
|
-
BlockWrapper:
|
|
1151
|
-
DynamicDiv:
|
|
1235
|
+
BlockStyles: j(Xn),
|
|
1236
|
+
RepeatedBlock: j(_n),
|
|
1237
|
+
ComponentRef: j(Zn),
|
|
1238
|
+
BlockWrapper: j(Qn),
|
|
1239
|
+
DynamicDiv: j(Yn)
|
|
1152
1240
|
},
|
|
1153
1241
|
props: ["block", "context", "registeredComponents", "linkComponent"],
|
|
1154
1242
|
data() {
|
|
@@ -1161,7 +1249,7 @@ const An = ({
|
|
|
1161
1249
|
},
|
|
1162
1250
|
mounted() {
|
|
1163
1251
|
const e = this.processedBlock.id, t = this.processedBlock.animations;
|
|
1164
|
-
t && e &&
|
|
1252
|
+
t && e && On(
|
|
1165
1253
|
t.map((n) => ({
|
|
1166
1254
|
...n,
|
|
1167
1255
|
elementId: e
|
|
@@ -1172,26 +1260,26 @@ const An = ({
|
|
|
1172
1260
|
},
|
|
1173
1261
|
computed: {
|
|
1174
1262
|
repeatItem() {
|
|
1175
|
-
return
|
|
1263
|
+
return Kn({
|
|
1176
1264
|
block: this.block,
|
|
1177
1265
|
context: this.context
|
|
1178
1266
|
});
|
|
1179
1267
|
},
|
|
1180
1268
|
processedBlock() {
|
|
1181
1269
|
var t;
|
|
1182
|
-
return (t = this.block.repeat) != null && t.collection ? this.block :
|
|
1270
|
+
return (t = this.block.repeat) != null && t.collection ? this.block : Yt({
|
|
1183
1271
|
block: this.block,
|
|
1184
1272
|
localState: this.context.localState,
|
|
1185
1273
|
rootState: this.context.rootState,
|
|
1186
1274
|
rootSetState: this.context.rootSetState,
|
|
1187
|
-
context: this.context.context
|
|
1188
|
-
shouldEvaluateBindings: !0
|
|
1275
|
+
context: this.context.context
|
|
1189
1276
|
});
|
|
1190
1277
|
},
|
|
1191
1278
|
blockComponent() {
|
|
1192
|
-
return
|
|
1279
|
+
return jn({
|
|
1193
1280
|
block: this.processedBlock,
|
|
1194
|
-
registeredComponents: this.registeredComponents
|
|
1281
|
+
registeredComponents: this.registeredComponents,
|
|
1282
|
+
model: this.context.model
|
|
1195
1283
|
});
|
|
1196
1284
|
},
|
|
1197
1285
|
Tag() {
|
|
@@ -1215,13 +1303,14 @@ const An = ({
|
|
|
1215
1303
|
blockChildren: this.processedBlock.children ?? [],
|
|
1216
1304
|
componentRef: (e = this.blockComponent) == null ? void 0 : e.component,
|
|
1217
1305
|
componentOptions: {
|
|
1218
|
-
...
|
|
1219
|
-
...
|
|
1220
|
-
...
|
|
1221
|
-
...
|
|
1222
|
-
...
|
|
1306
|
+
...Ut(this.processedBlock, this.context),
|
|
1307
|
+
...Gn(this.blockComponent, this.processedBlock),
|
|
1308
|
+
...Jn(this.blockComponent, this.context),
|
|
1309
|
+
...qn(this.blockComponent, this.linkComponent),
|
|
1310
|
+
...zn(
|
|
1223
1311
|
this.blockComponent,
|
|
1224
|
-
this.registeredComponents
|
|
1312
|
+
this.registeredComponents,
|
|
1313
|
+
this.context.model
|
|
1225
1314
|
)
|
|
1226
1315
|
},
|
|
1227
1316
|
context: this.context,
|
|
@@ -1234,11 +1323,11 @@ const An = ({
|
|
|
1234
1323
|
}
|
|
1235
1324
|
}
|
|
1236
1325
|
});
|
|
1237
|
-
function
|
|
1326
|
+
function to(e, t, n, o, r, s) {
|
|
1238
1327
|
var h;
|
|
1239
|
-
const
|
|
1328
|
+
const i = k("BlockStyles"), l = k("ComponentRef"), a = k("Block", !0), u = k("BlockWrapper"), m = k("RepeatedBlock");
|
|
1240
1329
|
return e.canShowBlock ? (c(), p(w, { key: 0 }, [
|
|
1241
|
-
|
|
1330
|
+
R(i, {
|
|
1242
1331
|
block: e.processedBlock,
|
|
1243
1332
|
context: e.context
|
|
1244
1333
|
}, null, 8, ["block", "context"]),
|
|
@@ -1275,7 +1364,7 @@ function Kn(e, t, n, o, r, i) {
|
|
|
1275
1364
|
context: e.context
|
|
1276
1365
|
}, {
|
|
1277
1366
|
default: N(() => [
|
|
1278
|
-
|
|
1367
|
+
R(l, {
|
|
1279
1368
|
componentRef: e.componentRefProps.componentRef,
|
|
1280
1369
|
componentOptions: e.componentRefProps.componentOptions,
|
|
1281
1370
|
blockChildren: e.componentRefProps.blockChildren,
|
|
@@ -1299,10 +1388,10 @@ function Kn(e, t, n, o, r, i) {
|
|
|
1299
1388
|
], 64))
|
|
1300
1389
|
], 64)) : v("", !0);
|
|
1301
1390
|
}
|
|
1302
|
-
const
|
|
1391
|
+
const ke = /* @__PURE__ */ g(eo, [["render", to]]), Qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1303
1392
|
__proto__: null,
|
|
1304
|
-
default:
|
|
1305
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1393
|
+
default: ke
|
|
1394
|
+
}, Symbol.toStringTag, { value: "Module" })), no = b({
|
|
1306
1395
|
name: "builder-blocks-wrapper",
|
|
1307
1396
|
props: [
|
|
1308
1397
|
"blocks",
|
|
@@ -1360,16 +1449,16 @@ const ye = /* @__PURE__ */ g(jn, [["render", Kn]]), Ds = /* @__PURE__ */ Object.
|
|
|
1360
1449
|
}
|
|
1361
1450
|
}
|
|
1362
1451
|
});
|
|
1363
|
-
function
|
|
1364
|
-
return c(), y(
|
|
1452
|
+
function oo(e, t, n, o, r, s) {
|
|
1453
|
+
return c(), y(K(e.BlocksWrapper), C({
|
|
1365
1454
|
ref: "blocksWrapperRef",
|
|
1366
1455
|
class: e.className + " component-1k2igrjdg3x",
|
|
1367
1456
|
"builder-path": e.dataPath,
|
|
1368
1457
|
"builder-parent-id": e.parent,
|
|
1369
1458
|
style: e.styleProp,
|
|
1370
|
-
onClick: (
|
|
1371
|
-
onMouseEnter: (
|
|
1372
|
-
onKeyPress: (
|
|
1459
|
+
onClick: (i) => e.onClick(),
|
|
1460
|
+
onMouseEnter: (i) => e.onMouseEnter(),
|
|
1461
|
+
onKeyPress: (i) => e.onClick()
|
|
1373
1462
|
}, { ...e.BlocksWrapperProps }), {
|
|
1374
1463
|
default: N(() => [
|
|
1375
1464
|
x(e.$slots, "default", {}, void 0, !0)
|
|
@@ -1377,9 +1466,9 @@ function zn(e, t, n, o, r, i) {
|
|
|
1377
1466
|
_: 3
|
|
1378
1467
|
}, 16, ["class", "builder-path", "builder-parent-id", "style", "onClick", "onMouseEnter", "onKeyPress"]);
|
|
1379
1468
|
}
|
|
1380
|
-
const
|
|
1469
|
+
const ro = /* @__PURE__ */ g(no, [["render", oo], ["__scopeId", "data-v-ba2bc5c0"]]), so = b({
|
|
1381
1470
|
name: "builder-blocks",
|
|
1382
|
-
components: { BlocksWrapper:
|
|
1471
|
+
components: { BlocksWrapper: ro, Block: ke },
|
|
1383
1472
|
props: [
|
|
1384
1473
|
"blocks",
|
|
1385
1474
|
"parent",
|
|
@@ -1391,13 +1480,13 @@ const Gn = /* @__PURE__ */ g(qn, [["render", zn], ["__scopeId", "data-v-ba2bc5c0
|
|
|
1391
1480
|
"registeredComponents"
|
|
1392
1481
|
],
|
|
1393
1482
|
inject: {
|
|
1394
|
-
builderContext:
|
|
1395
|
-
componentsContext:
|
|
1483
|
+
builderContext: le.key,
|
|
1484
|
+
componentsContext: Fe.key
|
|
1396
1485
|
}
|
|
1397
1486
|
});
|
|
1398
|
-
function
|
|
1487
|
+
function io(e, t, n, o, r, s) {
|
|
1399
1488
|
var a, u, m, h;
|
|
1400
|
-
const
|
|
1489
|
+
const i = k("Block"), l = k("BlocksWrapper");
|
|
1401
1490
|
return c(), y(l, {
|
|
1402
1491
|
blocks: e.blocks,
|
|
1403
1492
|
parent: e.parent,
|
|
@@ -1410,7 +1499,7 @@ function Yn(e, t, n, o, r, i) {
|
|
|
1410
1499
|
default: N(() => [
|
|
1411
1500
|
e.blocks ? (c(!0), p(w, { key: 0 }, V(e.blocks, (d, f) => {
|
|
1412
1501
|
var S;
|
|
1413
|
-
return c(), y(
|
|
1502
|
+
return c(), y(i, {
|
|
1414
1503
|
key: d.id,
|
|
1415
1504
|
block: d,
|
|
1416
1505
|
linkComponent: e.linkComponent,
|
|
@@ -1422,21 +1511,21 @@ function Yn(e, t, n, o, r, i) {
|
|
|
1422
1511
|
_: 1
|
|
1423
1512
|
}, 8, ["blocks", "parent", "path", "styleProp", "classNameProp", "BlocksWrapper", "BlocksWrapperProps"]);
|
|
1424
1513
|
}
|
|
1425
|
-
const
|
|
1514
|
+
const H = /* @__PURE__ */ g(so, [["render", io]]), ao = b({
|
|
1426
1515
|
name: "dynamic-div",
|
|
1427
1516
|
props: []
|
|
1428
1517
|
});
|
|
1429
|
-
function
|
|
1518
|
+
function lo(e, t, n, o, r, s) {
|
|
1430
1519
|
return c(), p("div", null, [
|
|
1431
1520
|
x(e.$slots, "default")
|
|
1432
1521
|
]);
|
|
1433
1522
|
}
|
|
1434
|
-
const
|
|
1523
|
+
const X = /* @__PURE__ */ g(ao, [["render", lo]]), co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1435
1524
|
__proto__: null,
|
|
1436
|
-
default:
|
|
1437
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1525
|
+
default: X
|
|
1526
|
+
}, Symbol.toStringTag, { value: "Module" })), ve = b({
|
|
1438
1527
|
render() {
|
|
1439
|
-
return
|
|
1528
|
+
return Ve("style", {
|
|
1440
1529
|
innerHTML: this.styles,
|
|
1441
1530
|
"data-id": this.id,
|
|
1442
1531
|
nonce: this.nonce
|
|
@@ -1444,7 +1533,7 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1444
1533
|
},
|
|
1445
1534
|
name: "inlined-styles",
|
|
1446
1535
|
props: ["styles", "id", "nonce"]
|
|
1447
|
-
}),
|
|
1536
|
+
}), ct = {
|
|
1448
1537
|
small: {
|
|
1449
1538
|
min: 320,
|
|
1450
1539
|
default: 321,
|
|
@@ -1460,11 +1549,11 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1460
1549
|
default: 991,
|
|
1461
1550
|
max: 1200
|
|
1462
1551
|
}
|
|
1463
|
-
},
|
|
1552
|
+
}, Zs = (e, t = ct) => `@media (max-width: ${t[e].max}px)`, uo = ({
|
|
1464
1553
|
small: e,
|
|
1465
1554
|
medium: t
|
|
1466
1555
|
}) => {
|
|
1467
|
-
const n =
|
|
1556
|
+
const n = pe(ct);
|
|
1468
1557
|
if (!e || !t)
|
|
1469
1558
|
return n;
|
|
1470
1559
|
const o = Math.floor(e / 2);
|
|
@@ -1479,20 +1568,20 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1479
1568
|
min: r,
|
|
1480
1569
|
default: r + 1
|
|
1481
1570
|
};
|
|
1482
|
-
const
|
|
1571
|
+
const s = n.medium.max + 1;
|
|
1483
1572
|
return n.large = {
|
|
1484
1573
|
max: 2e3,
|
|
1485
1574
|
// TODO: decide upper limit
|
|
1486
|
-
min:
|
|
1487
|
-
default:
|
|
1575
|
+
min: s,
|
|
1576
|
+
default: s + 1
|
|
1488
1577
|
}, n;
|
|
1489
|
-
},
|
|
1578
|
+
}, po = (e) => `builder-columns ${e}-breakpoints`, mo = b({
|
|
1490
1579
|
name: "builder-columns",
|
|
1491
1580
|
components: {
|
|
1492
|
-
InlinedStyles:
|
|
1493
|
-
DynamicRenderer:
|
|
1494
|
-
Blocks:
|
|
1495
|
-
DynamicDiv:
|
|
1581
|
+
InlinedStyles: ve,
|
|
1582
|
+
DynamicRenderer: me,
|
|
1583
|
+
Blocks: H,
|
|
1584
|
+
DynamicDiv: X
|
|
1496
1585
|
},
|
|
1497
1586
|
props: [
|
|
1498
1587
|
"space",
|
|
@@ -1505,7 +1594,7 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1505
1594
|
"builderComponents"
|
|
1506
1595
|
],
|
|
1507
1596
|
data() {
|
|
1508
|
-
return { TARGET: E, getColumnsClass:
|
|
1597
|
+
return { TARGET: E, getColumnsClass: po };
|
|
1509
1598
|
},
|
|
1510
1599
|
computed: {
|
|
1511
1600
|
gutterSize() {
|
|
@@ -1555,7 +1644,7 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1555
1644
|
};
|
|
1556
1645
|
},
|
|
1557
1646
|
columnCssVars(e) {
|
|
1558
|
-
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%",
|
|
1647
|
+
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%", s = 0;
|
|
1559
1648
|
return {
|
|
1560
1649
|
...{
|
|
1561
1650
|
display: "flex",
|
|
@@ -1569,7 +1658,7 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1569
1658
|
desktopStyle: n
|
|
1570
1659
|
}),
|
|
1571
1660
|
"--column-margin-left-mobile": this.getMobileStyle({
|
|
1572
|
-
stackedStyle:
|
|
1661
|
+
stackedStyle: s,
|
|
1573
1662
|
desktopStyle: o
|
|
1574
1663
|
}),
|
|
1575
1664
|
"--column-width-tablet": this.getTabletStyle({
|
|
@@ -1577,14 +1666,14 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1577
1666
|
desktopStyle: n
|
|
1578
1667
|
}),
|
|
1579
1668
|
"--column-margin-left-tablet": this.getTabletStyle({
|
|
1580
|
-
stackedStyle:
|
|
1669
|
+
stackedStyle: s,
|
|
1581
1670
|
desktopStyle: o
|
|
1582
1671
|
})
|
|
1583
1672
|
};
|
|
1584
1673
|
},
|
|
1585
1674
|
getWidthForBreakpointSize(e) {
|
|
1586
1675
|
var n, o;
|
|
1587
|
-
return
|
|
1676
|
+
return uo(
|
|
1588
1677
|
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
1589
1678
|
)[e].max;
|
|
1590
1679
|
},
|
|
@@ -1622,19 +1711,19 @@ const Y = /* @__PURE__ */ g(Xn, [["render", Qn]]), Zn = /* @__PURE__ */ Object.f
|
|
|
1622
1711
|
href: e.link
|
|
1623
1712
|
} : {},
|
|
1624
1713
|
[Z()]: "builder-column",
|
|
1625
|
-
style:
|
|
1714
|
+
style: at(this.columnCssVars(t))
|
|
1626
1715
|
};
|
|
1627
1716
|
}
|
|
1628
1717
|
}
|
|
1629
1718
|
});
|
|
1630
|
-
function
|
|
1719
|
+
function ho(e, t, n, o, r, s) {
|
|
1631
1720
|
var u;
|
|
1632
|
-
const
|
|
1721
|
+
const i = k("InlinedStyles"), l = k("Blocks"), a = k("DynamicRenderer");
|
|
1633
1722
|
return c(), p("div", C({
|
|
1634
1723
|
class: e.getColumnsClass((u = e.builderBlock) == null ? void 0 : u.id) + " div-4wbls88y960",
|
|
1635
1724
|
style: e.columnsCssVars()
|
|
1636
1725
|
}, {}), [
|
|
1637
|
-
e.TARGET !== "reactNative" ? (c(), y(
|
|
1726
|
+
e.TARGET !== "reactNative" ? (c(), y(i, {
|
|
1638
1727
|
key: 0,
|
|
1639
1728
|
id: "builderio-columns",
|
|
1640
1729
|
styles: e.columnsStyles(),
|
|
@@ -1647,7 +1736,7 @@ function no(e, t, n, o, r, i) {
|
|
|
1647
1736
|
attributes: e.getAttributes(m, h)
|
|
1648
1737
|
}, {
|
|
1649
1738
|
default: N(() => [
|
|
1650
|
-
|
|
1739
|
+
R(l, {
|
|
1651
1740
|
path: `columns.${h}.blocks`,
|
|
1652
1741
|
parent: e.builderBlock.id,
|
|
1653
1742
|
styleProp: {
|
|
@@ -1663,47 +1752,47 @@ function no(e, t, n, o, r, i) {
|
|
|
1663
1752
|
}, 1032, ["TagName", "attributes"]))), 128))
|
|
1664
1753
|
], 16);
|
|
1665
1754
|
}
|
|
1666
|
-
const
|
|
1755
|
+
const fo = /* @__PURE__ */ g(mo, [["render", ho], ["__scopeId", "data-v-3354f136"]]), bo = b({
|
|
1667
1756
|
name: "builder-fragment-component",
|
|
1668
1757
|
props: []
|
|
1669
1758
|
});
|
|
1670
|
-
function
|
|
1759
|
+
function go(e, t, n, o, r, s) {
|
|
1671
1760
|
return c(), p("span", null, [
|
|
1672
1761
|
x(e.$slots, "default")
|
|
1673
1762
|
]);
|
|
1674
1763
|
}
|
|
1675
|
-
const
|
|
1676
|
-
function
|
|
1764
|
+
const yo = /* @__PURE__ */ g(bo, [["render", go]]);
|
|
1765
|
+
function Pe(e) {
|
|
1677
1766
|
return e.replace(/http(s)?:/, "");
|
|
1678
1767
|
}
|
|
1679
|
-
function
|
|
1768
|
+
function ko(e = "", t, n) {
|
|
1680
1769
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1681
1770
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + r + t + "=" + encodeURIComponent(n);
|
|
1682
1771
|
}
|
|
1683
|
-
function
|
|
1772
|
+
function vo(e, t) {
|
|
1684
1773
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1685
1774
|
return e;
|
|
1686
1775
|
if (t === "master")
|
|
1687
|
-
return
|
|
1776
|
+
return Pe(e);
|
|
1688
1777
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1689
1778
|
if (n) {
|
|
1690
|
-
const o = e.split(n[0]), r = n[3],
|
|
1691
|
-
return
|
|
1779
|
+
const o = e.split(n[0]), r = n[3], s = t.match("x") ? t : `${t}x`;
|
|
1780
|
+
return Pe(`${o[0]}_${s}${r}`);
|
|
1692
1781
|
}
|
|
1693
1782
|
return null;
|
|
1694
1783
|
}
|
|
1695
|
-
function
|
|
1784
|
+
function oe(e) {
|
|
1696
1785
|
if (!e)
|
|
1697
1786
|
return e;
|
|
1698
1787
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
1699
1788
|
if (e.match(/builder\.io/)) {
|
|
1700
1789
|
let n = e;
|
|
1701
1790
|
const o = Number(e.split("?width=")[1]);
|
|
1702
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${
|
|
1791
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${ko(e, "width", r)} ${r}w`).concat([n]).join(", ");
|
|
1703
1792
|
}
|
|
1704
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1793
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [vo(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
1705
1794
|
}
|
|
1706
|
-
const
|
|
1795
|
+
const So = b({
|
|
1707
1796
|
name: "builder-image",
|
|
1708
1797
|
props: [
|
|
1709
1798
|
"image",
|
|
@@ -1728,15 +1817,15 @@ const co = b({
|
|
|
1728
1817
|
const t = this.image || this.src;
|
|
1729
1818
|
if (!t || // We can auto add srcset for cdn.builder.io and shopify
|
|
1730
1819
|
// images, otherwise you can supply this prop manually
|
|
1731
|
-
!(t.match(/builder\.io/) || t.match(/cdn\.shopify\.com/)))
|
|
1820
|
+
!(typeof t == "string" && (t.match(/builder\.io/) || t.match(/cdn\.shopify\.com/))))
|
|
1732
1821
|
return this.srcset;
|
|
1733
1822
|
if (!this.noWebp) {
|
|
1734
1823
|
if (this.srcset && ((n = this.image) != null && n.includes("builder.io/api/v1/image"))) {
|
|
1735
1824
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
1736
|
-
return console.debug("Removed given srcset"),
|
|
1825
|
+
return console.debug("Removed given srcset"), oe(t);
|
|
1737
1826
|
} else if (this.image && !this.srcset)
|
|
1738
|
-
return
|
|
1739
|
-
return
|
|
1827
|
+
return oe(t);
|
|
1828
|
+
return oe(t);
|
|
1740
1829
|
}
|
|
1741
1830
|
},
|
|
1742
1831
|
webpSrcSet() {
|
|
@@ -1754,20 +1843,20 @@ const co = b({
|
|
|
1754
1843
|
return this.aspectRatio ? e : void 0;
|
|
1755
1844
|
}
|
|
1756
1845
|
}
|
|
1757
|
-
}),
|
|
1846
|
+
}), Co = ["srcset"], To = ["loading", "fetchpriority", "alt", "role", "src", "srcset", "sizes"], wo = {
|
|
1758
1847
|
key: 2,
|
|
1759
1848
|
class: "div-29wpyomtntv-2"
|
|
1760
1849
|
};
|
|
1761
|
-
function
|
|
1762
|
-
var
|
|
1850
|
+
function Io(e, t, n, o, r, s) {
|
|
1851
|
+
var i, l, a, u, m, h;
|
|
1763
1852
|
return c(), p(w, null, [
|
|
1764
|
-
|
|
1853
|
+
z("picture", null, [
|
|
1765
1854
|
e.webpSrcSet ? (c(), p("source", {
|
|
1766
1855
|
key: 0,
|
|
1767
1856
|
type: "image/webp",
|
|
1768
1857
|
srcset: e.webpSrcSet
|
|
1769
|
-
}, null, 8,
|
|
1770
|
-
|
|
1858
|
+
}, null, 8, Co)) : v("", !0),
|
|
1859
|
+
z("img", {
|
|
1771
1860
|
loading: e.highPriority ? "eager" : "lazy",
|
|
1772
1861
|
fetchpriority: e.highPriority ? "high" : "auto",
|
|
1773
1862
|
alt: e.altText,
|
|
@@ -1777,15 +1866,15 @@ function ho(e, t, n, o, r, i) {
|
|
|
1777
1866
|
objectFit: e.backgroundSize || "cover",
|
|
1778
1867
|
...e.aspectRatioCss
|
|
1779
1868
|
}),
|
|
1780
|
-
class:
|
|
1869
|
+
class: G(
|
|
1781
1870
|
"builder-image" + (e.className ? " " + e.className : "") + " img-29wpyomtntv"
|
|
1782
1871
|
),
|
|
1783
1872
|
src: e.image,
|
|
1784
1873
|
srcset: e.srcSetToUse,
|
|
1785
1874
|
sizes: e.sizes
|
|
1786
|
-
}, null, 14,
|
|
1875
|
+
}, null, 14, To)
|
|
1787
1876
|
]),
|
|
1788
|
-
e.aspectRatio && !((l = (
|
|
1877
|
+
e.aspectRatio && !((l = (i = e.builderBlock) == null ? void 0 : i.children) != null && l.length && e.fitContent) ? (c(), p("div", {
|
|
1789
1878
|
key: 0,
|
|
1790
1879
|
class: "builder-image-sizer div-29wpyomtntv",
|
|
1791
1880
|
style: D({
|
|
@@ -1793,19 +1882,19 @@ function ho(e, t, n, o, r, i) {
|
|
|
1793
1882
|
})
|
|
1794
1883
|
}, null, 4)) : v("", !0),
|
|
1795
1884
|
(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",
|
|
1885
|
+
!e.fitContent && ((h = (m = e.builderBlock) == null ? void 0 : m.children) != null && h.length) ? (c(), p("div", wo, [
|
|
1797
1886
|
x(e.$slots, "default", {}, void 0, !0)
|
|
1798
1887
|
])) : v("", !0)
|
|
1799
1888
|
], 64);
|
|
1800
1889
|
}
|
|
1801
|
-
const
|
|
1890
|
+
const $o = /* @__PURE__ */ g(So, [["render", Io], ["__scopeId", "data-v-a3766aaf"]]), Ro = b({
|
|
1802
1891
|
name: "builder-section-component",
|
|
1803
1892
|
props: ["attributes", "maxWidth"],
|
|
1804
1893
|
data() {
|
|
1805
1894
|
return { filterAttrs: W };
|
|
1806
1895
|
}
|
|
1807
1896
|
});
|
|
1808
|
-
function
|
|
1897
|
+
function Eo(e, t, n, o, r, s) {
|
|
1809
1898
|
return c(), p("section", C({
|
|
1810
1899
|
style: {
|
|
1811
1900
|
width: "100%",
|
|
@@ -1823,7 +1912,7 @@ function go(e, t, n, o, r, i) {
|
|
|
1823
1912
|
x(e.$slots, "default")
|
|
1824
1913
|
], 16);
|
|
1825
1914
|
}
|
|
1826
|
-
const
|
|
1915
|
+
const Po = /* @__PURE__ */ g(Ro, [["render", Eo]]), re = {
|
|
1827
1916
|
"@type": "@builder.io/sdk:Element",
|
|
1828
1917
|
layerName: "Accordion item title",
|
|
1829
1918
|
responsiveStyles: {
|
|
@@ -1852,7 +1941,7 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
1852
1941
|
}
|
|
1853
1942
|
}
|
|
1854
1943
|
}]
|
|
1855
|
-
},
|
|
1944
|
+
}, se = {
|
|
1856
1945
|
"@type": "@builder.io/sdk:Element",
|
|
1857
1946
|
layerName: "Accordion item detail",
|
|
1858
1947
|
responsiveStyles: {
|
|
@@ -1883,7 +1972,7 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
1883
1972
|
}
|
|
1884
1973
|
}
|
|
1885
1974
|
}]
|
|
1886
|
-
},
|
|
1975
|
+
}, Bo = {
|
|
1887
1976
|
name: "Builder:Accordion",
|
|
1888
1977
|
canHaveChildren: !0,
|
|
1889
1978
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -1900,19 +1989,19 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
1900
1989
|
name: "title",
|
|
1901
1990
|
type: "uiBlocks",
|
|
1902
1991
|
hideFromUI: !0,
|
|
1903
|
-
defaultValue: [
|
|
1992
|
+
defaultValue: [re]
|
|
1904
1993
|
}, {
|
|
1905
1994
|
name: "detail",
|
|
1906
1995
|
type: "uiBlocks",
|
|
1907
1996
|
hideFromUI: !0,
|
|
1908
|
-
defaultValue: [
|
|
1997
|
+
defaultValue: [se]
|
|
1909
1998
|
}],
|
|
1910
1999
|
defaultValue: [{
|
|
1911
|
-
title: [
|
|
1912
|
-
detail: [
|
|
2000
|
+
title: [re],
|
|
2001
|
+
detail: [se]
|
|
1913
2002
|
}, {
|
|
1914
|
-
title: [
|
|
1915
|
-
detail: [
|
|
2003
|
+
title: [re],
|
|
2004
|
+
detail: [se]
|
|
1916
2005
|
}],
|
|
1917
2006
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
1918
2007
|
}, {
|
|
@@ -1947,9 +2036,9 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
1947
2036
|
builderComponents: !0,
|
|
1948
2037
|
builderLinkComponent: !0
|
|
1949
2038
|
}
|
|
1950
|
-
},
|
|
2039
|
+
}, xo = (e) => e.toString(), Ao = b({
|
|
1951
2040
|
name: "builder-accordion",
|
|
1952
|
-
components: { Blocks:
|
|
2041
|
+
components: { Blocks: H },
|
|
1953
2042
|
props: [
|
|
1954
2043
|
"grid",
|
|
1955
2044
|
"oneAtATime",
|
|
@@ -1961,7 +2050,7 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
1961
2050
|
"builderLinkComponent"
|
|
1962
2051
|
],
|
|
1963
2052
|
data() {
|
|
1964
|
-
return { open: [], convertOrderNumberToString:
|
|
2053
|
+
return { open: [], convertOrderNumberToString: xo };
|
|
1965
2054
|
},
|
|
1966
2055
|
computed: {
|
|
1967
2056
|
onlyOneAtATime() {
|
|
@@ -2000,18 +2089,18 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
2000
2089
|
`.builder-accordion-title[data-index="${n}"]`
|
|
2001
2090
|
);
|
|
2002
2091
|
if (e = n, r) {
|
|
2003
|
-
let
|
|
2092
|
+
let s = r.getBoundingClientRect();
|
|
2004
2093
|
for (; r = r && r.nextElementSibling; )
|
|
2005
2094
|
if (r) {
|
|
2006
2095
|
if (r.classList.contains("builder-accordion-detail"))
|
|
2007
2096
|
continue;
|
|
2008
|
-
const
|
|
2009
|
-
if (
|
|
2097
|
+
const i = r.getBoundingClientRect();
|
|
2098
|
+
if (i.left > s.left) {
|
|
2010
2099
|
const l = parseInt(
|
|
2011
2100
|
r.getAttribute("data-index") || "",
|
|
2012
2101
|
10
|
|
2013
2102
|
);
|
|
2014
|
-
isNaN(l) || (
|
|
2103
|
+
isNaN(l) || (s = i, e = l);
|
|
2015
2104
|
} else
|
|
2016
2105
|
break;
|
|
2017
2106
|
}
|
|
@@ -2042,16 +2131,16 @@ const yo = /* @__PURE__ */ g(bo, [["render", go]]), oe = {
|
|
|
2042
2131
|
this.open.includes(e) ? this.open = this.onlyOneAtATime ? [] : this.open.filter((t) => t !== e) : this.open = this.onlyOneAtATime ? [e] : this.open.concat(e);
|
|
2043
2132
|
}
|
|
2044
2133
|
}
|
|
2045
|
-
}),
|
|
2046
|
-
function
|
|
2047
|
-
const
|
|
2134
|
+
}), Vo = ["data-index", "onClick"];
|
|
2135
|
+
function Wo(e, t, n, o, r, s) {
|
|
2136
|
+
const i = k("Blocks");
|
|
2048
2137
|
return c(), p("div", {
|
|
2049
2138
|
class: "builder-accordion",
|
|
2050
2139
|
style: D(e.accordionStyles)
|
|
2051
2140
|
}, [
|
|
2052
2141
|
(c(!0), p(w, null, V(e.items, (l, a) => (c(), p(w, { key: a }, [
|
|
2053
|
-
|
|
2054
|
-
class:
|
|
2142
|
+
z("div", {
|
|
2143
|
+
class: G(e.getAccordionTitleClassName(a)),
|
|
2055
2144
|
style: D({
|
|
2056
2145
|
...e.accordionTitleStyles,
|
|
2057
2146
|
...e.grid && {
|
|
@@ -2062,7 +2151,7 @@ function To(e, t, n, o, r, i) {
|
|
|
2062
2151
|
"data-index": a,
|
|
2063
2152
|
onClick: (u) => e.onClick(a)
|
|
2064
2153
|
}, [
|
|
2065
|
-
|
|
2154
|
+
R(i, {
|
|
2066
2155
|
blocks: l.title,
|
|
2067
2156
|
path: `items.${a}.title`,
|
|
2068
2157
|
parent: e.builderBlock.id,
|
|
@@ -2070,13 +2159,13 @@ function To(e, t, n, o, r, i) {
|
|
|
2070
2159
|
registeredComponents: e.builderComponents,
|
|
2071
2160
|
linkComponent: e.builderLinkComponent
|
|
2072
2161
|
}, null, 8, ["blocks", "path", "parent", "context", "registeredComponents", "linkComponent"])
|
|
2073
|
-
], 14,
|
|
2162
|
+
], 14, Vo),
|
|
2074
2163
|
e.open.includes(a) ? (c(), p("div", {
|
|
2075
2164
|
key: 0,
|
|
2076
|
-
class:
|
|
2165
|
+
class: G(e.getAccordionDetailClassName(a)),
|
|
2077
2166
|
style: D(e.accordionDetailStyles)
|
|
2078
2167
|
}, [
|
|
2079
|
-
|
|
2168
|
+
R(i, {
|
|
2080
2169
|
blocks: l.detail,
|
|
2081
2170
|
path: `items.${a}.detail`,
|
|
2082
2171
|
parent: e.builderBlock.id,
|
|
@@ -2088,7 +2177,7 @@ function To(e, t, n, o, r, i) {
|
|
|
2088
2177
|
], 64))), 128))
|
|
2089
2178
|
], 4);
|
|
2090
2179
|
}
|
|
2091
|
-
const
|
|
2180
|
+
const No = /* @__PURE__ */ g(Ao, [["render", Wo]]), Fo = {
|
|
2092
2181
|
name: "Core:Button",
|
|
2093
2182
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
2094
2183
|
defaultStyles: {
|
|
@@ -2124,7 +2213,7 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2124
2213
|
shouldReceiveBuilderProps: {
|
|
2125
2214
|
builderLinkComponent: !0
|
|
2126
2215
|
}
|
|
2127
|
-
},
|
|
2216
|
+
}, Do = {
|
|
2128
2217
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
2129
2218
|
name: "Columns",
|
|
2130
2219
|
isRSC: !0,
|
|
@@ -2303,7 +2392,7 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2303
2392
|
});
|
|
2304
2393
|
}
|
|
2305
2394
|
const n = e.get("columns");
|
|
2306
|
-
Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((
|
|
2395
|
+
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
2396
|
}
|
|
2308
2397
|
}, {
|
|
2309
2398
|
name: "space",
|
|
@@ -2331,13 +2420,13 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2331
2420
|
builderComponents: !0,
|
|
2332
2421
|
builderLinkComponent: !0
|
|
2333
2422
|
}
|
|
2334
|
-
},
|
|
2423
|
+
}, Oo = {
|
|
2335
2424
|
name: "Fragment",
|
|
2336
2425
|
static: !0,
|
|
2337
2426
|
hidden: !0,
|
|
2338
2427
|
canHaveChildren: !0,
|
|
2339
2428
|
noWrap: !0
|
|
2340
|
-
},
|
|
2429
|
+
}, 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"], Lo = ["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"], Uo = {
|
|
2341
2430
|
name: "Image",
|
|
2342
2431
|
static: !0,
|
|
2343
2432
|
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 +2441,12 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2352
2441
|
name: "image",
|
|
2353
2442
|
type: "file",
|
|
2354
2443
|
bubble: !0,
|
|
2355
|
-
allowedFileTypes:
|
|
2444
|
+
allowedFileTypes: Se,
|
|
2356
2445
|
required: !0,
|
|
2357
2446
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
2358
2447
|
onChange: (e) => {
|
|
2359
2448
|
e.delete("srcset"), e.delete("noWebp");
|
|
2360
|
-
function n(
|
|
2449
|
+
function n(i, l = 6e4) {
|
|
2361
2450
|
return new Promise((a, u) => {
|
|
2362
2451
|
const m = document.createElement("img");
|
|
2363
2452
|
let h = !1;
|
|
@@ -2365,21 +2454,21 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2365
2454
|
h = !0, a(m);
|
|
2366
2455
|
}, m.addEventListener("error", (d) => {
|
|
2367
2456
|
console.warn("Image load failed", d.error), u(d.error);
|
|
2368
|
-
}), m.src =
|
|
2457
|
+
}), m.src = i, setTimeout(() => {
|
|
2369
2458
|
h || u(new Error("Image load timed out"));
|
|
2370
2459
|
}, l);
|
|
2371
2460
|
});
|
|
2372
2461
|
}
|
|
2373
|
-
function o(
|
|
2374
|
-
return Math.round(
|
|
2462
|
+
function o(i) {
|
|
2463
|
+
return Math.round(i * 1e3) / 1e3;
|
|
2375
2464
|
}
|
|
2376
|
-
const r = e.get("image"),
|
|
2377
|
-
if (fetch(r).then((
|
|
2378
|
-
|
|
2379
|
-
}), r && (!
|
|
2380
|
-
return n(r).then((
|
|
2465
|
+
const r = e.get("image"), s = e.get("aspectRatio");
|
|
2466
|
+
if (fetch(r).then((i) => i.blob()).then((i) => {
|
|
2467
|
+
i.type.includes("svg") && e.set("noWebp", !0);
|
|
2468
|
+
}), r && (!s || s === 0.7041))
|
|
2469
|
+
return n(r).then((i) => {
|
|
2381
2470
|
const l = e.get("aspectRatio");
|
|
2382
|
-
e.get("image") === r && (!l || l === 0.7041) &&
|
|
2471
|
+
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
2472
|
});
|
|
2384
2473
|
}
|
|
2385
2474
|
}, {
|
|
@@ -2445,7 +2534,7 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2445
2534
|
shouldReceiveBuilderProps: {
|
|
2446
2535
|
builderBlock: !0
|
|
2447
2536
|
}
|
|
2448
|
-
},
|
|
2537
|
+
}, Ho = {
|
|
2449
2538
|
name: "Core:Section",
|
|
2450
2539
|
static: !0,
|
|
2451
2540
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2484,7 +2573,7 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2484
2573
|
}
|
|
2485
2574
|
}
|
|
2486
2575
|
}]
|
|
2487
|
-
},
|
|
2576
|
+
}, Mo = {
|
|
2488
2577
|
name: "Slot",
|
|
2489
2578
|
isRSC: !0,
|
|
2490
2579
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -2501,14 +2590,14 @@ const wo = /* @__PURE__ */ g(So, [["render", To]]), Io = {
|
|
|
2501
2590
|
builderContext: !0,
|
|
2502
2591
|
builderComponents: !0
|
|
2503
2592
|
}
|
|
2504
|
-
},
|
|
2593
|
+
}, jo = b({
|
|
2505
2594
|
name: "builder-slot",
|
|
2506
|
-
components: { Blocks:
|
|
2595
|
+
components: { Blocks: H },
|
|
2507
2596
|
props: ["builderContext", "name", "builderComponents"]
|
|
2508
2597
|
});
|
|
2509
|
-
function
|
|
2598
|
+
function Ko(e, t, n, o, r, s) {
|
|
2510
2599
|
var l, a, u;
|
|
2511
|
-
const
|
|
2600
|
+
const i = k("Blocks");
|
|
2512
2601
|
return c(), p("div", C(
|
|
2513
2602
|
{ style: {
|
|
2514
2603
|
pointerEvents: "auto"
|
|
@@ -2517,7 +2606,7 @@ function Ao(e, t, n, o, r, i) {
|
|
|
2517
2606
|
"builder-slot": e.name
|
|
2518
2607
|
}
|
|
2519
2608
|
), [
|
|
2520
|
-
|
|
2609
|
+
R(i, {
|
|
2521
2610
|
parent: (a = e.builderContext.context) == null ? void 0 : a.symbolId,
|
|
2522
2611
|
path: `symbol.data.${e.name}`,
|
|
2523
2612
|
context: e.builderContext,
|
|
@@ -2526,7 +2615,7 @@ function Ao(e, t, n, o, r, i) {
|
|
|
2526
2615
|
}, null, 8, ["parent", "path", "context", "registeredComponents", "blocks"])
|
|
2527
2616
|
], 16);
|
|
2528
2617
|
}
|
|
2529
|
-
const
|
|
2618
|
+
const qo = /* @__PURE__ */ g(jo, [["render", Ko]]), zo = {
|
|
2530
2619
|
name: "Symbol",
|
|
2531
2620
|
noWrap: !0,
|
|
2532
2621
|
static: !0,
|
|
@@ -2565,7 +2654,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2565
2654
|
builderComponents: !0,
|
|
2566
2655
|
builderLinkComponent: !0
|
|
2567
2656
|
}
|
|
2568
|
-
},
|
|
2657
|
+
}, ie = {
|
|
2569
2658
|
"@type": "@builder.io/sdk:Element",
|
|
2570
2659
|
responsiveStyles: {
|
|
2571
2660
|
large: {
|
|
@@ -2587,7 +2676,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2587
2676
|
text: "New tab"
|
|
2588
2677
|
}
|
|
2589
2678
|
}
|
|
2590
|
-
},
|
|
2679
|
+
}, ae = {
|
|
2591
2680
|
"@type": "@builder.io/sdk:Element",
|
|
2592
2681
|
responsiveStyles: {
|
|
2593
2682
|
large: {
|
|
@@ -2603,7 +2692,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2603
2692
|
text: "New tab content "
|
|
2604
2693
|
}
|
|
2605
2694
|
}
|
|
2606
|
-
},
|
|
2695
|
+
}, Go = {
|
|
2607
2696
|
name: "Builder: Tabs",
|
|
2608
2697
|
inputs: [{
|
|
2609
2698
|
name: "tabs",
|
|
@@ -2613,16 +2702,16 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2613
2702
|
name: "label",
|
|
2614
2703
|
type: "uiBlocks",
|
|
2615
2704
|
hideFromUI: !0,
|
|
2616
|
-
defaultValue: [
|
|
2705
|
+
defaultValue: [ie]
|
|
2617
2706
|
}, {
|
|
2618
2707
|
name: "content",
|
|
2619
2708
|
type: "uiBlocks",
|
|
2620
2709
|
hideFromUI: !0,
|
|
2621
|
-
defaultValue: [
|
|
2710
|
+
defaultValue: [ae]
|
|
2622
2711
|
}],
|
|
2623
2712
|
defaultValue: [{
|
|
2624
2713
|
label: [{
|
|
2625
|
-
...
|
|
2714
|
+
...ie,
|
|
2626
2715
|
component: {
|
|
2627
2716
|
name: "Text",
|
|
2628
2717
|
options: {
|
|
@@ -2631,7 +2720,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2631
2720
|
}
|
|
2632
2721
|
}],
|
|
2633
2722
|
content: [{
|
|
2634
|
-
...
|
|
2723
|
+
...ae,
|
|
2635
2724
|
component: {
|
|
2636
2725
|
name: "Text",
|
|
2637
2726
|
options: {
|
|
@@ -2641,7 +2730,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2641
2730
|
}]
|
|
2642
2731
|
}, {
|
|
2643
2732
|
label: [{
|
|
2644
|
-
...
|
|
2733
|
+
...ie,
|
|
2645
2734
|
component: {
|
|
2646
2735
|
name: "Text",
|
|
2647
2736
|
options: {
|
|
@@ -2650,7 +2739,7 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2650
2739
|
}
|
|
2651
2740
|
}],
|
|
2652
2741
|
content: [{
|
|
2653
|
-
...
|
|
2742
|
+
...ae,
|
|
2654
2743
|
component: {
|
|
2655
2744
|
name: "Text",
|
|
2656
2745
|
options: {
|
|
@@ -2706,9 +2795,9 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2706
2795
|
builderComponents: !0,
|
|
2707
2796
|
builderLinkComponent: !0
|
|
2708
2797
|
}
|
|
2709
|
-
},
|
|
2798
|
+
}, Jo = b({
|
|
2710
2799
|
name: "builder-tabs",
|
|
2711
|
-
components: { Blocks:
|
|
2800
|
+
components: { Blocks: H },
|
|
2712
2801
|
props: [
|
|
2713
2802
|
"defaultActiveTab",
|
|
2714
2803
|
"tabs",
|
|
@@ -2731,11 +2820,11 @@ const Vo = /* @__PURE__ */ g(xo, [["render", Ao]]), Wo = {
|
|
|
2731
2820
|
e === this.activeTab && this.collapsible ? this.activeTab = -1 : this.activeTab = e;
|
|
2732
2821
|
}
|
|
2733
2822
|
}
|
|
2734
|
-
}),
|
|
2735
|
-
function
|
|
2736
|
-
const
|
|
2823
|
+
}), Yo = ["onClick"], Xo = { key: 0 };
|
|
2824
|
+
function Qo(e, t, n, o, r, s) {
|
|
2825
|
+
const i = k("Blocks");
|
|
2737
2826
|
return c(), p("div", null, [
|
|
2738
|
-
|
|
2827
|
+
z("div", {
|
|
2739
2828
|
class: "builder-tabs-wrap",
|
|
2740
2829
|
style: D({
|
|
2741
2830
|
display: "flex",
|
|
@@ -2746,13 +2835,13 @@ function Lo(e, t, n, o, r, i) {
|
|
|
2746
2835
|
}, [
|
|
2747
2836
|
(c(!0), p(w, null, V(e.tabs, (l, a) => (c(), p("span", {
|
|
2748
2837
|
key: a,
|
|
2749
|
-
class:
|
|
2838
|
+
class: G(`builder-tab-wrap ${e.activeTab === a ? "builder-tab-active" : ""}`),
|
|
2750
2839
|
style: D({
|
|
2751
2840
|
...e.activeTab === a ? e.activeTabStyle : {}
|
|
2752
2841
|
}),
|
|
2753
2842
|
onClick: (u) => e.onClick(a)
|
|
2754
2843
|
}, [
|
|
2755
|
-
|
|
2844
|
+
R(i, {
|
|
2756
2845
|
parent: e.builderBlock.id,
|
|
2757
2846
|
path: `tabs.${a}.label`,
|
|
2758
2847
|
blocks: l.label,
|
|
@@ -2760,10 +2849,10 @@ function Lo(e, t, n, o, r, i) {
|
|
|
2760
2849
|
registeredComponents: e.builderComponents,
|
|
2761
2850
|
linkComponent: e.builderLinkComponent
|
|
2762
2851
|
}, null, 8, ["parent", "path", "blocks", "context", "registeredComponents", "linkComponent"])
|
|
2763
|
-
], 14,
|
|
2852
|
+
], 14, Yo))), 128))
|
|
2764
2853
|
], 4),
|
|
2765
|
-
e.activeTabContent(e.activeTab) ? (c(), p("div",
|
|
2766
|
-
|
|
2854
|
+
e.activeTabContent(e.activeTab) ? (c(), p("div", Xo, [
|
|
2855
|
+
R(i, {
|
|
2767
2856
|
parent: e.builderBlock.id,
|
|
2768
2857
|
path: `tabs.${e.activeTab}.content`,
|
|
2769
2858
|
blocks: e.activeTabContent(e.activeTab),
|
|
@@ -2774,7 +2863,7 @@ function Lo(e, t, n, o, r, i) {
|
|
|
2774
2863
|
])) : v("", !0)
|
|
2775
2864
|
]);
|
|
2776
2865
|
}
|
|
2777
|
-
const
|
|
2866
|
+
const Zo = /* @__PURE__ */ g(Jo, [["render", Qo]]), _o = {
|
|
2778
2867
|
shouldReceiveBuilderProps: {
|
|
2779
2868
|
builderBlock: !1,
|
|
2780
2869
|
builderContext: !0
|
|
@@ -2796,41 +2885,21 @@ const Uo = /* @__PURE__ */ g(Fo, [["render", Lo]]), Ho = {
|
|
|
2796
2885
|
height: "auto",
|
|
2797
2886
|
textAlign: "center"
|
|
2798
2887
|
}
|
|
2799
|
-
},
|
|
2888
|
+
}, er = b({
|
|
2800
2889
|
name: "builder-text",
|
|
2801
|
-
props: ["
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
const e = this.builderContext, {
|
|
2806
|
-
context: t,
|
|
2807
|
-
localState: n,
|
|
2808
|
-
rootState: o,
|
|
2809
|
-
rootSetState: r
|
|
2810
|
-
} = e;
|
|
2811
|
-
return String(((i = this.text) == null ? void 0 : i.toString()) || "").replace(
|
|
2812
|
-
/{{([^}]+)}}/g,
|
|
2813
|
-
(s, l) => J({
|
|
2814
|
-
code: l,
|
|
2815
|
-
context: t,
|
|
2816
|
-
localState: n,
|
|
2817
|
-
rootState: o,
|
|
2818
|
-
rootSetState: r
|
|
2819
|
-
})
|
|
2820
|
-
);
|
|
2821
|
-
}
|
|
2822
|
-
}
|
|
2823
|
-
}), jo = ["innerHTML"];
|
|
2824
|
-
function Ko(e, t, n, o, r, i) {
|
|
2890
|
+
props: ["text"]
|
|
2891
|
+
}), tr = ["innerHTML"];
|
|
2892
|
+
function nr(e, t, n, o, r, s) {
|
|
2893
|
+
var i;
|
|
2825
2894
|
return c(), p("div", {
|
|
2826
2895
|
class: "builder-text",
|
|
2827
|
-
innerHTML: e.
|
|
2896
|
+
innerHTML: ((i = e.text) == null ? void 0 : i.toString()) || "",
|
|
2828
2897
|
style: {
|
|
2829
2898
|
outline: "none"
|
|
2830
2899
|
}
|
|
2831
|
-
}, null, 8,
|
|
2900
|
+
}, null, 8, tr);
|
|
2832
2901
|
}
|
|
2833
|
-
const
|
|
2902
|
+
const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
2834
2903
|
name: "Custom Code",
|
|
2835
2904
|
static: !0,
|
|
2836
2905
|
requiredPermissions: ["editCode"],
|
|
@@ -2852,7 +2921,7 @@ const qo = /* @__PURE__ */ g(Mo, [["render", Ko]]), zo = {
|
|
|
2852
2921
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
2853
2922
|
advanced: !0
|
|
2854
2923
|
}]
|
|
2855
|
-
},
|
|
2924
|
+
}, sr = b({
|
|
2856
2925
|
name: "builder-custom-code",
|
|
2857
2926
|
props: ["replaceNodes", "code"],
|
|
2858
2927
|
data() {
|
|
@@ -2886,15 +2955,15 @@ const qo = /* @__PURE__ */ g(Mo, [["render", Ko]]), zo = {
|
|
|
2886
2955
|
}
|
|
2887
2956
|
}
|
|
2888
2957
|
}
|
|
2889
|
-
}),
|
|
2890
|
-
function
|
|
2958
|
+
}), ir = ["innerHTML"];
|
|
2959
|
+
function ar(e, t, n, o, r, s) {
|
|
2891
2960
|
return c(), p("div", {
|
|
2892
2961
|
ref: "elementRef",
|
|
2893
|
-
class:
|
|
2962
|
+
class: G("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
|
|
2894
2963
|
innerHTML: e.code
|
|
2895
|
-
}, null, 10,
|
|
2964
|
+
}, null, 10, ir);
|
|
2896
2965
|
}
|
|
2897
|
-
const
|
|
2966
|
+
const lr = /* @__PURE__ */ g(sr, [["render", ar]]), cr = {
|
|
2898
2967
|
name: "Embed",
|
|
2899
2968
|
static: !0,
|
|
2900
2969
|
inputs: [{
|
|
@@ -2909,7 +2978,7 @@ const Xo = /* @__PURE__ */ g(Go, [["render", Yo]]), Qo = {
|
|
|
2909
2978
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
2910
2979
|
hideFromUI: !0
|
|
2911
2980
|
}]
|
|
2912
|
-
},
|
|
2981
|
+
}, dr = ["text/javascript", "application/javascript", "application/ecmascript"], ur = (e) => dr.includes(e.type), pr = b({
|
|
2913
2982
|
name: "builder-embed",
|
|
2914
2983
|
props: ["content"],
|
|
2915
2984
|
data() {
|
|
@@ -2942,7 +3011,7 @@ const Xo = /* @__PURE__ */ g(Go, [["render", Yo]]), Qo = {
|
|
|
2942
3011
|
this.scriptsInserted.push(n.src);
|
|
2943
3012
|
const o = document.createElement("script");
|
|
2944
3013
|
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
2945
|
-
} else if (
|
|
3014
|
+
} else if (ur(n) && !this.scriptsRun.includes(n.innerText))
|
|
2946
3015
|
try {
|
|
2947
3016
|
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
2948
3017
|
} catch (o) {
|
|
@@ -2951,15 +3020,15 @@ const Xo = /* @__PURE__ */ g(Go, [["render", Yo]]), Qo = {
|
|
|
2951
3020
|
}
|
|
2952
3021
|
}
|
|
2953
3022
|
}
|
|
2954
|
-
}),
|
|
2955
|
-
function
|
|
3023
|
+
}), mr = ["innerHTML"];
|
|
3024
|
+
function hr(e, t, n, o, r, s) {
|
|
2956
3025
|
return c(), p("div", {
|
|
2957
3026
|
class: "builder-embed",
|
|
2958
3027
|
ref: "elem",
|
|
2959
3028
|
innerHTML: e.content
|
|
2960
|
-
}, null, 8,
|
|
3029
|
+
}, null, 8, mr);
|
|
2961
3030
|
}
|
|
2962
|
-
const
|
|
3031
|
+
const fr = /* @__PURE__ */ g(pr, [["render", hr]]), br = {
|
|
2963
3032
|
name: "Form:Form",
|
|
2964
3033
|
// editableTags: ['builder-form-error']
|
|
2965
3034
|
defaults: {
|
|
@@ -3196,12 +3265,12 @@ const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
|
3196
3265
|
builderComponents: !0,
|
|
3197
3266
|
builderLinkComponent: !0
|
|
3198
3267
|
}
|
|
3199
|
-
},
|
|
3268
|
+
}, gr = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], yr = () => {
|
|
3200
3269
|
const e = process.env.NODE_ENV || "production";
|
|
3201
|
-
return
|
|
3202
|
-
},
|
|
3270
|
+
return gr.includes(e) ? e : "production";
|
|
3271
|
+
}, kr = b({
|
|
3203
3272
|
name: "builder-form-component",
|
|
3204
|
-
components: { Block:
|
|
3273
|
+
components: { Block: ke, Blocks: H },
|
|
3205
3274
|
props: [
|
|
3206
3275
|
"builderContext",
|
|
3207
3276
|
"previewState",
|
|
@@ -3257,8 +3326,8 @@ const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
|
3257
3326
|
}
|
|
3258
3327
|
e.preventDefault();
|
|
3259
3328
|
const o = e.currentTarget || e.target, r = this.customHeaders || {};
|
|
3260
|
-
let
|
|
3261
|
-
const
|
|
3329
|
+
let s;
|
|
3330
|
+
const i = new FormData(o), l = Array.from(o.querySelectorAll("input,select,textarea")).filter((d) => !!d.name).map((d) => {
|
|
3262
3331
|
let f;
|
|
3263
3332
|
const S = d.name;
|
|
3264
3333
|
if (d instanceof HTMLInputElement)
|
|
@@ -3286,27 +3355,27 @@ const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
|
3286
3355
|
if (this.sendSubmissionsTo === "email" && (a = "multipart/form-data"), Array.from(l).forEach(({ value: d }) => {
|
|
3287
3356
|
(d instanceof File || Array.isArray(d) && d[0] instanceof File || d instanceof FileList) && (a = "multipart/form-data");
|
|
3288
3357
|
}), a !== "application/json")
|
|
3289
|
-
|
|
3358
|
+
s = i;
|
|
3290
3359
|
else {
|
|
3291
3360
|
const d = {};
|
|
3292
3361
|
Array.from(l).forEach(({ value: f, key: S }) => {
|
|
3293
|
-
|
|
3294
|
-
}),
|
|
3362
|
+
We(d, S, f);
|
|
3363
|
+
}), s = JSON.stringify(d);
|
|
3295
3364
|
}
|
|
3296
3365
|
a && a !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (r["content-type"] = a));
|
|
3297
3366
|
const u = new CustomEvent("presubmit", {
|
|
3298
3367
|
detail: {
|
|
3299
|
-
body:
|
|
3368
|
+
body: s
|
|
3300
3369
|
}
|
|
3301
3370
|
});
|
|
3302
3371
|
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(u), u.defaultPrevented))
|
|
3303
3372
|
return;
|
|
3304
3373
|
this.formState = "sending";
|
|
3305
|
-
const m = `${
|
|
3374
|
+
const m = `${yr() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
|
|
3306
3375
|
this.sendSubmissionsToEmail || ""
|
|
3307
3376
|
)}&name=${encodeURIComponent(this.name || "")}`, h = this.sendSubmissionsTo === "email" ? m : this.action;
|
|
3308
|
-
|
|
3309
|
-
body:
|
|
3377
|
+
he(h), fetch(h, {
|
|
3378
|
+
body: s,
|
|
3310
3379
|
headers: r,
|
|
3311
3380
|
method: this.method || "post"
|
|
3312
3381
|
}).then(
|
|
@@ -3314,7 +3383,7 @@ const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
|
3314
3383
|
let f;
|
|
3315
3384
|
const S = d.headers.get("content-type");
|
|
3316
3385
|
if (S && S.indexOf("application/json") !== -1 ? f = await d.json() : f = await d.text(), !d.ok && this.errorMessagePath) {
|
|
3317
|
-
let T =
|
|
3386
|
+
let T = De(f, this.errorMessagePath);
|
|
3318
3387
|
T && (typeof T != "string" && (T = JSON.stringify(T)), this.formErrorMessage = T, this.mergeNewRootState({
|
|
3319
3388
|
formErrorMessage: T
|
|
3320
3389
|
}));
|
|
@@ -3355,13 +3424,13 @@ const or = /* @__PURE__ */ g(er, [["render", nr]]), rr = {
|
|
|
3355
3424
|
}
|
|
3356
3425
|
}
|
|
3357
3426
|
}
|
|
3358
|
-
}),
|
|
3427
|
+
}), vr = ["validate", "action", "method", "name"], Sr = {
|
|
3359
3428
|
key: 3,
|
|
3360
3429
|
class: "builder-form-error-text pre-3q96myty4lk"
|
|
3361
3430
|
};
|
|
3362
|
-
function
|
|
3431
|
+
function Cr(e, t, n, o, r, s) {
|
|
3363
3432
|
var a;
|
|
3364
|
-
const
|
|
3433
|
+
const i = k("Block"), l = k("Blocks");
|
|
3365
3434
|
return c(), p("form", C({
|
|
3366
3435
|
validate: e.validate,
|
|
3367
3436
|
ref: "formRef",
|
|
@@ -3370,7 +3439,7 @@ function dr(e, t, n, o, r, i) {
|
|
|
3370
3439
|
name: e.name,
|
|
3371
3440
|
onSubmit: t[0] || (t[0] = (u) => e.onSubmit(u))
|
|
3372
3441
|
}, { ...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(
|
|
3442
|
+
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
3443
|
key: `form-block-${e.idx}`,
|
|
3375
3444
|
block: u,
|
|
3376
3445
|
context: e.builderContext,
|
|
@@ -3389,16 +3458,16 @@ function dr(e, t, n, o, r, i) {
|
|
|
3389
3458
|
blocks: e.sendingMessage,
|
|
3390
3459
|
context: e.builderContext
|
|
3391
3460
|
}, null, 8, ["blocks", "context"])) : v("", !0),
|
|
3392
|
-
e.submissionState() === "error" && e.responseData ? (c(), p("pre",
|
|
3461
|
+
e.submissionState() === "error" && e.responseData ? (c(), p("pre", Sr, te(JSON.stringify(e.responseData, null, 2)), 1)) : v("", !0),
|
|
3393
3462
|
e.submissionState() === "success" ? (c(), y(l, {
|
|
3394
3463
|
key: 4,
|
|
3395
3464
|
path: "successMessage",
|
|
3396
3465
|
blocks: e.successMessage,
|
|
3397
3466
|
context: e.builderContext
|
|
3398
3467
|
}, null, 8, ["blocks", "context"])) : v("", !0)
|
|
3399
|
-
], 16,
|
|
3468
|
+
], 16, vr);
|
|
3400
3469
|
}
|
|
3401
|
-
const
|
|
3470
|
+
const Tr = /* @__PURE__ */ g(kr, [["render", Cr], ["__scopeId", "data-v-cd94d6c1"]]), wr = {
|
|
3402
3471
|
name: "Form:Input",
|
|
3403
3472
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3404
3473
|
inputs: [
|
|
@@ -3449,7 +3518,7 @@ const ur = /* @__PURE__ */ g(ar, [["render", dr], ["__scopeId", "data-v-cd94d6c1
|
|
|
3449
3518
|
borderStyle: "solid",
|
|
3450
3519
|
borderColor: "#ccc"
|
|
3451
3520
|
}
|
|
3452
|
-
},
|
|
3521
|
+
}, Ir = b({
|
|
3453
3522
|
name: "builder-form-input-component",
|
|
3454
3523
|
props: [
|
|
3455
3524
|
"attributes",
|
|
@@ -3463,8 +3532,8 @@ const ur = /* @__PURE__ */ g(ar, [["render", dr], ["__scopeId", "data-v-cd94d6c1
|
|
|
3463
3532
|
data() {
|
|
3464
3533
|
return { isEditing: P, filterAttrs: W };
|
|
3465
3534
|
}
|
|
3466
|
-
}),
|
|
3467
|
-
function
|
|
3535
|
+
}), $r = ["placeholder", "type", "name", "value", "defaultValue", "required"];
|
|
3536
|
+
function Rr(e, t, n, o, r, s) {
|
|
3468
3537
|
return c(), p("input", C({
|
|
3469
3538
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
3470
3539
|
placeholder: e.placeholder,
|
|
@@ -3473,9 +3542,9 @@ function fr(e, t, n, o, r, i) {
|
|
|
3473
3542
|
value: e.value,
|
|
3474
3543
|
defaultValue: e.defaultValue,
|
|
3475
3544
|
required: e.required
|
|
3476
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16,
|
|
3545
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, $r);
|
|
3477
3546
|
}
|
|
3478
|
-
const
|
|
3547
|
+
const Er = /* @__PURE__ */ g(Ir, [["render", Rr]]), Pr = {
|
|
3479
3548
|
name: "Form:Select",
|
|
3480
3549
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
3481
3550
|
defaultStyles: {
|
|
@@ -3517,14 +3586,14 @@ const br = /* @__PURE__ */ g(mr, [["render", fr]]), gr = {
|
|
|
3517
3586
|
}],
|
|
3518
3587
|
static: !0,
|
|
3519
3588
|
noWrap: !0
|
|
3520
|
-
},
|
|
3589
|
+
}, Br = b({
|
|
3521
3590
|
name: "builder-select-component",
|
|
3522
3591
|
props: ["attributes", "value", "defaultValue", "name", "required", "options"],
|
|
3523
3592
|
data() {
|
|
3524
3593
|
return { isEditing: P, filterAttrs: W };
|
|
3525
3594
|
}
|
|
3526
|
-
}),
|
|
3527
|
-
function
|
|
3595
|
+
}), xr = ["value", "defaultValue", "name", "required"], Ar = ["value"];
|
|
3596
|
+
function Vr(e, t, n, o, r, s) {
|
|
3528
3597
|
return c(), p("select", C({
|
|
3529
3598
|
value: e.value,
|
|
3530
3599
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
@@ -3532,13 +3601,13 @@ function Sr(e, t, n, o, r, i) {
|
|
|
3532
3601
|
name: e.name,
|
|
3533
3602
|
required: e.required
|
|
3534
3603
|
}, 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,
|
|
3604
|
+
(c(!0), p(w, null, V(e.options, (i, l) => (c(), p("option", {
|
|
3605
|
+
key: `${i.name}-${l}`,
|
|
3606
|
+
value: i.value
|
|
3607
|
+
}, te(i.name || i.value), 9, Ar))), 128))
|
|
3608
|
+
], 16, xr);
|
|
3540
3609
|
}
|
|
3541
|
-
const
|
|
3610
|
+
const Wr = /* @__PURE__ */ g(Br, [["render", Vr]]), Nr = {
|
|
3542
3611
|
name: "Form:SubmitButton",
|
|
3543
3612
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
3544
3613
|
defaultStyles: {
|
|
@@ -3563,17 +3632,17 @@ const Cr = /* @__PURE__ */ g(yr, [["render", Sr]]), Tr = {
|
|
|
3563
3632
|
// that only shows if advanced setting is flipped
|
|
3564
3633
|
// TODO: defaultChildren
|
|
3565
3634
|
// canHaveChildren: true,
|
|
3566
|
-
},
|
|
3635
|
+
}, Fr = b({
|
|
3567
3636
|
name: "builder-submit-button",
|
|
3568
3637
|
props: ["attributes", "text"],
|
|
3569
3638
|
data() {
|
|
3570
3639
|
return { filterAttrs: W };
|
|
3571
3640
|
}
|
|
3572
3641
|
});
|
|
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)),
|
|
3642
|
+
function Dr(e, t, n, o, r, s) {
|
|
3643
|
+
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
3644
|
}
|
|
3576
|
-
const
|
|
3645
|
+
const Or = /* @__PURE__ */ g(Fr, [["render", Dr]]), Lr = {
|
|
3577
3646
|
name: "Form:TextArea",
|
|
3578
3647
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
3579
3648
|
inputs: [{
|
|
@@ -3609,7 +3678,7 @@ const $r = /* @__PURE__ */ g(wr, [["render", Ir]]), Rr = {
|
|
|
3609
3678
|
},
|
|
3610
3679
|
static: !0,
|
|
3611
3680
|
noWrap: !0
|
|
3612
|
-
},
|
|
3681
|
+
}, Ur = b({
|
|
3613
3682
|
name: "builder-textarea",
|
|
3614
3683
|
props: [
|
|
3615
3684
|
"attributes",
|
|
@@ -3622,17 +3691,17 @@ const $r = /* @__PURE__ */ g(wr, [["render", Ir]]), Rr = {
|
|
|
3622
3691
|
data() {
|
|
3623
3692
|
return { filterAttrs: W };
|
|
3624
3693
|
}
|
|
3625
|
-
}),
|
|
3626
|
-
function
|
|
3694
|
+
}), Hr = ["placeholder", "name", "value", "defaultValue", "required"];
|
|
3695
|
+
function Mr(e, t, n, o, r, s) {
|
|
3627
3696
|
return c(), p("textarea", C({
|
|
3628
3697
|
placeholder: e.placeholder,
|
|
3629
3698
|
name: e.name,
|
|
3630
3699
|
value: e.value,
|
|
3631
3700
|
defaultValue: e.defaultValue,
|
|
3632
3701
|
required: e.required
|
|
3633
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16,
|
|
3702
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, Hr);
|
|
3634
3703
|
}
|
|
3635
|
-
const
|
|
3704
|
+
const jr = /* @__PURE__ */ g(Ur, [["render", Mr]]), Kr = {
|
|
3636
3705
|
// friendlyName?
|
|
3637
3706
|
name: "Raw:Img",
|
|
3638
3707
|
hideFromInsertMenu: !0,
|
|
@@ -3641,12 +3710,12 @@ const xr = /* @__PURE__ */ g(Er, [["render", Br]]), Ar = {
|
|
|
3641
3710
|
name: "image",
|
|
3642
3711
|
bubble: !0,
|
|
3643
3712
|
type: "file",
|
|
3644
|
-
allowedFileTypes:
|
|
3713
|
+
allowedFileTypes: Se,
|
|
3645
3714
|
required: !0
|
|
3646
3715
|
}],
|
|
3647
3716
|
noWrap: !0,
|
|
3648
3717
|
static: !0
|
|
3649
|
-
},
|
|
3718
|
+
}, qr = b({
|
|
3650
3719
|
name: "builder-img-component",
|
|
3651
3720
|
props: [
|
|
3652
3721
|
"backgroundSize",
|
|
@@ -3659,8 +3728,8 @@ const xr = /* @__PURE__ */ g(Er, [["render", Br]]), Ar = {
|
|
|
3659
3728
|
data() {
|
|
3660
3729
|
return { isEditing: P, filterAttrs: W };
|
|
3661
3730
|
}
|
|
3662
|
-
}),
|
|
3663
|
-
function
|
|
3731
|
+
}), zr = ["alt", "src"];
|
|
3732
|
+
function Gr(e, t, n, o, r, s) {
|
|
3664
3733
|
return c(), p("img", C({
|
|
3665
3734
|
style: {
|
|
3666
3735
|
objectFit: e.backgroundSize || "cover",
|
|
@@ -3669,9 +3738,9 @@ function Nr(e, t, n, o, r, i) {
|
|
|
3669
3738
|
key: e.isEditing() && e.imgSrc || "default-key",
|
|
3670
3739
|
alt: e.altText,
|
|
3671
3740
|
src: e.imgSrc || e.image
|
|
3672
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16,
|
|
3741
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, zr);
|
|
3673
3742
|
}
|
|
3674
|
-
const
|
|
3743
|
+
const Jr = /* @__PURE__ */ g(qr, [["render", Gr]]), Yr = {
|
|
3675
3744
|
name: "Video",
|
|
3676
3745
|
canHaveChildren: !0,
|
|
3677
3746
|
defaultStyles: {
|
|
@@ -3682,14 +3751,14 @@ const Fr = /* @__PURE__ */ g(Vr, [["render", Nr]]), Dr = {
|
|
|
3682
3751
|
inputs: [{
|
|
3683
3752
|
name: "video",
|
|
3684
3753
|
type: "file",
|
|
3685
|
-
allowedFileTypes:
|
|
3754
|
+
allowedFileTypes: Lo,
|
|
3686
3755
|
bubble: !0,
|
|
3687
3756
|
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
3688
3757
|
required: !0
|
|
3689
3758
|
}, {
|
|
3690
3759
|
name: "posterImage",
|
|
3691
3760
|
type: "file",
|
|
3692
|
-
allowedFileTypes:
|
|
3761
|
+
allowedFileTypes: Se,
|
|
3693
3762
|
helperText: "Image to show before the video plays"
|
|
3694
3763
|
}, {
|
|
3695
3764
|
name: "autoPlay",
|
|
@@ -3755,7 +3824,7 @@ const Fr = /* @__PURE__ */ g(Vr, [["render", Nr]]), Dr = {
|
|
|
3755
3824
|
shouldReceiveBuilderProps: {
|
|
3756
3825
|
builderBlock: !0
|
|
3757
3826
|
}
|
|
3758
|
-
},
|
|
3827
|
+
}, Xr = b({
|
|
3759
3828
|
name: "builder-video",
|
|
3760
3829
|
props: [
|
|
3761
3830
|
"autoPlay",
|
|
@@ -3800,16 +3869,16 @@ const Fr = /* @__PURE__ */ g(Vr, [["render", Nr]]), Dr = {
|
|
|
3800
3869
|
};
|
|
3801
3870
|
}
|
|
3802
3871
|
}
|
|
3803
|
-
}),
|
|
3872
|
+
}), Qr = { style: {
|
|
3804
3873
|
position: "relative"
|
|
3805
|
-
} },
|
|
3874
|
+
} }, Zr = ["preload", "src", "poster"], _r = ["src"], es = {
|
|
3806
3875
|
key: 1,
|
|
3807
3876
|
style: {
|
|
3808
3877
|
display: "flex",
|
|
3809
3878
|
flexDirection: "column",
|
|
3810
3879
|
alignItems: "stretch"
|
|
3811
3880
|
}
|
|
3812
|
-
},
|
|
3881
|
+
}, ts = {
|
|
3813
3882
|
key: 2,
|
|
3814
3883
|
style: {
|
|
3815
3884
|
pointerEvents: "none",
|
|
@@ -3823,16 +3892,16 @@ const Fr = /* @__PURE__ */ g(Vr, [["render", Nr]]), Dr = {
|
|
|
3823
3892
|
height: "100%"
|
|
3824
3893
|
}
|
|
3825
3894
|
};
|
|
3826
|
-
function
|
|
3827
|
-
var
|
|
3828
|
-
return c(), p("div",
|
|
3829
|
-
|
|
3895
|
+
function ns(e, t, n, o, r, s) {
|
|
3896
|
+
var i, l, a, u, m, h, d;
|
|
3897
|
+
return c(), p("div", Qr, [
|
|
3898
|
+
z("video", C({
|
|
3830
3899
|
class: "builder-video",
|
|
3831
3900
|
preload: e.preload || "metadata",
|
|
3832
3901
|
style: {
|
|
3833
3902
|
width: "100%",
|
|
3834
3903
|
height: "100%",
|
|
3835
|
-
...(
|
|
3904
|
+
...(i = e.attributes) == null ? void 0 : i.style,
|
|
3836
3905
|
objectFit: e.fit,
|
|
3837
3906
|
objectPosition: e.position,
|
|
3838
3907
|
// Hack to get object fit to work as expected and
|
|
@@ -3850,8 +3919,8 @@ function Kr(e, t, n, o, r, i) {
|
|
|
3850
3919
|
key: 0,
|
|
3851
3920
|
type: "video/mp4",
|
|
3852
3921
|
src: e.video
|
|
3853
|
-
}, null, 8,
|
|
3854
|
-
], 16,
|
|
3922
|
+
}, null, 8, _r))
|
|
3923
|
+
], 16, Zr),
|
|
3855
3924
|
e.aspectRatio && !(e.fitContent && ((a = (l = e.builderBlock) == null ? void 0 : l.children) != null && a.length)) ? (c(), p("div", {
|
|
3856
3925
|
key: 0,
|
|
3857
3926
|
style: D({
|
|
@@ -3861,72 +3930,72 @@ function Kr(e, t, n, o, r, i) {
|
|
|
3861
3930
|
fontSize: "0px"
|
|
3862
3931
|
})
|
|
3863
3932
|
}, null, 4)) : v("", !0),
|
|
3864
|
-
(m = (u = e.builderBlock) == null ? void 0 : u.children) != null && m.length && e.fitContent ? (c(), p("div",
|
|
3933
|
+
(m = (u = e.builderBlock) == null ? void 0 : u.children) != null && m.length && e.fitContent ? (c(), p("div", es, [
|
|
3865
3934
|
x(e.$slots, "default")
|
|
3866
3935
|
])) : v("", !0),
|
|
3867
|
-
(d = (h = e.builderBlock) == null ? void 0 : h.children) != null && d.length && !e.fitContent ? (c(), p("div",
|
|
3936
|
+
(d = (h = e.builderBlock) == null ? void 0 : h.children) != null && d.length && !e.fitContent ? (c(), p("div", ts, [
|
|
3868
3937
|
x(e.$slots, "default")
|
|
3869
3938
|
])) : v("", !0)
|
|
3870
3939
|
]);
|
|
3871
3940
|
}
|
|
3872
|
-
const
|
|
3873
|
-
component:
|
|
3874
|
-
...zo
|
|
3875
|
-
}, {
|
|
3876
|
-
component: or,
|
|
3877
|
-
...Qo
|
|
3878
|
-
}, {
|
|
3879
|
-
component: ur,
|
|
3941
|
+
const os = /* @__PURE__ */ g(Xr, [["render", ns]]), rs = () => [{
|
|
3942
|
+
component: lr,
|
|
3880
3943
|
...rr
|
|
3881
3944
|
}, {
|
|
3882
|
-
component:
|
|
3883
|
-
...
|
|
3945
|
+
component: fr,
|
|
3946
|
+
...cr
|
|
3884
3947
|
}, {
|
|
3885
|
-
component:
|
|
3886
|
-
...
|
|
3948
|
+
component: Tr,
|
|
3949
|
+
...br
|
|
3887
3950
|
}, {
|
|
3888
|
-
component:
|
|
3889
|
-
...
|
|
3951
|
+
component: Er,
|
|
3952
|
+
...wr
|
|
3890
3953
|
}, {
|
|
3891
|
-
component:
|
|
3892
|
-
...
|
|
3954
|
+
component: Or,
|
|
3955
|
+
...Nr
|
|
3893
3956
|
}, {
|
|
3894
|
-
component:
|
|
3895
|
-
...
|
|
3957
|
+
component: Wr,
|
|
3958
|
+
...Pr
|
|
3896
3959
|
}, {
|
|
3897
|
-
component:
|
|
3898
|
-
...
|
|
3899
|
-
}], Re = () => [{
|
|
3900
|
-
component: Rt,
|
|
3901
|
-
...Io
|
|
3960
|
+
component: jr,
|
|
3961
|
+
...Lr
|
|
3902
3962
|
}, {
|
|
3903
|
-
component:
|
|
3904
|
-
|
|
3963
|
+
component: Jr,
|
|
3964
|
+
...Kr
|
|
3905
3965
|
}, {
|
|
3906
|
-
component:
|
|
3907
|
-
...
|
|
3966
|
+
component: os,
|
|
3967
|
+
...Yr
|
|
3968
|
+
}], Be = () => [{
|
|
3969
|
+
component: At,
|
|
3970
|
+
...Fo
|
|
3908
3971
|
}, {
|
|
3909
3972
|
component: fo,
|
|
3910
|
-
...
|
|
3973
|
+
...Do
|
|
3911
3974
|
}, {
|
|
3912
3975
|
component: yo,
|
|
3913
|
-
...
|
|
3976
|
+
...Oo
|
|
3914
3977
|
}, {
|
|
3915
|
-
component:
|
|
3916
|
-
...
|
|
3978
|
+
component: $o,
|
|
3979
|
+
...Uo
|
|
3917
3980
|
}, {
|
|
3918
|
-
component:
|
|
3919
|
-
...
|
|
3981
|
+
component: Po,
|
|
3982
|
+
...Ho
|
|
3920
3983
|
}, {
|
|
3921
3984
|
component: qo,
|
|
3922
|
-
...
|
|
3985
|
+
...Mo
|
|
3986
|
+
}, {
|
|
3987
|
+
component: Hs,
|
|
3988
|
+
...zo
|
|
3989
|
+
}, {
|
|
3990
|
+
component: or,
|
|
3991
|
+
..._o
|
|
3923
3992
|
}, {
|
|
3924
|
-
component:
|
|
3925
|
-
...
|
|
3993
|
+
component: Zo,
|
|
3994
|
+
...Go
|
|
3926
3995
|
}, {
|
|
3927
|
-
component:
|
|
3928
|
-
...
|
|
3929
|
-
}, ...
|
|
3996
|
+
component: No,
|
|
3997
|
+
...Bo
|
|
3998
|
+
}, ...rs()], ss = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
3930
3999
|
function getAndSetVariantId() {
|
|
3931
4000
|
function setCookie(name, value, days) {
|
|
3932
4001
|
let expires = '';
|
|
@@ -3982,7 +4051,7 @@ const qr = /* @__PURE__ */ g(Or, [["render", Kr]]), zr = () => [{
|
|
|
3982
4051
|
}).join('');
|
|
3983
4052
|
styleEl.innerHTML = newStyleStr;
|
|
3984
4053
|
}
|
|
3985
|
-
}`,
|
|
4054
|
+
}`, is = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
3986
4055
|
if (!navigator.cookieEnabled) {
|
|
3987
4056
|
return;
|
|
3988
4057
|
}
|
|
@@ -4016,27 +4085,27 @@ const qr = /* @__PURE__ */ g(Or, [["render", Kr]]), zr = () => [{
|
|
|
4016
4085
|
thisScriptEl?.remove();
|
|
4017
4086
|
}
|
|
4018
4087
|
return;
|
|
4019
|
-
}`,
|
|
4088
|
+
}`, dt = "builderIoAbTest", ut = "builderIoRenderContent", Q = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
4020
4089
|
...t,
|
|
4021
4090
|
testVariationId: t.id,
|
|
4022
4091
|
id: e == null ? void 0 : e.id
|
|
4023
|
-
})),
|
|
4092
|
+
})), as = ({
|
|
4024
4093
|
canTrack: e,
|
|
4025
4094
|
content: t
|
|
4026
|
-
}) => !(!(Q(t).length > 0) || !e),
|
|
4027
|
-
window.${
|
|
4028
|
-
window.${
|
|
4029
|
-
`,
|
|
4030
|
-
window.${
|
|
4031
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
4032
|
-
)`,
|
|
4095
|
+
}) => !(!(Q(t).length > 0) || !e), ls = (e) => e === "react" || e === "reactNative", pt = ls(E), cs = () => `
|
|
4096
|
+
window.${dt} = ${ss}
|
|
4097
|
+
window.${ut} = ${is}
|
|
4098
|
+
`, ds = (e, t) => `
|
|
4099
|
+
window.${dt}(
|
|
4100
|
+
"${t}",${JSON.stringify(e)}, ${pt}
|
|
4101
|
+
)`, us = ({
|
|
4033
4102
|
contentId: e,
|
|
4034
4103
|
variationId: t
|
|
4035
|
-
}) => `window.${
|
|
4036
|
-
"${t}", "${e}", ${
|
|
4037
|
-
)`,
|
|
4104
|
+
}) => `window.${ut}(
|
|
4105
|
+
"${t}", "${e}", ${pt}
|
|
4106
|
+
)`, mt = b({
|
|
4038
4107
|
render() {
|
|
4039
|
-
return
|
|
4108
|
+
return Ve("script", {
|
|
4040
4109
|
innerHTML: this.scriptStr,
|
|
4041
4110
|
"data-id": this.id,
|
|
4042
4111
|
nonce: this.nonce
|
|
@@ -4045,10 +4114,10 @@ const qr = /* @__PURE__ */ g(Or, [["render", Kr]]), zr = () => [{
|
|
|
4045
4114
|
name: "inlined-script",
|
|
4046
4115
|
props: ["scriptStr", "id", "nonce"]
|
|
4047
4116
|
});
|
|
4048
|
-
function
|
|
4117
|
+
function xe(e) {
|
|
4049
4118
|
return Math.round(e * 1e3) / 1e3;
|
|
4050
4119
|
}
|
|
4051
|
-
const
|
|
4120
|
+
const ps = (e, t, n = !0) => {
|
|
4052
4121
|
if (!(e instanceof HTMLElement))
|
|
4053
4122
|
return null;
|
|
4054
4123
|
let o = n ? e : e.parentElement;
|
|
@@ -4059,37 +4128,37 @@ const es = (e, t, n = !0) => {
|
|
|
4059
4128
|
return o;
|
|
4060
4129
|
} while (o = o.parentElement);
|
|
4061
4130
|
return null;
|
|
4062
|
-
},
|
|
4131
|
+
}, ms = (e) => ps(e, (t) => {
|
|
4063
4132
|
const n = t.getAttribute("builder-id") || t.id;
|
|
4064
4133
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
4065
|
-
}),
|
|
4134
|
+
}), Ae = ({
|
|
4066
4135
|
event: e,
|
|
4067
4136
|
target: t
|
|
4068
4137
|
}) => {
|
|
4069
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top,
|
|
4138
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, s = xe(o / n.width), i = xe(r / n.height);
|
|
4070
4139
|
return {
|
|
4071
|
-
x:
|
|
4072
|
-
y:
|
|
4140
|
+
x: s,
|
|
4141
|
+
y: i
|
|
4073
4142
|
};
|
|
4074
|
-
},
|
|
4075
|
-
const t = e.target, n = t &&
|
|
4143
|
+
}, hs = (e) => {
|
|
4144
|
+
const t = e.target, n = t && ms(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
4076
4145
|
return {
|
|
4077
4146
|
targetBuilderElement: o || void 0,
|
|
4078
4147
|
metadata: {
|
|
4079
|
-
targetOffset: t ?
|
|
4148
|
+
targetOffset: t ? Ae({
|
|
4080
4149
|
event: e,
|
|
4081
4150
|
target: t
|
|
4082
4151
|
}) : void 0,
|
|
4083
|
-
builderTargetOffset: n ?
|
|
4152
|
+
builderTargetOffset: n ? Ae({
|
|
4084
4153
|
event: e,
|
|
4085
4154
|
target: n
|
|
4086
4155
|
}) : void 0,
|
|
4087
4156
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
4088
4157
|
}
|
|
4089
4158
|
};
|
|
4090
|
-
},
|
|
4091
|
-
var
|
|
4092
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((
|
|
4159
|
+
}, fs = ["svelte", "qwik", "vue"], bs = () => fs.includes(E) && (P() || Le()), gs = (e) => {
|
|
4160
|
+
var s;
|
|
4161
|
+
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
4162
|
let r = "";
|
|
4094
4163
|
if (o && t && n && (r += `
|
|
4095
4164
|
@font-face {
|
|
@@ -4099,29 +4168,29 @@ font-display: fallback;
|
|
|
4099
4168
|
font-weight: 400;
|
|
4100
4169
|
}
|
|
4101
4170
|
`.trim()), e.files)
|
|
4102
|
-
for (const
|
|
4103
|
-
if (!(String(Number(
|
|
4171
|
+
for (const i in e.files) {
|
|
4172
|
+
if (!(String(Number(i)) === i))
|
|
4104
4173
|
continue;
|
|
4105
|
-
const a = e.files[
|
|
4174
|
+
const a = e.files[i];
|
|
4106
4175
|
a && a !== o && (r += `
|
|
4107
4176
|
@font-face {
|
|
4108
4177
|
font-family: "${t}";
|
|
4109
4178
|
src: url('${a}') format('woff2');
|
|
4110
4179
|
font-display: fallback;
|
|
4111
|
-
font-weight: ${
|
|
4180
|
+
font-weight: ${i};
|
|
4112
4181
|
}
|
|
4113
4182
|
`.trim());
|
|
4114
4183
|
}
|
|
4115
4184
|
return r;
|
|
4116
|
-
},
|
|
4185
|
+
}, ys = ({
|
|
4117
4186
|
customFonts: e
|
|
4118
4187
|
}) => {
|
|
4119
4188
|
var t;
|
|
4120
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
4121
|
-
},
|
|
4189
|
+
return ((t = e == null ? void 0 : e.map((n) => gs(n))) == null ? void 0 : t.join(" ")) || "";
|
|
4190
|
+
}, ks = ({
|
|
4122
4191
|
cssCode: e,
|
|
4123
4192
|
contentId: t
|
|
4124
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
4193
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", vs = `
|
|
4125
4194
|
.builder-button {
|
|
4126
4195
|
all: unset;
|
|
4127
4196
|
}
|
|
@@ -4138,9 +4207,9 @@ font-weight: ${s};
|
|
|
4138
4207
|
text-align: inherit;
|
|
4139
4208
|
font-family: inherit;
|
|
4140
4209
|
}
|
|
4141
|
-
`,
|
|
4210
|
+
`, Ss = (e) => e ? "" : vs, Cs = (e) => `variant-${e}`, Ts = b({
|
|
4142
4211
|
name: "enable-editor",
|
|
4143
|
-
components: { DynamicDiv:
|
|
4212
|
+
components: { DynamicDiv: X },
|
|
4144
4213
|
props: [
|
|
4145
4214
|
"isNestedRender",
|
|
4146
4215
|
"builderContextSignal",
|
|
@@ -4152,10 +4221,10 @@ font-weight: ${s};
|
|
|
4152
4221
|
"trustedHosts",
|
|
4153
4222
|
"model",
|
|
4154
4223
|
"content",
|
|
4224
|
+
"context",
|
|
4155
4225
|
"data",
|
|
4156
4226
|
"showContent",
|
|
4157
4227
|
"contentWrapper",
|
|
4158
|
-
"context",
|
|
4159
4228
|
"contentWrapperProps"
|
|
4160
4229
|
],
|
|
4161
4230
|
data() {
|
|
@@ -4164,14 +4233,15 @@ font-weight: ${s};
|
|
|
4164
4233
|
httpReqsData: {},
|
|
4165
4234
|
httpReqsPending: {},
|
|
4166
4235
|
clicked: !1,
|
|
4167
|
-
builderContext:
|
|
4168
|
-
|
|
4236
|
+
builderContext: le,
|
|
4237
|
+
needsElementRefDivForEditing: bs,
|
|
4238
|
+
getWrapperClassName: Cs
|
|
4169
4239
|
};
|
|
4170
4240
|
},
|
|
4171
4241
|
provide() {
|
|
4172
4242
|
const e = this;
|
|
4173
4243
|
return {
|
|
4174
|
-
[
|
|
4244
|
+
[le.key]: e.builderContextSignal
|
|
4175
4245
|
};
|
|
4176
4246
|
},
|
|
4177
4247
|
created() {
|
|
@@ -4179,21 +4249,21 @@ font-weight: ${s};
|
|
|
4179
4249
|
},
|
|
4180
4250
|
mounted() {
|
|
4181
4251
|
var e, t;
|
|
4182
|
-
if (
|
|
4252
|
+
if ($()) {
|
|
4183
4253
|
if (P() && !this.isNestedRender && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4184
4254
|
new CustomEvent("initeditingbldr")
|
|
4185
|
-
), this.builderContextSignal.content &&
|
|
4186
|
-
const o = (e = this.builderContextSignal.content) == null ? void 0 : e.testVariationId, r = (t = this.builderContextSignal.content) == null ? void 0 : t.id,
|
|
4187
|
-
|
|
4255
|
+
), this.builderContextSignal.content && J(this.canTrack)) {
|
|
4256
|
+
const o = (e = this.builderContextSignal.content) == null ? void 0 : e.testVariationId, r = (t = this.builderContextSignal.content) == null ? void 0 : t.id, s = this.apiKey;
|
|
4257
|
+
de({
|
|
4188
4258
|
apiHost: this.apiHost,
|
|
4189
4259
|
type: "impression",
|
|
4190
4260
|
canTrack: !0,
|
|
4191
4261
|
contentId: r,
|
|
4192
|
-
apiKey:
|
|
4262
|
+
apiKey: s,
|
|
4193
4263
|
variationId: o !== r ? o : void 0
|
|
4194
4264
|
});
|
|
4195
4265
|
}
|
|
4196
|
-
|
|
4266
|
+
Le() && !P() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4197
4267
|
new CustomEvent("initpreviewingbldr")
|
|
4198
4268
|
);
|
|
4199
4269
|
}
|
|
@@ -4227,7 +4297,7 @@ font-weight: ${s};
|
|
|
4227
4297
|
}
|
|
4228
4298
|
},
|
|
4229
4299
|
unmounted() {
|
|
4230
|
-
|
|
4300
|
+
$() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
|
|
4231
4301
|
"builder:component:stateChangeListenerActivated",
|
|
4232
4302
|
this.emitStateUpdate
|
|
4233
4303
|
));
|
|
@@ -4270,7 +4340,7 @@ font-weight: ${s};
|
|
|
4270
4340
|
this.builderContextSignal.rootSetState ? (o = (n = this.builderContextSignal).rootSetState) == null || o.call(n, t) : this.builderContextSignal.rootState = t;
|
|
4271
4341
|
},
|
|
4272
4342
|
mergeNewContent(e) {
|
|
4273
|
-
var n, o, r,
|
|
4343
|
+
var n, o, r, s, i;
|
|
4274
4344
|
const t = {
|
|
4275
4345
|
...this.builderContextSignal.content,
|
|
4276
4346
|
...e,
|
|
@@ -4281,13 +4351,13 @@ font-weight: ${s};
|
|
|
4281
4351
|
meta: {
|
|
4282
4352
|
...(o = this.builderContextSignal.content) == null ? void 0 : o.meta,
|
|
4283
4353
|
...e == null ? void 0 : e.meta,
|
|
4284
|
-
breakpoints: ((r = e == null ? void 0 : e.meta) == null ? void 0 : r.breakpoints) || ((
|
|
4354
|
+
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
4355
|
}
|
|
4286
4356
|
};
|
|
4287
4357
|
this.builderContextSignal.content = t;
|
|
4288
4358
|
},
|
|
4289
4359
|
processMessage(e) {
|
|
4290
|
-
return
|
|
4360
|
+
return Ze({
|
|
4291
4361
|
model: this.model,
|
|
4292
4362
|
trustedHosts: this.trustedHosts,
|
|
4293
4363
|
callbacks: {
|
|
@@ -4301,7 +4371,7 @@ font-weight: ${s};
|
|
|
4301
4371
|
});
|
|
4302
4372
|
},
|
|
4303
4373
|
animation: (t) => {
|
|
4304
|
-
|
|
4374
|
+
st(t);
|
|
4305
4375
|
},
|
|
4306
4376
|
contentUpdate: (t) => {
|
|
4307
4377
|
this.mergeNewContent(t);
|
|
@@ -4313,14 +4383,14 @@ font-weight: ${s};
|
|
|
4313
4383
|
var t, n;
|
|
4314
4384
|
if (this.builderContextSignal.content) {
|
|
4315
4385
|
const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, r = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
|
|
4316
|
-
|
|
4386
|
+
de({
|
|
4317
4387
|
apiHost: this.apiHost,
|
|
4318
4388
|
type: "click",
|
|
4319
|
-
canTrack:
|
|
4389
|
+
canTrack: J(this.canTrack),
|
|
4320
4390
|
contentId: r,
|
|
4321
4391
|
apiKey: this.apiKey,
|
|
4322
4392
|
variationId: o !== r ? o : void 0,
|
|
4323
|
-
...
|
|
4393
|
+
...hs(e),
|
|
4324
4394
|
unique: !this.clicked
|
|
4325
4395
|
});
|
|
4326
4396
|
}
|
|
@@ -4333,10 +4403,10 @@ font-weight: ${s};
|
|
|
4333
4403
|
if (!r || this.httpReqsPending[o] || this.httpReqsData[o] && !P())
|
|
4334
4404
|
return;
|
|
4335
4405
|
this.httpReqsPending[o] = !0;
|
|
4336
|
-
const
|
|
4406
|
+
const s = r.replace(
|
|
4337
4407
|
/{{([^}]+)}}/g,
|
|
4338
|
-
(
|
|
4339
|
-
|
|
4408
|
+
(i, l) => String(
|
|
4409
|
+
Y({
|
|
4340
4410
|
code: l,
|
|
4341
4411
|
context: this.context || {},
|
|
4342
4412
|
localState: void 0,
|
|
@@ -4345,12 +4415,12 @@ font-weight: ${s};
|
|
|
4345
4415
|
})
|
|
4346
4416
|
)
|
|
4347
4417
|
);
|
|
4348
|
-
|
|
4418
|
+
he(s), fetch(s).then((i) => i.json()).then((i) => {
|
|
4349
4419
|
this.mergeNewRootState({
|
|
4350
|
-
[o]:
|
|
4420
|
+
[o]: i
|
|
4351
4421
|
}), this.httpReqsData[o] = !0;
|
|
4352
|
-
}).catch((
|
|
4353
|
-
console.error("error fetching dynamic data", r,
|
|
4422
|
+
}).catch((i) => {
|
|
4423
|
+
console.error("error fetching dynamic data", r, i);
|
|
4354
4424
|
}).finally(() => {
|
|
4355
4425
|
this.httpReqsPending[o] = !1;
|
|
4356
4426
|
});
|
|
@@ -4362,7 +4432,7 @@ font-weight: ${s};
|
|
|
4362
4432
|
"builder:component:stateChange",
|
|
4363
4433
|
{
|
|
4364
4434
|
detail: {
|
|
4365
|
-
state:
|
|
4435
|
+
state: pe(this.builderContextSignal.rootState),
|
|
4366
4436
|
ref: {
|
|
4367
4437
|
name: this.model
|
|
4368
4438
|
}
|
|
@@ -4372,7 +4442,7 @@ font-weight: ${s};
|
|
|
4372
4442
|
);
|
|
4373
4443
|
},
|
|
4374
4444
|
elementRef_onIniteditingbldr(e) {
|
|
4375
|
-
window.addEventListener("message", this.processMessage),
|
|
4445
|
+
window.addEventListener("message", this.processMessage), yn(), Qe({
|
|
4376
4446
|
...this.locale ? {
|
|
4377
4447
|
locale: this.locale
|
|
4378
4448
|
} : {},
|
|
@@ -4385,37 +4455,48 @@ font-weight: ${s};
|
|
|
4385
4455
|
}), Object.values(
|
|
4386
4456
|
this.builderContextSignal.componentInfos
|
|
4387
4457
|
).forEach((t) => {
|
|
4388
|
-
var o;
|
|
4389
|
-
|
|
4390
|
-
|
|
4458
|
+
var n, o;
|
|
4459
|
+
if (!this.model || !((n = t.models) != null && n.length) || t.models.includes(this.model)) {
|
|
4460
|
+
const r = Xt(t);
|
|
4461
|
+
(o = window.parent) == null || o.postMessage(r, "*");
|
|
4462
|
+
}
|
|
4391
4463
|
}), window.addEventListener(
|
|
4392
4464
|
"builder:component:stateChangeListenerActivated",
|
|
4393
4465
|
this.emitStateUpdate
|
|
4394
4466
|
);
|
|
4395
4467
|
},
|
|
4396
4468
|
elementRef_onInitpreviewingbldr(e) {
|
|
4469
|
+
var s;
|
|
4397
4470
|
const t = new URL(location.href).searchParams, n = t.get("builder.preview"), o = t.get(
|
|
4398
4471
|
`builder.overrides.${n}`
|
|
4399
4472
|
), r = t.get("apiKey") || t.get("builder.space");
|
|
4400
|
-
n === this.model && r === this.apiKey && (!this.content || o === this.content.id) &&
|
|
4401
|
-
model: this.model,
|
|
4473
|
+
(n === "BUILDER_STUDIO" || n === this.model && r === this.apiKey && (!this.content || o === this.content.id)) && ge({
|
|
4474
|
+
model: this.model || "",
|
|
4402
4475
|
apiKey: this.apiKey,
|
|
4403
|
-
apiVersion: this.builderContextSignal.apiVersion
|
|
4476
|
+
apiVersion: this.builderContextSignal.apiVersion,
|
|
4477
|
+
...n === "BUILDER_STUDIO" && ((s = this.context) != null && s.symbolId) ? {
|
|
4478
|
+
query: {
|
|
4479
|
+
id: this.context.symbolId
|
|
4480
|
+
}
|
|
4481
|
+
} : {}
|
|
4404
4482
|
}).then((i) => {
|
|
4405
4483
|
i && this.mergeNewContent(i);
|
|
4406
4484
|
});
|
|
4407
4485
|
}
|
|
4408
4486
|
}
|
|
4409
4487
|
});
|
|
4410
|
-
function
|
|
4411
|
-
var
|
|
4412
|
-
return e.builderContextSignal.content ? (c(), y(
|
|
4488
|
+
function ws(e, t, n, o, r, s) {
|
|
4489
|
+
var i, l, a;
|
|
4490
|
+
return e.builderContextSignal.content || e.needsElementRefDivForEditing() ? (c(), y(K(e.ContentWrapper), C({
|
|
4413
4491
|
key: 0,
|
|
4414
4492
|
ref: "elementRef",
|
|
4415
4493
|
onClick: (u) => e.onClick(u),
|
|
4416
|
-
"builder-content-id": (
|
|
4494
|
+
"builder-content-id": (i = e.builderContextSignal.content) == null ? void 0 : i.id,
|
|
4417
4495
|
"builder-model": e.model,
|
|
4418
4496
|
className: e.getWrapperClassName(((l = e.content) == null ? void 0 : l.testVariationId) || ((a = e.content) == null ? void 0 : a.id)),
|
|
4497
|
+
style: {
|
|
4498
|
+
display: !e.builderContextSignal.content && e.needsElementRefDivForEditing() ? "none" : void 0
|
|
4499
|
+
},
|
|
4419
4500
|
onIniteditingbldr: (u) => e.elementRef_onIniteditingbldr(u),
|
|
4420
4501
|
onInitpreviewingbldr: (u) => e.elementRef_onInitpreviewingbldr(u)
|
|
4421
4502
|
}, { ...e.showContentProps, ...e.contentWrapperProps }), {
|
|
@@ -4423,43 +4504,43 @@ function ds(e, t, n, o, r, i) {
|
|
|
4423
4504
|
x(e.$slots, "default")
|
|
4424
4505
|
]),
|
|
4425
4506
|
_: 3
|
|
4426
|
-
}, 16, ["onClick", "builder-content-id", "builder-model", "className", "onIniteditingbldr", "onInitpreviewingbldr"])) : v("", !0);
|
|
4507
|
+
}, 16, ["onClick", "builder-content-id", "builder-model", "className", "style", "onIniteditingbldr", "onInitpreviewingbldr"])) : v("", !0);
|
|
4427
4508
|
}
|
|
4428
|
-
const
|
|
4509
|
+
const Is = /* @__PURE__ */ g(Ts, [["render", ws]]), $s = b({
|
|
4429
4510
|
name: "content-styles",
|
|
4430
|
-
components: { InlinedStyles:
|
|
4511
|
+
components: { InlinedStyles: ve },
|
|
4431
4512
|
props: ["cssCode", "contentId", "customFonts", "isNestedRender", "nonce"],
|
|
4432
4513
|
data() {
|
|
4433
4514
|
return {
|
|
4434
4515
|
injectedStyles: `
|
|
4435
|
-
${
|
|
4516
|
+
${ks({
|
|
4436
4517
|
cssCode: this.cssCode,
|
|
4437
4518
|
contentId: this.contentId
|
|
4438
4519
|
})}
|
|
4439
|
-
${
|
|
4520
|
+
${ys({
|
|
4440
4521
|
customFonts: this.customFonts
|
|
4441
4522
|
})}
|
|
4442
|
-
${
|
|
4523
|
+
${Ss(this.isNestedRender)}
|
|
4443
4524
|
`.trim()
|
|
4444
4525
|
};
|
|
4445
4526
|
}
|
|
4446
4527
|
});
|
|
4447
|
-
function
|
|
4448
|
-
const
|
|
4449
|
-
return c(), y(
|
|
4528
|
+
function Rs(e, t, n, o, r, s) {
|
|
4529
|
+
const i = k("InlinedStyles");
|
|
4530
|
+
return c(), y(i, {
|
|
4450
4531
|
id: "builderio-content",
|
|
4451
4532
|
styles: e.injectedStyles,
|
|
4452
4533
|
nonce: e.nonce
|
|
4453
4534
|
}, null, 8, ["styles", "nonce"]);
|
|
4454
4535
|
}
|
|
4455
|
-
const
|
|
4536
|
+
const Es = /* @__PURE__ */ g($s, [["render", Rs]]), Ps = ({
|
|
4456
4537
|
content: e,
|
|
4457
4538
|
data: t,
|
|
4458
4539
|
locale: n
|
|
4459
4540
|
}) => {
|
|
4460
|
-
var
|
|
4461
|
-
const o = {}, r = ((
|
|
4462
|
-
return (l = (
|
|
4541
|
+
var s, i, l;
|
|
4542
|
+
const o = {}, r = ((s = e == null ? void 0 : e.data) == null ? void 0 : s.state) || {};
|
|
4543
|
+
return (l = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || l.forEach((a) => {
|
|
4463
4544
|
a.name && a.defaultValue !== void 0 && (o[a.name] = a.defaultValue);
|
|
4464
4545
|
}), {
|
|
4465
4546
|
...o,
|
|
@@ -4469,7 +4550,7 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4469
4550
|
locale: n
|
|
4470
4551
|
} : {}
|
|
4471
4552
|
};
|
|
4472
|
-
},
|
|
4553
|
+
}, Bs = ({
|
|
4473
4554
|
content: e,
|
|
4474
4555
|
data: t
|
|
4475
4556
|
}) => e ? {
|
|
@@ -4479,21 +4560,20 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4479
4560
|
...t
|
|
4480
4561
|
},
|
|
4481
4562
|
meta: e == null ? void 0 : e.meta
|
|
4482
|
-
} : void 0,
|
|
4563
|
+
} : void 0, xs = gt, As = b({
|
|
4483
4564
|
name: "content-component",
|
|
4484
4565
|
components: {
|
|
4485
|
-
EnableEditor:
|
|
4486
|
-
InlinedScript:
|
|
4487
|
-
ContentStyles:
|
|
4488
|
-
Blocks:
|
|
4489
|
-
DynamicDiv:
|
|
4566
|
+
EnableEditor: Is,
|
|
4567
|
+
InlinedScript: mt,
|
|
4568
|
+
ContentStyles: Es,
|
|
4569
|
+
Blocks: H,
|
|
4570
|
+
DynamicDiv: X
|
|
4490
4571
|
},
|
|
4491
4572
|
props: [
|
|
4492
4573
|
"apiKey",
|
|
4493
4574
|
"context",
|
|
4494
4575
|
"content",
|
|
4495
4576
|
"customComponents",
|
|
4496
|
-
"model",
|
|
4497
4577
|
"data",
|
|
4498
4578
|
"locale",
|
|
4499
4579
|
"canTrack",
|
|
@@ -4501,6 +4581,7 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4501
4581
|
"blocksWrapper",
|
|
4502
4582
|
"blocksWrapperProps",
|
|
4503
4583
|
"nonce",
|
|
4584
|
+
"model",
|
|
4504
4585
|
"apiHost",
|
|
4505
4586
|
"enrich",
|
|
4506
4587
|
"showContent",
|
|
@@ -4512,34 +4593,34 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4512
4593
|
"linkComponent"
|
|
4513
4594
|
],
|
|
4514
4595
|
data() {
|
|
4515
|
-
var e, t
|
|
4596
|
+
var e, t;
|
|
4516
4597
|
return {
|
|
4517
|
-
scriptStr:
|
|
4598
|
+
scriptStr: us({
|
|
4518
4599
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
4519
4600
|
variationId: (e = this.content) == null ? void 0 : e.testVariationId,
|
|
4520
4601
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
4521
4602
|
contentId: (t = this.content) == null ? void 0 : t.id
|
|
4522
4603
|
}),
|
|
4523
4604
|
registeredComponents: [
|
|
4524
|
-
...
|
|
4525
|
-
...
|
|
4605
|
+
...Be(),
|
|
4606
|
+
...this.customComponents || []
|
|
4526
4607
|
].reduce(
|
|
4527
|
-
(
|
|
4528
|
-
...
|
|
4529
|
-
[
|
|
4530
|
-
component:
|
|
4531
|
-
...
|
|
4608
|
+
(n, { component: o, ...r }) => ({
|
|
4609
|
+
...n,
|
|
4610
|
+
[r.name]: {
|
|
4611
|
+
component: xs(o),
|
|
4612
|
+
...ee(r)
|
|
4532
4613
|
}
|
|
4533
4614
|
}),
|
|
4534
4615
|
{}
|
|
4535
4616
|
),
|
|
4536
4617
|
builderContextSignal: {
|
|
4537
|
-
content:
|
|
4618
|
+
content: Bs({
|
|
4538
4619
|
content: this.content,
|
|
4539
4620
|
data: this.data
|
|
4540
4621
|
}),
|
|
4541
4622
|
localState: void 0,
|
|
4542
|
-
rootState:
|
|
4623
|
+
rootState: Ps({
|
|
4543
4624
|
content: this.content,
|
|
4544
4625
|
data: this.data,
|
|
4545
4626
|
locale: this.locale
|
|
@@ -4550,19 +4631,20 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4550
4631
|
apiKey: this.apiKey,
|
|
4551
4632
|
apiVersion: this.apiVersion,
|
|
4552
4633
|
componentInfos: [
|
|
4553
|
-
...
|
|
4554
|
-
...
|
|
4634
|
+
...Be(),
|
|
4635
|
+
...this.customComponents || []
|
|
4555
4636
|
].reduce(
|
|
4556
|
-
(
|
|
4557
|
-
...
|
|
4558
|
-
[
|
|
4637
|
+
(n, { component: o, ...r }) => ({
|
|
4638
|
+
...n,
|
|
4639
|
+
[r.name]: ee(r)
|
|
4559
4640
|
}),
|
|
4560
4641
|
{}
|
|
4561
4642
|
),
|
|
4562
4643
|
inheritedStyles: {},
|
|
4563
4644
|
BlocksWrapper: this.blocksWrapper || "div",
|
|
4564
4645
|
BlocksWrapperProps: this.blocksWrapperProps || {},
|
|
4565
|
-
nonce: this.nonce || ""
|
|
4646
|
+
nonce: this.nonce || "",
|
|
4647
|
+
model: this.model || ""
|
|
4566
4648
|
},
|
|
4567
4649
|
TARGET: E
|
|
4568
4650
|
};
|
|
@@ -4570,7 +4652,7 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4570
4652
|
provide() {
|
|
4571
4653
|
const e = this;
|
|
4572
4654
|
return {
|
|
4573
|
-
[
|
|
4655
|
+
[Fe.key]: {
|
|
4574
4656
|
registeredComponents: e.registeredComponents
|
|
4575
4657
|
}
|
|
4576
4658
|
};
|
|
@@ -4581,7 +4663,7 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4581
4663
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
4582
4664
|
);
|
|
4583
4665
|
const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
|
|
4584
|
-
e &&
|
|
4666
|
+
e && Y({
|
|
4585
4667
|
code: e,
|
|
4586
4668
|
context: this.context || {},
|
|
4587
4669
|
localState: void 0,
|
|
@@ -4598,8 +4680,8 @@ const hs = /* @__PURE__ */ g(ps, [["render", ms]]), fs = ({
|
|
|
4598
4680
|
}
|
|
4599
4681
|
}
|
|
4600
4682
|
});
|
|
4601
|
-
function
|
|
4602
|
-
const
|
|
4683
|
+
function Vs(e, t, n, o, r, s) {
|
|
4684
|
+
const i = k("InlinedScript"), l = k("ContentStyles"), a = k("Blocks"), u = k("EnableEditor");
|
|
4603
4685
|
return c(), y(u, C({
|
|
4604
4686
|
apiHost: e.apiHost,
|
|
4605
4687
|
nonce: e.nonce,
|
|
@@ -4621,7 +4703,7 @@ function ks(e, t, n, o, r, i) {
|
|
|
4621
4703
|
default: N(() => {
|
|
4622
4704
|
var m, h, d, f, S, T, O;
|
|
4623
4705
|
return [
|
|
4624
|
-
e.isSsrAbTest ? (c(), y(
|
|
4706
|
+
e.isSsrAbTest ? (c(), y(i, {
|
|
4625
4707
|
key: 0,
|
|
4626
4708
|
id: "builderio-variant-visibility",
|
|
4627
4709
|
scriptStr: e.scriptStr,
|
|
@@ -4635,7 +4717,7 @@ function ks(e, t, n, o, r, i) {
|
|
|
4635
4717
|
cssCode: (d = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : d.cssCode,
|
|
4636
4718
|
customFonts: (S = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : S.customFonts
|
|
4637
4719
|
}, null, 8, ["nonce", "isNestedRender", "contentId", "cssCode", "customFonts"])) : v("", !0),
|
|
4638
|
-
|
|
4720
|
+
R(a, {
|
|
4639
4721
|
blocks: (O = (T = e.builderContextSignal.content) == null ? void 0 : T.data) == null ? void 0 : O.blocks,
|
|
4640
4722
|
context: e.builderContextSignal,
|
|
4641
4723
|
registeredComponents: e.registeredComponents,
|
|
@@ -4646,12 +4728,12 @@ function ks(e, t, n, o, r, i) {
|
|
|
4646
4728
|
_: 1
|
|
4647
4729
|
}, 16, ["apiHost", "nonce", "content", "data", "model", "context", "apiKey", "canTrack", "locale", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "trustedHosts", "isNestedRender"]);
|
|
4648
4730
|
}
|
|
4649
|
-
const
|
|
4731
|
+
const Ws = /* @__PURE__ */ g(As, [["render", Vs]]), Ns = b({
|
|
4650
4732
|
name: "content-variants",
|
|
4651
4733
|
components: {
|
|
4652
|
-
InlinedScript:
|
|
4653
|
-
InlinedStyles:
|
|
4654
|
-
ContentComponent:
|
|
4734
|
+
InlinedScript: mt,
|
|
4735
|
+
InlinedStyles: ve,
|
|
4736
|
+
ContentComponent: Ws
|
|
4655
4737
|
},
|
|
4656
4738
|
props: [
|
|
4657
4739
|
"canTrack",
|
|
@@ -4676,12 +4758,12 @@ const vs = /* @__PURE__ */ g(ys, [["render", ks]]), Ss = b({
|
|
|
4676
4758
|
],
|
|
4677
4759
|
data() {
|
|
4678
4760
|
return {
|
|
4679
|
-
shouldRenderVariants:
|
|
4680
|
-
canTrack:
|
|
4761
|
+
shouldRenderVariants: as({
|
|
4762
|
+
canTrack: J(this.canTrack),
|
|
4681
4763
|
content: this.content
|
|
4682
4764
|
}),
|
|
4683
4765
|
TARGET: E,
|
|
4684
|
-
getInitVariantsFnsScriptString:
|
|
4766
|
+
getInitVariantsFnsScriptString: cs,
|
|
4685
4767
|
getVariants: Q
|
|
4686
4768
|
};
|
|
4687
4769
|
},
|
|
@@ -4690,7 +4772,7 @@ const vs = /* @__PURE__ */ g(ys, [["render", ks]]), Ss = b({
|
|
|
4690
4772
|
computed: {
|
|
4691
4773
|
updateCookieAndStylesScriptStr() {
|
|
4692
4774
|
var e;
|
|
4693
|
-
return
|
|
4775
|
+
return ds(
|
|
4694
4776
|
Q(this.content).map((t) => ({
|
|
4695
4777
|
id: t.testVariationId,
|
|
4696
4778
|
testRatio: t.testRatio
|
|
@@ -4706,29 +4788,29 @@ const vs = /* @__PURE__ */ g(ys, [["render", ks]]), Ss = b({
|
|
|
4706
4788
|
return this.shouldRenderVariants ? {
|
|
4707
4789
|
...this.content,
|
|
4708
4790
|
testVariationId: (e = this.content) == null ? void 0 : e.id
|
|
4709
|
-
} :
|
|
4791
|
+
} : wn({
|
|
4710
4792
|
item: this.content,
|
|
4711
|
-
canTrack:
|
|
4793
|
+
canTrack: J(this.canTrack)
|
|
4712
4794
|
});
|
|
4713
4795
|
}
|
|
4714
4796
|
}
|
|
4715
4797
|
});
|
|
4716
|
-
function
|
|
4717
|
-
const
|
|
4798
|
+
function Fs(e, t, n, o, r, s) {
|
|
4799
|
+
const i = k("InlinedScript"), l = k("InlinedStyles"), a = k("ContentComponent");
|
|
4718
4800
|
return c(), p(w, null, [
|
|
4719
|
-
!e.isNestedRender && e.TARGET !== "reactNative" ? (c(), y(
|
|
4801
|
+
!e.isNestedRender && e.TARGET !== "reactNative" ? (c(), y(i, {
|
|
4720
4802
|
key: 0,
|
|
4721
4803
|
id: "builderio-init-variants-fns",
|
|
4722
4804
|
scriptStr: e.getInitVariantsFnsScriptString(),
|
|
4723
4805
|
nonce: e.nonce || ""
|
|
4724
4806
|
}, null, 8, ["scriptStr", "nonce"])) : v("", !0),
|
|
4725
4807
|
e.shouldRenderVariants ? (c(), p(w, { key: 1 }, [
|
|
4726
|
-
|
|
4808
|
+
R(l, {
|
|
4727
4809
|
id: "builderio-variants",
|
|
4728
4810
|
styles: e.hideVariantsStyleString,
|
|
4729
4811
|
nonce: e.nonce || ""
|
|
4730
4812
|
}, null, 8, ["styles", "nonce"]),
|
|
4731
|
-
|
|
4813
|
+
R(i, {
|
|
4732
4814
|
id: "builderio-variants-visibility",
|
|
4733
4815
|
scriptStr: e.updateCookieAndStylesScriptStr,
|
|
4734
4816
|
nonce: e.nonce || ""
|
|
@@ -4758,7 +4840,7 @@ function Cs(e, t, n, o, r, i) {
|
|
|
4758
4840
|
trustedHosts: e.trustedHosts
|
|
4759
4841
|
}, {}), null, 16, ["apiHost", "isNestedRender", "nonce", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"]))), 128))
|
|
4760
4842
|
], 64)) : v("", !0),
|
|
4761
|
-
|
|
4843
|
+
R(a, C({
|
|
4762
4844
|
apiHost: e.apiHost,
|
|
4763
4845
|
nonce: e.nonce,
|
|
4764
4846
|
isNestedRender: e.isNestedRender,
|
|
@@ -4785,13 +4867,13 @@ function Cs(e, t, n, o, r, i) {
|
|
|
4785
4867
|
}), null, 16, ["apiHost", "nonce", "isNestedRender", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
4786
4868
|
], 64);
|
|
4787
4869
|
}
|
|
4788
|
-
const
|
|
4870
|
+
const Ds = /* @__PURE__ */ g(Ns, [["render", Fs]]), Os = async ({
|
|
4789
4871
|
builderContextValue: e,
|
|
4790
4872
|
symbol: t
|
|
4791
4873
|
}) => {
|
|
4792
4874
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
4793
4875
|
(e != null && e.apiKey))
|
|
4794
|
-
return
|
|
4876
|
+
return ge({
|
|
4795
4877
|
model: t.model,
|
|
4796
4878
|
apiKey: e.apiKey,
|
|
4797
4879
|
apiVersion: e.apiVersion,
|
|
@@ -4803,9 +4885,9 @@ const Ts = /* @__PURE__ */ g(Ss, [["render", Cs]]), ws = async ({
|
|
|
4803
4885
|
}).catch((n) => {
|
|
4804
4886
|
A.error("Could not fetch symbol content: ", n);
|
|
4805
4887
|
});
|
|
4806
|
-
},
|
|
4888
|
+
}, Ls = b({
|
|
4807
4889
|
name: "builder-symbol",
|
|
4808
|
-
components: { ContentVariants:
|
|
4890
|
+
components: { ContentVariants: Ds, DynamicDiv: X },
|
|
4809
4891
|
props: [
|
|
4810
4892
|
"symbol",
|
|
4811
4893
|
"attributes",
|
|
@@ -4854,7 +4936,7 @@ const Ts = /* @__PURE__ */ g(Ss, [["render", Cs]]), ws = async ({
|
|
|
4854
4936
|
},
|
|
4855
4937
|
methods: {
|
|
4856
4938
|
setContent() {
|
|
4857
|
-
this.contentToUse ||
|
|
4939
|
+
this.contentToUse || Os({
|
|
4858
4940
|
symbol: this.symbol,
|
|
4859
4941
|
builderContextValue: this.builderContext
|
|
4860
4942
|
}).then((e) => {
|
|
@@ -4863,11 +4945,11 @@ const Ts = /* @__PURE__ */ g(Ss, [["render", Cs]]), ws = async ({
|
|
|
4863
4945
|
}
|
|
4864
4946
|
}
|
|
4865
4947
|
});
|
|
4866
|
-
function
|
|
4948
|
+
function Us(e, t, n, o, r, s) {
|
|
4867
4949
|
var l, a, u, m, h;
|
|
4868
|
-
const
|
|
4950
|
+
const i = k("ContentVariants");
|
|
4869
4951
|
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
|
-
|
|
4952
|
+
R(i, {
|
|
4871
4953
|
nonce: e.builderContext.nonce,
|
|
4872
4954
|
isNestedRender: !0,
|
|
4873
4955
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -4891,41 +4973,41 @@ function $s(e, t, n, o, r, i) {
|
|
|
4891
4973
|
}, null, 8, ["nonce", "apiVersion", "apiKey", "context", "customComponents", "data", "canTrack", "model", "content", "linkComponent", "blocksWrapper", "contentWrapper"])
|
|
4892
4974
|
], 16);
|
|
4893
4975
|
}
|
|
4894
|
-
const
|
|
4976
|
+
const Hs = /* @__PURE__ */ g(Ls, [["render", Us]]);
|
|
4895
4977
|
export {
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4978
|
+
Qs as A,
|
|
4979
|
+
ke as B,
|
|
4980
|
+
fo as C,
|
|
4981
|
+
yo as F,
|
|
4982
|
+
$o as I,
|
|
4983
|
+
Po as S,
|
|
4984
|
+
or as T,
|
|
4985
|
+
os as V,
|
|
4986
|
+
ve as _,
|
|
4987
|
+
Zs as a,
|
|
4988
|
+
ye as b,
|
|
4989
|
+
Ys as c,
|
|
4908
4990
|
g as d,
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4991
|
+
Y as e,
|
|
4992
|
+
Xs as f,
|
|
4993
|
+
uo as g,
|
|
4912
4994
|
Z as h,
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4995
|
+
le as i,
|
|
4996
|
+
At as j,
|
|
4997
|
+
Hs as k,
|
|
4998
|
+
H as l,
|
|
4999
|
+
Ds as m,
|
|
5000
|
+
Le as n,
|
|
5001
|
+
Xt as o,
|
|
5002
|
+
Ue as p,
|
|
5003
|
+
Gs as q,
|
|
5004
|
+
Zt as r,
|
|
5005
|
+
qs as s,
|
|
5006
|
+
zs as t,
|
|
5007
|
+
Js as u,
|
|
5008
|
+
Nn as v,
|
|
5009
|
+
xs as w,
|
|
5010
|
+
Fn as x,
|
|
5011
|
+
ge as y,
|
|
5012
|
+
Ks as z
|
|
4931
5013
|
};
|