@builder.io/sdk-react-nextjs 0.8.0 → 0.9.0
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-bf9c49b7.cjs +23 -0
- package/lib/browser/{USE_CLIENT_BUNDLE-0f9e7207.js → USE_CLIENT_BUNDLE-dfea4654.js} +195 -189
- package/lib/{edge/USE_SERVER_BUNDLE-7c98af22.cjs → browser/USE_SERVER_BUNDLE-ad40cda1.cjs} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-f3c12c2d.js → browser/USE_SERVER_BUNDLE-b7c58bed.js} +1 -1
- package/lib/browser/{bundle-de4401ae.js → bundle-a454b553.js} +285 -265
- package/lib/browser/{bundle-241e4107.cjs → bundle-dc5a8b6f.cjs} +10 -10
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +3 -3
- package/lib/{node/USE_CLIENT_BUNDLE-d4e4bc2c.js → edge/USE_CLIENT_BUNDLE-ab37324a.js} +195 -189
- package/lib/edge/USE_CLIENT_BUNDLE-e6667575.cjs +23 -0
- package/lib/{node/USE_SERVER_BUNDLE-86ff2695.js → edge/USE_SERVER_BUNDLE-839ea6b2.js} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-872f0336.cjs → edge/USE_SERVER_BUNDLE-fce92ad5.cjs} +1 -1
- package/lib/edge/{bundle-a2f7cfad.cjs → bundle-af3f93cf.cjs} +30 -30
- package/lib/edge/{bundle-5c41e798.js → bundle-c0cd3b98.js} +1034 -1014
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +3 -3
- package/lib/node/USE_CLIENT_BUNDLE-ed964e93.cjs +23 -0
- package/lib/{edge/USE_CLIENT_BUNDLE-d5efb340.js → node/USE_CLIENT_BUNDLE-f9aeb249.js} +195 -189
- package/lib/{browser/USE_SERVER_BUNDLE-ec740144.js → node/USE_SERVER_BUNDLE-4a85453c.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-88edae72.cjs → node/USE_SERVER_BUNDLE-8da077cb.cjs} +1 -1
- package/lib/node/{bundle-5c833e3a.cjs → bundle-0a83b0be.cjs} +9 -9
- package/lib/node/{bundle-698e83e7.js → bundle-1b559f4d.js} +187 -166
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/package.json +1 -1
- package/types/cjs/components/blocks/blocks-wrapper.d.ts +8 -0
- package/types/cjs/components/blocks/blocks.d.ts +1 -1
- package/types/cjs/components/content/components/enable-editor.d.ts +1 -1
- package/types/cjs/components/content-variants/content-variants.types.d.ts +16 -0
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/context/types.d.ts +2 -1
- package/types/cjs/functions/transform-block-properties.d.ts +5 -1
- package/types/cjs/types/enforced-partials.d.ts +7 -2
- package/types/esm/components/blocks/blocks-wrapper.d.ts +8 -0
- package/types/esm/components/blocks/blocks.d.ts +1 -1
- package/types/esm/components/content/components/enable-editor.d.ts +1 -1
- package/types/esm/components/content-variants/content-variants.types.d.ts +16 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/context/types.d.ts +2 -1
- package/types/esm/functions/transform-block-properties.d.ts +5 -1
- package/types/esm/types/enforced-partials.d.ts +7 -2
- package/lib/browser/USE_CLIENT_BUNDLE-57361dc5.cjs +0 -23
- package/lib/edge/USE_CLIENT_BUNDLE-d32d9614.cjs +0 -23
- package/lib/node/USE_CLIENT_BUNDLE-38107a6a.cjs +0 -23
- package/types/cjs/functions/get-react-native-block-styles.d.ts +0 -7
- package/types/cjs/functions/sanitize-react-native-block-styles.d.ts +0 -3
- package/types/esm/functions/get-react-native-block-styles.d.ts +0 -7
- package/types/esm/functions/sanitize-react-native-block-styles.d.ts +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { LRUCache as
|
|
1
|
+
import { LRUCache as Ve } from "lru-cache";
|
|
2
2
|
import { jsx as l, Fragment as y, jsxs as w } from "react/jsx-runtime";
|
|
3
|
-
import { createElement as
|
|
4
|
-
import { I as
|
|
3
|
+
import { createElement as Be } from "react";
|
|
4
|
+
import { I as We, B as Y, a as $e, b as Oe, C as Fe, E as Ne, F as _e, c as Le, d as Ue, S as Me, V as De, e as je } from "./USE_CLIENT_BUNDLE-dfea4654.js";
|
|
5
5
|
import "next/navigation";
|
|
6
6
|
function Ke(e) {
|
|
7
7
|
var t;
|
|
@@ -14,11 +14,11 @@ function Ke(e) {
|
|
|
14
14
|
builderBlock: e
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
log: (...e) => console.log(
|
|
19
|
-
error: (...e) => console.error(
|
|
20
|
-
warn: (...e) => console.warn(
|
|
21
|
-
debug: (...e) => console.debug(
|
|
17
|
+
const A = "[Builder.io]: ", k = {
|
|
18
|
+
log: (...e) => console.log(A, ...e),
|
|
19
|
+
error: (...e) => console.error(A, ...e),
|
|
20
|
+
warn: (...e) => console.warn(A, ...e),
|
|
21
|
+
debug: (...e) => console.debug(A, ...e)
|
|
22
22
|
};
|
|
23
23
|
function S() {
|
|
24
24
|
return typeof window < "u" && typeof document < "u";
|
|
@@ -87,14 +87,14 @@ const ze = () => {
|
|
|
87
87
|
context: n,
|
|
88
88
|
event: o,
|
|
89
89
|
localState: i,
|
|
90
|
-
rootSetState:
|
|
91
|
-
rootState:
|
|
90
|
+
rootSetState: r,
|
|
91
|
+
rootState: a
|
|
92
92
|
}) => {
|
|
93
93
|
const s = Ge({
|
|
94
94
|
builder: t,
|
|
95
95
|
context: n,
|
|
96
96
|
event: o,
|
|
97
|
-
state: Qe(
|
|
97
|
+
state: Qe(a, i, r)
|
|
98
98
|
});
|
|
99
99
|
return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
|
|
100
100
|
};
|
|
@@ -103,10 +103,10 @@ function Qe(e, t, n) {
|
|
|
103
103
|
throw new Error("rootState === localState");
|
|
104
104
|
return new Proxy(e, {
|
|
105
105
|
get: (o, i) => t && i in t ? t[i] : e[i],
|
|
106
|
-
set: (o, i,
|
|
106
|
+
set: (o, i, r) => {
|
|
107
107
|
if (t && i in t)
|
|
108
108
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
109
|
-
return e[i] =
|
|
109
|
+
return e[i] = r, n == null || n(e), !0;
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
112
|
}
|
|
@@ -117,8 +117,8 @@ function j({
|
|
|
117
117
|
localState: n,
|
|
118
118
|
rootState: o,
|
|
119
119
|
rootSetState: i,
|
|
120
|
-
event:
|
|
121
|
-
isExpression:
|
|
120
|
+
event: r,
|
|
121
|
+
isExpression: a = !0
|
|
122
122
|
}) {
|
|
123
123
|
if (e === "") {
|
|
124
124
|
k.warn("Skipping evaluation of empty code block.");
|
|
@@ -126,11 +126,11 @@ function j({
|
|
|
126
126
|
}
|
|
127
127
|
const s = {
|
|
128
128
|
code: Je(e, {
|
|
129
|
-
isExpression:
|
|
129
|
+
isExpression: a
|
|
130
130
|
}),
|
|
131
131
|
builder: Ye(),
|
|
132
132
|
context: t,
|
|
133
|
-
event:
|
|
133
|
+
event: r,
|
|
134
134
|
rootSetState: i,
|
|
135
135
|
rootState: o,
|
|
136
136
|
localState: n
|
|
@@ -144,11 +144,11 @@ function j({
|
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
const
|
|
147
|
+
const $ = (e) => JSON.parse(JSON.stringify(e)), Ze = (e, t, n) => {
|
|
148
148
|
if (Object(e) !== e)
|
|
149
149
|
return e;
|
|
150
150
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
151
|
-
return o.slice(0, -1).reduce((i,
|
|
151
|
+
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;
|
|
152
152
|
};
|
|
153
153
|
const et = ({
|
|
154
154
|
block: e,
|
|
@@ -159,13 +159,13 @@ const et = ({
|
|
|
159
159
|
}) => {
|
|
160
160
|
if (!e.bindings)
|
|
161
161
|
return e;
|
|
162
|
-
const
|
|
163
|
-
...
|
|
162
|
+
const r = $(e), a = {
|
|
163
|
+
...r,
|
|
164
164
|
properties: {
|
|
165
|
-
...
|
|
165
|
+
...r.properties
|
|
166
166
|
},
|
|
167
167
|
actions: {
|
|
168
|
-
...
|
|
168
|
+
...r.actions
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
171
|
for (const s in e.bindings) {
|
|
@@ -176,41 +176,41 @@ const et = ({
|
|
|
176
176
|
rootSetState: i,
|
|
177
177
|
context: t
|
|
178
178
|
});
|
|
179
|
-
Ze(
|
|
179
|
+
Ze(a, s, m);
|
|
180
180
|
}
|
|
181
|
-
return
|
|
181
|
+
return a;
|
|
182
182
|
};
|
|
183
|
-
function
|
|
183
|
+
function W({
|
|
184
184
|
block: e,
|
|
185
185
|
context: t,
|
|
186
186
|
shouldEvaluateBindings: n,
|
|
187
187
|
localState: o,
|
|
188
188
|
rootState: i,
|
|
189
|
-
rootSetState:
|
|
189
|
+
rootSetState: r
|
|
190
190
|
}) {
|
|
191
|
-
const
|
|
191
|
+
const a = e;
|
|
192
192
|
return n ? et({
|
|
193
|
-
block:
|
|
193
|
+
block: a,
|
|
194
194
|
localState: o,
|
|
195
195
|
rootState: i,
|
|
196
|
-
rootSetState:
|
|
196
|
+
rootSetState: r,
|
|
197
197
|
context: t
|
|
198
|
-
}) :
|
|
198
|
+
}) : a;
|
|
199
199
|
}
|
|
200
200
|
const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], N = (e) => typeof e == "string" && tt.includes(e.toLowerCase()), nt = ({
|
|
201
201
|
block: e,
|
|
202
202
|
context: t,
|
|
203
203
|
registeredComponents: n
|
|
204
204
|
}) => {
|
|
205
|
-
var
|
|
206
|
-
const o = (
|
|
205
|
+
var r;
|
|
206
|
+
const o = (r = W({
|
|
207
207
|
block: e,
|
|
208
208
|
localState: t.localState,
|
|
209
209
|
rootState: t.rootState,
|
|
210
210
|
rootSetState: t.rootSetState,
|
|
211
211
|
context: t.context,
|
|
212
212
|
shouldEvaluateBindings: !1
|
|
213
|
-
}).component) == null ? void 0 :
|
|
213
|
+
}).component) == null ? void 0 : r.name;
|
|
214
214
|
if (!o)
|
|
215
215
|
return null;
|
|
216
216
|
const i = n[o];
|
|
@@ -238,7 +238,7 @@ const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
238
238
|
});
|
|
239
239
|
if (!Array.isArray(i))
|
|
240
240
|
return;
|
|
241
|
-
const
|
|
241
|
+
const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
|
|
242
242
|
return i.map((c, m) => ({
|
|
243
243
|
context: {
|
|
244
244
|
...t,
|
|
@@ -246,8 +246,8 @@ const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
246
246
|
...t.localState,
|
|
247
247
|
$index: m,
|
|
248
248
|
$item: c,
|
|
249
|
-
[
|
|
250
|
-
[`$${
|
|
249
|
+
[a]: c,
|
|
250
|
+
[`$${a}Index`]: m
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
253
|
block: o
|
|
@@ -272,7 +272,7 @@ const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
272
272
|
small: e,
|
|
273
273
|
medium: t
|
|
274
274
|
}) => {
|
|
275
|
-
const n =
|
|
275
|
+
const n = $(ue);
|
|
276
276
|
if (!e || !t)
|
|
277
277
|
return n;
|
|
278
278
|
const o = Math.floor(e / 2);
|
|
@@ -287,35 +287,35 @@ const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
287
287
|
min: i,
|
|
288
288
|
default: i + 1
|
|
289
289
|
};
|
|
290
|
-
const
|
|
290
|
+
const r = n.medium.max + 1;
|
|
291
291
|
return n.large = {
|
|
292
292
|
max: 2e3,
|
|
293
293
|
// TODO: decide upper limit
|
|
294
|
-
min:
|
|
295
|
-
default:
|
|
294
|
+
min: r,
|
|
295
|
+
default: r + 1
|
|
296
296
|
}, n;
|
|
297
297
|
}, it = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), I = (e) => e != null, fe = (e) => Object.entries(e).map(([n, o]) => {
|
|
298
298
|
if (typeof o == "string")
|
|
299
299
|
return `${it(n)}: ${o};`;
|
|
300
|
-
}).filter(I),
|
|
300
|
+
}).filter(I), rt = (e) => fe(e).join(`
|
|
301
301
|
`), _ = ({
|
|
302
302
|
mediaQuery: e,
|
|
303
303
|
className: t,
|
|
304
304
|
styles: n
|
|
305
305
|
}) => {
|
|
306
306
|
const o = `.${t} {
|
|
307
|
-
${
|
|
307
|
+
${rt(n)}
|
|
308
308
|
}`;
|
|
309
309
|
return e ? `${e} {
|
|
310
310
|
${o}
|
|
311
311
|
}` : o;
|
|
312
312
|
};
|
|
313
|
-
function
|
|
313
|
+
function O(e) {
|
|
314
314
|
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
315
315
|
}
|
|
316
316
|
function K(e) {
|
|
317
317
|
const t = function() {
|
|
318
|
-
const i =
|
|
318
|
+
const i = W({
|
|
319
319
|
block: e.block,
|
|
320
320
|
localState: e.context.localState,
|
|
321
321
|
rootState: e.context.rootState,
|
|
@@ -326,30 +326,30 @@ function K(e) {
|
|
|
326
326
|
return I(i.hide) ? !i.hide : I(i.show) ? i.show : !0;
|
|
327
327
|
}, n = function() {
|
|
328
328
|
var d;
|
|
329
|
-
const i =
|
|
329
|
+
const i = W({
|
|
330
330
|
block: e.block,
|
|
331
331
|
localState: e.context.localState,
|
|
332
332
|
rootState: e.context.rootState,
|
|
333
333
|
rootSetState: e.context.rootSetState,
|
|
334
334
|
context: e.context.context,
|
|
335
335
|
shouldEvaluateBindings: !0
|
|
336
|
-
}),
|
|
337
|
-
((d =
|
|
338
|
-
), c =
|
|
339
|
-
if (!
|
|
336
|
+
}), r = i.responsiveStyles, a = e.context.content, s = me(
|
|
337
|
+
((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
|
|
338
|
+
), c = r == null ? void 0 : r.large, m = r == null ? void 0 : r.medium, h = r == null ? void 0 : r.small, p = i.id;
|
|
339
|
+
if (!p)
|
|
340
340
|
return "";
|
|
341
341
|
const v = c ? _({
|
|
342
|
-
className:
|
|
342
|
+
className: p,
|
|
343
343
|
styles: c
|
|
344
344
|
}) : "", u = m ? _({
|
|
345
|
-
className:
|
|
345
|
+
className: p,
|
|
346
346
|
styles: m,
|
|
347
347
|
mediaQuery: Q(
|
|
348
348
|
"medium",
|
|
349
349
|
s
|
|
350
350
|
)
|
|
351
351
|
}) : "", f = h ? _({
|
|
352
|
-
className:
|
|
352
|
+
className: p,
|
|
353
353
|
styles: h,
|
|
354
354
|
mediaQuery: Q(
|
|
355
355
|
"small",
|
|
@@ -358,12 +358,12 @@ function K(e) {
|
|
|
358
358
|
}) : "";
|
|
359
359
|
return [v, u, f].join(" ");
|
|
360
360
|
};
|
|
361
|
-
return /* @__PURE__ */ l(y, { children: n() && t() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
|
|
361
|
+
return /* @__PURE__ */ l(y, { children: n() && t() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function at(e) {
|
|
364
364
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
365
365
|
}
|
|
366
|
-
const st = (e) => `on${
|
|
366
|
+
const st = (e) => `on${at(e)}`, ct = (e, t) => (n) => j({
|
|
367
367
|
code: e,
|
|
368
368
|
context: t.context,
|
|
369
369
|
localState: t.localState,
|
|
@@ -378,22 +378,24 @@ function Un(e) {
|
|
|
378
378
|
if (!n.hasOwnProperty(o))
|
|
379
379
|
continue;
|
|
380
380
|
const i = n[o];
|
|
381
|
-
let
|
|
381
|
+
let r = st(o);
|
|
382
382
|
if (e.stripPrefix)
|
|
383
383
|
switch (T) {
|
|
384
384
|
case "vue2":
|
|
385
385
|
case "vue3":
|
|
386
|
-
|
|
386
|
+
r = r.replace("v-on:", "");
|
|
387
387
|
break;
|
|
388
388
|
case "svelte":
|
|
389
|
-
|
|
389
|
+
r = r.replace("on:", "");
|
|
390
390
|
break;
|
|
391
391
|
}
|
|
392
|
-
t[
|
|
392
|
+
t[r] = ct(i, e);
|
|
393
393
|
}
|
|
394
394
|
return t;
|
|
395
395
|
}
|
|
396
|
-
function lt(
|
|
396
|
+
function lt({
|
|
397
|
+
properties: e
|
|
398
|
+
}) {
|
|
397
399
|
return e.className = e.class, delete e.class, e;
|
|
398
400
|
}
|
|
399
401
|
const dt = (e) => ({
|
|
@@ -411,7 +413,11 @@ function ut({
|
|
|
411
413
|
style: e.style ? mt(e.style) : void 0,
|
|
412
414
|
class: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
|
|
413
415
|
};
|
|
414
|
-
return lt(
|
|
416
|
+
return lt({
|
|
417
|
+
properties: n,
|
|
418
|
+
context: t,
|
|
419
|
+
block: e
|
|
420
|
+
});
|
|
415
421
|
}
|
|
416
422
|
function mt(e) {
|
|
417
423
|
switch (T) {
|
|
@@ -433,9 +439,9 @@ const ft = ({
|
|
|
433
439
|
context: n,
|
|
434
440
|
componentRef: o,
|
|
435
441
|
includeBlockProps: i,
|
|
436
|
-
isInteractive:
|
|
437
|
-
contextValue:
|
|
438
|
-
}) =>
|
|
442
|
+
isInteractive: r,
|
|
443
|
+
contextValue: a
|
|
444
|
+
}) => r ? {
|
|
439
445
|
Wrapper: o,
|
|
440
446
|
block: t,
|
|
441
447
|
context: n,
|
|
@@ -449,13 +455,13 @@ const ft = ({
|
|
|
449
455
|
...i ? {
|
|
450
456
|
attributes: ut({
|
|
451
457
|
block: t,
|
|
452
|
-
context:
|
|
458
|
+
context: a
|
|
453
459
|
})
|
|
454
460
|
} : {}
|
|
455
461
|
};
|
|
456
462
|
function X(e) {
|
|
457
463
|
var n, o;
|
|
458
|
-
const t = e.isInteractive ?
|
|
464
|
+
const t = e.isInteractive ? We : e.componentRef;
|
|
459
465
|
return /* @__PURE__ */ l(y, { children: e.componentRef ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ w(
|
|
460
466
|
t,
|
|
461
467
|
{
|
|
@@ -470,7 +476,7 @@ function X(e) {
|
|
|
470
476
|
}),
|
|
471
477
|
children: [
|
|
472
478
|
(n = e.blockChildren) == null ? void 0 : n.map((i) => /* @__PURE__ */ l(
|
|
473
|
-
|
|
479
|
+
F,
|
|
474
480
|
{
|
|
475
481
|
block: i,
|
|
476
482
|
context: e.context,
|
|
@@ -493,7 +499,7 @@ function X(e) {
|
|
|
493
499
|
function ht(e) {
|
|
494
500
|
const t = e.repeatContext;
|
|
495
501
|
return /* @__PURE__ */ l(
|
|
496
|
-
|
|
502
|
+
F,
|
|
497
503
|
{
|
|
498
504
|
block: e.block,
|
|
499
505
|
context: t,
|
|
@@ -501,8 +507,8 @@ function ht(e) {
|
|
|
501
507
|
}
|
|
502
508
|
);
|
|
503
509
|
}
|
|
504
|
-
function
|
|
505
|
-
var m, h,
|
|
510
|
+
function F(e) {
|
|
511
|
+
var m, h, p, v;
|
|
506
512
|
const t = function() {
|
|
507
513
|
return nt({
|
|
508
514
|
block: e.block,
|
|
@@ -516,7 +522,7 @@ function W(e) {
|
|
|
516
522
|
});
|
|
517
523
|
}, o = function() {
|
|
518
524
|
var f;
|
|
519
|
-
return (f = e.block.repeat) != null && f.collection ? e.block :
|
|
525
|
+
return (f = e.block.repeat) != null && f.collection ? e.block : W({
|
|
520
526
|
block: e.block,
|
|
521
527
|
localState: e.context.localState,
|
|
522
528
|
rootState: e.context.rootState,
|
|
@@ -526,17 +532,17 @@ function W(e) {
|
|
|
526
532
|
});
|
|
527
533
|
}, i = function() {
|
|
528
534
|
return e.block.tagName || "div";
|
|
529
|
-
},
|
|
535
|
+
}, r = function() {
|
|
530
536
|
var b, x;
|
|
531
537
|
if ((b = e.block.repeat) != null && b.collection)
|
|
532
538
|
return !!((x = n()) != null && x.length);
|
|
533
539
|
const f = "hide" in o() ? o().hide : !1;
|
|
534
540
|
return ("show" in o() ? o().show : !0) && !f;
|
|
535
|
-
},
|
|
541
|
+
}, a = function() {
|
|
536
542
|
var d;
|
|
537
543
|
return !((d = t()) != null && d.component) && !n() ? o().children ?? [] : [];
|
|
538
544
|
}, s = function() {
|
|
539
|
-
var f, d, b, x,
|
|
545
|
+
var f, d, b, x, g;
|
|
540
546
|
return {
|
|
541
547
|
blockChildren: o().children ?? [],
|
|
542
548
|
componentRef: (f = t()) == null ? void 0 : f.component,
|
|
@@ -551,10 +557,10 @@ function W(e) {
|
|
|
551
557
|
registeredComponents: e.registeredComponents,
|
|
552
558
|
builderBlock: o(),
|
|
553
559
|
includeBlockProps: ((x = t()) == null ? void 0 : x.noWrap) === !0,
|
|
554
|
-
isInteractive: !((
|
|
560
|
+
isInteractive: !((g = t()) != null && g.isRSC)
|
|
555
561
|
};
|
|
556
562
|
}, c = e.context;
|
|
557
|
-
return /* @__PURE__ */ l(y, { children:
|
|
563
|
+
return /* @__PURE__ */ l(y, { children: r() ? /* @__PURE__ */ l(y, { children: (m = t()) != null && m.noWrap ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
|
|
558
564
|
X,
|
|
559
565
|
{
|
|
560
566
|
componentRef: s().componentRef,
|
|
@@ -606,8 +612,8 @@ function W(e) {
|
|
|
606
612
|
isInteractive: s().isInteractive
|
|
607
613
|
}
|
|
608
614
|
),
|
|
609
|
-
(
|
|
610
|
-
|
|
615
|
+
(p = a()) == null ? void 0 : p.map((u) => /* @__PURE__ */ l(
|
|
616
|
+
F,
|
|
611
617
|
{
|
|
612
618
|
block: u,
|
|
613
619
|
context: c,
|
|
@@ -615,7 +621,7 @@ function W(e) {
|
|
|
615
621
|
},
|
|
616
622
|
"block-" + u.id
|
|
617
623
|
)),
|
|
618
|
-
(v =
|
|
624
|
+
(v = a()) == null ? void 0 : v.map((u) => /* @__PURE__ */ l(
|
|
619
625
|
K,
|
|
620
626
|
{
|
|
621
627
|
block: u,
|
|
@@ -629,45 +635,47 @@ function W(e) {
|
|
|
629
635
|
] }) }) : null });
|
|
630
636
|
}
|
|
631
637
|
function H(e) {
|
|
632
|
-
var t, n;
|
|
638
|
+
var t, n, o, i;
|
|
633
639
|
return /* @__PURE__ */ w(
|
|
634
|
-
|
|
640
|
+
$e,
|
|
635
641
|
{
|
|
636
642
|
blocks: e.blocks,
|
|
637
643
|
parent: e.parent,
|
|
638
644
|
path: e.path,
|
|
639
645
|
styleProp: e.styleProp,
|
|
646
|
+
BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
|
|
647
|
+
BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
|
|
640
648
|
children: [
|
|
641
|
-
e.blocks ? /* @__PURE__ */ l(y, { children: (
|
|
642
|
-
|
|
649
|
+
e.blocks ? /* @__PURE__ */ l(y, { children: (o = e.blocks) == null ? void 0 : o.map((r) => /* @__PURE__ */ l(
|
|
650
|
+
F,
|
|
643
651
|
{
|
|
644
|
-
block:
|
|
652
|
+
block: r,
|
|
645
653
|
context: e.context,
|
|
646
654
|
registeredComponents: e.registeredComponents
|
|
647
655
|
},
|
|
648
|
-
"render-block-" +
|
|
656
|
+
"render-block-" + r.id
|
|
649
657
|
)) }) : null,
|
|
650
|
-
e.blocks ? /* @__PURE__ */ l(y, { children: (
|
|
658
|
+
e.blocks ? /* @__PURE__ */ l(y, { children: (i = e.blocks) == null ? void 0 : i.map((r) => /* @__PURE__ */ l(
|
|
651
659
|
K,
|
|
652
660
|
{
|
|
653
|
-
block:
|
|
661
|
+
block: r,
|
|
654
662
|
context: e.context
|
|
655
663
|
},
|
|
656
|
-
"block-style-" +
|
|
664
|
+
"block-style-" + r.id
|
|
657
665
|
)) }) : null
|
|
658
666
|
]
|
|
659
667
|
}
|
|
660
668
|
);
|
|
661
669
|
}
|
|
662
|
-
function
|
|
670
|
+
function pt(e) {
|
|
663
671
|
var u;
|
|
664
672
|
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
|
|
665
673
|
var b;
|
|
666
674
|
return ((b = n[d]) == null ? void 0 : b.width) || 100 / n.length;
|
|
667
|
-
},
|
|
675
|
+
}, r = function(d) {
|
|
668
676
|
const b = t * (n.length - 1) / n.length;
|
|
669
677
|
return `calc(${i(d)}% - ${b}px)`;
|
|
670
|
-
},
|
|
678
|
+
}, a = function({
|
|
671
679
|
stackedStyle: d,
|
|
672
680
|
desktopStyle: b
|
|
673
681
|
}) {
|
|
@@ -680,41 +688,41 @@ function gt(e) {
|
|
|
680
688
|
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", m = function() {
|
|
681
689
|
return {
|
|
682
690
|
"--flex-dir": c,
|
|
683
|
-
"--flex-dir-tablet":
|
|
691
|
+
"--flex-dir-tablet": a({
|
|
684
692
|
stackedStyle: c,
|
|
685
693
|
desktopStyle: "row"
|
|
686
694
|
})
|
|
687
695
|
};
|
|
688
696
|
}, h = function(d) {
|
|
689
|
-
const b = d === 0 ? 0 : t, x =
|
|
697
|
+
const b = d === 0 ? 0 : t, x = r(d), g = `${b}px`, P = "100%", E = 0;
|
|
690
698
|
return {
|
|
691
699
|
width: x,
|
|
692
|
-
["marginLeft"]:
|
|
700
|
+
["marginLeft"]: g,
|
|
693
701
|
"--column-width-mobile": s({
|
|
694
|
-
stackedStyle:
|
|
702
|
+
stackedStyle: P,
|
|
695
703
|
desktopStyle: x
|
|
696
704
|
}),
|
|
697
705
|
"--column-margin-left-mobile": s({
|
|
698
706
|
stackedStyle: E,
|
|
699
|
-
desktopStyle:
|
|
707
|
+
desktopStyle: g
|
|
700
708
|
}),
|
|
701
|
-
"--column-width-tablet":
|
|
702
|
-
stackedStyle:
|
|
709
|
+
"--column-width-tablet": a({
|
|
710
|
+
stackedStyle: P,
|
|
703
711
|
desktopStyle: x
|
|
704
712
|
}),
|
|
705
|
-
"--column-margin-left-tablet":
|
|
713
|
+
"--column-margin-left-tablet": a({
|
|
706
714
|
stackedStyle: E,
|
|
707
|
-
desktopStyle:
|
|
715
|
+
desktopStyle: g
|
|
708
716
|
})
|
|
709
717
|
};
|
|
710
|
-
},
|
|
711
|
-
var x,
|
|
718
|
+
}, p = function(d) {
|
|
719
|
+
var x, g;
|
|
712
720
|
return me(
|
|
713
|
-
((
|
|
721
|
+
((g = (x = e.builderContext.content) == null ? void 0 : x.meta) == null ? void 0 : g.breakpoints) || {}
|
|
714
722
|
)[d].max;
|
|
715
723
|
}, v = function() {
|
|
716
724
|
return `
|
|
717
|
-
@media (max-width: ${
|
|
725
|
+
@media (max-width: ${p("medium")}px) {
|
|
718
726
|
.${e.builderBlock.id}-breakpoints {
|
|
719
727
|
flex-direction: var(--flex-dir-tablet);
|
|
720
728
|
align-items: stretch;
|
|
@@ -726,7 +734,7 @@ function gt(e) {
|
|
|
726
734
|
}
|
|
727
735
|
}
|
|
728
736
|
|
|
729
|
-
@media (max-width: ${
|
|
737
|
+
@media (max-width: ${p("small")}px) {
|
|
730
738
|
.${e.builderBlock.id}-breakpoints {
|
|
731
739
|
flex-direction: var(--flex-dir);
|
|
732
740
|
align-items: stretch;
|
|
@@ -746,8 +754,8 @@ function gt(e) {
|
|
|
746
754
|
className: `builder-columns ${e.builderBlock.id}-breakpoints div-0d69fe26`,
|
|
747
755
|
style: m(),
|
|
748
756
|
children: [
|
|
749
|
-
/* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
|
|
750
|
-
(u = e.columns) == null ? void 0 : u.map((f, d) => /* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles: v() }) }),
|
|
758
|
+
(u = e.columns) == null ? void 0 : u.map((f, d) => /* @__PURE__ */ Be(
|
|
751
759
|
"div",
|
|
752
760
|
{
|
|
753
761
|
className: "builder-column div-0d69fe26-2",
|
|
@@ -784,7 +792,7 @@ function gt(e) {
|
|
|
784
792
|
function Z(e) {
|
|
785
793
|
return e.replace(/http(s)?:/, "");
|
|
786
794
|
}
|
|
787
|
-
function
|
|
795
|
+
function gt(e = "", t, n) {
|
|
788
796
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
|
|
789
797
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
|
|
790
798
|
}
|
|
@@ -795,8 +803,8 @@ function bt(e, t) {
|
|
|
795
803
|
return Z(e);
|
|
796
804
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
797
805
|
if (n) {
|
|
798
|
-
const o = e.split(n[0]), i = n[3],
|
|
799
|
-
return Z(`${o[0]}_${
|
|
806
|
+
const o = e.split(n[0]), i = n[3], r = t.match("x") ? t : `${t}x`;
|
|
807
|
+
return Z(`${o[0]}_${r}${i}`);
|
|
800
808
|
}
|
|
801
809
|
return null;
|
|
802
810
|
}
|
|
@@ -807,7 +815,7 @@ function Mn(e) {
|
|
|
807
815
|
if (e.match(/builder\.io/)) {
|
|
808
816
|
let n = e;
|
|
809
817
|
const o = Number(e.split("?width=")[1]);
|
|
810
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${
|
|
818
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${gt(e, "width", i)} ${i}w`).concat([n]).join(", ");
|
|
811
819
|
}
|
|
812
820
|
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [bt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
813
821
|
}
|
|
@@ -827,14 +835,14 @@ const yt = (e) => {
|
|
|
827
835
|
k.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
828
836
|
return;
|
|
829
837
|
}
|
|
830
|
-
},
|
|
838
|
+
}, pe = async (e) => he(e), vt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "), xt = [["secure", ""], ["SameSite", "None"]], St = ({
|
|
831
839
|
name: e,
|
|
832
840
|
value: t,
|
|
833
841
|
expires: n
|
|
834
842
|
}) => {
|
|
835
|
-
const i = (S() ? location.protocol === "https:" : !0) ? xt : [[]],
|
|
836
|
-
return vt(
|
|
837
|
-
},
|
|
843
|
+
const i = (S() ? location.protocol === "https:" : !0) ? xt : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", yt(window.location.hostname)], ...i];
|
|
844
|
+
return vt(a);
|
|
845
|
+
}, ge = async ({
|
|
838
846
|
name: e,
|
|
839
847
|
value: t,
|
|
840
848
|
expires: n,
|
|
@@ -854,7 +862,7 @@ const yt = (e) => {
|
|
|
854
862
|
}
|
|
855
863
|
}, kt = "builder.tests", z = (e) => `${kt}.${e}`, Ct = ({
|
|
856
864
|
contentId: e
|
|
857
|
-
}) =>
|
|
865
|
+
}) => pe({
|
|
858
866
|
name: z(e),
|
|
859
867
|
canTrack: !0
|
|
860
868
|
}), wt = ({
|
|
@@ -865,7 +873,7 @@ const yt = (e) => {
|
|
|
865
873
|
}), It = ({
|
|
866
874
|
contentId: e,
|
|
867
875
|
value: t
|
|
868
|
-
}) =>
|
|
876
|
+
}) => ge({
|
|
869
877
|
name: z(e),
|
|
870
878
|
value: t,
|
|
871
879
|
canTrack: !0
|
|
@@ -876,10 +884,10 @@ const yt = (e) => {
|
|
|
876
884
|
var i;
|
|
877
885
|
let n = 0;
|
|
878
886
|
const o = Math.random();
|
|
879
|
-
for (const
|
|
880
|
-
const
|
|
881
|
-
if (n +=
|
|
882
|
-
return
|
|
887
|
+
for (const r in t) {
|
|
888
|
+
const a = (i = t[r]) == null ? void 0 : i.testRatio;
|
|
889
|
+
if (n += a, o < n)
|
|
890
|
+
return r;
|
|
883
891
|
}
|
|
884
892
|
return e;
|
|
885
893
|
}, ye = (e) => {
|
|
@@ -946,7 +954,7 @@ const yt = (e) => {
|
|
|
946
954
|
...e,
|
|
947
955
|
...i
|
|
948
956
|
};
|
|
949
|
-
}, L = (e) => I(e) ? e : !0,
|
|
957
|
+
}, L = (e) => I(e) ? e : !0, Pt = {
|
|
950
958
|
name: "Core:Button",
|
|
951
959
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
952
960
|
defaultStyles: {
|
|
@@ -979,7 +987,7 @@ const yt = (e) => {
|
|
|
979
987
|
}],
|
|
980
988
|
static: !0,
|
|
981
989
|
noWrap: !0
|
|
982
|
-
},
|
|
990
|
+
}, At = {
|
|
983
991
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
984
992
|
name: "Columns",
|
|
985
993
|
isRSC: !0,
|
|
@@ -1158,7 +1166,7 @@ const yt = (e) => {
|
|
|
1158
1166
|
});
|
|
1159
1167
|
}
|
|
1160
1168
|
const n = e.get("columns");
|
|
1161
|
-
Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((
|
|
1169
|
+
Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((r) => !r.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
|
|
1162
1170
|
}
|
|
1163
1171
|
}, {
|
|
1164
1172
|
name: "space",
|
|
@@ -1180,7 +1188,7 @@ const yt = (e) => {
|
|
|
1180
1188
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1181
1189
|
advanced: !0
|
|
1182
1190
|
}]
|
|
1183
|
-
},
|
|
1191
|
+
}, Vt = {
|
|
1184
1192
|
name: "Custom Code",
|
|
1185
1193
|
static: !0,
|
|
1186
1194
|
requiredPermissions: ["editCode"],
|
|
@@ -1202,7 +1210,7 @@ const yt = (e) => {
|
|
|
1202
1210
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1203
1211
|
advanced: !0
|
|
1204
1212
|
}]
|
|
1205
|
-
},
|
|
1213
|
+
}, Bt = {
|
|
1206
1214
|
name: "Embed",
|
|
1207
1215
|
static: !0,
|
|
1208
1216
|
inputs: [{
|
|
@@ -1227,13 +1235,13 @@ const yt = (e) => {
|
|
|
1227
1235
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1228
1236
|
hideFromUI: !0
|
|
1229
1237
|
}]
|
|
1230
|
-
},
|
|
1238
|
+
}, Wt = ["text/javascript", "application/javascript", "application/ecmascript"], Dn = (e) => Wt.includes(e.type), $t = {
|
|
1231
1239
|
name: "Fragment",
|
|
1232
1240
|
static: !0,
|
|
1233
1241
|
hidden: !0,
|
|
1234
1242
|
canHaveChildren: !0,
|
|
1235
1243
|
noWrap: !0
|
|
1236
|
-
},
|
|
1244
|
+
}, Ot = {
|
|
1237
1245
|
name: "Image",
|
|
1238
1246
|
static: !0,
|
|
1239
1247
|
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",
|
|
@@ -1253,29 +1261,29 @@ const yt = (e) => {
|
|
|
1253
1261
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1254
1262
|
onChange: (e) => {
|
|
1255
1263
|
e.delete("srcset"), e.delete("noWebp");
|
|
1256
|
-
function n(
|
|
1264
|
+
function n(a, s = 6e4) {
|
|
1257
1265
|
return new Promise((c, m) => {
|
|
1258
1266
|
const h = document.createElement("img");
|
|
1259
|
-
let
|
|
1267
|
+
let p = !1;
|
|
1260
1268
|
h.onload = () => {
|
|
1261
|
-
|
|
1269
|
+
p = !0, c(h);
|
|
1262
1270
|
}, h.addEventListener("error", (v) => {
|
|
1263
1271
|
console.warn("Image load failed", v.error), m(v.error);
|
|
1264
|
-
}), h.src =
|
|
1265
|
-
|
|
1272
|
+
}), h.src = a, setTimeout(() => {
|
|
1273
|
+
p || m(new Error("Image load timed out"));
|
|
1266
1274
|
}, s);
|
|
1267
1275
|
});
|
|
1268
1276
|
}
|
|
1269
|
-
function o(
|
|
1270
|
-
return Math.round(
|
|
1277
|
+
function o(a) {
|
|
1278
|
+
return Math.round(a * 1e3) / 1e3;
|
|
1271
1279
|
}
|
|
1272
|
-
const i = e.get("image"),
|
|
1273
|
-
if (fetch(i).then((
|
|
1274
|
-
|
|
1275
|
-
}), i && (!
|
|
1276
|
-
return n(i).then((
|
|
1280
|
+
const i = e.get("image"), r = e.get("aspectRatio");
|
|
1281
|
+
if (fetch(i).then((a) => a.blob()).then((a) => {
|
|
1282
|
+
a.type.includes("svg") && e.set("noWebp", !0);
|
|
1283
|
+
}), i && (!r || r === 0.7041))
|
|
1284
|
+
return n(i).then((a) => {
|
|
1277
1285
|
const s = e.get("aspectRatio");
|
|
1278
|
-
e.get("image") === i && (!s || s === 0.7041) &&
|
|
1286
|
+
e.get("image") === i && (!s || s === 0.7041) && a.width && a.height && (e.set("aspectRatio", o(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
|
|
1279
1287
|
});
|
|
1280
1288
|
}
|
|
1281
1289
|
}, {
|
|
@@ -1333,7 +1341,7 @@ const yt = (e) => {
|
|
|
1333
1341
|
advanced: !0,
|
|
1334
1342
|
defaultValue: 0.7041
|
|
1335
1343
|
}]
|
|
1336
|
-
},
|
|
1344
|
+
}, Ft = {
|
|
1337
1345
|
// friendlyName?
|
|
1338
1346
|
name: "Raw:Img",
|
|
1339
1347
|
hideFromInsertMenu: !0,
|
|
@@ -1533,31 +1541,31 @@ const Mt = {
|
|
|
1533
1541
|
advanced: !0
|
|
1534
1542
|
}]
|
|
1535
1543
|
}, ee = () => [{
|
|
1536
|
-
component:
|
|
1544
|
+
component: Oe,
|
|
1545
|
+
...Pt
|
|
1546
|
+
}, {
|
|
1547
|
+
component: pt,
|
|
1537
1548
|
...At
|
|
1538
1549
|
}, {
|
|
1539
|
-
component:
|
|
1550
|
+
component: Fe,
|
|
1540
1551
|
...Vt
|
|
1541
|
-
}, {
|
|
1542
|
-
component: We,
|
|
1543
|
-
...Bt
|
|
1544
1552
|
}, {
|
|
1545
1553
|
component: Ne,
|
|
1546
|
-
...
|
|
1554
|
+
...Bt
|
|
1547
1555
|
}, {
|
|
1548
1556
|
component: _e,
|
|
1549
|
-
|
|
1557
|
+
...$t
|
|
1550
1558
|
}, {
|
|
1551
1559
|
component: Le,
|
|
1552
|
-
...
|
|
1560
|
+
...Ot
|
|
1553
1561
|
}, {
|
|
1554
1562
|
component: Ue,
|
|
1555
|
-
...
|
|
1563
|
+
...Ft
|
|
1556
1564
|
}, {
|
|
1557
1565
|
component: Me,
|
|
1558
1566
|
...Nt
|
|
1559
1567
|
}, {
|
|
1560
|
-
component:
|
|
1568
|
+
component: $n,
|
|
1561
1569
|
..._t
|
|
1562
1570
|
}, {
|
|
1563
1571
|
component: Ut,
|
|
@@ -1571,14 +1579,14 @@ const Mt = {
|
|
|
1571
1579
|
}), Dt = (e) => {
|
|
1572
1580
|
const t = e.toString().trim();
|
|
1573
1581
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
1574
|
-
}, jt = (e) => typeof e == "function" ? Dt(e) :
|
|
1582
|
+
}, jt = (e) => typeof e == "function" ? Dt(e) : $(e), U = ({
|
|
1575
1583
|
inputs: e,
|
|
1576
1584
|
...t
|
|
1577
1585
|
}) => ({
|
|
1578
|
-
|
|
1579
|
-
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i,
|
|
1586
|
+
...$(t),
|
|
1587
|
+
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
|
|
1580
1588
|
...o,
|
|
1581
|
-
[i]: jt(
|
|
1589
|
+
[i]: jt(r)
|
|
1582
1590
|
}), {}))
|
|
1583
1591
|
}), Kt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1584
1592
|
function getAndSetVariantId() {
|
|
@@ -1670,14 +1678,14 @@ const Mt = {
|
|
|
1670
1678
|
thisScriptEl?.remove();
|
|
1671
1679
|
}
|
|
1672
1680
|
return;
|
|
1673
|
-
}`, xe = "builderIoAbTest", Se = "builderIoRenderContent",
|
|
1681
|
+
}`, xe = "builderIoAbTest", Se = "builderIoRenderContent", V = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1674
1682
|
...t,
|
|
1675
1683
|
testVariationId: t.id,
|
|
1676
1684
|
id: e == null ? void 0 : e.id
|
|
1677
1685
|
})), zt = ({
|
|
1678
1686
|
canTrack: e,
|
|
1679
1687
|
content: t
|
|
1680
|
-
}) => !(!(
|
|
1688
|
+
}) => !(!(V(t).length > 0) || !e || S()), qt = (e) => e === "react" || e === "reactNative", ke = qt(T), Gt = () => `
|
|
1681
1689
|
window.${xe} = ${Kt}
|
|
1682
1690
|
window.${Se} = ${Ht}
|
|
1683
1691
|
`, Yt = (e, t) => `
|
|
@@ -1703,7 +1711,7 @@ const Qt = (e) => {
|
|
|
1703
1711
|
return n || k.warn("No previewed ID found in search params."), n;
|
|
1704
1712
|
};
|
|
1705
1713
|
function Xt() {
|
|
1706
|
-
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new
|
|
1714
|
+
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Ve({
|
|
1707
1715
|
max: 500,
|
|
1708
1716
|
// how long to live in ms
|
|
1709
1717
|
ttl: 1e3 * 60 * 5
|
|
@@ -1725,19 +1733,19 @@ function tn() {
|
|
|
1725
1733
|
return e;
|
|
1726
1734
|
}
|
|
1727
1735
|
const nn = tn();
|
|
1728
|
-
function
|
|
1736
|
+
function B(e, t = null, n = ".") {
|
|
1729
1737
|
return Object.keys(e).reduce((o, i) => {
|
|
1730
|
-
const
|
|
1731
|
-
return [typeof
|
|
1738
|
+
const r = e[i], a = [t, i].filter(Boolean).join(n);
|
|
1739
|
+
return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
|
|
1732
1740
|
...o,
|
|
1733
|
-
...
|
|
1741
|
+
...B(r, a, n)
|
|
1734
1742
|
} : {
|
|
1735
1743
|
...o,
|
|
1736
|
-
[
|
|
1744
|
+
[a]: r
|
|
1737
1745
|
};
|
|
1738
1746
|
}, {});
|
|
1739
1747
|
}
|
|
1740
|
-
const on = "v3", ne = "builder.",
|
|
1748
|
+
const on = "v3", ne = "builder.", rn = "options.", an = (e) => {
|
|
1741
1749
|
const t = {};
|
|
1742
1750
|
return e.forEach((n, o) => {
|
|
1743
1751
|
t[o] = n;
|
|
@@ -1748,7 +1756,7 @@ const on = "v3", ne = "builder.", an = "options.", rn = (e) => {
|
|
|
1748
1756
|
const t = we(e), n = {};
|
|
1749
1757
|
return Object.keys(t).forEach((o) => {
|
|
1750
1758
|
if (o.startsWith(ne)) {
|
|
1751
|
-
const i = o.replace(ne, "").replace(
|
|
1759
|
+
const i = o.replace(ne, "").replace(rn, "");
|
|
1752
1760
|
n[i] = t[o];
|
|
1753
1761
|
}
|
|
1754
1762
|
}), n;
|
|
@@ -1757,7 +1765,7 @@ const on = "v3", ne = "builder.", an = "options.", rn = (e) => {
|
|
|
1757
1765
|
return {};
|
|
1758
1766
|
const e = new URLSearchParams(window.location.search);
|
|
1759
1767
|
return Ce(e);
|
|
1760
|
-
}, we = (e) => e instanceof URLSearchParams ?
|
|
1768
|
+
}, we = (e) => e instanceof URLSearchParams ? an(e) : e, oe = (e) => typeof e == "number" && !isNaN(e) && e >= 0, q = (e) => {
|
|
1761
1769
|
let {
|
|
1762
1770
|
noTraverse: t = !1
|
|
1763
1771
|
} = e;
|
|
@@ -1765,13 +1773,13 @@ const on = "v3", ne = "builder.", an = "options.", rn = (e) => {
|
|
|
1765
1773
|
limit: n = 30,
|
|
1766
1774
|
userAttributes: o,
|
|
1767
1775
|
query: i,
|
|
1768
|
-
model:
|
|
1769
|
-
apiKey:
|
|
1776
|
+
model: r,
|
|
1777
|
+
apiKey: a,
|
|
1770
1778
|
includeRefs: s = !0,
|
|
1771
1779
|
enrich: c,
|
|
1772
1780
|
locale: m,
|
|
1773
1781
|
apiVersion: h = on,
|
|
1774
|
-
fields:
|
|
1782
|
+
fields: p,
|
|
1775
1783
|
omit: v,
|
|
1776
1784
|
offset: u,
|
|
1777
1785
|
cacheSeconds: f,
|
|
@@ -1779,33 +1787,33 @@ const on = "v3", ne = "builder.", an = "options.", rn = (e) => {
|
|
|
1779
1787
|
sort: b,
|
|
1780
1788
|
includeUnpublished: x
|
|
1781
1789
|
} = e;
|
|
1782
|
-
if (!
|
|
1790
|
+
if (!a)
|
|
1783
1791
|
throw new Error("Missing API key");
|
|
1784
1792
|
if (!["v2", "v3"].includes(h))
|
|
1785
1793
|
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${h}'`);
|
|
1786
1794
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
1787
|
-
const
|
|
1788
|
-
if (
|
|
1789
|
-
const C =
|
|
1795
|
+
const g = new URL(`https://cdn.builder.io/api/${h}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m ? `&locale=${m}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
1796
|
+
if (g.searchParams.set("omit", v || "meta.componentsUsed"), p && g.searchParams.set("fields", p), Number.isFinite(u) && u > -1 && g.searchParams.set("offset", String(Math.floor(u))), typeof x == "boolean" && g.searchParams.set("includeUnpublished", String(x)), f && oe(f) && g.searchParams.set("cacheSeconds", String(f)), d && oe(d) && g.searchParams.set("staleCacheSeconds", String(d)), b) {
|
|
1797
|
+
const C = B({
|
|
1790
1798
|
sort: b
|
|
1791
1799
|
});
|
|
1792
1800
|
for (const R in C)
|
|
1793
|
-
|
|
1801
|
+
g.searchParams.set(R, JSON.stringify(C[R]));
|
|
1794
1802
|
}
|
|
1795
|
-
const
|
|
1803
|
+
const P = {
|
|
1796
1804
|
...sn(),
|
|
1797
1805
|
...we(e.options || {})
|
|
1798
|
-
}, E = P
|
|
1806
|
+
}, E = B(P);
|
|
1799
1807
|
for (const C in E)
|
|
1800
|
-
|
|
1801
|
-
if (o &&
|
|
1802
|
-
const C =
|
|
1808
|
+
g.searchParams.set(C, String(E[C]));
|
|
1809
|
+
if (o && g.searchParams.set("userAttributes", JSON.stringify(o)), i) {
|
|
1810
|
+
const C = B({
|
|
1803
1811
|
query: i
|
|
1804
1812
|
});
|
|
1805
1813
|
for (const R in C)
|
|
1806
|
-
|
|
1814
|
+
g.searchParams.set(R, JSON.stringify(C[R]));
|
|
1807
1815
|
}
|
|
1808
|
-
return
|
|
1816
|
+
return g;
|
|
1809
1817
|
}, cn = (e) => "results" in e;
|
|
1810
1818
|
async function G(e) {
|
|
1811
1819
|
const t = await Ie({
|
|
@@ -1820,25 +1828,25 @@ const Kn = G, ln = async (e) => {
|
|
|
1820
1828
|
}, dn = async (e, t, n = q(e)) => {
|
|
1821
1829
|
const o = L(e.canTrack);
|
|
1822
1830
|
if (n.search.includes("preview=")) {
|
|
1823
|
-
const
|
|
1824
|
-
for (const
|
|
1831
|
+
const r = [];
|
|
1832
|
+
for (const a of t.results) {
|
|
1825
1833
|
const s = Zt(n.searchParams);
|
|
1826
|
-
|
|
1834
|
+
r.push(s || a);
|
|
1827
1835
|
}
|
|
1828
|
-
t.results =
|
|
1836
|
+
t.results = r;
|
|
1829
1837
|
}
|
|
1830
1838
|
if (!o || !(S() || T === "reactNative"))
|
|
1831
1839
|
return t;
|
|
1832
1840
|
try {
|
|
1833
|
-
const
|
|
1834
|
-
for (const
|
|
1835
|
-
|
|
1836
|
-
item:
|
|
1841
|
+
const r = [];
|
|
1842
|
+
for (const a of t.results)
|
|
1843
|
+
r.push(await Rt({
|
|
1844
|
+
item: a,
|
|
1837
1845
|
canTrack: o
|
|
1838
1846
|
}));
|
|
1839
|
-
t.results =
|
|
1840
|
-
} catch (
|
|
1841
|
-
k.error("Could not process A/B tests. ",
|
|
1847
|
+
t.results = r;
|
|
1848
|
+
} catch (r) {
|
|
1849
|
+
k.error("Could not process A/B tests. ", r);
|
|
1842
1850
|
}
|
|
1843
1851
|
return t;
|
|
1844
1852
|
};
|
|
@@ -1872,7 +1880,7 @@ const Ee = "builderSessionId", mn = async ({
|
|
|
1872
1880
|
}) => {
|
|
1873
1881
|
if (!e)
|
|
1874
1882
|
return;
|
|
1875
|
-
const t = await
|
|
1883
|
+
const t = await pe({
|
|
1876
1884
|
name: Ee,
|
|
1877
1885
|
canTrack: e
|
|
1878
1886
|
});
|
|
@@ -1888,11 +1896,11 @@ const Ee = "builderSessionId", mn = async ({
|
|
|
1888
1896
|
}, fn = () => Te(), hn = ({
|
|
1889
1897
|
id: e,
|
|
1890
1898
|
canTrack: t
|
|
1891
|
-
}) =>
|
|
1899
|
+
}) => ge({
|
|
1892
1900
|
name: Ee,
|
|
1893
1901
|
value: e,
|
|
1894
1902
|
canTrack: t
|
|
1895
|
-
}), Re = () => S() && typeof localStorage < "u" ? localStorage : void 0,
|
|
1903
|
+
}), Re = () => S() && typeof localStorage < "u" ? localStorage : void 0, pn = ({
|
|
1896
1904
|
key: e,
|
|
1897
1905
|
canTrack: t
|
|
1898
1906
|
}) => {
|
|
@@ -1903,7 +1911,7 @@ const Ee = "builderSessionId", mn = async ({
|
|
|
1903
1911
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1904
1912
|
return;
|
|
1905
1913
|
}
|
|
1906
|
-
},
|
|
1914
|
+
}, gn = ({
|
|
1907
1915
|
key: e,
|
|
1908
1916
|
canTrack: t,
|
|
1909
1917
|
value: n
|
|
@@ -1914,13 +1922,13 @@ const Ee = "builderSessionId", mn = async ({
|
|
|
1914
1922
|
} catch (i) {
|
|
1915
1923
|
console.debug("[LocalStorage] SET error: ", i);
|
|
1916
1924
|
}
|
|
1917
|
-
},
|
|
1925
|
+
}, Pe = "builderVisitorId", bn = ({
|
|
1918
1926
|
canTrack: e
|
|
1919
1927
|
}) => {
|
|
1920
1928
|
if (!e)
|
|
1921
1929
|
return;
|
|
1922
|
-
const t =
|
|
1923
|
-
key:
|
|
1930
|
+
const t = pn({
|
|
1931
|
+
key: Pe,
|
|
1924
1932
|
canTrack: e
|
|
1925
1933
|
});
|
|
1926
1934
|
if (I(t))
|
|
@@ -1935,8 +1943,8 @@ const Ee = "builderSessionId", mn = async ({
|
|
|
1935
1943
|
}, yn = () => Te(), vn = ({
|
|
1936
1944
|
id: e,
|
|
1937
1945
|
canTrack: t
|
|
1938
|
-
}) =>
|
|
1939
|
-
key:
|
|
1946
|
+
}) => gn({
|
|
1947
|
+
key: Pe,
|
|
1940
1948
|
value: e,
|
|
1941
1949
|
canTrack: t
|
|
1942
1950
|
}), xn = async ({
|
|
@@ -2017,35 +2025,35 @@ const Cn = (e, t, n = !0) => {
|
|
|
2017
2025
|
}, wn = (e) => Cn(e, (t) => {
|
|
2018
2026
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2019
2027
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2020
|
-
}),
|
|
2028
|
+
}), re = ({
|
|
2021
2029
|
event: e,
|
|
2022
2030
|
target: t
|
|
2023
2031
|
}) => {
|
|
2024
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top,
|
|
2032
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ie(o / n.width), a = ie(i / n.height);
|
|
2025
2033
|
return {
|
|
2026
|
-
x:
|
|
2027
|
-
y:
|
|
2034
|
+
x: r,
|
|
2035
|
+
y: a
|
|
2028
2036
|
};
|
|
2029
2037
|
}, Gn = (e) => {
|
|
2030
2038
|
const t = e.target, n = t && wn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2031
2039
|
return {
|
|
2032
2040
|
targetBuilderElement: o || void 0,
|
|
2033
2041
|
metadata: {
|
|
2034
|
-
targetOffset: t ?
|
|
2042
|
+
targetOffset: t ? re({
|
|
2035
2043
|
event: e,
|
|
2036
2044
|
target: t
|
|
2037
2045
|
}) : void 0,
|
|
2038
|
-
builderTargetOffset: n ?
|
|
2046
|
+
builderTargetOffset: n ? re({
|
|
2039
2047
|
event: e,
|
|
2040
2048
|
target: n
|
|
2041
2049
|
}) : void 0,
|
|
2042
2050
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2043
2051
|
}
|
|
2044
2052
|
};
|
|
2045
|
-
}, In = "0.
|
|
2053
|
+
}, In = "0.9.0", ae = {};
|
|
2046
2054
|
function Tn(e, t) {
|
|
2047
|
-
let n =
|
|
2048
|
-
if (n || (n =
|
|
2055
|
+
let n = ae[e];
|
|
2056
|
+
if (n || (n = ae[e] = []), n.push(t), S()) {
|
|
2049
2057
|
const o = {
|
|
2050
2058
|
type: "builder.register",
|
|
2051
2059
|
data: {
|
|
@@ -2105,22 +2113,22 @@ const Jn = (e = {}) => {
|
|
|
2105
2113
|
}, "*"), window.addEventListener("message", ({
|
|
2106
2114
|
data: o
|
|
2107
2115
|
}) => {
|
|
2108
|
-
var i,
|
|
2116
|
+
var i, r;
|
|
2109
2117
|
if (o != null && o.type)
|
|
2110
2118
|
switch (o.type) {
|
|
2111
2119
|
case "builder.evaluate": {
|
|
2112
|
-
const
|
|
2113
|
-
let h,
|
|
2120
|
+
const a = o.data.text, s = o.data.arguments || [], c = o.data.id, m = new Function(a);
|
|
2121
|
+
let h, p = null;
|
|
2114
2122
|
try {
|
|
2115
2123
|
h = m.apply(null, s);
|
|
2116
2124
|
} catch (v) {
|
|
2117
|
-
|
|
2125
|
+
p = v;
|
|
2118
2126
|
}
|
|
2119
|
-
|
|
2127
|
+
p ? (i = window.parent) == null || i.postMessage({
|
|
2120
2128
|
type: "builder.evaluateError",
|
|
2121
2129
|
data: {
|
|
2122
2130
|
id: c,
|
|
2123
|
-
error:
|
|
2131
|
+
error: p.message
|
|
2124
2132
|
}
|
|
2125
2133
|
}, "*") : h && typeof h.then == "function" ? h.then((v) => {
|
|
2126
2134
|
var u;
|
|
@@ -2131,7 +2139,7 @@ const Jn = (e = {}) => {
|
|
|
2131
2139
|
result: v
|
|
2132
2140
|
}
|
|
2133
2141
|
}, "*");
|
|
2134
|
-
}).catch(console.error) : (
|
|
2142
|
+
}).catch(console.error) : (r = window.parent) == null || r.postMessage({
|
|
2135
2143
|
type: "builder.evaluateResult",
|
|
2136
2144
|
data: {
|
|
2137
2145
|
result: h,
|
|
@@ -2143,8 +2151,8 @@ const Jn = (e = {}) => {
|
|
|
2143
2151
|
}
|
|
2144
2152
|
})));
|
|
2145
2153
|
}, En = (e) => {
|
|
2146
|
-
var
|
|
2147
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((
|
|
2154
|
+
var r;
|
|
2155
|
+
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);
|
|
2148
2156
|
let i = "";
|
|
2149
2157
|
if (o && t && n && (i += `
|
|
2150
2158
|
@font-face {
|
|
@@ -2154,16 +2162,16 @@ font-display: fallback;
|
|
|
2154
2162
|
font-weight: 400;
|
|
2155
2163
|
}
|
|
2156
2164
|
`.trim()), e.files)
|
|
2157
|
-
for (const
|
|
2158
|
-
if (!(String(Number(
|
|
2165
|
+
for (const a in e.files) {
|
|
2166
|
+
if (!(String(Number(a)) === a))
|
|
2159
2167
|
continue;
|
|
2160
|
-
const c = e.files[
|
|
2168
|
+
const c = e.files[a];
|
|
2161
2169
|
c && c !== o && (i += `
|
|
2162
2170
|
@font-face {
|
|
2163
2171
|
font-family: "${t}";
|
|
2164
2172
|
src: url('${c}') format('woff2');
|
|
2165
2173
|
font-display: fallback;
|
|
2166
|
-
font-weight: ${
|
|
2174
|
+
font-weight: ${a};
|
|
2167
2175
|
}
|
|
2168
2176
|
`.trim());
|
|
2169
2177
|
}
|
|
@@ -2173,13 +2181,13 @@ font-weight: ${r};
|
|
|
2173
2181
|
}) => {
|
|
2174
2182
|
var t;
|
|
2175
2183
|
return ((t = e == null ? void 0 : e.map((n) => En(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2176
|
-
},
|
|
2184
|
+
}, Pn = ({
|
|
2177
2185
|
cssCode: e,
|
|
2178
2186
|
contentId: t
|
|
2179
2187
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
2180
|
-
function
|
|
2188
|
+
function An(e) {
|
|
2181
2189
|
const t = `
|
|
2182
|
-
${
|
|
2190
|
+
${Pn({
|
|
2183
2191
|
cssCode: e.cssCode,
|
|
2184
2192
|
contentId: e.contentId
|
|
2185
2193
|
})}
|
|
@@ -2200,16 +2208,16 @@ ${Rn({
|
|
|
2200
2208
|
font-family: inherit;
|
|
2201
2209
|
}
|
|
2202
2210
|
`.trim();
|
|
2203
|
-
return /* @__PURE__ */ l(
|
|
2211
|
+
return /* @__PURE__ */ l(O, { styles: t });
|
|
2204
2212
|
}
|
|
2205
|
-
const
|
|
2213
|
+
const Vn = ({
|
|
2206
2214
|
content: e,
|
|
2207
2215
|
data: t,
|
|
2208
2216
|
locale: n
|
|
2209
2217
|
}) => {
|
|
2210
|
-
var
|
|
2211
|
-
const o = {}, i = ((
|
|
2212
|
-
return (s = (
|
|
2218
|
+
var r, a, s;
|
|
2219
|
+
const o = {}, i = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.state) || {};
|
|
2220
|
+
return (s = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || s.forEach((c) => {
|
|
2213
2221
|
c.name && c.defaultValue !== void 0 && (o[c.name] = c.defaultValue);
|
|
2214
2222
|
}), {
|
|
2215
2223
|
...o,
|
|
@@ -2219,7 +2227,7 @@ const Bn = ({
|
|
|
2219
2227
|
locale: n
|
|
2220
2228
|
} : {}
|
|
2221
2229
|
};
|
|
2222
|
-
},
|
|
2230
|
+
}, Bn = ({
|
|
2223
2231
|
content: e,
|
|
2224
2232
|
data: t
|
|
2225
2233
|
}) => e ? {
|
|
@@ -2231,12 +2239,12 @@ const Bn = ({
|
|
|
2231
2239
|
meta: e == null ? void 0 : e.meta
|
|
2232
2240
|
} : void 0;
|
|
2233
2241
|
function ce(e) {
|
|
2234
|
-
var i,
|
|
2242
|
+
var i, r, a, s, c, m, h, p, v;
|
|
2235
2243
|
const t = Jt({
|
|
2236
2244
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2237
2245
|
variationId: (i = e.content) == null ? void 0 : i.testVariationId,
|
|
2238
2246
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2239
|
-
contentId: (
|
|
2247
|
+
contentId: (r = e.content) == null ? void 0 : r.id
|
|
2240
2248
|
}), n = [
|
|
2241
2249
|
...ee(),
|
|
2242
2250
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
@@ -2256,12 +2264,12 @@ function ce(e) {
|
|
|
2256
2264
|
}),
|
|
2257
2265
|
{}
|
|
2258
2266
|
), o = {
|
|
2259
|
-
content:
|
|
2267
|
+
content: Bn({
|
|
2260
2268
|
content: e.content,
|
|
2261
2269
|
data: e.data
|
|
2262
2270
|
}),
|
|
2263
2271
|
localState: void 0,
|
|
2264
|
-
rootState:
|
|
2272
|
+
rootState: Vn({
|
|
2265
2273
|
content: e.content,
|
|
2266
2274
|
data: e.data,
|
|
2267
2275
|
locale: e.locale
|
|
@@ -2286,7 +2294,9 @@ function ce(e) {
|
|
|
2286
2294
|
}),
|
|
2287
2295
|
{}
|
|
2288
2296
|
),
|
|
2289
|
-
inheritedStyles: {}
|
|
2297
|
+
inheritedStyles: {},
|
|
2298
|
+
BlocksWrapper: e.blocksWrapper || "div",
|
|
2299
|
+
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
2290
2300
|
};
|
|
2291
2301
|
return /* @__PURE__ */ w(
|
|
2292
2302
|
je,
|
|
@@ -2301,12 +2311,14 @@ function ce(e) {
|
|
|
2301
2311
|
enrich: e.enrich,
|
|
2302
2312
|
showContent: e.showContent,
|
|
2303
2313
|
builderContextSignal: o,
|
|
2314
|
+
contentWrapper: e.contentWrapper,
|
|
2315
|
+
contentWrapperProps: e.contentWrapperProps,
|
|
2304
2316
|
children: [
|
|
2305
2317
|
e.isSsrAbTest ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(M, { scriptStr: t }) }) : null,
|
|
2306
2318
|
/* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
|
|
2307
|
-
|
|
2319
|
+
An,
|
|
2308
2320
|
{
|
|
2309
|
-
contentId: (
|
|
2321
|
+
contentId: (a = o.content) == null ? void 0 : a.id,
|
|
2310
2322
|
cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
|
|
2311
2323
|
customFonts: (h = (m = o.content) == null ? void 0 : m.data) == null ? void 0 : h.customFonts
|
|
2312
2324
|
}
|
|
@@ -2314,7 +2326,7 @@ function ce(e) {
|
|
|
2314
2326
|
/* @__PURE__ */ l(
|
|
2315
2327
|
H,
|
|
2316
2328
|
{
|
|
2317
|
-
blocks: (v = (
|
|
2329
|
+
blocks: (v = (p = o.content) == null ? void 0 : p.data) == null ? void 0 : v.blocks,
|
|
2318
2330
|
context: o,
|
|
2319
2331
|
registeredComponents: n
|
|
2320
2332
|
}
|
|
@@ -2323,22 +2335,22 @@ function ce(e) {
|
|
|
2323
2335
|
}
|
|
2324
2336
|
);
|
|
2325
2337
|
}
|
|
2326
|
-
function
|
|
2327
|
-
var
|
|
2338
|
+
function Ae(e) {
|
|
2339
|
+
var r, a;
|
|
2328
2340
|
const t = zt({
|
|
2329
2341
|
canTrack: L(e.canTrack),
|
|
2330
2342
|
content: e.content
|
|
2331
2343
|
}), n = function() {
|
|
2332
2344
|
var c;
|
|
2333
2345
|
return Yt(
|
|
2334
|
-
|
|
2346
|
+
V(e.content).map((m) => ({
|
|
2335
2347
|
id: m.testVariationId,
|
|
2336
2348
|
testRatio: m.testRatio
|
|
2337
2349
|
})),
|
|
2338
2350
|
((c = e.content) == null ? void 0 : c.id) || ""
|
|
2339
2351
|
);
|
|
2340
2352
|
}, o = function() {
|
|
2341
|
-
return
|
|
2353
|
+
return V(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
|
|
2342
2354
|
}, i = function() {
|
|
2343
2355
|
var c;
|
|
2344
2356
|
return t ? {
|
|
@@ -2353,14 +2365,14 @@ function Ve(e) {
|
|
|
2353
2365
|
!e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(M, { scriptStr: Gt() }) }) : null,
|
|
2354
2366
|
t ? /* @__PURE__ */ w(y, { children: [
|
|
2355
2367
|
/* @__PURE__ */ l(
|
|
2356
|
-
|
|
2368
|
+
O,
|
|
2357
2369
|
{
|
|
2358
|
-
id: `variants-styles-${(
|
|
2370
|
+
id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
|
|
2359
2371
|
styles: o()
|
|
2360
2372
|
}
|
|
2361
2373
|
),
|
|
2362
2374
|
/* @__PURE__ */ l(M, { scriptStr: n() }),
|
|
2363
|
-
(
|
|
2375
|
+
(a = V(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
|
|
2364
2376
|
ce,
|
|
2365
2377
|
{
|
|
2366
2378
|
content: s,
|
|
@@ -2375,7 +2387,11 @@ function Ve(e) {
|
|
|
2375
2387
|
locale: e.locale,
|
|
2376
2388
|
includeRefs: e.includeRefs,
|
|
2377
2389
|
enrich: e.enrich,
|
|
2378
|
-
isSsrAbTest: t
|
|
2390
|
+
isSsrAbTest: t,
|
|
2391
|
+
blocksWrapper: e.blocksWrapper,
|
|
2392
|
+
blocksWrapperProps: e.blocksWrapperProps,
|
|
2393
|
+
contentWrapper: e.contentWrapper,
|
|
2394
|
+
contentWrapperProps: e.contentWrapperProps
|
|
2379
2395
|
},
|
|
2380
2396
|
s.testVariationId
|
|
2381
2397
|
))
|
|
@@ -2395,12 +2411,16 @@ function Ve(e) {
|
|
|
2395
2411
|
locale: e.locale,
|
|
2396
2412
|
includeRefs: e.includeRefs,
|
|
2397
2413
|
enrich: e.enrich,
|
|
2398
|
-
isSsrAbTest: t
|
|
2414
|
+
isSsrAbTest: t,
|
|
2415
|
+
blocksWrapper: e.blocksWrapper,
|
|
2416
|
+
blocksWrapperProps: e.blocksWrapperProps,
|
|
2417
|
+
contentWrapper: e.contentWrapper,
|
|
2418
|
+
contentWrapperProps: e.contentWrapperProps
|
|
2399
2419
|
}
|
|
2400
2420
|
)
|
|
2401
2421
|
] });
|
|
2402
2422
|
}
|
|
2403
|
-
const
|
|
2423
|
+
const Wn = async ({
|
|
2404
2424
|
builderContextValue: e,
|
|
2405
2425
|
symbol: t
|
|
2406
2426
|
}) => {
|
|
@@ -2419,8 +2439,8 @@ const $n = async ({
|
|
|
2419
2439
|
k.error("Could not fetch symbol content: ", n);
|
|
2420
2440
|
});
|
|
2421
2441
|
};
|
|
2422
|
-
async function
|
|
2423
|
-
var o, i,
|
|
2442
|
+
async function $n(e) {
|
|
2443
|
+
var o, i, r, a;
|
|
2424
2444
|
const t = function() {
|
|
2425
2445
|
var c, m;
|
|
2426
2446
|
return [
|
|
@@ -2429,12 +2449,12 @@ async function On(e) {
|
|
|
2429
2449
|
(c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
|
|
2430
2450
|
(m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2431
2451
|
].filter(Boolean).join(" ");
|
|
2432
|
-
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await
|
|
2452
|
+
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await Wn({
|
|
2433
2453
|
symbol: e.symbol,
|
|
2434
2454
|
builderContextValue: e.builderContext
|
|
2435
2455
|
});
|
|
2436
2456
|
return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2437
|
-
|
|
2457
|
+
Ae,
|
|
2438
2458
|
{
|
|
2439
2459
|
__isNestedRender: !0,
|
|
2440
2460
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2444,14 +2464,14 @@ async function On(e) {
|
|
|
2444
2464
|
data: {
|
|
2445
2465
|
...(i = e.symbol) == null ? void 0 : i.data,
|
|
2446
2466
|
...e.builderContext.localState,
|
|
2447
|
-
...(
|
|
2467
|
+
...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
|
|
2448
2468
|
},
|
|
2449
|
-
model: (
|
|
2469
|
+
model: (a = e.symbol) == null ? void 0 : a.model,
|
|
2450
2470
|
content: n
|
|
2451
2471
|
}
|
|
2452
2472
|
) });
|
|
2453
2473
|
}
|
|
2454
|
-
const Qn = H, Xn =
|
|
2474
|
+
const Qn = H, Xn = Ae, le = {};
|
|
2455
2475
|
function Zn(e) {
|
|
2456
2476
|
if (S()) {
|
|
2457
2477
|
Object.assign(le, e);
|
|
@@ -2463,7 +2483,7 @@ function Zn(e) {
|
|
|
2463
2483
|
}
|
|
2464
2484
|
}
|
|
2465
2485
|
const eo = async (e) => {
|
|
2466
|
-
var o, i,
|
|
2486
|
+
var o, i, r;
|
|
2467
2487
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
|
|
2468
2488
|
...e,
|
|
2469
2489
|
apiKey: e.apiKey,
|
|
@@ -2474,7 +2494,7 @@ const eo = async (e) => {
|
|
|
2474
2494
|
urlPath: t
|
|
2475
2495
|
} : {}
|
|
2476
2496
|
},
|
|
2477
|
-
options: Ce(e.searchParams || ((
|
|
2497
|
+
options: Ce(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
|
|
2478
2498
|
};
|
|
2479
2499
|
return {
|
|
2480
2500
|
apiKey: n.apiKey,
|
|
@@ -2485,11 +2505,11 @@ const eo = async (e) => {
|
|
|
2485
2505
|
export {
|
|
2486
2506
|
Ce as A,
|
|
2487
2507
|
H as B,
|
|
2488
|
-
|
|
2508
|
+
Ae as C,
|
|
2489
2509
|
qn as D,
|
|
2490
2510
|
eo as E,
|
|
2491
2511
|
Qn as R,
|
|
2492
|
-
|
|
2512
|
+
$n as S,
|
|
2493
2513
|
Ut as T,
|
|
2494
2514
|
kn as _,
|
|
2495
2515
|
Un as a,
|
|
@@ -2502,7 +2522,7 @@ export {
|
|
|
2502
2522
|
j as h,
|
|
2503
2523
|
D as i,
|
|
2504
2524
|
Gn as j,
|
|
2505
|
-
|
|
2525
|
+
$ as k,
|
|
2506
2526
|
k as l,
|
|
2507
2527
|
jn as m,
|
|
2508
2528
|
G as n,
|
|
@@ -2511,7 +2531,7 @@ export {
|
|
|
2511
2531
|
Xn as q,
|
|
2512
2532
|
Yn as r,
|
|
2513
2533
|
Jn as s,
|
|
2514
|
-
|
|
2534
|
+
pt as t,
|
|
2515
2535
|
Tn as u,
|
|
2516
2536
|
Zn as v,
|
|
2517
2537
|
dn as w,
|