@builder.io/sdk-react-nextjs 0.14.17 → 0.14.20
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/{node/USE_CLIENT_BUNDLE-8dadab11.js → browser/USE_CLIENT_BUNDLE-b0af90c6.js} +251 -247
- package/lib/browser/USE_CLIENT_BUNDLE-eb52194d.cjs +21 -0
- package/lib/{edge/USE_SERVER_BUNDLE-4035cf43.cjs → browser/USE_SERVER_BUNDLE-719f53b1.cjs} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-6b33cfd7.js → browser/USE_SERVER_BUNDLE-d83b7d23.js} +1 -1
- package/lib/browser/bundle-12d2c3ee.cjs +169 -0
- package/lib/browser/{bundle-974bbd75.js → bundle-83df769b.js} +590 -578
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +4 -4
- package/lib/{browser/USE_CLIENT_BUNDLE-f685a480.js → edge/USE_CLIENT_BUNDLE-2d9b453e.js} +251 -247
- package/lib/edge/USE_CLIENT_BUNDLE-47285217.cjs +21 -0
- package/lib/{node/USE_SERVER_BUNDLE-d847a064.cjs → edge/USE_SERVER_BUNDLE-9e66cbc6.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-d7d118c1.js → edge/USE_SERVER_BUNDLE-c879ad04.js} +1 -1
- package/lib/edge/{bundle-0e4ba4de.js → bundle-73367f5c.js} +1016 -1004
- package/lib/edge/bundle-8a8fdc14.cjs +189 -0
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +4 -4
- package/lib/{edge/USE_CLIENT_BUNDLE-bf35f13e.js → node/USE_CLIENT_BUNDLE-68277019.js} +251 -247
- package/lib/node/USE_CLIENT_BUNDLE-8d2c6823.cjs +21 -0
- package/lib/{browser/USE_SERVER_BUNDLE-fbe70d66.js → node/USE_SERVER_BUNDLE-84ab22ef.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-1ee4e92a.cjs → node/USE_SERVER_BUNDLE-a4d10e9b.cjs} +1 -1
- package/lib/node/{bundle-a8217ddb.js → bundle-08369562.js} +256 -242
- package/lib/node/{bundle-39fe7680.cjs → bundle-832f5a95.cjs} +18 -18
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +4 -4
- package/package.json +1 -1
- package/types/cjs/blocks/columns/columns.types.d.ts +1 -1
- package/types/cjs/blocks/columns/helpers.d.ts +1 -0
- package/types/cjs/blocks/tabs/component-info.d.ts +2 -0
- package/types/cjs/blocks/tabs/index.d.ts +1 -0
- package/types/cjs/blocks/tabs/tabs.d.ts +4 -0
- package/types/cjs/blocks/tabs/tabs.types.d.ts +13 -0
- package/types/cjs/blocks/text/text.types.d.ts +2 -1
- package/types/cjs/components/block/block.helpers.d.ts +4 -2
- package/types/cjs/components/content/components/styles.helpers.d.ts +1 -0
- package/types/cjs/components/dynamic-div.d.ts +15 -0
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/types/targets.d.ts +1 -1
- package/types/esm/blocks/columns/columns.types.d.ts +1 -1
- package/types/esm/blocks/columns/helpers.d.ts +1 -0
- package/types/esm/blocks/tabs/component-info.d.ts +2 -0
- package/types/esm/blocks/tabs/index.d.ts +1 -0
- package/types/esm/blocks/tabs/tabs.d.ts +4 -0
- package/types/esm/blocks/tabs/tabs.types.d.ts +13 -0
- package/types/esm/blocks/text/text.types.d.ts +2 -1
- package/types/esm/components/block/block.helpers.d.ts +4 -2
- package/types/esm/components/content/components/styles.helpers.d.ts +1 -0
- package/types/esm/components/dynamic-div.d.ts +15 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/types/targets.d.ts +1 -1
- package/lib/browser/USE_CLIENT_BUNDLE-f11159f6.cjs +0 -21
- package/lib/browser/bundle-e5f3c905.cjs +0 -169
- package/lib/edge/USE_CLIENT_BUNDLE-22f09854.cjs +0 -21
- package/lib/edge/bundle-15a88622.cjs +0 -189
- package/lib/node/USE_CLIENT_BUNDLE-e62d9c72.cjs +0 -21
|
@@ -1,43 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { i as
|
|
4
|
-
import { useRef as T, useState as
|
|
5
|
-
import { p as
|
|
6
|
-
import { useRouter as
|
|
7
|
-
function
|
|
8
|
-
return /* @__PURE__ */
|
|
2
|
+
import { jsx as a, Fragment as E, jsxs as I } from "react/jsx-runtime";
|
|
3
|
+
import { i as Z, g as H, a as $, b as O, c as w, d as R, e as p, f as _, h as V, _ as D, j as ee, l as te, k as ne, m as ie, t as ae, n as U, o as ce, p as re, q as le, r as oe, s as de, u as se, v as ue } from "./bundle-83df769b.js";
|
|
4
|
+
import { useRef as T, useState as C, useEffect as f, createContext as me } from "react";
|
|
5
|
+
import { p as ge } from "./USE_SERVER_BUNDLE-d83b7d23.js";
|
|
6
|
+
import { useRouter as be } from "next/navigation";
|
|
7
|
+
function J(e) {
|
|
8
|
+
return /* @__PURE__ */ a(E, { children: Z(e.TagName) ? /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ a(E, { children: typeof e.TagName == "string" ? /* @__PURE__ */ a(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ a(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
function ke(e) {
|
|
11
|
+
function i() {
|
|
12
|
+
return {
|
|
13
|
+
...e.attributes,
|
|
14
|
+
[H()]: `${e.link ? "" : "builder-button"} ${e.attributes[H()] || ""}`,
|
|
15
|
+
...e.link ? {
|
|
16
|
+
href: e.link,
|
|
17
|
+
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
18
|
+
role: "link"
|
|
19
|
+
} : {
|
|
20
|
+
role: "button"
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return /* @__PURE__ */ a(
|
|
25
|
+
J,
|
|
13
26
|
{
|
|
14
|
-
attributes:
|
|
15
|
-
...e.attributes,
|
|
16
|
-
[q()]: `${e.link ? "" : "builder-button"} ${e.attributes[q()] || ""}`,
|
|
17
|
-
...e.link ? {
|
|
18
|
-
href: e.link,
|
|
19
|
-
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
20
|
-
role: "link"
|
|
21
|
-
} : {
|
|
22
|
-
role: "button"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
27
|
+
attributes: i(),
|
|
25
28
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
26
29
|
actionAttributes: {},
|
|
27
30
|
children: e.text
|
|
28
31
|
}
|
|
29
32
|
);
|
|
30
33
|
}
|
|
31
|
-
function
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
|
|
34
|
+
function Ce(e) {
|
|
35
|
+
return /* @__PURE__ */ a(
|
|
36
|
+
J,
|
|
34
37
|
{
|
|
35
38
|
TagName: e.Wrapper,
|
|
36
|
-
attributes:
|
|
39
|
+
attributes: $({
|
|
37
40
|
block: e.block,
|
|
38
41
|
context: e.context
|
|
39
42
|
}),
|
|
40
|
-
actionAttributes:
|
|
43
|
+
actionAttributes: O({
|
|
41
44
|
block: e.block,
|
|
42
45
|
rootState: e.context.rootState,
|
|
43
46
|
rootSetState: e.context.rootSetState,
|
|
@@ -49,36 +52,32 @@ function ye(e) {
|
|
|
49
52
|
}
|
|
50
53
|
);
|
|
51
54
|
}
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
e.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} : {},
|
|
70
|
-
children: e.children
|
|
71
|
-
}
|
|
72
|
-
);
|
|
55
|
+
function we(e) {
|
|
56
|
+
function i() {
|
|
57
|
+
return e.includeBlockProps ? {
|
|
58
|
+
...$({
|
|
59
|
+
block: e.block,
|
|
60
|
+
context: e.context
|
|
61
|
+
}),
|
|
62
|
+
...O({
|
|
63
|
+
block: e.block,
|
|
64
|
+
rootState: e.context.rootState,
|
|
65
|
+
rootSetState: e.context.rootSetState,
|
|
66
|
+
localState: e.context.localState,
|
|
67
|
+
context: e.context.context
|
|
68
|
+
})
|
|
69
|
+
} : {};
|
|
70
|
+
}
|
|
71
|
+
return /* @__PURE__ */ a(e.Wrapper, { ...e.wrapperProps, attributes: i(), children: e.children });
|
|
73
72
|
}
|
|
74
|
-
function
|
|
75
|
-
function
|
|
73
|
+
function Ee(e) {
|
|
74
|
+
function i() {
|
|
76
75
|
var r;
|
|
77
76
|
return "builder-blocks" + ((r = e.blocks) != null && r.length ? "" : " no-blocks");
|
|
78
77
|
}
|
|
79
|
-
function
|
|
78
|
+
function s() {
|
|
80
79
|
var r, g;
|
|
81
|
-
|
|
80
|
+
w() && !((r = e.blocks) != null && r.length) && ((g = window.parent) == null || g.postMessage(
|
|
82
81
|
{
|
|
83
82
|
type: "builder.clickEmptyBlocks",
|
|
84
83
|
data: {
|
|
@@ -91,7 +90,7 @@ function Ce(e) {
|
|
|
91
90
|
}
|
|
92
91
|
function S() {
|
|
93
92
|
var r, g;
|
|
94
|
-
|
|
93
|
+
w() && !((r = e.blocks) != null && r.length) && ((g = window.parent) == null || g.postMessage(
|
|
95
94
|
{
|
|
96
95
|
type: "builder.hoverEmptyBlocks",
|
|
97
96
|
data: {
|
|
@@ -102,66 +101,66 @@ function Ce(e) {
|
|
|
102
101
|
"*"
|
|
103
102
|
));
|
|
104
103
|
}
|
|
105
|
-
return /* @__PURE__ */ I(
|
|
106
|
-
/* @__PURE__ */
|
|
104
|
+
return /* @__PURE__ */ I(E, { children: [
|
|
105
|
+
/* @__PURE__ */ a(
|
|
107
106
|
e.BlocksWrapper,
|
|
108
107
|
{
|
|
109
|
-
className:
|
|
108
|
+
className: i() + " props-blocks-wrapper-7cd1560e",
|
|
110
109
|
"builder-path": e.path,
|
|
111
110
|
"builder-parent-id": e.parent,
|
|
112
111
|
style: e.styleProp,
|
|
113
|
-
onClick: (r) =>
|
|
112
|
+
onClick: (r) => s(),
|
|
114
113
|
onMouseEnter: (r) => S(),
|
|
115
|
-
onKeyPress: (r) =>
|
|
114
|
+
onKeyPress: (r) => s(),
|
|
116
115
|
...e.BlocksWrapperProps,
|
|
117
116
|
children: e.children
|
|
118
117
|
}
|
|
119
118
|
),
|
|
120
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ a("style", { children: `.props-blocks-wrapper-7cd1560e {
|
|
121
120
|
display: flex;
|
|
122
121
|
flex-direction: column;
|
|
123
122
|
align-items: stretch;
|
|
124
123
|
}` })
|
|
125
124
|
] });
|
|
126
125
|
}
|
|
127
|
-
function
|
|
128
|
-
return /* @__PURE__ */
|
|
126
|
+
function Ie(e) {
|
|
127
|
+
return /* @__PURE__ */ a("span", { children: e.children });
|
|
129
128
|
}
|
|
130
|
-
function
|
|
131
|
-
var r, g, b,
|
|
132
|
-
function
|
|
133
|
-
var
|
|
134
|
-
const
|
|
135
|
-
if (!
|
|
129
|
+
function Pe(e) {
|
|
130
|
+
var r, g, v, h, b, o;
|
|
131
|
+
function i() {
|
|
132
|
+
var x;
|
|
133
|
+
const d = e.image || e.src;
|
|
134
|
+
if (!d || // We can auto add srcset for cdn.builder.io and shopify
|
|
136
135
|
// images, otherwise you can supply this prop manually
|
|
137
|
-
!(
|
|
136
|
+
!(d.match(/builder\.io/) || d.match(/cdn\.shopify\.com/)))
|
|
138
137
|
return e.srcset;
|
|
139
|
-
if (e.srcset && ((
|
|
138
|
+
if (e.srcset && ((x = e.image) != null && x.includes("builder.io/api/v1/image"))) {
|
|
140
139
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
141
|
-
return console.debug("Removed given srcset"), R(
|
|
140
|
+
return console.debug("Removed given srcset"), R(d);
|
|
142
141
|
} else if (e.image && !e.srcset)
|
|
143
|
-
return R(
|
|
144
|
-
return R(
|
|
142
|
+
return R(d);
|
|
143
|
+
return R(d);
|
|
145
144
|
}
|
|
146
|
-
function
|
|
147
|
-
var
|
|
148
|
-
return (
|
|
145
|
+
function s() {
|
|
146
|
+
var m;
|
|
147
|
+
return (m = i == null ? void 0 : i()) != null && m.match(/builder\.io/) && !e.noWebp ? i().replace(/\?/g, "?format=webp&") : "";
|
|
149
148
|
}
|
|
150
149
|
function S() {
|
|
151
|
-
const
|
|
150
|
+
const m = {
|
|
152
151
|
position: "absolute",
|
|
153
152
|
height: "100%",
|
|
154
153
|
width: "100%",
|
|
155
154
|
left: "0px",
|
|
156
155
|
top: "0px"
|
|
157
156
|
};
|
|
158
|
-
return e.aspectRatio ?
|
|
157
|
+
return e.aspectRatio ? m : void 0;
|
|
159
158
|
}
|
|
160
|
-
return /* @__PURE__ */ I(
|
|
161
|
-
/* @__PURE__ */ I(
|
|
159
|
+
return /* @__PURE__ */ I(E, { children: [
|
|
160
|
+
/* @__PURE__ */ I(E, { children: [
|
|
162
161
|
/* @__PURE__ */ I("picture", { children: [
|
|
163
|
-
|
|
164
|
-
/* @__PURE__ */
|
|
162
|
+
s() ? /* @__PURE__ */ a("source", { type: "image/webp", srcSet: s() }) : null,
|
|
163
|
+
/* @__PURE__ */ a(
|
|
165
164
|
"img",
|
|
166
165
|
{
|
|
167
166
|
loading: "lazy",
|
|
@@ -172,33 +171,33 @@ function we(e) {
|
|
|
172
171
|
objectFit: e.backgroundSize || "cover",
|
|
173
172
|
...S()
|
|
174
173
|
},
|
|
175
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
174
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-3ac67dd4",
|
|
176
175
|
src: e.image,
|
|
177
|
-
srcSet:
|
|
176
|
+
srcSet: i(),
|
|
178
177
|
sizes: e.sizes
|
|
179
178
|
}
|
|
180
179
|
)
|
|
181
180
|
] }),
|
|
182
|
-
e.aspectRatio && !((g = (r = e.builderBlock) == null ? void 0 : r.children) != null && g.length && e.fitContent) ? /* @__PURE__ */
|
|
181
|
+
e.aspectRatio && !((g = (r = e.builderBlock) == null ? void 0 : r.children) != null && g.length && e.fitContent) ? /* @__PURE__ */ a(
|
|
183
182
|
"div",
|
|
184
183
|
{
|
|
185
|
-
className: "builder-image-sizer div-
|
|
184
|
+
className: "builder-image-sizer div-3ac67dd4",
|
|
186
185
|
style: {
|
|
187
186
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
188
187
|
}
|
|
189
188
|
}
|
|
190
189
|
) : null,
|
|
191
|
-
(h = (
|
|
192
|
-
!e.fitContent && e.children ? /* @__PURE__ */
|
|
190
|
+
(h = (v = e.builderBlock) == null ? void 0 : v.children) != null && h.length && e.fitContent ? /* @__PURE__ */ a(E, { children: e.children }) : null,
|
|
191
|
+
!e.fitContent && ((o = (b = e.builderBlock) == null ? void 0 : b.children) != null && o.length) ? /* @__PURE__ */ a("div", { className: "div-3ac67dd4-2", children: e.children }) : null
|
|
193
192
|
] }),
|
|
194
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ a("style", { children: `.img-3ac67dd4 {
|
|
195
194
|
opacity: 1;
|
|
196
195
|
transition: opacity 0.2s ease-in-out;
|
|
197
|
-
}.div-
|
|
196
|
+
}.div-3ac67dd4 {
|
|
198
197
|
width: 100%;
|
|
199
198
|
pointer-events: none;
|
|
200
199
|
font-size: 0;
|
|
201
|
-
}.div-
|
|
200
|
+
}.div-3ac67dd4-2 {
|
|
202
201
|
display: flex;
|
|
203
202
|
flex-direction: column;
|
|
204
203
|
align-items: stretch;
|
|
@@ -210,8 +209,8 @@ function we(e) {
|
|
|
210
209
|
}` })
|
|
211
210
|
] });
|
|
212
211
|
}
|
|
213
|
-
function
|
|
214
|
-
return /* @__PURE__ */
|
|
212
|
+
function Re(e) {
|
|
213
|
+
return /* @__PURE__ */ a(
|
|
215
214
|
"section",
|
|
216
215
|
{
|
|
217
216
|
...e.attributes,
|
|
@@ -231,77 +230,77 @@ function Ie(e) {
|
|
|
231
230
|
}
|
|
232
231
|
);
|
|
233
232
|
}
|
|
234
|
-
function
|
|
235
|
-
const
|
|
233
|
+
function Te(e) {
|
|
234
|
+
const i = T(null), [s, S] = C(() => []), [r, g] = C(() => []);
|
|
236
235
|
return f(() => {
|
|
237
236
|
var h;
|
|
238
|
-
if (!((h =
|
|
237
|
+
if (!((h = i.current) != null && h.getElementsByTagName) || typeof window > "u")
|
|
239
238
|
return;
|
|
240
|
-
const
|
|
241
|
-
for (let
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
244
|
-
if (
|
|
239
|
+
const v = i.current.getElementsByTagName("script");
|
|
240
|
+
for (let b = 0; b < v.length; b++) {
|
|
241
|
+
const o = v[b];
|
|
242
|
+
if (o.src) {
|
|
243
|
+
if (s.includes(o.src))
|
|
245
244
|
continue;
|
|
246
|
-
|
|
245
|
+
s.push(o.src);
|
|
247
246
|
const m = document.createElement("script");
|
|
248
|
-
m.async = !0, m.src =
|
|
249
|
-
} else if (!
|
|
247
|
+
m.async = !0, m.src = o.src, document.head.appendChild(m);
|
|
248
|
+
} else if (!o.type || [
|
|
250
249
|
"text/javascript",
|
|
251
250
|
"application/javascript",
|
|
252
251
|
"application/ecmascript"
|
|
253
|
-
].includes(
|
|
254
|
-
if (r.includes(
|
|
252
|
+
].includes(o.type)) {
|
|
253
|
+
if (r.includes(o.innerText))
|
|
255
254
|
continue;
|
|
256
255
|
try {
|
|
257
|
-
r.push(
|
|
256
|
+
r.push(o.innerText), new Function(o.innerText)();
|
|
258
257
|
} catch (m) {
|
|
259
258
|
console.warn("`CustomCode`: Error running script:", m);
|
|
260
259
|
}
|
|
261
260
|
}
|
|
262
261
|
}
|
|
263
|
-
}, []), /* @__PURE__ */
|
|
262
|
+
}, []), /* @__PURE__ */ a(
|
|
264
263
|
"div",
|
|
265
264
|
{
|
|
266
|
-
ref:
|
|
265
|
+
ref: i,
|
|
267
266
|
className: "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : ""),
|
|
268
267
|
dangerouslySetInnerHTML: { __html: e.code }
|
|
269
268
|
}
|
|
270
269
|
);
|
|
271
270
|
}
|
|
272
|
-
function
|
|
273
|
-
const
|
|
274
|
-
function
|
|
275
|
-
if (!
|
|
271
|
+
function Ne(e) {
|
|
272
|
+
const i = T(null), [s, S] = C(() => []), [r, g] = C(() => []), [v, h] = C(() => !1);
|
|
273
|
+
function b() {
|
|
274
|
+
if (!i.current || !i.current.getElementsByTagName)
|
|
276
275
|
return;
|
|
277
|
-
const
|
|
278
|
-
for (let m = 0; m <
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
281
|
-
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
} else if (
|
|
276
|
+
const o = i.current.getElementsByTagName("script");
|
|
277
|
+
for (let m = 0; m < o.length; m++) {
|
|
278
|
+
const d = o[m];
|
|
279
|
+
if (d.src && !s.includes(d.src)) {
|
|
280
|
+
s.push(d.src);
|
|
281
|
+
const x = document.createElement("script");
|
|
282
|
+
x.async = !0, x.src = d.src, document.head.appendChild(x);
|
|
283
|
+
} else if (p(d) && !r.includes(d.innerText))
|
|
285
284
|
try {
|
|
286
|
-
r.push(
|
|
287
|
-
} catch (
|
|
288
|
-
console.warn("`Embed`: Error running script:",
|
|
285
|
+
r.push(d.innerText), new Function(d.innerText)();
|
|
286
|
+
} catch (x) {
|
|
287
|
+
console.warn("`Embed`: Error running script:", x);
|
|
289
288
|
}
|
|
290
289
|
}
|
|
291
290
|
}
|
|
292
291
|
return f(() => {
|
|
293
|
-
|
|
294
|
-
}, [
|
|
292
|
+
i.current && !v && (h(!0), b());
|
|
293
|
+
}, [i.current, v]), /* @__PURE__ */ a(
|
|
295
294
|
"div",
|
|
296
295
|
{
|
|
297
296
|
className: "builder-embed",
|
|
298
|
-
ref:
|
|
297
|
+
ref: i,
|
|
299
298
|
dangerouslySetInnerHTML: { __html: e.content }
|
|
300
299
|
}
|
|
301
300
|
);
|
|
302
301
|
}
|
|
303
|
-
function
|
|
304
|
-
return /* @__PURE__ */
|
|
302
|
+
function Be(e) {
|
|
303
|
+
return /* @__PURE__ */ a(
|
|
305
304
|
"img",
|
|
306
305
|
{
|
|
307
306
|
style: {
|
|
@@ -312,12 +311,12 @@ function Te(e) {
|
|
|
312
311
|
src: e.imgSrc || e.image,
|
|
313
312
|
...e.attributes
|
|
314
313
|
},
|
|
315
|
-
|
|
314
|
+
w() && e.imgSrc || "default-key"
|
|
316
315
|
);
|
|
317
316
|
}
|
|
318
|
-
function
|
|
319
|
-
var S, r, g,
|
|
320
|
-
function
|
|
317
|
+
function Le(e) {
|
|
318
|
+
var S, r, g, v, h, b, o;
|
|
319
|
+
function i() {
|
|
321
320
|
return {
|
|
322
321
|
...e.autoPlay === !0 ? {
|
|
323
322
|
autoPlay: !0
|
|
@@ -336,9 +335,9 @@ function Ne(e) {
|
|
|
336
335
|
} : {}
|
|
337
336
|
};
|
|
338
337
|
}
|
|
339
|
-
function
|
|
338
|
+
function s() {
|
|
340
339
|
return {
|
|
341
|
-
...
|
|
340
|
+
...i()
|
|
342
341
|
};
|
|
343
342
|
}
|
|
344
343
|
return /* @__PURE__ */ I(
|
|
@@ -348,11 +347,11 @@ function Ne(e) {
|
|
|
348
347
|
position: "relative"
|
|
349
348
|
},
|
|
350
349
|
children: [
|
|
351
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ a(
|
|
352
351
|
"video",
|
|
353
352
|
{
|
|
354
353
|
className: "builder-video",
|
|
355
|
-
...
|
|
354
|
+
...s(),
|
|
356
355
|
preload: e.preload || "metadata",
|
|
357
356
|
style: {
|
|
358
357
|
width: "100%",
|
|
@@ -370,10 +369,10 @@ function Ne(e) {
|
|
|
370
369
|
},
|
|
371
370
|
src: e.video || "no-src",
|
|
372
371
|
poster: e.posterImage,
|
|
373
|
-
children: e.lazyLoad ? null : /* @__PURE__ */
|
|
372
|
+
children: e.lazyLoad ? null : /* @__PURE__ */ a("source", { type: "video/mp4", src: e.video })
|
|
374
373
|
}
|
|
375
374
|
),
|
|
376
|
-
e.aspectRatio && !(e.fitContent && ((g = (r = e.builderBlock) == null ? void 0 : r.children) != null && g.length)) ? /* @__PURE__ */
|
|
375
|
+
e.aspectRatio && !(e.fitContent && ((g = (r = e.builderBlock) == null ? void 0 : r.children) != null && g.length)) ? /* @__PURE__ */ a(
|
|
377
376
|
"div",
|
|
378
377
|
{
|
|
379
378
|
style: {
|
|
@@ -384,7 +383,7 @@ function Ne(e) {
|
|
|
384
383
|
}
|
|
385
384
|
}
|
|
386
385
|
) : null,
|
|
387
|
-
(h = (
|
|
386
|
+
(h = (v = e.builderBlock) == null ? void 0 : v.children) != null && h.length && e.fitContent ? /* @__PURE__ */ a(
|
|
388
387
|
"div",
|
|
389
388
|
{
|
|
390
389
|
style: {
|
|
@@ -395,7 +394,7 @@ function Ne(e) {
|
|
|
395
394
|
children: e.children
|
|
396
395
|
}
|
|
397
396
|
) : null,
|
|
398
|
-
(
|
|
397
|
+
(o = (b = e.builderBlock) == null ? void 0 : b.children) != null && o.length && !e.fitContent ? /* @__PURE__ */ a(
|
|
399
398
|
"div",
|
|
400
399
|
{
|
|
401
400
|
style: {
|
|
@@ -416,7 +415,7 @@ function Ne(e) {
|
|
|
416
415
|
}
|
|
417
416
|
);
|
|
418
417
|
}
|
|
419
|
-
const
|
|
418
|
+
const he = me({
|
|
420
419
|
content: null,
|
|
421
420
|
context: {},
|
|
422
421
|
localState: void 0,
|
|
@@ -430,58 +429,64 @@ const ge = se({
|
|
|
430
429
|
BlocksWrapper: "div",
|
|
431
430
|
BlocksWrapperProps: {}
|
|
432
431
|
});
|
|
433
|
-
function
|
|
434
|
-
var
|
|
435
|
-
const
|
|
436
|
-
function
|
|
437
|
-
var
|
|
432
|
+
function je(e) {
|
|
433
|
+
var W, K, A, F, z, M, q;
|
|
434
|
+
const i = T(null);
|
|
435
|
+
function s(n) {
|
|
436
|
+
var l, c;
|
|
438
437
|
const t = {
|
|
439
438
|
...e.builderContextSignal.rootState,
|
|
440
439
|
...n
|
|
441
440
|
};
|
|
442
|
-
e.builderContextSignal.rootSetState ? (c = (
|
|
441
|
+
e.builderContextSignal.rootSetState ? (c = (l = e.builderContextSignal).rootSetState) == null || c.call(l, t) : e.builderContextSignal.rootState = t;
|
|
443
442
|
}
|
|
444
443
|
function S(n) {
|
|
445
|
-
var
|
|
444
|
+
var l, c, u, y, k;
|
|
446
445
|
const t = {
|
|
447
446
|
...e.builderContextSignal.content,
|
|
448
447
|
...n,
|
|
449
448
|
data: {
|
|
450
|
-
...(
|
|
449
|
+
...(l = e.builderContextSignal.content) == null ? void 0 : l.data,
|
|
451
450
|
...n == null ? void 0 : n.data
|
|
452
451
|
},
|
|
453
452
|
meta: {
|
|
454
453
|
...(c = e.builderContextSignal.content) == null ? void 0 : c.meta,
|
|
455
454
|
...n == null ? void 0 : n.meta,
|
|
456
|
-
breakpoints: ((u = n == null ? void 0 : n.meta) == null ? void 0 : u.breakpoints) || ((
|
|
455
|
+
breakpoints: ((u = n == null ? void 0 : n.meta) == null ? void 0 : u.breakpoints) || ((k = (y = e.builderContextSignal.content) == null ? void 0 : y.meta) == null ? void 0 : k.breakpoints)
|
|
457
456
|
}
|
|
458
457
|
};
|
|
459
|
-
|
|
458
|
+
ge({
|
|
460
459
|
value: t,
|
|
461
460
|
key: t.id
|
|
462
461
|
}).then(() => {
|
|
463
|
-
|
|
462
|
+
X.refresh();
|
|
464
463
|
});
|
|
465
464
|
}
|
|
466
|
-
|
|
465
|
+
function r() {
|
|
466
|
+
return e.showContent ? {} : {
|
|
467
|
+
hidden: !0,
|
|
468
|
+
"aria-hidden": !0
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
const [g, v] = C(
|
|
467
472
|
() => e.contentWrapper || "div"
|
|
468
473
|
);
|
|
469
|
-
function
|
|
470
|
-
return
|
|
474
|
+
function h(n) {
|
|
475
|
+
return ie({
|
|
471
476
|
model: e.model,
|
|
472
477
|
trustedHosts: e.trustedHosts,
|
|
473
478
|
callbacks: {
|
|
474
479
|
configureSdk: (t) => {
|
|
475
480
|
var u;
|
|
476
|
-
const { breakpoints:
|
|
477
|
-
!c || c !== ((u = e.builderContextSignal.content) == null ? void 0 : u.id) ||
|
|
481
|
+
const { breakpoints: l, contentId: c } = t;
|
|
482
|
+
!c || c !== ((u = e.builderContextSignal.content) == null ? void 0 : u.id) || l && S({
|
|
478
483
|
meta: {
|
|
479
|
-
breakpoints:
|
|
484
|
+
breakpoints: l
|
|
480
485
|
}
|
|
481
486
|
});
|
|
482
487
|
},
|
|
483
488
|
animation: (t) => {
|
|
484
|
-
|
|
489
|
+
ae(t);
|
|
485
490
|
},
|
|
486
491
|
contentUpdate: (t) => {
|
|
487
492
|
S(t);
|
|
@@ -489,10 +494,10 @@ function Be(e) {
|
|
|
489
494
|
}
|
|
490
495
|
})(n);
|
|
491
496
|
}
|
|
492
|
-
function
|
|
493
|
-
var t,
|
|
494
|
-
const n = (
|
|
495
|
-
n &&
|
|
497
|
+
function b() {
|
|
498
|
+
var t, l;
|
|
499
|
+
const n = (l = (t = e.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : l.jsCode;
|
|
500
|
+
n && U({
|
|
496
501
|
code: n,
|
|
497
502
|
context: e.context || {},
|
|
498
503
|
localState: void 0,
|
|
@@ -504,35 +509,35 @@ function Be(e) {
|
|
|
504
509
|
enableCache: !1
|
|
505
510
|
});
|
|
506
511
|
}
|
|
507
|
-
const [
|
|
508
|
-
function
|
|
509
|
-
var t,
|
|
512
|
+
const [o, m] = C(() => ({})), [d, x] = C(() => ({})), [N, G] = C(() => !1);
|
|
513
|
+
function Q(n) {
|
|
514
|
+
var t, l;
|
|
510
515
|
if (e.builderContextSignal.content) {
|
|
511
|
-
const c = (t = e.builderContextSignal.content) == null ? void 0 : t.testVariationId, u = (
|
|
512
|
-
|
|
516
|
+
const c = (t = e.builderContextSignal.content) == null ? void 0 : t.testVariationId, u = (l = e.builderContextSignal.content) == null ? void 0 : l.id;
|
|
517
|
+
D({
|
|
513
518
|
type: "click",
|
|
514
|
-
canTrack:
|
|
519
|
+
canTrack: V(e.canTrack),
|
|
515
520
|
contentId: u,
|
|
516
521
|
apiKey: e.apiKey,
|
|
517
522
|
variationId: c !== u ? c : void 0,
|
|
518
|
-
...
|
|
519
|
-
unique: !
|
|
523
|
+
...ce(n),
|
|
524
|
+
unique: !N
|
|
520
525
|
});
|
|
521
526
|
}
|
|
522
|
-
|
|
527
|
+
N || G(!0);
|
|
523
528
|
}
|
|
524
|
-
function
|
|
525
|
-
var t,
|
|
526
|
-
const n = ((
|
|
529
|
+
function B() {
|
|
530
|
+
var t, l;
|
|
531
|
+
const n = ((l = (t = e.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : l.httpRequests) ?? {};
|
|
527
532
|
Object.entries(n).forEach(([c, u]) => {
|
|
528
|
-
if (!u ||
|
|
533
|
+
if (!u || d[c] || o[c] && !w())
|
|
529
534
|
return;
|
|
530
|
-
|
|
531
|
-
const
|
|
535
|
+
d[c] = !0;
|
|
536
|
+
const y = u.replace(
|
|
532
537
|
/{{([^}]+)}}/g,
|
|
533
|
-
(
|
|
534
|
-
|
|
535
|
-
code:
|
|
538
|
+
(k, Y) => String(
|
|
539
|
+
U({
|
|
540
|
+
code: Y,
|
|
536
541
|
context: e.context || {},
|
|
537
542
|
localState: void 0,
|
|
538
543
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -541,24 +546,24 @@ function Be(e) {
|
|
|
541
546
|
})
|
|
542
547
|
)
|
|
543
548
|
);
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
[c]:
|
|
547
|
-
}),
|
|
548
|
-
}).catch((
|
|
549
|
-
console.error("error fetching dynamic data", u,
|
|
549
|
+
re(y).then((k) => k.json()).then((k) => {
|
|
550
|
+
s({
|
|
551
|
+
[c]: k
|
|
552
|
+
}), o[c] = !0;
|
|
553
|
+
}).catch((k) => {
|
|
554
|
+
console.error("error fetching dynamic data", u, k);
|
|
550
555
|
}).finally(() => {
|
|
551
|
-
|
|
556
|
+
d[c] = !1;
|
|
552
557
|
});
|
|
553
558
|
});
|
|
554
559
|
}
|
|
555
560
|
function P() {
|
|
556
|
-
|
|
561
|
+
w() && window.dispatchEvent(
|
|
557
562
|
new CustomEvent(
|
|
558
563
|
"builder:component:stateChange",
|
|
559
564
|
{
|
|
560
565
|
detail: {
|
|
561
|
-
state:
|
|
566
|
+
state: le(e.builderContextSignal.rootState),
|
|
562
567
|
ref: {
|
|
563
568
|
name: e.model
|
|
564
569
|
}
|
|
@@ -567,8 +572,8 @@ function Be(e) {
|
|
|
567
572
|
)
|
|
568
573
|
);
|
|
569
574
|
}
|
|
570
|
-
function
|
|
571
|
-
window.addEventListener("message",
|
|
575
|
+
function L(n) {
|
|
576
|
+
window.addEventListener("message", h), oe(), de({
|
|
572
577
|
...e.locale ? {
|
|
573
578
|
locale: e.locale
|
|
574
579
|
} : {},
|
|
@@ -582,117 +587,116 @@ function Be(e) {
|
|
|
582
587
|
e.builderContextSignal.componentInfos
|
|
583
588
|
).forEach((t) => {
|
|
584
589
|
var c;
|
|
585
|
-
const
|
|
586
|
-
(c = window.parent) == null || c.postMessage(
|
|
590
|
+
const l = se(t);
|
|
591
|
+
(c = window.parent) == null || c.postMessage(l, "*");
|
|
587
592
|
}), window.addEventListener(
|
|
588
593
|
"builder:component:stateChangeListenerActivated",
|
|
589
594
|
P
|
|
590
595
|
);
|
|
591
596
|
}
|
|
592
|
-
function
|
|
593
|
-
const t = new URL(location.href).searchParams,
|
|
594
|
-
`builder.preview.${
|
|
597
|
+
function j(n) {
|
|
598
|
+
const t = new URL(location.href).searchParams, l = t.get("builder.preview"), c = t.get(
|
|
599
|
+
`builder.preview.${l}`
|
|
595
600
|
), u = t.get("apiKey") || t.get("builder.space");
|
|
596
|
-
|
|
601
|
+
l === e.model && u === e.apiKey && (!e.content || c === e.content.id) && ue({
|
|
597
602
|
model: e.model,
|
|
598
603
|
apiKey: e.apiKey,
|
|
599
604
|
apiVersion: e.builderContextSignal.apiVersion
|
|
600
|
-
}).then((
|
|
601
|
-
|
|
605
|
+
}).then((y) => {
|
|
606
|
+
y && S(y);
|
|
602
607
|
});
|
|
603
608
|
}
|
|
604
|
-
const
|
|
609
|
+
const X = be();
|
|
605
610
|
return f(() => {
|
|
606
611
|
var n;
|
|
607
|
-
return (n =
|
|
612
|
+
return (n = i.current) == null || n.addEventListener(
|
|
608
613
|
"initeditingbldr",
|
|
609
|
-
|
|
614
|
+
L
|
|
610
615
|
), () => {
|
|
611
616
|
var t;
|
|
612
|
-
return (t =
|
|
617
|
+
return (t = i.current) == null ? void 0 : t.removeEventListener(
|
|
613
618
|
"initeditingbldr",
|
|
614
|
-
|
|
619
|
+
L
|
|
615
620
|
);
|
|
616
621
|
};
|
|
617
622
|
}, []), f(() => {
|
|
618
623
|
var n;
|
|
619
|
-
return (n =
|
|
624
|
+
return (n = i.current) == null || n.addEventListener(
|
|
620
625
|
"initpreviewingbldr",
|
|
621
|
-
|
|
626
|
+
j
|
|
622
627
|
), () => {
|
|
623
628
|
var t;
|
|
624
|
-
return (t =
|
|
629
|
+
return (t = i.current) == null ? void 0 : t.removeEventListener(
|
|
625
630
|
"initpreviewingbldr",
|
|
626
|
-
|
|
631
|
+
j
|
|
627
632
|
);
|
|
628
633
|
};
|
|
629
634
|
}, []), f(() => {
|
|
630
635
|
var n, t;
|
|
631
|
-
if (
|
|
632
|
-
if (
|
|
633
|
-
const c = (n = e.builderContextSignal.content) == null ? void 0 : n.testVariationId, u = (t = e.builderContextSignal.content) == null ? void 0 : t.id,
|
|
634
|
-
|
|
636
|
+
if (_()) {
|
|
637
|
+
if (w() && i.current && i.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && V(e.canTrack)) {
|
|
638
|
+
const c = (n = e.builderContextSignal.content) == null ? void 0 : n.testVariationId, u = (t = e.builderContextSignal.content) == null ? void 0 : t.id, y = e.apiKey;
|
|
639
|
+
D({
|
|
635
640
|
type: "impression",
|
|
636
641
|
canTrack: !0,
|
|
637
642
|
contentId: u,
|
|
638
|
-
apiKey:
|
|
643
|
+
apiKey: y,
|
|
639
644
|
variationId: c !== u ? c : void 0
|
|
640
645
|
});
|
|
641
646
|
}
|
|
642
|
-
|
|
647
|
+
ee() && w();
|
|
643
648
|
}
|
|
644
649
|
}, []), f(() => {
|
|
645
|
-
e.apiKey ||
|
|
650
|
+
e.apiKey || te.error(
|
|
646
651
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
647
|
-
),
|
|
652
|
+
), b(), B(), P();
|
|
648
653
|
}, []), f(() => {
|
|
649
654
|
}, [e.content]), f(() => {
|
|
650
|
-
|
|
651
|
-
}, [(
|
|
652
|
-
|
|
653
|
-
}, [(
|
|
655
|
+
b();
|
|
656
|
+
}, [(K = (W = e.builderContextSignal.content) == null ? void 0 : W.data) == null ? void 0 : K.jsCode]), f(() => {
|
|
657
|
+
B();
|
|
658
|
+
}, [(F = (A = e.builderContextSignal.content) == null ? void 0 : A.data) == null ? void 0 : F.httpRequests]), f(() => {
|
|
654
659
|
P();
|
|
655
660
|
}, [e.builderContextSignal.rootState]), f(() => {
|
|
656
|
-
e.data &&
|
|
661
|
+
e.data && s(e.data);
|
|
657
662
|
}, [e.data]), f(() => {
|
|
658
|
-
e.locale &&
|
|
663
|
+
e.locale && s({
|
|
659
664
|
locale: e.locale
|
|
660
665
|
});
|
|
661
666
|
}, [e.locale]), f(() => () => {
|
|
662
|
-
|
|
667
|
+
_() && (window.removeEventListener("message", h), window.removeEventListener(
|
|
663
668
|
"builder:component:stateChangeListenerActivated",
|
|
664
669
|
P
|
|
665
670
|
));
|
|
666
|
-
}, []), /* @__PURE__ */
|
|
667
|
-
|
|
671
|
+
}, []), /* @__PURE__ */ a(he.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ a(
|
|
672
|
+
g,
|
|
668
673
|
{
|
|
669
|
-
ref:
|
|
670
|
-
onClick: (n) =>
|
|
671
|
-
"builder-content-id": (
|
|
674
|
+
ref: i,
|
|
675
|
+
onClick: (n) => Q(n),
|
|
676
|
+
"builder-content-id": (z = e.builderContextSignal.content) == null ? void 0 : z.id,
|
|
672
677
|
"builder-model": e.model,
|
|
673
|
-
...
|
|
674
|
-
hidden: !0,
|
|
675
|
-
"aria-hidden": !0
|
|
676
|
-
},
|
|
678
|
+
...r(),
|
|
677
679
|
...e.contentWrapperProps,
|
|
678
|
-
className:
|
|
680
|
+
className: ne(
|
|
681
|
+
((M = e.content) == null ? void 0 : M.testVariationId) || ((q = e.content) == null ? void 0 : q.id)
|
|
682
|
+
),
|
|
679
683
|
children: e.children
|
|
680
684
|
}
|
|
681
685
|
) : null });
|
|
682
686
|
}
|
|
683
687
|
export {
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
688
|
+
Ce as B,
|
|
689
|
+
Te as C,
|
|
690
|
+
J as D,
|
|
691
|
+
Ne as E,
|
|
692
|
+
Ie as F,
|
|
693
|
+
we as I,
|
|
694
|
+
Re as S,
|
|
695
|
+
Le as V,
|
|
696
|
+
Ee as a,
|
|
697
|
+
Be as b,
|
|
698
|
+
ke as c,
|
|
699
|
+
Pe as d,
|
|
700
|
+
je as e,
|
|
701
|
+
he as f
|
|
698
702
|
};
|