@wix/astro 1.0.31 → 1.0.33
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/build-browser-runtime/setup.js +854 -2
- package/build-runtime/{chunk-FR26HCAT.js → chunk-EK7YZVWJ.js} +17 -135
- package/build-runtime/{chunk-N2TGCJPN.js → chunk-JODQ44LE.js} +6 -4
- package/build-runtime/chunk-NKFV7KCT.js +831 -0
- package/build-runtime/chunk-PSHIUVP2.js +131 -0
- package/build-runtime/{chunk-RKE6XT5Z.js → chunk-Q3KPY4P2.js} +1 -1
- package/build-runtime/chunk-QRPWKJ4C.js +41 -0
- package/build-runtime/context/elevated.js +3 -2
- package/build-runtime/context/nonElevated.js +3 -2
- package/build-runtime/context/setupServicePlugin.js +1 -1
- package/build-runtime/context/setupWebhook.js +1 -1
- package/build-runtime/middleware/auth.js +1 -1
- package/build-runtime/middleware/html-embeds.js +3 -2
- package/build-runtime/routes/auth/callback.js +2 -2
- package/build-runtime/routes/auth/login.js +2 -2
- package/build-runtime/routes/auth/logout-callback.js +1 -1
- package/build-runtime/routes/auth/logout.js +2 -2
- package/build-runtime/routes/paylink/checkout.js +4 -3
- package/build-runtime/routes/paylink/paylink.js +4 -3
- package/build-runtime/routes/robots/robots.js +4 -3
- package/build-runtime/routes/servicePluginsDevRoute.js +1 -1
- package/build-runtime/routes/webhooksDevRoute.js +1 -1
- package/package.json +4 -4
- package/build-runtime/chunk-B6RICTPP.js +0 -94
- package/build-runtime/chunk-MLKGABMK.js +0 -9
|
@@ -1,5 +1,747 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __esm = (fn, res) => function __init() {
|
|
8
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
9
|
+
};
|
|
10
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
var __export = (target, all) => {
|
|
14
|
+
for (var name in all)
|
|
15
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
+
mod
|
|
32
|
+
));
|
|
33
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
|
+
|
|
35
|
+
// ../../node_modules/@wix/monitoring/build/index.cjs
|
|
36
|
+
var require_build = __commonJS({
|
|
37
|
+
"../../node_modules/@wix/monitoring/build/index.cjs"(exports, module) {
|
|
38
|
+
"use strict";
|
|
39
|
+
var __defProp2 = Object.defineProperty;
|
|
40
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
41
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
42
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
43
|
+
var __export2 = (target, all) => {
|
|
44
|
+
for (var name in all)
|
|
45
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
46
|
+
};
|
|
47
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
48
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
49
|
+
for (let key of __getOwnPropNames2(from))
|
|
50
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
51
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
52
|
+
}
|
|
53
|
+
return to;
|
|
54
|
+
};
|
|
55
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
56
|
+
var index_exports = {};
|
|
57
|
+
__export2(index_exports, {
|
|
58
|
+
createFallbackMonitoringClient: () => createFallbackMonitoringClient,
|
|
59
|
+
generateTagsAndContext: () => generateTagsAndContext
|
|
60
|
+
});
|
|
61
|
+
module.exports = __toCommonJS2(index_exports);
|
|
62
|
+
var validValue = (value) => value !== void 0 && value !== null && value !== "";
|
|
63
|
+
var pickByValidValues = (obj) => pickBy(obj, validValue);
|
|
64
|
+
function pickBy(object, predicate = (value) => !!value) {
|
|
65
|
+
if (!object) {
|
|
66
|
+
return {};
|
|
67
|
+
}
|
|
68
|
+
const result = {};
|
|
69
|
+
for (const key in object) {
|
|
70
|
+
if (predicate(object[key], key)) {
|
|
71
|
+
result[key] = object[key];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
var generateTagsAndContext = (context) => {
|
|
77
|
+
const tags = pickByValidValues({
|
|
78
|
+
"app.id": context.appId,
|
|
79
|
+
"app.version": context.appVersion,
|
|
80
|
+
"app.instanceId": context.appInstanceId,
|
|
81
|
+
"extension.id": context.extensionId,
|
|
82
|
+
"extension.name": context.extensionName,
|
|
83
|
+
"extension.type": context.extensionType,
|
|
84
|
+
platform: context.platform
|
|
85
|
+
});
|
|
86
|
+
const contexts = pickBy(
|
|
87
|
+
{
|
|
88
|
+
"extension.data": pickByValidValues({
|
|
89
|
+
...context.extensionData
|
|
90
|
+
}),
|
|
91
|
+
site: pickByValidValues({
|
|
92
|
+
url: context.siteUrl,
|
|
93
|
+
id: context.tenantType === "SITE" ? context.tenantId : void 0
|
|
94
|
+
}),
|
|
95
|
+
account: pickByValidValues({
|
|
96
|
+
id: context.tenantType === "ACCOUNT" ? context.tenantId : void 0
|
|
97
|
+
})
|
|
98
|
+
},
|
|
99
|
+
(value) => !!value && Object.keys(value).length > 0
|
|
100
|
+
);
|
|
101
|
+
return {
|
|
102
|
+
tags,
|
|
103
|
+
contexts
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
var FallbackMonitoringClient = class {
|
|
107
|
+
constructor(message) {
|
|
108
|
+
this.message = message;
|
|
109
|
+
this.captureException = () => {
|
|
110
|
+
console.error(this.message);
|
|
111
|
+
};
|
|
112
|
+
this.captureMessage = () => {
|
|
113
|
+
console.error(this.message);
|
|
114
|
+
};
|
|
115
|
+
this.startSpan = (spanOptions, callback) => {
|
|
116
|
+
console.error(this.message);
|
|
117
|
+
return callback(void 0);
|
|
118
|
+
};
|
|
119
|
+
this.startSpanManual = () => {
|
|
120
|
+
console.error(this.message);
|
|
121
|
+
return {
|
|
122
|
+
end: () => {
|
|
123
|
+
},
|
|
124
|
+
fail: () => {
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
this.endSpanManual = () => {
|
|
129
|
+
console.error(this.message);
|
|
130
|
+
};
|
|
131
|
+
this.addBreadcrumb = () => {
|
|
132
|
+
console.error(this.message);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
var createFallbackMonitoringClient = (message) => {
|
|
137
|
+
return new FallbackMonitoringClient(message);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
// ../../node_modules/@wix/monitoring-common/build/index.js
|
|
143
|
+
var build_exports = {};
|
|
144
|
+
__export(build_exports, {
|
|
145
|
+
getCallLocation: () => getCallLocation,
|
|
146
|
+
getCallStack: () => getCallStack
|
|
147
|
+
});
|
|
148
|
+
var getCallStack, getCallLocation;
|
|
149
|
+
var init_build = __esm({
|
|
150
|
+
"../../node_modules/@wix/monitoring-common/build/index.js"() {
|
|
151
|
+
"use strict";
|
|
152
|
+
getCallStack = () => {
|
|
153
|
+
try {
|
|
154
|
+
throw new Error();
|
|
155
|
+
} catch (e) {
|
|
156
|
+
return e?.stack;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
getCallLocation = (stack) => {
|
|
160
|
+
stack = stack ?? getCallStack();
|
|
161
|
+
const frames = stack?.trim().split("\n");
|
|
162
|
+
if (!frames) {
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
for (let i = frames.length - 1; i >= 0; i--) {
|
|
166
|
+
const match = frames[i].match(/https?:\/\/.+?(\/.+):(\d+):(\d+)/) ?? frames[i].match(/.*(\/[^/]+):(\d+):(\d+)/);
|
|
167
|
+
if (match) {
|
|
168
|
+
return {
|
|
169
|
+
file: match[1],
|
|
170
|
+
line: parseInt(match[2], 10) ?? 0,
|
|
171
|
+
column: parseInt(match[3], 10) ?? 0
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return null;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// ../../node_modules/lodash/isObject.js
|
|
181
|
+
var require_isObject = __commonJS({
|
|
182
|
+
"../../node_modules/lodash/isObject.js"(exports, module) {
|
|
183
|
+
"use strict";
|
|
184
|
+
function isObject(value) {
|
|
185
|
+
var type = typeof value;
|
|
186
|
+
return value != null && (type == "object" || type == "function");
|
|
187
|
+
}
|
|
188
|
+
module.exports = isObject;
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
// ../../node_modules/lodash/_freeGlobal.js
|
|
193
|
+
var require_freeGlobal = __commonJS({
|
|
194
|
+
"../../node_modules/lodash/_freeGlobal.js"(exports, module) {
|
|
195
|
+
"use strict";
|
|
196
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
197
|
+
module.exports = freeGlobal;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
// ../../node_modules/lodash/_root.js
|
|
202
|
+
var require_root = __commonJS({
|
|
203
|
+
"../../node_modules/lodash/_root.js"(exports, module) {
|
|
204
|
+
"use strict";
|
|
205
|
+
var freeGlobal = require_freeGlobal();
|
|
206
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
207
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
208
|
+
module.exports = root;
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
// ../../node_modules/lodash/now.js
|
|
213
|
+
var require_now = __commonJS({
|
|
214
|
+
"../../node_modules/lodash/now.js"(exports, module) {
|
|
215
|
+
"use strict";
|
|
216
|
+
var root = require_root();
|
|
217
|
+
var now = function() {
|
|
218
|
+
return root.Date.now();
|
|
219
|
+
};
|
|
220
|
+
module.exports = now;
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
// ../../node_modules/lodash/_trimmedEndIndex.js
|
|
225
|
+
var require_trimmedEndIndex = __commonJS({
|
|
226
|
+
"../../node_modules/lodash/_trimmedEndIndex.js"(exports, module) {
|
|
227
|
+
"use strict";
|
|
228
|
+
var reWhitespace = /\s/;
|
|
229
|
+
function trimmedEndIndex(string) {
|
|
230
|
+
var index = string.length;
|
|
231
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
232
|
+
}
|
|
233
|
+
return index;
|
|
234
|
+
}
|
|
235
|
+
module.exports = trimmedEndIndex;
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
// ../../node_modules/lodash/_baseTrim.js
|
|
240
|
+
var require_baseTrim = __commonJS({
|
|
241
|
+
"../../node_modules/lodash/_baseTrim.js"(exports, module) {
|
|
242
|
+
"use strict";
|
|
243
|
+
var trimmedEndIndex = require_trimmedEndIndex();
|
|
244
|
+
var reTrimStart = /^\s+/;
|
|
245
|
+
function baseTrim(string) {
|
|
246
|
+
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
247
|
+
}
|
|
248
|
+
module.exports = baseTrim;
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
// ../../node_modules/lodash/_Symbol.js
|
|
253
|
+
var require_Symbol = __commonJS({
|
|
254
|
+
"../../node_modules/lodash/_Symbol.js"(exports, module) {
|
|
255
|
+
"use strict";
|
|
256
|
+
var root = require_root();
|
|
257
|
+
var Symbol2 = root.Symbol;
|
|
258
|
+
module.exports = Symbol2;
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
// ../../node_modules/lodash/_getRawTag.js
|
|
263
|
+
var require_getRawTag = __commonJS({
|
|
264
|
+
"../../node_modules/lodash/_getRawTag.js"(exports, module) {
|
|
265
|
+
"use strict";
|
|
266
|
+
var Symbol2 = require_Symbol();
|
|
267
|
+
var objectProto = Object.prototype;
|
|
268
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
269
|
+
var nativeObjectToString = objectProto.toString;
|
|
270
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
271
|
+
function getRawTag(value) {
|
|
272
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
273
|
+
try {
|
|
274
|
+
value[symToStringTag] = void 0;
|
|
275
|
+
var unmasked = true;
|
|
276
|
+
} catch (e) {
|
|
277
|
+
}
|
|
278
|
+
var result = nativeObjectToString.call(value);
|
|
279
|
+
if (unmasked) {
|
|
280
|
+
if (isOwn) {
|
|
281
|
+
value[symToStringTag] = tag;
|
|
282
|
+
} else {
|
|
283
|
+
delete value[symToStringTag];
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return result;
|
|
287
|
+
}
|
|
288
|
+
module.exports = getRawTag;
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
// ../../node_modules/lodash/_objectToString.js
|
|
293
|
+
var require_objectToString = __commonJS({
|
|
294
|
+
"../../node_modules/lodash/_objectToString.js"(exports, module) {
|
|
295
|
+
"use strict";
|
|
296
|
+
var objectProto = Object.prototype;
|
|
297
|
+
var nativeObjectToString = objectProto.toString;
|
|
298
|
+
function objectToString(value) {
|
|
299
|
+
return nativeObjectToString.call(value);
|
|
300
|
+
}
|
|
301
|
+
module.exports = objectToString;
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
// ../../node_modules/lodash/_baseGetTag.js
|
|
306
|
+
var require_baseGetTag = __commonJS({
|
|
307
|
+
"../../node_modules/lodash/_baseGetTag.js"(exports, module) {
|
|
308
|
+
"use strict";
|
|
309
|
+
var Symbol2 = require_Symbol();
|
|
310
|
+
var getRawTag = require_getRawTag();
|
|
311
|
+
var objectToString = require_objectToString();
|
|
312
|
+
var nullTag = "[object Null]";
|
|
313
|
+
var undefinedTag = "[object Undefined]";
|
|
314
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
315
|
+
function baseGetTag(value) {
|
|
316
|
+
if (value == null) {
|
|
317
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
318
|
+
}
|
|
319
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
320
|
+
}
|
|
321
|
+
module.exports = baseGetTag;
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// ../../node_modules/lodash/isObjectLike.js
|
|
326
|
+
var require_isObjectLike = __commonJS({
|
|
327
|
+
"../../node_modules/lodash/isObjectLike.js"(exports, module) {
|
|
328
|
+
"use strict";
|
|
329
|
+
function isObjectLike(value) {
|
|
330
|
+
return value != null && typeof value == "object";
|
|
331
|
+
}
|
|
332
|
+
module.exports = isObjectLike;
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
// ../../node_modules/lodash/isSymbol.js
|
|
337
|
+
var require_isSymbol = __commonJS({
|
|
338
|
+
"../../node_modules/lodash/isSymbol.js"(exports, module) {
|
|
339
|
+
"use strict";
|
|
340
|
+
var baseGetTag = require_baseGetTag();
|
|
341
|
+
var isObjectLike = require_isObjectLike();
|
|
342
|
+
var symbolTag = "[object Symbol]";
|
|
343
|
+
function isSymbol(value) {
|
|
344
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
345
|
+
}
|
|
346
|
+
module.exports = isSymbol;
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
// ../../node_modules/lodash/toNumber.js
|
|
351
|
+
var require_toNumber = __commonJS({
|
|
352
|
+
"../../node_modules/lodash/toNumber.js"(exports, module) {
|
|
353
|
+
"use strict";
|
|
354
|
+
var baseTrim = require_baseTrim();
|
|
355
|
+
var isObject = require_isObject();
|
|
356
|
+
var isSymbol = require_isSymbol();
|
|
357
|
+
var NAN = 0 / 0;
|
|
358
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
359
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
360
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
361
|
+
var freeParseInt = parseInt;
|
|
362
|
+
function toNumber(value) {
|
|
363
|
+
if (typeof value == "number") {
|
|
364
|
+
return value;
|
|
365
|
+
}
|
|
366
|
+
if (isSymbol(value)) {
|
|
367
|
+
return NAN;
|
|
368
|
+
}
|
|
369
|
+
if (isObject(value)) {
|
|
370
|
+
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
371
|
+
value = isObject(other) ? other + "" : other;
|
|
372
|
+
}
|
|
373
|
+
if (typeof value != "string") {
|
|
374
|
+
return value === 0 ? value : +value;
|
|
375
|
+
}
|
|
376
|
+
value = baseTrim(value);
|
|
377
|
+
var isBinary = reIsBinary.test(value);
|
|
378
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
379
|
+
}
|
|
380
|
+
module.exports = toNumber;
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
// ../../node_modules/lodash/debounce.js
|
|
385
|
+
var require_debounce = __commonJS({
|
|
386
|
+
"../../node_modules/lodash/debounce.js"(exports, module) {
|
|
387
|
+
"use strict";
|
|
388
|
+
var isObject = require_isObject();
|
|
389
|
+
var now = require_now();
|
|
390
|
+
var toNumber = require_toNumber();
|
|
391
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
392
|
+
var nativeMax = Math.max;
|
|
393
|
+
var nativeMin = Math.min;
|
|
394
|
+
function debounce(func, wait, options) {
|
|
395
|
+
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
396
|
+
if (typeof func != "function") {
|
|
397
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
398
|
+
}
|
|
399
|
+
wait = toNumber(wait) || 0;
|
|
400
|
+
if (isObject(options)) {
|
|
401
|
+
leading = !!options.leading;
|
|
402
|
+
maxing = "maxWait" in options;
|
|
403
|
+
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
404
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
405
|
+
}
|
|
406
|
+
function invokeFunc(time) {
|
|
407
|
+
var args = lastArgs, thisArg = lastThis;
|
|
408
|
+
lastArgs = lastThis = void 0;
|
|
409
|
+
lastInvokeTime = time;
|
|
410
|
+
result = func.apply(thisArg, args);
|
|
411
|
+
return result;
|
|
412
|
+
}
|
|
413
|
+
function leadingEdge(time) {
|
|
414
|
+
lastInvokeTime = time;
|
|
415
|
+
timerId = setTimeout(timerExpired, wait);
|
|
416
|
+
return leading ? invokeFunc(time) : result;
|
|
417
|
+
}
|
|
418
|
+
function remainingWait(time) {
|
|
419
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
420
|
+
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
421
|
+
}
|
|
422
|
+
function shouldInvoke(time) {
|
|
423
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
424
|
+
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
425
|
+
}
|
|
426
|
+
function timerExpired() {
|
|
427
|
+
var time = now();
|
|
428
|
+
if (shouldInvoke(time)) {
|
|
429
|
+
return trailingEdge(time);
|
|
430
|
+
}
|
|
431
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
432
|
+
}
|
|
433
|
+
function trailingEdge(time) {
|
|
434
|
+
timerId = void 0;
|
|
435
|
+
if (trailing && lastArgs) {
|
|
436
|
+
return invokeFunc(time);
|
|
437
|
+
}
|
|
438
|
+
lastArgs = lastThis = void 0;
|
|
439
|
+
return result;
|
|
440
|
+
}
|
|
441
|
+
function cancel() {
|
|
442
|
+
if (timerId !== void 0) {
|
|
443
|
+
clearTimeout(timerId);
|
|
444
|
+
}
|
|
445
|
+
lastInvokeTime = 0;
|
|
446
|
+
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
447
|
+
}
|
|
448
|
+
function flush() {
|
|
449
|
+
return timerId === void 0 ? result : trailingEdge(now());
|
|
450
|
+
}
|
|
451
|
+
function debounced() {
|
|
452
|
+
var time = now(), isInvoking = shouldInvoke(time);
|
|
453
|
+
lastArgs = arguments;
|
|
454
|
+
lastThis = this;
|
|
455
|
+
lastCallTime = time;
|
|
456
|
+
if (isInvoking) {
|
|
457
|
+
if (timerId === void 0) {
|
|
458
|
+
return leadingEdge(lastCallTime);
|
|
459
|
+
}
|
|
460
|
+
if (maxing) {
|
|
461
|
+
clearTimeout(timerId);
|
|
462
|
+
timerId = setTimeout(timerExpired, wait);
|
|
463
|
+
return invokeFunc(lastCallTime);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
if (timerId === void 0) {
|
|
467
|
+
timerId = setTimeout(timerExpired, wait);
|
|
468
|
+
}
|
|
469
|
+
return result;
|
|
470
|
+
}
|
|
471
|
+
debounced.cancel = cancel;
|
|
472
|
+
debounced.flush = flush;
|
|
473
|
+
return debounced;
|
|
474
|
+
}
|
|
475
|
+
module.exports = debounce;
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
// ../../node_modules/lodash/throttle.js
|
|
480
|
+
var require_throttle = __commonJS({
|
|
481
|
+
"../../node_modules/lodash/throttle.js"(exports, module) {
|
|
482
|
+
"use strict";
|
|
483
|
+
var debounce = require_debounce();
|
|
484
|
+
var isObject = require_isObject();
|
|
485
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
486
|
+
function throttle(func, wait, options) {
|
|
487
|
+
var leading = true, trailing = true;
|
|
488
|
+
if (typeof func != "function") {
|
|
489
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
490
|
+
}
|
|
491
|
+
if (isObject(options)) {
|
|
492
|
+
leading = "leading" in options ? !!options.leading : leading;
|
|
493
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
494
|
+
}
|
|
495
|
+
return debounce(func, wait, {
|
|
496
|
+
"leading": leading,
|
|
497
|
+
"maxWait": wait,
|
|
498
|
+
"trailing": trailing
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
module.exports = throttle;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
|
|
505
|
+
// ../../node_modules/@wix/monitoring-velo/build/index.cjs
|
|
506
|
+
var require_build2 = __commonJS({
|
|
507
|
+
"../../node_modules/@wix/monitoring-velo/build/index.cjs"(exports, module) {
|
|
508
|
+
"use strict";
|
|
509
|
+
var __create2 = Object.create;
|
|
510
|
+
var __defProp2 = Object.defineProperty;
|
|
511
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
512
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
513
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
514
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
515
|
+
var __export2 = (target, all) => {
|
|
516
|
+
for (var name in all)
|
|
517
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
518
|
+
};
|
|
519
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
520
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
521
|
+
for (let key of __getOwnPropNames2(from))
|
|
522
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
523
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
524
|
+
}
|
|
525
|
+
return to;
|
|
526
|
+
};
|
|
527
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
528
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
529
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
530
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
531
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
532
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
533
|
+
mod
|
|
534
|
+
));
|
|
535
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
536
|
+
var index_exports = {};
|
|
537
|
+
__export2(index_exports, {
|
|
538
|
+
createVeloMonitoringClient: () => createVeloMonitoringClient2
|
|
539
|
+
});
|
|
540
|
+
module.exports = __toCommonJS2(index_exports);
|
|
541
|
+
var import_monitoring = require_build();
|
|
542
|
+
var import_monitoring_common = (init_build(), __toCommonJS(build_exports));
|
|
543
|
+
var generateId = () => {
|
|
544
|
+
return typeof crypto !== "undefined" && typeof crypto.randomUUID === "function" ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
545
|
+
const i = 16 * Math.random() | 0;
|
|
546
|
+
return ("x" === e ? i : 3 & i | 8).toString(16);
|
|
547
|
+
});
|
|
548
|
+
};
|
|
549
|
+
var stringifySafe = (value) => {
|
|
550
|
+
try {
|
|
551
|
+
return JSON.stringify(value);
|
|
552
|
+
} catch (error) {
|
|
553
|
+
return `Failed to stringify log value: ${error?.toString()}`;
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
var buildTelemetryPayload = (options, params) => {
|
|
557
|
+
const { namespace, producer, req, requestId } = options;
|
|
558
|
+
const {
|
|
559
|
+
message,
|
|
560
|
+
level = "INFO",
|
|
561
|
+
timestamp = Date.now(),
|
|
562
|
+
tags,
|
|
563
|
+
contexts
|
|
564
|
+
} = params;
|
|
565
|
+
const { __sourceLocation, ...restOfContext } = contexts ?? {};
|
|
566
|
+
let siteUrl = "";
|
|
567
|
+
if (req) {
|
|
568
|
+
try {
|
|
569
|
+
if (req.headers.get("referer")) {
|
|
570
|
+
siteUrl = new URL(req.headers.get("referer") ?? "").origin;
|
|
571
|
+
} else {
|
|
572
|
+
siteUrl = new URL(req.url).origin;
|
|
573
|
+
}
|
|
574
|
+
} catch (e) {
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
const messageParts = [message];
|
|
578
|
+
if (tags) {
|
|
579
|
+
messageParts.push(stringifySafe(tags));
|
|
580
|
+
}
|
|
581
|
+
if (Object.keys(restOfContext).length > 0) {
|
|
582
|
+
messageParts.push(stringifySafe(restOfContext));
|
|
583
|
+
}
|
|
584
|
+
const sourceLocation = __sourceLocation ?? (0, import_monitoring_common.getCallLocation)();
|
|
585
|
+
return {
|
|
586
|
+
insertId: generateId(),
|
|
587
|
+
timestamp: new Date(timestamp).toISOString(),
|
|
588
|
+
severity: level.toUpperCase(),
|
|
589
|
+
labels: {
|
|
590
|
+
tenantId: "",
|
|
591
|
+
namespace,
|
|
592
|
+
...siteUrl ? { siteUrl } : {}
|
|
593
|
+
},
|
|
594
|
+
operation: {
|
|
595
|
+
id: requestId ?? generateId(),
|
|
596
|
+
producer
|
|
597
|
+
},
|
|
598
|
+
...sourceLocation ? { sourceLocation } : {},
|
|
599
|
+
jsonPayload: {
|
|
600
|
+
message: messageParts.join(" ")
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
var TELEMETRY_URL = "https://www.wixapis.com/wixcode/v1/telemetry/telemetry-messages";
|
|
605
|
+
var MAX_BATCH_SIZE = 100;
|
|
606
|
+
var THROTTLE_DURATION = 300;
|
|
607
|
+
var report = async (messages, authToken = "", fetch = globalThis.fetch) => {
|
|
608
|
+
try {
|
|
609
|
+
await fetch(TELEMETRY_URL, {
|
|
610
|
+
method: "POST",
|
|
611
|
+
body: JSON.stringify({ messages }),
|
|
612
|
+
headers: {
|
|
613
|
+
Authorization: authToken
|
|
614
|
+
}
|
|
615
|
+
});
|
|
616
|
+
} catch (_e) {
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
var import_throttle = __toESM2(require_throttle(), 1);
|
|
620
|
+
var BatchQueue = class {
|
|
621
|
+
constructor(options) {
|
|
622
|
+
this.options = options;
|
|
623
|
+
this.queue = [];
|
|
624
|
+
this.batchQueuePromise = null;
|
|
625
|
+
this.resolveBatchQueuePromise = null;
|
|
626
|
+
this.flushThrottled = (0, import_throttle.default)(
|
|
627
|
+
() => this.flush(),
|
|
628
|
+
options.throttleDuration,
|
|
629
|
+
{
|
|
630
|
+
leading: false
|
|
631
|
+
}
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
flush() {
|
|
635
|
+
const events = this.queue.splice(0);
|
|
636
|
+
this.options.flushHandler(events).then(() => {
|
|
637
|
+
this.resolveBatchQueuePromise?.();
|
|
638
|
+
this.resolveBatchQueuePromise = null;
|
|
639
|
+
});
|
|
640
|
+
this.batchQueuePromise = null;
|
|
641
|
+
}
|
|
642
|
+
enqueue(payload) {
|
|
643
|
+
this.queue.push(payload);
|
|
644
|
+
if (!this.batchQueuePromise) {
|
|
645
|
+
this.batchQueuePromise = new Promise((resolve) => {
|
|
646
|
+
this.resolveBatchQueuePromise = resolve;
|
|
647
|
+
});
|
|
648
|
+
this.options.onBatchQueueCreated?.(this.batchQueuePromise);
|
|
649
|
+
}
|
|
650
|
+
if (this.queue.length === this.options.maxBatchSize) {
|
|
651
|
+
this.flushThrottled.cancel();
|
|
652
|
+
this.flush();
|
|
653
|
+
} else {
|
|
654
|
+
this.flushThrottled();
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
var isPromise = (value) => typeof value?.then === "function";
|
|
659
|
+
var import_monitoring_common2 = (init_build(), __toCommonJS(build_exports));
|
|
660
|
+
var VeloClient = class {
|
|
661
|
+
constructor(options) {
|
|
662
|
+
this.options = options;
|
|
663
|
+
this.reportError = (captureContext = {}, e) => {
|
|
664
|
+
const { tags, contexts } = captureContext;
|
|
665
|
+
const messagePayload = buildTelemetryPayload(this.options, {
|
|
666
|
+
message: e?.toString() ?? "Unknown error",
|
|
667
|
+
level: "error",
|
|
668
|
+
tags,
|
|
669
|
+
contexts: {
|
|
670
|
+
__sourceLocation: (0, import_monitoring_common2.getCallLocation)(e?.stack),
|
|
671
|
+
...contexts
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
this.batchQueue.enqueue(messagePayload);
|
|
675
|
+
};
|
|
676
|
+
this.captureException = (error, captureContext) => {
|
|
677
|
+
this.reportError(captureContext, error);
|
|
678
|
+
};
|
|
679
|
+
this.captureMessage = (message, captureContext = {}) => {
|
|
680
|
+
const { level = "info", tags, contexts } = captureContext;
|
|
681
|
+
const messagePayload = buildTelemetryPayload(this.options, {
|
|
682
|
+
message,
|
|
683
|
+
level,
|
|
684
|
+
tags,
|
|
685
|
+
contexts
|
|
686
|
+
});
|
|
687
|
+
this.batchQueue.enqueue(messagePayload);
|
|
688
|
+
};
|
|
689
|
+
this.startSpan = (spanOptions, callback) => {
|
|
690
|
+
let res;
|
|
691
|
+
try {
|
|
692
|
+
res = callback();
|
|
693
|
+
if (isPromise(res)) {
|
|
694
|
+
res = res.then((_res) => {
|
|
695
|
+
return _res;
|
|
696
|
+
}).catch((e) => {
|
|
697
|
+
this.reportError(spanOptions, e);
|
|
698
|
+
throw e;
|
|
699
|
+
});
|
|
700
|
+
} else {
|
|
701
|
+
}
|
|
702
|
+
} catch (e) {
|
|
703
|
+
this.reportError(spanOptions, e);
|
|
704
|
+
throw e;
|
|
705
|
+
}
|
|
706
|
+
return res;
|
|
707
|
+
};
|
|
708
|
+
this.addBreadcrumb = (breadcrumb) => {
|
|
709
|
+
};
|
|
710
|
+
const { getAuthToken, fetch } = options;
|
|
711
|
+
this.batchQueue = new BatchQueue({
|
|
712
|
+
maxBatchSize: MAX_BATCH_SIZE,
|
|
713
|
+
throttleDuration: THROTTLE_DURATION,
|
|
714
|
+
flushHandler: (messages) => getAuthToken().then((token) => report(messages, token, fetch)),
|
|
715
|
+
onBatchQueueCreated: options.onBatchQueueCreated
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
startSpanManual(spanOptions) {
|
|
719
|
+
return {
|
|
720
|
+
end: () => {
|
|
721
|
+
},
|
|
722
|
+
fail: (error) => {
|
|
723
|
+
this.reportError(spanOptions, error);
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
endSpanManual(spanOptions) {
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
var createVeloMonitoringClient2 = (options) => {
|
|
731
|
+
const { getAuthToken } = options;
|
|
732
|
+
if (!getAuthToken) {
|
|
733
|
+
return (0, import_monitoring.createFallbackMonitoringClient)("Missing getAuthToken");
|
|
734
|
+
}
|
|
735
|
+
return new VeloClient(options);
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
|
|
1
740
|
// src/client-context/setup.ts
|
|
2
|
-
import { wixContext } from "@wix/sdk-context";
|
|
741
|
+
import { wixContext as wixContext2 } from "@wix/sdk-context";
|
|
742
|
+
|
|
743
|
+
// ../../node_modules/@wix/headless-site/dist/esm/host-module.js
|
|
744
|
+
var import_monitoring_velo = __toESM(require_build2());
|
|
3
745
|
|
|
4
746
|
// ../../node_modules/@wix/headless-site/dist/esm/headers/common-config-header.js
|
|
5
747
|
var COMMON_CONFIG_HEADER_NAME = "commonConfig";
|
|
@@ -46,6 +788,99 @@ var getPassThroughHeaders = () => {
|
|
|
46
788
|
}, {});
|
|
47
789
|
};
|
|
48
790
|
|
|
791
|
+
// ../../node_modules/@wix/sdk-runtime/build/context.js
|
|
792
|
+
import { wixContext } from "@wix/sdk-context";
|
|
793
|
+
function resolveContext() {
|
|
794
|
+
const oldContext = typeof $wixContext !== "undefined" && $wixContext.initWixModules ? $wixContext.initWixModules : typeof globalThis.__wix_context__ !== "undefined" && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
795
|
+
if (oldContext) {
|
|
796
|
+
return {
|
|
797
|
+
// @ts-expect-error
|
|
798
|
+
initWixModules(modules, elevated) {
|
|
799
|
+
return runWithoutContext(() => oldContext(modules, elevated));
|
|
800
|
+
},
|
|
801
|
+
fetchWithAuth() {
|
|
802
|
+
throw new Error("fetchWithAuth is not available in this context");
|
|
803
|
+
},
|
|
804
|
+
graphql() {
|
|
805
|
+
throw new Error("graphql is not available in this context");
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
const contextualClient = typeof $wixContext !== "undefined" ? $wixContext.client : typeof wixContext.client !== "undefined" ? wixContext.client : typeof globalThis.__wix_context__ !== "undefined" ? globalThis.__wix_context__.client : void 0;
|
|
810
|
+
const elevatedClient = typeof $wixContext !== "undefined" ? $wixContext.elevatedClient : typeof wixContext.elevatedClient !== "undefined" ? wixContext.elevatedClient : typeof globalThis.__wix_context__ !== "undefined" ? globalThis.__wix_context__.elevatedClient : void 0;
|
|
811
|
+
if (!contextualClient && !elevatedClient) {
|
|
812
|
+
return;
|
|
813
|
+
}
|
|
814
|
+
return {
|
|
815
|
+
initWixModules(wixModules, elevated) {
|
|
816
|
+
if (elevated) {
|
|
817
|
+
if (!elevatedClient) {
|
|
818
|
+
throw new Error("An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules");
|
|
819
|
+
}
|
|
820
|
+
return runWithoutContext(() => elevatedClient.use(wixModules));
|
|
821
|
+
}
|
|
822
|
+
if (!contextualClient) {
|
|
823
|
+
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
824
|
+
}
|
|
825
|
+
return runWithoutContext(() => contextualClient.use(wixModules));
|
|
826
|
+
},
|
|
827
|
+
fetchWithAuth: (urlOrRequest, requestInit) => {
|
|
828
|
+
if (!contextualClient) {
|
|
829
|
+
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
830
|
+
}
|
|
831
|
+
return contextualClient.fetchWithAuth(urlOrRequest, requestInit);
|
|
832
|
+
},
|
|
833
|
+
getAuth() {
|
|
834
|
+
if (!contextualClient) {
|
|
835
|
+
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
836
|
+
}
|
|
837
|
+
return contextualClient.auth;
|
|
838
|
+
},
|
|
839
|
+
async graphql(query, variables, opts) {
|
|
840
|
+
if (!contextualClient) {
|
|
841
|
+
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
842
|
+
}
|
|
843
|
+
return contextualClient.graphql(query, variables, opts);
|
|
844
|
+
}
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
function runWithoutContext(fn) {
|
|
848
|
+
const globalContext = globalThis.__wix_context__;
|
|
849
|
+
const moduleContext = {
|
|
850
|
+
client: wixContext.client,
|
|
851
|
+
elevatedClient: wixContext.elevatedClient
|
|
852
|
+
};
|
|
853
|
+
let closureContext;
|
|
854
|
+
globalThis.__wix_context__ = void 0;
|
|
855
|
+
wixContext.client = void 0;
|
|
856
|
+
wixContext.elevatedClient = void 0;
|
|
857
|
+
if (typeof $wixContext !== "undefined") {
|
|
858
|
+
closureContext = {
|
|
859
|
+
client: $wixContext?.client,
|
|
860
|
+
elevatedClient: $wixContext?.elevatedClient
|
|
861
|
+
};
|
|
862
|
+
delete $wixContext.client;
|
|
863
|
+
delete $wixContext.elevatedClient;
|
|
864
|
+
}
|
|
865
|
+
try {
|
|
866
|
+
return fn();
|
|
867
|
+
} finally {
|
|
868
|
+
globalThis.__wix_context__ = globalContext;
|
|
869
|
+
wixContext.client = moduleContext.client;
|
|
870
|
+
wixContext.elevatedClient = moduleContext.elevatedClient;
|
|
871
|
+
if (typeof $wixContext !== "undefined") {
|
|
872
|
+
$wixContext.client = closureContext.client;
|
|
873
|
+
$wixContext.elevatedClient = closureContext.elevatedClient;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
// ../../node_modules/@wix/headless-site/dist/esm/utils/auth-utils.js
|
|
879
|
+
var resolveAuthToken = () => {
|
|
880
|
+
var _resolveContext;
|
|
881
|
+
return (_resolveContext = resolveContext()) == null ? void 0 : _resolveContext.getAuth().getTokens().accessToken.value;
|
|
882
|
+
};
|
|
883
|
+
|
|
49
884
|
// ../../node_modules/@wix/headless-site/dist/esm/host-module.js
|
|
50
885
|
var createHostModule = () => {
|
|
51
886
|
return {
|
|
@@ -58,7 +893,24 @@ var createHostModule = () => {
|
|
|
58
893
|
essentials: {
|
|
59
894
|
get passThroughHeaders() {
|
|
60
895
|
return getPassThroughHeaders();
|
|
896
|
+
},
|
|
897
|
+
language: "en",
|
|
898
|
+
locale: "en-US",
|
|
899
|
+
timezone: "UTC"
|
|
900
|
+
},
|
|
901
|
+
getMonitoringClient: () => {
|
|
902
|
+
let producer = "unknown";
|
|
903
|
+
let req;
|
|
904
|
+
if (typeof document !== "undefined") {
|
|
905
|
+
producer = document.location.href;
|
|
906
|
+
req = new Request(document.location.href);
|
|
61
907
|
}
|
|
908
|
+
return (0, import_monitoring_velo.createVeloMonitoringClient)({
|
|
909
|
+
namespace: "Headless",
|
|
910
|
+
producer,
|
|
911
|
+
getAuthToken: async () => resolveAuthToken(),
|
|
912
|
+
req
|
|
913
|
+
});
|
|
62
914
|
}
|
|
63
915
|
};
|
|
64
916
|
}
|
|
@@ -117,7 +969,7 @@ function isCookieValue(value) {
|
|
|
117
969
|
|
|
118
970
|
// src/client-context/setup.ts
|
|
119
971
|
function setup(options) {
|
|
120
|
-
if (
|
|
972
|
+
if (wixContext2.client != null) {
|
|
121
973
|
return;
|
|
122
974
|
}
|
|
123
975
|
if (!location.pathname.startsWith("/_wix/extensions/backoffice")) {
|