@builder.io/sdk-react 3.0.3-0 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +32 -169
- package/lib/browser/blocks-exports.mjs +778 -1199
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +16 -17
- package/lib/browser/server-entry-101d66b8.cjs +2 -0
- package/lib/browser/{server-entry-da1754bd.js → server-entry-785c0408.js} +237 -279
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-388f5e60.cjs → accordion-190c4426.cjs} +1 -1
- package/lib/edge/{accordion-50de133c.js → accordion-cd6e0363.js} +1 -1
- package/lib/edge/{blocks-a5193d52.cjs → blocks-766e8d45.cjs} +9 -9
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +12 -13
- package/lib/edge/{blocks-5e476ddc.js → blocks-fe2d7c1a.js} +2 -3
- package/lib/edge/{button-c6ec3aea.cjs → button-694fcd4f.cjs} +1 -1
- package/lib/edge/{button-4261ae64.js → button-6a27481c.js} +2 -2
- package/lib/edge/{columns-28e9fb0a.js → columns-90e6407e.js} +18 -18
- package/lib/edge/{columns-8c831c02.cjs → columns-b38bf0f7.cjs} +2 -2
- package/lib/edge/content-variants-4e385c19.cjs +134 -0
- package/lib/edge/{content-variants-36ca4fe5.js → content-variants-cbb89349.js} +124 -165
- package/lib/edge/dynamic-blocks-exports.cjs +1 -3
- package/lib/edge/dynamic-blocks-exports.mjs +2 -5
- package/lib/edge/form-16bbf874.js +166 -0
- package/lib/edge/form-547645eb.cjs +1 -0
- package/lib/edge/{get-class-prop-name-a86a3e60.cjs → get-class-prop-name-58770197.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-65d6824c.js → get-class-prop-name-8b719c6b.js} +1 -1
- package/lib/edge/{image-2a2b26d2.js → image-38917f45.js} +22 -24
- package/lib/edge/image-590e36ae.cjs +17 -0
- package/lib/edge/{img-7de3a3de.cjs → img-8859c851.cjs} +1 -1
- package/lib/edge/{img-61d29fb3.js → img-d3351743.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +17 -18
- package/lib/edge/{input-c8539054.js → input-24c601b4.js} +1 -1
- package/lib/edge/{input-bd5387a6.cjs → input-4fe0fc6d.cjs} +1 -1
- package/lib/edge/{select-6b5cda00.js → select-af05377b.js} +1 -1
- package/lib/edge/{select-73accaf4.cjs → select-c73bd418.cjs} +1 -1
- package/lib/edge/server-entry-3c7fa63a.cjs +2 -0
- package/lib/edge/{server-entry-838c1f06.js → server-entry-67bfc740.js} +280 -322
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-403c77da.js → slot-32a4df0c.js} +3 -3
- package/lib/edge/{slot-099112f1.cjs → slot-759c8dd9.cjs} +1 -1
- package/lib/edge/{symbol-97f456f4.js → symbol-50360a37.js} +2 -2
- package/lib/edge/{symbol-ffa6e6cd.cjs → symbol-8d63aa7d.cjs} +1 -1
- package/lib/edge/{tabs-a7c94ead.js → tabs-6535c934.js} +3 -3
- package/lib/edge/{tabs-ad55c6a7.cjs → tabs-fc6c1700.cjs} +1 -1
- package/lib/edge/video-4ecfd08b.cjs +1 -0
- package/lib/edge/{video-58c2cc8d.js → video-a3f10439.js} +0 -1
- package/lib/node/blocks-exports.cjs +32 -169
- package/lib/node/blocks-exports.mjs +896 -1317
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +16 -17
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/server-entry-95273908.cjs +2 -0
- package/lib/node/{server-entry-51bc0b1d.js → server-entry-ffc70868.js} +237 -279
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-575cf1f1.js → setIvm-2cea7252.js} +1 -1
- package/lib/node/{setIvm-d912cf4d.cjs → setIvm-4ce0db03.cjs} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-66df4856.js → should-force-browser-runtime-in-node-c0d50009.js} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-23225980.cjs → should-force-browser-runtime-in-node-d3e6df07.cjs} +1 -1
- package/package.json +2 -2
- package/types/blocks/form/form/form.d.ts +1 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/index-helpers/blocks-exports.d.ts +0 -1
- package/types/types/components.d.ts +2 -2
- package/types/types/input.d.ts +0 -1
- package/lib/browser/server-entry-c7bda8b5.cjs +0 -2
- package/lib/edge/content-variants-81713434.cjs +0 -134
- package/lib/edge/form-039fb5ff.js +0 -176
- package/lib/edge/form-e7a1dec9.cjs +0 -1
- package/lib/edge/image-4db81d72.cjs +0 -17
- package/lib/edge/personalization-container-3fda6014.cjs +0 -138
- package/lib/edge/personalization-container-c76e4fef.js +0 -379
- package/lib/edge/server-entry-ea2a8b0e.cjs +0 -2
- package/lib/edge/video-e20dcbbc.cjs +0 -1
- package/lib/node/server-entry-d7316893.cjs +0 -2
- package/types/blocks/index.d.ts +0 -4
- package/types/blocks/personalization-container/component-info.d.ts +0 -2
- package/types/blocks/personalization-container/helpers/index.d.ts +0 -15
- package/types/blocks/personalization-container/helpers/inlined-fns.d.ts +0 -8
- package/types/blocks/personalization-container/helpers.d.ts +0 -27
- package/types/blocks/personalization-container/index.d.ts +0 -1
- package/types/blocks/personalization-container/personalization-container.d.ts +0 -4
- package/types/blocks/personalization-container/personalization-container.types.d.ts +0 -14
- package/types/blocks/textarea/component-info.d.ts +0 -2
- package/types/blocks/textarea/index.d.ts +0 -1
- package/types/blocks/textarea/textarea.d.ts +0 -14
- package/types/functions/filter-with-custom-targeting.d.ts +0 -15
- package/types/helpers/user-attributes.d.ts +0 -17
|
@@ -7,27 +7,27 @@ const v = "react", I = "[Builder.io]: ", f = {
|
|
|
7
7
|
function c() {
|
|
8
8
|
return typeof window != "undefined" && typeof document != "undefined";
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const rt = (t) => {
|
|
11
11
|
const e = {};
|
|
12
12
|
return t.forEach((n, r) => {
|
|
13
13
|
e[r] = n;
|
|
14
14
|
}), e;
|
|
15
|
-
},
|
|
16
|
-
function
|
|
15
|
+
}, F = (t) => t instanceof URLSearchParams ? rt(t) : t, D = (t) => typeof t == "string" ? t : t instanceof URLSearchParams ? t.toString() : new URLSearchParams(t).toString();
|
|
16
|
+
function ot() {
|
|
17
17
|
return c() && window.self !== window.top;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
21
|
-
|
|
19
|
+
function st(t) {
|
|
20
|
+
return ot() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
|
|
21
|
+
D(t || window.location.search).indexOf("builder.frameEditing=") !== -1;
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const it = () => {
|
|
24
24
|
if (c()) {
|
|
25
25
|
const t = new URL(location.href);
|
|
26
26
|
return t.pathname === "" && (t.pathname = "/"), t;
|
|
27
27
|
} else
|
|
28
28
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
29
|
-
},
|
|
30
|
-
const t =
|
|
29
|
+
}, at = () => typeof navigator == "object" && navigator.userAgent || "", ct = () => {
|
|
30
|
+
const t = at(), e = {
|
|
31
31
|
Android() {
|
|
32
32
|
return t.match(/Android/i);
|
|
33
33
|
},
|
|
@@ -46,32 +46,32 @@ const ct = () => {
|
|
|
46
46
|
any() {
|
|
47
47
|
return e.Android() || e.BlackBerry() || e.iOS() || e.Opera() || e.Windows() || v === "reactNative";
|
|
48
48
|
}
|
|
49
|
-
}, n = t.match(/Tablet|iPad/i), r =
|
|
49
|
+
}, n = t.match(/Tablet|iPad/i), r = it();
|
|
50
50
|
return {
|
|
51
51
|
urlPath: r == null ? void 0 : r.pathname,
|
|
52
52
|
host: (r == null ? void 0 : r.host) || (r == null ? void 0 : r.hostname),
|
|
53
53
|
device: n ? "tablet" : e.any() ? "mobile" : "desktop"
|
|
54
54
|
};
|
|
55
55
|
}, y = (t) => t != null;
|
|
56
|
-
function
|
|
56
|
+
function Zt(t) {
|
|
57
57
|
const e = t || (c() ? window.location.search : void 0);
|
|
58
|
-
return e ?
|
|
58
|
+
return e ? D(e).indexOf("builder.preview=") !== -1 : !1;
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const qt = (t) => ({
|
|
61
61
|
type: "builder.registerComponent",
|
|
62
|
-
data:
|
|
63
|
-
}),
|
|
62
|
+
data: N(t)
|
|
63
|
+
}), ut = (t) => {
|
|
64
64
|
const e = t.toString().trim(), n = /^[a-zA-Z0-9_]+\s*=>/i.test(e);
|
|
65
65
|
return `return (${!e.startsWith("function") && !e.startsWith("async") && !e.startsWith("(") && !n ? "function " : ""}${e}).apply(this, arguments)`;
|
|
66
66
|
};
|
|
67
|
-
function
|
|
68
|
-
return JSON.parse(JSON.stringify(t, (e, n) => typeof n == "function" ?
|
|
67
|
+
function N(t) {
|
|
68
|
+
return JSON.parse(JSON.stringify(t, (e, n) => typeof n == "function" ? ut(n) : n));
|
|
69
69
|
}
|
|
70
|
-
const
|
|
71
|
-
function
|
|
72
|
-
t === "plugin" && (e =
|
|
73
|
-
let n =
|
|
74
|
-
if (n || (n =
|
|
70
|
+
const U = {};
|
|
71
|
+
function lt(t, e) {
|
|
72
|
+
t === "plugin" && (e = N(e));
|
|
73
|
+
let n = U[t];
|
|
74
|
+
if (n || (n = U[t] = []), n.push(e), c()) {
|
|
75
75
|
const r = {
|
|
76
76
|
type: "builder.register",
|
|
77
77
|
data: {
|
|
@@ -81,47 +81,47 @@ function ft(t, e) {
|
|
|
81
81
|
};
|
|
82
82
|
try {
|
|
83
83
|
parent.postMessage(r, "*"), parent !== window && window.postMessage(r, "*");
|
|
84
|
-
} catch (
|
|
85
|
-
console.debug("Could not postmessage",
|
|
84
|
+
} catch (o) {
|
|
85
|
+
console.debug("Could not postmessage", o);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
const
|
|
90
|
-
function
|
|
89
|
+
const B = {};
|
|
90
|
+
function te(t) {
|
|
91
91
|
if (c()) {
|
|
92
|
-
Object.assign(
|
|
92
|
+
Object.assign(B, t);
|
|
93
93
|
const e = {
|
|
94
94
|
type: "builder.settingsChange",
|
|
95
|
-
data:
|
|
95
|
+
data: B
|
|
96
96
|
};
|
|
97
97
|
parent.postMessage(e, "*");
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const R = "builder.", dt = "options.", M = (t) => {
|
|
101
101
|
if (!t)
|
|
102
102
|
return {};
|
|
103
|
-
const e =
|
|
103
|
+
const e = F(t), n = {};
|
|
104
104
|
return Object.keys(e).forEach((r) => {
|
|
105
|
-
if (r.startsWith(
|
|
106
|
-
const
|
|
107
|
-
n[
|
|
105
|
+
if (r.startsWith(R)) {
|
|
106
|
+
const o = r.replace(R, "").replace(dt, "");
|
|
107
|
+
n[o] = e[r];
|
|
108
108
|
}
|
|
109
109
|
}), n;
|
|
110
|
-
},
|
|
110
|
+
}, ft = () => {
|
|
111
111
|
if (!c())
|
|
112
112
|
return {};
|
|
113
113
|
const t = new URLSearchParams(window.location.search);
|
|
114
|
-
return
|
|
115
|
-
},
|
|
114
|
+
return M(t);
|
|
115
|
+
}, K = "3.0.5", j = () => ({
|
|
116
116
|
"X-Builder-SDK": v,
|
|
117
117
|
"X-Builder-SDK-GEN": "2",
|
|
118
|
-
"X-Builder-SDK-Version":
|
|
119
|
-
}),
|
|
118
|
+
"X-Builder-SDK-Version": K
|
|
119
|
+
}), ht = (t) => {
|
|
120
120
|
if (t === "localhost" || t === "127.0.0.1")
|
|
121
121
|
return t;
|
|
122
122
|
const e = t.split(".");
|
|
123
123
|
return e.length > 2 ? e.slice(1).join(".") : t;
|
|
124
|
-
},
|
|
124
|
+
}, W = ({
|
|
125
125
|
name: t,
|
|
126
126
|
canTrack: e
|
|
127
127
|
}) => {
|
|
@@ -132,14 +132,14 @@ const V = "builder.", ht = "options.", W = (t) => {
|
|
|
132
132
|
f.warn("[COOKIE] GET error: ", (r == null ? void 0 : r.message) || r);
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
},
|
|
135
|
+
}, $ = async (t) => W(t), gt = (t) => t.map(([e, n]) => n ? `${e}=${n}` : e).filter(y).join("; "), pt = [["secure", ""], ["SameSite", "None"]], mt = ({
|
|
136
136
|
name: t,
|
|
137
137
|
value: e,
|
|
138
138
|
expires: n
|
|
139
139
|
}) => {
|
|
140
|
-
const
|
|
141
|
-
return
|
|
142
|
-
},
|
|
140
|
+
const o = (c() ? location.protocol === "https:" : !0) ? pt : [[]], s = n ? [["expires", n.toUTCString()]] : [[]], i = [[t, e], ...s, ["path", "/"], ["domain", ht(window.location.hostname)], ...o];
|
|
141
|
+
return gt(i);
|
|
142
|
+
}, _ = async ({
|
|
143
143
|
name: t,
|
|
144
144
|
value: e,
|
|
145
145
|
expires: n,
|
|
@@ -148,103 +148,103 @@ const V = "builder.", ht = "options.", W = (t) => {
|
|
|
148
148
|
try {
|
|
149
149
|
if (!r)
|
|
150
150
|
return;
|
|
151
|
-
const
|
|
151
|
+
const o = mt({
|
|
152
152
|
name: t,
|
|
153
153
|
value: e,
|
|
154
154
|
expires: n
|
|
155
155
|
});
|
|
156
|
-
document.cookie =
|
|
157
|
-
} catch (
|
|
158
|
-
f.warn("[COOKIE] SET error: ", (
|
|
156
|
+
document.cookie = o;
|
|
157
|
+
} catch (o) {
|
|
158
|
+
f.warn("[COOKIE] SET error: ", (o == null ? void 0 : o.message) || o);
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
-
function
|
|
161
|
+
function yt() {
|
|
162
162
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
|
|
163
163
|
const e = Math.random() * 16 | 0;
|
|
164
164
|
return (t == "x" ? e : e & 3 | 8).toString(16);
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
return
|
|
167
|
+
function G() {
|
|
168
|
+
return yt().replace(/-/g, "");
|
|
169
169
|
}
|
|
170
|
-
const
|
|
170
|
+
const H = "builderSessionId", wt = async ({
|
|
171
171
|
canTrack: t
|
|
172
172
|
}) => {
|
|
173
173
|
if (!t)
|
|
174
174
|
return;
|
|
175
|
-
const e = await
|
|
176
|
-
name:
|
|
175
|
+
const e = await $({
|
|
176
|
+
name: H,
|
|
177
177
|
canTrack: t
|
|
178
178
|
});
|
|
179
179
|
if (y(e))
|
|
180
180
|
return e;
|
|
181
181
|
{
|
|
182
|
-
const n =
|
|
183
|
-
return
|
|
182
|
+
const n = St();
|
|
183
|
+
return bt({
|
|
184
184
|
id: n,
|
|
185
185
|
canTrack: t
|
|
186
186
|
}), n;
|
|
187
187
|
}
|
|
188
|
-
},
|
|
188
|
+
}, St = () => G(), bt = ({
|
|
189
189
|
id: t,
|
|
190
190
|
canTrack: e
|
|
191
|
-
}) =>
|
|
192
|
-
name:
|
|
191
|
+
}) => _({
|
|
192
|
+
name: H,
|
|
193
193
|
value: t,
|
|
194
194
|
canTrack: e
|
|
195
|
-
}),
|
|
195
|
+
}), J = () => c() && typeof localStorage != "undefined" ? localStorage : void 0, vt = ({
|
|
196
196
|
key: t,
|
|
197
197
|
canTrack: e
|
|
198
198
|
}) => {
|
|
199
199
|
var n;
|
|
200
200
|
try {
|
|
201
|
-
return e ? (n =
|
|
201
|
+
return e ? (n = J()) == null ? void 0 : n.getItem(t) : void 0;
|
|
202
202
|
} catch (r) {
|
|
203
203
|
console.debug("[LocalStorage] GET error: ", r);
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
|
-
},
|
|
206
|
+
}, It = ({
|
|
207
207
|
key: t,
|
|
208
208
|
canTrack: e,
|
|
209
209
|
value: n
|
|
210
210
|
}) => {
|
|
211
211
|
var r;
|
|
212
212
|
try {
|
|
213
|
-
e && ((r =
|
|
214
|
-
} catch (
|
|
215
|
-
console.debug("[LocalStorage] SET error: ",
|
|
213
|
+
e && ((r = J()) == null || r.setItem(t, n));
|
|
214
|
+
} catch (o) {
|
|
215
|
+
console.debug("[LocalStorage] SET error: ", o);
|
|
216
216
|
}
|
|
217
|
-
}, X = "builderVisitorId",
|
|
217
|
+
}, X = "builderVisitorId", kt = ({
|
|
218
218
|
canTrack: t
|
|
219
219
|
}) => {
|
|
220
220
|
if (!t)
|
|
221
221
|
return;
|
|
222
|
-
const e =
|
|
222
|
+
const e = vt({
|
|
223
223
|
key: X,
|
|
224
224
|
canTrack: t
|
|
225
225
|
});
|
|
226
226
|
if (y(e))
|
|
227
227
|
return e;
|
|
228
228
|
{
|
|
229
|
-
const n =
|
|
230
|
-
return
|
|
229
|
+
const n = Et();
|
|
230
|
+
return At({
|
|
231
231
|
id: n,
|
|
232
232
|
canTrack: t
|
|
233
233
|
}), n;
|
|
234
234
|
}
|
|
235
|
-
},
|
|
235
|
+
}, Et = () => G(), At = ({
|
|
236
236
|
id: t,
|
|
237
237
|
canTrack: e
|
|
238
|
-
}) =>
|
|
238
|
+
}) => It({
|
|
239
239
|
key: X,
|
|
240
240
|
value: t,
|
|
241
241
|
canTrack: e
|
|
242
242
|
});
|
|
243
|
-
function
|
|
243
|
+
function Pt(t) {
|
|
244
244
|
var e;
|
|
245
245
|
typeof process != "undefined" && ((e = process.env) != null && e.DEBUG) && String(process.env.DEBUG) == "true" && f.log(t);
|
|
246
246
|
}
|
|
247
|
-
const
|
|
247
|
+
const Ot = async ({
|
|
248
248
|
canTrack: t
|
|
249
249
|
}) => {
|
|
250
250
|
if (!t)
|
|
@@ -254,31 +254,31 @@ const Ut = async ({
|
|
|
254
254
|
};
|
|
255
255
|
const e = await wt({
|
|
256
256
|
canTrack: t
|
|
257
|
-
}), n =
|
|
257
|
+
}), n = kt({
|
|
258
258
|
canTrack: t
|
|
259
259
|
});
|
|
260
260
|
return {
|
|
261
261
|
sessionId: e,
|
|
262
262
|
visitorId: n
|
|
263
263
|
};
|
|
264
|
-
},
|
|
264
|
+
}, Ct = async ({
|
|
265
265
|
type: t,
|
|
266
266
|
canTrack: e,
|
|
267
267
|
apiKey: n,
|
|
268
268
|
metadata: r,
|
|
269
|
-
...
|
|
269
|
+
...o
|
|
270
270
|
}) => ({
|
|
271
271
|
type: t,
|
|
272
272
|
data: {
|
|
273
|
-
...
|
|
273
|
+
...o,
|
|
274
274
|
metadata: {
|
|
275
275
|
url: location.href,
|
|
276
276
|
...r
|
|
277
277
|
},
|
|
278
|
-
...await
|
|
278
|
+
...await Ot({
|
|
279
279
|
canTrack: e
|
|
280
280
|
}),
|
|
281
|
-
userAttributes:
|
|
281
|
+
userAttributes: ct(),
|
|
282
282
|
ownerId: n
|
|
283
283
|
}
|
|
284
284
|
});
|
|
@@ -290,35 +290,35 @@ async function xt({
|
|
|
290
290
|
f.error("Missing API key for track call. Please provide your API key.");
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
|
-
if (!e.canTrack ||
|
|
293
|
+
if (!e.canTrack || st() || !(c() || v === "reactNative"))
|
|
294
294
|
return;
|
|
295
295
|
const r = `${t || "https://cdn.builder.io"}/api/v1/track`;
|
|
296
|
-
return
|
|
296
|
+
return Pt(r), fetch(r, {
|
|
297
297
|
method: "POST",
|
|
298
298
|
body: JSON.stringify({
|
|
299
|
-
events: [await
|
|
299
|
+
events: [await Ct(e)]
|
|
300
300
|
}),
|
|
301
301
|
headers: {
|
|
302
302
|
"content-type": "application/json",
|
|
303
|
-
|
|
303
|
+
...j()
|
|
304
304
|
},
|
|
305
305
|
mode: "cors"
|
|
306
|
-
}).catch((
|
|
307
|
-
console.error("Failed to track: ",
|
|
306
|
+
}).catch((o) => {
|
|
307
|
+
console.error("Failed to track: ", o);
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
const
|
|
310
|
+
const ee = (t) => xt({
|
|
311
311
|
...t,
|
|
312
312
|
canTrack: !0
|
|
313
|
-
}),
|
|
314
|
-
function
|
|
313
|
+
}), Tt = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
314
|
+
function z(t, e) {
|
|
315
315
|
if (!e.origin.startsWith("http") && !e.origin.startsWith("https"))
|
|
316
316
|
return !1;
|
|
317
317
|
const n = new URL(e.origin), r = n.hostname;
|
|
318
|
-
return (t ||
|
|
318
|
+
return (t || Tt).findIndex((o) => o.startsWith("*.") ? r.endsWith(o.slice(1)) : o === r) > -1;
|
|
319
319
|
}
|
|
320
|
-
const
|
|
321
|
-
|
|
320
|
+
const ne = () => {
|
|
321
|
+
lt("insertMenu", {
|
|
322
322
|
name: "_default",
|
|
323
323
|
default: !0,
|
|
324
324
|
items: [{
|
|
@@ -340,20 +340,19 @@ const oe = () => {
|
|
|
340
340
|
}]
|
|
341
341
|
});
|
|
342
342
|
};
|
|
343
|
-
let
|
|
344
|
-
const
|
|
343
|
+
let L = !1;
|
|
344
|
+
const Ut = (t = {}) => {
|
|
345
345
|
var e, n;
|
|
346
|
-
|
|
346
|
+
L || (L = !0, c() && ((e = window.parent) == null || e.postMessage({
|
|
347
347
|
type: "builder.sdkInfo",
|
|
348
348
|
data: {
|
|
349
349
|
target: v,
|
|
350
|
-
version:
|
|
350
|
+
version: K,
|
|
351
351
|
supportsPatchUpdates: !1,
|
|
352
352
|
// Supports builder-model="..." attribute which is needed to
|
|
353
353
|
// scope our '+ add block' button styling
|
|
354
354
|
supportsAddBlockScoping: !0,
|
|
355
|
-
supportsCustomBreakpoints: !0
|
|
356
|
-
blockLevelPersonalization: !0
|
|
355
|
+
supportsCustomBreakpoints: !0
|
|
357
356
|
}
|
|
358
357
|
}, "*"), (n = window.parent) == null || n.postMessage({
|
|
359
358
|
type: "builder.updateContent",
|
|
@@ -361,23 +360,23 @@ const Bt = (t = {}) => {
|
|
|
361
360
|
options: t
|
|
362
361
|
}
|
|
363
362
|
}, "*"), window.addEventListener("message", (r) => {
|
|
364
|
-
var
|
|
365
|
-
if (!
|
|
363
|
+
var s, i;
|
|
364
|
+
if (!z(t.trustedHosts, r))
|
|
366
365
|
return;
|
|
367
366
|
const {
|
|
368
|
-
data:
|
|
367
|
+
data: o
|
|
369
368
|
} = r;
|
|
370
|
-
if (
|
|
371
|
-
switch (
|
|
369
|
+
if (o != null && o.type)
|
|
370
|
+
switch (o.type) {
|
|
372
371
|
case "builder.evaluate": {
|
|
373
|
-
const u =
|
|
372
|
+
const u = o.data.text, w = o.data.arguments || [], p = o.data.id, k = new Function(u);
|
|
374
373
|
let l, h = null;
|
|
375
374
|
try {
|
|
376
|
-
l = k.apply(null,
|
|
375
|
+
l = k.apply(null, w);
|
|
377
376
|
} catch (g) {
|
|
378
377
|
h = g;
|
|
379
378
|
}
|
|
380
|
-
h ? (
|
|
379
|
+
h ? (s = window.parent) == null || s.postMessage({
|
|
381
380
|
type: "builder.evaluateError",
|
|
382
381
|
data: {
|
|
383
382
|
id: p,
|
|
@@ -403,38 +402,38 @@ const Bt = (t = {}) => {
|
|
|
403
402
|
}
|
|
404
403
|
}
|
|
405
404
|
})));
|
|
406
|
-
},
|
|
405
|
+
}, Bt = ({
|
|
407
406
|
model: t,
|
|
408
407
|
trustedHosts: e,
|
|
409
408
|
callbacks: n
|
|
410
409
|
}) => (r) => {
|
|
411
|
-
if (!
|
|
410
|
+
if (!z(e, r))
|
|
412
411
|
return;
|
|
413
412
|
const {
|
|
414
|
-
data:
|
|
413
|
+
data: o
|
|
415
414
|
} = r;
|
|
416
|
-
if (
|
|
417
|
-
switch (
|
|
415
|
+
if (o)
|
|
416
|
+
switch (o.type) {
|
|
418
417
|
case "builder.configureSdk": {
|
|
419
|
-
n.configureSdk(
|
|
418
|
+
n.configureSdk(o.data);
|
|
420
419
|
break;
|
|
421
420
|
}
|
|
422
421
|
case "builder.triggerAnimation": {
|
|
423
|
-
n.animation(
|
|
422
|
+
n.animation(o.data);
|
|
424
423
|
break;
|
|
425
424
|
}
|
|
426
425
|
case "builder.contentUpdate": {
|
|
427
|
-
const
|
|
426
|
+
const s = o.data, i = s.key || s.alias || s.entry || s.modelName, u = s.data;
|
|
428
427
|
i === t && n.contentUpdate(u);
|
|
429
428
|
break;
|
|
430
429
|
}
|
|
431
430
|
}
|
|
432
|
-
},
|
|
431
|
+
}, re = (t, e, n) => {
|
|
433
432
|
if (!c)
|
|
434
433
|
return f.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
435
434
|
};
|
|
436
|
-
|
|
437
|
-
const r =
|
|
435
|
+
Ut();
|
|
436
|
+
const r = Bt({
|
|
438
437
|
callbacks: {
|
|
439
438
|
contentUpdate: e,
|
|
440
439
|
animation: () => {
|
|
@@ -448,45 +447,45 @@ const Bt = (t = {}) => {
|
|
|
448
447
|
return window.addEventListener("message", r), () => {
|
|
449
448
|
window.removeEventListener("message", r);
|
|
450
449
|
};
|
|
451
|
-
},
|
|
450
|
+
}, Rt = "builder.tests", P = (t) => `${Rt}.${t}`, Lt = ({
|
|
452
451
|
contentId: t
|
|
453
|
-
}) =>
|
|
454
|
-
name:
|
|
452
|
+
}) => $({
|
|
453
|
+
name: P(t),
|
|
455
454
|
canTrack: !0
|
|
456
|
-
}),
|
|
455
|
+
}), Vt = ({
|
|
457
456
|
contentId: t
|
|
458
|
-
}) =>
|
|
459
|
-
name:
|
|
457
|
+
}) => W({
|
|
458
|
+
name: P(t),
|
|
460
459
|
canTrack: !0
|
|
461
|
-
}),
|
|
460
|
+
}), Ft = ({
|
|
462
461
|
contentId: t,
|
|
463
462
|
value: e
|
|
464
|
-
}) =>
|
|
465
|
-
name:
|
|
463
|
+
}) => _({
|
|
464
|
+
name: P(t),
|
|
466
465
|
value: e,
|
|
467
466
|
canTrack: !0
|
|
468
|
-
}),
|
|
467
|
+
}), Q = (t) => y(t.id) && y(t.variations) && Object.keys(t.variations).length > 0, Dt = ({
|
|
469
468
|
id: t,
|
|
470
469
|
variations: e
|
|
471
470
|
}) => {
|
|
472
|
-
var
|
|
471
|
+
var o;
|
|
473
472
|
let n = 0;
|
|
474
473
|
const r = Math.random();
|
|
475
|
-
for (const
|
|
476
|
-
const i = (
|
|
474
|
+
for (const s in e) {
|
|
475
|
+
const i = (o = e[s]) == null ? void 0 : o.testRatio;
|
|
477
476
|
if (n += i, r < n)
|
|
478
|
-
return
|
|
477
|
+
return s;
|
|
479
478
|
}
|
|
480
479
|
return t;
|
|
481
|
-
},
|
|
482
|
-
const e =
|
|
483
|
-
return
|
|
480
|
+
}, Y = (t) => {
|
|
481
|
+
const e = Dt(t);
|
|
482
|
+
return Ft({
|
|
484
483
|
contentId: t.id,
|
|
485
484
|
value: e
|
|
486
485
|
}).catch((n) => {
|
|
487
486
|
f.error("could not store A/B test variation: ", n);
|
|
488
487
|
}), e;
|
|
489
|
-
},
|
|
488
|
+
}, Z = ({
|
|
490
489
|
item: t,
|
|
491
490
|
testGroupId: e
|
|
492
491
|
}) => {
|
|
@@ -500,7 +499,7 @@ const Bt = (t = {}) => {
|
|
|
500
499
|
testVariationId: n.id,
|
|
501
500
|
testVariationName: n.name || (n.id === t.id ? "Default" : "")
|
|
502
501
|
};
|
|
503
|
-
},
|
|
502
|
+
}, oe = ({
|
|
504
503
|
item: t,
|
|
505
504
|
canTrack: e
|
|
506
505
|
}) => {
|
|
@@ -508,14 +507,14 @@ const Bt = (t = {}) => {
|
|
|
508
507
|
return t;
|
|
509
508
|
if (!t)
|
|
510
509
|
return;
|
|
511
|
-
if (!
|
|
510
|
+
if (!Q(t))
|
|
512
511
|
return t;
|
|
513
|
-
const n =
|
|
512
|
+
const n = Vt({
|
|
514
513
|
contentId: t.id
|
|
515
|
-
}) ||
|
|
514
|
+
}) || Y({
|
|
516
515
|
variations: t.variations,
|
|
517
516
|
id: t.id
|
|
518
|
-
}), r =
|
|
517
|
+
}), r = Z({
|
|
519
518
|
item: t,
|
|
520
519
|
testGroupId: n
|
|
521
520
|
});
|
|
@@ -523,225 +522,186 @@ const Bt = (t = {}) => {
|
|
|
523
522
|
...t,
|
|
524
523
|
...r
|
|
525
524
|
};
|
|
526
|
-
},
|
|
525
|
+
}, Nt = async ({
|
|
527
526
|
item: t,
|
|
528
527
|
canTrack: e
|
|
529
528
|
}) => {
|
|
530
|
-
if (!e || !
|
|
529
|
+
if (!e || !Q(t))
|
|
531
530
|
return t;
|
|
532
|
-
const r = await
|
|
531
|
+
const r = await Lt({
|
|
533
532
|
contentId: t.id
|
|
534
|
-
}) ||
|
|
533
|
+
}) || Y({
|
|
535
534
|
variations: t.variations,
|
|
536
535
|
id: t.id
|
|
537
|
-
}),
|
|
536
|
+
}), o = Z({
|
|
538
537
|
item: t,
|
|
539
538
|
testGroupId: r
|
|
540
539
|
});
|
|
541
540
|
return {
|
|
542
541
|
...t,
|
|
543
|
-
...
|
|
544
|
-
};
|
|
545
|
-
}, F = "builder.userAttributes";
|
|
546
|
-
function jt() {
|
|
547
|
-
let t = !0;
|
|
548
|
-
const e = /* @__PURE__ */ new Set();
|
|
549
|
-
return {
|
|
550
|
-
setUserAttributes(n) {
|
|
551
|
-
if (!c())
|
|
552
|
-
return;
|
|
553
|
-
const r = {
|
|
554
|
-
...this.getUserAttributes(),
|
|
555
|
-
...n
|
|
556
|
-
};
|
|
557
|
-
P({
|
|
558
|
-
name: F,
|
|
559
|
-
value: JSON.stringify(r),
|
|
560
|
-
canTrack: t
|
|
561
|
-
}), e.forEach((s) => s(r));
|
|
562
|
-
},
|
|
563
|
-
getUserAttributes() {
|
|
564
|
-
return c() ? JSON.parse(O({
|
|
565
|
-
name: F,
|
|
566
|
-
canTrack: t
|
|
567
|
-
}) || "{}") : {};
|
|
568
|
-
},
|
|
569
|
-
subscribeOnUserAttributesChange(n) {
|
|
570
|
-
return e.add(n), () => {
|
|
571
|
-
e.delete(n);
|
|
572
|
-
};
|
|
573
|
-
},
|
|
574
|
-
setCanTrack(n) {
|
|
575
|
-
t = n;
|
|
576
|
-
}
|
|
542
|
+
...o
|
|
577
543
|
};
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
tt.setUserAttributes(t);
|
|
581
|
-
}, Wt = (t) => {
|
|
582
|
-
const e = y(t) ? t : !0;
|
|
583
|
-
return tt.setCanTrack(e), e;
|
|
584
|
-
};
|
|
585
|
-
function _t() {
|
|
544
|
+
}, Mt = (t) => y(t) ? t : !0;
|
|
545
|
+
function Kt() {
|
|
586
546
|
return typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : globalThis;
|
|
587
547
|
}
|
|
588
|
-
function
|
|
589
|
-
const t =
|
|
548
|
+
function jt() {
|
|
549
|
+
const t = Kt().fetch;
|
|
590
550
|
if (typeof t == "undefined")
|
|
591
551
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
592
552
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
593
553
|
return t;
|
|
594
554
|
}
|
|
595
|
-
const
|
|
596
|
-
function
|
|
597
|
-
return Object.keys(t).reduce((r,
|
|
598
|
-
const
|
|
599
|
-
return [typeof
|
|
555
|
+
const Wt = jt();
|
|
556
|
+
function A(t, e = null, n = ".") {
|
|
557
|
+
return Object.keys(t).reduce((r, o) => {
|
|
558
|
+
const s = t[o], i = [e, o].filter(Boolean).join(n);
|
|
559
|
+
return [typeof s == "object", s !== null, !(Array.isArray(s) && s.length === 0)].every(Boolean) ? {
|
|
600
560
|
...r,
|
|
601
|
-
...
|
|
561
|
+
...A(s, i, n)
|
|
602
562
|
} : {
|
|
603
563
|
...r,
|
|
604
|
-
[i]:
|
|
564
|
+
[i]: s
|
|
605
565
|
};
|
|
606
566
|
}, {});
|
|
607
567
|
}
|
|
608
|
-
function
|
|
568
|
+
function q(t, e, n = {}) {
|
|
609
569
|
for (const r in t) {
|
|
610
|
-
const
|
|
611
|
-
|
|
570
|
+
const o = t[r], s = e ? e + "." + r : r;
|
|
571
|
+
o && typeof o == "object" && !Array.isArray(o) && !Object.keys(o).find((i) => i.startsWith("$")) ? q(o, s, n) : n[s] = o;
|
|
612
572
|
}
|
|
613
573
|
return n;
|
|
614
574
|
}
|
|
615
|
-
function
|
|
575
|
+
function $t(t) {
|
|
616
576
|
const e = {};
|
|
617
577
|
for (const n in t) {
|
|
618
578
|
const r = n.split(".");
|
|
619
|
-
let
|
|
620
|
-
for (let
|
|
621
|
-
const i = r[
|
|
622
|
-
|
|
579
|
+
let o = e;
|
|
580
|
+
for (let s = 0; s < r.length; s++) {
|
|
581
|
+
const i = r[s];
|
|
582
|
+
s === r.length - 1 ? o[i] = t[n] : (o[i] = o[i] || {}, o = o[i]);
|
|
623
583
|
}
|
|
624
584
|
}
|
|
625
585
|
return e;
|
|
626
586
|
}
|
|
627
|
-
const
|
|
587
|
+
const _t = "v3", V = (t) => typeof t == "number" && !isNaN(t) && t >= 0, O = (t) => {
|
|
628
588
|
const {
|
|
629
589
|
limit: e = 30,
|
|
630
590
|
userAttributes: n,
|
|
631
591
|
query: r,
|
|
632
|
-
model:
|
|
633
|
-
apiKey:
|
|
592
|
+
model: o,
|
|
593
|
+
apiKey: s,
|
|
634
594
|
enrich: i,
|
|
635
595
|
locale: u,
|
|
636
|
-
apiVersion:
|
|
596
|
+
apiVersion: w = _t,
|
|
637
597
|
fields: p,
|
|
638
598
|
omit: k,
|
|
639
599
|
offset: l,
|
|
640
600
|
cacheSeconds: h,
|
|
641
601
|
staleCacheSeconds: g,
|
|
642
602
|
sort: S,
|
|
643
|
-
includeUnpublished:
|
|
644
|
-
apiHost:
|
|
603
|
+
includeUnpublished: C,
|
|
604
|
+
apiHost: tt
|
|
645
605
|
} = t;
|
|
646
|
-
if (!
|
|
606
|
+
if (!s)
|
|
647
607
|
throw new Error("Missing API key");
|
|
648
|
-
if (!["v3"].includes(
|
|
649
|
-
throw new Error(`Invalid apiVersion: expected 'v3', received '${
|
|
650
|
-
const
|
|
651
|
-
a.searchParams.set("apiKey",
|
|
652
|
-
const
|
|
608
|
+
if (!["v3"].includes(w))
|
|
609
|
+
throw new Error(`Invalid apiVersion: expected 'v3', received '${w}'`);
|
|
610
|
+
const et = e !== 1, nt = tt || "https://cdn.builder.io", a = new URL(`${nt}/api/${w}/content/${o}`);
|
|
611
|
+
a.searchParams.set("apiKey", s), a.searchParams.set("limit", String(e)), a.searchParams.set("noTraverse", String(et)), a.searchParams.set("includeRefs", String(!0));
|
|
612
|
+
const E = u || (n == null ? void 0 : n.locale);
|
|
653
613
|
let m = n || {};
|
|
654
|
-
if (
|
|
655
|
-
locale:
|
|
614
|
+
if (E && (a.searchParams.set("locale", E), m = {
|
|
615
|
+
locale: E,
|
|
656
616
|
...m
|
|
657
|
-
}), i && a.searchParams.set("enrich", String(i)), a.searchParams.set("omit", k || "meta.componentsUsed"), p && a.searchParams.set("fields", p), Number.isFinite(l) && l > -1 && a.searchParams.set("offset", String(Math.floor(l))), typeof
|
|
658
|
-
const d =
|
|
617
|
+
}), i && a.searchParams.set("enrich", String(i)), a.searchParams.set("omit", k || "meta.componentsUsed"), p && a.searchParams.set("fields", p), Number.isFinite(l) && l > -1 && a.searchParams.set("offset", String(Math.floor(l))), typeof C == "boolean" && a.searchParams.set("includeUnpublished", String(C)), h && V(h) && a.searchParams.set("cacheSeconds", String(h)), g && V(g) && a.searchParams.set("staleCacheSeconds", String(g)), S) {
|
|
618
|
+
const d = A({
|
|
659
619
|
sort: S
|
|
660
620
|
});
|
|
661
|
-
for (const
|
|
662
|
-
a.searchParams.set(
|
|
621
|
+
for (const b in d)
|
|
622
|
+
a.searchParams.set(b, JSON.stringify(d[b]));
|
|
663
623
|
}
|
|
664
624
|
const x = {
|
|
665
|
-
...
|
|
666
|
-
...
|
|
625
|
+
...ft(),
|
|
626
|
+
...F(t.options || {})
|
|
667
627
|
};
|
|
668
628
|
m = {
|
|
669
629
|
...m,
|
|
670
|
-
...
|
|
630
|
+
...Ht(x)
|
|
671
631
|
};
|
|
672
|
-
const
|
|
673
|
-
for (const d in
|
|
674
|
-
a.searchParams.set(d, String(
|
|
632
|
+
const T = A(x);
|
|
633
|
+
for (const d in T)
|
|
634
|
+
a.searchParams.set(d, String(T[d]));
|
|
675
635
|
if (Object.keys(m).length > 0 && a.searchParams.set("userAttributes", JSON.stringify(m)), r) {
|
|
676
|
-
const d =
|
|
636
|
+
const d = q({
|
|
677
637
|
query: r
|
|
678
638
|
});
|
|
679
|
-
for (const
|
|
680
|
-
a.searchParams.set(
|
|
639
|
+
for (const b in d)
|
|
640
|
+
a.searchParams.set(b, JSON.stringify(d[b]));
|
|
681
641
|
}
|
|
682
642
|
return a;
|
|
683
|
-
},
|
|
643
|
+
}, Gt = (t) => {
|
|
684
644
|
const e = {};
|
|
685
645
|
for (const n in t)
|
|
686
646
|
n.startsWith("userAttributes.") && (e[n] = t[n], delete t[n]);
|
|
687
647
|
return e;
|
|
688
|
-
},
|
|
648
|
+
}, Ht = (t) => {
|
|
689
649
|
if (c() && t.preview === "BUILDER_STUDIO") {
|
|
690
650
|
t["userAttributes.urlPath"] = window.location.pathname, t["userAttributes.host"] = window.location.host;
|
|
691
|
-
const e =
|
|
651
|
+
const e = Gt(t), {
|
|
692
652
|
userAttributes: n
|
|
693
|
-
} =
|
|
653
|
+
} = $t(e);
|
|
694
654
|
return n;
|
|
695
655
|
}
|
|
696
656
|
return {};
|
|
697
|
-
},
|
|
698
|
-
async function
|
|
699
|
-
const e = await
|
|
657
|
+
}, Jt = (t) => "results" in t;
|
|
658
|
+
async function Xt(t) {
|
|
659
|
+
const e = await Yt({
|
|
700
660
|
...t,
|
|
701
661
|
limit: 1
|
|
702
662
|
});
|
|
703
663
|
return e && e[0] || null;
|
|
704
664
|
}
|
|
705
|
-
const
|
|
665
|
+
const zt = async (t) => {
|
|
706
666
|
var i, u;
|
|
707
|
-
const e =
|
|
667
|
+
const e = O(t), n = (i = t.fetch) != null ? i : Wt, r = {
|
|
708
668
|
...t.fetchOptions,
|
|
709
669
|
headers: {
|
|
710
670
|
...(u = t.fetchOptions) == null ? void 0 : u.headers,
|
|
711
|
-
|
|
671
|
+
...j()
|
|
712
672
|
}
|
|
713
673
|
};
|
|
714
674
|
return await (await n(e.href, r)).json();
|
|
715
|
-
},
|
|
716
|
-
const r =
|
|
675
|
+
}, Qt = async (t, e, n = O(t)) => {
|
|
676
|
+
const r = Mt(t.canTrack);
|
|
717
677
|
if (n.search.includes("preview="), !r || !(c() || v === "reactNative"))
|
|
718
678
|
return e.results;
|
|
719
679
|
try {
|
|
720
|
-
const
|
|
721
|
-
for (const
|
|
722
|
-
|
|
723
|
-
item:
|
|
680
|
+
const o = [];
|
|
681
|
+
for (const s of e.results)
|
|
682
|
+
o.push(await Nt({
|
|
683
|
+
item: s,
|
|
724
684
|
canTrack: r
|
|
725
685
|
}));
|
|
726
|
-
e.results =
|
|
727
|
-
} catch (
|
|
728
|
-
f.error("Could not process A/B tests. ",
|
|
686
|
+
e.results = o;
|
|
687
|
+
} catch (o) {
|
|
688
|
+
f.error("Could not process A/B tests. ", o);
|
|
729
689
|
}
|
|
730
690
|
return e.results;
|
|
731
691
|
};
|
|
732
|
-
async function
|
|
733
|
-
const e =
|
|
734
|
-
if (!
|
|
692
|
+
async function Yt(t) {
|
|
693
|
+
const e = O(t), n = await zt(t);
|
|
694
|
+
if (!Jt(n))
|
|
735
695
|
throw f.error("Error fetching data. ", {
|
|
736
696
|
url: e,
|
|
737
697
|
content: n,
|
|
738
698
|
options: t
|
|
739
699
|
}), n;
|
|
740
|
-
return
|
|
700
|
+
return Qt(t, n);
|
|
741
701
|
}
|
|
742
|
-
const
|
|
743
|
-
var r,
|
|
744
|
-
const e = t.path || ((r = t.url) == null ? void 0 : r.pathname) || ((
|
|
702
|
+
const se = async (t) => {
|
|
703
|
+
var r, o, s;
|
|
704
|
+
const e = t.path || ((r = t.url) == null ? void 0 : r.pathname) || ((o = t.userAttributes) == null ? void 0 : o.urlPath), n = {
|
|
745
705
|
...t,
|
|
746
706
|
apiKey: t.apiKey,
|
|
747
707
|
model: t.model || "page",
|
|
@@ -751,41 +711,39 @@ const ue = async (t) => {
|
|
|
751
711
|
urlPath: e
|
|
752
712
|
} : {}
|
|
753
713
|
},
|
|
754
|
-
options:
|
|
714
|
+
options: M(t.searchParams || ((s = t.url) == null ? void 0 : s.searchParams) || t.options)
|
|
755
715
|
};
|
|
756
716
|
return {
|
|
757
717
|
apiKey: n.apiKey,
|
|
758
718
|
model: n.model,
|
|
759
|
-
content: await
|
|
719
|
+
content: await Xt(n)
|
|
760
720
|
};
|
|
761
721
|
};
|
|
762
722
|
export {
|
|
763
723
|
I as MSG_PREFIX,
|
|
764
724
|
v as TARGET,
|
|
765
|
-
|
|
725
|
+
Qt as _processContentResult,
|
|
766
726
|
xt as _track,
|
|
767
727
|
y as checkIsDefined,
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
728
|
+
Bt as createEditorListener,
|
|
729
|
+
qt as createRegisterComponentMessage,
|
|
730
|
+
se as fetchBuilderProps,
|
|
731
|
+
Yt as fetchEntries,
|
|
732
|
+
Xt as fetchOneEntry,
|
|
733
|
+
M as getBuilderSearchParams,
|
|
734
|
+
Mt as getDefaultCanTrack,
|
|
735
|
+
ct as getUserAttributes,
|
|
736
|
+
oe as handleABTestingSync,
|
|
777
737
|
c as isBrowser,
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
738
|
+
st as isEditing,
|
|
739
|
+
Zt as isPreviewing,
|
|
740
|
+
Pt as logFetch,
|
|
781
741
|
f as logger,
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
se as track,
|
|
790
|
-
tt as userAttributesService
|
|
742
|
+
lt as register,
|
|
743
|
+
ne as registerInsertMenu,
|
|
744
|
+
N as serializeIncludingFunctions,
|
|
745
|
+
te as setEditorSettings,
|
|
746
|
+
Ut as setupBrowserForEditing,
|
|
747
|
+
re as subscribeToEditor,
|
|
748
|
+
ee as track
|
|
791
749
|
};
|