@builder.io/sdk-react 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +17 -17
- package/lib/browser/blocks-exports.mjs +268 -227
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/init.cjs +1 -1
- package/lib/browser/init.mjs +1 -1
- package/lib/browser/{server-entry-e0454364.cjs → server-entry-419c051e.cjs} +1 -1
- package/lib/browser/{server-entry-709e09e3.js → server-entry-825b4408.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-12c2d408.cjs → accordion-4f96554c.cjs} +1 -1
- package/lib/edge/{accordion-bd80745a.js → accordion-ca081054.js} +1 -1
- package/lib/edge/{blocks-ac8970f1.cjs → blocks-078044bc.cjs} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +4 -3
- package/lib/edge/{blocks-6d6258ba.js → blocks-f55c7d3e.js} +12 -4
- package/lib/edge/{button-4e842584.js → button-41169061.js} +2 -2
- package/lib/edge/{button-c2e45e64.cjs → button-5d140f8e.cjs} +1 -1
- package/lib/edge/columns-354bf349.cjs +28 -0
- package/lib/edge/{columns-a51238cc.js → columns-f8916a18.js} +53 -46
- package/lib/edge/{content-variants-f3c6baad.js → content-variants-71ee0c76.js} +239 -217
- package/lib/edge/{content-variants-3fe9b1c0.cjs → content-variants-89a9389a.cjs} +8 -8
- package/lib/edge/{form-00c8cc55.js → form-ac2f2a0e.js} +3 -3
- package/lib/edge/{form-b4cdf7cd.cjs → form-f2d2c2bf.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-1bbed5bf.js → get-class-prop-name-a677d7a5.js} +1 -1
- package/lib/edge/{get-class-prop-name-3c5f7a7d.cjs → get-class-prop-name-a9b4959e.cjs} +1 -1
- package/lib/edge/image-344ddbb0.cjs +17 -0
- package/lib/edge/{image-68451fc8.js → image-e3fcd611.js} +24 -22
- package/lib/edge/{img-e7db1475.js → img-8fc26395.js} +1 -1
- package/lib/edge/{img-6671da9a.cjs → img-b91cb4fd.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/init.cjs +1 -1
- package/lib/edge/init.mjs +1 -1
- package/lib/edge/{input-2db47a83.js → input-549f090e.js} +1 -1
- package/lib/edge/{input-0f7a9f1c.cjs → input-ec7c695a.cjs} +1 -1
- package/lib/edge/{select-f0859c5f.cjs → select-3ffa9294.cjs} +1 -1
- package/lib/edge/{select-2facacf2.js → select-6a5a28ac.js} +1 -1
- package/lib/edge/{server-entry-ff6a2e2d.cjs → server-entry-966ac144.cjs} +1 -1
- package/lib/edge/{server-entry-75aa714e.js → server-entry-d2020acf.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-8159ca1d.js → slot-40de071b.js} +3 -3
- package/lib/edge/{slot-aee43b86.cjs → slot-8b27e15e.cjs} +1 -1
- package/lib/edge/symbol-76e76298.cjs +1 -0
- package/lib/edge/symbol-e6515a5f.js +85 -0
- package/lib/edge/{tabs-4112a80e.cjs → tabs-9c5af0ec.cjs} +1 -1
- package/lib/edge/{tabs-f5357a4e.js → tabs-b75be82d.js} +3 -3
- package/lib/node/blocks-exports.cjs +15 -15
- package/lib/node/blocks-exports.mjs +269 -228
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +2 -2
- package/lib/node/{node-runtime-eb72e084.cjs → node-runtime-0e37d6f7.cjs} +1 -1
- package/lib/node/{node-runtime-80c4bfc8.js → node-runtime-0f3a5df1.js} +1 -1
- package/lib/node/{server-entry-e8ac67b5.js → server-entry-5ebd1c9b.js} +1 -1
- package/lib/node/{server-entry-b2103255.cjs → server-entry-8002325b.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +15 -15
- package/types/components/content/components/styles.d.ts +2 -1
- package/types/components/content-variants/content-variants.types.d.ts +4 -0
- package/types/components/inlined-script.d.ts +2 -1
- package/types/components/inlined-styles.d.ts +2 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/types.d.ts +1 -0
- package/types/types/builder-props.d.ts +3 -0
- package/lib/edge/columns-bc2b0674.cjs +0 -28
- package/lib/edge/image-ea37781b.cjs +0 -17
- package/lib/edge/symbol-36a155f3.js +0 -84
- package/lib/edge/symbol-a244cc31.cjs +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { isBrowser as
|
|
1
|
+
import { jsx as h, jsxs as H, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as v, useRef as le, useState as k, useEffect as S } from "react";
|
|
3
|
+
import { isBrowser as $, TARGET as te, isEditing as P, registerInsertMenu as se, setupBrowserForEditing as de, createRegisterComponentMessage as ue, getDefaultCanTrack as A, _track as J, isPreviewing as ce, fetchOneEntry as me, logger as pe, createEditorListener as ge, fetch as fe, fastClone as he, serializeComponentInfo as Y, handleABTestingSync as be } from "./server-entry-d2020acf.js";
|
|
4
4
|
import { Video as xe, Button as ye, Columns as ve, Fragment as Se, Image as Te, Section as ke, Symbol as Ce, Text as Ie, BuilderContext as we } from "./blocks-exports.mjs";
|
|
5
|
-
import { triggerAnimation as Ve, evaluate as Q, InlinedStyles as ne, ComponentsContext as Re, Blocks as Ee } from "./blocks-
|
|
6
|
-
import "./get-class-prop-name-
|
|
5
|
+
import { triggerAnimation as Ve, evaluate as Q, InlinedStyles as ne, ComponentsContext as Re, Blocks as Ee } from "./blocks-f55c7d3e.js";
|
|
6
|
+
import "./get-class-prop-name-a677d7a5.js";
|
|
7
7
|
import "./dynamic-renderer-8b343325.js";
|
|
8
|
-
const
|
|
8
|
+
const B = {
|
|
9
9
|
"@type": "@builder.io/sdk:Element",
|
|
10
10
|
layerName: "Accordion item title",
|
|
11
11
|
responsiveStyles: {
|
|
@@ -34,7 +34,7 @@ const A = {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}]
|
|
37
|
-
},
|
|
37
|
+
}, D = {
|
|
38
38
|
"@type": "@builder.io/sdk:Element",
|
|
39
39
|
layerName: "Accordion item detail",
|
|
40
40
|
responsiveStyles: {
|
|
@@ -82,19 +82,19 @@ const A = {
|
|
|
82
82
|
name: "title",
|
|
83
83
|
type: "uiBlocks",
|
|
84
84
|
hideFromUI: !0,
|
|
85
|
-
defaultValue: [
|
|
85
|
+
defaultValue: [B]
|
|
86
86
|
}, {
|
|
87
87
|
name: "detail",
|
|
88
88
|
type: "uiBlocks",
|
|
89
89
|
hideFromUI: !0,
|
|
90
|
-
defaultValue: [
|
|
90
|
+
defaultValue: [D]
|
|
91
91
|
}],
|
|
92
92
|
defaultValue: [{
|
|
93
|
-
title: [
|
|
94
|
-
detail: [
|
|
93
|
+
title: [B],
|
|
94
|
+
detail: [D]
|
|
95
95
|
}, {
|
|
96
|
-
title: [
|
|
97
|
-
detail: [
|
|
96
|
+
title: [B],
|
|
97
|
+
detail: [D]
|
|
98
98
|
}],
|
|
99
99
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
100
100
|
}, {
|
|
@@ -129,7 +129,7 @@ const A = {
|
|
|
129
129
|
builderComponents: !0,
|
|
130
130
|
builderLinkComponent: !0
|
|
131
131
|
}
|
|
132
|
-
}, Pe =
|
|
132
|
+
}, Pe = v(() => import("./accordion-ca081054.js")), We = {
|
|
133
133
|
name: "Core:Button",
|
|
134
134
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
135
135
|
defaultStyles: {
|
|
@@ -344,7 +344,7 @@ const A = {
|
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
const n = e.get("columns");
|
|
347
|
-
Array.isArray(n) && n.find((d) => d.get("width")) && (n.find((
|
|
347
|
+
Array.isArray(n) && n.find((d) => d.get("width")) && (n.find((m) => !m.get("width")) || n.reduce((o, p) => o + p.get("width"), 0) !== 100) && t();
|
|
348
348
|
}
|
|
349
349
|
}, {
|
|
350
350
|
name: "space",
|
|
@@ -399,25 +399,25 @@ const A = {
|
|
|
399
399
|
onChange: (e) => {
|
|
400
400
|
e.delete("srcset"), e.delete("noWebp");
|
|
401
401
|
function n(a, o = 6e4) {
|
|
402
|
-
return new Promise((
|
|
403
|
-
const
|
|
404
|
-
let
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
},
|
|
408
|
-
console.warn("Image load failed",
|
|
409
|
-
}),
|
|
410
|
-
|
|
402
|
+
return new Promise((p, b) => {
|
|
403
|
+
const C = document.createElement("img");
|
|
404
|
+
let T = !1;
|
|
405
|
+
C.onload = () => {
|
|
406
|
+
T = !0, p(C);
|
|
407
|
+
}, C.addEventListener("error", (V) => {
|
|
408
|
+
console.warn("Image load failed", V.error), b(V.error);
|
|
409
|
+
}), C.src = a, setTimeout(() => {
|
|
410
|
+
T || b(new Error("Image load timed out"));
|
|
411
411
|
}, o);
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
function i(a) {
|
|
415
415
|
return Math.round(a * 1e3) / 1e3;
|
|
416
416
|
}
|
|
417
|
-
const d = e.get("image"),
|
|
417
|
+
const d = e.get("image"), m = e.get("aspectRatio");
|
|
418
418
|
if (fetch(d).then((a) => a.blob()).then((a) => {
|
|
419
419
|
a.type.includes("svg") && e.set("noWebp", !0);
|
|
420
|
-
}), d && (!
|
|
420
|
+
}), d && (!m || m === 0.7041))
|
|
421
421
|
return n(d).then((a) => {
|
|
422
422
|
const o = e.get("aspectRatio");
|
|
423
423
|
e.get("image") === d && (!o || o === 0.7041) && a.width && a.height && (e.set("aspectRatio", i(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
|
|
@@ -541,7 +541,7 @@ const A = {
|
|
|
541
541
|
shouldReceiveBuilderProps: {
|
|
542
542
|
builderContext: !0
|
|
543
543
|
}
|
|
544
|
-
}, He =
|
|
544
|
+
}, He = v(() => import("./slot-40de071b.js")), $e = {
|
|
545
545
|
name: "Symbol",
|
|
546
546
|
noWrap: !0,
|
|
547
547
|
static: !0,
|
|
@@ -580,7 +580,7 @@ const A = {
|
|
|
580
580
|
builderComponents: !0,
|
|
581
581
|
builderLinkComponent: !0
|
|
582
582
|
}
|
|
583
|
-
},
|
|
583
|
+
}, U = {
|
|
584
584
|
"@type": "@builder.io/sdk:Element",
|
|
585
585
|
responsiveStyles: {
|
|
586
586
|
large: {
|
|
@@ -602,7 +602,7 @@ const A = {
|
|
|
602
602
|
text: "New tab"
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
},
|
|
605
|
+
}, L = {
|
|
606
606
|
"@type": "@builder.io/sdk:Element",
|
|
607
607
|
responsiveStyles: {
|
|
608
608
|
large: {
|
|
@@ -628,16 +628,16 @@ const A = {
|
|
|
628
628
|
name: "label",
|
|
629
629
|
type: "uiBlocks",
|
|
630
630
|
hideFromUI: !0,
|
|
631
|
-
defaultValue: [
|
|
631
|
+
defaultValue: [U]
|
|
632
632
|
}, {
|
|
633
633
|
name: "content",
|
|
634
634
|
type: "uiBlocks",
|
|
635
635
|
hideFromUI: !0,
|
|
636
|
-
defaultValue: [
|
|
636
|
+
defaultValue: [L]
|
|
637
637
|
}],
|
|
638
638
|
defaultValue: [{
|
|
639
639
|
label: [{
|
|
640
|
-
...
|
|
640
|
+
...U,
|
|
641
641
|
component: {
|
|
642
642
|
name: "Text",
|
|
643
643
|
options: {
|
|
@@ -646,7 +646,7 @@ const A = {
|
|
|
646
646
|
}
|
|
647
647
|
}],
|
|
648
648
|
content: [{
|
|
649
|
-
...
|
|
649
|
+
...L,
|
|
650
650
|
component: {
|
|
651
651
|
name: "Text",
|
|
652
652
|
options: {
|
|
@@ -656,7 +656,7 @@ const A = {
|
|
|
656
656
|
}]
|
|
657
657
|
}, {
|
|
658
658
|
label: [{
|
|
659
|
-
...
|
|
659
|
+
...U,
|
|
660
660
|
component: {
|
|
661
661
|
name: "Text",
|
|
662
662
|
options: {
|
|
@@ -665,7 +665,7 @@ const A = {
|
|
|
665
665
|
}
|
|
666
666
|
}],
|
|
667
667
|
content: [{
|
|
668
|
-
...
|
|
668
|
+
...L,
|
|
669
669
|
component: {
|
|
670
670
|
name: "Text",
|
|
671
671
|
options: {
|
|
@@ -721,7 +721,7 @@ const A = {
|
|
|
721
721
|
builderComponents: !0,
|
|
722
722
|
builderLinkComponent: !0
|
|
723
723
|
}
|
|
724
|
-
}, qe =
|
|
724
|
+
}, qe = v(() => import("./tabs-b75be82d.js")), je = {
|
|
725
725
|
shouldReceiveBuilderProps: {
|
|
726
726
|
builderBlock: !1
|
|
727
727
|
},
|
|
@@ -764,7 +764,7 @@ const A = {
|
|
|
764
764
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
765
765
|
advanced: !0
|
|
766
766
|
}]
|
|
767
|
-
}, Me =
|
|
767
|
+
}, Me = v(() => import("./custom-code-7786788e.js")), Oe = {
|
|
768
768
|
name: "Embed",
|
|
769
769
|
static: !0,
|
|
770
770
|
inputs: [{
|
|
@@ -779,7 +779,7 @@ const A = {
|
|
|
779
779
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
780
780
|
hideFromUI: !0
|
|
781
781
|
}]
|
|
782
|
-
}, _e =
|
|
782
|
+
}, _e = v(() => import("./embed-5c1bbe12.js")), ze = {
|
|
783
783
|
name: "Form:Form",
|
|
784
784
|
// editableTags: ['builder-form-error']
|
|
785
785
|
defaults: {
|
|
@@ -1016,7 +1016,7 @@ const A = {
|
|
|
1016
1016
|
builderComponents: !0,
|
|
1017
1017
|
builderLinkComponent: !0
|
|
1018
1018
|
}
|
|
1019
|
-
}, Je =
|
|
1019
|
+
}, Je = v(() => import("./form-ac2f2a0e.js")), Ye = {
|
|
1020
1020
|
name: "Form:Input",
|
|
1021
1021
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
1022
1022
|
inputs: [
|
|
@@ -1067,7 +1067,7 @@ const A = {
|
|
|
1067
1067
|
borderStyle: "solid",
|
|
1068
1068
|
borderColor: "#ccc"
|
|
1069
1069
|
}
|
|
1070
|
-
}, Qe =
|
|
1070
|
+
}, Qe = v(() => import("./input-549f090e.js")), Ge = {
|
|
1071
1071
|
name: "Form:Select",
|
|
1072
1072
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
1073
1073
|
defaultStyles: {
|
|
@@ -1109,7 +1109,7 @@ const A = {
|
|
|
1109
1109
|
}],
|
|
1110
1110
|
static: !0,
|
|
1111
1111
|
noWrap: !0
|
|
1112
|
-
}, Xe =
|
|
1112
|
+
}, Xe = v(() => import("./select-6a5a28ac.js")), Ze = {
|
|
1113
1113
|
name: "Form:SubmitButton",
|
|
1114
1114
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
1115
1115
|
defaultStyles: {
|
|
@@ -1134,7 +1134,7 @@ const A = {
|
|
|
1134
1134
|
// that only shows if advanced setting is flipped
|
|
1135
1135
|
// TODO: defaultChildren
|
|
1136
1136
|
// canHaveChildren: true,
|
|
1137
|
-
}, et =
|
|
1137
|
+
}, et = v(() => import("./submit-button-b48361a7.js")), tt = {
|
|
1138
1138
|
name: "Form:TextArea",
|
|
1139
1139
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
1140
1140
|
inputs: [{
|
|
@@ -1170,7 +1170,7 @@ const A = {
|
|
|
1170
1170
|
},
|
|
1171
1171
|
static: !0,
|
|
1172
1172
|
noWrap: !0
|
|
1173
|
-
}, nt =
|
|
1173
|
+
}, nt = v(() => import("./textarea-d29025e9.js")), at = {
|
|
1174
1174
|
// friendlyName?
|
|
1175
1175
|
name: "Raw:Img",
|
|
1176
1176
|
hideFromInsertMenu: !0,
|
|
@@ -1184,7 +1184,7 @@ const A = {
|
|
|
1184
1184
|
}],
|
|
1185
1185
|
noWrap: !0,
|
|
1186
1186
|
static: !0
|
|
1187
|
-
}, it =
|
|
1187
|
+
}, it = v(() => import("./img-8fc26395.js")), ot = {
|
|
1188
1188
|
name: "Video",
|
|
1189
1189
|
canHaveChildren: !0,
|
|
1190
1190
|
defaultStyles: {
|
|
@@ -1415,14 +1415,14 @@ const A = {
|
|
|
1415
1415
|
thisScriptEl?.remove();
|
|
1416
1416
|
}
|
|
1417
1417
|
return;
|
|
1418
|
-
}`, ae = "builderIoAbTest", ie = "builderIoRenderContent",
|
|
1418
|
+
}`, ae = "builderIoAbTest", ie = "builderIoRenderContent", W = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1419
1419
|
...t,
|
|
1420
1420
|
testVariationId: t.id,
|
|
1421
1421
|
id: e == null ? void 0 : e.id
|
|
1422
1422
|
})), dt = ({
|
|
1423
1423
|
canTrack: e,
|
|
1424
1424
|
content: t
|
|
1425
|
-
}) => !(!(
|
|
1425
|
+
}) => !(!(W(t).length > 0) || !e || $()), ut = (e) => e === "react" || e === "reactNative", oe = ut(te), ct = () => `
|
|
1426
1426
|
window.${ae} = ${lt}
|
|
1427
1427
|
window.${ie} = ${st}
|
|
1428
1428
|
`, mt = (e, t) => `
|
|
@@ -1434,12 +1434,13 @@ const A = {
|
|
|
1434
1434
|
}) => `window.${ie}(
|
|
1435
1435
|
"${t}", "${e}", ${oe}
|
|
1436
1436
|
)`;
|
|
1437
|
-
function
|
|
1438
|
-
return /* @__PURE__ */
|
|
1437
|
+
function N(e) {
|
|
1438
|
+
return /* @__PURE__ */ h(
|
|
1439
1439
|
"script",
|
|
1440
1440
|
{
|
|
1441
1441
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
1442
|
-
"data-id": e.id
|
|
1442
|
+
"data-id": e.id,
|
|
1443
|
+
nonce: e.nonce || ""
|
|
1443
1444
|
}
|
|
1444
1445
|
);
|
|
1445
1446
|
}
|
|
@@ -1464,9 +1465,9 @@ const gt = (e, t, n = !0) => {
|
|
|
1464
1465
|
event: e,
|
|
1465
1466
|
target: t
|
|
1466
1467
|
}) => {
|
|
1467
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, d = e.clientY - n.top,
|
|
1468
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, d = e.clientY - n.top, m = X(i / n.width), a = X(d / n.height);
|
|
1468
1469
|
return {
|
|
1469
|
-
x:
|
|
1470
|
+
x: m,
|
|
1470
1471
|
y: a
|
|
1471
1472
|
};
|
|
1472
1473
|
}, ht = (e) => {
|
|
@@ -1486,8 +1487,8 @@ const gt = (e, t, n = !0) => {
|
|
|
1486
1487
|
}
|
|
1487
1488
|
};
|
|
1488
1489
|
}, bt = (e) => {
|
|
1489
|
-
var
|
|
1490
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (
|
|
1490
|
+
var m, a;
|
|
1491
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (m = e == null ? void 0 : e.files) == null ? void 0 : m.regular;
|
|
1491
1492
|
let d = "";
|
|
1492
1493
|
if (i && t && n && (d += `
|
|
1493
1494
|
@font-face {
|
|
@@ -1500,11 +1501,11 @@ font-weight: 400;
|
|
|
1500
1501
|
for (const o in e.files) {
|
|
1501
1502
|
if (!(String(Number(o)) === o))
|
|
1502
1503
|
continue;
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1504
|
+
const b = e.files[o];
|
|
1505
|
+
b && b !== i && (d += `
|
|
1505
1506
|
@font-face {
|
|
1506
1507
|
font-family: "${t}";
|
|
1507
|
-
src: url('${
|
|
1508
|
+
src: url('${b}') format('woff2');
|
|
1508
1509
|
font-display: fallback;
|
|
1509
1510
|
font-weight: ${o};
|
|
1510
1511
|
}
|
|
@@ -1538,36 +1539,36 @@ font-weight: ${o};
|
|
|
1538
1539
|
}
|
|
1539
1540
|
`, St = (e) => e ? "" : vt, Tt = (e) => `variant-${e}`;
|
|
1540
1541
|
function kt(e) {
|
|
1541
|
-
var
|
|
1542
|
+
var I, q, j, K, M, O, _;
|
|
1542
1543
|
const t = le(null);
|
|
1543
1544
|
function n(r) {
|
|
1544
|
-
var
|
|
1545
|
+
var g, s;
|
|
1545
1546
|
const u = {
|
|
1546
1547
|
...e.builderContextSignal.rootState,
|
|
1547
1548
|
...r
|
|
1548
1549
|
};
|
|
1549
|
-
e.builderContextSignal.rootSetState ? (s = (
|
|
1550
|
+
e.builderContextSignal.rootSetState ? (s = (g = e.builderContextSignal).rootSetState) == null || s.call(g, u) : e.setBuilderContextSignal((l) => ({
|
|
1550
1551
|
...l,
|
|
1551
1552
|
rootState: u
|
|
1552
1553
|
}));
|
|
1553
1554
|
}
|
|
1554
1555
|
function i(r) {
|
|
1555
|
-
var
|
|
1556
|
+
var g, s, l, f, R;
|
|
1556
1557
|
const u = {
|
|
1557
1558
|
...e.builderContextSignal.content,
|
|
1558
1559
|
...r,
|
|
1559
1560
|
data: {
|
|
1560
|
-
...(
|
|
1561
|
+
...(g = e.builderContextSignal.content) == null ? void 0 : g.data,
|
|
1561
1562
|
...r == null ? void 0 : r.data
|
|
1562
1563
|
},
|
|
1563
1564
|
meta: {
|
|
1564
1565
|
...(s = e.builderContextSignal.content) == null ? void 0 : s.meta,
|
|
1565
1566
|
...r == null ? void 0 : r.meta,
|
|
1566
|
-
breakpoints: ((l = r == null ? void 0 : r.meta) == null ? void 0 : l.breakpoints) || ((
|
|
1567
|
+
breakpoints: ((l = r == null ? void 0 : r.meta) == null ? void 0 : l.breakpoints) || ((R = (f = e.builderContextSignal.content) == null ? void 0 : f.meta) == null ? void 0 : R.breakpoints)
|
|
1567
1568
|
}
|
|
1568
1569
|
};
|
|
1569
|
-
e.setBuilderContextSignal((
|
|
1570
|
-
...
|
|
1570
|
+
e.setBuilderContextSignal((y) => ({
|
|
1571
|
+
...y,
|
|
1571
1572
|
content: u
|
|
1572
1573
|
}));
|
|
1573
1574
|
}
|
|
@@ -1577,7 +1578,7 @@ function kt(e) {
|
|
|
1577
1578
|
"aria-hidden": !0
|
|
1578
1579
|
};
|
|
1579
1580
|
}
|
|
1580
|
-
const [
|
|
1581
|
+
const [m, a] = k(
|
|
1581
1582
|
() => e.contentWrapper || "div"
|
|
1582
1583
|
);
|
|
1583
1584
|
function o(r) {
|
|
@@ -1587,10 +1588,10 @@ function kt(e) {
|
|
|
1587
1588
|
callbacks: {
|
|
1588
1589
|
configureSdk: (u) => {
|
|
1589
1590
|
var l;
|
|
1590
|
-
const { breakpoints:
|
|
1591
|
-
!s || s !== ((l = e.builderContextSignal.content) == null ? void 0 : l.id) ||
|
|
1591
|
+
const { breakpoints: g, contentId: s } = u;
|
|
1592
|
+
!s || s !== ((l = e.builderContextSignal.content) == null ? void 0 : l.id) || g && i({
|
|
1592
1593
|
meta: {
|
|
1593
|
-
breakpoints:
|
|
1594
|
+
breakpoints: g
|
|
1594
1595
|
}
|
|
1595
1596
|
});
|
|
1596
1597
|
},
|
|
@@ -1603,9 +1604,9 @@ function kt(e) {
|
|
|
1603
1604
|
}
|
|
1604
1605
|
})(r);
|
|
1605
1606
|
}
|
|
1606
|
-
function
|
|
1607
|
-
var u,
|
|
1608
|
-
const r = (
|
|
1607
|
+
function p() {
|
|
1608
|
+
var u, g;
|
|
1609
|
+
const r = (g = (u = e.builderContextSignal.content) == null ? void 0 : u.data) == null ? void 0 : g.jsCode;
|
|
1609
1610
|
r && Q({
|
|
1610
1611
|
code: r,
|
|
1611
1612
|
context: e.context || {},
|
|
@@ -1618,33 +1619,33 @@ function kt(e) {
|
|
|
1618
1619
|
enableCache: !1
|
|
1619
1620
|
});
|
|
1620
1621
|
}
|
|
1621
|
-
const [
|
|
1622
|
-
function
|
|
1623
|
-
var u,
|
|
1622
|
+
const [b, C] = k(() => ({})), [T, V] = k(() => ({})), [E, F] = k(() => !1);
|
|
1623
|
+
function x(r) {
|
|
1624
|
+
var u, g;
|
|
1624
1625
|
if (e.builderContextSignal.content) {
|
|
1625
|
-
const s = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, l = (
|
|
1626
|
+
const s = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, l = (g = e.builderContextSignal.content) == null ? void 0 : g.id;
|
|
1626
1627
|
J({
|
|
1627
1628
|
type: "click",
|
|
1628
|
-
canTrack:
|
|
1629
|
+
canTrack: A(e.canTrack),
|
|
1629
1630
|
contentId: l,
|
|
1630
1631
|
apiKey: e.apiKey,
|
|
1631
1632
|
variationId: s !== l ? s : void 0,
|
|
1632
1633
|
...ht(r),
|
|
1633
|
-
unique: !
|
|
1634
|
+
unique: !E
|
|
1634
1635
|
});
|
|
1635
1636
|
}
|
|
1636
|
-
|
|
1637
|
+
E || F(!0);
|
|
1637
1638
|
}
|
|
1638
|
-
function
|
|
1639
|
-
var u,
|
|
1640
|
-
const r = (s = (
|
|
1641
|
-
Object.entries(r).forEach(([l,
|
|
1642
|
-
if (!
|
|
1639
|
+
function c() {
|
|
1640
|
+
var u, g, s;
|
|
1641
|
+
const r = (s = (g = (u = e.builderContextSignal.content) == null ? void 0 : u.data) == null ? void 0 : g.httpRequests) != null ? s : {};
|
|
1642
|
+
Object.entries(r).forEach(([l, f]) => {
|
|
1643
|
+
if (!f || T[l] || b[l] && !P())
|
|
1643
1644
|
return;
|
|
1644
|
-
|
|
1645
|
-
const
|
|
1645
|
+
T[l] = !0;
|
|
1646
|
+
const R = f.replace(
|
|
1646
1647
|
/{{([^}]+)}}/g,
|
|
1647
|
-
(
|
|
1648
|
+
(y, re) => String(
|
|
1648
1649
|
Q({
|
|
1649
1650
|
code: re,
|
|
1650
1651
|
context: e.context || {},
|
|
@@ -1655,19 +1656,19 @@ function kt(e) {
|
|
|
1655
1656
|
})
|
|
1656
1657
|
)
|
|
1657
1658
|
);
|
|
1658
|
-
fe(
|
|
1659
|
+
fe(R).then((y) => y.json()).then((y) => {
|
|
1659
1660
|
n({
|
|
1660
|
-
[l]:
|
|
1661
|
-
}),
|
|
1662
|
-
}).catch((
|
|
1663
|
-
console.error("error fetching dynamic data",
|
|
1661
|
+
[l]: y
|
|
1662
|
+
}), b[l] = !0;
|
|
1663
|
+
}).catch((y) => {
|
|
1664
|
+
console.error("error fetching dynamic data", f, y);
|
|
1664
1665
|
}).finally(() => {
|
|
1665
|
-
|
|
1666
|
+
T[l] = !1;
|
|
1666
1667
|
});
|
|
1667
1668
|
});
|
|
1668
1669
|
}
|
|
1669
|
-
function
|
|
1670
|
-
|
|
1670
|
+
function w() {
|
|
1671
|
+
P() && window.dispatchEvent(
|
|
1671
1672
|
new CustomEvent(
|
|
1672
1673
|
"builder:component:stateChange",
|
|
1673
1674
|
{
|
|
@@ -1681,10 +1682,10 @@ function kt(e) {
|
|
|
1681
1682
|
)
|
|
1682
1683
|
);
|
|
1683
1684
|
}
|
|
1684
|
-
return
|
|
1685
|
+
return S(() => {
|
|
1685
1686
|
var r, u;
|
|
1686
|
-
if (
|
|
1687
|
-
if (
|
|
1687
|
+
if ($()) {
|
|
1688
|
+
if (P() && (window.addEventListener("message", o), se(), de({
|
|
1688
1689
|
...e.locale ? {
|
|
1689
1690
|
locale: e.locale
|
|
1690
1691
|
} : {},
|
|
@@ -1697,63 +1698,63 @@ function kt(e) {
|
|
|
1697
1698
|
}), Object.values(
|
|
1698
1699
|
e.builderContextSignal.componentInfos
|
|
1699
1700
|
).forEach((s) => {
|
|
1700
|
-
var
|
|
1701
|
+
var f;
|
|
1701
1702
|
const l = ue(s);
|
|
1702
|
-
(
|
|
1703
|
+
(f = window.parent) == null || f.postMessage(l, "*");
|
|
1703
1704
|
}), window.addEventListener(
|
|
1704
1705
|
"builder:component:stateChangeListenerActivated",
|
|
1705
|
-
|
|
1706
|
-
)), e.builderContextSignal.content &&
|
|
1707
|
-
const s = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, l = (u = e.builderContextSignal.content) == null ? void 0 : u.id,
|
|
1706
|
+
w
|
|
1707
|
+
)), e.builderContextSignal.content && A(e.canTrack)) {
|
|
1708
|
+
const s = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, l = (u = e.builderContextSignal.content) == null ? void 0 : u.id, f = e.apiKey;
|
|
1708
1709
|
J({
|
|
1709
1710
|
type: "impression",
|
|
1710
1711
|
canTrack: !0,
|
|
1711
1712
|
contentId: l,
|
|
1712
|
-
apiKey:
|
|
1713
|
+
apiKey: f,
|
|
1713
1714
|
variationId: s !== l ? s : void 0
|
|
1714
1715
|
});
|
|
1715
1716
|
}
|
|
1716
|
-
if (ce() && !
|
|
1717
|
-
const s = new URL(location.href).searchParams, l = s.get("builder.preview"),
|
|
1717
|
+
if (ce() && !P()) {
|
|
1718
|
+
const s = new URL(location.href).searchParams, l = s.get("builder.preview"), f = s.get(
|
|
1718
1719
|
`builder.overrides.${l}`
|
|
1719
|
-
),
|
|
1720
|
-
l === e.model &&
|
|
1720
|
+
), R = s.get("apiKey") || s.get("builder.space");
|
|
1721
|
+
l === e.model && R === e.apiKey && (!e.content || f === e.content.id) && me({
|
|
1721
1722
|
model: e.model,
|
|
1722
1723
|
apiKey: e.apiKey,
|
|
1723
1724
|
apiVersion: e.builderContextSignal.apiVersion
|
|
1724
|
-
}).then((
|
|
1725
|
-
|
|
1725
|
+
}).then((y) => {
|
|
1726
|
+
y && i(y);
|
|
1726
1727
|
});
|
|
1727
1728
|
}
|
|
1728
1729
|
}
|
|
1729
|
-
}, []),
|
|
1730
|
+
}, []), S(() => {
|
|
1730
1731
|
e.apiKey || pe.error(
|
|
1731
1732
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1732
|
-
),
|
|
1733
|
-
}, []),
|
|
1733
|
+
), p(), c(), w();
|
|
1734
|
+
}, []), S(() => {
|
|
1734
1735
|
e.content && i(e.content);
|
|
1735
|
-
}, [e.content]),
|
|
1736
|
-
|
|
1737
|
-
}, [(q = (
|
|
1738
|
-
|
|
1739
|
-
}, [(K = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : K.httpRequests]),
|
|
1740
|
-
|
|
1741
|
-
}, [e.builderContextSignal.rootState]),
|
|
1736
|
+
}, [e.content]), S(() => {
|
|
1737
|
+
p();
|
|
1738
|
+
}, [(q = (I = e.builderContextSignal.content) == null ? void 0 : I.data) == null ? void 0 : q.jsCode]), S(() => {
|
|
1739
|
+
c();
|
|
1740
|
+
}, [(K = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : K.httpRequests]), S(() => {
|
|
1741
|
+
w();
|
|
1742
|
+
}, [e.builderContextSignal.rootState]), S(() => {
|
|
1742
1743
|
e.data && n(e.data);
|
|
1743
|
-
}, [e.data]),
|
|
1744
|
+
}, [e.data]), S(() => {
|
|
1744
1745
|
e.locale && n({
|
|
1745
1746
|
locale: e.locale
|
|
1746
1747
|
});
|
|
1747
|
-
}, [e.locale]),
|
|
1748
|
-
|
|
1748
|
+
}, [e.locale]), S(() => () => {
|
|
1749
|
+
$() && (window.removeEventListener("message", o), window.removeEventListener(
|
|
1749
1750
|
"builder:component:stateChangeListenerActivated",
|
|
1750
|
-
|
|
1751
|
+
w
|
|
1751
1752
|
));
|
|
1752
|
-
}, []), /* @__PURE__ */
|
|
1753
|
-
|
|
1753
|
+
}, []), /* @__PURE__ */ h(we.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ h(
|
|
1754
|
+
m,
|
|
1754
1755
|
{
|
|
1755
1756
|
ref: t,
|
|
1756
|
-
onClick: (r) =>
|
|
1757
|
+
onClick: (r) => x(r),
|
|
1757
1758
|
"builder-content-id": (M = e.builderContextSignal.content) == null ? void 0 : M.id,
|
|
1758
1759
|
"builder-model": e.model,
|
|
1759
1760
|
...d(),
|
|
@@ -1766,7 +1767,7 @@ function kt(e) {
|
|
|
1766
1767
|
) : null });
|
|
1767
1768
|
}
|
|
1768
1769
|
function Ct(e) {
|
|
1769
|
-
const [t, n] =
|
|
1770
|
+
const [t, n] = k(
|
|
1770
1771
|
() => `
|
|
1771
1772
|
${yt({
|
|
1772
1773
|
cssCode: e.cssCode,
|
|
@@ -1778,17 +1779,24 @@ ${xt({
|
|
|
1778
1779
|
${St(e.isNestedRender)}
|
|
1779
1780
|
`.trim()
|
|
1780
1781
|
);
|
|
1781
|
-
return /* @__PURE__ */
|
|
1782
|
+
return /* @__PURE__ */ h(
|
|
1783
|
+
ne,
|
|
1784
|
+
{
|
|
1785
|
+
id: "builderio-content",
|
|
1786
|
+
styles: t,
|
|
1787
|
+
nonce: e.nonce
|
|
1788
|
+
}
|
|
1789
|
+
);
|
|
1782
1790
|
}
|
|
1783
1791
|
const It = ({
|
|
1784
1792
|
content: e,
|
|
1785
1793
|
data: t,
|
|
1786
1794
|
locale: n
|
|
1787
1795
|
}) => {
|
|
1788
|
-
var
|
|
1789
|
-
const i = {}, d = ((
|
|
1790
|
-
return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((
|
|
1791
|
-
|
|
1796
|
+
var m, a, o;
|
|
1797
|
+
const i = {}, d = ((m = e == null ? void 0 : e.data) == null ? void 0 : m.state) || {};
|
|
1798
|
+
return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((p) => {
|
|
1799
|
+
p.name && p.defaultValue !== void 0 && (i[p.name] = p.defaultValue);
|
|
1792
1800
|
}), {
|
|
1793
1801
|
...i,
|
|
1794
1802
|
...d,
|
|
@@ -1809,77 +1817,85 @@ const It = ({
|
|
|
1809
1817
|
meta: e == null ? void 0 : e.meta
|
|
1810
1818
|
} : void 0;
|
|
1811
1819
|
function ee(e) {
|
|
1812
|
-
var
|
|
1813
|
-
const [t, n] =
|
|
1820
|
+
var p, b, C, T, V, E, F;
|
|
1821
|
+
const [t, n] = k(
|
|
1814
1822
|
() => {
|
|
1815
|
-
var
|
|
1823
|
+
var x, c;
|
|
1816
1824
|
return pt({
|
|
1817
1825
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1818
|
-
variationId: (
|
|
1826
|
+
variationId: (x = e.content) == null ? void 0 : x.testVariationId,
|
|
1819
1827
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1820
|
-
contentId: (
|
|
1828
|
+
contentId: (c = e.content) == null ? void 0 : c.id
|
|
1821
1829
|
});
|
|
1822
1830
|
}
|
|
1823
1831
|
);
|
|
1824
|
-
function i(
|
|
1825
|
-
o((
|
|
1826
|
-
...
|
|
1827
|
-
rootState:
|
|
1832
|
+
function i(x) {
|
|
1833
|
+
o((c) => ({
|
|
1834
|
+
...c,
|
|
1835
|
+
rootState: x
|
|
1828
1836
|
}));
|
|
1829
1837
|
}
|
|
1830
|
-
const [d,
|
|
1831
|
-
() =>
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1838
|
+
const [d, m] = k(
|
|
1839
|
+
() => {
|
|
1840
|
+
var x;
|
|
1841
|
+
return [
|
|
1842
|
+
...G(),
|
|
1843
|
+
...((x = e.customComponents) == null ? void 0 : x.filter(({ models: c }) => !(c != null && c.length) || !e.model ? !0 : c.includes(e.model))) || []
|
|
1844
|
+
].reduce(
|
|
1845
|
+
(c, { component: w, ...I }) => ({
|
|
1846
|
+
...c,
|
|
1847
|
+
[I.name]: {
|
|
1848
|
+
component: w,
|
|
1849
|
+
...Y(I)
|
|
1850
|
+
}
|
|
1851
|
+
}),
|
|
1852
|
+
{}
|
|
1853
|
+
);
|
|
1854
|
+
}
|
|
1855
|
+
), [a, o] = k(() => {
|
|
1856
|
+
var x;
|
|
1857
|
+
return {
|
|
1858
|
+
content: wt({
|
|
1859
|
+
content: e.content,
|
|
1860
|
+
data: e.data
|
|
1841
1861
|
}),
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
data: e.data
|
|
1848
|
-
}),
|
|
1849
|
-
localState: void 0,
|
|
1850
|
-
rootState: It({
|
|
1851
|
-
content: e.content,
|
|
1852
|
-
data: e.data,
|
|
1853
|
-
locale: e.locale
|
|
1854
|
-
}),
|
|
1855
|
-
rootSetState: i,
|
|
1856
|
-
context: e.context || {},
|
|
1857
|
-
canTrack: e.canTrack,
|
|
1858
|
-
apiKey: e.apiKey,
|
|
1859
|
-
apiVersion: e.apiVersion,
|
|
1860
|
-
componentInfos: [
|
|
1861
|
-
...G(),
|
|
1862
|
-
...e.customComponents || []
|
|
1863
|
-
].reduce(
|
|
1864
|
-
(v, { component: S, ...T }) => ({
|
|
1865
|
-
...v,
|
|
1866
|
-
[T.name]: Y(T)
|
|
1862
|
+
localState: void 0,
|
|
1863
|
+
rootState: It({
|
|
1864
|
+
content: e.content,
|
|
1865
|
+
data: e.data,
|
|
1866
|
+
locale: e.locale
|
|
1867
1867
|
}),
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1868
|
+
rootSetState: i,
|
|
1869
|
+
context: e.context || {},
|
|
1870
|
+
canTrack: e.canTrack,
|
|
1871
|
+
apiKey: e.apiKey,
|
|
1872
|
+
apiVersion: e.apiVersion,
|
|
1873
|
+
componentInfos: [
|
|
1874
|
+
...G(),
|
|
1875
|
+
...((x = e.customComponents) == null ? void 0 : x.filter(({ models: c }) => !(c != null && c.length) || !e.model ? !0 : c.includes(e.model))) || []
|
|
1876
|
+
].reduce(
|
|
1877
|
+
(c, { component: w, ...I }) => ({
|
|
1878
|
+
...c,
|
|
1879
|
+
[I.name]: Y(I)
|
|
1880
|
+
}),
|
|
1881
|
+
{}
|
|
1882
|
+
),
|
|
1883
|
+
inheritedStyles: {},
|
|
1884
|
+
BlocksWrapper: e.blocksWrapper || "div",
|
|
1885
|
+
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
1886
|
+
nonce: e.nonce || ""
|
|
1887
|
+
};
|
|
1888
|
+
});
|
|
1889
|
+
return /* @__PURE__ */ h(
|
|
1875
1890
|
Re.Provider,
|
|
1876
1891
|
{
|
|
1877
1892
|
value: {
|
|
1878
1893
|
registeredComponents: d
|
|
1879
1894
|
},
|
|
1880
|
-
children: /* @__PURE__ */
|
|
1895
|
+
children: /* @__PURE__ */ H(
|
|
1881
1896
|
kt,
|
|
1882
1897
|
{
|
|
1898
|
+
nonce: e.nonce,
|
|
1883
1899
|
content: e.content,
|
|
1884
1900
|
data: e.data,
|
|
1885
1901
|
model: e.model,
|
|
@@ -1895,26 +1911,28 @@ function ee(e) {
|
|
|
1895
1911
|
trustedHosts: e.trustedHosts,
|
|
1896
1912
|
setBuilderContextSignal: o,
|
|
1897
1913
|
children: [
|
|
1898
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1899
|
-
|
|
1914
|
+
e.isSsrAbTest ? /* @__PURE__ */ h(
|
|
1915
|
+
N,
|
|
1900
1916
|
{
|
|
1901
1917
|
id: "builderio-variant-visibility",
|
|
1902
|
-
scriptStr: t
|
|
1918
|
+
scriptStr: t,
|
|
1919
|
+
nonce: e.nonce || ""
|
|
1903
1920
|
}
|
|
1904
1921
|
) : null,
|
|
1905
|
-
/* @__PURE__ */
|
|
1922
|
+
/* @__PURE__ */ h(
|
|
1906
1923
|
Ct,
|
|
1907
1924
|
{
|
|
1925
|
+
nonce: e.nonce || "",
|
|
1908
1926
|
isNestedRender: e.isNestedRender,
|
|
1909
|
-
contentId: (
|
|
1910
|
-
cssCode: (
|
|
1911
|
-
customFonts: (
|
|
1927
|
+
contentId: (p = a.content) == null ? void 0 : p.id,
|
|
1928
|
+
cssCode: (C = (b = a.content) == null ? void 0 : b.data) == null ? void 0 : C.cssCode,
|
|
1929
|
+
customFonts: (V = (T = a.content) == null ? void 0 : T.data) == null ? void 0 : V.customFonts
|
|
1912
1930
|
}
|
|
1913
1931
|
),
|
|
1914
|
-
/* @__PURE__ */
|
|
1932
|
+
/* @__PURE__ */ h(
|
|
1915
1933
|
Ee,
|
|
1916
1934
|
{
|
|
1917
|
-
blocks: (
|
|
1935
|
+
blocks: (F = (E = a.content) == null ? void 0 : E.data) == null ? void 0 : F.blocks,
|
|
1918
1936
|
context: a,
|
|
1919
1937
|
registeredComponents: d,
|
|
1920
1938
|
linkComponent: e.linkComponent
|
|
@@ -1928,64 +1946,67 @@ function ee(e) {
|
|
|
1928
1946
|
}
|
|
1929
1947
|
function Bt(e) {
|
|
1930
1948
|
var a;
|
|
1931
|
-
const [t, n] =
|
|
1949
|
+
const [t, n] = k(
|
|
1932
1950
|
() => dt({
|
|
1933
|
-
canTrack:
|
|
1951
|
+
canTrack: A(e.canTrack),
|
|
1934
1952
|
content: e.content
|
|
1935
1953
|
})
|
|
1936
1954
|
);
|
|
1937
1955
|
function i() {
|
|
1938
1956
|
var o;
|
|
1939
1957
|
return mt(
|
|
1940
|
-
|
|
1941
|
-
id:
|
|
1942
|
-
testRatio:
|
|
1958
|
+
W(e.content).map((p) => ({
|
|
1959
|
+
id: p.testVariationId,
|
|
1960
|
+
testRatio: p.testRatio
|
|
1943
1961
|
})),
|
|
1944
1962
|
((o = e.content) == null ? void 0 : o.id) || ""
|
|
1945
1963
|
);
|
|
1946
1964
|
}
|
|
1947
1965
|
function d() {
|
|
1948
|
-
return
|
|
1966
|
+
return W(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
|
|
1949
1967
|
}
|
|
1950
|
-
function
|
|
1968
|
+
function m() {
|
|
1951
1969
|
var o;
|
|
1952
1970
|
return t ? {
|
|
1953
1971
|
...e.content,
|
|
1954
1972
|
testVariationId: (o = e.content) == null ? void 0 : o.id
|
|
1955
1973
|
} : be({
|
|
1956
1974
|
item: e.content,
|
|
1957
|
-
canTrack:
|
|
1975
|
+
canTrack: A(e.canTrack)
|
|
1958
1976
|
});
|
|
1959
1977
|
}
|
|
1960
|
-
return
|
|
1961
|
-
}, []),
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
$,
|
|
1978
|
+
return S(() => {
|
|
1979
|
+
}, []), /* @__PURE__ */ H(z, { children: [
|
|
1980
|
+
!e.isNestedRender && te !== "reactNative" ? /* @__PURE__ */ h(
|
|
1981
|
+
N,
|
|
1965
1982
|
{
|
|
1966
1983
|
id: "builderio-init-variants-fns",
|
|
1967
|
-
scriptStr: ct()
|
|
1984
|
+
scriptStr: ct(),
|
|
1985
|
+
nonce: e.nonce || ""
|
|
1968
1986
|
}
|
|
1969
1987
|
) : null,
|
|
1970
|
-
t ? /* @__PURE__ */
|
|
1971
|
-
/* @__PURE__ */
|
|
1988
|
+
t ? /* @__PURE__ */ H(z, { children: [
|
|
1989
|
+
/* @__PURE__ */ h(
|
|
1972
1990
|
ne,
|
|
1973
1991
|
{
|
|
1974
1992
|
id: "builderio-variants",
|
|
1975
|
-
styles: d()
|
|
1993
|
+
styles: d(),
|
|
1994
|
+
nonce: e.nonce || ""
|
|
1976
1995
|
}
|
|
1977
1996
|
),
|
|
1978
|
-
/* @__PURE__ */
|
|
1979
|
-
|
|
1997
|
+
/* @__PURE__ */ h(
|
|
1998
|
+
N,
|
|
1980
1999
|
{
|
|
1981
2000
|
id: "builderio-variants-visibility",
|
|
1982
|
-
scriptStr: i()
|
|
2001
|
+
scriptStr: i(),
|
|
2002
|
+
nonce: e.nonce || ""
|
|
1983
2003
|
}
|
|
1984
2004
|
),
|
|
1985
|
-
(a =
|
|
2005
|
+
(a = W(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ h(
|
|
1986
2006
|
ee,
|
|
1987
2007
|
{
|
|
1988
2008
|
isNestedRender: e.isNestedRender,
|
|
2009
|
+
nonce: e.nonce,
|
|
1989
2010
|
content: o,
|
|
1990
2011
|
showContent: !1,
|
|
1991
2012
|
model: e.model,
|
|
@@ -2008,11 +2029,12 @@ function Bt(e) {
|
|
|
2008
2029
|
o.testVariationId
|
|
2009
2030
|
))
|
|
2010
2031
|
] }) : null,
|
|
2011
|
-
/* @__PURE__ */
|
|
2032
|
+
/* @__PURE__ */ h(
|
|
2012
2033
|
ee,
|
|
2013
2034
|
{
|
|
2035
|
+
nonce: e.nonce,
|
|
2014
2036
|
isNestedRender: e.isNestedRender,
|
|
2015
|
-
content:
|
|
2037
|
+
content: m(),
|
|
2016
2038
|
showContent: !0,
|
|
2017
2039
|
model: e.model,
|
|
2018
2040
|
data: e.data,
|