@builder.io/sdk-react-nextjs 0.13.4 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/{USE_CLIENT_BUNDLE-288752d8.js → USE_CLIENT_BUNDLE-51815064.js} +3 -6
- package/lib/{node/USE_CLIENT_BUNDLE-5990191b.cjs → browser/USE_CLIENT_BUNDLE-83c9a885.cjs} +2 -2
- package/lib/{edge/USE_SERVER_BUNDLE-6e48e5ed.js → browser/USE_SERVER_BUNDLE-60b2536b.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-70e7e90b.cjs → browser/USE_SERVER_BUNDLE-fb3ef1bb.cjs} +1 -1
- package/lib/browser/bundle-9c5f5cde.cjs +168 -0
- package/lib/browser/{bundle-10ada443.js → bundle-cc12d1bc.js} +478 -503
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +26 -30
- package/lib/{browser/USE_CLIENT_BUNDLE-94cce7fa.cjs → edge/USE_CLIENT_BUNDLE-366693e9.cjs} +2 -2
- package/lib/{node/USE_CLIENT_BUNDLE-d7ccf4f8.js → edge/USE_CLIENT_BUNDLE-c1fb11f0.js} +3 -6
- package/lib/{node/USE_SERVER_BUNDLE-7a98295a.js → edge/USE_SERVER_BUNDLE-7191faac.js} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-b7c27ec7.cjs → edge/USE_SERVER_BUNDLE-f0e5fdef.cjs} +1 -1
- package/lib/edge/bundle-a08cccde.cjs +188 -0
- package/lib/edge/{bundle-66600134.js → bundle-cc82bd60.js} +1067 -1092
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +26 -30
- package/lib/{edge/USE_CLIENT_BUNDLE-4859795b.cjs → node/USE_CLIENT_BUNDLE-62a178e1.cjs} +2 -2
- package/lib/{edge/USE_CLIENT_BUNDLE-6fd05768.js → node/USE_CLIENT_BUNDLE-d012a153.js} +3 -6
- package/lib/{browser/USE_SERVER_BUNDLE-20569132.cjs → node/USE_SERVER_BUNDLE-95968708.cjs} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-02c2385b.js → node/USE_SERVER_BUNDLE-a4460138.js} +1 -1
- package/lib/node/{bundle-2d5f1c0c.js → bundle-72550faf.js} +189 -211
- package/lib/node/{bundle-9b818d40.cjs → bundle-b5a3f37b.cjs} +12 -12
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +26 -30
- package/package.json +1 -1
- package/types/cjs/components/content-variants/content-variants.types.d.ts +0 -2
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/get-content/index.d.ts +0 -10
- package/types/cjs/functions/get-content/types.d.ts +0 -11
- package/types/cjs/functions/register-component.d.ts +0 -9
- package/types/cjs/index-helpers/blocks-exports.d.ts +0 -8
- package/types/cjs/server-index.d.ts +1 -1
- package/types/esm/components/content-variants/content-variants.types.d.ts +0 -2
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/get-content/index.d.ts +0 -10
- package/types/esm/functions/get-content/types.d.ts +0 -11
- package/types/esm/functions/register-component.d.ts +0 -9
- package/types/esm/index-helpers/blocks-exports.d.ts +0 -8
- package/types/esm/server-index.d.ts +1 -1
- package/lib/browser/bundle-44e64ae0.cjs +0 -168
- package/lib/edge/bundle-aa7b9a16.cjs +0 -188
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx as l, Fragment as S, jsxs as A } from "react/jsx-runtime";
|
|
3
|
-
import { I as We, B as Oe, a as Fe, D as Ne, C as Le, E as Ue, b as _e, V as De, c as je, F as Me, d as He, S as Ke, e as ze } from "./USE_CLIENT_BUNDLE-288752d8.js";
|
|
1
|
+
import { jsx as l, Fragment as S, jsxs as R } from "react/jsx-runtime";
|
|
4
2
|
import "react";
|
|
3
|
+
import { I as Ae, B as Be, a as Ve, D as We, C as Oe, E as $e, b as Fe, V as Ne, c as Le, F as Ue, d as _e, S as De, e as je } from "./USE_CLIENT_BUNDLE-51815064.js";
|
|
4
|
+
import { LRUCache as Me } from "lru-cache";
|
|
5
5
|
import "next/navigation";
|
|
6
|
-
const
|
|
6
|
+
const He = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), to = (e) => typeof e == "string" && He.has(e.toLowerCase()), T = "rsc", D = () => {
|
|
7
7
|
switch (T) {
|
|
8
8
|
case "react":
|
|
9
9
|
case "reactNative":
|
|
@@ -16,7 +16,7 @@ const qe = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr",
|
|
|
16
16
|
return "class";
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
function
|
|
19
|
+
function Ke(e) {
|
|
20
20
|
var t;
|
|
21
21
|
return {
|
|
22
22
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -27,7 +27,7 @@ function Ge(e) {
|
|
|
27
27
|
builderBlock: e
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
const P = "[Builder.io]: ",
|
|
30
|
+
const P = "[Builder.io]: ", x = {
|
|
31
31
|
log: (...e) => console.log(P, ...e),
|
|
32
32
|
error: (...e) => console.error(P, ...e),
|
|
33
33
|
warn: (...e) => console.warn(P, ...e),
|
|
@@ -36,20 +36,20 @@ const P = "[Builder.io]: ", v = {
|
|
|
36
36
|
function k() {
|
|
37
37
|
return typeof window < "u" && typeof document < "u";
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ze() {
|
|
40
40
|
return k() && window.self !== window.top;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
42
|
+
function j() {
|
|
43
|
+
return ze() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const qe = () => {
|
|
46
46
|
if (k()) {
|
|
47
47
|
const e = new URL(location.href);
|
|
48
48
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
49
49
|
} else
|
|
50
50
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
51
|
-
},
|
|
52
|
-
const e =
|
|
51
|
+
}, Ge = () => typeof navigator == "object" && navigator.userAgent || "", se = () => {
|
|
52
|
+
const e = Ge(), t = {
|
|
53
53
|
Android() {
|
|
54
54
|
return e.match(/Android/i);
|
|
55
55
|
},
|
|
@@ -68,13 +68,13 @@ const Ye = () => {
|
|
|
68
68
|
any() {
|
|
69
69
|
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || T === "reactNative";
|
|
70
70
|
}
|
|
71
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
71
|
+
}, n = e.match(/Tablet|iPad/i), o = qe();
|
|
72
72
|
return {
|
|
73
73
|
urlPath: o == null ? void 0 : o.pathname,
|
|
74
74
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
75
75
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
76
76
|
};
|
|
77
|
-
},
|
|
77
|
+
}, Ye = ({
|
|
78
78
|
builder: e,
|
|
79
79
|
context: t,
|
|
80
80
|
event: n,
|
|
@@ -86,14 +86,14 @@ const Ye = () => {
|
|
|
86
86
|
builder: e,
|
|
87
87
|
context: t,
|
|
88
88
|
event: n
|
|
89
|
-
}),
|
|
90
|
-
isEditing:
|
|
89
|
+
}), Je = () => ({
|
|
90
|
+
isEditing: j(),
|
|
91
91
|
isBrowser: k(),
|
|
92
92
|
isServer: !k(),
|
|
93
|
-
getUserAttributes: () =>
|
|
94
|
-
}),
|
|
93
|
+
getUserAttributes: () => se()
|
|
94
|
+
}), Qe = (e, {
|
|
95
95
|
isExpression: t = !0
|
|
96
|
-
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e,
|
|
96
|
+
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, q = ({
|
|
97
97
|
code: e,
|
|
98
98
|
builder: t,
|
|
99
99
|
context: n,
|
|
@@ -102,11 +102,11 @@ const Ye = () => {
|
|
|
102
102
|
rootSetState: r,
|
|
103
103
|
rootState: a
|
|
104
104
|
}) => {
|
|
105
|
-
const s =
|
|
105
|
+
const s = Ye({
|
|
106
106
|
builder: t,
|
|
107
107
|
context: n,
|
|
108
108
|
event: o,
|
|
109
|
-
state:
|
|
109
|
+
state: ce({
|
|
110
110
|
rootState: a,
|
|
111
111
|
localState: i,
|
|
112
112
|
rootSetState: r
|
|
@@ -114,7 +114,7 @@ const Ye = () => {
|
|
|
114
114
|
});
|
|
115
115
|
return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
|
|
116
116
|
};
|
|
117
|
-
function
|
|
117
|
+
function ce({
|
|
118
118
|
rootState: e,
|
|
119
119
|
localState: t,
|
|
120
120
|
rootSetState: n
|
|
@@ -124,7 +124,7 @@ function de({
|
|
|
124
124
|
if (t && i in t)
|
|
125
125
|
return t[i];
|
|
126
126
|
const r = o[i];
|
|
127
|
-
return typeof r == "object" ?
|
|
127
|
+
return typeof r == "object" ? ce({
|
|
128
128
|
rootState: r,
|
|
129
129
|
localState: void 0,
|
|
130
130
|
rootSetState: n ? (a) => {
|
|
@@ -140,18 +140,18 @@ function de({
|
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
const w = (e) => e != null;
|
|
143
|
-
function
|
|
143
|
+
function Xe() {
|
|
144
144
|
var e;
|
|
145
145
|
return typeof process < "u" && w((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
146
146
|
}
|
|
147
|
-
const
|
|
147
|
+
const Ze = () => {
|
|
148
148
|
var o;
|
|
149
|
-
if (!
|
|
149
|
+
if (!Xe())
|
|
150
150
|
return !1;
|
|
151
151
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
152
|
-
return e && t && !n ? (
|
|
153
|
-
},
|
|
154
|
-
function
|
|
152
|
+
return e && t && !n ? (x.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
153
|
+
}, et = (e) => (k() || Ze(), q(e));
|
|
154
|
+
function M({
|
|
155
155
|
code: e,
|
|
156
156
|
context: t,
|
|
157
157
|
localState: n,
|
|
@@ -161,14 +161,14 @@ function H({
|
|
|
161
161
|
isExpression: a = !0
|
|
162
162
|
}) {
|
|
163
163
|
if (e === "") {
|
|
164
|
-
|
|
164
|
+
x.warn("Skipping evaluation of empty code block.");
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
const s = {
|
|
168
|
-
code:
|
|
168
|
+
code: Qe(e, {
|
|
169
169
|
isExpression: a
|
|
170
170
|
}),
|
|
171
|
-
builder:
|
|
171
|
+
builder: Je(),
|
|
172
172
|
context: t,
|
|
173
173
|
event: r,
|
|
174
174
|
rootSetState: i,
|
|
@@ -176,21 +176,21 @@ function H({
|
|
|
176
176
|
localState: n
|
|
177
177
|
};
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return et(s);
|
|
180
180
|
} catch (c) {
|
|
181
|
-
|
|
181
|
+
x.error("Failed code evaluation: " + c.message, {
|
|
182
182
|
code: e
|
|
183
183
|
});
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
const W = (e) => JSON.parse(JSON.stringify(e)),
|
|
187
|
+
const W = (e) => JSON.parse(JSON.stringify(e)), tt = (e, t, n) => {
|
|
188
188
|
if (Object(e) !== e)
|
|
189
189
|
return e;
|
|
190
190
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
191
191
|
return o.slice(0, -1).reduce((i, r, a) => Object(i[r]) === i[r] ? i[r] : i[r] = Math.abs(Number(o[a + 1])) >> 0 === +o[a + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
192
192
|
};
|
|
193
|
-
const
|
|
193
|
+
const nt = ({
|
|
194
194
|
block: e,
|
|
195
195
|
context: t,
|
|
196
196
|
localState: n,
|
|
@@ -209,18 +209,18 @@ const rt = ({
|
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
211
|
for (const s in e.bindings) {
|
|
212
|
-
const c = e.bindings[s], m =
|
|
212
|
+
const c = e.bindings[s], m = M({
|
|
213
213
|
code: c,
|
|
214
214
|
localState: n,
|
|
215
215
|
rootState: o,
|
|
216
216
|
rootSetState: i,
|
|
217
217
|
context: t
|
|
218
218
|
});
|
|
219
|
-
|
|
219
|
+
tt(a, s, m);
|
|
220
220
|
}
|
|
221
221
|
return a;
|
|
222
222
|
};
|
|
223
|
-
function
|
|
223
|
+
function V({
|
|
224
224
|
block: e,
|
|
225
225
|
context: t,
|
|
226
226
|
shouldEvaluateBindings: n,
|
|
@@ -229,7 +229,7 @@ function $({
|
|
|
229
229
|
rootSetState: r
|
|
230
230
|
}) {
|
|
231
231
|
const a = e;
|
|
232
|
-
return n ?
|
|
232
|
+
return n ? nt({
|
|
233
233
|
block: a,
|
|
234
234
|
localState: o,
|
|
235
235
|
rootState: i,
|
|
@@ -237,13 +237,13 @@ function $({
|
|
|
237
237
|
context: t
|
|
238
238
|
}) : a;
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const ot = ({
|
|
241
241
|
block: e,
|
|
242
242
|
context: t,
|
|
243
243
|
registeredComponents: n
|
|
244
244
|
}) => {
|
|
245
245
|
var r;
|
|
246
|
-
const o = (r =
|
|
246
|
+
const o = (r = V({
|
|
247
247
|
block: e,
|
|
248
248
|
localState: t.localState,
|
|
249
249
|
rootState: t.rootState,
|
|
@@ -259,7 +259,7 @@ const at = ({
|
|
|
259
259
|
console.warn(`
|
|
260
260
|
Could not find a registered component named "${o}".
|
|
261
261
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
262
|
-
},
|
|
262
|
+
}, it = ({
|
|
263
263
|
block: e,
|
|
264
264
|
context: t
|
|
265
265
|
}) => {
|
|
@@ -269,7 +269,7 @@ const at = ({
|
|
|
269
269
|
} = e;
|
|
270
270
|
if (!(n != null && n.collection))
|
|
271
271
|
return;
|
|
272
|
-
const i =
|
|
272
|
+
const i = M({
|
|
273
273
|
code: n.collection,
|
|
274
274
|
localState: t.localState,
|
|
275
275
|
rootState: t.rootState,
|
|
@@ -292,7 +292,7 @@ const at = ({
|
|
|
292
292
|
},
|
|
293
293
|
block: o
|
|
294
294
|
}));
|
|
295
|
-
},
|
|
295
|
+
}, le = {
|
|
296
296
|
small: {
|
|
297
297
|
min: 320,
|
|
298
298
|
default: 321,
|
|
@@ -308,11 +308,11 @@ const at = ({
|
|
|
308
308
|
default: 991,
|
|
309
309
|
max: 1200
|
|
310
310
|
}
|
|
311
|
-
},
|
|
311
|
+
}, G = (e, t = le) => `@media (max-width: ${t[e].max}px)`, de = ({
|
|
312
312
|
small: e,
|
|
313
313
|
medium: t
|
|
314
314
|
}) => {
|
|
315
|
-
const n = W(
|
|
315
|
+
const n = W(le);
|
|
316
316
|
if (!e || !t)
|
|
317
317
|
return n;
|
|
318
318
|
const o = Math.floor(e / 2);
|
|
@@ -334,17 +334,17 @@ const at = ({
|
|
|
334
334
|
min: r,
|
|
335
335
|
default: r + 1
|
|
336
336
|
}, n;
|
|
337
|
-
},
|
|
337
|
+
}, rt = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), ue = (e) => Object.entries(e).map(([n, o]) => {
|
|
338
338
|
if (typeof o == "string")
|
|
339
|
-
return `${
|
|
340
|
-
}).filter(w),
|
|
341
|
-
`),
|
|
339
|
+
return `${rt(n)}: ${o};`;
|
|
340
|
+
}).filter(w), at = (e) => ue(e).join(`
|
|
341
|
+
`), N = ({
|
|
342
342
|
mediaQuery: e,
|
|
343
343
|
className: t,
|
|
344
344
|
styles: n
|
|
345
345
|
}) => {
|
|
346
346
|
const o = `.${t} {
|
|
347
|
-
${
|
|
347
|
+
${at(n)}
|
|
348
348
|
}`;
|
|
349
349
|
return e ? `${e} {
|
|
350
350
|
${o}
|
|
@@ -353,9 +353,9 @@ const at = ({
|
|
|
353
353
|
function O(e) {
|
|
354
354
|
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function st(e) {
|
|
357
357
|
const t = function() {
|
|
358
|
-
const i =
|
|
358
|
+
const i = V({
|
|
359
359
|
block: e.block,
|
|
360
360
|
localState: e.context.localState,
|
|
361
361
|
rootState: e.context.rootState,
|
|
@@ -366,32 +366,32 @@ function dt(e) {
|
|
|
366
366
|
return w(i.hide) ? !i.hide : w(i.show) ? i.show : !0;
|
|
367
367
|
}, n = function() {
|
|
368
368
|
var d;
|
|
369
|
-
const i =
|
|
369
|
+
const i = V({
|
|
370
370
|
block: e.block,
|
|
371
371
|
localState: e.context.localState,
|
|
372
372
|
rootState: e.context.rootState,
|
|
373
373
|
rootSetState: e.context.rootSetState,
|
|
374
374
|
context: e.context.context,
|
|
375
375
|
shouldEvaluateBindings: !0
|
|
376
|
-
}), r = i.responsiveStyles, a = e.context.content, s =
|
|
376
|
+
}), r = i.responsiveStyles, a = e.context.content, s = de(
|
|
377
377
|
((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
|
|
378
|
-
), c = r == null ? void 0 : r.large, m = r == null ? void 0 : r.medium,
|
|
379
|
-
if (!
|
|
378
|
+
), c = r == null ? void 0 : r.large, m = r == null ? void 0 : r.medium, b = r == null ? void 0 : r.small, g = i.id;
|
|
379
|
+
if (!g)
|
|
380
380
|
return "";
|
|
381
|
-
const f = c ?
|
|
382
|
-
className:
|
|
381
|
+
const f = c ? N({
|
|
382
|
+
className: g,
|
|
383
383
|
styles: c
|
|
384
|
-
}) : "", h = m ?
|
|
385
|
-
className:
|
|
384
|
+
}) : "", h = m ? N({
|
|
385
|
+
className: g,
|
|
386
386
|
styles: m,
|
|
387
|
-
mediaQuery:
|
|
387
|
+
mediaQuery: G(
|
|
388
388
|
"medium",
|
|
389
389
|
s
|
|
390
390
|
)
|
|
391
|
-
}) : "", u =
|
|
392
|
-
className:
|
|
393
|
-
styles:
|
|
394
|
-
mediaQuery:
|
|
391
|
+
}) : "", u = b ? N({
|
|
392
|
+
className: g,
|
|
393
|
+
styles: b,
|
|
394
|
+
mediaQuery: G(
|
|
395
395
|
"small",
|
|
396
396
|
s
|
|
397
397
|
)
|
|
@@ -400,10 +400,10 @@ function dt(e) {
|
|
|
400
400
|
};
|
|
401
401
|
return /* @__PURE__ */ l(S, { children: n() && t() ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function ct(e) {
|
|
404
404
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
405
405
|
}
|
|
406
|
-
const
|
|
406
|
+
const lt = (e) => `on${ct(e)}`, dt = (e, t) => (n) => M({
|
|
407
407
|
code: e,
|
|
408
408
|
context: t.context,
|
|
409
409
|
localState: t.localState,
|
|
@@ -412,13 +412,13 @@ const mt = (e) => `on${ut(e)}`, ft = (e, t) => (n) => H({
|
|
|
412
412
|
event: n,
|
|
413
413
|
isExpression: !1
|
|
414
414
|
});
|
|
415
|
-
function
|
|
415
|
+
function no(e) {
|
|
416
416
|
const t = {}, n = e.block.actions ?? {};
|
|
417
417
|
for (const o in n) {
|
|
418
418
|
if (!n.hasOwnProperty(o))
|
|
419
419
|
continue;
|
|
420
420
|
const i = n[o];
|
|
421
|
-
let r =
|
|
421
|
+
let r = lt(o);
|
|
422
422
|
if (e.stripPrefix)
|
|
423
423
|
switch (T) {
|
|
424
424
|
case "vue":
|
|
@@ -428,29 +428,29 @@ function oo(e) {
|
|
|
428
428
|
r = r.replace("on:", "");
|
|
429
429
|
break;
|
|
430
430
|
}
|
|
431
|
-
t[r] =
|
|
431
|
+
t[r] = dt(i, e);
|
|
432
432
|
}
|
|
433
433
|
return t;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function ut({
|
|
436
436
|
style: e
|
|
437
437
|
}) {
|
|
438
438
|
return e;
|
|
439
439
|
}
|
|
440
|
-
const
|
|
440
|
+
const mt = ({
|
|
441
441
|
block: e,
|
|
442
442
|
context: t
|
|
443
|
-
}) =>
|
|
443
|
+
}) => me(ut({
|
|
444
444
|
style: e.style || {},
|
|
445
445
|
context: t,
|
|
446
446
|
block: e
|
|
447
447
|
}));
|
|
448
|
-
function
|
|
448
|
+
function me(e) {
|
|
449
449
|
switch (T) {
|
|
450
450
|
case "svelte":
|
|
451
451
|
case "vue":
|
|
452
452
|
case "solid":
|
|
453
|
-
return
|
|
453
|
+
return ue(e).join(" ");
|
|
454
454
|
case "qwik":
|
|
455
455
|
case "reactNative":
|
|
456
456
|
case "react":
|
|
@@ -458,36 +458,36 @@ function he(e) {
|
|
|
458
458
|
return e;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function ft({
|
|
462
462
|
properties: e
|
|
463
463
|
}) {
|
|
464
464
|
return e;
|
|
465
465
|
}
|
|
466
|
-
const
|
|
466
|
+
const ht = (e) => ({
|
|
467
467
|
href: e.href
|
|
468
468
|
});
|
|
469
|
-
function
|
|
469
|
+
function pt({
|
|
470
470
|
block: e,
|
|
471
471
|
context: t
|
|
472
472
|
}) {
|
|
473
473
|
var o;
|
|
474
474
|
const n = {
|
|
475
|
-
...
|
|
475
|
+
...ht(e),
|
|
476
476
|
...e.properties,
|
|
477
477
|
"builder-id": e.id,
|
|
478
|
-
style:
|
|
478
|
+
style: mt({
|
|
479
479
|
block: e,
|
|
480
480
|
context: t
|
|
481
481
|
}),
|
|
482
|
-
[
|
|
482
|
+
[D()]: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
|
|
483
483
|
};
|
|
484
|
-
return
|
|
484
|
+
return ft({
|
|
485
485
|
properties: n,
|
|
486
486
|
context: t,
|
|
487
487
|
block: e
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
const
|
|
490
|
+
const gt = ({
|
|
491
491
|
componentOptions: e,
|
|
492
492
|
builderBlock: t,
|
|
493
493
|
context: n,
|
|
@@ -503,7 +503,7 @@ const St = ({
|
|
|
503
503
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
504
504
|
*/
|
|
505
505
|
...i ? {
|
|
506
|
-
attributes:
|
|
506
|
+
attributes: pt({
|
|
507
507
|
block: t,
|
|
508
508
|
context: a
|
|
509
509
|
})
|
|
@@ -519,11 +519,11 @@ const St = ({
|
|
|
519
519
|
};
|
|
520
520
|
function Y(e) {
|
|
521
521
|
var n;
|
|
522
|
-
const t = e.isInteractive ?
|
|
522
|
+
const t = e.isInteractive ? Ae : e.componentRef;
|
|
523
523
|
return /* @__PURE__ */ l(S, { children: e.componentRef ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
|
|
524
524
|
t,
|
|
525
525
|
{
|
|
526
|
-
...
|
|
526
|
+
...gt({
|
|
527
527
|
componentOptions: e.componentOptions,
|
|
528
528
|
builderBlock: e.builderBlock,
|
|
529
529
|
context: e.context,
|
|
@@ -534,7 +534,7 @@ function Y(e) {
|
|
|
534
534
|
contextValue: e.context
|
|
535
535
|
}),
|
|
536
536
|
children: (n = e.blockChildren) == null ? void 0 : n.map((o) => /* @__PURE__ */ l(
|
|
537
|
-
|
|
537
|
+
$,
|
|
538
538
|
{
|
|
539
539
|
block: o,
|
|
540
540
|
context: e.context,
|
|
@@ -546,10 +546,10 @@ function Y(e) {
|
|
|
546
546
|
}
|
|
547
547
|
) }) : null });
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function bt(e) {
|
|
550
550
|
const t = e.repeatContext;
|
|
551
551
|
return /* @__PURE__ */ l(
|
|
552
|
-
|
|
552
|
+
$,
|
|
553
553
|
{
|
|
554
554
|
block: e.block,
|
|
555
555
|
context: t,
|
|
@@ -558,22 +558,22 @@ function kt(e) {
|
|
|
558
558
|
}
|
|
559
559
|
);
|
|
560
560
|
}
|
|
561
|
-
function
|
|
562
|
-
var m,
|
|
561
|
+
function $(e) {
|
|
562
|
+
var m, b, g;
|
|
563
563
|
const t = function() {
|
|
564
|
-
return
|
|
564
|
+
return ot({
|
|
565
565
|
block: e.block,
|
|
566
566
|
context: e.context,
|
|
567
567
|
registeredComponents: e.registeredComponents
|
|
568
568
|
});
|
|
569
569
|
}, n = function() {
|
|
570
|
-
return
|
|
570
|
+
return it({
|
|
571
571
|
block: e.block,
|
|
572
572
|
context: e.context
|
|
573
573
|
});
|
|
574
574
|
}, o = function() {
|
|
575
575
|
var h;
|
|
576
|
-
return (h = e.block.repeat) != null && h.collection ? e.block :
|
|
576
|
+
return (h = e.block.repeat) != null && h.collection ? e.block : V({
|
|
577
577
|
block: e.block,
|
|
578
578
|
localState: e.context.localState,
|
|
579
579
|
rootState: e.context.rootState,
|
|
@@ -594,17 +594,17 @@ function F(e) {
|
|
|
594
594
|
var u;
|
|
595
595
|
return !((u = t()) != null && u.component) && !n() ? o().children ?? [] : [];
|
|
596
596
|
}, s = function() {
|
|
597
|
-
var h, u, d, y,
|
|
597
|
+
var h, u, d, y, p, C, E, v, I, F;
|
|
598
598
|
return {
|
|
599
599
|
blockChildren: o().children ?? [],
|
|
600
600
|
componentRef: (h = t()) == null ? void 0 : h.component,
|
|
601
601
|
componentOptions: {
|
|
602
|
-
...
|
|
602
|
+
...Ke(o()),
|
|
603
603
|
builderContext: e.context,
|
|
604
|
-
...((u = t()) == null ? void 0 : u.name) === "Core:Button" || ((d = t()) == null ? void 0 : d.name) === "Symbol" || ((y = t()) == null ? void 0 : y.name) === "Columns" || ((
|
|
604
|
+
...((u = t()) == null ? void 0 : u.name) === "Core:Button" || ((d = t()) == null ? void 0 : d.name) === "Symbol" || ((y = t()) == null ? void 0 : y.name) === "Columns" || ((p = t()) == null ? void 0 : p.name) === "Form:Form" ? {
|
|
605
605
|
builderLinkComponent: e.linkComponent
|
|
606
606
|
} : {},
|
|
607
|
-
...((
|
|
607
|
+
...((C = t()) == null ? void 0 : C.name) === "Symbol" || ((E = t()) == null ? void 0 : E.name) === "Columns" || ((v = t()) == null ? void 0 : v.name) === "Form:Form" ? {
|
|
608
608
|
builderComponents: e.registeredComponents
|
|
609
609
|
} : {}
|
|
610
610
|
},
|
|
@@ -612,12 +612,12 @@ function F(e) {
|
|
|
612
612
|
linkComponent: e.linkComponent,
|
|
613
613
|
registeredComponents: e.registeredComponents,
|
|
614
614
|
builderBlock: o(),
|
|
615
|
-
includeBlockProps: ((
|
|
616
|
-
isInteractive: !((
|
|
615
|
+
includeBlockProps: ((I = t()) == null ? void 0 : I.noWrap) === !0,
|
|
616
|
+
isInteractive: !((F = t()) != null && F.isRSC)
|
|
617
617
|
};
|
|
618
618
|
}, c = e.context;
|
|
619
|
-
return /* @__PURE__ */ l(S, { children: r() ? /* @__PURE__ */
|
|
620
|
-
/* @__PURE__ */ l(
|
|
619
|
+
return /* @__PURE__ */ l(S, { children: r() ? /* @__PURE__ */ R(S, { children: [
|
|
620
|
+
/* @__PURE__ */ l(st, { block: e.block, context: e.context }),
|
|
621
621
|
(m = t()) != null && m.noWrap ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
|
|
622
622
|
Y,
|
|
623
623
|
{
|
|
@@ -631,8 +631,8 @@ function F(e) {
|
|
|
631
631
|
includeBlockProps: s().includeBlockProps,
|
|
632
632
|
isInteractive: s().isInteractive
|
|
633
633
|
}
|
|
634
|
-
) }) : /* @__PURE__ */ l(S, { children: n() ? /* @__PURE__ */ l(S, { children: (
|
|
635
|
-
|
|
634
|
+
) }) : /* @__PURE__ */ l(S, { children: n() ? /* @__PURE__ */ l(S, { children: (g = n()) == null ? void 0 : g.map((f, h) => /* @__PURE__ */ l(
|
|
635
|
+
bt,
|
|
636
636
|
{
|
|
637
637
|
repeatContext: f.context,
|
|
638
638
|
block: f.block,
|
|
@@ -640,8 +640,8 @@ function F(e) {
|
|
|
640
640
|
linkComponent: e.linkComponent
|
|
641
641
|
},
|
|
642
642
|
h
|
|
643
|
-
)) }) : /* @__PURE__ */ l(S, { children: /* @__PURE__ */
|
|
644
|
-
|
|
643
|
+
)) }) : /* @__PURE__ */ l(S, { children: /* @__PURE__ */ R(
|
|
644
|
+
Be,
|
|
645
645
|
{
|
|
646
646
|
Wrapper: i(),
|
|
647
647
|
block: o(),
|
|
@@ -662,8 +662,8 @@ function F(e) {
|
|
|
662
662
|
isInteractive: s().isInteractive
|
|
663
663
|
}
|
|
664
664
|
),
|
|
665
|
-
(
|
|
666
|
-
|
|
665
|
+
(b = a()) == null ? void 0 : b.map((f) => /* @__PURE__ */ l(
|
|
666
|
+
$,
|
|
667
667
|
{
|
|
668
668
|
block: f,
|
|
669
669
|
context: c,
|
|
@@ -677,10 +677,10 @@ function F(e) {
|
|
|
677
677
|
) }) })
|
|
678
678
|
] }) : null });
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function H(e) {
|
|
681
681
|
var t, n, o;
|
|
682
682
|
return /* @__PURE__ */ l(
|
|
683
|
-
|
|
683
|
+
Ve,
|
|
684
684
|
{
|
|
685
685
|
blocks: e.blocks,
|
|
686
686
|
parent: e.parent,
|
|
@@ -689,7 +689,7 @@ function N(e) {
|
|
|
689
689
|
BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
|
|
690
690
|
BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
|
|
691
691
|
children: e.blocks ? /* @__PURE__ */ l(S, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
|
|
692
|
-
|
|
692
|
+
$,
|
|
693
693
|
{
|
|
694
694
|
block: i,
|
|
695
695
|
linkComponent: e.linkComponent,
|
|
@@ -701,7 +701,7 @@ function N(e) {
|
|
|
701
701
|
}
|
|
702
702
|
);
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function yt(e) {
|
|
705
705
|
var h;
|
|
706
706
|
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
|
|
707
707
|
var y;
|
|
@@ -727,41 +727,41 @@ function vt(e) {
|
|
|
727
727
|
desktopStyle: "row"
|
|
728
728
|
})
|
|
729
729
|
};
|
|
730
|
-
},
|
|
731
|
-
const y = d === 0 ? 0 : t,
|
|
730
|
+
}, b = function(d) {
|
|
731
|
+
const y = d === 0 ? 0 : t, p = r(d), C = `${y}px`, E = "100%", v = 0;
|
|
732
732
|
return {
|
|
733
733
|
...{
|
|
734
734
|
display: "flex",
|
|
735
735
|
flexDirection: "column",
|
|
736
736
|
alignItems: "stretch"
|
|
737
737
|
},
|
|
738
|
-
width:
|
|
739
|
-
["marginLeft"]:
|
|
738
|
+
width: p,
|
|
739
|
+
["marginLeft"]: C,
|
|
740
740
|
"--column-width-mobile": s({
|
|
741
|
-
stackedStyle:
|
|
742
|
-
desktopStyle:
|
|
741
|
+
stackedStyle: E,
|
|
742
|
+
desktopStyle: p
|
|
743
743
|
}),
|
|
744
744
|
"--column-margin-left-mobile": s({
|
|
745
|
-
stackedStyle:
|
|
746
|
-
desktopStyle:
|
|
745
|
+
stackedStyle: v,
|
|
746
|
+
desktopStyle: C
|
|
747
747
|
}),
|
|
748
748
|
"--column-width-tablet": a({
|
|
749
|
-
stackedStyle:
|
|
750
|
-
desktopStyle:
|
|
749
|
+
stackedStyle: E,
|
|
750
|
+
desktopStyle: p
|
|
751
751
|
}),
|
|
752
752
|
"--column-margin-left-tablet": a({
|
|
753
|
-
stackedStyle:
|
|
754
|
-
desktopStyle:
|
|
753
|
+
stackedStyle: v,
|
|
754
|
+
desktopStyle: C
|
|
755
755
|
})
|
|
756
756
|
};
|
|
757
|
-
},
|
|
758
|
-
var
|
|
759
|
-
return
|
|
760
|
-
((
|
|
757
|
+
}, g = function(d) {
|
|
758
|
+
var p, C;
|
|
759
|
+
return de(
|
|
760
|
+
((C = (p = e.builderContext.content) == null ? void 0 : p.meta) == null ? void 0 : C.breakpoints) || {}
|
|
761
761
|
)[d].max;
|
|
762
762
|
}, f = function() {
|
|
763
763
|
return `
|
|
764
|
-
@media (max-width: ${
|
|
764
|
+
@media (max-width: ${g("medium")}px) {
|
|
765
765
|
.${e.builderBlock.id}-breakpoints {
|
|
766
766
|
flex-direction: var(--flex-dir-tablet);
|
|
767
767
|
align-items: stretch;
|
|
@@ -773,7 +773,7 @@ function vt(e) {
|
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
775
|
|
|
776
|
-
@media (max-width: ${
|
|
776
|
+
@media (max-width: ${g("small")}px) {
|
|
777
777
|
.${e.builderBlock.id}-breakpoints {
|
|
778
778
|
flex-direction: var(--flex-dir);
|
|
779
779
|
align-items: stretch;
|
|
@@ -786,16 +786,16 @@ function vt(e) {
|
|
|
786
786
|
},
|
|
787
787
|
`;
|
|
788
788
|
};
|
|
789
|
-
return /* @__PURE__ */
|
|
790
|
-
/* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ R(S, { children: [
|
|
790
|
+
/* @__PURE__ */ R(
|
|
791
791
|
"div",
|
|
792
792
|
{
|
|
793
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
793
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-1f78b21c`,
|
|
794
794
|
style: m(),
|
|
795
795
|
children: [
|
|
796
796
|
/* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: f() }) }),
|
|
797
797
|
(h = e.columns) == null ? void 0 : h.map((u, d) => /* @__PURE__ */ l(
|
|
798
|
-
|
|
798
|
+
We,
|
|
799
799
|
{
|
|
800
800
|
TagName: u.link ? e.builderLinkComponent || "a" : "div",
|
|
801
801
|
actionAttributes: {},
|
|
@@ -803,11 +803,11 @@ function vt(e) {
|
|
|
803
803
|
...u.link ? {
|
|
804
804
|
href: u.link
|
|
805
805
|
} : {},
|
|
806
|
-
[
|
|
807
|
-
style:
|
|
806
|
+
[D()]: "builder-column",
|
|
807
|
+
style: me(b(d))
|
|
808
808
|
},
|
|
809
809
|
children: /* @__PURE__ */ l(
|
|
810
|
-
|
|
810
|
+
H,
|
|
811
811
|
{
|
|
812
812
|
path: `component.options.columns.${d}.blocks`,
|
|
813
813
|
parent: e.builderBlock.id,
|
|
@@ -826,48 +826,48 @@ function vt(e) {
|
|
|
826
826
|
]
|
|
827
827
|
}
|
|
828
828
|
),
|
|
829
|
-
/* @__PURE__ */ l("style", { children: `.div-
|
|
829
|
+
/* @__PURE__ */ l("style", { children: `.div-1f78b21c {
|
|
830
830
|
display: flex;
|
|
831
831
|
line-height: normal;
|
|
832
832
|
}` })
|
|
833
833
|
] });
|
|
834
834
|
}
|
|
835
|
-
function
|
|
835
|
+
function J(e) {
|
|
836
836
|
return e.replace(/http(s)?:/, "");
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function St(e = "", t, n) {
|
|
839
839
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
|
|
840
840
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function kt(e, t) {
|
|
843
843
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
844
844
|
return e;
|
|
845
845
|
if (t === "master")
|
|
846
|
-
return
|
|
846
|
+
return J(e);
|
|
847
847
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
848
848
|
if (n) {
|
|
849
849
|
const o = e.split(n[0]), i = n[3], r = t.match("x") ? t : `${t}x`;
|
|
850
|
-
return
|
|
850
|
+
return J(`${o[0]}_${r}${i}`);
|
|
851
851
|
}
|
|
852
852
|
return null;
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function oo(e) {
|
|
855
855
|
if (!e)
|
|
856
856
|
return e;
|
|
857
857
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
858
858
|
if (e.match(/builder\.io/)) {
|
|
859
859
|
let n = e;
|
|
860
860
|
const o = Number(e.split("?width=")[1]);
|
|
861
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${
|
|
861
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${St(e, "width", i)} ${i}w`).concat([n]).join(", ");
|
|
862
862
|
}
|
|
863
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
863
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [kt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
864
864
|
}
|
|
865
|
-
const
|
|
865
|
+
const vt = (e) => {
|
|
866
866
|
if (e === "localhost" || e === "127.0.0.1")
|
|
867
867
|
return e;
|
|
868
868
|
const t = e.split(".");
|
|
869
869
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
870
|
-
},
|
|
870
|
+
}, fe = ({
|
|
871
871
|
name: e,
|
|
872
872
|
canTrack: t
|
|
873
873
|
}) => {
|
|
@@ -875,17 +875,17 @@ const wt = (e) => {
|
|
|
875
875
|
try {
|
|
876
876
|
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
877
877
|
} catch (o) {
|
|
878
|
-
|
|
878
|
+
x.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
879
879
|
return;
|
|
880
880
|
}
|
|
881
|
-
},
|
|
881
|
+
}, he = async (e) => fe(e), xt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(w).join("; "), Ct = [["secure", ""], ["SameSite", "None"]], wt = ({
|
|
882
882
|
name: e,
|
|
883
883
|
value: t,
|
|
884
884
|
expires: n
|
|
885
885
|
}) => {
|
|
886
|
-
const i = (k() ? location.protocol === "https:" : !0) ?
|
|
887
|
-
return
|
|
888
|
-
},
|
|
886
|
+
const i = (k() ? location.protocol === "https:" : !0) ? Ct : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", vt(window.location.hostname)], ...i];
|
|
887
|
+
return xt(a);
|
|
888
|
+
}, pe = async ({
|
|
889
889
|
name: e,
|
|
890
890
|
value: t,
|
|
891
891
|
expires: n,
|
|
@@ -894,33 +894,33 @@ const wt = (e) => {
|
|
|
894
894
|
try {
|
|
895
895
|
if (!o)
|
|
896
896
|
return;
|
|
897
|
-
const i =
|
|
897
|
+
const i = wt({
|
|
898
898
|
name: e,
|
|
899
899
|
value: t,
|
|
900
900
|
expires: n
|
|
901
901
|
});
|
|
902
902
|
document.cookie = i;
|
|
903
903
|
} catch (i) {
|
|
904
|
-
|
|
904
|
+
x.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
|
|
905
905
|
}
|
|
906
|
-
},
|
|
906
|
+
}, It = "builder.tests", K = (e) => `${It}.${e}`, Tt = ({
|
|
907
907
|
contentId: e
|
|
908
|
-
}) =>
|
|
908
|
+
}) => he({
|
|
909
909
|
name: K(e),
|
|
910
910
|
canTrack: !0
|
|
911
|
-
}),
|
|
911
|
+
}), Et = ({
|
|
912
912
|
contentId: e
|
|
913
|
-
}) =>
|
|
913
|
+
}) => fe({
|
|
914
914
|
name: K(e),
|
|
915
915
|
canTrack: !0
|
|
916
|
-
}),
|
|
916
|
+
}), Rt = ({
|
|
917
917
|
contentId: e,
|
|
918
918
|
value: t
|
|
919
|
-
}) =>
|
|
919
|
+
}) => pe({
|
|
920
920
|
name: K(e),
|
|
921
921
|
value: t,
|
|
922
922
|
canTrack: !0
|
|
923
|
-
}),
|
|
923
|
+
}), ge = (e) => w(e.id) && w(e.variations) && Object.keys(e.variations).length > 0, Pt = ({
|
|
924
924
|
id: e,
|
|
925
925
|
variations: t
|
|
926
926
|
}) => {
|
|
@@ -933,15 +933,15 @@ const wt = (e) => {
|
|
|
933
933
|
return r;
|
|
934
934
|
}
|
|
935
935
|
return e;
|
|
936
|
-
},
|
|
937
|
-
const t =
|
|
938
|
-
return
|
|
936
|
+
}, be = (e) => {
|
|
937
|
+
const t = Pt(e);
|
|
938
|
+
return Rt({
|
|
939
939
|
contentId: e.id,
|
|
940
940
|
value: t
|
|
941
941
|
}).catch((n) => {
|
|
942
|
-
|
|
942
|
+
x.error("could not store A/B test variation: ", n);
|
|
943
943
|
}), t;
|
|
944
|
-
},
|
|
944
|
+
}, ye = ({
|
|
945
945
|
item: e,
|
|
946
946
|
testGroupId: t
|
|
947
947
|
}) => {
|
|
@@ -955,7 +955,7 @@ const wt = (e) => {
|
|
|
955
955
|
testVariationId: n.id,
|
|
956
956
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
957
957
|
};
|
|
958
|
-
},
|
|
958
|
+
}, At = ({
|
|
959
959
|
item: e,
|
|
960
960
|
canTrack: t
|
|
961
961
|
}) => {
|
|
@@ -963,14 +963,14 @@ const wt = (e) => {
|
|
|
963
963
|
return e;
|
|
964
964
|
if (!e)
|
|
965
965
|
return;
|
|
966
|
-
if (!
|
|
966
|
+
if (!ge(e))
|
|
967
967
|
return e;
|
|
968
|
-
const n =
|
|
968
|
+
const n = Et({
|
|
969
969
|
contentId: e.id
|
|
970
|
-
}) ||
|
|
970
|
+
}) || be({
|
|
971
971
|
variations: e.variations,
|
|
972
972
|
id: e.id
|
|
973
|
-
}), o =
|
|
973
|
+
}), o = ye({
|
|
974
974
|
item: e,
|
|
975
975
|
testGroupId: n
|
|
976
976
|
});
|
|
@@ -978,18 +978,18 @@ const wt = (e) => {
|
|
|
978
978
|
...e,
|
|
979
979
|
...o
|
|
980
980
|
};
|
|
981
|
-
},
|
|
981
|
+
}, Bt = async ({
|
|
982
982
|
item: e,
|
|
983
983
|
canTrack: t
|
|
984
984
|
}) => {
|
|
985
|
-
if (!t || !
|
|
985
|
+
if (!t || !ge(e))
|
|
986
986
|
return e;
|
|
987
|
-
const o = await
|
|
987
|
+
const o = await Tt({
|
|
988
988
|
contentId: e.id
|
|
989
|
-
}) ||
|
|
989
|
+
}) || be({
|
|
990
990
|
variations: e.variations,
|
|
991
991
|
id: e.id
|
|
992
|
-
}), i =
|
|
992
|
+
}), i = ye({
|
|
993
993
|
item: e,
|
|
994
994
|
testGroupId: o
|
|
995
995
|
});
|
|
@@ -997,7 +997,7 @@ const wt = (e) => {
|
|
|
997
997
|
...e,
|
|
998
998
|
...i
|
|
999
999
|
};
|
|
1000
|
-
},
|
|
1000
|
+
}, L = (e) => w(e) ? e : !0, Vt = {
|
|
1001
1001
|
name: "Core:Button",
|
|
1002
1002
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1003
1003
|
defaultStyles: {
|
|
@@ -1030,7 +1030,7 @@ const wt = (e) => {
|
|
|
1030
1030
|
}],
|
|
1031
1031
|
static: !0,
|
|
1032
1032
|
noWrap: !0
|
|
1033
|
-
},
|
|
1033
|
+
}, Wt = {
|
|
1034
1034
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1035
1035
|
name: "Columns",
|
|
1036
1036
|
isRSC: !0,
|
|
@@ -1231,13 +1231,13 @@ const wt = (e) => {
|
|
|
1231
1231
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1232
1232
|
advanced: !0
|
|
1233
1233
|
}]
|
|
1234
|
-
},
|
|
1234
|
+
}, Ot = {
|
|
1235
1235
|
name: "Fragment",
|
|
1236
1236
|
static: !0,
|
|
1237
1237
|
hidden: !0,
|
|
1238
1238
|
canHaveChildren: !0,
|
|
1239
1239
|
noWrap: !0
|
|
1240
|
-
},
|
|
1240
|
+
}, $t = {
|
|
1241
1241
|
name: "Image",
|
|
1242
1242
|
static: !0,
|
|
1243
1243
|
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",
|
|
@@ -1259,14 +1259,14 @@ const wt = (e) => {
|
|
|
1259
1259
|
e.delete("srcset"), e.delete("noWebp");
|
|
1260
1260
|
function n(a, s = 6e4) {
|
|
1261
1261
|
return new Promise((c, m) => {
|
|
1262
|
-
const
|
|
1263
|
-
let
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
},
|
|
1262
|
+
const b = document.createElement("img");
|
|
1263
|
+
let g = !1;
|
|
1264
|
+
b.onload = () => {
|
|
1265
|
+
g = !0, c(b);
|
|
1266
|
+
}, b.addEventListener("error", (f) => {
|
|
1267
1267
|
console.warn("Image load failed", f.error), m(f.error);
|
|
1268
|
-
}),
|
|
1269
|
-
|
|
1268
|
+
}), b.src = a, setTimeout(() => {
|
|
1269
|
+
g || m(new Error("Image load timed out"));
|
|
1270
1270
|
}, s);
|
|
1271
1271
|
});
|
|
1272
1272
|
}
|
|
@@ -1337,7 +1337,7 @@ const wt = (e) => {
|
|
|
1337
1337
|
advanced: !0,
|
|
1338
1338
|
defaultValue: 0.7041
|
|
1339
1339
|
}]
|
|
1340
|
-
},
|
|
1340
|
+
}, Ft = {
|
|
1341
1341
|
name: "Core:Section",
|
|
1342
1342
|
static: !0,
|
|
1343
1343
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1376,7 +1376,7 @@ const wt = (e) => {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
}
|
|
1378
1378
|
}]
|
|
1379
|
-
},
|
|
1379
|
+
}, Nt = {
|
|
1380
1380
|
name: "Slot",
|
|
1381
1381
|
isRSC: !0,
|
|
1382
1382
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1390,7 +1390,7 @@ const wt = (e) => {
|
|
|
1390
1390
|
defaultValue: "children"
|
|
1391
1391
|
}]
|
|
1392
1392
|
};
|
|
1393
|
-
function
|
|
1393
|
+
function Lt(e) {
|
|
1394
1394
|
var t, n, o;
|
|
1395
1395
|
return /* @__PURE__ */ l(
|
|
1396
1396
|
"div",
|
|
@@ -1402,7 +1402,7 @@ function Dt(e) {
|
|
|
1402
1402
|
"builder-slot": e.name
|
|
1403
1403
|
},
|
|
1404
1404
|
children: /* @__PURE__ */ l(
|
|
1405
|
-
|
|
1405
|
+
H,
|
|
1406
1406
|
{
|
|
1407
1407
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
1408
1408
|
path: `symbol.data.${e.name}`,
|
|
@@ -1413,7 +1413,7 @@ function Dt(e) {
|
|
|
1413
1413
|
}
|
|
1414
1414
|
);
|
|
1415
1415
|
}
|
|
1416
|
-
const
|
|
1416
|
+
const Ut = {
|
|
1417
1417
|
name: "Symbol",
|
|
1418
1418
|
noWrap: !0,
|
|
1419
1419
|
static: !0,
|
|
@@ -1446,7 +1446,7 @@ const jt = {
|
|
|
1446
1446
|
hideFromUI: !0,
|
|
1447
1447
|
type: "boolean"
|
|
1448
1448
|
}]
|
|
1449
|
-
},
|
|
1449
|
+
}, _t = {
|
|
1450
1450
|
name: "Text",
|
|
1451
1451
|
static: !0,
|
|
1452
1452
|
isRSC: !0,
|
|
@@ -1465,7 +1465,7 @@ const jt = {
|
|
|
1465
1465
|
textAlign: "center"
|
|
1466
1466
|
}
|
|
1467
1467
|
};
|
|
1468
|
-
function
|
|
1468
|
+
function Dt(e) {
|
|
1469
1469
|
var t;
|
|
1470
1470
|
return /* @__PURE__ */ l(
|
|
1471
1471
|
"div",
|
|
@@ -1478,7 +1478,7 @@ function Ht(e) {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
);
|
|
1480
1480
|
}
|
|
1481
|
-
const
|
|
1481
|
+
const jt = {
|
|
1482
1482
|
name: "Custom Code",
|
|
1483
1483
|
static: !0,
|
|
1484
1484
|
requiredPermissions: ["editCode"],
|
|
@@ -1500,7 +1500,7 @@ const Kt = {
|
|
|
1500
1500
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1501
1501
|
advanced: !0
|
|
1502
1502
|
}]
|
|
1503
|
-
},
|
|
1503
|
+
}, Mt = {
|
|
1504
1504
|
name: "Embed",
|
|
1505
1505
|
static: !0,
|
|
1506
1506
|
inputs: [{
|
|
@@ -1525,7 +1525,7 @@ const Kt = {
|
|
|
1525
1525
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1526
1526
|
hideFromUI: !0
|
|
1527
1527
|
}]
|
|
1528
|
-
},
|
|
1528
|
+
}, Ht = ["text/javascript", "application/javascript", "application/ecmascript"], io = (e) => Ht.includes(e.type), Kt = {
|
|
1529
1529
|
// friendlyName?
|
|
1530
1530
|
name: "Raw:Img",
|
|
1531
1531
|
hideFromInsertMenu: !0,
|
|
@@ -1539,7 +1539,7 @@ const Kt = {
|
|
|
1539
1539
|
}],
|
|
1540
1540
|
noWrap: !0,
|
|
1541
1541
|
static: !0
|
|
1542
|
-
},
|
|
1542
|
+
}, zt = {
|
|
1543
1543
|
name: "Video",
|
|
1544
1544
|
canHaveChildren: !0,
|
|
1545
1545
|
defaultStyles: {
|
|
@@ -1620,58 +1620,58 @@ const Kt = {
|
|
|
1620
1620
|
defaultValue: !0,
|
|
1621
1621
|
advanced: !0
|
|
1622
1622
|
}]
|
|
1623
|
-
},
|
|
1624
|
-
component:
|
|
1623
|
+
}, qt = () => [{
|
|
1624
|
+
component: Oe,
|
|
1625
|
+
...jt
|
|
1626
|
+
}, {
|
|
1627
|
+
component: $e,
|
|
1628
|
+
...Mt
|
|
1629
|
+
}, {
|
|
1630
|
+
component: Fe,
|
|
1625
1631
|
...Kt
|
|
1626
1632
|
}, {
|
|
1627
|
-
component:
|
|
1633
|
+
component: Ne,
|
|
1628
1634
|
...zt
|
|
1635
|
+
}], Q = () => [{
|
|
1636
|
+
component: Le,
|
|
1637
|
+
...Vt
|
|
1629
1638
|
}, {
|
|
1630
|
-
component:
|
|
1631
|
-
...
|
|
1639
|
+
component: yt,
|
|
1640
|
+
...Wt
|
|
1632
1641
|
}, {
|
|
1633
|
-
component:
|
|
1634
|
-
...Jt
|
|
1635
|
-
}], X = () => [{
|
|
1636
|
-
component: je,
|
|
1642
|
+
component: Ue,
|
|
1637
1643
|
...Ot
|
|
1638
1644
|
}, {
|
|
1639
|
-
component:
|
|
1645
|
+
component: _e,
|
|
1646
|
+
...$t
|
|
1647
|
+
}, {
|
|
1648
|
+
component: De,
|
|
1640
1649
|
...Ft
|
|
1641
1650
|
}, {
|
|
1642
|
-
component:
|
|
1651
|
+
component: Lt,
|
|
1643
1652
|
...Nt
|
|
1644
1653
|
}, {
|
|
1645
|
-
component:
|
|
1646
|
-
...Lt
|
|
1647
|
-
}, {
|
|
1648
|
-
component: Ke,
|
|
1654
|
+
component: Yn,
|
|
1649
1655
|
...Ut
|
|
1650
1656
|
}, {
|
|
1651
1657
|
component: Dt,
|
|
1652
1658
|
..._t
|
|
1653
|
-
}, {
|
|
1654
|
-
component: Yn,
|
|
1655
|
-
...jt
|
|
1656
|
-
}, {
|
|
1657
|
-
component: Ht,
|
|
1658
|
-
...Mt
|
|
1659
|
-
}, ...Yt()], Z = [], ao = (e) => ({
|
|
1659
|
+
}, ...qt()], ro = (e) => ({
|
|
1660
1660
|
type: "builder.registerComponent",
|
|
1661
|
-
data:
|
|
1662
|
-
}),
|
|
1661
|
+
data: U(e)
|
|
1662
|
+
}), Gt = (e) => {
|
|
1663
1663
|
const t = e.toString().trim();
|
|
1664
1664
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
1665
|
-
},
|
|
1665
|
+
}, Yt = (e) => typeof e == "function" ? Gt(e) : W(e), U = ({
|
|
1666
1666
|
inputs: e,
|
|
1667
1667
|
...t
|
|
1668
1668
|
}) => ({
|
|
1669
1669
|
...W(t),
|
|
1670
1670
|
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
|
|
1671
1671
|
...o,
|
|
1672
|
-
[i]:
|
|
1672
|
+
[i]: Yt(r)
|
|
1673
1673
|
}), {}))
|
|
1674
|
-
}),
|
|
1674
|
+
}), Jt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1675
1675
|
function getAndSetVariantId() {
|
|
1676
1676
|
function setCookie(name, value, days) {
|
|
1677
1677
|
let expires = '';
|
|
@@ -1727,7 +1727,7 @@ const Kt = {
|
|
|
1727
1727
|
}).join('');
|
|
1728
1728
|
styleEl.innerHTML = newStyleStr;
|
|
1729
1729
|
}
|
|
1730
|
-
}`,
|
|
1730
|
+
}`, Qt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1731
1731
|
if (!navigator.cookieEnabled) {
|
|
1732
1732
|
return;
|
|
1733
1733
|
}
|
|
@@ -1761,26 +1761,26 @@ const Kt = {
|
|
|
1761
1761
|
thisScriptEl?.remove();
|
|
1762
1762
|
}
|
|
1763
1763
|
return;
|
|
1764
|
-
}`,
|
|
1764
|
+
}`, Se = "builderIoAbTest", ke = "builderIoRenderContent", A = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1765
1765
|
...t,
|
|
1766
1766
|
testVariationId: t.id,
|
|
1767
1767
|
id: e == null ? void 0 : e.id
|
|
1768
|
-
})),
|
|
1768
|
+
})), Xt = ({
|
|
1769
1769
|
canTrack: e,
|
|
1770
1770
|
content: t
|
|
1771
|
-
}) => !(!(
|
|
1772
|
-
window.${
|
|
1773
|
-
window.${
|
|
1774
|
-
`,
|
|
1775
|
-
window.${
|
|
1776
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1777
|
-
)`,
|
|
1771
|
+
}) => !(!(A(t).length > 0) || !e || k()), Zt = (e) => e === "react" || e === "reactNative", ve = Zt(T), en = () => `
|
|
1772
|
+
window.${Se} = ${Jt}
|
|
1773
|
+
window.${ke} = ${Qt}
|
|
1774
|
+
`, tn = (e, t) => `
|
|
1775
|
+
window.${Se}(
|
|
1776
|
+
"${t}",${JSON.stringify(e)}, ${ve}
|
|
1777
|
+
)`, nn = ({
|
|
1778
1778
|
contentId: e,
|
|
1779
1779
|
variationId: t
|
|
1780
|
-
}) => `window.${
|
|
1781
|
-
"${t}", "${e}", ${
|
|
1780
|
+
}) => `window.${ke}(
|
|
1781
|
+
"${t}", "${e}", ${ve}
|
|
1782
1782
|
)`;
|
|
1783
|
-
function
|
|
1783
|
+
function _(e) {
|
|
1784
1784
|
return /* @__PURE__ */ l(
|
|
1785
1785
|
"script",
|
|
1786
1786
|
{
|
|
@@ -1789,131 +1789,126 @@ function D(e) {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
);
|
|
1791
1791
|
}
|
|
1792
|
-
const
|
|
1792
|
+
const on = (e) => {
|
|
1793
1793
|
const t = e.get("preview"), n = e.get("overrides." + t);
|
|
1794
|
-
return n ||
|
|
1794
|
+
return n || x.warn("No previewed ID found in search params."), n;
|
|
1795
1795
|
};
|
|
1796
|
-
function
|
|
1797
|
-
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new
|
|
1796
|
+
function rn() {
|
|
1797
|
+
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Me({
|
|
1798
1798
|
max: 500,
|
|
1799
1799
|
// how long to live in ms
|
|
1800
1800
|
ttl: 1e3 * 60 * 5
|
|
1801
1801
|
}));
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1804
|
-
|
|
1805
|
-
const t =
|
|
1803
|
+
function an(e) {
|
|
1804
|
+
rn();
|
|
1805
|
+
const t = on(e);
|
|
1806
1806
|
return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function sn() {
|
|
1809
1809
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1810
1810
|
}
|
|
1811
|
-
function
|
|
1812
|
-
const e =
|
|
1811
|
+
function cn() {
|
|
1812
|
+
const e = sn().fetch;
|
|
1813
1813
|
if (typeof e > "u")
|
|
1814
1814
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
1815
1815
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
1816
1816
|
return e;
|
|
1817
1817
|
}
|
|
1818
|
-
const
|
|
1819
|
-
function
|
|
1818
|
+
const ln = cn();
|
|
1819
|
+
function B(e, t = null, n = ".") {
|
|
1820
1820
|
return Object.keys(e).reduce((o, i) => {
|
|
1821
1821
|
const r = e[i], a = [t, i].filter(Boolean).join(n);
|
|
1822
1822
|
return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
|
|
1823
1823
|
...o,
|
|
1824
|
-
...
|
|
1824
|
+
...B(r, a, n)
|
|
1825
1825
|
} : {
|
|
1826
1826
|
...o,
|
|
1827
1827
|
[a]: r
|
|
1828
1828
|
};
|
|
1829
1829
|
}, {});
|
|
1830
1830
|
}
|
|
1831
|
-
const
|
|
1831
|
+
const dn = "v3", X = "builder.", un = "options.", mn = (e) => {
|
|
1832
1832
|
const t = {};
|
|
1833
1833
|
return e.forEach((n, o) => {
|
|
1834
1834
|
t[o] = n;
|
|
1835
1835
|
}), t;
|
|
1836
|
-
},
|
|
1836
|
+
}, xe = (e) => {
|
|
1837
1837
|
if (!e)
|
|
1838
1838
|
return {};
|
|
1839
|
-
const t =
|
|
1839
|
+
const t = Ce(e), n = {};
|
|
1840
1840
|
return Object.keys(t).forEach((o) => {
|
|
1841
|
-
if (o.startsWith(
|
|
1842
|
-
const i = o.replace(
|
|
1841
|
+
if (o.startsWith(X)) {
|
|
1842
|
+
const i = o.replace(X, "").replace(un, "");
|
|
1843
1843
|
n[i] = t[o];
|
|
1844
1844
|
}
|
|
1845
1845
|
}), n;
|
|
1846
|
-
},
|
|
1846
|
+
}, fn = () => {
|
|
1847
1847
|
if (!k())
|
|
1848
1848
|
return {};
|
|
1849
1849
|
const e = new URLSearchParams(window.location.search);
|
|
1850
|
-
return
|
|
1851
|
-
},
|
|
1852
|
-
let {
|
|
1853
|
-
noTraverse: t = !1
|
|
1854
|
-
} = e;
|
|
1850
|
+
return xe(e);
|
|
1851
|
+
}, Ce = (e) => e instanceof URLSearchParams ? mn(e) : e, Z = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
|
|
1855
1852
|
const {
|
|
1856
|
-
limit:
|
|
1857
|
-
userAttributes:
|
|
1858
|
-
query:
|
|
1859
|
-
model:
|
|
1860
|
-
apiKey:
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
includeUnpublished: x
|
|
1853
|
+
limit: t = 30,
|
|
1854
|
+
userAttributes: n,
|
|
1855
|
+
query: o,
|
|
1856
|
+
model: i,
|
|
1857
|
+
apiKey: r,
|
|
1858
|
+
enrich: a,
|
|
1859
|
+
locale: s,
|
|
1860
|
+
apiVersion: c = dn,
|
|
1861
|
+
fields: m,
|
|
1862
|
+
omit: b,
|
|
1863
|
+
offset: g,
|
|
1864
|
+
cacheSeconds: f,
|
|
1865
|
+
staleCacheSeconds: h,
|
|
1866
|
+
sort: u,
|
|
1867
|
+
includeUnpublished: d
|
|
1872
1868
|
} = e;
|
|
1873
|
-
if (!
|
|
1869
|
+
if (!r)
|
|
1874
1870
|
throw new Error("Missing API key");
|
|
1875
|
-
if (!["v3"].includes(
|
|
1876
|
-
throw new Error(`Invalid apiVersion: expected 'v3', received '${
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
sort: y
|
|
1871
|
+
if (!["v3"].includes(c))
|
|
1872
|
+
throw new Error(`Invalid apiVersion: expected 'v3', received '${c}'`);
|
|
1873
|
+
const y = t !== 1, p = new URL(`https://cdn.builder.io/api/${c}/content/${i}`);
|
|
1874
|
+
if (p.searchParams.set("apiKey", r), p.searchParams.set("limit", String(t)), p.searchParams.set("noTraverse", String(y)), p.searchParams.set("includeRefs", String(!0)), s && p.searchParams.set("locale", s), a && p.searchParams.set("enrich", String(a)), p.searchParams.set("omit", b || "meta.componentsUsed"), m && p.searchParams.set("fields", m), Number.isFinite(g) && g > -1 && p.searchParams.set("offset", String(Math.floor(g))), typeof d == "boolean" && p.searchParams.set("includeUnpublished", String(d)), f && Z(f) && p.searchParams.set("cacheSeconds", String(f)), h && Z(h) && p.searchParams.set("staleCacheSeconds", String(h)), u) {
|
|
1875
|
+
const v = B({
|
|
1876
|
+
sort: u
|
|
1882
1877
|
});
|
|
1883
|
-
for (const I in
|
|
1884
|
-
|
|
1878
|
+
for (const I in v)
|
|
1879
|
+
p.searchParams.set(I, JSON.stringify(v[I]));
|
|
1885
1880
|
}
|
|
1886
|
-
const
|
|
1887
|
-
...
|
|
1888
|
-
...
|
|
1889
|
-
}, E =
|
|
1890
|
-
for (const
|
|
1891
|
-
|
|
1892
|
-
if (
|
|
1893
|
-
const
|
|
1894
|
-
query:
|
|
1881
|
+
const C = {
|
|
1882
|
+
...fn(),
|
|
1883
|
+
...Ce(e.options || {})
|
|
1884
|
+
}, E = B(C);
|
|
1885
|
+
for (const v in E)
|
|
1886
|
+
p.searchParams.set(v, String(E[v]));
|
|
1887
|
+
if (n && p.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
1888
|
+
const v = B({
|
|
1889
|
+
query: o
|
|
1895
1890
|
});
|
|
1896
|
-
for (const I in
|
|
1897
|
-
|
|
1891
|
+
for (const I in v)
|
|
1892
|
+
p.searchParams.set(I, JSON.stringify(v[I]));
|
|
1898
1893
|
}
|
|
1899
|
-
return
|
|
1900
|
-
},
|
|
1901
|
-
async function
|
|
1902
|
-
const t = await
|
|
1894
|
+
return p;
|
|
1895
|
+
}, hn = (e) => "results" in e;
|
|
1896
|
+
async function we(e) {
|
|
1897
|
+
const t = await bn({
|
|
1903
1898
|
...e,
|
|
1904
1899
|
limit: 1
|
|
1905
1900
|
});
|
|
1906
1901
|
return t && t[0] || null;
|
|
1907
1902
|
}
|
|
1908
|
-
const
|
|
1903
|
+
const pn = async (e) => {
|
|
1909
1904
|
const t = z(e);
|
|
1910
|
-
return await (await
|
|
1911
|
-
},
|
|
1912
|
-
const o =
|
|
1905
|
+
return await (await ln(t.href)).json();
|
|
1906
|
+
}, gn = async (e, t, n = z(e)) => {
|
|
1907
|
+
const o = L(e.canTrack);
|
|
1913
1908
|
if (n.search.includes("preview=")) {
|
|
1914
1909
|
const r = [];
|
|
1915
1910
|
for (const a of t.results) {
|
|
1916
|
-
const s =
|
|
1911
|
+
const s = an(n.searchParams);
|
|
1917
1912
|
r.push(s || a);
|
|
1918
1913
|
}
|
|
1919
1914
|
t.results = r;
|
|
@@ -1923,114 +1918,113 @@ const so = q, yn = async (e) => {
|
|
|
1923
1918
|
try {
|
|
1924
1919
|
const r = [];
|
|
1925
1920
|
for (const a of t.results)
|
|
1926
|
-
r.push(await
|
|
1921
|
+
r.push(await Bt({
|
|
1927
1922
|
item: a,
|
|
1928
1923
|
canTrack: o
|
|
1929
1924
|
}));
|
|
1930
1925
|
t.results = r;
|
|
1931
1926
|
} catch (r) {
|
|
1932
|
-
|
|
1927
|
+
x.error("Could not process A/B tests. ", r);
|
|
1933
1928
|
}
|
|
1934
1929
|
return t.results;
|
|
1935
1930
|
};
|
|
1936
|
-
async function
|
|
1931
|
+
async function bn(e) {
|
|
1937
1932
|
try {
|
|
1938
|
-
const t = z(e), n = await
|
|
1939
|
-
return
|
|
1933
|
+
const t = z(e), n = await pn(e);
|
|
1934
|
+
return hn(n) ? gn(e, n) : (x.error("Error fetching data. ", {
|
|
1940
1935
|
url: t,
|
|
1941
1936
|
content: n,
|
|
1942
1937
|
options: e
|
|
1943
1938
|
}), null);
|
|
1944
1939
|
} catch (t) {
|
|
1945
|
-
return
|
|
1940
|
+
return x.error("Error fetching data. ", t), null;
|
|
1946
1941
|
}
|
|
1947
1942
|
}
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
return !k() || M() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
1943
|
+
function ao() {
|
|
1944
|
+
return !k() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
1951
1945
|
}
|
|
1952
|
-
function
|
|
1946
|
+
function yn() {
|
|
1953
1947
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1954
1948
|
const t = Math.random() * 16 | 0;
|
|
1955
1949
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1956
1950
|
});
|
|
1957
1951
|
}
|
|
1958
|
-
function
|
|
1959
|
-
return
|
|
1952
|
+
function Ie() {
|
|
1953
|
+
return yn().replace(/-/g, "");
|
|
1960
1954
|
}
|
|
1961
|
-
const
|
|
1955
|
+
const Te = "builderSessionId", Sn = async ({
|
|
1962
1956
|
canTrack: e
|
|
1963
1957
|
}) => {
|
|
1964
1958
|
if (!e)
|
|
1965
1959
|
return;
|
|
1966
|
-
const t = await
|
|
1967
|
-
name:
|
|
1960
|
+
const t = await he({
|
|
1961
|
+
name: Te,
|
|
1968
1962
|
canTrack: e
|
|
1969
1963
|
});
|
|
1970
1964
|
if (w(t))
|
|
1971
1965
|
return t;
|
|
1972
1966
|
{
|
|
1973
|
-
const n =
|
|
1974
|
-
return
|
|
1967
|
+
const n = kn();
|
|
1968
|
+
return vn({
|
|
1975
1969
|
id: n,
|
|
1976
1970
|
canTrack: e
|
|
1977
1971
|
}), n;
|
|
1978
1972
|
}
|
|
1979
|
-
},
|
|
1973
|
+
}, kn = () => Ie(), vn = ({
|
|
1980
1974
|
id: e,
|
|
1981
1975
|
canTrack: t
|
|
1982
|
-
}) =>
|
|
1983
|
-
name:
|
|
1976
|
+
}) => pe({
|
|
1977
|
+
name: Te,
|
|
1984
1978
|
value: e,
|
|
1985
1979
|
canTrack: t
|
|
1986
|
-
}),
|
|
1980
|
+
}), Ee = () => k() && typeof localStorage < "u" ? localStorage : void 0, xn = ({
|
|
1987
1981
|
key: e,
|
|
1988
1982
|
canTrack: t
|
|
1989
1983
|
}) => {
|
|
1990
1984
|
var n;
|
|
1991
1985
|
try {
|
|
1992
|
-
return t ? (n =
|
|
1986
|
+
return t ? (n = Ee()) == null ? void 0 : n.getItem(e) : void 0;
|
|
1993
1987
|
} catch (o) {
|
|
1994
1988
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1995
1989
|
return;
|
|
1996
1990
|
}
|
|
1997
|
-
},
|
|
1991
|
+
}, Cn = ({
|
|
1998
1992
|
key: e,
|
|
1999
1993
|
canTrack: t,
|
|
2000
1994
|
value: n
|
|
2001
1995
|
}) => {
|
|
2002
1996
|
var o;
|
|
2003
1997
|
try {
|
|
2004
|
-
t && ((o =
|
|
1998
|
+
t && ((o = Ee()) == null || o.setItem(e, n));
|
|
2005
1999
|
} catch (i) {
|
|
2006
2000
|
console.debug("[LocalStorage] SET error: ", i);
|
|
2007
2001
|
}
|
|
2008
|
-
},
|
|
2002
|
+
}, Re = "builderVisitorId", wn = ({
|
|
2009
2003
|
canTrack: e
|
|
2010
2004
|
}) => {
|
|
2011
2005
|
if (!e)
|
|
2012
2006
|
return;
|
|
2013
|
-
const t =
|
|
2014
|
-
key:
|
|
2007
|
+
const t = xn({
|
|
2008
|
+
key: Re,
|
|
2015
2009
|
canTrack: e
|
|
2016
2010
|
});
|
|
2017
2011
|
if (w(t))
|
|
2018
2012
|
return t;
|
|
2019
2013
|
{
|
|
2020
|
-
const n =
|
|
2021
|
-
return
|
|
2014
|
+
const n = In();
|
|
2015
|
+
return Tn({
|
|
2022
2016
|
id: n,
|
|
2023
2017
|
canTrack: e
|
|
2024
2018
|
}), n;
|
|
2025
2019
|
}
|
|
2026
|
-
},
|
|
2020
|
+
}, In = () => Ie(), Tn = ({
|
|
2027
2021
|
id: e,
|
|
2028
2022
|
canTrack: t
|
|
2029
|
-
}) =>
|
|
2030
|
-
key:
|
|
2023
|
+
}) => Cn({
|
|
2024
|
+
key: Re,
|
|
2031
2025
|
value: e,
|
|
2032
2026
|
canTrack: t
|
|
2033
|
-
}),
|
|
2027
|
+
}), En = async ({
|
|
2034
2028
|
canTrack: e
|
|
2035
2029
|
}) => {
|
|
2036
2030
|
if (!e)
|
|
@@ -2038,16 +2032,16 @@ const Re = "builderSessionId", vn = async ({
|
|
|
2038
2032
|
visitorId: void 0,
|
|
2039
2033
|
sessionId: void 0
|
|
2040
2034
|
};
|
|
2041
|
-
const t = await
|
|
2035
|
+
const t = await Sn({
|
|
2042
2036
|
canTrack: e
|
|
2043
|
-
}), n =
|
|
2037
|
+
}), n = wn({
|
|
2044
2038
|
canTrack: e
|
|
2045
2039
|
});
|
|
2046
2040
|
return {
|
|
2047
2041
|
sessionId: t,
|
|
2048
2042
|
visitorId: n
|
|
2049
2043
|
};
|
|
2050
|
-
},
|
|
2044
|
+
}, Rn = async ({
|
|
2051
2045
|
type: e,
|
|
2052
2046
|
canTrack: t,
|
|
2053
2047
|
apiKey: n,
|
|
@@ -2061,23 +2055,23 @@ const Re = "builderSessionId", vn = async ({
|
|
|
2061
2055
|
url: location.href,
|
|
2062
2056
|
...o
|
|
2063
2057
|
},
|
|
2064
|
-
...await
|
|
2058
|
+
...await En({
|
|
2065
2059
|
canTrack: t
|
|
2066
2060
|
}),
|
|
2067
|
-
userAttributes:
|
|
2061
|
+
userAttributes: se(),
|
|
2068
2062
|
ownerId: n
|
|
2069
2063
|
}
|
|
2070
2064
|
});
|
|
2071
|
-
async function
|
|
2065
|
+
async function Pn(e) {
|
|
2072
2066
|
if (!e.apiKey) {
|
|
2073
|
-
|
|
2067
|
+
x.error("Missing API key for track call. Please provide your API key.");
|
|
2074
2068
|
return;
|
|
2075
2069
|
}
|
|
2076
|
-
if (e.canTrack && !
|
|
2070
|
+
if (e.canTrack && !j() && (k() || T === "reactNative"))
|
|
2077
2071
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
2078
2072
|
method: "POST",
|
|
2079
2073
|
body: JSON.stringify({
|
|
2080
|
-
events: [await
|
|
2074
|
+
events: [await Rn(e)]
|
|
2081
2075
|
}),
|
|
2082
2076
|
headers: {
|
|
2083
2077
|
"content-type": "application/json"
|
|
@@ -2087,14 +2081,14 @@ async function Bn(e) {
|
|
|
2087
2081
|
console.error("Failed to track: ", t);
|
|
2088
2082
|
});
|
|
2089
2083
|
}
|
|
2090
|
-
const
|
|
2084
|
+
const so = (e) => Pn({
|
|
2091
2085
|
...e,
|
|
2092
2086
|
canTrack: !0
|
|
2093
2087
|
});
|
|
2094
|
-
function
|
|
2088
|
+
function ee(e) {
|
|
2095
2089
|
return Math.round(e * 1e3) / 1e3;
|
|
2096
2090
|
}
|
|
2097
|
-
const
|
|
2091
|
+
const An = (e, t, n = !0) => {
|
|
2098
2092
|
if (!(e instanceof HTMLElement))
|
|
2099
2093
|
return null;
|
|
2100
2094
|
let o = n ? e : e.parentElement;
|
|
@@ -2105,43 +2099,43 @@ const Vn = (e, t, n = !0) => {
|
|
|
2105
2099
|
return o;
|
|
2106
2100
|
} while (o = o.parentElement);
|
|
2107
2101
|
return null;
|
|
2108
|
-
},
|
|
2102
|
+
}, Bn = (e) => An(e, (t) => {
|
|
2109
2103
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2110
2104
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2111
|
-
}),
|
|
2105
|
+
}), te = ({
|
|
2112
2106
|
event: e,
|
|
2113
2107
|
target: t
|
|
2114
2108
|
}) => {
|
|
2115
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r =
|
|
2109
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ee(o / n.width), a = ee(i / n.height);
|
|
2116
2110
|
return {
|
|
2117
2111
|
x: r,
|
|
2118
2112
|
y: a
|
|
2119
2113
|
};
|
|
2120
|
-
},
|
|
2121
|
-
const t = e.target, n = t &&
|
|
2114
|
+
}, co = (e) => {
|
|
2115
|
+
const t = e.target, n = t && Bn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2122
2116
|
return {
|
|
2123
2117
|
targetBuilderElement: o || void 0,
|
|
2124
2118
|
metadata: {
|
|
2125
|
-
targetOffset: t ?
|
|
2119
|
+
targetOffset: t ? te({
|
|
2126
2120
|
event: e,
|
|
2127
2121
|
target: t
|
|
2128
2122
|
}) : void 0,
|
|
2129
|
-
builderTargetOffset: n ?
|
|
2123
|
+
builderTargetOffset: n ? te({
|
|
2130
2124
|
event: e,
|
|
2131
2125
|
target: n
|
|
2132
2126
|
}) : void 0,
|
|
2133
2127
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2134
2128
|
}
|
|
2135
2129
|
};
|
|
2136
|
-
},
|
|
2137
|
-
function
|
|
2130
|
+
}, Vn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
2131
|
+
function Pe(e, t) {
|
|
2138
2132
|
const n = new URL(t.origin), o = n.hostname;
|
|
2139
|
-
return (e ||
|
|
2133
|
+
return (e || Vn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
|
|
2140
2134
|
}
|
|
2141
|
-
const
|
|
2142
|
-
function
|
|
2143
|
-
let n =
|
|
2144
|
-
if (n || (n =
|
|
2135
|
+
const Wn = "0.14.1", ne = {};
|
|
2136
|
+
function On(e, t) {
|
|
2137
|
+
let n = ne[e];
|
|
2138
|
+
if (n || (n = ne[e] = []), n.push(t), k()) {
|
|
2145
2139
|
const o = {
|
|
2146
2140
|
type: "builder.register",
|
|
2147
2141
|
data: {
|
|
@@ -2156,8 +2150,8 @@ function Fn(e, t) {
|
|
|
2156
2150
|
}
|
|
2157
2151
|
}
|
|
2158
2152
|
}
|
|
2159
|
-
const
|
|
2160
|
-
|
|
2153
|
+
const lo = () => {
|
|
2154
|
+
On("insertMenu", {
|
|
2161
2155
|
name: "_default",
|
|
2162
2156
|
default: !0,
|
|
2163
2157
|
items: [{
|
|
@@ -2179,14 +2173,14 @@ const fo = () => {
|
|
|
2179
2173
|
}]
|
|
2180
2174
|
});
|
|
2181
2175
|
};
|
|
2182
|
-
let
|
|
2183
|
-
const
|
|
2176
|
+
let oe = !1;
|
|
2177
|
+
const $n = (e = {}) => {
|
|
2184
2178
|
var t, n;
|
|
2185
|
-
|
|
2179
|
+
oe || (oe = !0, k() && ((t = window.parent) == null || t.postMessage({
|
|
2186
2180
|
type: "builder.sdkInfo",
|
|
2187
2181
|
data: {
|
|
2188
2182
|
target: T,
|
|
2189
|
-
version:
|
|
2183
|
+
version: Wn,
|
|
2190
2184
|
supportsPatchUpdates: !1,
|
|
2191
2185
|
// Supports builder-model="..." attribute which is needed to
|
|
2192
2186
|
// scope our '+ add block' button styling
|
|
@@ -2200,7 +2194,7 @@ const Nn = (e = {}) => {
|
|
|
2200
2194
|
}
|
|
2201
2195
|
}, "*"), window.addEventListener("message", (o) => {
|
|
2202
2196
|
var r, a;
|
|
2203
|
-
if (!
|
|
2197
|
+
if (!Pe(e.trustedHosts, o))
|
|
2204
2198
|
return;
|
|
2205
2199
|
const {
|
|
2206
2200
|
data: i
|
|
@@ -2208,10 +2202,10 @@ const Nn = (e = {}) => {
|
|
|
2208
2202
|
if (i != null && i.type)
|
|
2209
2203
|
switch (i.type) {
|
|
2210
2204
|
case "builder.evaluate": {
|
|
2211
|
-
const s = i.data.text, c = i.data.arguments || [], m = i.data.id,
|
|
2212
|
-
let
|
|
2205
|
+
const s = i.data.text, c = i.data.arguments || [], m = i.data.id, b = new Function(s);
|
|
2206
|
+
let g, f = null;
|
|
2213
2207
|
try {
|
|
2214
|
-
|
|
2208
|
+
g = b.apply(null, c);
|
|
2215
2209
|
} catch (h) {
|
|
2216
2210
|
f = h;
|
|
2217
2211
|
}
|
|
@@ -2221,7 +2215,7 @@ const Nn = (e = {}) => {
|
|
|
2221
2215
|
id: m,
|
|
2222
2216
|
error: f.message
|
|
2223
2217
|
}
|
|
2224
|
-
}, "*") :
|
|
2218
|
+
}, "*") : g && typeof g.then == "function" ? g.then((h) => {
|
|
2225
2219
|
var u;
|
|
2226
2220
|
(u = window.parent) == null || u.postMessage({
|
|
2227
2221
|
type: "builder.evaluateResult",
|
|
@@ -2233,7 +2227,7 @@ const Nn = (e = {}) => {
|
|
|
2233
2227
|
}).catch(console.error) : (a = window.parent) == null || a.postMessage({
|
|
2234
2228
|
type: "builder.evaluateResult",
|
|
2235
2229
|
data: {
|
|
2236
|
-
result:
|
|
2230
|
+
result: g,
|
|
2237
2231
|
id: m
|
|
2238
2232
|
}
|
|
2239
2233
|
}, "*");
|
|
@@ -2241,12 +2235,12 @@ const Nn = (e = {}) => {
|
|
|
2241
2235
|
}
|
|
2242
2236
|
}
|
|
2243
2237
|
})));
|
|
2244
|
-
},
|
|
2238
|
+
}, Fn = ({
|
|
2245
2239
|
model: e,
|
|
2246
2240
|
trustedHosts: t,
|
|
2247
2241
|
callbacks: n
|
|
2248
2242
|
}) => (o) => {
|
|
2249
|
-
if (!
|
|
2243
|
+
if (!Pe(t, o))
|
|
2250
2244
|
return;
|
|
2251
2245
|
const {
|
|
2252
2246
|
data: i
|
|
@@ -2267,12 +2261,12 @@ const Nn = (e = {}) => {
|
|
|
2267
2261
|
break;
|
|
2268
2262
|
}
|
|
2269
2263
|
}
|
|
2270
|
-
},
|
|
2264
|
+
}, uo = (e, t, n) => {
|
|
2271
2265
|
if (!k)
|
|
2272
|
-
return
|
|
2266
|
+
return x.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
2273
2267
|
};
|
|
2274
|
-
|
|
2275
|
-
const o =
|
|
2268
|
+
$n();
|
|
2269
|
+
const o = Fn({
|
|
2276
2270
|
callbacks: {
|
|
2277
2271
|
contentUpdate: t,
|
|
2278
2272
|
animation: () => {
|
|
@@ -2287,7 +2281,7 @@ const Nn = (e = {}) => {
|
|
|
2287
2281
|
window.removeEventListener("message", o);
|
|
2288
2282
|
};
|
|
2289
2283
|
};
|
|
2290
|
-
function
|
|
2284
|
+
function ie(e, ...t) {
|
|
2291
2285
|
const n = Object(e);
|
|
2292
2286
|
for (let o = 1; o < arguments.length; o++) {
|
|
2293
2287
|
const i = arguments[o];
|
|
@@ -2297,38 +2291,38 @@ function ae(e, ...t) {
|
|
|
2297
2291
|
}
|
|
2298
2292
|
return n;
|
|
2299
2293
|
}
|
|
2300
|
-
const
|
|
2301
|
-
function
|
|
2294
|
+
const Nn = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
|
|
2295
|
+
function Ln(e) {
|
|
2302
2296
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
2303
2297
|
}
|
|
2304
|
-
function
|
|
2305
|
-
const n =
|
|
2298
|
+
function Un(e, t) {
|
|
2299
|
+
const n = _n(e), o = getComputedStyle(t), i = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, a = [i, r];
|
|
2306
2300
|
for (const s of a)
|
|
2307
2301
|
for (const c of n)
|
|
2308
2302
|
c in s || (s[c] = o[c]);
|
|
2309
2303
|
}
|
|
2310
|
-
function
|
|
2304
|
+
function _n(e) {
|
|
2311
2305
|
const t = [];
|
|
2312
2306
|
for (const n of e.steps)
|
|
2313
2307
|
for (const o in n.styles)
|
|
2314
2308
|
t.indexOf(o) === -1 && t.push(o);
|
|
2315
2309
|
return t;
|
|
2316
2310
|
}
|
|
2317
|
-
function
|
|
2311
|
+
function mo(e) {
|
|
2318
2312
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
2319
2313
|
if (!t.length) {
|
|
2320
|
-
|
|
2314
|
+
Ln(e.elementId || e.id || "");
|
|
2321
2315
|
return;
|
|
2322
2316
|
}
|
|
2323
2317
|
Array.from(t).forEach((n) => {
|
|
2324
|
-
|
|
2325
|
-
n.style.transition = `all ${e.duration}s ${
|
|
2318
|
+
Un(e, n), n.style.transition = "none", n.style.transitionDelay = "0", ie(n.style, e.steps[0].styles), setTimeout(() => {
|
|
2319
|
+
n.style.transition = `all ${e.duration}s ${Nn(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), ie(n.style, e.steps[1].styles), setTimeout(() => {
|
|
2326
2320
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
2327
2321
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
2328
2322
|
});
|
|
2329
2323
|
});
|
|
2330
2324
|
}
|
|
2331
|
-
const
|
|
2325
|
+
const Dn = (e) => {
|
|
2332
2326
|
var r;
|
|
2333
2327
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((r = e == null ? void 0 : e.files) == null ? void 0 : r.regular);
|
|
2334
2328
|
let i = "";
|
|
@@ -2354,22 +2348,22 @@ font-weight: ${a};
|
|
|
2354
2348
|
`.trim());
|
|
2355
2349
|
}
|
|
2356
2350
|
return i;
|
|
2357
|
-
},
|
|
2351
|
+
}, jn = ({
|
|
2358
2352
|
customFonts: e
|
|
2359
2353
|
}) => {
|
|
2360
2354
|
var t;
|
|
2361
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2362
|
-
},
|
|
2355
|
+
return ((t = e == null ? void 0 : e.map((n) => Dn(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2356
|
+
}, Mn = ({
|
|
2363
2357
|
cssCode: e,
|
|
2364
2358
|
contentId: t
|
|
2365
2359
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
2366
|
-
function
|
|
2360
|
+
function Hn(e) {
|
|
2367
2361
|
const t = `
|
|
2368
|
-
${
|
|
2362
|
+
${Mn({
|
|
2369
2363
|
cssCode: e.cssCode,
|
|
2370
2364
|
contentId: e.contentId
|
|
2371
2365
|
})}
|
|
2372
|
-
${
|
|
2366
|
+
${jn({
|
|
2373
2367
|
customFonts: e.customFonts
|
|
2374
2368
|
})}
|
|
2375
2369
|
|
|
@@ -2392,7 +2386,7 @@ ${Hn({
|
|
|
2392
2386
|
`.trim();
|
|
2393
2387
|
return /* @__PURE__ */ l(O, { styles: t });
|
|
2394
2388
|
}
|
|
2395
|
-
const
|
|
2389
|
+
const Kn = ({
|
|
2396
2390
|
content: e,
|
|
2397
2391
|
data: t,
|
|
2398
2392
|
locale: n
|
|
@@ -2409,7 +2403,7 @@ const qn = ({
|
|
|
2409
2403
|
locale: n
|
|
2410
2404
|
} : {}
|
|
2411
2405
|
};
|
|
2412
|
-
},
|
|
2406
|
+
}, zn = ({
|
|
2413
2407
|
content: e,
|
|
2414
2408
|
data: t
|
|
2415
2409
|
}) => e ? {
|
|
@@ -2420,38 +2414,32 @@ const qn = ({
|
|
|
2420
2414
|
},
|
|
2421
2415
|
meta: e == null ? void 0 : e.meta
|
|
2422
2416
|
} : void 0;
|
|
2423
|
-
function
|
|
2424
|
-
var i, r, a, s, c, m,
|
|
2425
|
-
const t =
|
|
2417
|
+
function re(e) {
|
|
2418
|
+
var i, r, a, s, c, m, b, g, f;
|
|
2419
|
+
const t = nn({
|
|
2426
2420
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2427
2421
|
variationId: (i = e.content) == null ? void 0 : i.testVariationId,
|
|
2428
2422
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2429
2423
|
contentId: (r = e.content) == null ? void 0 : r.id
|
|
2430
2424
|
}), n = [
|
|
2431
|
-
...
|
|
2432
|
-
// While this `components` object is deprecated, we must maintain support for it.
|
|
2433
|
-
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2434
|
-
// existing usage.
|
|
2435
|
-
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2436
|
-
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2437
|
-
...Z,
|
|
2425
|
+
...Q(),
|
|
2438
2426
|
...e.customComponents || []
|
|
2439
2427
|
].reduce(
|
|
2440
2428
|
(h, { component: u, ...d }) => ({
|
|
2441
2429
|
...h,
|
|
2442
2430
|
[d.name]: {
|
|
2443
2431
|
component: u,
|
|
2444
|
-
...
|
|
2432
|
+
...U(d)
|
|
2445
2433
|
}
|
|
2446
2434
|
}),
|
|
2447
2435
|
{}
|
|
2448
2436
|
), o = {
|
|
2449
|
-
content:
|
|
2437
|
+
content: zn({
|
|
2450
2438
|
content: e.content,
|
|
2451
2439
|
data: e.data
|
|
2452
2440
|
}),
|
|
2453
2441
|
localState: void 0,
|
|
2454
|
-
rootState:
|
|
2442
|
+
rootState: Kn({
|
|
2455
2443
|
content: e.content,
|
|
2456
2444
|
data: e.data,
|
|
2457
2445
|
locale: e.locale
|
|
@@ -2461,18 +2449,12 @@ function se(e) {
|
|
|
2461
2449
|
apiKey: e.apiKey,
|
|
2462
2450
|
apiVersion: e.apiVersion,
|
|
2463
2451
|
componentInfos: [
|
|
2464
|
-
...
|
|
2465
|
-
// While this `components` object is deprecated, we must maintain support for it.
|
|
2466
|
-
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2467
|
-
// existing usage.
|
|
2468
|
-
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2469
|
-
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2470
|
-
...Z,
|
|
2452
|
+
...Q(),
|
|
2471
2453
|
...e.customComponents || []
|
|
2472
2454
|
].reduce(
|
|
2473
2455
|
(h, { component: u, ...d }) => ({
|
|
2474
2456
|
...h,
|
|
2475
|
-
[d.name]:
|
|
2457
|
+
[d.name]: U(d)
|
|
2476
2458
|
}),
|
|
2477
2459
|
{}
|
|
2478
2460
|
),
|
|
@@ -2480,8 +2462,8 @@ function se(e) {
|
|
|
2480
2462
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
2481
2463
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
2482
2464
|
};
|
|
2483
|
-
return /* @__PURE__ */
|
|
2484
|
-
|
|
2465
|
+
return /* @__PURE__ */ R(
|
|
2466
|
+
je,
|
|
2485
2467
|
{
|
|
2486
2468
|
content: e.content,
|
|
2487
2469
|
data: e.data,
|
|
@@ -2490,7 +2472,6 @@ function se(e) {
|
|
|
2490
2472
|
apiKey: e.apiKey,
|
|
2491
2473
|
canTrack: e.canTrack,
|
|
2492
2474
|
locale: e.locale,
|
|
2493
|
-
includeRefs: e.includeRefs,
|
|
2494
2475
|
enrich: e.enrich,
|
|
2495
2476
|
showContent: e.showContent,
|
|
2496
2477
|
builderContextSignal: o,
|
|
@@ -2499,19 +2480,19 @@ function se(e) {
|
|
|
2499
2480
|
linkComponent: e.linkComponent,
|
|
2500
2481
|
trustedHosts: e.trustedHosts,
|
|
2501
2482
|
children: [
|
|
2502
|
-
e.isSsrAbTest ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
|
|
2483
|
+
e.isSsrAbTest ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(_, { scriptStr: t }) }) : null,
|
|
2503
2484
|
/* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
|
|
2504
|
-
|
|
2485
|
+
Hn,
|
|
2505
2486
|
{
|
|
2506
2487
|
contentId: (a = o.content) == null ? void 0 : a.id,
|
|
2507
2488
|
cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
|
|
2508
|
-
customFonts: (
|
|
2489
|
+
customFonts: (b = (m = o.content) == null ? void 0 : m.data) == null ? void 0 : b.customFonts
|
|
2509
2490
|
}
|
|
2510
2491
|
) }),
|
|
2511
2492
|
/* @__PURE__ */ l(
|
|
2512
|
-
|
|
2493
|
+
H,
|
|
2513
2494
|
{
|
|
2514
|
-
blocks: (f = (
|
|
2495
|
+
blocks: (f = (g = o.content) == null ? void 0 : g.data) == null ? void 0 : f.blocks,
|
|
2515
2496
|
context: o,
|
|
2516
2497
|
registeredComponents: n,
|
|
2517
2498
|
linkComponent: e.linkComponent
|
|
@@ -2521,35 +2502,35 @@ function se(e) {
|
|
|
2521
2502
|
}
|
|
2522
2503
|
);
|
|
2523
2504
|
}
|
|
2524
|
-
function
|
|
2505
|
+
function qn(e) {
|
|
2525
2506
|
var r, a;
|
|
2526
|
-
const t =
|
|
2527
|
-
canTrack:
|
|
2507
|
+
const t = Xt({
|
|
2508
|
+
canTrack: L(e.canTrack),
|
|
2528
2509
|
content: e.content
|
|
2529
2510
|
}), n = function() {
|
|
2530
2511
|
var c;
|
|
2531
|
-
return
|
|
2532
|
-
|
|
2512
|
+
return tn(
|
|
2513
|
+
A(e.content).map((m) => ({
|
|
2533
2514
|
id: m.testVariationId,
|
|
2534
2515
|
testRatio: m.testRatio
|
|
2535
2516
|
})),
|
|
2536
2517
|
((c = e.content) == null ? void 0 : c.id) || ""
|
|
2537
2518
|
);
|
|
2538
2519
|
}, o = function() {
|
|
2539
|
-
return
|
|
2520
|
+
return A(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
|
|
2540
2521
|
}, i = function() {
|
|
2541
2522
|
var c;
|
|
2542
2523
|
return t ? {
|
|
2543
2524
|
...e.content,
|
|
2544
2525
|
testVariationId: (c = e.content) == null ? void 0 : c.id
|
|
2545
|
-
} :
|
|
2526
|
+
} : At({
|
|
2546
2527
|
item: e.content,
|
|
2547
|
-
canTrack:
|
|
2528
|
+
canTrack: L(e.canTrack)
|
|
2548
2529
|
});
|
|
2549
2530
|
};
|
|
2550
|
-
return /* @__PURE__ */
|
|
2551
|
-
!e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
|
|
2552
|
-
t ? /* @__PURE__ */
|
|
2531
|
+
return /* @__PURE__ */ R(S, { children: [
|
|
2532
|
+
!e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(_, { scriptStr: en() }) }) : null,
|
|
2533
|
+
t ? /* @__PURE__ */ R(S, { children: [
|
|
2553
2534
|
/* @__PURE__ */ l(
|
|
2554
2535
|
O,
|
|
2555
2536
|
{
|
|
@@ -2557,9 +2538,9 @@ function Ve(e) {
|
|
|
2557
2538
|
styles: o()
|
|
2558
2539
|
}
|
|
2559
2540
|
),
|
|
2560
|
-
/* @__PURE__ */ l(
|
|
2561
|
-
(a =
|
|
2562
|
-
|
|
2541
|
+
/* @__PURE__ */ l(_, { scriptStr: n() }),
|
|
2542
|
+
(a = A(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
|
|
2543
|
+
re,
|
|
2563
2544
|
{
|
|
2564
2545
|
content: s,
|
|
2565
2546
|
showContent: !1,
|
|
@@ -2572,7 +2553,6 @@ function Ve(e) {
|
|
|
2572
2553
|
linkComponent: e.linkComponent,
|
|
2573
2554
|
canTrack: e.canTrack,
|
|
2574
2555
|
locale: e.locale,
|
|
2575
|
-
includeRefs: e.includeRefs,
|
|
2576
2556
|
enrich: e.enrich,
|
|
2577
2557
|
isSsrAbTest: t,
|
|
2578
2558
|
blocksWrapper: e.blocksWrapper,
|
|
@@ -2585,7 +2565,7 @@ function Ve(e) {
|
|
|
2585
2565
|
))
|
|
2586
2566
|
] }) : null,
|
|
2587
2567
|
/* @__PURE__ */ l(
|
|
2588
|
-
|
|
2568
|
+
re,
|
|
2589
2569
|
{
|
|
2590
2570
|
content: i(),
|
|
2591
2571
|
showContent: !0,
|
|
@@ -2598,7 +2578,6 @@ function Ve(e) {
|
|
|
2598
2578
|
linkComponent: e.linkComponent,
|
|
2599
2579
|
canTrack: e.canTrack,
|
|
2600
2580
|
locale: e.locale,
|
|
2601
|
-
includeRefs: e.includeRefs,
|
|
2602
2581
|
enrich: e.enrich,
|
|
2603
2582
|
isSsrAbTest: t,
|
|
2604
2583
|
blocksWrapper: e.blocksWrapper,
|
|
@@ -2610,13 +2589,13 @@ function Ve(e) {
|
|
|
2610
2589
|
)
|
|
2611
2590
|
] });
|
|
2612
2591
|
}
|
|
2613
|
-
const
|
|
2592
|
+
const Gn = async ({
|
|
2614
2593
|
builderContextValue: e,
|
|
2615
2594
|
symbol: t
|
|
2616
2595
|
}) => {
|
|
2617
2596
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
2618
2597
|
(e != null && e.apiKey))
|
|
2619
|
-
return
|
|
2598
|
+
return we({
|
|
2620
2599
|
model: t.model,
|
|
2621
2600
|
apiKey: e.apiKey,
|
|
2622
2601
|
apiVersion: e.apiVersion,
|
|
@@ -2626,25 +2605,25 @@ const Jn = async ({
|
|
|
2626
2605
|
}
|
|
2627
2606
|
}
|
|
2628
2607
|
}).catch((n) => {
|
|
2629
|
-
|
|
2608
|
+
x.error("Could not fetch symbol content: ", n);
|
|
2630
2609
|
});
|
|
2631
2610
|
};
|
|
2632
2611
|
async function Yn(e) {
|
|
2633
2612
|
var o, i, r, a, s;
|
|
2634
2613
|
const t = function() {
|
|
2635
|
-
var m,
|
|
2614
|
+
var m, b;
|
|
2636
2615
|
return [
|
|
2637
|
-
e.attributes[
|
|
2616
|
+
e.attributes[D()],
|
|
2638
2617
|
"builder-symbol",
|
|
2639
2618
|
(m = e.symbol) != null && m.inline ? "builder-inline-symbol" : void 0,
|
|
2640
|
-
(
|
|
2619
|
+
(b = e.symbol) != null && b.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2641
2620
|
].filter(Boolean).join(" ");
|
|
2642
|
-
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await
|
|
2621
|
+
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await Gn({
|
|
2643
2622
|
symbol: e.symbol,
|
|
2644
2623
|
builderContextValue: e.builderContext
|
|
2645
2624
|
});
|
|
2646
2625
|
return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2647
|
-
|
|
2626
|
+
qn,
|
|
2648
2627
|
{
|
|
2649
2628
|
__isNestedRender: !0,
|
|
2650
2629
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2665,18 +2644,18 @@ async function Yn(e) {
|
|
|
2665
2644
|
}
|
|
2666
2645
|
) });
|
|
2667
2646
|
}
|
|
2668
|
-
const
|
|
2669
|
-
function
|
|
2647
|
+
const ae = {};
|
|
2648
|
+
function fo(e) {
|
|
2670
2649
|
if (k()) {
|
|
2671
|
-
Object.assign(
|
|
2650
|
+
Object.assign(ae, e);
|
|
2672
2651
|
const t = {
|
|
2673
2652
|
type: "builder.settingsChange",
|
|
2674
|
-
data:
|
|
2653
|
+
data: ae
|
|
2675
2654
|
};
|
|
2676
2655
|
parent.postMessage(t, "*");
|
|
2677
2656
|
}
|
|
2678
2657
|
}
|
|
2679
|
-
const
|
|
2658
|
+
const ho = async (e) => {
|
|
2680
2659
|
var o, i, r;
|
|
2681
2660
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
|
|
2682
2661
|
...e,
|
|
@@ -2688,53 +2667,49 @@ const So = async (e) => {
|
|
|
2688
2667
|
urlPath: t
|
|
2689
2668
|
} : {}
|
|
2690
2669
|
},
|
|
2691
|
-
options:
|
|
2670
|
+
options: xe(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
|
|
2692
2671
|
};
|
|
2693
2672
|
return {
|
|
2694
2673
|
apiKey: n.apiKey,
|
|
2695
2674
|
model: n.model,
|
|
2696
|
-
content: await
|
|
2675
|
+
content: await we(n)
|
|
2697
2676
|
};
|
|
2698
2677
|
};
|
|
2699
2678
|
export {
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2679
|
+
so as A,
|
|
2680
|
+
H as B,
|
|
2681
|
+
qn as C,
|
|
2703
2682
|
uo as D,
|
|
2704
2683
|
ho as E,
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
Te as H,
|
|
2708
|
-
co as I,
|
|
2709
|
-
so as J,
|
|
2710
|
-
go as R,
|
|
2684
|
+
gn as F,
|
|
2685
|
+
bn as G,
|
|
2711
2686
|
Yn as S,
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2687
|
+
Dt as T,
|
|
2688
|
+
Pn as _,
|
|
2689
|
+
pt as a,
|
|
2690
|
+
no as b,
|
|
2691
|
+
j as c,
|
|
2692
|
+
oo as d,
|
|
2693
|
+
io as e,
|
|
2719
2694
|
k as f,
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2695
|
+
D as g,
|
|
2696
|
+
L as h,
|
|
2697
|
+
to as i,
|
|
2698
|
+
ao as j,
|
|
2699
|
+
Fn as k,
|
|
2700
|
+
x as l,
|
|
2701
|
+
M as m,
|
|
2702
|
+
co as n,
|
|
2728
2703
|
W as o,
|
|
2729
|
-
|
|
2730
|
-
q,
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2704
|
+
ro as p,
|
|
2705
|
+
we as q,
|
|
2706
|
+
lo as r,
|
|
2707
|
+
$n as s,
|
|
2708
|
+
mo as t,
|
|
2709
|
+
ln as u,
|
|
2710
|
+
rn as v,
|
|
2711
|
+
yt as w,
|
|
2712
|
+
On as x,
|
|
2713
|
+
fo as y,
|
|
2714
|
+
xe as z
|
|
2740
2715
|
};
|