@builder.io/sdk-react 4.0.1 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +40 -37
- package/lib/browser/blocks-exports.mjs +859 -842
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-0e0758cb.cjs → server-entry-c40e781d.cjs} +2 -2
- package/lib/{node/server-entry-a017e97a.js → browser/server-entry-e6ae7704.js} +2 -2
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-02a74a7b.cjs → accordion-8934ef4b.cjs} +1 -1
- package/lib/edge/{accordion-46e5b47a.js → accordion-e657c96d.js} +1 -1
- package/lib/edge/{blocks-27f4c960.js → blocks-513223a7.js} +2 -2
- package/lib/edge/{blocks-43b7cd64.cjs → blocks-a6ffbf92.cjs} +1 -1
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-c26a8cc8.js → button-3522aac2.js} +2 -2
- package/lib/edge/{button-b1f2e20e.cjs → button-49563e3b.cjs} +1 -1
- package/lib/edge/{columns-5a3e9ac8.cjs → columns-092b6fac.cjs} +1 -1
- package/lib/edge/{columns-9a6cd1b4.js → columns-ea0b3b30.js} +3 -3
- package/lib/edge/{content-variants-3085ec74.js → content-variants-6c1e3b13.js} +316 -307
- package/lib/edge/content-variants-75ff40ca.cjs +137 -0
- package/lib/edge/custom-code-1a43bbd7.js +52 -0
- package/lib/edge/custom-code-ae3262be.cjs +1 -0
- package/lib/edge/embed-106f0066.js +38 -0
- package/lib/edge/embed-8d302933.cjs +1 -0
- package/lib/edge/{form-f2aa1c12.js → form-0c0d5bf5.js} +3 -3
- package/lib/edge/{form-bf3ca65d.cjs → form-46e4d997.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-7cdcaf94.cjs → get-class-prop-name-dad1ee7e.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-e41a3976.js → get-class-prop-name-e44df0c8.js} +1 -1
- package/lib/edge/{img-2a060e61.js → img-8bdeb666.js} +1 -1
- package/lib/edge/{img-2c718c5f.cjs → img-e49acb58.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-213f973c.cjs → input-92aaa4f2.cjs} +1 -1
- package/lib/edge/{input-f270ae3b.js → input-d6338de6.js} +1 -1
- package/lib/edge/{personalization-container-b85b14c3.js → personalization-container-1307218b.js} +4 -4
- package/lib/edge/{personalization-container-b03bc073.cjs → personalization-container-965bec51.cjs} +1 -1
- package/lib/edge/{select-e12e1a87.js → select-1538b41a.js} +1 -1
- package/lib/edge/{select-d6ff55b2.cjs → select-5ce728b4.cjs} +1 -1
- package/lib/edge/{server-entry-b94c45af.js → server-entry-2e94ad2c.js} +2 -1
- package/lib/edge/{server-entry-d0313f00.cjs → server-entry-46e686b9.cjs} +2 -2
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-5ee0ac5d.cjs → slot-3b6aa7ec.cjs} +1 -1
- package/lib/edge/{slot-2670ac48.js → slot-516f176d.js} +3 -3
- package/lib/edge/{symbol-a0b2e083.js → symbol-3b2e7ebf.js} +2 -2
- package/lib/edge/{symbol-7e58faf5.cjs → symbol-cd10b6f0.cjs} +1 -1
- package/lib/edge/{tabs-1f475bd4.cjs → tabs-cec51291.cjs} +1 -1
- package/lib/edge/{tabs-931291c4.js → tabs-f0945019.js} +3 -3
- package/lib/node/blocks-exports.cjs +40 -37
- package/lib/node/blocks-exports.mjs +831 -814
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-24943b12.cjs → server-entry-6b05381c.cjs} +2 -2
- package/lib/{browser/server-entry-403d3877.js → node/server-entry-c1000f54.js} +3 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-0a7e7bf0.js → setIvm-011d6eb2.js} +1 -1
- package/lib/node/{setIvm-dcd69a69.cjs → setIvm-4ae0308c.cjs} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-0ca8d8b1.cjs → should-force-browser-runtime-in-node-5d513614.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-c51ac820.js → should-force-browser-runtime-in-node-abf8d0a7.js} +1 -1
- package/package.json +1 -1
- package/types/components/content-variants/inlined-fns.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/lib/edge/content-variants-eff73ca9.cjs +0 -134
- package/lib/edge/custom-code-7786788e.js +0 -43
- package/lib/edge/custom-code-8119ea3f.cjs +0 -1
- package/lib/edge/embed-32bdd007.cjs +0 -1
- package/lib/edge/embed-5c1bbe12.js +0 -37
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { TARGET as
|
|
3
|
-
import { setClientUserAttributes as
|
|
4
|
-
import { jsx as s, Fragment as R, jsxs as
|
|
5
|
-
import * as
|
|
6
|
-
import { createContext as
|
|
7
|
-
import { getFunctionArguments as
|
|
8
|
-
import { shouldForceBrowserRuntimeInNode as
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
return /* @__PURE__ */ s(R, { children:
|
|
2
|
+
import { TARGET as O, isBrowser as U, logger as z, checkIsDefined as se, isPreviewing as X, isEditing as N, userAttributesService as be, getDefaultCanTrack as M, logFetch as Ve, registerInsertMenu as Ge, setupBrowserForEditing as Qe, createRegisterComponentMessage as Ye, getCookieSync as Xe, _track as pe, fetchOneEntry as Pe, createEditorListener as Ze, serializeIncludingFunctions as ye, handleABTestingSync as et } from "./server-entry-c1000f54.js";
|
|
3
|
+
import { setClientUserAttributes as Ri } from "./server-entry-c1000f54.js";
|
|
4
|
+
import { jsx as s, Fragment as R, jsxs as B } from "react/jsx-runtime";
|
|
5
|
+
import * as tt from "react";
|
|
6
|
+
import { createContext as Be, useEffect as P, useState as I, useRef as L, useContext as ve, createElement as Ae } from "react";
|
|
7
|
+
import { getFunctionArguments as nt, flattenState as it, runInNode as at, parseCode as ot, getBuilderGlobals as rt, set as Ne, fastClone as ue } from "./setIvm-011d6eb2.js";
|
|
8
|
+
import { shouldForceBrowserRuntimeInNode as lt } from "./should-force-browser-runtime-in-node-abf8d0a7.js";
|
|
9
|
+
const st = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), ct = (e) => typeof e == "string" && st.has(e.toLowerCase());
|
|
10
|
+
function de(e) {
|
|
11
|
+
return /* @__PURE__ */ s(R, { children: ct(e.TagName) ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ s(R, { children: typeof e.TagName == "string" ? /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
switch (
|
|
13
|
+
const j = () => {
|
|
14
|
+
switch (O) {
|
|
15
15
|
case "react":
|
|
16
16
|
case "reactNative":
|
|
17
17
|
case "rsc":
|
|
@@ -24,11 +24,11 @@ const M = () => {
|
|
|
24
24
|
return "class";
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function ut(e) {
|
|
28
28
|
function t() {
|
|
29
29
|
return {
|
|
30
30
|
...e.attributes,
|
|
31
|
-
[
|
|
31
|
+
[j()]: `${e.link ? "" : "builder-button"} ${e.attributes[j()] || ""}`,
|
|
32
32
|
...e.link ? {
|
|
33
33
|
href: e.link,
|
|
34
34
|
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
@@ -39,7 +39,7 @@ function rt(e) {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
return /* @__PURE__ */ s(
|
|
42
|
-
|
|
42
|
+
de,
|
|
43
43
|
{
|
|
44
44
|
attributes: t(),
|
|
45
45
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
@@ -48,7 +48,7 @@ function rt(e) {
|
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const me = Be({
|
|
52
52
|
content: null,
|
|
53
53
|
context: {},
|
|
54
54
|
localState: void 0,
|
|
@@ -63,10 +63,10 @@ const ce = Re({
|
|
|
63
63
|
BlocksWrapperProps: {},
|
|
64
64
|
nonce: "",
|
|
65
65
|
model: ""
|
|
66
|
-
}),
|
|
66
|
+
}), We = Be({ registeredComponents: {} }), De = (e, t, n) => {
|
|
67
67
|
const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((a, r) => a != null ? a[r] : a, e);
|
|
68
68
|
return i === void 0 || i === e ? n : i;
|
|
69
|
-
},
|
|
69
|
+
}, dt = ({
|
|
70
70
|
code: e,
|
|
71
71
|
builder: t,
|
|
72
72
|
context: n,
|
|
@@ -75,24 +75,24 @@ const ce = Re({
|
|
|
75
75
|
rootSetState: r,
|
|
76
76
|
rootState: o
|
|
77
77
|
}) => {
|
|
78
|
-
const l =
|
|
78
|
+
const l = nt({
|
|
79
79
|
builder: t,
|
|
80
80
|
context: n,
|
|
81
81
|
event: i,
|
|
82
|
-
state:
|
|
82
|
+
state: it({
|
|
83
83
|
rootState: o,
|
|
84
84
|
localState: a,
|
|
85
85
|
rootSetState: r
|
|
86
86
|
})
|
|
87
87
|
});
|
|
88
88
|
return new Function(...l.map(([d]) => d), e)(...l.map(([, d]) => d));
|
|
89
|
-
},
|
|
89
|
+
}, mt = (e) => U() || lt({
|
|
90
90
|
shouldLogWarning: !0
|
|
91
|
-
}) ?
|
|
91
|
+
}) ? dt(e) : at(e), ft = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, ht = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, gt = (e) => {
|
|
92
92
|
var t, n, i, a, r, o;
|
|
93
|
-
return ((i = (n = (t =
|
|
93
|
+
return ((i = (n = (t = ft.exec(e.trim())) == null ? void 0 : t.groups) == null ? void 0 : n.getPath) == null ? void 0 : i.slice(1)) || ((o = (r = (a = ht.exec(e.trim())) == null ? void 0 : a.groups) == null ? void 0 : r.getPath) == null ? void 0 : o.slice(1));
|
|
94
94
|
};
|
|
95
|
-
function
|
|
95
|
+
function _({
|
|
96
96
|
code: e,
|
|
97
97
|
context: t,
|
|
98
98
|
localState: n,
|
|
@@ -103,17 +103,17 @@ function O({
|
|
|
103
103
|
}) {
|
|
104
104
|
if (e.trim() === "")
|
|
105
105
|
return;
|
|
106
|
-
const l =
|
|
106
|
+
const l = gt(e.trim());
|
|
107
107
|
if (l)
|
|
108
|
-
return
|
|
108
|
+
return De({
|
|
109
109
|
...i,
|
|
110
110
|
...n
|
|
111
111
|
}, l);
|
|
112
112
|
const d = {
|
|
113
|
-
code:
|
|
113
|
+
code: ot(e, {
|
|
114
114
|
isExpression: o
|
|
115
115
|
}),
|
|
116
|
-
builder:
|
|
116
|
+
builder: rt(),
|
|
117
117
|
context: t,
|
|
118
118
|
event: r,
|
|
119
119
|
rootSetState: a,
|
|
@@ -121,28 +121,28 @@ function O({
|
|
|
121
121
|
localState: n
|
|
122
122
|
};
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
125
|
-
} catch (
|
|
126
|
-
|
|
124
|
+
return mt(d);
|
|
125
|
+
} catch (u) {
|
|
126
|
+
z.error("Failed code evaluation: " + u.message, {
|
|
127
127
|
code: e
|
|
128
128
|
});
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function bt(e, t) {
|
|
133
133
|
var n;
|
|
134
134
|
return {
|
|
135
135
|
...(n = e.component) == null ? void 0 : n.options,
|
|
136
136
|
...e.options,
|
|
137
|
-
...
|
|
137
|
+
...pt(e, t)
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
-
const
|
|
140
|
+
const pt = (e, t) => {
|
|
141
141
|
var n, i;
|
|
142
142
|
if (((n = e.component) == null ? void 0 : n.name) === "Text" && ((i = e.component.options) != null && i.text) && typeof e.component.options.text == "string")
|
|
143
143
|
return {
|
|
144
144
|
...e.component.options,
|
|
145
|
-
text: e.component.options.text.replace(/{{([^}]+)}}/g, (a, r) =>
|
|
145
|
+
text: e.component.options.text.replace(/{{([^}]+)}}/g, (a, r) => _({
|
|
146
146
|
code: r,
|
|
147
147
|
context: t,
|
|
148
148
|
localState: t.localState,
|
|
@@ -151,13 +151,13 @@ const ft = (e, t) => {
|
|
|
151
151
|
}))
|
|
152
152
|
};
|
|
153
153
|
};
|
|
154
|
-
function
|
|
154
|
+
function yt(e, ...t) {
|
|
155
155
|
const n = Object.assign({}, e);
|
|
156
156
|
for (const i of t)
|
|
157
157
|
delete n[i];
|
|
158
158
|
return n;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Q(e, t, n = null, i = null, a = /* @__PURE__ */ new WeakSet()) {
|
|
161
161
|
if (e == null || typeof e != "object") {
|
|
162
162
|
t(e, (r) => {
|
|
163
163
|
n !== null && i !== null && (n[i] = r);
|
|
@@ -167,52 +167,52 @@ function K(e, t, n = null, i = null, a = /* @__PURE__ */ new WeakSet()) {
|
|
|
167
167
|
a.has(e) || (a.add(e), Array.isArray(e) ? e.forEach((r, o) => {
|
|
168
168
|
t(r, (d) => {
|
|
169
169
|
e[o] = d;
|
|
170
|
-
}),
|
|
170
|
+
}), Q(r, t, e, o, a);
|
|
171
171
|
}) : Object.entries(e).forEach(([r, o]) => {
|
|
172
172
|
t(o, (d) => {
|
|
173
173
|
e[r] = d;
|
|
174
|
-
}),
|
|
174
|
+
}), Q(o, t, e, r, a);
|
|
175
175
|
}));
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function $e(e) {
|
|
178
178
|
return e && typeof e == "object" && e["@type"] === "@builder.io/core:LocalizedValue";
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function vt(e) {
|
|
181
181
|
if (!e || !Object.getOwnPropertyNames(e).length)
|
|
182
182
|
return !1;
|
|
183
183
|
let t = !1;
|
|
184
|
-
return
|
|
185
|
-
if (
|
|
184
|
+
return Q(e, (n) => {
|
|
185
|
+
if ($e(n)) {
|
|
186
186
|
t = !0;
|
|
187
187
|
return;
|
|
188
188
|
}
|
|
189
189
|
}), t;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
return !e || !Object.getOwnPropertyNames(e).length ? {} : (
|
|
191
|
+
function xt(e, t) {
|
|
192
|
+
return !e || !Object.getOwnPropertyNames(e).length ? {} : (Q(e, (n, i) => {
|
|
193
193
|
var a;
|
|
194
|
-
|
|
194
|
+
$e(n) && i((a = n[t]) != null ? a : void 0);
|
|
195
195
|
}), e);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function St(e, t) {
|
|
198
198
|
var n, i;
|
|
199
|
-
return (n = e.component) != null && n.options &&
|
|
199
|
+
return (n = e.component) != null && n.options && vt((i = e.component) == null ? void 0 : i.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 = xt(e.component.options, t != null ? t : "Default")), e;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function ce(e) {
|
|
202
202
|
if (e === null || typeof e != "object")
|
|
203
203
|
return e;
|
|
204
204
|
if (Array.isArray(e))
|
|
205
|
-
return e.map((n) =>
|
|
205
|
+
return e.map((n) => ce(n));
|
|
206
206
|
if (e["@type"] === "@builder.io/sdk:Element")
|
|
207
207
|
return e;
|
|
208
208
|
const t = {};
|
|
209
209
|
for (const n in e)
|
|
210
|
-
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
210
|
+
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = ce(e[n]));
|
|
211
211
|
return t;
|
|
212
212
|
}
|
|
213
|
-
const
|
|
214
|
-
if (
|
|
215
|
-
const t =
|
|
213
|
+
const kt = ["svelte", "vue", "angular", "qwik", "solid"].includes(O), Ct = (e) => {
|
|
214
|
+
if (kt) {
|
|
215
|
+
const t = ue(e);
|
|
216
216
|
return {
|
|
217
217
|
...t,
|
|
218
218
|
properties: {
|
|
@@ -223,7 +223,7 @@ const yt = ["svelte", "vue", "angular", "qwik", "solid"].includes(F), vt = (e) =
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
} else {
|
|
226
|
-
const t =
|
|
226
|
+
const t = ce(yt(e, "children", "meta"));
|
|
227
227
|
return {
|
|
228
228
|
...t,
|
|
229
229
|
properties: {
|
|
@@ -236,7 +236,7 @@ const yt = ["svelte", "vue", "angular", "qwik", "solid"].includes(F), vt = (e) =
|
|
|
236
236
|
meta: e.meta
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
},
|
|
239
|
+
}, Tt = ({
|
|
240
240
|
block: e,
|
|
241
241
|
context: t,
|
|
242
242
|
localState: n,
|
|
@@ -245,28 +245,28 @@ const yt = ["svelte", "vue", "angular", "qwik", "solid"].includes(F), vt = (e) =
|
|
|
245
245
|
}) => {
|
|
246
246
|
if (!e.bindings)
|
|
247
247
|
return e;
|
|
248
|
-
const r =
|
|
248
|
+
const r = Ct(e);
|
|
249
249
|
for (const o in e.bindings) {
|
|
250
|
-
const l = e.bindings[o], d =
|
|
250
|
+
const l = e.bindings[o], d = _({
|
|
251
251
|
code: l,
|
|
252
252
|
localState: n,
|
|
253
253
|
rootState: i,
|
|
254
254
|
rootSetState: a,
|
|
255
255
|
context: t
|
|
256
256
|
});
|
|
257
|
-
|
|
257
|
+
Ne(r, o, d);
|
|
258
258
|
}
|
|
259
259
|
return r;
|
|
260
260
|
};
|
|
261
|
-
function
|
|
261
|
+
function wt({
|
|
262
262
|
block: e,
|
|
263
263
|
context: t,
|
|
264
264
|
localState: n,
|
|
265
265
|
rootState: i,
|
|
266
266
|
rootSetState: a
|
|
267
267
|
}) {
|
|
268
|
-
let r =
|
|
269
|
-
return r = r,
|
|
268
|
+
let r = St(e, i.locale);
|
|
269
|
+
return r = r, Tt({
|
|
270
270
|
block: r,
|
|
271
271
|
localState: n,
|
|
272
272
|
rootState: i,
|
|
@@ -274,20 +274,20 @@ function St({
|
|
|
274
274
|
context: t
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
|
-
const
|
|
278
|
-
function
|
|
277
|
+
const Z = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
278
|
+
function It(e, t, n = {}) {
|
|
279
279
|
let i, a, r, o = null, l = 0;
|
|
280
280
|
const d = function() {
|
|
281
281
|
l = n.leading === !1 ? 0 : Date.now(), o = null, r = e.apply(i, a), o || (i = a = null);
|
|
282
282
|
};
|
|
283
283
|
return function() {
|
|
284
|
-
const
|
|
285
|
-
!l && n.leading === !1 && (l =
|
|
286
|
-
const h = t - (
|
|
287
|
-
return i = this, a = arguments, h <= 0 || h > t ? (o && (clearTimeout(o), o = null), l =
|
|
284
|
+
const u = Date.now();
|
|
285
|
+
!l && n.leading === !1 && (l = u);
|
|
286
|
+
const h = t - (u - l);
|
|
287
|
+
return i = this, a = arguments, h <= 0 || h > t ? (o && (clearTimeout(o), o = null), l = u, r = e.apply(i, a), o || (i = a = null)) : !o && n.trailing !== !1 && (o = setTimeout(d, h)), r;
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function H(e, ...t) {
|
|
291
291
|
const n = Object(e);
|
|
292
292
|
for (let i = 1; i < arguments.length; i++) {
|
|
293
293
|
const a = arguments[i];
|
|
@@ -297,118 +297,118 @@ function q(e, ...t) {
|
|
|
297
297
|
}
|
|
298
298
|
return n;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Et(e) {
|
|
301
301
|
for (const t of e)
|
|
302
302
|
switch (t.trigger) {
|
|
303
303
|
case "pageLoad":
|
|
304
|
-
|
|
304
|
+
Oe(t);
|
|
305
305
|
break;
|
|
306
306
|
case "scrollInView":
|
|
307
|
-
|
|
307
|
+
Vt(t);
|
|
308
308
|
break;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Fe(e) {
|
|
312
312
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
const n =
|
|
314
|
+
function Le(e, t) {
|
|
315
|
+
const n = Rt(e), i = getComputedStyle(t), a = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, o = [a, r];
|
|
316
316
|
for (const l of o)
|
|
317
317
|
for (const d of n)
|
|
318
318
|
d in l || (l[d] = i[d]);
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Rt(e) {
|
|
321
321
|
const t = [];
|
|
322
322
|
for (const n of e.steps)
|
|
323
323
|
for (const i in n.styles)
|
|
324
324
|
t.indexOf(i) === -1 && t.push(i);
|
|
325
325
|
return t;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function Oe(e) {
|
|
328
328
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
329
329
|
if (!t.length) {
|
|
330
|
-
|
|
330
|
+
Fe(e.elementId || e.id || "");
|
|
331
331
|
return;
|
|
332
332
|
}
|
|
333
333
|
Array.from(t).forEach((n) => {
|
|
334
|
-
|
|
335
|
-
n.style.transition = `all ${e.duration}s ${
|
|
334
|
+
Le(e, n), n.style.transition = "none", n.style.transitionDelay = "0", H(n.style, e.steps[0].styles), setTimeout(() => {
|
|
335
|
+
n.style.transition = `all ${e.duration}s ${Z(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), H(n.style, e.steps[1].styles), setTimeout(() => {
|
|
336
336
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
337
337
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
338
338
|
});
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Vt(e) {
|
|
342
342
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
343
343
|
if (!t.length) {
|
|
344
|
-
|
|
344
|
+
Fe(e.elementId || e.id || "");
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
347
|
Array.from(t).forEach((n) => {
|
|
348
|
-
|
|
348
|
+
Le(e, n);
|
|
349
349
|
let i = !1, a = !1;
|
|
350
350
|
function r() {
|
|
351
351
|
!i && l(n) ? (i = !0, a = !0, setTimeout(() => {
|
|
352
|
-
|
|
352
|
+
H(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", o), setTimeout(() => {
|
|
353
353
|
a = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
354
354
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
355
|
-
})) : e.repeat && i && !a && !l(n) && (i = !1,
|
|
355
|
+
})) : e.repeat && i && !a && !l(n) && (i = !1, H(n.style, e.steps[0].styles));
|
|
356
356
|
}
|
|
357
|
-
const o =
|
|
357
|
+
const o = It(r, 200, {
|
|
358
358
|
leading: !1
|
|
359
359
|
});
|
|
360
360
|
function l(h) {
|
|
361
|
-
const
|
|
362
|
-
return
|
|
361
|
+
const g = h.getBoundingClientRect(), c = window.innerHeight, f = (e.thresholdPercent || 0) / 100 * c;
|
|
362
|
+
return g.bottom > f && g.top < c - f;
|
|
363
363
|
}
|
|
364
364
|
const d = e.steps[0].styles;
|
|
365
|
-
function
|
|
366
|
-
|
|
365
|
+
function u() {
|
|
366
|
+
H(n.style, d);
|
|
367
367
|
}
|
|
368
|
-
|
|
369
|
-
n.style.transition = `all ${e.duration}s ${
|
|
368
|
+
u(), setTimeout(() => {
|
|
369
|
+
n.style.transition = `all ${e.duration}s ${Z(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
370
370
|
}), document.addEventListener("scroll", o, {
|
|
371
371
|
capture: !0,
|
|
372
372
|
passive: !0
|
|
373
373
|
}), r();
|
|
374
374
|
});
|
|
375
375
|
}
|
|
376
|
-
const
|
|
376
|
+
const Ue = (e) => Object.entries(e).map(([n, i]) => {
|
|
377
377
|
if (typeof i == "string")
|
|
378
|
-
return `${
|
|
379
|
-
}).filter(
|
|
380
|
-
`),
|
|
378
|
+
return `${Z(n)}: ${i};`;
|
|
379
|
+
}).filter(se), Pt = (e) => Ue(e).join(`
|
|
380
|
+
`), q = ({
|
|
381
381
|
mediaQuery: e,
|
|
382
382
|
className: t,
|
|
383
383
|
styles: n
|
|
384
384
|
}) => {
|
|
385
385
|
const i = `.${t} {
|
|
386
|
-
${
|
|
386
|
+
${Pt(n)}
|
|
387
387
|
}`;
|
|
388
388
|
return e ? `${e} {
|
|
389
389
|
${i}
|
|
390
390
|
}` : i;
|
|
391
391
|
};
|
|
392
|
-
function
|
|
392
|
+
function Bt({
|
|
393
393
|
style: e
|
|
394
394
|
}) {
|
|
395
395
|
return e;
|
|
396
396
|
}
|
|
397
|
-
const
|
|
397
|
+
const At = ({
|
|
398
398
|
block: e,
|
|
399
399
|
context: t
|
|
400
|
-
}) =>
|
|
400
|
+
}) => _e(Bt({
|
|
401
401
|
style: e.style || {},
|
|
402
402
|
context: t,
|
|
403
403
|
block: e
|
|
404
404
|
}));
|
|
405
|
-
function
|
|
406
|
-
switch (
|
|
405
|
+
function _e(e) {
|
|
406
|
+
switch (O) {
|
|
407
407
|
case "svelte":
|
|
408
408
|
case "vue":
|
|
409
409
|
case "solid":
|
|
410
410
|
case "angular":
|
|
411
|
-
return
|
|
411
|
+
return Ue(e).join(" ");
|
|
412
412
|
case "qwik":
|
|
413
413
|
case "reactNative":
|
|
414
414
|
case "react":
|
|
@@ -416,7 +416,7 @@ function Le(e) {
|
|
|
416
416
|
return e;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
const
|
|
419
|
+
const qe = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includes(t) : !1 : !0, Nt = ({
|
|
420
420
|
block: e,
|
|
421
421
|
registeredComponents: t,
|
|
422
422
|
model: n
|
|
@@ -426,14 +426,14 @@ const Oe = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
426
426
|
if (!i)
|
|
427
427
|
return null;
|
|
428
428
|
const a = t[i];
|
|
429
|
-
if (!a ||
|
|
429
|
+
if (!a || qe(a, n)) {
|
|
430
430
|
console.warn(`
|
|
431
431
|
Could not find a registered component named "${i}".
|
|
432
432
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
433
433
|
return;
|
|
434
434
|
} else
|
|
435
435
|
return a;
|
|
436
|
-
},
|
|
436
|
+
}, Wt = ({
|
|
437
437
|
block: e,
|
|
438
438
|
context: t
|
|
439
439
|
}) => {
|
|
@@ -443,7 +443,7 @@ const Oe = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
443
443
|
} = e;
|
|
444
444
|
if (!(n != null && n.collection))
|
|
445
445
|
return;
|
|
446
|
-
const a =
|
|
446
|
+
const a = _({
|
|
447
447
|
code: n.collection,
|
|
448
448
|
localState: t.localState,
|
|
449
449
|
rootState: t.rootState,
|
|
@@ -453,40 +453,40 @@ const Oe = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
453
453
|
if (!Array.isArray(a))
|
|
454
454
|
return;
|
|
455
455
|
const r = n.collection.split(".").pop(), o = n.itemName || (r ? r + "Item" : "item");
|
|
456
|
-
return a.map((d,
|
|
456
|
+
return a.map((d, u) => ({
|
|
457
457
|
context: {
|
|
458
458
|
...t,
|
|
459
459
|
localState: {
|
|
460
460
|
...t.localState,
|
|
461
|
-
$index:
|
|
461
|
+
$index: u,
|
|
462
462
|
$item: d,
|
|
463
463
|
[o]: d,
|
|
464
|
-
[`$${o}Index`]:
|
|
464
|
+
[`$${o}Index`]: u
|
|
465
465
|
}
|
|
466
466
|
},
|
|
467
467
|
block: i
|
|
468
468
|
}));
|
|
469
|
-
},
|
|
469
|
+
}, Dt = (e, t) => {
|
|
470
470
|
var n;
|
|
471
471
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderLinkComponent ? {
|
|
472
472
|
builderLinkComponent: t
|
|
473
473
|
} : {};
|
|
474
|
-
},
|
|
474
|
+
}, $t = (e, t, n) => {
|
|
475
475
|
var i;
|
|
476
476
|
return (i = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && i.builderComponents ? {
|
|
477
|
-
builderComponents: Object.fromEntries(Object.entries(t).filter(([r, o]) => !
|
|
477
|
+
builderComponents: Object.fromEntries(Object.entries(t).filter(([r, o]) => !qe(o, n)))
|
|
478
478
|
} : {};
|
|
479
|
-
},
|
|
479
|
+
}, Ft = (e, t) => {
|
|
480
480
|
var n;
|
|
481
481
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderBlock ? {
|
|
482
482
|
builderBlock: t
|
|
483
483
|
} : {};
|
|
484
|
-
},
|
|
484
|
+
}, Lt = (e, t) => {
|
|
485
485
|
var n;
|
|
486
486
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
|
|
487
487
|
builderContext: t
|
|
488
488
|
} : {};
|
|
489
|
-
},
|
|
489
|
+
}, He = {
|
|
490
490
|
xsmall: {
|
|
491
491
|
min: 0,
|
|
492
492
|
default: 160,
|
|
@@ -507,8 +507,8 @@ const Oe = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
507
507
|
default: 991,
|
|
508
508
|
max: 1200
|
|
509
509
|
}
|
|
510
|
-
},
|
|
511
|
-
const t =
|
|
510
|
+
}, ne = (e, t = He) => `@media (max-width: ${t[e].max}px)`, Me = (e) => {
|
|
511
|
+
const t = ue(He);
|
|
512
512
|
if (!e)
|
|
513
513
|
return t;
|
|
514
514
|
const {
|
|
@@ -546,7 +546,7 @@ const Oe = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
546
546
|
default: l + 1
|
|
547
547
|
}, t;
|
|
548
548
|
};
|
|
549
|
-
function
|
|
549
|
+
function K(e) {
|
|
550
550
|
return /* @__PURE__ */ s(
|
|
551
551
|
"style",
|
|
552
552
|
{
|
|
@@ -556,67 +556,67 @@ function j(e) {
|
|
|
556
556
|
}
|
|
557
557
|
);
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function Ot(e) {
|
|
560
560
|
function t() {
|
|
561
561
|
const i = e.block;
|
|
562
|
-
return
|
|
562
|
+
return se(i.hide) ? !i.hide : se(i.show) ? i.show : !0;
|
|
563
563
|
}
|
|
564
564
|
function n() {
|
|
565
565
|
var C, V, w, x, m;
|
|
566
|
-
const i = e.block, a = i.responsiveStyles, r = e.context.content, o =
|
|
566
|
+
const i = e.block, a = i.responsiveStyles, r = e.context.content, o = Me(
|
|
567
567
|
((C = r == null ? void 0 : r.meta) == null ? void 0 : C.breakpoints) || {}
|
|
568
|
-
), l = !!((w = (V = r == null ? void 0 : r.meta) == null ? void 0 : V.breakpoints) != null && w.xsmall), d = a == null ? void 0 : a.large,
|
|
569
|
-
if (!
|
|
568
|
+
), l = !!((w = (V = r == null ? void 0 : r.meta) == null ? void 0 : V.breakpoints) != null && w.xsmall), d = a == null ? void 0 : a.large, u = a == null ? void 0 : a.medium, h = a == null ? void 0 : a.small, g = a == null ? void 0 : a.xsmall, c = i.id;
|
|
569
|
+
if (!c)
|
|
570
570
|
return "";
|
|
571
|
-
const v = d ?
|
|
572
|
-
className:
|
|
571
|
+
const v = d ? q({
|
|
572
|
+
className: c,
|
|
573
573
|
styles: d
|
|
574
|
-
}) : "", f =
|
|
575
|
-
className:
|
|
576
|
-
styles:
|
|
577
|
-
mediaQuery:
|
|
574
|
+
}) : "", f = u ? q({
|
|
575
|
+
className: c,
|
|
576
|
+
styles: u,
|
|
577
|
+
mediaQuery: ne(
|
|
578
578
|
"medium",
|
|
579
579
|
o
|
|
580
580
|
)
|
|
581
|
-
}) : "",
|
|
582
|
-
className:
|
|
581
|
+
}) : "", b = h ? q({
|
|
582
|
+
className: c,
|
|
583
583
|
styles: h,
|
|
584
|
-
mediaQuery:
|
|
584
|
+
mediaQuery: ne(
|
|
585
585
|
"small",
|
|
586
586
|
o
|
|
587
587
|
)
|
|
588
|
-
}) : "", S =
|
|
589
|
-
className:
|
|
590
|
-
styles:
|
|
591
|
-
mediaQuery:
|
|
588
|
+
}) : "", S = g && l ? q({
|
|
589
|
+
className: c,
|
|
590
|
+
styles: g,
|
|
591
|
+
mediaQuery: ne(
|
|
592
592
|
"xsmall",
|
|
593
593
|
o
|
|
594
594
|
)
|
|
595
|
-
}) : "",
|
|
595
|
+
}) : "", p = i.animations && i.animations.find((y) => y.trigger === "hover");
|
|
596
596
|
let k = "";
|
|
597
|
-
if (
|
|
598
|
-
const
|
|
599
|
-
k =
|
|
600
|
-
className: `${
|
|
597
|
+
if (p) {
|
|
598
|
+
const y = ((m = (x = p.steps) == null ? void 0 : x[1]) == null ? void 0 : m.styles) || {};
|
|
599
|
+
k = q({
|
|
600
|
+
className: `${c}:hover`,
|
|
601
601
|
styles: {
|
|
602
|
-
...
|
|
603
|
-
transition: `all ${
|
|
604
|
-
|
|
602
|
+
...y,
|
|
603
|
+
transition: `all ${p.duration}s ${Z(
|
|
604
|
+
p.easing
|
|
605
605
|
)}`,
|
|
606
|
-
transitionDelay:
|
|
606
|
+
transitionDelay: p.delay ? `${p.delay}s` : "0s"
|
|
607
607
|
}
|
|
608
608
|
}) || "";
|
|
609
609
|
}
|
|
610
610
|
return [
|
|
611
611
|
v,
|
|
612
612
|
f,
|
|
613
|
-
|
|
613
|
+
b,
|
|
614
614
|
S,
|
|
615
615
|
k
|
|
616
616
|
].join(" ");
|
|
617
617
|
}
|
|
618
618
|
return /* @__PURE__ */ s(R, { children: n() && t() ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
619
|
-
|
|
619
|
+
K,
|
|
620
620
|
{
|
|
621
621
|
id: "builderio-block",
|
|
622
622
|
styles: n(),
|
|
@@ -624,10 +624,10 @@ function $t(e) {
|
|
|
624
624
|
}
|
|
625
625
|
) }) : null });
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function Ut(e) {
|
|
628
628
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
629
629
|
}
|
|
630
|
-
const
|
|
630
|
+
const _t = (e) => `on${Ut(e)}`, qt = (e, t) => (n) => _({
|
|
631
631
|
code: e,
|
|
632
632
|
context: t.context,
|
|
633
633
|
localState: t.localState,
|
|
@@ -636,16 +636,16 @@ const Ft = (e) => `on${Dt(e)}`, Lt = (e, t) => (n) => O({
|
|
|
636
636
|
event: n,
|
|
637
637
|
isExpression: !1
|
|
638
638
|
});
|
|
639
|
-
function
|
|
639
|
+
function je(e) {
|
|
640
640
|
var i;
|
|
641
641
|
const t = {}, n = (i = e.block.actions) != null ? i : {};
|
|
642
642
|
for (const a in n) {
|
|
643
643
|
if (!n.hasOwnProperty(a))
|
|
644
644
|
continue;
|
|
645
645
|
const r = n[a];
|
|
646
|
-
let o =
|
|
646
|
+
let o = _t(a);
|
|
647
647
|
if (e.stripPrefix)
|
|
648
|
-
switch (
|
|
648
|
+
switch (O) {
|
|
649
649
|
case "vue":
|
|
650
650
|
o = o.replace("v-on:", "");
|
|
651
651
|
break;
|
|
@@ -653,49 +653,49 @@ function qe(e) {
|
|
|
653
653
|
o = o.replace("on:", "");
|
|
654
654
|
break;
|
|
655
655
|
}
|
|
656
|
-
t[o] =
|
|
656
|
+
t[o] = qt(r, e);
|
|
657
657
|
}
|
|
658
658
|
return t;
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function Ht({
|
|
661
661
|
properties: e
|
|
662
662
|
}) {
|
|
663
663
|
return e;
|
|
664
664
|
}
|
|
665
|
-
const
|
|
665
|
+
const Mt = (e) => ({
|
|
666
666
|
href: e.href
|
|
667
667
|
});
|
|
668
|
-
function
|
|
668
|
+
function fe({
|
|
669
669
|
block: e,
|
|
670
670
|
context: t
|
|
671
671
|
}) {
|
|
672
672
|
var i;
|
|
673
673
|
const n = {
|
|
674
|
-
...
|
|
674
|
+
...Mt(e),
|
|
675
675
|
...e.properties,
|
|
676
676
|
"builder-id": e.id,
|
|
677
|
-
style:
|
|
677
|
+
style: At({
|
|
678
678
|
block: e,
|
|
679
679
|
context: t
|
|
680
680
|
}),
|
|
681
|
-
[
|
|
681
|
+
[j()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
682
682
|
};
|
|
683
|
-
return
|
|
683
|
+
return Ht({
|
|
684
684
|
properties: n,
|
|
685
685
|
context: t,
|
|
686
686
|
block: e
|
|
687
687
|
});
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function jt(e) {
|
|
690
690
|
return /* @__PURE__ */ s(
|
|
691
|
-
|
|
691
|
+
de,
|
|
692
692
|
{
|
|
693
693
|
TagName: e.Wrapper,
|
|
694
|
-
attributes:
|
|
694
|
+
attributes: fe({
|
|
695
695
|
block: e.block,
|
|
696
696
|
context: e.context
|
|
697
697
|
}),
|
|
698
|
-
actionAttributes:
|
|
698
|
+
actionAttributes: je({
|
|
699
699
|
block: e.block,
|
|
700
700
|
rootState: e.context.rootState,
|
|
701
701
|
rootSetState: e.context.rootSetState,
|
|
@@ -707,18 +707,18 @@ function _t(e) {
|
|
|
707
707
|
}
|
|
708
708
|
);
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
return
|
|
710
|
+
function zt(e) {
|
|
711
|
+
return P(() => {
|
|
712
712
|
}, []), /* @__PURE__ */ s(R, { children: e.children });
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function Kt(e) {
|
|
715
715
|
function t() {
|
|
716
716
|
return e.includeBlockProps ? {
|
|
717
|
-
...
|
|
717
|
+
...fe({
|
|
718
718
|
block: e.block,
|
|
719
719
|
context: e.context
|
|
720
720
|
}),
|
|
721
|
-
...
|
|
721
|
+
...je({
|
|
722
722
|
block: e.block,
|
|
723
723
|
rootState: e.context.rootState,
|
|
724
724
|
rootSetState: e.context.rootSetState,
|
|
@@ -728,7 +728,7 @@ function Ht(e) {
|
|
|
728
728
|
} : {};
|
|
729
729
|
}
|
|
730
730
|
return /* @__PURE__ */ s(R, { children: e.Wrapper.load ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
731
|
-
|
|
731
|
+
zt,
|
|
732
732
|
{
|
|
733
733
|
load: e.Wrapper.load,
|
|
734
734
|
fallback: e.Wrapper.fallback,
|
|
@@ -738,7 +738,7 @@ function Ht(e) {
|
|
|
738
738
|
}
|
|
739
739
|
) }) : /* @__PURE__ */ s(e.Wrapper, { ...e.wrapperProps, attributes: t(), children: e.children }) });
|
|
740
740
|
}
|
|
741
|
-
const
|
|
741
|
+
const Jt = ({
|
|
742
742
|
componentOptions: e,
|
|
743
743
|
builderBlock: t,
|
|
744
744
|
context: n,
|
|
@@ -754,7 +754,7 @@ const Mt = ({
|
|
|
754
754
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
755
755
|
*/
|
|
756
756
|
...a ? {
|
|
757
|
-
attributes:
|
|
757
|
+
attributes: fe({
|
|
758
758
|
block: t,
|
|
759
759
|
context: o
|
|
760
760
|
})
|
|
@@ -768,15 +768,15 @@ const Mt = ({
|
|
|
768
768
|
includeBlockProps: a
|
|
769
769
|
} : l;
|
|
770
770
|
};
|
|
771
|
-
function
|
|
771
|
+
function xe(e) {
|
|
772
772
|
var i;
|
|
773
|
-
const [t, n] =
|
|
774
|
-
() => e.isInteractive ?
|
|
773
|
+
const [t, n] = I(
|
|
774
|
+
() => e.isInteractive ? Kt : e.componentRef
|
|
775
775
|
);
|
|
776
776
|
return /* @__PURE__ */ s(R, { children: e.componentRef ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
777
777
|
t,
|
|
778
778
|
{
|
|
779
|
-
...
|
|
779
|
+
...Jt({
|
|
780
780
|
componentOptions: e.componentOptions,
|
|
781
781
|
builderBlock: e.builderBlock,
|
|
782
782
|
context: e.context,
|
|
@@ -787,7 +787,7 @@ function pe(e) {
|
|
|
787
787
|
contextValue: e.context
|
|
788
788
|
}),
|
|
789
789
|
children: (i = e.blockChildren) == null ? void 0 : i.map((a) => /* @__PURE__ */ s(
|
|
790
|
-
|
|
790
|
+
ee,
|
|
791
791
|
{
|
|
792
792
|
block: a,
|
|
793
793
|
context: e.context,
|
|
@@ -799,10 +799,10 @@ function pe(e) {
|
|
|
799
799
|
}
|
|
800
800
|
) }) : null });
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
const [t, n] =
|
|
804
|
-
return /* @__PURE__ */ s(
|
|
805
|
-
|
|
802
|
+
function Se(e) {
|
|
803
|
+
const [t, n] = I(() => e.repeatContext);
|
|
804
|
+
return /* @__PURE__ */ s(me.Provider, { value: t, children: /* @__PURE__ */ s(
|
|
805
|
+
ee,
|
|
806
806
|
{
|
|
807
807
|
block: e.block,
|
|
808
808
|
context: t,
|
|
@@ -811,23 +811,23 @@ function ye(e) {
|
|
|
811
811
|
}
|
|
812
812
|
) });
|
|
813
813
|
}
|
|
814
|
-
function
|
|
815
|
-
var h,
|
|
814
|
+
function ee(e) {
|
|
815
|
+
var h, g, c, v;
|
|
816
816
|
function t() {
|
|
817
|
-
return
|
|
817
|
+
return Wt({
|
|
818
818
|
block: e.block,
|
|
819
819
|
context: e.context
|
|
820
820
|
});
|
|
821
821
|
}
|
|
822
|
-
const [n, i] =
|
|
822
|
+
const [n, i] = I(() => ({
|
|
823
823
|
value: null,
|
|
824
824
|
update: !1
|
|
825
825
|
}));
|
|
826
826
|
function a() {
|
|
827
|
-
var
|
|
828
|
-
if (n.value && !n.update && !
|
|
827
|
+
var b;
|
|
828
|
+
if (n.value && !n.update && !X())
|
|
829
829
|
return n.value;
|
|
830
|
-
const f = (
|
|
830
|
+
const f = (b = e.block.repeat) != null && b.collection ? e.block : wt({
|
|
831
831
|
block: e.block,
|
|
832
832
|
localState: e.context.localState,
|
|
833
833
|
rootState: e.context.rootState,
|
|
@@ -837,38 +837,38 @@ function Y(e) {
|
|
|
837
837
|
return n.value = f, n.update = !1, f;
|
|
838
838
|
}
|
|
839
839
|
function r() {
|
|
840
|
-
return
|
|
840
|
+
return Nt({
|
|
841
841
|
block: a(),
|
|
842
842
|
registeredComponents: e.registeredComponents,
|
|
843
843
|
model: e.context.model
|
|
844
844
|
});
|
|
845
845
|
}
|
|
846
846
|
function o() {
|
|
847
|
-
var
|
|
848
|
-
return e.block.tagName === "a" || ((
|
|
847
|
+
var b;
|
|
848
|
+
return e.block.tagName === "a" || ((b = a().properties) == null ? void 0 : b.href) || a().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
849
849
|
}
|
|
850
850
|
function l() {
|
|
851
|
-
var S,
|
|
851
|
+
var S, p;
|
|
852
852
|
if ((S = e.block.repeat) != null && S.collection)
|
|
853
|
-
return !!((
|
|
853
|
+
return !!((p = t == null ? void 0 : t()) != null && p.length);
|
|
854
854
|
const f = "hide" in a() ? a().hide : !1;
|
|
855
855
|
return ("show" in a() ? a().show : !0) && !f;
|
|
856
856
|
}
|
|
857
857
|
function d() {
|
|
858
|
-
var
|
|
859
|
-
return !((
|
|
858
|
+
var b, S;
|
|
859
|
+
return !((b = r == null ? void 0 : r()) != null && b.component) && !t() ? (S = a().children) != null ? S : [] : [];
|
|
860
860
|
}
|
|
861
|
-
function
|
|
862
|
-
var f,
|
|
861
|
+
function u() {
|
|
862
|
+
var f, b, S, p;
|
|
863
863
|
return {
|
|
864
864
|
blockChildren: (f = a().children) != null ? f : [],
|
|
865
|
-
componentRef: (
|
|
865
|
+
componentRef: (b = r == null ? void 0 : r()) == null ? void 0 : b.component,
|
|
866
866
|
componentOptions: {
|
|
867
|
-
...
|
|
868
|
-
...
|
|
869
|
-
...
|
|
870
|
-
...
|
|
871
|
-
|
|
867
|
+
...bt(a(), e.context),
|
|
868
|
+
...Ft(r(), a()),
|
|
869
|
+
...Lt(r(), e.context),
|
|
870
|
+
...Dt(r(), e.linkComponent),
|
|
871
|
+
...$t(
|
|
872
872
|
r(),
|
|
873
873
|
e.registeredComponents,
|
|
874
874
|
e.context.model
|
|
@@ -879,75 +879,75 @@ function Y(e) {
|
|
|
879
879
|
registeredComponents: e.registeredComponents,
|
|
880
880
|
builderBlock: a(),
|
|
881
881
|
includeBlockProps: ((S = r == null ? void 0 : r()) == null ? void 0 : S.noWrap) === !0,
|
|
882
|
-
isInteractive: !((
|
|
882
|
+
isInteractive: !((p = r == null ? void 0 : r()) != null && p.isRSC && O === "rsc")
|
|
883
883
|
};
|
|
884
884
|
}
|
|
885
|
-
return
|
|
886
|
-
const f = a().id,
|
|
887
|
-
|
|
888
|
-
|
|
885
|
+
return P(() => {
|
|
886
|
+
const f = a().id, b = a().animations;
|
|
887
|
+
b && f && Et(
|
|
888
|
+
b.map((S) => ({
|
|
889
889
|
...S,
|
|
890
890
|
elementId: f
|
|
891
891
|
}))
|
|
892
892
|
);
|
|
893
|
-
}, []),
|
|
893
|
+
}, []), P(() => {
|
|
894
894
|
n.update = !0;
|
|
895
|
-
}), /* @__PURE__ */ s(R, { children: l() ? /* @__PURE__ */
|
|
896
|
-
/* @__PURE__ */ s(
|
|
897
|
-
(h = r == null ? void 0 : r()) != null && h.noWrap ? t() ? /* @__PURE__ */ s(R, { children: (v = t()) == null ? void 0 : v.map((f,
|
|
898
|
-
|
|
895
|
+
}), /* @__PURE__ */ s(R, { children: l() ? /* @__PURE__ */ B(R, { children: [
|
|
896
|
+
/* @__PURE__ */ s(Ot, { block: a(), context: e.context }),
|
|
897
|
+
(h = r == null ? void 0 : r()) != null && h.noWrap ? t() ? /* @__PURE__ */ s(R, { children: (v = t()) == null ? void 0 : v.map((f, b) => /* @__PURE__ */ s(
|
|
898
|
+
Se,
|
|
899
899
|
{
|
|
900
900
|
repeatContext: f.context,
|
|
901
901
|
block: f.block,
|
|
902
902
|
registeredComponents: e.registeredComponents,
|
|
903
903
|
linkComponent: e.linkComponent
|
|
904
904
|
},
|
|
905
|
-
|
|
905
|
+
b
|
|
906
906
|
)) }) : /* @__PURE__ */ s(
|
|
907
|
-
|
|
907
|
+
xe,
|
|
908
908
|
{
|
|
909
|
-
componentRef:
|
|
910
|
-
componentOptions:
|
|
911
|
-
blockChildren:
|
|
912
|
-
context:
|
|
913
|
-
registeredComponents:
|
|
914
|
-
linkComponent:
|
|
915
|
-
builderBlock:
|
|
916
|
-
includeBlockProps:
|
|
917
|
-
isInteractive:
|
|
909
|
+
componentRef: u().componentRef,
|
|
910
|
+
componentOptions: u().componentOptions,
|
|
911
|
+
blockChildren: u().blockChildren,
|
|
912
|
+
context: u().context,
|
|
913
|
+
registeredComponents: u().registeredComponents,
|
|
914
|
+
linkComponent: u().linkComponent,
|
|
915
|
+
builderBlock: u().builderBlock,
|
|
916
|
+
includeBlockProps: u().includeBlockProps,
|
|
917
|
+
isInteractive: u().isInteractive
|
|
918
918
|
}
|
|
919
|
-
) : /* @__PURE__ */ s(R, { children: t() ? /* @__PURE__ */ s(R, { children: (
|
|
920
|
-
|
|
919
|
+
) : /* @__PURE__ */ s(R, { children: t() ? /* @__PURE__ */ s(R, { children: (c = t()) == null ? void 0 : c.map((f, b) => /* @__PURE__ */ s(
|
|
920
|
+
Se,
|
|
921
921
|
{
|
|
922
922
|
repeatContext: f.context,
|
|
923
923
|
block: f.block,
|
|
924
924
|
registeredComponents: e.registeredComponents,
|
|
925
925
|
linkComponent: e.linkComponent
|
|
926
926
|
},
|
|
927
|
-
|
|
928
|
-
)) }) : /* @__PURE__ */
|
|
929
|
-
|
|
927
|
+
b
|
|
928
|
+
)) }) : /* @__PURE__ */ B(
|
|
929
|
+
jt,
|
|
930
930
|
{
|
|
931
931
|
Wrapper: o(),
|
|
932
932
|
block: a(),
|
|
933
933
|
context: e.context,
|
|
934
934
|
children: [
|
|
935
935
|
/* @__PURE__ */ s(
|
|
936
|
-
|
|
936
|
+
xe,
|
|
937
937
|
{
|
|
938
|
-
componentRef:
|
|
939
|
-
componentOptions:
|
|
940
|
-
blockChildren:
|
|
941
|
-
context:
|
|
942
|
-
registeredComponents:
|
|
943
|
-
linkComponent:
|
|
944
|
-
builderBlock:
|
|
945
|
-
includeBlockProps:
|
|
946
|
-
isInteractive:
|
|
938
|
+
componentRef: u().componentRef,
|
|
939
|
+
componentOptions: u().componentOptions,
|
|
940
|
+
blockChildren: u().blockChildren,
|
|
941
|
+
context: u().context,
|
|
942
|
+
registeredComponents: u().registeredComponents,
|
|
943
|
+
linkComponent: u().linkComponent,
|
|
944
|
+
builderBlock: u().builderBlock,
|
|
945
|
+
includeBlockProps: u().includeBlockProps,
|
|
946
|
+
isInteractive: u().isInteractive
|
|
947
947
|
}
|
|
948
948
|
),
|
|
949
|
-
(
|
|
950
|
-
|
|
949
|
+
(g = d()) == null ? void 0 : g.map((f) => /* @__PURE__ */ s(
|
|
950
|
+
ee,
|
|
951
951
|
{
|
|
952
952
|
block: f,
|
|
953
953
|
registeredComponents: e.registeredComponents,
|
|
@@ -961,8 +961,8 @@ function Y(e) {
|
|
|
961
961
|
) })
|
|
962
962
|
] }) : null });
|
|
963
963
|
}
|
|
964
|
-
function
|
|
965
|
-
const t =
|
|
964
|
+
function Gt(e) {
|
|
965
|
+
const t = L(null);
|
|
966
966
|
function n() {
|
|
967
967
|
var o;
|
|
968
968
|
return [
|
|
@@ -979,7 +979,7 @@ function jt(e) {
|
|
|
979
979
|
}
|
|
980
980
|
function a() {
|
|
981
981
|
var o, l;
|
|
982
|
-
|
|
982
|
+
N() && !((o = e.blocks) != null && o.length) && ((l = window.parent) == null || l.postMessage(
|
|
983
983
|
{
|
|
984
984
|
type: "builder.clickEmptyBlocks",
|
|
985
985
|
data: {
|
|
@@ -992,7 +992,7 @@ function jt(e) {
|
|
|
992
992
|
}
|
|
993
993
|
function r() {
|
|
994
994
|
var o, l;
|
|
995
|
-
|
|
995
|
+
N() && !((o = e.blocks) != null && o.length) && ((l = window.parent) == null || l.postMessage(
|
|
996
996
|
{
|
|
997
997
|
type: "builder.hoverEmptyBlocks",
|
|
998
998
|
data: {
|
|
@@ -1003,8 +1003,8 @@ function jt(e) {
|
|
|
1003
1003
|
"*"
|
|
1004
1004
|
));
|
|
1005
1005
|
}
|
|
1006
|
-
return
|
|
1007
|
-
}, []), /* @__PURE__ */
|
|
1006
|
+
return P(() => {
|
|
1007
|
+
}, []), /* @__PURE__ */ B(R, { children: [
|
|
1008
1008
|
/* @__PURE__ */ s(
|
|
1009
1009
|
e.BlocksWrapper,
|
|
1010
1010
|
{
|
|
@@ -1029,9 +1029,9 @@ function jt(e) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
function $(e) {
|
|
1031
1031
|
var i, a, r;
|
|
1032
|
-
const t =
|
|
1032
|
+
const t = ve(me), n = ve(We);
|
|
1033
1033
|
return /* @__PURE__ */ s(
|
|
1034
|
-
|
|
1034
|
+
Gt,
|
|
1035
1035
|
{
|
|
1036
1036
|
blocks: e.blocks,
|
|
1037
1037
|
parent: e.parent,
|
|
@@ -1041,7 +1041,7 @@ function $(e) {
|
|
|
1041
1041
|
BlocksWrapper: ((i = e.context) == null ? void 0 : i.BlocksWrapper) || (t == null ? void 0 : t.BlocksWrapper),
|
|
1042
1042
|
BlocksWrapperProps: ((a = e.context) == null ? void 0 : a.BlocksWrapperProps) || (t == null ? void 0 : t.BlocksWrapperProps),
|
|
1043
1043
|
children: e.blocks ? /* @__PURE__ */ s(R, { children: (r = e.blocks) == null ? void 0 : r.map((o) => /* @__PURE__ */ s(
|
|
1044
|
-
|
|
1044
|
+
ee,
|
|
1045
1045
|
{
|
|
1046
1046
|
block: o,
|
|
1047
1047
|
linkComponent: e.linkComponent,
|
|
@@ -1053,9 +1053,9 @@ function $(e) {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
);
|
|
1055
1055
|
}
|
|
1056
|
-
const
|
|
1057
|
-
function
|
|
1058
|
-
var
|
|
1056
|
+
const Qt = (e) => `builder-columns ${e}-breakpoints`;
|
|
1057
|
+
function Yt(e) {
|
|
1058
|
+
var b, S;
|
|
1059
1059
|
function t() {
|
|
1060
1060
|
return typeof e.space == "number" ? e.space || 0 : 20;
|
|
1061
1061
|
}
|
|
@@ -1065,43 +1065,43 @@ function Kt(e) {
|
|
|
1065
1065
|
function i() {
|
|
1066
1066
|
return e.stackColumnsAt || "tablet";
|
|
1067
1067
|
}
|
|
1068
|
-
function a(
|
|
1069
|
-
return
|
|
1068
|
+
function a(p) {
|
|
1069
|
+
return p.link ? e.builderLinkComponent || "a" : "div";
|
|
1070
1070
|
}
|
|
1071
|
-
function r(
|
|
1071
|
+
function r(p) {
|
|
1072
1072
|
var k;
|
|
1073
|
-
return ((k = n()[
|
|
1073
|
+
return ((k = n()[p]) == null ? void 0 : k.width) || 100 / n().length;
|
|
1074
1074
|
}
|
|
1075
|
-
function o(
|
|
1076
|
-
const k = r(
|
|
1075
|
+
function o(p) {
|
|
1076
|
+
const k = r(p), C = t() * (n().length - 1) * (k / 100);
|
|
1077
1077
|
return `calc(${k}% - ${C}px)`;
|
|
1078
1078
|
}
|
|
1079
1079
|
function l({
|
|
1080
|
-
stackedStyle:
|
|
1080
|
+
stackedStyle: p,
|
|
1081
1081
|
desktopStyle: k
|
|
1082
1082
|
}) {
|
|
1083
|
-
return i() === "tablet" ?
|
|
1083
|
+
return i() === "tablet" ? p : k;
|
|
1084
1084
|
}
|
|
1085
1085
|
function d({
|
|
1086
|
-
stackedStyle:
|
|
1086
|
+
stackedStyle: p,
|
|
1087
1087
|
desktopStyle: k
|
|
1088
1088
|
}) {
|
|
1089
|
-
return i() === "never" ? k :
|
|
1089
|
+
return i() === "never" ? k : p;
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function u() {
|
|
1092
1092
|
return e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column";
|
|
1093
1093
|
}
|
|
1094
1094
|
function h() {
|
|
1095
1095
|
return {
|
|
1096
|
-
"--flex-dir":
|
|
1096
|
+
"--flex-dir": u(),
|
|
1097
1097
|
"--flex-dir-tablet": l({
|
|
1098
|
-
stackedStyle:
|
|
1098
|
+
stackedStyle: u(),
|
|
1099
1099
|
desktopStyle: "row"
|
|
1100
1100
|
})
|
|
1101
1101
|
};
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1104
|
-
const k =
|
|
1103
|
+
function g(p) {
|
|
1104
|
+
const k = p === 0 ? 0 : t(), C = o(p), V = `${k}px`, w = "100%", x = 0;
|
|
1105
1105
|
return {
|
|
1106
1106
|
...{
|
|
1107
1107
|
display: "flex",
|
|
@@ -1128,70 +1128,70 @@ function Kt(e) {
|
|
|
1128
1128
|
})
|
|
1129
1129
|
};
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function c(p) {
|
|
1132
1132
|
var C, V;
|
|
1133
|
-
return
|
|
1133
|
+
return Me(
|
|
1134
1134
|
((V = (C = e.builderContext.content) == null ? void 0 : C.meta) == null ? void 0 : V.breakpoints) || {}
|
|
1135
|
-
)[
|
|
1135
|
+
)[p].max;
|
|
1136
1136
|
}
|
|
1137
1137
|
function v() {
|
|
1138
|
-
const
|
|
1138
|
+
const p = `.${e.builderBlock.id}-breakpoints > .builder-column`;
|
|
1139
1139
|
return `
|
|
1140
|
-
@media (max-width: ${
|
|
1140
|
+
@media (max-width: ${c("medium")}px) {
|
|
1141
1141
|
.${e.builderBlock.id}-breakpoints {
|
|
1142
1142
|
flex-direction: var(--flex-dir-tablet);
|
|
1143
1143
|
align-items: stretch;
|
|
1144
1144
|
}
|
|
1145
1145
|
|
|
1146
|
-
${
|
|
1146
|
+
${p} {
|
|
1147
1147
|
width: var(--column-width-tablet) !important;
|
|
1148
1148
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
1149
1149
|
}
|
|
1150
1150
|
}
|
|
1151
1151
|
|
|
1152
|
-
@media (max-width: ${
|
|
1152
|
+
@media (max-width: ${c("small")}px) {
|
|
1153
1153
|
.${e.builderBlock.id}-breakpoints {
|
|
1154
1154
|
flex-direction: var(--flex-dir);
|
|
1155
1155
|
align-items: stretch;
|
|
1156
1156
|
}
|
|
1157
1157
|
|
|
1158
|
-
${
|
|
1158
|
+
${p} {
|
|
1159
1159
|
width: var(--column-width-mobile) !important;
|
|
1160
1160
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
1161
1161
|
}
|
|
1162
1162
|
},
|
|
1163
1163
|
`;
|
|
1164
1164
|
}
|
|
1165
|
-
function f(
|
|
1165
|
+
function f(p, k) {
|
|
1166
1166
|
return {
|
|
1167
|
-
...
|
|
1168
|
-
href:
|
|
1167
|
+
...p.link ? {
|
|
1168
|
+
href: p.link
|
|
1169
1169
|
} : {},
|
|
1170
|
-
[
|
|
1171
|
-
style:
|
|
1170
|
+
[j()]: "builder-column",
|
|
1171
|
+
style: _e(g(k))
|
|
1172
1172
|
};
|
|
1173
1173
|
}
|
|
1174
|
-
return /* @__PURE__ */
|
|
1175
|
-
/* @__PURE__ */
|
|
1174
|
+
return /* @__PURE__ */ B(R, { children: [
|
|
1175
|
+
/* @__PURE__ */ B(
|
|
1176
1176
|
"div",
|
|
1177
1177
|
{
|
|
1178
|
-
className:
|
|
1178
|
+
className: Qt((b = e.builderBlock) == null ? void 0 : b.id) + " div-a6f3faac",
|
|
1179
1179
|
style: h(),
|
|
1180
1180
|
children: [
|
|
1181
1181
|
/* @__PURE__ */ s(
|
|
1182
|
-
|
|
1182
|
+
K,
|
|
1183
1183
|
{
|
|
1184
1184
|
id: "builderio-columns",
|
|
1185
1185
|
styles: v(),
|
|
1186
1186
|
nonce: e.builderContext.nonce
|
|
1187
1187
|
}
|
|
1188
1188
|
),
|
|
1189
|
-
(S = e.columns) == null ? void 0 : S.map((
|
|
1190
|
-
|
|
1189
|
+
(S = e.columns) == null ? void 0 : S.map((p, k) => /* @__PURE__ */ s(
|
|
1190
|
+
de,
|
|
1191
1191
|
{
|
|
1192
|
-
TagName: a(
|
|
1192
|
+
TagName: a(p),
|
|
1193
1193
|
actionAttributes: {},
|
|
1194
|
-
attributes: f(
|
|
1194
|
+
attributes: f(p, k),
|
|
1195
1195
|
children: /* @__PURE__ */ s(
|
|
1196
1196
|
$,
|
|
1197
1197
|
{
|
|
@@ -1200,7 +1200,7 @@ function Kt(e) {
|
|
|
1200
1200
|
context: e.builderContext,
|
|
1201
1201
|
registeredComponents: e.builderComponents,
|
|
1202
1202
|
linkComponent: e.builderLinkComponent,
|
|
1203
|
-
blocks:
|
|
1203
|
+
blocks: p.blocks,
|
|
1204
1204
|
styleProp: {
|
|
1205
1205
|
flexGrow: "1"
|
|
1206
1206
|
}
|
|
@@ -1218,55 +1218,55 @@ function Kt(e) {
|
|
|
1218
1218
|
}` })
|
|
1219
1219
|
] });
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function Xt(e) {
|
|
1222
1222
|
return /* @__PURE__ */ s("span", { children: e.children });
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function ke(e) {
|
|
1225
1225
|
return e.replace(/http(s)?:/, "");
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1227
|
+
function Zt(e = "", t, n) {
|
|
1228
1228
|
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), a = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1229
1229
|
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + a + t + "=" + encodeURIComponent(n);
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1231
|
+
function en(e, t) {
|
|
1232
1232
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1233
1233
|
return e;
|
|
1234
1234
|
if (t === "master")
|
|
1235
|
-
return
|
|
1235
|
+
return ke(e);
|
|
1236
1236
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1237
1237
|
if (n) {
|
|
1238
1238
|
const i = e.split(n[0]), a = n[3], r = t.match("x") ? t : `${t}x`;
|
|
1239
|
-
return
|
|
1239
|
+
return ke(`${i[0]}_${r}${a}`);
|
|
1240
1240
|
}
|
|
1241
1241
|
return null;
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function ie(e) {
|
|
1244
1244
|
if (!e)
|
|
1245
1245
|
return e;
|
|
1246
1246
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
1247
1247
|
if (e.match(/builder\.io/)) {
|
|
1248
1248
|
let n = e;
|
|
1249
1249
|
const i = Number(e.split("?width=")[1]);
|
|
1250
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${
|
|
1250
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${Zt(e, "width", a)} ${a}w`).concat([n]).join(", ");
|
|
1251
1251
|
}
|
|
1252
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1252
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [en(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1255
|
-
var a, r, o, l, d,
|
|
1254
|
+
function tn(e) {
|
|
1255
|
+
var a, r, o, l, d, u;
|
|
1256
1256
|
function t() {
|
|
1257
|
-
var
|
|
1258
|
-
const
|
|
1259
|
-
if (!
|
|
1257
|
+
var c;
|
|
1258
|
+
const g = e.image || e.src;
|
|
1259
|
+
if (!g || // We can auto add srcset for cdn.builder.io and shopify
|
|
1260
1260
|
// images, otherwise you can supply this prop manually
|
|
1261
|
-
!(typeof
|
|
1261
|
+
!(typeof g == "string" && (g.match(/builder\.io/) || g.match(/cdn\.shopify\.com/))))
|
|
1262
1262
|
return e.srcset;
|
|
1263
1263
|
if (!e.noWebp) {
|
|
1264
|
-
if (e.srcset && ((
|
|
1264
|
+
if (e.srcset && ((c = e.image) != null && c.includes("builder.io/api/v1/image"))) {
|
|
1265
1265
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1266
|
-
return console.debug("Removed given srcset"),
|
|
1266
|
+
return console.debug("Removed given srcset"), ie(g);
|
|
1267
1267
|
} else if (e.image && !e.srcset)
|
|
1268
|
-
return
|
|
1269
|
-
return
|
|
1268
|
+
return ie(g);
|
|
1269
|
+
return ie(g);
|
|
1270
1270
|
}
|
|
1271
1271
|
}
|
|
1272
1272
|
function n() {
|
|
@@ -1283,9 +1283,9 @@ function Yt(e) {
|
|
|
1283
1283
|
};
|
|
1284
1284
|
return e.aspectRatio ? h : void 0;
|
|
1285
1285
|
}
|
|
1286
|
-
return /* @__PURE__ */
|
|
1287
|
-
/* @__PURE__ */
|
|
1288
|
-
/* @__PURE__ */
|
|
1286
|
+
return /* @__PURE__ */ B(R, { children: [
|
|
1287
|
+
/* @__PURE__ */ B(R, { children: [
|
|
1288
|
+
/* @__PURE__ */ B("picture", { children: [
|
|
1289
1289
|
n() ? /* @__PURE__ */ s("source", { type: "image/webp", srcSet: n() }) : null,
|
|
1290
1290
|
/* @__PURE__ */ s(
|
|
1291
1291
|
"img",
|
|
@@ -1316,7 +1316,7 @@ function Yt(e) {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
) : null,
|
|
1318
1318
|
(l = (o = e.builderBlock) == null ? void 0 : o.children) != null && l.length && e.fitContent ? /* @__PURE__ */ s(R, { children: e.children }) : null,
|
|
1319
|
-
!e.fitContent && ((
|
|
1319
|
+
!e.fitContent && ((u = (d = e.builderBlock) == null ? void 0 : d.children) != null && u.length) ? /* @__PURE__ */ s("div", { className: "div-9dac2184-2", children: e.children }) : null
|
|
1320
1320
|
] }),
|
|
1321
1321
|
/* @__PURE__ */ s("style", { children: `.img-9dac2184 {
|
|
1322
1322
|
opacity: 1;
|
|
@@ -1337,7 +1337,7 @@ function Yt(e) {
|
|
|
1337
1337
|
}` })
|
|
1338
1338
|
] });
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function nn(e) {
|
|
1341
1341
|
return /* @__PURE__ */ s(
|
|
1342
1342
|
"section",
|
|
1343
1343
|
{
|
|
@@ -1358,7 +1358,7 @@ function Xt(e) {
|
|
|
1358
1358
|
}
|
|
1359
1359
|
);
|
|
1360
1360
|
}
|
|
1361
|
-
const
|
|
1361
|
+
const ae = {
|
|
1362
1362
|
"@type": "@builder.io/sdk:Element",
|
|
1363
1363
|
layerName: "Accordion item title",
|
|
1364
1364
|
responsiveStyles: {
|
|
@@ -1387,7 +1387,7 @@ const ee = {
|
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
1389
|
}]
|
|
1390
|
-
},
|
|
1390
|
+
}, oe = {
|
|
1391
1391
|
"@type": "@builder.io/sdk:Element",
|
|
1392
1392
|
layerName: "Accordion item detail",
|
|
1393
1393
|
responsiveStyles: {
|
|
@@ -1418,7 +1418,7 @@ const ee = {
|
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
1420
|
}]
|
|
1421
|
-
},
|
|
1421
|
+
}, an = {
|
|
1422
1422
|
name: "Builder:Accordion",
|
|
1423
1423
|
canHaveChildren: !0,
|
|
1424
1424
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -1435,19 +1435,19 @@ const ee = {
|
|
|
1435
1435
|
name: "title",
|
|
1436
1436
|
type: "uiBlocks",
|
|
1437
1437
|
hideFromUI: !0,
|
|
1438
|
-
defaultValue: [
|
|
1438
|
+
defaultValue: [ae]
|
|
1439
1439
|
}, {
|
|
1440
1440
|
name: "detail",
|
|
1441
1441
|
type: "uiBlocks",
|
|
1442
1442
|
hideFromUI: !0,
|
|
1443
|
-
defaultValue: [
|
|
1443
|
+
defaultValue: [oe]
|
|
1444
1444
|
}],
|
|
1445
1445
|
defaultValue: [{
|
|
1446
|
-
title: [
|
|
1447
|
-
detail: [
|
|
1446
|
+
title: [ae],
|
|
1447
|
+
detail: [oe]
|
|
1448
1448
|
}, {
|
|
1449
|
-
title: [
|
|
1450
|
-
detail: [
|
|
1449
|
+
title: [ae],
|
|
1450
|
+
detail: [oe]
|
|
1451
1451
|
}],
|
|
1452
1452
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
1453
1453
|
}, {
|
|
@@ -1482,10 +1482,10 @@ const ee = {
|
|
|
1482
1482
|
builderComponents: !0,
|
|
1483
1483
|
builderLinkComponent: !0
|
|
1484
1484
|
}
|
|
1485
|
-
},
|
|
1486
|
-
function
|
|
1487
|
-
var
|
|
1488
|
-
const [t, n] =
|
|
1485
|
+
}, Ce = (e) => e.toString();
|
|
1486
|
+
function on(e) {
|
|
1487
|
+
var g;
|
|
1488
|
+
const [t, n] = I(() => []);
|
|
1489
1489
|
function i() {
|
|
1490
1490
|
return !!(e.grid || e.oneAtATime);
|
|
1491
1491
|
}
|
|
@@ -1511,57 +1511,57 @@ function en(e) {
|
|
|
1511
1511
|
cursor: "pointer"
|
|
1512
1512
|
};
|
|
1513
1513
|
return Object.fromEntries(
|
|
1514
|
-
Object.entries(v).filter(([f,
|
|
1514
|
+
Object.entries(v).filter(([f, b]) => b !== void 0)
|
|
1515
1515
|
);
|
|
1516
1516
|
}
|
|
1517
|
-
function o(
|
|
1518
|
-
return `builder-accordion-title builder-accordion-title-${t.includes(
|
|
1517
|
+
function o(c) {
|
|
1518
|
+
return `builder-accordion-title builder-accordion-title-${t.includes(c) ? "open" : "closed"}`;
|
|
1519
1519
|
}
|
|
1520
|
-
function l(
|
|
1521
|
-
return `builder-accordion-detail builder-accordion-detail-${t.includes(
|
|
1520
|
+
function l(c) {
|
|
1521
|
+
return `builder-accordion-detail builder-accordion-detail-${t.includes(c) ? "open" : "closed"}`;
|
|
1522
1522
|
}
|
|
1523
1523
|
function d() {
|
|
1524
|
-
let
|
|
1524
|
+
let c = null;
|
|
1525
1525
|
if (e.grid && t.length && document) {
|
|
1526
1526
|
const f = t[0];
|
|
1527
1527
|
let S = document.querySelector(
|
|
1528
1528
|
`.builder-accordion-title[data-index="${f}"]`
|
|
1529
1529
|
);
|
|
1530
|
-
if (
|
|
1531
|
-
let
|
|
1530
|
+
if (c = f, S) {
|
|
1531
|
+
let p = S.getBoundingClientRect();
|
|
1532
1532
|
for (; S = S && S.nextElementSibling; )
|
|
1533
1533
|
if (S) {
|
|
1534
1534
|
if (S.classList.contains("builder-accordion-detail"))
|
|
1535
1535
|
continue;
|
|
1536
1536
|
const k = S.getBoundingClientRect();
|
|
1537
|
-
if (k.left >
|
|
1537
|
+
if (k.left > p.left) {
|
|
1538
1538
|
const C = parseInt(
|
|
1539
1539
|
S.getAttribute("data-index") || "",
|
|
1540
1540
|
10
|
|
1541
1541
|
);
|
|
1542
|
-
isNaN(C) || (
|
|
1542
|
+
isNaN(C) || (p = k, c = C);
|
|
1543
1543
|
} else
|
|
1544
1544
|
break;
|
|
1545
1545
|
}
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
1548
|
-
return typeof
|
|
1548
|
+
return typeof c == "number" && (c = c + 1), c;
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1551
|
-
const
|
|
1550
|
+
function u() {
|
|
1551
|
+
const c = {
|
|
1552
1552
|
order: typeof d() == "number" ? d() : void 0,
|
|
1553
1553
|
...e.grid && {
|
|
1554
1554
|
width: "100%"
|
|
1555
1555
|
}
|
|
1556
1556
|
};
|
|
1557
1557
|
return Object.fromEntries(
|
|
1558
|
-
Object.entries(
|
|
1558
|
+
Object.entries(c).filter(([v, f]) => f !== void 0)
|
|
1559
1559
|
);
|
|
1560
1560
|
}
|
|
1561
|
-
function h(
|
|
1562
|
-
t.includes(
|
|
1561
|
+
function h(c) {
|
|
1562
|
+
t.includes(c) ? n(i() ? [] : t.filter((v) => v !== c)) : n(i() ? [c] : t.concat(c));
|
|
1563
1563
|
}
|
|
1564
|
-
return /* @__PURE__ */ s("div", { className: "builder-accordion", style: a(), children: (
|
|
1564
|
+
return /* @__PURE__ */ s("div", { className: "builder-accordion", style: a(), children: (g = e.items) == null ? void 0 : g.map((c, v) => /* @__PURE__ */ B(tt.Fragment, { children: [
|
|
1565
1565
|
/* @__PURE__ */ s(
|
|
1566
1566
|
"div",
|
|
1567
1567
|
{
|
|
@@ -1570,7 +1570,7 @@ function en(e) {
|
|
|
1570
1570
|
...r(),
|
|
1571
1571
|
...e.grid && {
|
|
1572
1572
|
width: e.gridRowWidth,
|
|
1573
|
-
order: d() !== null ?
|
|
1573
|
+
order: d() !== null ? Ce(v) : Ce(v + 1)
|
|
1574
1574
|
}
|
|
1575
1575
|
},
|
|
1576
1576
|
"data-index": v,
|
|
@@ -1578,7 +1578,7 @@ function en(e) {
|
|
|
1578
1578
|
children: /* @__PURE__ */ s(
|
|
1579
1579
|
$,
|
|
1580
1580
|
{
|
|
1581
|
-
blocks:
|
|
1581
|
+
blocks: c.title,
|
|
1582
1582
|
path: `items.${v}.title`,
|
|
1583
1583
|
parent: e.builderBlock.id,
|
|
1584
1584
|
context: e.builderContext,
|
|
@@ -1592,11 +1592,11 @@ function en(e) {
|
|
|
1592
1592
|
"div",
|
|
1593
1593
|
{
|
|
1594
1594
|
className: l(v),
|
|
1595
|
-
style:
|
|
1595
|
+
style: u(),
|
|
1596
1596
|
children: /* @__PURE__ */ s(
|
|
1597
1597
|
$,
|
|
1598
1598
|
{
|
|
1599
|
-
blocks:
|
|
1599
|
+
blocks: c.detail,
|
|
1600
1600
|
path: `items.${v}.detail`,
|
|
1601
1601
|
parent: e.builderBlock.id,
|
|
1602
1602
|
context: e.builderContext,
|
|
@@ -1608,7 +1608,7 @@ function en(e) {
|
|
|
1608
1608
|
) : null
|
|
1609
1609
|
] }, v)) });
|
|
1610
1610
|
}
|
|
1611
|
-
const
|
|
1611
|
+
const rn = {
|
|
1612
1612
|
name: "Core:Button",
|
|
1613
1613
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1614
1614
|
defaultStyles: {
|
|
@@ -1644,7 +1644,7 @@ const tn = {
|
|
|
1644
1644
|
shouldReceiveBuilderProps: {
|
|
1645
1645
|
builderLinkComponent: !0
|
|
1646
1646
|
}
|
|
1647
|
-
},
|
|
1647
|
+
}, ln = {
|
|
1648
1648
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1649
1649
|
name: "Columns",
|
|
1650
1650
|
isRSC: !0,
|
|
@@ -1851,13 +1851,13 @@ const tn = {
|
|
|
1851
1851
|
builderComponents: !0,
|
|
1852
1852
|
builderLinkComponent: !0
|
|
1853
1853
|
}
|
|
1854
|
-
},
|
|
1854
|
+
}, sn = {
|
|
1855
1855
|
name: "Fragment",
|
|
1856
1856
|
static: !0,
|
|
1857
1857
|
hidden: !0,
|
|
1858
1858
|
canHaveChildren: !0,
|
|
1859
1859
|
noWrap: !0
|
|
1860
|
-
},
|
|
1860
|
+
}, he = ["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"], cn = ["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"], un = {
|
|
1861
1861
|
name: "Image",
|
|
1862
1862
|
static: !0,
|
|
1863
1863
|
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",
|
|
@@ -1872,21 +1872,21 @@ const tn = {
|
|
|
1872
1872
|
name: "image",
|
|
1873
1873
|
type: "file",
|
|
1874
1874
|
bubble: !0,
|
|
1875
|
-
allowedFileTypes:
|
|
1875
|
+
allowedFileTypes: he,
|
|
1876
1876
|
required: !0,
|
|
1877
1877
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1878
1878
|
onChange: (e) => {
|
|
1879
1879
|
e.delete("srcset"), e.delete("noWebp");
|
|
1880
1880
|
function n(o, l = 6e4) {
|
|
1881
|
-
return new Promise((d,
|
|
1881
|
+
return new Promise((d, u) => {
|
|
1882
1882
|
const h = document.createElement("img");
|
|
1883
|
-
let
|
|
1883
|
+
let g = !1;
|
|
1884
1884
|
h.onload = () => {
|
|
1885
|
-
|
|
1886
|
-
}, h.addEventListener("error", (
|
|
1887
|
-
console.warn("Image load failed",
|
|
1885
|
+
g = !0, d(h);
|
|
1886
|
+
}, h.addEventListener("error", (c) => {
|
|
1887
|
+
console.warn("Image load failed", c.error), u(c.error);
|
|
1888
1888
|
}), h.src = o, setTimeout(() => {
|
|
1889
|
-
|
|
1889
|
+
g || u(new Error("Image load timed out"));
|
|
1890
1890
|
}, l);
|
|
1891
1891
|
});
|
|
1892
1892
|
}
|
|
@@ -1965,7 +1965,7 @@ const tn = {
|
|
|
1965
1965
|
shouldReceiveBuilderProps: {
|
|
1966
1966
|
builderBlock: !0
|
|
1967
1967
|
}
|
|
1968
|
-
},
|
|
1968
|
+
}, dn = {
|
|
1969
1969
|
name: "PersonalizationContainer",
|
|
1970
1970
|
shouldReceiveBuilderProps: {
|
|
1971
1971
|
builderBlock: !0,
|
|
@@ -2001,7 +2001,7 @@ const tn = {
|
|
|
2001
2001
|
}]
|
|
2002
2002
|
}]
|
|
2003
2003
|
};
|
|
2004
|
-
function
|
|
2004
|
+
function Y(e) {
|
|
2005
2005
|
return /* @__PURE__ */ s(
|
|
2006
2006
|
"script",
|
|
2007
2007
|
{
|
|
@@ -2011,51 +2011,51 @@ function J(e) {
|
|
|
2011
2011
|
}
|
|
2012
2012
|
);
|
|
2013
2013
|
}
|
|
2014
|
-
function
|
|
2015
|
-
function a(
|
|
2016
|
-
return typeof
|
|
2014
|
+
function mn(e, t, n, i) {
|
|
2015
|
+
function a(u) {
|
|
2016
|
+
return typeof u == "string";
|
|
2017
2017
|
}
|
|
2018
|
-
function r(
|
|
2019
|
-
return typeof
|
|
2018
|
+
function r(u) {
|
|
2019
|
+
return typeof u == "number";
|
|
2020
2020
|
}
|
|
2021
|
-
function o(
|
|
2021
|
+
function o(u, h) {
|
|
2022
2022
|
return (() => {
|
|
2023
|
-
const
|
|
2023
|
+
const c = h.property, v = h.operator;
|
|
2024
2024
|
let f = h.value;
|
|
2025
|
-
if (h && h.property === "urlPath" && h.value && typeof h.value == "string" && h.value !== "/" && h.value.endsWith("/") && (f = h.value.slice(0, -1)), !(
|
|
2025
|
+
if (h && h.property === "urlPath" && h.value && typeof h.value == "string" && h.value !== "/" && h.value.endsWith("/") && (f = h.value.slice(0, -1)), !(c && v))
|
|
2026
2026
|
return !0;
|
|
2027
2027
|
if (Array.isArray(f))
|
|
2028
|
-
return v === "isNot" ? f.every((S) => o(
|
|
2029
|
-
property:
|
|
2028
|
+
return v === "isNot" ? f.every((S) => o(u, {
|
|
2029
|
+
property: c,
|
|
2030
2030
|
operator: v,
|
|
2031
2031
|
value: S
|
|
2032
|
-
})) : !!f.find((S) => o(
|
|
2033
|
-
property:
|
|
2032
|
+
})) : !!f.find((S) => o(u, {
|
|
2033
|
+
property: c,
|
|
2034
2034
|
operator: v,
|
|
2035
2035
|
value: S
|
|
2036
2036
|
}));
|
|
2037
|
-
const
|
|
2038
|
-
if (Array.isArray(
|
|
2039
|
-
return
|
|
2037
|
+
const b = u[c];
|
|
2038
|
+
if (Array.isArray(b))
|
|
2039
|
+
return b.includes(f);
|
|
2040
2040
|
switch (v) {
|
|
2041
2041
|
case "is":
|
|
2042
|
-
return
|
|
2042
|
+
return b === f;
|
|
2043
2043
|
case "isNot":
|
|
2044
|
-
return
|
|
2044
|
+
return b !== f;
|
|
2045
2045
|
case "contains":
|
|
2046
|
-
return (a(
|
|
2046
|
+
return (a(b) || Array.isArray(b)) && b.includes(String(f));
|
|
2047
2047
|
case "startsWith":
|
|
2048
|
-
return a(
|
|
2048
|
+
return a(b) && b.startsWith(String(f));
|
|
2049
2049
|
case "endsWith":
|
|
2050
|
-
return a(
|
|
2050
|
+
return a(b) && b.endsWith(String(f));
|
|
2051
2051
|
case "greaterThan":
|
|
2052
|
-
return r(
|
|
2052
|
+
return r(b) && r(f) && b > f;
|
|
2053
2053
|
case "lessThan":
|
|
2054
|
-
return r(
|
|
2054
|
+
return r(b) && r(f) && b < f;
|
|
2055
2055
|
case "greaterThanOrEqualTo":
|
|
2056
|
-
return r(
|
|
2056
|
+
return r(b) && r(f) && b >= f;
|
|
2057
2057
|
case "lessThanOrEqualTo":
|
|
2058
|
-
return r(
|
|
2058
|
+
return r(b) && r(f) && b <= f;
|
|
2059
2059
|
default:
|
|
2060
2060
|
return !1;
|
|
2061
2061
|
}
|
|
@@ -2066,9 +2066,9 @@ function sn(e, t, n, i) {
|
|
|
2066
2066
|
startDate: n,
|
|
2067
2067
|
endDate: i
|
|
2068
2068
|
}, d = e.date && new Date(e.date) || /* @__PURE__ */ new Date();
|
|
2069
|
-
return l.startDate && new Date(l.startDate) > d || l.endDate && new Date(l.endDate) < d ? !1 : !l.query || !l.query.length ? !0 : l.query.every((
|
|
2069
|
+
return l.startDate && new Date(l.startDate) > d || l.endDate && new Date(l.endDate) < d ? !1 : !l.query || !l.query.length ? !0 : l.query.every((u) => o(e, u));
|
|
2070
2070
|
}
|
|
2071
|
-
const
|
|
2071
|
+
const fn = `function getPersonalizedVariant(variants, blockId, locale) {
|
|
2072
2072
|
if (!navigator.cookieEnabled) {
|
|
2073
2073
|
return;
|
|
2074
2074
|
}
|
|
@@ -2121,7 +2121,7 @@ const cn = `function getPersonalizedVariant(variants, blockId, locale) {
|
|
|
2121
2121
|
} else if (variants && variants.length > 0) {
|
|
2122
2122
|
removeVariants();
|
|
2123
2123
|
}
|
|
2124
|
-
}`,
|
|
2124
|
+
}`, hn = `function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
|
|
2125
2125
|
function isString(val) {
|
|
2126
2126
|
return typeof val === 'string';
|
|
2127
2127
|
}
|
|
@@ -2200,10 +2200,10 @@ const cn = `function getPersonalizedVariant(variants, blockId, locale) {
|
|
|
2200
2200
|
return objectMatchesQuery(userAttributes, filter);
|
|
2201
2201
|
});
|
|
2202
2202
|
}`;
|
|
2203
|
-
function
|
|
2204
|
-
return !(!(e && e.length > 0) || !t ||
|
|
2203
|
+
function gn(e, t) {
|
|
2204
|
+
return !(!(e && e.length > 0) || !t || U());
|
|
2205
2205
|
}
|
|
2206
|
-
function
|
|
2206
|
+
function bn({
|
|
2207
2207
|
variants: e,
|
|
2208
2208
|
previewingIndex: t,
|
|
2209
2209
|
isHydrated: n,
|
|
@@ -2215,12 +2215,12 @@ function mn({
|
|
|
2215
2215
|
blocks: a != null ? a : [],
|
|
2216
2216
|
path: "this.children"
|
|
2217
2217
|
};
|
|
2218
|
-
if (n &&
|
|
2218
|
+
if (n && N())
|
|
2219
2219
|
return typeof t == "number" && t < ((o = e == null ? void 0 : e.length) != null ? o : 0) ? {
|
|
2220
2220
|
blocks: e[t].blocks,
|
|
2221
2221
|
path: `component.options.variants.${t}.blocks`
|
|
2222
2222
|
} : r;
|
|
2223
|
-
if (
|
|
2223
|
+
if (U()) {
|
|
2224
2224
|
const l = i == null ? void 0 : i[0];
|
|
2225
2225
|
if (l)
|
|
2226
2226
|
return {
|
|
@@ -2230,42 +2230,42 @@ function mn({
|
|
|
2230
2230
|
}
|
|
2231
2231
|
return r;
|
|
2232
2232
|
}
|
|
2233
|
-
const
|
|
2233
|
+
const pn = (e, t, n) => `
|
|
2234
2234
|
(function() {
|
|
2235
|
-
${
|
|
2236
|
-
${
|
|
2235
|
+
${hn}
|
|
2236
|
+
${fn}
|
|
2237
2237
|
getPersonalizedVariant(${JSON.stringify(e)}, "${t}"${n ? `, "${n}"` : ""})
|
|
2238
2238
|
})();
|
|
2239
2239
|
`;
|
|
2240
|
-
function
|
|
2241
|
-
var
|
|
2242
|
-
const t =
|
|
2243
|
-
() =>
|
|
2244
|
-
), [a, r] =
|
|
2240
|
+
function yn(e) {
|
|
2241
|
+
var b, S, p, k, C, V, w;
|
|
2242
|
+
const t = L(null), [n, i] = I(
|
|
2243
|
+
() => be.getUserAttributes()
|
|
2244
|
+
), [a, r] = I(
|
|
2245
2245
|
() => {
|
|
2246
|
-
var x, m,
|
|
2247
|
-
return
|
|
2246
|
+
var x, m, y;
|
|
2247
|
+
return pn(
|
|
2248
2248
|
e.variants,
|
|
2249
2249
|
((x = e.builderBlock) == null ? void 0 : x.id) || "none",
|
|
2250
|
-
(
|
|
2250
|
+
(y = (m = e.builderContext) == null ? void 0 : m.rootState) == null ? void 0 : y.locale
|
|
2251
2251
|
);
|
|
2252
2252
|
}
|
|
2253
|
-
), [o, l] =
|
|
2253
|
+
), [o, l] = I(() => []), [d, u] = I(
|
|
2254
2254
|
() => {
|
|
2255
2255
|
var x;
|
|
2256
|
-
return
|
|
2256
|
+
return gn(
|
|
2257
2257
|
e.variants,
|
|
2258
|
-
|
|
2258
|
+
M((x = e.builderContext) == null ? void 0 : x.canTrack)
|
|
2259
2259
|
);
|
|
2260
2260
|
}
|
|
2261
|
-
), [h,
|
|
2262
|
-
function
|
|
2261
|
+
), [h, g] = I(() => !1);
|
|
2262
|
+
function c() {
|
|
2263
2263
|
return (e.variants || []).filter((x) => {
|
|
2264
|
-
var m,
|
|
2265
|
-
return
|
|
2264
|
+
var m, y, T, E;
|
|
2265
|
+
return mn(
|
|
2266
2266
|
{
|
|
2267
|
-
...(
|
|
2268
|
-
locale: (
|
|
2267
|
+
...(y = (m = e.builderContext) == null ? void 0 : m.rootState) != null && y.locale ? {
|
|
2268
|
+
locale: (E = (T = e.builderContext) == null ? void 0 : T.rootState) == null ? void 0 : E.locale
|
|
2269
2269
|
} : {},
|
|
2270
2270
|
...n
|
|
2271
2271
|
},
|
|
@@ -2277,48 +2277,48 @@ function hn(e) {
|
|
|
2277
2277
|
}
|
|
2278
2278
|
function v() {
|
|
2279
2279
|
var x;
|
|
2280
|
-
return
|
|
2280
|
+
return bn({
|
|
2281
2281
|
variants: e.variants,
|
|
2282
2282
|
fallbackBlocks: (x = e.builderBlock) == null ? void 0 : x.children,
|
|
2283
2283
|
isHydrated: h,
|
|
2284
|
-
filteredVariants:
|
|
2284
|
+
filteredVariants: c(),
|
|
2285
2285
|
previewingIndex: e.previewingIndex
|
|
2286
2286
|
});
|
|
2287
2287
|
}
|
|
2288
2288
|
function f() {
|
|
2289
2289
|
return (e.variants || []).map(
|
|
2290
2290
|
(x, m) => {
|
|
2291
|
-
var
|
|
2292
|
-
return `[data-variant-id="${(
|
|
2291
|
+
var y;
|
|
2292
|
+
return `[data-variant-id="${(y = e.builderBlock) == null ? void 0 : y.id}-${m}"] { display: none; } `;
|
|
2293
2293
|
}
|
|
2294
2294
|
).join("");
|
|
2295
2295
|
}
|
|
2296
|
-
return
|
|
2296
|
+
return P(() => {
|
|
2297
2297
|
var m;
|
|
2298
|
-
|
|
2299
|
-
const x =
|
|
2300
|
-
(
|
|
2301
|
-
i(
|
|
2298
|
+
g(!0);
|
|
2299
|
+
const x = be.subscribeOnUserAttributesChange(
|
|
2300
|
+
(y) => {
|
|
2301
|
+
i(y);
|
|
2302
2302
|
}
|
|
2303
2303
|
);
|
|
2304
|
-
if (!(
|
|
2305
|
-
const
|
|
2304
|
+
if (!(N() || X())) {
|
|
2305
|
+
const y = c()[0];
|
|
2306
2306
|
t.current && (t.current.dispatchEvent(
|
|
2307
2307
|
new CustomEvent("builder.variantLoaded", {
|
|
2308
2308
|
detail: {
|
|
2309
|
-
variant:
|
|
2309
|
+
variant: y || "default",
|
|
2310
2310
|
content: (m = e.builderContext) == null ? void 0 : m.content
|
|
2311
2311
|
},
|
|
2312
2312
|
bubbles: !0
|
|
2313
2313
|
})
|
|
2314
|
-
), new IntersectionObserver((
|
|
2315
|
-
|
|
2316
|
-
var
|
|
2317
|
-
|
|
2314
|
+
), new IntersectionObserver((E) => {
|
|
2315
|
+
E.forEach((A) => {
|
|
2316
|
+
var W;
|
|
2317
|
+
A.isIntersecting && t.current && t.current.dispatchEvent(
|
|
2318
2318
|
new CustomEvent("builder.variantDisplayed", {
|
|
2319
2319
|
detail: {
|
|
2320
|
-
variant:
|
|
2321
|
-
content: (
|
|
2320
|
+
variant: y || "default",
|
|
2321
|
+
content: (W = e.builderContext) == null ? void 0 : W.content
|
|
2322
2322
|
},
|
|
2323
2323
|
bubbles: !0
|
|
2324
2324
|
})
|
|
@@ -2327,27 +2327,27 @@ function hn(e) {
|
|
|
2327
2327
|
}).observe(t.current));
|
|
2328
2328
|
}
|
|
2329
2329
|
o.push(x);
|
|
2330
|
-
}, []),
|
|
2330
|
+
}, []), P(() => () => {
|
|
2331
2331
|
o.forEach((x) => x());
|
|
2332
|
-
}, []), /* @__PURE__ */
|
|
2332
|
+
}, []), /* @__PURE__ */ B(
|
|
2333
2333
|
"div",
|
|
2334
2334
|
{
|
|
2335
2335
|
ref: t,
|
|
2336
2336
|
...e.attributes,
|
|
2337
|
-
className: `builder-personalization-container ${((
|
|
2337
|
+
className: `builder-personalization-container ${((b = e.attributes) == null ? void 0 : b.className) || ""}`,
|
|
2338
2338
|
children: [
|
|
2339
|
-
d ? /* @__PURE__ */
|
|
2339
|
+
d ? /* @__PURE__ */ B(R, { children: [
|
|
2340
2340
|
(S = e.variants) == null ? void 0 : S.map((x, m) => {
|
|
2341
|
-
var
|
|
2341
|
+
var y, T;
|
|
2342
2342
|
return /* @__PURE__ */ s(
|
|
2343
2343
|
"template",
|
|
2344
2344
|
{
|
|
2345
|
-
"data-variant-id": `${(
|
|
2345
|
+
"data-variant-id": `${(y = e.builderBlock) == null ? void 0 : y.id}-${m}`,
|
|
2346
2346
|
children: /* @__PURE__ */ s(
|
|
2347
2347
|
$,
|
|
2348
2348
|
{
|
|
2349
2349
|
blocks: x.blocks,
|
|
2350
|
-
parent: (
|
|
2350
|
+
parent: (T = e.builderBlock) == null ? void 0 : T.id,
|
|
2351
2351
|
path: `component.options.variants.${m}.blocks`
|
|
2352
2352
|
}
|
|
2353
2353
|
)
|
|
@@ -2356,15 +2356,15 @@ function hn(e) {
|
|
|
2356
2356
|
);
|
|
2357
2357
|
}),
|
|
2358
2358
|
/* @__PURE__ */ s(
|
|
2359
|
-
|
|
2359
|
+
K,
|
|
2360
2360
|
{
|
|
2361
|
-
nonce: ((
|
|
2361
|
+
nonce: ((p = e.builderContext) == null ? void 0 : p.nonce) || "",
|
|
2362
2362
|
styles: f(),
|
|
2363
2363
|
id: `variants-styles-${(k = e.builderBlock) == null ? void 0 : k.id}`
|
|
2364
2364
|
}
|
|
2365
2365
|
),
|
|
2366
2366
|
/* @__PURE__ */ s(
|
|
2367
|
-
|
|
2367
|
+
Y,
|
|
2368
2368
|
{
|
|
2369
2369
|
nonce: ((C = e.builderContext) == null ? void 0 : C.nonce) || "",
|
|
2370
2370
|
scriptStr: a,
|
|
@@ -2384,7 +2384,7 @@ function hn(e) {
|
|
|
2384
2384
|
}
|
|
2385
2385
|
);
|
|
2386
2386
|
}
|
|
2387
|
-
const
|
|
2387
|
+
const vn = {
|
|
2388
2388
|
name: "Core:Section",
|
|
2389
2389
|
static: !0,
|
|
2390
2390
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2423,7 +2423,7 @@ const gn = {
|
|
|
2423
2423
|
}
|
|
2424
2424
|
}
|
|
2425
2425
|
}]
|
|
2426
|
-
},
|
|
2426
|
+
}, xn = {
|
|
2427
2427
|
name: "Slot",
|
|
2428
2428
|
isRSC: !0,
|
|
2429
2429
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -2441,7 +2441,7 @@ const gn = {
|
|
|
2441
2441
|
builderComponents: !0
|
|
2442
2442
|
}
|
|
2443
2443
|
};
|
|
2444
|
-
function
|
|
2444
|
+
function Sn(e) {
|
|
2445
2445
|
var t, n, i;
|
|
2446
2446
|
return /* @__PURE__ */ s(
|
|
2447
2447
|
"div",
|
|
@@ -2465,7 +2465,7 @@ function pn(e) {
|
|
|
2465
2465
|
}
|
|
2466
2466
|
);
|
|
2467
2467
|
}
|
|
2468
|
-
const
|
|
2468
|
+
const kn = {
|
|
2469
2469
|
name: "Symbol",
|
|
2470
2470
|
noWrap: !0,
|
|
2471
2471
|
static: !0,
|
|
@@ -2504,7 +2504,7 @@ const yn = {
|
|
|
2504
2504
|
builderComponents: !0,
|
|
2505
2505
|
builderLinkComponent: !0
|
|
2506
2506
|
}
|
|
2507
|
-
},
|
|
2507
|
+
}, re = {
|
|
2508
2508
|
"@type": "@builder.io/sdk:Element",
|
|
2509
2509
|
responsiveStyles: {
|
|
2510
2510
|
large: {
|
|
@@ -2526,7 +2526,7 @@ const yn = {
|
|
|
2526
2526
|
text: "New tab"
|
|
2527
2527
|
}
|
|
2528
2528
|
}
|
|
2529
|
-
},
|
|
2529
|
+
}, le = {
|
|
2530
2530
|
"@type": "@builder.io/sdk:Element",
|
|
2531
2531
|
responsiveStyles: {
|
|
2532
2532
|
large: {
|
|
@@ -2542,7 +2542,7 @@ const yn = {
|
|
|
2542
2542
|
text: "New tab content "
|
|
2543
2543
|
}
|
|
2544
2544
|
}
|
|
2545
|
-
},
|
|
2545
|
+
}, Cn = {
|
|
2546
2546
|
name: "Builder: Tabs",
|
|
2547
2547
|
inputs: [{
|
|
2548
2548
|
name: "tabs",
|
|
@@ -2552,16 +2552,16 @@ const yn = {
|
|
|
2552
2552
|
name: "label",
|
|
2553
2553
|
type: "uiBlocks",
|
|
2554
2554
|
hideFromUI: !0,
|
|
2555
|
-
defaultValue: [
|
|
2555
|
+
defaultValue: [re]
|
|
2556
2556
|
}, {
|
|
2557
2557
|
name: "content",
|
|
2558
2558
|
type: "uiBlocks",
|
|
2559
2559
|
hideFromUI: !0,
|
|
2560
|
-
defaultValue: [
|
|
2560
|
+
defaultValue: [le]
|
|
2561
2561
|
}],
|
|
2562
2562
|
defaultValue: [{
|
|
2563
2563
|
label: [{
|
|
2564
|
-
...
|
|
2564
|
+
...re,
|
|
2565
2565
|
component: {
|
|
2566
2566
|
name: "Text",
|
|
2567
2567
|
options: {
|
|
@@ -2570,7 +2570,7 @@ const yn = {
|
|
|
2570
2570
|
}
|
|
2571
2571
|
}],
|
|
2572
2572
|
content: [{
|
|
2573
|
-
...
|
|
2573
|
+
...le,
|
|
2574
2574
|
component: {
|
|
2575
2575
|
name: "Text",
|
|
2576
2576
|
options: {
|
|
@@ -2580,7 +2580,7 @@ const yn = {
|
|
|
2580
2580
|
}]
|
|
2581
2581
|
}, {
|
|
2582
2582
|
label: [{
|
|
2583
|
-
...
|
|
2583
|
+
...re,
|
|
2584
2584
|
component: {
|
|
2585
2585
|
name: "Text",
|
|
2586
2586
|
options: {
|
|
@@ -2589,7 +2589,7 @@ const yn = {
|
|
|
2589
2589
|
}
|
|
2590
2590
|
}],
|
|
2591
2591
|
content: [{
|
|
2592
|
-
...
|
|
2592
|
+
...le,
|
|
2593
2593
|
component: {
|
|
2594
2594
|
name: "Text",
|
|
2595
2595
|
options: {
|
|
@@ -2646,9 +2646,9 @@ const yn = {
|
|
|
2646
2646
|
builderLinkComponent: !0
|
|
2647
2647
|
}
|
|
2648
2648
|
};
|
|
2649
|
-
function
|
|
2649
|
+
function Tn(e) {
|
|
2650
2650
|
var r;
|
|
2651
|
-
const [t, n] =
|
|
2651
|
+
const [t, n] = I(
|
|
2652
2652
|
() => e.defaultActiveTab ? e.defaultActiveTab - 1 : 0
|
|
2653
2653
|
);
|
|
2654
2654
|
function i(o) {
|
|
@@ -2657,7 +2657,7 @@ function xn(e) {
|
|
|
2657
2657
|
function a(o) {
|
|
2658
2658
|
o === t && e.collapsible ? n(-1) : n(o);
|
|
2659
2659
|
}
|
|
2660
|
-
return /* @__PURE__ */
|
|
2660
|
+
return /* @__PURE__ */ B("div", { children: [
|
|
2661
2661
|
/* @__PURE__ */ s(
|
|
2662
2662
|
"div",
|
|
2663
2663
|
{
|
|
@@ -2705,7 +2705,7 @@ function xn(e) {
|
|
|
2705
2705
|
) }) : null
|
|
2706
2706
|
] });
|
|
2707
2707
|
}
|
|
2708
|
-
const
|
|
2708
|
+
const wn = {
|
|
2709
2709
|
shouldReceiveBuilderProps: {
|
|
2710
2710
|
builderBlock: !1,
|
|
2711
2711
|
builderContext: !0
|
|
@@ -2728,7 +2728,7 @@ const Sn = {
|
|
|
2728
2728
|
textAlign: "center"
|
|
2729
2729
|
}
|
|
2730
2730
|
};
|
|
2731
|
-
function
|
|
2731
|
+
function In(e) {
|
|
2732
2732
|
var t;
|
|
2733
2733
|
return /* @__PURE__ */ s(
|
|
2734
2734
|
"div",
|
|
@@ -2741,7 +2741,7 @@ function kn(e) {
|
|
|
2741
2741
|
}
|
|
2742
2742
|
);
|
|
2743
2743
|
}
|
|
2744
|
-
const
|
|
2744
|
+
const En = {
|
|
2745
2745
|
name: "Custom Code",
|
|
2746
2746
|
static: !0,
|
|
2747
2747
|
requiredPermissions: ["editCode"],
|
|
@@ -2764,36 +2764,44 @@ const Cn = {
|
|
|
2764
2764
|
advanced: !0
|
|
2765
2765
|
}]
|
|
2766
2766
|
};
|
|
2767
|
-
function
|
|
2768
|
-
const t =
|
|
2769
|
-
|
|
2770
|
-
var
|
|
2771
|
-
if (!((
|
|
2767
|
+
function Rn(e) {
|
|
2768
|
+
const t = L(null), [n, i] = I(() => []), [a, r] = I(() => []);
|
|
2769
|
+
function o() {
|
|
2770
|
+
var d;
|
|
2771
|
+
if (!t.current || !((d = t.current) != null && d.getElementsByTagName) || typeof window == "undefined")
|
|
2772
2772
|
return;
|
|
2773
|
-
const
|
|
2774
|
-
for (let
|
|
2775
|
-
const
|
|
2776
|
-
if (
|
|
2777
|
-
if (n.includes(
|
|
2773
|
+
const l = t.current.getElementsByTagName("script");
|
|
2774
|
+
for (let u = 0; u < l.length; u++) {
|
|
2775
|
+
const h = l[u];
|
|
2776
|
+
if (h.src) {
|
|
2777
|
+
if (n.includes(h.src))
|
|
2778
2778
|
continue;
|
|
2779
|
-
n.push(
|
|
2780
|
-
const
|
|
2781
|
-
|
|
2782
|
-
} else if (!
|
|
2779
|
+
n.push(h.src);
|
|
2780
|
+
const g = document.createElement("script");
|
|
2781
|
+
g.async = !0, g.src = h.src, document.head.appendChild(g);
|
|
2782
|
+
} else if (!h.type || [
|
|
2783
2783
|
"text/javascript",
|
|
2784
2784
|
"application/javascript",
|
|
2785
2785
|
"application/ecmascript"
|
|
2786
|
-
].includes(
|
|
2787
|
-
if (a.includes(
|
|
2786
|
+
].includes(h.type)) {
|
|
2787
|
+
if (a.includes(h.innerText))
|
|
2788
2788
|
continue;
|
|
2789
2789
|
try {
|
|
2790
|
-
a.push(
|
|
2791
|
-
} catch (
|
|
2792
|
-
|
|
2790
|
+
a.push(h.innerText), new Function(h.innerText)();
|
|
2791
|
+
} catch (g) {
|
|
2792
|
+
z.warn(
|
|
2793
|
+
"[BUILDER.IO] `CustomCode`: Error running script:",
|
|
2794
|
+
g
|
|
2795
|
+
);
|
|
2793
2796
|
}
|
|
2794
2797
|
}
|
|
2795
2798
|
}
|
|
2796
|
-
}
|
|
2799
|
+
}
|
|
2800
|
+
return P(() => {
|
|
2801
|
+
o();
|
|
2802
|
+
}, []), P(() => {
|
|
2803
|
+
N() && o();
|
|
2804
|
+
}, [e.code]), /* @__PURE__ */ s(
|
|
2797
2805
|
"div",
|
|
2798
2806
|
{
|
|
2799
2807
|
ref: t,
|
|
@@ -2802,7 +2810,7 @@ function Tn(e) {
|
|
|
2802
2810
|
}
|
|
2803
2811
|
);
|
|
2804
2812
|
}
|
|
2805
|
-
const
|
|
2813
|
+
const Vn = {
|
|
2806
2814
|
name: "Embed",
|
|
2807
2815
|
static: !0,
|
|
2808
2816
|
inputs: [{
|
|
@@ -2817,28 +2825,28 @@ const wn = {
|
|
|
2817
2825
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
2818
2826
|
hideFromUI: !0
|
|
2819
2827
|
}]
|
|
2820
|
-
},
|
|
2821
|
-
function
|
|
2822
|
-
const t =
|
|
2828
|
+
}, Pn = ["text/javascript", "application/javascript", "application/ecmascript"], Bn = (e) => Pn.includes(e.type);
|
|
2829
|
+
function An(e) {
|
|
2830
|
+
const t = L(null), [n, i] = I(() => []), [a, r] = I(() => []), [o, l] = I(() => !1);
|
|
2823
2831
|
function d() {
|
|
2824
2832
|
if (!t.current || !t.current.getElementsByTagName)
|
|
2825
2833
|
return;
|
|
2826
|
-
const
|
|
2827
|
-
for (let h = 0; h <
|
|
2828
|
-
const
|
|
2829
|
-
if (
|
|
2830
|
-
n.push(
|
|
2831
|
-
const
|
|
2832
|
-
|
|
2833
|
-
} else if (
|
|
2834
|
+
const u = t.current.getElementsByTagName("script");
|
|
2835
|
+
for (let h = 0; h < u.length; h++) {
|
|
2836
|
+
const g = u[h];
|
|
2837
|
+
if (g.src && !n.includes(g.src)) {
|
|
2838
|
+
n.push(g.src);
|
|
2839
|
+
const c = document.createElement("script");
|
|
2840
|
+
c.async = !0, c.src = g.src, document.head.appendChild(c);
|
|
2841
|
+
} else if (Bn(g) && !a.includes(g.innerText))
|
|
2834
2842
|
try {
|
|
2835
|
-
a.push(
|
|
2836
|
-
} catch (
|
|
2837
|
-
|
|
2843
|
+
a.push(g.innerText), new Function(g.innerText)();
|
|
2844
|
+
} catch (c) {
|
|
2845
|
+
z.warn("[BUILDER.IO] `Embed`: Error running script:", c);
|
|
2838
2846
|
}
|
|
2839
2847
|
}
|
|
2840
2848
|
}
|
|
2841
|
-
return
|
|
2849
|
+
return P(() => {
|
|
2842
2850
|
t.current && !o && (l(!0), d());
|
|
2843
2851
|
}, [t.current, o]), /* @__PURE__ */ s(
|
|
2844
2852
|
"div",
|
|
@@ -2849,7 +2857,7 @@ function Rn(e) {
|
|
|
2849
2857
|
}
|
|
2850
2858
|
);
|
|
2851
2859
|
}
|
|
2852
|
-
const
|
|
2860
|
+
const Nn = {
|
|
2853
2861
|
name: "Form:Form",
|
|
2854
2862
|
// editableTags: ['builder-form-error']
|
|
2855
2863
|
defaults: {
|
|
@@ -3086,118 +3094,118 @@ const Vn = {
|
|
|
3086
3094
|
builderComponents: !0,
|
|
3087
3095
|
builderLinkComponent: !0
|
|
3088
3096
|
}
|
|
3089
|
-
},
|
|
3097
|
+
}, Wn = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], Dn = () => {
|
|
3090
3098
|
const e = process.env.NODE_ENV || "production";
|
|
3091
|
-
return
|
|
3099
|
+
return Wn.includes(e) ? e : "production";
|
|
3092
3100
|
};
|
|
3093
|
-
function
|
|
3094
|
-
const t =
|
|
3095
|
-
function d(
|
|
3101
|
+
function $n(e) {
|
|
3102
|
+
const t = L(null), [n, i] = I(() => "unsubmitted"), [a, r] = I(() => null), [o, l] = I(() => "");
|
|
3103
|
+
function d(g) {
|
|
3096
3104
|
var v, f;
|
|
3097
|
-
const
|
|
3105
|
+
const c = {
|
|
3098
3106
|
...e.builderContext.rootState,
|
|
3099
|
-
...
|
|
3107
|
+
...g
|
|
3100
3108
|
};
|
|
3101
|
-
e.builderContext.rootSetState ? (f = (v = e.builderContext).rootSetState) == null || f.call(v,
|
|
3109
|
+
e.builderContext.rootSetState ? (f = (v = e.builderContext).rootSetState) == null || f.call(v, c) : e.builderContext.rootState = c;
|
|
3102
3110
|
}
|
|
3103
|
-
function
|
|
3104
|
-
return
|
|
3111
|
+
function u() {
|
|
3112
|
+
return N() && e.previewState || n;
|
|
3105
3113
|
}
|
|
3106
|
-
function h(
|
|
3114
|
+
function h(g) {
|
|
3107
3115
|
var v;
|
|
3108
|
-
const
|
|
3116
|
+
const c = e.sendWithJs || e.sendSubmissionsTo === "email";
|
|
3109
3117
|
if (e.sendSubmissionsTo === "zapier")
|
|
3110
|
-
|
|
3111
|
-
else if (
|
|
3118
|
+
g.preventDefault();
|
|
3119
|
+
else if (c) {
|
|
3112
3120
|
if (!(e.action || e.sendSubmissionsTo === "email")) {
|
|
3113
|
-
|
|
3121
|
+
g.preventDefault();
|
|
3114
3122
|
return;
|
|
3115
3123
|
}
|
|
3116
|
-
|
|
3117
|
-
const f =
|
|
3124
|
+
g.preventDefault();
|
|
3125
|
+
const f = g.currentTarget || g.target, b = e.customHeaders || {};
|
|
3118
3126
|
let S;
|
|
3119
|
-
const
|
|
3120
|
-
let
|
|
3121
|
-
const
|
|
3127
|
+
const p = new FormData(f), k = Array.from(f.querySelectorAll("input,select,textarea")).filter((m) => !!m.name).map((m) => {
|
|
3128
|
+
let y;
|
|
3129
|
+
const T = m.name;
|
|
3122
3130
|
if (m instanceof HTMLInputElement)
|
|
3123
3131
|
if (m.type === "radio") {
|
|
3124
3132
|
if (m.checked)
|
|
3125
|
-
return
|
|
3126
|
-
key:
|
|
3127
|
-
value:
|
|
3133
|
+
return y = m.name, {
|
|
3134
|
+
key: T,
|
|
3135
|
+
value: y
|
|
3128
3136
|
};
|
|
3129
3137
|
} else if (m.type === "checkbox")
|
|
3130
|
-
|
|
3138
|
+
y = m.checked;
|
|
3131
3139
|
else if (m.type === "number" || m.type === "range") {
|
|
3132
|
-
const
|
|
3133
|
-
isNaN(
|
|
3140
|
+
const E = m.valueAsNumber;
|
|
3141
|
+
isNaN(E) || (y = E);
|
|
3134
3142
|
} else
|
|
3135
|
-
m.type === "file" ?
|
|
3143
|
+
m.type === "file" ? y = m.files : y = m.value;
|
|
3136
3144
|
else
|
|
3137
|
-
|
|
3145
|
+
y = m.value;
|
|
3138
3146
|
return {
|
|
3139
|
-
key:
|
|
3140
|
-
value:
|
|
3147
|
+
key: T,
|
|
3148
|
+
value: y
|
|
3141
3149
|
};
|
|
3142
3150
|
});
|
|
3143
3151
|
let C = e.contentType;
|
|
3144
3152
|
if (e.sendSubmissionsTo === "email" && (C = "multipart/form-data"), Array.from(k).forEach(({ value: m }) => {
|
|
3145
3153
|
(m instanceof File || Array.isArray(m) && m[0] instanceof File || m instanceof FileList) && (C = "multipart/form-data");
|
|
3146
3154
|
}), C !== "application/json")
|
|
3147
|
-
S =
|
|
3155
|
+
S = p;
|
|
3148
3156
|
else {
|
|
3149
3157
|
const m = {};
|
|
3150
|
-
Array.from(k).forEach(({ value:
|
|
3151
|
-
|
|
3158
|
+
Array.from(k).forEach(({ value: y, key: T }) => {
|
|
3159
|
+
Ne(m, T, y);
|
|
3152
3160
|
}), S = JSON.stringify(m);
|
|
3153
3161
|
}
|
|
3154
|
-
C && C !== "multipart/form-data" && (
|
|
3162
|
+
C && C !== "multipart/form-data" && (c && ((v = e.action) != null && v.includes("zapier.com")) || (b["content-type"] = C));
|
|
3155
3163
|
const V = new CustomEvent("presubmit", { detail: { body: S } });
|
|
3156
3164
|
if (t.current && (t.current.dispatchEvent(V), V.defaultPrevented))
|
|
3157
3165
|
return;
|
|
3158
3166
|
i("sending");
|
|
3159
|
-
const w = `${
|
|
3167
|
+
const w = `${Dn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
|
|
3160
3168
|
e.sendSubmissionsToEmail || ""
|
|
3161
3169
|
)}&name=${encodeURIComponent(e.name || "")}`, x = e.sendSubmissionsTo === "email" ? w : e.action;
|
|
3162
|
-
|
|
3170
|
+
Ve(x), fetch(x, { body: S, headers: b, method: e.method || "post" }).then(
|
|
3163
3171
|
async (m) => {
|
|
3164
|
-
let
|
|
3165
|
-
const
|
|
3166
|
-
if (
|
|
3167
|
-
let
|
|
3168
|
-
|
|
3172
|
+
let y;
|
|
3173
|
+
const T = m.headers.get("content-type");
|
|
3174
|
+
if (T && T.indexOf("application/json") !== -1 ? y = await m.json() : y = await m.text(), !m.ok && e.errorMessagePath) {
|
|
3175
|
+
let E = De(y, e.errorMessagePath);
|
|
3176
|
+
E && (typeof E != "string" && (E = JSON.stringify(E)), l(E), d({ formErrorMessage: E }));
|
|
3169
3177
|
}
|
|
3170
|
-
if (r(
|
|
3171
|
-
const
|
|
3172
|
-
detail: { res: m, body:
|
|
3178
|
+
if (r(y), i(m.ok ? "success" : "error"), m.ok) {
|
|
3179
|
+
const E = new CustomEvent("submit:success", {
|
|
3180
|
+
detail: { res: m, body: y }
|
|
3173
3181
|
});
|
|
3174
3182
|
if (t.current) {
|
|
3175
|
-
if (t.current.dispatchEvent(
|
|
3183
|
+
if (t.current.dispatchEvent(E), E.defaultPrevented)
|
|
3176
3184
|
return;
|
|
3177
3185
|
e.resetFormOnSubmit !== !1 && t.current.reset();
|
|
3178
3186
|
}
|
|
3179
3187
|
if (e.successUrl)
|
|
3180
3188
|
if (t.current) {
|
|
3181
|
-
const
|
|
3189
|
+
const A = new CustomEvent("route", {
|
|
3182
3190
|
detail: { url: e.successUrl }
|
|
3183
3191
|
});
|
|
3184
|
-
t.current.dispatchEvent(
|
|
3192
|
+
t.current.dispatchEvent(A), A.defaultPrevented || (location.href = e.successUrl);
|
|
3185
3193
|
} else
|
|
3186
3194
|
location.href = e.successUrl;
|
|
3187
3195
|
}
|
|
3188
3196
|
},
|
|
3189
3197
|
(m) => {
|
|
3190
|
-
const
|
|
3198
|
+
const y = new CustomEvent("submit:error", {
|
|
3191
3199
|
detail: { error: m }
|
|
3192
3200
|
});
|
|
3193
|
-
t.current && (t.current.dispatchEvent(
|
|
3201
|
+
t.current && (t.current.dispatchEvent(y), y.defaultPrevented) || (r(m), i("error"));
|
|
3194
3202
|
}
|
|
3195
3203
|
);
|
|
3196
3204
|
}
|
|
3197
3205
|
}
|
|
3198
|
-
return /* @__PURE__ */
|
|
3206
|
+
return /* @__PURE__ */ B(R, { children: [
|
|
3199
3207
|
" ",
|
|
3200
|
-
/* @__PURE__ */
|
|
3208
|
+
/* @__PURE__ */ B(
|
|
3201
3209
|
"form",
|
|
3202
3210
|
{
|
|
3203
3211
|
validate: e.validate,
|
|
@@ -3205,11 +3213,11 @@ function An(e) {
|
|
|
3205
3213
|
action: !e.sendWithJs && e.action,
|
|
3206
3214
|
method: e.method,
|
|
3207
3215
|
name: e.name,
|
|
3208
|
-
onSubmit: (
|
|
3216
|
+
onSubmit: (g) => h(g),
|
|
3209
3217
|
...e.attributes,
|
|
3210
3218
|
children: [
|
|
3211
3219
|
e.children,
|
|
3212
|
-
|
|
3220
|
+
u() === "error" ? /* @__PURE__ */ s(
|
|
3213
3221
|
$,
|
|
3214
3222
|
{
|
|
3215
3223
|
path: "errorMessage",
|
|
@@ -3217,7 +3225,7 @@ function An(e) {
|
|
|
3217
3225
|
context: e.builderContext
|
|
3218
3226
|
}
|
|
3219
3227
|
) : null,
|
|
3220
|
-
|
|
3228
|
+
u() === "sending" ? /* @__PURE__ */ s(
|
|
3221
3229
|
$,
|
|
3222
3230
|
{
|
|
3223
3231
|
path: "sendingMessage",
|
|
@@ -3225,8 +3233,8 @@ function An(e) {
|
|
|
3225
3233
|
context: e.builderContext
|
|
3226
3234
|
}
|
|
3227
3235
|
) : null,
|
|
3228
|
-
|
|
3229
|
-
|
|
3236
|
+
u() === "error" && a ? /* @__PURE__ */ s("pre", { className: "builder-form-error-text pre-7acc3b46", children: JSON.stringify(a, null, 2) }) : null,
|
|
3237
|
+
u() === "success" ? /* @__PURE__ */ s(
|
|
3230
3238
|
$,
|
|
3231
3239
|
{
|
|
3232
3240
|
path: "successMessage",
|
|
@@ -3242,7 +3250,7 @@ function An(e) {
|
|
|
3242
3250
|
" "
|
|
3243
3251
|
] });
|
|
3244
3252
|
}
|
|
3245
|
-
const
|
|
3253
|
+
const Fn = {
|
|
3246
3254
|
name: "Form:Input",
|
|
3247
3255
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3248
3256
|
inputs: [
|
|
@@ -3294,12 +3302,12 @@ const Nn = {
|
|
|
3294
3302
|
borderColor: "#ccc"
|
|
3295
3303
|
}
|
|
3296
3304
|
};
|
|
3297
|
-
function
|
|
3298
|
-
return /* @__PURE__ */
|
|
3305
|
+
function Ln(e) {
|
|
3306
|
+
return /* @__PURE__ */ Ae(
|
|
3299
3307
|
"input",
|
|
3300
3308
|
{
|
|
3301
3309
|
...e.attributes,
|
|
3302
|
-
key:
|
|
3310
|
+
key: N() && e.defaultValue ? e.defaultValue : "default-key",
|
|
3303
3311
|
placeholder: e.placeholder,
|
|
3304
3312
|
type: e.type,
|
|
3305
3313
|
name: e.name,
|
|
@@ -3309,7 +3317,7 @@ function Wn(e) {
|
|
|
3309
3317
|
}
|
|
3310
3318
|
);
|
|
3311
3319
|
}
|
|
3312
|
-
const
|
|
3320
|
+
const On = {
|
|
3313
3321
|
name: "Form:Select",
|
|
3314
3322
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
3315
3323
|
defaultStyles: {
|
|
@@ -3352,14 +3360,14 @@ const $n = {
|
|
|
3352
3360
|
static: !0,
|
|
3353
3361
|
noWrap: !0
|
|
3354
3362
|
};
|
|
3355
|
-
function
|
|
3363
|
+
function Un(e) {
|
|
3356
3364
|
var t;
|
|
3357
|
-
return /* @__PURE__ */
|
|
3365
|
+
return /* @__PURE__ */ Ae(
|
|
3358
3366
|
"select",
|
|
3359
3367
|
{
|
|
3360
3368
|
...e.attributes,
|
|
3361
3369
|
value: e.value,
|
|
3362
|
-
key:
|
|
3370
|
+
key: N() && e.defaultValue ? e.defaultValue : "default-key",
|
|
3363
3371
|
defaultValue: e.defaultValue,
|
|
3364
3372
|
name: e.name,
|
|
3365
3373
|
required: e.required
|
|
@@ -3367,7 +3375,7 @@ function Dn(e) {
|
|
|
3367
3375
|
(t = e.options) == null ? void 0 : t.map((n, i) => /* @__PURE__ */ s("option", { value: n.value, children: n.name || n.value }, `${n.name}-${i}`))
|
|
3368
3376
|
);
|
|
3369
3377
|
}
|
|
3370
|
-
const
|
|
3378
|
+
const _n = {
|
|
3371
3379
|
name: "Form:SubmitButton",
|
|
3372
3380
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
3373
3381
|
defaultStyles: {
|
|
@@ -3393,10 +3401,10 @@ const Fn = {
|
|
|
3393
3401
|
// TODO: defaultChildren
|
|
3394
3402
|
// canHaveChildren: true,
|
|
3395
3403
|
};
|
|
3396
|
-
function
|
|
3404
|
+
function qn(e) {
|
|
3397
3405
|
return /* @__PURE__ */ s("button", { type: "submit", ...e.attributes, children: e.text });
|
|
3398
3406
|
}
|
|
3399
|
-
const
|
|
3407
|
+
const Hn = {
|
|
3400
3408
|
name: "Form:TextArea",
|
|
3401
3409
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
3402
3410
|
inputs: [{
|
|
@@ -3433,7 +3441,7 @@ const On = {
|
|
|
3433
3441
|
static: !0,
|
|
3434
3442
|
noWrap: !0
|
|
3435
3443
|
};
|
|
3436
|
-
function
|
|
3444
|
+
function Mn(e) {
|
|
3437
3445
|
return /* @__PURE__ */ s(
|
|
3438
3446
|
"textarea",
|
|
3439
3447
|
{
|
|
@@ -3446,7 +3454,7 @@ function Un(e) {
|
|
|
3446
3454
|
}
|
|
3447
3455
|
);
|
|
3448
3456
|
}
|
|
3449
|
-
const
|
|
3457
|
+
const jn = {
|
|
3450
3458
|
// friendlyName?
|
|
3451
3459
|
name: "Raw:Img",
|
|
3452
3460
|
hideFromInsertMenu: !0,
|
|
@@ -3455,13 +3463,13 @@ const _n = {
|
|
|
3455
3463
|
name: "image",
|
|
3456
3464
|
bubble: !0,
|
|
3457
3465
|
type: "file",
|
|
3458
|
-
allowedFileTypes:
|
|
3466
|
+
allowedFileTypes: he,
|
|
3459
3467
|
required: !0
|
|
3460
3468
|
}],
|
|
3461
3469
|
noWrap: !0,
|
|
3462
3470
|
static: !0
|
|
3463
3471
|
};
|
|
3464
|
-
function
|
|
3472
|
+
function zn(e) {
|
|
3465
3473
|
return /* @__PURE__ */ s(
|
|
3466
3474
|
"img",
|
|
3467
3475
|
{
|
|
@@ -3473,10 +3481,10 @@ function qn(e) {
|
|
|
3473
3481
|
src: e.imgSrc || e.image,
|
|
3474
3482
|
...e.attributes
|
|
3475
3483
|
},
|
|
3476
|
-
|
|
3484
|
+
N() && e.imgSrc || "default-key"
|
|
3477
3485
|
);
|
|
3478
3486
|
}
|
|
3479
|
-
const
|
|
3487
|
+
const Kn = {
|
|
3480
3488
|
name: "Video",
|
|
3481
3489
|
canHaveChildren: !0,
|
|
3482
3490
|
defaultStyles: {
|
|
@@ -3487,14 +3495,14 @@ const Hn = {
|
|
|
3487
3495
|
inputs: [{
|
|
3488
3496
|
name: "video",
|
|
3489
3497
|
type: "file",
|
|
3490
|
-
allowedFileTypes:
|
|
3498
|
+
allowedFileTypes: cn,
|
|
3491
3499
|
bubble: !0,
|
|
3492
3500
|
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
3493
3501
|
required: !0
|
|
3494
3502
|
}, {
|
|
3495
3503
|
name: "posterImage",
|
|
3496
3504
|
type: "file",
|
|
3497
|
-
allowedFileTypes:
|
|
3505
|
+
allowedFileTypes: he,
|
|
3498
3506
|
helperText: "Image to show before the video plays"
|
|
3499
3507
|
}, {
|
|
3500
3508
|
name: "autoPlay",
|
|
@@ -3561,9 +3569,9 @@ const Hn = {
|
|
|
3561
3569
|
builderBlock: !0
|
|
3562
3570
|
}
|
|
3563
3571
|
};
|
|
3564
|
-
function
|
|
3565
|
-
var o, l, d,
|
|
3566
|
-
const t =
|
|
3572
|
+
function Jn(e) {
|
|
3573
|
+
var o, l, d, u, h, g, c;
|
|
3574
|
+
const t = L(null);
|
|
3567
3575
|
function n() {
|
|
3568
3576
|
return {
|
|
3569
3577
|
...e.autoPlay === !0 ? {
|
|
@@ -3588,32 +3596,32 @@ function Mn(e) {
|
|
|
3588
3596
|
...n()
|
|
3589
3597
|
};
|
|
3590
3598
|
}
|
|
3591
|
-
const [a, r] =
|
|
3599
|
+
const [a, r] = I(() => {
|
|
3592
3600
|
});
|
|
3593
|
-
return
|
|
3601
|
+
return P(() => {
|
|
3594
3602
|
if (e.lazyLoad) {
|
|
3595
3603
|
const v = new IntersectionObserver(function(f) {
|
|
3596
|
-
f.forEach(function(
|
|
3597
|
-
if (!
|
|
3604
|
+
f.forEach(function(b) {
|
|
3605
|
+
if (!b.isIntersecting)
|
|
3598
3606
|
return;
|
|
3599
|
-
const S =
|
|
3607
|
+
const S = b.target;
|
|
3600
3608
|
try {
|
|
3601
3609
|
Array.from(S.children).filter(
|
|
3602
|
-
(
|
|
3603
|
-
).forEach((
|
|
3604
|
-
const k =
|
|
3605
|
-
k && (
|
|
3610
|
+
(p) => p instanceof HTMLElement && p.tagName === "SOURCE"
|
|
3611
|
+
).forEach((p) => {
|
|
3612
|
+
const k = p.dataset.src;
|
|
3613
|
+
k && (p.src = k);
|
|
3606
3614
|
}), S.load(), v.unobserve(S);
|
|
3607
|
-
} catch (
|
|
3608
|
-
console.error("Error loading lazy video:",
|
|
3615
|
+
} catch (p) {
|
|
3616
|
+
console.error("Error loading lazy video:", p);
|
|
3609
3617
|
}
|
|
3610
3618
|
});
|
|
3611
3619
|
});
|
|
3612
3620
|
t.current && v.observe(t.current), r(v);
|
|
3613
3621
|
}
|
|
3614
|
-
}, []),
|
|
3622
|
+
}, []), P(() => () => {
|
|
3615
3623
|
a && a.disconnect();
|
|
3616
|
-
}, []), /* @__PURE__ */
|
|
3624
|
+
}, []), /* @__PURE__ */ B(
|
|
3617
3625
|
"div",
|
|
3618
3626
|
{
|
|
3619
3627
|
style: {
|
|
@@ -3665,7 +3673,7 @@ function Mn(e) {
|
|
|
3665
3673
|
}
|
|
3666
3674
|
}
|
|
3667
3675
|
) : null,
|
|
3668
|
-
(h = (
|
|
3676
|
+
(h = (u = e.builderBlock) == null ? void 0 : u.children) != null && h.length && e.fitContent ? /* @__PURE__ */ s(
|
|
3669
3677
|
"div",
|
|
3670
3678
|
{
|
|
3671
3679
|
style: {
|
|
@@ -3676,7 +3684,7 @@ function Mn(e) {
|
|
|
3676
3684
|
children: e.children
|
|
3677
3685
|
}
|
|
3678
3686
|
) : null,
|
|
3679
|
-
(
|
|
3687
|
+
(c = (g = e.builderBlock) == null ? void 0 : g.children) != null && c.length && !e.fitContent ? /* @__PURE__ */ s(
|
|
3680
3688
|
"div",
|
|
3681
3689
|
{
|
|
3682
3690
|
style: {
|
|
@@ -3697,67 +3705,67 @@ function Mn(e) {
|
|
|
3697
3705
|
}
|
|
3698
3706
|
);
|
|
3699
3707
|
}
|
|
3700
|
-
const
|
|
3701
|
-
component: Tn,
|
|
3702
|
-
...Cn
|
|
3703
|
-
}, {
|
|
3708
|
+
const Gn = () => [{
|
|
3704
3709
|
component: Rn,
|
|
3705
|
-
...
|
|
3710
|
+
...En
|
|
3706
3711
|
}, {
|
|
3707
3712
|
component: An,
|
|
3708
3713
|
...Vn
|
|
3709
3714
|
}, {
|
|
3710
|
-
component:
|
|
3715
|
+
component: $n,
|
|
3711
3716
|
...Nn
|
|
3712
3717
|
}, {
|
|
3713
3718
|
component: Ln,
|
|
3714
3719
|
...Fn
|
|
3715
3720
|
}, {
|
|
3716
|
-
component:
|
|
3717
|
-
|
|
3721
|
+
component: qn,
|
|
3722
|
+
..._n
|
|
3718
3723
|
}, {
|
|
3719
3724
|
component: Un,
|
|
3720
3725
|
...On
|
|
3721
|
-
}, {
|
|
3722
|
-
component: qn,
|
|
3723
|
-
..._n
|
|
3724
3726
|
}, {
|
|
3725
3727
|
component: Mn,
|
|
3726
3728
|
...Hn
|
|
3727
|
-
}], Se = () => [{
|
|
3728
|
-
component: rt,
|
|
3729
|
-
...tn
|
|
3730
3729
|
}, {
|
|
3731
|
-
component:
|
|
3732
|
-
...
|
|
3730
|
+
component: zn,
|
|
3731
|
+
...jn
|
|
3733
3732
|
}, {
|
|
3734
|
-
component:
|
|
3735
|
-
...
|
|
3733
|
+
component: Jn,
|
|
3734
|
+
...Kn
|
|
3735
|
+
}], Te = () => [{
|
|
3736
|
+
component: ut,
|
|
3737
|
+
...rn
|
|
3736
3738
|
}, {
|
|
3737
3739
|
component: Yt,
|
|
3738
|
-
...
|
|
3740
|
+
...ln
|
|
3739
3741
|
}, {
|
|
3740
3742
|
component: Xt,
|
|
3741
|
-
...
|
|
3743
|
+
...sn
|
|
3742
3744
|
}, {
|
|
3743
|
-
component:
|
|
3744
|
-
...
|
|
3745
|
+
component: tn,
|
|
3746
|
+
...un
|
|
3745
3747
|
}, {
|
|
3746
|
-
component:
|
|
3747
|
-
...
|
|
3748
|
+
component: nn,
|
|
3749
|
+
...vn
|
|
3748
3750
|
}, {
|
|
3749
|
-
component:
|
|
3750
|
-
...
|
|
3751
|
+
component: Sn,
|
|
3752
|
+
...xn
|
|
3751
3753
|
}, {
|
|
3752
|
-
component:
|
|
3753
|
-
...
|
|
3754
|
+
component: xi,
|
|
3755
|
+
...kn
|
|
3754
3756
|
}, {
|
|
3755
|
-
component:
|
|
3756
|
-
...
|
|
3757
|
+
component: In,
|
|
3758
|
+
...wn
|
|
3759
|
+
}, {
|
|
3760
|
+
component: yn,
|
|
3761
|
+
...dn
|
|
3757
3762
|
}, {
|
|
3758
|
-
component:
|
|
3759
|
-
...
|
|
3760
|
-
},
|
|
3763
|
+
component: Tn,
|
|
3764
|
+
...Cn
|
|
3765
|
+
}, {
|
|
3766
|
+
component: on,
|
|
3767
|
+
...an
|
|
3768
|
+
}, ...Gn()], Qn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
3761
3769
|
function getAndSetVariantId() {
|
|
3762
3770
|
function setCookie(name, value, days) {
|
|
3763
3771
|
let expires = '';
|
|
@@ -3799,7 +3807,10 @@ const jn = () => [{
|
|
|
3799
3807
|
return contentId;
|
|
3800
3808
|
}
|
|
3801
3809
|
const winningVariantId = getAndSetVariantId();
|
|
3802
|
-
|
|
3810
|
+
let styleEl = document.currentScript?.previousElementSibling;
|
|
3811
|
+
if (isAngularSDK) {
|
|
3812
|
+
styleEl = document.currentScript?.parentElement?.previousElementSibling?.querySelector('style');
|
|
3813
|
+
}
|
|
3803
3814
|
if (isHydrationTarget) {
|
|
3804
3815
|
styleEl.remove();
|
|
3805
3816
|
const thisScriptEl = document.currentScript;
|
|
@@ -3813,7 +3824,7 @@ const jn = () => [{
|
|
|
3813
3824
|
}).join('');
|
|
3814
3825
|
styleEl.innerHTML = newStyleStr;
|
|
3815
3826
|
}
|
|
3816
|
-
}`,
|
|
3827
|
+
}`, Yn = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
3817
3828
|
if (!navigator.cookieEnabled) {
|
|
3818
3829
|
return;
|
|
3819
3830
|
}
|
|
@@ -3847,29 +3858,29 @@ const jn = () => [{
|
|
|
3847
3858
|
thisScriptEl?.remove();
|
|
3848
3859
|
}
|
|
3849
3860
|
return;
|
|
3850
|
-
}`,
|
|
3861
|
+
}`, ze = "builderIoAbTest", Ke = "builderIoRenderContent", G = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
3851
3862
|
...t,
|
|
3852
3863
|
testVariationId: t.id,
|
|
3853
3864
|
id: e == null ? void 0 : e.id
|
|
3854
|
-
})),
|
|
3865
|
+
})), Xn = ({
|
|
3855
3866
|
canTrack: e,
|
|
3856
3867
|
content: t
|
|
3857
|
-
}) => !(!(
|
|
3858
|
-
window.${
|
|
3859
|
-
window.${
|
|
3860
|
-
`,
|
|
3861
|
-
window.${
|
|
3862
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
3863
|
-
)`,
|
|
3868
|
+
}) => !(!(G(t).length > 0) || !e || U()), Zn = (e) => e === "react" || e === "reactNative", ei = O === "angular", Je = Zn(O), ti = () => `
|
|
3869
|
+
window.${ze} = ${Qn}
|
|
3870
|
+
window.${Ke} = ${Yn}
|
|
3871
|
+
`, ni = (e, t) => `
|
|
3872
|
+
window.${ze}(
|
|
3873
|
+
"${t}",${JSON.stringify(e)}, ${Je}, ${ei}
|
|
3874
|
+
)`, ii = ({
|
|
3864
3875
|
contentId: e,
|
|
3865
3876
|
variationId: t
|
|
3866
|
-
}) => `window.${
|
|
3867
|
-
"${t}", "${e}", ${
|
|
3877
|
+
}) => `window.${Ke}(
|
|
3878
|
+
"${t}", "${e}", ${Je}
|
|
3868
3879
|
)`;
|
|
3869
|
-
function
|
|
3880
|
+
function we(e) {
|
|
3870
3881
|
return Math.round(e * 1e3) / 1e3;
|
|
3871
3882
|
}
|
|
3872
|
-
const
|
|
3883
|
+
const ai = (e, t, n = !0) => {
|
|
3873
3884
|
if (!(e instanceof HTMLElement))
|
|
3874
3885
|
return null;
|
|
3875
3886
|
let i = n ? e : e.parentElement;
|
|
@@ -3880,35 +3891,35 @@ const Zn = (e, t, n = !0) => {
|
|
|
3880
3891
|
return i;
|
|
3881
3892
|
} while (i = i.parentElement);
|
|
3882
3893
|
return null;
|
|
3883
|
-
},
|
|
3894
|
+
}, oi = (e) => ai(e, (t) => {
|
|
3884
3895
|
const n = t.getAttribute("builder-id") || t.id;
|
|
3885
3896
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
3886
|
-
}),
|
|
3897
|
+
}), Ie = ({
|
|
3887
3898
|
event: e,
|
|
3888
3899
|
target: t
|
|
3889
3900
|
}) => {
|
|
3890
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, a = e.clientY - n.top, r =
|
|
3901
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, a = e.clientY - n.top, r = we(i / n.width), o = we(a / n.height);
|
|
3891
3902
|
return {
|
|
3892
3903
|
x: r,
|
|
3893
3904
|
y: o
|
|
3894
3905
|
};
|
|
3895
|
-
},
|
|
3896
|
-
const t = e.target, n = t &&
|
|
3906
|
+
}, ri = (e) => {
|
|
3907
|
+
const t = e.target, n = t && oi(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
3897
3908
|
return {
|
|
3898
3909
|
targetBuilderElement: i || void 0,
|
|
3899
3910
|
metadata: {
|
|
3900
|
-
targetOffset: t ?
|
|
3911
|
+
targetOffset: t ? Ie({
|
|
3901
3912
|
event: e,
|
|
3902
3913
|
target: t
|
|
3903
3914
|
}) : void 0,
|
|
3904
|
-
builderTargetOffset: n ?
|
|
3915
|
+
builderTargetOffset: n ? Ie({
|
|
3905
3916
|
event: e,
|
|
3906
3917
|
target: n
|
|
3907
3918
|
}) : void 0,
|
|
3908
3919
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
3909
3920
|
}
|
|
3910
3921
|
};
|
|
3911
|
-
},
|
|
3922
|
+
}, li = ["svelte", "qwik", "vue"], Ee = () => li.includes(O) && (N() || X()), si = (e) => {
|
|
3912
3923
|
var r, o;
|
|
3913
3924
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (o = e.fileUrl) != null ? o : (r = e == null ? void 0 : e.files) == null ? void 0 : r.regular;
|
|
3914
3925
|
let a = "";
|
|
@@ -3923,26 +3934,26 @@ font-weight: 400;
|
|
|
3923
3934
|
for (const l in e.files) {
|
|
3924
3935
|
if (!(String(Number(l)) === l))
|
|
3925
3936
|
continue;
|
|
3926
|
-
const
|
|
3927
|
-
|
|
3937
|
+
const u = e.files[l];
|
|
3938
|
+
u && u !== i && (a += `
|
|
3928
3939
|
@font-face {
|
|
3929
3940
|
font-family: "${t}";
|
|
3930
|
-
src: url('${
|
|
3941
|
+
src: url('${u}') format('woff2');
|
|
3931
3942
|
font-display: fallback;
|
|
3932
3943
|
font-weight: ${l};
|
|
3933
3944
|
}
|
|
3934
3945
|
`.trim());
|
|
3935
3946
|
}
|
|
3936
3947
|
return a;
|
|
3937
|
-
},
|
|
3948
|
+
}, ci = ({
|
|
3938
3949
|
customFonts: e
|
|
3939
3950
|
}) => {
|
|
3940
3951
|
var t;
|
|
3941
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
3942
|
-
},
|
|
3952
|
+
return ((t = e == null ? void 0 : e.map((n) => si(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3953
|
+
}, ui = ({
|
|
3943
3954
|
cssCode: e,
|
|
3944
3955
|
contentId: t
|
|
3945
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
3956
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", di = `
|
|
3946
3957
|
.builder-button {
|
|
3947
3958
|
all: unset;
|
|
3948
3959
|
}
|
|
@@ -3959,23 +3970,24 @@ font-weight: ${l};
|
|
|
3959
3970
|
text-align: inherit;
|
|
3960
3971
|
font-family: inherit;
|
|
3961
3972
|
}
|
|
3962
|
-
`,
|
|
3963
|
-
function
|
|
3973
|
+
`, mi = (e) => e ? "" : di, fi = (e) => `variant-${e}`;
|
|
3974
|
+
function hi(e) {
|
|
3964
3975
|
var k, C, V;
|
|
3965
|
-
const t =
|
|
3976
|
+
const t = L(null);
|
|
3977
|
+
I(() => !1);
|
|
3966
3978
|
function n(w) {
|
|
3967
|
-
var m,
|
|
3979
|
+
var m, y;
|
|
3968
3980
|
const x = {
|
|
3969
3981
|
...e.builderContextSignal.rootState,
|
|
3970
3982
|
...w
|
|
3971
3983
|
};
|
|
3972
|
-
e.builderContextSignal.rootSetState ? (
|
|
3973
|
-
...
|
|
3984
|
+
e.builderContextSignal.rootSetState ? (y = (m = e.builderContextSignal).rootSetState) == null || y.call(m, x) : e.setBuilderContextSignal((T) => ({
|
|
3985
|
+
...T,
|
|
3974
3986
|
rootState: x
|
|
3975
3987
|
}));
|
|
3976
3988
|
}
|
|
3977
3989
|
function i(w) {
|
|
3978
|
-
var m,
|
|
3990
|
+
var m, y, T, E, A;
|
|
3979
3991
|
const x = {
|
|
3980
3992
|
...e.builderContextSignal.content,
|
|
3981
3993
|
...w,
|
|
@@ -3984,13 +3996,13 @@ function ci(e) {
|
|
|
3984
3996
|
...w == null ? void 0 : w.data
|
|
3985
3997
|
},
|
|
3986
3998
|
meta: {
|
|
3987
|
-
...(
|
|
3999
|
+
...(y = e.builderContextSignal.content) == null ? void 0 : y.meta,
|
|
3988
4000
|
...w == null ? void 0 : w.meta,
|
|
3989
|
-
breakpoints: ((
|
|
4001
|
+
breakpoints: ((T = w == null ? void 0 : w.meta) == null ? void 0 : T.breakpoints) || ((A = (E = e.builderContextSignal.content) == null ? void 0 : E.meta) == null ? void 0 : A.breakpoints)
|
|
3990
4002
|
}
|
|
3991
4003
|
};
|
|
3992
|
-
e.setBuilderContextSignal((
|
|
3993
|
-
...
|
|
4004
|
+
e.setBuilderContextSignal((W) => ({
|
|
4005
|
+
...W,
|
|
3994
4006
|
content: x
|
|
3995
4007
|
}));
|
|
3996
4008
|
}
|
|
@@ -4000,25 +4012,25 @@ function ci(e) {
|
|
|
4000
4012
|
"aria-hidden": !0
|
|
4001
4013
|
};
|
|
4002
4014
|
}
|
|
4003
|
-
const [r, o] =
|
|
4015
|
+
const [r, o] = I(
|
|
4004
4016
|
() => e.contentWrapper || "div"
|
|
4005
4017
|
);
|
|
4006
4018
|
function l(w) {
|
|
4007
|
-
return
|
|
4019
|
+
return Ze({
|
|
4008
4020
|
model: e.model,
|
|
4009
4021
|
trustedHosts: e.trustedHosts,
|
|
4010
4022
|
callbacks: {
|
|
4011
4023
|
configureSdk: (x) => {
|
|
4012
|
-
var
|
|
4013
|
-
const { breakpoints: m, contentId:
|
|
4014
|
-
!
|
|
4024
|
+
var T;
|
|
4025
|
+
const { breakpoints: m, contentId: y } = x;
|
|
4026
|
+
!y || y !== ((T = e.builderContextSignal.content) == null ? void 0 : T.id) || m && i({
|
|
4015
4027
|
meta: {
|
|
4016
4028
|
breakpoints: m
|
|
4017
4029
|
}
|
|
4018
4030
|
});
|
|
4019
4031
|
},
|
|
4020
4032
|
animation: (x) => {
|
|
4021
|
-
|
|
4033
|
+
Oe(x);
|
|
4022
4034
|
},
|
|
4023
4035
|
contentUpdate: (x) => {
|
|
4024
4036
|
i(x);
|
|
@@ -4029,36 +4041,36 @@ function ci(e) {
|
|
|
4029
4041
|
}
|
|
4030
4042
|
})(w);
|
|
4031
4043
|
}
|
|
4032
|
-
const [d,
|
|
4044
|
+
const [d, u] = I(() => ({})), [h, g] = I(() => ({})), [c, v] = I(() => !1);
|
|
4033
4045
|
function f(w) {
|
|
4034
4046
|
var x, m;
|
|
4035
4047
|
if (e.builderContextSignal.content) {
|
|
4036
|
-
const
|
|
4037
|
-
|
|
4048
|
+
const y = (x = e.builderContextSignal.content) == null ? void 0 : x.testVariationId, T = (m = e.builderContextSignal.content) == null ? void 0 : m.id;
|
|
4049
|
+
pe({
|
|
4038
4050
|
apiHost: e.apiHost,
|
|
4039
4051
|
type: "click",
|
|
4040
|
-
canTrack:
|
|
4041
|
-
contentId:
|
|
4052
|
+
canTrack: M(e.canTrack),
|
|
4053
|
+
contentId: T,
|
|
4042
4054
|
apiKey: e.apiKey,
|
|
4043
|
-
variationId:
|
|
4044
|
-
...
|
|
4045
|
-
unique: !
|
|
4055
|
+
variationId: y !== T ? y : void 0,
|
|
4056
|
+
...ri(w),
|
|
4057
|
+
unique: !c
|
|
4046
4058
|
});
|
|
4047
4059
|
}
|
|
4048
|
-
|
|
4060
|
+
c || v(!0);
|
|
4049
4061
|
}
|
|
4050
|
-
function
|
|
4051
|
-
var x, m,
|
|
4052
|
-
const w = (
|
|
4053
|
-
Object.entries(w).forEach(([
|
|
4054
|
-
if (!
|
|
4062
|
+
function b() {
|
|
4063
|
+
var x, m, y;
|
|
4064
|
+
const w = (y = (m = (x = e.builderContextSignal.content) == null ? void 0 : x.data) == null ? void 0 : m.httpRequests) != null ? y : {};
|
|
4065
|
+
Object.entries(w).forEach(([T, E]) => {
|
|
4066
|
+
if (!E || h[T] || d[T] && !N())
|
|
4055
4067
|
return;
|
|
4056
|
-
h[
|
|
4057
|
-
const
|
|
4068
|
+
h[T] = !0;
|
|
4069
|
+
const A = E.replace(
|
|
4058
4070
|
/{{([^}]+)}}/g,
|
|
4059
|
-
(
|
|
4060
|
-
|
|
4061
|
-
code:
|
|
4071
|
+
(W, D) => String(
|
|
4072
|
+
_({
|
|
4073
|
+
code: D,
|
|
4062
4074
|
context: e.context || {},
|
|
4063
4075
|
localState: void 0,
|
|
4064
4076
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -4066,24 +4078,24 @@ function ci(e) {
|
|
|
4066
4078
|
})
|
|
4067
4079
|
)
|
|
4068
4080
|
);
|
|
4069
|
-
|
|
4081
|
+
Ve(A), fetch(A).then((W) => W.json()).then((W) => {
|
|
4070
4082
|
n({
|
|
4071
|
-
[
|
|
4072
|
-
}), d[
|
|
4073
|
-
}).catch((
|
|
4074
|
-
console.error("error fetching dynamic data",
|
|
4083
|
+
[T]: W
|
|
4084
|
+
}), d[T] = !0;
|
|
4085
|
+
}).catch((W) => {
|
|
4086
|
+
console.error("error fetching dynamic data", E, W);
|
|
4075
4087
|
}).finally(() => {
|
|
4076
|
-
h[
|
|
4088
|
+
h[T] = !1;
|
|
4077
4089
|
});
|
|
4078
4090
|
});
|
|
4079
4091
|
}
|
|
4080
4092
|
function S() {
|
|
4081
|
-
|
|
4093
|
+
N() && window.dispatchEvent(
|
|
4082
4094
|
new CustomEvent(
|
|
4083
4095
|
"builder:component:stateChange",
|
|
4084
4096
|
{
|
|
4085
4097
|
detail: {
|
|
4086
|
-
state:
|
|
4098
|
+
state: ue(e.builderContextSignal.rootState),
|
|
4087
4099
|
ref: {
|
|
4088
4100
|
name: e.model
|
|
4089
4101
|
}
|
|
@@ -4092,11 +4104,11 @@ function ci(e) {
|
|
|
4092
4104
|
)
|
|
4093
4105
|
);
|
|
4094
4106
|
}
|
|
4095
|
-
const
|
|
4096
|
-
return
|
|
4097
|
-
var w, x, m,
|
|
4098
|
-
if (
|
|
4099
|
-
|
|
4107
|
+
const p = L(!1);
|
|
4108
|
+
return p.current || (b(), S(), p.current = !0), P(() => {
|
|
4109
|
+
var w, x, m, y, T;
|
|
4110
|
+
if (U()) {
|
|
4111
|
+
N() && !e.isNestedRender && (window.addEventListener("message", l), Ge(), Qe({
|
|
4100
4112
|
...e.locale ? {
|
|
4101
4113
|
locale: e.locale
|
|
4102
4114
|
} : {},
|
|
@@ -4110,71 +4122,76 @@ function ci(e) {
|
|
|
4110
4122
|
apiKey: e.apiKey
|
|
4111
4123
|
}), Object.values(
|
|
4112
4124
|
e.builderContextSignal.componentInfos
|
|
4113
|
-
).forEach((
|
|
4114
|
-
var
|
|
4115
|
-
if (!((
|
|
4116
|
-
const
|
|
4117
|
-
(
|
|
4125
|
+
).forEach((D) => {
|
|
4126
|
+
var F, J;
|
|
4127
|
+
if (!((F = D.models) != null && F.length) || D.models.includes(e.model)) {
|
|
4128
|
+
const te = Ye(D);
|
|
4129
|
+
(J = window.parent) == null || J.postMessage(te, "*");
|
|
4118
4130
|
}
|
|
4119
4131
|
}), window.addEventListener(
|
|
4120
4132
|
"builder:component:stateChangeListenerActivated",
|
|
4121
4133
|
S
|
|
4122
|
-
))
|
|
4123
|
-
|
|
4124
|
-
|
|
4134
|
+
));
|
|
4135
|
+
const E = e.builderContextSignal.content && M(e.canTrack), A = Xe({
|
|
4136
|
+
name: `builder.tests.${(x = e.builderContextSignal.content) == null ? void 0 : x.id}`,
|
|
4137
|
+
canTrack: !0
|
|
4138
|
+
}), W = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId;
|
|
4139
|
+
if (E && W === A) {
|
|
4140
|
+
const D = (y = e.builderContextSignal.content) == null ? void 0 : y.id, F = e.apiKey;
|
|
4141
|
+
pe({
|
|
4125
4142
|
apiHost: e.apiHost,
|
|
4126
4143
|
type: "impression",
|
|
4127
4144
|
canTrack: !0,
|
|
4128
|
-
contentId:
|
|
4129
|
-
apiKey:
|
|
4130
|
-
variationId:
|
|
4145
|
+
contentId: D,
|
|
4146
|
+
apiKey: F,
|
|
4147
|
+
variationId: A !== D ? A : void 0
|
|
4131
4148
|
});
|
|
4132
4149
|
}
|
|
4133
|
-
if (
|
|
4134
|
-
const
|
|
4135
|
-
`builder.overrides.${
|
|
4136
|
-
),
|
|
4137
|
-
(
|
|
4150
|
+
if (X() && !N()) {
|
|
4151
|
+
const D = new URL(location.href).searchParams, F = D.get("builder.preview"), J = D.get(
|
|
4152
|
+
`builder.overrides.${F}`
|
|
4153
|
+
), te = D.get("apiKey") || D.get("builder.space");
|
|
4154
|
+
(F === "BUILDER_STUDIO" || F === e.model && te === e.apiKey && (!e.content || J === e.content.id)) && Pe({
|
|
4138
4155
|
model: e.model,
|
|
4139
4156
|
apiKey: e.apiKey,
|
|
4140
4157
|
apiVersion: e.builderContextSignal.apiVersion,
|
|
4141
|
-
...
|
|
4158
|
+
...F === "BUILDER_STUDIO" && ((T = e.context) != null && T.symbolId) ? {
|
|
4142
4159
|
query: {
|
|
4143
4160
|
id: e.context.symbolId
|
|
4144
4161
|
}
|
|
4145
4162
|
} : {}
|
|
4146
|
-
}).then((
|
|
4147
|
-
|
|
4163
|
+
}).then((ge) => {
|
|
4164
|
+
ge && i(ge);
|
|
4148
4165
|
});
|
|
4149
4166
|
}
|
|
4150
4167
|
}
|
|
4151
|
-
}, []),
|
|
4168
|
+
}, []), P(() => {
|
|
4152
4169
|
e.content && i(e.content);
|
|
4153
|
-
}, [e.content]),
|
|
4170
|
+
}, [e.content]), P(() => {
|
|
4154
4171
|
S();
|
|
4155
|
-
}, [e.builderContextSignal.rootState]),
|
|
4172
|
+
}, [e.builderContextSignal.rootState]), P(() => {
|
|
4156
4173
|
e.data && n(e.data);
|
|
4157
|
-
}, [e.data]),
|
|
4174
|
+
}, [e.data]), P(() => {
|
|
4158
4175
|
e.locale && n({
|
|
4159
4176
|
locale: e.locale
|
|
4160
4177
|
});
|
|
4161
|
-
}, [e.locale]),
|
|
4162
|
-
|
|
4178
|
+
}, [e.locale]), P(() => () => {
|
|
4179
|
+
U() && (window.removeEventListener("message", l), window.removeEventListener(
|
|
4163
4180
|
"builder:component:stateChangeListenerActivated",
|
|
4164
4181
|
S
|
|
4165
4182
|
));
|
|
4166
|
-
}, []), /* @__PURE__ */ s(
|
|
4183
|
+
}, []), /* @__PURE__ */ s(me.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || Ee() ? /* @__PURE__ */ s(
|
|
4167
4184
|
r,
|
|
4168
4185
|
{
|
|
4169
4186
|
ref: t,
|
|
4170
4187
|
onClick: (w) => f(w),
|
|
4171
4188
|
"builder-content-id": (k = e.builderContextSignal.content) == null ? void 0 : k.id,
|
|
4172
4189
|
"builder-model": e.model,
|
|
4173
|
-
className:
|
|
4190
|
+
className: fi(
|
|
4174
4191
|
((C = e.content) == null ? void 0 : C.testVariationId) || ((V = e.content) == null ? void 0 : V.id)
|
|
4175
4192
|
),
|
|
4176
4193
|
style: {
|
|
4177
|
-
display: !e.builderContextSignal.content &&
|
|
4194
|
+
display: !e.builderContextSignal.content && Ee() ? "none" : void 0
|
|
4178
4195
|
},
|
|
4179
4196
|
...a(),
|
|
4180
4197
|
...e.contentWrapperProps,
|
|
@@ -4182,21 +4199,21 @@ function ci(e) {
|
|
|
4182
4199
|
}
|
|
4183
4200
|
) : null });
|
|
4184
4201
|
}
|
|
4185
|
-
function
|
|
4186
|
-
const [t, n] =
|
|
4202
|
+
function gi(e) {
|
|
4203
|
+
const [t, n] = I(
|
|
4187
4204
|
() => `
|
|
4188
|
-
${
|
|
4205
|
+
${ui({
|
|
4189
4206
|
cssCode: e.cssCode,
|
|
4190
4207
|
contentId: e.contentId
|
|
4191
4208
|
})}
|
|
4192
|
-
${
|
|
4209
|
+
${ci({
|
|
4193
4210
|
customFonts: e.customFonts
|
|
4194
4211
|
})}
|
|
4195
|
-
${
|
|
4212
|
+
${mi(e.isNestedRender)}
|
|
4196
4213
|
`.trim()
|
|
4197
4214
|
);
|
|
4198
4215
|
return /* @__PURE__ */ s(
|
|
4199
|
-
|
|
4216
|
+
K,
|
|
4200
4217
|
{
|
|
4201
4218
|
id: "builderio-content",
|
|
4202
4219
|
styles: t,
|
|
@@ -4204,7 +4221,7 @@ ${li(e.isNestedRender)}
|
|
|
4204
4221
|
}
|
|
4205
4222
|
);
|
|
4206
4223
|
}
|
|
4207
|
-
const
|
|
4224
|
+
const bi = ({
|
|
4208
4225
|
content: e,
|
|
4209
4226
|
data: t,
|
|
4210
4227
|
locale: n
|
|
@@ -4221,7 +4238,7 @@ const di = ({
|
|
|
4221
4238
|
locale: n
|
|
4222
4239
|
} : {}
|
|
4223
4240
|
};
|
|
4224
|
-
},
|
|
4241
|
+
}, pi = ({
|
|
4225
4242
|
content: e,
|
|
4226
4243
|
data: t
|
|
4227
4244
|
}) => e ? {
|
|
@@ -4232,12 +4249,12 @@ const di = ({
|
|
|
4232
4249
|
},
|
|
4233
4250
|
meta: e == null ? void 0 : e.meta
|
|
4234
4251
|
} : void 0;
|
|
4235
|
-
function
|
|
4236
|
-
var
|
|
4237
|
-
const [t, n] =
|
|
4252
|
+
function Re(e) {
|
|
4253
|
+
var u, h, g, c, v, f, b, S, p;
|
|
4254
|
+
const [t, n] = I(
|
|
4238
4255
|
() => {
|
|
4239
4256
|
var k, C;
|
|
4240
|
-
return
|
|
4257
|
+
return ii({
|
|
4241
4258
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
4242
4259
|
variationId: (k = e.content) == null ? void 0 : k.testVariationId,
|
|
4243
4260
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
@@ -4251,27 +4268,27 @@ function we(e) {
|
|
|
4251
4268
|
rootState: k
|
|
4252
4269
|
}));
|
|
4253
4270
|
}
|
|
4254
|
-
const [a, r] =
|
|
4271
|
+
const [a, r] = I(
|
|
4255
4272
|
() => [
|
|
4256
|
-
...
|
|
4273
|
+
...Te(),
|
|
4257
4274
|
...e.customComponents || []
|
|
4258
4275
|
].reduce(
|
|
4259
4276
|
(k, { component: C, ...V }) => ({
|
|
4260
4277
|
...k,
|
|
4261
4278
|
[V.name]: {
|
|
4262
4279
|
component: C,
|
|
4263
|
-
...
|
|
4280
|
+
...ye(V)
|
|
4264
4281
|
}
|
|
4265
4282
|
}),
|
|
4266
4283
|
{}
|
|
4267
4284
|
)
|
|
4268
|
-
), [o, l] =
|
|
4269
|
-
content:
|
|
4285
|
+
), [o, l] = I(() => ({
|
|
4286
|
+
content: pi({
|
|
4270
4287
|
content: e.content,
|
|
4271
4288
|
data: e.data
|
|
4272
4289
|
}),
|
|
4273
4290
|
localState: void 0,
|
|
4274
|
-
rootState:
|
|
4291
|
+
rootState: bi({
|
|
4275
4292
|
content: e.content,
|
|
4276
4293
|
data: e.data,
|
|
4277
4294
|
locale: e.locale
|
|
@@ -4282,12 +4299,12 @@ function we(e) {
|
|
|
4282
4299
|
apiKey: e.apiKey,
|
|
4283
4300
|
apiVersion: e.apiVersion,
|
|
4284
4301
|
componentInfos: [
|
|
4285
|
-
...
|
|
4302
|
+
...Te(),
|
|
4286
4303
|
...e.customComponents || []
|
|
4287
4304
|
].reduce(
|
|
4288
4305
|
(k, { component: C, ...V }) => ({
|
|
4289
4306
|
...k,
|
|
4290
|
-
[V.name]:
|
|
4307
|
+
[V.name]: ye(V)
|
|
4291
4308
|
}),
|
|
4292
4309
|
{}
|
|
4293
4310
|
),
|
|
@@ -4296,13 +4313,13 @@ function we(e) {
|
|
|
4296
4313
|
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
4297
4314
|
nonce: e.nonce || "",
|
|
4298
4315
|
model: e.model
|
|
4299
|
-
})), d =
|
|
4316
|
+
})), d = L(!1);
|
|
4300
4317
|
if (!d.current) {
|
|
4301
|
-
e.apiKey ||
|
|
4318
|
+
e.apiKey || z.error(
|
|
4302
4319
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
4303
4320
|
);
|
|
4304
|
-
const k = (h = (
|
|
4305
|
-
k &&
|
|
4321
|
+
const k = (h = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : h.jsCode;
|
|
4322
|
+
k && _({
|
|
4306
4323
|
code: k,
|
|
4307
4324
|
context: e.context || {},
|
|
4308
4325
|
localState: void 0,
|
|
@@ -4314,13 +4331,13 @@ function we(e) {
|
|
|
4314
4331
|
}), d.current = !0;
|
|
4315
4332
|
}
|
|
4316
4333
|
return /* @__PURE__ */ s(
|
|
4317
|
-
|
|
4334
|
+
We.Provider,
|
|
4318
4335
|
{
|
|
4319
4336
|
value: {
|
|
4320
4337
|
registeredComponents: a
|
|
4321
4338
|
},
|
|
4322
|
-
children: /* @__PURE__ */
|
|
4323
|
-
|
|
4339
|
+
children: /* @__PURE__ */ B(
|
|
4340
|
+
hi,
|
|
4324
4341
|
{
|
|
4325
4342
|
apiHost: e.apiHost,
|
|
4326
4343
|
nonce: e.nonce,
|
|
@@ -4341,7 +4358,7 @@ function we(e) {
|
|
|
4341
4358
|
setBuilderContextSignal: l,
|
|
4342
4359
|
children: [
|
|
4343
4360
|
e.isSsrAbTest ? /* @__PURE__ */ s(
|
|
4344
|
-
|
|
4361
|
+
Y,
|
|
4345
4362
|
{
|
|
4346
4363
|
id: "builderio-variant-visibility",
|
|
4347
4364
|
scriptStr: t,
|
|
@@ -4349,19 +4366,19 @@ function we(e) {
|
|
|
4349
4366
|
}
|
|
4350
4367
|
) : null,
|
|
4351
4368
|
/* @__PURE__ */ s(
|
|
4352
|
-
|
|
4369
|
+
gi,
|
|
4353
4370
|
{
|
|
4354
4371
|
nonce: e.nonce || "",
|
|
4355
4372
|
isNestedRender: e.isNestedRender,
|
|
4356
|
-
contentId: (
|
|
4357
|
-
cssCode: (v = (
|
|
4358
|
-
customFonts: (
|
|
4373
|
+
contentId: (g = o.content) == null ? void 0 : g.id,
|
|
4374
|
+
cssCode: (v = (c = o.content) == null ? void 0 : c.data) == null ? void 0 : v.cssCode,
|
|
4375
|
+
customFonts: (b = (f = o.content) == null ? void 0 : f.data) == null ? void 0 : b.customFonts
|
|
4359
4376
|
}
|
|
4360
4377
|
),
|
|
4361
4378
|
/* @__PURE__ */ s(
|
|
4362
4379
|
$,
|
|
4363
4380
|
{
|
|
4364
|
-
blocks: (
|
|
4381
|
+
blocks: (p = (S = o.content) == null ? void 0 : S.data) == null ? void 0 : p.blocks,
|
|
4365
4382
|
context: o,
|
|
4366
4383
|
registeredComponents: a,
|
|
4367
4384
|
linkComponent: e.linkComponent
|
|
@@ -4373,18 +4390,18 @@ function we(e) {
|
|
|
4373
4390
|
}
|
|
4374
4391
|
);
|
|
4375
4392
|
}
|
|
4376
|
-
function
|
|
4393
|
+
function yi(e) {
|
|
4377
4394
|
var o;
|
|
4378
|
-
const [t, n] =
|
|
4379
|
-
() =>
|
|
4380
|
-
canTrack:
|
|
4395
|
+
const [t, n] = I(
|
|
4396
|
+
() => Xn({
|
|
4397
|
+
canTrack: M(e.canTrack),
|
|
4381
4398
|
content: e.content
|
|
4382
4399
|
})
|
|
4383
4400
|
);
|
|
4384
4401
|
function i() {
|
|
4385
4402
|
var l;
|
|
4386
|
-
return
|
|
4387
|
-
|
|
4403
|
+
return ni(
|
|
4404
|
+
G(e.content).map((d) => ({
|
|
4388
4405
|
id: d.testVariationId,
|
|
4389
4406
|
testRatio: d.testRatio
|
|
4390
4407
|
})),
|
|
@@ -4392,31 +4409,31 @@ function fi(e) {
|
|
|
4392
4409
|
);
|
|
4393
4410
|
}
|
|
4394
4411
|
function a() {
|
|
4395
|
-
return
|
|
4412
|
+
return G(e.content).map((l) => `.variant-${l.testVariationId} { display: none; } `).join("");
|
|
4396
4413
|
}
|
|
4397
4414
|
function r() {
|
|
4398
4415
|
var l;
|
|
4399
4416
|
return t ? {
|
|
4400
4417
|
...e.content,
|
|
4401
4418
|
testVariationId: (l = e.content) == null ? void 0 : l.id
|
|
4402
|
-
} :
|
|
4419
|
+
} : et({
|
|
4403
4420
|
item: e.content,
|
|
4404
|
-
canTrack:
|
|
4421
|
+
canTrack: M(e.canTrack)
|
|
4405
4422
|
});
|
|
4406
4423
|
}
|
|
4407
|
-
return
|
|
4408
|
-
}, []), /* @__PURE__ */
|
|
4409
|
-
!e.isNestedRender &&
|
|
4410
|
-
|
|
4424
|
+
return P(() => {
|
|
4425
|
+
}, []), /* @__PURE__ */ B(R, { children: [
|
|
4426
|
+
!e.isNestedRender && O !== "reactNative" ? /* @__PURE__ */ s(
|
|
4427
|
+
Y,
|
|
4411
4428
|
{
|
|
4412
4429
|
id: "builderio-init-variants-fns",
|
|
4413
|
-
scriptStr:
|
|
4430
|
+
scriptStr: ti(),
|
|
4414
4431
|
nonce: e.nonce || ""
|
|
4415
4432
|
}
|
|
4416
4433
|
) : null,
|
|
4417
|
-
t ? /* @__PURE__ */
|
|
4434
|
+
t ? /* @__PURE__ */ B(R, { children: [
|
|
4418
4435
|
/* @__PURE__ */ s(
|
|
4419
|
-
|
|
4436
|
+
K,
|
|
4420
4437
|
{
|
|
4421
4438
|
id: "builderio-variants",
|
|
4422
4439
|
styles: a(),
|
|
@@ -4424,15 +4441,15 @@ function fi(e) {
|
|
|
4424
4441
|
}
|
|
4425
4442
|
),
|
|
4426
4443
|
/* @__PURE__ */ s(
|
|
4427
|
-
|
|
4444
|
+
Y,
|
|
4428
4445
|
{
|
|
4429
4446
|
id: "builderio-variants-visibility",
|
|
4430
4447
|
scriptStr: i(),
|
|
4431
4448
|
nonce: e.nonce || ""
|
|
4432
4449
|
}
|
|
4433
4450
|
),
|
|
4434
|
-
(o =
|
|
4435
|
-
|
|
4451
|
+
(o = G(e.content)) == null ? void 0 : o.map((l) => /* @__PURE__ */ s(
|
|
4452
|
+
Re,
|
|
4436
4453
|
{
|
|
4437
4454
|
apiHost: e.apiHost,
|
|
4438
4455
|
isNestedRender: e.isNestedRender,
|
|
@@ -4460,7 +4477,7 @@ function fi(e) {
|
|
|
4460
4477
|
))
|
|
4461
4478
|
] }) : null,
|
|
4462
4479
|
/* @__PURE__ */ s(
|
|
4463
|
-
|
|
4480
|
+
Re,
|
|
4464
4481
|
{
|
|
4465
4482
|
apiHost: e.apiHost,
|
|
4466
4483
|
nonce: e.nonce,
|
|
@@ -4487,13 +4504,13 @@ function fi(e) {
|
|
|
4487
4504
|
)
|
|
4488
4505
|
] });
|
|
4489
4506
|
}
|
|
4490
|
-
const
|
|
4507
|
+
const vi = async ({
|
|
4491
4508
|
builderContextValue: e,
|
|
4492
4509
|
symbol: t
|
|
4493
4510
|
}) => {
|
|
4494
4511
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
4495
4512
|
(e != null && e.apiKey))
|
|
4496
|
-
return
|
|
4513
|
+
return Pe({
|
|
4497
4514
|
model: t.model,
|
|
4498
4515
|
apiKey: e.apiKey,
|
|
4499
4516
|
apiVersion: e.apiVersion,
|
|
@@ -4503,11 +4520,11 @@ const hi = async ({
|
|
|
4503
4520
|
}
|
|
4504
4521
|
}
|
|
4505
4522
|
}).catch((n) => {
|
|
4506
|
-
|
|
4523
|
+
z.error("Could not fetch symbol content: ", n);
|
|
4507
4524
|
});
|
|
4508
4525
|
};
|
|
4509
|
-
function
|
|
4510
|
-
var l, d,
|
|
4526
|
+
function xi(e) {
|
|
4527
|
+
var l, d, u, h, g;
|
|
4511
4528
|
function t() {
|
|
4512
4529
|
return "div";
|
|
4513
4530
|
}
|
|
@@ -4515,31 +4532,31 @@ function gi(e) {
|
|
|
4515
4532
|
return "div";
|
|
4516
4533
|
}
|
|
4517
4534
|
function i() {
|
|
4518
|
-
var
|
|
4535
|
+
var c, v;
|
|
4519
4536
|
return [
|
|
4520
|
-
e.attributes[
|
|
4537
|
+
e.attributes[j()],
|
|
4521
4538
|
"builder-symbol",
|
|
4522
|
-
(
|
|
4539
|
+
(c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
|
|
4523
4540
|
(v = e.symbol) != null && v.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
4524
4541
|
].filter(Boolean).join(" ");
|
|
4525
4542
|
}
|
|
4526
|
-
const [a, r] =
|
|
4527
|
-
var
|
|
4528
|
-
return (
|
|
4543
|
+
const [a, r] = I(() => {
|
|
4544
|
+
var c;
|
|
4545
|
+
return (c = e.symbol) == null ? void 0 : c.content;
|
|
4529
4546
|
});
|
|
4530
4547
|
function o() {
|
|
4531
|
-
a ||
|
|
4548
|
+
a || vi({
|
|
4532
4549
|
symbol: e.symbol,
|
|
4533
4550
|
builderContextValue: e.builderContext
|
|
4534
|
-
}).then((
|
|
4535
|
-
|
|
4551
|
+
}).then((c) => {
|
|
4552
|
+
c && r(c);
|
|
4536
4553
|
});
|
|
4537
4554
|
}
|
|
4538
|
-
return
|
|
4539
|
-
}, []),
|
|
4555
|
+
return P(() => {
|
|
4556
|
+
}, []), P(() => {
|
|
4540
4557
|
o();
|
|
4541
4558
|
}, [e.symbol]), /* @__PURE__ */ s("div", { ...e.attributes, className: i(), children: /* @__PURE__ */ s(
|
|
4542
|
-
|
|
4559
|
+
yi,
|
|
4543
4560
|
{
|
|
4544
4561
|
nonce: e.builderContext.nonce,
|
|
4545
4562
|
isNestedRender: !0,
|
|
@@ -4553,10 +4570,10 @@ function gi(e) {
|
|
|
4553
4570
|
data: {
|
|
4554
4571
|
...(d = e.symbol) == null ? void 0 : d.data,
|
|
4555
4572
|
...e.builderContext.localState,
|
|
4556
|
-
...(
|
|
4573
|
+
...(u = a == null ? void 0 : a.data) == null ? void 0 : u.state
|
|
4557
4574
|
},
|
|
4558
4575
|
canTrack: e.builderContext.canTrack,
|
|
4559
|
-
model: (
|
|
4576
|
+
model: (g = (h = e.symbol) == null ? void 0 : h.model) != null ? g : "",
|
|
4560
4577
|
content: a,
|
|
4561
4578
|
linkComponent: e.builderLinkComponent,
|
|
4562
4579
|
blocksWrapper: t(),
|
|
@@ -4566,15 +4583,15 @@ function gi(e) {
|
|
|
4566
4583
|
}
|
|
4567
4584
|
export {
|
|
4568
4585
|
$ as Blocks,
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4586
|
+
me as BuilderContext,
|
|
4587
|
+
ut as Button,
|
|
4588
|
+
Yt as Columns,
|
|
4589
|
+
yi as Content,
|
|
4590
|
+
Xt as Fragment,
|
|
4591
|
+
tn as Image,
|
|
4592
|
+
nn as Section,
|
|
4593
|
+
xi as Symbol,
|
|
4594
|
+
In as Text,
|
|
4595
|
+
Jn as Video,
|
|
4596
|
+
Ri as setClientUserAttributes
|
|
4580
4597
|
};
|