@builder.io/sdk-react 1.0.21 → 1.0.23
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 +22 -22
- package/lib/browser/blocks-exports.mjs +439 -445
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-166d8ec9.js → server-entry-4ca9f249.js} +81 -82
- package/lib/browser/server-entry-f69e2b2a.cjs +2 -0
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/blocks-5539f58f.cjs +32 -0
- package/lib/edge/{blocks-793a81d9.js → blocks-93608689.js} +751 -757
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-f62c1e15.cjs → button-7e98d8f3.cjs} +1 -1
- package/lib/edge/{button-659db379.js → button-8816ab35.js} +2 -2
- package/lib/edge/{columns-5fe66f05.cjs → columns-8db639b5.cjs} +1 -1
- package/lib/edge/{columns-07ef2925.js → columns-d065e3c4.js} +3 -3
- package/lib/edge/{content-variants-9aedb66d.cjs → content-variants-44d061f2.cjs} +4 -4
- package/lib/edge/{content-variants-fcba4b5b.js → content-variants-f416bff5.js} +21 -21
- package/lib/edge/{form-5c293cd8.cjs → form-44ceed15.cjs} +1 -1
- package/lib/edge/{form-82e6d435.js → form-8526db32.js} +3 -3
- package/lib/edge/{get-class-prop-name-c54d7ada.cjs → get-class-prop-name-7b951501.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-6242df6a.js → get-class-prop-name-e85bf7a3.js} +1 -1
- package/lib/edge/{img-11c91db6.js → img-5ef224a8.js} +1 -1
- package/lib/edge/{img-73cc7d69.cjs → img-a5802e2b.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-6b8ac645.js → input-3f85283b.js} +1 -1
- package/lib/edge/{input-9c7d1291.cjs → input-f1aa0191.cjs} +1 -1
- package/lib/edge/{select-f324140d.js → select-4fe889b6.js} +1 -1
- package/lib/edge/{select-42de6b22.cjs → select-d4c018c0.cjs} +1 -1
- package/lib/edge/server-entry-c4b7844d.cjs +2 -0
- package/lib/edge/{server-entry-396b1a7b.js → server-entry-e1e18fd2.js} +80 -81
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-746347ff.cjs → slot-2a11e808.cjs} +1 -1
- package/lib/edge/{slot-4e55a3d1.js → slot-97599025.js} +3 -3
- package/lib/edge/{symbol-e3905b86.js → symbol-a90a41a3.js} +2 -2
- package/lib/edge/{symbol-4b8cffaa.cjs → symbol-dbb5c95e.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +23 -23
- package/lib/node/blocks-exports.mjs +431 -437
- 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-2a838da2.cjs → node-runtime-11a8cdfe.cjs} +1 -1
- package/lib/node/{node-runtime-eb3ca94b.js → node-runtime-8062cfb8.js} +1 -1
- package/lib/node/{server-entry-54c1491b.js → server-entry-3e54c767.js} +81 -82
- package/lib/node/server-entry-461bfaf9.cjs +2 -0
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/components/block/animator.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/is-previewing.d.ts +1 -1
- package/lib/browser/server-entry-c6e9a10a.cjs +0 -2
- package/lib/edge/blocks-c26b2ffc.cjs +0 -32
- package/lib/edge/server-entry-bc7f82dd.cjs +0 -2
- package/lib/node/server-entry-cb0df432.cjs +0 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
var Le = Object.defineProperty;
|
|
3
3
|
var De = (e, t, n) => t in e ? Le(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
|
-
var
|
|
4
|
+
var te = (e, t, n) => (De(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
5
5
|
import { jsx as s, Fragment as T, jsxs as B } from "react/jsx-runtime";
|
|
6
|
-
import { TARGET as
|
|
7
|
-
import { createContext as
|
|
8
|
-
import { getFunctionArguments as _e, runInNode as ze, parseCode as Je, getBuilderGlobals as Ye, set as
|
|
6
|
+
import { TARGET as K, checkIsDefined as J, logger as X, isBrowser as Y, fastClone as oe, isEditing as A, registerInsertMenu as Me, setupBrowserForEditing as je, createRegisterComponentMessage as Oe, getDefaultCanTrack as G, _track as ce, isPreviewing as Ue, fetchOneEntry as xe, createEditorListener as He, fetch as Ke, serializeComponentInfo as de, handleABTestingSync as qe } from "./server-entry-3e54c767.js";
|
|
7
|
+
import { createContext as Se, useState as I, useEffect as V, useContext as ue, useRef as Z, createElement as ve } from "react";
|
|
8
|
+
import { getFunctionArguments as _e, runInNode as ze, parseCode as Je, getBuilderGlobals as Ye, set as ke } from "./node-runtime-8062cfb8.js";
|
|
9
9
|
const Ge = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Qe = (e) => typeof e == "string" && Ge.has(e.toLowerCase());
|
|
10
10
|
function ae(e) {
|
|
11
11
|
return /* @__PURE__ */ s(T, { children: Qe(e.TagName) ? /* @__PURE__ */ s(T, { children: /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ s(T, { 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 }) }) });
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
switch (
|
|
13
|
+
const U = () => {
|
|
14
|
+
switch (K) {
|
|
15
15
|
case "react":
|
|
16
16
|
case "reactNative":
|
|
17
17
|
case "rsc":
|
|
@@ -29,7 +29,7 @@ function Xe(e) {
|
|
|
29
29
|
{
|
|
30
30
|
attributes: {
|
|
31
31
|
...e.attributes,
|
|
32
|
-
[
|
|
32
|
+
[U()]: `${e.link ? "" : "builder-button"} ${e.attributes[U()] || ""}`,
|
|
33
33
|
...e.link ? {
|
|
34
34
|
href: e.link,
|
|
35
35
|
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
@@ -44,7 +44,7 @@ function Xe(e) {
|
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
|
-
const re =
|
|
47
|
+
const re = Se({
|
|
48
48
|
content: null,
|
|
49
49
|
context: {},
|
|
50
50
|
localState: void 0,
|
|
@@ -57,7 +57,7 @@ const re = ke({
|
|
|
57
57
|
inheritedStyles: {},
|
|
58
58
|
BlocksWrapper: "div",
|
|
59
59
|
BlocksWrapperProps: {}
|
|
60
|
-
}),
|
|
60
|
+
}), Ce = Se({ registeredComponents: {} });
|
|
61
61
|
function Ze(e) {
|
|
62
62
|
var t;
|
|
63
63
|
return {
|
|
@@ -82,7 +82,7 @@ const et = ({
|
|
|
82
82
|
builder: t,
|
|
83
83
|
context: n,
|
|
84
84
|
event: i,
|
|
85
|
-
state:
|
|
85
|
+
state: we({
|
|
86
86
|
rootState: a,
|
|
87
87
|
localState: o,
|
|
88
88
|
rootSetState: r
|
|
@@ -90,7 +90,7 @@ const et = ({
|
|
|
90
90
|
});
|
|
91
91
|
return new Function(...l.map(([d]) => d), e)(...l.map(([, d]) => d));
|
|
92
92
|
};
|
|
93
|
-
function
|
|
93
|
+
function we({
|
|
94
94
|
rootState: e,
|
|
95
95
|
localState: t,
|
|
96
96
|
rootSetState: n
|
|
@@ -100,7 +100,7 @@ function Te({
|
|
|
100
100
|
if (t && o in t)
|
|
101
101
|
return t[o];
|
|
102
102
|
const r = i[o];
|
|
103
|
-
return typeof r == "object" && r !== null ?
|
|
103
|
+
return typeof r == "object" && r !== null ? we({
|
|
104
104
|
rootState: r,
|
|
105
105
|
localState: void 0,
|
|
106
106
|
rootSetState: n ? (a) => {
|
|
@@ -124,8 +124,8 @@ const nt = () => {
|
|
|
124
124
|
if (!tt())
|
|
125
125
|
return !1;
|
|
126
126
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
|
|
127
|
-
return e && t && !n ? (
|
|
128
|
-
}, it = (e) => Y() || nt() ? et(e) : ze(e),
|
|
127
|
+
return e && t && !n ? (X.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
128
|
+
}, it = (e) => Y() || nt() ? et(e) : ze(e), $ = class $ {
|
|
129
129
|
static getCacheKey(t) {
|
|
130
130
|
return JSON.stringify({
|
|
131
131
|
...t,
|
|
@@ -135,17 +135,17 @@ const nt = () => {
|
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
static getCachedValue(t) {
|
|
138
|
-
return
|
|
138
|
+
return $.cache.get(t);
|
|
139
139
|
}
|
|
140
140
|
static setCachedValue(t, n) {
|
|
141
|
-
|
|
141
|
+
$.cache.size > 20 && $.cache.delete($.cache.keys().next().value), $.cache.set(t, {
|
|
142
142
|
value: n
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
-
|
|
147
|
-
let
|
|
148
|
-
function
|
|
146
|
+
te($, "cacheLimit", 20), te($, "cache", /* @__PURE__ */ new Map());
|
|
147
|
+
let M = $;
|
|
148
|
+
function H({
|
|
149
149
|
code: e,
|
|
150
150
|
context: t,
|
|
151
151
|
localState: n,
|
|
@@ -155,10 +155,8 @@ function K({
|
|
|
155
155
|
isExpression: a = !0,
|
|
156
156
|
enableCache: l
|
|
157
157
|
}) {
|
|
158
|
-
if (e === "")
|
|
159
|
-
U.warn("Skipping evaluation of empty code block.");
|
|
158
|
+
if (e === "")
|
|
160
159
|
return;
|
|
161
|
-
}
|
|
162
160
|
const d = {
|
|
163
161
|
code: Je(e, {
|
|
164
162
|
isExpression: a
|
|
@@ -171,19 +169,19 @@ function K({
|
|
|
171
169
|
localState: n
|
|
172
170
|
};
|
|
173
171
|
if (l) {
|
|
174
|
-
const c =
|
|
172
|
+
const c = M.getCacheKey(d), m = M.getCachedValue(c);
|
|
175
173
|
if (m)
|
|
176
174
|
return m.value;
|
|
177
175
|
}
|
|
178
176
|
try {
|
|
179
177
|
const c = it(d);
|
|
180
178
|
if (l) {
|
|
181
|
-
const m =
|
|
182
|
-
|
|
179
|
+
const m = M.getCacheKey(d);
|
|
180
|
+
M.setCachedValue(m, c);
|
|
183
181
|
}
|
|
184
182
|
return c;
|
|
185
183
|
} catch (c) {
|
|
186
|
-
|
|
184
|
+
X.error("Failed code evaluation: " + c.message, {
|
|
187
185
|
code: e
|
|
188
186
|
});
|
|
189
187
|
return;
|
|
@@ -208,7 +206,7 @@ const ot = ({
|
|
|
208
206
|
}
|
|
209
207
|
};
|
|
210
208
|
for (const l in e.bindings) {
|
|
211
|
-
const d = e.bindings[l], c =
|
|
209
|
+
const d = e.bindings[l], c = H({
|
|
212
210
|
code: d,
|
|
213
211
|
localState: n,
|
|
214
212
|
rootState: i,
|
|
@@ -216,7 +214,7 @@ const ot = ({
|
|
|
216
214
|
context: t,
|
|
217
215
|
enableCache: !0
|
|
218
216
|
});
|
|
219
|
-
|
|
217
|
+
ke(a, l, c);
|
|
220
218
|
}
|
|
221
219
|
return a;
|
|
222
220
|
};
|
|
@@ -249,7 +247,7 @@ function at(e, t, n = {}) {
|
|
|
249
247
|
return i = this, o = arguments, m <= 0 || m > t ? (a && (clearTimeout(a), a = null), l = c, r = e.apply(i, o), a || (i = o = null)) : !a && n.trailing !== !1 && (a = setTimeout(d, m)), r;
|
|
250
248
|
};
|
|
251
249
|
}
|
|
252
|
-
function
|
|
250
|
+
function O(e, ...t) {
|
|
253
251
|
const n = Object(e);
|
|
254
252
|
for (let i = 1; i < arguments.length; i++) {
|
|
255
253
|
const o = arguments[i];
|
|
@@ -266,18 +264,15 @@ function rt(e) {
|
|
|
266
264
|
case "pageLoad":
|
|
267
265
|
Ee(t);
|
|
268
266
|
break;
|
|
269
|
-
case "hover":
|
|
270
|
-
st(t);
|
|
271
|
-
break;
|
|
272
267
|
case "scrollInView":
|
|
273
|
-
|
|
268
|
+
st(t);
|
|
274
269
|
break;
|
|
275
270
|
}
|
|
276
271
|
}
|
|
277
|
-
function
|
|
272
|
+
function Ie(e) {
|
|
278
273
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
279
274
|
}
|
|
280
|
-
function
|
|
275
|
+
function Te(e, t) {
|
|
281
276
|
const n = lt(e), i = getComputedStyle(t), o = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, a = [o, r];
|
|
282
277
|
for (const l of a)
|
|
283
278
|
for (const d of n)
|
|
@@ -293,12 +288,12 @@ function lt(e) {
|
|
|
293
288
|
function Ee(e) {
|
|
294
289
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
295
290
|
if (!t.length) {
|
|
296
|
-
|
|
291
|
+
Ie(e.elementId || e.id || "");
|
|
297
292
|
return;
|
|
298
293
|
}
|
|
299
294
|
Array.from(t).forEach((n) => {
|
|
300
|
-
|
|
301
|
-
n.style.transition = `all ${e.duration}s ${le(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"),
|
|
295
|
+
Te(e, n), n.style.transition = "none", n.style.transitionDelay = "0", O(n.style, e.steps[0].styles), setTimeout(() => {
|
|
296
|
+
n.style.transition = `all ${e.duration}s ${le(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), O(n.style, e.steps[1].styles), setTimeout(() => {
|
|
302
297
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
303
298
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
304
299
|
});
|
|
@@ -307,49 +302,29 @@ function Ee(e) {
|
|
|
307
302
|
function st(e) {
|
|
308
303
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
309
304
|
if (!t.length) {
|
|
310
|
-
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
|
-
Array.from(t).forEach((n) => {
|
|
314
|
-
ce(e, n);
|
|
315
|
-
const i = e.steps[0].styles, o = e.steps[1].styles;
|
|
316
|
-
function r() {
|
|
317
|
-
D(n.style, i);
|
|
318
|
-
}
|
|
319
|
-
function a() {
|
|
320
|
-
D(n.style, o);
|
|
321
|
-
}
|
|
322
|
-
r(), n.addEventListener("mouseenter", a), n.addEventListener("mouseleave", r), setTimeout(() => {
|
|
323
|
-
n.style.transition = `all ${e.duration}s ${le(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
function ct(e) {
|
|
328
|
-
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
329
|
-
if (!t.length) {
|
|
330
|
-
se(e.elementId || e.id || "");
|
|
305
|
+
Ie(e.elementId || e.id || "");
|
|
331
306
|
return;
|
|
332
307
|
}
|
|
333
308
|
Array.from(t).forEach((n) => {
|
|
334
|
-
|
|
309
|
+
Te(e, n);
|
|
335
310
|
let i = !1, o = !1;
|
|
336
311
|
function r() {
|
|
337
312
|
!i && l(n) ? (i = !0, o = !0, setTimeout(() => {
|
|
338
|
-
|
|
313
|
+
O(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", a), setTimeout(() => {
|
|
339
314
|
o = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
340
315
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
341
|
-
})) : e.repeat && i && !o && !l(n) && (i = !1,
|
|
316
|
+
})) : e.repeat && i && !o && !l(n) && (i = !1, O(n.style, e.steps[0].styles));
|
|
342
317
|
}
|
|
343
318
|
const a = at(r, 200, {
|
|
344
319
|
leading: !1
|
|
345
320
|
});
|
|
346
321
|
function l(m) {
|
|
347
|
-
const f = m.getBoundingClientRect(), g = window.innerHeight,
|
|
348
|
-
return f.bottom >
|
|
322
|
+
const f = m.getBoundingClientRect(), g = window.innerHeight, x = (e.thresholdPercent || 0) / 100 * g;
|
|
323
|
+
return f.bottom > x && f.top < g - x;
|
|
349
324
|
}
|
|
350
325
|
const d = e.steps[0].styles;
|
|
351
326
|
function c() {
|
|
352
|
-
|
|
327
|
+
O(n.style, d);
|
|
353
328
|
}
|
|
354
329
|
c(), setTimeout(() => {
|
|
355
330
|
n.style.transition = `all ${e.duration}s ${le(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
@@ -359,37 +334,37 @@ function ct(e) {
|
|
|
359
334
|
}), r();
|
|
360
335
|
});
|
|
361
336
|
}
|
|
362
|
-
const
|
|
337
|
+
const ct = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Re = (e) => Object.entries(e).map(([n, i]) => {
|
|
363
338
|
if (typeof i == "string")
|
|
364
|
-
return `${
|
|
365
|
-
}).filter(J),
|
|
366
|
-
`),
|
|
339
|
+
return `${ct(n)}: ${i};`;
|
|
340
|
+
}).filter(J), dt = (e) => Re(e).join(`
|
|
341
|
+
`), _ = ({
|
|
367
342
|
mediaQuery: e,
|
|
368
343
|
className: t,
|
|
369
344
|
styles: n
|
|
370
345
|
}) => {
|
|
371
346
|
const i = `.${t} {
|
|
372
|
-
${
|
|
347
|
+
${dt(n)}
|
|
373
348
|
}`;
|
|
374
349
|
return e ? `${e} {
|
|
375
350
|
${i}
|
|
376
351
|
}` : i;
|
|
377
352
|
};
|
|
378
|
-
function
|
|
353
|
+
function ut({
|
|
379
354
|
style: e
|
|
380
355
|
}) {
|
|
381
356
|
return e;
|
|
382
357
|
}
|
|
383
|
-
const
|
|
358
|
+
const mt = ({
|
|
384
359
|
block: e,
|
|
385
360
|
context: t
|
|
386
|
-
}) => Pe(
|
|
361
|
+
}) => Pe(ut({
|
|
387
362
|
style: e.style || {},
|
|
388
363
|
context: t,
|
|
389
364
|
block: e
|
|
390
365
|
}));
|
|
391
366
|
function Pe(e) {
|
|
392
|
-
switch (
|
|
367
|
+
switch (K) {
|
|
393
368
|
case "svelte":
|
|
394
369
|
case "vue":
|
|
395
370
|
case "solid":
|
|
@@ -401,7 +376,7 @@ function Pe(e) {
|
|
|
401
376
|
return e;
|
|
402
377
|
}
|
|
403
378
|
}
|
|
404
|
-
const
|
|
379
|
+
const ft = ({
|
|
405
380
|
block: e,
|
|
406
381
|
context: t,
|
|
407
382
|
registeredComponents: n
|
|
@@ -423,7 +398,7 @@ const ht = ({
|
|
|
423
398
|
console.warn(`
|
|
424
399
|
Could not find a registered component named "${i}".
|
|
425
400
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
426
|
-
},
|
|
401
|
+
}, ht = ({
|
|
427
402
|
block: e,
|
|
428
403
|
context: t
|
|
429
404
|
}) => {
|
|
@@ -433,7 +408,7 @@ const ht = ({
|
|
|
433
408
|
} = e;
|
|
434
409
|
if (!(n != null && n.collection))
|
|
435
410
|
return;
|
|
436
|
-
const o =
|
|
411
|
+
const o = H({
|
|
437
412
|
code: n.collection,
|
|
438
413
|
localState: t.localState,
|
|
439
414
|
rootState: t.rootState,
|
|
@@ -473,7 +448,7 @@ const ht = ({
|
|
|
473
448
|
default: 991,
|
|
474
449
|
max: 1200
|
|
475
450
|
}
|
|
476
|
-
},
|
|
451
|
+
}, me = (e, t = Ve) => `@media (max-width: ${t[e].max}px)`, Be = ({
|
|
477
452
|
small: e,
|
|
478
453
|
medium: t
|
|
479
454
|
}) => {
|
|
@@ -500,7 +475,7 @@ const ht = ({
|
|
|
500
475
|
default: r + 1
|
|
501
476
|
}, n;
|
|
502
477
|
};
|
|
503
|
-
function
|
|
478
|
+
function ee(e) {
|
|
504
479
|
return /* @__PURE__ */ s(
|
|
505
480
|
"style",
|
|
506
481
|
{
|
|
@@ -509,7 +484,7 @@ function Z(e) {
|
|
|
509
484
|
}
|
|
510
485
|
);
|
|
511
486
|
}
|
|
512
|
-
function
|
|
487
|
+
function gt(e) {
|
|
513
488
|
function t() {
|
|
514
489
|
const i = Q({
|
|
515
490
|
block: e.block,
|
|
@@ -522,7 +497,7 @@ function bt(e) {
|
|
|
522
497
|
return J(i.hide) ? !i.hide : J(i.show) ? i.show : !0;
|
|
523
498
|
}
|
|
524
499
|
function n() {
|
|
525
|
-
var
|
|
500
|
+
var w, E, p;
|
|
526
501
|
const i = Q({
|
|
527
502
|
block: e.block,
|
|
528
503
|
localState: e.context.localState,
|
|
@@ -531,36 +506,55 @@ function bt(e) {
|
|
|
531
506
|
context: e.context.context,
|
|
532
507
|
shouldEvaluateBindings: !0
|
|
533
508
|
}), o = i.responsiveStyles, r = e.context.content, a = Be(
|
|
534
|
-
((
|
|
509
|
+
((w = r == null ? void 0 : r.meta) == null ? void 0 : w.breakpoints) || {}
|
|
535
510
|
), l = o == null ? void 0 : o.large, d = o == null ? void 0 : o.medium, c = o == null ? void 0 : o.small, m = i.id;
|
|
536
511
|
if (!m)
|
|
537
512
|
return "";
|
|
538
|
-
const f = l ?
|
|
513
|
+
const f = l ? _({
|
|
539
514
|
className: m,
|
|
540
515
|
styles: l
|
|
541
|
-
}) : "", g = d ?
|
|
516
|
+
}) : "", g = d ? _({
|
|
542
517
|
className: m,
|
|
543
518
|
styles: d,
|
|
544
|
-
mediaQuery:
|
|
519
|
+
mediaQuery: me(
|
|
545
520
|
"medium",
|
|
546
521
|
a
|
|
547
522
|
)
|
|
548
|
-
}) : "", y = c ?
|
|
523
|
+
}) : "", y = c ? _({
|
|
549
524
|
className: m,
|
|
550
525
|
styles: c,
|
|
551
|
-
mediaQuery:
|
|
526
|
+
mediaQuery: me(
|
|
552
527
|
"small",
|
|
553
528
|
a
|
|
554
529
|
)
|
|
555
|
-
}) : "";
|
|
556
|
-
|
|
530
|
+
}) : "", x = i.animations && i.animations.find((v) => v.trigger === "hover");
|
|
531
|
+
let k = "";
|
|
532
|
+
if (x) {
|
|
533
|
+
const v = ((p = (E = x.steps) == null ? void 0 : E[1]) == null ? void 0 : p.styles) || {};
|
|
534
|
+
k = _({
|
|
535
|
+
className: `${m}:hover`,
|
|
536
|
+
styles: {
|
|
537
|
+
...v,
|
|
538
|
+
transition: `all ${x.duration}s ${le(
|
|
539
|
+
x.easing
|
|
540
|
+
)}`,
|
|
541
|
+
transitionDelay: x.delay ? `${x.delay}s` : "0s"
|
|
542
|
+
}
|
|
543
|
+
}) || "";
|
|
544
|
+
}
|
|
545
|
+
return [
|
|
546
|
+
f,
|
|
547
|
+
g,
|
|
548
|
+
y,
|
|
549
|
+
k
|
|
550
|
+
].join(" ");
|
|
557
551
|
}
|
|
558
|
-
return /* @__PURE__ */ s(T, { children: n() && t() ? /* @__PURE__ */ s(T, { children: /* @__PURE__ */ s(
|
|
552
|
+
return /* @__PURE__ */ s(T, { children: n() && t() ? /* @__PURE__ */ s(T, { children: /* @__PURE__ */ s(ee, { id: "builderio-block", styles: n() }) }) : null });
|
|
559
553
|
}
|
|
560
|
-
function
|
|
554
|
+
function bt(e) {
|
|
561
555
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
562
556
|
}
|
|
563
|
-
const
|
|
557
|
+
const yt = (e) => `on${bt(e)}`, pt = (e, t) => (n) => H({
|
|
564
558
|
code: e,
|
|
565
559
|
context: t.context,
|
|
566
560
|
localState: t.localState,
|
|
@@ -577,9 +571,9 @@ function We(e) {
|
|
|
577
571
|
if (!n.hasOwnProperty(o))
|
|
578
572
|
continue;
|
|
579
573
|
const r = n[o];
|
|
580
|
-
let a =
|
|
574
|
+
let a = yt(o);
|
|
581
575
|
if (e.stripPrefix)
|
|
582
|
-
switch (
|
|
576
|
+
switch (K) {
|
|
583
577
|
case "vue":
|
|
584
578
|
a = a.replace("v-on:", "");
|
|
585
579
|
break;
|
|
@@ -587,45 +581,45 @@ function We(e) {
|
|
|
587
581
|
a = a.replace("on:", "");
|
|
588
582
|
break;
|
|
589
583
|
}
|
|
590
|
-
t[a] =
|
|
584
|
+
t[a] = pt(r, e);
|
|
591
585
|
}
|
|
592
586
|
return t;
|
|
593
587
|
}
|
|
594
|
-
function
|
|
588
|
+
function xt({
|
|
595
589
|
properties: e
|
|
596
590
|
}) {
|
|
597
591
|
return e;
|
|
598
592
|
}
|
|
599
|
-
const
|
|
593
|
+
const St = (e) => ({
|
|
600
594
|
href: e.href
|
|
601
595
|
});
|
|
602
|
-
function
|
|
596
|
+
function se({
|
|
603
597
|
block: e,
|
|
604
598
|
context: t
|
|
605
599
|
}) {
|
|
606
600
|
var i;
|
|
607
601
|
const n = {
|
|
608
|
-
...
|
|
602
|
+
...St(e),
|
|
609
603
|
...e.properties,
|
|
610
604
|
"builder-id": e.id,
|
|
611
|
-
style:
|
|
605
|
+
style: mt({
|
|
612
606
|
block: e,
|
|
613
607
|
context: t
|
|
614
608
|
}),
|
|
615
|
-
[
|
|
609
|
+
[U()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
616
610
|
};
|
|
617
|
-
return
|
|
611
|
+
return xt({
|
|
618
612
|
properties: n,
|
|
619
613
|
context: t,
|
|
620
614
|
block: e
|
|
621
615
|
});
|
|
622
616
|
}
|
|
623
|
-
function
|
|
617
|
+
function vt(e) {
|
|
624
618
|
return /* @__PURE__ */ s(
|
|
625
619
|
ae,
|
|
626
620
|
{
|
|
627
621
|
TagName: e.Wrapper,
|
|
628
|
-
attributes:
|
|
622
|
+
attributes: se({
|
|
629
623
|
block: e.block,
|
|
630
624
|
context: e.context
|
|
631
625
|
}),
|
|
@@ -641,13 +635,13 @@ function kt(e) {
|
|
|
641
635
|
}
|
|
642
636
|
);
|
|
643
637
|
}
|
|
644
|
-
function
|
|
638
|
+
function kt(e) {
|
|
645
639
|
return /* @__PURE__ */ s(
|
|
646
640
|
e.Wrapper,
|
|
647
641
|
{
|
|
648
642
|
...e.wrapperProps,
|
|
649
643
|
attributes: e.includeBlockProps ? {
|
|
650
|
-
...
|
|
644
|
+
...se({
|
|
651
645
|
block: e.block,
|
|
652
646
|
context: e.context
|
|
653
647
|
}),
|
|
@@ -663,7 +657,7 @@ function Ct(e) {
|
|
|
663
657
|
}
|
|
664
658
|
);
|
|
665
659
|
}
|
|
666
|
-
const
|
|
660
|
+
const Ct = ({
|
|
667
661
|
componentOptions: e,
|
|
668
662
|
builderBlock: t,
|
|
669
663
|
context: n,
|
|
@@ -679,7 +673,7 @@ const wt = ({
|
|
|
679
673
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
680
674
|
*/
|
|
681
675
|
...o ? {
|
|
682
|
-
attributes:
|
|
676
|
+
attributes: se({
|
|
683
677
|
block: t,
|
|
684
678
|
context: a
|
|
685
679
|
})
|
|
@@ -693,15 +687,15 @@ const wt = ({
|
|
|
693
687
|
includeBlockProps: o
|
|
694
688
|
} : l;
|
|
695
689
|
};
|
|
696
|
-
function
|
|
690
|
+
function fe(e) {
|
|
697
691
|
var i;
|
|
698
|
-
const [t, n] =
|
|
699
|
-
() => e.isInteractive ?
|
|
692
|
+
const [t, n] = I(
|
|
693
|
+
() => e.isInteractive ? kt : e.componentRef
|
|
700
694
|
);
|
|
701
695
|
return /* @__PURE__ */ s(T, { children: e.componentRef ? /* @__PURE__ */ s(T, { children: /* @__PURE__ */ s(
|
|
702
696
|
t,
|
|
703
697
|
{
|
|
704
|
-
...
|
|
698
|
+
...Ct({
|
|
705
699
|
componentOptions: e.componentOptions,
|
|
706
700
|
builderBlock: e.builderBlock,
|
|
707
701
|
context: e.context,
|
|
@@ -712,7 +706,7 @@ function ge(e) {
|
|
|
712
706
|
contextValue: e.context
|
|
713
707
|
}),
|
|
714
708
|
children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ s(
|
|
715
|
-
|
|
709
|
+
q,
|
|
716
710
|
{
|
|
717
711
|
block: o,
|
|
718
712
|
context: e.context,
|
|
@@ -724,10 +718,10 @@ function ge(e) {
|
|
|
724
718
|
}
|
|
725
719
|
) }) : null });
|
|
726
720
|
}
|
|
727
|
-
function
|
|
728
|
-
const [t, n] =
|
|
721
|
+
function wt(e) {
|
|
722
|
+
const [t, n] = I(() => e.repeatContext);
|
|
729
723
|
return /* @__PURE__ */ s(re.Provider, { value: t, children: /* @__PURE__ */ s(
|
|
730
|
-
|
|
724
|
+
q,
|
|
731
725
|
{
|
|
732
726
|
block: e.block,
|
|
733
727
|
context: t,
|
|
@@ -736,17 +730,17 @@ function It(e) {
|
|
|
736
730
|
}
|
|
737
731
|
) });
|
|
738
732
|
}
|
|
739
|
-
function
|
|
733
|
+
function q(e) {
|
|
740
734
|
var d, c, m;
|
|
741
735
|
function t() {
|
|
742
|
-
return
|
|
736
|
+
return ft({
|
|
743
737
|
block: e.block,
|
|
744
738
|
context: e.context,
|
|
745
739
|
registeredComponents: e.registeredComponents
|
|
746
740
|
});
|
|
747
741
|
}
|
|
748
742
|
function n() {
|
|
749
|
-
return
|
|
743
|
+
return ht({
|
|
750
744
|
block: e.block,
|
|
751
745
|
context: e.context
|
|
752
746
|
});
|
|
@@ -767,9 +761,9 @@ function _(e) {
|
|
|
767
761
|
return e.block.tagName === "a" || ((g = i().properties) == null ? void 0 : g.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
768
762
|
}
|
|
769
763
|
function r() {
|
|
770
|
-
var y,
|
|
764
|
+
var y, x;
|
|
771
765
|
if ((y = e.block.repeat) != null && y.collection)
|
|
772
|
-
return !!((
|
|
766
|
+
return !!((x = n == null ? void 0 : n()) != null && x.length);
|
|
773
767
|
const f = "hide" in i() ? i().hide : !1;
|
|
774
768
|
return ("show" in i() ? i().show : !0) && !f;
|
|
775
769
|
}
|
|
@@ -778,17 +772,17 @@ function _(e) {
|
|
|
778
772
|
return !((g = t == null ? void 0 : t()) != null && g.component) && !n() ? (y = i().children) != null ? y : [] : [];
|
|
779
773
|
}
|
|
780
774
|
function l() {
|
|
781
|
-
var f, g, y,
|
|
775
|
+
var f, g, y, x, k, w, E, p, v, P, R;
|
|
782
776
|
return {
|
|
783
777
|
blockChildren: (f = i().children) != null ? f : [],
|
|
784
778
|
componentRef: (g = t == null ? void 0 : t()) == null ? void 0 : g.component,
|
|
785
779
|
componentOptions: {
|
|
786
780
|
...Ze(i()),
|
|
787
781
|
builderContext: e.context,
|
|
788
|
-
...((y = t == null ? void 0 : t()) == null ? void 0 : y.name) === "Core:Button" || ((
|
|
782
|
+
...((y = t == null ? void 0 : t()) == null ? void 0 : y.name) === "Core:Button" || ((x = t == null ? void 0 : t()) == null ? void 0 : x.name) === "Symbol" || ((k = t == null ? void 0 : t()) == null ? void 0 : k.name) === "Columns" || ((w = t == null ? void 0 : t()) == null ? void 0 : w.name) === "Form:Form" ? {
|
|
789
783
|
builderLinkComponent: e.linkComponent
|
|
790
784
|
} : {},
|
|
791
|
-
...((
|
|
785
|
+
...((E = t == null ? void 0 : t()) == null ? void 0 : E.name) === "Symbol" || ((p = t == null ? void 0 : t()) == null ? void 0 : p.name) === "Columns" || ((v = t == null ? void 0 : t()) == null ? void 0 : v.name) === "Form:Form" ? {
|
|
792
786
|
builderComponents: e.registeredComponents
|
|
793
787
|
} : {}
|
|
794
788
|
},
|
|
@@ -797,21 +791,21 @@ function _(e) {
|
|
|
797
791
|
registeredComponents: e.registeredComponents,
|
|
798
792
|
builderBlock: i(),
|
|
799
793
|
includeBlockProps: ((P = t == null ? void 0 : t()) == null ? void 0 : P.noWrap) === !0,
|
|
800
|
-
isInteractive: !((
|
|
794
|
+
isInteractive: !((R = t == null ? void 0 : t()) != null && R.isRSC)
|
|
801
795
|
};
|
|
802
796
|
}
|
|
803
797
|
return V(() => {
|
|
804
798
|
const f = i().id, g = i().animations;
|
|
805
799
|
g && f && rt(
|
|
806
|
-
g.
|
|
800
|
+
g.map((y) => ({
|
|
807
801
|
...y,
|
|
808
802
|
elementId: f
|
|
809
803
|
}))
|
|
810
804
|
);
|
|
811
805
|
}, []), /* @__PURE__ */ s(T, { children: r() ? /* @__PURE__ */ B(T, { children: [
|
|
812
|
-
/* @__PURE__ */ s(
|
|
806
|
+
/* @__PURE__ */ s(gt, { block: e.block, context: e.context }),
|
|
813
807
|
(d = t == null ? void 0 : t()) != null && d.noWrap ? /* @__PURE__ */ s(T, { children: /* @__PURE__ */ s(
|
|
814
|
-
|
|
808
|
+
fe,
|
|
815
809
|
{
|
|
816
810
|
componentRef: l().componentRef,
|
|
817
811
|
componentOptions: l().componentOptions,
|
|
@@ -824,7 +818,7 @@ function _(e) {
|
|
|
824
818
|
isInteractive: l().isInteractive
|
|
825
819
|
}
|
|
826
820
|
) }) : /* @__PURE__ */ s(T, { children: n() ? /* @__PURE__ */ s(T, { children: (m = n()) == null ? void 0 : m.map((f, g) => /* @__PURE__ */ s(
|
|
827
|
-
|
|
821
|
+
wt,
|
|
828
822
|
{
|
|
829
823
|
repeatContext: f.context,
|
|
830
824
|
block: f.block,
|
|
@@ -833,7 +827,7 @@ function _(e) {
|
|
|
833
827
|
},
|
|
834
828
|
g
|
|
835
829
|
)) }) : /* @__PURE__ */ B(
|
|
836
|
-
|
|
830
|
+
vt,
|
|
837
831
|
{
|
|
838
832
|
Wrapper: o(),
|
|
839
833
|
block: i(),
|
|
@@ -841,7 +835,7 @@ function _(e) {
|
|
|
841
835
|
linkComponent: e.linkComponent,
|
|
842
836
|
children: [
|
|
843
837
|
/* @__PURE__ */ s(
|
|
844
|
-
|
|
838
|
+
fe,
|
|
845
839
|
{
|
|
846
840
|
componentRef: l().componentRef,
|
|
847
841
|
componentOptions: l().componentOptions,
|
|
@@ -855,7 +849,7 @@ function _(e) {
|
|
|
855
849
|
}
|
|
856
850
|
),
|
|
857
851
|
(c = a()) == null ? void 0 : c.map((f) => /* @__PURE__ */ s(
|
|
858
|
-
|
|
852
|
+
q,
|
|
859
853
|
{
|
|
860
854
|
block: f,
|
|
861
855
|
registeredComponents: e.registeredComponents,
|
|
@@ -869,14 +863,14 @@ function _(e) {
|
|
|
869
863
|
) })
|
|
870
864
|
] }) : null });
|
|
871
865
|
}
|
|
872
|
-
function
|
|
866
|
+
function It(e) {
|
|
873
867
|
function t() {
|
|
874
868
|
var o;
|
|
875
869
|
return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
|
|
876
870
|
}
|
|
877
871
|
function n() {
|
|
878
872
|
var o, r;
|
|
879
|
-
|
|
873
|
+
A() && !((o = e.blocks) != null && o.length) && ((r = window.parent) == null || r.postMessage(
|
|
880
874
|
{
|
|
881
875
|
type: "builder.clickEmptyBlocks",
|
|
882
876
|
data: {
|
|
@@ -889,7 +883,7 @@ function Tt(e) {
|
|
|
889
883
|
}
|
|
890
884
|
function i() {
|
|
891
885
|
var o, r;
|
|
892
|
-
|
|
886
|
+
A() && !((o = e.blocks) != null && o.length) && ((r = window.parent) == null || r.postMessage(
|
|
893
887
|
{
|
|
894
888
|
type: "builder.hoverEmptyBlocks",
|
|
895
889
|
data: {
|
|
@@ -922,11 +916,11 @@ function Tt(e) {
|
|
|
922
916
|
}` })
|
|
923
917
|
] });
|
|
924
918
|
}
|
|
925
|
-
function
|
|
919
|
+
function j(e) {
|
|
926
920
|
var i, o, r;
|
|
927
|
-
const t =
|
|
921
|
+
const t = ue(re), n = ue(Ce);
|
|
928
922
|
return /* @__PURE__ */ s(
|
|
929
|
-
|
|
923
|
+
It,
|
|
930
924
|
{
|
|
931
925
|
blocks: e.blocks,
|
|
932
926
|
parent: e.parent,
|
|
@@ -935,7 +929,7 @@ function O(e) {
|
|
|
935
929
|
BlocksWrapper: ((i = e.context) == null ? void 0 : i.BlocksWrapper) || t.BlocksWrapper,
|
|
936
930
|
BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || t.BlocksWrapperProps,
|
|
937
931
|
children: e.blocks ? /* @__PURE__ */ s(T, { children: (r = e.blocks) == null ? void 0 : r.map((a) => /* @__PURE__ */ s(
|
|
938
|
-
|
|
932
|
+
q,
|
|
939
933
|
{
|
|
940
934
|
block: a,
|
|
941
935
|
linkComponent: e.linkComponent,
|
|
@@ -947,34 +941,34 @@ function O(e) {
|
|
|
947
941
|
}
|
|
948
942
|
);
|
|
949
943
|
}
|
|
950
|
-
function
|
|
951
|
-
var
|
|
952
|
-
const [t, n] =
|
|
944
|
+
function Tt(e) {
|
|
945
|
+
var E;
|
|
946
|
+
const [t, n] = I(
|
|
953
947
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
954
|
-
), [i, o] =
|
|
948
|
+
), [i, o] = I(() => e.columns || []), [r, a] = I(
|
|
955
949
|
() => e.stackColumnsAt || "tablet"
|
|
956
950
|
);
|
|
957
951
|
function l(p) {
|
|
958
|
-
var
|
|
959
|
-
return ((
|
|
952
|
+
var v;
|
|
953
|
+
return ((v = i[p]) == null ? void 0 : v.width) || 100 / i.length;
|
|
960
954
|
}
|
|
961
955
|
function d(p) {
|
|
962
|
-
const
|
|
963
|
-
return `calc(${l(p)}% - ${
|
|
956
|
+
const v = t * (i.length - 1) / i.length;
|
|
957
|
+
return `calc(${l(p)}% - ${v}px)`;
|
|
964
958
|
}
|
|
965
959
|
function c({
|
|
966
960
|
stackedStyle: p,
|
|
967
|
-
desktopStyle:
|
|
961
|
+
desktopStyle: v
|
|
968
962
|
}) {
|
|
969
|
-
return r === "tablet" ? p :
|
|
963
|
+
return r === "tablet" ? p : v;
|
|
970
964
|
}
|
|
971
965
|
function m({
|
|
972
966
|
stackedStyle: p,
|
|
973
|
-
desktopStyle:
|
|
967
|
+
desktopStyle: v
|
|
974
968
|
}) {
|
|
975
|
-
return r === "never" ?
|
|
969
|
+
return r === "never" ? v : p;
|
|
976
970
|
}
|
|
977
|
-
const [f, g] =
|
|
971
|
+
const [f, g] = I(
|
|
978
972
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
979
973
|
);
|
|
980
974
|
function y() {
|
|
@@ -986,8 +980,8 @@ function Et(e) {
|
|
|
986
980
|
})
|
|
987
981
|
};
|
|
988
982
|
}
|
|
989
|
-
function
|
|
990
|
-
const
|
|
983
|
+
function x(p) {
|
|
984
|
+
const v = p === 0 ? 0 : t, P = d(p), R = `${v}px`, F = "100%", L = 0;
|
|
991
985
|
return {
|
|
992
986
|
...{
|
|
993
987
|
display: "flex",
|
|
@@ -995,34 +989,34 @@ function Et(e) {
|
|
|
995
989
|
alignItems: "stretch"
|
|
996
990
|
},
|
|
997
991
|
width: P,
|
|
998
|
-
["marginLeft"]:
|
|
992
|
+
["marginLeft"]: R,
|
|
999
993
|
"--column-width-mobile": m({
|
|
1000
|
-
stackedStyle:
|
|
994
|
+
stackedStyle: F,
|
|
1001
995
|
desktopStyle: P
|
|
1002
996
|
}),
|
|
1003
997
|
"--column-margin-left-mobile": m({
|
|
1004
998
|
stackedStyle: L,
|
|
1005
|
-
desktopStyle:
|
|
999
|
+
desktopStyle: R
|
|
1006
1000
|
}),
|
|
1007
1001
|
"--column-width-tablet": c({
|
|
1008
|
-
stackedStyle:
|
|
1002
|
+
stackedStyle: F,
|
|
1009
1003
|
desktopStyle: P
|
|
1010
1004
|
}),
|
|
1011
1005
|
"--column-margin-left-tablet": c({
|
|
1012
1006
|
stackedStyle: L,
|
|
1013
|
-
desktopStyle:
|
|
1007
|
+
desktopStyle: R
|
|
1014
1008
|
})
|
|
1015
1009
|
};
|
|
1016
1010
|
}
|
|
1017
|
-
function
|
|
1018
|
-
var P,
|
|
1011
|
+
function k(p) {
|
|
1012
|
+
var P, R;
|
|
1019
1013
|
return Be(
|
|
1020
|
-
((
|
|
1014
|
+
((R = (P = e.builderContext.content) == null ? void 0 : P.meta) == null ? void 0 : R.breakpoints) || {}
|
|
1021
1015
|
)[p].max;
|
|
1022
1016
|
}
|
|
1023
|
-
function
|
|
1017
|
+
function w() {
|
|
1024
1018
|
return `
|
|
1025
|
-
@media (max-width: ${
|
|
1019
|
+
@media (max-width: ${k("medium")}px) {
|
|
1026
1020
|
.${e.builderBlock.id}-breakpoints {
|
|
1027
1021
|
flex-direction: var(--flex-dir-tablet);
|
|
1028
1022
|
align-items: stretch;
|
|
@@ -1034,7 +1028,7 @@ function Et(e) {
|
|
|
1034
1028
|
}
|
|
1035
1029
|
}
|
|
1036
1030
|
|
|
1037
|
-
@media (max-width: ${
|
|
1031
|
+
@media (max-width: ${k("small")}px) {
|
|
1038
1032
|
.${e.builderBlock.id}-breakpoints {
|
|
1039
1033
|
flex-direction: var(--flex-dir);
|
|
1040
1034
|
align-items: stretch;
|
|
@@ -1054,8 +1048,8 @@ function Et(e) {
|
|
|
1054
1048
|
className: `builder-columns ${e.builderBlock.id}-breakpoints div-003f4b1c`,
|
|
1055
1049
|
style: y(),
|
|
1056
1050
|
children: [
|
|
1057
|
-
/* @__PURE__ */ s(
|
|
1058
|
-
(
|
|
1051
|
+
/* @__PURE__ */ s(ee, { id: "builderio-columns", styles: w() }),
|
|
1052
|
+
(E = e.columns) == null ? void 0 : E.map((p, v) => /* @__PURE__ */ s(
|
|
1059
1053
|
ae,
|
|
1060
1054
|
{
|
|
1061
1055
|
TagName: p.link ? e.builderLinkComponent || "a" : "div",
|
|
@@ -1064,13 +1058,13 @@ function Et(e) {
|
|
|
1064
1058
|
...p.link ? {
|
|
1065
1059
|
href: p.link
|
|
1066
1060
|
} : {},
|
|
1067
|
-
[
|
|
1068
|
-
style: Pe(
|
|
1061
|
+
[U()]: "builder-column",
|
|
1062
|
+
style: Pe(x(v))
|
|
1069
1063
|
},
|
|
1070
1064
|
children: /* @__PURE__ */ s(
|
|
1071
|
-
|
|
1065
|
+
j,
|
|
1072
1066
|
{
|
|
1073
|
-
path: `component.options.columns.${
|
|
1067
|
+
path: `component.options.columns.${v}.blocks`,
|
|
1074
1068
|
parent: e.builderBlock.id,
|
|
1075
1069
|
styleProp: {
|
|
1076
1070
|
flexGrow: "1"
|
|
@@ -1082,7 +1076,7 @@ function Et(e) {
|
|
|
1082
1076
|
}
|
|
1083
1077
|
)
|
|
1084
1078
|
},
|
|
1085
|
-
|
|
1079
|
+
v
|
|
1086
1080
|
))
|
|
1087
1081
|
]
|
|
1088
1082
|
}
|
|
@@ -1093,25 +1087,25 @@ function Et(e) {
|
|
|
1093
1087
|
}` })
|
|
1094
1088
|
] });
|
|
1095
1089
|
}
|
|
1096
|
-
function
|
|
1090
|
+
function Et(e) {
|
|
1097
1091
|
return /* @__PURE__ */ s("span", { children: e.children });
|
|
1098
1092
|
}
|
|
1099
|
-
function
|
|
1093
|
+
function he(e) {
|
|
1100
1094
|
return e.replace(/http(s)?:/, "");
|
|
1101
1095
|
}
|
|
1102
|
-
function
|
|
1096
|
+
function Rt(e = "", t, n) {
|
|
1103
1097
|
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1104
1098
|
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
|
|
1105
1099
|
}
|
|
1106
|
-
function
|
|
1100
|
+
function Pt(e, t) {
|
|
1107
1101
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1108
1102
|
return e;
|
|
1109
1103
|
if (t === "master")
|
|
1110
|
-
return
|
|
1104
|
+
return he(e);
|
|
1111
1105
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1112
1106
|
if (n) {
|
|
1113
1107
|
const i = e.split(n[0]), o = n[3], r = t.match("x") ? t : `${t}x`;
|
|
1114
|
-
return
|
|
1108
|
+
return he(`${i[0]}_${r}${o}`);
|
|
1115
1109
|
}
|
|
1116
1110
|
return null;
|
|
1117
1111
|
}
|
|
@@ -1122,11 +1116,11 @@ function ne(e) {
|
|
|
1122
1116
|
if (e.match(/builder\.io/)) {
|
|
1123
1117
|
let n = e;
|
|
1124
1118
|
const i = Number(e.split("?width=")[1]);
|
|
1125
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${
|
|
1119
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${Rt(e, "width", o)} ${o}w`).concat([n]).join(", ");
|
|
1126
1120
|
}
|
|
1127
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1121
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Pt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
1128
1122
|
}
|
|
1129
|
-
function
|
|
1123
|
+
function Vt(e) {
|
|
1130
1124
|
var o, r, a, l;
|
|
1131
1125
|
function t() {
|
|
1132
1126
|
var m;
|
|
@@ -1209,7 +1203,7 @@ function Bt(e) {
|
|
|
1209
1203
|
}` })
|
|
1210
1204
|
] });
|
|
1211
1205
|
}
|
|
1212
|
-
function
|
|
1206
|
+
function Bt(e) {
|
|
1213
1207
|
return /* @__PURE__ */ s(
|
|
1214
1208
|
"section",
|
|
1215
1209
|
{
|
|
@@ -1230,7 +1224,7 @@ function Wt(e) {
|
|
|
1230
1224
|
}
|
|
1231
1225
|
);
|
|
1232
1226
|
}
|
|
1233
|
-
const
|
|
1227
|
+
const Wt = {
|
|
1234
1228
|
name: "Core:Button",
|
|
1235
1229
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1236
1230
|
defaultStyles: {
|
|
@@ -1263,7 +1257,7 @@ const Nt = {
|
|
|
1263
1257
|
}],
|
|
1264
1258
|
static: !0,
|
|
1265
1259
|
noWrap: !0
|
|
1266
|
-
},
|
|
1260
|
+
}, Nt = {
|
|
1267
1261
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1268
1262
|
name: "Columns",
|
|
1269
1263
|
isRSC: !0,
|
|
@@ -1464,7 +1458,7 @@ const Nt = {
|
|
|
1464
1458
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1465
1459
|
advanced: !0
|
|
1466
1460
|
}]
|
|
1467
|
-
},
|
|
1461
|
+
}, At = {
|
|
1468
1462
|
name: "Fragment",
|
|
1469
1463
|
static: !0,
|
|
1470
1464
|
hidden: !0,
|
|
@@ -1570,7 +1564,7 @@ const Nt = {
|
|
|
1570
1564
|
advanced: !0,
|
|
1571
1565
|
defaultValue: 0.7041
|
|
1572
1566
|
}]
|
|
1573
|
-
},
|
|
1567
|
+
}, Ft = {
|
|
1574
1568
|
name: "Core:Section",
|
|
1575
1569
|
static: !0,
|
|
1576
1570
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1609,7 +1603,7 @@ const Nt = {
|
|
|
1609
1603
|
}
|
|
1610
1604
|
}
|
|
1611
1605
|
}]
|
|
1612
|
-
},
|
|
1606
|
+
}, Lt = {
|
|
1613
1607
|
name: "Slot",
|
|
1614
1608
|
isRSC: !0,
|
|
1615
1609
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1623,7 +1617,7 @@ const Nt = {
|
|
|
1623
1617
|
defaultValue: "children"
|
|
1624
1618
|
}]
|
|
1625
1619
|
};
|
|
1626
|
-
function
|
|
1620
|
+
function Dt(e) {
|
|
1627
1621
|
var t, n, i;
|
|
1628
1622
|
return /* @__PURE__ */ s(
|
|
1629
1623
|
"div",
|
|
@@ -1635,7 +1629,7 @@ function Mt(e) {
|
|
|
1635
1629
|
"builder-slot": e.name
|
|
1636
1630
|
},
|
|
1637
1631
|
children: /* @__PURE__ */ s(
|
|
1638
|
-
|
|
1632
|
+
j,
|
|
1639
1633
|
{
|
|
1640
1634
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
1641
1635
|
path: `symbol.data.${e.name}`,
|
|
@@ -1646,7 +1640,7 @@ function Mt(e) {
|
|
|
1646
1640
|
}
|
|
1647
1641
|
);
|
|
1648
1642
|
}
|
|
1649
|
-
const
|
|
1643
|
+
const Mt = {
|
|
1650
1644
|
name: "Symbol",
|
|
1651
1645
|
noWrap: !0,
|
|
1652
1646
|
static: !0,
|
|
@@ -1679,7 +1673,7 @@ const jt = {
|
|
|
1679
1673
|
hideFromUI: !0,
|
|
1680
1674
|
type: "boolean"
|
|
1681
1675
|
}]
|
|
1682
|
-
},
|
|
1676
|
+
}, jt = {
|
|
1683
1677
|
name: "Text",
|
|
1684
1678
|
static: !0,
|
|
1685
1679
|
isRSC: !0,
|
|
@@ -1698,7 +1692,7 @@ const jt = {
|
|
|
1698
1692
|
textAlign: "center"
|
|
1699
1693
|
}
|
|
1700
1694
|
};
|
|
1701
|
-
function
|
|
1695
|
+
function Ot(e) {
|
|
1702
1696
|
var t;
|
|
1703
1697
|
return /* @__PURE__ */ s(
|
|
1704
1698
|
"div",
|
|
@@ -1711,7 +1705,7 @@ function Ut(e) {
|
|
|
1711
1705
|
}
|
|
1712
1706
|
);
|
|
1713
1707
|
}
|
|
1714
|
-
const
|
|
1708
|
+
const Ut = {
|
|
1715
1709
|
name: "Custom Code",
|
|
1716
1710
|
static: !0,
|
|
1717
1711
|
requiredPermissions: ["editCode"],
|
|
@@ -1734,8 +1728,8 @@ const Ht = {
|
|
|
1734
1728
|
advanced: !0
|
|
1735
1729
|
}]
|
|
1736
1730
|
};
|
|
1737
|
-
function
|
|
1738
|
-
const t =
|
|
1731
|
+
function Ht(e) {
|
|
1732
|
+
const t = Z(null), [n, i] = I(() => []), [o, r] = I(() => []);
|
|
1739
1733
|
return V(() => {
|
|
1740
1734
|
var l;
|
|
1741
1735
|
if (!((l = t.current) != null && l.getElementsByTagName) || typeof window == "undefined")
|
|
@@ -1772,7 +1766,7 @@ function Kt(e) {
|
|
|
1772
1766
|
}
|
|
1773
1767
|
);
|
|
1774
1768
|
}
|
|
1775
|
-
const
|
|
1769
|
+
const Kt = {
|
|
1776
1770
|
name: "Embed",
|
|
1777
1771
|
static: !0,
|
|
1778
1772
|
inputs: [{
|
|
@@ -1797,9 +1791,9 @@ const qt = {
|
|
|
1797
1791
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1798
1792
|
hideFromUI: !0
|
|
1799
1793
|
}]
|
|
1800
|
-
},
|
|
1801
|
-
function
|
|
1802
|
-
const t =
|
|
1794
|
+
}, qt = ["text/javascript", "application/javascript", "application/ecmascript"], _t = (e) => qt.includes(e.type);
|
|
1795
|
+
function zt(e) {
|
|
1796
|
+
const t = Z(null), [n, i] = I(() => []), [o, r] = I(() => []), [a, l] = I(() => !1);
|
|
1803
1797
|
function d() {
|
|
1804
1798
|
if (!t.current || !t.current.getElementsByTagName)
|
|
1805
1799
|
return;
|
|
@@ -1810,7 +1804,7 @@ function Jt(e) {
|
|
|
1810
1804
|
n.push(f.src);
|
|
1811
1805
|
const g = document.createElement("script");
|
|
1812
1806
|
g.async = !0, g.src = f.src, document.head.appendChild(g);
|
|
1813
|
-
} else if (
|
|
1807
|
+
} else if (_t(f) && !o.includes(f.innerText))
|
|
1814
1808
|
try {
|
|
1815
1809
|
o.push(f.innerText), new Function(f.innerText)();
|
|
1816
1810
|
} catch (g) {
|
|
@@ -1829,7 +1823,7 @@ function Jt(e) {
|
|
|
1829
1823
|
}
|
|
1830
1824
|
);
|
|
1831
1825
|
}
|
|
1832
|
-
const
|
|
1826
|
+
const Jt = {
|
|
1833
1827
|
name: "Form:Form",
|
|
1834
1828
|
// editableTags: ['builder-form-error']
|
|
1835
1829
|
defaults: {
|
|
@@ -2060,50 +2054,50 @@ const Yt = {
|
|
|
2060
2054
|
}
|
|
2061
2055
|
}
|
|
2062
2056
|
}]
|
|
2063
|
-
},
|
|
2057
|
+
}, Yt = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], Gt = () => {
|
|
2064
2058
|
const e = process.env.NODE_ENV || "production";
|
|
2065
|
-
return
|
|
2066
|
-
},
|
|
2059
|
+
return Yt.includes(e) ? e : "production";
|
|
2060
|
+
}, Qt = (e, t, n) => {
|
|
2067
2061
|
const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((o, r) => o != null ? o[r] : o, e);
|
|
2068
2062
|
return i === void 0 || i === e ? n : i;
|
|
2069
2063
|
};
|
|
2070
|
-
function
|
|
2064
|
+
function Xt(e) {
|
|
2071
2065
|
var f, g;
|
|
2072
|
-
const t =
|
|
2066
|
+
const t = Z(null), [n, i] = I(() => "unsubmitted"), [o, r] = I(() => null), [a, l] = I(() => "");
|
|
2073
2067
|
function d(y) {
|
|
2074
|
-
var
|
|
2075
|
-
const
|
|
2068
|
+
var k, w;
|
|
2069
|
+
const x = {
|
|
2076
2070
|
...e.builderContext.rootState,
|
|
2077
2071
|
...y
|
|
2078
2072
|
};
|
|
2079
|
-
e.builderContext.rootSetState ? (
|
|
2073
|
+
e.builderContext.rootSetState ? (w = (k = e.builderContext).rootSetState) == null || w.call(k, x) : e.builderContext.rootState = x;
|
|
2080
2074
|
}
|
|
2081
2075
|
function c() {
|
|
2082
|
-
return
|
|
2076
|
+
return A() && e.previewState || n;
|
|
2083
2077
|
}
|
|
2084
2078
|
function m(y) {
|
|
2085
|
-
var
|
|
2086
|
-
const
|
|
2079
|
+
var k;
|
|
2080
|
+
const x = e.sendWithJs || e.sendSubmissionsTo === "email";
|
|
2087
2081
|
if (e.sendSubmissionsTo === "zapier")
|
|
2088
2082
|
y.preventDefault();
|
|
2089
|
-
else if (
|
|
2083
|
+
else if (x) {
|
|
2090
2084
|
if (!(e.action || e.sendSubmissionsTo === "email")) {
|
|
2091
2085
|
y.preventDefault();
|
|
2092
2086
|
return;
|
|
2093
2087
|
}
|
|
2094
2088
|
y.preventDefault();
|
|
2095
|
-
const
|
|
2089
|
+
const w = y.currentTarget, E = e.customHeaders || {};
|
|
2096
2090
|
let p;
|
|
2097
|
-
const
|
|
2091
|
+
const v = new FormData(w), P = Array.from(
|
|
2098
2092
|
y.currentTarget.querySelectorAll("input,select,textarea")
|
|
2099
2093
|
).filter((u) => !!u.name).map((u) => {
|
|
2100
2094
|
let h;
|
|
2101
|
-
const
|
|
2095
|
+
const C = u.name;
|
|
2102
2096
|
if (u instanceof HTMLInputElement)
|
|
2103
2097
|
if (u.type === "radio") {
|
|
2104
2098
|
if (u.checked)
|
|
2105
2099
|
return h = u.name, {
|
|
2106
|
-
key:
|
|
2100
|
+
key: C,
|
|
2107
2101
|
value: h
|
|
2108
2102
|
};
|
|
2109
2103
|
} else if (u.type === "checkbox")
|
|
@@ -2116,38 +2110,38 @@ function Zt(e) {
|
|
|
2116
2110
|
else
|
|
2117
2111
|
h = u.value;
|
|
2118
2112
|
return {
|
|
2119
|
-
key:
|
|
2113
|
+
key: C,
|
|
2120
2114
|
value: h
|
|
2121
2115
|
};
|
|
2122
2116
|
});
|
|
2123
|
-
let
|
|
2124
|
-
if (e.sendSubmissionsTo === "email" && (
|
|
2125
|
-
(u instanceof File || Array.isArray(u) && u[0] instanceof File || u instanceof FileList) && (
|
|
2126
|
-
}),
|
|
2127
|
-
p =
|
|
2117
|
+
let R = e.contentType;
|
|
2118
|
+
if (e.sendSubmissionsTo === "email" && (R = "multipart/form-data"), Array.from(P).forEach(({ value: u }) => {
|
|
2119
|
+
(u instanceof File || Array.isArray(u) && u[0] instanceof File || u instanceof FileList) && (R = "multipart/form-data");
|
|
2120
|
+
}), R !== "application/json")
|
|
2121
|
+
p = v;
|
|
2128
2122
|
else {
|
|
2129
2123
|
const u = {};
|
|
2130
|
-
Array.from(P).forEach(({ value: h, key:
|
|
2131
|
-
|
|
2124
|
+
Array.from(P).forEach(({ value: h, key: C }) => {
|
|
2125
|
+
ke(u, C, h);
|
|
2132
2126
|
}), p = JSON.stringify(u);
|
|
2133
2127
|
}
|
|
2134
|
-
|
|
2135
|
-
const
|
|
2136
|
-
if (t.current && (t.current.dispatchEvent(
|
|
2128
|
+
R && R !== "multipart/form-data" && (x && ((k = e.action) != null && k.includes("zapier.com")) || (E["content-type"] = R));
|
|
2129
|
+
const F = new CustomEvent("presubmit", { detail: { body: p } });
|
|
2130
|
+
if (t.current && (t.current.dispatchEvent(F), F.defaultPrevented))
|
|
2137
2131
|
return;
|
|
2138
2132
|
i("sending");
|
|
2139
|
-
const L = `${
|
|
2133
|
+
const L = `${Gt() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
|
|
2140
2134
|
e.sendSubmissionsToEmail || ""
|
|
2141
2135
|
)}&name=${encodeURIComponent(e.name || "")}`;
|
|
2142
2136
|
fetch(
|
|
2143
2137
|
e.sendSubmissionsTo === "email" ? L : e.action,
|
|
2144
|
-
{ body: p, headers:
|
|
2138
|
+
{ body: p, headers: E, method: e.method || "post" }
|
|
2145
2139
|
).then(
|
|
2146
2140
|
async (u) => {
|
|
2147
2141
|
let h;
|
|
2148
|
-
const
|
|
2149
|
-
if (
|
|
2150
|
-
let b =
|
|
2142
|
+
const C = u.headers.get("content-type");
|
|
2143
|
+
if (C && C.indexOf("application/json") !== -1 ? h = await u.json() : h = await u.text(), !u.ok && e.errorMessagePath) {
|
|
2144
|
+
let b = Qt(h, e.errorMessagePath);
|
|
2151
2145
|
b && (typeof b != "string" && (b = JSON.stringify(b)), l(b), d({ formErrorMessage: b }));
|
|
2152
2146
|
}
|
|
2153
2147
|
if (r(h), i(u.ok ? "success" : "error"), u.ok) {
|
|
@@ -2161,10 +2155,10 @@ function Zt(e) {
|
|
|
2161
2155
|
}
|
|
2162
2156
|
if (e.successUrl)
|
|
2163
2157
|
if (t.current) {
|
|
2164
|
-
const
|
|
2158
|
+
const S = new CustomEvent("route", {
|
|
2165
2159
|
detail: { url: e.successUrl }
|
|
2166
2160
|
});
|
|
2167
|
-
t.current.dispatchEvent(
|
|
2161
|
+
t.current.dispatchEvent(S), S.defaultPrevented || (location.href = e.successUrl);
|
|
2168
2162
|
} else
|
|
2169
2163
|
location.href = e.successUrl;
|
|
2170
2164
|
}
|
|
@@ -2191,18 +2185,18 @@ function Zt(e) {
|
|
|
2191
2185
|
onSubmit: (y) => m(y),
|
|
2192
2186
|
...e.attributes,
|
|
2193
2187
|
children: [
|
|
2194
|
-
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ s(T, { children: (g = (f = e.builderBlock) == null ? void 0 : f.children) == null ? void 0 : g.map((y,
|
|
2195
|
-
|
|
2188
|
+
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ s(T, { children: (g = (f = e.builderBlock) == null ? void 0 : f.children) == null ? void 0 : g.map((y, x) => /* @__PURE__ */ s(
|
|
2189
|
+
q,
|
|
2196
2190
|
{
|
|
2197
2191
|
block: y,
|
|
2198
2192
|
context: e.builderContext,
|
|
2199
2193
|
registeredComponents: e.builderComponents,
|
|
2200
2194
|
linkComponent: e.builderLinkComponent
|
|
2201
2195
|
},
|
|
2202
|
-
`form-block-${
|
|
2196
|
+
`form-block-${x}`
|
|
2203
2197
|
)) }) : null,
|
|
2204
2198
|
c() === "error" ? /* @__PURE__ */ s(
|
|
2205
|
-
|
|
2199
|
+
j,
|
|
2206
2200
|
{
|
|
2207
2201
|
path: "errorMessage",
|
|
2208
2202
|
blocks: e.errorMessage,
|
|
@@ -2210,7 +2204,7 @@ function Zt(e) {
|
|
|
2210
2204
|
}
|
|
2211
2205
|
) : null,
|
|
2212
2206
|
c() === "sending" ? /* @__PURE__ */ s(
|
|
2213
|
-
|
|
2207
|
+
j,
|
|
2214
2208
|
{
|
|
2215
2209
|
path: "sendingMessage",
|
|
2216
2210
|
blocks: e.sendingMessage,
|
|
@@ -2219,7 +2213,7 @@ function Zt(e) {
|
|
|
2219
2213
|
) : null,
|
|
2220
2214
|
c() === "error" && o ? /* @__PURE__ */ s("pre", { className: "builder-form-error-text pre-31bf8a14", children: JSON.stringify(o, null, 2) }) : null,
|
|
2221
2215
|
c() === "success" ? /* @__PURE__ */ s(
|
|
2222
|
-
|
|
2216
|
+
j,
|
|
2223
2217
|
{
|
|
2224
2218
|
path: "successMessage",
|
|
2225
2219
|
blocks: e.successMessage,
|
|
@@ -2234,7 +2228,7 @@ function Zt(e) {
|
|
|
2234
2228
|
" "
|
|
2235
2229
|
] });
|
|
2236
2230
|
}
|
|
2237
|
-
const
|
|
2231
|
+
const Zt = {
|
|
2238
2232
|
name: "Form:Input",
|
|
2239
2233
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2240
2234
|
inputs: [
|
|
@@ -2286,12 +2280,12 @@ const en = {
|
|
|
2286
2280
|
borderColor: "#ccc"
|
|
2287
2281
|
}
|
|
2288
2282
|
};
|
|
2289
|
-
function
|
|
2290
|
-
return /* @__PURE__ */
|
|
2283
|
+
function en(e) {
|
|
2284
|
+
return /* @__PURE__ */ ve(
|
|
2291
2285
|
"input",
|
|
2292
2286
|
{
|
|
2293
2287
|
...e.attributes,
|
|
2294
|
-
key:
|
|
2288
|
+
key: A() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2295
2289
|
placeholder: e.placeholder,
|
|
2296
2290
|
type: e.type,
|
|
2297
2291
|
name: e.name,
|
|
@@ -2301,7 +2295,7 @@ function tn(e) {
|
|
|
2301
2295
|
}
|
|
2302
2296
|
);
|
|
2303
2297
|
}
|
|
2304
|
-
const
|
|
2298
|
+
const tn = {
|
|
2305
2299
|
name: "Form:Select",
|
|
2306
2300
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
2307
2301
|
defaultStyles: {
|
|
@@ -2344,21 +2338,21 @@ const nn = {
|
|
|
2344
2338
|
static: !0,
|
|
2345
2339
|
noWrap: !0
|
|
2346
2340
|
};
|
|
2347
|
-
function
|
|
2341
|
+
function nn(e) {
|
|
2348
2342
|
var t;
|
|
2349
|
-
return /* @__PURE__ */
|
|
2343
|
+
return /* @__PURE__ */ ve(
|
|
2350
2344
|
"select",
|
|
2351
2345
|
{
|
|
2352
2346
|
...e.attributes,
|
|
2353
2347
|
value: e.value,
|
|
2354
|
-
key:
|
|
2348
|
+
key: A() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2355
2349
|
defaultValue: e.defaultValue,
|
|
2356
2350
|
name: e.name
|
|
2357
2351
|
},
|
|
2358
2352
|
(t = e.options) == null ? void 0 : t.map((n, i) => /* @__PURE__ */ s("option", { value: n.value, children: n.name || n.value }, `${n.name}-${i}`))
|
|
2359
2353
|
);
|
|
2360
2354
|
}
|
|
2361
|
-
const
|
|
2355
|
+
const on = {
|
|
2362
2356
|
name: "Form:SubmitButton",
|
|
2363
2357
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
2364
2358
|
defaultStyles: {
|
|
@@ -2384,10 +2378,10 @@ const an = {
|
|
|
2384
2378
|
// TODO: defaultChildren
|
|
2385
2379
|
// canHaveChildren: true,
|
|
2386
2380
|
};
|
|
2387
|
-
function
|
|
2381
|
+
function an(e) {
|
|
2388
2382
|
return /* @__PURE__ */ s("button", { type: "submit", ...e.attributes, children: e.text });
|
|
2389
2383
|
}
|
|
2390
|
-
const
|
|
2384
|
+
const rn = {
|
|
2391
2385
|
// friendlyName?
|
|
2392
2386
|
name: "Raw:Img",
|
|
2393
2387
|
hideFromInsertMenu: !0,
|
|
@@ -2402,7 +2396,7 @@ const ln = {
|
|
|
2402
2396
|
noWrap: !0,
|
|
2403
2397
|
static: !0
|
|
2404
2398
|
};
|
|
2405
|
-
function
|
|
2399
|
+
function ln(e) {
|
|
2406
2400
|
return /* @__PURE__ */ s(
|
|
2407
2401
|
"img",
|
|
2408
2402
|
{
|
|
@@ -2414,10 +2408,10 @@ function sn(e) {
|
|
|
2414
2408
|
src: e.imgSrc || e.image,
|
|
2415
2409
|
...e.attributes
|
|
2416
2410
|
},
|
|
2417
|
-
|
|
2411
|
+
A() && e.imgSrc || "default-key"
|
|
2418
2412
|
);
|
|
2419
2413
|
}
|
|
2420
|
-
const
|
|
2414
|
+
const sn = {
|
|
2421
2415
|
name: "Video",
|
|
2422
2416
|
canHaveChildren: !0,
|
|
2423
2417
|
defaultStyles: {
|
|
@@ -2499,7 +2493,7 @@ const cn = {
|
|
|
2499
2493
|
advanced: !0
|
|
2500
2494
|
}]
|
|
2501
2495
|
};
|
|
2502
|
-
function
|
|
2496
|
+
function cn(e) {
|
|
2503
2497
|
var i, o, r, a, l, d, c;
|
|
2504
2498
|
function t() {
|
|
2505
2499
|
return {
|
|
@@ -2600,55 +2594,55 @@ function dn(e) {
|
|
|
2600
2594
|
}
|
|
2601
2595
|
);
|
|
2602
2596
|
}
|
|
2603
|
-
const
|
|
2604
|
-
component:
|
|
2605
|
-
...
|
|
2597
|
+
const dn = () => [{
|
|
2598
|
+
component: Ht,
|
|
2599
|
+
...Ut
|
|
2606
2600
|
}, {
|
|
2607
|
-
component:
|
|
2608
|
-
...
|
|
2601
|
+
component: zt,
|
|
2602
|
+
...Kt
|
|
2609
2603
|
}, {
|
|
2610
|
-
component:
|
|
2611
|
-
...
|
|
2604
|
+
component: Xt,
|
|
2605
|
+
...Jt
|
|
2612
2606
|
}, {
|
|
2613
|
-
component:
|
|
2614
|
-
...
|
|
2607
|
+
component: en,
|
|
2608
|
+
...Zt
|
|
2615
2609
|
}, {
|
|
2616
|
-
component:
|
|
2617
|
-
...
|
|
2610
|
+
component: an,
|
|
2611
|
+
...on
|
|
2618
2612
|
}, {
|
|
2619
|
-
component:
|
|
2620
|
-
...
|
|
2613
|
+
component: nn,
|
|
2614
|
+
...tn
|
|
2621
2615
|
}, {
|
|
2622
|
-
component:
|
|
2623
|
-
...
|
|
2616
|
+
component: ln,
|
|
2617
|
+
...rn
|
|
2624
2618
|
}, {
|
|
2625
|
-
component:
|
|
2626
|
-
...
|
|
2627
|
-
}],
|
|
2619
|
+
component: cn,
|
|
2620
|
+
...sn
|
|
2621
|
+
}], ge = () => [{
|
|
2628
2622
|
component: Xe,
|
|
2623
|
+
...Wt
|
|
2624
|
+
}, {
|
|
2625
|
+
component: Tt,
|
|
2629
2626
|
...Nt
|
|
2630
2627
|
}, {
|
|
2631
2628
|
component: Et,
|
|
2632
2629
|
...At
|
|
2633
2630
|
}, {
|
|
2634
|
-
component:
|
|
2635
|
-
|
|
2631
|
+
component: Vt,
|
|
2632
|
+
...$t
|
|
2636
2633
|
}, {
|
|
2637
2634
|
component: Bt,
|
|
2638
|
-
|
|
2635
|
+
...Ft
|
|
2639
2636
|
}, {
|
|
2640
|
-
component:
|
|
2637
|
+
component: Dt,
|
|
2641
2638
|
...Lt
|
|
2642
2639
|
}, {
|
|
2643
|
-
component:
|
|
2644
|
-
...
|
|
2640
|
+
component: Wn,
|
|
2641
|
+
...Mt
|
|
2645
2642
|
}, {
|
|
2646
|
-
component:
|
|
2643
|
+
component: Ot,
|
|
2647
2644
|
...jt
|
|
2648
|
-
}, {
|
|
2649
|
-
component: Ut,
|
|
2650
|
-
...Ot
|
|
2651
|
-
}, ...un()], mn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
2645
|
+
}, ...dn()], un = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
2652
2646
|
function getAndSetVariantId() {
|
|
2653
2647
|
function setCookie(name, value, days) {
|
|
2654
2648
|
let expires = '';
|
|
@@ -2704,7 +2698,7 @@ const un = () => [{
|
|
|
2704
2698
|
}).join('');
|
|
2705
2699
|
styleEl.innerHTML = newStyleStr;
|
|
2706
2700
|
}
|
|
2707
|
-
}`,
|
|
2701
|
+
}`, mn = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
2708
2702
|
if (!navigator.cookieEnabled) {
|
|
2709
2703
|
return;
|
|
2710
2704
|
}
|
|
@@ -2742,20 +2736,20 @@ const un = () => [{
|
|
|
2742
2736
|
...t,
|
|
2743
2737
|
testVariationId: t.id,
|
|
2744
2738
|
id: e == null ? void 0 : e.id
|
|
2745
|
-
})),
|
|
2739
|
+
})), fn = ({
|
|
2746
2740
|
canTrack: e,
|
|
2747
2741
|
content: t
|
|
2748
|
-
}) => !(!(z(t).length > 0) || !e || Y()),
|
|
2749
|
-
window.${Ne} = ${
|
|
2750
|
-
window.${Ae} = ${
|
|
2751
|
-
`,
|
|
2742
|
+
}) => !(!(z(t).length > 0) || !e || Y()), hn = (e) => e === "react" || e === "reactNative", $e = hn(K), gn = () => `
|
|
2743
|
+
window.${Ne} = ${un}
|
|
2744
|
+
window.${Ae} = ${mn}
|
|
2745
|
+
`, bn = (e, t) => `
|
|
2752
2746
|
window.${Ne}(
|
|
2753
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
2754
|
-
)`,
|
|
2747
|
+
"${t}",${JSON.stringify(e)}, ${$e}
|
|
2748
|
+
)`, yn = ({
|
|
2755
2749
|
contentId: e,
|
|
2756
2750
|
variationId: t
|
|
2757
2751
|
}) => `window.${Ae}(
|
|
2758
|
-
"${t}", "${e}", ${
|
|
2752
|
+
"${t}", "${e}", ${$e}
|
|
2759
2753
|
)`;
|
|
2760
2754
|
function ie(e) {
|
|
2761
2755
|
return /* @__PURE__ */ s(
|
|
@@ -2766,10 +2760,10 @@ function ie(e) {
|
|
|
2766
2760
|
}
|
|
2767
2761
|
);
|
|
2768
2762
|
}
|
|
2769
|
-
function
|
|
2763
|
+
function be(e) {
|
|
2770
2764
|
return Math.round(e * 1e3) / 1e3;
|
|
2771
2765
|
}
|
|
2772
|
-
const
|
|
2766
|
+
const pn = (e, t, n = !0) => {
|
|
2773
2767
|
if (!(e instanceof HTMLElement))
|
|
2774
2768
|
return null;
|
|
2775
2769
|
let i = n ? e : e.parentElement;
|
|
@@ -2780,28 +2774,28 @@ const xn = (e, t, n = !0) => {
|
|
|
2780
2774
|
return i;
|
|
2781
2775
|
} while (i = i.parentElement);
|
|
2782
2776
|
return null;
|
|
2783
|
-
},
|
|
2777
|
+
}, xn = (e) => pn(e, (t) => {
|
|
2784
2778
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2785
2779
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2786
|
-
}),
|
|
2780
|
+
}), ye = ({
|
|
2787
2781
|
event: e,
|
|
2788
2782
|
target: t
|
|
2789
2783
|
}) => {
|
|
2790
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, r =
|
|
2784
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, r = be(i / n.width), a = be(o / n.height);
|
|
2791
2785
|
return {
|
|
2792
2786
|
x: r,
|
|
2793
2787
|
y: a
|
|
2794
2788
|
};
|
|
2795
|
-
},
|
|
2796
|
-
const t = e.target, n = t &&
|
|
2789
|
+
}, Sn = (e) => {
|
|
2790
|
+
const t = e.target, n = t && xn(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2797
2791
|
return {
|
|
2798
2792
|
targetBuilderElement: i || void 0,
|
|
2799
2793
|
metadata: {
|
|
2800
|
-
targetOffset: t ?
|
|
2794
|
+
targetOffset: t ? ye({
|
|
2801
2795
|
event: e,
|
|
2802
2796
|
target: t
|
|
2803
2797
|
}) : void 0,
|
|
2804
|
-
builderTargetOffset: n ?
|
|
2798
|
+
builderTargetOffset: n ? ye({
|
|
2805
2799
|
event: e,
|
|
2806
2800
|
target: n
|
|
2807
2801
|
}) : void 0,
|
|
@@ -2809,33 +2803,33 @@ const xn = (e, t, n = !0) => {
|
|
|
2809
2803
|
}
|
|
2810
2804
|
};
|
|
2811
2805
|
};
|
|
2812
|
-
function
|
|
2813
|
-
var
|
|
2814
|
-
const t =
|
|
2806
|
+
function vn(e) {
|
|
2807
|
+
var E, p, v, P, R, F, L;
|
|
2808
|
+
const t = Z(null);
|
|
2815
2809
|
function n(u) {
|
|
2816
|
-
var
|
|
2810
|
+
var C, b;
|
|
2817
2811
|
const h = {
|
|
2818
2812
|
...e.builderContextSignal.rootState,
|
|
2819
2813
|
...u
|
|
2820
2814
|
};
|
|
2821
|
-
e.builderContextSignal.rootSetState ? (b = (
|
|
2822
|
-
...
|
|
2815
|
+
e.builderContextSignal.rootSetState ? (b = (C = e.builderContextSignal).rootSetState) == null || b.call(C, h) : e.setBuilderContextSignal((S) => ({
|
|
2816
|
+
...S,
|
|
2823
2817
|
rootState: h
|
|
2824
2818
|
}));
|
|
2825
2819
|
}
|
|
2826
2820
|
function i(u) {
|
|
2827
|
-
var
|
|
2821
|
+
var C, b, S, W, D;
|
|
2828
2822
|
const h = {
|
|
2829
2823
|
...e.builderContextSignal.content,
|
|
2830
2824
|
...u,
|
|
2831
2825
|
data: {
|
|
2832
|
-
...(
|
|
2826
|
+
...(C = e.builderContextSignal.content) == null ? void 0 : C.data,
|
|
2833
2827
|
...u == null ? void 0 : u.data
|
|
2834
2828
|
},
|
|
2835
2829
|
meta: {
|
|
2836
2830
|
...(b = e.builderContextSignal.content) == null ? void 0 : b.meta,
|
|
2837
2831
|
...u == null ? void 0 : u.meta,
|
|
2838
|
-
breakpoints: ((
|
|
2832
|
+
breakpoints: ((S = u == null ? void 0 : u.meta) == null ? void 0 : S.breakpoints) || ((D = (W = e.builderContextSignal.content) == null ? void 0 : W.meta) == null ? void 0 : D.breakpoints)
|
|
2839
2833
|
}
|
|
2840
2834
|
};
|
|
2841
2835
|
e.setBuilderContextSignal((N) => ({
|
|
@@ -2843,7 +2837,7 @@ function kn(e) {
|
|
|
2843
2837
|
content: h
|
|
2844
2838
|
}));
|
|
2845
2839
|
}
|
|
2846
|
-
const [o, r] =
|
|
2840
|
+
const [o, r] = I(
|
|
2847
2841
|
() => e.contentWrapper || "div"
|
|
2848
2842
|
);
|
|
2849
2843
|
function a(u) {
|
|
@@ -2852,11 +2846,11 @@ function kn(e) {
|
|
|
2852
2846
|
trustedHosts: e.trustedHosts,
|
|
2853
2847
|
callbacks: {
|
|
2854
2848
|
configureSdk: (h) => {
|
|
2855
|
-
var
|
|
2856
|
-
const { breakpoints:
|
|
2857
|
-
!b || b !== ((
|
|
2849
|
+
var S;
|
|
2850
|
+
const { breakpoints: C, contentId: b } = h;
|
|
2851
|
+
!b || b !== ((S = e.builderContextSignal.content) == null ? void 0 : S.id) || C && i({
|
|
2858
2852
|
meta: {
|
|
2859
|
-
breakpoints:
|
|
2853
|
+
breakpoints: C
|
|
2860
2854
|
}
|
|
2861
2855
|
});
|
|
2862
2856
|
},
|
|
@@ -2870,9 +2864,9 @@ function kn(e) {
|
|
|
2870
2864
|
})(u);
|
|
2871
2865
|
}
|
|
2872
2866
|
function l() {
|
|
2873
|
-
var h,
|
|
2874
|
-
const u = (
|
|
2875
|
-
u &&
|
|
2867
|
+
var h, C;
|
|
2868
|
+
const u = (C = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : C.jsCode;
|
|
2869
|
+
u && H({
|
|
2876
2870
|
code: u,
|
|
2877
2871
|
context: e.context || {},
|
|
2878
2872
|
localState: void 0,
|
|
@@ -2884,35 +2878,35 @@ function kn(e) {
|
|
|
2884
2878
|
enableCache: !1
|
|
2885
2879
|
});
|
|
2886
2880
|
}
|
|
2887
|
-
const [d, c] =
|
|
2888
|
-
function
|
|
2889
|
-
var h,
|
|
2881
|
+
const [d, c] = I(() => ({})), [m, f] = I(() => ({})), [g, y] = I(() => !1);
|
|
2882
|
+
function x(u) {
|
|
2883
|
+
var h, C;
|
|
2890
2884
|
if (e.builderContextSignal.content) {
|
|
2891
|
-
const b = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId,
|
|
2892
|
-
|
|
2885
|
+
const b = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, S = (C = e.builderContextSignal.content) == null ? void 0 : C.id;
|
|
2886
|
+
ce({
|
|
2893
2887
|
type: "click",
|
|
2894
2888
|
canTrack: G(e.canTrack),
|
|
2895
|
-
contentId:
|
|
2889
|
+
contentId: S,
|
|
2896
2890
|
apiKey: e.apiKey,
|
|
2897
|
-
variationId: b !==
|
|
2898
|
-
...
|
|
2891
|
+
variationId: b !== S ? b : void 0,
|
|
2892
|
+
...Sn(u),
|
|
2899
2893
|
unique: !g
|
|
2900
2894
|
});
|
|
2901
2895
|
}
|
|
2902
2896
|
g || y(!0);
|
|
2903
2897
|
}
|
|
2904
|
-
function
|
|
2905
|
-
var h,
|
|
2906
|
-
const u = (b = (
|
|
2907
|
-
Object.entries(u).forEach(([
|
|
2908
|
-
if (!W || m[
|
|
2898
|
+
function k() {
|
|
2899
|
+
var h, C, b;
|
|
2900
|
+
const u = (b = (C = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : C.httpRequests) != null ? b : {};
|
|
2901
|
+
Object.entries(u).forEach(([S, W]) => {
|
|
2902
|
+
if (!W || m[S] || d[S] && !A())
|
|
2909
2903
|
return;
|
|
2910
|
-
m[
|
|
2911
|
-
const
|
|
2904
|
+
m[S] = !0;
|
|
2905
|
+
const D = W.replace(
|
|
2912
2906
|
/{{([^}]+)}}/g,
|
|
2913
|
-
(N,
|
|
2914
|
-
|
|
2915
|
-
code:
|
|
2907
|
+
(N, Fe) => String(
|
|
2908
|
+
H({
|
|
2909
|
+
code: Fe,
|
|
2916
2910
|
context: e.context || {},
|
|
2917
2911
|
localState: void 0,
|
|
2918
2912
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -2921,19 +2915,19 @@ function kn(e) {
|
|
|
2921
2915
|
})
|
|
2922
2916
|
)
|
|
2923
2917
|
);
|
|
2924
|
-
Ke(
|
|
2918
|
+
Ke(D).then((N) => N.json()).then((N) => {
|
|
2925
2919
|
n({
|
|
2926
|
-
[
|
|
2927
|
-
}), d[
|
|
2920
|
+
[S]: N
|
|
2921
|
+
}), d[S] = !0;
|
|
2928
2922
|
}).catch((N) => {
|
|
2929
2923
|
console.error("error fetching dynamic data", W, N);
|
|
2930
2924
|
}).finally(() => {
|
|
2931
|
-
m[
|
|
2925
|
+
m[S] = !1;
|
|
2932
2926
|
});
|
|
2933
2927
|
});
|
|
2934
2928
|
}
|
|
2935
|
-
function
|
|
2936
|
-
|
|
2929
|
+
function w() {
|
|
2930
|
+
A() && window.dispatchEvent(
|
|
2937
2931
|
new CustomEvent(
|
|
2938
2932
|
"builder:component:stateChange",
|
|
2939
2933
|
{
|
|
@@ -2950,7 +2944,7 @@ function kn(e) {
|
|
|
2950
2944
|
return V(() => {
|
|
2951
2945
|
var u, h;
|
|
2952
2946
|
if (Y()) {
|
|
2953
|
-
if (
|
|
2947
|
+
if (A() && (window.addEventListener("message", a), Me(), je({
|
|
2954
2948
|
...e.locale ? {
|
|
2955
2949
|
locale: e.locale
|
|
2956
2950
|
} : {},
|
|
@@ -2964,26 +2958,26 @@ function kn(e) {
|
|
|
2964
2958
|
e.builderContextSignal.componentInfos
|
|
2965
2959
|
).forEach((b) => {
|
|
2966
2960
|
var W;
|
|
2967
|
-
const
|
|
2968
|
-
(W = window.parent) == null || W.postMessage(
|
|
2961
|
+
const S = Oe(b);
|
|
2962
|
+
(W = window.parent) == null || W.postMessage(S, "*");
|
|
2969
2963
|
}), window.addEventListener(
|
|
2970
2964
|
"builder:component:stateChangeListenerActivated",
|
|
2971
|
-
|
|
2965
|
+
w
|
|
2972
2966
|
)), e.builderContextSignal.content && G(e.canTrack)) {
|
|
2973
|
-
const b = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId,
|
|
2974
|
-
|
|
2967
|
+
const b = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, S = (h = e.builderContextSignal.content) == null ? void 0 : h.id, W = e.apiKey;
|
|
2968
|
+
ce({
|
|
2975
2969
|
type: "impression",
|
|
2976
2970
|
canTrack: !0,
|
|
2977
|
-
contentId:
|
|
2971
|
+
contentId: S,
|
|
2978
2972
|
apiKey: W,
|
|
2979
|
-
variationId: b !==
|
|
2973
|
+
variationId: b !== S ? b : void 0
|
|
2980
2974
|
});
|
|
2981
2975
|
}
|
|
2982
|
-
if (Ue()) {
|
|
2983
|
-
const b = new URL(location.href).searchParams,
|
|
2984
|
-
`builder.preview.${
|
|
2985
|
-
),
|
|
2986
|
-
|
|
2976
|
+
if (Ue() && !A()) {
|
|
2977
|
+
const b = new URL(location.href).searchParams, S = b.get("builder.preview"), W = b.get(
|
|
2978
|
+
`builder.preview.${S}`
|
|
2979
|
+
), D = b.get("apiKey") || b.get("builder.space");
|
|
2980
|
+
S === e.model && D === e.apiKey && (!e.content || W === e.content.id) && xe({
|
|
2987
2981
|
model: e.model,
|
|
2988
2982
|
apiKey: e.apiKey,
|
|
2989
2983
|
apiVersion: e.builderContextSignal.apiVersion
|
|
@@ -2993,17 +2987,17 @@ function kn(e) {
|
|
|
2993
2987
|
}
|
|
2994
2988
|
}
|
|
2995
2989
|
}, []), V(() => {
|
|
2996
|
-
e.apiKey ||
|
|
2990
|
+
e.apiKey || X.error(
|
|
2997
2991
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2998
|
-
), l(),
|
|
2992
|
+
), l(), k(), w();
|
|
2999
2993
|
}, []), V(() => {
|
|
3000
2994
|
e.content && i(e.content);
|
|
3001
2995
|
}, [e.content]), V(() => {
|
|
3002
2996
|
l();
|
|
3003
|
-
}, [(p = (
|
|
3004
|
-
|
|
3005
|
-
}, [(P = (
|
|
3006
|
-
|
|
2997
|
+
}, [(p = (E = e.builderContextSignal.content) == null ? void 0 : E.data) == null ? void 0 : p.jsCode]), V(() => {
|
|
2998
|
+
k();
|
|
2999
|
+
}, [(P = (v = e.builderContextSignal.content) == null ? void 0 : v.data) == null ? void 0 : P.httpRequests]), V(() => {
|
|
3000
|
+
w();
|
|
3007
3001
|
}, [e.builderContextSignal.rootState]), V(() => {
|
|
3008
3002
|
e.data && n(e.data);
|
|
3009
3003
|
}, [e.data]), V(() => {
|
|
@@ -3013,26 +3007,26 @@ function kn(e) {
|
|
|
3013
3007
|
}, [e.locale]), V(() => () => {
|
|
3014
3008
|
Y() && (window.removeEventListener("message", a), window.removeEventListener(
|
|
3015
3009
|
"builder:component:stateChangeListenerActivated",
|
|
3016
|
-
|
|
3010
|
+
w
|
|
3017
3011
|
));
|
|
3018
3012
|
}, []), /* @__PURE__ */ s(re.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ s(
|
|
3019
3013
|
o,
|
|
3020
3014
|
{
|
|
3021
3015
|
ref: t,
|
|
3022
|
-
onClick: (u) =>
|
|
3023
|
-
"builder-content-id": (
|
|
3016
|
+
onClick: (u) => x(u),
|
|
3017
|
+
"builder-content-id": (R = e.builderContextSignal.content) == null ? void 0 : R.id,
|
|
3024
3018
|
"builder-model": e.model,
|
|
3025
3019
|
...e.showContent ? {} : {
|
|
3026
3020
|
hidden: !0,
|
|
3027
3021
|
"aria-hidden": !0
|
|
3028
3022
|
},
|
|
3029
3023
|
...e.contentWrapperProps,
|
|
3030
|
-
className: `variant-${((
|
|
3024
|
+
className: `variant-${((F = e.content) == null ? void 0 : F.testVariationId) || ((L = e.content) == null ? void 0 : L.id)}`,
|
|
3031
3025
|
children: e.children
|
|
3032
3026
|
}
|
|
3033
3027
|
) : null });
|
|
3034
3028
|
}
|
|
3035
|
-
const
|
|
3029
|
+
const kn = (e) => {
|
|
3036
3030
|
var r, a;
|
|
3037
3031
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (r = e == null ? void 0 : e.files) == null ? void 0 : r.regular;
|
|
3038
3032
|
let o = "";
|
|
@@ -3058,15 +3052,15 @@ font-weight: ${l};
|
|
|
3058
3052
|
`.trim());
|
|
3059
3053
|
}
|
|
3060
3054
|
return o;
|
|
3061
|
-
},
|
|
3055
|
+
}, Cn = ({
|
|
3062
3056
|
customFonts: e
|
|
3063
3057
|
}) => {
|
|
3064
3058
|
var t;
|
|
3065
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
3066
|
-
},
|
|
3059
|
+
return ((t = e == null ? void 0 : e.map((n) => kn(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3060
|
+
}, wn = ({
|
|
3067
3061
|
cssCode: e,
|
|
3068
3062
|
contentId: t
|
|
3069
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
3063
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", In = `
|
|
3070
3064
|
.builder-button {
|
|
3071
3065
|
all: unset;
|
|
3072
3066
|
}
|
|
@@ -3083,23 +3077,23 @@ font-weight: ${l};
|
|
|
3083
3077
|
text-align: inherit;
|
|
3084
3078
|
font-family: inherit;
|
|
3085
3079
|
}
|
|
3086
|
-
`,
|
|
3087
|
-
function
|
|
3088
|
-
const [t, n] =
|
|
3080
|
+
`, Tn = (e) => e ? "" : In;
|
|
3081
|
+
function En(e) {
|
|
3082
|
+
const [t, n] = I(
|
|
3089
3083
|
() => `
|
|
3090
|
-
${
|
|
3084
|
+
${wn({
|
|
3091
3085
|
cssCode: e.cssCode,
|
|
3092
3086
|
contentId: e.contentId
|
|
3093
3087
|
})}
|
|
3094
|
-
${
|
|
3088
|
+
${Cn({
|
|
3095
3089
|
customFonts: e.customFonts
|
|
3096
3090
|
})}
|
|
3097
|
-
${
|
|
3091
|
+
${Tn(e.isNestedRender)}
|
|
3098
3092
|
`.trim()
|
|
3099
3093
|
);
|
|
3100
|
-
return /* @__PURE__ */ s(
|
|
3094
|
+
return /* @__PURE__ */ s(ee, { id: "builderio-content", styles: t });
|
|
3101
3095
|
}
|
|
3102
|
-
const
|
|
3096
|
+
const Rn = ({
|
|
3103
3097
|
content: e,
|
|
3104
3098
|
data: t,
|
|
3105
3099
|
locale: n
|
|
@@ -3116,7 +3110,7 @@ const Pn = ({
|
|
|
3116
3110
|
locale: n
|
|
3117
3111
|
} : {}
|
|
3118
3112
|
};
|
|
3119
|
-
},
|
|
3113
|
+
}, Pn = ({
|
|
3120
3114
|
content: e,
|
|
3121
3115
|
data: t
|
|
3122
3116
|
}) => e ? {
|
|
@@ -3127,46 +3121,46 @@ const Pn = ({
|
|
|
3127
3121
|
},
|
|
3128
3122
|
meta: e == null ? void 0 : e.meta
|
|
3129
3123
|
} : void 0;
|
|
3130
|
-
function
|
|
3131
|
-
var d, c, m, f, g, y,
|
|
3132
|
-
const [t, n] =
|
|
3124
|
+
function pe(e) {
|
|
3125
|
+
var d, c, m, f, g, y, x;
|
|
3126
|
+
const [t, n] = I(
|
|
3133
3127
|
() => {
|
|
3134
|
-
var
|
|
3135
|
-
return
|
|
3128
|
+
var k, w;
|
|
3129
|
+
return yn({
|
|
3136
3130
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3137
|
-
variationId: (
|
|
3131
|
+
variationId: (k = e.content) == null ? void 0 : k.testVariationId,
|
|
3138
3132
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3139
|
-
contentId: (
|
|
3133
|
+
contentId: (w = e.content) == null ? void 0 : w.id
|
|
3140
3134
|
});
|
|
3141
3135
|
}
|
|
3142
3136
|
);
|
|
3143
|
-
function i(
|
|
3144
|
-
l((
|
|
3145
|
-
...
|
|
3146
|
-
rootState:
|
|
3137
|
+
function i(k) {
|
|
3138
|
+
l((w) => ({
|
|
3139
|
+
...w,
|
|
3140
|
+
rootState: k
|
|
3147
3141
|
}));
|
|
3148
3142
|
}
|
|
3149
|
-
const [o, r] =
|
|
3143
|
+
const [o, r] = I(
|
|
3150
3144
|
() => [
|
|
3151
|
-
...
|
|
3145
|
+
...ge(),
|
|
3152
3146
|
...e.customComponents || []
|
|
3153
3147
|
].reduce(
|
|
3154
|
-
(
|
|
3155
|
-
...
|
|
3156
|
-
[
|
|
3157
|
-
component:
|
|
3158
|
-
...
|
|
3148
|
+
(k, { component: w, ...E }) => ({
|
|
3149
|
+
...k,
|
|
3150
|
+
[E.name]: {
|
|
3151
|
+
component: w,
|
|
3152
|
+
...de(E)
|
|
3159
3153
|
}
|
|
3160
3154
|
}),
|
|
3161
3155
|
{}
|
|
3162
3156
|
)
|
|
3163
|
-
), [a, l] =
|
|
3164
|
-
content:
|
|
3157
|
+
), [a, l] = I(() => ({
|
|
3158
|
+
content: Pn({
|
|
3165
3159
|
content: e.content,
|
|
3166
3160
|
data: e.data
|
|
3167
3161
|
}),
|
|
3168
3162
|
localState: void 0,
|
|
3169
|
-
rootState:
|
|
3163
|
+
rootState: Rn({
|
|
3170
3164
|
content: e.content,
|
|
3171
3165
|
data: e.data,
|
|
3172
3166
|
locale: e.locale
|
|
@@ -3176,12 +3170,12 @@ function Se(e) {
|
|
|
3176
3170
|
apiKey: e.apiKey,
|
|
3177
3171
|
apiVersion: e.apiVersion,
|
|
3178
3172
|
componentInfos: [
|
|
3179
|
-
...
|
|
3173
|
+
...ge(),
|
|
3180
3174
|
...e.customComponents || []
|
|
3181
3175
|
].reduce(
|
|
3182
|
-
(
|
|
3183
|
-
...
|
|
3184
|
-
[
|
|
3176
|
+
(k, { component: w, ...E }) => ({
|
|
3177
|
+
...k,
|
|
3178
|
+
[E.name]: de(E)
|
|
3185
3179
|
}),
|
|
3186
3180
|
{}
|
|
3187
3181
|
),
|
|
@@ -3190,13 +3184,13 @@ function Se(e) {
|
|
|
3190
3184
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
3191
3185
|
}));
|
|
3192
3186
|
return /* @__PURE__ */ s(
|
|
3193
|
-
|
|
3187
|
+
Ce.Provider,
|
|
3194
3188
|
{
|
|
3195
3189
|
value: {
|
|
3196
3190
|
registeredComponents: o
|
|
3197
3191
|
},
|
|
3198
3192
|
children: /* @__PURE__ */ B(
|
|
3199
|
-
|
|
3193
|
+
vn,
|
|
3200
3194
|
{
|
|
3201
3195
|
content: e.content,
|
|
3202
3196
|
data: e.data,
|
|
@@ -3222,7 +3216,7 @@ function Se(e) {
|
|
|
3222
3216
|
}
|
|
3223
3217
|
) : null,
|
|
3224
3218
|
/* @__PURE__ */ s(
|
|
3225
|
-
|
|
3219
|
+
En,
|
|
3226
3220
|
{
|
|
3227
3221
|
isNestedRender: e.isNestedRender,
|
|
3228
3222
|
contentId: (d = a.content) == null ? void 0 : d.id,
|
|
@@ -3231,9 +3225,9 @@ function Se(e) {
|
|
|
3231
3225
|
}
|
|
3232
3226
|
),
|
|
3233
3227
|
/* @__PURE__ */ s(
|
|
3234
|
-
|
|
3228
|
+
j,
|
|
3235
3229
|
{
|
|
3236
|
-
blocks: (
|
|
3230
|
+
blocks: (x = (y = a.content) == null ? void 0 : y.data) == null ? void 0 : x.blocks,
|
|
3237
3231
|
context: a,
|
|
3238
3232
|
registeredComponents: o,
|
|
3239
3233
|
linkComponent: e.linkComponent
|
|
@@ -3245,17 +3239,17 @@ function Se(e) {
|
|
|
3245
3239
|
}
|
|
3246
3240
|
);
|
|
3247
3241
|
}
|
|
3248
|
-
function
|
|
3242
|
+
function Vn(e) {
|
|
3249
3243
|
var a;
|
|
3250
|
-
const [t, n] =
|
|
3251
|
-
() =>
|
|
3244
|
+
const [t, n] = I(
|
|
3245
|
+
() => fn({
|
|
3252
3246
|
canTrack: G(e.canTrack),
|
|
3253
3247
|
content: e.content
|
|
3254
3248
|
})
|
|
3255
3249
|
);
|
|
3256
3250
|
function i() {
|
|
3257
3251
|
var l;
|
|
3258
|
-
return
|
|
3252
|
+
return bn(
|
|
3259
3253
|
z(e.content).map((d) => ({
|
|
3260
3254
|
id: d.testVariationId,
|
|
3261
3255
|
testRatio: d.testRatio
|
|
@@ -3278,16 +3272,16 @@ function Bn(e) {
|
|
|
3278
3272
|
}
|
|
3279
3273
|
return V(() => {
|
|
3280
3274
|
}, []), /* @__PURE__ */ B(T, { children: [
|
|
3281
|
-
!e.isNestedRender &&
|
|
3275
|
+
!e.isNestedRender && K !== "reactNative" ? /* @__PURE__ */ s(
|
|
3282
3276
|
ie,
|
|
3283
3277
|
{
|
|
3284
3278
|
id: "builderio-init-variants-fns",
|
|
3285
|
-
scriptStr:
|
|
3279
|
+
scriptStr: gn()
|
|
3286
3280
|
}
|
|
3287
3281
|
) : null,
|
|
3288
3282
|
t ? /* @__PURE__ */ B(T, { children: [
|
|
3289
3283
|
/* @__PURE__ */ s(
|
|
3290
|
-
|
|
3284
|
+
ee,
|
|
3291
3285
|
{
|
|
3292
3286
|
id: "builderio-variants",
|
|
3293
3287
|
styles: o()
|
|
@@ -3301,7 +3295,7 @@ function Bn(e) {
|
|
|
3301
3295
|
}
|
|
3302
3296
|
),
|
|
3303
3297
|
(a = z(e.content)) == null ? void 0 : a.map((l) => /* @__PURE__ */ s(
|
|
3304
|
-
|
|
3298
|
+
pe,
|
|
3305
3299
|
{
|
|
3306
3300
|
isNestedRender: e.isNestedRender,
|
|
3307
3301
|
content: l,
|
|
@@ -3327,7 +3321,7 @@ function Bn(e) {
|
|
|
3327
3321
|
))
|
|
3328
3322
|
] }) : null,
|
|
3329
3323
|
/* @__PURE__ */ s(
|
|
3330
|
-
|
|
3324
|
+
pe,
|
|
3331
3325
|
{
|
|
3332
3326
|
isNestedRender: e.isNestedRender,
|
|
3333
3327
|
content: r(),
|
|
@@ -3352,13 +3346,13 @@ function Bn(e) {
|
|
|
3352
3346
|
)
|
|
3353
3347
|
] });
|
|
3354
3348
|
}
|
|
3355
|
-
const
|
|
3349
|
+
const Bn = async ({
|
|
3356
3350
|
builderContextValue: e,
|
|
3357
3351
|
symbol: t
|
|
3358
3352
|
}) => {
|
|
3359
3353
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
3360
3354
|
(e != null && e.apiKey))
|
|
3361
|
-
return
|
|
3355
|
+
return xe({
|
|
3362
3356
|
model: t.model,
|
|
3363
3357
|
apiKey: e.apiKey,
|
|
3364
3358
|
apiVersion: e.apiVersion,
|
|
@@ -3368,26 +3362,26 @@ const Wn = async ({
|
|
|
3368
3362
|
}
|
|
3369
3363
|
}
|
|
3370
3364
|
}).catch((n) => {
|
|
3371
|
-
|
|
3365
|
+
X.error("Could not fetch symbol content: ", n);
|
|
3372
3366
|
});
|
|
3373
3367
|
};
|
|
3374
|
-
function
|
|
3368
|
+
function Wn(e) {
|
|
3375
3369
|
var r, a, l, d;
|
|
3376
3370
|
function t() {
|
|
3377
3371
|
var c, m;
|
|
3378
3372
|
return [
|
|
3379
|
-
e.attributes[
|
|
3373
|
+
e.attributes[U()],
|
|
3380
3374
|
"builder-symbol",
|
|
3381
3375
|
(c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
|
|
3382
3376
|
(m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
3383
3377
|
].filter(Boolean).join(" ");
|
|
3384
3378
|
}
|
|
3385
|
-
const [n, i] =
|
|
3379
|
+
const [n, i] = I(() => {
|
|
3386
3380
|
var c;
|
|
3387
3381
|
return (c = e.symbol) == null ? void 0 : c.content;
|
|
3388
3382
|
});
|
|
3389
3383
|
function o() {
|
|
3390
|
-
n ||
|
|
3384
|
+
n || Bn({
|
|
3391
3385
|
symbol: e.symbol,
|
|
3392
3386
|
builderContextValue: e.builderContext
|
|
3393
3387
|
}).then((c) => {
|
|
@@ -3398,7 +3392,7 @@ function Nn(e) {
|
|
|
3398
3392
|
}, []), V(() => {
|
|
3399
3393
|
o();
|
|
3400
3394
|
}, [e.symbol]), /* @__PURE__ */ s("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ s(
|
|
3401
|
-
|
|
3395
|
+
Vn,
|
|
3402
3396
|
{
|
|
3403
3397
|
isNestedRender: !0,
|
|
3404
3398
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -3422,15 +3416,15 @@ function Nn(e) {
|
|
|
3422
3416
|
) });
|
|
3423
3417
|
}
|
|
3424
3418
|
export {
|
|
3425
|
-
|
|
3419
|
+
j as Blocks,
|
|
3426
3420
|
re as BuilderContext,
|
|
3427
3421
|
Xe as Button,
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3422
|
+
Tt as Columns,
|
|
3423
|
+
Vn as Content,
|
|
3424
|
+
Et as Fragment,
|
|
3425
|
+
Vt as Image,
|
|
3426
|
+
Bt as Section,
|
|
3427
|
+
Wn as Symbol,
|
|
3428
|
+
Ot as Text,
|
|
3429
|
+
cn as Video
|
|
3436
3430
|
};
|