@builder.io/sdk-react 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/index.cjs +13 -13
- package/lib/browser/index.mjs +155 -150
- package/lib/edge/index.cjs +20 -20
- package/lib/edge/index.mjs +396 -391
- package/lib/node/index.cjs +13 -13
- package/lib/node/index.mjs +155 -150
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/fetch-builder-props.d.ts +13 -0
- package/types/types/components.d.ts +0 -1
package/lib/node/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as E, Fragment as f, jsx as l } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { j as
|
|
3
|
+
import { createContext as ye, useState as p, useContext as ae, createElement as $e, useRef as Z, useEffect as P } from "react";
|
|
4
|
+
import { j as ee, l as _, i as V, k as F, m as Pe, n as K, T as U, r as Ae, c as Be, o as oe, a as Ve, b as Se, p as Fe, q as re, u as le, v as ce, w as Ne } from "./server-entry-f7504f89.mjs";
|
|
5
5
|
import { _ as an, h as on, f as rn, g as ln, e as cn, d as sn, s as dn, t as un } from "./server-entry-f7504f89.mjs";
|
|
6
6
|
function We(e) {
|
|
7
7
|
return /* @__PURE__ */ E(f, { children: [
|
|
@@ -44,11 +44,11 @@ const ve = {
|
|
|
44
44
|
default: 991,
|
|
45
45
|
max: 1200
|
|
46
46
|
}
|
|
47
|
-
}, se = (e, t = ve) => `@media (max-width: ${t[e].max}px)`,
|
|
47
|
+
}, se = (e, t = ve) => `@media (max-width: ${t[e].max}px)`, ke = ({
|
|
48
48
|
small: e,
|
|
49
49
|
medium: t
|
|
50
50
|
}) => {
|
|
51
|
-
const n =
|
|
51
|
+
const n = ee(ve);
|
|
52
52
|
if (!e || !t)
|
|
53
53
|
return n;
|
|
54
54
|
const i = Math.floor(e / 2);
|
|
@@ -162,7 +162,7 @@ const _e = ({
|
|
|
162
162
|
}) => {
|
|
163
163
|
if (!e.bindings)
|
|
164
164
|
return e;
|
|
165
|
-
const o =
|
|
165
|
+
const o = ee(e), r = {
|
|
166
166
|
...o,
|
|
167
167
|
properties: {
|
|
168
168
|
...o.properties
|
|
@@ -183,7 +183,7 @@ const _e = ({
|
|
|
183
183
|
}
|
|
184
184
|
return r;
|
|
185
185
|
};
|
|
186
|
-
function
|
|
186
|
+
function O({
|
|
187
187
|
block: e,
|
|
188
188
|
context: t,
|
|
189
189
|
shouldEvaluateBindings: n,
|
|
@@ -200,11 +200,11 @@ function ee({
|
|
|
200
200
|
context: t
|
|
201
201
|
}) : r;
|
|
202
202
|
}
|
|
203
|
-
const Ke = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(),
|
|
203
|
+
const Ke = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), pe = (e) => Object.entries(e).map(([n, i]) => {
|
|
204
204
|
if (typeof i == "string")
|
|
205
205
|
return `${Ke(n)}: ${i};`;
|
|
206
|
-
}).filter(K), Oe = (e) =>
|
|
207
|
-
`),
|
|
206
|
+
}).filter(K), Oe = (e) => pe(e).join(`
|
|
207
|
+
`), J = ({
|
|
208
208
|
mediaQuery: e,
|
|
209
209
|
className: t,
|
|
210
210
|
styles: n
|
|
@@ -216,51 +216,56 @@ const Ke = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase
|
|
|
216
216
|
${i}
|
|
217
217
|
}` : i;
|
|
218
218
|
};
|
|
219
|
-
function
|
|
219
|
+
function z(e) {
|
|
220
220
|
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
221
221
|
}
|
|
222
222
|
function te(e) {
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
function t() {
|
|
224
|
+
const i = O({
|
|
225
225
|
block: e.block,
|
|
226
226
|
localState: e.context.localState,
|
|
227
227
|
rootState: e.context.rootState,
|
|
228
228
|
rootSetState: e.context.rootSetState,
|
|
229
229
|
context: e.context.context,
|
|
230
230
|
shouldEvaluateBindings: !0
|
|
231
|
-
})
|
|
232
|
-
|
|
233
|
-
function i() {
|
|
234
|
-
return K(t.hide) ? !t.hide : K(t.show) ? t.show : !0;
|
|
231
|
+
});
|
|
232
|
+
return K(i.hide) ? !i.hide : K(i.show) ? i.show : !0;
|
|
235
233
|
}
|
|
236
|
-
function
|
|
234
|
+
function n() {
|
|
237
235
|
var h;
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
236
|
+
const i = O({
|
|
237
|
+
block: e.block,
|
|
238
|
+
localState: e.context.localState,
|
|
239
|
+
rootState: e.context.rootState,
|
|
240
|
+
rootSetState: e.context.rootSetState,
|
|
241
|
+
context: e.context.context,
|
|
242
|
+
shouldEvaluateBindings: !0
|
|
243
|
+
}), a = i.responsiveStyles, o = e.context.content, r = ke(
|
|
244
|
+
((h = o == null ? void 0 : o.meta) == null ? void 0 : h.breakpoints) || {}
|
|
245
|
+
), d = a == null ? void 0 : a.large, c = a == null ? void 0 : a.medium, s = a == null ? void 0 : a.small, u = i.id;
|
|
246
|
+
if (!u)
|
|
242
247
|
return "";
|
|
243
|
-
const
|
|
244
|
-
className:
|
|
245
|
-
styles:
|
|
246
|
-
}) : "",
|
|
247
|
-
className:
|
|
248
|
-
styles:
|
|
248
|
+
const m = d ? J({
|
|
249
|
+
className: u,
|
|
250
|
+
styles: d
|
|
251
|
+
}) : "", y = c ? J({
|
|
252
|
+
className: u,
|
|
253
|
+
styles: c,
|
|
249
254
|
mediaQuery: se(
|
|
250
255
|
"medium",
|
|
251
|
-
|
|
256
|
+
r
|
|
252
257
|
)
|
|
253
|
-
}) : "",
|
|
254
|
-
className:
|
|
255
|
-
styles:
|
|
258
|
+
}) : "", k = s ? J({
|
|
259
|
+
className: u,
|
|
260
|
+
styles: s,
|
|
256
261
|
mediaQuery: se(
|
|
257
262
|
"small",
|
|
258
|
-
|
|
263
|
+
r
|
|
259
264
|
)
|
|
260
265
|
}) : "";
|
|
261
|
-
return [
|
|
266
|
+
return [m, y, k].join(" ");
|
|
262
267
|
}
|
|
263
|
-
return /* @__PURE__ */ l(f, { children:
|
|
268
|
+
return /* @__PURE__ */ l(f, { children: n() && t() ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(z, { styles: n() }) }) : null });
|
|
264
269
|
}
|
|
265
270
|
function He(e) {
|
|
266
271
|
var t;
|
|
@@ -273,13 +278,13 @@ function He(e) {
|
|
|
273
278
|
builderBlock: e
|
|
274
279
|
};
|
|
275
280
|
}
|
|
276
|
-
const ze = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"],
|
|
281
|
+
const ze = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], Y = (e) => typeof e == "string" && ze.includes(e.toLowerCase()), qe = ({
|
|
277
282
|
block: e,
|
|
278
283
|
context: t,
|
|
279
284
|
registeredComponents: n
|
|
280
285
|
}) => {
|
|
281
286
|
var o;
|
|
282
|
-
const i = (o =
|
|
287
|
+
const i = (o = O({
|
|
283
288
|
block: e,
|
|
284
289
|
localState: t.localState,
|
|
285
290
|
rootState: t.rootState,
|
|
@@ -341,9 +346,9 @@ const ze = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
341
346
|
inheritedStyles: {}
|
|
342
347
|
});
|
|
343
348
|
function Je(e) {
|
|
344
|
-
const [t, n] =
|
|
349
|
+
const [t, n] = p(() => e.repeatContext);
|
|
345
350
|
return /* @__PURE__ */ l(ne.Provider, { value: t, children: /* @__PURE__ */ l(
|
|
346
|
-
|
|
351
|
+
q,
|
|
347
352
|
{
|
|
348
353
|
block: e.block,
|
|
349
354
|
context: t,
|
|
@@ -363,7 +368,7 @@ const Ge = (e) => `on${Ye(e)}`, Qe = (e, t) => (n) => M({
|
|
|
363
368
|
event: n,
|
|
364
369
|
isExpression: !1
|
|
365
370
|
});
|
|
366
|
-
function
|
|
371
|
+
function Q(e) {
|
|
367
372
|
const t = {}, n = e.block.actions ?? {};
|
|
368
373
|
for (const i in n) {
|
|
369
374
|
if (!n.hasOwnProperty(i))
|
|
@@ -390,7 +395,7 @@ function Xe(e) {
|
|
|
390
395
|
const Ze = (e) => ({
|
|
391
396
|
href: e.href
|
|
392
397
|
});
|
|
393
|
-
function
|
|
398
|
+
function H({
|
|
394
399
|
block: e,
|
|
395
400
|
context: t
|
|
396
401
|
}) {
|
|
@@ -410,7 +415,7 @@ function et(e) {
|
|
|
410
415
|
case "vue2":
|
|
411
416
|
case "vue3":
|
|
412
417
|
case "solid":
|
|
413
|
-
return
|
|
418
|
+
return pe(e).join(" ");
|
|
414
419
|
case "qwik":
|
|
415
420
|
case "reactNative":
|
|
416
421
|
case "react":
|
|
@@ -424,11 +429,11 @@ function tt(e) {
|
|
|
424
429
|
{
|
|
425
430
|
...e.wrapperProps,
|
|
426
431
|
attributes: {
|
|
427
|
-
...
|
|
432
|
+
...H({
|
|
428
433
|
block: e.block,
|
|
429
434
|
context: e.context
|
|
430
435
|
}),
|
|
431
|
-
...
|
|
436
|
+
...Q({
|
|
432
437
|
block: e.block,
|
|
433
438
|
rootState: e.context.rootState,
|
|
434
439
|
rootSetState: e.context.rootSetState,
|
|
@@ -460,7 +465,7 @@ const nt = ({
|
|
|
460
465
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
461
466
|
*/
|
|
462
467
|
...a ? {
|
|
463
|
-
attributes:
|
|
468
|
+
attributes: H({
|
|
464
469
|
block: t,
|
|
465
470
|
context: r
|
|
466
471
|
})
|
|
@@ -468,7 +473,7 @@ const nt = ({
|
|
|
468
473
|
};
|
|
469
474
|
function de(e) {
|
|
470
475
|
var i, a;
|
|
471
|
-
const [t, n] =
|
|
476
|
+
const [t, n] = p(
|
|
472
477
|
() => e.isInteractive ? tt : e.componentRef
|
|
473
478
|
);
|
|
474
479
|
return /* @__PURE__ */ l(f, { children: e.componentRef ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ E(
|
|
@@ -485,7 +490,7 @@ function de(e) {
|
|
|
485
490
|
}),
|
|
486
491
|
children: [
|
|
487
492
|
(i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
|
|
488
|
-
|
|
493
|
+
q,
|
|
489
494
|
{
|
|
490
495
|
block: o,
|
|
491
496
|
context: e.context,
|
|
@@ -511,11 +516,11 @@ function ue(e) {
|
|
|
511
516
|
e.hasChildren ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ E(
|
|
512
517
|
e.Wrapper,
|
|
513
518
|
{
|
|
514
|
-
...
|
|
519
|
+
...H({
|
|
515
520
|
block: e.block,
|
|
516
521
|
context: e.context
|
|
517
522
|
}),
|
|
518
|
-
...
|
|
523
|
+
...Q({
|
|
519
524
|
block: e.block,
|
|
520
525
|
rootState: e.context.rootState,
|
|
521
526
|
rootSetState: e.context.rootSetState,
|
|
@@ -532,11 +537,11 @@ function ue(e) {
|
|
|
532
537
|
) }) : /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
533
538
|
e.Wrapper,
|
|
534
539
|
{
|
|
535
|
-
...
|
|
540
|
+
...H({
|
|
536
541
|
block: e.block,
|
|
537
542
|
context: e.context
|
|
538
543
|
}),
|
|
539
|
-
...
|
|
544
|
+
...Q({
|
|
540
545
|
block: e.block,
|
|
541
546
|
rootState: e.context.rootState,
|
|
542
547
|
rootSetState: e.context.rootSetState,
|
|
@@ -549,8 +554,8 @@ function ue(e) {
|
|
|
549
554
|
" "
|
|
550
555
|
] });
|
|
551
556
|
}
|
|
552
|
-
function
|
|
553
|
-
var u, m, y,
|
|
557
|
+
function q(e) {
|
|
558
|
+
var u, m, y, k;
|
|
554
559
|
function t() {
|
|
555
560
|
return qe({
|
|
556
561
|
block: e.block,
|
|
@@ -565,7 +570,7 @@ function z(e) {
|
|
|
565
570
|
});
|
|
566
571
|
}
|
|
567
572
|
function i() {
|
|
568
|
-
return n() ? e.block :
|
|
573
|
+
return n() ? e.block : O({
|
|
569
574
|
block: e.block,
|
|
570
575
|
localState: e.context.localState,
|
|
571
576
|
rootState: e.context.rootState,
|
|
@@ -581,18 +586,18 @@ function z(e) {
|
|
|
581
586
|
return "hide" in i() ? !i().hide : "show" in i() ? i().show : !0;
|
|
582
587
|
}
|
|
583
588
|
function r() {
|
|
584
|
-
var
|
|
585
|
-
return !((
|
|
589
|
+
var x;
|
|
590
|
+
return !((x = t == null ? void 0 : t()) != null && x.component) && !n() ? i().children ?? [] : [];
|
|
586
591
|
}
|
|
587
592
|
function d() {
|
|
588
|
-
var
|
|
593
|
+
var h, x, C, T, g;
|
|
589
594
|
return {
|
|
590
595
|
blockChildren: i().children ?? [],
|
|
591
|
-
componentRef: (
|
|
596
|
+
componentRef: (h = t == null ? void 0 : t()) == null ? void 0 : h.component,
|
|
592
597
|
componentOptions: {
|
|
593
598
|
...He(i()),
|
|
594
599
|
builderContext: e.context,
|
|
595
|
-
...((
|
|
600
|
+
...((x = t == null ? void 0 : t()) == null ? void 0 : x.name) === "Symbol" || ((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Columns" ? {
|
|
596
601
|
builderComponents: e.registeredComponents
|
|
597
602
|
} : {}
|
|
598
603
|
},
|
|
@@ -603,9 +608,9 @@ function z(e) {
|
|
|
603
608
|
isInteractive: !((g = t == null ? void 0 : t()) != null && g.isRSC)
|
|
604
609
|
};
|
|
605
610
|
}
|
|
606
|
-
const [c, s] =
|
|
611
|
+
const [c, s] = p(() => e.context);
|
|
607
612
|
return /* @__PURE__ */ l(f, { children: o() ? /* @__PURE__ */ l(f, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(de, { ...d() }) }) : /* @__PURE__ */ E(f, { children: [
|
|
608
|
-
|
|
613
|
+
Y(a()) ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
609
614
|
ue,
|
|
610
615
|
{
|
|
611
616
|
Wrapper: a(),
|
|
@@ -614,16 +619,16 @@ function z(e) {
|
|
|
614
619
|
hasChildren: !1
|
|
615
620
|
}
|
|
616
621
|
) }) : null,
|
|
617
|
-
!
|
|
622
|
+
!Y(a()) && n() ? /* @__PURE__ */ l(f, { children: (m = n()) == null ? void 0 : m.map((h, x) => /* @__PURE__ */ l(
|
|
618
623
|
Je,
|
|
619
624
|
{
|
|
620
|
-
repeatContext:
|
|
621
|
-
block:
|
|
625
|
+
repeatContext: h.context,
|
|
626
|
+
block: h.block,
|
|
622
627
|
registeredComponents: e.registeredComponents
|
|
623
628
|
},
|
|
624
|
-
|
|
629
|
+
x
|
|
625
630
|
)) }) : null,
|
|
626
|
-
!
|
|
631
|
+
!Y(a()) && !n() ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ E(
|
|
627
632
|
ue,
|
|
628
633
|
{
|
|
629
634
|
Wrapper: a(),
|
|
@@ -632,22 +637,22 @@ function z(e) {
|
|
|
632
637
|
hasChildren: !0,
|
|
633
638
|
children: [
|
|
634
639
|
/* @__PURE__ */ l(de, { ...d() }),
|
|
635
|
-
(y = r()) == null ? void 0 : y.map((
|
|
636
|
-
|
|
640
|
+
(y = r()) == null ? void 0 : y.map((h) => /* @__PURE__ */ l(
|
|
641
|
+
q,
|
|
637
642
|
{
|
|
638
|
-
block:
|
|
643
|
+
block: h,
|
|
639
644
|
context: c,
|
|
640
645
|
registeredComponents: e.registeredComponents
|
|
641
646
|
},
|
|
642
|
-
"block-" +
|
|
647
|
+
"block-" + h.id
|
|
643
648
|
)),
|
|
644
|
-
(
|
|
649
|
+
(k = r()) == null ? void 0 : k.map((h) => /* @__PURE__ */ l(
|
|
645
650
|
te,
|
|
646
651
|
{
|
|
647
|
-
block:
|
|
652
|
+
block: h,
|
|
648
653
|
context: c
|
|
649
654
|
},
|
|
650
|
-
"block-style-" +
|
|
655
|
+
"block-style-" + h.id
|
|
651
656
|
))
|
|
652
657
|
]
|
|
653
658
|
}
|
|
@@ -719,7 +724,7 @@ function ie(e) {
|
|
|
719
724
|
styleProp: e.styleProp,
|
|
720
725
|
children: [
|
|
721
726
|
e.blocks ? /* @__PURE__ */ l(f, { children: (i = e.blocks) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
|
|
722
|
-
|
|
727
|
+
q,
|
|
723
728
|
{
|
|
724
729
|
block: o,
|
|
725
730
|
context: e.context || t,
|
|
@@ -741,9 +746,9 @@ function ie(e) {
|
|
|
741
746
|
}
|
|
742
747
|
function at(e) {
|
|
743
748
|
var T;
|
|
744
|
-
const [t, n] =
|
|
749
|
+
const [t, n] = p(
|
|
745
750
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
746
|
-
), [i, a] =
|
|
751
|
+
), [i, a] = p(() => e.columns || []), [o, r] = p(
|
|
747
752
|
() => e.stackColumnsAt || "tablet"
|
|
748
753
|
);
|
|
749
754
|
function d(g) {
|
|
@@ -766,10 +771,10 @@ function at(e) {
|
|
|
766
771
|
}) {
|
|
767
772
|
return o === "never" ? R : g;
|
|
768
773
|
}
|
|
769
|
-
const [m, y] =
|
|
774
|
+
const [m, y] = p(
|
|
770
775
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
771
776
|
);
|
|
772
|
-
function
|
|
777
|
+
function k() {
|
|
773
778
|
return {
|
|
774
779
|
"--flex-dir": m,
|
|
775
780
|
"--flex-dir-tablet": s({
|
|
@@ -778,7 +783,7 @@ function at(e) {
|
|
|
778
783
|
})
|
|
779
784
|
};
|
|
780
785
|
}
|
|
781
|
-
function
|
|
786
|
+
function h(g) {
|
|
782
787
|
const R = g === 0 ? 0 : t, A = c(g), B = `${R}px`, N = "100%", W = 0;
|
|
783
788
|
return {
|
|
784
789
|
width: A,
|
|
@@ -801,15 +806,15 @@ function at(e) {
|
|
|
801
806
|
})
|
|
802
807
|
};
|
|
803
808
|
}
|
|
804
|
-
function
|
|
809
|
+
function x(g) {
|
|
805
810
|
var A, B;
|
|
806
|
-
return
|
|
811
|
+
return ke(
|
|
807
812
|
((B = (A = e.builderContext.content) == null ? void 0 : A.meta) == null ? void 0 : B.breakpoints) || {}
|
|
808
813
|
)[g].max;
|
|
809
814
|
}
|
|
810
815
|
function C() {
|
|
811
816
|
return `
|
|
812
|
-
@media (max-width: ${
|
|
817
|
+
@media (max-width: ${x("medium")}px) {
|
|
813
818
|
.${e.builderBlock.id}-breakpoints {
|
|
814
819
|
flex-direction: var(--flex-dir-tablet);
|
|
815
820
|
align-items: stretch;
|
|
@@ -821,7 +826,7 @@ function at(e) {
|
|
|
821
826
|
}
|
|
822
827
|
}
|
|
823
828
|
|
|
824
|
-
@media (max-width: ${
|
|
829
|
+
@media (max-width: ${x("small")}px) {
|
|
825
830
|
.${e.builderBlock.id}-breakpoints {
|
|
826
831
|
flex-direction: var(--flex-dir);
|
|
827
832
|
align-items: stretch;
|
|
@@ -839,14 +844,14 @@ function at(e) {
|
|
|
839
844
|
"div",
|
|
840
845
|
{
|
|
841
846
|
className: `builder-columns ${e.builderBlock.id}-breakpoints div-d734ad62`,
|
|
842
|
-
style:
|
|
847
|
+
style: k(),
|
|
843
848
|
children: [
|
|
844
|
-
/* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
849
|
+
/* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(z, { styles: C() }) }),
|
|
845
850
|
(T = e.columns) == null ? void 0 : T.map((g, R) => /* @__PURE__ */ $e(
|
|
846
851
|
"div",
|
|
847
852
|
{
|
|
848
853
|
className: "builder-column div-d734ad62-2",
|
|
849
|
-
style:
|
|
854
|
+
style: h(R),
|
|
850
855
|
key: R
|
|
851
856
|
},
|
|
852
857
|
/* @__PURE__ */ l(
|
|
@@ -898,7 +903,7 @@ function lt(e, t) {
|
|
|
898
903
|
}
|
|
899
904
|
return null;
|
|
900
905
|
}
|
|
901
|
-
function
|
|
906
|
+
function G(e) {
|
|
902
907
|
if (!e)
|
|
903
908
|
return e;
|
|
904
909
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
@@ -920,10 +925,10 @@ function ct(e) {
|
|
|
920
925
|
return e.srcset;
|
|
921
926
|
if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
|
|
922
927
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
923
|
-
return console.debug("Removed given srcset"),
|
|
928
|
+
return console.debug("Removed given srcset"), G(s);
|
|
924
929
|
} else if (e.image && !e.srcset)
|
|
925
|
-
return
|
|
926
|
-
return
|
|
930
|
+
return G(s);
|
|
931
|
+
return G(s);
|
|
927
932
|
}
|
|
928
933
|
function n() {
|
|
929
934
|
var c;
|
|
@@ -1024,34 +1029,34 @@ const L = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t
|
|
|
1024
1029
|
function ut(e, t, n) {
|
|
1025
1030
|
var r;
|
|
1026
1031
|
function i() {
|
|
1027
|
-
function d(
|
|
1032
|
+
function d(h, x, C) {
|
|
1028
1033
|
let T = "";
|
|
1029
1034
|
if (C) {
|
|
1030
1035
|
const g = /* @__PURE__ */ new Date();
|
|
1031
1036
|
g.setTime(g.getTime() + C * 24 * 60 * 60 * 1e3), T = "; expires=" + g.toUTCString();
|
|
1032
1037
|
}
|
|
1033
|
-
document.cookie =
|
|
1038
|
+
document.cookie = h + "=" + (x || "") + T + "; path=/; Secure; SameSite=None";
|
|
1034
1039
|
}
|
|
1035
|
-
function c(
|
|
1036
|
-
const
|
|
1040
|
+
function c(h) {
|
|
1041
|
+
const x = h + "=", C = document.cookie.split(";");
|
|
1037
1042
|
for (let T = 0; T < C.length; T++) {
|
|
1038
1043
|
let g = C[T];
|
|
1039
1044
|
for (; g.charAt(0) === " "; )
|
|
1040
1045
|
g = g.substring(1, g.length);
|
|
1041
|
-
if (g.indexOf(
|
|
1042
|
-
return g.substring(
|
|
1046
|
+
if (g.indexOf(x) === 0)
|
|
1047
|
+
return g.substring(x.length, g.length);
|
|
1043
1048
|
}
|
|
1044
1049
|
return null;
|
|
1045
1050
|
}
|
|
1046
|
-
const s = `builder.tests.${e}`, u = c(s), m = t.map((
|
|
1051
|
+
const s = `builder.tests.${e}`, u = c(s), m = t.map((h) => h.id).concat(e);
|
|
1047
1052
|
if (u && m.includes(u))
|
|
1048
1053
|
return u;
|
|
1049
1054
|
let y = 0;
|
|
1050
|
-
const
|
|
1051
|
-
for (let
|
|
1052
|
-
const
|
|
1053
|
-
if (y += C,
|
|
1054
|
-
return d(s,
|
|
1055
|
+
const k = Math.random();
|
|
1056
|
+
for (let h = 0; h < t.length; h++) {
|
|
1057
|
+
const x = t[h], C = x.testRatio;
|
|
1058
|
+
if (y += C, k < y)
|
|
1059
|
+
return d(s, x.id), x.id;
|
|
1055
1060
|
}
|
|
1056
1061
|
return d(s, e), e;
|
|
1057
1062
|
}
|
|
@@ -1075,11 +1080,11 @@ function mt(e, t, n) {
|
|
|
1075
1080
|
function i(s) {
|
|
1076
1081
|
const u = s + "=", m = document.cookie.split(";");
|
|
1077
1082
|
for (let y = 0; y < m.length; y++) {
|
|
1078
|
-
let
|
|
1079
|
-
for (;
|
|
1080
|
-
|
|
1081
|
-
if (
|
|
1082
|
-
return
|
|
1083
|
+
let k = m[y];
|
|
1084
|
+
for (; k.charAt(0) === " "; )
|
|
1085
|
+
k = k.substring(1, k.length);
|
|
1086
|
+
if (k.indexOf(u) === 0)
|
|
1087
|
+
return k.substring(u.length, k.length);
|
|
1083
1088
|
}
|
|
1084
1089
|
return null;
|
|
1085
1090
|
}
|
|
@@ -1444,7 +1449,7 @@ const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builde
|
|
|
1444
1449
|
advanced: !0,
|
|
1445
1450
|
defaultValue: 0.7041
|
|
1446
1451
|
}]
|
|
1447
|
-
},
|
|
1452
|
+
}, kt = {
|
|
1448
1453
|
name: "Core:Section",
|
|
1449
1454
|
static: !0,
|
|
1450
1455
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1483,7 +1488,7 @@ const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builde
|
|
|
1483
1488
|
}
|
|
1484
1489
|
}
|
|
1485
1490
|
}]
|
|
1486
|
-
},
|
|
1491
|
+
}, pt = {
|
|
1487
1492
|
name: "Symbol",
|
|
1488
1493
|
noWrap: !0,
|
|
1489
1494
|
static: !0,
|
|
@@ -1538,7 +1543,7 @@ const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builde
|
|
|
1538
1543
|
function wt(e) {
|
|
1539
1544
|
var t;
|
|
1540
1545
|
return /* @__PURE__ */ l(
|
|
1541
|
-
"
|
|
1546
|
+
"div",
|
|
1542
1547
|
{
|
|
1543
1548
|
className: "builder-text",
|
|
1544
1549
|
dangerouslySetInnerHTML: { __html: ((t = e.text) == null ? void 0 : t.toString()) || "" },
|
|
@@ -1704,7 +1709,7 @@ const Rt = {
|
|
|
1704
1709
|
}]
|
|
1705
1710
|
}, Et = ["text/javascript", "application/javascript", "application/ecmascript"], $t = (e) => Et.includes(e.type);
|
|
1706
1711
|
function Pt(e) {
|
|
1707
|
-
const t =
|
|
1712
|
+
const t = Z(null), [n, i] = p(() => []), [a, o] = p(() => []), [r, d] = p(() => !1);
|
|
1708
1713
|
function c() {
|
|
1709
1714
|
if (!t.current || !t.current.getElementsByTagName)
|
|
1710
1715
|
return;
|
|
@@ -1765,7 +1770,7 @@ const Bt = {
|
|
|
1765
1770
|
static: !0
|
|
1766
1771
|
};
|
|
1767
1772
|
function Vt(e) {
|
|
1768
|
-
const t =
|
|
1773
|
+
const t = Z(null), [n, i] = p(() => []), [a, o] = p(() => []);
|
|
1769
1774
|
function r() {
|
|
1770
1775
|
if (t.current && t.current.getElementsByTagName && typeof window < "u") {
|
|
1771
1776
|
const d = t.current.getElementsByTagName("script");
|
|
@@ -1849,10 +1854,10 @@ const Ft = {
|
|
|
1849
1854
|
...Bt
|
|
1850
1855
|
}, {
|
|
1851
1856
|
component: st,
|
|
1852
|
-
...
|
|
1857
|
+
...kt
|
|
1853
1858
|
}, {
|
|
1854
1859
|
component: Yt,
|
|
1855
|
-
...
|
|
1860
|
+
...pt
|
|
1856
1861
|
}, {
|
|
1857
1862
|
component: wt,
|
|
1858
1863
|
...Ct
|
|
@@ -1895,7 +1900,7 @@ font-weight: ${r};
|
|
|
1895
1900
|
contentId: t
|
|
1896
1901
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
1897
1902
|
function Mt(e) {
|
|
1898
|
-
const [t, n] =
|
|
1903
|
+
const [t, n] = p(
|
|
1899
1904
|
() => `
|
|
1900
1905
|
${jt({
|
|
1901
1906
|
cssCode: e.cssCode,
|
|
@@ -1919,7 +1924,7 @@ ${Wt({
|
|
|
1919
1924
|
}
|
|
1920
1925
|
`.trim()
|
|
1921
1926
|
);
|
|
1922
|
-
return /* @__PURE__ */ l(
|
|
1927
|
+
return /* @__PURE__ */ l(z, { styles: t });
|
|
1923
1928
|
}
|
|
1924
1929
|
const Ut = ({
|
|
1925
1930
|
content: e,
|
|
@@ -1953,7 +1958,7 @@ const Ut = ({
|
|
|
1953
1958
|
...t
|
|
1954
1959
|
},
|
|
1955
1960
|
meta: e == null ? void 0 : e.meta
|
|
1956
|
-
} : void 0, _t = "0.6.
|
|
1961
|
+
} : void 0, _t = "0.6.3", Kt = () => {
|
|
1957
1962
|
Ae("insertMenu", {
|
|
1958
1963
|
name: "_default",
|
|
1959
1964
|
default: !0,
|
|
@@ -2016,8 +2021,8 @@ const Ot = (e = {}) => {
|
|
|
2016
2021
|
error: m.message
|
|
2017
2022
|
}
|
|
2018
2023
|
}, "*") : u && typeof u.then == "function" ? u.then((y) => {
|
|
2019
|
-
var
|
|
2020
|
-
(
|
|
2024
|
+
var k;
|
|
2025
|
+
(k = window.parent) == null || k.postMessage({
|
|
2021
2026
|
type: "builder.evaluateResult",
|
|
2022
2027
|
data: {
|
|
2023
2028
|
id: c,
|
|
@@ -2080,10 +2085,10 @@ const Ht = (e, t, n = !0) => {
|
|
|
2080
2085
|
};
|
|
2081
2086
|
};
|
|
2082
2087
|
function Dt(e) {
|
|
2083
|
-
var A, B, N, W,
|
|
2084
|
-
const t =
|
|
2088
|
+
var A, B, N, W, D;
|
|
2089
|
+
const t = Z(null), [n, i] = p(
|
|
2085
2090
|
() => K(e.canTrack) ? e.canTrack : !0
|
|
2086
|
-
), [a, o] =
|
|
2091
|
+
), [a, o] = p(() => 0);
|
|
2087
2092
|
function r(S) {
|
|
2088
2093
|
var b, v, I, $, j;
|
|
2089
2094
|
const w = {
|
|
@@ -2104,8 +2109,8 @@ function Dt(e) {
|
|
|
2104
2109
|
content: w
|
|
2105
2110
|
}));
|
|
2106
2111
|
}
|
|
2107
|
-
|
|
2108
|
-
const [d, c] =
|
|
2112
|
+
p(() => 0);
|
|
2113
|
+
const [d, c] = p(
|
|
2109
2114
|
() => !1
|
|
2110
2115
|
);
|
|
2111
2116
|
function s(S) {
|
|
@@ -2142,8 +2147,8 @@ function Dt(e) {
|
|
|
2142
2147
|
rootSetState: e.builderContextSignal.rootSetState
|
|
2143
2148
|
});
|
|
2144
2149
|
}
|
|
2145
|
-
const [m, y] =
|
|
2146
|
-
function
|
|
2150
|
+
const [m, y] = p(() => ({})), [k, h] = p(() => !1);
|
|
2151
|
+
function x(S) {
|
|
2147
2152
|
var w, b;
|
|
2148
2153
|
if (e.builderContextSignal.content) {
|
|
2149
2154
|
const v = (w = e.builderContextSignal.content) == null ? void 0 : w.testVariationId, I = (b = e.builderContextSignal.content) == null ? void 0 : b.id;
|
|
@@ -2154,10 +2159,10 @@ function Dt(e) {
|
|
|
2154
2159
|
apiKey: e.apiKey,
|
|
2155
2160
|
variationId: v !== I ? v : void 0,
|
|
2156
2161
|
...qt(S),
|
|
2157
|
-
unique: !
|
|
2162
|
+
unique: !k
|
|
2158
2163
|
});
|
|
2159
2164
|
}
|
|
2160
|
-
|
|
2165
|
+
k || h(!0);
|
|
2161
2166
|
}
|
|
2162
2167
|
function C(S) {
|
|
2163
2168
|
return S.replace(
|
|
@@ -2202,7 +2207,7 @@ function Dt(e) {
|
|
|
2202
2207
|
"builder:component:stateChange",
|
|
2203
2208
|
{
|
|
2204
2209
|
detail: {
|
|
2205
|
-
state:
|
|
2210
|
+
state: ee(e.builderContextSignal.rootState),
|
|
2206
2211
|
ref: {
|
|
2207
2212
|
name: e.model
|
|
2208
2213
|
}
|
|
@@ -2280,8 +2285,8 @@ function Dt(e) {
|
|
|
2280
2285
|
"div",
|
|
2281
2286
|
{
|
|
2282
2287
|
ref: t,
|
|
2283
|
-
onClick: (S) =>
|
|
2284
|
-
"builder-content-id": (
|
|
2288
|
+
onClick: (S) => x(S),
|
|
2289
|
+
"builder-content-id": (D = e.builderContextSignal.content) == null ? void 0 : D.id,
|
|
2285
2290
|
"builder-model": e.model,
|
|
2286
2291
|
...e.showContent ? {} : {
|
|
2287
2292
|
hidden: !0,
|
|
@@ -2293,7 +2298,7 @@ function Dt(e) {
|
|
|
2293
2298
|
a
|
|
2294
2299
|
) }) : null });
|
|
2295
2300
|
}
|
|
2296
|
-
function
|
|
2301
|
+
function X(e) {
|
|
2297
2302
|
return /* @__PURE__ */ l(
|
|
2298
2303
|
"script",
|
|
2299
2304
|
{
|
|
@@ -2303,25 +2308,25 @@ function Q(e) {
|
|
|
2303
2308
|
);
|
|
2304
2309
|
}
|
|
2305
2310
|
function xe(e) {
|
|
2306
|
-
var c, s, u, m, y,
|
|
2307
|
-
const [t, n] =
|
|
2311
|
+
var c, s, u, m, y, k, h;
|
|
2312
|
+
const [t, n] = p(
|
|
2308
2313
|
() => {
|
|
2309
|
-
var
|
|
2314
|
+
var x, C;
|
|
2310
2315
|
return bt({
|
|
2311
2316
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2312
|
-
variationId: (
|
|
2317
|
+
variationId: (x = e.content) == null ? void 0 : x.testVariationId,
|
|
2313
2318
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2314
2319
|
contentId: (C = e.content) == null ? void 0 : C.id
|
|
2315
2320
|
});
|
|
2316
2321
|
}
|
|
2317
2322
|
);
|
|
2318
|
-
function i(
|
|
2323
|
+
function i(x) {
|
|
2319
2324
|
d((C) => ({
|
|
2320
2325
|
...C,
|
|
2321
|
-
rootState:
|
|
2326
|
+
rootState: x
|
|
2322
2327
|
}));
|
|
2323
2328
|
}
|
|
2324
|
-
const [a, o] =
|
|
2329
|
+
const [a, o] = p(
|
|
2325
2330
|
() => [
|
|
2326
2331
|
...fe(),
|
|
2327
2332
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
@@ -2332,8 +2337,8 @@ function xe(e) {
|
|
|
2332
2337
|
...re,
|
|
2333
2338
|
...e.customComponents || []
|
|
2334
2339
|
].reduce(
|
|
2335
|
-
(
|
|
2336
|
-
...
|
|
2340
|
+
(x, { component: C, ...T }) => ({
|
|
2341
|
+
...x,
|
|
2337
2342
|
[T.name]: {
|
|
2338
2343
|
component: C,
|
|
2339
2344
|
...le(T)
|
|
@@ -2341,7 +2346,7 @@ function xe(e) {
|
|
|
2341
2346
|
}),
|
|
2342
2347
|
{}
|
|
2343
2348
|
)
|
|
2344
|
-
), [r, d] =
|
|
2349
|
+
), [r, d] = p(() => ({
|
|
2345
2350
|
content: Lt({
|
|
2346
2351
|
content: e.content,
|
|
2347
2352
|
data: e.data
|
|
@@ -2366,8 +2371,8 @@ function xe(e) {
|
|
|
2366
2371
|
...re,
|
|
2367
2372
|
...e.customComponents || []
|
|
2368
2373
|
].reduce(
|
|
2369
|
-
(
|
|
2370
|
-
...
|
|
2374
|
+
(x, { component: C, ...T }) => ({
|
|
2375
|
+
...x,
|
|
2371
2376
|
[T.name]: le(T)
|
|
2372
2377
|
}),
|
|
2373
2378
|
{}
|
|
@@ -2396,7 +2401,7 @@ function xe(e) {
|
|
|
2396
2401
|
builderContextSignal: r,
|
|
2397
2402
|
setBuilderContextSignal: d,
|
|
2398
2403
|
children: [
|
|
2399
|
-
e.isSsrAbTest ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
2404
|
+
e.isSsrAbTest ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(X, { scriptStr: t }) }) : null,
|
|
2400
2405
|
/* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
2401
2406
|
Mt,
|
|
2402
2407
|
{
|
|
@@ -2408,7 +2413,7 @@ function xe(e) {
|
|
|
2408
2413
|
/* @__PURE__ */ l(
|
|
2409
2414
|
ie,
|
|
2410
2415
|
{
|
|
2411
|
-
blocks: (
|
|
2416
|
+
blocks: (h = (k = r.content) == null ? void 0 : k.data) == null ? void 0 : h.blocks,
|
|
2412
2417
|
context: r,
|
|
2413
2418
|
registeredComponents: a
|
|
2414
2419
|
}
|
|
@@ -2421,7 +2426,7 @@ function xe(e) {
|
|
|
2421
2426
|
}
|
|
2422
2427
|
function Re(e) {
|
|
2423
2428
|
var r, d, c;
|
|
2424
|
-
const [t, n] =
|
|
2429
|
+
const [t, n] = p(
|
|
2425
2430
|
() => dt({
|
|
2426
2431
|
canTrack: ce(e.canTrack),
|
|
2427
2432
|
content: e.content
|
|
@@ -2452,16 +2457,16 @@ function Re(e) {
|
|
|
2452
2457
|
}
|
|
2453
2458
|
return P(() => {
|
|
2454
2459
|
}, []), /* @__PURE__ */ E(f, { children: [
|
|
2455
|
-
!e.__isNestedRender && U !== "reactNative" ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
2460
|
+
!e.__isNestedRender && U !== "reactNative" ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(X, { scriptStr: ht() }) }) : null,
|
|
2456
2461
|
t ? /* @__PURE__ */ E(f, { children: [
|
|
2457
2462
|
/* @__PURE__ */ l(
|
|
2458
|
-
|
|
2463
|
+
z,
|
|
2459
2464
|
{
|
|
2460
2465
|
id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
|
|
2461
2466
|
styles: a()
|
|
2462
2467
|
}
|
|
2463
2468
|
),
|
|
2464
|
-
/* @__PURE__ */ l(
|
|
2469
|
+
/* @__PURE__ */ l(X, { scriptStr: i() }),
|
|
2465
2470
|
(d = L(e.content)) == null ? void 0 : d.map((s) => /* @__PURE__ */ l(
|
|
2466
2471
|
xe,
|
|
2467
2472
|
{
|
|
@@ -2534,7 +2539,7 @@ function Yt(e) {
|
|
|
2534
2539
|
(s = e.symbol) != null && s.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2535
2540
|
].filter(Boolean).join(" ");
|
|
2536
2541
|
}
|
|
2537
|
-
const [n, i] =
|
|
2542
|
+
const [n, i] = p(() => {
|
|
2538
2543
|
var c;
|
|
2539
2544
|
return (c = e.symbol) == null ? void 0 : c.content;
|
|
2540
2545
|
});
|