@builder.io/sdk-react-nextjs 0.12.4 → 0.12.6
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-e6d429be.js → USE_CLIENT_BUNDLE-4d4e23b4.js} +3 -6
- package/lib/{node/USE_CLIENT_BUNDLE-ee5a9d6f.cjs → browser/USE_CLIENT_BUNDLE-e5d64246.cjs} +2 -2
- package/lib/{edge/USE_SERVER_BUNDLE-c0911af0.js → browser/USE_SERVER_BUNDLE-2bf0dc28.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-816ab6e4.cjs → browser/USE_SERVER_BUNDLE-ccca985e.cjs} +1 -1
- package/lib/browser/{bundle-0e5cec1c.cjs → bundle-6e21e129.cjs} +23 -23
- package/lib/browser/{bundle-bab67847.js → bundle-b3104268.js} +338 -310
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +3 -3
- package/lib/{node/USE_CLIENT_BUNDLE-75f921e2.js → edge/USE_CLIENT_BUNDLE-41ee32e4.js} +3 -6
- package/lib/{browser/USE_CLIENT_BUNDLE-e9e1ee85.cjs → edge/USE_CLIENT_BUNDLE-cc55e91d.cjs} +2 -2
- package/lib/{node/USE_SERVER_BUNDLE-793c12c9.cjs → edge/USE_SERVER_BUNDLE-19879780.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-86d90afe.js → edge/USE_SERVER_BUNDLE-fda604b6.js} +1 -1
- package/lib/edge/{bundle-28d9d04c.js → bundle-ee1ebe27.js} +762 -734
- package/lib/edge/{bundle-e64fe0fd.cjs → bundle-f2d4a6db.cjs} +32 -32
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +3 -3
- package/lib/{edge/USE_CLIENT_BUNDLE-d87c391a.cjs → node/USE_CLIENT_BUNDLE-343cb348.cjs} +2 -2
- package/lib/{edge/USE_CLIENT_BUNDLE-8d251b8b.js → node/USE_CLIENT_BUNDLE-aa8ab44a.js} +3 -6
- package/lib/{browser/USE_SERVER_BUNDLE-44c49b1e.js → node/USE_SERVER_BUNDLE-2fdc522e.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-9bcc0ad4.cjs → node/USE_SERVER_BUNDLE-cbcb1baf.cjs} +1 -1
- package/lib/node/{bundle-031e3608.js → bundle-99e5b33f.js} +38 -10
- package/lib/node/{bundle-72df28b3.cjs → bundle-c799b7fc.cjs} +5 -5
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/package.json +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/evaluate/browser-runtime/browser.d.ts +5 -1
- package/types/cjs/functions/evaluate/should-force-browser-runtime-in-node.d.ts +1 -0
- package/types/cjs/functions/is-node-runtime.d.ts +4 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/evaluate/browser-runtime/browser.d.ts +5 -1
- package/types/esm/functions/evaluate/should-force-browser-runtime-in-node.d.ts +1 -0
- package/types/esm/functions/is-node-runtime.d.ts +4 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LRUCache as
|
|
1
|
+
import { LRUCache as Ve } from "lru-cache";
|
|
2
2
|
import { jsx as l, Fragment as k, jsxs as R } from "react/jsx-runtime";
|
|
3
|
-
import { I as
|
|
3
|
+
import { I as Be, B as We, a as $e, D as Oe, b as Ne, C as Fe, E as Le, F as _e, c as Ue, d as De, S as Me, V as je, e as He } from "./USE_CLIENT_BUNDLE-4d4e23b4.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "next/navigation";
|
|
6
|
-
const
|
|
6
|
+
const Ke = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Gn = (e) => typeof e == "string" && Ke.has(e.toLowerCase()), I = "rsc", M = () => {
|
|
7
7
|
switch (I) {
|
|
8
8
|
case "react":
|
|
9
9
|
case "reactNative":
|
|
@@ -16,7 +16,7 @@ const He = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr",
|
|
|
16
16
|
return "class";
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
function
|
|
19
|
+
function ze(e) {
|
|
20
20
|
var t;
|
|
21
21
|
return {
|
|
22
22
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -36,20 +36,20 @@ const A = "[Builder.io]: ", x = {
|
|
|
36
36
|
function S() {
|
|
37
37
|
return typeof window < "u" && typeof document < "u";
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function qe() {
|
|
40
40
|
return S() && window.self !== window.top;
|
|
41
41
|
}
|
|
42
42
|
function j() {
|
|
43
|
-
return
|
|
43
|
+
return qe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const Ge = () => {
|
|
46
46
|
if (S()) {
|
|
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
|
+
}, Ye = () => typeof navigator == "object" && navigator.userAgent || "", ce = () => {
|
|
52
|
+
const e = Ye(), t = {
|
|
53
53
|
Android() {
|
|
54
54
|
return e.match(/Android/i);
|
|
55
55
|
},
|
|
@@ -68,13 +68,13 @@ const qe = () => {
|
|
|
68
68
|
any() {
|
|
69
69
|
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || I === "reactNative";
|
|
70
70
|
}
|
|
71
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
71
|
+
}, n = e.match(/Tablet|iPad/i), o = Ge();
|
|
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
|
+
}, Je = ({
|
|
78
78
|
builder: e,
|
|
79
79
|
context: t,
|
|
80
80
|
event: n,
|
|
@@ -86,12 +86,12 @@ const qe = () => {
|
|
|
86
86
|
builder: e,
|
|
87
87
|
context: t,
|
|
88
88
|
event: n
|
|
89
|
-
}),
|
|
89
|
+
}), Qe = () => ({
|
|
90
90
|
isEditing: j(),
|
|
91
91
|
isBrowser: S(),
|
|
92
92
|
isServer: !S(),
|
|
93
93
|
getUserAttributes: () => ce()
|
|
94
|
-
}),
|
|
94
|
+
}), Xe = (e, {
|
|
95
95
|
isExpression: t = !0
|
|
96
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, G = ({
|
|
97
97
|
code: e,
|
|
@@ -102,27 +102,55 @@ const qe = () => {
|
|
|
102
102
|
rootSetState: a,
|
|
103
103
|
rootState: r
|
|
104
104
|
}) => {
|
|
105
|
-
const s =
|
|
105
|
+
const s = Je({
|
|
106
106
|
builder: t,
|
|
107
107
|
context: n,
|
|
108
108
|
event: o,
|
|
109
|
-
state:
|
|
109
|
+
state: le({
|
|
110
|
+
rootState: r,
|
|
111
|
+
localState: i,
|
|
112
|
+
rootSetState: a
|
|
113
|
+
})
|
|
110
114
|
});
|
|
111
115
|
return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
|
|
112
116
|
};
|
|
113
|
-
function
|
|
114
|
-
|
|
115
|
-
|
|
117
|
+
function le({
|
|
118
|
+
rootState: e,
|
|
119
|
+
localState: t,
|
|
120
|
+
rootSetState: n
|
|
121
|
+
}) {
|
|
116
122
|
return new Proxy(e, {
|
|
117
|
-
get: (o, i) =>
|
|
123
|
+
get: (o, i) => {
|
|
124
|
+
if (t && i in t)
|
|
125
|
+
return t[i];
|
|
126
|
+
const a = o[i];
|
|
127
|
+
return typeof a == "object" ? le({
|
|
128
|
+
rootState: a,
|
|
129
|
+
localState: void 0,
|
|
130
|
+
rootSetState: n ? (r) => {
|
|
131
|
+
o[i] = r, n(o);
|
|
132
|
+
} : void 0
|
|
133
|
+
}) : a;
|
|
134
|
+
},
|
|
118
135
|
set: (o, i, a) => {
|
|
119
136
|
if (t && i in t)
|
|
120
137
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
121
|
-
return
|
|
138
|
+
return o[i] = a, n == null || n(o), !0;
|
|
122
139
|
}
|
|
123
140
|
});
|
|
124
141
|
}
|
|
125
|
-
const
|
|
142
|
+
const C = (e) => e != null;
|
|
143
|
+
function Ze() {
|
|
144
|
+
var e;
|
|
145
|
+
return typeof process < "u" && C((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
146
|
+
}
|
|
147
|
+
const et = () => {
|
|
148
|
+
var o;
|
|
149
|
+
if (!Ze())
|
|
150
|
+
return !1;
|
|
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 ? (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
|
+
}, tt = (e) => (S() || et(), G(e));
|
|
126
154
|
function H({
|
|
127
155
|
code: e,
|
|
128
156
|
context: t,
|
|
@@ -137,10 +165,10 @@ function H({
|
|
|
137
165
|
return;
|
|
138
166
|
}
|
|
139
167
|
const s = {
|
|
140
|
-
code:
|
|
168
|
+
code: Xe(e, {
|
|
141
169
|
isExpression: r
|
|
142
170
|
}),
|
|
143
|
-
builder:
|
|
171
|
+
builder: Qe(),
|
|
144
172
|
context: t,
|
|
145
173
|
event: a,
|
|
146
174
|
rootSetState: i,
|
|
@@ -148,7 +176,7 @@ function H({
|
|
|
148
176
|
localState: n
|
|
149
177
|
};
|
|
150
178
|
try {
|
|
151
|
-
return
|
|
179
|
+
return tt(s);
|
|
152
180
|
} catch (c) {
|
|
153
181
|
x.error("Failed code evaluation: " + c.message, {
|
|
154
182
|
code: e
|
|
@@ -156,13 +184,13 @@ function H({
|
|
|
156
184
|
return;
|
|
157
185
|
}
|
|
158
186
|
}
|
|
159
|
-
const $ = (e) => JSON.parse(JSON.stringify(e)),
|
|
187
|
+
const $ = (e) => JSON.parse(JSON.stringify(e)), nt = (e, t, n) => {
|
|
160
188
|
if (Object(e) !== e)
|
|
161
189
|
return e;
|
|
162
190
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
163
191
|
return o.slice(0, -1).reduce((i, a, r) => Object(i[a]) === i[a] ? i[a] : i[a] = Math.abs(Number(o[r + 1])) >> 0 === +o[r + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
164
192
|
};
|
|
165
|
-
const
|
|
193
|
+
const ot = ({
|
|
166
194
|
block: e,
|
|
167
195
|
context: t,
|
|
168
196
|
localState: n,
|
|
@@ -188,7 +216,7 @@ const tt = ({
|
|
|
188
216
|
rootSetState: i,
|
|
189
217
|
context: t
|
|
190
218
|
});
|
|
191
|
-
|
|
219
|
+
nt(r, s, m);
|
|
192
220
|
}
|
|
193
221
|
return r;
|
|
194
222
|
};
|
|
@@ -201,7 +229,7 @@ function W({
|
|
|
201
229
|
rootSetState: a
|
|
202
230
|
}) {
|
|
203
231
|
const r = e;
|
|
204
|
-
return n ?
|
|
232
|
+
return n ? ot({
|
|
205
233
|
block: r,
|
|
206
234
|
localState: o,
|
|
207
235
|
rootState: i,
|
|
@@ -209,7 +237,7 @@ function W({
|
|
|
209
237
|
context: t
|
|
210
238
|
}) : r;
|
|
211
239
|
}
|
|
212
|
-
const
|
|
240
|
+
const it = ({
|
|
213
241
|
block: e,
|
|
214
242
|
context: t,
|
|
215
243
|
registeredComponents: n
|
|
@@ -231,7 +259,7 @@ const nt = ({
|
|
|
231
259
|
console.warn(`
|
|
232
260
|
Could not find a registered component named "${o}".
|
|
233
261
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
234
|
-
},
|
|
262
|
+
}, at = ({
|
|
235
263
|
block: e,
|
|
236
264
|
context: t
|
|
237
265
|
}) => {
|
|
@@ -264,7 +292,7 @@ const nt = ({
|
|
|
264
292
|
},
|
|
265
293
|
block: o
|
|
266
294
|
}));
|
|
267
|
-
},
|
|
295
|
+
}, de = {
|
|
268
296
|
small: {
|
|
269
297
|
min: 320,
|
|
270
298
|
default: 321,
|
|
@@ -280,11 +308,11 @@ const nt = ({
|
|
|
280
308
|
default: 991,
|
|
281
309
|
max: 1200
|
|
282
310
|
}
|
|
283
|
-
}, Y = (e, t =
|
|
311
|
+
}, Y = (e, t = de) => `@media (max-width: ${t[e].max}px)`, ue = ({
|
|
284
312
|
small: e,
|
|
285
313
|
medium: t
|
|
286
314
|
}) => {
|
|
287
|
-
const n = $(
|
|
315
|
+
const n = $(de);
|
|
288
316
|
if (!e || !t)
|
|
289
317
|
return n;
|
|
290
318
|
const o = Math.floor(e / 2);
|
|
@@ -306,17 +334,17 @@ const nt = ({
|
|
|
306
334
|
min: a,
|
|
307
335
|
default: a + 1
|
|
308
336
|
}, n;
|
|
309
|
-
},
|
|
337
|
+
}, rt = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), me = (e) => Object.entries(e).map(([n, o]) => {
|
|
310
338
|
if (typeof o == "string")
|
|
311
|
-
return `${
|
|
312
|
-
}).filter(
|
|
313
|
-
`),
|
|
339
|
+
return `${rt(n)}: ${o};`;
|
|
340
|
+
}).filter(C), st = (e) => me(e).join(`
|
|
341
|
+
`), L = ({
|
|
314
342
|
mediaQuery: e,
|
|
315
343
|
className: t,
|
|
316
344
|
styles: n
|
|
317
345
|
}) => {
|
|
318
346
|
const o = `.${t} {
|
|
319
|
-
${
|
|
347
|
+
${st(n)}
|
|
320
348
|
}`;
|
|
321
349
|
return e ? `${e} {
|
|
322
350
|
${o}
|
|
@@ -325,7 +353,7 @@ const nt = ({
|
|
|
325
353
|
function O(e) {
|
|
326
354
|
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
327
355
|
}
|
|
328
|
-
function
|
|
356
|
+
function ct(e) {
|
|
329
357
|
const t = function() {
|
|
330
358
|
const i = W({
|
|
331
359
|
block: e.block,
|
|
@@ -335,7 +363,7 @@ function rt(e) {
|
|
|
335
363
|
context: e.context.context,
|
|
336
364
|
shouldEvaluateBindings: !0
|
|
337
365
|
});
|
|
338
|
-
return
|
|
366
|
+
return C(i.hide) ? !i.hide : C(i.show) ? i.show : !0;
|
|
339
367
|
}, n = function() {
|
|
340
368
|
var d;
|
|
341
369
|
const i = W({
|
|
@@ -345,22 +373,22 @@ function rt(e) {
|
|
|
345
373
|
rootSetState: e.context.rootSetState,
|
|
346
374
|
context: e.context.context,
|
|
347
375
|
shouldEvaluateBindings: !0
|
|
348
|
-
}), a = i.responsiveStyles, r = e.context.content, s =
|
|
376
|
+
}), a = i.responsiveStyles, r = e.context.content, s = ue(
|
|
349
377
|
((d = r == null ? void 0 : r.meta) == null ? void 0 : d.breakpoints) || {}
|
|
350
378
|
), c = a == null ? void 0 : a.large, m = a == null ? void 0 : a.medium, g = a == null ? void 0 : a.small, p = i.id;
|
|
351
379
|
if (!p)
|
|
352
380
|
return "";
|
|
353
|
-
const f = c ?
|
|
381
|
+
const f = c ? L({
|
|
354
382
|
className: p,
|
|
355
383
|
styles: c
|
|
356
|
-
}) : "", h = m ?
|
|
384
|
+
}) : "", h = m ? L({
|
|
357
385
|
className: p,
|
|
358
386
|
styles: m,
|
|
359
387
|
mediaQuery: Y(
|
|
360
388
|
"medium",
|
|
361
389
|
s
|
|
362
390
|
)
|
|
363
|
-
}) : "", u = g ?
|
|
391
|
+
}) : "", u = g ? L({
|
|
364
392
|
className: p,
|
|
365
393
|
styles: g,
|
|
366
394
|
mediaQuery: Y(
|
|
@@ -372,10 +400,10 @@ function rt(e) {
|
|
|
372
400
|
};
|
|
373
401
|
return /* @__PURE__ */ l(k, { children: n() && t() ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
|
|
374
402
|
}
|
|
375
|
-
function
|
|
403
|
+
function lt(e) {
|
|
376
404
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
377
405
|
}
|
|
378
|
-
const
|
|
406
|
+
const dt = (e) => `on${lt(e)}`, ut = (e, t) => (n) => H({
|
|
379
407
|
code: e,
|
|
380
408
|
context: t.context,
|
|
381
409
|
localState: t.localState,
|
|
@@ -384,13 +412,13 @@ const ct = (e) => `on${st(e)}`, lt = (e, t) => (n) => H({
|
|
|
384
412
|
event: n,
|
|
385
413
|
isExpression: !1
|
|
386
414
|
});
|
|
387
|
-
function
|
|
415
|
+
function Yn(e) {
|
|
388
416
|
const t = {}, n = e.block.actions ?? {};
|
|
389
417
|
for (const o in n) {
|
|
390
418
|
if (!n.hasOwnProperty(o))
|
|
391
419
|
continue;
|
|
392
420
|
const i = n[o];
|
|
393
|
-
let a =
|
|
421
|
+
let a = dt(o);
|
|
394
422
|
if (e.stripPrefix)
|
|
395
423
|
switch (I) {
|
|
396
424
|
case "vue":
|
|
@@ -400,29 +428,29 @@ function qn(e) {
|
|
|
400
428
|
a = a.replace("on:", "");
|
|
401
429
|
break;
|
|
402
430
|
}
|
|
403
|
-
t[a] =
|
|
431
|
+
t[a] = ut(i, e);
|
|
404
432
|
}
|
|
405
433
|
return t;
|
|
406
434
|
}
|
|
407
|
-
function
|
|
435
|
+
function mt({
|
|
408
436
|
style: e
|
|
409
437
|
}) {
|
|
410
438
|
return e;
|
|
411
439
|
}
|
|
412
|
-
const
|
|
440
|
+
const ft = ({
|
|
413
441
|
block: e,
|
|
414
442
|
context: t
|
|
415
|
-
}) =>
|
|
443
|
+
}) => fe(mt({
|
|
416
444
|
style: e.style || {},
|
|
417
445
|
context: t,
|
|
418
446
|
block: e
|
|
419
447
|
}));
|
|
420
|
-
function
|
|
448
|
+
function fe(e) {
|
|
421
449
|
switch (I) {
|
|
422
450
|
case "svelte":
|
|
423
451
|
case "vue":
|
|
424
452
|
case "solid":
|
|
425
|
-
return
|
|
453
|
+
return me(e).join(" ");
|
|
426
454
|
case "qwik":
|
|
427
455
|
case "reactNative":
|
|
428
456
|
case "react":
|
|
@@ -430,36 +458,36 @@ function me(e) {
|
|
|
430
458
|
return e;
|
|
431
459
|
}
|
|
432
460
|
}
|
|
433
|
-
function
|
|
461
|
+
function ht({
|
|
434
462
|
properties: e
|
|
435
463
|
}) {
|
|
436
464
|
return e;
|
|
437
465
|
}
|
|
438
|
-
const
|
|
466
|
+
const pt = (e) => ({
|
|
439
467
|
href: e.href
|
|
440
468
|
});
|
|
441
|
-
function
|
|
469
|
+
function gt({
|
|
442
470
|
block: e,
|
|
443
471
|
context: t
|
|
444
472
|
}) {
|
|
445
473
|
var o;
|
|
446
474
|
const n = {
|
|
447
|
-
...
|
|
475
|
+
...pt(e),
|
|
448
476
|
...e.properties,
|
|
449
477
|
"builder-id": e.id,
|
|
450
|
-
style:
|
|
478
|
+
style: ft({
|
|
451
479
|
block: e,
|
|
452
480
|
context: t
|
|
453
481
|
}),
|
|
454
482
|
[M()]: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
|
|
455
483
|
};
|
|
456
|
-
return
|
|
484
|
+
return ht({
|
|
457
485
|
properties: n,
|
|
458
486
|
context: t,
|
|
459
487
|
block: e
|
|
460
488
|
});
|
|
461
489
|
}
|
|
462
|
-
const
|
|
490
|
+
const bt = ({
|
|
463
491
|
componentOptions: e,
|
|
464
492
|
builderBlock: t,
|
|
465
493
|
context: n,
|
|
@@ -475,7 +503,7 @@ const pt = ({
|
|
|
475
503
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
476
504
|
*/
|
|
477
505
|
...i ? {
|
|
478
|
-
attributes:
|
|
506
|
+
attributes: gt({
|
|
479
507
|
block: t,
|
|
480
508
|
context: r
|
|
481
509
|
})
|
|
@@ -491,11 +519,11 @@ const pt = ({
|
|
|
491
519
|
};
|
|
492
520
|
function J(e) {
|
|
493
521
|
var n;
|
|
494
|
-
const t = e.isInteractive ?
|
|
522
|
+
const t = e.isInteractive ? Be : e.componentRef;
|
|
495
523
|
return /* @__PURE__ */ l(k, { children: e.componentRef ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
|
|
496
524
|
t,
|
|
497
525
|
{
|
|
498
|
-
...
|
|
526
|
+
...bt({
|
|
499
527
|
componentOptions: e.componentOptions,
|
|
500
528
|
builderBlock: e.builderBlock,
|
|
501
529
|
context: e.context,
|
|
@@ -506,7 +534,7 @@ function J(e) {
|
|
|
506
534
|
contextValue: e.context
|
|
507
535
|
}),
|
|
508
536
|
children: (n = e.blockChildren) == null ? void 0 : n.map((o) => /* @__PURE__ */ l(
|
|
509
|
-
|
|
537
|
+
N,
|
|
510
538
|
{
|
|
511
539
|
block: o,
|
|
512
540
|
context: e.context,
|
|
@@ -518,10 +546,10 @@ function J(e) {
|
|
|
518
546
|
}
|
|
519
547
|
) }) : null });
|
|
520
548
|
}
|
|
521
|
-
function
|
|
549
|
+
function yt(e) {
|
|
522
550
|
const t = e.repeatContext;
|
|
523
551
|
return /* @__PURE__ */ l(
|
|
524
|
-
|
|
552
|
+
N,
|
|
525
553
|
{
|
|
526
554
|
block: e.block,
|
|
527
555
|
context: t,
|
|
@@ -530,16 +558,16 @@ function gt(e) {
|
|
|
530
558
|
}
|
|
531
559
|
);
|
|
532
560
|
}
|
|
533
|
-
function
|
|
561
|
+
function N(e) {
|
|
534
562
|
var m, g, p;
|
|
535
563
|
const t = function() {
|
|
536
|
-
return
|
|
564
|
+
return it({
|
|
537
565
|
block: e.block,
|
|
538
566
|
context: e.context,
|
|
539
567
|
registeredComponents: e.registeredComponents
|
|
540
568
|
});
|
|
541
569
|
}, n = function() {
|
|
542
|
-
return
|
|
570
|
+
return at({
|
|
543
571
|
block: e.block,
|
|
544
572
|
context: e.context
|
|
545
573
|
});
|
|
@@ -571,7 +599,7 @@ function F(e) {
|
|
|
571
599
|
blockChildren: o().children ?? [],
|
|
572
600
|
componentRef: (h = t()) == null ? void 0 : h.component,
|
|
573
601
|
componentOptions: {
|
|
574
|
-
...
|
|
602
|
+
...ze(o()),
|
|
575
603
|
builderContext: e.context,
|
|
576
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" ? {
|
|
577
605
|
builderLinkComponent: e.linkComponent
|
|
@@ -589,7 +617,7 @@ function F(e) {
|
|
|
589
617
|
};
|
|
590
618
|
}, c = e.context;
|
|
591
619
|
return /* @__PURE__ */ l(k, { children: a() ? /* @__PURE__ */ R(k, { children: [
|
|
592
|
-
/* @__PURE__ */ l(
|
|
620
|
+
/* @__PURE__ */ l(ct, { block: e.block, context: e.context }),
|
|
593
621
|
(m = t()) != null && m.noWrap ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
|
|
594
622
|
J,
|
|
595
623
|
{
|
|
@@ -604,7 +632,7 @@ function F(e) {
|
|
|
604
632
|
isInteractive: s().isInteractive
|
|
605
633
|
}
|
|
606
634
|
) }) : /* @__PURE__ */ l(k, { children: n() ? /* @__PURE__ */ l(k, { children: (p = n()) == null ? void 0 : p.map((f, h) => /* @__PURE__ */ l(
|
|
607
|
-
|
|
635
|
+
yt,
|
|
608
636
|
{
|
|
609
637
|
repeatContext: f.context,
|
|
610
638
|
block: f.block,
|
|
@@ -613,7 +641,7 @@ function F(e) {
|
|
|
613
641
|
},
|
|
614
642
|
h
|
|
615
643
|
)) }) : /* @__PURE__ */ l(k, { children: /* @__PURE__ */ R(
|
|
616
|
-
|
|
644
|
+
We,
|
|
617
645
|
{
|
|
618
646
|
Wrapper: i(),
|
|
619
647
|
block: o(),
|
|
@@ -635,7 +663,7 @@ function F(e) {
|
|
|
635
663
|
}
|
|
636
664
|
),
|
|
637
665
|
(g = r()) == null ? void 0 : g.map((f) => /* @__PURE__ */ l(
|
|
638
|
-
|
|
666
|
+
N,
|
|
639
667
|
{
|
|
640
668
|
block: f,
|
|
641
669
|
context: c,
|
|
@@ -649,10 +677,10 @@ function F(e) {
|
|
|
649
677
|
) }) })
|
|
650
678
|
] }) : null });
|
|
651
679
|
}
|
|
652
|
-
function
|
|
680
|
+
function F(e) {
|
|
653
681
|
var t, n, o;
|
|
654
682
|
return /* @__PURE__ */ l(
|
|
655
|
-
|
|
683
|
+
$e,
|
|
656
684
|
{
|
|
657
685
|
blocks: e.blocks,
|
|
658
686
|
parent: e.parent,
|
|
@@ -661,7 +689,7 @@ function L(e) {
|
|
|
661
689
|
BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
|
|
662
690
|
BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
|
|
663
691
|
children: e.blocks ? /* @__PURE__ */ l(k, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
|
|
664
|
-
|
|
692
|
+
N,
|
|
665
693
|
{
|
|
666
694
|
block: i,
|
|
667
695
|
linkComponent: e.linkComponent,
|
|
@@ -673,7 +701,7 @@ function L(e) {
|
|
|
673
701
|
}
|
|
674
702
|
);
|
|
675
703
|
}
|
|
676
|
-
function
|
|
704
|
+
function kt(e) {
|
|
677
705
|
var h;
|
|
678
706
|
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
|
|
679
707
|
var y;
|
|
@@ -728,7 +756,7 @@ function bt(e) {
|
|
|
728
756
|
};
|
|
729
757
|
}, p = function(d) {
|
|
730
758
|
var v, b;
|
|
731
|
-
return
|
|
759
|
+
return ue(
|
|
732
760
|
((b = (v = e.builderContext.content) == null ? void 0 : v.meta) == null ? void 0 : b.breakpoints) || {}
|
|
733
761
|
)[d].max;
|
|
734
762
|
}, f = function() {
|
|
@@ -767,7 +795,7 @@ function bt(e) {
|
|
|
767
795
|
children: [
|
|
768
796
|
/* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(O, { styles: f() }) }),
|
|
769
797
|
(h = e.columns) == null ? void 0 : h.map((u, d) => /* @__PURE__ */ l(
|
|
770
|
-
|
|
798
|
+
Oe,
|
|
771
799
|
{
|
|
772
800
|
TagName: u.link ? e.builderLinkComponent || "a" : "div",
|
|
773
801
|
actionAttributes: {},
|
|
@@ -776,10 +804,10 @@ function bt(e) {
|
|
|
776
804
|
href: u.link
|
|
777
805
|
} : {},
|
|
778
806
|
[M()]: "builder-column",
|
|
779
|
-
style:
|
|
807
|
+
style: fe(g(d))
|
|
780
808
|
},
|
|
781
809
|
children: /* @__PURE__ */ l(
|
|
782
|
-
|
|
810
|
+
F,
|
|
783
811
|
{
|
|
784
812
|
path: `component.options.columns.${d}.blocks`,
|
|
785
813
|
parent: e.builderBlock.id,
|
|
@@ -807,11 +835,11 @@ function bt(e) {
|
|
|
807
835
|
function Q(e) {
|
|
808
836
|
return e.replace(/http(s)?:/, "");
|
|
809
837
|
}
|
|
810
|
-
function
|
|
838
|
+
function St(e = "", t, n) {
|
|
811
839
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
|
|
812
840
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
|
|
813
841
|
}
|
|
814
|
-
function
|
|
842
|
+
function vt(e, t) {
|
|
815
843
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
816
844
|
return e;
|
|
817
845
|
if (t === "master")
|
|
@@ -823,23 +851,23 @@ function kt(e, t) {
|
|
|
823
851
|
}
|
|
824
852
|
return null;
|
|
825
853
|
}
|
|
826
|
-
function
|
|
854
|
+
function Jn(e) {
|
|
827
855
|
if (!e)
|
|
828
856
|
return e;
|
|
829
857
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
830
858
|
if (e.match(/builder\.io/)) {
|
|
831
859
|
let n = e;
|
|
832
860
|
const o = Number(e.split("?width=")[1]);
|
|
833
|
-
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(", ");
|
|
834
862
|
}
|
|
835
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
863
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [vt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
836
864
|
}
|
|
837
|
-
const
|
|
865
|
+
const xt = (e) => {
|
|
838
866
|
if (e === "localhost" || e === "127.0.0.1")
|
|
839
867
|
return e;
|
|
840
868
|
const t = e.split(".");
|
|
841
869
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
842
|
-
},
|
|
870
|
+
}, he = ({
|
|
843
871
|
name: e,
|
|
844
872
|
canTrack: t
|
|
845
873
|
}) => {
|
|
@@ -850,14 +878,14 @@ const St = (e) => {
|
|
|
850
878
|
x.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
851
879
|
return;
|
|
852
880
|
}
|
|
853
|
-
},
|
|
881
|
+
}, pe = async (e) => he(e), Ct = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(C).join("; "), wt = [["secure", ""], ["SameSite", "None"]], It = ({
|
|
854
882
|
name: e,
|
|
855
883
|
value: t,
|
|
856
884
|
expires: n
|
|
857
885
|
}) => {
|
|
858
|
-
const i = (S() ? location.protocol === "https:" : !0) ?
|
|
859
|
-
return
|
|
860
|
-
},
|
|
886
|
+
const i = (S() ? location.protocol === "https:" : !0) ? wt : [[]], a = n ? [["expires", n.toUTCString()]] : [[]], r = [[e, t], ...a, ["path", "/"], ["domain", xt(window.location.hostname)], ...i];
|
|
887
|
+
return Ct(r);
|
|
888
|
+
}, ge = async ({
|
|
861
889
|
name: e,
|
|
862
890
|
value: t,
|
|
863
891
|
expires: n,
|
|
@@ -866,7 +894,7 @@ const St = (e) => {
|
|
|
866
894
|
try {
|
|
867
895
|
if (!o)
|
|
868
896
|
return;
|
|
869
|
-
const i =
|
|
897
|
+
const i = It({
|
|
870
898
|
name: e,
|
|
871
899
|
value: t,
|
|
872
900
|
expires: n
|
|
@@ -875,24 +903,24 @@ const St = (e) => {
|
|
|
875
903
|
} catch (i) {
|
|
876
904
|
x.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
|
|
877
905
|
}
|
|
878
|
-
},
|
|
906
|
+
}, Tt = "builder.tests", K = (e) => `${Tt}.${e}`, Et = ({
|
|
879
907
|
contentId: e
|
|
880
|
-
}) =>
|
|
908
|
+
}) => pe({
|
|
881
909
|
name: K(e),
|
|
882
910
|
canTrack: !0
|
|
883
|
-
}),
|
|
911
|
+
}), Rt = ({
|
|
884
912
|
contentId: e
|
|
885
|
-
}) =>
|
|
913
|
+
}) => he({
|
|
886
914
|
name: K(e),
|
|
887
915
|
canTrack: !0
|
|
888
|
-
}),
|
|
916
|
+
}), Pt = ({
|
|
889
917
|
contentId: e,
|
|
890
918
|
value: t
|
|
891
|
-
}) =>
|
|
919
|
+
}) => ge({
|
|
892
920
|
name: K(e),
|
|
893
921
|
value: t,
|
|
894
922
|
canTrack: !0
|
|
895
|
-
}),
|
|
923
|
+
}), be = (e) => C(e.id) && C(e.variations) && Object.keys(e.variations).length > 0, At = ({
|
|
896
924
|
id: e,
|
|
897
925
|
variations: t
|
|
898
926
|
}) => {
|
|
@@ -905,15 +933,15 @@ const St = (e) => {
|
|
|
905
933
|
return a;
|
|
906
934
|
}
|
|
907
935
|
return e;
|
|
908
|
-
},
|
|
909
|
-
const t =
|
|
910
|
-
return
|
|
936
|
+
}, ye = (e) => {
|
|
937
|
+
const t = At(e);
|
|
938
|
+
return Pt({
|
|
911
939
|
contentId: e.id,
|
|
912
940
|
value: t
|
|
913
941
|
}).catch((n) => {
|
|
914
942
|
x.error("could not store A/B test variation: ", n);
|
|
915
943
|
}), t;
|
|
916
|
-
},
|
|
944
|
+
}, ke = ({
|
|
917
945
|
item: e,
|
|
918
946
|
testGroupId: t
|
|
919
947
|
}) => {
|
|
@@ -927,7 +955,7 @@ const St = (e) => {
|
|
|
927
955
|
testVariationId: n.id,
|
|
928
956
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
929
957
|
};
|
|
930
|
-
},
|
|
958
|
+
}, Vt = ({
|
|
931
959
|
item: e,
|
|
932
960
|
canTrack: t
|
|
933
961
|
}) => {
|
|
@@ -935,14 +963,14 @@ const St = (e) => {
|
|
|
935
963
|
return e;
|
|
936
964
|
if (!e)
|
|
937
965
|
return;
|
|
938
|
-
if (!
|
|
966
|
+
if (!be(e))
|
|
939
967
|
return e;
|
|
940
|
-
const n =
|
|
968
|
+
const n = Rt({
|
|
941
969
|
contentId: e.id
|
|
942
|
-
}) ||
|
|
970
|
+
}) || ye({
|
|
943
971
|
variations: e.variations,
|
|
944
972
|
id: e.id
|
|
945
|
-
}), o =
|
|
973
|
+
}), o = ke({
|
|
946
974
|
item: e,
|
|
947
975
|
testGroupId: n
|
|
948
976
|
});
|
|
@@ -950,18 +978,18 @@ const St = (e) => {
|
|
|
950
978
|
...e,
|
|
951
979
|
...o
|
|
952
980
|
};
|
|
953
|
-
},
|
|
981
|
+
}, Bt = async ({
|
|
954
982
|
item: e,
|
|
955
983
|
canTrack: t
|
|
956
984
|
}) => {
|
|
957
|
-
if (!t || !
|
|
985
|
+
if (!t || !be(e))
|
|
958
986
|
return e;
|
|
959
|
-
const o = await
|
|
987
|
+
const o = await Et({
|
|
960
988
|
contentId: e.id
|
|
961
|
-
}) ||
|
|
989
|
+
}) || ye({
|
|
962
990
|
variations: e.variations,
|
|
963
991
|
id: e.id
|
|
964
|
-
}), i =
|
|
992
|
+
}), i = ke({
|
|
965
993
|
item: e,
|
|
966
994
|
testGroupId: o
|
|
967
995
|
});
|
|
@@ -969,7 +997,7 @@ const St = (e) => {
|
|
|
969
997
|
...e,
|
|
970
998
|
...i
|
|
971
999
|
};
|
|
972
|
-
}, _ = (e) =>
|
|
1000
|
+
}, _ = (e) => C(e) ? e : !0, Wt = {
|
|
973
1001
|
name: "Core:Button",
|
|
974
1002
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
975
1003
|
defaultStyles: {
|
|
@@ -1002,7 +1030,7 @@ const St = (e) => {
|
|
|
1002
1030
|
}],
|
|
1003
1031
|
static: !0,
|
|
1004
1032
|
noWrap: !0
|
|
1005
|
-
},
|
|
1033
|
+
}, $t = {
|
|
1006
1034
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1007
1035
|
name: "Columns",
|
|
1008
1036
|
isRSC: !0,
|
|
@@ -1203,7 +1231,7 @@ const St = (e) => {
|
|
|
1203
1231
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1204
1232
|
advanced: !0
|
|
1205
1233
|
}]
|
|
1206
|
-
},
|
|
1234
|
+
}, Ot = {
|
|
1207
1235
|
name: "Custom Code",
|
|
1208
1236
|
static: !0,
|
|
1209
1237
|
requiredPermissions: ["editCode"],
|
|
@@ -1225,7 +1253,7 @@ const St = (e) => {
|
|
|
1225
1253
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1226
1254
|
advanced: !0
|
|
1227
1255
|
}]
|
|
1228
|
-
},
|
|
1256
|
+
}, Nt = {
|
|
1229
1257
|
name: "Embed",
|
|
1230
1258
|
static: !0,
|
|
1231
1259
|
inputs: [{
|
|
@@ -1250,13 +1278,13 @@ const St = (e) => {
|
|
|
1250
1278
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1251
1279
|
hideFromUI: !0
|
|
1252
1280
|
}]
|
|
1253
|
-
},
|
|
1281
|
+
}, Ft = ["text/javascript", "application/javascript", "application/ecmascript"], Qn = (e) => Ft.includes(e.type), Lt = {
|
|
1254
1282
|
name: "Fragment",
|
|
1255
1283
|
static: !0,
|
|
1256
1284
|
hidden: !0,
|
|
1257
1285
|
canHaveChildren: !0,
|
|
1258
1286
|
noWrap: !0
|
|
1259
|
-
},
|
|
1287
|
+
}, _t = {
|
|
1260
1288
|
name: "Image",
|
|
1261
1289
|
static: !0,
|
|
1262
1290
|
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",
|
|
@@ -1356,7 +1384,7 @@ const St = (e) => {
|
|
|
1356
1384
|
advanced: !0,
|
|
1357
1385
|
defaultValue: 0.7041
|
|
1358
1386
|
}]
|
|
1359
|
-
},
|
|
1387
|
+
}, Ut = {
|
|
1360
1388
|
// friendlyName?
|
|
1361
1389
|
name: "Raw:Img",
|
|
1362
1390
|
hideFromInsertMenu: !0,
|
|
@@ -1370,7 +1398,7 @@ const St = (e) => {
|
|
|
1370
1398
|
}],
|
|
1371
1399
|
noWrap: !0,
|
|
1372
1400
|
static: !0
|
|
1373
|
-
},
|
|
1401
|
+
}, Dt = {
|
|
1374
1402
|
name: "Core:Section",
|
|
1375
1403
|
static: !0,
|
|
1376
1404
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1409,7 +1437,7 @@ const St = (e) => {
|
|
|
1409
1437
|
}
|
|
1410
1438
|
}
|
|
1411
1439
|
}]
|
|
1412
|
-
},
|
|
1440
|
+
}, Mt = {
|
|
1413
1441
|
name: "Slot",
|
|
1414
1442
|
isRSC: !0,
|
|
1415
1443
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1423,7 +1451,7 @@ const St = (e) => {
|
|
|
1423
1451
|
defaultValue: "children"
|
|
1424
1452
|
}]
|
|
1425
1453
|
};
|
|
1426
|
-
function
|
|
1454
|
+
function jt(e) {
|
|
1427
1455
|
var t, n, o;
|
|
1428
1456
|
return /* @__PURE__ */ l(
|
|
1429
1457
|
"div",
|
|
@@ -1435,7 +1463,7 @@ function Dt(e) {
|
|
|
1435
1463
|
"builder-slot": e.name
|
|
1436
1464
|
},
|
|
1437
1465
|
children: /* @__PURE__ */ l(
|
|
1438
|
-
|
|
1466
|
+
F,
|
|
1439
1467
|
{
|
|
1440
1468
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
1441
1469
|
path: `symbol.data.${e.name}`,
|
|
@@ -1446,7 +1474,7 @@ function Dt(e) {
|
|
|
1446
1474
|
}
|
|
1447
1475
|
);
|
|
1448
1476
|
}
|
|
1449
|
-
const
|
|
1477
|
+
const Ht = {
|
|
1450
1478
|
name: "Symbol",
|
|
1451
1479
|
noWrap: !0,
|
|
1452
1480
|
static: !0,
|
|
@@ -1479,7 +1507,7 @@ const Mt = {
|
|
|
1479
1507
|
hideFromUI: !0,
|
|
1480
1508
|
type: "boolean"
|
|
1481
1509
|
}]
|
|
1482
|
-
},
|
|
1510
|
+
}, Kt = {
|
|
1483
1511
|
name: "Text",
|
|
1484
1512
|
static: !0,
|
|
1485
1513
|
isRSC: !0,
|
|
@@ -1498,7 +1526,7 @@ const Mt = {
|
|
|
1498
1526
|
textAlign: "center"
|
|
1499
1527
|
}
|
|
1500
1528
|
};
|
|
1501
|
-
function
|
|
1529
|
+
function zt(e) {
|
|
1502
1530
|
var t;
|
|
1503
1531
|
return /* @__PURE__ */ l(
|
|
1504
1532
|
"div",
|
|
@@ -1511,7 +1539,7 @@ function Ht(e) {
|
|
|
1511
1539
|
}
|
|
1512
1540
|
);
|
|
1513
1541
|
}
|
|
1514
|
-
const
|
|
1542
|
+
const qt = {
|
|
1515
1543
|
name: "Video",
|
|
1516
1544
|
canHaveChildren: !0,
|
|
1517
1545
|
defaultStyles: {
|
|
@@ -1593,57 +1621,57 @@ const Kt = {
|
|
|
1593
1621
|
advanced: !0
|
|
1594
1622
|
}]
|
|
1595
1623
|
}, X = () => [{
|
|
1596
|
-
component:
|
|
1597
|
-
...
|
|
1624
|
+
component: Ne,
|
|
1625
|
+
...Wt
|
|
1598
1626
|
}, {
|
|
1599
|
-
component:
|
|
1600
|
-
|
|
1627
|
+
component: kt,
|
|
1628
|
+
...$t
|
|
1601
1629
|
}, {
|
|
1602
1630
|
component: Fe,
|
|
1603
|
-
...
|
|
1631
|
+
...Ot
|
|
1604
1632
|
}, {
|
|
1605
1633
|
component: Le,
|
|
1606
|
-
|
|
1607
|
-
}, {
|
|
1608
|
-
component: Ne,
|
|
1609
|
-
...Ft
|
|
1634
|
+
...Nt
|
|
1610
1635
|
}, {
|
|
1611
1636
|
component: _e,
|
|
1612
1637
|
...Lt
|
|
1613
1638
|
}, {
|
|
1614
1639
|
component: Ue,
|
|
1615
|
-
...
|
|
1640
|
+
..._t
|
|
1616
1641
|
}, {
|
|
1617
1642
|
component: De,
|
|
1618
|
-
...
|
|
1643
|
+
...Ut
|
|
1619
1644
|
}, {
|
|
1620
|
-
component:
|
|
1621
|
-
...
|
|
1645
|
+
component: Me,
|
|
1646
|
+
...Dt
|
|
1622
1647
|
}, {
|
|
1623
|
-
component:
|
|
1624
|
-
...
|
|
1648
|
+
component: Mn,
|
|
1649
|
+
...Ht
|
|
1625
1650
|
}, {
|
|
1626
|
-
component:
|
|
1651
|
+
component: zt,
|
|
1627
1652
|
...Kt
|
|
1628
1653
|
}, {
|
|
1629
|
-
component:
|
|
1630
|
-
...
|
|
1631
|
-
}
|
|
1654
|
+
component: je,
|
|
1655
|
+
...qt
|
|
1656
|
+
}, {
|
|
1657
|
+
component: jt,
|
|
1658
|
+
...Mt
|
|
1659
|
+
}], Z = [], Xn = (e) => ({
|
|
1632
1660
|
type: "builder.registerComponent",
|
|
1633
1661
|
data: U(e)
|
|
1634
|
-
}),
|
|
1662
|
+
}), Gt = (e) => {
|
|
1635
1663
|
const t = e.toString().trim();
|
|
1636
1664
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
1637
|
-
},
|
|
1665
|
+
}, Yt = (e) => typeof e == "function" ? Gt(e) : $(e), U = ({
|
|
1638
1666
|
inputs: e,
|
|
1639
1667
|
...t
|
|
1640
1668
|
}) => ({
|
|
1641
1669
|
...$(t),
|
|
1642
1670
|
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, a]) => ({
|
|
1643
1671
|
...o,
|
|
1644
|
-
[i]:
|
|
1672
|
+
[i]: Yt(a)
|
|
1645
1673
|
}), {}))
|
|
1646
|
-
}),
|
|
1674
|
+
}), Jt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1647
1675
|
function getAndSetVariantId() {
|
|
1648
1676
|
function setCookie(name, value, days) {
|
|
1649
1677
|
let expires = '';
|
|
@@ -1699,7 +1727,7 @@ const Kt = {
|
|
|
1699
1727
|
}).join('');
|
|
1700
1728
|
styleEl.innerHTML = newStyleStr;
|
|
1701
1729
|
}
|
|
1702
|
-
}`,
|
|
1730
|
+
}`, Qt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1703
1731
|
if (!navigator.cookieEnabled) {
|
|
1704
1732
|
return;
|
|
1705
1733
|
}
|
|
@@ -1733,24 +1761,24 @@ const Kt = {
|
|
|
1733
1761
|
thisScriptEl?.remove();
|
|
1734
1762
|
}
|
|
1735
1763
|
return;
|
|
1736
|
-
}`,
|
|
1764
|
+
}`, Se = "builderIoAbTest", ve = "builderIoRenderContent", V = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1737
1765
|
...t,
|
|
1738
1766
|
testVariationId: t.id,
|
|
1739
1767
|
id: e == null ? void 0 : e.id
|
|
1740
|
-
})),
|
|
1768
|
+
})), Xt = ({
|
|
1741
1769
|
canTrack: e,
|
|
1742
1770
|
content: t
|
|
1743
|
-
}) => !(!(V(t).length > 0) || !e || S()),
|
|
1744
|
-
window.${
|
|
1745
|
-
window.${
|
|
1746
|
-
`,
|
|
1747
|
-
window.${
|
|
1748
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1749
|
-
)`,
|
|
1771
|
+
}) => !(!(V(t).length > 0) || !e || S()), Zt = (e) => e === "react" || e === "reactNative", xe = Zt(I), en = () => `
|
|
1772
|
+
window.${Se} = ${Jt}
|
|
1773
|
+
window.${ve} = ${Qt}
|
|
1774
|
+
`, tn = (e, t) => `
|
|
1775
|
+
window.${Se}(
|
|
1776
|
+
"${t}",${JSON.stringify(e)}, ${xe}
|
|
1777
|
+
)`, nn = ({
|
|
1750
1778
|
contentId: e,
|
|
1751
1779
|
variationId: t
|
|
1752
|
-
}) => `window.${
|
|
1753
|
-
"${t}", "${e}", ${
|
|
1780
|
+
}) => `window.${ve}(
|
|
1781
|
+
"${t}", "${e}", ${xe}
|
|
1754
1782
|
)`;
|
|
1755
1783
|
function D(e) {
|
|
1756
1784
|
return /* @__PURE__ */ l(
|
|
@@ -1761,33 +1789,33 @@ function D(e) {
|
|
|
1761
1789
|
}
|
|
1762
1790
|
);
|
|
1763
1791
|
}
|
|
1764
|
-
const
|
|
1792
|
+
const on = (e) => {
|
|
1765
1793
|
const t = e.get("preview"), n = e.get("overrides." + t);
|
|
1766
1794
|
return n || x.warn("No previewed ID found in search params."), n;
|
|
1767
1795
|
};
|
|
1768
|
-
function
|
|
1769
|
-
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new
|
|
1796
|
+
function an() {
|
|
1797
|
+
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Ve({
|
|
1770
1798
|
max: 500,
|
|
1771
1799
|
// how long to live in ms
|
|
1772
1800
|
ttl: 1e3 * 60 * 5
|
|
1773
1801
|
}));
|
|
1774
1802
|
}
|
|
1775
|
-
function
|
|
1776
|
-
|
|
1777
|
-
const t =
|
|
1803
|
+
function rn(e) {
|
|
1804
|
+
an();
|
|
1805
|
+
const t = on(e);
|
|
1778
1806
|
return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
|
|
1779
1807
|
}
|
|
1780
|
-
function
|
|
1808
|
+
function sn() {
|
|
1781
1809
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1782
1810
|
}
|
|
1783
|
-
function
|
|
1784
|
-
const e =
|
|
1811
|
+
function cn() {
|
|
1812
|
+
const e = sn().fetch;
|
|
1785
1813
|
if (typeof e > "u")
|
|
1786
1814
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
1787
1815
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
1788
1816
|
return e;
|
|
1789
1817
|
}
|
|
1790
|
-
const
|
|
1818
|
+
const ln = cn();
|
|
1791
1819
|
function B(e, t = null, n = ".") {
|
|
1792
1820
|
return Object.keys(e).reduce((o, i) => {
|
|
1793
1821
|
const a = e[i], r = [t, i].filter(Boolean).join(n);
|
|
@@ -1800,27 +1828,27 @@ function B(e, t = null, n = ".") {
|
|
|
1800
1828
|
};
|
|
1801
1829
|
}, {});
|
|
1802
1830
|
}
|
|
1803
|
-
const
|
|
1831
|
+
const dn = "v3", ee = "builder.", un = "options.", mn = (e) => {
|
|
1804
1832
|
const t = {};
|
|
1805
1833
|
return e.forEach((n, o) => {
|
|
1806
1834
|
t[o] = n;
|
|
1807
1835
|
}), t;
|
|
1808
|
-
},
|
|
1836
|
+
}, Ce = (e) => {
|
|
1809
1837
|
if (!e)
|
|
1810
1838
|
return {};
|
|
1811
|
-
const t =
|
|
1839
|
+
const t = we(e), n = {};
|
|
1812
1840
|
return Object.keys(t).forEach((o) => {
|
|
1813
1841
|
if (o.startsWith(ee)) {
|
|
1814
|
-
const i = o.replace(ee, "").replace(
|
|
1842
|
+
const i = o.replace(ee, "").replace(un, "");
|
|
1815
1843
|
n[i] = t[o];
|
|
1816
1844
|
}
|
|
1817
1845
|
}), n;
|
|
1818
|
-
},
|
|
1846
|
+
}, fn = () => {
|
|
1819
1847
|
if (!S())
|
|
1820
1848
|
return {};
|
|
1821
1849
|
const e = new URLSearchParams(window.location.search);
|
|
1822
|
-
return
|
|
1823
|
-
},
|
|
1850
|
+
return Ce(e);
|
|
1851
|
+
}, we = (e) => e instanceof URLSearchParams ? mn(e) : e, te = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
|
|
1824
1852
|
let {
|
|
1825
1853
|
noTraverse: t = !1
|
|
1826
1854
|
} = e;
|
|
@@ -1833,7 +1861,7 @@ const cn = "v3", ee = "builder.", ln = "options.", dn = (e) => {
|
|
|
1833
1861
|
includeRefs: s = !0,
|
|
1834
1862
|
enrich: c,
|
|
1835
1863
|
locale: m,
|
|
1836
|
-
apiVersion: g =
|
|
1864
|
+
apiVersion: g = dn,
|
|
1837
1865
|
fields: p,
|
|
1838
1866
|
omit: f,
|
|
1839
1867
|
offset: h,
|
|
@@ -1849,43 +1877,43 @@ const cn = "v3", ee = "builder.", ln = "options.", dn = (e) => {
|
|
|
1849
1877
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
1850
1878
|
const b = new URL(`https://cdn.builder.io/api/${g}/content/${a}?apiKey=${r}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m ? `&locale=${m}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
1851
1879
|
if (b.searchParams.set("omit", f || "meta.componentsUsed"), p && b.searchParams.set("fields", p), Number.isFinite(h) && h > -1 && b.searchParams.set("offset", String(Math.floor(h))), typeof v == "boolean" && b.searchParams.set("includeUnpublished", String(v)), u && te(u) && b.searchParams.set("cacheSeconds", String(u)), d && te(d) && b.searchParams.set("staleCacheSeconds", String(d)), y) {
|
|
1852
|
-
const
|
|
1880
|
+
const w = B({
|
|
1853
1881
|
sort: y
|
|
1854
1882
|
});
|
|
1855
|
-
for (const P in
|
|
1856
|
-
b.searchParams.set(P, JSON.stringify(
|
|
1883
|
+
for (const P in w)
|
|
1884
|
+
b.searchParams.set(P, JSON.stringify(w[P]));
|
|
1857
1885
|
}
|
|
1858
1886
|
const E = {
|
|
1859
|
-
...
|
|
1860
|
-
...
|
|
1887
|
+
...fn(),
|
|
1888
|
+
...we(e.options || {})
|
|
1861
1889
|
}, T = B(E);
|
|
1862
|
-
for (const
|
|
1863
|
-
b.searchParams.set(
|
|
1890
|
+
for (const w in T)
|
|
1891
|
+
b.searchParams.set(w, String(T[w]));
|
|
1864
1892
|
if (o && b.searchParams.set("userAttributes", JSON.stringify(o)), i) {
|
|
1865
|
-
const
|
|
1893
|
+
const w = B({
|
|
1866
1894
|
query: i
|
|
1867
1895
|
});
|
|
1868
|
-
for (const P in
|
|
1869
|
-
b.searchParams.set(P, JSON.stringify(
|
|
1896
|
+
for (const P in w)
|
|
1897
|
+
b.searchParams.set(P, JSON.stringify(w[P]));
|
|
1870
1898
|
}
|
|
1871
1899
|
return b;
|
|
1872
|
-
},
|
|
1900
|
+
}, hn = (e) => "results" in e;
|
|
1873
1901
|
async function q(e) {
|
|
1874
|
-
const t = await
|
|
1902
|
+
const t = await Ie({
|
|
1875
1903
|
...e,
|
|
1876
1904
|
limit: 1
|
|
1877
1905
|
});
|
|
1878
1906
|
return t && t[0] || null;
|
|
1879
1907
|
}
|
|
1880
|
-
const
|
|
1908
|
+
const Zn = q, pn = async (e) => {
|
|
1881
1909
|
const t = z(e);
|
|
1882
|
-
return await (await
|
|
1883
|
-
},
|
|
1910
|
+
return await (await ln(t.href)).json();
|
|
1911
|
+
}, gn = async (e, t, n = z(e)) => {
|
|
1884
1912
|
const o = _(e.canTrack);
|
|
1885
1913
|
if (n.search.includes("preview=")) {
|
|
1886
1914
|
const a = [];
|
|
1887
1915
|
for (const r of t.results) {
|
|
1888
|
-
const s =
|
|
1916
|
+
const s = rn(n.searchParams);
|
|
1889
1917
|
a.push(s || r);
|
|
1890
1918
|
}
|
|
1891
1919
|
t.results = a;
|
|
@@ -1895,7 +1923,7 @@ const Qn = q, fn = async (e) => {
|
|
|
1895
1923
|
try {
|
|
1896
1924
|
const a = [];
|
|
1897
1925
|
for (const r of t.results)
|
|
1898
|
-
a.push(await
|
|
1926
|
+
a.push(await Bt({
|
|
1899
1927
|
item: r,
|
|
1900
1928
|
canTrack: o
|
|
1901
1929
|
}));
|
|
@@ -1905,10 +1933,10 @@ const Qn = q, fn = async (e) => {
|
|
|
1905
1933
|
}
|
|
1906
1934
|
return t.results;
|
|
1907
1935
|
};
|
|
1908
|
-
async function
|
|
1936
|
+
async function Ie(e) {
|
|
1909
1937
|
try {
|
|
1910
|
-
const t = z(e), n = await
|
|
1911
|
-
return
|
|
1938
|
+
const t = z(e), n = await pn(e);
|
|
1939
|
+
return hn(n) ? gn(e, n) : (x.error("Error fetching data. ", {
|
|
1912
1940
|
url: t,
|
|
1913
1941
|
content: n,
|
|
1914
1942
|
options: e
|
|
@@ -1917,96 +1945,96 @@ async function we(e) {
|
|
|
1917
1945
|
return x.error("Error fetching data. ", t), null;
|
|
1918
1946
|
}
|
|
1919
1947
|
}
|
|
1920
|
-
const
|
|
1921
|
-
function
|
|
1948
|
+
const eo = Ie, bn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
1949
|
+
function yn(e, t) {
|
|
1922
1950
|
const n = new URL(t.origin), o = n.hostname;
|
|
1923
|
-
return (e ||
|
|
1951
|
+
return (e || bn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
|
|
1924
1952
|
}
|
|
1925
|
-
function
|
|
1953
|
+
function to() {
|
|
1926
1954
|
return !S() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
1927
1955
|
}
|
|
1928
|
-
function
|
|
1956
|
+
function kn() {
|
|
1929
1957
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1930
1958
|
const t = Math.random() * 16 | 0;
|
|
1931
1959
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1932
1960
|
});
|
|
1933
1961
|
}
|
|
1934
|
-
function
|
|
1935
|
-
return
|
|
1962
|
+
function Te() {
|
|
1963
|
+
return kn().replace(/-/g, "");
|
|
1936
1964
|
}
|
|
1937
|
-
const
|
|
1965
|
+
const Ee = "builderSessionId", Sn = async ({
|
|
1938
1966
|
canTrack: e
|
|
1939
1967
|
}) => {
|
|
1940
1968
|
if (!e)
|
|
1941
1969
|
return;
|
|
1942
|
-
const t = await
|
|
1943
|
-
name:
|
|
1970
|
+
const t = await pe({
|
|
1971
|
+
name: Ee,
|
|
1944
1972
|
canTrack: e
|
|
1945
1973
|
});
|
|
1946
|
-
if (
|
|
1974
|
+
if (C(t))
|
|
1947
1975
|
return t;
|
|
1948
1976
|
{
|
|
1949
|
-
const n =
|
|
1950
|
-
return
|
|
1977
|
+
const n = vn();
|
|
1978
|
+
return xn({
|
|
1951
1979
|
id: n,
|
|
1952
1980
|
canTrack: e
|
|
1953
1981
|
}), n;
|
|
1954
1982
|
}
|
|
1955
|
-
},
|
|
1983
|
+
}, vn = () => Te(), xn = ({
|
|
1956
1984
|
id: e,
|
|
1957
1985
|
canTrack: t
|
|
1958
|
-
}) =>
|
|
1959
|
-
name:
|
|
1986
|
+
}) => ge({
|
|
1987
|
+
name: Ee,
|
|
1960
1988
|
value: e,
|
|
1961
1989
|
canTrack: t
|
|
1962
|
-
}),
|
|
1990
|
+
}), Re = () => S() && typeof localStorage < "u" ? localStorage : void 0, Cn = ({
|
|
1963
1991
|
key: e,
|
|
1964
1992
|
canTrack: t
|
|
1965
1993
|
}) => {
|
|
1966
1994
|
var n;
|
|
1967
1995
|
try {
|
|
1968
|
-
return t ? (n =
|
|
1996
|
+
return t ? (n = Re()) == null ? void 0 : n.getItem(e) : void 0;
|
|
1969
1997
|
} catch (o) {
|
|
1970
1998
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1971
1999
|
return;
|
|
1972
2000
|
}
|
|
1973
|
-
},
|
|
2001
|
+
}, wn = ({
|
|
1974
2002
|
key: e,
|
|
1975
2003
|
canTrack: t,
|
|
1976
2004
|
value: n
|
|
1977
2005
|
}) => {
|
|
1978
2006
|
var o;
|
|
1979
2007
|
try {
|
|
1980
|
-
t && ((o =
|
|
2008
|
+
t && ((o = Re()) == null || o.setItem(e, n));
|
|
1981
2009
|
} catch (i) {
|
|
1982
2010
|
console.debug("[LocalStorage] SET error: ", i);
|
|
1983
2011
|
}
|
|
1984
|
-
},
|
|
2012
|
+
}, Pe = "builderVisitorId", In = ({
|
|
1985
2013
|
canTrack: e
|
|
1986
2014
|
}) => {
|
|
1987
2015
|
if (!e)
|
|
1988
2016
|
return;
|
|
1989
|
-
const t =
|
|
1990
|
-
key:
|
|
2017
|
+
const t = Cn({
|
|
2018
|
+
key: Pe,
|
|
1991
2019
|
canTrack: e
|
|
1992
2020
|
});
|
|
1993
|
-
if (
|
|
2021
|
+
if (C(t))
|
|
1994
2022
|
return t;
|
|
1995
2023
|
{
|
|
1996
|
-
const n =
|
|
1997
|
-
return
|
|
2024
|
+
const n = Tn();
|
|
2025
|
+
return En({
|
|
1998
2026
|
id: n,
|
|
1999
2027
|
canTrack: e
|
|
2000
2028
|
}), n;
|
|
2001
2029
|
}
|
|
2002
|
-
},
|
|
2030
|
+
}, Tn = () => Te(), En = ({
|
|
2003
2031
|
id: e,
|
|
2004
2032
|
canTrack: t
|
|
2005
|
-
}) =>
|
|
2006
|
-
key:
|
|
2033
|
+
}) => wn({
|
|
2034
|
+
key: Pe,
|
|
2007
2035
|
value: e,
|
|
2008
2036
|
canTrack: t
|
|
2009
|
-
}),
|
|
2037
|
+
}), Rn = async ({
|
|
2010
2038
|
canTrack: e
|
|
2011
2039
|
}) => {
|
|
2012
2040
|
if (!e)
|
|
@@ -2014,16 +2042,16 @@ const Te = "builderSessionId", yn = async ({
|
|
|
2014
2042
|
visitorId: void 0,
|
|
2015
2043
|
sessionId: void 0
|
|
2016
2044
|
};
|
|
2017
|
-
const t = await
|
|
2045
|
+
const t = await Sn({
|
|
2018
2046
|
canTrack: e
|
|
2019
|
-
}), n =
|
|
2047
|
+
}), n = In({
|
|
2020
2048
|
canTrack: e
|
|
2021
2049
|
});
|
|
2022
2050
|
return {
|
|
2023
2051
|
sessionId: t,
|
|
2024
2052
|
visitorId: n
|
|
2025
2053
|
};
|
|
2026
|
-
},
|
|
2054
|
+
}, Pn = async ({
|
|
2027
2055
|
type: e,
|
|
2028
2056
|
canTrack: t,
|
|
2029
2057
|
apiKey: n,
|
|
@@ -2037,14 +2065,14 @@ const Te = "builderSessionId", yn = async ({
|
|
|
2037
2065
|
url: location.href,
|
|
2038
2066
|
...o
|
|
2039
2067
|
},
|
|
2040
|
-
...await
|
|
2068
|
+
...await Rn({
|
|
2041
2069
|
canTrack: t
|
|
2042
2070
|
}),
|
|
2043
2071
|
userAttributes: ce(),
|
|
2044
2072
|
ownerId: n
|
|
2045
2073
|
}
|
|
2046
2074
|
});
|
|
2047
|
-
async function
|
|
2075
|
+
async function An(e) {
|
|
2048
2076
|
if (!e.apiKey) {
|
|
2049
2077
|
x.error("Missing API key for track call. Please provide your API key.");
|
|
2050
2078
|
return;
|
|
@@ -2053,7 +2081,7 @@ async function Rn(e) {
|
|
|
2053
2081
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
2054
2082
|
method: "POST",
|
|
2055
2083
|
body: JSON.stringify({
|
|
2056
|
-
events: [await
|
|
2084
|
+
events: [await Pn(e)]
|
|
2057
2085
|
}),
|
|
2058
2086
|
headers: {
|
|
2059
2087
|
"content-type": "application/json"
|
|
@@ -2063,14 +2091,14 @@ async function Rn(e) {
|
|
|
2063
2091
|
console.error("Failed to track: ", t);
|
|
2064
2092
|
});
|
|
2065
2093
|
}
|
|
2066
|
-
const
|
|
2094
|
+
const no = (e) => An({
|
|
2067
2095
|
...e,
|
|
2068
2096
|
canTrack: !0
|
|
2069
2097
|
});
|
|
2070
2098
|
function ne(e) {
|
|
2071
2099
|
return Math.round(e * 1e3) / 1e3;
|
|
2072
2100
|
}
|
|
2073
|
-
const
|
|
2101
|
+
const Vn = (e, t, n = !0) => {
|
|
2074
2102
|
if (!(e instanceof HTMLElement))
|
|
2075
2103
|
return null;
|
|
2076
2104
|
let o = n ? e : e.parentElement;
|
|
@@ -2081,7 +2109,7 @@ const Pn = (e, t, n = !0) => {
|
|
|
2081
2109
|
return o;
|
|
2082
2110
|
} while (o = o.parentElement);
|
|
2083
2111
|
return null;
|
|
2084
|
-
},
|
|
2112
|
+
}, Bn = (e) => Vn(e, (t) => {
|
|
2085
2113
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2086
2114
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2087
2115
|
}), oe = ({
|
|
@@ -2093,8 +2121,8 @@ const Pn = (e, t, n = !0) => {
|
|
|
2093
2121
|
x: a,
|
|
2094
2122
|
y: r
|
|
2095
2123
|
};
|
|
2096
|
-
},
|
|
2097
|
-
const t = e.target, n = t &&
|
|
2124
|
+
}, oo = (e) => {
|
|
2125
|
+
const t = e.target, n = t && Bn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2098
2126
|
return {
|
|
2099
2127
|
targetBuilderElement: o || void 0,
|
|
2100
2128
|
metadata: {
|
|
@@ -2109,8 +2137,8 @@ const Pn = (e, t, n = !0) => {
|
|
|
2109
2137
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2110
2138
|
}
|
|
2111
2139
|
};
|
|
2112
|
-
},
|
|
2113
|
-
function
|
|
2140
|
+
}, Wn = "0.12.6", ie = {};
|
|
2141
|
+
function $n(e, t) {
|
|
2114
2142
|
let n = ie[e];
|
|
2115
2143
|
if (n || (n = ie[e] = []), n.push(t), S()) {
|
|
2116
2144
|
const o = {
|
|
@@ -2127,8 +2155,8 @@ function Bn(e, t) {
|
|
|
2127
2155
|
}
|
|
2128
2156
|
}
|
|
2129
2157
|
}
|
|
2130
|
-
const
|
|
2131
|
-
|
|
2158
|
+
const io = () => {
|
|
2159
|
+
$n("insertMenu", {
|
|
2132
2160
|
name: "_default",
|
|
2133
2161
|
default: !0,
|
|
2134
2162
|
items: [{
|
|
@@ -2151,13 +2179,13 @@ const no = () => {
|
|
|
2151
2179
|
});
|
|
2152
2180
|
};
|
|
2153
2181
|
let ae = !1;
|
|
2154
|
-
const
|
|
2182
|
+
const ao = (e = {}) => {
|
|
2155
2183
|
var t, n;
|
|
2156
2184
|
ae || (ae = !0, S() && ((t = window.parent) == null || t.postMessage({
|
|
2157
2185
|
type: "builder.sdkInfo",
|
|
2158
2186
|
data: {
|
|
2159
2187
|
target: I,
|
|
2160
|
-
version:
|
|
2188
|
+
version: Wn,
|
|
2161
2189
|
supportsPatchUpdates: !1,
|
|
2162
2190
|
// Supports builder-model="..." attribute which is needed to
|
|
2163
2191
|
// scope our '+ add block' button styling
|
|
@@ -2171,7 +2199,7 @@ const oo = (e = {}) => {
|
|
|
2171
2199
|
}
|
|
2172
2200
|
}, "*"), window.addEventListener("message", (o) => {
|
|
2173
2201
|
var a, r;
|
|
2174
|
-
if (!
|
|
2202
|
+
if (!yn(e.trustedHosts, o))
|
|
2175
2203
|
return;
|
|
2176
2204
|
const {
|
|
2177
2205
|
data: i
|
|
@@ -2212,7 +2240,7 @@ const oo = (e = {}) => {
|
|
|
2212
2240
|
}
|
|
2213
2241
|
}
|
|
2214
2242
|
})));
|
|
2215
|
-
},
|
|
2243
|
+
}, On = (e) => {
|
|
2216
2244
|
var a;
|
|
2217
2245
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((a = e == null ? void 0 : e.files) == null ? void 0 : a.regular);
|
|
2218
2246
|
let i = "";
|
|
@@ -2238,22 +2266,22 @@ font-weight: ${r};
|
|
|
2238
2266
|
`.trim());
|
|
2239
2267
|
}
|
|
2240
2268
|
return i;
|
|
2241
|
-
},
|
|
2269
|
+
}, Nn = ({
|
|
2242
2270
|
customFonts: e
|
|
2243
2271
|
}) => {
|
|
2244
2272
|
var t;
|
|
2245
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2246
|
-
},
|
|
2273
|
+
return ((t = e == null ? void 0 : e.map((n) => On(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2274
|
+
}, Fn = ({
|
|
2247
2275
|
cssCode: e,
|
|
2248
2276
|
contentId: t
|
|
2249
2277
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
2250
|
-
function
|
|
2278
|
+
function Ln(e) {
|
|
2251
2279
|
const t = `
|
|
2252
|
-
${
|
|
2280
|
+
${Fn({
|
|
2253
2281
|
cssCode: e.cssCode,
|
|
2254
2282
|
contentId: e.contentId
|
|
2255
2283
|
})}
|
|
2256
|
-
${
|
|
2284
|
+
${Nn({
|
|
2257
2285
|
customFonts: e.customFonts
|
|
2258
2286
|
})}
|
|
2259
2287
|
|
|
@@ -2276,7 +2304,7 @@ ${$n({
|
|
|
2276
2304
|
`.trim();
|
|
2277
2305
|
return /* @__PURE__ */ l(O, { styles: t });
|
|
2278
2306
|
}
|
|
2279
|
-
const
|
|
2307
|
+
const _n = ({
|
|
2280
2308
|
content: e,
|
|
2281
2309
|
data: t,
|
|
2282
2310
|
locale: n
|
|
@@ -2293,7 +2321,7 @@ const Ln = ({
|
|
|
2293
2321
|
locale: n
|
|
2294
2322
|
} : {}
|
|
2295
2323
|
};
|
|
2296
|
-
},
|
|
2324
|
+
}, Un = ({
|
|
2297
2325
|
content: e,
|
|
2298
2326
|
data: t
|
|
2299
2327
|
}) => e ? {
|
|
@@ -2306,7 +2334,7 @@ const Ln = ({
|
|
|
2306
2334
|
} : void 0;
|
|
2307
2335
|
function re(e) {
|
|
2308
2336
|
var i, a, r, s, c, m, g, p, f;
|
|
2309
|
-
const t =
|
|
2337
|
+
const t = nn({
|
|
2310
2338
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2311
2339
|
variationId: (i = e.content) == null ? void 0 : i.testVariationId,
|
|
2312
2340
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
@@ -2330,12 +2358,12 @@ function re(e) {
|
|
|
2330
2358
|
}),
|
|
2331
2359
|
{}
|
|
2332
2360
|
), o = {
|
|
2333
|
-
content:
|
|
2361
|
+
content: Un({
|
|
2334
2362
|
content: e.content,
|
|
2335
2363
|
data: e.data
|
|
2336
2364
|
}),
|
|
2337
2365
|
localState: void 0,
|
|
2338
|
-
rootState:
|
|
2366
|
+
rootState: _n({
|
|
2339
2367
|
content: e.content,
|
|
2340
2368
|
data: e.data,
|
|
2341
2369
|
locale: e.locale
|
|
@@ -2365,7 +2393,7 @@ function re(e) {
|
|
|
2365
2393
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
2366
2394
|
};
|
|
2367
2395
|
return /* @__PURE__ */ R(
|
|
2368
|
-
|
|
2396
|
+
He,
|
|
2369
2397
|
{
|
|
2370
2398
|
content: e.content,
|
|
2371
2399
|
data: e.data,
|
|
@@ -2385,7 +2413,7 @@ function re(e) {
|
|
|
2385
2413
|
children: [
|
|
2386
2414
|
e.isSsrAbTest ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(D, { scriptStr: t }) }) : null,
|
|
2387
2415
|
/* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
|
|
2388
|
-
|
|
2416
|
+
Ln,
|
|
2389
2417
|
{
|
|
2390
2418
|
contentId: (r = o.content) == null ? void 0 : r.id,
|
|
2391
2419
|
cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
|
|
@@ -2393,7 +2421,7 @@ function re(e) {
|
|
|
2393
2421
|
}
|
|
2394
2422
|
) }),
|
|
2395
2423
|
/* @__PURE__ */ l(
|
|
2396
|
-
|
|
2424
|
+
F,
|
|
2397
2425
|
{
|
|
2398
2426
|
blocks: (f = (p = o.content) == null ? void 0 : p.data) == null ? void 0 : f.blocks,
|
|
2399
2427
|
context: o,
|
|
@@ -2405,14 +2433,14 @@ function re(e) {
|
|
|
2405
2433
|
}
|
|
2406
2434
|
);
|
|
2407
2435
|
}
|
|
2408
|
-
function
|
|
2436
|
+
function Ae(e) {
|
|
2409
2437
|
var a, r;
|
|
2410
|
-
const t =
|
|
2438
|
+
const t = Xt({
|
|
2411
2439
|
canTrack: _(e.canTrack),
|
|
2412
2440
|
content: e.content
|
|
2413
2441
|
}), n = function() {
|
|
2414
2442
|
var c;
|
|
2415
|
-
return
|
|
2443
|
+
return tn(
|
|
2416
2444
|
V(e.content).map((m) => ({
|
|
2417
2445
|
id: m.testVariationId,
|
|
2418
2446
|
testRatio: m.testRatio
|
|
@@ -2426,13 +2454,13 @@ function Pe(e) {
|
|
|
2426
2454
|
return t ? {
|
|
2427
2455
|
...e.content,
|
|
2428
2456
|
testVariationId: (c = e.content) == null ? void 0 : c.id
|
|
2429
|
-
} :
|
|
2457
|
+
} : Vt({
|
|
2430
2458
|
item: e.content,
|
|
2431
2459
|
canTrack: _(e.canTrack)
|
|
2432
2460
|
});
|
|
2433
2461
|
};
|
|
2434
2462
|
return /* @__PURE__ */ R(k, { children: [
|
|
2435
|
-
!e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(D, { scriptStr:
|
|
2463
|
+
!e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(D, { scriptStr: en() }) }) : null,
|
|
2436
2464
|
t ? /* @__PURE__ */ R(k, { children: [
|
|
2437
2465
|
/* @__PURE__ */ l(
|
|
2438
2466
|
O,
|
|
@@ -2494,7 +2522,7 @@ function Pe(e) {
|
|
|
2494
2522
|
)
|
|
2495
2523
|
] });
|
|
2496
2524
|
}
|
|
2497
|
-
const
|
|
2525
|
+
const Dn = async ({
|
|
2498
2526
|
builderContextValue: e,
|
|
2499
2527
|
symbol: t
|
|
2500
2528
|
}) => {
|
|
@@ -2513,7 +2541,7 @@ const _n = async ({
|
|
|
2513
2541
|
x.error("Could not fetch symbol content: ", n);
|
|
2514
2542
|
});
|
|
2515
2543
|
};
|
|
2516
|
-
async function
|
|
2544
|
+
async function Mn(e) {
|
|
2517
2545
|
var o, i, a, r, s;
|
|
2518
2546
|
const t = function() {
|
|
2519
2547
|
var m, g;
|
|
@@ -2523,12 +2551,12 @@ async function Un(e) {
|
|
|
2523
2551
|
(m = e.symbol) != null && m.inline ? "builder-inline-symbol" : void 0,
|
|
2524
2552
|
(g = e.symbol) != null && g.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2525
2553
|
].filter(Boolean).join(" ");
|
|
2526
|
-
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await
|
|
2554
|
+
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await Dn({
|
|
2527
2555
|
symbol: e.symbol,
|
|
2528
2556
|
builderContextValue: e.builderContext
|
|
2529
2557
|
});
|
|
2530
2558
|
return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2531
|
-
|
|
2559
|
+
Ae,
|
|
2532
2560
|
{
|
|
2533
2561
|
__isNestedRender: !0,
|
|
2534
2562
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2549,8 +2577,8 @@ async function Un(e) {
|
|
|
2549
2577
|
}
|
|
2550
2578
|
) });
|
|
2551
2579
|
}
|
|
2552
|
-
const
|
|
2553
|
-
function
|
|
2580
|
+
const ro = F, so = Ae, se = {};
|
|
2581
|
+
function co(e) {
|
|
2554
2582
|
if (S()) {
|
|
2555
2583
|
Object.assign(se, e);
|
|
2556
2584
|
const t = {
|
|
@@ -2560,7 +2588,7 @@ function ro(e) {
|
|
|
2560
2588
|
parent.postMessage(t, "*");
|
|
2561
2589
|
}
|
|
2562
2590
|
}
|
|
2563
|
-
const
|
|
2591
|
+
const lo = async (e) => {
|
|
2564
2592
|
var o, i, a;
|
|
2565
2593
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
|
|
2566
2594
|
...e,
|
|
@@ -2572,7 +2600,7 @@ const so = async (e) => {
|
|
|
2572
2600
|
urlPath: t
|
|
2573
2601
|
} : {}
|
|
2574
2602
|
},
|
|
2575
|
-
options:
|
|
2603
|
+
options: Ce(e.searchParams || ((a = e.url) == null ? void 0 : a.searchParams) || e.options)
|
|
2576
2604
|
};
|
|
2577
2605
|
return {
|
|
2578
2606
|
apiKey: n.apiKey,
|
|
@@ -2581,42 +2609,42 @@ const so = async (e) => {
|
|
|
2581
2609
|
};
|
|
2582
2610
|
};
|
|
2583
2611
|
export {
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2612
|
+
Ie as A,
|
|
2613
|
+
F as B,
|
|
2614
|
+
Ae as C,
|
|
2615
|
+
eo as D,
|
|
2616
|
+
Zn as E,
|
|
2617
|
+
Ce as F,
|
|
2618
|
+
no as G,
|
|
2619
|
+
lo as H,
|
|
2620
|
+
ro as R,
|
|
2621
|
+
Mn as S,
|
|
2622
|
+
zt as T,
|
|
2623
|
+
An as _,
|
|
2624
|
+
gt as a,
|
|
2625
|
+
Yn as b,
|
|
2598
2626
|
j as c,
|
|
2599
|
-
|
|
2600
|
-
|
|
2627
|
+
Jn as d,
|
|
2628
|
+
Qn as e,
|
|
2601
2629
|
S as f,
|
|
2602
2630
|
M as g,
|
|
2603
2631
|
_ as h,
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2632
|
+
Gn as i,
|
|
2633
|
+
to as j,
|
|
2634
|
+
yn as k,
|
|
2607
2635
|
x as l,
|
|
2608
2636
|
H as m,
|
|
2609
|
-
|
|
2637
|
+
oo as n,
|
|
2610
2638
|
$ as o,
|
|
2611
|
-
|
|
2639
|
+
Xn as p,
|
|
2612
2640
|
q,
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2641
|
+
io as r,
|
|
2642
|
+
ao as s,
|
|
2643
|
+
ln as t,
|
|
2644
|
+
an as u,
|
|
2645
|
+
so as v,
|
|
2646
|
+
kt as w,
|
|
2647
|
+
$n as x,
|
|
2648
|
+
co as y,
|
|
2649
|
+
gn as z
|
|
2622
2650
|
};
|