@builder.io/sdk-react 1.0.16 → 1.0.19
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 +22 -22
- package/lib/browser/blocks-exports.mjs +498 -506
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +22 -21
- package/lib/browser/{server-entry-11e01841.cjs → server-entry-1a86f409.cjs} +1 -1
- package/lib/browser/{server-entry-afeff3cb.js → server-entry-cfff49d1.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{blocks-8e5cc463.js → blocks-1ea14427.js} +179 -192
- package/lib/edge/{blocks-a0a9d452.cjs → blocks-5341123d.cjs} +9 -9
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +27 -13
- package/lib/edge/{button-66c46316.cjs → button-c6255c8e.cjs} +1 -1
- package/lib/edge/{button-764707c4.js → button-f5764a4c.js} +2 -2
- package/lib/edge/{columns-0a14db0e.cjs → columns-01e0bb50.cjs} +1 -1
- package/lib/edge/{columns-0bdc7586.js → columns-17090869.js} +24 -23
- package/lib/edge/content-variants-3961c4ee.cjs +134 -0
- package/lib/edge/{content-variants-db1e0281.js → content-variants-bfca78f9.js} +230 -239
- package/lib/edge/dynamic-blocks-exports.cjs +2 -0
- package/lib/edge/dynamic-blocks-exports.mjs +4 -1
- package/lib/edge/{form-7a6f998f.js → form-39e97f30.js} +6 -5
- package/lib/edge/form-b97fba27.cjs +1 -0
- package/lib/edge/{get-class-prop-name-49cbb2c6.js → get-class-prop-name-859a7f60.js} +1 -1
- package/lib/edge/{get-class-prop-name-bbc4d2f3.cjs → get-class-prop-name-f1301669.cjs} +1 -1
- package/lib/edge/{img-058cb6f0.cjs → img-0c1e53c0.cjs} +1 -1
- package/lib/edge/{img-c9630f56.js → img-b4ff1bef.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +22 -21
- package/lib/edge/{input-ceacd029.cjs → input-2103da14.cjs} +1 -1
- package/lib/edge/{input-3de90790.js → input-c6fee09c.js} +1 -1
- package/lib/edge/{select-df72f987.cjs → select-b8ad0a4c.cjs} +1 -1
- package/lib/edge/{select-ee266e60.js → select-f260d051.js} +1 -1
- package/lib/edge/{server-entry-ef266884.cjs → server-entry-00891f33.cjs} +1 -1
- package/lib/edge/{server-entry-2b1068fd.js → server-entry-d46a218d.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/slot-8de7d746.cjs +1 -0
- package/lib/edge/{slot-f246e67e.js → slot-c9f94715.js} +6 -5
- package/lib/edge/{symbol-f68a7357.js → symbol-324dadc8.js} +2 -2
- package/lib/edge/{symbol-991f09b3.cjs → symbol-636383eb.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +10 -10
- package/lib/node/blocks-exports.mjs +241 -249
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +22 -21
- package/lib/node/{server-entry-a221fe66.js → server-entry-8c84ddbd.js} +1 -1
- package/lib/node/{server-entry-4ba58cf3.cjs → server-entry-ff6fc2b4.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/index.d.ts +1 -0
- package/types/index-helpers/blocks-exports.d.ts +4 -0
- package/lib/edge/content-variants-c03ec7a1.cjs +0 -134
- package/lib/edge/form-a5d18c89.cjs +0 -1
- package/lib/edge/slot-83d735d6.cjs +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as f, jsxs as P, Fragment as K } from "react/jsx-runtime";
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { isBrowser as U, TARGET as Q, isEditing as A, registerInsertMenu as
|
|
4
|
-
import { Video as
|
|
5
|
-
import {
|
|
6
|
-
import "./get-class-prop-name-
|
|
2
|
+
import { lazy as C, useRef as ne, useState as I, useEffect as S } from "react";
|
|
3
|
+
import { isBrowser as U, TARGET as Q, isEditing as A, registerInsertMenu as ae, setupBrowserForEditing as ie, createRegisterComponentMessage as oe, getDefaultCanTrack as W, _track as B, isPreviewing as re, fetchOneEntry as se, logger as le, createEditorListener as de, fetch as ce, fastClone as ue, serializeComponentInfo as _, handleABTestingSync as me } from "./server-entry-d46a218d.js";
|
|
4
|
+
import { Video as pe, Button as ge, Columns as fe, Fragment as he, Image as be, Section as ye, Symbol as xe, Text as ve, BuilderContext as Se } from "./blocks-exports.mjs";
|
|
5
|
+
import { triggerAnimation as Ie, evaluate as M, InlinedStyles as G, ComponentsContext as ke, Blocks as Te } from "./blocks-1ea14427.js";
|
|
6
|
+
import "./get-class-prop-name-859a7f60.js";
|
|
7
7
|
import "./dynamic-renderer-8b343325.js";
|
|
8
|
-
const
|
|
8
|
+
const Ce = {
|
|
9
9
|
name: "Core:Button",
|
|
10
10
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
11
11
|
defaultStyles: {
|
|
@@ -38,7 +38,7 @@ const Te = {
|
|
|
38
38
|
}],
|
|
39
39
|
static: !0,
|
|
40
40
|
noWrap: !0
|
|
41
|
-
},
|
|
41
|
+
}, we = {
|
|
42
42
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
43
43
|
name: "Columns",
|
|
44
44
|
isRSC: !0,
|
|
@@ -217,7 +217,7 @@ const Te = {
|
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
219
|
const n = e.get("columns");
|
|
220
|
-
Array.isArray(n) && n.find((
|
|
220
|
+
Array.isArray(n) && n.find((d) => d.get("width")) && (n.find((p) => !p.get("width")) || n.reduce((o, u) => o + u.get("width"), 0) !== 100) && t();
|
|
221
221
|
}
|
|
222
222
|
}, {
|
|
223
223
|
name: "space",
|
|
@@ -239,13 +239,13 @@ const Te = {
|
|
|
239
239
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
240
240
|
advanced: !0
|
|
241
241
|
}]
|
|
242
|
-
},
|
|
242
|
+
}, Ve = {
|
|
243
243
|
name: "Fragment",
|
|
244
244
|
static: !0,
|
|
245
245
|
hidden: !0,
|
|
246
246
|
canHaveChildren: !0,
|
|
247
247
|
noWrap: !0
|
|
248
|
-
},
|
|
248
|
+
}, Re = {
|
|
249
249
|
name: "Image",
|
|
250
250
|
static: !0,
|
|
251
251
|
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",
|
|
@@ -266,28 +266,28 @@ const Te = {
|
|
|
266
266
|
onChange: (e) => {
|
|
267
267
|
e.delete("srcset"), e.delete("noWebp");
|
|
268
268
|
function n(i, o = 6e4) {
|
|
269
|
-
return new Promise((
|
|
270
|
-
const
|
|
271
|
-
let
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
},
|
|
275
|
-
console.warn("Image load failed",
|
|
276
|
-
}),
|
|
277
|
-
|
|
269
|
+
return new Promise((u, v) => {
|
|
270
|
+
const b = document.createElement("img");
|
|
271
|
+
let w = !1;
|
|
272
|
+
b.onload = () => {
|
|
273
|
+
w = !0, u(b);
|
|
274
|
+
}, b.addEventListener("error", (k) => {
|
|
275
|
+
console.warn("Image load failed", k.error), v(k.error);
|
|
276
|
+
}), b.src = i, setTimeout(() => {
|
|
277
|
+
w || v(new Error("Image load timed out"));
|
|
278
278
|
}, o);
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
281
|
function a(i) {
|
|
282
282
|
return Math.round(i * 1e3) / 1e3;
|
|
283
283
|
}
|
|
284
|
-
const
|
|
285
|
-
if (fetch(
|
|
284
|
+
const d = e.get("image"), p = e.get("aspectRatio");
|
|
285
|
+
if (fetch(d).then((i) => i.blob()).then((i) => {
|
|
286
286
|
i.type.includes("svg") && e.set("noWebp", !0);
|
|
287
|
-
}),
|
|
288
|
-
return n(
|
|
287
|
+
}), d && (!p || p === 0.7041))
|
|
288
|
+
return n(d).then((i) => {
|
|
289
289
|
const o = e.get("aspectRatio");
|
|
290
|
-
e.get("image") ===
|
|
290
|
+
e.get("image") === d && (!o || o === 0.7041) && i.width && i.height && (e.set("aspectRatio", a(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
293
|
}, {
|
|
@@ -345,7 +345,7 @@ const Te = {
|
|
|
345
345
|
advanced: !0,
|
|
346
346
|
defaultValue: 0.7041
|
|
347
347
|
}]
|
|
348
|
-
},
|
|
348
|
+
}, Ee = {
|
|
349
349
|
name: "Core:Section",
|
|
350
350
|
static: !0,
|
|
351
351
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -384,7 +384,7 @@ const Te = {
|
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
}]
|
|
387
|
-
},
|
|
387
|
+
}, Fe = {
|
|
388
388
|
name: "Slot",
|
|
389
389
|
isRSC: !0,
|
|
390
390
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -397,7 +397,7 @@ const Te = {
|
|
|
397
397
|
required: !0,
|
|
398
398
|
defaultValue: "children"
|
|
399
399
|
}]
|
|
400
|
-
},
|
|
400
|
+
}, We = C(() => import("./slot-c9f94715.js")), Ae = {
|
|
401
401
|
name: "Symbol",
|
|
402
402
|
noWrap: !0,
|
|
403
403
|
static: !0,
|
|
@@ -430,7 +430,7 @@ const Te = {
|
|
|
430
430
|
hideFromUI: !0,
|
|
431
431
|
type: "boolean"
|
|
432
432
|
}]
|
|
433
|
-
},
|
|
433
|
+
}, Pe = {
|
|
434
434
|
name: "Text",
|
|
435
435
|
static: !0,
|
|
436
436
|
isRSC: !0,
|
|
@@ -448,7 +448,7 @@ const Te = {
|
|
|
448
448
|
height: "auto",
|
|
449
449
|
textAlign: "center"
|
|
450
450
|
}
|
|
451
|
-
},
|
|
451
|
+
}, Ue = {
|
|
452
452
|
name: "Custom Code",
|
|
453
453
|
static: !0,
|
|
454
454
|
requiredPermissions: ["editCode"],
|
|
@@ -470,7 +470,7 @@ const Te = {
|
|
|
470
470
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
471
471
|
advanced: !0
|
|
472
472
|
}]
|
|
473
|
-
},
|
|
473
|
+
}, $e = C(() => import("./custom-code-7786788e.js")), He = {
|
|
474
474
|
name: "Embed",
|
|
475
475
|
static: !0,
|
|
476
476
|
inputs: [{
|
|
@@ -495,7 +495,7 @@ const Te = {
|
|
|
495
495
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
496
496
|
hideFromUI: !0
|
|
497
497
|
}]
|
|
498
|
-
}, De =
|
|
498
|
+
}, De = C(() => import("./embed-5c1bbe12.js")), Le = {
|
|
499
499
|
name: "Form:Form",
|
|
500
500
|
// editableTags: ['builder-form-error']
|
|
501
501
|
defaults: {
|
|
@@ -726,7 +726,7 @@ const Te = {
|
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
}]
|
|
729
|
-
},
|
|
729
|
+
}, qe = C(() => import("./form-39e97f30.js")), Ne = {
|
|
730
730
|
name: "Form:Input",
|
|
731
731
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
732
732
|
inputs: [
|
|
@@ -777,7 +777,7 @@ const Te = {
|
|
|
777
777
|
borderStyle: "solid",
|
|
778
778
|
borderColor: "#ccc"
|
|
779
779
|
}
|
|
780
|
-
}, je =
|
|
780
|
+
}, je = C(() => import("./input-c6fee09c.js")), Ke = {
|
|
781
781
|
name: "Form:Select",
|
|
782
782
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
783
783
|
defaultStyles: {
|
|
@@ -819,7 +819,7 @@ const Te = {
|
|
|
819
819
|
}],
|
|
820
820
|
static: !0,
|
|
821
821
|
noWrap: !0
|
|
822
|
-
},
|
|
822
|
+
}, Be = C(() => import("./select-f260d051.js")), _e = {
|
|
823
823
|
name: "Form:SubmitButton",
|
|
824
824
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
825
825
|
defaultStyles: {
|
|
@@ -844,7 +844,7 @@ const Te = {
|
|
|
844
844
|
// that only shows if advanced setting is flipped
|
|
845
845
|
// TODO: defaultChildren
|
|
846
846
|
// canHaveChildren: true,
|
|
847
|
-
},
|
|
847
|
+
}, Me = C(() => import("./submit-button-b48361a7.js")), Oe = {
|
|
848
848
|
// friendlyName?
|
|
849
849
|
name: "Raw:Img",
|
|
850
850
|
hideFromInsertMenu: !0,
|
|
@@ -858,7 +858,7 @@ const Te = {
|
|
|
858
858
|
}],
|
|
859
859
|
noWrap: !0,
|
|
860
860
|
static: !0
|
|
861
|
-
},
|
|
861
|
+
}, ze = C(() => import("./img-b4ff1bef.js")), Je = {
|
|
862
862
|
name: "Video",
|
|
863
863
|
canHaveChildren: !0,
|
|
864
864
|
defaultStyles: {
|
|
@@ -939,34 +939,31 @@ const Te = {
|
|
|
939
939
|
defaultValue: !0,
|
|
940
940
|
advanced: !0
|
|
941
941
|
}]
|
|
942
|
-
},
|
|
943
|
-
component:
|
|
944
|
-
...
|
|
942
|
+
}, Ye = () => [{
|
|
943
|
+
component: $e,
|
|
944
|
+
...Ue
|
|
945
945
|
}, {
|
|
946
946
|
component: De,
|
|
947
|
-
...$e
|
|
948
|
-
}, {
|
|
949
|
-
component: Le,
|
|
950
947
|
...He
|
|
948
|
+
}, {
|
|
949
|
+
component: qe,
|
|
950
|
+
...Le
|
|
951
951
|
}, {
|
|
952
952
|
component: je,
|
|
953
953
|
...Ne
|
|
954
954
|
}, {
|
|
955
|
-
component:
|
|
955
|
+
component: Me,
|
|
956
956
|
..._e
|
|
957
957
|
}, {
|
|
958
|
-
component:
|
|
959
|
-
...
|
|
958
|
+
component: Be,
|
|
959
|
+
...Ke
|
|
960
960
|
}, {
|
|
961
|
-
component:
|
|
962
|
-
...
|
|
961
|
+
component: ze,
|
|
962
|
+
...Oe
|
|
963
963
|
}, {
|
|
964
|
-
component: me,
|
|
965
|
-
...ze
|
|
966
|
-
}], O = () => [{
|
|
967
964
|
component: pe,
|
|
968
|
-
...
|
|
969
|
-
}, {
|
|
965
|
+
...Je
|
|
966
|
+
}], O = () => [{
|
|
970
967
|
component: ge,
|
|
971
968
|
...Ce
|
|
972
969
|
}, {
|
|
@@ -979,15 +976,18 @@ const Te = {
|
|
|
979
976
|
component: be,
|
|
980
977
|
...Re
|
|
981
978
|
}, {
|
|
982
|
-
component:
|
|
979
|
+
component: ye,
|
|
983
980
|
...Ee
|
|
984
981
|
}, {
|
|
985
|
-
component:
|
|
986
|
-
...
|
|
982
|
+
component: We,
|
|
983
|
+
...Fe
|
|
987
984
|
}, {
|
|
988
985
|
component: xe,
|
|
989
986
|
...Ae
|
|
990
|
-
},
|
|
987
|
+
}, {
|
|
988
|
+
component: ve,
|
|
989
|
+
...Pe
|
|
990
|
+
}, ...Ye()], Qe = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
991
991
|
function getAndSetVariantId() {
|
|
992
992
|
function setCookie(name, value, days) {
|
|
993
993
|
let expires = '';
|
|
@@ -1043,7 +1043,7 @@ const Te = {
|
|
|
1043
1043
|
}).join('');
|
|
1044
1044
|
styleEl.innerHTML = newStyleStr;
|
|
1045
1045
|
}
|
|
1046
|
-
}`,
|
|
1046
|
+
}`, Ge = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1047
1047
|
if (!navigator.cookieEnabled) {
|
|
1048
1048
|
return;
|
|
1049
1049
|
}
|
|
@@ -1081,16 +1081,16 @@ const Te = {
|
|
|
1081
1081
|
...t,
|
|
1082
1082
|
testVariationId: t.id,
|
|
1083
1083
|
id: e == null ? void 0 : e.id
|
|
1084
|
-
})),
|
|
1084
|
+
})), Xe = ({
|
|
1085
1085
|
canTrack: e,
|
|
1086
1086
|
content: t
|
|
1087
|
-
}) => !(!(F(t).length > 0) || !e || U()),
|
|
1088
|
-
window.${X} = ${
|
|
1089
|
-
window.${Z} = ${
|
|
1090
|
-
`,
|
|
1087
|
+
}) => !(!(F(t).length > 0) || !e || U()), Ze = (e) => e === "react" || e === "reactNative", ee = Ze(Q), et = () => `
|
|
1088
|
+
window.${X} = ${Qe}
|
|
1089
|
+
window.${Z} = ${Ge}
|
|
1090
|
+
`, tt = (e, t) => `
|
|
1091
1091
|
window.${X}(
|
|
1092
1092
|
"${t}",${JSON.stringify(e)}, ${ee}
|
|
1093
|
-
)`,
|
|
1093
|
+
)`, nt = ({
|
|
1094
1094
|
contentId: e,
|
|
1095
1095
|
variationId: t
|
|
1096
1096
|
}) => `window.${Z}(
|
|
@@ -1108,7 +1108,7 @@ function $(e) {
|
|
|
1108
1108
|
function z(e) {
|
|
1109
1109
|
return Math.round(e * 1e3) / 1e3;
|
|
1110
1110
|
}
|
|
1111
|
-
const
|
|
1111
|
+
const at = (e, t, n = !0) => {
|
|
1112
1112
|
if (!(e instanceof HTMLElement))
|
|
1113
1113
|
return null;
|
|
1114
1114
|
let a = n ? e : e.parentElement;
|
|
@@ -1119,20 +1119,20 @@ const nt = (e, t, n = !0) => {
|
|
|
1119
1119
|
return a;
|
|
1120
1120
|
} while (a = a.parentElement);
|
|
1121
1121
|
return null;
|
|
1122
|
-
},
|
|
1122
|
+
}, it = (e) => at(e, (t) => {
|
|
1123
1123
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1124
1124
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1125
1125
|
}), J = ({
|
|
1126
1126
|
event: e,
|
|
1127
1127
|
target: t
|
|
1128
1128
|
}) => {
|
|
1129
|
-
const n = t.getBoundingClientRect(), a = e.clientX - n.left,
|
|
1129
|
+
const n = t.getBoundingClientRect(), a = e.clientX - n.left, d = e.clientY - n.top, p = z(a / n.width), i = z(d / n.height);
|
|
1130
1130
|
return {
|
|
1131
1131
|
x: p,
|
|
1132
1132
|
y: i
|
|
1133
1133
|
};
|
|
1134
|
-
},
|
|
1135
|
-
const t = e.target, n = t &&
|
|
1134
|
+
}, ot = (e) => {
|
|
1135
|
+
const t = e.target, n = t && it(t), a = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
1136
1136
|
return {
|
|
1137
1137
|
targetBuilderElement: a || void 0,
|
|
1138
1138
|
metadata: {
|
|
@@ -1148,69 +1148,69 @@ const nt = (e, t, n = !0) => {
|
|
|
1148
1148
|
}
|
|
1149
1149
|
};
|
|
1150
1150
|
};
|
|
1151
|
-
function
|
|
1152
|
-
var
|
|
1153
|
-
const t =
|
|
1151
|
+
function rt(e) {
|
|
1152
|
+
var T, H, D, L, q, N, j;
|
|
1153
|
+
const t = ne(null);
|
|
1154
1154
|
function n(r) {
|
|
1155
|
-
var
|
|
1156
|
-
const
|
|
1155
|
+
var m, l;
|
|
1156
|
+
const c = {
|
|
1157
1157
|
...e.builderContextSignal.rootState,
|
|
1158
1158
|
...r
|
|
1159
1159
|
};
|
|
1160
|
-
e.builderContextSignal.rootSetState ? (
|
|
1161
|
-
...
|
|
1162
|
-
rootState:
|
|
1160
|
+
e.builderContextSignal.rootSetState ? (l = (m = e.builderContextSignal).rootSetState) == null || l.call(m, c) : e.setBuilderContextSignal((s) => ({
|
|
1161
|
+
...s,
|
|
1162
|
+
rootState: c
|
|
1163
1163
|
}));
|
|
1164
1164
|
}
|
|
1165
1165
|
function a(r) {
|
|
1166
|
-
var
|
|
1167
|
-
const
|
|
1166
|
+
var m, l, s, g, V;
|
|
1167
|
+
const c = {
|
|
1168
1168
|
...e.builderContextSignal.content,
|
|
1169
1169
|
...r,
|
|
1170
1170
|
data: {
|
|
1171
|
-
...(
|
|
1171
|
+
...(m = e.builderContextSignal.content) == null ? void 0 : m.data,
|
|
1172
1172
|
...r == null ? void 0 : r.data
|
|
1173
1173
|
},
|
|
1174
1174
|
meta: {
|
|
1175
|
-
...(
|
|
1175
|
+
...(l = e.builderContextSignal.content) == null ? void 0 : l.meta,
|
|
1176
1176
|
...r == null ? void 0 : r.meta,
|
|
1177
|
-
breakpoints: ((
|
|
1177
|
+
breakpoints: ((s = r == null ? void 0 : r.meta) == null ? void 0 : s.breakpoints) || ((V = (g = e.builderContextSignal.content) == null ? void 0 : g.meta) == null ? void 0 : V.breakpoints)
|
|
1178
1178
|
}
|
|
1179
1179
|
};
|
|
1180
|
-
e.setBuilderContextSignal((
|
|
1181
|
-
...
|
|
1182
|
-
content:
|
|
1180
|
+
e.setBuilderContextSignal((x) => ({
|
|
1181
|
+
...x,
|
|
1182
|
+
content: c
|
|
1183
1183
|
}));
|
|
1184
1184
|
}
|
|
1185
|
-
const [
|
|
1185
|
+
const [d, p] = I(
|
|
1186
1186
|
() => e.contentWrapper || "div"
|
|
1187
1187
|
);
|
|
1188
1188
|
function i(r) {
|
|
1189
|
-
return
|
|
1189
|
+
return de({
|
|
1190
1190
|
model: e.model,
|
|
1191
1191
|
trustedHosts: e.trustedHosts,
|
|
1192
1192
|
callbacks: {
|
|
1193
|
-
configureSdk: (
|
|
1194
|
-
var
|
|
1195
|
-
const { breakpoints:
|
|
1196
|
-
!
|
|
1193
|
+
configureSdk: (c) => {
|
|
1194
|
+
var s;
|
|
1195
|
+
const { breakpoints: m, contentId: l } = c;
|
|
1196
|
+
!l || l !== ((s = e.builderContextSignal.content) == null ? void 0 : s.id) || m && a({
|
|
1197
1197
|
meta: {
|
|
1198
|
-
breakpoints:
|
|
1198
|
+
breakpoints: m
|
|
1199
1199
|
}
|
|
1200
1200
|
});
|
|
1201
1201
|
},
|
|
1202
|
-
animation: (
|
|
1203
|
-
|
|
1202
|
+
animation: (c) => {
|
|
1203
|
+
Ie(c);
|
|
1204
1204
|
},
|
|
1205
|
-
contentUpdate: (
|
|
1206
|
-
a(
|
|
1205
|
+
contentUpdate: (c) => {
|
|
1206
|
+
a(c);
|
|
1207
1207
|
}
|
|
1208
1208
|
}
|
|
1209
1209
|
})(r);
|
|
1210
1210
|
}
|
|
1211
1211
|
function o() {
|
|
1212
|
-
var
|
|
1213
|
-
const r = (
|
|
1212
|
+
var c, m;
|
|
1213
|
+
const r = (m = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : m.jsCode;
|
|
1214
1214
|
r && M({
|
|
1215
1215
|
code: r,
|
|
1216
1216
|
context: e.context || {},
|
|
@@ -1223,61 +1223,52 @@ function ot(e) {
|
|
|
1223
1223
|
enableCache: !1
|
|
1224
1224
|
});
|
|
1225
1225
|
}
|
|
1226
|
-
const [
|
|
1227
|
-
function
|
|
1228
|
-
var
|
|
1226
|
+
const [u, v] = I(() => ({})), [b, w] = I(() => ({})), [k, R] = I(() => !1);
|
|
1227
|
+
function E(r) {
|
|
1228
|
+
var c, m;
|
|
1229
1229
|
if (e.builderContextSignal.content) {
|
|
1230
|
-
const
|
|
1231
|
-
|
|
1230
|
+
const l = (c = e.builderContextSignal.content) == null ? void 0 : c.testVariationId, s = (m = e.builderContextSignal.content) == null ? void 0 : m.id;
|
|
1231
|
+
B({
|
|
1232
1232
|
type: "click",
|
|
1233
1233
|
canTrack: W(e.canTrack),
|
|
1234
|
-
contentId:
|
|
1234
|
+
contentId: s,
|
|
1235
1235
|
apiKey: e.apiKey,
|
|
1236
|
-
variationId:
|
|
1237
|
-
...
|
|
1238
|
-
unique: !
|
|
1236
|
+
variationId: l !== s ? l : void 0,
|
|
1237
|
+
...ot(r),
|
|
1238
|
+
unique: !k
|
|
1239
1239
|
});
|
|
1240
1240
|
}
|
|
1241
|
-
|
|
1241
|
+
k || R(!0);
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
const r = (d = (l = (s = e.builderContextSignal.content) == null ? void 0 : s.data) == null ? void 0 : l.httpRequests) != null ? d : {};
|
|
1273
|
-
Object.entries(r).forEach(([c, g]) => {
|
|
1274
|
-
if (g && (!m[c] || A())) {
|
|
1275
|
-
const w = V(g);
|
|
1276
|
-
R({
|
|
1277
|
-
url: w,
|
|
1278
|
-
key: c
|
|
1279
|
-
});
|
|
1280
|
-
}
|
|
1243
|
+
function y() {
|
|
1244
|
+
var c, m, l;
|
|
1245
|
+
const r = (l = (m = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : m.httpRequests) != null ? l : {};
|
|
1246
|
+
Object.entries(r).forEach(([s, g]) => {
|
|
1247
|
+
if (!g || b[s] || u[s] && !A())
|
|
1248
|
+
return;
|
|
1249
|
+
b[s] = !0;
|
|
1250
|
+
const V = g.replace(
|
|
1251
|
+
/{{([^}]+)}}/g,
|
|
1252
|
+
(x, te) => String(
|
|
1253
|
+
M({
|
|
1254
|
+
code: te,
|
|
1255
|
+
context: e.context || {},
|
|
1256
|
+
localState: void 0,
|
|
1257
|
+
rootState: e.builderContextSignal.rootState,
|
|
1258
|
+
rootSetState: e.builderContextSignal.rootSetState,
|
|
1259
|
+
enableCache: !0
|
|
1260
|
+
})
|
|
1261
|
+
)
|
|
1262
|
+
);
|
|
1263
|
+
ce(V).then((x) => x.json()).then((x) => {
|
|
1264
|
+
n({
|
|
1265
|
+
[s]: x
|
|
1266
|
+
}), u[s] = !0;
|
|
1267
|
+
}).catch((x) => {
|
|
1268
|
+
console.error("error fetching dynamic data", g, x);
|
|
1269
|
+
}).finally(() => {
|
|
1270
|
+
b[s] = !1;
|
|
1271
|
+
});
|
|
1281
1272
|
});
|
|
1282
1273
|
}
|
|
1283
1274
|
function h() {
|
|
@@ -1286,7 +1277,7 @@ function ot(e) {
|
|
|
1286
1277
|
"builder:component:stateChange",
|
|
1287
1278
|
{
|
|
1288
1279
|
detail: {
|
|
1289
|
-
state:
|
|
1280
|
+
state: ue(e.builderContextSignal.rootState),
|
|
1290
1281
|
ref: {
|
|
1291
1282
|
name: e.model
|
|
1292
1283
|
}
|
|
@@ -1295,10 +1286,10 @@ function ot(e) {
|
|
|
1295
1286
|
)
|
|
1296
1287
|
);
|
|
1297
1288
|
}
|
|
1298
|
-
return
|
|
1299
|
-
var r,
|
|
1289
|
+
return S(() => {
|
|
1290
|
+
var r, c;
|
|
1300
1291
|
if (U()) {
|
|
1301
|
-
if (A() && (window.addEventListener("message", i),
|
|
1292
|
+
if (A() && (window.addEventListener("message", i), ae(), ie({
|
|
1302
1293
|
...e.locale ? {
|
|
1303
1294
|
locale: e.locale
|
|
1304
1295
|
} : {},
|
|
@@ -1310,81 +1301,81 @@ function ot(e) {
|
|
|
1310
1301
|
} : {}
|
|
1311
1302
|
}), Object.values(
|
|
1312
1303
|
e.builderContextSignal.componentInfos
|
|
1313
|
-
).forEach((
|
|
1304
|
+
).forEach((l) => {
|
|
1314
1305
|
var g;
|
|
1315
|
-
const
|
|
1316
|
-
(g = window.parent) == null || g.postMessage(
|
|
1306
|
+
const s = oe(l);
|
|
1307
|
+
(g = window.parent) == null || g.postMessage(s, "*");
|
|
1317
1308
|
}), window.addEventListener(
|
|
1318
1309
|
"builder:component:stateChangeListenerActivated",
|
|
1319
1310
|
h
|
|
1320
1311
|
)), e.builderContextSignal.content && W(e.canTrack)) {
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1312
|
+
const l = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, s = (c = e.builderContextSignal.content) == null ? void 0 : c.id, g = e.apiKey;
|
|
1313
|
+
B({
|
|
1323
1314
|
type: "impression",
|
|
1324
1315
|
canTrack: !0,
|
|
1325
|
-
contentId:
|
|
1316
|
+
contentId: s,
|
|
1326
1317
|
apiKey: g,
|
|
1327
|
-
variationId:
|
|
1318
|
+
variationId: l !== s ? l : void 0
|
|
1328
1319
|
});
|
|
1329
1320
|
}
|
|
1330
|
-
if (
|
|
1331
|
-
const
|
|
1332
|
-
`builder.preview.${
|
|
1333
|
-
),
|
|
1334
|
-
|
|
1321
|
+
if (re()) {
|
|
1322
|
+
const l = new URL(location.href).searchParams, s = l.get("builder.preview"), g = l.get(
|
|
1323
|
+
`builder.preview.${s}`
|
|
1324
|
+
), V = l.get("apiKey") || l.get("builder.space");
|
|
1325
|
+
s === e.model && V === e.apiKey && (!e.content || g === e.content.id) && se({
|
|
1335
1326
|
model: e.model,
|
|
1336
1327
|
apiKey: e.apiKey,
|
|
1337
1328
|
apiVersion: e.builderContextSignal.apiVersion
|
|
1338
|
-
}).then((
|
|
1339
|
-
|
|
1329
|
+
}).then((x) => {
|
|
1330
|
+
x && a(x);
|
|
1340
1331
|
});
|
|
1341
1332
|
}
|
|
1342
1333
|
}
|
|
1343
|
-
}, []),
|
|
1344
|
-
e.apiKey ||
|
|
1334
|
+
}, []), S(() => {
|
|
1335
|
+
e.apiKey || le.error(
|
|
1345
1336
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1346
|
-
), o(),
|
|
1347
|
-
}, []),
|
|
1337
|
+
), o(), y(), h();
|
|
1338
|
+
}, []), S(() => {
|
|
1348
1339
|
e.content && a(e.content);
|
|
1349
|
-
}, [e.content]),
|
|
1340
|
+
}, [e.content]), S(() => {
|
|
1350
1341
|
o();
|
|
1351
|
-
}, [(
|
|
1352
|
-
|
|
1353
|
-
}, [(L = (
|
|
1342
|
+
}, [(H = (T = e.builderContextSignal.content) == null ? void 0 : T.data) == null ? void 0 : H.jsCode]), S(() => {
|
|
1343
|
+
y();
|
|
1344
|
+
}, [(L = (D = e.builderContextSignal.content) == null ? void 0 : D.data) == null ? void 0 : L.httpRequests]), S(() => {
|
|
1354
1345
|
h();
|
|
1355
|
-
}, [e.builderContextSignal.rootState]),
|
|
1346
|
+
}, [e.builderContextSignal.rootState]), S(() => {
|
|
1356
1347
|
e.data && n(e.data);
|
|
1357
|
-
}, [e.data]),
|
|
1348
|
+
}, [e.data]), S(() => {
|
|
1358
1349
|
e.locale && n({
|
|
1359
1350
|
locale: e.locale
|
|
1360
1351
|
});
|
|
1361
|
-
}, [e.locale]),
|
|
1352
|
+
}, [e.locale]), S(() => () => {
|
|
1362
1353
|
U() && (window.removeEventListener("message", i), window.removeEventListener(
|
|
1363
1354
|
"builder:component:stateChangeListenerActivated",
|
|
1364
1355
|
h
|
|
1365
1356
|
));
|
|
1366
|
-
}, []), /* @__PURE__ */ f(
|
|
1367
|
-
|
|
1357
|
+
}, []), /* @__PURE__ */ f(Se.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ f(
|
|
1358
|
+
d,
|
|
1368
1359
|
{
|
|
1369
1360
|
ref: t,
|
|
1370
|
-
onClick: (r) =>
|
|
1371
|
-
"builder-content-id": (
|
|
1361
|
+
onClick: (r) => E(r),
|
|
1362
|
+
"builder-content-id": (q = e.builderContextSignal.content) == null ? void 0 : q.id,
|
|
1372
1363
|
"builder-model": e.model,
|
|
1373
1364
|
...e.showContent ? {} : {
|
|
1374
1365
|
hidden: !0,
|
|
1375
1366
|
"aria-hidden": !0
|
|
1376
1367
|
},
|
|
1377
1368
|
...e.contentWrapperProps,
|
|
1378
|
-
className: `variant-${((
|
|
1369
|
+
className: `variant-${((N = e.content) == null ? void 0 : N.testVariationId) || ((j = e.content) == null ? void 0 : j.id)}`,
|
|
1379
1370
|
children: e.children
|
|
1380
1371
|
}
|
|
1381
1372
|
) : null });
|
|
1382
1373
|
}
|
|
1383
|
-
const
|
|
1374
|
+
const st = (e) => {
|
|
1384
1375
|
var p, i;
|
|
1385
1376
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], a = (i = e.fileUrl) != null ? i : (p = e == null ? void 0 : e.files) == null ? void 0 : p.regular;
|
|
1386
|
-
let
|
|
1387
|
-
if (a && t && n && (
|
|
1377
|
+
let d = "";
|
|
1378
|
+
if (a && t && n && (d += `
|
|
1388
1379
|
@font-face {
|
|
1389
1380
|
font-family: "${t}";
|
|
1390
1381
|
src: local("${n}"), url('${a}') format('woff2');
|
|
@@ -1395,26 +1386,26 @@ font-weight: 400;
|
|
|
1395
1386
|
for (const o in e.files) {
|
|
1396
1387
|
if (!(String(Number(o)) === o))
|
|
1397
1388
|
continue;
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1389
|
+
const v = e.files[o];
|
|
1390
|
+
v && v !== a && (d += `
|
|
1400
1391
|
@font-face {
|
|
1401
1392
|
font-family: "${t}";
|
|
1402
|
-
src: url('${
|
|
1393
|
+
src: url('${v}') format('woff2');
|
|
1403
1394
|
font-display: fallback;
|
|
1404
1395
|
font-weight: ${o};
|
|
1405
1396
|
}
|
|
1406
1397
|
`.trim());
|
|
1407
1398
|
}
|
|
1408
|
-
return
|
|
1409
|
-
},
|
|
1399
|
+
return d;
|
|
1400
|
+
}, lt = ({
|
|
1410
1401
|
customFonts: e
|
|
1411
1402
|
}) => {
|
|
1412
1403
|
var t;
|
|
1413
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
1414
|
-
},
|
|
1404
|
+
return ((t = e == null ? void 0 : e.map((n) => st(n))) == null ? void 0 : t.join(" ")) || "";
|
|
1405
|
+
}, dt = ({
|
|
1415
1406
|
cssCode: e,
|
|
1416
1407
|
contentId: t
|
|
1417
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
1408
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", ct = `
|
|
1418
1409
|
.builder-button {
|
|
1419
1410
|
all: unset;
|
|
1420
1411
|
}
|
|
@@ -1431,40 +1422,40 @@ font-weight: ${o};
|
|
|
1431
1422
|
text-align: inherit;
|
|
1432
1423
|
font-family: inherit;
|
|
1433
1424
|
}
|
|
1434
|
-
`,
|
|
1435
|
-
function
|
|
1425
|
+
`, ut = (e) => e ? "" : ct;
|
|
1426
|
+
function mt(e) {
|
|
1436
1427
|
const [t, n] = I(
|
|
1437
1428
|
() => `
|
|
1438
|
-
${
|
|
1429
|
+
${dt({
|
|
1439
1430
|
cssCode: e.cssCode,
|
|
1440
1431
|
contentId: e.contentId
|
|
1441
1432
|
})}
|
|
1442
|
-
${
|
|
1433
|
+
${lt({
|
|
1443
1434
|
customFonts: e.customFonts
|
|
1444
1435
|
})}
|
|
1445
|
-
${
|
|
1436
|
+
${ut(e.isNestedRender)}
|
|
1446
1437
|
`.trim()
|
|
1447
1438
|
);
|
|
1448
1439
|
return /* @__PURE__ */ f(G, { id: "builderio-content", styles: t });
|
|
1449
1440
|
}
|
|
1450
|
-
const
|
|
1441
|
+
const pt = ({
|
|
1451
1442
|
content: e,
|
|
1452
1443
|
data: t,
|
|
1453
1444
|
locale: n
|
|
1454
1445
|
}) => {
|
|
1455
1446
|
var p, i, o;
|
|
1456
|
-
const a = {},
|
|
1457
|
-
return (o = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || o.forEach((
|
|
1458
|
-
|
|
1447
|
+
const a = {}, d = ((p = e == null ? void 0 : e.data) == null ? void 0 : p.state) || {};
|
|
1448
|
+
return (o = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || o.forEach((u) => {
|
|
1449
|
+
u.name && u.defaultValue !== void 0 && (a[u.name] = u.defaultValue);
|
|
1459
1450
|
}), {
|
|
1460
1451
|
...a,
|
|
1461
|
-
...
|
|
1452
|
+
...d,
|
|
1462
1453
|
...t,
|
|
1463
1454
|
...n ? {
|
|
1464
1455
|
locale: n
|
|
1465
1456
|
} : {}
|
|
1466
1457
|
};
|
|
1467
|
-
},
|
|
1458
|
+
}, gt = ({
|
|
1468
1459
|
content: e,
|
|
1469
1460
|
data: t
|
|
1470
1461
|
}) => e ? {
|
|
@@ -1476,45 +1467,45 @@ const mt = ({
|
|
|
1476
1467
|
meta: e == null ? void 0 : e.meta
|
|
1477
1468
|
} : void 0;
|
|
1478
1469
|
function Y(e) {
|
|
1479
|
-
var
|
|
1470
|
+
var u, v, b, w, k, R, E;
|
|
1480
1471
|
const [t, n] = I(
|
|
1481
1472
|
() => {
|
|
1482
|
-
var
|
|
1483
|
-
return
|
|
1473
|
+
var y, h;
|
|
1474
|
+
return nt({
|
|
1484
1475
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1485
|
-
variationId: (
|
|
1476
|
+
variationId: (y = e.content) == null ? void 0 : y.testVariationId,
|
|
1486
1477
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1487
1478
|
contentId: (h = e.content) == null ? void 0 : h.id
|
|
1488
1479
|
});
|
|
1489
1480
|
}
|
|
1490
1481
|
);
|
|
1491
|
-
function a(
|
|
1482
|
+
function a(y) {
|
|
1492
1483
|
o((h) => ({
|
|
1493
1484
|
...h,
|
|
1494
|
-
rootState:
|
|
1485
|
+
rootState: y
|
|
1495
1486
|
}));
|
|
1496
1487
|
}
|
|
1497
|
-
const [
|
|
1488
|
+
const [d, p] = I(
|
|
1498
1489
|
() => [
|
|
1499
1490
|
...O(),
|
|
1500
1491
|
...e.customComponents || []
|
|
1501
1492
|
].reduce(
|
|
1502
|
-
(
|
|
1503
|
-
...
|
|
1504
|
-
[
|
|
1493
|
+
(y, { component: h, ...T }) => ({
|
|
1494
|
+
...y,
|
|
1495
|
+
[T.name]: {
|
|
1505
1496
|
component: h,
|
|
1506
|
-
...
|
|
1497
|
+
..._(T)
|
|
1507
1498
|
}
|
|
1508
1499
|
}),
|
|
1509
1500
|
{}
|
|
1510
1501
|
)
|
|
1511
1502
|
), [i, o] = I(() => ({
|
|
1512
|
-
content:
|
|
1503
|
+
content: gt({
|
|
1513
1504
|
content: e.content,
|
|
1514
1505
|
data: e.data
|
|
1515
1506
|
}),
|
|
1516
1507
|
localState: void 0,
|
|
1517
|
-
rootState:
|
|
1508
|
+
rootState: pt({
|
|
1518
1509
|
content: e.content,
|
|
1519
1510
|
data: e.data,
|
|
1520
1511
|
locale: e.locale
|
|
@@ -1527,9 +1518,9 @@ function Y(e) {
|
|
|
1527
1518
|
...O(),
|
|
1528
1519
|
...e.customComponents || []
|
|
1529
1520
|
].reduce(
|
|
1530
|
-
(
|
|
1531
|
-
...
|
|
1532
|
-
[
|
|
1521
|
+
(y, { component: h, ...T }) => ({
|
|
1522
|
+
...y,
|
|
1523
|
+
[T.name]: _(T)
|
|
1533
1524
|
}),
|
|
1534
1525
|
{}
|
|
1535
1526
|
),
|
|
@@ -1538,13 +1529,13 @@ function Y(e) {
|
|
|
1538
1529
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
1539
1530
|
}));
|
|
1540
1531
|
return /* @__PURE__ */ f(
|
|
1541
|
-
|
|
1532
|
+
ke.Provider,
|
|
1542
1533
|
{
|
|
1543
1534
|
value: {
|
|
1544
|
-
registeredComponents:
|
|
1535
|
+
registeredComponents: d
|
|
1545
1536
|
},
|
|
1546
1537
|
children: /* @__PURE__ */ P(
|
|
1547
|
-
|
|
1538
|
+
rt,
|
|
1548
1539
|
{
|
|
1549
1540
|
content: e.content,
|
|
1550
1541
|
data: e.data,
|
|
@@ -1570,20 +1561,20 @@ function Y(e) {
|
|
|
1570
1561
|
}
|
|
1571
1562
|
) : null,
|
|
1572
1563
|
/* @__PURE__ */ f(
|
|
1573
|
-
|
|
1564
|
+
mt,
|
|
1574
1565
|
{
|
|
1575
1566
|
isNestedRender: e.isNestedRender,
|
|
1576
|
-
contentId: (
|
|
1577
|
-
cssCode: (
|
|
1578
|
-
customFonts: (
|
|
1567
|
+
contentId: (u = i.content) == null ? void 0 : u.id,
|
|
1568
|
+
cssCode: (b = (v = i.content) == null ? void 0 : v.data) == null ? void 0 : b.cssCode,
|
|
1569
|
+
customFonts: (k = (w = i.content) == null ? void 0 : w.data) == null ? void 0 : k.customFonts
|
|
1579
1570
|
}
|
|
1580
1571
|
),
|
|
1581
1572
|
/* @__PURE__ */ f(
|
|
1582
|
-
|
|
1573
|
+
Te,
|
|
1583
1574
|
{
|
|
1584
|
-
blocks: (
|
|
1575
|
+
blocks: (E = (R = i.content) == null ? void 0 : R.data) == null ? void 0 : E.blocks,
|
|
1585
1576
|
context: i,
|
|
1586
|
-
registeredComponents:
|
|
1577
|
+
registeredComponents: d,
|
|
1587
1578
|
linkComponent: e.linkComponent
|
|
1588
1579
|
}
|
|
1589
1580
|
)
|
|
@@ -1593,25 +1584,25 @@ function Y(e) {
|
|
|
1593
1584
|
}
|
|
1594
1585
|
);
|
|
1595
1586
|
}
|
|
1596
|
-
function
|
|
1587
|
+
function It(e) {
|
|
1597
1588
|
var i;
|
|
1598
1589
|
const [t, n] = I(
|
|
1599
|
-
() =>
|
|
1590
|
+
() => Xe({
|
|
1600
1591
|
canTrack: W(e.canTrack),
|
|
1601
1592
|
content: e.content
|
|
1602
1593
|
})
|
|
1603
1594
|
);
|
|
1604
1595
|
function a() {
|
|
1605
1596
|
var o;
|
|
1606
|
-
return
|
|
1607
|
-
F(e.content).map((
|
|
1608
|
-
id:
|
|
1609
|
-
testRatio:
|
|
1597
|
+
return tt(
|
|
1598
|
+
F(e.content).map((u) => ({
|
|
1599
|
+
id: u.testVariationId,
|
|
1600
|
+
testRatio: u.testRatio
|
|
1610
1601
|
})),
|
|
1611
1602
|
((o = e.content) == null ? void 0 : o.id) || ""
|
|
1612
1603
|
);
|
|
1613
1604
|
}
|
|
1614
|
-
function
|
|
1605
|
+
function d() {
|
|
1615
1606
|
return F(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
|
|
1616
1607
|
}
|
|
1617
1608
|
function p() {
|
|
@@ -1619,18 +1610,18 @@ function St(e) {
|
|
|
1619
1610
|
return t ? {
|
|
1620
1611
|
...e.content,
|
|
1621
1612
|
testVariationId: (o = e.content) == null ? void 0 : o.id
|
|
1622
|
-
} :
|
|
1613
|
+
} : me({
|
|
1623
1614
|
item: e.content,
|
|
1624
1615
|
canTrack: W(e.canTrack)
|
|
1625
1616
|
});
|
|
1626
1617
|
}
|
|
1627
|
-
return
|
|
1618
|
+
return S(() => {
|
|
1628
1619
|
}, []), /* @__PURE__ */ P(K, { children: [
|
|
1629
1620
|
!e.isNestedRender && Q !== "reactNative" ? /* @__PURE__ */ f(
|
|
1630
1621
|
$,
|
|
1631
1622
|
{
|
|
1632
1623
|
id: "builderio-init-variants-fns",
|
|
1633
|
-
scriptStr:
|
|
1624
|
+
scriptStr: et()
|
|
1634
1625
|
}
|
|
1635
1626
|
) : null,
|
|
1636
1627
|
t ? /* @__PURE__ */ P(K, { children: [
|
|
@@ -1638,7 +1629,7 @@ function St(e) {
|
|
|
1638
1629
|
G,
|
|
1639
1630
|
{
|
|
1640
1631
|
id: "builderio-variants",
|
|
1641
|
-
styles:
|
|
1632
|
+
styles: d()
|
|
1642
1633
|
}
|
|
1643
1634
|
),
|
|
1644
1635
|
/* @__PURE__ */ f(
|
|
@@ -1701,5 +1692,5 @@ function St(e) {
|
|
|
1701
1692
|
] });
|
|
1702
1693
|
}
|
|
1703
1694
|
export {
|
|
1704
|
-
|
|
1695
|
+
It as default
|
|
1705
1696
|
};
|