@builder.io/sdk-react 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +17 -17
- package/lib/browser/blocks-exports.mjs +268 -227
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/init.cjs +1 -1
- package/lib/browser/init.mjs +1 -1
- package/lib/browser/{server-entry-e0454364.cjs → server-entry-419c051e.cjs} +1 -1
- package/lib/browser/{server-entry-709e09e3.js → server-entry-825b4408.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-12c2d408.cjs → accordion-4f96554c.cjs} +1 -1
- package/lib/edge/{accordion-bd80745a.js → accordion-ca081054.js} +1 -1
- package/lib/edge/{blocks-ac8970f1.cjs → blocks-078044bc.cjs} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +4 -3
- package/lib/edge/{blocks-6d6258ba.js → blocks-f55c7d3e.js} +12 -4
- package/lib/edge/{button-4e842584.js → button-41169061.js} +2 -2
- package/lib/edge/{button-c2e45e64.cjs → button-5d140f8e.cjs} +1 -1
- package/lib/edge/columns-354bf349.cjs +28 -0
- package/lib/edge/{columns-a51238cc.js → columns-f8916a18.js} +53 -46
- package/lib/edge/{content-variants-f3c6baad.js → content-variants-71ee0c76.js} +239 -217
- package/lib/edge/{content-variants-3fe9b1c0.cjs → content-variants-89a9389a.cjs} +8 -8
- package/lib/edge/{form-00c8cc55.js → form-ac2f2a0e.js} +3 -3
- package/lib/edge/{form-b4cdf7cd.cjs → form-f2d2c2bf.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-1bbed5bf.js → get-class-prop-name-a677d7a5.js} +1 -1
- package/lib/edge/{get-class-prop-name-3c5f7a7d.cjs → get-class-prop-name-a9b4959e.cjs} +1 -1
- package/lib/edge/image-344ddbb0.cjs +17 -0
- package/lib/edge/{image-68451fc8.js → image-e3fcd611.js} +24 -22
- package/lib/edge/{img-e7db1475.js → img-8fc26395.js} +1 -1
- package/lib/edge/{img-6671da9a.cjs → img-b91cb4fd.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/init.cjs +1 -1
- package/lib/edge/init.mjs +1 -1
- package/lib/edge/{input-2db47a83.js → input-549f090e.js} +1 -1
- package/lib/edge/{input-0f7a9f1c.cjs → input-ec7c695a.cjs} +1 -1
- package/lib/edge/{select-f0859c5f.cjs → select-3ffa9294.cjs} +1 -1
- package/lib/edge/{select-2facacf2.js → select-6a5a28ac.js} +1 -1
- package/lib/edge/{server-entry-ff6a2e2d.cjs → server-entry-966ac144.cjs} +1 -1
- package/lib/edge/{server-entry-75aa714e.js → server-entry-d2020acf.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-8159ca1d.js → slot-40de071b.js} +3 -3
- package/lib/edge/{slot-aee43b86.cjs → slot-8b27e15e.cjs} +1 -1
- package/lib/edge/symbol-76e76298.cjs +1 -0
- package/lib/edge/symbol-e6515a5f.js +85 -0
- package/lib/edge/{tabs-4112a80e.cjs → tabs-9c5af0ec.cjs} +1 -1
- package/lib/edge/{tabs-f5357a4e.js → tabs-b75be82d.js} +3 -3
- package/lib/node/blocks-exports.cjs +15 -15
- package/lib/node/blocks-exports.mjs +269 -228
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +2 -2
- package/lib/node/{node-runtime-eb72e084.cjs → node-runtime-0e37d6f7.cjs} +1 -1
- package/lib/node/{node-runtime-80c4bfc8.js → node-runtime-0f3a5df1.js} +1 -1
- package/lib/node/{server-entry-e8ac67b5.js → server-entry-5ebd1c9b.js} +1 -1
- package/lib/node/{server-entry-b2103255.cjs → server-entry-8002325b.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +15 -15
- package/types/components/content/components/styles.d.ts +2 -1
- package/types/components/content-variants/content-variants.types.d.ts +4 -0
- package/types/components/inlined-script.d.ts +2 -1
- package/types/components/inlined-styles.d.ts +2 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/types.d.ts +1 -0
- package/types/types/builder-props.d.ts +3 -0
- package/lib/edge/columns-bc2b0674.cjs +0 -28
- package/lib/edge/image-ea37781b.cjs +0 -17
- package/lib/edge/symbol-36a155f3.js +0 -84
- package/lib/edge/symbol-a244cc31.cjs +0 -1
|
@@ -3,9 +3,9 @@ var He = Object.defineProperty;
|
|
|
3
3
|
var qe = (e, t, n) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
4
|
var ie = (e, t, n) => (qe(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
5
5
|
import { jsx as s, Fragment as R, jsxs as P } from "react/jsx-runtime";
|
|
6
|
-
import { TARGET as K, checkIsDefined as Y, logger as Z, isBrowser as G, fastClone as de, isEditing as $, registerInsertMenu as Ke, setupBrowserForEditing as ze, createRegisterComponentMessage as _e, getDefaultCanTrack as Q, _track as he, isPreviewing as Je, fetchOneEntry as Ie, createEditorListener as Ye, fetch as Ge, serializeComponentInfo as ge, handleABTestingSync as Qe } from "./server-entry-
|
|
7
|
-
import { createContext as we, useState as
|
|
8
|
-
import { getFunctionArguments as Xe, runInNode as Ze, parseCode as et, getBuilderGlobals as tt, set as Ee } from "./node-runtime-
|
|
6
|
+
import { TARGET as K, checkIsDefined as Y, logger as Z, isBrowser as G, fastClone as de, isEditing as $, registerInsertMenu as Ke, setupBrowserForEditing as ze, createRegisterComponentMessage as _e, getDefaultCanTrack as Q, _track as he, isPreviewing as Je, fetchOneEntry as Ie, createEditorListener as Ye, fetch as Ge, serializeComponentInfo as ge, handleABTestingSync as Qe } from "./server-entry-5ebd1c9b.js";
|
|
7
|
+
import { createContext as we, useState as T, useEffect as V, useContext as be, useRef as ee, createElement as Re } from "react";
|
|
8
|
+
import { getFunctionArguments as Xe, runInNode as Ze, parseCode as et, getBuilderGlobals as tt, set as Ee } from "./node-runtime-0f3a5df1.js";
|
|
9
9
|
const nt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), it = (e) => typeof e == "string" && nt.has(e.toLowerCase());
|
|
10
10
|
function ue(e) {
|
|
11
11
|
return /* @__PURE__ */ s(R, { children: it(e.TagName) ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ s(R, { children: typeof e.TagName == "string" ? /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
@@ -60,7 +60,8 @@ const me = we({
|
|
|
60
60
|
componentInfos: {},
|
|
61
61
|
inheritedStyles: {},
|
|
62
62
|
BlocksWrapper: "div",
|
|
63
|
-
BlocksWrapperProps: {}
|
|
63
|
+
BlocksWrapperProps: {},
|
|
64
|
+
nonce: ""
|
|
64
65
|
}), Be = we({ registeredComponents: {} });
|
|
65
66
|
function at(e) {
|
|
66
67
|
var t;
|
|
@@ -319,8 +320,8 @@ function ht(e) {
|
|
|
319
320
|
leading: !1
|
|
320
321
|
});
|
|
321
322
|
function r(f) {
|
|
322
|
-
const d = f.getBoundingClientRect(), m = window.innerHeight,
|
|
323
|
-
return d.bottom >
|
|
323
|
+
const d = f.getBoundingClientRect(), m = window.innerHeight, y = (e.thresholdPercent || 0) / 100 * m;
|
|
324
|
+
return d.bottom > y && d.top < m - y;
|
|
324
325
|
}
|
|
325
326
|
const c = e.steps[0].styles;
|
|
326
327
|
function u() {
|
|
@@ -501,7 +502,8 @@ function ne(e) {
|
|
|
501
502
|
"style",
|
|
502
503
|
{
|
|
503
504
|
dangerouslySetInnerHTML: { __html: e.styles },
|
|
504
|
-
"data-id": e.id
|
|
505
|
+
"data-id": e.id,
|
|
506
|
+
nonce: e.nonce
|
|
505
507
|
}
|
|
506
508
|
);
|
|
507
509
|
}
|
|
@@ -518,7 +520,7 @@ function Tt(e) {
|
|
|
518
520
|
return Y(i.hide) ? !i.hide : Y(i.show) ? i.show : !0;
|
|
519
521
|
}
|
|
520
522
|
function n() {
|
|
521
|
-
var
|
|
523
|
+
var p, B, E;
|
|
522
524
|
const i = X({
|
|
523
525
|
block: e.block,
|
|
524
526
|
localState: e.context.localState,
|
|
@@ -527,7 +529,7 @@ function Tt(e) {
|
|
|
527
529
|
context: e.context.context,
|
|
528
530
|
shouldEvaluateBindings: !0
|
|
529
531
|
}), o = i.responsiveStyles, l = e.context.content, a = De(
|
|
530
|
-
((
|
|
532
|
+
((p = l == null ? void 0 : l.meta) == null ? void 0 : p.breakpoints) || {}
|
|
531
533
|
), r = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, u = o == null ? void 0 : o.small, f = i.id;
|
|
532
534
|
if (!f)
|
|
533
535
|
return "";
|
|
@@ -548,18 +550,18 @@ function Tt(e) {
|
|
|
548
550
|
"small",
|
|
549
551
|
a
|
|
550
552
|
)
|
|
551
|
-
}) : "",
|
|
552
|
-
let
|
|
553
|
-
if (
|
|
554
|
-
const A = ((
|
|
555
|
-
|
|
553
|
+
}) : "", y = i.animations && i.animations.find((A) => A.trigger === "hover");
|
|
554
|
+
let C = "";
|
|
555
|
+
if (y) {
|
|
556
|
+
const A = ((E = (B = y.steps) == null ? void 0 : B[1]) == null ? void 0 : E.styles) || {};
|
|
557
|
+
C = _({
|
|
556
558
|
className: `${f}:hover`,
|
|
557
559
|
styles: {
|
|
558
560
|
...A,
|
|
559
|
-
transition: `all ${
|
|
560
|
-
|
|
561
|
+
transition: `all ${y.duration}s ${te(
|
|
562
|
+
y.easing
|
|
561
563
|
)}`,
|
|
562
|
-
transitionDelay:
|
|
564
|
+
transitionDelay: y.delay ? `${y.delay}s` : "0s"
|
|
563
565
|
}
|
|
564
566
|
}) || "";
|
|
565
567
|
}
|
|
@@ -567,10 +569,17 @@ function Tt(e) {
|
|
|
567
569
|
d,
|
|
568
570
|
m,
|
|
569
571
|
g,
|
|
570
|
-
|
|
572
|
+
C
|
|
571
573
|
].join(" ");
|
|
572
574
|
}
|
|
573
|
-
return /* @__PURE__ */ s(R, { children: n() && t() ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
575
|
+
return /* @__PURE__ */ s(R, { children: n() && t() ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
576
|
+
ne,
|
|
577
|
+
{
|
|
578
|
+
id: "builderio-block",
|
|
579
|
+
styles: n(),
|
|
580
|
+
nonce: e.context.nonce
|
|
581
|
+
}
|
|
582
|
+
) }) : null });
|
|
574
583
|
}
|
|
575
584
|
function It(e) {
|
|
576
585
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
@@ -706,7 +715,7 @@ const At = ({
|
|
|
706
715
|
};
|
|
707
716
|
function ye(e) {
|
|
708
717
|
var i;
|
|
709
|
-
const [t, n] =
|
|
718
|
+
const [t, n] = T(
|
|
710
719
|
() => e.isInteractive ? Vt : e.componentRef
|
|
711
720
|
);
|
|
712
721
|
return /* @__PURE__ */ s(R, { children: e.componentRef ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
@@ -736,7 +745,7 @@ function ye(e) {
|
|
|
736
745
|
) }) : null });
|
|
737
746
|
}
|
|
738
747
|
function Nt(e) {
|
|
739
|
-
const [t, n] =
|
|
748
|
+
const [t, n] = T(() => e.repeatContext);
|
|
740
749
|
return /* @__PURE__ */ s(me.Provider, { value: t, children: /* @__PURE__ */ s(
|
|
741
750
|
z,
|
|
742
751
|
{
|
|
@@ -778,9 +787,9 @@ function z(e) {
|
|
|
778
787
|
return e.block.tagName === "a" || ((m = i().properties) == null ? void 0 : m.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
779
788
|
}
|
|
780
789
|
function l() {
|
|
781
|
-
var g,
|
|
790
|
+
var g, y;
|
|
782
791
|
if ((g = e.block.repeat) != null && g.collection)
|
|
783
|
-
return !!((
|
|
792
|
+
return !!((y = n == null ? void 0 : n()) != null && y.length);
|
|
784
793
|
const d = "hide" in i() ? i().hide : !1;
|
|
785
794
|
return ("show" in i() ? i().show : !0) && !d;
|
|
786
795
|
}
|
|
@@ -789,7 +798,7 @@ function z(e) {
|
|
|
789
798
|
return !((m = t == null ? void 0 : t()) != null && m.component) && !n() ? (g = i().children) != null ? g : [] : [];
|
|
790
799
|
}
|
|
791
800
|
function r() {
|
|
792
|
-
var d, m, g,
|
|
801
|
+
var d, m, g, y;
|
|
793
802
|
return {
|
|
794
803
|
blockChildren: (d = i().children) != null ? d : [],
|
|
795
804
|
componentRef: (m = t == null ? void 0 : t()) == null ? void 0 : m.component,
|
|
@@ -808,10 +817,10 @@ function z(e) {
|
|
|
808
817
|
registeredComponents: e.registeredComponents,
|
|
809
818
|
builderBlock: i(),
|
|
810
819
|
includeBlockProps: ((g = t == null ? void 0 : t()) == null ? void 0 : g.noWrap) === !0,
|
|
811
|
-
isInteractive: !((
|
|
820
|
+
isInteractive: !((y = t == null ? void 0 : t()) != null && y.isRSC)
|
|
812
821
|
};
|
|
813
822
|
}
|
|
814
|
-
return
|
|
823
|
+
return V(() => {
|
|
815
824
|
const d = i().id, m = i().animations;
|
|
816
825
|
m && d && mt(
|
|
817
826
|
m.map((g) => ({
|
|
@@ -960,9 +969,9 @@ function D(e) {
|
|
|
960
969
|
const Ft = (e) => `builder-columns ${e}-breakpoints`;
|
|
961
970
|
function $t(e) {
|
|
962
971
|
var A, O;
|
|
963
|
-
const [t, n] =
|
|
972
|
+
const [t, n] = T(
|
|
964
973
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
965
|
-
), [i, o] =
|
|
974
|
+
), [i, o] = T(() => e.columns || []), [l, a] = T(
|
|
966
975
|
() => e.stackColumnsAt || "tablet"
|
|
967
976
|
);
|
|
968
977
|
function r(S) {
|
|
@@ -988,10 +997,10 @@ function $t(e) {
|
|
|
988
997
|
}) {
|
|
989
998
|
return l === "never" ? w : S;
|
|
990
999
|
}
|
|
991
|
-
const [m, g] =
|
|
1000
|
+
const [m, g] = T(
|
|
992
1001
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
993
1002
|
);
|
|
994
|
-
function
|
|
1003
|
+
function y() {
|
|
995
1004
|
return {
|
|
996
1005
|
"--flex-dir": m,
|
|
997
1006
|
"--flex-dir-tablet": f({
|
|
@@ -1000,8 +1009,8 @@ function $t(e) {
|
|
|
1000
1009
|
})
|
|
1001
1010
|
};
|
|
1002
1011
|
}
|
|
1003
|
-
function
|
|
1004
|
-
const w = S === 0 ? 0 : t, N = u(S), b = `${w}px`, h = "100%",
|
|
1012
|
+
function C(S) {
|
|
1013
|
+
const w = S === 0 ? 0 : t, N = u(S), b = `${w}px`, h = "100%", x = 0;
|
|
1005
1014
|
return {
|
|
1006
1015
|
...{
|
|
1007
1016
|
display: "flex",
|
|
@@ -1015,7 +1024,7 @@ function $t(e) {
|
|
|
1015
1024
|
desktopStyle: N
|
|
1016
1025
|
}),
|
|
1017
1026
|
"--column-margin-left-mobile": d({
|
|
1018
|
-
stackedStyle:
|
|
1027
|
+
stackedStyle: x,
|
|
1019
1028
|
desktopStyle: b
|
|
1020
1029
|
}),
|
|
1021
1030
|
"--column-width-tablet": f({
|
|
@@ -1023,20 +1032,20 @@ function $t(e) {
|
|
|
1023
1032
|
desktopStyle: N
|
|
1024
1033
|
}),
|
|
1025
1034
|
"--column-margin-left-tablet": f({
|
|
1026
|
-
stackedStyle:
|
|
1035
|
+
stackedStyle: x,
|
|
1027
1036
|
desktopStyle: b
|
|
1028
1037
|
})
|
|
1029
1038
|
};
|
|
1030
1039
|
}
|
|
1031
|
-
function
|
|
1040
|
+
function p(S) {
|
|
1032
1041
|
var N, b;
|
|
1033
1042
|
return De(
|
|
1034
1043
|
((b = (N = e.builderContext.content) == null ? void 0 : N.meta) == null ? void 0 : b.breakpoints) || {}
|
|
1035
1044
|
)[S].max;
|
|
1036
1045
|
}
|
|
1037
|
-
function
|
|
1046
|
+
function B() {
|
|
1038
1047
|
return `
|
|
1039
|
-
@media (max-width: ${
|
|
1048
|
+
@media (max-width: ${p("medium")}px) {
|
|
1040
1049
|
.${e.builderBlock.id}-breakpoints {
|
|
1041
1050
|
flex-direction: var(--flex-dir-tablet);
|
|
1042
1051
|
align-items: stretch;
|
|
@@ -1048,7 +1057,7 @@ function $t(e) {
|
|
|
1048
1057
|
}
|
|
1049
1058
|
}
|
|
1050
1059
|
|
|
1051
|
-
@media (max-width: ${
|
|
1060
|
+
@media (max-width: ${p("small")}px) {
|
|
1052
1061
|
.${e.builderBlock.id}-breakpoints {
|
|
1053
1062
|
flex-direction: var(--flex-dir);
|
|
1054
1063
|
align-items: stretch;
|
|
@@ -1061,29 +1070,36 @@ function $t(e) {
|
|
|
1061
1070
|
},
|
|
1062
1071
|
`;
|
|
1063
1072
|
}
|
|
1064
|
-
function
|
|
1073
|
+
function E(S, w) {
|
|
1065
1074
|
return {
|
|
1066
1075
|
...S.link ? {
|
|
1067
1076
|
href: S.link
|
|
1068
1077
|
} : {},
|
|
1069
1078
|
[H()]: "builder-column",
|
|
1070
|
-
style: Fe(
|
|
1079
|
+
style: Fe(C(w))
|
|
1071
1080
|
};
|
|
1072
1081
|
}
|
|
1073
1082
|
return /* @__PURE__ */ P(R, { children: [
|
|
1074
1083
|
/* @__PURE__ */ P(
|
|
1075
1084
|
"div",
|
|
1076
1085
|
{
|
|
1077
|
-
className: Ft((A = e.builderBlock) == null ? void 0 : A.id) + " div-
|
|
1078
|
-
style:
|
|
1086
|
+
className: Ft((A = e.builderBlock) == null ? void 0 : A.id) + " div-fe220f58",
|
|
1087
|
+
style: y(),
|
|
1079
1088
|
children: [
|
|
1080
|
-
/* @__PURE__ */ s(
|
|
1089
|
+
/* @__PURE__ */ s(
|
|
1090
|
+
ne,
|
|
1091
|
+
{
|
|
1092
|
+
id: "builderio-columns",
|
|
1093
|
+
styles: B(),
|
|
1094
|
+
nonce: e.builderContext.nonce
|
|
1095
|
+
}
|
|
1096
|
+
),
|
|
1081
1097
|
(O = e.columns) == null ? void 0 : O.map((S, w) => /* @__PURE__ */ s(
|
|
1082
1098
|
ue,
|
|
1083
1099
|
{
|
|
1084
1100
|
TagName: r(S),
|
|
1085
1101
|
actionAttributes: {},
|
|
1086
|
-
attributes:
|
|
1102
|
+
attributes: E(S, w),
|
|
1087
1103
|
children: /* @__PURE__ */ s(
|
|
1088
1104
|
D,
|
|
1089
1105
|
{
|
|
@@ -1104,7 +1120,7 @@ function $t(e) {
|
|
|
1104
1120
|
]
|
|
1105
1121
|
}
|
|
1106
1122
|
),
|
|
1107
|
-
/* @__PURE__ */ s("style", { children: `.div-
|
|
1123
|
+
/* @__PURE__ */ s("style", { children: `.div-fe220f58 {
|
|
1108
1124
|
display: flex;
|
|
1109
1125
|
line-height: normal;
|
|
1110
1126
|
}` })
|
|
@@ -1152,12 +1168,14 @@ function jt(e) {
|
|
|
1152
1168
|
// images, otherwise you can supply this prop manually
|
|
1153
1169
|
!(d.match(/builder\.io/) || d.match(/cdn\.shopify\.com/)))
|
|
1154
1170
|
return e.srcset;
|
|
1155
|
-
if (e.
|
|
1156
|
-
if (
|
|
1157
|
-
|
|
1158
|
-
|
|
1171
|
+
if (!e.noWebp) {
|
|
1172
|
+
if (e.srcset && ((m = e.image) != null && m.includes("builder.io/api/v1/image"))) {
|
|
1173
|
+
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1174
|
+
return console.debug("Removed given srcset"), oe(d);
|
|
1175
|
+
} else if (e.image && !e.srcset)
|
|
1176
|
+
return oe(d);
|
|
1159
1177
|
return oe(d);
|
|
1160
|
-
|
|
1178
|
+
}
|
|
1161
1179
|
}
|
|
1162
1180
|
function n() {
|
|
1163
1181
|
var f;
|
|
@@ -1189,7 +1207,7 @@ function jt(e) {
|
|
|
1189
1207
|
objectFit: e.backgroundSize || "cover",
|
|
1190
1208
|
...i()
|
|
1191
1209
|
},
|
|
1192
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
1210
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-56bbd606",
|
|
1193
1211
|
src: e.image,
|
|
1194
1212
|
srcSet: t(),
|
|
1195
1213
|
sizes: e.sizes
|
|
@@ -1199,23 +1217,23 @@ function jt(e) {
|
|
|
1199
1217
|
e.aspectRatio && !((l = (o = e.builderBlock) == null ? void 0 : o.children) != null && l.length && e.fitContent) ? /* @__PURE__ */ s(
|
|
1200
1218
|
"div",
|
|
1201
1219
|
{
|
|
1202
|
-
className: "builder-image-sizer div-
|
|
1220
|
+
className: "builder-image-sizer div-56bbd606",
|
|
1203
1221
|
style: {
|
|
1204
1222
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1205
1223
|
}
|
|
1206
1224
|
}
|
|
1207
1225
|
) : null,
|
|
1208
1226
|
(r = (a = e.builderBlock) == null ? void 0 : a.children) != null && r.length && e.fitContent ? /* @__PURE__ */ s(R, { children: e.children }) : null,
|
|
1209
|
-
!e.fitContent && ((u = (c = e.builderBlock) == null ? void 0 : c.children) != null && u.length) ? /* @__PURE__ */ s("div", { className: "div-
|
|
1227
|
+
!e.fitContent && ((u = (c = e.builderBlock) == null ? void 0 : c.children) != null && u.length) ? /* @__PURE__ */ s("div", { className: "div-56bbd606-2", children: e.children }) : null
|
|
1210
1228
|
] }),
|
|
1211
|
-
/* @__PURE__ */ s("style", { children: `.img-
|
|
1229
|
+
/* @__PURE__ */ s("style", { children: `.img-56bbd606 {
|
|
1212
1230
|
opacity: 1;
|
|
1213
1231
|
transition: opacity 0.2s ease-in-out;
|
|
1214
|
-
}.div-
|
|
1232
|
+
}.div-56bbd606 {
|
|
1215
1233
|
width: 100%;
|
|
1216
1234
|
pointer-events: none;
|
|
1217
1235
|
font-size: 0;
|
|
1218
|
-
}.div-
|
|
1236
|
+
}.div-56bbd606-2 {
|
|
1219
1237
|
display: flex;
|
|
1220
1238
|
flex-direction: column;
|
|
1221
1239
|
align-items: stretch;
|
|
@@ -1375,7 +1393,7 @@ const ae = {
|
|
|
1375
1393
|
}, ve = (e) => e.toString();
|
|
1376
1394
|
function Ht(e) {
|
|
1377
1395
|
var d;
|
|
1378
|
-
const [t, n] =
|
|
1396
|
+
const [t, n] = T(() => []);
|
|
1379
1397
|
function i() {
|
|
1380
1398
|
return !!(e.grid || e.oneAtATime);
|
|
1381
1399
|
}
|
|
@@ -1401,7 +1419,7 @@ function Ht(e) {
|
|
|
1401
1419
|
cursor: "pointer"
|
|
1402
1420
|
};
|
|
1403
1421
|
return Object.fromEntries(
|
|
1404
|
-
Object.entries(g).filter(([
|
|
1422
|
+
Object.entries(g).filter(([y, C]) => C !== void 0)
|
|
1405
1423
|
);
|
|
1406
1424
|
}
|
|
1407
1425
|
function a(m) {
|
|
@@ -1413,23 +1431,23 @@ function Ht(e) {
|
|
|
1413
1431
|
function c() {
|
|
1414
1432
|
let m = null;
|
|
1415
1433
|
if (e.grid && t.length && document) {
|
|
1416
|
-
const
|
|
1417
|
-
let
|
|
1418
|
-
`.builder-accordion-title[data-index="${
|
|
1434
|
+
const y = t[0];
|
|
1435
|
+
let p = document.querySelector(
|
|
1436
|
+
`.builder-accordion-title[data-index="${y}"]`
|
|
1419
1437
|
);
|
|
1420
|
-
if (m =
|
|
1421
|
-
let
|
|
1422
|
-
for (;
|
|
1423
|
-
if (
|
|
1424
|
-
if (
|
|
1438
|
+
if (m = y, p) {
|
|
1439
|
+
let B = p.getBoundingClientRect();
|
|
1440
|
+
for (; p = p && p.nextElementSibling; )
|
|
1441
|
+
if (p) {
|
|
1442
|
+
if (p.classList.contains("builder-accordion-detail"))
|
|
1425
1443
|
continue;
|
|
1426
|
-
const
|
|
1427
|
-
if (
|
|
1444
|
+
const E = p.getBoundingClientRect();
|
|
1445
|
+
if (E.left > B.left) {
|
|
1428
1446
|
const A = parseInt(
|
|
1429
|
-
|
|
1447
|
+
p.getAttribute("data-index") || "",
|
|
1430
1448
|
10
|
|
1431
1449
|
);
|
|
1432
|
-
isNaN(A) || (
|
|
1450
|
+
isNaN(A) || (B = E, m = A);
|
|
1433
1451
|
} else
|
|
1434
1452
|
break;
|
|
1435
1453
|
}
|
|
@@ -1445,7 +1463,7 @@ function Ht(e) {
|
|
|
1445
1463
|
}
|
|
1446
1464
|
};
|
|
1447
1465
|
return Object.fromEntries(
|
|
1448
|
-
Object.entries(m).filter(([g,
|
|
1466
|
+
Object.entries(m).filter(([g, y]) => y !== void 0)
|
|
1449
1467
|
);
|
|
1450
1468
|
}
|
|
1451
1469
|
function f(m) {
|
|
@@ -1462,7 +1480,7 @@ function Ht(e) {
|
|
|
1462
1480
|
order: c() !== null ? ve(g) : ve(g + 1)
|
|
1463
1481
|
},
|
|
1464
1482
|
"data-index": g,
|
|
1465
|
-
onClick: (
|
|
1483
|
+
onClick: (y) => f(g),
|
|
1466
1484
|
children: /* @__PURE__ */ s(
|
|
1467
1485
|
D,
|
|
1468
1486
|
{
|
|
@@ -2115,7 +2133,7 @@ const Qt = {
|
|
|
2115
2133
|
};
|
|
2116
2134
|
function Zt(e) {
|
|
2117
2135
|
var l;
|
|
2118
|
-
const [t, n] =
|
|
2136
|
+
const [t, n] = T(
|
|
2119
2137
|
() => e.defaultActiveTab ? e.defaultActiveTab - 1 : 0
|
|
2120
2138
|
);
|
|
2121
2139
|
function i(a) {
|
|
@@ -2231,8 +2249,8 @@ const nn = {
|
|
|
2231
2249
|
}]
|
|
2232
2250
|
};
|
|
2233
2251
|
function on(e) {
|
|
2234
|
-
const t = ee(null), [n, i] =
|
|
2235
|
-
return
|
|
2252
|
+
const t = ee(null), [n, i] = T(() => []), [o, l] = T(() => []);
|
|
2253
|
+
return V(() => {
|
|
2236
2254
|
var r;
|
|
2237
2255
|
if (!((r = t.current) != null && r.getElementsByTagName) || typeof window == "undefined")
|
|
2238
2256
|
return;
|
|
@@ -2285,7 +2303,7 @@ const an = {
|
|
|
2285
2303
|
}]
|
|
2286
2304
|
}, rn = ["text/javascript", "application/javascript", "application/ecmascript"], ln = (e) => rn.includes(e.type);
|
|
2287
2305
|
function sn(e) {
|
|
2288
|
-
const t = ee(null), [n, i] =
|
|
2306
|
+
const t = ee(null), [n, i] = T(() => []), [o, l] = T(() => []), [a, r] = T(() => !1);
|
|
2289
2307
|
function c() {
|
|
2290
2308
|
if (!t.current || !t.current.getElementsByTagName)
|
|
2291
2309
|
return;
|
|
@@ -2304,7 +2322,7 @@ function sn(e) {
|
|
|
2304
2322
|
}
|
|
2305
2323
|
}
|
|
2306
2324
|
}
|
|
2307
|
-
return
|
|
2325
|
+
return V(() => {
|
|
2308
2326
|
t.current && !a && (r(!0), c());
|
|
2309
2327
|
}, [t.current, a]), /* @__PURE__ */ s(
|
|
2310
2328
|
"div",
|
|
@@ -2561,39 +2579,39 @@ const cn = {
|
|
|
2561
2579
|
};
|
|
2562
2580
|
function fn(e) {
|
|
2563
2581
|
var d, m;
|
|
2564
|
-
const t = ee(null), [n, i] =
|
|
2582
|
+
const t = ee(null), [n, i] = T(() => "unsubmitted"), [o, l] = T(() => null), [a, r] = T(() => "");
|
|
2565
2583
|
function c(g) {
|
|
2566
|
-
var
|
|
2567
|
-
const
|
|
2584
|
+
var C, p;
|
|
2585
|
+
const y = {
|
|
2568
2586
|
...e.builderContext.rootState,
|
|
2569
2587
|
...g
|
|
2570
2588
|
};
|
|
2571
|
-
e.builderContext.rootSetState ? (
|
|
2589
|
+
e.builderContext.rootSetState ? (p = (C = e.builderContext).rootSetState) == null || p.call(C, y) : e.builderContext.rootState = y;
|
|
2572
2590
|
}
|
|
2573
2591
|
function u() {
|
|
2574
2592
|
return $() && e.previewState || n;
|
|
2575
2593
|
}
|
|
2576
2594
|
function f(g) {
|
|
2577
|
-
var
|
|
2578
|
-
const
|
|
2595
|
+
var C;
|
|
2596
|
+
const y = e.sendWithJs || e.sendSubmissionsTo === "email";
|
|
2579
2597
|
if (e.sendSubmissionsTo === "zapier")
|
|
2580
2598
|
g.preventDefault();
|
|
2581
|
-
else if (
|
|
2599
|
+
else if (y) {
|
|
2582
2600
|
if (!(e.action || e.sendSubmissionsTo === "email")) {
|
|
2583
2601
|
g.preventDefault();
|
|
2584
2602
|
return;
|
|
2585
2603
|
}
|
|
2586
2604
|
g.preventDefault();
|
|
2587
|
-
const
|
|
2588
|
-
let
|
|
2589
|
-
const A = new FormData(
|
|
2605
|
+
const p = g.currentTarget || g.target, B = e.customHeaders || {};
|
|
2606
|
+
let E;
|
|
2607
|
+
const A = new FormData(p), O = Array.from(p.querySelectorAll("input,select,textarea")).filter((b) => !!b.name).map((b) => {
|
|
2590
2608
|
let h;
|
|
2591
|
-
const
|
|
2609
|
+
const x = b.name;
|
|
2592
2610
|
if (b instanceof HTMLInputElement)
|
|
2593
2611
|
if (b.type === "radio") {
|
|
2594
2612
|
if (b.checked)
|
|
2595
2613
|
return h = b.name, {
|
|
2596
|
-
key:
|
|
2614
|
+
key: x,
|
|
2597
2615
|
value: h
|
|
2598
2616
|
};
|
|
2599
2617
|
} else if (b.type === "checkbox")
|
|
@@ -2606,7 +2624,7 @@ function fn(e) {
|
|
|
2606
2624
|
else
|
|
2607
2625
|
h = b.value;
|
|
2608
2626
|
return {
|
|
2609
|
-
key:
|
|
2627
|
+
key: x,
|
|
2610
2628
|
value: h
|
|
2611
2629
|
};
|
|
2612
2630
|
});
|
|
@@ -2614,15 +2632,15 @@ function fn(e) {
|
|
|
2614
2632
|
if (e.sendSubmissionsTo === "email" && (S = "multipart/form-data"), Array.from(O).forEach(({ value: b }) => {
|
|
2615
2633
|
(b instanceof File || Array.isArray(b) && b[0] instanceof File || b instanceof FileList) && (S = "multipart/form-data");
|
|
2616
2634
|
}), S !== "application/json")
|
|
2617
|
-
|
|
2635
|
+
E = A;
|
|
2618
2636
|
else {
|
|
2619
2637
|
const b = {};
|
|
2620
|
-
Array.from(O).forEach(({ value: h, key:
|
|
2621
|
-
Ee(b,
|
|
2622
|
-
}),
|
|
2638
|
+
Array.from(O).forEach(({ value: h, key: x }) => {
|
|
2639
|
+
Ee(b, x, h);
|
|
2640
|
+
}), E = JSON.stringify(b);
|
|
2623
2641
|
}
|
|
2624
|
-
S && S !== "multipart/form-data" && (
|
|
2625
|
-
const w = new CustomEvent("presubmit", { detail: { body:
|
|
2642
|
+
S && S !== "multipart/form-data" && (y && ((C = e.action) != null && C.includes("zapier.com")) || (B["content-type"] = S));
|
|
2643
|
+
const w = new CustomEvent("presubmit", { detail: { body: E } });
|
|
2626
2644
|
if (t.current && (t.current.dispatchEvent(w), w.defaultPrevented))
|
|
2627
2645
|
return;
|
|
2628
2646
|
i("sending");
|
|
@@ -2631,12 +2649,12 @@ function fn(e) {
|
|
|
2631
2649
|
)}&name=${encodeURIComponent(e.name || "")}`;
|
|
2632
2650
|
fetch(
|
|
2633
2651
|
e.sendSubmissionsTo === "email" ? N : e.action,
|
|
2634
|
-
{ body:
|
|
2652
|
+
{ body: E, headers: B, method: e.method || "post" }
|
|
2635
2653
|
).then(
|
|
2636
2654
|
async (b) => {
|
|
2637
2655
|
let h;
|
|
2638
|
-
const
|
|
2639
|
-
if (
|
|
2656
|
+
const x = b.headers.get("content-type");
|
|
2657
|
+
if (x && x.indexOf("application/json") !== -1 ? h = await b.json() : h = await b.text(), !b.ok && e.errorMessagePath) {
|
|
2640
2658
|
let v = mn(h, e.errorMessagePath);
|
|
2641
2659
|
v && (typeof v != "string" && (v = JSON.stringify(v)), r(v), c({ formErrorMessage: v }));
|
|
2642
2660
|
}
|
|
@@ -2681,7 +2699,7 @@ function fn(e) {
|
|
|
2681
2699
|
onSubmit: (g) => f(g),
|
|
2682
2700
|
...e.attributes,
|
|
2683
2701
|
children: [
|
|
2684
|
-
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ s(R, { children: (m = (d = e.builderBlock) == null ? void 0 : d.children) == null ? void 0 : m.map((g,
|
|
2702
|
+
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ s(R, { children: (m = (d = e.builderBlock) == null ? void 0 : d.children) == null ? void 0 : m.map((g, y) => /* @__PURE__ */ s(
|
|
2685
2703
|
z,
|
|
2686
2704
|
{
|
|
2687
2705
|
block: g,
|
|
@@ -2689,7 +2707,7 @@ function fn(e) {
|
|
|
2689
2707
|
registeredComponents: e.builderComponents,
|
|
2690
2708
|
linkComponent: e.builderLinkComponent
|
|
2691
2709
|
},
|
|
2692
|
-
`form-block-${
|
|
2710
|
+
`form-block-${y}`
|
|
2693
2711
|
)) }) : null,
|
|
2694
2712
|
u() === "error" ? /* @__PURE__ */ s(
|
|
2695
2713
|
D,
|
|
@@ -3315,7 +3333,8 @@ function ce(e) {
|
|
|
3315
3333
|
"script",
|
|
3316
3334
|
{
|
|
3317
3335
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
3318
|
-
"data-id": e.id
|
|
3336
|
+
"data-id": e.id,
|
|
3337
|
+
nonce: e.nonce || ""
|
|
3319
3338
|
}
|
|
3320
3339
|
);
|
|
3321
3340
|
}
|
|
@@ -3414,22 +3433,22 @@ font-weight: ${r};
|
|
|
3414
3433
|
}
|
|
3415
3434
|
`, Mn = (e) => e ? "" : jn, Un = (e) => `variant-${e}`;
|
|
3416
3435
|
function Hn(e) {
|
|
3417
|
-
var
|
|
3436
|
+
var E, A, O, S, w, N, b;
|
|
3418
3437
|
const t = ee(null);
|
|
3419
3438
|
function n(h) {
|
|
3420
3439
|
var v, k;
|
|
3421
|
-
const
|
|
3440
|
+
const x = {
|
|
3422
3441
|
...e.builderContextSignal.rootState,
|
|
3423
3442
|
...h
|
|
3424
3443
|
};
|
|
3425
|
-
e.builderContextSignal.rootSetState ? (k = (v = e.builderContextSignal).rootSetState) == null || k.call(v,
|
|
3426
|
-
...
|
|
3427
|
-
rootState:
|
|
3444
|
+
e.builderContextSignal.rootSetState ? (k = (v = e.builderContextSignal).rootSetState) == null || k.call(v, x) : e.setBuilderContextSignal((I) => ({
|
|
3445
|
+
...I,
|
|
3446
|
+
rootState: x
|
|
3428
3447
|
}));
|
|
3429
3448
|
}
|
|
3430
3449
|
function i(h) {
|
|
3431
|
-
var v, k,
|
|
3432
|
-
const
|
|
3450
|
+
var v, k, I, W, j;
|
|
3451
|
+
const x = {
|
|
3433
3452
|
...e.builderContextSignal.content,
|
|
3434
3453
|
...h,
|
|
3435
3454
|
data: {
|
|
@@ -3439,12 +3458,12 @@ function Hn(e) {
|
|
|
3439
3458
|
meta: {
|
|
3440
3459
|
...(k = e.builderContextSignal.content) == null ? void 0 : k.meta,
|
|
3441
3460
|
...h == null ? void 0 : h.meta,
|
|
3442
|
-
breakpoints: ((
|
|
3461
|
+
breakpoints: ((I = h == null ? void 0 : h.meta) == null ? void 0 : I.breakpoints) || ((j = (W = e.builderContextSignal.content) == null ? void 0 : W.meta) == null ? void 0 : j.breakpoints)
|
|
3443
3462
|
}
|
|
3444
3463
|
};
|
|
3445
3464
|
e.setBuilderContextSignal((F) => ({
|
|
3446
3465
|
...F,
|
|
3447
|
-
content:
|
|
3466
|
+
content: x
|
|
3448
3467
|
}));
|
|
3449
3468
|
}
|
|
3450
3469
|
function o() {
|
|
@@ -3453,7 +3472,7 @@ function Hn(e) {
|
|
|
3453
3472
|
"aria-hidden": !0
|
|
3454
3473
|
};
|
|
3455
3474
|
}
|
|
3456
|
-
const [l, a] =
|
|
3475
|
+
const [l, a] = T(
|
|
3457
3476
|
() => e.contentWrapper || "div"
|
|
3458
3477
|
);
|
|
3459
3478
|
function r(h) {
|
|
@@ -3461,27 +3480,27 @@ function Hn(e) {
|
|
|
3461
3480
|
model: e.model,
|
|
3462
3481
|
trustedHosts: e.trustedHosts,
|
|
3463
3482
|
callbacks: {
|
|
3464
|
-
configureSdk: (
|
|
3465
|
-
var
|
|
3466
|
-
const { breakpoints: v, contentId: k } =
|
|
3467
|
-
!k || k !== ((
|
|
3483
|
+
configureSdk: (x) => {
|
|
3484
|
+
var I;
|
|
3485
|
+
const { breakpoints: v, contentId: k } = x;
|
|
3486
|
+
!k || k !== ((I = e.builderContextSignal.content) == null ? void 0 : I.id) || v && i({
|
|
3468
3487
|
meta: {
|
|
3469
3488
|
breakpoints: v
|
|
3470
3489
|
}
|
|
3471
3490
|
});
|
|
3472
3491
|
},
|
|
3473
|
-
animation: (
|
|
3474
|
-
Ne(
|
|
3492
|
+
animation: (x) => {
|
|
3493
|
+
Ne(x);
|
|
3475
3494
|
},
|
|
3476
|
-
contentUpdate: (
|
|
3477
|
-
i(
|
|
3495
|
+
contentUpdate: (x) => {
|
|
3496
|
+
i(x);
|
|
3478
3497
|
}
|
|
3479
3498
|
}
|
|
3480
3499
|
})(h);
|
|
3481
3500
|
}
|
|
3482
3501
|
function c() {
|
|
3483
|
-
var
|
|
3484
|
-
const h = (v = (
|
|
3502
|
+
var x, v;
|
|
3503
|
+
const h = (v = (x = e.builderContextSignal.content) == null ? void 0 : x.data) == null ? void 0 : v.jsCode;
|
|
3485
3504
|
h && q({
|
|
3486
3505
|
code: h,
|
|
3487
3506
|
context: e.context || {},
|
|
@@ -3494,30 +3513,30 @@ function Hn(e) {
|
|
|
3494
3513
|
enableCache: !1
|
|
3495
3514
|
});
|
|
3496
3515
|
}
|
|
3497
|
-
const [u, f] =
|
|
3498
|
-
function
|
|
3499
|
-
var
|
|
3516
|
+
const [u, f] = T(() => ({})), [d, m] = T(() => ({})), [g, y] = T(() => !1);
|
|
3517
|
+
function C(h) {
|
|
3518
|
+
var x, v;
|
|
3500
3519
|
if (e.builderContextSignal.content) {
|
|
3501
|
-
const k = (
|
|
3520
|
+
const k = (x = e.builderContextSignal.content) == null ? void 0 : x.testVariationId, I = (v = e.builderContextSignal.content) == null ? void 0 : v.id;
|
|
3502
3521
|
he({
|
|
3503
3522
|
type: "click",
|
|
3504
3523
|
canTrack: Q(e.canTrack),
|
|
3505
|
-
contentId:
|
|
3524
|
+
contentId: I,
|
|
3506
3525
|
apiKey: e.apiKey,
|
|
3507
|
-
variationId: k !==
|
|
3526
|
+
variationId: k !== I ? k : void 0,
|
|
3508
3527
|
...$n(h),
|
|
3509
3528
|
unique: !g
|
|
3510
3529
|
});
|
|
3511
3530
|
}
|
|
3512
|
-
g ||
|
|
3531
|
+
g || y(!0);
|
|
3513
3532
|
}
|
|
3514
|
-
function
|
|
3515
|
-
var
|
|
3516
|
-
const h = (k = (v = (
|
|
3517
|
-
Object.entries(h).forEach(([
|
|
3518
|
-
if (!W || d[
|
|
3533
|
+
function p() {
|
|
3534
|
+
var x, v, k;
|
|
3535
|
+
const h = (k = (v = (x = e.builderContextSignal.content) == null ? void 0 : x.data) == null ? void 0 : v.httpRequests) != null ? k : {};
|
|
3536
|
+
Object.entries(h).forEach(([I, W]) => {
|
|
3537
|
+
if (!W || d[I] || u[I] && !$())
|
|
3519
3538
|
return;
|
|
3520
|
-
d[
|
|
3539
|
+
d[I] = !0;
|
|
3521
3540
|
const j = W.replace(
|
|
3522
3541
|
/{{([^}]+)}}/g,
|
|
3523
3542
|
(F, Ue) => String(
|
|
@@ -3533,16 +3552,16 @@ function Hn(e) {
|
|
|
3533
3552
|
);
|
|
3534
3553
|
Ge(j).then((F) => F.json()).then((F) => {
|
|
3535
3554
|
n({
|
|
3536
|
-
[
|
|
3537
|
-
}), u[
|
|
3555
|
+
[I]: F
|
|
3556
|
+
}), u[I] = !0;
|
|
3538
3557
|
}).catch((F) => {
|
|
3539
3558
|
console.error("error fetching dynamic data", W, F);
|
|
3540
3559
|
}).finally(() => {
|
|
3541
|
-
d[
|
|
3560
|
+
d[I] = !1;
|
|
3542
3561
|
});
|
|
3543
3562
|
});
|
|
3544
3563
|
}
|
|
3545
|
-
function
|
|
3564
|
+
function B() {
|
|
3546
3565
|
$() && window.dispatchEvent(
|
|
3547
3566
|
new CustomEvent(
|
|
3548
3567
|
"builder:component:stateChange",
|
|
@@ -3557,8 +3576,8 @@ function Hn(e) {
|
|
|
3557
3576
|
)
|
|
3558
3577
|
);
|
|
3559
3578
|
}
|
|
3560
|
-
return
|
|
3561
|
-
var h,
|
|
3579
|
+
return V(() => {
|
|
3580
|
+
var h, x;
|
|
3562
3581
|
if (G()) {
|
|
3563
3582
|
if ($() && (window.addEventListener("message", r), Ke(), ze({
|
|
3564
3583
|
...e.locale ? {
|
|
@@ -3574,26 +3593,26 @@ function Hn(e) {
|
|
|
3574
3593
|
e.builderContextSignal.componentInfos
|
|
3575
3594
|
).forEach((k) => {
|
|
3576
3595
|
var W;
|
|
3577
|
-
const
|
|
3578
|
-
(W = window.parent) == null || W.postMessage(
|
|
3596
|
+
const I = _e(k);
|
|
3597
|
+
(W = window.parent) == null || W.postMessage(I, "*");
|
|
3579
3598
|
}), window.addEventListener(
|
|
3580
3599
|
"builder:component:stateChangeListenerActivated",
|
|
3581
|
-
|
|
3600
|
+
B
|
|
3582
3601
|
)), e.builderContextSignal.content && Q(e.canTrack)) {
|
|
3583
|
-
const k = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId,
|
|
3602
|
+
const k = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, I = (x = e.builderContextSignal.content) == null ? void 0 : x.id, W = e.apiKey;
|
|
3584
3603
|
he({
|
|
3585
3604
|
type: "impression",
|
|
3586
3605
|
canTrack: !0,
|
|
3587
|
-
contentId:
|
|
3606
|
+
contentId: I,
|
|
3588
3607
|
apiKey: W,
|
|
3589
|
-
variationId: k !==
|
|
3608
|
+
variationId: k !== I ? k : void 0
|
|
3590
3609
|
});
|
|
3591
3610
|
}
|
|
3592
3611
|
if (Je() && !$()) {
|
|
3593
|
-
const k = new URL(location.href).searchParams,
|
|
3594
|
-
`builder.overrides.${
|
|
3612
|
+
const k = new URL(location.href).searchParams, I = k.get("builder.preview"), W = k.get(
|
|
3613
|
+
`builder.overrides.${I}`
|
|
3595
3614
|
), j = k.get("apiKey") || k.get("builder.space");
|
|
3596
|
-
|
|
3615
|
+
I === e.model && j === e.apiKey && (!e.content || W === e.content.id) && Ie({
|
|
3597
3616
|
model: e.model,
|
|
3598
3617
|
apiKey: e.apiKey,
|
|
3599
3618
|
apiVersion: e.builderContextSignal.apiVersion
|
|
@@ -3602,34 +3621,34 @@ function Hn(e) {
|
|
|
3602
3621
|
});
|
|
3603
3622
|
}
|
|
3604
3623
|
}
|
|
3605
|
-
}, []),
|
|
3624
|
+
}, []), V(() => {
|
|
3606
3625
|
e.apiKey || Z.error(
|
|
3607
3626
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
3608
|
-
), c(),
|
|
3609
|
-
}, []),
|
|
3627
|
+
), c(), p(), B();
|
|
3628
|
+
}, []), V(() => {
|
|
3610
3629
|
e.content && i(e.content);
|
|
3611
|
-
}, [e.content]),
|
|
3630
|
+
}, [e.content]), V(() => {
|
|
3612
3631
|
c();
|
|
3613
|
-
}, [(A = (
|
|
3614
|
-
|
|
3615
|
-
}, [(S = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : S.httpRequests]),
|
|
3616
|
-
|
|
3617
|
-
}, [e.builderContextSignal.rootState]),
|
|
3632
|
+
}, [(A = (E = e.builderContextSignal.content) == null ? void 0 : E.data) == null ? void 0 : A.jsCode]), V(() => {
|
|
3633
|
+
p();
|
|
3634
|
+
}, [(S = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : S.httpRequests]), V(() => {
|
|
3635
|
+
B();
|
|
3636
|
+
}, [e.builderContextSignal.rootState]), V(() => {
|
|
3618
3637
|
e.data && n(e.data);
|
|
3619
|
-
}, [e.data]),
|
|
3638
|
+
}, [e.data]), V(() => {
|
|
3620
3639
|
e.locale && n({
|
|
3621
3640
|
locale: e.locale
|
|
3622
3641
|
});
|
|
3623
|
-
}, [e.locale]),
|
|
3642
|
+
}, [e.locale]), V(() => () => {
|
|
3624
3643
|
G() && (window.removeEventListener("message", r), window.removeEventListener(
|
|
3625
3644
|
"builder:component:stateChangeListenerActivated",
|
|
3626
|
-
|
|
3645
|
+
B
|
|
3627
3646
|
));
|
|
3628
3647
|
}, []), /* @__PURE__ */ s(me.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ s(
|
|
3629
3648
|
l,
|
|
3630
3649
|
{
|
|
3631
3650
|
ref: t,
|
|
3632
|
-
onClick: (h) =>
|
|
3651
|
+
onClick: (h) => C(h),
|
|
3633
3652
|
"builder-content-id": (w = e.builderContextSignal.content) == null ? void 0 : w.id,
|
|
3634
3653
|
"builder-model": e.model,
|
|
3635
3654
|
...o(),
|
|
@@ -3642,7 +3661,7 @@ function Hn(e) {
|
|
|
3642
3661
|
) : null });
|
|
3643
3662
|
}
|
|
3644
3663
|
function qn(e) {
|
|
3645
|
-
const [t, n] =
|
|
3664
|
+
const [t, n] = T(
|
|
3646
3665
|
() => `
|
|
3647
3666
|
${On({
|
|
3648
3667
|
cssCode: e.cssCode,
|
|
@@ -3654,7 +3673,14 @@ ${Ln({
|
|
|
3654
3673
|
${Mn(e.isNestedRender)}
|
|
3655
3674
|
`.trim()
|
|
3656
3675
|
);
|
|
3657
|
-
return /* @__PURE__ */ s(
|
|
3676
|
+
return /* @__PURE__ */ s(
|
|
3677
|
+
ne,
|
|
3678
|
+
{
|
|
3679
|
+
id: "builderio-content",
|
|
3680
|
+
styles: t,
|
|
3681
|
+
nonce: e.nonce
|
|
3682
|
+
}
|
|
3683
|
+
);
|
|
3658
3684
|
}
|
|
3659
3685
|
const Kn = ({
|
|
3660
3686
|
content: e,
|
|
@@ -3685,68 +3711,75 @@ const Kn = ({
|
|
|
3685
3711
|
meta: e == null ? void 0 : e.meta
|
|
3686
3712
|
} : void 0;
|
|
3687
3713
|
function Te(e) {
|
|
3688
|
-
var c, u, f, d, m, g,
|
|
3689
|
-
const [t, n] =
|
|
3714
|
+
var c, u, f, d, m, g, y;
|
|
3715
|
+
const [t, n] = T(
|
|
3690
3716
|
() => {
|
|
3691
|
-
var
|
|
3717
|
+
var C, p;
|
|
3692
3718
|
return Nn({
|
|
3693
3719
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3694
|
-
variationId: (
|
|
3720
|
+
variationId: (C = e.content) == null ? void 0 : C.testVariationId,
|
|
3695
3721
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3696
|
-
contentId: (
|
|
3722
|
+
contentId: (p = e.content) == null ? void 0 : p.id
|
|
3697
3723
|
});
|
|
3698
3724
|
}
|
|
3699
3725
|
);
|
|
3700
|
-
function i(
|
|
3701
|
-
r((
|
|
3702
|
-
...
|
|
3703
|
-
rootState:
|
|
3726
|
+
function i(C) {
|
|
3727
|
+
r((p) => ({
|
|
3728
|
+
...p,
|
|
3729
|
+
rootState: C
|
|
3704
3730
|
}));
|
|
3705
3731
|
}
|
|
3706
|
-
const [o, l] =
|
|
3707
|
-
() =>
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3732
|
+
const [o, l] = T(
|
|
3733
|
+
() => {
|
|
3734
|
+
var C;
|
|
3735
|
+
return [
|
|
3736
|
+
...Se(),
|
|
3737
|
+
...((C = e.customComponents) == null ? void 0 : C.filter(({ models: p }) => !(p != null && p.length) || !e.model ? !0 : p.includes(e.model))) || []
|
|
3738
|
+
].reduce(
|
|
3739
|
+
(p, { component: B, ...E }) => ({
|
|
3740
|
+
...p,
|
|
3741
|
+
[E.name]: {
|
|
3742
|
+
component: B,
|
|
3743
|
+
...ge(E)
|
|
3744
|
+
}
|
|
3745
|
+
}),
|
|
3746
|
+
{}
|
|
3747
|
+
);
|
|
3748
|
+
}
|
|
3749
|
+
), [a, r] = T(() => {
|
|
3750
|
+
var C;
|
|
3751
|
+
return {
|
|
3752
|
+
content: zn({
|
|
3753
|
+
content: e.content,
|
|
3754
|
+
data: e.data
|
|
3717
3755
|
}),
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
data: e.data
|
|
3724
|
-
}),
|
|
3725
|
-
localState: void 0,
|
|
3726
|
-
rootState: Kn({
|
|
3727
|
-
content: e.content,
|
|
3728
|
-
data: e.data,
|
|
3729
|
-
locale: e.locale
|
|
3730
|
-
}),
|
|
3731
|
-
rootSetState: i,
|
|
3732
|
-
context: e.context || {},
|
|
3733
|
-
canTrack: e.canTrack,
|
|
3734
|
-
apiKey: e.apiKey,
|
|
3735
|
-
apiVersion: e.apiVersion,
|
|
3736
|
-
componentInfos: [
|
|
3737
|
-
...Se(),
|
|
3738
|
-
...e.customComponents || []
|
|
3739
|
-
].reduce(
|
|
3740
|
-
(I, { component: x, ...E }) => ({
|
|
3741
|
-
...I,
|
|
3742
|
-
[E.name]: ge(E)
|
|
3756
|
+
localState: void 0,
|
|
3757
|
+
rootState: Kn({
|
|
3758
|
+
content: e.content,
|
|
3759
|
+
data: e.data,
|
|
3760
|
+
locale: e.locale
|
|
3743
3761
|
}),
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3762
|
+
rootSetState: i,
|
|
3763
|
+
context: e.context || {},
|
|
3764
|
+
canTrack: e.canTrack,
|
|
3765
|
+
apiKey: e.apiKey,
|
|
3766
|
+
apiVersion: e.apiVersion,
|
|
3767
|
+
componentInfos: [
|
|
3768
|
+
...Se(),
|
|
3769
|
+
...((C = e.customComponents) == null ? void 0 : C.filter(({ models: p }) => !(p != null && p.length) || !e.model ? !0 : p.includes(e.model))) || []
|
|
3770
|
+
].reduce(
|
|
3771
|
+
(p, { component: B, ...E }) => ({
|
|
3772
|
+
...p,
|
|
3773
|
+
[E.name]: ge(E)
|
|
3774
|
+
}),
|
|
3775
|
+
{}
|
|
3776
|
+
),
|
|
3777
|
+
inheritedStyles: {},
|
|
3778
|
+
BlocksWrapper: e.blocksWrapper || "div",
|
|
3779
|
+
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
3780
|
+
nonce: e.nonce || ""
|
|
3781
|
+
};
|
|
3782
|
+
});
|
|
3750
3783
|
return /* @__PURE__ */ s(
|
|
3751
3784
|
Be.Provider,
|
|
3752
3785
|
{
|
|
@@ -3756,6 +3789,7 @@ function Te(e) {
|
|
|
3756
3789
|
children: /* @__PURE__ */ P(
|
|
3757
3790
|
Hn,
|
|
3758
3791
|
{
|
|
3792
|
+
nonce: e.nonce,
|
|
3759
3793
|
content: e.content,
|
|
3760
3794
|
data: e.data,
|
|
3761
3795
|
model: e.model,
|
|
@@ -3775,12 +3809,14 @@ function Te(e) {
|
|
|
3775
3809
|
ce,
|
|
3776
3810
|
{
|
|
3777
3811
|
id: "builderio-variant-visibility",
|
|
3778
|
-
scriptStr: t
|
|
3812
|
+
scriptStr: t,
|
|
3813
|
+
nonce: e.nonce || ""
|
|
3779
3814
|
}
|
|
3780
3815
|
) : null,
|
|
3781
3816
|
/* @__PURE__ */ s(
|
|
3782
3817
|
qn,
|
|
3783
3818
|
{
|
|
3819
|
+
nonce: e.nonce || "",
|
|
3784
3820
|
isNestedRender: e.isNestedRender,
|
|
3785
3821
|
contentId: (c = a.content) == null ? void 0 : c.id,
|
|
3786
3822
|
cssCode: (f = (u = a.content) == null ? void 0 : u.data) == null ? void 0 : f.cssCode,
|
|
@@ -3790,7 +3826,7 @@ function Te(e) {
|
|
|
3790
3826
|
/* @__PURE__ */ s(
|
|
3791
3827
|
D,
|
|
3792
3828
|
{
|
|
3793
|
-
blocks: (
|
|
3829
|
+
blocks: (y = (g = a.content) == null ? void 0 : g.data) == null ? void 0 : y.blocks,
|
|
3794
3830
|
context: a,
|
|
3795
3831
|
registeredComponents: o,
|
|
3796
3832
|
linkComponent: e.linkComponent
|
|
@@ -3804,7 +3840,7 @@ function Te(e) {
|
|
|
3804
3840
|
}
|
|
3805
3841
|
function _n(e) {
|
|
3806
3842
|
var a;
|
|
3807
|
-
const [t, n] =
|
|
3843
|
+
const [t, n] = T(
|
|
3808
3844
|
() => Bn({
|
|
3809
3845
|
canTrack: Q(e.canTrack),
|
|
3810
3846
|
content: e.content
|
|
@@ -3833,14 +3869,14 @@ function _n(e) {
|
|
|
3833
3869
|
canTrack: Q(e.canTrack)
|
|
3834
3870
|
});
|
|
3835
3871
|
}
|
|
3836
|
-
return
|
|
3837
|
-
}, []),
|
|
3838
|
-
}), /* @__PURE__ */ P(R, { children: [
|
|
3872
|
+
return V(() => {
|
|
3873
|
+
}, []), /* @__PURE__ */ P(R, { children: [
|
|
3839
3874
|
!e.isNestedRender && K !== "reactNative" ? /* @__PURE__ */ s(
|
|
3840
3875
|
ce,
|
|
3841
3876
|
{
|
|
3842
3877
|
id: "builderio-init-variants-fns",
|
|
3843
|
-
scriptStr: Vn()
|
|
3878
|
+
scriptStr: Vn(),
|
|
3879
|
+
nonce: e.nonce || ""
|
|
3844
3880
|
}
|
|
3845
3881
|
) : null,
|
|
3846
3882
|
t ? /* @__PURE__ */ P(R, { children: [
|
|
@@ -3848,20 +3884,23 @@ function _n(e) {
|
|
|
3848
3884
|
ne,
|
|
3849
3885
|
{
|
|
3850
3886
|
id: "builderio-variants",
|
|
3851
|
-
styles: o()
|
|
3887
|
+
styles: o(),
|
|
3888
|
+
nonce: e.nonce || ""
|
|
3852
3889
|
}
|
|
3853
3890
|
),
|
|
3854
3891
|
/* @__PURE__ */ s(
|
|
3855
3892
|
ce,
|
|
3856
3893
|
{
|
|
3857
3894
|
id: "builderio-variants-visibility",
|
|
3858
|
-
scriptStr: i()
|
|
3895
|
+
scriptStr: i(),
|
|
3896
|
+
nonce: e.nonce || ""
|
|
3859
3897
|
}
|
|
3860
3898
|
),
|
|
3861
3899
|
(a = J(e.content)) == null ? void 0 : a.map((r) => /* @__PURE__ */ s(
|
|
3862
3900
|
Te,
|
|
3863
3901
|
{
|
|
3864
3902
|
isNestedRender: e.isNestedRender,
|
|
3903
|
+
nonce: e.nonce,
|
|
3865
3904
|
content: r,
|
|
3866
3905
|
showContent: !1,
|
|
3867
3906
|
model: e.model,
|
|
@@ -3887,6 +3926,7 @@ function _n(e) {
|
|
|
3887
3926
|
/* @__PURE__ */ s(
|
|
3888
3927
|
Te,
|
|
3889
3928
|
{
|
|
3929
|
+
nonce: e.nonce,
|
|
3890
3930
|
isNestedRender: e.isNestedRender,
|
|
3891
3931
|
content: l(),
|
|
3892
3932
|
showContent: !0,
|
|
@@ -3946,7 +3986,7 @@ function Yn(e) {
|
|
|
3946
3986
|
(m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
3947
3987
|
].filter(Boolean).join(" ");
|
|
3948
3988
|
}
|
|
3949
|
-
const [o, l] =
|
|
3989
|
+
const [o, l] = T(() => {
|
|
3950
3990
|
var d;
|
|
3951
3991
|
return (d = e.symbol) == null ? void 0 : d.content;
|
|
3952
3992
|
});
|
|
@@ -3958,12 +3998,13 @@ function Yn(e) {
|
|
|
3958
3998
|
d && l(d);
|
|
3959
3999
|
});
|
|
3960
4000
|
}
|
|
3961
|
-
return
|
|
3962
|
-
}, []),
|
|
4001
|
+
return V(() => {
|
|
4002
|
+
}, []), V(() => {
|
|
3963
4003
|
a();
|
|
3964
4004
|
}, [e.symbol]), /* @__PURE__ */ s("div", { ...e.attributes, className: i(), children: /* @__PURE__ */ s(
|
|
3965
4005
|
_n,
|
|
3966
4006
|
{
|
|
4007
|
+
nonce: e.builderContext.nonce,
|
|
3967
4008
|
isNestedRender: !0,
|
|
3968
4009
|
apiVersion: e.builderContext.apiVersion,
|
|
3969
4010
|
apiKey: e.builderContext.apiKey,
|