@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,8 +3,8 @@ var qe = Object.defineProperty;
|
|
|
3
3
|
var Ke = (e, t, n) => t in e ? qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
4
|
var ie = (e, t, n) => (Ke(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 z, isEditing as $, isBrowser as M, getUserAttributes as ze, checkIsDefined as G, logger as Z, fastClone as de, registerInsertMenu as _e, setupBrowserForEditing as Je, createRegisterComponentMessage as Ye, getDefaultCanTrack as Q, _track as he, isPreviewing as Ge, fetchOneEntry as we, createEditorListener as Qe, fetch as Xe, serializeComponentInfo as ge, handleABTestingSync as Ze } from "./server-entry-
|
|
7
|
-
import { createContext as Re, useState as
|
|
6
|
+
import { TARGET as z, isEditing as $, isBrowser as M, getUserAttributes as ze, checkIsDefined as G, logger as Z, fastClone as de, registerInsertMenu as _e, setupBrowserForEditing as Je, createRegisterComponentMessage as Ye, getDefaultCanTrack as Q, _track as he, isPreviewing as Ge, fetchOneEntry as we, createEditorListener as Qe, fetch as Xe, serializeComponentInfo as ge, handleABTestingSync as Ze } from "./server-entry-825b4408.js";
|
|
7
|
+
import { createContext as Re, useState as T, useEffect as V, useContext as be, useRef as ee, createElement as Ee } from "react";
|
|
8
8
|
const et = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), tt = (e) => typeof e == "string" && et.has(e.toLowerCase());
|
|
9
9
|
function ue(e) {
|
|
10
10
|
return /* @__PURE__ */ s(R, { children: tt(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 }) }) });
|
|
@@ -59,7 +59,8 @@ const me = Re({
|
|
|
59
59
|
componentInfos: {},
|
|
60
60
|
inheritedStyles: {},
|
|
61
61
|
BlocksWrapper: "div",
|
|
62
|
-
BlocksWrapperProps: {}
|
|
62
|
+
BlocksWrapperProps: {},
|
|
63
|
+
nonce: ""
|
|
63
64
|
}), Be = Re({ registeredComponents: {} });
|
|
64
65
|
function it(e) {
|
|
65
66
|
var t;
|
|
@@ -343,8 +344,8 @@ function ht(e) {
|
|
|
343
344
|
leading: !1
|
|
344
345
|
});
|
|
345
346
|
function l(f) {
|
|
346
|
-
const d = f.getBoundingClientRect(), m = window.innerHeight,
|
|
347
|
-
return d.bottom >
|
|
347
|
+
const d = f.getBoundingClientRect(), m = window.innerHeight, y = (e.thresholdPercent || 0) / 100 * m;
|
|
348
|
+
return d.bottom > y && d.top < m - y;
|
|
348
349
|
}
|
|
349
350
|
const c = e.steps[0].styles;
|
|
350
351
|
function u() {
|
|
@@ -525,7 +526,8 @@ function ne(e) {
|
|
|
525
526
|
"style",
|
|
526
527
|
{
|
|
527
528
|
dangerouslySetInnerHTML: { __html: e.styles },
|
|
528
|
-
"data-id": e.id
|
|
529
|
+
"data-id": e.id,
|
|
530
|
+
nonce: e.nonce
|
|
529
531
|
}
|
|
530
532
|
);
|
|
531
533
|
}
|
|
@@ -542,7 +544,7 @@ function Tt(e) {
|
|
|
542
544
|
return G(i.hide) ? !i.hide : G(i.show) ? i.show : !0;
|
|
543
545
|
}
|
|
544
546
|
function n() {
|
|
545
|
-
var
|
|
547
|
+
var p, B, E;
|
|
546
548
|
const i = X({
|
|
547
549
|
block: e.block,
|
|
548
550
|
localState: e.context.localState,
|
|
@@ -551,7 +553,7 @@ function Tt(e) {
|
|
|
551
553
|
context: e.context.context,
|
|
552
554
|
shouldEvaluateBindings: !0
|
|
553
555
|
}), o = i.responsiveStyles, r = e.context.content, a = Le(
|
|
554
|
-
((
|
|
556
|
+
((p = r == null ? void 0 : r.meta) == null ? void 0 : p.breakpoints) || {}
|
|
555
557
|
), l = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, u = o == null ? void 0 : o.small, f = i.id;
|
|
556
558
|
if (!f)
|
|
557
559
|
return "";
|
|
@@ -572,18 +574,18 @@ function Tt(e) {
|
|
|
572
574
|
"small",
|
|
573
575
|
a
|
|
574
576
|
)
|
|
575
|
-
}) : "",
|
|
576
|
-
let
|
|
577
|
-
if (
|
|
578
|
-
const A = ((
|
|
579
|
-
|
|
577
|
+
}) : "", y = i.animations && i.animations.find((A) => A.trigger === "hover");
|
|
578
|
+
let C = "";
|
|
579
|
+
if (y) {
|
|
580
|
+
const A = ((E = (B = y.steps) == null ? void 0 : B[1]) == null ? void 0 : E.styles) || {};
|
|
581
|
+
C = J({
|
|
580
582
|
className: `${f}:hover`,
|
|
581
583
|
styles: {
|
|
582
584
|
...A,
|
|
583
|
-
transition: `all ${
|
|
584
|
-
|
|
585
|
+
transition: `all ${y.duration}s ${te(
|
|
586
|
+
y.easing
|
|
585
587
|
)}`,
|
|
586
|
-
transitionDelay:
|
|
588
|
+
transitionDelay: y.delay ? `${y.delay}s` : "0s"
|
|
587
589
|
}
|
|
588
590
|
}) || "";
|
|
589
591
|
}
|
|
@@ -591,10 +593,17 @@ function Tt(e) {
|
|
|
591
593
|
d,
|
|
592
594
|
m,
|
|
593
595
|
g,
|
|
594
|
-
|
|
596
|
+
C
|
|
595
597
|
].join(" ");
|
|
596
598
|
}
|
|
597
|
-
return /* @__PURE__ */ s(R, { children: n() && t() ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
599
|
+
return /* @__PURE__ */ s(R, { children: n() && t() ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
600
|
+
ne,
|
|
601
|
+
{
|
|
602
|
+
id: "builderio-block",
|
|
603
|
+
styles: n(),
|
|
604
|
+
nonce: e.context.nonce
|
|
605
|
+
}
|
|
606
|
+
) }) : null });
|
|
598
607
|
}
|
|
599
608
|
function It(e) {
|
|
600
609
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
@@ -730,7 +739,7 @@ const At = ({
|
|
|
730
739
|
};
|
|
731
740
|
function xe(e) {
|
|
732
741
|
var i;
|
|
733
|
-
const [t, n] =
|
|
742
|
+
const [t, n] = T(
|
|
734
743
|
() => e.isInteractive ? Vt : e.componentRef
|
|
735
744
|
);
|
|
736
745
|
return /* @__PURE__ */ s(R, { children: e.componentRef ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
@@ -760,7 +769,7 @@ function xe(e) {
|
|
|
760
769
|
) }) : null });
|
|
761
770
|
}
|
|
762
771
|
function Nt(e) {
|
|
763
|
-
const [t, n] =
|
|
772
|
+
const [t, n] = T(() => e.repeatContext);
|
|
764
773
|
return /* @__PURE__ */ s(me.Provider, { value: t, children: /* @__PURE__ */ s(
|
|
765
774
|
_,
|
|
766
775
|
{
|
|
@@ -802,9 +811,9 @@ function _(e) {
|
|
|
802
811
|
return e.block.tagName === "a" || ((m = i().properties) == null ? void 0 : m.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
803
812
|
}
|
|
804
813
|
function r() {
|
|
805
|
-
var g,
|
|
814
|
+
var g, y;
|
|
806
815
|
if ((g = e.block.repeat) != null && g.collection)
|
|
807
|
-
return !!((
|
|
816
|
+
return !!((y = n == null ? void 0 : n()) != null && y.length);
|
|
808
817
|
const d = "hide" in i() ? i().hide : !1;
|
|
809
818
|
return ("show" in i() ? i().show : !0) && !d;
|
|
810
819
|
}
|
|
@@ -813,7 +822,7 @@ function _(e) {
|
|
|
813
822
|
return !((m = t == null ? void 0 : t()) != null && m.component) && !n() ? (g = i().children) != null ? g : [] : [];
|
|
814
823
|
}
|
|
815
824
|
function l() {
|
|
816
|
-
var d, m, g,
|
|
825
|
+
var d, m, g, y;
|
|
817
826
|
return {
|
|
818
827
|
blockChildren: (d = i().children) != null ? d : [],
|
|
819
828
|
componentRef: (m = t == null ? void 0 : t()) == null ? void 0 : m.component,
|
|
@@ -832,10 +841,10 @@ function _(e) {
|
|
|
832
841
|
registeredComponents: e.registeredComponents,
|
|
833
842
|
builderBlock: i(),
|
|
834
843
|
includeBlockProps: ((g = t == null ? void 0 : t()) == null ? void 0 : g.noWrap) === !0,
|
|
835
|
-
isInteractive: !((
|
|
844
|
+
isInteractive: !((y = t == null ? void 0 : t()) != null && y.isRSC)
|
|
836
845
|
};
|
|
837
846
|
}
|
|
838
|
-
return
|
|
847
|
+
return V(() => {
|
|
839
848
|
const d = i().id, m = i().animations;
|
|
840
849
|
m && d && mt(
|
|
841
850
|
m.map((g) => ({
|
|
@@ -984,9 +993,9 @@ function D(e) {
|
|
|
984
993
|
const Ft = (e) => `builder-columns ${e}-breakpoints`;
|
|
985
994
|
function $t(e) {
|
|
986
995
|
var A, O;
|
|
987
|
-
const [t, n] =
|
|
996
|
+
const [t, n] = T(
|
|
988
997
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
989
|
-
), [i, o] =
|
|
998
|
+
), [i, o] = T(() => e.columns || []), [r, a] = T(
|
|
990
999
|
() => e.stackColumnsAt || "tablet"
|
|
991
1000
|
);
|
|
992
1001
|
function l(S) {
|
|
@@ -1012,10 +1021,10 @@ function $t(e) {
|
|
|
1012
1021
|
}) {
|
|
1013
1022
|
return r === "never" ? w : S;
|
|
1014
1023
|
}
|
|
1015
|
-
const [m, g] =
|
|
1024
|
+
const [m, g] = T(
|
|
1016
1025
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
1017
1026
|
);
|
|
1018
|
-
function
|
|
1027
|
+
function y() {
|
|
1019
1028
|
return {
|
|
1020
1029
|
"--flex-dir": m,
|
|
1021
1030
|
"--flex-dir-tablet": f({
|
|
@@ -1024,8 +1033,8 @@ function $t(e) {
|
|
|
1024
1033
|
})
|
|
1025
1034
|
};
|
|
1026
1035
|
}
|
|
1027
|
-
function
|
|
1028
|
-
const w = S === 0 ? 0 : t, N = u(S), b = `${w}px`, h = "100%",
|
|
1036
|
+
function C(S) {
|
|
1037
|
+
const w = S === 0 ? 0 : t, N = u(S), b = `${w}px`, h = "100%", x = 0;
|
|
1029
1038
|
return {
|
|
1030
1039
|
...{
|
|
1031
1040
|
display: "flex",
|
|
@@ -1039,7 +1048,7 @@ function $t(e) {
|
|
|
1039
1048
|
desktopStyle: N
|
|
1040
1049
|
}),
|
|
1041
1050
|
"--column-margin-left-mobile": d({
|
|
1042
|
-
stackedStyle:
|
|
1051
|
+
stackedStyle: x,
|
|
1043
1052
|
desktopStyle: b
|
|
1044
1053
|
}),
|
|
1045
1054
|
"--column-width-tablet": f({
|
|
@@ -1047,20 +1056,20 @@ function $t(e) {
|
|
|
1047
1056
|
desktopStyle: N
|
|
1048
1057
|
}),
|
|
1049
1058
|
"--column-margin-left-tablet": f({
|
|
1050
|
-
stackedStyle:
|
|
1059
|
+
stackedStyle: x,
|
|
1051
1060
|
desktopStyle: b
|
|
1052
1061
|
})
|
|
1053
1062
|
};
|
|
1054
1063
|
}
|
|
1055
|
-
function
|
|
1064
|
+
function p(S) {
|
|
1056
1065
|
var N, b;
|
|
1057
1066
|
return Le(
|
|
1058
1067
|
((b = (N = e.builderContext.content) == null ? void 0 : N.meta) == null ? void 0 : b.breakpoints) || {}
|
|
1059
1068
|
)[S].max;
|
|
1060
1069
|
}
|
|
1061
|
-
function
|
|
1070
|
+
function B() {
|
|
1062
1071
|
return `
|
|
1063
|
-
@media (max-width: ${
|
|
1072
|
+
@media (max-width: ${p("medium")}px) {
|
|
1064
1073
|
.${e.builderBlock.id}-breakpoints {
|
|
1065
1074
|
flex-direction: var(--flex-dir-tablet);
|
|
1066
1075
|
align-items: stretch;
|
|
@@ -1072,7 +1081,7 @@ function $t(e) {
|
|
|
1072
1081
|
}
|
|
1073
1082
|
}
|
|
1074
1083
|
|
|
1075
|
-
@media (max-width: ${
|
|
1084
|
+
@media (max-width: ${p("small")}px) {
|
|
1076
1085
|
.${e.builderBlock.id}-breakpoints {
|
|
1077
1086
|
flex-direction: var(--flex-dir);
|
|
1078
1087
|
align-items: stretch;
|
|
@@ -1085,29 +1094,36 @@ function $t(e) {
|
|
|
1085
1094
|
},
|
|
1086
1095
|
`;
|
|
1087
1096
|
}
|
|
1088
|
-
function
|
|
1097
|
+
function E(S, w) {
|
|
1089
1098
|
return {
|
|
1090
1099
|
...S.link ? {
|
|
1091
1100
|
href: S.link
|
|
1092
1101
|
} : {},
|
|
1093
1102
|
[q()]: "builder-column",
|
|
1094
|
-
style: $e(
|
|
1103
|
+
style: $e(C(w))
|
|
1095
1104
|
};
|
|
1096
1105
|
}
|
|
1097
1106
|
return /* @__PURE__ */ P(R, { children: [
|
|
1098
1107
|
/* @__PURE__ */ P(
|
|
1099
1108
|
"div",
|
|
1100
1109
|
{
|
|
1101
|
-
className: Ft((A = e.builderBlock) == null ? void 0 : A.id) + " div-
|
|
1102
|
-
style:
|
|
1110
|
+
className: Ft((A = e.builderBlock) == null ? void 0 : A.id) + " div-fe220f58",
|
|
1111
|
+
style: y(),
|
|
1103
1112
|
children: [
|
|
1104
|
-
/* @__PURE__ */ s(
|
|
1113
|
+
/* @__PURE__ */ s(
|
|
1114
|
+
ne,
|
|
1115
|
+
{
|
|
1116
|
+
id: "builderio-columns",
|
|
1117
|
+
styles: B(),
|
|
1118
|
+
nonce: e.builderContext.nonce
|
|
1119
|
+
}
|
|
1120
|
+
),
|
|
1105
1121
|
(O = e.columns) == null ? void 0 : O.map((S, w) => /* @__PURE__ */ s(
|
|
1106
1122
|
ue,
|
|
1107
1123
|
{
|
|
1108
1124
|
TagName: l(S),
|
|
1109
1125
|
actionAttributes: {},
|
|
1110
|
-
attributes:
|
|
1126
|
+
attributes: E(S, w),
|
|
1111
1127
|
children: /* @__PURE__ */ s(
|
|
1112
1128
|
D,
|
|
1113
1129
|
{
|
|
@@ -1128,7 +1144,7 @@ function $t(e) {
|
|
|
1128
1144
|
]
|
|
1129
1145
|
}
|
|
1130
1146
|
),
|
|
1131
|
-
/* @__PURE__ */ s("style", { children: `.div-
|
|
1147
|
+
/* @__PURE__ */ s("style", { children: `.div-fe220f58 {
|
|
1132
1148
|
display: flex;
|
|
1133
1149
|
line-height: normal;
|
|
1134
1150
|
}` })
|
|
@@ -1176,12 +1192,14 @@ function jt(e) {
|
|
|
1176
1192
|
// images, otherwise you can supply this prop manually
|
|
1177
1193
|
!(d.match(/builder\.io/) || d.match(/cdn\.shopify\.com/)))
|
|
1178
1194
|
return e.srcset;
|
|
1179
|
-
if (e.
|
|
1180
|
-
if (
|
|
1181
|
-
|
|
1182
|
-
|
|
1195
|
+
if (!e.noWebp) {
|
|
1196
|
+
if (e.srcset && ((m = e.image) != null && m.includes("builder.io/api/v1/image"))) {
|
|
1197
|
+
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1198
|
+
return console.debug("Removed given srcset"), oe(d);
|
|
1199
|
+
} else if (e.image && !e.srcset)
|
|
1200
|
+
return oe(d);
|
|
1183
1201
|
return oe(d);
|
|
1184
|
-
|
|
1202
|
+
}
|
|
1185
1203
|
}
|
|
1186
1204
|
function n() {
|
|
1187
1205
|
var f;
|
|
@@ -1213,7 +1231,7 @@ function jt(e) {
|
|
|
1213
1231
|
objectFit: e.backgroundSize || "cover",
|
|
1214
1232
|
...i()
|
|
1215
1233
|
},
|
|
1216
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
1234
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-56bbd606",
|
|
1217
1235
|
src: e.image,
|
|
1218
1236
|
srcSet: t(),
|
|
1219
1237
|
sizes: e.sizes
|
|
@@ -1223,23 +1241,23 @@ function jt(e) {
|
|
|
1223
1241
|
e.aspectRatio && !((r = (o = e.builderBlock) == null ? void 0 : o.children) != null && r.length && e.fitContent) ? /* @__PURE__ */ s(
|
|
1224
1242
|
"div",
|
|
1225
1243
|
{
|
|
1226
|
-
className: "builder-image-sizer div-
|
|
1244
|
+
className: "builder-image-sizer div-56bbd606",
|
|
1227
1245
|
style: {
|
|
1228
1246
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1229
1247
|
}
|
|
1230
1248
|
}
|
|
1231
1249
|
) : null,
|
|
1232
1250
|
(l = (a = e.builderBlock) == null ? void 0 : a.children) != null && l.length && e.fitContent ? /* @__PURE__ */ s(R, { children: e.children }) : null,
|
|
1233
|
-
!e.fitContent && ((u = (c = e.builderBlock) == null ? void 0 : c.children) != null && u.length) ? /* @__PURE__ */ s("div", { className: "div-
|
|
1251
|
+
!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
|
|
1234
1252
|
] }),
|
|
1235
|
-
/* @__PURE__ */ s("style", { children: `.img-
|
|
1253
|
+
/* @__PURE__ */ s("style", { children: `.img-56bbd606 {
|
|
1236
1254
|
opacity: 1;
|
|
1237
1255
|
transition: opacity 0.2s ease-in-out;
|
|
1238
|
-
}.div-
|
|
1256
|
+
}.div-56bbd606 {
|
|
1239
1257
|
width: 100%;
|
|
1240
1258
|
pointer-events: none;
|
|
1241
1259
|
font-size: 0;
|
|
1242
|
-
}.div-
|
|
1260
|
+
}.div-56bbd606-2 {
|
|
1243
1261
|
display: flex;
|
|
1244
1262
|
flex-direction: column;
|
|
1245
1263
|
align-items: stretch;
|
|
@@ -1399,7 +1417,7 @@ const ae = {
|
|
|
1399
1417
|
}, Se = (e) => e.toString();
|
|
1400
1418
|
function Ht(e) {
|
|
1401
1419
|
var d;
|
|
1402
|
-
const [t, n] =
|
|
1420
|
+
const [t, n] = T(() => []);
|
|
1403
1421
|
function i() {
|
|
1404
1422
|
return !!(e.grid || e.oneAtATime);
|
|
1405
1423
|
}
|
|
@@ -1425,7 +1443,7 @@ function Ht(e) {
|
|
|
1425
1443
|
cursor: "pointer"
|
|
1426
1444
|
};
|
|
1427
1445
|
return Object.fromEntries(
|
|
1428
|
-
Object.entries(g).filter(([
|
|
1446
|
+
Object.entries(g).filter(([y, C]) => C !== void 0)
|
|
1429
1447
|
);
|
|
1430
1448
|
}
|
|
1431
1449
|
function a(m) {
|
|
@@ -1437,23 +1455,23 @@ function Ht(e) {
|
|
|
1437
1455
|
function c() {
|
|
1438
1456
|
let m = null;
|
|
1439
1457
|
if (e.grid && t.length && document) {
|
|
1440
|
-
const
|
|
1441
|
-
let
|
|
1442
|
-
`.builder-accordion-title[data-index="${
|
|
1458
|
+
const y = t[0];
|
|
1459
|
+
let p = document.querySelector(
|
|
1460
|
+
`.builder-accordion-title[data-index="${y}"]`
|
|
1443
1461
|
);
|
|
1444
|
-
if (m =
|
|
1445
|
-
let
|
|
1446
|
-
for (;
|
|
1447
|
-
if (
|
|
1448
|
-
if (
|
|
1462
|
+
if (m = y, p) {
|
|
1463
|
+
let B = p.getBoundingClientRect();
|
|
1464
|
+
for (; p = p && p.nextElementSibling; )
|
|
1465
|
+
if (p) {
|
|
1466
|
+
if (p.classList.contains("builder-accordion-detail"))
|
|
1449
1467
|
continue;
|
|
1450
|
-
const
|
|
1451
|
-
if (
|
|
1468
|
+
const E = p.getBoundingClientRect();
|
|
1469
|
+
if (E.left > B.left) {
|
|
1452
1470
|
const A = parseInt(
|
|
1453
|
-
|
|
1471
|
+
p.getAttribute("data-index") || "",
|
|
1454
1472
|
10
|
|
1455
1473
|
);
|
|
1456
|
-
isNaN(A) || (
|
|
1474
|
+
isNaN(A) || (B = E, m = A);
|
|
1457
1475
|
} else
|
|
1458
1476
|
break;
|
|
1459
1477
|
}
|
|
@@ -1469,7 +1487,7 @@ function Ht(e) {
|
|
|
1469
1487
|
}
|
|
1470
1488
|
};
|
|
1471
1489
|
return Object.fromEntries(
|
|
1472
|
-
Object.entries(m).filter(([g,
|
|
1490
|
+
Object.entries(m).filter(([g, y]) => y !== void 0)
|
|
1473
1491
|
);
|
|
1474
1492
|
}
|
|
1475
1493
|
function f(m) {
|
|
@@ -1486,7 +1504,7 @@ function Ht(e) {
|
|
|
1486
1504
|
order: c() !== null ? Se(g) : Se(g + 1)
|
|
1487
1505
|
},
|
|
1488
1506
|
"data-index": g,
|
|
1489
|
-
onClick: (
|
|
1507
|
+
onClick: (y) => f(g),
|
|
1490
1508
|
children: /* @__PURE__ */ s(
|
|
1491
1509
|
D,
|
|
1492
1510
|
{
|
|
@@ -2139,7 +2157,7 @@ const Qt = {
|
|
|
2139
2157
|
};
|
|
2140
2158
|
function Zt(e) {
|
|
2141
2159
|
var r;
|
|
2142
|
-
const [t, n] =
|
|
2160
|
+
const [t, n] = T(
|
|
2143
2161
|
() => e.defaultActiveTab ? e.defaultActiveTab - 1 : 0
|
|
2144
2162
|
);
|
|
2145
2163
|
function i(a) {
|
|
@@ -2255,8 +2273,8 @@ const nn = {
|
|
|
2255
2273
|
}]
|
|
2256
2274
|
};
|
|
2257
2275
|
function on(e) {
|
|
2258
|
-
const t = ee(null), [n, i] =
|
|
2259
|
-
return
|
|
2276
|
+
const t = ee(null), [n, i] = T(() => []), [o, r] = T(() => []);
|
|
2277
|
+
return V(() => {
|
|
2260
2278
|
var l;
|
|
2261
2279
|
if (!((l = t.current) != null && l.getElementsByTagName) || typeof window == "undefined")
|
|
2262
2280
|
return;
|
|
@@ -2309,7 +2327,7 @@ const an = {
|
|
|
2309
2327
|
}]
|
|
2310
2328
|
}, rn = ["text/javascript", "application/javascript", "application/ecmascript"], ln = (e) => rn.includes(e.type);
|
|
2311
2329
|
function sn(e) {
|
|
2312
|
-
const t = ee(null), [n, i] =
|
|
2330
|
+
const t = ee(null), [n, i] = T(() => []), [o, r] = T(() => []), [a, l] = T(() => !1);
|
|
2313
2331
|
function c() {
|
|
2314
2332
|
if (!t.current || !t.current.getElementsByTagName)
|
|
2315
2333
|
return;
|
|
@@ -2328,7 +2346,7 @@ function sn(e) {
|
|
|
2328
2346
|
}
|
|
2329
2347
|
}
|
|
2330
2348
|
}
|
|
2331
|
-
return
|
|
2349
|
+
return V(() => {
|
|
2332
2350
|
t.current && !a && (l(!0), c());
|
|
2333
2351
|
}, [t.current, a]), /* @__PURE__ */ s(
|
|
2334
2352
|
"div",
|
|
@@ -2585,39 +2603,39 @@ const cn = {
|
|
|
2585
2603
|
};
|
|
2586
2604
|
function fn(e) {
|
|
2587
2605
|
var d, m;
|
|
2588
|
-
const t = ee(null), [n, i] =
|
|
2606
|
+
const t = ee(null), [n, i] = T(() => "unsubmitted"), [o, r] = T(() => null), [a, l] = T(() => "");
|
|
2589
2607
|
function c(g) {
|
|
2590
|
-
var
|
|
2591
|
-
const
|
|
2608
|
+
var C, p;
|
|
2609
|
+
const y = {
|
|
2592
2610
|
...e.builderContext.rootState,
|
|
2593
2611
|
...g
|
|
2594
2612
|
};
|
|
2595
|
-
e.builderContext.rootSetState ? (
|
|
2613
|
+
e.builderContext.rootSetState ? (p = (C = e.builderContext).rootSetState) == null || p.call(C, y) : e.builderContext.rootState = y;
|
|
2596
2614
|
}
|
|
2597
2615
|
function u() {
|
|
2598
2616
|
return $() && e.previewState || n;
|
|
2599
2617
|
}
|
|
2600
2618
|
function f(g) {
|
|
2601
|
-
var
|
|
2602
|
-
const
|
|
2619
|
+
var C;
|
|
2620
|
+
const y = e.sendWithJs || e.sendSubmissionsTo === "email";
|
|
2603
2621
|
if (e.sendSubmissionsTo === "zapier")
|
|
2604
2622
|
g.preventDefault();
|
|
2605
|
-
else if (
|
|
2623
|
+
else if (y) {
|
|
2606
2624
|
if (!(e.action || e.sendSubmissionsTo === "email")) {
|
|
2607
2625
|
g.preventDefault();
|
|
2608
2626
|
return;
|
|
2609
2627
|
}
|
|
2610
2628
|
g.preventDefault();
|
|
2611
|
-
const
|
|
2612
|
-
let
|
|
2613
|
-
const A = new FormData(
|
|
2629
|
+
const p = g.currentTarget || g.target, B = e.customHeaders || {};
|
|
2630
|
+
let E;
|
|
2631
|
+
const A = new FormData(p), O = Array.from(p.querySelectorAll("input,select,textarea")).filter((b) => !!b.name).map((b) => {
|
|
2614
2632
|
let h;
|
|
2615
|
-
const
|
|
2633
|
+
const x = b.name;
|
|
2616
2634
|
if (b instanceof HTMLInputElement)
|
|
2617
2635
|
if (b.type === "radio") {
|
|
2618
2636
|
if (b.checked)
|
|
2619
2637
|
return h = b.name, {
|
|
2620
|
-
key:
|
|
2638
|
+
key: x,
|
|
2621
2639
|
value: h
|
|
2622
2640
|
};
|
|
2623
2641
|
} else if (b.type === "checkbox")
|
|
@@ -2630,7 +2648,7 @@ function fn(e) {
|
|
|
2630
2648
|
else
|
|
2631
2649
|
h = b.value;
|
|
2632
2650
|
return {
|
|
2633
|
-
key:
|
|
2651
|
+
key: x,
|
|
2634
2652
|
value: h
|
|
2635
2653
|
};
|
|
2636
2654
|
});
|
|
@@ -2638,15 +2656,15 @@ function fn(e) {
|
|
|
2638
2656
|
if (e.sendSubmissionsTo === "email" && (S = "multipart/form-data"), Array.from(O).forEach(({ value: b }) => {
|
|
2639
2657
|
(b instanceof File || Array.isArray(b) && b[0] instanceof File || b instanceof FileList) && (S = "multipart/form-data");
|
|
2640
2658
|
}), S !== "application/json")
|
|
2641
|
-
|
|
2659
|
+
E = A;
|
|
2642
2660
|
else {
|
|
2643
2661
|
const b = {};
|
|
2644
|
-
Array.from(O).forEach(({ value: h, key:
|
|
2645
|
-
Ve(b,
|
|
2646
|
-
}),
|
|
2662
|
+
Array.from(O).forEach(({ value: h, key: x }) => {
|
|
2663
|
+
Ve(b, x, h);
|
|
2664
|
+
}), E = JSON.stringify(b);
|
|
2647
2665
|
}
|
|
2648
|
-
S && S !== "multipart/form-data" && (
|
|
2649
|
-
const w = new CustomEvent("presubmit", { detail: { body:
|
|
2666
|
+
S && S !== "multipart/form-data" && (y && ((C = e.action) != null && C.includes("zapier.com")) || (B["content-type"] = S));
|
|
2667
|
+
const w = new CustomEvent("presubmit", { detail: { body: E } });
|
|
2650
2668
|
if (t.current && (t.current.dispatchEvent(w), w.defaultPrevented))
|
|
2651
2669
|
return;
|
|
2652
2670
|
i("sending");
|
|
@@ -2655,12 +2673,12 @@ function fn(e) {
|
|
|
2655
2673
|
)}&name=${encodeURIComponent(e.name || "")}`;
|
|
2656
2674
|
fetch(
|
|
2657
2675
|
e.sendSubmissionsTo === "email" ? N : e.action,
|
|
2658
|
-
{ body:
|
|
2676
|
+
{ body: E, headers: B, method: e.method || "post" }
|
|
2659
2677
|
).then(
|
|
2660
2678
|
async (b) => {
|
|
2661
2679
|
let h;
|
|
2662
|
-
const
|
|
2663
|
-
if (
|
|
2680
|
+
const x = b.headers.get("content-type");
|
|
2681
|
+
if (x && x.indexOf("application/json") !== -1 ? h = await b.json() : h = await b.text(), !b.ok && e.errorMessagePath) {
|
|
2664
2682
|
let v = mn(h, e.errorMessagePath);
|
|
2665
2683
|
v && (typeof v != "string" && (v = JSON.stringify(v)), l(v), c({ formErrorMessage: v }));
|
|
2666
2684
|
}
|
|
@@ -2705,7 +2723,7 @@ function fn(e) {
|
|
|
2705
2723
|
onSubmit: (g) => f(g),
|
|
2706
2724
|
...e.attributes,
|
|
2707
2725
|
children: [
|
|
2708
|
-
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ s(R, { children: (m = (d = e.builderBlock) == null ? void 0 : d.children) == null ? void 0 : m.map((g,
|
|
2726
|
+
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(
|
|
2709
2727
|
_,
|
|
2710
2728
|
{
|
|
2711
2729
|
block: g,
|
|
@@ -2713,7 +2731,7 @@ function fn(e) {
|
|
|
2713
2731
|
registeredComponents: e.builderComponents,
|
|
2714
2732
|
linkComponent: e.builderLinkComponent
|
|
2715
2733
|
},
|
|
2716
|
-
`form-block-${
|
|
2734
|
+
`form-block-${y}`
|
|
2717
2735
|
)) }) : null,
|
|
2718
2736
|
u() === "error" ? /* @__PURE__ */ s(
|
|
2719
2737
|
D,
|
|
@@ -3339,7 +3357,8 @@ function ce(e) {
|
|
|
3339
3357
|
"script",
|
|
3340
3358
|
{
|
|
3341
3359
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
3342
|
-
"data-id": e.id
|
|
3360
|
+
"data-id": e.id,
|
|
3361
|
+
nonce: e.nonce || ""
|
|
3343
3362
|
}
|
|
3344
3363
|
);
|
|
3345
3364
|
}
|
|
@@ -3438,22 +3457,22 @@ font-weight: ${l};
|
|
|
3438
3457
|
}
|
|
3439
3458
|
`, Un = (e) => e ? "" : jn, Mn = (e) => `variant-${e}`;
|
|
3440
3459
|
function Hn(e) {
|
|
3441
|
-
var
|
|
3460
|
+
var E, A, O, S, w, N, b;
|
|
3442
3461
|
const t = ee(null);
|
|
3443
3462
|
function n(h) {
|
|
3444
3463
|
var v, k;
|
|
3445
|
-
const
|
|
3464
|
+
const x = {
|
|
3446
3465
|
...e.builderContextSignal.rootState,
|
|
3447
3466
|
...h
|
|
3448
3467
|
};
|
|
3449
|
-
e.builderContextSignal.rootSetState ? (k = (v = e.builderContextSignal).rootSetState) == null || k.call(v,
|
|
3450
|
-
...
|
|
3451
|
-
rootState:
|
|
3468
|
+
e.builderContextSignal.rootSetState ? (k = (v = e.builderContextSignal).rootSetState) == null || k.call(v, x) : e.setBuilderContextSignal((I) => ({
|
|
3469
|
+
...I,
|
|
3470
|
+
rootState: x
|
|
3452
3471
|
}));
|
|
3453
3472
|
}
|
|
3454
3473
|
function i(h) {
|
|
3455
|
-
var v, k,
|
|
3456
|
-
const
|
|
3474
|
+
var v, k, I, W, j;
|
|
3475
|
+
const x = {
|
|
3457
3476
|
...e.builderContextSignal.content,
|
|
3458
3477
|
...h,
|
|
3459
3478
|
data: {
|
|
@@ -3463,12 +3482,12 @@ function Hn(e) {
|
|
|
3463
3482
|
meta: {
|
|
3464
3483
|
...(k = e.builderContextSignal.content) == null ? void 0 : k.meta,
|
|
3465
3484
|
...h == null ? void 0 : h.meta,
|
|
3466
|
-
breakpoints: ((
|
|
3485
|
+
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)
|
|
3467
3486
|
}
|
|
3468
3487
|
};
|
|
3469
3488
|
e.setBuilderContextSignal((F) => ({
|
|
3470
3489
|
...F,
|
|
3471
|
-
content:
|
|
3490
|
+
content: x
|
|
3472
3491
|
}));
|
|
3473
3492
|
}
|
|
3474
3493
|
function o() {
|
|
@@ -3477,7 +3496,7 @@ function Hn(e) {
|
|
|
3477
3496
|
"aria-hidden": !0
|
|
3478
3497
|
};
|
|
3479
3498
|
}
|
|
3480
|
-
const [r, a] =
|
|
3499
|
+
const [r, a] = T(
|
|
3481
3500
|
() => e.contentWrapper || "div"
|
|
3482
3501
|
);
|
|
3483
3502
|
function l(h) {
|
|
@@ -3485,27 +3504,27 @@ function Hn(e) {
|
|
|
3485
3504
|
model: e.model,
|
|
3486
3505
|
trustedHosts: e.trustedHosts,
|
|
3487
3506
|
callbacks: {
|
|
3488
|
-
configureSdk: (
|
|
3489
|
-
var
|
|
3490
|
-
const { breakpoints: v, contentId: k } =
|
|
3491
|
-
!k || k !== ((
|
|
3507
|
+
configureSdk: (x) => {
|
|
3508
|
+
var I;
|
|
3509
|
+
const { breakpoints: v, contentId: k } = x;
|
|
3510
|
+
!k || k !== ((I = e.builderContextSignal.content) == null ? void 0 : I.id) || v && i({
|
|
3492
3511
|
meta: {
|
|
3493
3512
|
breakpoints: v
|
|
3494
3513
|
}
|
|
3495
3514
|
});
|
|
3496
3515
|
},
|
|
3497
|
-
animation: (
|
|
3498
|
-
We(
|
|
3516
|
+
animation: (x) => {
|
|
3517
|
+
We(x);
|
|
3499
3518
|
},
|
|
3500
|
-
contentUpdate: (
|
|
3501
|
-
i(
|
|
3519
|
+
contentUpdate: (x) => {
|
|
3520
|
+
i(x);
|
|
3502
3521
|
}
|
|
3503
3522
|
}
|
|
3504
3523
|
})(h);
|
|
3505
3524
|
}
|
|
3506
3525
|
function c() {
|
|
3507
|
-
var
|
|
3508
|
-
const h = (v = (
|
|
3526
|
+
var x, v;
|
|
3527
|
+
const h = (v = (x = e.builderContextSignal.content) == null ? void 0 : x.data) == null ? void 0 : v.jsCode;
|
|
3509
3528
|
h && K({
|
|
3510
3529
|
code: h,
|
|
3511
3530
|
context: e.context || {},
|
|
@@ -3518,30 +3537,30 @@ function Hn(e) {
|
|
|
3518
3537
|
enableCache: !1
|
|
3519
3538
|
});
|
|
3520
3539
|
}
|
|
3521
|
-
const [u, f] =
|
|
3522
|
-
function
|
|
3523
|
-
var
|
|
3540
|
+
const [u, f] = T(() => ({})), [d, m] = T(() => ({})), [g, y] = T(() => !1);
|
|
3541
|
+
function C(h) {
|
|
3542
|
+
var x, v;
|
|
3524
3543
|
if (e.builderContextSignal.content) {
|
|
3525
|
-
const k = (
|
|
3544
|
+
const k = (x = e.builderContextSignal.content) == null ? void 0 : x.testVariationId, I = (v = e.builderContextSignal.content) == null ? void 0 : v.id;
|
|
3526
3545
|
he({
|
|
3527
3546
|
type: "click",
|
|
3528
3547
|
canTrack: Q(e.canTrack),
|
|
3529
|
-
contentId:
|
|
3548
|
+
contentId: I,
|
|
3530
3549
|
apiKey: e.apiKey,
|
|
3531
|
-
variationId: k !==
|
|
3550
|
+
variationId: k !== I ? k : void 0,
|
|
3532
3551
|
...$n(h),
|
|
3533
3552
|
unique: !g
|
|
3534
3553
|
});
|
|
3535
3554
|
}
|
|
3536
|
-
g ||
|
|
3555
|
+
g || y(!0);
|
|
3537
3556
|
}
|
|
3538
|
-
function
|
|
3539
|
-
var
|
|
3540
|
-
const h = (k = (v = (
|
|
3541
|
-
Object.entries(h).forEach(([
|
|
3542
|
-
if (!W || d[
|
|
3557
|
+
function p() {
|
|
3558
|
+
var x, v, k;
|
|
3559
|
+
const h = (k = (v = (x = e.builderContextSignal.content) == null ? void 0 : x.data) == null ? void 0 : v.httpRequests) != null ? k : {};
|
|
3560
|
+
Object.entries(h).forEach(([I, W]) => {
|
|
3561
|
+
if (!W || d[I] || u[I] && !$())
|
|
3543
3562
|
return;
|
|
3544
|
-
d[
|
|
3563
|
+
d[I] = !0;
|
|
3545
3564
|
const j = W.replace(
|
|
3546
3565
|
/{{([^}]+)}}/g,
|
|
3547
3566
|
(F, He) => String(
|
|
@@ -3557,16 +3576,16 @@ function Hn(e) {
|
|
|
3557
3576
|
);
|
|
3558
3577
|
Xe(j).then((F) => F.json()).then((F) => {
|
|
3559
3578
|
n({
|
|
3560
|
-
[
|
|
3561
|
-
}), u[
|
|
3579
|
+
[I]: F
|
|
3580
|
+
}), u[I] = !0;
|
|
3562
3581
|
}).catch((F) => {
|
|
3563
3582
|
console.error("error fetching dynamic data", W, F);
|
|
3564
3583
|
}).finally(() => {
|
|
3565
|
-
d[
|
|
3584
|
+
d[I] = !1;
|
|
3566
3585
|
});
|
|
3567
3586
|
});
|
|
3568
3587
|
}
|
|
3569
|
-
function
|
|
3588
|
+
function B() {
|
|
3570
3589
|
$() && window.dispatchEvent(
|
|
3571
3590
|
new CustomEvent(
|
|
3572
3591
|
"builder:component:stateChange",
|
|
@@ -3581,8 +3600,8 @@ function Hn(e) {
|
|
|
3581
3600
|
)
|
|
3582
3601
|
);
|
|
3583
3602
|
}
|
|
3584
|
-
return
|
|
3585
|
-
var h,
|
|
3603
|
+
return V(() => {
|
|
3604
|
+
var h, x;
|
|
3586
3605
|
if (M()) {
|
|
3587
3606
|
if ($() && (window.addEventListener("message", l), _e(), Je({
|
|
3588
3607
|
...e.locale ? {
|
|
@@ -3598,26 +3617,26 @@ function Hn(e) {
|
|
|
3598
3617
|
e.builderContextSignal.componentInfos
|
|
3599
3618
|
).forEach((k) => {
|
|
3600
3619
|
var W;
|
|
3601
|
-
const
|
|
3602
|
-
(W = window.parent) == null || W.postMessage(
|
|
3620
|
+
const I = Ye(k);
|
|
3621
|
+
(W = window.parent) == null || W.postMessage(I, "*");
|
|
3603
3622
|
}), window.addEventListener(
|
|
3604
3623
|
"builder:component:stateChangeListenerActivated",
|
|
3605
|
-
|
|
3624
|
+
B
|
|
3606
3625
|
)), e.builderContextSignal.content && Q(e.canTrack)) {
|
|
3607
|
-
const k = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId,
|
|
3626
|
+
const k = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, I = (x = e.builderContextSignal.content) == null ? void 0 : x.id, W = e.apiKey;
|
|
3608
3627
|
he({
|
|
3609
3628
|
type: "impression",
|
|
3610
3629
|
canTrack: !0,
|
|
3611
|
-
contentId:
|
|
3630
|
+
contentId: I,
|
|
3612
3631
|
apiKey: W,
|
|
3613
|
-
variationId: k !==
|
|
3632
|
+
variationId: k !== I ? k : void 0
|
|
3614
3633
|
});
|
|
3615
3634
|
}
|
|
3616
3635
|
if (Ge() && !$()) {
|
|
3617
|
-
const k = new URL(location.href).searchParams,
|
|
3618
|
-
`builder.overrides.${
|
|
3636
|
+
const k = new URL(location.href).searchParams, I = k.get("builder.preview"), W = k.get(
|
|
3637
|
+
`builder.overrides.${I}`
|
|
3619
3638
|
), j = k.get("apiKey") || k.get("builder.space");
|
|
3620
|
-
|
|
3639
|
+
I === e.model && j === e.apiKey && (!e.content || W === e.content.id) && we({
|
|
3621
3640
|
model: e.model,
|
|
3622
3641
|
apiKey: e.apiKey,
|
|
3623
3642
|
apiVersion: e.builderContextSignal.apiVersion
|
|
@@ -3626,34 +3645,34 @@ function Hn(e) {
|
|
|
3626
3645
|
});
|
|
3627
3646
|
}
|
|
3628
3647
|
}
|
|
3629
|
-
}, []),
|
|
3648
|
+
}, []), V(() => {
|
|
3630
3649
|
e.apiKey || Z.error(
|
|
3631
3650
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
3632
|
-
), c(),
|
|
3633
|
-
}, []),
|
|
3651
|
+
), c(), p(), B();
|
|
3652
|
+
}, []), V(() => {
|
|
3634
3653
|
e.content && i(e.content);
|
|
3635
|
-
}, [e.content]),
|
|
3654
|
+
}, [e.content]), V(() => {
|
|
3636
3655
|
c();
|
|
3637
|
-
}, [(A = (
|
|
3638
|
-
|
|
3639
|
-
}, [(S = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : S.httpRequests]),
|
|
3640
|
-
|
|
3641
|
-
}, [e.builderContextSignal.rootState]),
|
|
3656
|
+
}, [(A = (E = e.builderContextSignal.content) == null ? void 0 : E.data) == null ? void 0 : A.jsCode]), V(() => {
|
|
3657
|
+
p();
|
|
3658
|
+
}, [(S = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : S.httpRequests]), V(() => {
|
|
3659
|
+
B();
|
|
3660
|
+
}, [e.builderContextSignal.rootState]), V(() => {
|
|
3642
3661
|
e.data && n(e.data);
|
|
3643
|
-
}, [e.data]),
|
|
3662
|
+
}, [e.data]), V(() => {
|
|
3644
3663
|
e.locale && n({
|
|
3645
3664
|
locale: e.locale
|
|
3646
3665
|
});
|
|
3647
|
-
}, [e.locale]),
|
|
3666
|
+
}, [e.locale]), V(() => () => {
|
|
3648
3667
|
M() && (window.removeEventListener("message", l), window.removeEventListener(
|
|
3649
3668
|
"builder:component:stateChangeListenerActivated",
|
|
3650
|
-
|
|
3669
|
+
B
|
|
3651
3670
|
));
|
|
3652
3671
|
}, []), /* @__PURE__ */ s(me.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ s(
|
|
3653
3672
|
r,
|
|
3654
3673
|
{
|
|
3655
3674
|
ref: t,
|
|
3656
|
-
onClick: (h) =>
|
|
3675
|
+
onClick: (h) => C(h),
|
|
3657
3676
|
"builder-content-id": (w = e.builderContextSignal.content) == null ? void 0 : w.id,
|
|
3658
3677
|
"builder-model": e.model,
|
|
3659
3678
|
...o(),
|
|
@@ -3666,7 +3685,7 @@ function Hn(e) {
|
|
|
3666
3685
|
) : null });
|
|
3667
3686
|
}
|
|
3668
3687
|
function qn(e) {
|
|
3669
|
-
const [t, n] =
|
|
3688
|
+
const [t, n] = T(
|
|
3670
3689
|
() => `
|
|
3671
3690
|
${On({
|
|
3672
3691
|
cssCode: e.cssCode,
|
|
@@ -3678,7 +3697,14 @@ ${Ln({
|
|
|
3678
3697
|
${Un(e.isNestedRender)}
|
|
3679
3698
|
`.trim()
|
|
3680
3699
|
);
|
|
3681
|
-
return /* @__PURE__ */ s(
|
|
3700
|
+
return /* @__PURE__ */ s(
|
|
3701
|
+
ne,
|
|
3702
|
+
{
|
|
3703
|
+
id: "builderio-content",
|
|
3704
|
+
styles: t,
|
|
3705
|
+
nonce: e.nonce
|
|
3706
|
+
}
|
|
3707
|
+
);
|
|
3682
3708
|
}
|
|
3683
3709
|
const Kn = ({
|
|
3684
3710
|
content: e,
|
|
@@ -3709,68 +3735,75 @@ const Kn = ({
|
|
|
3709
3735
|
meta: e == null ? void 0 : e.meta
|
|
3710
3736
|
} : void 0;
|
|
3711
3737
|
function Ie(e) {
|
|
3712
|
-
var c, u, f, d, m, g,
|
|
3713
|
-
const [t, n] =
|
|
3738
|
+
var c, u, f, d, m, g, y;
|
|
3739
|
+
const [t, n] = T(
|
|
3714
3740
|
() => {
|
|
3715
|
-
var
|
|
3741
|
+
var C, p;
|
|
3716
3742
|
return Nn({
|
|
3717
3743
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3718
|
-
variationId: (
|
|
3744
|
+
variationId: (C = e.content) == null ? void 0 : C.testVariationId,
|
|
3719
3745
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3720
|
-
contentId: (
|
|
3746
|
+
contentId: (p = e.content) == null ? void 0 : p.id
|
|
3721
3747
|
});
|
|
3722
3748
|
}
|
|
3723
3749
|
);
|
|
3724
|
-
function i(
|
|
3725
|
-
l((
|
|
3726
|
-
...
|
|
3727
|
-
rootState:
|
|
3750
|
+
function i(C) {
|
|
3751
|
+
l((p) => ({
|
|
3752
|
+
...p,
|
|
3753
|
+
rootState: C
|
|
3728
3754
|
}));
|
|
3729
3755
|
}
|
|
3730
|
-
const [o, r] =
|
|
3731
|
-
() =>
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3756
|
+
const [o, r] = T(
|
|
3757
|
+
() => {
|
|
3758
|
+
var C;
|
|
3759
|
+
return [
|
|
3760
|
+
...ke(),
|
|
3761
|
+
...((C = e.customComponents) == null ? void 0 : C.filter(({ models: p }) => !(p != null && p.length) || !e.model ? !0 : p.includes(e.model))) || []
|
|
3762
|
+
].reduce(
|
|
3763
|
+
(p, { component: B, ...E }) => ({
|
|
3764
|
+
...p,
|
|
3765
|
+
[E.name]: {
|
|
3766
|
+
component: B,
|
|
3767
|
+
...ge(E)
|
|
3768
|
+
}
|
|
3769
|
+
}),
|
|
3770
|
+
{}
|
|
3771
|
+
);
|
|
3772
|
+
}
|
|
3773
|
+
), [a, l] = T(() => {
|
|
3774
|
+
var C;
|
|
3775
|
+
return {
|
|
3776
|
+
content: zn({
|
|
3777
|
+
content: e.content,
|
|
3778
|
+
data: e.data
|
|
3741
3779
|
}),
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
data: e.data
|
|
3748
|
-
}),
|
|
3749
|
-
localState: void 0,
|
|
3750
|
-
rootState: Kn({
|
|
3751
|
-
content: e.content,
|
|
3752
|
-
data: e.data,
|
|
3753
|
-
locale: e.locale
|
|
3754
|
-
}),
|
|
3755
|
-
rootSetState: i,
|
|
3756
|
-
context: e.context || {},
|
|
3757
|
-
canTrack: e.canTrack,
|
|
3758
|
-
apiKey: e.apiKey,
|
|
3759
|
-
apiVersion: e.apiVersion,
|
|
3760
|
-
componentInfos: [
|
|
3761
|
-
...ke(),
|
|
3762
|
-
...e.customComponents || []
|
|
3763
|
-
].reduce(
|
|
3764
|
-
(I, { component: x, ...E }) => ({
|
|
3765
|
-
...I,
|
|
3766
|
-
[E.name]: ge(E)
|
|
3780
|
+
localState: void 0,
|
|
3781
|
+
rootState: Kn({
|
|
3782
|
+
content: e.content,
|
|
3783
|
+
data: e.data,
|
|
3784
|
+
locale: e.locale
|
|
3767
3785
|
}),
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3786
|
+
rootSetState: i,
|
|
3787
|
+
context: e.context || {},
|
|
3788
|
+
canTrack: e.canTrack,
|
|
3789
|
+
apiKey: e.apiKey,
|
|
3790
|
+
apiVersion: e.apiVersion,
|
|
3791
|
+
componentInfos: [
|
|
3792
|
+
...ke(),
|
|
3793
|
+
...((C = e.customComponents) == null ? void 0 : C.filter(({ models: p }) => !(p != null && p.length) || !e.model ? !0 : p.includes(e.model))) || []
|
|
3794
|
+
].reduce(
|
|
3795
|
+
(p, { component: B, ...E }) => ({
|
|
3796
|
+
...p,
|
|
3797
|
+
[E.name]: ge(E)
|
|
3798
|
+
}),
|
|
3799
|
+
{}
|
|
3800
|
+
),
|
|
3801
|
+
inheritedStyles: {},
|
|
3802
|
+
BlocksWrapper: e.blocksWrapper || "div",
|
|
3803
|
+
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
3804
|
+
nonce: e.nonce || ""
|
|
3805
|
+
};
|
|
3806
|
+
});
|
|
3774
3807
|
return /* @__PURE__ */ s(
|
|
3775
3808
|
Be.Provider,
|
|
3776
3809
|
{
|
|
@@ -3780,6 +3813,7 @@ function Ie(e) {
|
|
|
3780
3813
|
children: /* @__PURE__ */ P(
|
|
3781
3814
|
Hn,
|
|
3782
3815
|
{
|
|
3816
|
+
nonce: e.nonce,
|
|
3783
3817
|
content: e.content,
|
|
3784
3818
|
data: e.data,
|
|
3785
3819
|
model: e.model,
|
|
@@ -3799,12 +3833,14 @@ function Ie(e) {
|
|
|
3799
3833
|
ce,
|
|
3800
3834
|
{
|
|
3801
3835
|
id: "builderio-variant-visibility",
|
|
3802
|
-
scriptStr: t
|
|
3836
|
+
scriptStr: t,
|
|
3837
|
+
nonce: e.nonce || ""
|
|
3803
3838
|
}
|
|
3804
3839
|
) : null,
|
|
3805
3840
|
/* @__PURE__ */ s(
|
|
3806
3841
|
qn,
|
|
3807
3842
|
{
|
|
3843
|
+
nonce: e.nonce || "",
|
|
3808
3844
|
isNestedRender: e.isNestedRender,
|
|
3809
3845
|
contentId: (c = a.content) == null ? void 0 : c.id,
|
|
3810
3846
|
cssCode: (f = (u = a.content) == null ? void 0 : u.data) == null ? void 0 : f.cssCode,
|
|
@@ -3814,7 +3850,7 @@ function Ie(e) {
|
|
|
3814
3850
|
/* @__PURE__ */ s(
|
|
3815
3851
|
D,
|
|
3816
3852
|
{
|
|
3817
|
-
blocks: (
|
|
3853
|
+
blocks: (y = (g = a.content) == null ? void 0 : g.data) == null ? void 0 : y.blocks,
|
|
3818
3854
|
context: a,
|
|
3819
3855
|
registeredComponents: o,
|
|
3820
3856
|
linkComponent: e.linkComponent
|
|
@@ -3828,7 +3864,7 @@ function Ie(e) {
|
|
|
3828
3864
|
}
|
|
3829
3865
|
function _n(e) {
|
|
3830
3866
|
var a;
|
|
3831
|
-
const [t, n] =
|
|
3867
|
+
const [t, n] = T(
|
|
3832
3868
|
() => Bn({
|
|
3833
3869
|
canTrack: Q(e.canTrack),
|
|
3834
3870
|
content: e.content
|
|
@@ -3857,14 +3893,14 @@ function _n(e) {
|
|
|
3857
3893
|
canTrack: Q(e.canTrack)
|
|
3858
3894
|
});
|
|
3859
3895
|
}
|
|
3860
|
-
return
|
|
3861
|
-
}, []),
|
|
3862
|
-
}), /* @__PURE__ */ P(R, { children: [
|
|
3896
|
+
return V(() => {
|
|
3897
|
+
}, []), /* @__PURE__ */ P(R, { children: [
|
|
3863
3898
|
!e.isNestedRender && z !== "reactNative" ? /* @__PURE__ */ s(
|
|
3864
3899
|
ce,
|
|
3865
3900
|
{
|
|
3866
3901
|
id: "builderio-init-variants-fns",
|
|
3867
|
-
scriptStr: Vn()
|
|
3902
|
+
scriptStr: Vn(),
|
|
3903
|
+
nonce: e.nonce || ""
|
|
3868
3904
|
}
|
|
3869
3905
|
) : null,
|
|
3870
3906
|
t ? /* @__PURE__ */ P(R, { children: [
|
|
@@ -3872,20 +3908,23 @@ function _n(e) {
|
|
|
3872
3908
|
ne,
|
|
3873
3909
|
{
|
|
3874
3910
|
id: "builderio-variants",
|
|
3875
|
-
styles: o()
|
|
3911
|
+
styles: o(),
|
|
3912
|
+
nonce: e.nonce || ""
|
|
3876
3913
|
}
|
|
3877
3914
|
),
|
|
3878
3915
|
/* @__PURE__ */ s(
|
|
3879
3916
|
ce,
|
|
3880
3917
|
{
|
|
3881
3918
|
id: "builderio-variants-visibility",
|
|
3882
|
-
scriptStr: i()
|
|
3919
|
+
scriptStr: i(),
|
|
3920
|
+
nonce: e.nonce || ""
|
|
3883
3921
|
}
|
|
3884
3922
|
),
|
|
3885
3923
|
(a = Y(e.content)) == null ? void 0 : a.map((l) => /* @__PURE__ */ s(
|
|
3886
3924
|
Ie,
|
|
3887
3925
|
{
|
|
3888
3926
|
isNestedRender: e.isNestedRender,
|
|
3927
|
+
nonce: e.nonce,
|
|
3889
3928
|
content: l,
|
|
3890
3929
|
showContent: !1,
|
|
3891
3930
|
model: e.model,
|
|
@@ -3911,6 +3950,7 @@ function _n(e) {
|
|
|
3911
3950
|
/* @__PURE__ */ s(
|
|
3912
3951
|
Ie,
|
|
3913
3952
|
{
|
|
3953
|
+
nonce: e.nonce,
|
|
3914
3954
|
isNestedRender: e.isNestedRender,
|
|
3915
3955
|
content: r(),
|
|
3916
3956
|
showContent: !0,
|
|
@@ -3970,7 +4010,7 @@ function Yn(e) {
|
|
|
3970
4010
|
(m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
3971
4011
|
].filter(Boolean).join(" ");
|
|
3972
4012
|
}
|
|
3973
|
-
const [o, r] =
|
|
4013
|
+
const [o, r] = T(() => {
|
|
3974
4014
|
var d;
|
|
3975
4015
|
return (d = e.symbol) == null ? void 0 : d.content;
|
|
3976
4016
|
});
|
|
@@ -3982,12 +4022,13 @@ function Yn(e) {
|
|
|
3982
4022
|
d && r(d);
|
|
3983
4023
|
});
|
|
3984
4024
|
}
|
|
3985
|
-
return
|
|
3986
|
-
}, []),
|
|
4025
|
+
return V(() => {
|
|
4026
|
+
}, []), V(() => {
|
|
3987
4027
|
a();
|
|
3988
4028
|
}, [e.symbol]), /* @__PURE__ */ s("div", { ...e.attributes, className: i(), children: /* @__PURE__ */ s(
|
|
3989
4029
|
_n,
|
|
3990
4030
|
{
|
|
4031
|
+
nonce: e.builderContext.nonce,
|
|
3991
4032
|
isNestedRender: !0,
|
|
3992
4033
|
apiVersion: e.builderContext.apiVersion,
|
|
3993
4034
|
apiKey: e.builderContext.apiKey,
|