@builder.io/sdk-react 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/index.cjs +27 -27
- package/lib/browser/index.mjs +1422 -842
- package/lib/browser/{server-entry-85583984.cjs → server-entry-af9b0dd3.cjs} +1 -1
- package/lib/browser/{server-entry-290b7c02.js → server-entry-be000726.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/index.cjs +37 -37
- package/lib/edge/index.mjs +2374 -1794
- package/lib/edge/{server-entry-85583984.cjs → server-entry-af9b0dd3.cjs} +1 -1
- package/lib/edge/{server-entry-0b9553c7.js → server-entry-b02b5197.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/node/index.cjs +15 -15
- package/lib/node/index.mjs +1251 -671
- package/lib/node/{server-entry-aa797118.cjs → server-entry-6e7475d7.cjs} +1 -1
- package/lib/node/{server-entry-2b34a58b.js → server-entry-9969d641.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/blocks/form/form/component-info.d.ts +2 -0
- package/types/blocks/form/form/form.d.ts +33 -0
- package/types/blocks/form/input/component-info.d.ts +2 -0
- package/types/blocks/form/select/component-info.d.ts +2 -0
- package/types/blocks/form/submit-button/component-info.d.ts +2 -0
- package/types/blocks/slot/slot.d.ts +3 -6
- package/types/constants/extra-components.d.ts +7 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/get-env.d.ts +2 -0
- package/types/functions/get.d.ts +1 -0
- package/types/blocks/form/component-info.d.ts +0 -2
- package/types/blocks/form/form.d.ts +0 -3
- package/types/blocks/input/component-info.d.ts +0 -2
- package/types/blocks/select/component-info.d.ts +0 -2
- package/types/blocks/submit-button/component-info.d.ts +0 -2
- /package/types/blocks/{input → form/input}/input.d.ts +0 -0
- /package/types/blocks/{select → form/select}/select.d.ts +0 -0
- /package/types/blocks/{submit-button → form/submit-button}/submit-button.d.ts +0 -0
package/lib/browser/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as l, Fragment as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { T as
|
|
5
|
-
import { _ as
|
|
2
|
+
import { jsx as l, Fragment as m, jsxs as F } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as Te, useState as v, useEffect as V, useContext as he, useRef as ee, createElement as ae } from "react";
|
|
4
|
+
import { T as z, i as M, k as j, l as je, m as G, n as _, o as re, p as X, q as ge, a as He, u as _e, v as Ke, w as qe, c as ze, e as Ee, x as Je, y as be, z as ye, A as Ye } from "./server-entry-be000726.js";
|
|
5
|
+
import { _ as On, f as Un, d as jn, h as Hn, g as _n, j as Kn, r as qn, s as zn, b as Jn, t as Yn } from "./server-entry-be000726.js";
|
|
6
6
|
const Qe = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Ge = (e) => typeof e == "string" && Qe.has(e.toLowerCase());
|
|
7
|
-
function
|
|
8
|
-
return /* @__PURE__ */ l(
|
|
7
|
+
function le(e) {
|
|
8
|
+
return /* @__PURE__ */ l(m, { children: Ge(e.TagName) ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(m, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
|
|
9
9
|
}
|
|
10
|
-
const
|
|
11
|
-
switch (
|
|
10
|
+
const K = () => {
|
|
11
|
+
switch (z) {
|
|
12
12
|
case "react":
|
|
13
13
|
case "reactNative":
|
|
14
14
|
case "rsc":
|
|
@@ -20,14 +20,14 @@ const O = () => {
|
|
|
20
20
|
return "class";
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
function
|
|
23
|
+
function Xe(e) {
|
|
24
24
|
return /* @__PURE__ */ l(
|
|
25
|
-
|
|
25
|
+
le,
|
|
26
26
|
{
|
|
27
27
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
28
28
|
attributes: {
|
|
29
29
|
...e.attributes,
|
|
30
|
-
[
|
|
30
|
+
[K()]: `${e.link ? "" : "builder-button"} ${e.attributes[K()] || ""}`,
|
|
31
31
|
...e.link ? {
|
|
32
32
|
href: e.link,
|
|
33
33
|
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
@@ -41,7 +41,7 @@ function Je(e) {
|
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const se = Te({
|
|
45
45
|
content: null,
|
|
46
46
|
context: {},
|
|
47
47
|
localState: void 0,
|
|
@@ -54,8 +54,8 @@ const oe = Ie({
|
|
|
54
54
|
inheritedStyles: {},
|
|
55
55
|
BlocksWrapper: "div",
|
|
56
56
|
BlocksWrapperProps: {}
|
|
57
|
-
}), Re =
|
|
58
|
-
function
|
|
57
|
+
}), Re = Te({ registeredComponents: {} });
|
|
58
|
+
function Ze(e) {
|
|
59
59
|
var t;
|
|
60
60
|
return {
|
|
61
61
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -66,7 +66,7 @@ function Xe(e) {
|
|
|
66
66
|
builderBlock: e
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
const
|
|
69
|
+
const et = ({
|
|
70
70
|
builder: e,
|
|
71
71
|
context: t,
|
|
72
72
|
event: n,
|
|
@@ -78,14 +78,14 @@ const Ze = ({
|
|
|
78
78
|
builder: e,
|
|
79
79
|
context: t,
|
|
80
80
|
event: n
|
|
81
|
-
}),
|
|
82
|
-
isEditing:
|
|
83
|
-
isBrowser:
|
|
84
|
-
isServer: !
|
|
85
|
-
getUserAttributes: () =>
|
|
86
|
-
}),
|
|
81
|
+
}), tt = () => ({
|
|
82
|
+
isEditing: M(),
|
|
83
|
+
isBrowser: j(),
|
|
84
|
+
isServer: !j(),
|
|
85
|
+
getUserAttributes: () => je()
|
|
86
|
+
}), nt = (e, {
|
|
87
87
|
isExpression: t = !0
|
|
88
|
-
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e,
|
|
88
|
+
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, pe = ({
|
|
89
89
|
code: e,
|
|
90
90
|
builder: t,
|
|
91
91
|
context: n,
|
|
@@ -94,19 +94,19 @@ const Ze = ({
|
|
|
94
94
|
rootSetState: a,
|
|
95
95
|
rootState: r
|
|
96
96
|
}) => {
|
|
97
|
-
const
|
|
97
|
+
const s = et({
|
|
98
98
|
builder: t,
|
|
99
99
|
context: n,
|
|
100
100
|
event: i,
|
|
101
|
-
state:
|
|
101
|
+
state: Pe({
|
|
102
102
|
rootState: r,
|
|
103
103
|
localState: o,
|
|
104
104
|
rootSetState: a
|
|
105
105
|
})
|
|
106
106
|
});
|
|
107
|
-
return new Function(...
|
|
107
|
+
return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
|
|
108
108
|
};
|
|
109
|
-
function
|
|
109
|
+
function Pe({
|
|
110
110
|
rootState: e,
|
|
111
111
|
localState: t,
|
|
112
112
|
rootSetState: n
|
|
@@ -116,7 +116,7 @@ function Ee({
|
|
|
116
116
|
if (t && o in t)
|
|
117
117
|
return t[o];
|
|
118
118
|
const a = i[o];
|
|
119
|
-
return typeof a == "object" ?
|
|
119
|
+
return typeof a == "object" ? Pe({
|
|
120
120
|
rootState: a,
|
|
121
121
|
localState: void 0,
|
|
122
122
|
rootSetState: n ? (r) => {
|
|
@@ -131,18 +131,18 @@ function Ee({
|
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function it() {
|
|
135
135
|
var e;
|
|
136
|
-
return typeof process != "undefined" &&
|
|
136
|
+
return typeof process != "undefined" && G((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
137
137
|
}
|
|
138
|
-
const
|
|
138
|
+
const ot = () => {
|
|
139
139
|
var i;
|
|
140
|
-
if (!
|
|
140
|
+
if (!it())
|
|
141
141
|
return !1;
|
|
142
142
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
|
|
143
|
-
return e && t && !n ? (
|
|
144
|
-
},
|
|
145
|
-
function
|
|
143
|
+
return e && t && !n ? (_.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;
|
|
144
|
+
}, at = (e) => (j() || ot(), pe(e));
|
|
145
|
+
function q({
|
|
146
146
|
code: e,
|
|
147
147
|
context: t,
|
|
148
148
|
localState: n,
|
|
@@ -152,14 +152,14 @@ function j({
|
|
|
152
152
|
isExpression: r = !0
|
|
153
153
|
}) {
|
|
154
154
|
if (e === "") {
|
|
155
|
-
|
|
155
|
+
_.warn("Skipping evaluation of empty code block.");
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
|
-
const
|
|
159
|
-
code:
|
|
158
|
+
const s = {
|
|
159
|
+
code: nt(e, {
|
|
160
160
|
isExpression: r
|
|
161
161
|
}),
|
|
162
|
-
builder:
|
|
162
|
+
builder: tt(),
|
|
163
163
|
context: t,
|
|
164
164
|
event: a,
|
|
165
165
|
rootSetState: o,
|
|
@@ -167,15 +167,15 @@ function j({
|
|
|
167
167
|
localState: n
|
|
168
168
|
};
|
|
169
169
|
try {
|
|
170
|
-
return
|
|
171
|
-
} catch (
|
|
172
|
-
|
|
170
|
+
return at(s);
|
|
171
|
+
} catch (c) {
|
|
172
|
+
_.error("Failed code evaluation: " + c.message, {
|
|
173
173
|
code: e
|
|
174
174
|
});
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
const
|
|
178
|
+
const Ve = (e, t, n) => {
|
|
179
179
|
if (Object(e) !== e)
|
|
180
180
|
return e;
|
|
181
181
|
const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
@@ -190,7 +190,7 @@ const rt = ({
|
|
|
190
190
|
}) => {
|
|
191
191
|
if (!e.bindings)
|
|
192
192
|
return e;
|
|
193
|
-
const a =
|
|
193
|
+
const a = re(e), r = {
|
|
194
194
|
...a,
|
|
195
195
|
properties: {
|
|
196
196
|
...a.properties
|
|
@@ -199,19 +199,19 @@ const rt = ({
|
|
|
199
199
|
...a.actions
|
|
200
200
|
}
|
|
201
201
|
};
|
|
202
|
-
for (const
|
|
203
|
-
const
|
|
204
|
-
code:
|
|
202
|
+
for (const s in e.bindings) {
|
|
203
|
+
const c = e.bindings[s], d = q({
|
|
204
|
+
code: c,
|
|
205
205
|
localState: n,
|
|
206
206
|
rootState: i,
|
|
207
207
|
rootSetState: o,
|
|
208
208
|
context: t
|
|
209
209
|
});
|
|
210
|
-
|
|
210
|
+
Ve(r, s, d);
|
|
211
211
|
}
|
|
212
212
|
return r;
|
|
213
213
|
};
|
|
214
|
-
function
|
|
214
|
+
function Z({
|
|
215
215
|
block: e,
|
|
216
216
|
context: t,
|
|
217
217
|
shouldEvaluateBindings: n,
|
|
@@ -229,18 +229,18 @@ function z({
|
|
|
229
229
|
}) : r;
|
|
230
230
|
}
|
|
231
231
|
function lt(e, t, n = {}) {
|
|
232
|
-
let i, o, a, r = null,
|
|
233
|
-
const
|
|
234
|
-
|
|
232
|
+
let i, o, a, r = null, s = 0;
|
|
233
|
+
const c = function() {
|
|
234
|
+
s = n.leading === !1 ? 0 : Date.now(), r = null, a = e.apply(i, o), r || (i = o = null);
|
|
235
235
|
};
|
|
236
236
|
return function() {
|
|
237
237
|
const d = Date.now();
|
|
238
|
-
!
|
|
239
|
-
const u = t - (d -
|
|
240
|
-
return i = this, o = arguments, u <= 0 || u > t ? (r && (clearTimeout(r), r = null),
|
|
238
|
+
!s && n.leading === !1 && (s = d);
|
|
239
|
+
const u = t - (d - s);
|
|
240
|
+
return i = this, o = arguments, u <= 0 || u > t ? (r && (clearTimeout(r), r = null), s = d, a = e.apply(i, o), r || (i = o = null)) : !r && n.trailing !== !1 && (r = setTimeout(c, u)), a;
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function O(e, ...t) {
|
|
244
244
|
const n = Object(e);
|
|
245
245
|
for (let i = 1; i < arguments.length; i++) {
|
|
246
246
|
const o = arguments[i];
|
|
@@ -250,12 +250,12 @@ function N(e, ...t) {
|
|
|
250
250
|
}
|
|
251
251
|
return n;
|
|
252
252
|
}
|
|
253
|
-
const
|
|
254
|
-
function
|
|
253
|
+
const ce = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
|
|
254
|
+
function st(e) {
|
|
255
255
|
for (const t of e)
|
|
256
256
|
switch (t.trigger) {
|
|
257
257
|
case "pageLoad":
|
|
258
|
-
|
|
258
|
+
Ae(t);
|
|
259
259
|
break;
|
|
260
260
|
case "hover":
|
|
261
261
|
dt(t);
|
|
@@ -265,31 +265,31 @@ function ct(e) {
|
|
|
265
265
|
break;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function de(e) {
|
|
269
269
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
const n =
|
|
273
|
-
for (const
|
|
274
|
-
for (const
|
|
275
|
-
|
|
271
|
+
function ue(e, t) {
|
|
272
|
+
const n = ct(e), i = getComputedStyle(t), o = e.steps[0].styles, a = e.steps[e.steps.length - 1].styles, r = [o, a];
|
|
273
|
+
for (const s of r)
|
|
274
|
+
for (const c of n)
|
|
275
|
+
c in s || (s[c] = i[c]);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function ct(e) {
|
|
278
278
|
const t = [];
|
|
279
279
|
for (const n of e.steps)
|
|
280
280
|
for (const i in n.styles)
|
|
281
281
|
t.indexOf(i) === -1 && t.push(i);
|
|
282
282
|
return t;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function Ae(e) {
|
|
285
285
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
286
286
|
if (!t.length) {
|
|
287
|
-
|
|
287
|
+
de(e.elementId || e.id || "");
|
|
288
288
|
return;
|
|
289
289
|
}
|
|
290
290
|
Array.from(t).forEach((n) => {
|
|
291
|
-
|
|
292
|
-
n.style.transition = `all ${e.duration}s ${
|
|
291
|
+
ue(e, n), n.style.transition = "none", n.style.transitionDelay = "0", O(n.style, e.steps[0].styles), setTimeout(() => {
|
|
292
|
+
n.style.transition = `all ${e.duration}s ${ce(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), O(n.style, e.steps[1].styles), setTimeout(() => {
|
|
293
293
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
294
294
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
295
295
|
});
|
|
@@ -298,52 +298,52 @@ function Pe(e) {
|
|
|
298
298
|
function dt(e) {
|
|
299
299
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
300
300
|
if (!t.length) {
|
|
301
|
-
|
|
301
|
+
de(e.elementId || e.id || "");
|
|
302
302
|
return;
|
|
303
303
|
}
|
|
304
304
|
Array.from(t).forEach((n) => {
|
|
305
|
-
|
|
305
|
+
ue(e, n);
|
|
306
306
|
const i = e.steps[0].styles, o = e.steps[1].styles;
|
|
307
307
|
function a() {
|
|
308
|
-
|
|
308
|
+
O(n.style, i);
|
|
309
309
|
}
|
|
310
310
|
function r() {
|
|
311
|
-
|
|
311
|
+
O(n.style, o);
|
|
312
312
|
}
|
|
313
313
|
a(), n.addEventListener("mouseenter", r), n.addEventListener("mouseleave", a), setTimeout(() => {
|
|
314
|
-
n.style.transition = `all ${e.duration}s ${
|
|
314
|
+
n.style.transition = `all ${e.duration}s ${ce(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
315
315
|
});
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
318
|
function ut(e) {
|
|
319
319
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
320
320
|
if (!t.length) {
|
|
321
|
-
|
|
321
|
+
de(e.elementId || e.id || "");
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
324
|
Array.from(t).forEach((n) => {
|
|
325
|
-
|
|
325
|
+
ue(e, n);
|
|
326
326
|
let i = !1, o = !1;
|
|
327
327
|
function a() {
|
|
328
|
-
!i &&
|
|
329
|
-
|
|
328
|
+
!i && s(n) ? (i = !0, o = !0, setTimeout(() => {
|
|
329
|
+
O(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", r), setTimeout(() => {
|
|
330
330
|
o = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
331
331
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
332
|
-
})) : e.repeat && i && !o && !
|
|
332
|
+
})) : e.repeat && i && !o && !s(n) && (i = !1, O(n.style, e.steps[0].styles));
|
|
333
333
|
}
|
|
334
334
|
const r = lt(a, 200, {
|
|
335
335
|
leading: !1
|
|
336
336
|
});
|
|
337
|
-
function
|
|
338
|
-
const
|
|
339
|
-
return
|
|
337
|
+
function s(u) {
|
|
338
|
+
const x = u.getBoundingClientRect(), C = window.innerHeight, y = (e.thresholdPercent || 0) / 100 * C;
|
|
339
|
+
return x.bottom > y && x.top < C - y;
|
|
340
340
|
}
|
|
341
|
-
const
|
|
341
|
+
const c = e.steps[0].styles;
|
|
342
342
|
function d() {
|
|
343
|
-
|
|
343
|
+
O(n.style, c);
|
|
344
344
|
}
|
|
345
345
|
d(), setTimeout(() => {
|
|
346
|
-
n.style.transition = `all ${e.duration}s ${
|
|
346
|
+
n.style.transition = `all ${e.duration}s ${ce(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
347
347
|
}), document.addEventListener("scroll", r, {
|
|
348
348
|
capture: !0,
|
|
349
349
|
passive: !0
|
|
@@ -356,7 +356,7 @@ const mt = ({
|
|
|
356
356
|
registeredComponents: n
|
|
357
357
|
}) => {
|
|
358
358
|
var a;
|
|
359
|
-
const i = (a =
|
|
359
|
+
const i = (a = Z({
|
|
360
360
|
block: e,
|
|
361
361
|
localState: t.localState,
|
|
362
362
|
rootState: t.rootState,
|
|
@@ -382,7 +382,7 @@ const mt = ({
|
|
|
382
382
|
} = e;
|
|
383
383
|
if (!(n != null && n.collection))
|
|
384
384
|
return;
|
|
385
|
-
const o =
|
|
385
|
+
const o = q({
|
|
386
386
|
code: n.collection,
|
|
387
387
|
localState: t.localState,
|
|
388
388
|
rootState: t.rootState,
|
|
@@ -392,20 +392,20 @@ const mt = ({
|
|
|
392
392
|
if (!Array.isArray(o))
|
|
393
393
|
return;
|
|
394
394
|
const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
|
|
395
|
-
return o.map((
|
|
395
|
+
return o.map((c, d) => ({
|
|
396
396
|
context: {
|
|
397
397
|
...t,
|
|
398
398
|
localState: {
|
|
399
399
|
...t.localState,
|
|
400
400
|
$index: d,
|
|
401
|
-
$item:
|
|
402
|
-
[r]:
|
|
401
|
+
$item: c,
|
|
402
|
+
[r]: c,
|
|
403
403
|
[`$${r}Index`]: d
|
|
404
404
|
}
|
|
405
405
|
},
|
|
406
406
|
block: i
|
|
407
407
|
}));
|
|
408
|
-
},
|
|
408
|
+
}, Be = {
|
|
409
409
|
small: {
|
|
410
410
|
min: 320,
|
|
411
411
|
default: 321,
|
|
@@ -421,11 +421,11 @@ const mt = ({
|
|
|
421
421
|
default: 991,
|
|
422
422
|
max: 1200
|
|
423
423
|
}
|
|
424
|
-
},
|
|
424
|
+
}, xe = (e, t = Be) => `@media (max-width: ${t[e].max}px)`, We = ({
|
|
425
425
|
small: e,
|
|
426
426
|
medium: t
|
|
427
427
|
}) => {
|
|
428
|
-
const n =
|
|
428
|
+
const n = re(Be);
|
|
429
429
|
if (!e || !t)
|
|
430
430
|
return n;
|
|
431
431
|
const i = Math.floor(e / 2);
|
|
@@ -447,11 +447,11 @@ const mt = ({
|
|
|
447
447
|
min: a,
|
|
448
448
|
default: a + 1
|
|
449
449
|
}, n;
|
|
450
|
-
}, ht = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(),
|
|
450
|
+
}, ht = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Fe = (e) => Object.entries(e).map(([n, i]) => {
|
|
451
451
|
if (typeof i == "string")
|
|
452
452
|
return `${ht(n)}: ${i};`;
|
|
453
|
-
}).filter(
|
|
454
|
-
`),
|
|
453
|
+
}).filter(G), gt = (e) => Fe(e).join(`
|
|
454
|
+
`), ne = ({
|
|
455
455
|
mediaQuery: e,
|
|
456
456
|
className: t,
|
|
457
457
|
styles: n
|
|
@@ -463,12 +463,12 @@ const mt = ({
|
|
|
463
463
|
${i}
|
|
464
464
|
}` : i;
|
|
465
465
|
};
|
|
466
|
-
function
|
|
466
|
+
function te(e) {
|
|
467
467
|
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
468
468
|
}
|
|
469
469
|
function bt(e) {
|
|
470
470
|
function t() {
|
|
471
|
-
const i =
|
|
471
|
+
const i = Z({
|
|
472
472
|
block: e.block,
|
|
473
473
|
localState: e.context.localState,
|
|
474
474
|
rootState: e.context.rootState,
|
|
@@ -476,48 +476,48 @@ function bt(e) {
|
|
|
476
476
|
context: e.context.context,
|
|
477
477
|
shouldEvaluateBindings: !0
|
|
478
478
|
});
|
|
479
|
-
return
|
|
479
|
+
return G(i.hide) ? !i.hide : G(i.show) ? i.show : !0;
|
|
480
480
|
}
|
|
481
481
|
function n() {
|
|
482
482
|
var y;
|
|
483
|
-
const i =
|
|
483
|
+
const i = Z({
|
|
484
484
|
block: e.block,
|
|
485
485
|
localState: e.context.localState,
|
|
486
486
|
rootState: e.context.rootState,
|
|
487
487
|
rootSetState: e.context.rootSetState,
|
|
488
488
|
context: e.context.context,
|
|
489
489
|
shouldEvaluateBindings: !0
|
|
490
|
-
}), o = i.responsiveStyles, a = e.context.content, r =
|
|
490
|
+
}), o = i.responsiveStyles, a = e.context.content, r = We(
|
|
491
491
|
((y = a == null ? void 0 : a.meta) == null ? void 0 : y.breakpoints) || {}
|
|
492
|
-
),
|
|
492
|
+
), s = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, d = o == null ? void 0 : o.small, u = i.id;
|
|
493
493
|
if (!u)
|
|
494
494
|
return "";
|
|
495
|
-
const
|
|
495
|
+
const x = s ? ne({
|
|
496
496
|
className: u,
|
|
497
|
-
styles:
|
|
498
|
-
}) : "",
|
|
497
|
+
styles: s
|
|
498
|
+
}) : "", C = c ? ne({
|
|
499
499
|
className: u,
|
|
500
|
-
styles:
|
|
501
|
-
mediaQuery:
|
|
500
|
+
styles: c,
|
|
501
|
+
mediaQuery: xe(
|
|
502
502
|
"medium",
|
|
503
503
|
r
|
|
504
504
|
)
|
|
505
|
-
}) : "",
|
|
505
|
+
}) : "", f = d ? ne({
|
|
506
506
|
className: u,
|
|
507
507
|
styles: d,
|
|
508
|
-
mediaQuery:
|
|
508
|
+
mediaQuery: xe(
|
|
509
509
|
"small",
|
|
510
510
|
r
|
|
511
511
|
)
|
|
512
512
|
}) : "";
|
|
513
|
-
return [
|
|
513
|
+
return [x, C, f].join(" ");
|
|
514
514
|
}
|
|
515
|
-
return /* @__PURE__ */ l(
|
|
515
|
+
return /* @__PURE__ */ l(m, { children: n() && t() ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(te, { styles: n() }) }) : null });
|
|
516
516
|
}
|
|
517
517
|
function yt(e) {
|
|
518
518
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
519
519
|
}
|
|
520
|
-
const
|
|
520
|
+
const pt = (e) => `on${yt(e)}`, xt = (e, t) => (n) => q({
|
|
521
521
|
code: e,
|
|
522
522
|
context: t.context,
|
|
523
523
|
localState: t.localState,
|
|
@@ -526,16 +526,16 @@ const St = (e) => `on${yt(e)}`, xt = (e, t) => (n) => j({
|
|
|
526
526
|
event: n,
|
|
527
527
|
isExpression: !1
|
|
528
528
|
});
|
|
529
|
-
function
|
|
529
|
+
function Ne(e) {
|
|
530
530
|
var i;
|
|
531
531
|
const t = {}, n = (i = e.block.actions) != null ? i : {};
|
|
532
532
|
for (const o in n) {
|
|
533
533
|
if (!n.hasOwnProperty(o))
|
|
534
534
|
continue;
|
|
535
535
|
const a = n[o];
|
|
536
|
-
let r =
|
|
536
|
+
let r = pt(o);
|
|
537
537
|
if (e.stripPrefix)
|
|
538
|
-
switch (
|
|
538
|
+
switch (z) {
|
|
539
539
|
case "vue":
|
|
540
540
|
r = r.replace("v-on:", "");
|
|
541
541
|
break;
|
|
@@ -547,25 +547,25 @@ function $e(e) {
|
|
|
547
547
|
}
|
|
548
548
|
return t;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function St({
|
|
551
551
|
style: e
|
|
552
552
|
}) {
|
|
553
553
|
return e;
|
|
554
554
|
}
|
|
555
|
-
const
|
|
555
|
+
const vt = ({
|
|
556
556
|
block: e,
|
|
557
557
|
context: t
|
|
558
|
-
}) =>
|
|
558
|
+
}) => $e(St({
|
|
559
559
|
style: e.style || {},
|
|
560
560
|
context: t,
|
|
561
561
|
block: e
|
|
562
562
|
}));
|
|
563
|
-
function
|
|
564
|
-
switch (
|
|
563
|
+
function $e(e) {
|
|
564
|
+
switch (z) {
|
|
565
565
|
case "svelte":
|
|
566
566
|
case "vue":
|
|
567
567
|
case "solid":
|
|
568
|
-
return
|
|
568
|
+
return Fe(e).join(" ");
|
|
569
569
|
case "qwik":
|
|
570
570
|
case "reactNative":
|
|
571
571
|
case "react":
|
|
@@ -581,7 +581,7 @@ function kt({
|
|
|
581
581
|
const Ct = (e) => ({
|
|
582
582
|
href: e.href
|
|
583
583
|
});
|
|
584
|
-
function
|
|
584
|
+
function me({
|
|
585
585
|
block: e,
|
|
586
586
|
context: t
|
|
587
587
|
}) {
|
|
@@ -590,11 +590,11 @@ function ce({
|
|
|
590
590
|
...Ct(e),
|
|
591
591
|
...e.properties,
|
|
592
592
|
"builder-id": e.id,
|
|
593
|
-
style:
|
|
593
|
+
style: vt({
|
|
594
594
|
block: e,
|
|
595
595
|
context: t
|
|
596
596
|
}),
|
|
597
|
-
[
|
|
597
|
+
[K()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
598
598
|
};
|
|
599
599
|
return kt({
|
|
600
600
|
properties: n,
|
|
@@ -604,14 +604,14 @@ function ce({
|
|
|
604
604
|
}
|
|
605
605
|
function wt(e) {
|
|
606
606
|
return /* @__PURE__ */ l(
|
|
607
|
-
|
|
607
|
+
le,
|
|
608
608
|
{
|
|
609
609
|
TagName: e.Wrapper,
|
|
610
|
-
attributes:
|
|
610
|
+
attributes: me({
|
|
611
611
|
block: e.block,
|
|
612
612
|
context: e.context
|
|
613
613
|
}),
|
|
614
|
-
actionAttributes:
|
|
614
|
+
actionAttributes: Ne({
|
|
615
615
|
block: e.block,
|
|
616
616
|
rootState: e.context.rootState,
|
|
617
617
|
rootSetState: e.context.rootSetState,
|
|
@@ -629,11 +629,11 @@ function It(e) {
|
|
|
629
629
|
{
|
|
630
630
|
...e.wrapperProps,
|
|
631
631
|
attributes: e.includeBlockProps ? {
|
|
632
|
-
...
|
|
632
|
+
...me({
|
|
633
633
|
block: e.block,
|
|
634
634
|
context: e.context
|
|
635
635
|
}),
|
|
636
|
-
|
|
636
|
+
...Ne({
|
|
637
637
|
block: e.block,
|
|
638
638
|
rootState: e.context.rootState,
|
|
639
639
|
rootSetState: e.context.rootSetState,
|
|
@@ -654,14 +654,14 @@ const Tt = ({
|
|
|
654
654
|
isInteractive: a,
|
|
655
655
|
contextValue: r
|
|
656
656
|
}) => {
|
|
657
|
-
const
|
|
657
|
+
const s = {
|
|
658
658
|
...e,
|
|
659
659
|
/**
|
|
660
660
|
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
661
661
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
662
662
|
*/
|
|
663
663
|
...o ? {
|
|
664
|
-
attributes:
|
|
664
|
+
attributes: me({
|
|
665
665
|
block: t,
|
|
666
666
|
context: r
|
|
667
667
|
})
|
|
@@ -673,14 +673,14 @@ const Tt = ({
|
|
|
673
673
|
context: n,
|
|
674
674
|
wrapperProps: e,
|
|
675
675
|
includeBlockProps: o
|
|
676
|
-
} :
|
|
676
|
+
} : s;
|
|
677
677
|
};
|
|
678
|
-
function
|
|
678
|
+
function Se(e) {
|
|
679
679
|
var i;
|
|
680
680
|
const [t, n] = v(
|
|
681
681
|
() => e.isInteractive ? It : e.componentRef
|
|
682
682
|
);
|
|
683
|
-
return /* @__PURE__ */ l(
|
|
683
|
+
return /* @__PURE__ */ l(m, { children: e.componentRef ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
684
684
|
t,
|
|
685
685
|
{
|
|
686
686
|
...Tt({
|
|
@@ -694,7 +694,7 @@ function xe(e) {
|
|
|
694
694
|
contextValue: e.context
|
|
695
695
|
}),
|
|
696
696
|
children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
|
|
697
|
-
|
|
697
|
+
J,
|
|
698
698
|
{
|
|
699
699
|
block: o,
|
|
700
700
|
context: e.context,
|
|
@@ -706,10 +706,10 @@ function xe(e) {
|
|
|
706
706
|
}
|
|
707
707
|
) }) : null });
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Et(e) {
|
|
710
710
|
const [t, n] = v(() => e.repeatContext);
|
|
711
|
-
return /* @__PURE__ */ l(
|
|
712
|
-
|
|
711
|
+
return /* @__PURE__ */ l(se.Provider, { value: t, children: /* @__PURE__ */ l(
|
|
712
|
+
J,
|
|
713
713
|
{
|
|
714
714
|
block: e.block,
|
|
715
715
|
context: t,
|
|
@@ -718,8 +718,8 @@ function Rt(e) {
|
|
|
718
718
|
}
|
|
719
719
|
) });
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
var u,
|
|
721
|
+
function J(e) {
|
|
722
|
+
var u, x, C;
|
|
723
723
|
function t() {
|
|
724
724
|
return mt({
|
|
725
725
|
block: e.block,
|
|
@@ -734,8 +734,8 @@ function Y(e) {
|
|
|
734
734
|
});
|
|
735
735
|
}
|
|
736
736
|
function i() {
|
|
737
|
-
var
|
|
738
|
-
return (
|
|
737
|
+
var f;
|
|
738
|
+
return (f = e.block.repeat) != null && f.collection ? e.block : Z({
|
|
739
739
|
block: e.block,
|
|
740
740
|
localState: e.context.localState,
|
|
741
741
|
rootState: e.context.rootState,
|
|
@@ -749,73 +749,73 @@ function Y(e) {
|
|
|
749
749
|
return e.block.tagName === "a" || ((y = i().properties) == null ? void 0 : y.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
750
750
|
}
|
|
751
751
|
function a() {
|
|
752
|
-
var
|
|
753
|
-
if ((
|
|
754
|
-
return !!((
|
|
755
|
-
const
|
|
756
|
-
return ("show" in i() ? i().show : !0) && !
|
|
752
|
+
var p, E;
|
|
753
|
+
if ((p = e.block.repeat) != null && p.collection)
|
|
754
|
+
return !!((E = n == null ? void 0 : n()) != null && E.length);
|
|
755
|
+
const f = "hide" in i() ? i().hide : !1;
|
|
756
|
+
return ("show" in i() ? i().show : !0) && !f;
|
|
757
757
|
}
|
|
758
758
|
function r() {
|
|
759
|
-
var y,
|
|
760
|
-
return !((y = t == null ? void 0 : t()) != null && y.component) && !n() ? (
|
|
759
|
+
var y, p;
|
|
760
|
+
return !((y = t == null ? void 0 : t()) != null && y.component) && !n() ? (p = i().children) != null ? p : [] : [];
|
|
761
761
|
}
|
|
762
|
-
function
|
|
763
|
-
var
|
|
762
|
+
function s() {
|
|
763
|
+
var f, y, p, E, B, k, I, A, P, $, L;
|
|
764
764
|
return {
|
|
765
|
-
blockChildren: (
|
|
765
|
+
blockChildren: (f = i().children) != null ? f : [],
|
|
766
766
|
componentRef: (y = t == null ? void 0 : t()) == null ? void 0 : y.component,
|
|
767
767
|
componentOptions: {
|
|
768
|
-
...
|
|
768
|
+
...Ze(i()),
|
|
769
769
|
builderContext: e.context,
|
|
770
|
-
...((
|
|
770
|
+
...((p = t == null ? void 0 : t()) == null ? void 0 : p.name) === "Core:Button" || ((E = t == null ? void 0 : t()) == null ? void 0 : E.name) === "Symbol" || ((B = t == null ? void 0 : t()) == null ? void 0 : B.name) === "Columns" || ((k = t == null ? void 0 : t()) == null ? void 0 : k.name) === "Form:Form" ? {
|
|
771
771
|
builderLinkComponent: e.linkComponent
|
|
772
772
|
} : {},
|
|
773
|
-
...((
|
|
773
|
+
...((I = t == null ? void 0 : t()) == null ? void 0 : I.name) === "Symbol" || ((A = t == null ? void 0 : t()) == null ? void 0 : A.name) === "Columns" || ((P = t == null ? void 0 : t()) == null ? void 0 : P.name) === "Form:Form" ? {
|
|
774
774
|
builderComponents: e.registeredComponents
|
|
775
775
|
} : {}
|
|
776
776
|
},
|
|
777
|
-
context:
|
|
777
|
+
context: c,
|
|
778
778
|
linkComponent: e.linkComponent,
|
|
779
779
|
registeredComponents: e.registeredComponents,
|
|
780
780
|
builderBlock: i(),
|
|
781
|
-
includeBlockProps: ((
|
|
782
|
-
isInteractive: !((
|
|
781
|
+
includeBlockProps: (($ = t == null ? void 0 : t()) == null ? void 0 : $.noWrap) === !0,
|
|
782
|
+
isInteractive: !((L = t == null ? void 0 : t()) != null && L.isRSC)
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
|
-
const [
|
|
786
|
-
return
|
|
787
|
-
const
|
|
788
|
-
y &&
|
|
789
|
-
y.filter((
|
|
790
|
-
...
|
|
791
|
-
elementId:
|
|
785
|
+
const [c, d] = v(() => e.context);
|
|
786
|
+
return V(() => {
|
|
787
|
+
const f = i().id, y = i().animations;
|
|
788
|
+
y && f && st(
|
|
789
|
+
y.filter((p) => p.trigger !== "hover").map((p) => ({
|
|
790
|
+
...p,
|
|
791
|
+
elementId: f
|
|
792
792
|
}))
|
|
793
793
|
);
|
|
794
|
-
}, []), /* @__PURE__ */ l(
|
|
794
|
+
}, []), /* @__PURE__ */ l(m, { children: a() ? /* @__PURE__ */ F(m, { children: [
|
|
795
795
|
/* @__PURE__ */ l(bt, { block: e.block, context: e.context }),
|
|
796
|
-
(u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ l(
|
|
797
|
-
|
|
796
|
+
(u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
797
|
+
Se,
|
|
798
798
|
{
|
|
799
|
-
componentRef:
|
|
800
|
-
componentOptions:
|
|
801
|
-
blockChildren:
|
|
802
|
-
context:
|
|
803
|
-
registeredComponents:
|
|
804
|
-
linkComponent:
|
|
805
|
-
builderBlock:
|
|
806
|
-
includeBlockProps:
|
|
807
|
-
isInteractive:
|
|
799
|
+
componentRef: s().componentRef,
|
|
800
|
+
componentOptions: s().componentOptions,
|
|
801
|
+
blockChildren: s().blockChildren,
|
|
802
|
+
context: s().context,
|
|
803
|
+
registeredComponents: s().registeredComponents,
|
|
804
|
+
linkComponent: s().linkComponent,
|
|
805
|
+
builderBlock: s().builderBlock,
|
|
806
|
+
includeBlockProps: s().includeBlockProps,
|
|
807
|
+
isInteractive: s().isInteractive
|
|
808
808
|
}
|
|
809
|
-
) }) : /* @__PURE__ */ l(
|
|
810
|
-
|
|
809
|
+
) }) : /* @__PURE__ */ l(m, { children: n() ? /* @__PURE__ */ l(m, { children: (C = n()) == null ? void 0 : C.map((f, y) => /* @__PURE__ */ l(
|
|
810
|
+
Et,
|
|
811
811
|
{
|
|
812
|
-
repeatContext:
|
|
813
|
-
block:
|
|
812
|
+
repeatContext: f.context,
|
|
813
|
+
block: f.block,
|
|
814
814
|
registeredComponents: e.registeredComponents,
|
|
815
815
|
linkComponent: e.linkComponent
|
|
816
816
|
},
|
|
817
817
|
y
|
|
818
|
-
)) }) : /* @__PURE__ */ l(
|
|
818
|
+
)) }) : /* @__PURE__ */ l(m, { children: /* @__PURE__ */ F(
|
|
819
819
|
wt,
|
|
820
820
|
{
|
|
821
821
|
Wrapper: o(),
|
|
@@ -824,42 +824,42 @@ function Y(e) {
|
|
|
824
824
|
linkComponent: e.linkComponent,
|
|
825
825
|
children: [
|
|
826
826
|
/* @__PURE__ */ l(
|
|
827
|
-
|
|
827
|
+
Se,
|
|
828
828
|
{
|
|
829
|
-
componentRef:
|
|
830
|
-
componentOptions:
|
|
831
|
-
blockChildren:
|
|
832
|
-
context:
|
|
833
|
-
registeredComponents:
|
|
834
|
-
linkComponent:
|
|
835
|
-
builderBlock:
|
|
836
|
-
includeBlockProps:
|
|
837
|
-
isInteractive:
|
|
829
|
+
componentRef: s().componentRef,
|
|
830
|
+
componentOptions: s().componentOptions,
|
|
831
|
+
blockChildren: s().blockChildren,
|
|
832
|
+
context: s().context,
|
|
833
|
+
registeredComponents: s().registeredComponents,
|
|
834
|
+
linkComponent: s().linkComponent,
|
|
835
|
+
builderBlock: s().builderBlock,
|
|
836
|
+
includeBlockProps: s().includeBlockProps,
|
|
837
|
+
isInteractive: s().isInteractive
|
|
838
838
|
}
|
|
839
839
|
),
|
|
840
|
-
(
|
|
841
|
-
|
|
840
|
+
(x = r()) == null ? void 0 : x.map((f) => /* @__PURE__ */ l(
|
|
841
|
+
J,
|
|
842
842
|
{
|
|
843
|
-
block:
|
|
844
|
-
context:
|
|
843
|
+
block: f,
|
|
844
|
+
context: c,
|
|
845
845
|
registeredComponents: e.registeredComponents,
|
|
846
846
|
linkComponent: e.linkComponent
|
|
847
847
|
},
|
|
848
|
-
|
|
848
|
+
f.id
|
|
849
849
|
))
|
|
850
850
|
]
|
|
851
851
|
}
|
|
852
852
|
) }) })
|
|
853
853
|
] }) : null });
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function Rt(e) {
|
|
856
856
|
function t() {
|
|
857
857
|
var o;
|
|
858
858
|
return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
|
|
859
859
|
}
|
|
860
860
|
function n() {
|
|
861
861
|
var o, a;
|
|
862
|
-
|
|
862
|
+
M() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
|
|
863
863
|
{
|
|
864
864
|
type: "builder.clickEmptyBlocks",
|
|
865
865
|
data: {
|
|
@@ -872,7 +872,7 @@ function Et(e) {
|
|
|
872
872
|
}
|
|
873
873
|
function i() {
|
|
874
874
|
var o, a;
|
|
875
|
-
|
|
875
|
+
M() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
|
|
876
876
|
{
|
|
877
877
|
type: "builder.hoverEmptyBlocks",
|
|
878
878
|
data: {
|
|
@@ -883,7 +883,7 @@ function Et(e) {
|
|
|
883
883
|
"*"
|
|
884
884
|
));
|
|
885
885
|
}
|
|
886
|
-
return /* @__PURE__ */
|
|
886
|
+
return /* @__PURE__ */ F(m, { children: [
|
|
887
887
|
/* @__PURE__ */ l(
|
|
888
888
|
e.BlocksWrapper,
|
|
889
889
|
{
|
|
@@ -905,11 +905,11 @@ function Et(e) {
|
|
|
905
905
|
}` })
|
|
906
906
|
] });
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function U(e) {
|
|
909
909
|
var i, o, a;
|
|
910
|
-
const t =
|
|
910
|
+
const t = he(se), n = he(Re);
|
|
911
911
|
return /* @__PURE__ */ l(
|
|
912
|
-
|
|
912
|
+
Rt,
|
|
913
913
|
{
|
|
914
914
|
blocks: e.blocks,
|
|
915
915
|
parent: e.parent,
|
|
@@ -917,8 +917,8 @@ function Q(e) {
|
|
|
917
917
|
styleProp: e.styleProp,
|
|
918
918
|
BlocksWrapper: (i = e.context) == null ? void 0 : i.BlocksWrapper,
|
|
919
919
|
BlocksWrapperProps: (o = e.context) == null ? void 0 : o.BlocksWrapperProps,
|
|
920
|
-
children: e.blocks ? /* @__PURE__ */ l(
|
|
921
|
-
|
|
920
|
+
children: e.blocks ? /* @__PURE__ */ l(m, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ l(
|
|
921
|
+
J,
|
|
922
922
|
{
|
|
923
923
|
block: r,
|
|
924
924
|
linkComponent: e.linkComponent,
|
|
@@ -931,81 +931,81 @@ function Q(e) {
|
|
|
931
931
|
);
|
|
932
932
|
}
|
|
933
933
|
function Pt(e) {
|
|
934
|
-
var
|
|
934
|
+
var B;
|
|
935
935
|
const [t, n] = v(
|
|
936
936
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
937
937
|
), [i, o] = v(() => e.columns || []), [a, r] = v(
|
|
938
938
|
() => e.stackColumnsAt || "tablet"
|
|
939
939
|
);
|
|
940
|
-
function
|
|
941
|
-
var
|
|
942
|
-
return ((
|
|
940
|
+
function s(k) {
|
|
941
|
+
var I;
|
|
942
|
+
return ((I = i[k]) == null ? void 0 : I.width) || 100 / i.length;
|
|
943
943
|
}
|
|
944
|
-
function
|
|
945
|
-
const
|
|
946
|
-
return `calc(${
|
|
944
|
+
function c(k) {
|
|
945
|
+
const I = t * (i.length - 1) / i.length;
|
|
946
|
+
return `calc(${s(k)}% - ${I}px)`;
|
|
947
947
|
}
|
|
948
948
|
function d({
|
|
949
|
-
stackedStyle:
|
|
950
|
-
desktopStyle:
|
|
949
|
+
stackedStyle: k,
|
|
950
|
+
desktopStyle: I
|
|
951
951
|
}) {
|
|
952
|
-
return a === "tablet" ?
|
|
952
|
+
return a === "tablet" ? k : I;
|
|
953
953
|
}
|
|
954
954
|
function u({
|
|
955
|
-
stackedStyle:
|
|
956
|
-
desktopStyle:
|
|
955
|
+
stackedStyle: k,
|
|
956
|
+
desktopStyle: I
|
|
957
957
|
}) {
|
|
958
|
-
return a === "never" ?
|
|
958
|
+
return a === "never" ? I : k;
|
|
959
959
|
}
|
|
960
|
-
const [
|
|
960
|
+
const [x, C] = v(
|
|
961
961
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
962
962
|
);
|
|
963
|
-
function
|
|
963
|
+
function f() {
|
|
964
964
|
return {
|
|
965
|
-
"--flex-dir":
|
|
965
|
+
"--flex-dir": x,
|
|
966
966
|
"--flex-dir-tablet": d({
|
|
967
|
-
stackedStyle:
|
|
967
|
+
stackedStyle: x,
|
|
968
968
|
desktopStyle: "row"
|
|
969
969
|
})
|
|
970
970
|
};
|
|
971
971
|
}
|
|
972
|
-
function y(
|
|
973
|
-
const
|
|
972
|
+
function y(k) {
|
|
973
|
+
const I = k === 0 ? 0 : t, A = c(k), P = `${I}px`, $ = "100%", L = 0;
|
|
974
974
|
return {
|
|
975
975
|
...{
|
|
976
976
|
display: "flex",
|
|
977
977
|
flexDirection: "column",
|
|
978
978
|
alignItems: "stretch"
|
|
979
979
|
},
|
|
980
|
-
width:
|
|
981
|
-
["marginLeft"]:
|
|
980
|
+
width: A,
|
|
981
|
+
["marginLeft"]: P,
|
|
982
982
|
"--column-width-mobile": u({
|
|
983
|
-
stackedStyle:
|
|
984
|
-
desktopStyle:
|
|
983
|
+
stackedStyle: $,
|
|
984
|
+
desktopStyle: A
|
|
985
985
|
}),
|
|
986
986
|
"--column-margin-left-mobile": u({
|
|
987
987
|
stackedStyle: L,
|
|
988
|
-
desktopStyle:
|
|
988
|
+
desktopStyle: P
|
|
989
989
|
}),
|
|
990
990
|
"--column-width-tablet": d({
|
|
991
|
-
stackedStyle:
|
|
992
|
-
desktopStyle:
|
|
991
|
+
stackedStyle: $,
|
|
992
|
+
desktopStyle: A
|
|
993
993
|
}),
|
|
994
994
|
"--column-margin-left-tablet": d({
|
|
995
995
|
stackedStyle: L,
|
|
996
|
-
desktopStyle:
|
|
996
|
+
desktopStyle: P
|
|
997
997
|
})
|
|
998
998
|
};
|
|
999
999
|
}
|
|
1000
|
-
function
|
|
1001
|
-
var
|
|
1002
|
-
return
|
|
1003
|
-
((
|
|
1004
|
-
)[
|
|
1000
|
+
function p(k) {
|
|
1001
|
+
var A, P;
|
|
1002
|
+
return We(
|
|
1003
|
+
((P = (A = e.builderContext.content) == null ? void 0 : A.meta) == null ? void 0 : P.breakpoints) || {}
|
|
1004
|
+
)[k].max;
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function E() {
|
|
1007
1007
|
return `
|
|
1008
|
-
@media (max-width: ${
|
|
1008
|
+
@media (max-width: ${p("medium")}px) {
|
|
1009
1009
|
.${e.builderBlock.id}-breakpoints {
|
|
1010
1010
|
flex-direction: var(--flex-dir-tablet);
|
|
1011
1011
|
align-items: stretch;
|
|
@@ -1017,7 +1017,7 @@ function Pt(e) {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
}
|
|
1019
1019
|
|
|
1020
|
-
@media (max-width: ${
|
|
1020
|
+
@media (max-width: ${p("small")}px) {
|
|
1021
1021
|
.${e.builderBlock.id}-breakpoints {
|
|
1022
1022
|
flex-direction: var(--flex-dir);
|
|
1023
1023
|
align-items: stretch;
|
|
@@ -1030,30 +1030,30 @@ function Pt(e) {
|
|
|
1030
1030
|
},
|
|
1031
1031
|
`;
|
|
1032
1032
|
}
|
|
1033
|
-
return /* @__PURE__ */
|
|
1034
|
-
/* @__PURE__ */
|
|
1033
|
+
return /* @__PURE__ */ F(m, { children: [
|
|
1034
|
+
/* @__PURE__ */ F(
|
|
1035
1035
|
"div",
|
|
1036
1036
|
{
|
|
1037
1037
|
className: `builder-columns ${e.builderBlock.id}-breakpoints div-002fb3ba`,
|
|
1038
|
-
style:
|
|
1038
|
+
style: f(),
|
|
1039
1039
|
children: [
|
|
1040
|
-
/* @__PURE__ */ l(
|
|
1041
|
-
(
|
|
1042
|
-
|
|
1040
|
+
/* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(te, { styles: E() }) }),
|
|
1041
|
+
(B = e.columns) == null ? void 0 : B.map((k, I) => /* @__PURE__ */ l(
|
|
1042
|
+
le,
|
|
1043
1043
|
{
|
|
1044
|
-
TagName:
|
|
1044
|
+
TagName: k.link ? e.builderLinkComponent || "a" : "div",
|
|
1045
1045
|
actionAttributes: {},
|
|
1046
1046
|
attributes: {
|
|
1047
|
-
...
|
|
1048
|
-
href:
|
|
1047
|
+
...k.link ? {
|
|
1048
|
+
href: k.link
|
|
1049
1049
|
} : {},
|
|
1050
|
-
[
|
|
1051
|
-
style:
|
|
1050
|
+
[K()]: "builder-column",
|
|
1051
|
+
style: $e(y(I))
|
|
1052
1052
|
},
|
|
1053
1053
|
children: /* @__PURE__ */ l(
|
|
1054
|
-
|
|
1054
|
+
U,
|
|
1055
1055
|
{
|
|
1056
|
-
path: `component.options.columns.${
|
|
1056
|
+
path: `component.options.columns.${I}.blocks`,
|
|
1057
1057
|
parent: e.builderBlock.id,
|
|
1058
1058
|
styleProp: {
|
|
1059
1059
|
flexGrow: "1"
|
|
@@ -1061,11 +1061,11 @@ function Pt(e) {
|
|
|
1061
1061
|
context: e.builderContext,
|
|
1062
1062
|
registeredComponents: e.builderComponents,
|
|
1063
1063
|
linkComponent: e.builderLinkComponent,
|
|
1064
|
-
blocks:
|
|
1064
|
+
blocks: k.blocks
|
|
1065
1065
|
}
|
|
1066
1066
|
)
|
|
1067
1067
|
},
|
|
1068
|
-
|
|
1068
|
+
I
|
|
1069
1069
|
))
|
|
1070
1070
|
]
|
|
1071
1071
|
}
|
|
@@ -1076,17 +1076,17 @@ function Pt(e) {
|
|
|
1076
1076
|
}` })
|
|
1077
1077
|
] });
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function Vt(e) {
|
|
1080
1080
|
return /* @__PURE__ */ l("span", { children: e.children });
|
|
1081
1081
|
}
|
|
1082
1082
|
function ve(e) {
|
|
1083
1083
|
return e.replace(/http(s)?:/, "");
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function At(e = "", t, n) {
|
|
1086
1086
|
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1087
1087
|
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function Bt(e, t) {
|
|
1090
1090
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1091
1091
|
return e;
|
|
1092
1092
|
if (t === "master")
|
|
@@ -1098,19 +1098,19 @@ function Wt(e, t) {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
return null;
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function ie(e) {
|
|
1102
1102
|
if (!e)
|
|
1103
1103
|
return e;
|
|
1104
1104
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
1105
1105
|
if (e.match(/builder\.io/)) {
|
|
1106
1106
|
let n = e;
|
|
1107
1107
|
const i = Number(e.split("?width=")[1]);
|
|
1108
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${
|
|
1108
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${At(e, "width", o)} ${o}w`).concat([n]).join(", ");
|
|
1109
1109
|
}
|
|
1110
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1110
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Bt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1113
|
-
var o, a, r,
|
|
1112
|
+
function Wt(e) {
|
|
1113
|
+
var o, a, r, s;
|
|
1114
1114
|
function t() {
|
|
1115
1115
|
var u;
|
|
1116
1116
|
const d = e.image || e.src;
|
|
@@ -1120,29 +1120,29 @@ function $t(e) {
|
|
|
1120
1120
|
return e.srcset;
|
|
1121
1121
|
if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
|
|
1122
1122
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1123
|
-
return console.debug("Removed given srcset"),
|
|
1123
|
+
return console.debug("Removed given srcset"), ie(d);
|
|
1124
1124
|
} else if (e.image && !e.srcset)
|
|
1125
|
-
return
|
|
1126
|
-
return
|
|
1125
|
+
return ie(d);
|
|
1126
|
+
return ie(d);
|
|
1127
1127
|
}
|
|
1128
1128
|
function n() {
|
|
1129
|
-
var
|
|
1130
|
-
return (
|
|
1129
|
+
var c;
|
|
1130
|
+
return (c = t == null ? void 0 : t()) != null && c.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
|
|
1131
1131
|
}
|
|
1132
1132
|
function i() {
|
|
1133
|
-
const
|
|
1133
|
+
const c = {
|
|
1134
1134
|
position: "absolute",
|
|
1135
1135
|
height: "100%",
|
|
1136
1136
|
width: "100%",
|
|
1137
1137
|
left: "0px",
|
|
1138
1138
|
top: "0px"
|
|
1139
1139
|
};
|
|
1140
|
-
return e.aspectRatio ?
|
|
1140
|
+
return e.aspectRatio ? c : void 0;
|
|
1141
1141
|
}
|
|
1142
|
-
return /* @__PURE__ */
|
|
1143
|
-
/* @__PURE__ */
|
|
1144
|
-
/* @__PURE__ */
|
|
1145
|
-
n() ? /* @__PURE__ */ l(
|
|
1142
|
+
return /* @__PURE__ */ F(m, { children: [
|
|
1143
|
+
/* @__PURE__ */ F(m, { children: [
|
|
1144
|
+
/* @__PURE__ */ F("picture", { children: [
|
|
1145
|
+
n() ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) }) : null,
|
|
1146
1146
|
/* @__PURE__ */ l(
|
|
1147
1147
|
"img",
|
|
1148
1148
|
{
|
|
@@ -1161,7 +1161,7 @@ function $t(e) {
|
|
|
1161
1161
|
}
|
|
1162
1162
|
)
|
|
1163
1163
|
] }),
|
|
1164
|
-
e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ l(
|
|
1164
|
+
e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
1165
1165
|
"div",
|
|
1166
1166
|
{
|
|
1167
1167
|
className: "builder-image-sizer div-40c70c9b",
|
|
@@ -1170,8 +1170,8 @@ function $t(e) {
|
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
1172
|
) }) : null,
|
|
1173
|
-
(
|
|
1174
|
-
!e.fitContent && e.children ? /* @__PURE__ */ l(
|
|
1173
|
+
(s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(m, { children: e.children }) : null,
|
|
1174
|
+
!e.fitContent && e.children ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l("div", { className: "div-40c70c9b-2", children: e.children }) }) : null
|
|
1175
1175
|
] }),
|
|
1176
1176
|
/* @__PURE__ */ l("style", { children: `.img-40c70c9b {
|
|
1177
1177
|
opacity: 1;
|
|
@@ -1192,7 +1192,7 @@ function $t(e) {
|
|
|
1192
1192
|
}` })
|
|
1193
1193
|
] });
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function Ft(e) {
|
|
1196
1196
|
return /* @__PURE__ */ l(
|
|
1197
1197
|
"section",
|
|
1198
1198
|
{
|
|
@@ -1213,7 +1213,7 @@ function Nt(e) {
|
|
|
1213
1213
|
}
|
|
1214
1214
|
);
|
|
1215
1215
|
}
|
|
1216
|
-
const
|
|
1216
|
+
const Nt = {
|
|
1217
1217
|
name: "Core:Button",
|
|
1218
1218
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1219
1219
|
defaultStyles: {
|
|
@@ -1246,7 +1246,7 @@ const Vt = {
|
|
|
1246
1246
|
}],
|
|
1247
1247
|
static: !0,
|
|
1248
1248
|
noWrap: !0
|
|
1249
|
-
},
|
|
1249
|
+
}, $t = {
|
|
1250
1250
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1251
1251
|
name: "Columns",
|
|
1252
1252
|
isRSC: !0,
|
|
@@ -1425,7 +1425,7 @@ const Vt = {
|
|
|
1425
1425
|
});
|
|
1426
1426
|
}
|
|
1427
1427
|
const n = e.get("columns");
|
|
1428
|
-
Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((
|
|
1428
|
+
Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
|
|
1429
1429
|
}
|
|
1430
1430
|
}, {
|
|
1431
1431
|
name: "space",
|
|
@@ -1448,130 +1448,12 @@ const Vt = {
|
|
|
1448
1448
|
advanced: !0
|
|
1449
1449
|
}]
|
|
1450
1450
|
}, Lt = {
|
|
1451
|
-
name: "Custom Code",
|
|
1452
|
-
static: !0,
|
|
1453
|
-
requiredPermissions: ["editCode"],
|
|
1454
|
-
inputs: [{
|
|
1455
|
-
name: "code",
|
|
1456
|
-
type: "html",
|
|
1457
|
-
required: !0,
|
|
1458
|
-
defaultValue: "<p>Hello there, I am custom HTML code!</p>",
|
|
1459
|
-
code: !0
|
|
1460
|
-
}, {
|
|
1461
|
-
name: "replaceNodes",
|
|
1462
|
-
type: "boolean",
|
|
1463
|
-
helperText: "Preserve server rendered dom nodes",
|
|
1464
|
-
advanced: !0
|
|
1465
|
-
}, {
|
|
1466
|
-
name: "scriptsClientOnly",
|
|
1467
|
-
type: "boolean",
|
|
1468
|
-
defaultValue: !1,
|
|
1469
|
-
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1470
|
-
advanced: !0
|
|
1471
|
-
}]
|
|
1472
|
-
};
|
|
1473
|
-
function Dt(e) {
|
|
1474
|
-
const t = te(null), [n, i] = v(() => []), [o, a] = v(() => []);
|
|
1475
|
-
return T(() => {
|
|
1476
|
-
var c;
|
|
1477
|
-
if (!((c = t.current) != null && c.getElementsByTagName) || typeof window == "undefined")
|
|
1478
|
-
return;
|
|
1479
|
-
const r = t.current.getElementsByTagName("script");
|
|
1480
|
-
for (let s = 0; s < r.length; s++) {
|
|
1481
|
-
const d = r[s];
|
|
1482
|
-
if (d.src) {
|
|
1483
|
-
if (n.includes(d.src))
|
|
1484
|
-
continue;
|
|
1485
|
-
n.push(d.src);
|
|
1486
|
-
const u = document.createElement("script");
|
|
1487
|
-
u.async = !0, u.src = d.src, document.head.appendChild(u);
|
|
1488
|
-
} else if (!d.type || [
|
|
1489
|
-
"text/javascript",
|
|
1490
|
-
"application/javascript",
|
|
1491
|
-
"application/ecmascript"
|
|
1492
|
-
].includes(d.type)) {
|
|
1493
|
-
if (o.includes(d.innerText))
|
|
1494
|
-
continue;
|
|
1495
|
-
try {
|
|
1496
|
-
o.push(d.innerText), new Function(d.innerText)();
|
|
1497
|
-
} catch (u) {
|
|
1498
|
-
console.warn("`CustomCode`: Error running script:", u);
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
}, []), /* @__PURE__ */ l(
|
|
1503
|
-
"div",
|
|
1504
|
-
{
|
|
1505
|
-
ref: t,
|
|
1506
|
-
className: "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : ""),
|
|
1507
|
-
dangerouslySetInnerHTML: { __html: e.code }
|
|
1508
|
-
}
|
|
1509
|
-
);
|
|
1510
|
-
}
|
|
1511
|
-
const Ot = {
|
|
1512
|
-
name: "Embed",
|
|
1513
|
-
static: !0,
|
|
1514
|
-
inputs: [{
|
|
1515
|
-
name: "url",
|
|
1516
|
-
type: "url",
|
|
1517
|
-
required: !0,
|
|
1518
|
-
defaultValue: "",
|
|
1519
|
-
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1520
|
-
onChange: (e) => {
|
|
1521
|
-
const t = e.get("url");
|
|
1522
|
-
if (t)
|
|
1523
|
-
return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((i) => i.json()).then((i) => {
|
|
1524
|
-
e.get("url") === t && (i.html ? e.set("content", i.html) : e.set("content", "Invalid url, please try another"));
|
|
1525
|
-
}).catch((i) => {
|
|
1526
|
-
e.set("content", "There was an error embedding this URL, please try again or another URL");
|
|
1527
|
-
});
|
|
1528
|
-
e.delete("content");
|
|
1529
|
-
}
|
|
1530
|
-
}, {
|
|
1531
|
-
name: "content",
|
|
1532
|
-
type: "html",
|
|
1533
|
-
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1534
|
-
hideFromUI: !0
|
|
1535
|
-
}]
|
|
1536
|
-
}, jt = ["text/javascript", "application/javascript", "application/ecmascript"], _t = (e) => jt.includes(e.type);
|
|
1537
|
-
function Ht(e) {
|
|
1538
|
-
const t = te(null), [n, i] = v(() => []), [o, a] = v(() => []), [r, c] = v(() => !1);
|
|
1539
|
-
function s() {
|
|
1540
|
-
if (!t.current || !t.current.getElementsByTagName)
|
|
1541
|
-
return;
|
|
1542
|
-
const d = t.current.getElementsByTagName("script");
|
|
1543
|
-
for (let u = 0; u < d.length; u++) {
|
|
1544
|
-
const b = d[u];
|
|
1545
|
-
if (b.src && !n.includes(b.src)) {
|
|
1546
|
-
n.push(b.src);
|
|
1547
|
-
const k = document.createElement("script");
|
|
1548
|
-
k.async = !0, k.src = b.src, document.head.appendChild(k);
|
|
1549
|
-
} else if (_t(b) && !o.includes(b.innerText))
|
|
1550
|
-
try {
|
|
1551
|
-
o.push(b.innerText), new Function(b.innerText)();
|
|
1552
|
-
} catch (k) {
|
|
1553
|
-
console.warn("`Embed`: Error running script:", k);
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
}
|
|
1557
|
-
return T(() => {
|
|
1558
|
-
t.current && !r && (c(!0), s());
|
|
1559
|
-
}, [t.current, r]), /* @__PURE__ */ l(
|
|
1560
|
-
"div",
|
|
1561
|
-
{
|
|
1562
|
-
className: "builder-embed",
|
|
1563
|
-
ref: t,
|
|
1564
|
-
dangerouslySetInnerHTML: { __html: e.content }
|
|
1565
|
-
}
|
|
1566
|
-
);
|
|
1567
|
-
}
|
|
1568
|
-
const Ut = {
|
|
1569
1451
|
name: "Fragment",
|
|
1570
1452
|
static: !0,
|
|
1571
1453
|
hidden: !0,
|
|
1572
1454
|
canHaveChildren: !0,
|
|
1573
1455
|
noWrap: !0
|
|
1574
|
-
},
|
|
1456
|
+
}, Dt = {
|
|
1575
1457
|
name: "Image",
|
|
1576
1458
|
static: !0,
|
|
1577
1459
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -1591,17 +1473,17 @@ const Ut = {
|
|
|
1591
1473
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1592
1474
|
onChange: (e) => {
|
|
1593
1475
|
e.delete("srcset"), e.delete("noWebp");
|
|
1594
|
-
function n(r,
|
|
1595
|
-
return new Promise((
|
|
1476
|
+
function n(r, s = 6e4) {
|
|
1477
|
+
return new Promise((c, d) => {
|
|
1596
1478
|
const u = document.createElement("img");
|
|
1597
|
-
let
|
|
1479
|
+
let x = !1;
|
|
1598
1480
|
u.onload = () => {
|
|
1599
|
-
|
|
1600
|
-
}, u.addEventListener("error", (
|
|
1601
|
-
console.warn("Image load failed",
|
|
1481
|
+
x = !0, c(u);
|
|
1482
|
+
}, u.addEventListener("error", (C) => {
|
|
1483
|
+
console.warn("Image load failed", C.error), d(C.error);
|
|
1602
1484
|
}), u.src = r, setTimeout(() => {
|
|
1603
|
-
|
|
1604
|
-
},
|
|
1485
|
+
x || d(new Error("Image load timed out"));
|
|
1486
|
+
}, s);
|
|
1605
1487
|
});
|
|
1606
1488
|
}
|
|
1607
1489
|
function i(r) {
|
|
@@ -1612,8 +1494,8 @@ const Ut = {
|
|
|
1612
1494
|
r.type.includes("svg") && e.set("noWebp", !0);
|
|
1613
1495
|
}), o && (!a || a === 0.7041))
|
|
1614
1496
|
return n(o).then((r) => {
|
|
1615
|
-
const
|
|
1616
|
-
e.get("image") === o && (!
|
|
1497
|
+
const s = e.get("aspectRatio");
|
|
1498
|
+
e.get("image") === o && (!s || s === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
|
|
1617
1499
|
});
|
|
1618
1500
|
}
|
|
1619
1501
|
}, {
|
|
@@ -1671,37 +1553,7 @@ const Ut = {
|
|
|
1671
1553
|
advanced: !0,
|
|
1672
1554
|
defaultValue: 0.7041
|
|
1673
1555
|
}]
|
|
1674
|
-
},
|
|
1675
|
-
// friendlyName?
|
|
1676
|
-
name: "Raw:Img",
|
|
1677
|
-
hideFromInsertMenu: !0,
|
|
1678
|
-
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
1679
|
-
inputs: [{
|
|
1680
|
-
name: "image",
|
|
1681
|
-
bubble: !0,
|
|
1682
|
-
type: "file",
|
|
1683
|
-
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
|
|
1684
|
-
required: !0
|
|
1685
|
-
}],
|
|
1686
|
-
noWrap: !0,
|
|
1687
|
-
static: !0
|
|
1688
|
-
};
|
|
1689
|
-
function zt(e) {
|
|
1690
|
-
return /* @__PURE__ */ l(
|
|
1691
|
-
"img",
|
|
1692
|
-
{
|
|
1693
|
-
style: {
|
|
1694
|
-
objectFit: e.backgroundSize || "cover",
|
|
1695
|
-
objectPosition: e.backgroundPosition || "center"
|
|
1696
|
-
},
|
|
1697
|
-
alt: e.altText,
|
|
1698
|
-
src: e.imgSrc || e.image,
|
|
1699
|
-
...e.attributes
|
|
1700
|
-
},
|
|
1701
|
-
$() && e.imgSrc || "default-key"
|
|
1702
|
-
);
|
|
1703
|
-
}
|
|
1704
|
-
const qt = {
|
|
1556
|
+
}, Mt = {
|
|
1705
1557
|
name: "Core:Section",
|
|
1706
1558
|
static: !0,
|
|
1707
1559
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1740,7 +1592,7 @@ const qt = {
|
|
|
1740
1592
|
}
|
|
1741
1593
|
}
|
|
1742
1594
|
}]
|
|
1743
|
-
},
|
|
1595
|
+
}, Ot = {
|
|
1744
1596
|
name: "Slot",
|
|
1745
1597
|
isRSC: !0,
|
|
1746
1598
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1754,7 +1606,7 @@ const qt = {
|
|
|
1754
1606
|
defaultValue: "children"
|
|
1755
1607
|
}]
|
|
1756
1608
|
};
|
|
1757
|
-
function
|
|
1609
|
+
function Ut(e) {
|
|
1758
1610
|
var t, n, i;
|
|
1759
1611
|
return /* @__PURE__ */ l(
|
|
1760
1612
|
"div",
|
|
@@ -1766,7 +1618,7 @@ function Qt(e) {
|
|
|
1766
1618
|
"builder-slot": e.name
|
|
1767
1619
|
},
|
|
1768
1620
|
children: /* @__PURE__ */ l(
|
|
1769
|
-
|
|
1621
|
+
U,
|
|
1770
1622
|
{
|
|
1771
1623
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
1772
1624
|
path: `symbol.data.${e.name}`,
|
|
@@ -1777,7 +1629,7 @@ function Qt(e) {
|
|
|
1777
1629
|
}
|
|
1778
1630
|
);
|
|
1779
1631
|
}
|
|
1780
|
-
const
|
|
1632
|
+
const jt = {
|
|
1781
1633
|
name: "Symbol",
|
|
1782
1634
|
noWrap: !0,
|
|
1783
1635
|
static: !0,
|
|
@@ -1810,7 +1662,7 @@ const Gt = {
|
|
|
1810
1662
|
hideFromUI: !0,
|
|
1811
1663
|
type: "boolean"
|
|
1812
1664
|
}]
|
|
1813
|
-
},
|
|
1665
|
+
}, Ht = {
|
|
1814
1666
|
name: "Text",
|
|
1815
1667
|
static: !0,
|
|
1816
1668
|
isRSC: !0,
|
|
@@ -1829,7 +1681,7 @@ const Gt = {
|
|
|
1829
1681
|
textAlign: "center"
|
|
1830
1682
|
}
|
|
1831
1683
|
};
|
|
1832
|
-
function
|
|
1684
|
+
function _t(e) {
|
|
1833
1685
|
var t;
|
|
1834
1686
|
return /* @__PURE__ */ l(
|
|
1835
1687
|
"div",
|
|
@@ -1842,115 +1694,831 @@ function Xt(e) {
|
|
|
1842
1694
|
}
|
|
1843
1695
|
);
|
|
1844
1696
|
}
|
|
1845
|
-
const
|
|
1846
|
-
name: "
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
minHeight: "20px",
|
|
1850
|
-
minWidth: "20px"
|
|
1851
|
-
},
|
|
1852
|
-
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",
|
|
1697
|
+
const Kt = {
|
|
1698
|
+
name: "Custom Code",
|
|
1699
|
+
static: !0,
|
|
1700
|
+
requiredPermissions: ["editCode"],
|
|
1853
1701
|
inputs: [{
|
|
1854
|
-
name: "
|
|
1855
|
-
type: "
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
required: !0
|
|
1860
|
-
}, {
|
|
1861
|
-
name: "posterImage",
|
|
1862
|
-
type: "file",
|
|
1863
|
-
allowedFileTypes: ["jpeg", "png"],
|
|
1864
|
-
helperText: "Image to show before the video plays"
|
|
1865
|
-
}, {
|
|
1866
|
-
name: "autoPlay",
|
|
1867
|
-
type: "boolean",
|
|
1868
|
-
defaultValue: !0
|
|
1869
|
-
}, {
|
|
1870
|
-
name: "controls",
|
|
1871
|
-
type: "boolean",
|
|
1872
|
-
defaultValue: !1
|
|
1873
|
-
}, {
|
|
1874
|
-
name: "muted",
|
|
1875
|
-
type: "boolean",
|
|
1876
|
-
defaultValue: !0
|
|
1877
|
-
}, {
|
|
1878
|
-
name: "loop",
|
|
1879
|
-
type: "boolean",
|
|
1880
|
-
defaultValue: !0
|
|
1881
|
-
}, {
|
|
1882
|
-
name: "playsInline",
|
|
1883
|
-
type: "boolean",
|
|
1884
|
-
defaultValue: !0
|
|
1885
|
-
}, {
|
|
1886
|
-
name: "fit",
|
|
1887
|
-
type: "text",
|
|
1888
|
-
defaultValue: "cover",
|
|
1889
|
-
enum: ["contain", "cover", "fill", "auto"]
|
|
1890
|
-
}, {
|
|
1891
|
-
name: "preload",
|
|
1892
|
-
type: "text",
|
|
1893
|
-
defaultValue: "metadata",
|
|
1894
|
-
enum: ["auto", "metadata", "none"]
|
|
1702
|
+
name: "code",
|
|
1703
|
+
type: "html",
|
|
1704
|
+
required: !0,
|
|
1705
|
+
defaultValue: "<p>Hello there, I am custom HTML code!</p>",
|
|
1706
|
+
code: !0
|
|
1895
1707
|
}, {
|
|
1896
|
-
name: "
|
|
1708
|
+
name: "replaceNodes",
|
|
1897
1709
|
type: "boolean",
|
|
1898
|
-
helperText: "
|
|
1899
|
-
defaultValue: !0,
|
|
1900
|
-
advanced: !0
|
|
1901
|
-
}, {
|
|
1902
|
-
name: "position",
|
|
1903
|
-
type: "text",
|
|
1904
|
-
defaultValue: "center",
|
|
1905
|
-
enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
|
|
1906
|
-
}, {
|
|
1907
|
-
name: "height",
|
|
1908
|
-
type: "number",
|
|
1909
|
-
advanced: !0
|
|
1910
|
-
}, {
|
|
1911
|
-
name: "width",
|
|
1912
|
-
type: "number",
|
|
1710
|
+
helperText: "Preserve server rendered dom nodes",
|
|
1913
1711
|
advanced: !0
|
|
1914
1712
|
}, {
|
|
1915
|
-
name: "
|
|
1916
|
-
type: "number",
|
|
1917
|
-
advanced: !0,
|
|
1918
|
-
defaultValue: 0.7004048582995948
|
|
1919
|
-
}, {
|
|
1920
|
-
name: "lazyLoad",
|
|
1713
|
+
name: "scriptsClientOnly",
|
|
1921
1714
|
type: "boolean",
|
|
1922
|
-
|
|
1923
|
-
|
|
1715
|
+
defaultValue: !1,
|
|
1716
|
+
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1924
1717
|
advanced: !0
|
|
1925
1718
|
}]
|
|
1926
1719
|
};
|
|
1927
|
-
function
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1720
|
+
function qt(e) {
|
|
1721
|
+
const t = ee(null), [n, i] = v(() => []), [o, a] = v(() => []);
|
|
1722
|
+
return V(() => {
|
|
1723
|
+
var s;
|
|
1724
|
+
if (!((s = t.current) != null && s.getElementsByTagName) || typeof window == "undefined")
|
|
1725
|
+
return;
|
|
1726
|
+
const r = t.current.getElementsByTagName("script");
|
|
1727
|
+
for (let c = 0; c < r.length; c++) {
|
|
1728
|
+
const d = r[c];
|
|
1729
|
+
if (d.src) {
|
|
1730
|
+
if (n.includes(d.src))
|
|
1731
|
+
continue;
|
|
1732
|
+
n.push(d.src);
|
|
1733
|
+
const u = document.createElement("script");
|
|
1734
|
+
u.async = !0, u.src = d.src, document.head.appendChild(u);
|
|
1735
|
+
} else if (!d.type || [
|
|
1736
|
+
"text/javascript",
|
|
1737
|
+
"application/javascript",
|
|
1738
|
+
"application/ecmascript"
|
|
1739
|
+
].includes(d.type)) {
|
|
1740
|
+
if (o.includes(d.innerText))
|
|
1741
|
+
continue;
|
|
1742
|
+
try {
|
|
1743
|
+
o.push(d.innerText), new Function(d.innerText)();
|
|
1744
|
+
} catch (u) {
|
|
1745
|
+
console.warn("`CustomCode`: Error running script:", u);
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
}, []), /* @__PURE__ */ l(
|
|
1750
|
+
"div",
|
|
1751
|
+
{
|
|
1752
|
+
ref: t,
|
|
1753
|
+
className: "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : ""),
|
|
1754
|
+
dangerouslySetInnerHTML: { __html: e.code }
|
|
1755
|
+
}
|
|
1756
|
+
);
|
|
1757
|
+
}
|
|
1758
|
+
const zt = {
|
|
1759
|
+
name: "Embed",
|
|
1760
|
+
static: !0,
|
|
1761
|
+
inputs: [{
|
|
1762
|
+
name: "url",
|
|
1763
|
+
type: "url",
|
|
1764
|
+
required: !0,
|
|
1765
|
+
defaultValue: "",
|
|
1766
|
+
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1767
|
+
onChange: (e) => {
|
|
1768
|
+
const t = e.get("url");
|
|
1769
|
+
if (t)
|
|
1770
|
+
return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((i) => i.json()).then((i) => {
|
|
1771
|
+
e.get("url") === t && (i.html ? e.set("content", i.html) : e.set("content", "Invalid url, please try another"));
|
|
1772
|
+
}).catch((i) => {
|
|
1773
|
+
e.set("content", "There was an error embedding this URL, please try again or another URL");
|
|
1774
|
+
});
|
|
1775
|
+
e.delete("content");
|
|
1776
|
+
}
|
|
1777
|
+
}, {
|
|
1778
|
+
name: "content",
|
|
1779
|
+
type: "html",
|
|
1780
|
+
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1781
|
+
hideFromUI: !0
|
|
1782
|
+
}]
|
|
1783
|
+
}, Jt = ["text/javascript", "application/javascript", "application/ecmascript"], Yt = (e) => Jt.includes(e.type);
|
|
1784
|
+
function Qt(e) {
|
|
1785
|
+
const t = ee(null), [n, i] = v(() => []), [o, a] = v(() => []), [r, s] = v(() => !1);
|
|
1786
|
+
function c() {
|
|
1787
|
+
if (!t.current || !t.current.getElementsByTagName)
|
|
1788
|
+
return;
|
|
1789
|
+
const d = t.current.getElementsByTagName("script");
|
|
1790
|
+
for (let u = 0; u < d.length; u++) {
|
|
1791
|
+
const x = d[u];
|
|
1792
|
+
if (x.src && !n.includes(x.src)) {
|
|
1793
|
+
n.push(x.src);
|
|
1794
|
+
const C = document.createElement("script");
|
|
1795
|
+
C.async = !0, C.src = x.src, document.head.appendChild(C);
|
|
1796
|
+
} else if (Yt(x) && !o.includes(x.innerText))
|
|
1797
|
+
try {
|
|
1798
|
+
o.push(x.innerText), new Function(x.innerText)();
|
|
1799
|
+
} catch (C) {
|
|
1800
|
+
console.warn("`Embed`: Error running script:", C);
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
return V(() => {
|
|
1805
|
+
t.current && !r && (s(!0), c());
|
|
1806
|
+
}, [t.current, r]), /* @__PURE__ */ l(
|
|
1807
|
+
"div",
|
|
1808
|
+
{
|
|
1809
|
+
className: "builder-embed",
|
|
1810
|
+
ref: t,
|
|
1811
|
+
dangerouslySetInnerHTML: { __html: e.content }
|
|
1812
|
+
}
|
|
1813
|
+
);
|
|
1814
|
+
}
|
|
1815
|
+
const Gt = {
|
|
1816
|
+
name: "Form:Form",
|
|
1817
|
+
// editableTags: ['builder-form-error']
|
|
1818
|
+
defaults: {
|
|
1819
|
+
responsiveStyles: {
|
|
1820
|
+
large: {
|
|
1821
|
+
marginTop: "15px",
|
|
1822
|
+
paddingBottom: "15px"
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
},
|
|
1826
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",
|
|
1827
|
+
inputs: [{
|
|
1828
|
+
name: "sendSubmissionsTo",
|
|
1829
|
+
type: "string",
|
|
1830
|
+
// TODO: save to builder data and user can download as csv
|
|
1831
|
+
// TODO: easy for mode too or computed add/remove fields form mode
|
|
1832
|
+
// so you can edit details and high level mode at same time...
|
|
1833
|
+
// Later - more integrations like mailchimp
|
|
1834
|
+
// /api/v1/form-submit?to=mailchimp
|
|
1835
|
+
enum: [{
|
|
1836
|
+
label: "Send to email",
|
|
1837
|
+
value: "email",
|
|
1838
|
+
helperText: "Send form submissions to the email address of your choosing"
|
|
1839
|
+
}, {
|
|
1840
|
+
label: "Custom",
|
|
1841
|
+
value: "custom",
|
|
1842
|
+
helperText: "Handle where the form requests go manually with a little code, e.g. to your own custom backend"
|
|
1843
|
+
}],
|
|
1844
|
+
defaultValue: "email"
|
|
1845
|
+
}, {
|
|
1846
|
+
name: "sendSubmissionsToEmail",
|
|
1847
|
+
type: "string",
|
|
1848
|
+
required: !0,
|
|
1849
|
+
// TODO: required: () => options.get("sendSubmissionsTo") === "email"
|
|
1850
|
+
defaultValue: "your@email.com",
|
|
1851
|
+
showIf: 'options.get("sendSubmissionsTo") === "email"'
|
|
1852
|
+
}, {
|
|
1853
|
+
name: "sendWithJs",
|
|
1854
|
+
type: "boolean",
|
|
1855
|
+
helperText: "Set to false to use basic html form action",
|
|
1856
|
+
defaultValue: !0,
|
|
1857
|
+
showIf: 'options.get("sendSubmissionsTo") === "custom"'
|
|
1858
|
+
}, {
|
|
1859
|
+
name: "name",
|
|
1860
|
+
type: "string",
|
|
1861
|
+
defaultValue: "My form"
|
|
1862
|
+
// advanced: true
|
|
1863
|
+
}, {
|
|
1864
|
+
name: "action",
|
|
1865
|
+
type: "string",
|
|
1866
|
+
helperText: "URL to send the form data to",
|
|
1867
|
+
showIf: 'options.get("sendSubmissionsTo") === "custom"'
|
|
1868
|
+
}, {
|
|
1869
|
+
name: "contentType",
|
|
1870
|
+
type: "string",
|
|
1871
|
+
defaultValue: "application/json",
|
|
1872
|
+
advanced: !0,
|
|
1873
|
+
// TODO: do automatically if file input
|
|
1874
|
+
enum: ["application/json", "multipart/form-data", "application/x-www-form-urlencoded"],
|
|
1875
|
+
showIf: 'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'
|
|
1876
|
+
}, {
|
|
1877
|
+
name: "method",
|
|
1878
|
+
type: "string",
|
|
1879
|
+
showIf: 'options.get("sendSubmissionsTo") === "custom"',
|
|
1880
|
+
defaultValue: "POST",
|
|
1881
|
+
advanced: !0
|
|
1882
|
+
}, {
|
|
1883
|
+
name: "previewState",
|
|
1884
|
+
type: "string",
|
|
1885
|
+
// TODO: persist: false flag
|
|
1886
|
+
enum: ["unsubmitted", "sending", "success", "error"],
|
|
1887
|
+
defaultValue: "unsubmitted",
|
|
1888
|
+
helperText: 'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',
|
|
1889
|
+
showIf: 'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'
|
|
1890
|
+
}, {
|
|
1891
|
+
name: "successUrl",
|
|
1892
|
+
type: "url",
|
|
1893
|
+
helperText: "Optional URL to redirect the user to on form submission success",
|
|
1894
|
+
showIf: 'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'
|
|
1895
|
+
}, {
|
|
1896
|
+
name: "resetFormOnSubmit",
|
|
1897
|
+
type: "boolean",
|
|
1898
|
+
showIf: "options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",
|
|
1899
|
+
advanced: !0
|
|
1900
|
+
}, {
|
|
1901
|
+
name: "successMessage",
|
|
1902
|
+
type: "uiBlocks",
|
|
1903
|
+
hideFromUI: !0,
|
|
1904
|
+
defaultValue: [{
|
|
1905
|
+
"@type": "@builder.io/sdk:Element",
|
|
1906
|
+
responsiveStyles: {
|
|
1907
|
+
large: {
|
|
1908
|
+
marginTop: "10px"
|
|
1909
|
+
}
|
|
1910
|
+
},
|
|
1911
|
+
component: {
|
|
1912
|
+
name: "Text",
|
|
1913
|
+
options: {
|
|
1914
|
+
text: "<span>Thanks!</span>"
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
}]
|
|
1918
|
+
}, {
|
|
1919
|
+
name: "validate",
|
|
1920
|
+
type: "boolean",
|
|
1921
|
+
defaultValue: !0,
|
|
1922
|
+
advanced: !0
|
|
1923
|
+
}, {
|
|
1924
|
+
name: "errorMessagePath",
|
|
1925
|
+
type: "text",
|
|
1926
|
+
advanced: !0,
|
|
1927
|
+
helperText: 'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'
|
|
1928
|
+
}, {
|
|
1929
|
+
name: "errorMessage",
|
|
1930
|
+
type: "uiBlocks",
|
|
1931
|
+
hideFromUI: !0,
|
|
1932
|
+
defaultValue: [{
|
|
1933
|
+
"@type": "@builder.io/sdk:Element",
|
|
1934
|
+
responsiveStyles: {
|
|
1935
|
+
large: {
|
|
1936
|
+
marginTop: "10px"
|
|
1937
|
+
}
|
|
1938
|
+
},
|
|
1939
|
+
bindings: {
|
|
1940
|
+
"component.options.text": "state.formErrorMessage || block.component.options.text"
|
|
1941
|
+
},
|
|
1942
|
+
component: {
|
|
1943
|
+
name: "Text",
|
|
1944
|
+
options: {
|
|
1945
|
+
text: "<span>Form submission error :( Please check your answers and try again</span>"
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
}]
|
|
1949
|
+
}, {
|
|
1950
|
+
name: "sendingMessage",
|
|
1951
|
+
type: "uiBlocks",
|
|
1952
|
+
hideFromUI: !0,
|
|
1953
|
+
defaultValue: [{
|
|
1954
|
+
"@type": "@builder.io/sdk:Element",
|
|
1955
|
+
responsiveStyles: {
|
|
1956
|
+
large: {
|
|
1957
|
+
marginTop: "10px"
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1960
|
+
component: {
|
|
1961
|
+
name: "Text",
|
|
1962
|
+
options: {
|
|
1963
|
+
text: "<span>Sending...</span>"
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
}]
|
|
1967
|
+
}, {
|
|
1968
|
+
name: "customHeaders",
|
|
1969
|
+
type: "map",
|
|
1970
|
+
valueType: {
|
|
1971
|
+
type: "string"
|
|
1972
|
+
},
|
|
1973
|
+
advanced: !0,
|
|
1974
|
+
showIf: 'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'
|
|
1975
|
+
}],
|
|
1976
|
+
noWrap: !0,
|
|
1977
|
+
canHaveChildren: !0,
|
|
1978
|
+
defaultChildren: [{
|
|
1979
|
+
"@type": "@builder.io/sdk:Element",
|
|
1980
|
+
responsiveStyles: {
|
|
1981
|
+
large: {
|
|
1982
|
+
marginTop: "10px"
|
|
1983
|
+
}
|
|
1984
|
+
},
|
|
1985
|
+
component: {
|
|
1986
|
+
name: "Text",
|
|
1987
|
+
options: {
|
|
1988
|
+
text: "<span>Enter your name</span>"
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
}, {
|
|
1992
|
+
"@type": "@builder.io/sdk:Element",
|
|
1993
|
+
responsiveStyles: {
|
|
1994
|
+
large: {
|
|
1995
|
+
marginTop: "10px"
|
|
1996
|
+
}
|
|
1997
|
+
},
|
|
1998
|
+
component: {
|
|
1999
|
+
name: "Form:Input",
|
|
2000
|
+
options: {
|
|
2001
|
+
name: "name",
|
|
2002
|
+
placeholder: "Jane Doe"
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
}, {
|
|
2006
|
+
"@type": "@builder.io/sdk:Element",
|
|
2007
|
+
responsiveStyles: {
|
|
2008
|
+
large: {
|
|
2009
|
+
marginTop: "10px"
|
|
2010
|
+
}
|
|
2011
|
+
},
|
|
2012
|
+
component: {
|
|
2013
|
+
name: "Text",
|
|
2014
|
+
options: {
|
|
2015
|
+
text: "<span>Enter your email</span>"
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
}, {
|
|
2019
|
+
"@type": "@builder.io/sdk:Element",
|
|
2020
|
+
responsiveStyles: {
|
|
2021
|
+
large: {
|
|
2022
|
+
marginTop: "10px"
|
|
2023
|
+
}
|
|
2024
|
+
},
|
|
2025
|
+
component: {
|
|
2026
|
+
name: "Form:Input",
|
|
2027
|
+
options: {
|
|
2028
|
+
name: "email",
|
|
2029
|
+
placeholder: "jane@doe.com"
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
}, {
|
|
2033
|
+
"@type": "@builder.io/sdk:Element",
|
|
2034
|
+
responsiveStyles: {
|
|
2035
|
+
large: {
|
|
2036
|
+
marginTop: "10px"
|
|
2037
|
+
}
|
|
2038
|
+
},
|
|
2039
|
+
component: {
|
|
2040
|
+
name: "Form:SubmitButton",
|
|
2041
|
+
options: {
|
|
2042
|
+
text: "Submit"
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
}]
|
|
2046
|
+
}, Xt = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], Zt = () => {
|
|
2047
|
+
const e = process.env.NODE_ENV || "production";
|
|
2048
|
+
return Xt.includes(e) ? e : "production";
|
|
2049
|
+
}, en = (e, t, n) => {
|
|
2050
|
+
const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((o, a) => o != null ? o[a] : o, e);
|
|
2051
|
+
return i === void 0 || i === e ? n : i;
|
|
2052
|
+
};
|
|
2053
|
+
function tn(e) {
|
|
2054
|
+
var x, C;
|
|
2055
|
+
const t = ee(null), [n, i] = v(() => "unsubmitted"), [o, a] = v(() => null), [r, s] = v(() => "");
|
|
2056
|
+
function c(f) {
|
|
2057
|
+
var p, E;
|
|
2058
|
+
const y = {
|
|
2059
|
+
...e.builderContext.rootState,
|
|
2060
|
+
...f
|
|
2061
|
+
};
|
|
2062
|
+
e.builderContext.rootSetState ? (E = (p = e.builderContext).rootSetState) == null || E.call(p, y) : e.builderContext.rootState = y;
|
|
2063
|
+
}
|
|
2064
|
+
function d() {
|
|
2065
|
+
return M() && e.previewState || n;
|
|
2066
|
+
}
|
|
2067
|
+
function u(f) {
|
|
2068
|
+
var p;
|
|
2069
|
+
const y = e.sendWithJs || e.sendSubmissionsTo === "email";
|
|
2070
|
+
if (e.sendSubmissionsTo === "zapier")
|
|
2071
|
+
f.preventDefault();
|
|
2072
|
+
else if (y) {
|
|
2073
|
+
if (!(e.action || e.sendSubmissionsTo === "email")) {
|
|
2074
|
+
f.preventDefault();
|
|
2075
|
+
return;
|
|
2076
|
+
}
|
|
2077
|
+
f.preventDefault();
|
|
2078
|
+
const E = f.currentTarget, B = e.customHeaders || {};
|
|
2079
|
+
let k;
|
|
2080
|
+
const I = new FormData(E), A = Array.from(
|
|
2081
|
+
f.currentTarget.querySelectorAll("input,select,textarea")
|
|
2082
|
+
).filter((h) => !!h.name).map((h) => {
|
|
2083
|
+
let T;
|
|
2084
|
+
const D = h.name;
|
|
2085
|
+
if (h instanceof HTMLInputElement)
|
|
2086
|
+
if (h.type === "radio") {
|
|
2087
|
+
if (h.checked)
|
|
2088
|
+
return T = h.name, {
|
|
2089
|
+
key: D,
|
|
2090
|
+
value: T
|
|
2091
|
+
};
|
|
2092
|
+
} else if (h.type === "checkbox")
|
|
2093
|
+
T = h.checked;
|
|
2094
|
+
else if (h.type === "number" || h.type === "range") {
|
|
2095
|
+
const W = h.valueAsNumber;
|
|
2096
|
+
isNaN(W) || (T = W);
|
|
2097
|
+
} else
|
|
2098
|
+
h.type === "file" ? T = h.files : T = h.value;
|
|
2099
|
+
else
|
|
2100
|
+
T = h.value;
|
|
2101
|
+
return {
|
|
2102
|
+
key: D,
|
|
2103
|
+
value: T
|
|
2104
|
+
};
|
|
2105
|
+
});
|
|
2106
|
+
let P = e.contentType;
|
|
2107
|
+
if (e.sendSubmissionsTo === "email" && (P = "multipart/form-data"), Array.from(A).forEach(({ value: h }) => {
|
|
2108
|
+
(h instanceof File || Array.isArray(h) && h[0] instanceof File || h instanceof FileList) && (P = "multipart/form-data");
|
|
2109
|
+
}), P !== "application/json")
|
|
2110
|
+
k = I;
|
|
2111
|
+
else {
|
|
2112
|
+
const h = {};
|
|
2113
|
+
Array.from(A).forEach(({ value: T, key: D }) => {
|
|
2114
|
+
Ve(h, D, T);
|
|
2115
|
+
}), k = JSON.stringify(h);
|
|
2116
|
+
}
|
|
2117
|
+
P && P !== "multipart/form-data" && (y && ((p = e.action) != null && p.includes("zapier.com")) || (B["content-type"] = P));
|
|
2118
|
+
const $ = new CustomEvent("presubmit", { detail: { body: k } });
|
|
2119
|
+
if (t.current && (t.current.dispatchEvent($), $.defaultPrevented))
|
|
2120
|
+
return;
|
|
2121
|
+
i("sending");
|
|
2122
|
+
const L = `${Zt() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
|
|
2123
|
+
e.sendSubmissionsToEmail || ""
|
|
2124
|
+
)}&name=${encodeURIComponent(e.name || "")}`;
|
|
2125
|
+
fetch(
|
|
2126
|
+
e.sendSubmissionsTo === "email" ? L : e.action,
|
|
2127
|
+
{ body: k, headers: B, method: e.method || "post" }
|
|
2128
|
+
).then(
|
|
2129
|
+
async (h) => {
|
|
2130
|
+
let T;
|
|
2131
|
+
const D = h.headers.get("content-type");
|
|
2132
|
+
if (D && D.indexOf("application/json") !== -1 ? T = await h.json() : T = await h.text(), !h.ok && e.errorMessagePath) {
|
|
2133
|
+
let W = en(T, e.errorMessagePath);
|
|
2134
|
+
W && (typeof W != "string" && (W = JSON.stringify(W)), s(W), c({ formErrorMessage: W }));
|
|
2135
|
+
}
|
|
2136
|
+
if (a(T), i(h.ok ? "success" : "error"), h.ok) {
|
|
2137
|
+
const W = new CustomEvent("submit:success", {
|
|
2138
|
+
detail: { res: h, body: T }
|
|
2139
|
+
});
|
|
2140
|
+
if (t.current) {
|
|
2141
|
+
if (t.current.dispatchEvent(W), W.defaultPrevented)
|
|
2142
|
+
return;
|
|
2143
|
+
e.resetFormOnSubmit !== !1 && t.current.reset();
|
|
2144
|
+
}
|
|
2145
|
+
if (e.successUrl)
|
|
2146
|
+
if (t.current) {
|
|
2147
|
+
const H = new CustomEvent("route", {
|
|
2148
|
+
detail: { url: e.successUrl }
|
|
2149
|
+
});
|
|
2150
|
+
t.current.dispatchEvent(H), H.defaultPrevented || (location.href = e.successUrl);
|
|
2151
|
+
} else
|
|
2152
|
+
location.href = e.successUrl;
|
|
2153
|
+
}
|
|
2154
|
+
},
|
|
2155
|
+
(h) => {
|
|
2156
|
+
const T = new CustomEvent("submit:error", {
|
|
2157
|
+
detail: { error: h }
|
|
2158
|
+
});
|
|
2159
|
+
t.current && (t.current.dispatchEvent(T), T.defaultPrevented) || (a(h), i("error"));
|
|
2160
|
+
}
|
|
2161
|
+
);
|
|
2162
|
+
}
|
|
2163
|
+
}
|
|
2164
|
+
return /* @__PURE__ */ F(m, { children: [
|
|
2165
|
+
" ",
|
|
2166
|
+
/* @__PURE__ */ F(
|
|
2167
|
+
"form",
|
|
2168
|
+
{
|
|
2169
|
+
validate: e.validate,
|
|
2170
|
+
ref: t,
|
|
2171
|
+
action: !e.sendWithJs && e.action,
|
|
2172
|
+
method: e.method,
|
|
2173
|
+
name: e.name,
|
|
2174
|
+
onSubmit: (f) => u(f),
|
|
2175
|
+
...e.attributes,
|
|
2176
|
+
children: [
|
|
2177
|
+
" ",
|
|
2178
|
+
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(m, { children: (C = (x = e.builderBlock) == null ? void 0 : x.children) == null ? void 0 : C.map((f, y) => /* @__PURE__ */ l(
|
|
2179
|
+
J,
|
|
2180
|
+
{
|
|
2181
|
+
block: f,
|
|
2182
|
+
context: e.builderContext,
|
|
2183
|
+
registeredComponents: e.builderComponents,
|
|
2184
|
+
linkComponent: e.builderLinkComponent
|
|
2185
|
+
},
|
|
2186
|
+
`form-block-${y}`
|
|
2187
|
+
)) }) : null,
|
|
2188
|
+
" ",
|
|
2189
|
+
d() === "error" ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
2190
|
+
U,
|
|
2191
|
+
{
|
|
2192
|
+
path: "errorMessage",
|
|
2193
|
+
blocks: e.errorMessage,
|
|
2194
|
+
context: e.builderContext
|
|
2195
|
+
}
|
|
2196
|
+
) }) : null,
|
|
2197
|
+
" ",
|
|
2198
|
+
d() === "sending" ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
2199
|
+
U,
|
|
2200
|
+
{
|
|
2201
|
+
path: "sendingMessage",
|
|
2202
|
+
blocks: e.sendingMessage,
|
|
2203
|
+
context: e.builderContext
|
|
2204
|
+
}
|
|
2205
|
+
) }) : null,
|
|
2206
|
+
" ",
|
|
2207
|
+
d() === "error" && o ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ F("pre", { className: "builder-form-error-text pre-8fbb5280", children: [
|
|
2208
|
+
" ",
|
|
2209
|
+
JSON.stringify(o, null, 2),
|
|
2210
|
+
" "
|
|
2211
|
+
] }) }) : null,
|
|
2212
|
+
" ",
|
|
2213
|
+
d() === "success" ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
2214
|
+
U,
|
|
2215
|
+
{
|
|
2216
|
+
path: "successMessage",
|
|
2217
|
+
blocks: e.successMessage,
|
|
2218
|
+
context: e.builderContext
|
|
2219
|
+
}
|
|
2220
|
+
) }) : null,
|
|
2221
|
+
" "
|
|
2222
|
+
]
|
|
2223
|
+
}
|
|
2224
|
+
),
|
|
2225
|
+
" ",
|
|
2226
|
+
/* @__PURE__ */ l("style", { children: ".pre-8fbb5280 { padding: 10px; color: red; text-align: center; }" }),
|
|
2227
|
+
" "
|
|
2228
|
+
] });
|
|
2229
|
+
}
|
|
2230
|
+
const nn = {
|
|
2231
|
+
name: "Form:Input",
|
|
2232
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2233
|
+
inputs: [
|
|
2234
|
+
{
|
|
2235
|
+
name: "type",
|
|
2236
|
+
type: "text",
|
|
2237
|
+
enum: ["text", "number", "email", "url", "checkbox", "radio", "range", "date", "datetime-local", "search", "tel", "time", "file", "month", "week", "password", "color", "hidden"],
|
|
2238
|
+
defaultValue: "text"
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
name: "name",
|
|
2242
|
+
type: "string",
|
|
2243
|
+
required: !0,
|
|
2244
|
+
helperText: 'Every input in a form needs a unique name describing what it takes, e.g. "email"'
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
name: "placeholder",
|
|
2248
|
+
type: "string",
|
|
2249
|
+
defaultValue: "Hello there",
|
|
2250
|
+
helperText: "Text to display when there is no value"
|
|
2251
|
+
},
|
|
2252
|
+
// TODO: handle value vs default value automatically like ng-model
|
|
2253
|
+
{
|
|
2254
|
+
name: "defaultValue",
|
|
2255
|
+
type: "string"
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
name: "value",
|
|
2259
|
+
type: "string",
|
|
2260
|
+
advanced: !0
|
|
2261
|
+
},
|
|
2262
|
+
{
|
|
2263
|
+
name: "required",
|
|
2264
|
+
type: "boolean",
|
|
2265
|
+
helperText: "Is this input required to be filled out to submit a form",
|
|
2266
|
+
defaultValue: !1
|
|
2267
|
+
}
|
|
2268
|
+
],
|
|
2269
|
+
noWrap: !0,
|
|
2270
|
+
static: !0,
|
|
2271
|
+
defaultStyles: {
|
|
2272
|
+
paddingTop: "10px",
|
|
2273
|
+
paddingBottom: "10px",
|
|
2274
|
+
paddingLeft: "10px",
|
|
2275
|
+
paddingRight: "10px",
|
|
2276
|
+
borderRadius: "3px",
|
|
2277
|
+
borderWidth: "1px",
|
|
2278
|
+
borderStyle: "solid",
|
|
2279
|
+
borderColor: "#ccc"
|
|
2280
|
+
}
|
|
2281
|
+
};
|
|
2282
|
+
function on(e) {
|
|
2283
|
+
return /* @__PURE__ */ ae(
|
|
2284
|
+
"input",
|
|
2285
|
+
{
|
|
2286
|
+
...e.attributes,
|
|
2287
|
+
key: M() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2288
|
+
placeholder: e.placeholder,
|
|
2289
|
+
type: e.type,
|
|
2290
|
+
name: e.name,
|
|
2291
|
+
value: e.value,
|
|
2292
|
+
defaultValue: e.defaultValue,
|
|
2293
|
+
required: e.required
|
|
2294
|
+
}
|
|
2295
|
+
);
|
|
2296
|
+
}
|
|
2297
|
+
const an = {
|
|
2298
|
+
name: "Form:Select",
|
|
2299
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
2300
|
+
defaultStyles: {
|
|
2301
|
+
alignSelf: "flex-start"
|
|
2302
|
+
},
|
|
2303
|
+
inputs: [{
|
|
2304
|
+
name: "options",
|
|
2305
|
+
type: "list",
|
|
2306
|
+
required: !0,
|
|
2307
|
+
subFields: [{
|
|
2308
|
+
name: "value",
|
|
2309
|
+
type: "text",
|
|
2310
|
+
required: !0
|
|
2311
|
+
}, {
|
|
2312
|
+
name: "name",
|
|
2313
|
+
type: "text"
|
|
2314
|
+
}],
|
|
2315
|
+
defaultValue: [{
|
|
2316
|
+
value: "option 1"
|
|
2317
|
+
}, {
|
|
2318
|
+
value: "option 2"
|
|
2319
|
+
}]
|
|
2320
|
+
}, {
|
|
2321
|
+
name: "name",
|
|
2322
|
+
type: "string",
|
|
2323
|
+
required: !0,
|
|
2324
|
+
helperText: 'Every select in a form needs a unique name describing what it gets, e.g. "email"'
|
|
2325
|
+
}, {
|
|
2326
|
+
name: "defaultValue",
|
|
2327
|
+
type: "string"
|
|
2328
|
+
}, {
|
|
2329
|
+
name: "value",
|
|
2330
|
+
type: "string",
|
|
2331
|
+
advanced: !0
|
|
2332
|
+
}, {
|
|
2333
|
+
name: "required",
|
|
2334
|
+
type: "boolean",
|
|
2335
|
+
defaultValue: !1
|
|
2336
|
+
}],
|
|
2337
|
+
static: !0,
|
|
2338
|
+
noWrap: !0
|
|
2339
|
+
};
|
|
2340
|
+
function rn(e) {
|
|
2341
|
+
var t;
|
|
2342
|
+
return /* @__PURE__ */ ae(
|
|
2343
|
+
"select",
|
|
2344
|
+
{
|
|
2345
|
+
...e.attributes,
|
|
2346
|
+
value: e.value,
|
|
2347
|
+
key: M() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2348
|
+
defaultValue: e.defaultValue,
|
|
2349
|
+
name: e.name
|
|
2350
|
+
},
|
|
2351
|
+
(t = e.options) == null ? void 0 : t.map((n) => /* @__PURE__ */ l("option", { value: n.value, children: n.name || n.value }))
|
|
2352
|
+
);
|
|
2353
|
+
}
|
|
2354
|
+
const ln = {
|
|
2355
|
+
name: "Form:SubmitButton",
|
|
2356
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
2357
|
+
defaultStyles: {
|
|
2358
|
+
appearance: "none",
|
|
2359
|
+
paddingTop: "15px",
|
|
2360
|
+
paddingBottom: "15px",
|
|
2361
|
+
paddingLeft: "25px",
|
|
2362
|
+
paddingRight: "25px",
|
|
2363
|
+
backgroundColor: "#3898EC",
|
|
2364
|
+
color: "white",
|
|
2365
|
+
borderRadius: "4px",
|
|
2366
|
+
cursor: "pointer"
|
|
2367
|
+
},
|
|
2368
|
+
inputs: [{
|
|
2369
|
+
name: "text",
|
|
2370
|
+
type: "text",
|
|
2371
|
+
defaultValue: "Click me"
|
|
2372
|
+
}],
|
|
2373
|
+
static: !0,
|
|
2374
|
+
noWrap: !0
|
|
2375
|
+
// TODO: optional children? maybe as optional form input
|
|
2376
|
+
// that only shows if advanced setting is flipped
|
|
2377
|
+
// TODO: defaultChildren
|
|
2378
|
+
// canHaveChildren: true,
|
|
2379
|
+
};
|
|
2380
|
+
function sn(e) {
|
|
2381
|
+
return /* @__PURE__ */ l("button", { type: "submit", ...e.attributes, children: e.text });
|
|
2382
|
+
}
|
|
2383
|
+
const cn = {
|
|
2384
|
+
// friendlyName?
|
|
2385
|
+
name: "Raw:Img",
|
|
2386
|
+
hideFromInsertMenu: !0,
|
|
2387
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
2388
|
+
inputs: [{
|
|
2389
|
+
name: "image",
|
|
2390
|
+
bubble: !0,
|
|
2391
|
+
type: "file",
|
|
2392
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
|
|
2393
|
+
required: !0
|
|
2394
|
+
}],
|
|
2395
|
+
noWrap: !0,
|
|
2396
|
+
static: !0
|
|
2397
|
+
};
|
|
2398
|
+
function dn(e) {
|
|
2399
|
+
return /* @__PURE__ */ l(
|
|
2400
|
+
"img",
|
|
2401
|
+
{
|
|
2402
|
+
style: {
|
|
2403
|
+
objectFit: e.backgroundSize || "cover",
|
|
2404
|
+
objectPosition: e.backgroundPosition || "center"
|
|
2405
|
+
},
|
|
2406
|
+
alt: e.altText,
|
|
2407
|
+
src: e.imgSrc || e.image,
|
|
2408
|
+
...e.attributes
|
|
2409
|
+
},
|
|
2410
|
+
M() && e.imgSrc || "default-key"
|
|
2411
|
+
);
|
|
2412
|
+
}
|
|
2413
|
+
const un = {
|
|
2414
|
+
name: "Video",
|
|
2415
|
+
canHaveChildren: !0,
|
|
2416
|
+
defaultStyles: {
|
|
2417
|
+
minHeight: "20px",
|
|
2418
|
+
minWidth: "20px"
|
|
2419
|
+
},
|
|
2420
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",
|
|
2421
|
+
inputs: [{
|
|
2422
|
+
name: "video",
|
|
2423
|
+
type: "file",
|
|
2424
|
+
allowedFileTypes: ["mp4"],
|
|
2425
|
+
bubble: !0,
|
|
2426
|
+
defaultValue: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",
|
|
2427
|
+
required: !0
|
|
2428
|
+
}, {
|
|
2429
|
+
name: "posterImage",
|
|
2430
|
+
type: "file",
|
|
2431
|
+
allowedFileTypes: ["jpeg", "png"],
|
|
2432
|
+
helperText: "Image to show before the video plays"
|
|
2433
|
+
}, {
|
|
2434
|
+
name: "autoPlay",
|
|
2435
|
+
type: "boolean",
|
|
2436
|
+
defaultValue: !0
|
|
2437
|
+
}, {
|
|
2438
|
+
name: "controls",
|
|
2439
|
+
type: "boolean",
|
|
2440
|
+
defaultValue: !1
|
|
2441
|
+
}, {
|
|
2442
|
+
name: "muted",
|
|
2443
|
+
type: "boolean",
|
|
2444
|
+
defaultValue: !0
|
|
2445
|
+
}, {
|
|
2446
|
+
name: "loop",
|
|
2447
|
+
type: "boolean",
|
|
2448
|
+
defaultValue: !0
|
|
2449
|
+
}, {
|
|
2450
|
+
name: "playsInline",
|
|
2451
|
+
type: "boolean",
|
|
2452
|
+
defaultValue: !0
|
|
2453
|
+
}, {
|
|
2454
|
+
name: "fit",
|
|
2455
|
+
type: "text",
|
|
2456
|
+
defaultValue: "cover",
|
|
2457
|
+
enum: ["contain", "cover", "fill", "auto"]
|
|
2458
|
+
}, {
|
|
2459
|
+
name: "preload",
|
|
2460
|
+
type: "text",
|
|
2461
|
+
defaultValue: "metadata",
|
|
2462
|
+
enum: ["auto", "metadata", "none"]
|
|
2463
|
+
}, {
|
|
2464
|
+
name: "fitContent",
|
|
2465
|
+
type: "boolean",
|
|
2466
|
+
helperText: "When child blocks are provided, fit to them instead of using the aspect ratio",
|
|
2467
|
+
defaultValue: !0,
|
|
2468
|
+
advanced: !0
|
|
2469
|
+
}, {
|
|
2470
|
+
name: "position",
|
|
2471
|
+
type: "text",
|
|
2472
|
+
defaultValue: "center",
|
|
2473
|
+
enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
|
|
2474
|
+
}, {
|
|
2475
|
+
name: "height",
|
|
2476
|
+
type: "number",
|
|
2477
|
+
advanced: !0
|
|
2478
|
+
}, {
|
|
2479
|
+
name: "width",
|
|
2480
|
+
type: "number",
|
|
2481
|
+
advanced: !0
|
|
2482
|
+
}, {
|
|
2483
|
+
name: "aspectRatio",
|
|
2484
|
+
type: "number",
|
|
2485
|
+
advanced: !0,
|
|
2486
|
+
defaultValue: 0.7004048582995948
|
|
2487
|
+
}, {
|
|
2488
|
+
name: "lazyLoad",
|
|
2489
|
+
type: "boolean",
|
|
2490
|
+
helperText: 'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',
|
|
2491
|
+
defaultValue: !0,
|
|
2492
|
+
advanced: !0
|
|
2493
|
+
}]
|
|
2494
|
+
};
|
|
2495
|
+
function mn(e) {
|
|
2496
|
+
var i, o, a, r, s, c, d;
|
|
2497
|
+
function t() {
|
|
2498
|
+
return {
|
|
2499
|
+
...e.autoPlay === !0 ? {
|
|
2500
|
+
autoPlay: !0
|
|
2501
|
+
} : {},
|
|
2502
|
+
...e.muted === !0 ? {
|
|
2503
|
+
muted: !0
|
|
2504
|
+
} : {},
|
|
2505
|
+
...e.controls === !0 ? {
|
|
2506
|
+
controls: !0
|
|
2507
|
+
} : {},
|
|
2508
|
+
...e.loop === !0 ? {
|
|
2509
|
+
loop: !0
|
|
2510
|
+
} : {},
|
|
2511
|
+
...e.playsInline === !0 ? {
|
|
2512
|
+
playsInline: !0
|
|
2513
|
+
} : {}
|
|
2514
|
+
};
|
|
1952
2515
|
}
|
|
1953
|
-
|
|
2516
|
+
function n() {
|
|
2517
|
+
return {
|
|
2518
|
+
...t()
|
|
2519
|
+
};
|
|
2520
|
+
}
|
|
2521
|
+
return /* @__PURE__ */ F(
|
|
1954
2522
|
"div",
|
|
1955
2523
|
{
|
|
1956
2524
|
style: {
|
|
@@ -1982,7 +2550,7 @@ function en(e) {
|
|
|
1982
2550
|
children: e.lazyLoad ? null : /* @__PURE__ */ l("source", { type: "video/mp4", src: e.video })
|
|
1983
2551
|
}
|
|
1984
2552
|
),
|
|
1985
|
-
e.aspectRatio && !(e.fitContent && ((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length)) ? /* @__PURE__ */ l(
|
|
2553
|
+
e.aspectRatio && !(e.fitContent && ((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length)) ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
1986
2554
|
"div",
|
|
1987
2555
|
{
|
|
1988
2556
|
style: {
|
|
@@ -1993,7 +2561,7 @@ function en(e) {
|
|
|
1993
2561
|
}
|
|
1994
2562
|
}
|
|
1995
2563
|
) }) : null,
|
|
1996
|
-
(
|
|
2564
|
+
(s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
1997
2565
|
"div",
|
|
1998
2566
|
{
|
|
1999
2567
|
style: {
|
|
@@ -2004,7 +2572,7 @@ function en(e) {
|
|
|
2004
2572
|
children: e.children
|
|
2005
2573
|
}
|
|
2006
2574
|
) }) : null,
|
|
2007
|
-
(d = (
|
|
2575
|
+
(d = (c = e.builderBlock) == null ? void 0 : c.children) != null && d.length && !e.fitContent ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
2008
2576
|
"div",
|
|
2009
2577
|
{
|
|
2010
2578
|
style: {
|
|
@@ -2025,43 +2593,55 @@ function en(e) {
|
|
|
2025
2593
|
}
|
|
2026
2594
|
);
|
|
2027
2595
|
}
|
|
2028
|
-
const
|
|
2029
|
-
component:
|
|
2030
|
-
...
|
|
2596
|
+
const fn = () => [{
|
|
2597
|
+
component: qt,
|
|
2598
|
+
...Kt
|
|
2031
2599
|
}, {
|
|
2032
|
-
component:
|
|
2033
|
-
...
|
|
2600
|
+
component: Qt,
|
|
2601
|
+
...zt
|
|
2034
2602
|
}, {
|
|
2035
|
-
component:
|
|
2036
|
-
...
|
|
2603
|
+
component: tn,
|
|
2604
|
+
...Gt
|
|
2037
2605
|
}, {
|
|
2038
|
-
component:
|
|
2039
|
-
...
|
|
2606
|
+
component: on,
|
|
2607
|
+
...nn
|
|
2040
2608
|
}, {
|
|
2041
|
-
component:
|
|
2042
|
-
...
|
|
2609
|
+
component: sn,
|
|
2610
|
+
...ln
|
|
2043
2611
|
}, {
|
|
2044
|
-
component:
|
|
2045
|
-
...
|
|
2612
|
+
component: rn,
|
|
2613
|
+
...an
|
|
2046
2614
|
}, {
|
|
2047
|
-
component:
|
|
2048
|
-
...
|
|
2615
|
+
component: dn,
|
|
2616
|
+
...cn
|
|
2049
2617
|
}, {
|
|
2050
|
-
component:
|
|
2051
|
-
...
|
|
2618
|
+
component: mn,
|
|
2619
|
+
...un
|
|
2620
|
+
}], ke = () => [{
|
|
2621
|
+
component: Xe,
|
|
2622
|
+
...Nt
|
|
2052
2623
|
}, {
|
|
2053
|
-
component:
|
|
2054
|
-
|
|
2624
|
+
component: Pt,
|
|
2625
|
+
...$t
|
|
2626
|
+
}, {
|
|
2627
|
+
component: Vt,
|
|
2628
|
+
...Lt
|
|
2055
2629
|
}, {
|
|
2056
|
-
component:
|
|
2057
|
-
...
|
|
2630
|
+
component: Wt,
|
|
2631
|
+
...Dt
|
|
2058
2632
|
}, {
|
|
2059
|
-
component:
|
|
2060
|
-
...
|
|
2633
|
+
component: Ft,
|
|
2634
|
+
...Mt
|
|
2061
2635
|
}, {
|
|
2062
|
-
component:
|
|
2063
|
-
...
|
|
2064
|
-
}
|
|
2636
|
+
component: Ut,
|
|
2637
|
+
...Ot
|
|
2638
|
+
}, {
|
|
2639
|
+
component: Bn,
|
|
2640
|
+
...jt
|
|
2641
|
+
}, {
|
|
2642
|
+
component: _t,
|
|
2643
|
+
...Ht
|
|
2644
|
+
}, ...fn()], hn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
2065
2645
|
function getAndSetVariantId() {
|
|
2066
2646
|
function setCookie(name, value, days) {
|
|
2067
2647
|
let expires = '';
|
|
@@ -2117,7 +2697,7 @@ const pe = () => [{
|
|
|
2117
2697
|
}).join('');
|
|
2118
2698
|
styleEl.innerHTML = newStyleStr;
|
|
2119
2699
|
}
|
|
2120
|
-
}`,
|
|
2700
|
+
}`, gn = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
2121
2701
|
if (!navigator.cookieEnabled) {
|
|
2122
2702
|
return;
|
|
2123
2703
|
}
|
|
@@ -2151,26 +2731,26 @@ const pe = () => [{
|
|
|
2151
2731
|
thisScriptEl?.remove();
|
|
2152
2732
|
}
|
|
2153
2733
|
return;
|
|
2154
|
-
}`,
|
|
2734
|
+
}`, Le = "builderIoAbTest", De = "builderIoRenderContent", Q = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
2155
2735
|
...t,
|
|
2156
2736
|
testVariationId: t.id,
|
|
2157
2737
|
id: e == null ? void 0 : e.id
|
|
2158
|
-
})),
|
|
2738
|
+
})), bn = ({
|
|
2159
2739
|
canTrack: e,
|
|
2160
2740
|
content: t
|
|
2161
|
-
}) => !(!(
|
|
2162
|
-
window.${
|
|
2163
|
-
window.${
|
|
2164
|
-
`,
|
|
2165
|
-
window.${
|
|
2166
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
2167
|
-
)`,
|
|
2741
|
+
}) => !(!(Q(t).length > 0) || !e || j()), yn = (e) => e === "react" || e === "reactNative", Me = yn(z), pn = () => `
|
|
2742
|
+
window.${Le} = ${hn}
|
|
2743
|
+
window.${De} = ${gn}
|
|
2744
|
+
`, xn = (e, t) => `
|
|
2745
|
+
window.${Le}(
|
|
2746
|
+
"${t}",${JSON.stringify(e)}, ${Me}
|
|
2747
|
+
)`, Sn = ({
|
|
2168
2748
|
contentId: e,
|
|
2169
2749
|
variationId: t
|
|
2170
|
-
}) => `window.${
|
|
2171
|
-
"${t}", "${e}", ${
|
|
2750
|
+
}) => `window.${De}(
|
|
2751
|
+
"${t}", "${e}", ${Me}
|
|
2172
2752
|
)`;
|
|
2173
|
-
function
|
|
2753
|
+
function oe(e) {
|
|
2174
2754
|
return /* @__PURE__ */ l(
|
|
2175
2755
|
"script",
|
|
2176
2756
|
{
|
|
@@ -2179,10 +2759,10 @@ function ee(e) {
|
|
|
2179
2759
|
}
|
|
2180
2760
|
);
|
|
2181
2761
|
}
|
|
2182
|
-
function
|
|
2762
|
+
function Ce(e) {
|
|
2183
2763
|
return Math.round(e * 1e3) / 1e3;
|
|
2184
2764
|
}
|
|
2185
|
-
const
|
|
2765
|
+
const vn = (e, t, n = !0) => {
|
|
2186
2766
|
if (!(e instanceof HTMLElement))
|
|
2187
2767
|
return null;
|
|
2188
2768
|
let i = n ? e : e.parentElement;
|
|
@@ -2193,28 +2773,28 @@ const sn = (e, t, n = !0) => {
|
|
|
2193
2773
|
return i;
|
|
2194
2774
|
} while (i = i.parentElement);
|
|
2195
2775
|
return null;
|
|
2196
|
-
},
|
|
2776
|
+
}, kn = (e) => vn(e, (t) => {
|
|
2197
2777
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2198
2778
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2199
|
-
}),
|
|
2779
|
+
}), we = ({
|
|
2200
2780
|
event: e,
|
|
2201
2781
|
target: t
|
|
2202
2782
|
}) => {
|
|
2203
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a =
|
|
2783
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = Ce(i / n.width), r = Ce(o / n.height);
|
|
2204
2784
|
return {
|
|
2205
2785
|
x: a,
|
|
2206
2786
|
y: r
|
|
2207
2787
|
};
|
|
2208
|
-
},
|
|
2209
|
-
const t = e.target, n = t &&
|
|
2788
|
+
}, Cn = (e) => {
|
|
2789
|
+
const t = e.target, n = t && kn(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2210
2790
|
return {
|
|
2211
2791
|
targetBuilderElement: i || void 0,
|
|
2212
2792
|
metadata: {
|
|
2213
|
-
targetOffset: t ?
|
|
2793
|
+
targetOffset: t ? we({
|
|
2214
2794
|
event: e,
|
|
2215
2795
|
target: t
|
|
2216
2796
|
}) : void 0,
|
|
2217
|
-
builderTargetOffset: n ?
|
|
2797
|
+
builderTargetOffset: n ? we({
|
|
2218
2798
|
event: e,
|
|
2219
2799
|
target: n
|
|
2220
2800
|
}) : void 0,
|
|
@@ -2222,103 +2802,103 @@ const sn = (e, t, n = !0) => {
|
|
|
2222
2802
|
}
|
|
2223
2803
|
};
|
|
2224
2804
|
};
|
|
2225
|
-
function
|
|
2226
|
-
var L,
|
|
2227
|
-
const t =
|
|
2805
|
+
function wn(e) {
|
|
2806
|
+
var L, h, T, D, W, H, fe;
|
|
2807
|
+
const t = ee(null), [n, i] = v(() => 0);
|
|
2228
2808
|
v(() => !0);
|
|
2229
|
-
function o(
|
|
2230
|
-
var
|
|
2231
|
-
const
|
|
2809
|
+
function o(g) {
|
|
2810
|
+
var S, w;
|
|
2811
|
+
const b = {
|
|
2232
2812
|
...e.builderContextSignal.rootState,
|
|
2233
|
-
...
|
|
2813
|
+
...g
|
|
2234
2814
|
};
|
|
2235
|
-
e.builderContextSignal.rootSetState ? (
|
|
2236
|
-
...
|
|
2237
|
-
rootState:
|
|
2815
|
+
e.builderContextSignal.rootSetState ? (w = (S = e.builderContextSignal).rootSetState) == null || w.call(S, b) : e.setBuilderContextSignal((R) => ({
|
|
2816
|
+
...R,
|
|
2817
|
+
rootState: b
|
|
2238
2818
|
}));
|
|
2239
2819
|
}
|
|
2240
|
-
function a(
|
|
2241
|
-
var
|
|
2242
|
-
const
|
|
2820
|
+
function a(g) {
|
|
2821
|
+
var S, w, R, N, Y;
|
|
2822
|
+
const b = {
|
|
2243
2823
|
...e.builderContextSignal.content,
|
|
2244
|
-
...
|
|
2824
|
+
...g,
|
|
2245
2825
|
data: {
|
|
2246
|
-
...(
|
|
2247
|
-
...
|
|
2826
|
+
...(S = e.builderContextSignal.content) == null ? void 0 : S.data,
|
|
2827
|
+
...g == null ? void 0 : g.data
|
|
2248
2828
|
},
|
|
2249
2829
|
meta: {
|
|
2250
|
-
...(
|
|
2251
|
-
...
|
|
2252
|
-
breakpoints: ((
|
|
2830
|
+
...(w = e.builderContextSignal.content) == null ? void 0 : w.meta,
|
|
2831
|
+
...g == null ? void 0 : g.meta,
|
|
2832
|
+
breakpoints: ((R = g == null ? void 0 : g.meta) == null ? void 0 : R.breakpoints) || ((Y = (N = e.builderContextSignal.content) == null ? void 0 : N.meta) == null ? void 0 : Y.breakpoints)
|
|
2253
2833
|
}
|
|
2254
2834
|
};
|
|
2255
|
-
e.setBuilderContextSignal((
|
|
2256
|
-
...
|
|
2257
|
-
content:
|
|
2835
|
+
e.setBuilderContextSignal((Ue) => ({
|
|
2836
|
+
...Ue,
|
|
2837
|
+
content: b
|
|
2258
2838
|
}));
|
|
2259
2839
|
}
|
|
2260
2840
|
v(() => 0);
|
|
2261
|
-
const [r,
|
|
2841
|
+
const [r, s] = v(
|
|
2262
2842
|
() => !1
|
|
2263
|
-
), [
|
|
2843
|
+
), [c, d] = v(
|
|
2264
2844
|
() => e.contentWrapper || "div"
|
|
2265
2845
|
);
|
|
2266
|
-
function u(
|
|
2267
|
-
return
|
|
2846
|
+
function u(g) {
|
|
2847
|
+
return _e({
|
|
2268
2848
|
model: e.model,
|
|
2269
2849
|
trustedHosts: e.trustedHosts,
|
|
2270
2850
|
callbacks: {
|
|
2271
|
-
configureSdk: (
|
|
2272
|
-
var
|
|
2273
|
-
const { breakpoints:
|
|
2274
|
-
!
|
|
2851
|
+
configureSdk: (b) => {
|
|
2852
|
+
var R;
|
|
2853
|
+
const { breakpoints: S, contentId: w } = b;
|
|
2854
|
+
!w || w !== ((R = e.builderContextSignal.content) == null ? void 0 : R.id) || S && (a({
|
|
2275
2855
|
meta: {
|
|
2276
|
-
breakpoints:
|
|
2856
|
+
breakpoints: S
|
|
2277
2857
|
}
|
|
2278
2858
|
}), i(n + 1));
|
|
2279
2859
|
},
|
|
2280
|
-
animation: (
|
|
2281
|
-
|
|
2860
|
+
animation: (b) => {
|
|
2861
|
+
Ae(b);
|
|
2282
2862
|
},
|
|
2283
|
-
contentUpdate: (
|
|
2284
|
-
a(
|
|
2863
|
+
contentUpdate: (b) => {
|
|
2864
|
+
a(b), i(n + 1);
|
|
2285
2865
|
}
|
|
2286
2866
|
}
|
|
2287
|
-
})(
|
|
2867
|
+
})(g);
|
|
2288
2868
|
}
|
|
2289
|
-
function
|
|
2290
|
-
var
|
|
2291
|
-
const
|
|
2292
|
-
|
|
2293
|
-
code:
|
|
2869
|
+
function x() {
|
|
2870
|
+
var b, S;
|
|
2871
|
+
const g = (S = (b = e.builderContextSignal.content) == null ? void 0 : b.data) == null ? void 0 : S.jsCode;
|
|
2872
|
+
g && q({
|
|
2873
|
+
code: g,
|
|
2294
2874
|
context: e.context || {},
|
|
2295
2875
|
localState: void 0,
|
|
2296
2876
|
rootState: e.builderContextSignal.rootState,
|
|
2297
2877
|
rootSetState: e.builderContextSignal.rootSetState
|
|
2298
2878
|
});
|
|
2299
2879
|
}
|
|
2300
|
-
const [
|
|
2301
|
-
function
|
|
2302
|
-
var
|
|
2880
|
+
const [C, f] = v(() => ({})), [y, p] = v(() => !1);
|
|
2881
|
+
function E(g) {
|
|
2882
|
+
var b, S;
|
|
2303
2883
|
if (e.builderContextSignal.content) {
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2884
|
+
const w = (b = e.builderContextSignal.content) == null ? void 0 : b.testVariationId, R = (S = e.builderContextSignal.content) == null ? void 0 : S.id;
|
|
2885
|
+
ge({
|
|
2306
2886
|
type: "click",
|
|
2307
|
-
canTrack:
|
|
2308
|
-
contentId:
|
|
2887
|
+
canTrack: X(e.canTrack),
|
|
2888
|
+
contentId: R,
|
|
2309
2889
|
apiKey: e.apiKey,
|
|
2310
|
-
variationId:
|
|
2311
|
-
...
|
|
2890
|
+
variationId: w !== R ? w : void 0,
|
|
2891
|
+
...Cn(g),
|
|
2312
2892
|
unique: !y
|
|
2313
2893
|
});
|
|
2314
2894
|
}
|
|
2315
|
-
y ||
|
|
2895
|
+
y || p(!0);
|
|
2316
2896
|
}
|
|
2317
|
-
function
|
|
2318
|
-
return
|
|
2897
|
+
function B(g) {
|
|
2898
|
+
return g.replace(
|
|
2319
2899
|
/{{([^}]+)}}/g,
|
|
2320
|
-
(
|
|
2321
|
-
code:
|
|
2900
|
+
(b, S) => q({
|
|
2901
|
+
code: S,
|
|
2322
2902
|
context: e.context || {},
|
|
2323
2903
|
localState: void 0,
|
|
2324
2904
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -2326,38 +2906,38 @@ function mn(e) {
|
|
|
2326
2906
|
})
|
|
2327
2907
|
);
|
|
2328
2908
|
}
|
|
2329
|
-
function
|
|
2330
|
-
|
|
2331
|
-
var
|
|
2332
|
-
const
|
|
2909
|
+
function k({ url: g, key: b }) {
|
|
2910
|
+
Je(g).then((S) => S.json()).then((S) => {
|
|
2911
|
+
var R, N;
|
|
2912
|
+
const w = {
|
|
2333
2913
|
...e.builderContextSignal.rootState,
|
|
2334
|
-
[
|
|
2914
|
+
[b]: S
|
|
2335
2915
|
};
|
|
2336
|
-
(
|
|
2337
|
-
}).catch((
|
|
2338
|
-
console.error("error fetching dynamic data",
|
|
2916
|
+
(N = (R = e.builderContextSignal).rootSetState) == null || N.call(R, w), C[b] = !0;
|
|
2917
|
+
}).catch((S) => {
|
|
2918
|
+
console.error("error fetching dynamic data", g, S);
|
|
2339
2919
|
});
|
|
2340
2920
|
}
|
|
2341
|
-
function
|
|
2342
|
-
var
|
|
2343
|
-
const
|
|
2344
|
-
Object.entries(
|
|
2345
|
-
if (
|
|
2346
|
-
const
|
|
2347
|
-
|
|
2348
|
-
url:
|
|
2349
|
-
key:
|
|
2921
|
+
function I() {
|
|
2922
|
+
var b, S, w;
|
|
2923
|
+
const g = (w = (S = (b = e.builderContextSignal.content) == null ? void 0 : b.data) == null ? void 0 : S.httpRequests) != null ? w : {};
|
|
2924
|
+
Object.entries(g).forEach(([R, N]) => {
|
|
2925
|
+
if (N && (!C[R] || M())) {
|
|
2926
|
+
const Y = B(N);
|
|
2927
|
+
k({
|
|
2928
|
+
url: Y,
|
|
2929
|
+
key: R
|
|
2350
2930
|
});
|
|
2351
2931
|
}
|
|
2352
2932
|
});
|
|
2353
2933
|
}
|
|
2354
|
-
function
|
|
2355
|
-
|
|
2934
|
+
function A() {
|
|
2935
|
+
M() && window.dispatchEvent(
|
|
2356
2936
|
new CustomEvent(
|
|
2357
2937
|
"builder:component:stateChange",
|
|
2358
2938
|
{
|
|
2359
2939
|
detail: {
|
|
2360
|
-
state:
|
|
2940
|
+
state: re(e.builderContextSignal.rootState),
|
|
2361
2941
|
ref: {
|
|
2362
2942
|
name: e.model
|
|
2363
2943
|
}
|
|
@@ -2366,8 +2946,8 @@ function mn(e) {
|
|
|
2366
2946
|
)
|
|
2367
2947
|
);
|
|
2368
2948
|
}
|
|
2369
|
-
function
|
|
2370
|
-
i(n + 1), window.addEventListener("message", u),
|
|
2949
|
+
function P(g) {
|
|
2950
|
+
i(n + 1), window.addEventListener("message", u), Ke(), qe({
|
|
2371
2951
|
...e.locale ? {
|
|
2372
2952
|
locale: e.locale
|
|
2373
2953
|
} : {},
|
|
@@ -2382,109 +2962,109 @@ function mn(e) {
|
|
|
2382
2962
|
} : {}
|
|
2383
2963
|
}), Object.values(
|
|
2384
2964
|
e.builderContextSignal.componentInfos
|
|
2385
|
-
).forEach((
|
|
2386
|
-
var
|
|
2387
|
-
const
|
|
2388
|
-
(
|
|
2965
|
+
).forEach((b) => {
|
|
2966
|
+
var w;
|
|
2967
|
+
const S = ze(b);
|
|
2968
|
+
(w = window.parent) == null || w.postMessage(S, "*");
|
|
2389
2969
|
}), window.addEventListener(
|
|
2390
2970
|
"builder:component:stateChangeListenerActivated",
|
|
2391
|
-
|
|
2971
|
+
A
|
|
2392
2972
|
);
|
|
2393
2973
|
}
|
|
2394
|
-
function
|
|
2395
|
-
const
|
|
2396
|
-
`builder.preview.${
|
|
2397
|
-
),
|
|
2398
|
-
|
|
2974
|
+
function $(g) {
|
|
2975
|
+
const b = new URL(location.href).searchParams, S = b.get("builder.preview"), w = b.get(
|
|
2976
|
+
`builder.preview.${S}`
|
|
2977
|
+
), R = b.get("apiKey") || b.get("builder.space");
|
|
2978
|
+
S === e.model && R === e.apiKey && (!e.content || w === e.content.id) && Ee({
|
|
2399
2979
|
model: e.model,
|
|
2400
2980
|
apiKey: e.apiKey,
|
|
2401
2981
|
apiVersion: e.builderContextSignal.apiVersion
|
|
2402
|
-
}).then((
|
|
2403
|
-
|
|
2982
|
+
}).then((N) => {
|
|
2983
|
+
N && a(N);
|
|
2404
2984
|
});
|
|
2405
2985
|
}
|
|
2406
|
-
return
|
|
2407
|
-
var
|
|
2408
|
-
return (
|
|
2986
|
+
return V(() => {
|
|
2987
|
+
var g;
|
|
2988
|
+
return (g = t.current) == null || g.addEventListener(
|
|
2409
2989
|
"initeditingbldr",
|
|
2410
|
-
|
|
2990
|
+
P
|
|
2411
2991
|
), () => {
|
|
2412
|
-
var
|
|
2413
|
-
return (
|
|
2992
|
+
var b;
|
|
2993
|
+
return (b = t.current) == null ? void 0 : b.removeEventListener(
|
|
2414
2994
|
"initeditingbldr",
|
|
2415
|
-
|
|
2995
|
+
P
|
|
2416
2996
|
);
|
|
2417
2997
|
};
|
|
2418
|
-
}, []),
|
|
2419
|
-
var
|
|
2420
|
-
return (
|
|
2998
|
+
}, []), V(() => {
|
|
2999
|
+
var g;
|
|
3000
|
+
return (g = t.current) == null || g.addEventListener(
|
|
2421
3001
|
"initpreviewingbldr",
|
|
2422
|
-
|
|
3002
|
+
$
|
|
2423
3003
|
), () => {
|
|
2424
|
-
var
|
|
2425
|
-
return (
|
|
3004
|
+
var b;
|
|
3005
|
+
return (b = t.current) == null ? void 0 : b.removeEventListener(
|
|
2426
3006
|
"initpreviewingbldr",
|
|
2427
|
-
|
|
3007
|
+
$
|
|
2428
3008
|
);
|
|
2429
3009
|
};
|
|
2430
|
-
}, []),
|
|
2431
|
-
var
|
|
2432
|
-
if (
|
|
2433
|
-
if (
|
|
2434
|
-
const
|
|
2435
|
-
|
|
3010
|
+
}, []), V(() => {
|
|
3011
|
+
var g, b;
|
|
3012
|
+
if (j()) {
|
|
3013
|
+
if (M() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && X(e.canTrack)) {
|
|
3014
|
+
const w = (g = e.builderContextSignal.content) == null ? void 0 : g.testVariationId, R = (b = e.builderContextSignal.content) == null ? void 0 : b.id, N = e.apiKey;
|
|
3015
|
+
ge({
|
|
2436
3016
|
type: "impression",
|
|
2437
3017
|
canTrack: !0,
|
|
2438
|
-
contentId:
|
|
2439
|
-
apiKey:
|
|
2440
|
-
variationId:
|
|
3018
|
+
contentId: R,
|
|
3019
|
+
apiKey: N,
|
|
3020
|
+
variationId: w !== R ? w : void 0
|
|
2441
3021
|
});
|
|
2442
3022
|
}
|
|
2443
3023
|
He() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
|
|
2444
3024
|
}
|
|
2445
|
-
}, []),
|
|
2446
|
-
e.apiKey ||
|
|
3025
|
+
}, []), V(() => {
|
|
3026
|
+
e.apiKey || _.error(
|
|
2447
3027
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2448
|
-
),
|
|
2449
|
-
}, []),
|
|
3028
|
+
), x(), I(), A();
|
|
3029
|
+
}, []), V(() => {
|
|
2450
3030
|
e.content && a(e.content);
|
|
2451
|
-
}, [e.content]),
|
|
2452
|
-
}, [r]),
|
|
2453
|
-
|
|
2454
|
-
}, [(
|
|
2455
|
-
|
|
2456
|
-
}, [(
|
|
2457
|
-
|
|
2458
|
-
}, [e.builderContextSignal.rootState]),
|
|
3031
|
+
}, [e.content]), V(() => {
|
|
3032
|
+
}, [r]), V(() => {
|
|
3033
|
+
x();
|
|
3034
|
+
}, [(h = (L = e.builderContextSignal.content) == null ? void 0 : L.data) == null ? void 0 : h.jsCode]), V(() => {
|
|
3035
|
+
I();
|
|
3036
|
+
}, [(D = (T = e.builderContextSignal.content) == null ? void 0 : T.data) == null ? void 0 : D.httpRequests]), V(() => {
|
|
3037
|
+
A();
|
|
3038
|
+
}, [e.builderContextSignal.rootState]), V(() => {
|
|
2459
3039
|
e.data && o(e.data);
|
|
2460
|
-
}, [e.data]),
|
|
3040
|
+
}, [e.data]), V(() => {
|
|
2461
3041
|
e.locale && o({
|
|
2462
3042
|
locale: e.locale
|
|
2463
3043
|
});
|
|
2464
|
-
}, [e.locale]),
|
|
2465
|
-
|
|
3044
|
+
}, [e.locale]), V(() => () => {
|
|
3045
|
+
j() && (window.removeEventListener("message", u), window.removeEventListener(
|
|
2466
3046
|
"builder:component:stateChangeListenerActivated",
|
|
2467
|
-
|
|
3047
|
+
A
|
|
2468
3048
|
));
|
|
2469
|
-
}, []), /* @__PURE__ */ l(
|
|
2470
|
-
|
|
3049
|
+
}, []), /* @__PURE__ */ l(se.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ ae(
|
|
3050
|
+
c,
|
|
2471
3051
|
{
|
|
2472
3052
|
key: n,
|
|
2473
3053
|
ref: t,
|
|
2474
|
-
onClick: (
|
|
2475
|
-
"builder-content-id": (
|
|
3054
|
+
onClick: (g) => E(g),
|
|
3055
|
+
"builder-content-id": (W = e.builderContextSignal.content) == null ? void 0 : W.id,
|
|
2476
3056
|
"builder-model": e.model,
|
|
2477
3057
|
...e.showContent ? {} : {
|
|
2478
3058
|
hidden: !0,
|
|
2479
3059
|
"aria-hidden": !0
|
|
2480
3060
|
},
|
|
2481
3061
|
...e.contentWrapperProps,
|
|
2482
|
-
className: `variant-${((
|
|
3062
|
+
className: `variant-${((H = e.content) == null ? void 0 : H.testVariationId) || ((fe = e.content) == null ? void 0 : fe.id)}`
|
|
2483
3063
|
},
|
|
2484
3064
|
e.children
|
|
2485
3065
|
) }) : null });
|
|
2486
3066
|
}
|
|
2487
|
-
const
|
|
3067
|
+
const In = (e) => {
|
|
2488
3068
|
var a, r;
|
|
2489
3069
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (r = e.fileUrl) != null ? r : (a = e == null ? void 0 : e.files) == null ? void 0 : a.regular;
|
|
2490
3070
|
let o = "";
|
|
@@ -2496,37 +3076,37 @@ font-display: fallback;
|
|
|
2496
3076
|
font-weight: 400;
|
|
2497
3077
|
}
|
|
2498
3078
|
`.trim()), e.files)
|
|
2499
|
-
for (const
|
|
2500
|
-
if (!(String(Number(
|
|
3079
|
+
for (const s in e.files) {
|
|
3080
|
+
if (!(String(Number(s)) === s))
|
|
2501
3081
|
continue;
|
|
2502
|
-
const d = e.files[
|
|
3082
|
+
const d = e.files[s];
|
|
2503
3083
|
d && d !== i && (o += `
|
|
2504
3084
|
@font-face {
|
|
2505
3085
|
font-family: "${t}";
|
|
2506
3086
|
src: url('${d}') format('woff2');
|
|
2507
3087
|
font-display: fallback;
|
|
2508
|
-
font-weight: ${
|
|
3088
|
+
font-weight: ${s};
|
|
2509
3089
|
}
|
|
2510
3090
|
`.trim());
|
|
2511
3091
|
}
|
|
2512
3092
|
return o;
|
|
2513
|
-
},
|
|
3093
|
+
}, Tn = ({
|
|
2514
3094
|
customFonts: e
|
|
2515
3095
|
}) => {
|
|
2516
3096
|
var t;
|
|
2517
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2518
|
-
},
|
|
3097
|
+
return ((t = e == null ? void 0 : e.map((n) => In(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3098
|
+
}, En = ({
|
|
2519
3099
|
cssCode: e,
|
|
2520
3100
|
contentId: t
|
|
2521
3101
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
2522
|
-
function
|
|
3102
|
+
function Rn(e) {
|
|
2523
3103
|
const [t, n] = v(
|
|
2524
3104
|
() => `
|
|
2525
|
-
${
|
|
3105
|
+
${En({
|
|
2526
3106
|
cssCode: e.cssCode,
|
|
2527
3107
|
contentId: e.contentId
|
|
2528
3108
|
})}
|
|
2529
|
-
${
|
|
3109
|
+
${Tn({
|
|
2530
3110
|
customFonts: e.customFonts
|
|
2531
3111
|
})}
|
|
2532
3112
|
|
|
@@ -2548,17 +3128,17 @@ ${hn({
|
|
|
2548
3128
|
}
|
|
2549
3129
|
`.trim()
|
|
2550
3130
|
);
|
|
2551
|
-
return /* @__PURE__ */ l(
|
|
3131
|
+
return /* @__PURE__ */ l(te, { styles: t });
|
|
2552
3132
|
}
|
|
2553
|
-
const
|
|
3133
|
+
const Pn = ({
|
|
2554
3134
|
content: e,
|
|
2555
3135
|
data: t,
|
|
2556
3136
|
locale: n
|
|
2557
3137
|
}) => {
|
|
2558
|
-
var a, r,
|
|
3138
|
+
var a, r, s;
|
|
2559
3139
|
const i = {}, o = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
|
|
2560
|
-
return (
|
|
2561
|
-
|
|
3140
|
+
return (s = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || s.forEach((c) => {
|
|
3141
|
+
c.name && c.defaultValue !== void 0 && (i[c.name] = c.defaultValue);
|
|
2562
3142
|
}), {
|
|
2563
3143
|
...i,
|
|
2564
3144
|
...o,
|
|
@@ -2567,7 +3147,7 @@ const yn = ({
|
|
|
2567
3147
|
locale: n
|
|
2568
3148
|
} : {}
|
|
2569
3149
|
};
|
|
2570
|
-
},
|
|
3150
|
+
}, Vn = ({
|
|
2571
3151
|
content: e,
|
|
2572
3152
|
data: t
|
|
2573
3153
|
}) => e ? {
|
|
@@ -2578,52 +3158,52 @@ const yn = ({
|
|
|
2578
3158
|
},
|
|
2579
3159
|
meta: e == null ? void 0 : e.meta
|
|
2580
3160
|
} : void 0;
|
|
2581
|
-
function
|
|
2582
|
-
var
|
|
3161
|
+
function Ie(e) {
|
|
3162
|
+
var c, d, u, x, C, f, y;
|
|
2583
3163
|
const [t, n] = v(
|
|
2584
3164
|
() => {
|
|
2585
|
-
var
|
|
2586
|
-
return
|
|
3165
|
+
var p, E;
|
|
3166
|
+
return Sn({
|
|
2587
3167
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2588
|
-
variationId: (
|
|
3168
|
+
variationId: (p = e.content) == null ? void 0 : p.testVariationId,
|
|
2589
3169
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2590
|
-
contentId: (
|
|
3170
|
+
contentId: (E = e.content) == null ? void 0 : E.id
|
|
2591
3171
|
});
|
|
2592
3172
|
}
|
|
2593
3173
|
);
|
|
2594
|
-
function i(
|
|
2595
|
-
|
|
2596
|
-
...
|
|
2597
|
-
rootState:
|
|
3174
|
+
function i(p) {
|
|
3175
|
+
s((E) => ({
|
|
3176
|
+
...E,
|
|
3177
|
+
rootState: p
|
|
2598
3178
|
}));
|
|
2599
3179
|
}
|
|
2600
3180
|
const [o, a] = v(
|
|
2601
3181
|
() => [
|
|
2602
|
-
...
|
|
3182
|
+
...ke(),
|
|
2603
3183
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2604
3184
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2605
3185
|
// existing usage.
|
|
2606
3186
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2607
3187
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2608
|
-
...
|
|
3188
|
+
...be,
|
|
2609
3189
|
...e.customComponents || []
|
|
2610
3190
|
].reduce(
|
|
2611
|
-
(
|
|
2612
|
-
...
|
|
2613
|
-
[
|
|
2614
|
-
component:
|
|
2615
|
-
...
|
|
3191
|
+
(p, { component: E, ...B }) => ({
|
|
3192
|
+
...p,
|
|
3193
|
+
[B.name]: {
|
|
3194
|
+
component: E,
|
|
3195
|
+
...ye(B)
|
|
2616
3196
|
}
|
|
2617
3197
|
}),
|
|
2618
3198
|
{}
|
|
2619
3199
|
)
|
|
2620
|
-
), [r,
|
|
2621
|
-
content:
|
|
3200
|
+
), [r, s] = v(() => ({
|
|
3201
|
+
content: Vn({
|
|
2622
3202
|
content: e.content,
|
|
2623
3203
|
data: e.data
|
|
2624
3204
|
}),
|
|
2625
3205
|
localState: void 0,
|
|
2626
|
-
rootState:
|
|
3206
|
+
rootState: Pn({
|
|
2627
3207
|
content: e.content,
|
|
2628
3208
|
data: e.data,
|
|
2629
3209
|
locale: e.locale
|
|
@@ -2633,18 +3213,18 @@ function we(e) {
|
|
|
2633
3213
|
apiKey: e.apiKey,
|
|
2634
3214
|
apiVersion: e.apiVersion,
|
|
2635
3215
|
componentInfos: [
|
|
2636
|
-
...
|
|
3216
|
+
...ke(),
|
|
2637
3217
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2638
3218
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2639
3219
|
// existing usage.
|
|
2640
3220
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2641
3221
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2642
|
-
...
|
|
3222
|
+
...be,
|
|
2643
3223
|
...e.customComponents || []
|
|
2644
3224
|
].reduce(
|
|
2645
|
-
(
|
|
2646
|
-
...
|
|
2647
|
-
[
|
|
3225
|
+
(p, { component: E, ...B }) => ({
|
|
3226
|
+
...p,
|
|
3227
|
+
[B.name]: ye(B)
|
|
2648
3228
|
}),
|
|
2649
3229
|
{}
|
|
2650
3230
|
),
|
|
@@ -2658,8 +3238,8 @@ function we(e) {
|
|
|
2658
3238
|
value: {
|
|
2659
3239
|
registeredComponents: o
|
|
2660
3240
|
},
|
|
2661
|
-
children: /* @__PURE__ */
|
|
2662
|
-
|
|
3241
|
+
children: /* @__PURE__ */ F(
|
|
3242
|
+
wn,
|
|
2663
3243
|
{
|
|
2664
3244
|
content: e.content,
|
|
2665
3245
|
data: e.data,
|
|
@@ -2676,21 +3256,21 @@ function we(e) {
|
|
|
2676
3256
|
contentWrapperProps: e.contentWrapperProps,
|
|
2677
3257
|
linkComponent: e.linkComponent,
|
|
2678
3258
|
trustedHosts: e.trustedHosts,
|
|
2679
|
-
setBuilderContextSignal:
|
|
3259
|
+
setBuilderContextSignal: s,
|
|
2680
3260
|
children: [
|
|
2681
|
-
e.isSsrAbTest ? /* @__PURE__ */ l(
|
|
2682
|
-
/* @__PURE__ */ l(
|
|
2683
|
-
|
|
3261
|
+
e.isSsrAbTest ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(oe, { scriptStr: t }) }) : null,
|
|
3262
|
+
/* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
3263
|
+
Rn,
|
|
2684
3264
|
{
|
|
2685
|
-
contentId: (
|
|
3265
|
+
contentId: (c = r.content) == null ? void 0 : c.id,
|
|
2686
3266
|
cssCode: (u = (d = r.content) == null ? void 0 : d.data) == null ? void 0 : u.cssCode,
|
|
2687
|
-
customFonts: (
|
|
3267
|
+
customFonts: (C = (x = r.content) == null ? void 0 : x.data) == null ? void 0 : C.customFonts
|
|
2688
3268
|
}
|
|
2689
3269
|
) }),
|
|
2690
3270
|
/* @__PURE__ */ l(
|
|
2691
|
-
|
|
3271
|
+
U,
|
|
2692
3272
|
{
|
|
2693
|
-
blocks: (y = (
|
|
3273
|
+
blocks: (y = (f = r.content) == null ? void 0 : f.data) == null ? void 0 : y.blocks,
|
|
2694
3274
|
context: r,
|
|
2695
3275
|
registeredComponents: o,
|
|
2696
3276
|
linkComponent: e.linkComponent
|
|
@@ -2702,53 +3282,53 @@ function we(e) {
|
|
|
2702
3282
|
}
|
|
2703
3283
|
);
|
|
2704
3284
|
}
|
|
2705
|
-
function
|
|
2706
|
-
var r,
|
|
3285
|
+
function Oe(e) {
|
|
3286
|
+
var r, s;
|
|
2707
3287
|
const [t, n] = v(
|
|
2708
|
-
() =>
|
|
2709
|
-
canTrack:
|
|
3288
|
+
() => bn({
|
|
3289
|
+
canTrack: X(e.canTrack),
|
|
2710
3290
|
content: e.content
|
|
2711
3291
|
})
|
|
2712
3292
|
);
|
|
2713
3293
|
function i() {
|
|
2714
|
-
var
|
|
2715
|
-
return
|
|
2716
|
-
|
|
3294
|
+
var c;
|
|
3295
|
+
return xn(
|
|
3296
|
+
Q(e.content).map((d) => ({
|
|
2717
3297
|
id: d.testVariationId,
|
|
2718
3298
|
testRatio: d.testRatio
|
|
2719
3299
|
})),
|
|
2720
|
-
((
|
|
3300
|
+
((c = e.content) == null ? void 0 : c.id) || ""
|
|
2721
3301
|
);
|
|
2722
3302
|
}
|
|
2723
3303
|
function o() {
|
|
2724
|
-
return
|
|
3304
|
+
return Q(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
|
|
2725
3305
|
}
|
|
2726
3306
|
function a() {
|
|
2727
|
-
var
|
|
3307
|
+
var c;
|
|
2728
3308
|
return t ? {
|
|
2729
3309
|
...e.content,
|
|
2730
|
-
testVariationId: (
|
|
3310
|
+
testVariationId: (c = e.content) == null ? void 0 : c.id
|
|
2731
3311
|
} : Ye({
|
|
2732
3312
|
item: e.content,
|
|
2733
|
-
canTrack:
|
|
3313
|
+
canTrack: X(e.canTrack)
|
|
2734
3314
|
});
|
|
2735
3315
|
}
|
|
2736
|
-
return
|
|
2737
|
-
}, []), /* @__PURE__ */
|
|
2738
|
-
!e.__isNestedRender &&
|
|
2739
|
-
t ? /* @__PURE__ */
|
|
3316
|
+
return V(() => {
|
|
3317
|
+
}, []), /* @__PURE__ */ F(m, { children: [
|
|
3318
|
+
!e.__isNestedRender && z !== "reactNative" ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(oe, { scriptStr: pn() }) }) : null,
|
|
3319
|
+
t ? /* @__PURE__ */ F(m, { children: [
|
|
2740
3320
|
/* @__PURE__ */ l(
|
|
2741
|
-
|
|
3321
|
+
te,
|
|
2742
3322
|
{
|
|
2743
3323
|
id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
|
|
2744
3324
|
styles: o()
|
|
2745
3325
|
}
|
|
2746
3326
|
),
|
|
2747
|
-
/* @__PURE__ */ l(
|
|
2748
|
-
(
|
|
2749
|
-
|
|
3327
|
+
/* @__PURE__ */ l(oe, { scriptStr: i() }),
|
|
3328
|
+
(s = Q(e.content)) == null ? void 0 : s.map((c) => /* @__PURE__ */ l(
|
|
3329
|
+
Ie,
|
|
2750
3330
|
{
|
|
2751
|
-
content:
|
|
3331
|
+
content: c,
|
|
2752
3332
|
showContent: !1,
|
|
2753
3333
|
model: e.model,
|
|
2754
3334
|
data: e.data,
|
|
@@ -2768,11 +3348,11 @@ function De(e) {
|
|
|
2768
3348
|
contentWrapperProps: e.contentWrapperProps,
|
|
2769
3349
|
trustedHosts: e.trustedHosts
|
|
2770
3350
|
},
|
|
2771
|
-
|
|
3351
|
+
c.testVariationId
|
|
2772
3352
|
))
|
|
2773
3353
|
] }) : null,
|
|
2774
3354
|
/* @__PURE__ */ l(
|
|
2775
|
-
|
|
3355
|
+
Ie,
|
|
2776
3356
|
{
|
|
2777
3357
|
content: a(),
|
|
2778
3358
|
showContent: !0,
|
|
@@ -2797,13 +3377,13 @@ function De(e) {
|
|
|
2797
3377
|
)
|
|
2798
3378
|
] });
|
|
2799
3379
|
}
|
|
2800
|
-
const
|
|
3380
|
+
const An = async ({
|
|
2801
3381
|
builderContextValue: e,
|
|
2802
3382
|
symbol: t
|
|
2803
3383
|
}) => {
|
|
2804
3384
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
2805
3385
|
(e != null && e.apiKey))
|
|
2806
|
-
return
|
|
3386
|
+
return Ee({
|
|
2807
3387
|
model: t.model,
|
|
2808
3388
|
apiKey: e.apiKey,
|
|
2809
3389
|
apiVersion: e.apiVersion,
|
|
@@ -2813,15 +3393,15 @@ const xn = async ({
|
|
|
2813
3393
|
}
|
|
2814
3394
|
}
|
|
2815
3395
|
}).catch((n) => {
|
|
2816
|
-
|
|
3396
|
+
_.error("Could not fetch symbol content: ", n);
|
|
2817
3397
|
});
|
|
2818
3398
|
};
|
|
2819
|
-
function
|
|
2820
|
-
var a, r,
|
|
3399
|
+
function Bn(e) {
|
|
3400
|
+
var a, r, s, c;
|
|
2821
3401
|
function t() {
|
|
2822
3402
|
var d, u;
|
|
2823
3403
|
return [
|
|
2824
|
-
e.attributes[
|
|
3404
|
+
e.attributes[K()],
|
|
2825
3405
|
"builder-symbol",
|
|
2826
3406
|
(d = e.symbol) != null && d.inline ? "builder-inline-symbol" : void 0,
|
|
2827
3407
|
(u = e.symbol) != null && u.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -2832,18 +3412,18 @@ function vn(e) {
|
|
|
2832
3412
|
return (d = e.symbol) == null ? void 0 : d.content;
|
|
2833
3413
|
});
|
|
2834
3414
|
function o() {
|
|
2835
|
-
n ||
|
|
3415
|
+
n || An({
|
|
2836
3416
|
symbol: e.symbol,
|
|
2837
3417
|
builderContextValue: e.builderContext
|
|
2838
3418
|
}).then((d) => {
|
|
2839
3419
|
d && i(d);
|
|
2840
3420
|
});
|
|
2841
3421
|
}
|
|
2842
|
-
return
|
|
2843
|
-
}, []),
|
|
3422
|
+
return V(() => {
|
|
3423
|
+
}, []), V(() => {
|
|
2844
3424
|
o();
|
|
2845
3425
|
}, [e.symbol]), /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2846
|
-
|
|
3426
|
+
Oe,
|
|
2847
3427
|
{
|
|
2848
3428
|
__isNestedRender: !0,
|
|
2849
3429
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2856,40 +3436,40 @@ function vn(e) {
|
|
|
2856
3436
|
data: {
|
|
2857
3437
|
...(r = e.symbol) == null ? void 0 : r.data,
|
|
2858
3438
|
...e.builderContext.localState,
|
|
2859
|
-
...(
|
|
3439
|
+
...(s = n == null ? void 0 : n.data) == null ? void 0 : s.state
|
|
2860
3440
|
},
|
|
2861
|
-
model: (
|
|
3441
|
+
model: (c = e.symbol) == null ? void 0 : c.model,
|
|
2862
3442
|
content: n,
|
|
2863
3443
|
linkComponent: e.builderLinkComponent
|
|
2864
3444
|
}
|
|
2865
3445
|
) });
|
|
2866
3446
|
}
|
|
2867
|
-
const
|
|
3447
|
+
const $n = U, Ln = Oe;
|
|
2868
3448
|
export {
|
|
2869
|
-
|
|
2870
|
-
|
|
3449
|
+
U as Blocks,
|
|
3450
|
+
Xe as Button,
|
|
2871
3451
|
Pt as Columns,
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
3452
|
+
Oe as Content,
|
|
3453
|
+
Vt as Fragment,
|
|
3454
|
+
Wt as Image,
|
|
3455
|
+
$n as RenderBlocks,
|
|
3456
|
+
Ln as RenderContent,
|
|
3457
|
+
Ft as Section,
|
|
3458
|
+
Bn as Symbol,
|
|
3459
|
+
_t as Text,
|
|
3460
|
+
mn as Video,
|
|
3461
|
+
On as _processContentResult,
|
|
2882
3462
|
ze as createRegisterComponentMessage,
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
3463
|
+
Un as fetchBuilderProps,
|
|
3464
|
+
jn as fetchEntries,
|
|
3465
|
+
Ee as fetchOneEntry,
|
|
3466
|
+
Hn as getAllContent,
|
|
3467
|
+
_n as getBuilderSearchParams,
|
|
3468
|
+
Kn as getContent,
|
|
3469
|
+
M as isEditing,
|
|
2890
3470
|
He as isPreviewing,
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
3471
|
+
qn as register,
|
|
3472
|
+
zn as setEditorSettings,
|
|
3473
|
+
Jn as subscribeToEditor,
|
|
3474
|
+
Yn as track
|
|
2895
3475
|
};
|