@builder.io/sdk-react 0.12.4 → 0.12.6
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 +24 -24
- package/lib/browser/index.mjs +485 -461
- package/lib/{edge/server-entry-0e4f0637.js → browser/server-entry-b9bdd327.js} +4 -4
- package/lib/browser/{server-entry-bcb725be.cjs → server-entry-fc715776.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/index.cjs +31 -31
- package/lib/edge/index.mjs +550 -525
- package/lib/{browser/server-entry-0e4f0637.js → edge/server-entry-57d4ae22.js} +3 -3
- package/lib/edge/{server-entry-bcb725be.cjs → server-entry-fc715776.cjs} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/node/index.cjs +10 -10
- package/lib/node/index.mjs +283 -258
- package/lib/node/{server-entry-9aa733e8.js → server-entry-0457c4c8.js} +2 -2
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/evaluate/browser-runtime/browser.d.ts +5 -1
- package/types/functions/evaluate/should-force-browser-runtime-in-node.d.ts +1 -0
package/lib/browser/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as l, Fragment as h, jsxs as A } from "react/jsx-runtime";
|
|
3
|
-
import { createContext as pe, useState as v, useContext as se, useRef as ee, useEffect as E, createElement as
|
|
4
|
-
import { T as
|
|
5
|
-
import { _ as
|
|
6
|
-
const He = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]),
|
|
3
|
+
import { createContext as pe, useState as v, useContext as se, useRef as ee, useEffect as E, createElement as Le } from "react";
|
|
4
|
+
import { T as $, i as N, j as V, k as _e, l as M, m as _, n as te, r as Oe, o as H, p as de, a as je, c as De, b as Ce, q as Ue, u as ue, v as me, w as Me } from "./server-entry-b9bdd327.js";
|
|
5
|
+
import { _ as pn, h as Cn, f as wn, g as In, e as Tn, d as Rn, s as En, t as Pn } from "./server-entry-b9bdd327.js";
|
|
6
|
+
const He = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Ke = (e) => typeof e == "string" && He.has(e.toLowerCase());
|
|
7
7
|
function ne(e) {
|
|
8
|
-
return /* @__PURE__ */ l(h, { children:
|
|
8
|
+
return /* @__PURE__ */ l(h, { children: Ke(e.TagName) ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(h, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
|
|
9
9
|
}
|
|
10
|
-
const
|
|
11
|
-
switch (
|
|
10
|
+
const O = () => {
|
|
11
|
+
switch ($) {
|
|
12
12
|
case "react":
|
|
13
13
|
case "reactNative":
|
|
14
14
|
case "rsc":
|
|
@@ -20,14 +20,14 @@ const _ = () => {
|
|
|
20
20
|
return "class";
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
function
|
|
23
|
+
function ze(e) {
|
|
24
24
|
return /* @__PURE__ */ l(
|
|
25
25
|
ne,
|
|
26
26
|
{
|
|
27
27
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
28
28
|
attributes: {
|
|
29
29
|
...e.attributes,
|
|
30
|
-
[
|
|
30
|
+
[O()]: `${e.link ? "" : "builder-button"} ${e.attributes[O()] || ""}`,
|
|
31
31
|
...e.link ? {
|
|
32
32
|
href: e.link,
|
|
33
33
|
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
@@ -55,7 +55,7 @@ const ie = pe({
|
|
|
55
55
|
BlocksWrapper: "div",
|
|
56
56
|
BlocksWrapperProps: {}
|
|
57
57
|
}), we = pe({ registeredComponents: {} });
|
|
58
|
-
function
|
|
58
|
+
function qe(e) {
|
|
59
59
|
var t;
|
|
60
60
|
return {
|
|
61
61
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -66,7 +66,7 @@ function ze(e) {
|
|
|
66
66
|
builderBlock: e
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
const
|
|
69
|
+
const Ye = ({
|
|
70
70
|
builder: e,
|
|
71
71
|
context: t,
|
|
72
72
|
event: n,
|
|
@@ -78,98 +78,125 @@ const qe = ({
|
|
|
78
78
|
builder: e,
|
|
79
79
|
context: t,
|
|
80
80
|
event: n
|
|
81
|
-
}),
|
|
82
|
-
isEditing:
|
|
83
|
-
isBrowser:
|
|
84
|
-
isServer:
|
|
85
|
-
getUserAttributes: () =>
|
|
86
|
-
}),
|
|
81
|
+
}), Qe = () => ({
|
|
82
|
+
isEditing: N(),
|
|
83
|
+
isBrowser: V(),
|
|
84
|
+
isServer: !V(),
|
|
85
|
+
getUserAttributes: () => _e()
|
|
86
|
+
}), Ge = (e, {
|
|
87
87
|
isExpression: t = !0
|
|
88
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, fe = ({
|
|
89
89
|
code: e,
|
|
90
90
|
builder: t,
|
|
91
91
|
context: n,
|
|
92
92
|
event: i,
|
|
93
|
-
localState:
|
|
94
|
-
rootSetState:
|
|
95
|
-
rootState:
|
|
93
|
+
localState: o,
|
|
94
|
+
rootSetState: a,
|
|
95
|
+
rootState: r
|
|
96
96
|
}) => {
|
|
97
|
-
const c =
|
|
97
|
+
const c = Ye({
|
|
98
98
|
builder: t,
|
|
99
99
|
context: n,
|
|
100
100
|
event: i,
|
|
101
|
-
state:
|
|
101
|
+
state: Ie({
|
|
102
|
+
rootState: r,
|
|
103
|
+
localState: o,
|
|
104
|
+
rootSetState: a
|
|
105
|
+
})
|
|
102
106
|
});
|
|
103
107
|
return new Function(...c.map(([s]) => s), e)(...c.map(([, s]) => s));
|
|
104
108
|
};
|
|
105
|
-
function
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
function Ie({
|
|
110
|
+
rootState: e,
|
|
111
|
+
localState: t,
|
|
112
|
+
rootSetState: n
|
|
113
|
+
}) {
|
|
108
114
|
return new Proxy(e, {
|
|
109
|
-
get: (i,
|
|
110
|
-
|
|
111
|
-
|
|
115
|
+
get: (i, o) => {
|
|
116
|
+
if (t && o in t)
|
|
117
|
+
return t[o];
|
|
118
|
+
const a = i[o];
|
|
119
|
+
return typeof a == "object" ? Ie({
|
|
120
|
+
rootState: a,
|
|
121
|
+
localState: void 0,
|
|
122
|
+
rootSetState: n ? (r) => {
|
|
123
|
+
i[o] = r, n(i);
|
|
124
|
+
} : void 0
|
|
125
|
+
}) : a;
|
|
126
|
+
},
|
|
127
|
+
set: (i, o, a) => {
|
|
128
|
+
if (t && o in t)
|
|
112
129
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
113
|
-
return
|
|
130
|
+
return i[o] = a, n == null || n(i), !0;
|
|
114
131
|
}
|
|
115
132
|
});
|
|
116
133
|
}
|
|
117
|
-
|
|
134
|
+
function Je() {
|
|
135
|
+
var e;
|
|
136
|
+
return typeof process != "undefined" && M((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
137
|
+
}
|
|
138
|
+
const Xe = () => {
|
|
139
|
+
var i;
|
|
140
|
+
if (!Je())
|
|
141
|
+
return !1;
|
|
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 ? (_.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
|
+
}, Ze = (e) => (V() || Xe(), fe(e));
|
|
118
145
|
function j({
|
|
119
146
|
code: e,
|
|
120
147
|
context: t,
|
|
121
148
|
localState: n,
|
|
122
149
|
rootState: i,
|
|
123
|
-
rootSetState:
|
|
124
|
-
event:
|
|
125
|
-
isExpression:
|
|
150
|
+
rootSetState: o,
|
|
151
|
+
event: a,
|
|
152
|
+
isExpression: r = !0
|
|
126
153
|
}) {
|
|
127
154
|
if (e === "") {
|
|
128
|
-
|
|
155
|
+
_.warn("Skipping evaluation of empty code block.");
|
|
129
156
|
return;
|
|
130
157
|
}
|
|
131
158
|
const c = {
|
|
132
|
-
code:
|
|
133
|
-
isExpression:
|
|
159
|
+
code: Ge(e, {
|
|
160
|
+
isExpression: r
|
|
134
161
|
}),
|
|
135
|
-
builder:
|
|
162
|
+
builder: Qe(),
|
|
136
163
|
context: t,
|
|
137
|
-
event:
|
|
138
|
-
rootSetState:
|
|
164
|
+
event: a,
|
|
165
|
+
rootSetState: o,
|
|
139
166
|
rootState: i,
|
|
140
167
|
localState: n
|
|
141
168
|
};
|
|
142
169
|
try {
|
|
143
|
-
return
|
|
170
|
+
return Ze(c);
|
|
144
171
|
} catch (s) {
|
|
145
|
-
|
|
172
|
+
_.error("Failed code evaluation: " + s.message, {
|
|
146
173
|
code: e
|
|
147
174
|
});
|
|
148
175
|
return;
|
|
149
176
|
}
|
|
150
177
|
}
|
|
151
|
-
const
|
|
178
|
+
const et = (e, t, n) => {
|
|
152
179
|
if (Object(e) !== e)
|
|
153
180
|
return e;
|
|
154
181
|
const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
155
|
-
return i.slice(0, -1).reduce((a, r
|
|
182
|
+
return i.slice(0, -1).reduce((o, a, r) => Object(o[a]) === o[a] ? o[a] : o[a] = Math.abs(Number(i[r + 1])) >> 0 === +i[r + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
|
|
156
183
|
};
|
|
157
|
-
const
|
|
184
|
+
const tt = ({
|
|
158
185
|
block: e,
|
|
159
186
|
context: t,
|
|
160
187
|
localState: n,
|
|
161
188
|
rootState: i,
|
|
162
|
-
rootSetState:
|
|
189
|
+
rootSetState: o
|
|
163
190
|
}) => {
|
|
164
191
|
if (!e.bindings)
|
|
165
192
|
return e;
|
|
166
|
-
const
|
|
167
|
-
...
|
|
193
|
+
const a = te(e), r = {
|
|
194
|
+
...a,
|
|
168
195
|
properties: {
|
|
169
|
-
...
|
|
196
|
+
...a.properties
|
|
170
197
|
},
|
|
171
198
|
actions: {
|
|
172
|
-
...
|
|
199
|
+
...a.actions
|
|
173
200
|
}
|
|
174
201
|
};
|
|
175
202
|
for (const c in e.bindings) {
|
|
@@ -177,53 +204,53 @@ const Ze = ({
|
|
|
177
204
|
code: s,
|
|
178
205
|
localState: n,
|
|
179
206
|
rootState: i,
|
|
180
|
-
rootSetState:
|
|
207
|
+
rootSetState: o,
|
|
181
208
|
context: t
|
|
182
209
|
});
|
|
183
|
-
|
|
210
|
+
et(r, c, d);
|
|
184
211
|
}
|
|
185
|
-
return
|
|
212
|
+
return r;
|
|
186
213
|
};
|
|
187
|
-
function
|
|
214
|
+
function K({
|
|
188
215
|
block: e,
|
|
189
216
|
context: t,
|
|
190
217
|
shouldEvaluateBindings: n,
|
|
191
218
|
localState: i,
|
|
192
|
-
rootState:
|
|
193
|
-
rootSetState:
|
|
219
|
+
rootState: o,
|
|
220
|
+
rootSetState: a
|
|
194
221
|
}) {
|
|
195
|
-
const
|
|
196
|
-
return n ?
|
|
197
|
-
block:
|
|
222
|
+
const r = e;
|
|
223
|
+
return n ? tt({
|
|
224
|
+
block: r,
|
|
198
225
|
localState: i,
|
|
199
|
-
rootState:
|
|
200
|
-
rootSetState:
|
|
226
|
+
rootState: o,
|
|
227
|
+
rootSetState: a,
|
|
201
228
|
context: t
|
|
202
|
-
}) :
|
|
229
|
+
}) : r;
|
|
203
230
|
}
|
|
204
|
-
const
|
|
231
|
+
const nt = ({
|
|
205
232
|
block: e,
|
|
206
233
|
context: t,
|
|
207
234
|
registeredComponents: n
|
|
208
235
|
}) => {
|
|
209
|
-
var
|
|
210
|
-
const i = (
|
|
236
|
+
var a;
|
|
237
|
+
const i = (a = K({
|
|
211
238
|
block: e,
|
|
212
239
|
localState: t.localState,
|
|
213
240
|
rootState: t.rootState,
|
|
214
241
|
rootSetState: t.rootSetState,
|
|
215
242
|
context: t.context,
|
|
216
243
|
shouldEvaluateBindings: !1
|
|
217
|
-
}).component) == null ? void 0 :
|
|
244
|
+
}).component) == null ? void 0 : a.name;
|
|
218
245
|
if (!i)
|
|
219
246
|
return null;
|
|
220
|
-
const
|
|
221
|
-
if (
|
|
222
|
-
return
|
|
247
|
+
const o = n[i];
|
|
248
|
+
if (o)
|
|
249
|
+
return o;
|
|
223
250
|
console.warn(`
|
|
224
251
|
Could not find a registered component named "${i}".
|
|
225
252
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
226
|
-
},
|
|
253
|
+
}, it = ({
|
|
227
254
|
block: e,
|
|
228
255
|
context: t
|
|
229
256
|
}) => {
|
|
@@ -233,30 +260,30 @@ const et = ({
|
|
|
233
260
|
} = e;
|
|
234
261
|
if (!(n != null && n.collection))
|
|
235
262
|
return;
|
|
236
|
-
const
|
|
263
|
+
const o = j({
|
|
237
264
|
code: n.collection,
|
|
238
265
|
localState: t.localState,
|
|
239
266
|
rootState: t.rootState,
|
|
240
267
|
rootSetState: t.rootSetState,
|
|
241
268
|
context: t.context
|
|
242
269
|
});
|
|
243
|
-
if (!Array.isArray(
|
|
270
|
+
if (!Array.isArray(o))
|
|
244
271
|
return;
|
|
245
|
-
const
|
|
246
|
-
return
|
|
272
|
+
const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
|
|
273
|
+
return o.map((s, d) => ({
|
|
247
274
|
context: {
|
|
248
275
|
...t,
|
|
249
276
|
localState: {
|
|
250
277
|
...t.localState,
|
|
251
278
|
$index: d,
|
|
252
279
|
$item: s,
|
|
253
|
-
[
|
|
254
|
-
[`$${
|
|
280
|
+
[r]: s,
|
|
281
|
+
[`$${r}Index`]: d
|
|
255
282
|
}
|
|
256
283
|
},
|
|
257
284
|
block: i
|
|
258
285
|
}));
|
|
259
|
-
},
|
|
286
|
+
}, Te = {
|
|
260
287
|
small: {
|
|
261
288
|
min: 320,
|
|
262
289
|
default: 321,
|
|
@@ -272,11 +299,11 @@ const et = ({
|
|
|
272
299
|
default: 991,
|
|
273
300
|
max: 1200
|
|
274
301
|
}
|
|
275
|
-
}, he = (e, t =
|
|
302
|
+
}, he = (e, t = Te) => `@media (max-width: ${t[e].max}px)`, Re = ({
|
|
276
303
|
small: e,
|
|
277
304
|
medium: t
|
|
278
305
|
}) => {
|
|
279
|
-
const n = te(
|
|
306
|
+
const n = te(Te);
|
|
280
307
|
if (!e || !t)
|
|
281
308
|
return n;
|
|
282
309
|
const i = Math.floor(e / 2);
|
|
@@ -285,41 +312,41 @@ const et = ({
|
|
|
285
312
|
min: i,
|
|
286
313
|
default: i + 1
|
|
287
314
|
};
|
|
288
|
-
const
|
|
315
|
+
const o = n.small.max + 1;
|
|
289
316
|
n.medium = {
|
|
290
317
|
max: t,
|
|
291
|
-
min:
|
|
292
|
-
default:
|
|
318
|
+
min: o,
|
|
319
|
+
default: o + 1
|
|
293
320
|
};
|
|
294
|
-
const
|
|
321
|
+
const a = n.medium.max + 1;
|
|
295
322
|
return n.large = {
|
|
296
323
|
max: 2e3,
|
|
297
324
|
// TODO: decide upper limit
|
|
298
|
-
min:
|
|
299
|
-
default:
|
|
325
|
+
min: a,
|
|
326
|
+
default: a + 1
|
|
300
327
|
}, n;
|
|
301
|
-
},
|
|
328
|
+
}, ot = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Ee = (e) => Object.entries(e).map(([n, i]) => {
|
|
302
329
|
if (typeof i == "string")
|
|
303
|
-
return `${
|
|
304
|
-
}).filter(
|
|
305
|
-
`),
|
|
330
|
+
return `${ot(n)}: ${i};`;
|
|
331
|
+
}).filter(M), at = (e) => Ee(e).join(`
|
|
332
|
+
`), J = ({
|
|
306
333
|
mediaQuery: e,
|
|
307
334
|
className: t,
|
|
308
335
|
styles: n
|
|
309
336
|
}) => {
|
|
310
337
|
const i = `.${t} {
|
|
311
|
-
${
|
|
338
|
+
${at(n)}
|
|
312
339
|
}`;
|
|
313
340
|
return e ? `${e} {
|
|
314
341
|
${i}
|
|
315
342
|
}` : i;
|
|
316
343
|
};
|
|
317
|
-
function
|
|
344
|
+
function z(e) {
|
|
318
345
|
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
319
346
|
}
|
|
320
|
-
function
|
|
347
|
+
function rt(e) {
|
|
321
348
|
function t() {
|
|
322
|
-
const i =
|
|
349
|
+
const i = K({
|
|
323
350
|
block: e.block,
|
|
324
351
|
localState: e.context.localState,
|
|
325
352
|
rootState: e.context.rootState,
|
|
@@ -327,48 +354,48 @@ function at(e) {
|
|
|
327
354
|
context: e.context.context,
|
|
328
355
|
shouldEvaluateBindings: !0
|
|
329
356
|
});
|
|
330
|
-
return
|
|
357
|
+
return M(i.hide) ? !i.hide : M(i.show) ? i.show : !0;
|
|
331
358
|
}
|
|
332
359
|
function n() {
|
|
333
|
-
var
|
|
334
|
-
const i =
|
|
360
|
+
var x;
|
|
361
|
+
const i = K({
|
|
335
362
|
block: e.block,
|
|
336
363
|
localState: e.context.localState,
|
|
337
364
|
rootState: e.context.rootState,
|
|
338
365
|
rootSetState: e.context.rootSetState,
|
|
339
366
|
context: e.context.context,
|
|
340
367
|
shouldEvaluateBindings: !0
|
|
341
|
-
}),
|
|
342
|
-
((
|
|
343
|
-
), c =
|
|
368
|
+
}), o = i.responsiveStyles, a = e.context.content, r = Re(
|
|
369
|
+
((x = a == null ? void 0 : a.meta) == null ? void 0 : x.breakpoints) || {}
|
|
370
|
+
), c = o == null ? void 0 : o.large, s = o == null ? void 0 : o.medium, d = o == null ? void 0 : o.small, m = i.id;
|
|
344
371
|
if (!m)
|
|
345
372
|
return "";
|
|
346
|
-
const g = c ?
|
|
373
|
+
const g = c ? J({
|
|
347
374
|
className: m,
|
|
348
375
|
styles: c
|
|
349
|
-
}) : "", k = s ?
|
|
376
|
+
}) : "", k = s ? J({
|
|
350
377
|
className: m,
|
|
351
378
|
styles: s,
|
|
352
379
|
mediaQuery: he(
|
|
353
380
|
"medium",
|
|
354
|
-
|
|
381
|
+
r
|
|
355
382
|
)
|
|
356
|
-
}) : "",
|
|
383
|
+
}) : "", S = d ? J({
|
|
357
384
|
className: m,
|
|
358
385
|
styles: d,
|
|
359
386
|
mediaQuery: he(
|
|
360
387
|
"small",
|
|
361
|
-
|
|
388
|
+
r
|
|
362
389
|
)
|
|
363
390
|
}) : "";
|
|
364
|
-
return [g, k,
|
|
391
|
+
return [g, k, S].join(" ");
|
|
365
392
|
}
|
|
366
|
-
return /* @__PURE__ */ l(h, { children: n() && t() ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
393
|
+
return /* @__PURE__ */ l(h, { children: n() && t() ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(z, { styles: n() }) }) : null });
|
|
367
394
|
}
|
|
368
|
-
function
|
|
395
|
+
function lt(e) {
|
|
369
396
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
370
397
|
}
|
|
371
|
-
const
|
|
398
|
+
const ct = (e) => `on${lt(e)}`, st = (e, t) => (n) => j({
|
|
372
399
|
code: e,
|
|
373
400
|
context: t.context,
|
|
374
401
|
localState: t.localState,
|
|
@@ -377,46 +404,46 @@ const rt = (e) => `on${ot(e)}`, lt = (e, t) => (n) => j({
|
|
|
377
404
|
event: n,
|
|
378
405
|
isExpression: !1
|
|
379
406
|
});
|
|
380
|
-
function
|
|
407
|
+
function Pe(e) {
|
|
381
408
|
var i;
|
|
382
409
|
const t = {}, n = (i = e.block.actions) != null ? i : {};
|
|
383
|
-
for (const
|
|
384
|
-
if (!n.hasOwnProperty(
|
|
410
|
+
for (const o in n) {
|
|
411
|
+
if (!n.hasOwnProperty(o))
|
|
385
412
|
continue;
|
|
386
|
-
const
|
|
387
|
-
let
|
|
413
|
+
const a = n[o];
|
|
414
|
+
let r = ct(o);
|
|
388
415
|
if (e.stripPrefix)
|
|
389
|
-
switch (
|
|
416
|
+
switch ($) {
|
|
390
417
|
case "vue":
|
|
391
|
-
|
|
418
|
+
r = r.replace("v-on:", "");
|
|
392
419
|
break;
|
|
393
420
|
case "svelte":
|
|
394
|
-
|
|
421
|
+
r = r.replace("on:", "");
|
|
395
422
|
break;
|
|
396
423
|
}
|
|
397
|
-
t[
|
|
424
|
+
t[r] = st(a, e);
|
|
398
425
|
}
|
|
399
426
|
return t;
|
|
400
427
|
}
|
|
401
|
-
function
|
|
428
|
+
function dt({
|
|
402
429
|
style: e
|
|
403
430
|
}) {
|
|
404
431
|
return e;
|
|
405
432
|
}
|
|
406
|
-
const
|
|
433
|
+
const ut = ({
|
|
407
434
|
block: e,
|
|
408
435
|
context: t
|
|
409
|
-
}) =>
|
|
436
|
+
}) => Be(dt({
|
|
410
437
|
style: e.style || {},
|
|
411
438
|
context: t,
|
|
412
439
|
block: e
|
|
413
440
|
}));
|
|
414
|
-
function
|
|
415
|
-
switch (
|
|
441
|
+
function Be(e) {
|
|
442
|
+
switch ($) {
|
|
416
443
|
case "svelte":
|
|
417
444
|
case "vue":
|
|
418
445
|
case "solid":
|
|
419
|
-
return
|
|
446
|
+
return Ee(e).join(" ");
|
|
420
447
|
case "qwik":
|
|
421
448
|
case "reactNative":
|
|
422
449
|
case "react":
|
|
@@ -424,45 +451,45 @@ function Pe(e) {
|
|
|
424
451
|
return e;
|
|
425
452
|
}
|
|
426
453
|
}
|
|
427
|
-
function
|
|
454
|
+
function mt({
|
|
428
455
|
properties: e
|
|
429
456
|
}) {
|
|
430
457
|
return e;
|
|
431
458
|
}
|
|
432
|
-
const
|
|
459
|
+
const ft = (e) => ({
|
|
433
460
|
href: e.href
|
|
434
461
|
});
|
|
435
|
-
function
|
|
462
|
+
function oe({
|
|
436
463
|
block: e,
|
|
437
464
|
context: t
|
|
438
465
|
}) {
|
|
439
466
|
var i;
|
|
440
467
|
const n = {
|
|
441
|
-
...
|
|
468
|
+
...ft(e),
|
|
442
469
|
...e.properties,
|
|
443
470
|
"builder-id": e.id,
|
|
444
|
-
style:
|
|
471
|
+
style: ut({
|
|
445
472
|
block: e,
|
|
446
473
|
context: t
|
|
447
474
|
}),
|
|
448
|
-
[
|
|
475
|
+
[O()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
449
476
|
};
|
|
450
|
-
return
|
|
477
|
+
return mt({
|
|
451
478
|
properties: n,
|
|
452
479
|
context: t,
|
|
453
480
|
block: e
|
|
454
481
|
});
|
|
455
482
|
}
|
|
456
|
-
function
|
|
483
|
+
function ht(e) {
|
|
457
484
|
return /* @__PURE__ */ l(
|
|
458
485
|
ne,
|
|
459
486
|
{
|
|
460
487
|
TagName: e.Wrapper,
|
|
461
|
-
attributes:
|
|
488
|
+
attributes: oe({
|
|
462
489
|
block: e.block,
|
|
463
490
|
context: e.context
|
|
464
491
|
}),
|
|
465
|
-
actionAttributes:
|
|
492
|
+
actionAttributes: Pe({
|
|
466
493
|
block: e.block,
|
|
467
494
|
rootState: e.context.rootState,
|
|
468
495
|
rootSetState: e.context.rootSetState,
|
|
@@ -474,17 +501,17 @@ function mt(e) {
|
|
|
474
501
|
}
|
|
475
502
|
);
|
|
476
503
|
}
|
|
477
|
-
function
|
|
504
|
+
function gt(e) {
|
|
478
505
|
return /* @__PURE__ */ l(
|
|
479
506
|
e.Wrapper,
|
|
480
507
|
{
|
|
481
508
|
...e.wrapperProps,
|
|
482
509
|
attributes: e.includeBlockProps ? {
|
|
483
|
-
...
|
|
510
|
+
...oe({
|
|
484
511
|
block: e.block,
|
|
485
512
|
context: e.context
|
|
486
513
|
}),
|
|
487
|
-
...
|
|
514
|
+
...Pe({
|
|
488
515
|
block: e.block,
|
|
489
516
|
rootState: e.context.rootState,
|
|
490
517
|
rootSetState: e.context.rootSetState,
|
|
@@ -496,14 +523,14 @@ function ft(e) {
|
|
|
496
523
|
}
|
|
497
524
|
);
|
|
498
525
|
}
|
|
499
|
-
const
|
|
526
|
+
const bt = ({
|
|
500
527
|
componentOptions: e,
|
|
501
528
|
builderBlock: t,
|
|
502
529
|
context: n,
|
|
503
530
|
componentRef: i,
|
|
504
|
-
includeBlockProps:
|
|
505
|
-
isInteractive:
|
|
506
|
-
contextValue:
|
|
531
|
+
includeBlockProps: o,
|
|
532
|
+
isInteractive: a,
|
|
533
|
+
contextValue: r
|
|
507
534
|
}) => {
|
|
508
535
|
const c = {
|
|
509
536
|
...e,
|
|
@@ -511,30 +538,30 @@ const ht = ({
|
|
|
511
538
|
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
512
539
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
513
540
|
*/
|
|
514
|
-
...
|
|
515
|
-
attributes:
|
|
541
|
+
...o ? {
|
|
542
|
+
attributes: oe({
|
|
516
543
|
block: t,
|
|
517
|
-
context:
|
|
544
|
+
context: r
|
|
518
545
|
})
|
|
519
546
|
} : {}
|
|
520
547
|
};
|
|
521
|
-
return
|
|
548
|
+
return a ? {
|
|
522
549
|
Wrapper: i,
|
|
523
550
|
block: t,
|
|
524
551
|
context: n,
|
|
525
552
|
wrapperProps: e,
|
|
526
|
-
includeBlockProps:
|
|
553
|
+
includeBlockProps: o
|
|
527
554
|
} : c;
|
|
528
555
|
};
|
|
529
556
|
function ge(e) {
|
|
530
557
|
var i;
|
|
531
558
|
const [t, n] = v(
|
|
532
|
-
() => e.isInteractive ?
|
|
559
|
+
() => e.isInteractive ? gt : e.componentRef
|
|
533
560
|
);
|
|
534
561
|
return /* @__PURE__ */ l(h, { children: e.componentRef ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
535
562
|
t,
|
|
536
563
|
{
|
|
537
|
-
...
|
|
564
|
+
...bt({
|
|
538
565
|
componentOptions: e.componentOptions,
|
|
539
566
|
builderBlock: e.builderBlock,
|
|
540
567
|
context: e.context,
|
|
@@ -544,23 +571,23 @@ function ge(e) {
|
|
|
544
571
|
isInteractive: e.isInteractive,
|
|
545
572
|
contextValue: e.context
|
|
546
573
|
}),
|
|
547
|
-
children: (i = e.blockChildren) == null ? void 0 : i.map((
|
|
548
|
-
|
|
574
|
+
children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
|
|
575
|
+
q,
|
|
549
576
|
{
|
|
550
|
-
block:
|
|
577
|
+
block: o,
|
|
551
578
|
context: e.context,
|
|
552
579
|
registeredComponents: e.registeredComponents,
|
|
553
580
|
linkComponent: e.linkComponent
|
|
554
581
|
},
|
|
555
|
-
|
|
582
|
+
o.id
|
|
556
583
|
))
|
|
557
584
|
}
|
|
558
585
|
) }) : null });
|
|
559
586
|
}
|
|
560
|
-
function
|
|
587
|
+
function yt(e) {
|
|
561
588
|
const [t, n] = v(() => e.repeatContext);
|
|
562
589
|
return /* @__PURE__ */ l(ie.Provider, { value: t, children: /* @__PURE__ */ l(
|
|
563
|
-
|
|
590
|
+
q,
|
|
564
591
|
{
|
|
565
592
|
block: e.block,
|
|
566
593
|
context: t,
|
|
@@ -569,24 +596,24 @@ function gt(e) {
|
|
|
569
596
|
}
|
|
570
597
|
) });
|
|
571
598
|
}
|
|
572
|
-
function
|
|
599
|
+
function q(e) {
|
|
573
600
|
var m, g, k;
|
|
574
601
|
function t() {
|
|
575
|
-
return
|
|
602
|
+
return nt({
|
|
576
603
|
block: e.block,
|
|
577
604
|
context: e.context,
|
|
578
605
|
registeredComponents: e.registeredComponents
|
|
579
606
|
});
|
|
580
607
|
}
|
|
581
608
|
function n() {
|
|
582
|
-
return
|
|
609
|
+
return it({
|
|
583
610
|
block: e.block,
|
|
584
611
|
context: e.context
|
|
585
612
|
});
|
|
586
613
|
}
|
|
587
614
|
function i() {
|
|
588
|
-
var
|
|
589
|
-
return (
|
|
615
|
+
var S;
|
|
616
|
+
return (S = e.block.repeat) != null && S.collection ? e.block : K({
|
|
590
617
|
block: e.block,
|
|
591
618
|
localState: e.context.localState,
|
|
592
619
|
rootState: e.context.rootState,
|
|
@@ -595,28 +622,28 @@ function z(e) {
|
|
|
595
622
|
shouldEvaluateBindings: !0
|
|
596
623
|
});
|
|
597
624
|
}
|
|
598
|
-
function
|
|
599
|
-
var
|
|
600
|
-
return e.block.tagName === "a" || ((
|
|
625
|
+
function o() {
|
|
626
|
+
var x;
|
|
627
|
+
return e.block.tagName === "a" || ((x = i().properties) == null ? void 0 : x.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
601
628
|
}
|
|
602
|
-
function
|
|
629
|
+
function a() {
|
|
603
630
|
var C, R;
|
|
604
631
|
if ((C = e.block.repeat) != null && C.collection)
|
|
605
632
|
return !!((R = n == null ? void 0 : n()) != null && R.length);
|
|
606
|
-
const
|
|
607
|
-
return ("show" in i() ? i().show : !0) && !
|
|
633
|
+
const S = "hide" in i() ? i().hide : !1;
|
|
634
|
+
return ("show" in i() ? i().show : !0) && !S;
|
|
608
635
|
}
|
|
609
|
-
function
|
|
610
|
-
var
|
|
611
|
-
return !((
|
|
636
|
+
function r() {
|
|
637
|
+
var x, C;
|
|
638
|
+
return !((x = t == null ? void 0 : t()) != null && x.component) && !n() ? (C = i().children) != null ? C : [] : [];
|
|
612
639
|
}
|
|
613
640
|
function c() {
|
|
614
|
-
var
|
|
641
|
+
var S, x, C, R, B, w, I, P, W;
|
|
615
642
|
return {
|
|
616
|
-
blockChildren: (
|
|
617
|
-
componentRef: (
|
|
643
|
+
blockChildren: (S = i().children) != null ? S : [],
|
|
644
|
+
componentRef: (x = t == null ? void 0 : t()) == null ? void 0 : x.component,
|
|
618
645
|
componentOptions: {
|
|
619
|
-
...
|
|
646
|
+
...qe(i()),
|
|
620
647
|
builderContext: e.context,
|
|
621
648
|
...((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Core:Button" || ((R = t == null ? void 0 : t()) == null ? void 0 : R.name) === "Symbol" || ((B = t == null ? void 0 : t()) == null ? void 0 : B.name) === "Columns" ? {
|
|
622
649
|
builderLinkComponent: e.linkComponent
|
|
@@ -634,8 +661,8 @@ function z(e) {
|
|
|
634
661
|
};
|
|
635
662
|
}
|
|
636
663
|
const [s, d] = v(() => e.context);
|
|
637
|
-
return /* @__PURE__ */ l(h, { children:
|
|
638
|
-
/* @__PURE__ */ l(
|
|
664
|
+
return /* @__PURE__ */ l(h, { children: a() ? /* @__PURE__ */ A(h, { children: [
|
|
665
|
+
/* @__PURE__ */ l(rt, { block: e.block, context: e.context }),
|
|
639
666
|
(m = t == null ? void 0 : t()) != null && m.noWrap ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
640
667
|
ge,
|
|
641
668
|
{
|
|
@@ -649,19 +676,19 @@ function z(e) {
|
|
|
649
676
|
includeBlockProps: c().includeBlockProps,
|
|
650
677
|
isInteractive: c().isInteractive
|
|
651
678
|
}
|
|
652
|
-
) }) : /* @__PURE__ */ l(h, { children: n() ? /* @__PURE__ */ l(h, { children: (k = n()) == null ? void 0 : k.map((
|
|
653
|
-
|
|
679
|
+
) }) : /* @__PURE__ */ l(h, { children: n() ? /* @__PURE__ */ l(h, { children: (k = n()) == null ? void 0 : k.map((S, x) => /* @__PURE__ */ l(
|
|
680
|
+
yt,
|
|
654
681
|
{
|
|
655
|
-
repeatContext:
|
|
656
|
-
block:
|
|
682
|
+
repeatContext: S.context,
|
|
683
|
+
block: S.block,
|
|
657
684
|
registeredComponents: e.registeredComponents,
|
|
658
685
|
linkComponent: e.linkComponent
|
|
659
686
|
},
|
|
660
|
-
|
|
687
|
+
x
|
|
661
688
|
)) }) : /* @__PURE__ */ l(h, { children: /* @__PURE__ */ A(
|
|
662
|
-
|
|
689
|
+
ht,
|
|
663
690
|
{
|
|
664
|
-
Wrapper:
|
|
691
|
+
Wrapper: o(),
|
|
665
692
|
block: i(),
|
|
666
693
|
context: e.context,
|
|
667
694
|
linkComponent: e.linkComponent,
|
|
@@ -680,29 +707,29 @@ function z(e) {
|
|
|
680
707
|
isInteractive: c().isInteractive
|
|
681
708
|
}
|
|
682
709
|
),
|
|
683
|
-
(g =
|
|
684
|
-
|
|
710
|
+
(g = r()) == null ? void 0 : g.map((S) => /* @__PURE__ */ l(
|
|
711
|
+
q,
|
|
685
712
|
{
|
|
686
|
-
block:
|
|
713
|
+
block: S,
|
|
687
714
|
context: s,
|
|
688
715
|
registeredComponents: e.registeredComponents,
|
|
689
716
|
linkComponent: e.linkComponent
|
|
690
717
|
},
|
|
691
|
-
|
|
718
|
+
S.id
|
|
692
719
|
))
|
|
693
720
|
]
|
|
694
721
|
}
|
|
695
722
|
) }) })
|
|
696
723
|
] }) : null });
|
|
697
724
|
}
|
|
698
|
-
function
|
|
725
|
+
function St(e) {
|
|
699
726
|
function t() {
|
|
700
|
-
var
|
|
701
|
-
return "builder-blocks" + ((
|
|
727
|
+
var o;
|
|
728
|
+
return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
|
|
702
729
|
}
|
|
703
730
|
function n() {
|
|
704
|
-
var
|
|
705
|
-
|
|
731
|
+
var o, a;
|
|
732
|
+
N() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
|
|
706
733
|
{
|
|
707
734
|
type: "builder.clickEmptyBlocks",
|
|
708
735
|
data: {
|
|
@@ -714,8 +741,8 @@ function bt(e) {
|
|
|
714
741
|
));
|
|
715
742
|
}
|
|
716
743
|
function i() {
|
|
717
|
-
var
|
|
718
|
-
|
|
744
|
+
var o, a;
|
|
745
|
+
N() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
|
|
719
746
|
{
|
|
720
747
|
type: "builder.hoverEmptyBlocks",
|
|
721
748
|
data: {
|
|
@@ -734,9 +761,9 @@ function bt(e) {
|
|
|
734
761
|
"builder-path": e.path,
|
|
735
762
|
"builder-parent-id": e.parent,
|
|
736
763
|
style: e.styleProp,
|
|
737
|
-
onClick: (
|
|
738
|
-
onMouseEnter: (
|
|
739
|
-
onKeyPress: (
|
|
764
|
+
onClick: (o) => n(),
|
|
765
|
+
onMouseEnter: (o) => i(),
|
|
766
|
+
onKeyPress: (o) => n(),
|
|
740
767
|
...e.BlocksWrapperProps,
|
|
741
768
|
children: e.children
|
|
742
769
|
}
|
|
@@ -748,36 +775,36 @@ function bt(e) {
|
|
|
748
775
|
}` })
|
|
749
776
|
] });
|
|
750
777
|
}
|
|
751
|
-
function
|
|
752
|
-
var i,
|
|
778
|
+
function Y(e) {
|
|
779
|
+
var i, o, a;
|
|
753
780
|
const t = se(ie), n = se(we);
|
|
754
781
|
return /* @__PURE__ */ l(
|
|
755
|
-
|
|
782
|
+
St,
|
|
756
783
|
{
|
|
757
784
|
blocks: e.blocks,
|
|
758
785
|
parent: e.parent,
|
|
759
786
|
path: e.path,
|
|
760
787
|
styleProp: e.styleProp,
|
|
761
788
|
BlocksWrapper: (i = e.context) == null ? void 0 : i.BlocksWrapper,
|
|
762
|
-
BlocksWrapperProps: (
|
|
763
|
-
children: e.blocks ? /* @__PURE__ */ l(h, { children: (
|
|
764
|
-
|
|
789
|
+
BlocksWrapperProps: (o = e.context) == null ? void 0 : o.BlocksWrapperProps,
|
|
790
|
+
children: e.blocks ? /* @__PURE__ */ l(h, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ l(
|
|
791
|
+
q,
|
|
765
792
|
{
|
|
766
|
-
block:
|
|
793
|
+
block: r,
|
|
767
794
|
linkComponent: e.linkComponent,
|
|
768
795
|
context: e.context || t,
|
|
769
796
|
registeredComponents: e.registeredComponents || n.registeredComponents
|
|
770
797
|
},
|
|
771
|
-
|
|
798
|
+
r.id
|
|
772
799
|
)) }) : null
|
|
773
800
|
}
|
|
774
801
|
);
|
|
775
802
|
}
|
|
776
|
-
function
|
|
803
|
+
function xt(e) {
|
|
777
804
|
var B;
|
|
778
805
|
const [t, n] = v(
|
|
779
806
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
780
|
-
), [i,
|
|
807
|
+
), [i, o] = v(() => e.columns || []), [a, r] = v(
|
|
781
808
|
() => e.stackColumnsAt || "tablet"
|
|
782
809
|
);
|
|
783
810
|
function c(w) {
|
|
@@ -792,18 +819,18 @@ function yt(e) {
|
|
|
792
819
|
stackedStyle: w,
|
|
793
820
|
desktopStyle: I
|
|
794
821
|
}) {
|
|
795
|
-
return
|
|
822
|
+
return a === "tablet" ? w : I;
|
|
796
823
|
}
|
|
797
824
|
function m({
|
|
798
825
|
stackedStyle: w,
|
|
799
826
|
desktopStyle: I
|
|
800
827
|
}) {
|
|
801
|
-
return
|
|
828
|
+
return a === "never" ? I : w;
|
|
802
829
|
}
|
|
803
830
|
const [g, k] = v(
|
|
804
831
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
805
832
|
);
|
|
806
|
-
function
|
|
833
|
+
function S() {
|
|
807
834
|
return {
|
|
808
835
|
"--flex-dir": g,
|
|
809
836
|
"--flex-dir-tablet": d({
|
|
@@ -812,7 +839,7 @@ function yt(e) {
|
|
|
812
839
|
})
|
|
813
840
|
};
|
|
814
841
|
}
|
|
815
|
-
function
|
|
842
|
+
function x(w) {
|
|
816
843
|
const I = w === 0 ? 0 : t, P = s(w), W = `${I}px`, F = "100%", L = 0;
|
|
817
844
|
return {
|
|
818
845
|
...{
|
|
@@ -842,7 +869,7 @@ function yt(e) {
|
|
|
842
869
|
}
|
|
843
870
|
function C(w) {
|
|
844
871
|
var P, W;
|
|
845
|
-
return
|
|
872
|
+
return Re(
|
|
846
873
|
((W = (P = e.builderContext.content) == null ? void 0 : P.meta) == null ? void 0 : W.breakpoints) || {}
|
|
847
874
|
)[w].max;
|
|
848
875
|
}
|
|
@@ -878,9 +905,9 @@ function yt(e) {
|
|
|
878
905
|
"div",
|
|
879
906
|
{
|
|
880
907
|
className: `builder-columns ${e.builderBlock.id}-breakpoints div-6f826264`,
|
|
881
|
-
style:
|
|
908
|
+
style: S(),
|
|
882
909
|
children: [
|
|
883
|
-
/* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
910
|
+
/* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(z, { styles: R() }) }),
|
|
884
911
|
(B = e.columns) == null ? void 0 : B.map((w, I) => /* @__PURE__ */ l(
|
|
885
912
|
ne,
|
|
886
913
|
{
|
|
@@ -890,11 +917,11 @@ function yt(e) {
|
|
|
890
917
|
...w.link ? {
|
|
891
918
|
href: w.link
|
|
892
919
|
} : {},
|
|
893
|
-
[
|
|
894
|
-
style:
|
|
920
|
+
[O()]: "builder-column",
|
|
921
|
+
style: Be(x(I))
|
|
895
922
|
},
|
|
896
923
|
children: /* @__PURE__ */ l(
|
|
897
|
-
|
|
924
|
+
Y,
|
|
898
925
|
{
|
|
899
926
|
path: `component.options.columns.${I}.blocks`,
|
|
900
927
|
parent: e.builderBlock.id,
|
|
@@ -919,41 +946,41 @@ function yt(e) {
|
|
|
919
946
|
}` })
|
|
920
947
|
] });
|
|
921
948
|
}
|
|
922
|
-
function
|
|
949
|
+
function vt(e) {
|
|
923
950
|
return /* @__PURE__ */ l("span", { children: e.children });
|
|
924
951
|
}
|
|
925
952
|
function be(e) {
|
|
926
953
|
return e.replace(/http(s)?:/, "");
|
|
927
954
|
}
|
|
928
|
-
function
|
|
929
|
-
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"),
|
|
930
|
-
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e +
|
|
955
|
+
function kt(e = "", t, n) {
|
|
956
|
+
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
|
|
957
|
+
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
|
|
931
958
|
}
|
|
932
|
-
function
|
|
959
|
+
function pt(e, t) {
|
|
933
960
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
934
961
|
return e;
|
|
935
962
|
if (t === "master")
|
|
936
963
|
return be(e);
|
|
937
964
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
938
965
|
if (n) {
|
|
939
|
-
const i = e.split(n[0]),
|
|
940
|
-
return be(`${i[0]}_${
|
|
966
|
+
const i = e.split(n[0]), o = n[3], a = t.match("x") ? t : `${t}x`;
|
|
967
|
+
return be(`${i[0]}_${a}${o}`);
|
|
941
968
|
}
|
|
942
969
|
return null;
|
|
943
970
|
}
|
|
944
|
-
function
|
|
971
|
+
function X(e) {
|
|
945
972
|
if (!e)
|
|
946
973
|
return e;
|
|
947
974
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
948
975
|
if (e.match(/builder\.io/)) {
|
|
949
976
|
let n = e;
|
|
950
977
|
const i = Number(e.split("?width=")[1]);
|
|
951
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((
|
|
978
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${kt(e, "width", o)} ${o}w`).concat([n]).join(", ");
|
|
952
979
|
}
|
|
953
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
980
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [pt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
954
981
|
}
|
|
955
|
-
function
|
|
956
|
-
var a, r,
|
|
982
|
+
function Ct(e) {
|
|
983
|
+
var o, a, r, c;
|
|
957
984
|
function t() {
|
|
958
985
|
var m;
|
|
959
986
|
const d = e.image || e.src;
|
|
@@ -963,10 +990,10 @@ function kt(e) {
|
|
|
963
990
|
return e.srcset;
|
|
964
991
|
if (e.srcset && ((m = e.image) != null && m.includes("builder.io/api/v1/image"))) {
|
|
965
992
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
966
|
-
return console.debug("Removed given srcset"),
|
|
993
|
+
return console.debug("Removed given srcset"), X(d);
|
|
967
994
|
} else if (e.image && !e.srcset)
|
|
968
|
-
return
|
|
969
|
-
return
|
|
995
|
+
return X(d);
|
|
996
|
+
return X(d);
|
|
970
997
|
}
|
|
971
998
|
function n() {
|
|
972
999
|
var s;
|
|
@@ -1004,7 +1031,7 @@ function kt(e) {
|
|
|
1004
1031
|
}
|
|
1005
1032
|
)
|
|
1006
1033
|
] }),
|
|
1007
|
-
e.aspectRatio && !((
|
|
1034
|
+
e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
1008
1035
|
"div",
|
|
1009
1036
|
{
|
|
1010
1037
|
className: "builder-image-sizer div-40c70c9b",
|
|
@@ -1013,7 +1040,7 @@ function kt(e) {
|
|
|
1013
1040
|
}
|
|
1014
1041
|
}
|
|
1015
1042
|
) }) : null,
|
|
1016
|
-
(c = (
|
|
1043
|
+
(c = (r = e.builderBlock) == null ? void 0 : r.children) != null && c.length && e.fitContent ? /* @__PURE__ */ l(h, { children: e.children }) : null,
|
|
1017
1044
|
!e.fitContent && e.children ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l("div", { className: "div-40c70c9b-2", children: e.children }) }) : null
|
|
1018
1045
|
] }),
|
|
1019
1046
|
/* @__PURE__ */ l("style", { children: `.img-40c70c9b {
|
|
@@ -1035,7 +1062,7 @@ function kt(e) {
|
|
|
1035
1062
|
}` })
|
|
1036
1063
|
] });
|
|
1037
1064
|
}
|
|
1038
|
-
function
|
|
1065
|
+
function wt(e) {
|
|
1039
1066
|
return /* @__PURE__ */ l(
|
|
1040
1067
|
"section",
|
|
1041
1068
|
{
|
|
@@ -1056,7 +1083,7 @@ function pt(e) {
|
|
|
1056
1083
|
}
|
|
1057
1084
|
);
|
|
1058
1085
|
}
|
|
1059
|
-
const
|
|
1086
|
+
const It = {
|
|
1060
1087
|
name: "Core:Button",
|
|
1061
1088
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1062
1089
|
defaultStyles: {
|
|
@@ -1089,7 +1116,7 @@ const Ct = {
|
|
|
1089
1116
|
}],
|
|
1090
1117
|
static: !0,
|
|
1091
1118
|
noWrap: !0
|
|
1092
|
-
},
|
|
1119
|
+
}, Tt = {
|
|
1093
1120
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1094
1121
|
name: "Columns",
|
|
1095
1122
|
isRSC: !0,
|
|
@@ -1268,7 +1295,7 @@ const Ct = {
|
|
|
1268
1295
|
});
|
|
1269
1296
|
}
|
|
1270
1297
|
const n = e.get("columns");
|
|
1271
|
-
Array.isArray(n) && n.find((
|
|
1298
|
+
Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((c, s) => c + s.get("width"), 0) !== 100) && t();
|
|
1272
1299
|
}
|
|
1273
1300
|
}, {
|
|
1274
1301
|
name: "space",
|
|
@@ -1290,7 +1317,7 @@ const Ct = {
|
|
|
1290
1317
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1291
1318
|
advanced: !0
|
|
1292
1319
|
}]
|
|
1293
|
-
},
|
|
1320
|
+
}, Rt = {
|
|
1294
1321
|
name: "Custom Code",
|
|
1295
1322
|
static: !0,
|
|
1296
1323
|
requiredPermissions: ["editCode"],
|
|
@@ -1313,15 +1340,15 @@ const Ct = {
|
|
|
1313
1340
|
advanced: !0
|
|
1314
1341
|
}]
|
|
1315
1342
|
};
|
|
1316
|
-
function
|
|
1317
|
-
const t = ee(null), [n, i] = v(() => []), [
|
|
1343
|
+
function Et(e) {
|
|
1344
|
+
const t = ee(null), [n, i] = v(() => []), [o, a] = v(() => []);
|
|
1318
1345
|
return E(() => {
|
|
1319
1346
|
var c;
|
|
1320
1347
|
if (!((c = t.current) != null && c.getElementsByTagName) || typeof window == "undefined")
|
|
1321
1348
|
return;
|
|
1322
|
-
const
|
|
1323
|
-
for (let s = 0; s <
|
|
1324
|
-
const d =
|
|
1349
|
+
const r = t.current.getElementsByTagName("script");
|
|
1350
|
+
for (let s = 0; s < r.length; s++) {
|
|
1351
|
+
const d = r[s];
|
|
1325
1352
|
if (d.src) {
|
|
1326
1353
|
if (n.includes(d.src))
|
|
1327
1354
|
continue;
|
|
@@ -1333,10 +1360,10 @@ function Tt(e) {
|
|
|
1333
1360
|
"application/javascript",
|
|
1334
1361
|
"application/ecmascript"
|
|
1335
1362
|
].includes(d.type)) {
|
|
1336
|
-
if (
|
|
1363
|
+
if (o.includes(d.innerText))
|
|
1337
1364
|
continue;
|
|
1338
1365
|
try {
|
|
1339
|
-
|
|
1366
|
+
o.push(d.innerText), new Function(d.innerText)();
|
|
1340
1367
|
} catch (m) {
|
|
1341
1368
|
console.warn("`CustomCode`: Error running script:", m);
|
|
1342
1369
|
}
|
|
@@ -1351,7 +1378,7 @@ function Tt(e) {
|
|
|
1351
1378
|
}
|
|
1352
1379
|
);
|
|
1353
1380
|
}
|
|
1354
|
-
const
|
|
1381
|
+
const Pt = {
|
|
1355
1382
|
name: "Embed",
|
|
1356
1383
|
static: !0,
|
|
1357
1384
|
inputs: [{
|
|
@@ -1376,9 +1403,9 @@ const Rt = {
|
|
|
1376
1403
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1377
1404
|
hideFromUI: !0
|
|
1378
1405
|
}]
|
|
1379
|
-
},
|
|
1380
|
-
function
|
|
1381
|
-
const t = ee(null), [n, i] = v(() => []), [
|
|
1406
|
+
}, Bt = ["text/javascript", "application/javascript", "application/ecmascript"], Wt = (e) => Bt.includes(e.type);
|
|
1407
|
+
function At(e) {
|
|
1408
|
+
const t = ee(null), [n, i] = v(() => []), [o, a] = v(() => []), [r, c] = v(() => !1);
|
|
1382
1409
|
function s() {
|
|
1383
1410
|
if (!t.current || !t.current.getElementsByTagName)
|
|
1384
1411
|
return;
|
|
@@ -1389,17 +1416,17 @@ function Bt(e) {
|
|
|
1389
1416
|
n.push(g.src);
|
|
1390
1417
|
const k = document.createElement("script");
|
|
1391
1418
|
k.async = !0, k.src = g.src, document.head.appendChild(k);
|
|
1392
|
-
} else if (
|
|
1419
|
+
} else if (Wt(g) && !o.includes(g.innerText))
|
|
1393
1420
|
try {
|
|
1394
|
-
|
|
1421
|
+
o.push(g.innerText), new Function(g.innerText)();
|
|
1395
1422
|
} catch (k) {
|
|
1396
1423
|
console.warn("`Embed`: Error running script:", k);
|
|
1397
1424
|
}
|
|
1398
1425
|
}
|
|
1399
1426
|
}
|
|
1400
1427
|
return E(() => {
|
|
1401
|
-
t.current && !
|
|
1402
|
-
}, [t.current,
|
|
1428
|
+
t.current && !r && (c(!0), s());
|
|
1429
|
+
}, [t.current, r]), /* @__PURE__ */ l(
|
|
1403
1430
|
"div",
|
|
1404
1431
|
{
|
|
1405
1432
|
className: "builder-embed",
|
|
@@ -1408,13 +1435,13 @@ function Bt(e) {
|
|
|
1408
1435
|
}
|
|
1409
1436
|
);
|
|
1410
1437
|
}
|
|
1411
|
-
const
|
|
1438
|
+
const Nt = {
|
|
1412
1439
|
name: "Fragment",
|
|
1413
1440
|
static: !0,
|
|
1414
1441
|
hidden: !0,
|
|
1415
1442
|
canHaveChildren: !0,
|
|
1416
1443
|
noWrap: !0
|
|
1417
|
-
},
|
|
1444
|
+
}, Vt = {
|
|
1418
1445
|
name: "Image",
|
|
1419
1446
|
static: !0,
|
|
1420
1447
|
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",
|
|
@@ -1434,7 +1461,7 @@ const Wt = {
|
|
|
1434
1461
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1435
1462
|
onChange: (e) => {
|
|
1436
1463
|
e.delete("srcset"), e.delete("noWebp");
|
|
1437
|
-
function n(
|
|
1464
|
+
function n(r, c = 6e4) {
|
|
1438
1465
|
return new Promise((s, d) => {
|
|
1439
1466
|
const m = document.createElement("img");
|
|
1440
1467
|
let g = !1;
|
|
@@ -1442,21 +1469,21 @@ const Wt = {
|
|
|
1442
1469
|
g = !0, s(m);
|
|
1443
1470
|
}, m.addEventListener("error", (k) => {
|
|
1444
1471
|
console.warn("Image load failed", k.error), d(k.error);
|
|
1445
|
-
}), m.src =
|
|
1472
|
+
}), m.src = r, setTimeout(() => {
|
|
1446
1473
|
g || d(new Error("Image load timed out"));
|
|
1447
1474
|
}, c);
|
|
1448
1475
|
});
|
|
1449
1476
|
}
|
|
1450
|
-
function i(
|
|
1451
|
-
return Math.round(
|
|
1477
|
+
function i(r) {
|
|
1478
|
+
return Math.round(r * 1e3) / 1e3;
|
|
1452
1479
|
}
|
|
1453
|
-
const
|
|
1454
|
-
if (fetch(
|
|
1455
|
-
|
|
1456
|
-
}),
|
|
1457
|
-
return n(
|
|
1480
|
+
const o = e.get("image"), a = e.get("aspectRatio");
|
|
1481
|
+
if (fetch(o).then((r) => r.blob()).then((r) => {
|
|
1482
|
+
r.type.includes("svg") && e.set("noWebp", !0);
|
|
1483
|
+
}), o && (!a || a === 0.7041))
|
|
1484
|
+
return n(o).then((r) => {
|
|
1458
1485
|
const c = e.get("aspectRatio");
|
|
1459
|
-
e.get("image") ===
|
|
1486
|
+
e.get("image") === o && (!c || c === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
|
|
1460
1487
|
});
|
|
1461
1488
|
}
|
|
1462
1489
|
}, {
|
|
@@ -1514,7 +1541,7 @@ const Wt = {
|
|
|
1514
1541
|
advanced: !0,
|
|
1515
1542
|
defaultValue: 0.7041
|
|
1516
1543
|
}]
|
|
1517
|
-
},
|
|
1544
|
+
}, $t = {
|
|
1518
1545
|
// friendlyName?
|
|
1519
1546
|
name: "Raw:Img",
|
|
1520
1547
|
hideFromInsertMenu: !0,
|
|
@@ -1529,7 +1556,7 @@ const Wt = {
|
|
|
1529
1556
|
noWrap: !0,
|
|
1530
1557
|
static: !0
|
|
1531
1558
|
};
|
|
1532
|
-
function
|
|
1559
|
+
function Ft(e) {
|
|
1533
1560
|
return /* @__PURE__ */ l(
|
|
1534
1561
|
"img",
|
|
1535
1562
|
{
|
|
@@ -1541,10 +1568,10 @@ function $t(e) {
|
|
|
1541
1568
|
src: e.imgSrc || e.image,
|
|
1542
1569
|
...e.attributes
|
|
1543
1570
|
},
|
|
1544
|
-
|
|
1571
|
+
N() && e.imgSrc || "default-key"
|
|
1545
1572
|
);
|
|
1546
1573
|
}
|
|
1547
|
-
const
|
|
1574
|
+
const Lt = {
|
|
1548
1575
|
name: "Core:Section",
|
|
1549
1576
|
static: !0,
|
|
1550
1577
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1583,7 +1610,7 @@ const Nt = {
|
|
|
1583
1610
|
}
|
|
1584
1611
|
}
|
|
1585
1612
|
}]
|
|
1586
|
-
},
|
|
1613
|
+
}, _t = {
|
|
1587
1614
|
name: "Slot",
|
|
1588
1615
|
isRSC: !0,
|
|
1589
1616
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1597,7 +1624,7 @@ const Nt = {
|
|
|
1597
1624
|
defaultValue: "children"
|
|
1598
1625
|
}]
|
|
1599
1626
|
};
|
|
1600
|
-
function
|
|
1627
|
+
function Ot(e) {
|
|
1601
1628
|
var t, n, i;
|
|
1602
1629
|
return /* @__PURE__ */ l(
|
|
1603
1630
|
"div",
|
|
@@ -1609,7 +1636,7 @@ function Lt(e) {
|
|
|
1609
1636
|
"builder-slot": e.name
|
|
1610
1637
|
},
|
|
1611
1638
|
children: /* @__PURE__ */ l(
|
|
1612
|
-
|
|
1639
|
+
Y,
|
|
1613
1640
|
{
|
|
1614
1641
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
1615
1642
|
path: `symbol.data.${e.name}`,
|
|
@@ -1620,7 +1647,7 @@ function Lt(e) {
|
|
|
1620
1647
|
}
|
|
1621
1648
|
);
|
|
1622
1649
|
}
|
|
1623
|
-
const
|
|
1650
|
+
const jt = {
|
|
1624
1651
|
name: "Symbol",
|
|
1625
1652
|
noWrap: !0,
|
|
1626
1653
|
static: !0,
|
|
@@ -1653,7 +1680,7 @@ const _t = {
|
|
|
1653
1680
|
hideFromUI: !0,
|
|
1654
1681
|
type: "boolean"
|
|
1655
1682
|
}]
|
|
1656
|
-
},
|
|
1683
|
+
}, Dt = {
|
|
1657
1684
|
name: "Text",
|
|
1658
1685
|
static: !0,
|
|
1659
1686
|
isRSC: !0,
|
|
@@ -1767,8 +1794,8 @@ const Mt = {
|
|
|
1767
1794
|
advanced: !0
|
|
1768
1795
|
}]
|
|
1769
1796
|
};
|
|
1770
|
-
function
|
|
1771
|
-
var i, a, r,
|
|
1797
|
+
function Ht(e) {
|
|
1798
|
+
var i, o, a, r, c, s, d;
|
|
1772
1799
|
function t() {
|
|
1773
1800
|
return {
|
|
1774
1801
|
...e.autoPlay === !0 ? {
|
|
@@ -1825,7 +1852,7 @@ function Dt(e) {
|
|
|
1825
1852
|
children: e.lazyLoad ? null : /* @__PURE__ */ l("source", { type: "video/mp4", src: e.video })
|
|
1826
1853
|
}
|
|
1827
1854
|
),
|
|
1828
|
-
e.aspectRatio && !(e.fitContent && ((
|
|
1855
|
+
e.aspectRatio && !(e.fitContent && ((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length)) ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
1829
1856
|
"div",
|
|
1830
1857
|
{
|
|
1831
1858
|
style: {
|
|
@@ -1836,7 +1863,7 @@ function Dt(e) {
|
|
|
1836
1863
|
}
|
|
1837
1864
|
}
|
|
1838
1865
|
) }) : null,
|
|
1839
|
-
(c = (
|
|
1866
|
+
(c = (r = e.builderBlock) == null ? void 0 : r.children) != null && c.length && e.fitContent ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
1840
1867
|
"div",
|
|
1841
1868
|
{
|
|
1842
1869
|
style: {
|
|
@@ -1869,42 +1896,42 @@ function Dt(e) {
|
|
|
1869
1896
|
);
|
|
1870
1897
|
}
|
|
1871
1898
|
const ye = () => [{
|
|
1872
|
-
component:
|
|
1873
|
-
...Ct
|
|
1874
|
-
}, {
|
|
1875
|
-
component: yt,
|
|
1876
|
-
...wt
|
|
1877
|
-
}, {
|
|
1878
|
-
component: Tt,
|
|
1899
|
+
component: ze,
|
|
1879
1900
|
...It
|
|
1880
1901
|
}, {
|
|
1881
|
-
component:
|
|
1902
|
+
component: xt,
|
|
1903
|
+
...Tt
|
|
1904
|
+
}, {
|
|
1905
|
+
component: Et,
|
|
1882
1906
|
...Rt
|
|
1883
1907
|
}, {
|
|
1884
|
-
component:
|
|
1885
|
-
...
|
|
1908
|
+
component: At,
|
|
1909
|
+
...Pt
|
|
1886
1910
|
}, {
|
|
1887
|
-
component:
|
|
1888
|
-
...
|
|
1911
|
+
component: vt,
|
|
1912
|
+
...Nt
|
|
1889
1913
|
}, {
|
|
1890
|
-
component:
|
|
1914
|
+
component: Ct,
|
|
1891
1915
|
...Vt
|
|
1892
1916
|
}, {
|
|
1893
|
-
component:
|
|
1894
|
-
|
|
1917
|
+
component: Ft,
|
|
1918
|
+
...$t
|
|
1895
1919
|
}, {
|
|
1896
|
-
component:
|
|
1897
|
-
...
|
|
1920
|
+
component: wt,
|
|
1921
|
+
...Lt
|
|
1898
1922
|
}, {
|
|
1899
|
-
component:
|
|
1923
|
+
component: hn,
|
|
1900
1924
|
...jt
|
|
1901
1925
|
}, {
|
|
1902
|
-
component:
|
|
1926
|
+
component: Ut,
|
|
1927
|
+
...Dt
|
|
1928
|
+
}, {
|
|
1929
|
+
component: Ht,
|
|
1903
1930
|
...Mt
|
|
1904
1931
|
}, {
|
|
1905
|
-
component:
|
|
1906
|
-
...
|
|
1907
|
-
}],
|
|
1932
|
+
component: Ot,
|
|
1933
|
+
..._t
|
|
1934
|
+
}], Kt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1908
1935
|
function getAndSetVariantId() {
|
|
1909
1936
|
function setCookie(name, value, days) {
|
|
1910
1937
|
let expires = '';
|
|
@@ -1960,7 +1987,7 @@ const ye = () => [{
|
|
|
1960
1987
|
}).join('');
|
|
1961
1988
|
styleEl.innerHTML = newStyleStr;
|
|
1962
1989
|
}
|
|
1963
|
-
}`,
|
|
1990
|
+
}`, zt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1964
1991
|
if (!navigator.cookieEnabled) {
|
|
1965
1992
|
return;
|
|
1966
1993
|
}
|
|
@@ -1994,24 +2021,24 @@ const ye = () => [{
|
|
|
1994
2021
|
thisScriptEl?.remove();
|
|
1995
2022
|
}
|
|
1996
2023
|
return;
|
|
1997
|
-
}`,
|
|
2024
|
+
}`, We = "builderIoAbTest", Ae = "builderIoRenderContent", U = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1998
2025
|
...t,
|
|
1999
2026
|
testVariationId: t.id,
|
|
2000
2027
|
id: e == null ? void 0 : e.id
|
|
2001
|
-
})),
|
|
2028
|
+
})), qt = ({
|
|
2002
2029
|
canTrack: e,
|
|
2003
2030
|
content: t
|
|
2004
|
-
}) => !(!(
|
|
2005
|
-
window.${
|
|
2006
|
-
window.${
|
|
2007
|
-
`,
|
|
2008
|
-
window.${
|
|
2009
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
2010
|
-
)`,
|
|
2031
|
+
}) => !(!(U(t).length > 0) || !e || V()), Yt = (e) => e === "react" || e === "reactNative", Ne = Yt($), Qt = () => `
|
|
2032
|
+
window.${We} = ${Kt}
|
|
2033
|
+
window.${Ae} = ${zt}
|
|
2034
|
+
`, Gt = (e, t) => `
|
|
2035
|
+
window.${We}(
|
|
2036
|
+
"${t}",${JSON.stringify(e)}, ${Ne}
|
|
2037
|
+
)`, Jt = ({
|
|
2011
2038
|
contentId: e,
|
|
2012
2039
|
variationId: t
|
|
2013
|
-
}) => `window.${
|
|
2014
|
-
"${t}", "${e}", ${
|
|
2040
|
+
}) => `window.${Ae}(
|
|
2041
|
+
"${t}", "${e}", ${Ne}
|
|
2015
2042
|
)`;
|
|
2016
2043
|
function Z(e) {
|
|
2017
2044
|
return /* @__PURE__ */ l(
|
|
@@ -2022,15 +2049,15 @@ function Z(e) {
|
|
|
2022
2049
|
}
|
|
2023
2050
|
);
|
|
2024
2051
|
}
|
|
2025
|
-
const
|
|
2052
|
+
const Xt = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
2026
2053
|
function Ve(e, t) {
|
|
2027
2054
|
const n = new URL(t.origin), i = n.hostname;
|
|
2028
|
-
return (e ||
|
|
2055
|
+
return (e || Xt).findIndex((o) => o.startsWith("*.") ? i.endsWith(o.slice(1)) : o === i) > -1;
|
|
2029
2056
|
}
|
|
2030
|
-
function
|
|
2057
|
+
function Se(e) {
|
|
2031
2058
|
return Math.round(e * 1e3) / 1e3;
|
|
2032
2059
|
}
|
|
2033
|
-
const
|
|
2060
|
+
const Zt = (e, t, n = !0) => {
|
|
2034
2061
|
if (!(e instanceof HTMLElement))
|
|
2035
2062
|
return null;
|
|
2036
2063
|
let i = n ? e : e.parentElement;
|
|
@@ -2041,36 +2068,36 @@ const Jt = (e, t, n = !0) => {
|
|
|
2041
2068
|
return i;
|
|
2042
2069
|
} while (i = i.parentElement);
|
|
2043
2070
|
return null;
|
|
2044
|
-
},
|
|
2071
|
+
}, en = (e) => Zt(e, (t) => {
|
|
2045
2072
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2046
2073
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2047
|
-
}),
|
|
2074
|
+
}), xe = ({
|
|
2048
2075
|
event: e,
|
|
2049
2076
|
target: t
|
|
2050
2077
|
}) => {
|
|
2051
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left,
|
|
2078
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = Se(i / n.width), r = Se(o / n.height);
|
|
2052
2079
|
return {
|
|
2053
|
-
x:
|
|
2054
|
-
y:
|
|
2080
|
+
x: a,
|
|
2081
|
+
y: r
|
|
2055
2082
|
};
|
|
2056
|
-
},
|
|
2057
|
-
const t = e.target, n = t &&
|
|
2083
|
+
}, tn = (e) => {
|
|
2084
|
+
const t = e.target, n = t && en(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2058
2085
|
return {
|
|
2059
2086
|
targetBuilderElement: i || void 0,
|
|
2060
2087
|
metadata: {
|
|
2061
|
-
targetOffset: t ?
|
|
2088
|
+
targetOffset: t ? xe({
|
|
2062
2089
|
event: e,
|
|
2063
2090
|
target: t
|
|
2064
2091
|
}) : void 0,
|
|
2065
|
-
builderTargetOffset: n ?
|
|
2092
|
+
builderTargetOffset: n ? xe({
|
|
2066
2093
|
event: e,
|
|
2067
2094
|
target: n
|
|
2068
2095
|
}) : void 0,
|
|
2069
2096
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
2070
2097
|
}
|
|
2071
2098
|
};
|
|
2072
|
-
},
|
|
2073
|
-
|
|
2099
|
+
}, nn = "0.12.6", on = () => {
|
|
2100
|
+
Oe("insertMenu", {
|
|
2074
2101
|
name: "_default",
|
|
2075
2102
|
default: !0,
|
|
2076
2103
|
items: [{
|
|
@@ -2093,13 +2120,13 @@ const Jt = (e, t, n = !0) => {
|
|
|
2093
2120
|
});
|
|
2094
2121
|
};
|
|
2095
2122
|
let ve = !1;
|
|
2096
|
-
const
|
|
2123
|
+
const an = (e = {}) => {
|
|
2097
2124
|
var t, n;
|
|
2098
|
-
ve || (ve = !0,
|
|
2125
|
+
ve || (ve = !0, V() && ((t = window.parent) == null || t.postMessage({
|
|
2099
2126
|
type: "builder.sdkInfo",
|
|
2100
2127
|
data: {
|
|
2101
|
-
target:
|
|
2102
|
-
version:
|
|
2128
|
+
target: $,
|
|
2129
|
+
version: nn,
|
|
2103
2130
|
supportsPatchUpdates: !1,
|
|
2104
2131
|
// Supports builder-model="..." attribute which is needed to
|
|
2105
2132
|
// scope our '+ add block' button styling
|
|
@@ -2112,38 +2139,38 @@ const nn = (e = {}) => {
|
|
|
2112
2139
|
options: e
|
|
2113
2140
|
}
|
|
2114
2141
|
}, "*"), window.addEventListener("message", (i) => {
|
|
2115
|
-
var
|
|
2142
|
+
var a, r;
|
|
2116
2143
|
if (!Ve(e.trustedHosts, i))
|
|
2117
2144
|
return;
|
|
2118
2145
|
const {
|
|
2119
|
-
data:
|
|
2146
|
+
data: o
|
|
2120
2147
|
} = i;
|
|
2121
|
-
if (
|
|
2122
|
-
switch (
|
|
2148
|
+
if (o != null && o.type)
|
|
2149
|
+
switch (o.type) {
|
|
2123
2150
|
case "builder.evaluate": {
|
|
2124
|
-
const c =
|
|
2151
|
+
const c = o.data.text, s = o.data.arguments || [], d = o.data.id, m = new Function(c);
|
|
2125
2152
|
let g, k = null;
|
|
2126
2153
|
try {
|
|
2127
2154
|
g = m.apply(null, s);
|
|
2128
|
-
} catch (
|
|
2129
|
-
k =
|
|
2155
|
+
} catch (S) {
|
|
2156
|
+
k = S;
|
|
2130
2157
|
}
|
|
2131
|
-
k ? (
|
|
2158
|
+
k ? (a = window.parent) == null || a.postMessage({
|
|
2132
2159
|
type: "builder.evaluateError",
|
|
2133
2160
|
data: {
|
|
2134
2161
|
id: d,
|
|
2135
2162
|
error: k.message
|
|
2136
2163
|
}
|
|
2137
|
-
}, "*") : g && typeof g.then == "function" ? g.then((
|
|
2138
|
-
var
|
|
2139
|
-
(
|
|
2164
|
+
}, "*") : g && typeof g.then == "function" ? g.then((S) => {
|
|
2165
|
+
var x;
|
|
2166
|
+
(x = window.parent) == null || x.postMessage({
|
|
2140
2167
|
type: "builder.evaluateResult",
|
|
2141
2168
|
data: {
|
|
2142
2169
|
id: d,
|
|
2143
|
-
result:
|
|
2170
|
+
result: S
|
|
2144
2171
|
}
|
|
2145
2172
|
}, "*");
|
|
2146
|
-
}).catch(console.error) : (
|
|
2173
|
+
}).catch(console.error) : (r = window.parent) == null || r.postMessage({
|
|
2147
2174
|
type: "builder.evaluateResult",
|
|
2148
2175
|
data: {
|
|
2149
2176
|
result: g,
|
|
@@ -2155,11 +2182,11 @@ const nn = (e = {}) => {
|
|
|
2155
2182
|
}
|
|
2156
2183
|
})));
|
|
2157
2184
|
};
|
|
2158
|
-
function
|
|
2159
|
-
var L,
|
|
2185
|
+
function rn(e) {
|
|
2186
|
+
var L, Q, G, ae, re, le, ce;
|
|
2160
2187
|
const t = ee(null), [n, i] = v(() => 0);
|
|
2161
2188
|
v(() => !0);
|
|
2162
|
-
function
|
|
2189
|
+
function o(u) {
|
|
2163
2190
|
var b, y;
|
|
2164
2191
|
const f = {
|
|
2165
2192
|
...e.builderContextSignal.rootState,
|
|
@@ -2170,8 +2197,8 @@ function an(e) {
|
|
|
2170
2197
|
rootState: f
|
|
2171
2198
|
}));
|
|
2172
2199
|
}
|
|
2173
|
-
function
|
|
2174
|
-
var b, y, p, T,
|
|
2200
|
+
function a(u) {
|
|
2201
|
+
var b, y, p, T, D;
|
|
2175
2202
|
const f = {
|
|
2176
2203
|
...e.builderContextSignal.content,
|
|
2177
2204
|
...u,
|
|
@@ -2182,16 +2209,16 @@ function an(e) {
|
|
|
2182
2209
|
meta: {
|
|
2183
2210
|
...(y = e.builderContextSignal.content) == null ? void 0 : y.meta,
|
|
2184
2211
|
...u == null ? void 0 : u.meta,
|
|
2185
|
-
breakpoints: ((p = u == null ? void 0 : u.meta) == null ? void 0 : p.breakpoints) || ((
|
|
2212
|
+
breakpoints: ((p = u == null ? void 0 : u.meta) == null ? void 0 : p.breakpoints) || ((D = (T = e.builderContextSignal.content) == null ? void 0 : T.meta) == null ? void 0 : D.breakpoints)
|
|
2186
2213
|
}
|
|
2187
2214
|
};
|
|
2188
|
-
e.setBuilderContextSignal((
|
|
2189
|
-
...
|
|
2215
|
+
e.setBuilderContextSignal((Fe) => ({
|
|
2216
|
+
...Fe,
|
|
2190
2217
|
content: f
|
|
2191
2218
|
}));
|
|
2192
2219
|
}
|
|
2193
2220
|
v(() => 0);
|
|
2194
|
-
const [
|
|
2221
|
+
const [r, c] = v(
|
|
2195
2222
|
() => !1
|
|
2196
2223
|
), [s, d] = v(
|
|
2197
2224
|
() => e.contentWrapper || "div"
|
|
@@ -2207,7 +2234,7 @@ function an(e) {
|
|
|
2207
2234
|
const y = f.data, { breakpoints: p, contentId: T } = y;
|
|
2208
2235
|
if (!T || T !== ((b = e.builderContextSignal.content) == null ? void 0 : b.id))
|
|
2209
2236
|
return;
|
|
2210
|
-
p &&
|
|
2237
|
+
p && a({
|
|
2211
2238
|
meta: {
|
|
2212
2239
|
breakpoints: p
|
|
2213
2240
|
}
|
|
@@ -2216,7 +2243,7 @@ function an(e) {
|
|
|
2216
2243
|
}
|
|
2217
2244
|
case "builder.contentUpdate": {
|
|
2218
2245
|
const y = f.data, p = y.key || y.alias || y.entry || y.modelName, T = y.data;
|
|
2219
|
-
p === e.model && (
|
|
2246
|
+
p === e.model && (a(T), i(n + 1));
|
|
2220
2247
|
break;
|
|
2221
2248
|
}
|
|
2222
2249
|
}
|
|
@@ -2232,7 +2259,7 @@ function an(e) {
|
|
|
2232
2259
|
rootSetState: e.builderContextSignal.rootSetState
|
|
2233
2260
|
});
|
|
2234
2261
|
}
|
|
2235
|
-
const [k,
|
|
2262
|
+
const [k, S] = v(() => ({})), [x, C] = v(() => !1);
|
|
2236
2263
|
function R(u) {
|
|
2237
2264
|
var f, b;
|
|
2238
2265
|
if (e.builderContextSignal.content) {
|
|
@@ -2243,11 +2270,11 @@ function an(e) {
|
|
|
2243
2270
|
contentId: p,
|
|
2244
2271
|
apiKey: e.apiKey,
|
|
2245
2272
|
variationId: y !== p ? y : void 0,
|
|
2246
|
-
...
|
|
2247
|
-
unique: !
|
|
2273
|
+
...tn(u),
|
|
2274
|
+
unique: !x
|
|
2248
2275
|
});
|
|
2249
2276
|
}
|
|
2250
|
-
|
|
2277
|
+
x || C(!0);
|
|
2251
2278
|
}
|
|
2252
2279
|
function B(u) {
|
|
2253
2280
|
return u.replace(
|
|
@@ -2262,7 +2289,7 @@ function an(e) {
|
|
|
2262
2289
|
);
|
|
2263
2290
|
}
|
|
2264
2291
|
function w({ url: u, key: f }) {
|
|
2265
|
-
|
|
2292
|
+
Ue(u).then((b) => b.json()).then((b) => {
|
|
2266
2293
|
var p, T;
|
|
2267
2294
|
const y = {
|
|
2268
2295
|
...e.builderContextSignal.rootState,
|
|
@@ -2277,17 +2304,17 @@ function an(e) {
|
|
|
2277
2304
|
var f, b, y;
|
|
2278
2305
|
const u = (y = (b = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : b.httpRequests) != null ? y : {};
|
|
2279
2306
|
Object.entries(u).forEach(([p, T]) => {
|
|
2280
|
-
if (T && (!k[p] ||
|
|
2281
|
-
const
|
|
2307
|
+
if (T && (!k[p] || N())) {
|
|
2308
|
+
const D = B(T);
|
|
2282
2309
|
w({
|
|
2283
|
-
url:
|
|
2310
|
+
url: D,
|
|
2284
2311
|
key: p
|
|
2285
2312
|
});
|
|
2286
2313
|
}
|
|
2287
2314
|
});
|
|
2288
2315
|
}
|
|
2289
2316
|
function P() {
|
|
2290
|
-
|
|
2317
|
+
N() && window.dispatchEvent(
|
|
2291
2318
|
new CustomEvent(
|
|
2292
2319
|
"builder:component:stateChange",
|
|
2293
2320
|
{
|
|
@@ -2302,7 +2329,7 @@ function an(e) {
|
|
|
2302
2329
|
);
|
|
2303
2330
|
}
|
|
2304
2331
|
function W(u) {
|
|
2305
|
-
i(n + 1), window.addEventListener("message", m),
|
|
2332
|
+
i(n + 1), window.addEventListener("message", m), on(), an({
|
|
2306
2333
|
...e.locale ? {
|
|
2307
2334
|
locale: e.locale
|
|
2308
2335
|
} : {},
|
|
@@ -2319,7 +2346,7 @@ function an(e) {
|
|
|
2319
2346
|
e.builderContextSignal.componentInfos
|
|
2320
2347
|
).forEach((f) => {
|
|
2321
2348
|
var y;
|
|
2322
|
-
const b =
|
|
2349
|
+
const b = De(f);
|
|
2323
2350
|
(y = window.parent) == null || y.postMessage(b, "*");
|
|
2324
2351
|
}), window.addEventListener(
|
|
2325
2352
|
"builder:component:stateChangeListenerActivated",
|
|
@@ -2335,7 +2362,7 @@ function an(e) {
|
|
|
2335
2362
|
apiKey: e.apiKey,
|
|
2336
2363
|
apiVersion: e.builderContextSignal.apiVersion
|
|
2337
2364
|
}).then((T) => {
|
|
2338
|
-
T &&
|
|
2365
|
+
T && a(T);
|
|
2339
2366
|
});
|
|
2340
2367
|
}
|
|
2341
2368
|
return E(() => {
|
|
@@ -2364,8 +2391,8 @@ function an(e) {
|
|
|
2364
2391
|
};
|
|
2365
2392
|
}, []), E(() => {
|
|
2366
2393
|
var u, f;
|
|
2367
|
-
if (
|
|
2368
|
-
if (
|
|
2394
|
+
if (V()) {
|
|
2395
|
+
if (N() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && H(e.canTrack)) {
|
|
2369
2396
|
const y = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, p = (f = e.builderContextSignal.content) == null ? void 0 : f.id, T = e.apiKey;
|
|
2370
2397
|
de({
|
|
2371
2398
|
type: "impression",
|
|
@@ -2378,33 +2405,30 @@ function an(e) {
|
|
|
2378
2405
|
je() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
|
|
2379
2406
|
}
|
|
2380
2407
|
}, []), E(() => {
|
|
2381
|
-
e.apiKey ||
|
|
2408
|
+
e.apiKey || _.error(
|
|
2382
2409
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2383
2410
|
), g(), I(), P();
|
|
2384
2411
|
}, []), E(() => {
|
|
2385
|
-
e.content &&
|
|
2412
|
+
e.content && a(e.content);
|
|
2386
2413
|
}, [e.content]), E(() => {
|
|
2387
|
-
}, [
|
|
2414
|
+
}, [r]), E(() => {
|
|
2388
2415
|
g();
|
|
2389
|
-
}, [
|
|
2390
|
-
(Y = (L = e.builderContextSignal.content) == null ? void 0 : L.data) == null ? void 0 : Y.jsCode,
|
|
2391
|
-
e.builderContextSignal.rootState
|
|
2392
|
-
]), E(() => {
|
|
2416
|
+
}, [(Q = (L = e.builderContextSignal.content) == null ? void 0 : L.data) == null ? void 0 : Q.jsCode]), E(() => {
|
|
2393
2417
|
I();
|
|
2394
|
-
}, [(
|
|
2418
|
+
}, [(ae = (G = e.builderContextSignal.content) == null ? void 0 : G.data) == null ? void 0 : ae.httpRequests]), E(() => {
|
|
2395
2419
|
P();
|
|
2396
2420
|
}, [e.builderContextSignal.rootState]), E(() => {
|
|
2397
|
-
e.data &&
|
|
2421
|
+
e.data && o(e.data);
|
|
2398
2422
|
}, [e.data]), E(() => {
|
|
2399
|
-
e.locale &&
|
|
2423
|
+
e.locale && o({
|
|
2400
2424
|
locale: e.locale
|
|
2401
2425
|
});
|
|
2402
2426
|
}, [e.locale]), E(() => () => {
|
|
2403
|
-
|
|
2427
|
+
V() && (window.removeEventListener("message", m), window.removeEventListener(
|
|
2404
2428
|
"builder:component:stateChangeListenerActivated",
|
|
2405
2429
|
P
|
|
2406
2430
|
));
|
|
2407
|
-
}, []), /* @__PURE__ */ l(ie.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */
|
|
2431
|
+
}, []), /* @__PURE__ */ l(ie.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ Le(
|
|
2408
2432
|
s,
|
|
2409
2433
|
{
|
|
2410
2434
|
key: n,
|
|
@@ -2422,11 +2446,11 @@ function an(e) {
|
|
|
2422
2446
|
e.children
|
|
2423
2447
|
) }) : null });
|
|
2424
2448
|
}
|
|
2425
|
-
const
|
|
2426
|
-
var
|
|
2427
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (
|
|
2428
|
-
let
|
|
2429
|
-
if (i && t && n && (
|
|
2449
|
+
const ln = (e) => {
|
|
2450
|
+
var a, r;
|
|
2451
|
+
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;
|
|
2452
|
+
let o = "";
|
|
2453
|
+
if (i && t && n && (o += `
|
|
2430
2454
|
@font-face {
|
|
2431
2455
|
font-family: "${t}";
|
|
2432
2456
|
src: local("${n}"), url('${i}') format('woff2');
|
|
@@ -2438,7 +2462,7 @@ font-weight: 400;
|
|
|
2438
2462
|
if (!(String(Number(c)) === c))
|
|
2439
2463
|
continue;
|
|
2440
2464
|
const d = e.files[c];
|
|
2441
|
-
d && d !== i && (
|
|
2465
|
+
d && d !== i && (o += `
|
|
2442
2466
|
@font-face {
|
|
2443
2467
|
font-family: "${t}";
|
|
2444
2468
|
src: url('${d}') format('woff2');
|
|
@@ -2447,24 +2471,24 @@ font-weight: ${c};
|
|
|
2447
2471
|
}
|
|
2448
2472
|
`.trim());
|
|
2449
2473
|
}
|
|
2450
|
-
return
|
|
2451
|
-
},
|
|
2474
|
+
return o;
|
|
2475
|
+
}, cn = ({
|
|
2452
2476
|
customFonts: e
|
|
2453
2477
|
}) => {
|
|
2454
2478
|
var t;
|
|
2455
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2456
|
-
},
|
|
2479
|
+
return ((t = e == null ? void 0 : e.map((n) => ln(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2480
|
+
}, sn = ({
|
|
2457
2481
|
cssCode: e,
|
|
2458
2482
|
contentId: t
|
|
2459
2483
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
2460
|
-
function
|
|
2484
|
+
function dn(e) {
|
|
2461
2485
|
const [t, n] = v(
|
|
2462
2486
|
() => `
|
|
2463
|
-
${
|
|
2487
|
+
${sn({
|
|
2464
2488
|
cssCode: e.cssCode,
|
|
2465
2489
|
contentId: e.contentId
|
|
2466
2490
|
})}
|
|
2467
|
-
${
|
|
2491
|
+
${cn({
|
|
2468
2492
|
customFonts: e.customFonts
|
|
2469
2493
|
})}
|
|
2470
2494
|
|
|
@@ -2486,26 +2510,26 @@ ${rn({
|
|
|
2486
2510
|
}
|
|
2487
2511
|
`.trim()
|
|
2488
2512
|
);
|
|
2489
|
-
return /* @__PURE__ */ l(
|
|
2513
|
+
return /* @__PURE__ */ l(z, { styles: t });
|
|
2490
2514
|
}
|
|
2491
|
-
const
|
|
2515
|
+
const un = ({
|
|
2492
2516
|
content: e,
|
|
2493
2517
|
data: t,
|
|
2494
2518
|
locale: n
|
|
2495
2519
|
}) => {
|
|
2496
|
-
var
|
|
2497
|
-
const i = {},
|
|
2498
|
-
return (c = (
|
|
2520
|
+
var a, r, c;
|
|
2521
|
+
const i = {}, o = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
|
|
2522
|
+
return (c = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || c.forEach((s) => {
|
|
2499
2523
|
s.name && s.defaultValue !== void 0 && (i[s.name] = s.defaultValue);
|
|
2500
2524
|
}), {
|
|
2501
2525
|
...i,
|
|
2502
|
-
...
|
|
2526
|
+
...o,
|
|
2503
2527
|
...t,
|
|
2504
2528
|
...n ? {
|
|
2505
2529
|
locale: n
|
|
2506
2530
|
} : {}
|
|
2507
2531
|
};
|
|
2508
|
-
},
|
|
2532
|
+
}, mn = ({
|
|
2509
2533
|
content: e,
|
|
2510
2534
|
data: t
|
|
2511
2535
|
}) => e ? {
|
|
@@ -2517,11 +2541,11 @@ const sn = ({
|
|
|
2517
2541
|
meta: e == null ? void 0 : e.meta
|
|
2518
2542
|
} : void 0;
|
|
2519
2543
|
function ke(e) {
|
|
2520
|
-
var s, d, m, g, k,
|
|
2544
|
+
var s, d, m, g, k, S, x;
|
|
2521
2545
|
const [t, n] = v(
|
|
2522
2546
|
() => {
|
|
2523
2547
|
var C, R;
|
|
2524
|
-
return
|
|
2548
|
+
return Jt({
|
|
2525
2549
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2526
2550
|
variationId: (C = e.content) == null ? void 0 : C.testVariationId,
|
|
2527
2551
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
@@ -2535,7 +2559,7 @@ function ke(e) {
|
|
|
2535
2559
|
rootState: C
|
|
2536
2560
|
}));
|
|
2537
2561
|
}
|
|
2538
|
-
const [
|
|
2562
|
+
const [o, a] = v(
|
|
2539
2563
|
() => [
|
|
2540
2564
|
...ye(),
|
|
2541
2565
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
@@ -2555,13 +2579,13 @@ function ke(e) {
|
|
|
2555
2579
|
}),
|
|
2556
2580
|
{}
|
|
2557
2581
|
)
|
|
2558
|
-
), [
|
|
2559
|
-
content:
|
|
2582
|
+
), [r, c] = v(() => ({
|
|
2583
|
+
content: mn({
|
|
2560
2584
|
content: e.content,
|
|
2561
2585
|
data: e.data
|
|
2562
2586
|
}),
|
|
2563
2587
|
localState: void 0,
|
|
2564
|
-
rootState:
|
|
2588
|
+
rootState: un({
|
|
2565
2589
|
content: e.content,
|
|
2566
2590
|
data: e.data,
|
|
2567
2591
|
locale: e.locale
|
|
@@ -2594,10 +2618,10 @@ function ke(e) {
|
|
|
2594
2618
|
we.Provider,
|
|
2595
2619
|
{
|
|
2596
2620
|
value: {
|
|
2597
|
-
registeredComponents:
|
|
2621
|
+
registeredComponents: o
|
|
2598
2622
|
},
|
|
2599
2623
|
children: /* @__PURE__ */ A(
|
|
2600
|
-
|
|
2624
|
+
rn,
|
|
2601
2625
|
{
|
|
2602
2626
|
content: e.content,
|
|
2603
2627
|
data: e.data,
|
|
@@ -2609,7 +2633,7 @@ function ke(e) {
|
|
|
2609
2633
|
includeRefs: e.includeRefs,
|
|
2610
2634
|
enrich: e.enrich,
|
|
2611
2635
|
showContent: e.showContent,
|
|
2612
|
-
builderContextSignal:
|
|
2636
|
+
builderContextSignal: r,
|
|
2613
2637
|
contentWrapper: e.contentWrapper,
|
|
2614
2638
|
contentWrapperProps: e.contentWrapperProps,
|
|
2615
2639
|
linkComponent: e.linkComponent,
|
|
@@ -2618,19 +2642,19 @@ function ke(e) {
|
|
|
2618
2642
|
children: [
|
|
2619
2643
|
e.isSsrAbTest ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(Z, { scriptStr: t }) }) : null,
|
|
2620
2644
|
/* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
2621
|
-
|
|
2645
|
+
dn,
|
|
2622
2646
|
{
|
|
2623
|
-
contentId: (s =
|
|
2624
|
-
cssCode: (m = (d =
|
|
2625
|
-
customFonts: (k = (g =
|
|
2647
|
+
contentId: (s = r.content) == null ? void 0 : s.id,
|
|
2648
|
+
cssCode: (m = (d = r.content) == null ? void 0 : d.data) == null ? void 0 : m.cssCode,
|
|
2649
|
+
customFonts: (k = (g = r.content) == null ? void 0 : g.data) == null ? void 0 : k.customFonts
|
|
2626
2650
|
}
|
|
2627
2651
|
) }),
|
|
2628
2652
|
/* @__PURE__ */ l(
|
|
2629
|
-
|
|
2653
|
+
Y,
|
|
2630
2654
|
{
|
|
2631
|
-
blocks: (
|
|
2632
|
-
context:
|
|
2633
|
-
registeredComponents:
|
|
2655
|
+
blocks: (x = (S = r.content) == null ? void 0 : S.data) == null ? void 0 : x.blocks,
|
|
2656
|
+
context: r,
|
|
2657
|
+
registeredComponents: o,
|
|
2634
2658
|
linkComponent: e.linkComponent
|
|
2635
2659
|
}
|
|
2636
2660
|
)
|
|
@@ -2641,49 +2665,49 @@ function ke(e) {
|
|
|
2641
2665
|
);
|
|
2642
2666
|
}
|
|
2643
2667
|
function $e(e) {
|
|
2644
|
-
var
|
|
2668
|
+
var r, c;
|
|
2645
2669
|
const [t, n] = v(
|
|
2646
|
-
() =>
|
|
2670
|
+
() => qt({
|
|
2647
2671
|
canTrack: H(e.canTrack),
|
|
2648
2672
|
content: e.content
|
|
2649
2673
|
})
|
|
2650
2674
|
);
|
|
2651
2675
|
function i() {
|
|
2652
2676
|
var s;
|
|
2653
|
-
return
|
|
2654
|
-
|
|
2677
|
+
return Gt(
|
|
2678
|
+
U(e.content).map((d) => ({
|
|
2655
2679
|
id: d.testVariationId,
|
|
2656
2680
|
testRatio: d.testRatio
|
|
2657
2681
|
})),
|
|
2658
2682
|
((s = e.content) == null ? void 0 : s.id) || ""
|
|
2659
2683
|
);
|
|
2660
2684
|
}
|
|
2661
|
-
function
|
|
2662
|
-
return
|
|
2685
|
+
function o() {
|
|
2686
|
+
return U(e.content).map((s) => `.variant-${s.testVariationId} { display: none; } `).join("");
|
|
2663
2687
|
}
|
|
2664
|
-
function
|
|
2688
|
+
function a() {
|
|
2665
2689
|
var s;
|
|
2666
2690
|
return t ? {
|
|
2667
2691
|
...e.content,
|
|
2668
2692
|
testVariationId: (s = e.content) == null ? void 0 : s.id
|
|
2669
|
-
} :
|
|
2693
|
+
} : Me({
|
|
2670
2694
|
item: e.content,
|
|
2671
2695
|
canTrack: H(e.canTrack)
|
|
2672
2696
|
});
|
|
2673
2697
|
}
|
|
2674
2698
|
return E(() => {
|
|
2675
2699
|
}, []), /* @__PURE__ */ A(h, { children: [
|
|
2676
|
-
!e.__isNestedRender &&
|
|
2700
|
+
!e.__isNestedRender && $ !== "reactNative" ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(Z, { scriptStr: Qt() }) }) : null,
|
|
2677
2701
|
t ? /* @__PURE__ */ A(h, { children: [
|
|
2678
2702
|
/* @__PURE__ */ l(
|
|
2679
|
-
|
|
2703
|
+
z,
|
|
2680
2704
|
{
|
|
2681
|
-
id: `variants-styles-${(
|
|
2682
|
-
styles:
|
|
2705
|
+
id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
|
|
2706
|
+
styles: o()
|
|
2683
2707
|
}
|
|
2684
2708
|
),
|
|
2685
2709
|
/* @__PURE__ */ l(Z, { scriptStr: i() }),
|
|
2686
|
-
(c =
|
|
2710
|
+
(c = U(e.content)) == null ? void 0 : c.map((s) => /* @__PURE__ */ l(
|
|
2687
2711
|
ke,
|
|
2688
2712
|
{
|
|
2689
2713
|
content: s,
|
|
@@ -2712,7 +2736,7 @@ function $e(e) {
|
|
|
2712
2736
|
/* @__PURE__ */ l(
|
|
2713
2737
|
ke,
|
|
2714
2738
|
{
|
|
2715
|
-
content:
|
|
2739
|
+
content: a(),
|
|
2716
2740
|
showContent: !0,
|
|
2717
2741
|
model: e.model,
|
|
2718
2742
|
data: e.data,
|
|
@@ -2735,7 +2759,7 @@ function $e(e) {
|
|
|
2735
2759
|
)
|
|
2736
2760
|
] });
|
|
2737
2761
|
}
|
|
2738
|
-
const
|
|
2762
|
+
const fn = async ({
|
|
2739
2763
|
builderContextValue: e,
|
|
2740
2764
|
symbol: t
|
|
2741
2765
|
}) => {
|
|
@@ -2751,15 +2775,15 @@ const un = async ({
|
|
|
2751
2775
|
}
|
|
2752
2776
|
}
|
|
2753
2777
|
}).catch((n) => {
|
|
2754
|
-
|
|
2778
|
+
_.error("Could not fetch symbol content: ", n);
|
|
2755
2779
|
});
|
|
2756
2780
|
};
|
|
2757
|
-
function
|
|
2758
|
-
var
|
|
2781
|
+
function hn(e) {
|
|
2782
|
+
var a, r, c, s;
|
|
2759
2783
|
function t() {
|
|
2760
2784
|
var d, m;
|
|
2761
2785
|
return [
|
|
2762
|
-
e.attributes[
|
|
2786
|
+
e.attributes[O()],
|
|
2763
2787
|
"builder-symbol",
|
|
2764
2788
|
(d = e.symbol) != null && d.inline ? "builder-inline-symbol" : void 0,
|
|
2765
2789
|
(m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -2769,8 +2793,8 @@ function mn(e) {
|
|
|
2769
2793
|
var d;
|
|
2770
2794
|
return (d = e.symbol) == null ? void 0 : d.content;
|
|
2771
2795
|
});
|
|
2772
|
-
function
|
|
2773
|
-
n ||
|
|
2796
|
+
function o() {
|
|
2797
|
+
n || fn({
|
|
2774
2798
|
symbol: e.symbol,
|
|
2775
2799
|
builderContextValue: e.builderContext
|
|
2776
2800
|
}).then((d) => {
|
|
@@ -2779,7 +2803,7 @@ function mn(e) {
|
|
|
2779
2803
|
}
|
|
2780
2804
|
return E(() => {
|
|
2781
2805
|
}, []), E(() => {
|
|
2782
|
-
|
|
2806
|
+
o();
|
|
2783
2807
|
}, [e.symbol]), /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2784
2808
|
$e,
|
|
2785
2809
|
{
|
|
@@ -2788,11 +2812,11 @@ function mn(e) {
|
|
|
2788
2812
|
apiKey: e.builderContext.apiKey,
|
|
2789
2813
|
context: {
|
|
2790
2814
|
...e.builderContext.context,
|
|
2791
|
-
symbolId: (
|
|
2815
|
+
symbolId: (a = e.builderBlock) == null ? void 0 : a.id
|
|
2792
2816
|
},
|
|
2793
2817
|
customComponents: Object.values(e.builderComponents),
|
|
2794
2818
|
data: {
|
|
2795
|
-
...(
|
|
2819
|
+
...(r = e.symbol) == null ? void 0 : r.data,
|
|
2796
2820
|
...e.builderContext.localState,
|
|
2797
2821
|
...(c = n == null ? void 0 : n.data) == null ? void 0 : c.state
|
|
2798
2822
|
},
|
|
@@ -2802,31 +2826,31 @@ function mn(e) {
|
|
|
2802
2826
|
}
|
|
2803
2827
|
) });
|
|
2804
2828
|
}
|
|
2805
|
-
const
|
|
2829
|
+
const Sn = Y, xn = $e;
|
|
2806
2830
|
export {
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2831
|
+
Y as Blocks,
|
|
2832
|
+
ze as Button,
|
|
2833
|
+
xt as Columns,
|
|
2810
2834
|
$e as Content,
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2835
|
+
vt as Fragment,
|
|
2836
|
+
Ct as Image,
|
|
2837
|
+
Sn as RenderBlocks,
|
|
2838
|
+
xn as RenderContent,
|
|
2839
|
+
wt as Section,
|
|
2840
|
+
hn as Symbol,
|
|
2817
2841
|
Ut as Text,
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2842
|
+
Ht as Video,
|
|
2843
|
+
pn as _processContentResult,
|
|
2844
|
+
De as createRegisterComponentMessage,
|
|
2845
|
+
Cn as fetchBuilderProps,
|
|
2846
|
+
wn as fetchEntries,
|
|
2823
2847
|
Ce as fetchOneEntry,
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2848
|
+
In as getAllContent,
|
|
2849
|
+
Tn as getBuilderSearchParams,
|
|
2850
|
+
Rn as getContent,
|
|
2851
|
+
N as isEditing,
|
|
2828
2852
|
je as isPreviewing,
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2853
|
+
Oe as register,
|
|
2854
|
+
En as setEditorSettings,
|
|
2855
|
+
Pn as track
|
|
2832
2856
|
};
|