@builder.io/sdk-react 2.0.16 → 2.0.21
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 +31 -31
- package/lib/browser/blocks-exports.mjs +852 -829
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +22 -23
- package/lib/browser/{server-entry-c1666709.cjs → server-entry-6e52be8e.cjs} +2 -2
- package/lib/browser/{server-entry-1db0d96b.js → server-entry-8f273525.js} +1 -3
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-7c1c7c56.js → accordion-0fa0cd9f.js} +1 -1
- package/lib/edge/{accordion-09162a27.cjs → accordion-98e5d925.cjs} +1 -1
- package/lib/edge/blocks-4dac2e8c.cjs +12 -0
- package/lib/edge/{blocks-46c07b56.js → blocks-805edb5d.js} +296 -276
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-f2daea13.cjs → button-04692c59.cjs} +1 -1
- package/lib/edge/{button-a923f8ff.js → button-8c912189.js} +2 -2
- package/lib/edge/columns-4d8db53c.cjs +28 -0
- package/lib/edge/{columns-eee4f51c.js → columns-70a13cfe.js} +8 -9
- package/lib/edge/content-variants-7570438f.cjs +134 -0
- package/lib/edge/{content-variants-1368cab1.js → content-variants-d11198bc.js} +306 -309
- package/lib/edge/{evaluate-93701356.js → evaluate-29e9d055.js} +736 -711
- package/lib/edge/{evaluate-4c9b2e86.cjs → evaluate-826010e9.cjs} +13 -15
- package/lib/edge/form-13c77d47.cjs +1 -0
- package/lib/edge/{form-d0eb0af4.js → form-28c6dcde.js} +16 -17
- package/lib/edge/{get-class-prop-name-7cd1376f.cjs → get-class-prop-name-182b0edb.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-1c373615.js → get-class-prop-name-c9e11804.js} +1 -1
- package/lib/edge/{image-eebfcbac.cjs → image-54d2f755.cjs} +3 -3
- package/lib/edge/{image-6a074aab.js → image-6970c193.js} +24 -24
- package/lib/edge/{img-6c8139db.cjs → img-8f2d03d2.cjs} +1 -1
- package/lib/edge/{img-6e16ade6.js → img-ca1be569.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-c78fef2b.cjs → input-0456a323.cjs} +1 -1
- package/lib/edge/{input-a7e9c157.js → input-3db08208.js} +1 -1
- package/lib/edge/{select-3cf593bd.js → select-251dfaa4.js} +1 -1
- package/lib/edge/{select-bd1e231b.cjs → select-b851ff58.cjs} +1 -1
- package/lib/edge/{server-entry-6b3ad048.js → server-entry-05e6ebef.js} +1 -3
- package/lib/edge/{server-entry-d09af943.cjs → server-entry-75427eb3.cjs} +2 -2
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/slot-279f992e.cjs +1 -0
- package/lib/edge/{slot-a5a9a30f.js → slot-76c2cebc.js} +6 -7
- package/lib/edge/{symbol-9de15518.cjs → symbol-020487c5.cjs} +1 -1
- package/lib/edge/{symbol-77d331c6.js → symbol-47130603.js} +2 -2
- package/lib/edge/{tabs-63d6ea85.js → tabs-3cc397e4.js} +13 -14
- package/lib/edge/tabs-c6053c2d.cjs +1 -0
- package/lib/edge/{text-4d508bbc.js → text-29ef4fd5.js} +8 -9
- package/lib/edge/text-c9d83141.cjs +1 -0
- package/lib/node/blocks-exports.cjs +31 -31
- package/lib/node/blocks-exports.mjs +807 -822
- 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/{server-entry-1db0d96b.js → server-entry-83392238.js} +1 -2
- package/lib/node/{server-entry-c1666709.cjs → server-entry-b5908591.cjs} +2 -2
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-1188ea7b.js → should-force-browser-runtime-in-node-31b1e2f2.js} +57 -30
- package/lib/node/should-force-browser-runtime-in-node-391032cf.cjs +48 -0
- package/package.json +1 -1
- package/types/components/awaiter.d.ts +14 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/component-reference-types.d.ts +4 -0
- package/types/context/types.d.ts +2 -1
- package/types/functions/evaluate/browser-runtime/browser.d.ts +0 -6
- package/types/functions/evaluate/helpers.d.ts +5 -0
- package/lib/browser/init.cjs +0 -8
- package/lib/browser/init.mjs +0 -64
- package/lib/browser/should-force-browser-runtime-in-node-00f3cfef.js +0 -17
- package/lib/browser/should-force-browser-runtime-in-node-f768fb5d.cjs +0 -1
- package/lib/edge/blocks-273f24cc.cjs +0 -12
- package/lib/edge/columns-0b8c2260.cjs +0 -28
- package/lib/edge/content-variants-575b5dbf.cjs +0 -134
- package/lib/edge/form-bd184008.cjs +0 -1
- package/lib/edge/init.cjs +0 -8
- package/lib/edge/init.mjs +0 -64
- package/lib/edge/should-force-browser-runtime-in-node-2b14e4a8.cjs +0 -1
- package/lib/edge/should-force-browser-runtime-in-node-560bddfb.js +0 -17
- package/lib/edge/slot-ab7fc875.cjs +0 -1
- package/lib/edge/tabs-e6fa664e.cjs +0 -1
- package/lib/edge/text-ab5d2747.cjs +0 -1
- package/lib/node/should-force-browser-runtime-in-node-37010e2f.cjs +0 -48
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { lazy as v, useRef as
|
|
3
|
-
import { isBrowser as
|
|
4
|
-
import { Video as
|
|
5
|
-
import { triggerAnimation as
|
|
6
|
-
import { evaluate as
|
|
7
|
-
import "./get-class-prop-name-
|
|
1
|
+
import { jsx as b, jsxs as N, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as v, useRef as q, useState as T, useEffect as C } from "react";
|
|
3
|
+
import { isBrowser as j, TARGET as G, isEditing as A, registerInsertMenu as ie, setupBrowserForEditing as oe, createRegisterComponentMessage as re, getDefaultCanTrack as D, _track as O, isPreviewing as le, fetchOneEntry as se, createEditorListener as de, serializeIncludingFunctions as _, logger as ue, handleABTestingSync as ce } from "./server-entry-05e6ebef.js";
|
|
4
|
+
import { Video as me, Button as pe, Columns as ge, Fragment as fe, Image as he, Section as be, Symbol as ye, Text as xe, BuilderContext as ve } from "./blocks-exports.mjs";
|
|
5
|
+
import { triggerAnimation as Se, fastClone as Te, InlinedStyles as X, ComponentsContext as ke, Blocks as Ie } from "./blocks-805edb5d.js";
|
|
6
|
+
import { evaluate as Z } from "./evaluate-29e9d055.js";
|
|
7
|
+
import "./get-class-prop-name-c9e11804.js";
|
|
8
8
|
import "./dynamic-renderer-8b343325.js";
|
|
9
|
-
|
|
10
|
-
const B = {
|
|
9
|
+
const U = {
|
|
11
10
|
"@type": "@builder.io/sdk:Element",
|
|
12
11
|
layerName: "Accordion item title",
|
|
13
12
|
responsiveStyles: {
|
|
@@ -36,7 +35,7 @@ const B = {
|
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
}]
|
|
39
|
-
},
|
|
38
|
+
}, L = {
|
|
40
39
|
"@type": "@builder.io/sdk:Element",
|
|
41
40
|
layerName: "Accordion item detail",
|
|
42
41
|
responsiveStyles: {
|
|
@@ -67,7 +66,7 @@ const B = {
|
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
}]
|
|
70
|
-
},
|
|
69
|
+
}, Ce = {
|
|
71
70
|
name: "Builder:Accordion",
|
|
72
71
|
canHaveChildren: !0,
|
|
73
72
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -84,19 +83,19 @@ const B = {
|
|
|
84
83
|
name: "title",
|
|
85
84
|
type: "uiBlocks",
|
|
86
85
|
hideFromUI: !0,
|
|
87
|
-
defaultValue: [
|
|
86
|
+
defaultValue: [U]
|
|
88
87
|
}, {
|
|
89
88
|
name: "detail",
|
|
90
89
|
type: "uiBlocks",
|
|
91
90
|
hideFromUI: !0,
|
|
92
|
-
defaultValue: [
|
|
91
|
+
defaultValue: [L]
|
|
93
92
|
}],
|
|
94
93
|
defaultValue: [{
|
|
95
|
-
title: [
|
|
96
|
-
detail: [
|
|
94
|
+
title: [U],
|
|
95
|
+
detail: [L]
|
|
97
96
|
}, {
|
|
98
|
-
title: [
|
|
99
|
-
detail: [
|
|
97
|
+
title: [U],
|
|
98
|
+
detail: [L]
|
|
100
99
|
}],
|
|
101
100
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
102
101
|
}, {
|
|
@@ -131,7 +130,7 @@ const B = {
|
|
|
131
130
|
builderComponents: !0,
|
|
132
131
|
builderLinkComponent: !0
|
|
133
132
|
}
|
|
134
|
-
},
|
|
133
|
+
}, we = v(() => import("./accordion-0fa0cd9f.js")), Ve = {
|
|
135
134
|
name: "Core:Button",
|
|
136
135
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
137
136
|
defaultStyles: {
|
|
@@ -167,7 +166,7 @@ const B = {
|
|
|
167
166
|
shouldReceiveBuilderProps: {
|
|
168
167
|
builderLinkComponent: !0
|
|
169
168
|
}
|
|
170
|
-
},
|
|
169
|
+
}, Re = {
|
|
171
170
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
172
171
|
name: "Columns",
|
|
173
172
|
isRSC: !0,
|
|
@@ -374,13 +373,13 @@ const B = {
|
|
|
374
373
|
builderComponents: !0,
|
|
375
374
|
builderLinkComponent: !0
|
|
376
375
|
}
|
|
377
|
-
},
|
|
376
|
+
}, Ee = {
|
|
378
377
|
name: "Fragment",
|
|
379
378
|
static: !0,
|
|
380
379
|
hidden: !0,
|
|
381
380
|
canHaveChildren: !0,
|
|
382
381
|
noWrap: !0
|
|
383
|
-
},
|
|
382
|
+
}, Fe = {
|
|
384
383
|
name: "Image",
|
|
385
384
|
static: !0,
|
|
386
385
|
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",
|
|
@@ -401,15 +400,15 @@ const B = {
|
|
|
401
400
|
onChange: (e) => {
|
|
402
401
|
e.delete("srcset"), e.delete("noWebp");
|
|
403
402
|
function n(a, o = 6e4) {
|
|
404
|
-
return new Promise((p,
|
|
405
|
-
const
|
|
406
|
-
let
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
},
|
|
410
|
-
console.warn("Image load failed",
|
|
411
|
-
}),
|
|
412
|
-
|
|
403
|
+
return new Promise((p, S) => {
|
|
404
|
+
const y = document.createElement("img");
|
|
405
|
+
let w = !1;
|
|
406
|
+
y.onload = () => {
|
|
407
|
+
w = !0, p(y);
|
|
408
|
+
}, y.addEventListener("error", (k) => {
|
|
409
|
+
console.warn("Image load failed", k.error), S(k.error);
|
|
410
|
+
}), y.src = a, setTimeout(() => {
|
|
411
|
+
w || S(new Error("Image load timed out"));
|
|
413
412
|
}, o);
|
|
414
413
|
});
|
|
415
414
|
}
|
|
@@ -488,7 +487,7 @@ const B = {
|
|
|
488
487
|
shouldReceiveBuilderProps: {
|
|
489
488
|
builderBlock: !0
|
|
490
489
|
}
|
|
491
|
-
},
|
|
490
|
+
}, Pe = {
|
|
492
491
|
name: "Core:Section",
|
|
493
492
|
static: !0,
|
|
494
493
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -527,7 +526,7 @@ const B = {
|
|
|
527
526
|
}
|
|
528
527
|
}
|
|
529
528
|
}]
|
|
530
|
-
},
|
|
529
|
+
}, We = {
|
|
531
530
|
name: "Slot",
|
|
532
531
|
isRSC: !0,
|
|
533
532
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -544,7 +543,7 @@ const B = {
|
|
|
544
543
|
builderContext: !0,
|
|
545
544
|
builderComponents: !0
|
|
546
545
|
}
|
|
547
|
-
},
|
|
546
|
+
}, Ae = v(() => import("./slot-76c2cebc.js")), Be = {
|
|
548
547
|
name: "Symbol",
|
|
549
548
|
noWrap: !0,
|
|
550
549
|
static: !0,
|
|
@@ -583,7 +582,7 @@ const B = {
|
|
|
583
582
|
builderComponents: !0,
|
|
584
583
|
builderLinkComponent: !0
|
|
585
584
|
}
|
|
586
|
-
},
|
|
585
|
+
}, H = {
|
|
587
586
|
"@type": "@builder.io/sdk:Element",
|
|
588
587
|
responsiveStyles: {
|
|
589
588
|
large: {
|
|
@@ -605,7 +604,7 @@ const B = {
|
|
|
605
604
|
text: "New tab"
|
|
606
605
|
}
|
|
607
606
|
}
|
|
608
|
-
},
|
|
607
|
+
}, $ = {
|
|
609
608
|
"@type": "@builder.io/sdk:Element",
|
|
610
609
|
responsiveStyles: {
|
|
611
610
|
large: {
|
|
@@ -621,7 +620,7 @@ const B = {
|
|
|
621
620
|
text: "New tab content "
|
|
622
621
|
}
|
|
623
622
|
}
|
|
624
|
-
},
|
|
623
|
+
}, De = {
|
|
625
624
|
name: "Builder: Tabs",
|
|
626
625
|
inputs: [{
|
|
627
626
|
name: "tabs",
|
|
@@ -631,16 +630,16 @@ const B = {
|
|
|
631
630
|
name: "label",
|
|
632
631
|
type: "uiBlocks",
|
|
633
632
|
hideFromUI: !0,
|
|
634
|
-
defaultValue: [
|
|
633
|
+
defaultValue: [H]
|
|
635
634
|
}, {
|
|
636
635
|
name: "content",
|
|
637
636
|
type: "uiBlocks",
|
|
638
637
|
hideFromUI: !0,
|
|
639
|
-
defaultValue: [
|
|
638
|
+
defaultValue: [$]
|
|
640
639
|
}],
|
|
641
640
|
defaultValue: [{
|
|
642
641
|
label: [{
|
|
643
|
-
...
|
|
642
|
+
...H,
|
|
644
643
|
component: {
|
|
645
644
|
name: "Text",
|
|
646
645
|
options: {
|
|
@@ -649,7 +648,7 @@ const B = {
|
|
|
649
648
|
}
|
|
650
649
|
}],
|
|
651
650
|
content: [{
|
|
652
|
-
|
|
651
|
+
...$,
|
|
653
652
|
component: {
|
|
654
653
|
name: "Text",
|
|
655
654
|
options: {
|
|
@@ -659,7 +658,7 @@ const B = {
|
|
|
659
658
|
}]
|
|
660
659
|
}, {
|
|
661
660
|
label: [{
|
|
662
|
-
...
|
|
661
|
+
...H,
|
|
663
662
|
component: {
|
|
664
663
|
name: "Text",
|
|
665
664
|
options: {
|
|
@@ -668,7 +667,7 @@ const B = {
|
|
|
668
667
|
}
|
|
669
668
|
}],
|
|
670
669
|
content: [{
|
|
671
|
-
|
|
670
|
+
...$,
|
|
672
671
|
component: {
|
|
673
672
|
name: "Text",
|
|
674
673
|
options: {
|
|
@@ -724,7 +723,7 @@ const B = {
|
|
|
724
723
|
builderComponents: !0,
|
|
725
724
|
builderLinkComponent: !0
|
|
726
725
|
}
|
|
727
|
-
},
|
|
726
|
+
}, Ue = v(() => import("./tabs-3cc397e4.js")), Le = {
|
|
728
727
|
shouldReceiveBuilderProps: {
|
|
729
728
|
builderBlock: !1,
|
|
730
729
|
builderContext: !0
|
|
@@ -746,7 +745,7 @@ const B = {
|
|
|
746
745
|
height: "auto",
|
|
747
746
|
textAlign: "center"
|
|
748
747
|
}
|
|
749
|
-
},
|
|
748
|
+
}, He = {
|
|
750
749
|
name: "Custom Code",
|
|
751
750
|
static: !0,
|
|
752
751
|
requiredPermissions: ["editCode"],
|
|
@@ -768,7 +767,7 @@ const B = {
|
|
|
768
767
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
769
768
|
advanced: !0
|
|
770
769
|
}]
|
|
771
|
-
},
|
|
770
|
+
}, $e = v(() => import("./custom-code-7786788e.js")), Ne = {
|
|
772
771
|
name: "Embed",
|
|
773
772
|
static: !0,
|
|
774
773
|
inputs: [{
|
|
@@ -783,7 +782,7 @@ const B = {
|
|
|
783
782
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
784
783
|
hideFromUI: !0
|
|
785
784
|
}]
|
|
786
|
-
},
|
|
785
|
+
}, qe = v(() => import("./embed-5c1bbe12.js")), je = {
|
|
787
786
|
name: "Form:Form",
|
|
788
787
|
// editableTags: ['builder-form-error']
|
|
789
788
|
defaults: {
|
|
@@ -1020,7 +1019,7 @@ const B = {
|
|
|
1020
1019
|
builderComponents: !0,
|
|
1021
1020
|
builderLinkComponent: !0
|
|
1022
1021
|
}
|
|
1023
|
-
},
|
|
1022
|
+
}, Ke = v(() => import("./form-28c6dcde.js")), Me = {
|
|
1024
1023
|
name: "Form:Input",
|
|
1025
1024
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
1026
1025
|
inputs: [
|
|
@@ -1071,7 +1070,7 @@ const B = {
|
|
|
1071
1070
|
borderStyle: "solid",
|
|
1072
1071
|
borderColor: "#ccc"
|
|
1073
1072
|
}
|
|
1074
|
-
},
|
|
1073
|
+
}, Oe = v(() => import("./input-3db08208.js")), _e = {
|
|
1075
1074
|
name: "Form:Select",
|
|
1076
1075
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
1077
1076
|
defaultStyles: {
|
|
@@ -1113,7 +1112,7 @@ const B = {
|
|
|
1113
1112
|
}],
|
|
1114
1113
|
static: !0,
|
|
1115
1114
|
noWrap: !0
|
|
1116
|
-
},
|
|
1115
|
+
}, ze = v(() => import("./select-251dfaa4.js")), Je = {
|
|
1117
1116
|
name: "Form:SubmitButton",
|
|
1118
1117
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
1119
1118
|
defaultStyles: {
|
|
@@ -1138,7 +1137,7 @@ const B = {
|
|
|
1138
1137
|
// that only shows if advanced setting is flipped
|
|
1139
1138
|
// TODO: defaultChildren
|
|
1140
1139
|
// canHaveChildren: true,
|
|
1141
|
-
},
|
|
1140
|
+
}, Ye = v(() => import("./submit-button-b48361a7.js")), Qe = {
|
|
1142
1141
|
name: "Form:TextArea",
|
|
1143
1142
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
1144
1143
|
inputs: [{
|
|
@@ -1174,7 +1173,7 @@ const B = {
|
|
|
1174
1173
|
},
|
|
1175
1174
|
static: !0,
|
|
1176
1175
|
noWrap: !0
|
|
1177
|
-
},
|
|
1176
|
+
}, Ge = v(() => import("./textarea-d29025e9.js")), Xe = {
|
|
1178
1177
|
// friendlyName?
|
|
1179
1178
|
name: "Raw:Img",
|
|
1180
1179
|
hideFromInsertMenu: !0,
|
|
@@ -1188,7 +1187,7 @@ const B = {
|
|
|
1188
1187
|
}],
|
|
1189
1188
|
noWrap: !0,
|
|
1190
1189
|
static: !0
|
|
1191
|
-
},
|
|
1190
|
+
}, Ze = v(() => import("./img-ca1be569.js")), et = {
|
|
1192
1191
|
name: "Video",
|
|
1193
1192
|
canHaveChildren: !0,
|
|
1194
1193
|
defaultStyles: {
|
|
@@ -1272,64 +1271,64 @@ const B = {
|
|
|
1272
1271
|
shouldReceiveBuilderProps: {
|
|
1273
1272
|
builderBlock: !0
|
|
1274
1273
|
}
|
|
1275
|
-
},
|
|
1276
|
-
component:
|
|
1277
|
-
...
|
|
1274
|
+
}, tt = () => [{
|
|
1275
|
+
component: $e,
|
|
1276
|
+
...He
|
|
1278
1277
|
}, {
|
|
1279
|
-
component:
|
|
1280
|
-
...
|
|
1278
|
+
component: qe,
|
|
1279
|
+
...Ne
|
|
1281
1280
|
}, {
|
|
1282
|
-
component:
|
|
1283
|
-
...
|
|
1281
|
+
component: Ke,
|
|
1282
|
+
...je
|
|
1284
1283
|
}, {
|
|
1285
|
-
component:
|
|
1286
|
-
...
|
|
1284
|
+
component: Oe,
|
|
1285
|
+
...Me
|
|
1287
1286
|
}, {
|
|
1288
|
-
component:
|
|
1289
|
-
...
|
|
1287
|
+
component: Ye,
|
|
1288
|
+
...Je
|
|
1290
1289
|
}, {
|
|
1291
|
-
component:
|
|
1292
|
-
...
|
|
1290
|
+
component: ze,
|
|
1291
|
+
..._e
|
|
1293
1292
|
}, {
|
|
1294
|
-
component:
|
|
1295
|
-
...
|
|
1293
|
+
component: Ge,
|
|
1294
|
+
...Qe
|
|
1296
1295
|
}, {
|
|
1297
|
-
component:
|
|
1298
|
-
...
|
|
1296
|
+
component: Ze,
|
|
1297
|
+
...Xe
|
|
1299
1298
|
}, {
|
|
1300
|
-
component:
|
|
1301
|
-
...
|
|
1302
|
-
}],
|
|
1303
|
-
component:
|
|
1304
|
-
...
|
|
1299
|
+
component: me,
|
|
1300
|
+
...et
|
|
1301
|
+
}], z = () => [{
|
|
1302
|
+
component: pe,
|
|
1303
|
+
...Ve
|
|
1305
1304
|
}, {
|
|
1306
|
-
component:
|
|
1307
|
-
...
|
|
1305
|
+
component: ge,
|
|
1306
|
+
...Re
|
|
1308
1307
|
}, {
|
|
1309
|
-
component:
|
|
1310
|
-
...
|
|
1308
|
+
component: fe,
|
|
1309
|
+
...Ee
|
|
1311
1310
|
}, {
|
|
1312
|
-
component:
|
|
1313
|
-
...
|
|
1311
|
+
component: he,
|
|
1312
|
+
...Fe
|
|
1314
1313
|
}, {
|
|
1315
|
-
component:
|
|
1316
|
-
...
|
|
1314
|
+
component: be,
|
|
1315
|
+
...Pe
|
|
1317
1316
|
}, {
|
|
1318
|
-
component:
|
|
1319
|
-
...
|
|
1317
|
+
component: Ae,
|
|
1318
|
+
...We
|
|
1320
1319
|
}, {
|
|
1321
|
-
component:
|
|
1322
|
-
|
|
1320
|
+
component: ye,
|
|
1321
|
+
...Be
|
|
1323
1322
|
}, {
|
|
1324
|
-
component:
|
|
1325
|
-
...
|
|
1323
|
+
component: xe,
|
|
1324
|
+
...Le
|
|
1326
1325
|
}, {
|
|
1327
|
-
component:
|
|
1328
|
-
...
|
|
1326
|
+
component: Ue,
|
|
1327
|
+
...De
|
|
1329
1328
|
}, {
|
|
1330
|
-
component:
|
|
1331
|
-
...
|
|
1332
|
-
}, ...
|
|
1329
|
+
component: we,
|
|
1330
|
+
...Ce
|
|
1331
|
+
}, ...tt()], nt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1333
1332
|
function getAndSetVariantId() {
|
|
1334
1333
|
function setCookie(name, value, days) {
|
|
1335
1334
|
let expires = '';
|
|
@@ -1385,7 +1384,7 @@ const B = {
|
|
|
1385
1384
|
}).join('');
|
|
1386
1385
|
styleEl.innerHTML = newStyleStr;
|
|
1387
1386
|
}
|
|
1388
|
-
}`,
|
|
1387
|
+
}`, at = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1389
1388
|
if (!navigator.cookieEnabled) {
|
|
1390
1389
|
return;
|
|
1391
1390
|
}
|
|
@@ -1419,27 +1418,27 @@ const B = {
|
|
|
1419
1418
|
thisScriptEl?.remove();
|
|
1420
1419
|
}
|
|
1421
1420
|
return;
|
|
1422
|
-
}`,
|
|
1421
|
+
}`, ee = "builderIoAbTest", te = "builderIoRenderContent", B = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1423
1422
|
...t,
|
|
1424
1423
|
testVariationId: t.id,
|
|
1425
1424
|
id: e == null ? void 0 : e.id
|
|
1426
|
-
})),
|
|
1425
|
+
})), it = ({
|
|
1427
1426
|
canTrack: e,
|
|
1428
1427
|
content: t
|
|
1429
|
-
}) => !(!(
|
|
1430
|
-
window.${
|
|
1431
|
-
window.${
|
|
1432
|
-
`,
|
|
1433
|
-
window.${
|
|
1434
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1435
|
-
)`,
|
|
1428
|
+
}) => !(!(B(t).length > 0) || !e || j()), ot = (e) => e === "react" || e === "reactNative", ne = ot(G), rt = () => `
|
|
1429
|
+
window.${ee} = ${nt}
|
|
1430
|
+
window.${te} = ${at}
|
|
1431
|
+
`, lt = (e, t) => `
|
|
1432
|
+
window.${ee}(
|
|
1433
|
+
"${t}",${JSON.stringify(e)}, ${ne}
|
|
1434
|
+
)`, st = ({
|
|
1436
1435
|
contentId: e,
|
|
1437
1436
|
variationId: t
|
|
1438
|
-
}) => `window.${
|
|
1439
|
-
"${t}", "${e}", ${
|
|
1437
|
+
}) => `window.${te}(
|
|
1438
|
+
"${t}", "${e}", ${ne}
|
|
1440
1439
|
)`;
|
|
1441
|
-
function
|
|
1442
|
-
return /* @__PURE__ */
|
|
1440
|
+
function K(e) {
|
|
1441
|
+
return /* @__PURE__ */ b(
|
|
1443
1442
|
"script",
|
|
1444
1443
|
{
|
|
1445
1444
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -1448,10 +1447,10 @@ function N(e) {
|
|
|
1448
1447
|
}
|
|
1449
1448
|
);
|
|
1450
1449
|
}
|
|
1451
|
-
function
|
|
1450
|
+
function J(e) {
|
|
1452
1451
|
return Math.round(e * 1e3) / 1e3;
|
|
1453
1452
|
}
|
|
1454
|
-
const
|
|
1453
|
+
const dt = (e, t, n = !0) => {
|
|
1455
1454
|
if (!(e instanceof HTMLElement))
|
|
1456
1455
|
return null;
|
|
1457
1456
|
let i = n ? e : e.parentElement;
|
|
@@ -1462,35 +1461,35 @@ const gt = (e, t, n = !0) => {
|
|
|
1462
1461
|
return i;
|
|
1463
1462
|
} while (i = i.parentElement);
|
|
1464
1463
|
return null;
|
|
1465
|
-
},
|
|
1464
|
+
}, ut = (e) => dt(e, (t) => {
|
|
1466
1465
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1467
1466
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1468
|
-
}),
|
|
1467
|
+
}), Y = ({
|
|
1469
1468
|
event: e,
|
|
1470
1469
|
target: t
|
|
1471
1470
|
}) => {
|
|
1472
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, d = e.clientY - n.top, m =
|
|
1471
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, d = e.clientY - n.top, m = J(i / n.width), a = J(d / n.height);
|
|
1473
1472
|
return {
|
|
1474
1473
|
x: m,
|
|
1475
1474
|
y: a
|
|
1476
1475
|
};
|
|
1477
|
-
},
|
|
1478
|
-
const t = e.target, n = t &&
|
|
1476
|
+
}, ct = (e) => {
|
|
1477
|
+
const t = e.target, n = t && ut(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
1479
1478
|
return {
|
|
1480
1479
|
targetBuilderElement: i || void 0,
|
|
1481
1480
|
metadata: {
|
|
1482
|
-
targetOffset: t ?
|
|
1481
|
+
targetOffset: t ? Y({
|
|
1483
1482
|
event: e,
|
|
1484
1483
|
target: t
|
|
1485
1484
|
}) : void 0,
|
|
1486
|
-
builderTargetOffset: n ?
|
|
1485
|
+
builderTargetOffset: n ? Y({
|
|
1487
1486
|
event: e,
|
|
1488
1487
|
target: n
|
|
1489
1488
|
}) : void 0,
|
|
1490
1489
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
1491
1490
|
}
|
|
1492
1491
|
};
|
|
1493
|
-
},
|
|
1492
|
+
}, mt = (e) => {
|
|
1494
1493
|
var m, a;
|
|
1495
1494
|
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;
|
|
1496
1495
|
let d = "";
|
|
@@ -1505,26 +1504,26 @@ font-weight: 400;
|
|
|
1505
1504
|
for (const o in e.files) {
|
|
1506
1505
|
if (!(String(Number(o)) === o))
|
|
1507
1506
|
continue;
|
|
1508
|
-
const
|
|
1509
|
-
|
|
1507
|
+
const S = e.files[o];
|
|
1508
|
+
S && S !== i && (d += `
|
|
1510
1509
|
@font-face {
|
|
1511
1510
|
font-family: "${t}";
|
|
1512
|
-
src: url('${
|
|
1511
|
+
src: url('${S}') format('woff2');
|
|
1513
1512
|
font-display: fallback;
|
|
1514
1513
|
font-weight: ${o};
|
|
1515
1514
|
}
|
|
1516
1515
|
`.trim());
|
|
1517
1516
|
}
|
|
1518
1517
|
return d;
|
|
1519
|
-
},
|
|
1518
|
+
}, pt = ({
|
|
1520
1519
|
customFonts: e
|
|
1521
1520
|
}) => {
|
|
1522
1521
|
var t;
|
|
1523
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
1524
|
-
},
|
|
1522
|
+
return ((t = e == null ? void 0 : e.map((n) => mt(n))) == null ? void 0 : t.join(" ")) || "";
|
|
1523
|
+
}, gt = ({
|
|
1525
1524
|
cssCode: e,
|
|
1526
1525
|
contentId: t
|
|
1527
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
1526
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", ft = `
|
|
1528
1527
|
.builder-button {
|
|
1529
1528
|
all: unset;
|
|
1530
1529
|
}
|
|
@@ -1541,39 +1540,39 @@ font-weight: ${o};
|
|
|
1541
1540
|
text-align: inherit;
|
|
1542
1541
|
font-family: inherit;
|
|
1543
1542
|
}
|
|
1544
|
-
`,
|
|
1545
|
-
function
|
|
1546
|
-
var
|
|
1547
|
-
const t =
|
|
1543
|
+
`, ht = (e) => e ? "" : ft, bt = (e) => `variant-${e}`;
|
|
1544
|
+
function yt(e) {
|
|
1545
|
+
var g, u, E;
|
|
1546
|
+
const t = q(null);
|
|
1548
1547
|
function n(r) {
|
|
1549
|
-
var
|
|
1550
|
-
const
|
|
1548
|
+
var f, s;
|
|
1549
|
+
const c = {
|
|
1551
1550
|
...e.builderContextSignal.rootState,
|
|
1552
1551
|
...r
|
|
1553
1552
|
};
|
|
1554
|
-
e.builderContextSignal.rootSetState ? (s = (
|
|
1553
|
+
e.builderContextSignal.rootSetState ? (s = (f = e.builderContextSignal).rootSetState) == null || s.call(f, c) : e.setBuilderContextSignal((l) => ({
|
|
1555
1554
|
...l,
|
|
1556
|
-
rootState:
|
|
1555
|
+
rootState: c
|
|
1557
1556
|
}));
|
|
1558
1557
|
}
|
|
1559
1558
|
function i(r) {
|
|
1560
|
-
var
|
|
1561
|
-
const
|
|
1559
|
+
var f, s, l, h, V;
|
|
1560
|
+
const c = {
|
|
1562
1561
|
...e.builderContextSignal.content,
|
|
1563
1562
|
...r,
|
|
1564
1563
|
data: {
|
|
1565
|
-
...(
|
|
1564
|
+
...(f = e.builderContextSignal.content) == null ? void 0 : f.data,
|
|
1566
1565
|
...r == null ? void 0 : r.data
|
|
1567
1566
|
},
|
|
1568
1567
|
meta: {
|
|
1569
1568
|
...(s = e.builderContextSignal.content) == null ? void 0 : s.meta,
|
|
1570
1569
|
...r == null ? void 0 : r.meta,
|
|
1571
|
-
breakpoints: ((l = r == null ? void 0 : r.meta) == null ? void 0 : l.breakpoints) || ((
|
|
1570
|
+
breakpoints: ((l = r == null ? void 0 : r.meta) == null ? void 0 : l.breakpoints) || ((V = (h = e.builderContextSignal.content) == null ? void 0 : h.meta) == null ? void 0 : V.breakpoints)
|
|
1572
1571
|
}
|
|
1573
1572
|
};
|
|
1574
|
-
e.setBuilderContextSignal((
|
|
1575
|
-
...
|
|
1576
|
-
content:
|
|
1573
|
+
e.setBuilderContextSignal((x) => ({
|
|
1574
|
+
...x,
|
|
1575
|
+
content: c
|
|
1577
1576
|
}));
|
|
1578
1577
|
}
|
|
1579
1578
|
function d() {
|
|
@@ -1582,76 +1581,61 @@ function kt(e) {
|
|
|
1582
1581
|
"aria-hidden": !0
|
|
1583
1582
|
};
|
|
1584
1583
|
}
|
|
1585
|
-
const [m, a] =
|
|
1584
|
+
const [m, a] = T(
|
|
1586
1585
|
() => e.contentWrapper || "div"
|
|
1587
1586
|
);
|
|
1588
1587
|
function o(r) {
|
|
1589
|
-
return
|
|
1588
|
+
return de({
|
|
1590
1589
|
model: e.model,
|
|
1591
1590
|
trustedHosts: e.trustedHosts,
|
|
1592
1591
|
callbacks: {
|
|
1593
|
-
configureSdk: (
|
|
1592
|
+
configureSdk: (c) => {
|
|
1594
1593
|
var l;
|
|
1595
|
-
const { breakpoints:
|
|
1596
|
-
!s || s !== ((l = e.builderContextSignal.content) == null ? void 0 : l.id) ||
|
|
1594
|
+
const { breakpoints: f, contentId: s } = c;
|
|
1595
|
+
!s || s !== ((l = e.builderContextSignal.content) == null ? void 0 : l.id) || f && i({
|
|
1597
1596
|
meta: {
|
|
1598
|
-
breakpoints:
|
|
1597
|
+
breakpoints: f
|
|
1599
1598
|
}
|
|
1600
1599
|
});
|
|
1601
1600
|
},
|
|
1602
|
-
animation: (
|
|
1603
|
-
|
|
1601
|
+
animation: (c) => {
|
|
1602
|
+
Se(c);
|
|
1604
1603
|
},
|
|
1605
|
-
contentUpdate: (
|
|
1606
|
-
i(
|
|
1604
|
+
contentUpdate: (c) => {
|
|
1605
|
+
i(c);
|
|
1607
1606
|
}
|
|
1608
1607
|
}
|
|
1609
1608
|
})(r);
|
|
1610
1609
|
}
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
r && Q({
|
|
1615
|
-
code: r,
|
|
1616
|
-
context: e.context || {},
|
|
1617
|
-
localState: void 0,
|
|
1618
|
-
rootState: e.builderContextSignal.rootState,
|
|
1619
|
-
rootSetState: e.builderContextSignal.rootSetState,
|
|
1620
|
-
/**
|
|
1621
|
-
* We don't want to cache the result of the JS code, since it's arbitrary side effect code.
|
|
1622
|
-
*/
|
|
1623
|
-
enableCache: !1
|
|
1624
|
-
});
|
|
1625
|
-
}
|
|
1626
|
-
const [b, C] = k(() => ({})), [T, V] = k(() => ({})), [E, F] = k(() => !1);
|
|
1627
|
-
function x(r) {
|
|
1628
|
-
var u, g;
|
|
1610
|
+
const [p, S] = T(() => ({})), [y, w] = T(() => ({})), [k, F] = T(() => !1);
|
|
1611
|
+
function P(r) {
|
|
1612
|
+
var c, f;
|
|
1629
1613
|
if (e.builderContextSignal.content) {
|
|
1630
|
-
const s = (
|
|
1631
|
-
|
|
1614
|
+
const s = (c = e.builderContextSignal.content) == null ? void 0 : c.testVariationId, l = (f = e.builderContextSignal.content) == null ? void 0 : f.id;
|
|
1615
|
+
O({
|
|
1632
1616
|
type: "click",
|
|
1633
|
-
canTrack:
|
|
1617
|
+
canTrack: D(e.canTrack),
|
|
1634
1618
|
contentId: l,
|
|
1635
1619
|
apiKey: e.apiKey,
|
|
1636
1620
|
variationId: s !== l ? s : void 0,
|
|
1637
|
-
...
|
|
1638
|
-
unique: !
|
|
1621
|
+
...ct(r),
|
|
1622
|
+
unique: !k
|
|
1639
1623
|
});
|
|
1640
1624
|
}
|
|
1641
|
-
|
|
1625
|
+
k || F(!0);
|
|
1642
1626
|
}
|
|
1643
|
-
function
|
|
1644
|
-
var
|
|
1645
|
-
const r = (s = (
|
|
1646
|
-
Object.entries(r).forEach(([l,
|
|
1647
|
-
if (!
|
|
1627
|
+
function W() {
|
|
1628
|
+
var c, f, s;
|
|
1629
|
+
const r = (s = (f = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : f.httpRequests) != null ? s : {};
|
|
1630
|
+
Object.entries(r).forEach(([l, h]) => {
|
|
1631
|
+
if (!h || y[l] || p[l] && !A())
|
|
1648
1632
|
return;
|
|
1649
|
-
|
|
1650
|
-
const
|
|
1633
|
+
y[l] = !0;
|
|
1634
|
+
const V = h.replace(
|
|
1651
1635
|
/{{([^}]+)}}/g,
|
|
1652
|
-
(
|
|
1653
|
-
|
|
1654
|
-
code:
|
|
1636
|
+
(x, ae) => String(
|
|
1637
|
+
Z({
|
|
1638
|
+
code: ae,
|
|
1655
1639
|
context: e.context || {},
|
|
1656
1640
|
localState: void 0,
|
|
1657
1641
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -1660,24 +1644,24 @@ function kt(e) {
|
|
|
1660
1644
|
})
|
|
1661
1645
|
)
|
|
1662
1646
|
);
|
|
1663
|
-
|
|
1647
|
+
fetch(V).then((x) => x.json()).then((x) => {
|
|
1664
1648
|
n({
|
|
1665
|
-
[l]:
|
|
1666
|
-
}),
|
|
1667
|
-
}).catch((
|
|
1668
|
-
console.error("error fetching dynamic data",
|
|
1649
|
+
[l]: x
|
|
1650
|
+
}), p[l] = !0;
|
|
1651
|
+
}).catch((x) => {
|
|
1652
|
+
console.error("error fetching dynamic data", h, x);
|
|
1669
1653
|
}).finally(() => {
|
|
1670
|
-
|
|
1654
|
+
y[l] = !1;
|
|
1671
1655
|
});
|
|
1672
1656
|
});
|
|
1673
1657
|
}
|
|
1674
|
-
function
|
|
1675
|
-
|
|
1658
|
+
function I() {
|
|
1659
|
+
A() && window.dispatchEvent(
|
|
1676
1660
|
new CustomEvent(
|
|
1677
1661
|
"builder:component:stateChange",
|
|
1678
1662
|
{
|
|
1679
1663
|
detail: {
|
|
1680
|
-
state:
|
|
1664
|
+
state: Te(e.builderContextSignal.rootState),
|
|
1681
1665
|
ref: {
|
|
1682
1666
|
name: e.model
|
|
1683
1667
|
}
|
|
@@ -1686,10 +1670,11 @@ function kt(e) {
|
|
|
1686
1670
|
)
|
|
1687
1671
|
);
|
|
1688
1672
|
}
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1673
|
+
const R = q(!1);
|
|
1674
|
+
return R.current || (W(), I(), R.current = !0), C(() => {
|
|
1675
|
+
var r, c;
|
|
1676
|
+
if (j()) {
|
|
1677
|
+
if (A() && (window.addEventListener("message", o), ie(), oe({
|
|
1693
1678
|
...e.locale ? {
|
|
1694
1679
|
locale: e.locale
|
|
1695
1680
|
} : {},
|
|
@@ -1702,89 +1687,81 @@ function kt(e) {
|
|
|
1702
1687
|
}), Object.values(
|
|
1703
1688
|
e.builderContextSignal.componentInfos
|
|
1704
1689
|
).forEach((s) => {
|
|
1705
|
-
var
|
|
1706
|
-
const l =
|
|
1707
|
-
(
|
|
1690
|
+
var h;
|
|
1691
|
+
const l = re(s);
|
|
1692
|
+
(h = window.parent) == null || h.postMessage(l, "*");
|
|
1708
1693
|
}), window.addEventListener(
|
|
1709
1694
|
"builder:component:stateChangeListenerActivated",
|
|
1710
|
-
|
|
1711
|
-
)), e.builderContextSignal.content &&
|
|
1712
|
-
const s = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, l = (
|
|
1713
|
-
|
|
1695
|
+
I
|
|
1696
|
+
)), e.builderContextSignal.content && D(e.canTrack)) {
|
|
1697
|
+
const s = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, l = (c = e.builderContextSignal.content) == null ? void 0 : c.id, h = e.apiKey;
|
|
1698
|
+
O({
|
|
1714
1699
|
type: "impression",
|
|
1715
1700
|
canTrack: !0,
|
|
1716
1701
|
contentId: l,
|
|
1717
|
-
apiKey:
|
|
1702
|
+
apiKey: h,
|
|
1718
1703
|
variationId: s !== l ? s : void 0
|
|
1719
1704
|
});
|
|
1720
1705
|
}
|
|
1721
|
-
if (
|
|
1722
|
-
const s = new URL(location.href).searchParams, l = s.get("builder.preview"),
|
|
1706
|
+
if (le() && !A()) {
|
|
1707
|
+
const s = new URL(location.href).searchParams, l = s.get("builder.preview"), h = s.get(
|
|
1723
1708
|
`builder.overrides.${l}`
|
|
1724
|
-
),
|
|
1725
|
-
l === e.model &&
|
|
1709
|
+
), V = s.get("apiKey") || s.get("builder.space");
|
|
1710
|
+
l === e.model && V === e.apiKey && (!e.content || h === e.content.id) && se({
|
|
1726
1711
|
model: e.model,
|
|
1727
1712
|
apiKey: e.apiKey,
|
|
1728
1713
|
apiVersion: e.builderContextSignal.apiVersion
|
|
1729
|
-
}).then((
|
|
1730
|
-
|
|
1714
|
+
}).then((x) => {
|
|
1715
|
+
x && i(x);
|
|
1731
1716
|
});
|
|
1732
1717
|
}
|
|
1733
1718
|
}
|
|
1734
|
-
}, []),
|
|
1735
|
-
e.apiKey || pe.error(
|
|
1736
|
-
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1737
|
-
), p(), c(), w();
|
|
1738
|
-
}, []), S(() => {
|
|
1719
|
+
}, []), C(() => {
|
|
1739
1720
|
e.content && i(e.content);
|
|
1740
|
-
}, [e.content]),
|
|
1741
|
-
|
|
1742
|
-
}, [
|
|
1743
|
-
c();
|
|
1744
|
-
}, [(K = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : K.httpRequests]), S(() => {
|
|
1745
|
-
w();
|
|
1746
|
-
}, [e.builderContextSignal.rootState]), S(() => {
|
|
1721
|
+
}, [e.content]), C(() => {
|
|
1722
|
+
I();
|
|
1723
|
+
}, [e.builderContextSignal.rootState]), C(() => {
|
|
1747
1724
|
e.data && n(e.data);
|
|
1748
|
-
}, [e.data]),
|
|
1725
|
+
}, [e.data]), C(() => {
|
|
1749
1726
|
e.locale && n({
|
|
1750
1727
|
locale: e.locale
|
|
1751
1728
|
});
|
|
1752
|
-
}, [e.locale]),
|
|
1753
|
-
|
|
1729
|
+
}, [e.locale]), C(() => () => {
|
|
1730
|
+
j() && (window.removeEventListener("message", o), window.removeEventListener(
|
|
1754
1731
|
"builder:component:stateChangeListenerActivated",
|
|
1755
|
-
|
|
1732
|
+
I
|
|
1756
1733
|
));
|
|
1757
|
-
}, []), /* @__PURE__ */
|
|
1734
|
+
}, []), /* @__PURE__ */ b(ve.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ b(
|
|
1758
1735
|
m,
|
|
1759
1736
|
{
|
|
1760
1737
|
ref: t,
|
|
1761
|
-
onClick: (r) =>
|
|
1762
|
-
"builder-content-id": (
|
|
1738
|
+
onClick: (r) => P(r),
|
|
1739
|
+
"builder-content-id": (g = e.builderContextSignal.content) == null ? void 0 : g.id,
|
|
1763
1740
|
"builder-model": e.model,
|
|
1741
|
+
className: bt(
|
|
1742
|
+
((u = e.content) == null ? void 0 : u.testVariationId) || ((E = e.content) == null ? void 0 : E.id)
|
|
1743
|
+
),
|
|
1764
1744
|
...d(),
|
|
1765
1745
|
...e.contentWrapperProps,
|
|
1766
|
-
className: Tt(
|
|
1767
|
-
((O = e.content) == null ? void 0 : O.testVariationId) || ((_ = e.content) == null ? void 0 : _.id)
|
|
1768
|
-
),
|
|
1769
1746
|
children: e.children
|
|
1770
1747
|
}
|
|
1771
1748
|
) : null });
|
|
1772
1749
|
}
|
|
1773
|
-
function
|
|
1774
|
-
const [t, n] =
|
|
1750
|
+
function xt(e) {
|
|
1751
|
+
const [t, n] = T(
|
|
1775
1752
|
() => `
|
|
1776
|
-
${
|
|
1753
|
+
${gt({
|
|
1777
1754
|
cssCode: e.cssCode,
|
|
1778
1755
|
contentId: e.contentId
|
|
1779
1756
|
})}
|
|
1780
|
-
${
|
|
1757
|
+
${pt({
|
|
1781
1758
|
customFonts: e.customFonts
|
|
1782
1759
|
})}
|
|
1783
|
-
${
|
|
1760
|
+
${ht(e.isNestedRender)}
|
|
1784
1761
|
`.trim()
|
|
1785
1762
|
);
|
|
1786
|
-
return /* @__PURE__ */
|
|
1787
|
-
|
|
1763
|
+
return /* @__PURE__ */ b(
|
|
1764
|
+
X,
|
|
1788
1765
|
{
|
|
1789
1766
|
id: "builderio-content",
|
|
1790
1767
|
styles: t,
|
|
@@ -1792,7 +1769,7 @@ ${St(e.isNestedRender)}
|
|
|
1792
1769
|
}
|
|
1793
1770
|
);
|
|
1794
1771
|
}
|
|
1795
|
-
const
|
|
1772
|
+
const vt = ({
|
|
1796
1773
|
content: e,
|
|
1797
1774
|
data: t,
|
|
1798
1775
|
locale: n
|
|
@@ -1809,7 +1786,7 @@ const It = ({
|
|
|
1809
1786
|
locale: n
|
|
1810
1787
|
} : {}
|
|
1811
1788
|
};
|
|
1812
|
-
},
|
|
1789
|
+
}, St = ({
|
|
1813
1790
|
content: e,
|
|
1814
1791
|
data: t
|
|
1815
1792
|
}) => e ? {
|
|
@@ -1820,51 +1797,51 @@ const It = ({
|
|
|
1820
1797
|
},
|
|
1821
1798
|
meta: e == null ? void 0 : e.meta
|
|
1822
1799
|
} : void 0;
|
|
1823
|
-
function
|
|
1824
|
-
var
|
|
1825
|
-
const [t, n] =
|
|
1800
|
+
function Q(e) {
|
|
1801
|
+
var S, y, w, k, F, P, W, I, R;
|
|
1802
|
+
const [t, n] = T(
|
|
1826
1803
|
() => {
|
|
1827
|
-
var
|
|
1828
|
-
return
|
|
1804
|
+
var g, u;
|
|
1805
|
+
return st({
|
|
1829
1806
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1830
|
-
variationId: (
|
|
1807
|
+
variationId: (g = e.content) == null ? void 0 : g.testVariationId,
|
|
1831
1808
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1832
|
-
contentId: (
|
|
1809
|
+
contentId: (u = e.content) == null ? void 0 : u.id
|
|
1833
1810
|
});
|
|
1834
1811
|
}
|
|
1835
1812
|
);
|
|
1836
|
-
function i(
|
|
1837
|
-
o((
|
|
1838
|
-
...
|
|
1839
|
-
rootState:
|
|
1813
|
+
function i(g) {
|
|
1814
|
+
o((u) => ({
|
|
1815
|
+
...u,
|
|
1816
|
+
rootState: g
|
|
1840
1817
|
}));
|
|
1841
1818
|
}
|
|
1842
|
-
const [d, m] =
|
|
1819
|
+
const [d, m] = T(
|
|
1843
1820
|
() => {
|
|
1844
|
-
var
|
|
1821
|
+
var g;
|
|
1845
1822
|
return [
|
|
1846
|
-
...
|
|
1847
|
-
...((
|
|
1823
|
+
...z(),
|
|
1824
|
+
...((g = e.customComponents) == null ? void 0 : g.filter(({ models: u }) => !(u != null && u.length) || !e.model ? !0 : u.includes(e.model))) || []
|
|
1848
1825
|
].reduce(
|
|
1849
|
-
(
|
|
1850
|
-
...
|
|
1851
|
-
[
|
|
1852
|
-
component:
|
|
1853
|
-
...
|
|
1826
|
+
(u, { component: E, ...r }) => ({
|
|
1827
|
+
...u,
|
|
1828
|
+
[r.name]: {
|
|
1829
|
+
component: E,
|
|
1830
|
+
..._(r)
|
|
1854
1831
|
}
|
|
1855
1832
|
}),
|
|
1856
1833
|
{}
|
|
1857
1834
|
);
|
|
1858
1835
|
}
|
|
1859
|
-
), [a, o] =
|
|
1860
|
-
var
|
|
1836
|
+
), [a, o] = T(() => {
|
|
1837
|
+
var g;
|
|
1861
1838
|
return {
|
|
1862
|
-
content:
|
|
1839
|
+
content: St({
|
|
1863
1840
|
content: e.content,
|
|
1864
1841
|
data: e.data
|
|
1865
1842
|
}),
|
|
1866
1843
|
localState: void 0,
|
|
1867
|
-
rootState:
|
|
1844
|
+
rootState: vt({
|
|
1868
1845
|
content: e.content,
|
|
1869
1846
|
data: e.data,
|
|
1870
1847
|
locale: e.locale
|
|
@@ -1875,12 +1852,12 @@ function ee(e) {
|
|
|
1875
1852
|
apiKey: e.apiKey,
|
|
1876
1853
|
apiVersion: e.apiVersion,
|
|
1877
1854
|
componentInfos: [
|
|
1878
|
-
...
|
|
1879
|
-
...((
|
|
1855
|
+
...z(),
|
|
1856
|
+
...((g = e.customComponents) == null ? void 0 : g.filter(({ models: u }) => !(u != null && u.length) || !e.model ? !0 : u.includes(e.model))) || []
|
|
1880
1857
|
].reduce(
|
|
1881
|
-
(
|
|
1882
|
-
...
|
|
1883
|
-
[
|
|
1858
|
+
(u, { component: E, ...r }) => ({
|
|
1859
|
+
...u,
|
|
1860
|
+
[r.name]: _(r)
|
|
1884
1861
|
}),
|
|
1885
1862
|
{}
|
|
1886
1863
|
),
|
|
@@ -1889,15 +1866,35 @@ function ee(e) {
|
|
|
1889
1866
|
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
1890
1867
|
nonce: e.nonce || ""
|
|
1891
1868
|
};
|
|
1892
|
-
});
|
|
1893
|
-
|
|
1894
|
-
|
|
1869
|
+
}), p = q(!1);
|
|
1870
|
+
if (!p.current) {
|
|
1871
|
+
e.apiKey || ue.error(
|
|
1872
|
+
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1873
|
+
);
|
|
1874
|
+
const g = (y = (S = a.content) == null ? void 0 : S.data) == null ? void 0 : y.jsCode;
|
|
1875
|
+
g && Z({
|
|
1876
|
+
code: g,
|
|
1877
|
+
context: e.context || {},
|
|
1878
|
+
localState: void 0,
|
|
1879
|
+
rootState: a.rootState,
|
|
1880
|
+
rootSetState: (u) => {
|
|
1881
|
+
Object.assign(a.rootState, u);
|
|
1882
|
+
},
|
|
1883
|
+
isExpression: !1,
|
|
1884
|
+
/**
|
|
1885
|
+
* We don't want to cache the result of the JS code, since it's arbitrary side effect code.
|
|
1886
|
+
*/
|
|
1887
|
+
enableCache: !1
|
|
1888
|
+
}), p.current = !0;
|
|
1889
|
+
}
|
|
1890
|
+
return /* @__PURE__ */ b(
|
|
1891
|
+
ke.Provider,
|
|
1895
1892
|
{
|
|
1896
1893
|
value: {
|
|
1897
1894
|
registeredComponents: d
|
|
1898
1895
|
},
|
|
1899
|
-
children: /* @__PURE__ */
|
|
1900
|
-
|
|
1896
|
+
children: /* @__PURE__ */ N(
|
|
1897
|
+
yt,
|
|
1901
1898
|
{
|
|
1902
1899
|
nonce: e.nonce,
|
|
1903
1900
|
content: e.content,
|
|
@@ -1915,28 +1912,28 @@ function ee(e) {
|
|
|
1915
1912
|
trustedHosts: e.trustedHosts,
|
|
1916
1913
|
setBuilderContextSignal: o,
|
|
1917
1914
|
children: [
|
|
1918
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1919
|
-
|
|
1915
|
+
e.isSsrAbTest ? /* @__PURE__ */ b(
|
|
1916
|
+
K,
|
|
1920
1917
|
{
|
|
1921
1918
|
id: "builderio-variant-visibility",
|
|
1922
1919
|
scriptStr: t,
|
|
1923
1920
|
nonce: e.nonce || ""
|
|
1924
1921
|
}
|
|
1925
1922
|
) : null,
|
|
1926
|
-
/* @__PURE__ */
|
|
1927
|
-
|
|
1923
|
+
/* @__PURE__ */ b(
|
|
1924
|
+
xt,
|
|
1928
1925
|
{
|
|
1929
1926
|
nonce: e.nonce || "",
|
|
1930
1927
|
isNestedRender: e.isNestedRender,
|
|
1931
|
-
contentId: (
|
|
1932
|
-
cssCode: (
|
|
1933
|
-
customFonts: (
|
|
1928
|
+
contentId: (w = a.content) == null ? void 0 : w.id,
|
|
1929
|
+
cssCode: (F = (k = a.content) == null ? void 0 : k.data) == null ? void 0 : F.cssCode,
|
|
1930
|
+
customFonts: (W = (P = a.content) == null ? void 0 : P.data) == null ? void 0 : W.customFonts
|
|
1934
1931
|
}
|
|
1935
1932
|
),
|
|
1936
|
-
/* @__PURE__ */
|
|
1937
|
-
|
|
1933
|
+
/* @__PURE__ */ b(
|
|
1934
|
+
Ie,
|
|
1938
1935
|
{
|
|
1939
|
-
blocks: (
|
|
1936
|
+
blocks: (R = (I = a.content) == null ? void 0 : I.data) == null ? void 0 : R.blocks,
|
|
1940
1937
|
context: a,
|
|
1941
1938
|
registeredComponents: d,
|
|
1942
1939
|
linkComponent: e.linkComponent
|
|
@@ -1948,18 +1945,18 @@ function ee(e) {
|
|
|
1948
1945
|
}
|
|
1949
1946
|
);
|
|
1950
1947
|
}
|
|
1951
|
-
function
|
|
1948
|
+
function Ft(e) {
|
|
1952
1949
|
var a;
|
|
1953
|
-
const [t, n] =
|
|
1954
|
-
() =>
|
|
1955
|
-
canTrack:
|
|
1950
|
+
const [t, n] = T(
|
|
1951
|
+
() => it({
|
|
1952
|
+
canTrack: D(e.canTrack),
|
|
1956
1953
|
content: e.content
|
|
1957
1954
|
})
|
|
1958
1955
|
);
|
|
1959
1956
|
function i() {
|
|
1960
1957
|
var o;
|
|
1961
|
-
return
|
|
1962
|
-
|
|
1958
|
+
return lt(
|
|
1959
|
+
B(e.content).map((p) => ({
|
|
1963
1960
|
id: p.testVariationId,
|
|
1964
1961
|
testRatio: p.testRatio
|
|
1965
1962
|
})),
|
|
@@ -1967,47 +1964,47 @@ function Ut(e) {
|
|
|
1967
1964
|
);
|
|
1968
1965
|
}
|
|
1969
1966
|
function d() {
|
|
1970
|
-
return
|
|
1967
|
+
return B(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
|
|
1971
1968
|
}
|
|
1972
1969
|
function m() {
|
|
1973
1970
|
var o;
|
|
1974
1971
|
return t ? {
|
|
1975
1972
|
...e.content,
|
|
1976
1973
|
testVariationId: (o = e.content) == null ? void 0 : o.id
|
|
1977
|
-
} :
|
|
1974
|
+
} : ce({
|
|
1978
1975
|
item: e.content,
|
|
1979
|
-
canTrack:
|
|
1976
|
+
canTrack: D(e.canTrack)
|
|
1980
1977
|
});
|
|
1981
1978
|
}
|
|
1982
|
-
return
|
|
1983
|
-
}, []), /* @__PURE__ */
|
|
1984
|
-
!e.isNestedRender &&
|
|
1985
|
-
|
|
1979
|
+
return C(() => {
|
|
1980
|
+
}, []), /* @__PURE__ */ N(M, { children: [
|
|
1981
|
+
!e.isNestedRender && G !== "reactNative" ? /* @__PURE__ */ b(
|
|
1982
|
+
K,
|
|
1986
1983
|
{
|
|
1987
1984
|
id: "builderio-init-variants-fns",
|
|
1988
|
-
scriptStr:
|
|
1985
|
+
scriptStr: rt(),
|
|
1989
1986
|
nonce: e.nonce || ""
|
|
1990
1987
|
}
|
|
1991
1988
|
) : null,
|
|
1992
|
-
t ? /* @__PURE__ */
|
|
1993
|
-
/* @__PURE__ */
|
|
1994
|
-
|
|
1989
|
+
t ? /* @__PURE__ */ N(M, { children: [
|
|
1990
|
+
/* @__PURE__ */ b(
|
|
1991
|
+
X,
|
|
1995
1992
|
{
|
|
1996
1993
|
id: "builderio-variants",
|
|
1997
1994
|
styles: d(),
|
|
1998
1995
|
nonce: e.nonce || ""
|
|
1999
1996
|
}
|
|
2000
1997
|
),
|
|
2001
|
-
/* @__PURE__ */
|
|
2002
|
-
|
|
1998
|
+
/* @__PURE__ */ b(
|
|
1999
|
+
K,
|
|
2003
2000
|
{
|
|
2004
2001
|
id: "builderio-variants-visibility",
|
|
2005
2002
|
scriptStr: i(),
|
|
2006
2003
|
nonce: e.nonce || ""
|
|
2007
2004
|
}
|
|
2008
2005
|
),
|
|
2009
|
-
(a =
|
|
2010
|
-
|
|
2006
|
+
(a = B(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ b(
|
|
2007
|
+
Q,
|
|
2011
2008
|
{
|
|
2012
2009
|
isNestedRender: e.isNestedRender,
|
|
2013
2010
|
nonce: e.nonce,
|
|
@@ -2033,8 +2030,8 @@ function Ut(e) {
|
|
|
2033
2030
|
o.testVariationId
|
|
2034
2031
|
))
|
|
2035
2032
|
] }) : null,
|
|
2036
|
-
/* @__PURE__ */
|
|
2037
|
-
|
|
2033
|
+
/* @__PURE__ */ b(
|
|
2034
|
+
Q,
|
|
2038
2035
|
{
|
|
2039
2036
|
nonce: e.nonce,
|
|
2040
2037
|
isNestedRender: e.isNestedRender,
|
|
@@ -2061,5 +2058,5 @@ function Ut(e) {
|
|
|
2061
2058
|
] });
|
|
2062
2059
|
}
|
|
2063
2060
|
export {
|
|
2064
|
-
|
|
2061
|
+
Ft as default
|
|
2065
2062
|
};
|