@builder.io/sdk-react 4.0.1 → 4.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 +30 -30
- package/lib/browser/blocks-exports.mjs +567 -561
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/{node/server-entry-a017e97a.js → browser/server-entry-25e49efc.js} +2 -2
- package/lib/browser/{server-entry-0e0758cb.cjs → server-entry-9e5daeda.cjs} +2 -2
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-46e5b47a.js → accordion-5063d748.js} +1 -1
- package/lib/edge/{accordion-02a74a7b.cjs → accordion-f5e5687b.cjs} +1 -1
- package/lib/edge/{blocks-43b7cd64.cjs → blocks-d690074d.cjs} +1 -1
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{blocks-27f4c960.js → blocks-f3b2fbd5.js} +2 -2
- package/lib/edge/{button-c26a8cc8.js → button-0d0430e9.js} +2 -2
- package/lib/edge/{button-b1f2e20e.cjs → button-7cac2c65.cjs} +1 -1
- package/lib/edge/{columns-9a6cd1b4.js → columns-19b22772.js} +3 -3
- package/lib/edge/{columns-5a3e9ac8.cjs → columns-87b82f2f.cjs} +1 -1
- package/lib/edge/{content-variants-3085ec74.js → content-variants-0f0a71cb.js} +313 -307
- package/lib/edge/content-variants-80fc28d8.cjs +134 -0
- package/lib/edge/{form-bf3ca65d.cjs → form-0b5bd2e3.cjs} +1 -1
- package/lib/edge/{form-f2aa1c12.js → form-b8f74b68.js} +3 -3
- package/lib/edge/{get-class-prop-name-7cdcaf94.cjs → get-class-prop-name-6ef08339.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-e41a3976.js → get-class-prop-name-f3ce6ca4.js} +1 -1
- package/lib/edge/{img-2c718c5f.cjs → img-20126279.cjs} +1 -1
- package/lib/edge/{img-2a060e61.js → img-4becc0d4.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-213f973c.cjs → input-6884ec2d.cjs} +1 -1
- package/lib/edge/{input-f270ae3b.js → input-768a5984.js} +1 -1
- package/lib/edge/{personalization-container-b03bc073.cjs → personalization-container-8b32ce9d.cjs} +1 -1
- package/lib/edge/{personalization-container-b85b14c3.js → personalization-container-b581d0f6.js} +4 -4
- package/lib/edge/{select-d6ff55b2.cjs → select-ac5b39d8.cjs} +1 -1
- package/lib/edge/{select-e12e1a87.js → select-e54dc6bc.js} +1 -1
- package/lib/edge/{server-entry-b94c45af.js → server-entry-818ae9c6.js} +2 -1
- package/lib/edge/{server-entry-d0313f00.cjs → server-entry-a60fb569.cjs} +2 -2
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-2670ac48.js → slot-05218273.js} +3 -3
- package/lib/edge/{slot-5ee0ac5d.cjs → slot-5dba6213.cjs} +1 -1
- package/lib/edge/{symbol-a0b2e083.js → symbol-9f247918.js} +2 -2
- package/lib/edge/{symbol-7e58faf5.cjs → symbol-f4b09828.cjs} +1 -1
- package/lib/edge/{tabs-1f475bd4.cjs → tabs-02960a8c.cjs} +1 -1
- package/lib/edge/{tabs-931291c4.js → tabs-a0b38dde.js} +3 -3
- package/lib/node/blocks-exports.cjs +30 -30
- package/lib/node/blocks-exports.mjs +568 -562
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-24943b12.cjs → server-entry-2a2cad4a.cjs} +2 -2
- package/lib/{browser/server-entry-403d3877.js → node/server-entry-702b1a29.js} +3 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-0a7e7bf0.js → setIvm-0a6b0788.js} +1 -1
- package/lib/node/{setIvm-dcd69a69.cjs → setIvm-9cddfc1a.cjs} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-0ca8d8b1.cjs → should-force-browser-runtime-in-node-d6c9e985.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-c51ac820.js → should-force-browser-runtime-in-node-dfff7f8f.js} +1 -1
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/lib/edge/content-variants-eff73ca9.cjs +0 -134
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { isBrowser as
|
|
4
|
-
import { Video as
|
|
5
|
-
import { triggerAnimation as
|
|
6
|
-
const
|
|
1
|
+
import { jsx as h, jsxs as K, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as y, useRef as O, useState as T, useEffect as E } from "react";
|
|
3
|
+
import { isBrowser as M, TARGET as J, isEditing as W, isPreviewing as oe, registerInsertMenu as ce, setupBrowserForEditing as me, createRegisterComponentMessage as pe, getDefaultCanTrack as L, getCookieSync as fe, _track as X, fetchOneEntry as ge, createEditorListener as he, logFetch as be, serializeIncludingFunctions as Z, logger as ye, handleABTestingSync as xe } from "./server-entry-818ae9c6.js";
|
|
4
|
+
import { Video as ve, Button as Se, Columns as Te, Fragment as Ie, Image as ke, Section as Ce, Symbol as we, Text as Ve, BuilderContext as Re } from "./blocks-exports.mjs";
|
|
5
|
+
import { triggerAnimation as Ee, evaluate as re, fastClone as Fe, InlinedStyles as le, ComponentsContext as Pe, Blocks as We } from "./blocks-f3b2fbd5.js";
|
|
6
|
+
const q = {
|
|
7
7
|
"@type": "@builder.io/sdk:Element",
|
|
8
8
|
layerName: "Accordion item title",
|
|
9
9
|
responsiveStyles: {
|
|
@@ -32,7 +32,7 @@ const H = {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}]
|
|
35
|
-
},
|
|
35
|
+
}, $ = {
|
|
36
36
|
"@type": "@builder.io/sdk:Element",
|
|
37
37
|
layerName: "Accordion item detail",
|
|
38
38
|
responsiveStyles: {
|
|
@@ -63,7 +63,7 @@ const H = {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}]
|
|
66
|
-
},
|
|
66
|
+
}, Ae = {
|
|
67
67
|
name: "Builder:Accordion",
|
|
68
68
|
canHaveChildren: !0,
|
|
69
69
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -80,19 +80,19 @@ const H = {
|
|
|
80
80
|
name: "title",
|
|
81
81
|
type: "uiBlocks",
|
|
82
82
|
hideFromUI: !0,
|
|
83
|
-
defaultValue: [
|
|
83
|
+
defaultValue: [q]
|
|
84
84
|
}, {
|
|
85
85
|
name: "detail",
|
|
86
86
|
type: "uiBlocks",
|
|
87
87
|
hideFromUI: !0,
|
|
88
|
-
defaultValue: [
|
|
88
|
+
defaultValue: [$]
|
|
89
89
|
}],
|
|
90
90
|
defaultValue: [{
|
|
91
|
-
title: [
|
|
92
|
-
detail: [
|
|
91
|
+
title: [q],
|
|
92
|
+
detail: [$]
|
|
93
93
|
}, {
|
|
94
|
-
title: [
|
|
95
|
-
detail: [
|
|
94
|
+
title: [q],
|
|
95
|
+
detail: [$]
|
|
96
96
|
}],
|
|
97
97
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
98
98
|
}, {
|
|
@@ -127,7 +127,7 @@ const H = {
|
|
|
127
127
|
builderComponents: !0,
|
|
128
128
|
builderLinkComponent: !0
|
|
129
129
|
}
|
|
130
|
-
},
|
|
130
|
+
}, Be = y(() => import("./accordion-5063d748.js")), De = {
|
|
131
131
|
name: "Core:Button",
|
|
132
132
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
133
133
|
defaultStyles: {
|
|
@@ -163,7 +163,7 @@ const H = {
|
|
|
163
163
|
shouldReceiveBuilderProps: {
|
|
164
164
|
builderLinkComponent: !0
|
|
165
165
|
}
|
|
166
|
-
},
|
|
166
|
+
}, Ue = {
|
|
167
167
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
168
168
|
name: "Columns",
|
|
169
169
|
isRSC: !0,
|
|
@@ -342,7 +342,7 @@ const H = {
|
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
const n = e.get("columns");
|
|
345
|
-
Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((
|
|
345
|
+
Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((u) => !u.get("width")) || n.reduce((o, c) => o + c.get("width"), 0) !== 100) && t();
|
|
346
346
|
}
|
|
347
347
|
}, {
|
|
348
348
|
name: "space",
|
|
@@ -370,13 +370,13 @@ const H = {
|
|
|
370
370
|
builderComponents: !0,
|
|
371
371
|
builderLinkComponent: !0
|
|
372
372
|
}
|
|
373
|
-
},
|
|
373
|
+
}, He = {
|
|
374
374
|
name: "Fragment",
|
|
375
375
|
static: !0,
|
|
376
376
|
hidden: !0,
|
|
377
377
|
canHaveChildren: !0,
|
|
378
378
|
noWrap: !0
|
|
379
|
-
},
|
|
379
|
+
}, Y = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"], Le = ["mp4", "webm", "mkv", "flv", "vob", "ogv", "ogg", "drc", "gif", "gifv", "mng", "avi", "mov", "qt", "mts", "m2ts", "ts", "wmv", "yuv", "rm", "rmvb", "viv", "asf", "amv", "m4p", "mpeg", "mpe", "m2v", "m4v", "svi", "3gp", "3g2", "mxf", "roq", "nsv", "f4v", "f4p", "f4a", "f4b"], Ne = {
|
|
380
380
|
name: "Image",
|
|
381
381
|
static: !0,
|
|
382
382
|
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",
|
|
@@ -391,31 +391,31 @@ const H = {
|
|
|
391
391
|
name: "image",
|
|
392
392
|
type: "file",
|
|
393
393
|
bubble: !0,
|
|
394
|
-
allowedFileTypes:
|
|
394
|
+
allowedFileTypes: Y,
|
|
395
395
|
required: !0,
|
|
396
396
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
397
397
|
onChange: (e) => {
|
|
398
398
|
e.delete("srcset"), e.delete("noWebp");
|
|
399
399
|
function n(a, o = 6e4) {
|
|
400
|
-
return new Promise((
|
|
401
|
-
const
|
|
402
|
-
let
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
},
|
|
406
|
-
console.warn("Image load failed",
|
|
407
|
-
}),
|
|
408
|
-
|
|
400
|
+
return new Promise((c, v) => {
|
|
401
|
+
const x = document.createElement("img");
|
|
402
|
+
let F = !1;
|
|
403
|
+
x.onload = () => {
|
|
404
|
+
F = !0, c(x);
|
|
405
|
+
}, x.addEventListener("error", (C) => {
|
|
406
|
+
console.warn("Image load failed", C.error), v(C.error);
|
|
407
|
+
}), x.src = a, setTimeout(() => {
|
|
408
|
+
F || v(new Error("Image load timed out"));
|
|
409
409
|
}, o);
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
412
|
function i(a) {
|
|
413
413
|
return Math.round(a * 1e3) / 1e3;
|
|
414
414
|
}
|
|
415
|
-
const r = e.get("image"),
|
|
415
|
+
const r = e.get("image"), u = e.get("aspectRatio");
|
|
416
416
|
if (fetch(r).then((a) => a.blob()).then((a) => {
|
|
417
417
|
a.type.includes("svg") && e.set("noWebp", !0);
|
|
418
|
-
}), r && (!
|
|
418
|
+
}), r && (!u || u === 0.7041))
|
|
419
419
|
return n(r).then((a) => {
|
|
420
420
|
const o = e.get("aspectRatio");
|
|
421
421
|
e.get("image") === r && (!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));
|
|
@@ -484,7 +484,7 @@ const H = {
|
|
|
484
484
|
shouldReceiveBuilderProps: {
|
|
485
485
|
builderBlock: !0
|
|
486
486
|
}
|
|
487
|
-
},
|
|
487
|
+
}, qe = {
|
|
488
488
|
name: "PersonalizationContainer",
|
|
489
489
|
shouldReceiveBuilderProps: {
|
|
490
490
|
builderBlock: !0,
|
|
@@ -519,7 +519,7 @@ const H = {
|
|
|
519
519
|
defaultValue: []
|
|
520
520
|
}]
|
|
521
521
|
}]
|
|
522
|
-
},
|
|
522
|
+
}, $e = y(() => import("./personalization-container-b581d0f6.js")), _e = {
|
|
523
523
|
name: "Core:Section",
|
|
524
524
|
static: !0,
|
|
525
525
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -558,7 +558,7 @@ const H = {
|
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
}]
|
|
561
|
-
},
|
|
561
|
+
}, je = {
|
|
562
562
|
name: "Slot",
|
|
563
563
|
isRSC: !0,
|
|
564
564
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -575,7 +575,7 @@ const H = {
|
|
|
575
575
|
builderContext: !0,
|
|
576
576
|
builderComponents: !0
|
|
577
577
|
}
|
|
578
|
-
},
|
|
578
|
+
}, Ke = y(() => import("./slot-05218273.js")), Oe = {
|
|
579
579
|
name: "Symbol",
|
|
580
580
|
noWrap: !0,
|
|
581
581
|
static: !0,
|
|
@@ -614,7 +614,7 @@ const H = {
|
|
|
614
614
|
builderComponents: !0,
|
|
615
615
|
builderLinkComponent: !0
|
|
616
616
|
}
|
|
617
|
-
},
|
|
617
|
+
}, _ = {
|
|
618
618
|
"@type": "@builder.io/sdk:Element",
|
|
619
619
|
responsiveStyles: {
|
|
620
620
|
large: {
|
|
@@ -636,7 +636,7 @@ const H = {
|
|
|
636
636
|
text: "New tab"
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
},
|
|
639
|
+
}, j = {
|
|
640
640
|
"@type": "@builder.io/sdk:Element",
|
|
641
641
|
responsiveStyles: {
|
|
642
642
|
large: {
|
|
@@ -652,7 +652,7 @@ const H = {
|
|
|
652
652
|
text: "New tab content "
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
},
|
|
655
|
+
}, Me = {
|
|
656
656
|
name: "Builder: Tabs",
|
|
657
657
|
inputs: [{
|
|
658
658
|
name: "tabs",
|
|
@@ -662,16 +662,16 @@ const H = {
|
|
|
662
662
|
name: "label",
|
|
663
663
|
type: "uiBlocks",
|
|
664
664
|
hideFromUI: !0,
|
|
665
|
-
defaultValue: [
|
|
665
|
+
defaultValue: [_]
|
|
666
666
|
}, {
|
|
667
667
|
name: "content",
|
|
668
668
|
type: "uiBlocks",
|
|
669
669
|
hideFromUI: !0,
|
|
670
|
-
defaultValue: [
|
|
670
|
+
defaultValue: [j]
|
|
671
671
|
}],
|
|
672
672
|
defaultValue: [{
|
|
673
673
|
label: [{
|
|
674
|
-
...
|
|
674
|
+
..._,
|
|
675
675
|
component: {
|
|
676
676
|
name: "Text",
|
|
677
677
|
options: {
|
|
@@ -680,7 +680,7 @@ const H = {
|
|
|
680
680
|
}
|
|
681
681
|
}],
|
|
682
682
|
content: [{
|
|
683
|
-
...
|
|
683
|
+
...j,
|
|
684
684
|
component: {
|
|
685
685
|
name: "Text",
|
|
686
686
|
options: {
|
|
@@ -690,7 +690,7 @@ const H = {
|
|
|
690
690
|
}]
|
|
691
691
|
}, {
|
|
692
692
|
label: [{
|
|
693
|
-
...
|
|
693
|
+
..._,
|
|
694
694
|
component: {
|
|
695
695
|
name: "Text",
|
|
696
696
|
options: {
|
|
@@ -699,7 +699,7 @@ const H = {
|
|
|
699
699
|
}
|
|
700
700
|
}],
|
|
701
701
|
content: [{
|
|
702
|
-
...
|
|
702
|
+
...j,
|
|
703
703
|
component: {
|
|
704
704
|
name: "Text",
|
|
705
705
|
options: {
|
|
@@ -755,7 +755,7 @@ const H = {
|
|
|
755
755
|
builderComponents: !0,
|
|
756
756
|
builderLinkComponent: !0
|
|
757
757
|
}
|
|
758
|
-
},
|
|
758
|
+
}, ze = y(() => import("./tabs-a0b38dde.js")), Je = {
|
|
759
759
|
shouldReceiveBuilderProps: {
|
|
760
760
|
builderBlock: !1,
|
|
761
761
|
builderContext: !0
|
|
@@ -777,7 +777,7 @@ const H = {
|
|
|
777
777
|
height: "auto",
|
|
778
778
|
textAlign: "center"
|
|
779
779
|
}
|
|
780
|
-
},
|
|
780
|
+
}, Ye = {
|
|
781
781
|
name: "Custom Code",
|
|
782
782
|
static: !0,
|
|
783
783
|
requiredPermissions: ["editCode"],
|
|
@@ -799,7 +799,7 @@ const H = {
|
|
|
799
799
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
800
800
|
advanced: !0
|
|
801
801
|
}]
|
|
802
|
-
},
|
|
802
|
+
}, Ge = y(() => import("./custom-code-7786788e.js")), Qe = {
|
|
803
803
|
name: "Embed",
|
|
804
804
|
static: !0,
|
|
805
805
|
inputs: [{
|
|
@@ -814,7 +814,7 @@ const H = {
|
|
|
814
814
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
815
815
|
hideFromUI: !0
|
|
816
816
|
}]
|
|
817
|
-
},
|
|
817
|
+
}, Xe = y(() => import("./embed-5c1bbe12.js")), Ze = {
|
|
818
818
|
name: "Form:Form",
|
|
819
819
|
// editableTags: ['builder-form-error']
|
|
820
820
|
defaults: {
|
|
@@ -1051,7 +1051,7 @@ const H = {
|
|
|
1051
1051
|
builderComponents: !0,
|
|
1052
1052
|
builderLinkComponent: !0
|
|
1053
1053
|
}
|
|
1054
|
-
},
|
|
1054
|
+
}, et = y(() => import("./form-b8f74b68.js")), tt = {
|
|
1055
1055
|
name: "Form:Input",
|
|
1056
1056
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
1057
1057
|
inputs: [
|
|
@@ -1102,7 +1102,7 @@ const H = {
|
|
|
1102
1102
|
borderStyle: "solid",
|
|
1103
1103
|
borderColor: "#ccc"
|
|
1104
1104
|
}
|
|
1105
|
-
},
|
|
1105
|
+
}, nt = y(() => import("./input-768a5984.js")), at = {
|
|
1106
1106
|
name: "Form:Select",
|
|
1107
1107
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
1108
1108
|
defaultStyles: {
|
|
@@ -1144,7 +1144,7 @@ const H = {
|
|
|
1144
1144
|
}],
|
|
1145
1145
|
static: !0,
|
|
1146
1146
|
noWrap: !0
|
|
1147
|
-
},
|
|
1147
|
+
}, it = y(() => import("./select-e54dc6bc.js")), ot = {
|
|
1148
1148
|
name: "Form:SubmitButton",
|
|
1149
1149
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
1150
1150
|
defaultStyles: {
|
|
@@ -1169,7 +1169,7 @@ const H = {
|
|
|
1169
1169
|
// that only shows if advanced setting is flipped
|
|
1170
1170
|
// TODO: defaultChildren
|
|
1171
1171
|
// canHaveChildren: true,
|
|
1172
|
-
},
|
|
1172
|
+
}, rt = y(() => import("./submit-button-b48361a7.js")), lt = {
|
|
1173
1173
|
name: "Form:TextArea",
|
|
1174
1174
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
1175
1175
|
inputs: [{
|
|
@@ -1205,7 +1205,7 @@ const H = {
|
|
|
1205
1205
|
},
|
|
1206
1206
|
static: !0,
|
|
1207
1207
|
noWrap: !0
|
|
1208
|
-
},
|
|
1208
|
+
}, st = y(() => import("./textarea-d29025e9.js")), dt = {
|
|
1209
1209
|
// friendlyName?
|
|
1210
1210
|
name: "Raw:Img",
|
|
1211
1211
|
hideFromInsertMenu: !0,
|
|
@@ -1214,12 +1214,12 @@ const H = {
|
|
|
1214
1214
|
name: "image",
|
|
1215
1215
|
bubble: !0,
|
|
1216
1216
|
type: "file",
|
|
1217
|
-
allowedFileTypes:
|
|
1217
|
+
allowedFileTypes: Y,
|
|
1218
1218
|
required: !0
|
|
1219
1219
|
}],
|
|
1220
1220
|
noWrap: !0,
|
|
1221
1221
|
static: !0
|
|
1222
|
-
},
|
|
1222
|
+
}, ut = y(() => import("./img-4becc0d4.js")), ct = {
|
|
1223
1223
|
name: "Video",
|
|
1224
1224
|
canHaveChildren: !0,
|
|
1225
1225
|
defaultStyles: {
|
|
@@ -1230,14 +1230,14 @@ const H = {
|
|
|
1230
1230
|
inputs: [{
|
|
1231
1231
|
name: "video",
|
|
1232
1232
|
type: "file",
|
|
1233
|
-
allowedFileTypes:
|
|
1233
|
+
allowedFileTypes: Le,
|
|
1234
1234
|
bubble: !0,
|
|
1235
1235
|
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
1236
1236
|
required: !0
|
|
1237
1237
|
}, {
|
|
1238
1238
|
name: "posterImage",
|
|
1239
1239
|
type: "file",
|
|
1240
|
-
allowedFileTypes:
|
|
1240
|
+
allowedFileTypes: Y,
|
|
1241
1241
|
helperText: "Image to show before the video plays"
|
|
1242
1242
|
}, {
|
|
1243
1243
|
name: "autoPlay",
|
|
@@ -1303,67 +1303,67 @@ const H = {
|
|
|
1303
1303
|
shouldReceiveBuilderProps: {
|
|
1304
1304
|
builderBlock: !0
|
|
1305
1305
|
}
|
|
1306
|
-
},
|
|
1307
|
-
component: Me,
|
|
1308
|
-
...Oe
|
|
1309
|
-
}, {
|
|
1310
|
-
component: Je,
|
|
1311
|
-
...ze
|
|
1312
|
-
}, {
|
|
1306
|
+
}, mt = () => [{
|
|
1313
1307
|
component: Ge,
|
|
1314
1308
|
...Ye
|
|
1315
1309
|
}, {
|
|
1316
1310
|
component: Xe,
|
|
1317
1311
|
...Qe
|
|
1318
|
-
}, {
|
|
1319
|
-
component: nt,
|
|
1320
|
-
...tt
|
|
1321
1312
|
}, {
|
|
1322
1313
|
component: et,
|
|
1323
1314
|
...Ze
|
|
1324
1315
|
}, {
|
|
1325
|
-
component:
|
|
1326
|
-
...
|
|
1316
|
+
component: nt,
|
|
1317
|
+
...tt
|
|
1327
1318
|
}, {
|
|
1328
1319
|
component: rt,
|
|
1329
1320
|
...ot
|
|
1330
1321
|
}, {
|
|
1331
|
-
component:
|
|
1332
|
-
...
|
|
1333
|
-
}], Q = () => [{
|
|
1334
|
-
component: be,
|
|
1335
|
-
...Pe
|
|
1322
|
+
component: it,
|
|
1323
|
+
...at
|
|
1336
1324
|
}, {
|
|
1337
|
-
component:
|
|
1338
|
-
...
|
|
1325
|
+
component: st,
|
|
1326
|
+
...lt
|
|
1339
1327
|
}, {
|
|
1340
|
-
component:
|
|
1341
|
-
...
|
|
1328
|
+
component: ut,
|
|
1329
|
+
...dt
|
|
1342
1330
|
}, {
|
|
1343
1331
|
component: ve,
|
|
1344
|
-
...
|
|
1345
|
-
}, {
|
|
1332
|
+
...ct
|
|
1333
|
+
}], ee = () => [{
|
|
1346
1334
|
component: Se,
|
|
1347
|
-
...
|
|
1348
|
-
}, {
|
|
1349
|
-
component: qe,
|
|
1350
|
-
...Ne
|
|
1335
|
+
...De
|
|
1351
1336
|
}, {
|
|
1352
1337
|
component: Te,
|
|
1353
|
-
|
|
1338
|
+
...Ue
|
|
1354
1339
|
}, {
|
|
1355
1340
|
component: Ie,
|
|
1356
|
-
...
|
|
1341
|
+
...He
|
|
1357
1342
|
}, {
|
|
1358
|
-
component:
|
|
1359
|
-
...
|
|
1343
|
+
component: ke,
|
|
1344
|
+
...Ne
|
|
1360
1345
|
}, {
|
|
1361
|
-
component:
|
|
1346
|
+
component: Ce,
|
|
1362
1347
|
..._e
|
|
1363
1348
|
}, {
|
|
1364
|
-
component:
|
|
1365
|
-
...
|
|
1366
|
-
},
|
|
1349
|
+
component: Ke,
|
|
1350
|
+
...je
|
|
1351
|
+
}, {
|
|
1352
|
+
component: we,
|
|
1353
|
+
...Oe
|
|
1354
|
+
}, {
|
|
1355
|
+
component: Ve,
|
|
1356
|
+
...Je
|
|
1357
|
+
}, {
|
|
1358
|
+
component: $e,
|
|
1359
|
+
...qe
|
|
1360
|
+
}, {
|
|
1361
|
+
component: ze,
|
|
1362
|
+
...Me
|
|
1363
|
+
}, {
|
|
1364
|
+
component: Be,
|
|
1365
|
+
...Ae
|
|
1366
|
+
}, ...mt()], pt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1367
1367
|
function getAndSetVariantId() {
|
|
1368
1368
|
function setCookie(name, value, days) {
|
|
1369
1369
|
let expires = '';
|
|
@@ -1419,7 +1419,7 @@ const H = {
|
|
|
1419
1419
|
}).join('');
|
|
1420
1420
|
styleEl.innerHTML = newStyleStr;
|
|
1421
1421
|
}
|
|
1422
|
-
}`,
|
|
1422
|
+
}`, ft = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1423
1423
|
if (!navigator.cookieEnabled) {
|
|
1424
1424
|
return;
|
|
1425
1425
|
}
|
|
@@ -1453,27 +1453,27 @@ const H = {
|
|
|
1453
1453
|
thisScriptEl?.remove();
|
|
1454
1454
|
}
|
|
1455
1455
|
return;
|
|
1456
|
-
}`,
|
|
1456
|
+
}`, se = "builderIoAbTest", de = "builderIoRenderContent", H = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1457
1457
|
...t,
|
|
1458
1458
|
testVariationId: t.id,
|
|
1459
1459
|
id: e == null ? void 0 : e.id
|
|
1460
|
-
})),
|
|
1460
|
+
})), gt = ({
|
|
1461
1461
|
canTrack: e,
|
|
1462
1462
|
content: t
|
|
1463
|
-
}) => !(!(
|
|
1464
|
-
window.${
|
|
1465
|
-
window.${
|
|
1466
|
-
`,
|
|
1467
|
-
window.${
|
|
1468
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1469
|
-
)`,
|
|
1463
|
+
}) => !(!(H(t).length > 0) || !e || M()), ht = (e) => e === "react" || e === "reactNative", ue = ht(J), bt = () => `
|
|
1464
|
+
window.${se} = ${pt}
|
|
1465
|
+
window.${de} = ${ft}
|
|
1466
|
+
`, yt = (e, t) => `
|
|
1467
|
+
window.${se}(
|
|
1468
|
+
"${t}",${JSON.stringify(e)}, ${ue}
|
|
1469
|
+
)`, xt = ({
|
|
1470
1470
|
contentId: e,
|
|
1471
1471
|
variationId: t
|
|
1472
|
-
}) => `window.${
|
|
1473
|
-
"${t}", "${e}", ${
|
|
1472
|
+
}) => `window.${de}(
|
|
1473
|
+
"${t}", "${e}", ${ue}
|
|
1474
1474
|
)`;
|
|
1475
|
-
function
|
|
1476
|
-
return /* @__PURE__ */
|
|
1475
|
+
function z(e) {
|
|
1476
|
+
return /* @__PURE__ */ h(
|
|
1477
1477
|
"script",
|
|
1478
1478
|
{
|
|
1479
1479
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -1482,10 +1482,10 @@ function K(e) {
|
|
|
1482
1482
|
}
|
|
1483
1483
|
);
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1485
|
+
function te(e) {
|
|
1486
1486
|
return Math.round(e * 1e3) / 1e3;
|
|
1487
1487
|
}
|
|
1488
|
-
const
|
|
1488
|
+
const vt = (e, t, n = !0) => {
|
|
1489
1489
|
if (!(e instanceof HTMLElement))
|
|
1490
1490
|
return null;
|
|
1491
1491
|
let i = n ? e : e.parentElement;
|
|
@@ -1496,37 +1496,37 @@ const ht = (e, t, n = !0) => {
|
|
|
1496
1496
|
return i;
|
|
1497
1497
|
} while (i = i.parentElement);
|
|
1498
1498
|
return null;
|
|
1499
|
-
},
|
|
1499
|
+
}, St = (e) => vt(e, (t) => {
|
|
1500
1500
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1501
1501
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1502
|
-
}),
|
|
1502
|
+
}), ne = ({
|
|
1503
1503
|
event: e,
|
|
1504
1504
|
target: t
|
|
1505
1505
|
}) => {
|
|
1506
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, r = e.clientY - n.top,
|
|
1506
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, r = e.clientY - n.top, u = te(i / n.width), a = te(r / n.height);
|
|
1507
1507
|
return {
|
|
1508
|
-
x:
|
|
1508
|
+
x: u,
|
|
1509
1509
|
y: a
|
|
1510
1510
|
};
|
|
1511
|
-
},
|
|
1512
|
-
const t = e.target, n = t &&
|
|
1511
|
+
}, Tt = (e) => {
|
|
1512
|
+
const t = e.target, n = t && St(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
1513
1513
|
return {
|
|
1514
1514
|
targetBuilderElement: i || void 0,
|
|
1515
1515
|
metadata: {
|
|
1516
|
-
targetOffset: t ?
|
|
1516
|
+
targetOffset: t ? ne({
|
|
1517
1517
|
event: e,
|
|
1518
1518
|
target: t
|
|
1519
1519
|
}) : void 0,
|
|
1520
|
-
builderTargetOffset: n ?
|
|
1520
|
+
builderTargetOffset: n ? ne({
|
|
1521
1521
|
event: e,
|
|
1522
1522
|
target: n
|
|
1523
1523
|
}) : void 0,
|
|
1524
1524
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
1525
1525
|
}
|
|
1526
1526
|
};
|
|
1527
|
-
},
|
|
1528
|
-
var
|
|
1529
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (
|
|
1527
|
+
}, It = ["svelte", "qwik", "vue"], ae = () => It.includes(J) && (W() || oe()), kt = (e) => {
|
|
1528
|
+
var u, a;
|
|
1529
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (u = e == null ? void 0 : e.files) == null ? void 0 : u.regular;
|
|
1530
1530
|
let r = "";
|
|
1531
1531
|
if (i && t && n && (r += `
|
|
1532
1532
|
@font-face {
|
|
@@ -1539,26 +1539,26 @@ font-weight: 400;
|
|
|
1539
1539
|
for (const o in e.files) {
|
|
1540
1540
|
if (!(String(Number(o)) === o))
|
|
1541
1541
|
continue;
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1542
|
+
const v = e.files[o];
|
|
1543
|
+
v && v !== i && (r += `
|
|
1544
1544
|
@font-face {
|
|
1545
1545
|
font-family: "${t}";
|
|
1546
|
-
src: url('${
|
|
1546
|
+
src: url('${v}') format('woff2');
|
|
1547
1547
|
font-display: fallback;
|
|
1548
1548
|
font-weight: ${o};
|
|
1549
1549
|
}
|
|
1550
1550
|
`.trim());
|
|
1551
1551
|
}
|
|
1552
1552
|
return r;
|
|
1553
|
-
},
|
|
1553
|
+
}, Ct = ({
|
|
1554
1554
|
customFonts: e
|
|
1555
1555
|
}) => {
|
|
1556
1556
|
var t;
|
|
1557
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
1558
|
-
},
|
|
1557
|
+
return ((t = e == null ? void 0 : e.map((n) => kt(n))) == null ? void 0 : t.join(" ")) || "";
|
|
1558
|
+
}, wt = ({
|
|
1559
1559
|
cssCode: e,
|
|
1560
1560
|
contentId: t
|
|
1561
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
1561
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Vt = `
|
|
1562
1562
|
.builder-button {
|
|
1563
1563
|
all: unset;
|
|
1564
1564
|
}
|
|
@@ -1575,38 +1575,39 @@ font-weight: ${o};
|
|
|
1575
1575
|
text-align: inherit;
|
|
1576
1576
|
font-family: inherit;
|
|
1577
1577
|
}
|
|
1578
|
-
`,
|
|
1579
|
-
function
|
|
1580
|
-
var
|
|
1581
|
-
const t =
|
|
1578
|
+
`, Rt = (e) => e ? "" : Vt, Et = (e) => `variant-${e}`;
|
|
1579
|
+
function Ft(e) {
|
|
1580
|
+
var f, b, w;
|
|
1581
|
+
const t = O(null);
|
|
1582
|
+
T(() => !1);
|
|
1582
1583
|
function n(l) {
|
|
1583
|
-
var
|
|
1584
|
+
var m, p;
|
|
1584
1585
|
const s = {
|
|
1585
1586
|
...e.builderContextSignal.rootState,
|
|
1586
1587
|
...l
|
|
1587
1588
|
};
|
|
1588
|
-
e.builderContextSignal.rootSetState ? (
|
|
1589
|
-
...
|
|
1589
|
+
e.builderContextSignal.rootSetState ? (p = (m = e.builderContextSignal).rootSetState) == null || p.call(m, s) : e.setBuilderContextSignal((d) => ({
|
|
1590
|
+
...d,
|
|
1590
1591
|
rootState: s
|
|
1591
1592
|
}));
|
|
1592
1593
|
}
|
|
1593
1594
|
function i(l) {
|
|
1594
|
-
var
|
|
1595
|
+
var m, p, d, V, I;
|
|
1595
1596
|
const s = {
|
|
1596
1597
|
...e.builderContextSignal.content,
|
|
1597
1598
|
...l,
|
|
1598
1599
|
data: {
|
|
1599
|
-
...(
|
|
1600
|
+
...(m = e.builderContextSignal.content) == null ? void 0 : m.data,
|
|
1600
1601
|
...l == null ? void 0 : l.data
|
|
1601
1602
|
},
|
|
1602
1603
|
meta: {
|
|
1603
|
-
...(
|
|
1604
|
+
...(p = e.builderContextSignal.content) == null ? void 0 : p.meta,
|
|
1604
1605
|
...l == null ? void 0 : l.meta,
|
|
1605
|
-
breakpoints: ((
|
|
1606
|
+
breakpoints: ((d = l == null ? void 0 : l.meta) == null ? void 0 : d.breakpoints) || ((I = (V = e.builderContextSignal.content) == null ? void 0 : V.meta) == null ? void 0 : I.breakpoints)
|
|
1606
1607
|
}
|
|
1607
1608
|
};
|
|
1608
|
-
e.setBuilderContextSignal((
|
|
1609
|
-
...
|
|
1609
|
+
e.setBuilderContextSignal((S) => ({
|
|
1610
|
+
...S,
|
|
1610
1611
|
content: s
|
|
1611
1612
|
}));
|
|
1612
1613
|
}
|
|
@@ -1616,25 +1617,25 @@ function wt(e) {
|
|
|
1616
1617
|
"aria-hidden": !0
|
|
1617
1618
|
};
|
|
1618
1619
|
}
|
|
1619
|
-
const [
|
|
1620
|
+
const [u, a] = T(
|
|
1620
1621
|
() => e.contentWrapper || "div"
|
|
1621
1622
|
);
|
|
1622
1623
|
function o(l) {
|
|
1623
|
-
return
|
|
1624
|
+
return he({
|
|
1624
1625
|
model: e.model,
|
|
1625
1626
|
trustedHosts: e.trustedHosts,
|
|
1626
1627
|
callbacks: {
|
|
1627
1628
|
configureSdk: (s) => {
|
|
1628
|
-
var
|
|
1629
|
-
const { breakpoints:
|
|
1630
|
-
!
|
|
1629
|
+
var d;
|
|
1630
|
+
const { breakpoints: m, contentId: p } = s;
|
|
1631
|
+
!p || p !== ((d = e.builderContextSignal.content) == null ? void 0 : d.id) || m && i({
|
|
1631
1632
|
meta: {
|
|
1632
|
-
breakpoints:
|
|
1633
|
+
breakpoints: m
|
|
1633
1634
|
}
|
|
1634
1635
|
});
|
|
1635
1636
|
},
|
|
1636
1637
|
animation: (s) => {
|
|
1637
|
-
|
|
1638
|
+
Ee(s);
|
|
1638
1639
|
},
|
|
1639
1640
|
contentUpdate: (s) => {
|
|
1640
1641
|
i(s);
|
|
@@ -1645,36 +1646,36 @@ function wt(e) {
|
|
|
1645
1646
|
}
|
|
1646
1647
|
})(l);
|
|
1647
1648
|
}
|
|
1648
|
-
const [
|
|
1649
|
-
function
|
|
1650
|
-
var s,
|
|
1649
|
+
const [c, v] = T(() => ({})), [x, F] = T(() => ({})), [C, A] = T(() => !1);
|
|
1650
|
+
function B(l) {
|
|
1651
|
+
var s, m;
|
|
1651
1652
|
if (e.builderContextSignal.content) {
|
|
1652
|
-
const
|
|
1653
|
-
|
|
1653
|
+
const p = (s = e.builderContextSignal.content) == null ? void 0 : s.testVariationId, d = (m = e.builderContextSignal.content) == null ? void 0 : m.id;
|
|
1654
|
+
X({
|
|
1654
1655
|
apiHost: e.apiHost,
|
|
1655
1656
|
type: "click",
|
|
1656
|
-
canTrack:
|
|
1657
|
-
contentId:
|
|
1657
|
+
canTrack: L(e.canTrack),
|
|
1658
|
+
contentId: d,
|
|
1658
1659
|
apiKey: e.apiKey,
|
|
1659
|
-
variationId:
|
|
1660
|
-
...
|
|
1661
|
-
unique: !
|
|
1660
|
+
variationId: p !== d ? p : void 0,
|
|
1661
|
+
...Tt(l),
|
|
1662
|
+
unique: !C
|
|
1662
1663
|
});
|
|
1663
1664
|
}
|
|
1664
|
-
|
|
1665
|
+
C || A(!0);
|
|
1665
1666
|
}
|
|
1666
|
-
function
|
|
1667
|
-
var s,
|
|
1668
|
-
const l = (
|
|
1669
|
-
Object.entries(l).forEach(([
|
|
1670
|
-
if (!
|
|
1667
|
+
function D() {
|
|
1668
|
+
var s, m, p;
|
|
1669
|
+
const l = (p = (m = (s = e.builderContextSignal.content) == null ? void 0 : s.data) == null ? void 0 : m.httpRequests) != null ? p : {};
|
|
1670
|
+
Object.entries(l).forEach(([d, V]) => {
|
|
1671
|
+
if (!V || x[d] || c[d] && !W())
|
|
1671
1672
|
return;
|
|
1672
|
-
|
|
1673
|
-
const
|
|
1673
|
+
x[d] = !0;
|
|
1674
|
+
const I = V.replace(
|
|
1674
1675
|
/{{([^}]+)}}/g,
|
|
1675
|
-
(
|
|
1676
|
-
|
|
1677
|
-
code:
|
|
1676
|
+
(S, g) => String(
|
|
1677
|
+
re({
|
|
1678
|
+
code: g,
|
|
1678
1679
|
context: e.context || {},
|
|
1679
1680
|
localState: void 0,
|
|
1680
1681
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -1682,24 +1683,24 @@ function wt(e) {
|
|
|
1682
1683
|
})
|
|
1683
1684
|
)
|
|
1684
1685
|
);
|
|
1685
|
-
|
|
1686
|
+
be(I), fetch(I).then((S) => S.json()).then((S) => {
|
|
1686
1687
|
n({
|
|
1687
|
-
[
|
|
1688
|
-
}),
|
|
1689
|
-
}).catch((
|
|
1690
|
-
console.error("error fetching dynamic data",
|
|
1688
|
+
[d]: S
|
|
1689
|
+
}), c[d] = !0;
|
|
1690
|
+
}).catch((S) => {
|
|
1691
|
+
console.error("error fetching dynamic data", V, S);
|
|
1691
1692
|
}).finally(() => {
|
|
1692
|
-
|
|
1693
|
+
x[d] = !1;
|
|
1693
1694
|
});
|
|
1694
1695
|
});
|
|
1695
1696
|
}
|
|
1696
|
-
function
|
|
1697
|
-
|
|
1697
|
+
function R() {
|
|
1698
|
+
W() && window.dispatchEvent(
|
|
1698
1699
|
new CustomEvent(
|
|
1699
1700
|
"builder:component:stateChange",
|
|
1700
1701
|
{
|
|
1701
1702
|
detail: {
|
|
1702
|
-
state:
|
|
1703
|
+
state: Fe(e.builderContextSignal.rootState),
|
|
1703
1704
|
ref: {
|
|
1704
1705
|
name: e.model
|
|
1705
1706
|
}
|
|
@@ -1708,11 +1709,11 @@ function wt(e) {
|
|
|
1708
1709
|
)
|
|
1709
1710
|
);
|
|
1710
1711
|
}
|
|
1711
|
-
const
|
|
1712
|
-
return
|
|
1713
|
-
var l, s, p,
|
|
1714
|
-
if (
|
|
1715
|
-
|
|
1712
|
+
const P = O(!1);
|
|
1713
|
+
return P.current || (D(), R(), P.current = !0), E(() => {
|
|
1714
|
+
var l, s, m, p, d;
|
|
1715
|
+
if (M()) {
|
|
1716
|
+
W() && !e.isNestedRender && (window.addEventListener("message", o), ce(), me({
|
|
1716
1717
|
...e.locale ? {
|
|
1717
1718
|
locale: e.locale
|
|
1718
1719
|
} : {},
|
|
@@ -1726,71 +1727,76 @@ function wt(e) {
|
|
|
1726
1727
|
apiKey: e.apiKey
|
|
1727
1728
|
}), Object.values(
|
|
1728
1729
|
e.builderContextSignal.componentInfos
|
|
1729
|
-
).forEach((
|
|
1730
|
-
var
|
|
1731
|
-
if (!((
|
|
1732
|
-
const
|
|
1733
|
-
(
|
|
1730
|
+
).forEach((g) => {
|
|
1731
|
+
var k, U;
|
|
1732
|
+
if (!((k = g.models) != null && k.length) || g.models.includes(e.model)) {
|
|
1733
|
+
const N = pe(g);
|
|
1734
|
+
(U = window.parent) == null || U.postMessage(N, "*");
|
|
1734
1735
|
}
|
|
1735
1736
|
}), window.addEventListener(
|
|
1736
1737
|
"builder:component:stateChangeListenerActivated",
|
|
1737
|
-
|
|
1738
|
-
))
|
|
1739
|
-
|
|
1740
|
-
|
|
1738
|
+
R
|
|
1739
|
+
));
|
|
1740
|
+
const V = e.builderContextSignal.content && L(e.canTrack), I = fe({
|
|
1741
|
+
name: `builder.tests.${(s = e.builderContextSignal.content) == null ? void 0 : s.id}`,
|
|
1742
|
+
canTrack: !0
|
|
1743
|
+
}), S = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId;
|
|
1744
|
+
if (V && S === I) {
|
|
1745
|
+
const g = (p = e.builderContextSignal.content) == null ? void 0 : p.id, k = e.apiKey;
|
|
1746
|
+
X({
|
|
1741
1747
|
apiHost: e.apiHost,
|
|
1742
1748
|
type: "impression",
|
|
1743
1749
|
canTrack: !0,
|
|
1744
1750
|
contentId: g,
|
|
1745
|
-
apiKey:
|
|
1746
|
-
variationId:
|
|
1751
|
+
apiKey: k,
|
|
1752
|
+
variationId: I !== g ? I : void 0
|
|
1747
1753
|
});
|
|
1748
1754
|
}
|
|
1749
|
-
if (
|
|
1750
|
-
const
|
|
1751
|
-
`builder.overrides.${
|
|
1752
|
-
),
|
|
1753
|
-
(
|
|
1755
|
+
if (oe() && !W()) {
|
|
1756
|
+
const g = new URL(location.href).searchParams, k = g.get("builder.preview"), U = g.get(
|
|
1757
|
+
`builder.overrides.${k}`
|
|
1758
|
+
), N = g.get("apiKey") || g.get("builder.space");
|
|
1759
|
+
(k === "BUILDER_STUDIO" || k === e.model && N === e.apiKey && (!e.content || U === e.content.id)) && ge({
|
|
1754
1760
|
model: e.model,
|
|
1755
1761
|
apiKey: e.apiKey,
|
|
1756
1762
|
apiVersion: e.builderContextSignal.apiVersion,
|
|
1757
|
-
...
|
|
1763
|
+
...k === "BUILDER_STUDIO" && ((d = e.context) != null && d.symbolId) ? {
|
|
1758
1764
|
query: {
|
|
1759
1765
|
id: e.context.symbolId
|
|
1760
1766
|
}
|
|
1761
1767
|
} : {}
|
|
1762
|
-
}).then((
|
|
1763
|
-
|
|
1768
|
+
}).then((G) => {
|
|
1769
|
+
G && i(G);
|
|
1764
1770
|
});
|
|
1765
1771
|
}
|
|
1766
1772
|
}
|
|
1767
|
-
}, []),
|
|
1773
|
+
}, []), E(() => {
|
|
1768
1774
|
e.content && i(e.content);
|
|
1769
|
-
}, [e.content]),
|
|
1770
|
-
|
|
1771
|
-
}, [e.builderContextSignal.rootState]),
|
|
1775
|
+
}, [e.content]), E(() => {
|
|
1776
|
+
R();
|
|
1777
|
+
}, [e.builderContextSignal.rootState]), E(() => {
|
|
1772
1778
|
e.data && n(e.data);
|
|
1773
|
-
}, [e.data]),
|
|
1779
|
+
}, [e.data]), E(() => {
|
|
1774
1780
|
e.locale && n({
|
|
1775
1781
|
locale: e.locale
|
|
1776
1782
|
});
|
|
1777
|
-
}, [e.locale]),
|
|
1778
|
-
|
|
1783
|
+
}, [e.locale]), E(() => () => {
|
|
1784
|
+
M() && (window.removeEventListener("message", o), window.removeEventListener(
|
|
1779
1785
|
"builder:component:stateChangeListenerActivated",
|
|
1780
|
-
|
|
1786
|
+
R
|
|
1781
1787
|
));
|
|
1782
|
-
}, []), /* @__PURE__ */
|
|
1783
|
-
|
|
1788
|
+
}, []), /* @__PURE__ */ h(Re.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || ae() ? /* @__PURE__ */ h(
|
|
1789
|
+
u,
|
|
1784
1790
|
{
|
|
1785
1791
|
ref: t,
|
|
1786
|
-
onClick: (l) =>
|
|
1787
|
-
"builder-content-id": (
|
|
1792
|
+
onClick: (l) => B(l),
|
|
1793
|
+
"builder-content-id": (f = e.builderContextSignal.content) == null ? void 0 : f.id,
|
|
1788
1794
|
"builder-model": e.model,
|
|
1789
|
-
className:
|
|
1790
|
-
((
|
|
1795
|
+
className: Et(
|
|
1796
|
+
((b = e.content) == null ? void 0 : b.testVariationId) || ((w = e.content) == null ? void 0 : w.id)
|
|
1791
1797
|
),
|
|
1792
1798
|
style: {
|
|
1793
|
-
display: !e.builderContextSignal.content &&
|
|
1799
|
+
display: !e.builderContextSignal.content && ae() ? "none" : void 0
|
|
1794
1800
|
},
|
|
1795
1801
|
...r(),
|
|
1796
1802
|
...e.contentWrapperProps,
|
|
@@ -1798,21 +1804,21 @@ function wt(e) {
|
|
|
1798
1804
|
}
|
|
1799
1805
|
) : null });
|
|
1800
1806
|
}
|
|
1801
|
-
function
|
|
1802
|
-
const [t, n] =
|
|
1807
|
+
function Pt(e) {
|
|
1808
|
+
const [t, n] = T(
|
|
1803
1809
|
() => `
|
|
1804
|
-
${
|
|
1810
|
+
${wt({
|
|
1805
1811
|
cssCode: e.cssCode,
|
|
1806
1812
|
contentId: e.contentId
|
|
1807
1813
|
})}
|
|
1808
|
-
${
|
|
1814
|
+
${Ct({
|
|
1809
1815
|
customFonts: e.customFonts
|
|
1810
1816
|
})}
|
|
1811
|
-
${
|
|
1817
|
+
${Rt(e.isNestedRender)}
|
|
1812
1818
|
`.trim()
|
|
1813
1819
|
);
|
|
1814
|
-
return /* @__PURE__ */
|
|
1815
|
-
|
|
1820
|
+
return /* @__PURE__ */ h(
|
|
1821
|
+
le,
|
|
1816
1822
|
{
|
|
1817
1823
|
id: "builderio-content",
|
|
1818
1824
|
styles: t,
|
|
@@ -1820,15 +1826,15 @@ ${kt(e.isNestedRender)}
|
|
|
1820
1826
|
}
|
|
1821
1827
|
);
|
|
1822
1828
|
}
|
|
1823
|
-
const
|
|
1829
|
+
const Wt = ({
|
|
1824
1830
|
content: e,
|
|
1825
1831
|
data: t,
|
|
1826
1832
|
locale: n
|
|
1827
1833
|
}) => {
|
|
1828
|
-
var
|
|
1829
|
-
const i = {}, r = ((
|
|
1830
|
-
return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((
|
|
1831
|
-
|
|
1834
|
+
var u, a, o;
|
|
1835
|
+
const i = {}, r = ((u = e == null ? void 0 : e.data) == null ? void 0 : u.state) || {};
|
|
1836
|
+
return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((c) => {
|
|
1837
|
+
c.name && c.defaultValue !== void 0 && (i[c.name] = c.defaultValue);
|
|
1832
1838
|
}), {
|
|
1833
1839
|
...i,
|
|
1834
1840
|
...r,
|
|
@@ -1837,7 +1843,7 @@ const Rt = ({
|
|
|
1837
1843
|
locale: n
|
|
1838
1844
|
} : {}
|
|
1839
1845
|
};
|
|
1840
|
-
},
|
|
1846
|
+
}, At = ({
|
|
1841
1847
|
content: e,
|
|
1842
1848
|
data: t
|
|
1843
1849
|
}) => e ? {
|
|
@@ -1848,46 +1854,46 @@ const Rt = ({
|
|
|
1848
1854
|
},
|
|
1849
1855
|
meta: e == null ? void 0 : e.meta
|
|
1850
1856
|
} : void 0;
|
|
1851
|
-
function
|
|
1852
|
-
var
|
|
1853
|
-
const [t, n] =
|
|
1857
|
+
function ie(e) {
|
|
1858
|
+
var v, x, F, C, A, B, D, R, P;
|
|
1859
|
+
const [t, n] = T(
|
|
1854
1860
|
() => {
|
|
1855
|
-
var
|
|
1856
|
-
return
|
|
1861
|
+
var f, b;
|
|
1862
|
+
return xt({
|
|
1857
1863
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1858
|
-
variationId: (
|
|
1864
|
+
variationId: (f = e.content) == null ? void 0 : f.testVariationId,
|
|
1859
1865
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1860
|
-
contentId: (
|
|
1866
|
+
contentId: (b = e.content) == null ? void 0 : b.id
|
|
1861
1867
|
});
|
|
1862
1868
|
}
|
|
1863
1869
|
);
|
|
1864
|
-
function i(
|
|
1865
|
-
o((
|
|
1866
|
-
...
|
|
1867
|
-
rootState:
|
|
1870
|
+
function i(f) {
|
|
1871
|
+
o((b) => ({
|
|
1872
|
+
...b,
|
|
1873
|
+
rootState: f
|
|
1868
1874
|
}));
|
|
1869
1875
|
}
|
|
1870
|
-
const [r,
|
|
1876
|
+
const [r, u] = T(
|
|
1871
1877
|
() => [
|
|
1872
|
-
...
|
|
1878
|
+
...ee(),
|
|
1873
1879
|
...e.customComponents || []
|
|
1874
1880
|
].reduce(
|
|
1875
|
-
(
|
|
1876
|
-
...
|
|
1877
|
-
[
|
|
1878
|
-
component:
|
|
1879
|
-
...
|
|
1881
|
+
(f, { component: b, ...w }) => ({
|
|
1882
|
+
...f,
|
|
1883
|
+
[w.name]: {
|
|
1884
|
+
component: b,
|
|
1885
|
+
...Z(w)
|
|
1880
1886
|
}
|
|
1881
1887
|
}),
|
|
1882
1888
|
{}
|
|
1883
1889
|
)
|
|
1884
|
-
), [a, o] =
|
|
1885
|
-
content:
|
|
1890
|
+
), [a, o] = T(() => ({
|
|
1891
|
+
content: At({
|
|
1886
1892
|
content: e.content,
|
|
1887
1893
|
data: e.data
|
|
1888
1894
|
}),
|
|
1889
1895
|
localState: void 0,
|
|
1890
|
-
rootState:
|
|
1896
|
+
rootState: Wt({
|
|
1891
1897
|
content: e.content,
|
|
1892
1898
|
data: e.data,
|
|
1893
1899
|
locale: e.locale
|
|
@@ -1898,12 +1904,12 @@ function te(e) {
|
|
|
1898
1904
|
apiKey: e.apiKey,
|
|
1899
1905
|
apiVersion: e.apiVersion,
|
|
1900
1906
|
componentInfos: [
|
|
1901
|
-
...
|
|
1907
|
+
...ee(),
|
|
1902
1908
|
...e.customComponents || []
|
|
1903
1909
|
].reduce(
|
|
1904
|
-
(
|
|
1905
|
-
...
|
|
1906
|
-
[
|
|
1910
|
+
(f, { component: b, ...w }) => ({
|
|
1911
|
+
...f,
|
|
1912
|
+
[w.name]: Z(w)
|
|
1907
1913
|
}),
|
|
1908
1914
|
{}
|
|
1909
1915
|
),
|
|
@@ -1912,31 +1918,31 @@ function te(e) {
|
|
|
1912
1918
|
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
1913
1919
|
nonce: e.nonce || "",
|
|
1914
1920
|
model: e.model
|
|
1915
|
-
})),
|
|
1916
|
-
if (!
|
|
1917
|
-
e.apiKey ||
|
|
1921
|
+
})), c = O(!1);
|
|
1922
|
+
if (!c.current) {
|
|
1923
|
+
e.apiKey || ye.error(
|
|
1918
1924
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1919
1925
|
);
|
|
1920
|
-
const
|
|
1921
|
-
|
|
1922
|
-
code:
|
|
1926
|
+
const f = (x = (v = a.content) == null ? void 0 : v.data) == null ? void 0 : x.jsCode;
|
|
1927
|
+
f && re({
|
|
1928
|
+
code: f,
|
|
1923
1929
|
context: e.context || {},
|
|
1924
1930
|
localState: void 0,
|
|
1925
1931
|
rootState: a.rootState,
|
|
1926
|
-
rootSetState: (
|
|
1927
|
-
Object.assign(a.rootState,
|
|
1932
|
+
rootSetState: (b) => {
|
|
1933
|
+
Object.assign(a.rootState, b);
|
|
1928
1934
|
},
|
|
1929
1935
|
isExpression: !1
|
|
1930
|
-
}),
|
|
1936
|
+
}), c.current = !0;
|
|
1931
1937
|
}
|
|
1932
|
-
return /* @__PURE__ */
|
|
1933
|
-
|
|
1938
|
+
return /* @__PURE__ */ h(
|
|
1939
|
+
Pe.Provider,
|
|
1934
1940
|
{
|
|
1935
1941
|
value: {
|
|
1936
1942
|
registeredComponents: r
|
|
1937
1943
|
},
|
|
1938
|
-
children: /* @__PURE__ */
|
|
1939
|
-
|
|
1944
|
+
children: /* @__PURE__ */ K(
|
|
1945
|
+
Ft,
|
|
1940
1946
|
{
|
|
1941
1947
|
apiHost: e.apiHost,
|
|
1942
1948
|
nonce: e.nonce,
|
|
@@ -1956,28 +1962,28 @@ function te(e) {
|
|
|
1956
1962
|
isNestedRender: e.isNestedRender,
|
|
1957
1963
|
setBuilderContextSignal: o,
|
|
1958
1964
|
children: [
|
|
1959
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1960
|
-
|
|
1965
|
+
e.isSsrAbTest ? /* @__PURE__ */ h(
|
|
1966
|
+
z,
|
|
1961
1967
|
{
|
|
1962
1968
|
id: "builderio-variant-visibility",
|
|
1963
1969
|
scriptStr: t,
|
|
1964
1970
|
nonce: e.nonce || ""
|
|
1965
1971
|
}
|
|
1966
1972
|
) : null,
|
|
1967
|
-
/* @__PURE__ */
|
|
1968
|
-
|
|
1973
|
+
/* @__PURE__ */ h(
|
|
1974
|
+
Pt,
|
|
1969
1975
|
{
|
|
1970
1976
|
nonce: e.nonce || "",
|
|
1971
1977
|
isNestedRender: e.isNestedRender,
|
|
1972
|
-
contentId: (
|
|
1973
|
-
cssCode: (
|
|
1974
|
-
customFonts: (
|
|
1978
|
+
contentId: (F = a.content) == null ? void 0 : F.id,
|
|
1979
|
+
cssCode: (A = (C = a.content) == null ? void 0 : C.data) == null ? void 0 : A.cssCode,
|
|
1980
|
+
customFonts: (D = (B = a.content) == null ? void 0 : B.data) == null ? void 0 : D.customFonts
|
|
1975
1981
|
}
|
|
1976
1982
|
),
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
|
|
1983
|
+
/* @__PURE__ */ h(
|
|
1984
|
+
We,
|
|
1979
1985
|
{
|
|
1980
|
-
blocks: (
|
|
1986
|
+
blocks: (P = (R = a.content) == null ? void 0 : R.data) == null ? void 0 : P.blocks,
|
|
1981
1987
|
context: a,
|
|
1982
1988
|
registeredComponents: r,
|
|
1983
1989
|
linkComponent: e.linkComponent
|
|
@@ -1989,66 +1995,66 @@ function te(e) {
|
|
|
1989
1995
|
}
|
|
1990
1996
|
);
|
|
1991
1997
|
}
|
|
1992
|
-
function
|
|
1998
|
+
function Bt(e) {
|
|
1993
1999
|
var a;
|
|
1994
|
-
const [t, n] =
|
|
1995
|
-
() =>
|
|
1996
|
-
canTrack:
|
|
2000
|
+
const [t, n] = T(
|
|
2001
|
+
() => gt({
|
|
2002
|
+
canTrack: L(e.canTrack),
|
|
1997
2003
|
content: e.content
|
|
1998
2004
|
})
|
|
1999
2005
|
);
|
|
2000
2006
|
function i() {
|
|
2001
2007
|
var o;
|
|
2002
|
-
return
|
|
2003
|
-
|
|
2004
|
-
id:
|
|
2005
|
-
testRatio:
|
|
2008
|
+
return yt(
|
|
2009
|
+
H(e.content).map((c) => ({
|
|
2010
|
+
id: c.testVariationId,
|
|
2011
|
+
testRatio: c.testRatio
|
|
2006
2012
|
})),
|
|
2007
2013
|
((o = e.content) == null ? void 0 : o.id) || ""
|
|
2008
2014
|
);
|
|
2009
2015
|
}
|
|
2010
2016
|
function r() {
|
|
2011
|
-
return
|
|
2017
|
+
return H(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
|
|
2012
2018
|
}
|
|
2013
|
-
function
|
|
2019
|
+
function u() {
|
|
2014
2020
|
var o;
|
|
2015
2021
|
return t ? {
|
|
2016
2022
|
...e.content,
|
|
2017
2023
|
testVariationId: (o = e.content) == null ? void 0 : o.id
|
|
2018
|
-
} :
|
|
2024
|
+
} : xe({
|
|
2019
2025
|
item: e.content,
|
|
2020
|
-
canTrack:
|
|
2026
|
+
canTrack: L(e.canTrack)
|
|
2021
2027
|
});
|
|
2022
2028
|
}
|
|
2023
|
-
return
|
|
2024
|
-
}, []), /* @__PURE__ */
|
|
2025
|
-
!e.isNestedRender &&
|
|
2026
|
-
|
|
2029
|
+
return E(() => {
|
|
2030
|
+
}, []), /* @__PURE__ */ K(Q, { children: [
|
|
2031
|
+
!e.isNestedRender && J !== "reactNative" ? /* @__PURE__ */ h(
|
|
2032
|
+
z,
|
|
2027
2033
|
{
|
|
2028
2034
|
id: "builderio-init-variants-fns",
|
|
2029
|
-
scriptStr:
|
|
2035
|
+
scriptStr: bt(),
|
|
2030
2036
|
nonce: e.nonce || ""
|
|
2031
2037
|
}
|
|
2032
2038
|
) : null,
|
|
2033
|
-
t ? /* @__PURE__ */
|
|
2034
|
-
/* @__PURE__ */
|
|
2035
|
-
|
|
2039
|
+
t ? /* @__PURE__ */ K(Q, { children: [
|
|
2040
|
+
/* @__PURE__ */ h(
|
|
2041
|
+
le,
|
|
2036
2042
|
{
|
|
2037
2043
|
id: "builderio-variants",
|
|
2038
2044
|
styles: r(),
|
|
2039
2045
|
nonce: e.nonce || ""
|
|
2040
2046
|
}
|
|
2041
2047
|
),
|
|
2042
|
-
/* @__PURE__ */
|
|
2043
|
-
|
|
2048
|
+
/* @__PURE__ */ h(
|
|
2049
|
+
z,
|
|
2044
2050
|
{
|
|
2045
2051
|
id: "builderio-variants-visibility",
|
|
2046
2052
|
scriptStr: i(),
|
|
2047
2053
|
nonce: e.nonce || ""
|
|
2048
2054
|
}
|
|
2049
2055
|
),
|
|
2050
|
-
(a =
|
|
2051
|
-
|
|
2056
|
+
(a = H(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ h(
|
|
2057
|
+
ie,
|
|
2052
2058
|
{
|
|
2053
2059
|
apiHost: e.apiHost,
|
|
2054
2060
|
isNestedRender: e.isNestedRender,
|
|
@@ -2075,13 +2081,13 @@ function Ft(e) {
|
|
|
2075
2081
|
o.testVariationId
|
|
2076
2082
|
))
|
|
2077
2083
|
] }) : null,
|
|
2078
|
-
/* @__PURE__ */
|
|
2079
|
-
|
|
2084
|
+
/* @__PURE__ */ h(
|
|
2085
|
+
ie,
|
|
2080
2086
|
{
|
|
2081
2087
|
apiHost: e.apiHost,
|
|
2082
2088
|
nonce: e.nonce,
|
|
2083
2089
|
isNestedRender: e.isNestedRender,
|
|
2084
|
-
content:
|
|
2090
|
+
content: u(),
|
|
2085
2091
|
showContent: !0,
|
|
2086
2092
|
model: e.model,
|
|
2087
2093
|
data: e.data,
|
|
@@ -2103,11 +2109,11 @@ function Ft(e) {
|
|
|
2103
2109
|
)
|
|
2104
2110
|
] });
|
|
2105
2111
|
}
|
|
2106
|
-
const
|
|
2112
|
+
const qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2107
2113
|
__proto__: null,
|
|
2108
|
-
default:
|
|
2114
|
+
default: Bt
|
|
2109
2115
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2110
2116
|
export {
|
|
2111
|
-
|
|
2112
|
-
|
|
2117
|
+
z as InlinedScript,
|
|
2118
|
+
qt as contentVariants
|
|
2113
2119
|
};
|