@builder.io/sdk-react 4.0.0 → 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 +834 -825
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-422fad84.js → server-entry-25e49efc.js} +9 -1
- package/lib/browser/server-entry-9e5daeda.cjs +2 -0
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-e1b77652.js → accordion-5063d748.js} +1 -1
- package/lib/edge/{accordion-2f83fc75.cjs → accordion-f5e5687b.cjs} +1 -1
- package/lib/edge/{blocks-5165c164.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-0885e182.js → blocks-f3b2fbd5.js} +2 -2
- package/lib/edge/{button-d878f35c.js → button-0d0430e9.js} +2 -2
- package/lib/edge/{button-d7197e96.cjs → button-7cac2c65.cjs} +1 -1
- package/lib/edge/{columns-b365c86a.js → columns-19b22772.js} +3 -3
- package/lib/edge/{columns-46729516.cjs → columns-87b82f2f.cjs} +1 -1
- package/lib/edge/{content-variants-1594c868.js → content-variants-0f0a71cb.js} +316 -307
- package/lib/edge/content-variants-80fc28d8.cjs +134 -0
- package/lib/edge/{form-9844766c.cjs → form-0b5bd2e3.cjs} +1 -1
- package/lib/edge/{form-b66c20a3.js → form-b8f74b68.js} +3 -3
- package/lib/edge/{get-class-prop-name-0b992cfb.cjs → get-class-prop-name-6ef08339.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-dac81472.js → get-class-prop-name-f3ce6ca4.js} +1 -1
- package/lib/edge/{img-fb35350a.cjs → img-20126279.cjs} +1 -1
- package/lib/edge/{img-c4a772a8.js → img-4becc0d4.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-122768ac.cjs → input-6884ec2d.cjs} +1 -1
- package/lib/edge/{input-57c5b097.js → input-768a5984.js} +1 -1
- package/lib/edge/{personalization-container-a17ae615.cjs → personalization-container-8b32ce9d.cjs} +1 -1
- package/lib/edge/{personalization-container-7e63edce.js → personalization-container-b581d0f6.js} +4 -4
- package/lib/edge/{select-7f750b70.cjs → select-ac5b39d8.cjs} +1 -1
- package/lib/edge/{select-3d4324ef.js → select-e54dc6bc.js} +1 -1
- package/lib/edge/{server-entry-c1673af2.js → server-entry-818ae9c6.js} +9 -1
- package/lib/edge/server-entry-a60fb569.cjs +2 -0
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-05ef18a0.js → slot-05218273.js} +3 -3
- package/lib/edge/{slot-123c0993.cjs → slot-5dba6213.cjs} +1 -1
- package/lib/edge/{symbol-f488bea0.js → symbol-9f247918.js} +2 -2
- package/lib/edge/{symbol-ee314d5a.cjs → symbol-f4b09828.cjs} +1 -1
- package/lib/edge/{tabs-edb82022.cjs → tabs-02960a8c.cjs} +1 -1
- package/lib/edge/{tabs-244d53fa.js → tabs-a0b38dde.js} +3 -3
- package/lib/node/blocks-exports.cjs +30 -30
- package/lib/node/blocks-exports.mjs +673 -664
- 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-2a2cad4a.cjs +2 -0
- package/lib/node/{server-entry-4df60fc5.js → server-entry-702b1a29.js} +9 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-0edfc727.js → setIvm-0a6b0788.js} +1 -1
- package/lib/node/{setIvm-6405aa63.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-6d4dbff9.cjs → should-force-browser-runtime-in-node-d6c9e985.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-7a39b073.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/types/helpers/subscribe-to-editor.d.ts +2 -0
- package/lib/browser/server-entry-916191b4.cjs +0 -2
- package/lib/edge/content-variants-c6cab1c3.cjs +0 -134
- package/lib/edge/server-entry-77166102.cjs +0 -2
- package/lib/node/server-entry-8ab8c78b.cjs +0 -2
|
@@ -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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
690
690
|
}]
|
|
691
691
|
}, {
|
|
692
692
|
label: [{
|
|
693
|
-
...
|
|
693
|
+
..._,
|
|
694
694
|
component: {
|
|
695
695
|
name: "Text",
|
|
696
696
|
options: {
|
|
@@ -699,7 +699,7 @@ const U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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
|
-
...Ke
|
|
1357
|
-
}, {
|
|
1358
|
-
component: Ue,
|
|
1359
1341
|
...He
|
|
1360
1342
|
}, {
|
|
1361
|
-
component:
|
|
1343
|
+
component: ke,
|
|
1344
|
+
...Ne
|
|
1345
|
+
}, {
|
|
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 U = {
|
|
|
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 U = {
|
|
|
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,62 +1617,65 @@ 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);
|
|
1642
|
+
},
|
|
1643
|
+
stateUpdate: (s) => {
|
|
1644
|
+
n(s);
|
|
1641
1645
|
}
|
|
1642
1646
|
}
|
|
1643
1647
|
})(l);
|
|
1644
1648
|
}
|
|
1645
|
-
const [
|
|
1646
|
-
function
|
|
1647
|
-
var s,
|
|
1649
|
+
const [c, v] = T(() => ({})), [x, F] = T(() => ({})), [C, A] = T(() => !1);
|
|
1650
|
+
function B(l) {
|
|
1651
|
+
var s, m;
|
|
1648
1652
|
if (e.builderContextSignal.content) {
|
|
1649
|
-
const
|
|
1650
|
-
|
|
1653
|
+
const p = (s = e.builderContextSignal.content) == null ? void 0 : s.testVariationId, d = (m = e.builderContextSignal.content) == null ? void 0 : m.id;
|
|
1654
|
+
X({
|
|
1651
1655
|
apiHost: e.apiHost,
|
|
1652
1656
|
type: "click",
|
|
1653
|
-
canTrack:
|
|
1654
|
-
contentId:
|
|
1657
|
+
canTrack: L(e.canTrack),
|
|
1658
|
+
contentId: d,
|
|
1655
1659
|
apiKey: e.apiKey,
|
|
1656
|
-
variationId:
|
|
1657
|
-
...
|
|
1658
|
-
unique: !
|
|
1660
|
+
variationId: p !== d ? p : void 0,
|
|
1661
|
+
...Tt(l),
|
|
1662
|
+
unique: !C
|
|
1659
1663
|
});
|
|
1660
1664
|
}
|
|
1661
|
-
|
|
1665
|
+
C || A(!0);
|
|
1662
1666
|
}
|
|
1663
|
-
function
|
|
1664
|
-
var s,
|
|
1665
|
-
const l = (
|
|
1666
|
-
Object.entries(l).forEach(([
|
|
1667
|
-
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())
|
|
1668
1672
|
return;
|
|
1669
|
-
|
|
1670
|
-
const
|
|
1673
|
+
x[d] = !0;
|
|
1674
|
+
const I = V.replace(
|
|
1671
1675
|
/{{([^}]+)}}/g,
|
|
1672
|
-
(
|
|
1673
|
-
|
|
1674
|
-
code:
|
|
1676
|
+
(S, g) => String(
|
|
1677
|
+
re({
|
|
1678
|
+
code: g,
|
|
1675
1679
|
context: e.context || {},
|
|
1676
1680
|
localState: void 0,
|
|
1677
1681
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -1679,24 +1683,24 @@ function wt(e) {
|
|
|
1679
1683
|
})
|
|
1680
1684
|
)
|
|
1681
1685
|
);
|
|
1682
|
-
|
|
1686
|
+
be(I), fetch(I).then((S) => S.json()).then((S) => {
|
|
1683
1687
|
n({
|
|
1684
|
-
[
|
|
1685
|
-
}),
|
|
1686
|
-
}).catch((
|
|
1687
|
-
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);
|
|
1688
1692
|
}).finally(() => {
|
|
1689
|
-
|
|
1693
|
+
x[d] = !1;
|
|
1690
1694
|
});
|
|
1691
1695
|
});
|
|
1692
1696
|
}
|
|
1693
|
-
function
|
|
1694
|
-
|
|
1697
|
+
function R() {
|
|
1698
|
+
W() && window.dispatchEvent(
|
|
1695
1699
|
new CustomEvent(
|
|
1696
1700
|
"builder:component:stateChange",
|
|
1697
1701
|
{
|
|
1698
1702
|
detail: {
|
|
1699
|
-
state:
|
|
1703
|
+
state: Fe(e.builderContextSignal.rootState),
|
|
1700
1704
|
ref: {
|
|
1701
1705
|
name: e.model
|
|
1702
1706
|
}
|
|
@@ -1705,11 +1709,11 @@ function wt(e) {
|
|
|
1705
1709
|
)
|
|
1706
1710
|
);
|
|
1707
1711
|
}
|
|
1708
|
-
const
|
|
1709
|
-
return
|
|
1710
|
-
var l, s, p,
|
|
1711
|
-
if (
|
|
1712
|
-
|
|
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({
|
|
1713
1717
|
...e.locale ? {
|
|
1714
1718
|
locale: e.locale
|
|
1715
1719
|
} : {},
|
|
@@ -1723,71 +1727,76 @@ function wt(e) {
|
|
|
1723
1727
|
apiKey: e.apiKey
|
|
1724
1728
|
}), Object.values(
|
|
1725
1729
|
e.builderContextSignal.componentInfos
|
|
1726
|
-
).forEach((
|
|
1727
|
-
var
|
|
1728
|
-
if (!((
|
|
1729
|
-
const
|
|
1730
|
-
(
|
|
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, "*");
|
|
1731
1735
|
}
|
|
1732
1736
|
}), window.addEventListener(
|
|
1733
1737
|
"builder:component:stateChangeListenerActivated",
|
|
1734
|
-
|
|
1735
|
-
))
|
|
1736
|
-
|
|
1737
|
-
|
|
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({
|
|
1738
1747
|
apiHost: e.apiHost,
|
|
1739
1748
|
type: "impression",
|
|
1740
1749
|
canTrack: !0,
|
|
1741
1750
|
contentId: g,
|
|
1742
|
-
apiKey:
|
|
1743
|
-
variationId:
|
|
1751
|
+
apiKey: k,
|
|
1752
|
+
variationId: I !== g ? I : void 0
|
|
1744
1753
|
});
|
|
1745
1754
|
}
|
|
1746
|
-
if (
|
|
1747
|
-
const
|
|
1748
|
-
`builder.overrides.${
|
|
1749
|
-
),
|
|
1750
|
-
(
|
|
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({
|
|
1751
1760
|
model: e.model,
|
|
1752
1761
|
apiKey: e.apiKey,
|
|
1753
1762
|
apiVersion: e.builderContextSignal.apiVersion,
|
|
1754
|
-
...
|
|
1763
|
+
...k === "BUILDER_STUDIO" && ((d = e.context) != null && d.symbolId) ? {
|
|
1755
1764
|
query: {
|
|
1756
1765
|
id: e.context.symbolId
|
|
1757
1766
|
}
|
|
1758
1767
|
} : {}
|
|
1759
|
-
}).then((
|
|
1760
|
-
|
|
1768
|
+
}).then((G) => {
|
|
1769
|
+
G && i(G);
|
|
1761
1770
|
});
|
|
1762
1771
|
}
|
|
1763
1772
|
}
|
|
1764
|
-
}, []),
|
|
1773
|
+
}, []), E(() => {
|
|
1765
1774
|
e.content && i(e.content);
|
|
1766
|
-
}, [e.content]),
|
|
1767
|
-
|
|
1768
|
-
}, [e.builderContextSignal.rootState]),
|
|
1775
|
+
}, [e.content]), E(() => {
|
|
1776
|
+
R();
|
|
1777
|
+
}, [e.builderContextSignal.rootState]), E(() => {
|
|
1769
1778
|
e.data && n(e.data);
|
|
1770
|
-
}, [e.data]),
|
|
1779
|
+
}, [e.data]), E(() => {
|
|
1771
1780
|
e.locale && n({
|
|
1772
1781
|
locale: e.locale
|
|
1773
1782
|
});
|
|
1774
|
-
}, [e.locale]),
|
|
1775
|
-
|
|
1783
|
+
}, [e.locale]), E(() => () => {
|
|
1784
|
+
M() && (window.removeEventListener("message", o), window.removeEventListener(
|
|
1776
1785
|
"builder:component:stateChangeListenerActivated",
|
|
1777
|
-
|
|
1786
|
+
R
|
|
1778
1787
|
));
|
|
1779
|
-
}, []), /* @__PURE__ */
|
|
1780
|
-
|
|
1788
|
+
}, []), /* @__PURE__ */ h(Re.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || ae() ? /* @__PURE__ */ h(
|
|
1789
|
+
u,
|
|
1781
1790
|
{
|
|
1782
1791
|
ref: t,
|
|
1783
|
-
onClick: (l) =>
|
|
1784
|
-
"builder-content-id": (
|
|
1792
|
+
onClick: (l) => B(l),
|
|
1793
|
+
"builder-content-id": (f = e.builderContextSignal.content) == null ? void 0 : f.id,
|
|
1785
1794
|
"builder-model": e.model,
|
|
1786
|
-
className:
|
|
1787
|
-
((
|
|
1795
|
+
className: Et(
|
|
1796
|
+
((b = e.content) == null ? void 0 : b.testVariationId) || ((w = e.content) == null ? void 0 : w.id)
|
|
1788
1797
|
),
|
|
1789
1798
|
style: {
|
|
1790
|
-
display: !e.builderContextSignal.content &&
|
|
1799
|
+
display: !e.builderContextSignal.content && ae() ? "none" : void 0
|
|
1791
1800
|
},
|
|
1792
1801
|
...r(),
|
|
1793
1802
|
...e.contentWrapperProps,
|
|
@@ -1795,21 +1804,21 @@ function wt(e) {
|
|
|
1795
1804
|
}
|
|
1796
1805
|
) : null });
|
|
1797
1806
|
}
|
|
1798
|
-
function
|
|
1799
|
-
const [t, n] =
|
|
1807
|
+
function Pt(e) {
|
|
1808
|
+
const [t, n] = T(
|
|
1800
1809
|
() => `
|
|
1801
|
-
${
|
|
1810
|
+
${wt({
|
|
1802
1811
|
cssCode: e.cssCode,
|
|
1803
1812
|
contentId: e.contentId
|
|
1804
1813
|
})}
|
|
1805
|
-
${
|
|
1814
|
+
${Ct({
|
|
1806
1815
|
customFonts: e.customFonts
|
|
1807
1816
|
})}
|
|
1808
|
-
${
|
|
1817
|
+
${Rt(e.isNestedRender)}
|
|
1809
1818
|
`.trim()
|
|
1810
1819
|
);
|
|
1811
|
-
return /* @__PURE__ */
|
|
1812
|
-
|
|
1820
|
+
return /* @__PURE__ */ h(
|
|
1821
|
+
le,
|
|
1813
1822
|
{
|
|
1814
1823
|
id: "builderio-content",
|
|
1815
1824
|
styles: t,
|
|
@@ -1817,15 +1826,15 @@ ${kt(e.isNestedRender)}
|
|
|
1817
1826
|
}
|
|
1818
1827
|
);
|
|
1819
1828
|
}
|
|
1820
|
-
const
|
|
1829
|
+
const Wt = ({
|
|
1821
1830
|
content: e,
|
|
1822
1831
|
data: t,
|
|
1823
1832
|
locale: n
|
|
1824
1833
|
}) => {
|
|
1825
|
-
var
|
|
1826
|
-
const i = {}, r = ((
|
|
1827
|
-
return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((
|
|
1828
|
-
|
|
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);
|
|
1829
1838
|
}), {
|
|
1830
1839
|
...i,
|
|
1831
1840
|
...r,
|
|
@@ -1834,7 +1843,7 @@ const Rt = ({
|
|
|
1834
1843
|
locale: n
|
|
1835
1844
|
} : {}
|
|
1836
1845
|
};
|
|
1837
|
-
},
|
|
1846
|
+
}, At = ({
|
|
1838
1847
|
content: e,
|
|
1839
1848
|
data: t
|
|
1840
1849
|
}) => e ? {
|
|
@@ -1845,46 +1854,46 @@ const Rt = ({
|
|
|
1845
1854
|
},
|
|
1846
1855
|
meta: e == null ? void 0 : e.meta
|
|
1847
1856
|
} : void 0;
|
|
1848
|
-
function
|
|
1849
|
-
var
|
|
1850
|
-
const [t, n] =
|
|
1857
|
+
function ie(e) {
|
|
1858
|
+
var v, x, F, C, A, B, D, R, P;
|
|
1859
|
+
const [t, n] = T(
|
|
1851
1860
|
() => {
|
|
1852
|
-
var
|
|
1853
|
-
return
|
|
1861
|
+
var f, b;
|
|
1862
|
+
return xt({
|
|
1854
1863
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1855
|
-
variationId: (
|
|
1864
|
+
variationId: (f = e.content) == null ? void 0 : f.testVariationId,
|
|
1856
1865
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1857
|
-
contentId: (
|
|
1866
|
+
contentId: (b = e.content) == null ? void 0 : b.id
|
|
1858
1867
|
});
|
|
1859
1868
|
}
|
|
1860
1869
|
);
|
|
1861
|
-
function i(
|
|
1862
|
-
o((
|
|
1863
|
-
...
|
|
1864
|
-
rootState:
|
|
1870
|
+
function i(f) {
|
|
1871
|
+
o((b) => ({
|
|
1872
|
+
...b,
|
|
1873
|
+
rootState: f
|
|
1865
1874
|
}));
|
|
1866
1875
|
}
|
|
1867
|
-
const [r,
|
|
1876
|
+
const [r, u] = T(
|
|
1868
1877
|
() => [
|
|
1869
|
-
...
|
|
1878
|
+
...ee(),
|
|
1870
1879
|
...e.customComponents || []
|
|
1871
1880
|
].reduce(
|
|
1872
|
-
(
|
|
1873
|
-
...
|
|
1874
|
-
[
|
|
1875
|
-
component:
|
|
1876
|
-
...
|
|
1881
|
+
(f, { component: b, ...w }) => ({
|
|
1882
|
+
...f,
|
|
1883
|
+
[w.name]: {
|
|
1884
|
+
component: b,
|
|
1885
|
+
...Z(w)
|
|
1877
1886
|
}
|
|
1878
1887
|
}),
|
|
1879
1888
|
{}
|
|
1880
1889
|
)
|
|
1881
|
-
), [a, o] =
|
|
1882
|
-
content:
|
|
1890
|
+
), [a, o] = T(() => ({
|
|
1891
|
+
content: At({
|
|
1883
1892
|
content: e.content,
|
|
1884
1893
|
data: e.data
|
|
1885
1894
|
}),
|
|
1886
1895
|
localState: void 0,
|
|
1887
|
-
rootState:
|
|
1896
|
+
rootState: Wt({
|
|
1888
1897
|
content: e.content,
|
|
1889
1898
|
data: e.data,
|
|
1890
1899
|
locale: e.locale
|
|
@@ -1895,12 +1904,12 @@ function te(e) {
|
|
|
1895
1904
|
apiKey: e.apiKey,
|
|
1896
1905
|
apiVersion: e.apiVersion,
|
|
1897
1906
|
componentInfos: [
|
|
1898
|
-
...
|
|
1907
|
+
...ee(),
|
|
1899
1908
|
...e.customComponents || []
|
|
1900
1909
|
].reduce(
|
|
1901
|
-
(
|
|
1902
|
-
...
|
|
1903
|
-
[
|
|
1910
|
+
(f, { component: b, ...w }) => ({
|
|
1911
|
+
...f,
|
|
1912
|
+
[w.name]: Z(w)
|
|
1904
1913
|
}),
|
|
1905
1914
|
{}
|
|
1906
1915
|
),
|
|
@@ -1909,31 +1918,31 @@ function te(e) {
|
|
|
1909
1918
|
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
1910
1919
|
nonce: e.nonce || "",
|
|
1911
1920
|
model: e.model
|
|
1912
|
-
})),
|
|
1913
|
-
if (!
|
|
1914
|
-
e.apiKey ||
|
|
1921
|
+
})), c = O(!1);
|
|
1922
|
+
if (!c.current) {
|
|
1923
|
+
e.apiKey || ye.error(
|
|
1915
1924
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1916
1925
|
);
|
|
1917
|
-
const
|
|
1918
|
-
|
|
1919
|
-
code:
|
|
1926
|
+
const f = (x = (v = a.content) == null ? void 0 : v.data) == null ? void 0 : x.jsCode;
|
|
1927
|
+
f && re({
|
|
1928
|
+
code: f,
|
|
1920
1929
|
context: e.context || {},
|
|
1921
1930
|
localState: void 0,
|
|
1922
1931
|
rootState: a.rootState,
|
|
1923
|
-
rootSetState: (
|
|
1924
|
-
Object.assign(a.rootState,
|
|
1932
|
+
rootSetState: (b) => {
|
|
1933
|
+
Object.assign(a.rootState, b);
|
|
1925
1934
|
},
|
|
1926
1935
|
isExpression: !1
|
|
1927
|
-
}),
|
|
1936
|
+
}), c.current = !0;
|
|
1928
1937
|
}
|
|
1929
|
-
return /* @__PURE__ */
|
|
1930
|
-
|
|
1938
|
+
return /* @__PURE__ */ h(
|
|
1939
|
+
Pe.Provider,
|
|
1931
1940
|
{
|
|
1932
1941
|
value: {
|
|
1933
1942
|
registeredComponents: r
|
|
1934
1943
|
},
|
|
1935
|
-
children: /* @__PURE__ */
|
|
1936
|
-
|
|
1944
|
+
children: /* @__PURE__ */ K(
|
|
1945
|
+
Ft,
|
|
1937
1946
|
{
|
|
1938
1947
|
apiHost: e.apiHost,
|
|
1939
1948
|
nonce: e.nonce,
|
|
@@ -1953,28 +1962,28 @@ function te(e) {
|
|
|
1953
1962
|
isNestedRender: e.isNestedRender,
|
|
1954
1963
|
setBuilderContextSignal: o,
|
|
1955
1964
|
children: [
|
|
1956
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1957
|
-
|
|
1965
|
+
e.isSsrAbTest ? /* @__PURE__ */ h(
|
|
1966
|
+
z,
|
|
1958
1967
|
{
|
|
1959
1968
|
id: "builderio-variant-visibility",
|
|
1960
1969
|
scriptStr: t,
|
|
1961
1970
|
nonce: e.nonce || ""
|
|
1962
1971
|
}
|
|
1963
1972
|
) : null,
|
|
1964
|
-
/* @__PURE__ */
|
|
1965
|
-
|
|
1973
|
+
/* @__PURE__ */ h(
|
|
1974
|
+
Pt,
|
|
1966
1975
|
{
|
|
1967
1976
|
nonce: e.nonce || "",
|
|
1968
1977
|
isNestedRender: e.isNestedRender,
|
|
1969
|
-
contentId: (
|
|
1970
|
-
cssCode: (
|
|
1971
|
-
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
|
|
1972
1981
|
}
|
|
1973
1982
|
),
|
|
1974
|
-
/* @__PURE__ */
|
|
1975
|
-
|
|
1983
|
+
/* @__PURE__ */ h(
|
|
1984
|
+
We,
|
|
1976
1985
|
{
|
|
1977
|
-
blocks: (
|
|
1986
|
+
blocks: (P = (R = a.content) == null ? void 0 : R.data) == null ? void 0 : P.blocks,
|
|
1978
1987
|
context: a,
|
|
1979
1988
|
registeredComponents: r,
|
|
1980
1989
|
linkComponent: e.linkComponent
|
|
@@ -1986,66 +1995,66 @@ function te(e) {
|
|
|
1986
1995
|
}
|
|
1987
1996
|
);
|
|
1988
1997
|
}
|
|
1989
|
-
function
|
|
1998
|
+
function Bt(e) {
|
|
1990
1999
|
var a;
|
|
1991
|
-
const [t, n] =
|
|
1992
|
-
() =>
|
|
1993
|
-
canTrack:
|
|
2000
|
+
const [t, n] = T(
|
|
2001
|
+
() => gt({
|
|
2002
|
+
canTrack: L(e.canTrack),
|
|
1994
2003
|
content: e.content
|
|
1995
2004
|
})
|
|
1996
2005
|
);
|
|
1997
2006
|
function i() {
|
|
1998
2007
|
var o;
|
|
1999
|
-
return
|
|
2000
|
-
|
|
2001
|
-
id:
|
|
2002
|
-
testRatio:
|
|
2008
|
+
return yt(
|
|
2009
|
+
H(e.content).map((c) => ({
|
|
2010
|
+
id: c.testVariationId,
|
|
2011
|
+
testRatio: c.testRatio
|
|
2003
2012
|
})),
|
|
2004
2013
|
((o = e.content) == null ? void 0 : o.id) || ""
|
|
2005
2014
|
);
|
|
2006
2015
|
}
|
|
2007
2016
|
function r() {
|
|
2008
|
-
return
|
|
2017
|
+
return H(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
|
|
2009
2018
|
}
|
|
2010
|
-
function
|
|
2019
|
+
function u() {
|
|
2011
2020
|
var o;
|
|
2012
2021
|
return t ? {
|
|
2013
2022
|
...e.content,
|
|
2014
2023
|
testVariationId: (o = e.content) == null ? void 0 : o.id
|
|
2015
|
-
} :
|
|
2024
|
+
} : xe({
|
|
2016
2025
|
item: e.content,
|
|
2017
|
-
canTrack:
|
|
2026
|
+
canTrack: L(e.canTrack)
|
|
2018
2027
|
});
|
|
2019
2028
|
}
|
|
2020
|
-
return
|
|
2021
|
-
}, []), /* @__PURE__ */
|
|
2022
|
-
!e.isNestedRender &&
|
|
2023
|
-
|
|
2029
|
+
return E(() => {
|
|
2030
|
+
}, []), /* @__PURE__ */ K(Q, { children: [
|
|
2031
|
+
!e.isNestedRender && J !== "reactNative" ? /* @__PURE__ */ h(
|
|
2032
|
+
z,
|
|
2024
2033
|
{
|
|
2025
2034
|
id: "builderio-init-variants-fns",
|
|
2026
|
-
scriptStr:
|
|
2035
|
+
scriptStr: bt(),
|
|
2027
2036
|
nonce: e.nonce || ""
|
|
2028
2037
|
}
|
|
2029
2038
|
) : null,
|
|
2030
|
-
t ? /* @__PURE__ */
|
|
2031
|
-
/* @__PURE__ */
|
|
2032
|
-
|
|
2039
|
+
t ? /* @__PURE__ */ K(Q, { children: [
|
|
2040
|
+
/* @__PURE__ */ h(
|
|
2041
|
+
le,
|
|
2033
2042
|
{
|
|
2034
2043
|
id: "builderio-variants",
|
|
2035
2044
|
styles: r(),
|
|
2036
2045
|
nonce: e.nonce || ""
|
|
2037
2046
|
}
|
|
2038
2047
|
),
|
|
2039
|
-
/* @__PURE__ */
|
|
2040
|
-
|
|
2048
|
+
/* @__PURE__ */ h(
|
|
2049
|
+
z,
|
|
2041
2050
|
{
|
|
2042
2051
|
id: "builderio-variants-visibility",
|
|
2043
2052
|
scriptStr: i(),
|
|
2044
2053
|
nonce: e.nonce || ""
|
|
2045
2054
|
}
|
|
2046
2055
|
),
|
|
2047
|
-
(a =
|
|
2048
|
-
|
|
2056
|
+
(a = H(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ h(
|
|
2057
|
+
ie,
|
|
2049
2058
|
{
|
|
2050
2059
|
apiHost: e.apiHost,
|
|
2051
2060
|
isNestedRender: e.isNestedRender,
|
|
@@ -2072,13 +2081,13 @@ function Ft(e) {
|
|
|
2072
2081
|
o.testVariationId
|
|
2073
2082
|
))
|
|
2074
2083
|
] }) : null,
|
|
2075
|
-
/* @__PURE__ */
|
|
2076
|
-
|
|
2084
|
+
/* @__PURE__ */ h(
|
|
2085
|
+
ie,
|
|
2077
2086
|
{
|
|
2078
2087
|
apiHost: e.apiHost,
|
|
2079
2088
|
nonce: e.nonce,
|
|
2080
2089
|
isNestedRender: e.isNestedRender,
|
|
2081
|
-
content:
|
|
2090
|
+
content: u(),
|
|
2082
2091
|
showContent: !0,
|
|
2083
2092
|
model: e.model,
|
|
2084
2093
|
data: e.data,
|
|
@@ -2100,11 +2109,11 @@ function Ft(e) {
|
|
|
2100
2109
|
)
|
|
2101
2110
|
] });
|
|
2102
2111
|
}
|
|
2103
|
-
const
|
|
2112
|
+
const qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2104
2113
|
__proto__: null,
|
|
2105
|
-
default:
|
|
2114
|
+
default: Bt
|
|
2106
2115
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2107
2116
|
export {
|
|
2108
|
-
|
|
2109
|
-
|
|
2117
|
+
z as InlinedScript,
|
|
2118
|
+
qt as contentVariants
|
|
2110
2119
|
};
|