@konnectio/core 4.5.7 → 4.5.9
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/README.md +274 -274
- package/dist/{ActionField-DlqhtdHW.js → ActionField-DyjxZZyN.js} +2 -2
- package/dist/ActionField-DyjxZZyN.js.br +0 -0
- package/dist/ActionField-DyjxZZyN.js.gz +3 -0
- package/dist/{AvailabilitySkeleton-DVRsnt_Y.js → AvailabilitySkeleton-CvLRIPE0.js} +3 -3
- package/dist/AvailabilitySkeleton-CvLRIPE0.js.br +0 -0
- package/dist/AvailabilitySkeleton-CvLRIPE0.js.gz +0 -0
- package/dist/{CheckoutWindow-Cx1MBwXg.js → CheckoutWindow-BRCeuWbT.js} +5 -5
- package/dist/CheckoutWindow-BRCeuWbT.js.br +0 -0
- package/dist/CheckoutWindow-BRCeuWbT.js.gz +0 -0
- package/dist/{ErrorMessage-B6saHmHE.js → ErrorMessage-l1MRSwlZ.js} +2 -2
- package/dist/ErrorMessage-l1MRSwlZ.js.br +0 -0
- package/dist/ErrorMessage-l1MRSwlZ.js.gz +0 -0
- package/dist/{EventAvailabilityForm-Dy1fXJzt.js → EventAvailabilityForm-B3hxMqPk.js} +3 -3
- package/dist/EventAvailabilityForm-B3hxMqPk.js.br +0 -0
- package/dist/EventAvailabilityForm-B3hxMqPk.js.gz +0 -0
- package/dist/{Field-BjtJJFJG.js → Field-DSIOH875.js} +6 -6
- package/dist/Field-DSIOH875.js.br +0 -0
- package/dist/Field-DSIOH875.js.gz +0 -0
- package/dist/{HotelAvailabilityForm-DxA1wrkE.js → HotelAvailabilityForm-pH7a7asC.js} +89 -83
- package/dist/HotelAvailabilityForm-pH7a7asC.js.br +0 -0
- package/dist/HotelAvailabilityForm-pH7a7asC.js.gz +0 -0
- package/dist/{SelectField-CfD2awPl.js → SelectField-DYAslcYJ.js} +216 -215
- package/dist/SelectField-DYAslcYJ.js.br +0 -0
- package/dist/SelectField-DYAslcYJ.js.gz +0 -0
- package/dist/{TermsOfService-C6R8tC_d.js → TermsOfService-B6eru9e1.js} +3 -3
- package/dist/TermsOfService-B6eru9e1.js.br +0 -0
- package/dist/TermsOfService-B6eru9e1.js.gz +0 -0
- package/dist/{_-13YE3WJt.js → _-DWVjjr86.js} +1 -1
- package/dist/_-DWVjjr86.js.br +0 -0
- package/dist/_-DWVjjr86.js.gz +0 -0
- package/dist/availability.js +9 -9
- package/dist/availability.js.br +0 -0
- package/dist/availability.js.gz +0 -0
- package/dist/cancel-reservation.js +6 -6
- package/dist/cancel-reservation.js.br +0 -0
- package/dist/cancel-reservation.js.gz +0 -0
- package/dist/chunk-BPfpcrXh.js.gz +0 -0
- package/dist/core.css +1 -1
- package/dist/core.css.br +0 -0
- package/dist/core.css.gz +0 -0
- package/dist/deep-link.js.gz +0 -0
- package/dist/{dist-CcS6KL-S.js → dist-DD6lclAX.js} +560 -228
- package/dist/dist-DD6lclAX.js.br +0 -0
- package/dist/dist-DD6lclAX.js.gz +0 -0
- package/dist/event.js +17 -17
- package/dist/event.js.br +0 -0
- package/dist/event.js.gz +0 -0
- package/dist/gift-card-validation.js +9 -9
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card-validation.js.gz +0 -0
- package/dist/gift-card.js +12 -12
- package/dist/gift-card.js.br +0 -0
- package/dist/gift-card.js.gz +0 -0
- package/dist/{giftCard-3Rb6QoQd.js → giftCard-BwZuGOwg.js} +1 -1
- package/dist/giftCard-BwZuGOwg.js.br +0 -0
- package/dist/giftCard-BwZuGOwg.js.gz +0 -0
- package/dist/hotel.js +21 -21
- package/dist/hotel.js.br +0 -0
- package/dist/hotel.js.gz +0 -0
- package/dist/{masonry.plugin-BfiSV-UY.js → masonry.plugin-BtDSdMW6.js} +15 -15
- package/dist/masonry.plugin-BtDSdMW6.js.br +0 -0
- package/dist/masonry.plugin-BtDSdMW6.js.gz +0 -0
- package/dist/mitt-Dp_pykgV.js.gz +0 -0
- package/dist/polyfill.js +1 -1
- package/dist/polyfill.js.br +0 -0
- package/dist/polyfill.js.gz +0 -0
- package/dist/{style-Bpqv9k-3.js → style-CBzCVvI0.js} +1 -1
- package/dist/style-CBzCVvI0.js.br +0 -0
- package/dist/style-CBzCVvI0.js.gz +0 -0
- package/package.json +121 -121
- package/dist/ActionField-DlqhtdHW.js.br +0 -0
- package/dist/ActionField-DlqhtdHW.js.gz +0 -0
- package/dist/AvailabilitySkeleton-DVRsnt_Y.js.br +0 -0
- package/dist/AvailabilitySkeleton-DVRsnt_Y.js.gz +0 -0
- package/dist/CheckoutWindow-Cx1MBwXg.js.br +0 -0
- package/dist/CheckoutWindow-Cx1MBwXg.js.gz +0 -0
- package/dist/ErrorMessage-B6saHmHE.js.br +0 -0
- package/dist/ErrorMessage-B6saHmHE.js.gz +0 -0
- package/dist/EventAvailabilityForm-Dy1fXJzt.js.br +0 -0
- package/dist/EventAvailabilityForm-Dy1fXJzt.js.gz +0 -0
- package/dist/Field-BjtJJFJG.js.br +0 -0
- package/dist/Field-BjtJJFJG.js.gz +0 -0
- package/dist/HotelAvailabilityForm-DxA1wrkE.js.br +0 -0
- package/dist/HotelAvailabilityForm-DxA1wrkE.js.gz +0 -0
- package/dist/SelectField-CfD2awPl.js.br +0 -0
- package/dist/SelectField-CfD2awPl.js.gz +0 -0
- package/dist/TermsOfService-C6R8tC_d.js.br +0 -0
- package/dist/TermsOfService-C6R8tC_d.js.gz +0 -4
- package/dist/_-13YE3WJt.js.br +0 -0
- package/dist/_-13YE3WJt.js.gz +0 -5
- package/dist/dist-CcS6KL-S.js.br +0 -0
- package/dist/dist-CcS6KL-S.js.gz +0 -0
- package/dist/giftCard-3Rb6QoQd.js.br +0 -0
- package/dist/giftCard-3Rb6QoQd.js.gz +0 -0
- package/dist/masonry.plugin-BfiSV-UY.js.br +0 -0
- package/dist/masonry.plugin-BfiSV-UY.js.gz +0 -0
- package/dist/style-Bpqv9k-3.js.br +0 -0
- package/dist/style-Bpqv9k-3.js.gz +0 -0
- package/dist-wix/availability.js +0 -594
- package/dist-wix/event.js +0 -595
- package/dist-wix/gift-card-validation.js +0 -584
- package/dist-wix/gift-card.js +0 -593
- package/dist-wix/hotel.js +0 -595
|
@@ -176,48 +176,14 @@ var s = /* @__PURE__ */ t(((e, t) => {
|
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
178
|
});
|
|
179
|
-
})))(), 1);
|
|
180
|
-
function
|
|
181
|
-
|
|
182
|
-
let t = window.flare;
|
|
183
|
-
t && e.error instanceof Error && t.reportSilently(e.error);
|
|
184
|
-
}), window.addEventListener("unhandledrejection", (e) => {
|
|
185
|
-
let t = window.flare;
|
|
186
|
-
if (!t) return;
|
|
187
|
-
let n = e.reason;
|
|
188
|
-
if (n instanceof Error) {
|
|
189
|
-
t.reportSilently(n);
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
if (d(n)) {
|
|
193
|
-
let e = Error(u(n));
|
|
194
|
-
e.stack = n.stack, t.reportSilently(e);
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
Promise.resolve(t.reportUnhandledRejection(u(n))).catch(() => {});
|
|
198
|
-
}));
|
|
199
|
-
}
|
|
200
|
-
function u(e) {
|
|
201
|
-
if (typeof e == "string") return e;
|
|
202
|
-
if (e && typeof e == "object") {
|
|
203
|
-
let t = e.message;
|
|
204
|
-
if (typeof t == "string") return t;
|
|
205
|
-
try {
|
|
206
|
-
return JSON.stringify(e);
|
|
207
|
-
} catch {
|
|
208
|
-
return "Unhandled promise rejection (non-serializable reason)";
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return String(e);
|
|
212
|
-
}
|
|
213
|
-
function d(e) {
|
|
214
|
-
return typeof e == "object" && !!e && "stack" in e && typeof e.stack == "string";
|
|
179
|
+
})))(), 1), l = typeof process < "u" ? "2.4.0" : "?", u = "5pqzBljrmDvquWZYSrSUKldIUREtPyB3", d = "\"4.5.9\"";
|
|
180
|
+
function f(e, t, n) {
|
|
181
|
+
return n && !e && console.error(`Flare JavaScript client v${l}: ${t}`), !!e;
|
|
215
182
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return n && !e && console.error(`Flare JavaScript client v${f}: ${t}`), !!e;
|
|
183
|
+
function p(e, t) {
|
|
184
|
+
return f(e, "The client was not yet initialised with an API key. Run client.light('<flare-project-key>') when you initialise your app. If you are running in dev mode and didn't run the light command on purpose, you can ignore this error.", t);
|
|
219
185
|
}
|
|
220
|
-
function
|
|
186
|
+
function m(e) {
|
|
221
187
|
if (e instanceof Error) return e;
|
|
222
188
|
if (typeof e == "string") return Error(e);
|
|
223
189
|
if (typeof e == "object" && e) {
|
|
@@ -226,23 +192,20 @@ function g(e) {
|
|
|
226
192
|
}
|
|
227
193
|
return Error(String(e));
|
|
228
194
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
var v = 64;
|
|
233
|
-
function y(e) {
|
|
195
|
+
var h = 64;
|
|
196
|
+
function g(e) {
|
|
234
197
|
let t = e.code;
|
|
235
|
-
if (!(typeof t != "string" || t.length === 0)) return t.slice(0,
|
|
198
|
+
if (!(typeof t != "string" || t.length === 0)) return t.slice(0, h);
|
|
236
199
|
}
|
|
237
|
-
function
|
|
238
|
-
return JSON.stringify(
|
|
200
|
+
function _(e) {
|
|
201
|
+
return JSON.stringify(y(e));
|
|
239
202
|
}
|
|
240
|
-
function
|
|
203
|
+
function v(e) {
|
|
241
204
|
if (typeof e != "object" || !e) return !1;
|
|
242
205
|
let t = Object.getPrototypeOf(e);
|
|
243
206
|
return t === Object.prototype || t === null;
|
|
244
207
|
}
|
|
245
|
-
function
|
|
208
|
+
function y(e) {
|
|
246
209
|
let t = /* @__PURE__ */ new WeakSet();
|
|
247
210
|
function n(e) {
|
|
248
211
|
if (Array.isArray(e)) {
|
|
@@ -251,7 +214,7 @@ function ne(e) {
|
|
|
251
214
|
let r = e.map(n);
|
|
252
215
|
return t.delete(e), r;
|
|
253
216
|
}
|
|
254
|
-
if (
|
|
217
|
+
if (v(e)) {
|
|
255
218
|
if (t.has(e)) return "[Circular]";
|
|
256
219
|
t.add(e);
|
|
257
220
|
let r = {};
|
|
@@ -262,7 +225,7 @@ function ne(e) {
|
|
|
262
225
|
}
|
|
263
226
|
return n(e);
|
|
264
227
|
}
|
|
265
|
-
function
|
|
228
|
+
function ee(e) {
|
|
266
229
|
return e.map((e) => ({
|
|
267
230
|
type: "php_glow",
|
|
268
231
|
startTimeUnixNano: Math.round(e.microtime * 1e9),
|
|
@@ -274,42 +237,42 @@ function b(e) {
|
|
|
274
237
|
}
|
|
275
238
|
}));
|
|
276
239
|
}
|
|
277
|
-
function
|
|
240
|
+
function te() {
|
|
278
241
|
return Math.round(Date.now() / 1e3);
|
|
279
242
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
243
|
+
var b = /password|passwd|pwd|token|secret|authorization|\bauth\b|bearer|oauth|credentials?|cookie|api[-_]?key|private[-_]?key|session|csrf|xsrf|\bpin\b|\bssn\b|card[-_]?number|\bcvv\b/i;
|
|
244
|
+
function x(e, t = !1, n = b) {
|
|
282
245
|
if (!e) return n;
|
|
283
246
|
if (t) {
|
|
284
247
|
let t = e.flags.replace(/[gy]/g, "");
|
|
285
248
|
return new RegExp(e.source, t);
|
|
286
249
|
}
|
|
287
|
-
let r =
|
|
250
|
+
let r = ne(n.flags, e.flags);
|
|
288
251
|
return RegExp(`(?:${n.source})|(?:${e.source})`, r);
|
|
289
252
|
}
|
|
290
|
-
function
|
|
253
|
+
function ne(e, t) {
|
|
291
254
|
let n = /* @__PURE__ */ new Set();
|
|
292
255
|
for (let r of e + t) r === "g" || r === "y" || n.add(r);
|
|
293
256
|
return [...n].join("");
|
|
294
257
|
}
|
|
295
|
-
function
|
|
258
|
+
function S(e, t = b) {
|
|
296
259
|
let n = e.indexOf("?");
|
|
297
260
|
if (n === -1) return e;
|
|
298
261
|
let r = e.indexOf("#", n), i = r === -1 ? e.length : r, a = e.slice(0, n + 1), o = e.slice(n + 1, i), s = e.slice(i);
|
|
299
262
|
return `${a}${o.split("&").map((e) => {
|
|
300
263
|
if (e === "") return e;
|
|
301
|
-
let n = e.indexOf("="), r = n === -1 ? e : e.slice(0, n), i =
|
|
264
|
+
let n = e.indexOf("="), r = n === -1 ? e : e.slice(0, n), i = re(r);
|
|
302
265
|
return t.test(i) ? n === -1 ? r : `${r}=[redacted]` : e;
|
|
303
266
|
}).join("&")}${s}`;
|
|
304
267
|
}
|
|
305
|
-
function
|
|
268
|
+
function re(e) {
|
|
306
269
|
try {
|
|
307
270
|
return decodeURIComponent(e);
|
|
308
271
|
} catch {
|
|
309
272
|
return e;
|
|
310
273
|
}
|
|
311
274
|
}
|
|
312
|
-
var
|
|
275
|
+
var C = class {
|
|
313
276
|
report(e, t, n, r, i = !1) {
|
|
314
277
|
return fetch(t, {
|
|
315
278
|
method: "POST",
|
|
@@ -320,69 +283,292 @@ var ae = class {
|
|
|
320
283
|
"X-Report-Browser-Extension-Errors": JSON.stringify(r),
|
|
321
284
|
"X-Flare-Client-Version": "2"
|
|
322
285
|
},
|
|
323
|
-
body:
|
|
286
|
+
body: _(e)
|
|
324
287
|
}).then((e) => {
|
|
325
288
|
i && e.status !== 201 && console.error(`Received response with status ${e.status} from Flare`);
|
|
326
289
|
}, (e) => {
|
|
327
290
|
i && console.error(e);
|
|
328
291
|
});
|
|
329
292
|
}
|
|
293
|
+
logs(e, t, n, r = !1, i = !1) {
|
|
294
|
+
return fetch(t, {
|
|
295
|
+
method: "POST",
|
|
296
|
+
keepalive: i,
|
|
297
|
+
headers: {
|
|
298
|
+
Accept: "application/json",
|
|
299
|
+
"Content-Type": "application/json",
|
|
300
|
+
"x-api-token": n ?? ""
|
|
301
|
+
},
|
|
302
|
+
body: _(e)
|
|
303
|
+
}).then((e) => {
|
|
304
|
+
r && e.status !== 201 && console.error(`Received response with status ${e.status} from Flare logs`);
|
|
305
|
+
}, (e) => {
|
|
306
|
+
r && console.error(e);
|
|
307
|
+
});
|
|
308
|
+
}
|
|
330
309
|
};
|
|
331
|
-
function
|
|
332
|
-
if (
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
310
|
+
function w(e, t = /* @__PURE__ */ new WeakSet()) {
|
|
311
|
+
if (typeof e == "string") return { stringValue: e };
|
|
312
|
+
if (typeof e == "boolean") return { boolValue: e };
|
|
313
|
+
if (typeof e == "number") return Number.isFinite(e) ? Number.isInteger(e) ? { intValue: e } : { doubleValue: e } : null;
|
|
314
|
+
if (e == null) return null;
|
|
315
|
+
if (Array.isArray(e)) {
|
|
316
|
+
if (t.has(e)) return { stringValue: "[Circular]" };
|
|
317
|
+
t.add(e);
|
|
318
|
+
let n = [];
|
|
319
|
+
for (let r of e) {
|
|
320
|
+
let e = w(r, t);
|
|
321
|
+
e !== null && n.push(e);
|
|
339
322
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
323
|
+
return t.delete(e), { arrayValue: { values: n } };
|
|
324
|
+
}
|
|
325
|
+
if (typeof e == "object") {
|
|
326
|
+
if (t.has(e)) return { stringValue: "[Circular]" };
|
|
327
|
+
t.add(e);
|
|
328
|
+
let n = [];
|
|
329
|
+
for (let [r, i] of Object.entries(e)) {
|
|
330
|
+
let e = w(i, t);
|
|
331
|
+
e !== null && n.push({
|
|
332
|
+
key: r,
|
|
333
|
+
value: e
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
return t.delete(e), { kvlistValue: { values: n } };
|
|
337
|
+
}
|
|
338
|
+
return null;
|
|
351
339
|
}
|
|
352
340
|
function T(e) {
|
|
353
|
-
|
|
341
|
+
let t = [];
|
|
342
|
+
for (let [n, r] of Object.entries(e)) {
|
|
343
|
+
let e = w(r);
|
|
344
|
+
e !== null && t.push({
|
|
345
|
+
key: n,
|
|
346
|
+
value: e
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
return t;
|
|
350
|
+
}
|
|
351
|
+
function ie(e, t, n, r) {
|
|
352
|
+
return { resourceLogs: [{
|
|
353
|
+
resource: {
|
|
354
|
+
attributes: T(t),
|
|
355
|
+
droppedAttributesCount: 0
|
|
356
|
+
},
|
|
357
|
+
scopeLogs: [{
|
|
358
|
+
scope: {
|
|
359
|
+
name: n,
|
|
360
|
+
version: r,
|
|
361
|
+
attributes: [],
|
|
362
|
+
droppedAttributesCount: 0
|
|
363
|
+
},
|
|
364
|
+
logRecords: e.map((e) => ({
|
|
365
|
+
timeUnixNano: e.timeUnixNano,
|
|
366
|
+
observedTimeUnixNano: e.timeUnixNano,
|
|
367
|
+
severityNumber: e.severityNumber,
|
|
368
|
+
severityText: e.severityText,
|
|
369
|
+
body: { stringValue: e.message },
|
|
370
|
+
attributes: e.recordAttributes,
|
|
371
|
+
flags: 0,
|
|
372
|
+
droppedAttributesCount: 0
|
|
373
|
+
}))
|
|
374
|
+
}]
|
|
375
|
+
}] };
|
|
354
376
|
}
|
|
377
|
+
var ae = {
|
|
378
|
+
debug: 5,
|
|
379
|
+
info: 9,
|
|
380
|
+
notice: 10,
|
|
381
|
+
warning: 13,
|
|
382
|
+
error: 17,
|
|
383
|
+
critical: 18,
|
|
384
|
+
alert: 19,
|
|
385
|
+
emergency: 21
|
|
386
|
+
};
|
|
355
387
|
function E(e) {
|
|
356
|
-
return
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
388
|
+
return ae[e];
|
|
389
|
+
}
|
|
390
|
+
function oe(e) {
|
|
391
|
+
return e.toUpperCase();
|
|
392
|
+
}
|
|
393
|
+
function se(e, t) {
|
|
394
|
+
return E(e) >= E(t);
|
|
395
|
+
}
|
|
396
|
+
var ce = class {
|
|
397
|
+
buffer = [];
|
|
398
|
+
resourceAttributes = {};
|
|
399
|
+
timer;
|
|
400
|
+
timerActive = !1;
|
|
401
|
+
constructor(e) {
|
|
402
|
+
this.deps = e, this.deps.scheduler.register((e) => this.flush(e));
|
|
403
|
+
}
|
|
404
|
+
debug(e, t = {}, n = {}) {
|
|
405
|
+
this.record("debug", e, t, n);
|
|
406
|
+
}
|
|
407
|
+
info(e, t = {}, n = {}) {
|
|
408
|
+
this.record("info", e, t, n);
|
|
409
|
+
}
|
|
410
|
+
notice(e, t = {}, n = {}) {
|
|
411
|
+
this.record("notice", e, t, n);
|
|
412
|
+
}
|
|
413
|
+
warning(e, t = {}, n = {}) {
|
|
414
|
+
this.record("warning", e, t, n);
|
|
415
|
+
}
|
|
416
|
+
error(e, t = {}, n = {}) {
|
|
417
|
+
this.record("error", e, t, n);
|
|
418
|
+
}
|
|
419
|
+
critical(e, t = {}, n = {}) {
|
|
420
|
+
this.record("critical", e, t, n);
|
|
421
|
+
}
|
|
422
|
+
alert(e, t = {}, n = {}) {
|
|
423
|
+
this.record("alert", e, t, n);
|
|
424
|
+
}
|
|
425
|
+
emergency(e, t = {}, n = {}) {
|
|
426
|
+
this.record("emergency", e, t, n);
|
|
427
|
+
}
|
|
428
|
+
bufferLength() {
|
|
429
|
+
return this.buffer.length;
|
|
430
|
+
}
|
|
431
|
+
record(e, t, n, r) {
|
|
432
|
+
let i = this.deps.getConfig();
|
|
433
|
+
if (!i.enableLogs || i.minimumLogLevel && !se(e, i.minimumLogLevel)) return;
|
|
434
|
+
let a = {
|
|
435
|
+
"log.context": n,
|
|
436
|
+
...r
|
|
437
|
+
}, { record: o, resource: s } = this.deps.buildLogAttributes(a), c = {
|
|
438
|
+
timeUnixNano: String(Date.now()) + "000000",
|
|
439
|
+
severityNumber: E(e),
|
|
440
|
+
severityText: oe(e),
|
|
441
|
+
message: t,
|
|
442
|
+
recordAttributes: T(o),
|
|
443
|
+
resourceAttributes: s
|
|
444
|
+
};
|
|
445
|
+
if (this.estimateBytes(c) > i.logFlushMaxBytes) {
|
|
446
|
+
i.debug && console.error("Flare: dropping oversized log record");
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
this.buffer.push(c), this.resourceAttributes = s, this.evaluateTriggers(i), this.trim(i);
|
|
450
|
+
}
|
|
451
|
+
evaluateTriggers(e) {
|
|
452
|
+
if (this.buffer.length >= e.maxLogBufferSize) {
|
|
453
|
+
this.flush();
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
if (this.bufferBytes() >= e.logFlushMaxBytes) {
|
|
457
|
+
this.flush();
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
this.armTimer(e);
|
|
461
|
+
}
|
|
462
|
+
armTimer(e) {
|
|
463
|
+
this.timerActive || (this.timerActive = !0, this.timer = setTimeout(() => this.flush(), e.logFlushIntervalMs), this.timer.unref?.());
|
|
464
|
+
}
|
|
465
|
+
trim(e) {
|
|
466
|
+
for (this.buffer.length > e.maxLogBufferSize && (this.buffer = this.buffer.slice(this.buffer.length - e.maxLogBufferSize)); this.buffer.length > 1 && this.bufferBytes() > e.logFlushMaxBytes;) this.buffer.shift();
|
|
467
|
+
}
|
|
468
|
+
flush(e) {
|
|
469
|
+
let t = this.deps.getConfig();
|
|
470
|
+
if (!t.enableLogs || this.buffer.length === 0) return;
|
|
471
|
+
if (!p(t.key, t.debug)) {
|
|
472
|
+
this.clearTimer();
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
this.clearTimer();
|
|
476
|
+
let n;
|
|
477
|
+
e?.keepalive ? (n = this.packForKeepalive(t), this.buffer = this.buffer.filter((e) => !n.includes(e)), this.buffer.length > 0 && this.armTimer(t)) : (n = this.buffer, this.buffer = []), n.length !== 0 && this.deps.track(this.deps.api.logs(this.buildEnvelope(n), t.logsIngestUrl, t.key, t.debug, !!e?.keepalive));
|
|
478
|
+
}
|
|
479
|
+
clear() {
|
|
480
|
+
this.buffer = [], this.clearTimer();
|
|
481
|
+
}
|
|
482
|
+
packForKeepalive(e) {
|
|
483
|
+
let t = [];
|
|
484
|
+
for (let n = this.buffer.length - 1; n >= 0; n--) {
|
|
485
|
+
let r = [this.buffer[n], ...t];
|
|
486
|
+
new TextEncoder().encode(_(this.buildEnvelope(r))).length <= e.keepaliveMaxBytes ? t = r : e.debug && console.error("Flare: dropping log record from keepalive envelope (over budget)");
|
|
487
|
+
}
|
|
488
|
+
return t;
|
|
489
|
+
}
|
|
490
|
+
buildEnvelope(e) {
|
|
491
|
+
let t = this.deps.getSdkInfo();
|
|
492
|
+
return ie(e, this.resourceForFlush(), t.name, t.version);
|
|
493
|
+
}
|
|
494
|
+
resourceForFlush() {
|
|
495
|
+
let e = this.deps.getConfig(), t = this.deps.getSdkInfo(), n = this.deps.getFramework(), r = {
|
|
496
|
+
"telemetry.sdk.language": "javascript",
|
|
497
|
+
"telemetry.sdk.name": t.name,
|
|
498
|
+
"telemetry.sdk.version": t.version,
|
|
499
|
+
"flare.language.name": "javascript"
|
|
500
|
+
};
|
|
501
|
+
return e.serviceName && (r["service.name"] = e.serviceName), e.version && (r["service.version"] = e.version), e.stage && (r["service.stage"] = e.stage), n?.name && (r["flare.framework.name"] = n.name), n?.version && (r["flare.framework.version"] = n.version), {
|
|
502
|
+
...this.resourceAttributes,
|
|
503
|
+
...r
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
clearTimer() {
|
|
507
|
+
this.timer &&= (clearTimeout(this.timer), void 0), this.timerActive = !1;
|
|
508
|
+
}
|
|
509
|
+
estimateBytes(e) {
|
|
510
|
+
return _(e).length;
|
|
511
|
+
}
|
|
512
|
+
bufferBytes() {
|
|
513
|
+
return this.buffer.reduce((e, t) => e + this.estimateBytes(t), 0);
|
|
514
|
+
}
|
|
515
|
+
}, le = class {
|
|
516
|
+
register() {}
|
|
517
|
+
}, ue = [
|
|
518
|
+
"service.",
|
|
519
|
+
"telemetry.",
|
|
520
|
+
"host.",
|
|
521
|
+
"os.",
|
|
522
|
+
"process.",
|
|
523
|
+
"flare.framework.",
|
|
524
|
+
"flare.language."
|
|
525
|
+
], de = new Set(["process.uptime"]);
|
|
526
|
+
function fe(e) {
|
|
527
|
+
let t = {}, n = {};
|
|
528
|
+
for (let [r, i] of Object.entries(e)) !de.has(r) && ue.some((e) => r.startsWith(e)) ? t[r] = i : n[r] = i;
|
|
529
|
+
return {
|
|
530
|
+
resource: t,
|
|
531
|
+
record: n
|
|
360
532
|
};
|
|
361
533
|
}
|
|
362
|
-
var
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
534
|
+
var pe = class {
|
|
535
|
+
glows = [];
|
|
536
|
+
pendingAttributes = {};
|
|
537
|
+
entryPoint = null;
|
|
538
|
+
addGlow(e, t) {
|
|
539
|
+
this.glows.push(e), this.glows.length > t && (this.glows = this.glows.slice(this.glows.length - t));
|
|
540
|
+
}
|
|
541
|
+
clearGlows() {
|
|
542
|
+
this.glows = [];
|
|
543
|
+
}
|
|
544
|
+
setAttribute(e, t) {
|
|
545
|
+
this.pendingAttributes[e] = t;
|
|
546
|
+
}
|
|
547
|
+
mergeAttributes(e) {
|
|
548
|
+
Object.assign(this.pendingAttributes, e);
|
|
549
|
+
}
|
|
550
|
+
}, D = class {
|
|
551
|
+
scope = new pe();
|
|
552
|
+
active() {
|
|
553
|
+
return this.scope;
|
|
554
|
+
}
|
|
555
|
+
}, O = {};
|
|
556
|
+
function me(e, t, n, r) {
|
|
557
|
+
return new Promise((i) => {
|
|
558
|
+
if (!t || !n) return i({
|
|
559
|
+
codeSnippet: { 0: `Could not read from file: missing file URL or line number. URL: ${t} lineNumber: ${n}` },
|
|
371
560
|
trimmedColumnNumber: null
|
|
372
561
|
});
|
|
373
|
-
|
|
374
|
-
codeSnippet: { 0: `Could not read from file: Error while opening file at URL ${
|
|
562
|
+
he(e, t).then((e) => i(e ? ge(e, n, r) : {
|
|
563
|
+
codeSnippet: { 0: `Could not read from file: Error while opening file at URL ${t}` },
|
|
375
564
|
trimmedColumnNumber: null
|
|
376
565
|
}));
|
|
377
566
|
});
|
|
378
567
|
}
|
|
379
|
-
function
|
|
380
|
-
return
|
|
568
|
+
function he(e, t) {
|
|
569
|
+
return O[t] === void 0 ? e.read(t).then((e) => (e !== null && (O[t] = e), e)) : Promise.resolve(O[t]);
|
|
381
570
|
}
|
|
382
|
-
function
|
|
383
|
-
return D[e] === void 0 ? fetch(e).then((e) => e.status === 200 ? e.text() : null).then((t) => (t !== null && (D[e] = t), t)).catch(() => null) : Promise.resolve(D[e]);
|
|
384
|
-
}
|
|
385
|
-
function j(e, t, n, r = 1e3, i = 40) {
|
|
571
|
+
function ge(e, t, n, r = 1e3, i = 40) {
|
|
386
572
|
let a = {}, o = null, s = e.split("\n"), c = t - 1, l = Math.floor(i / 2);
|
|
387
573
|
for (let e = -l; e <= l; e++) {
|
|
388
574
|
let i = c + e;
|
|
@@ -404,27 +590,27 @@ function j(e, t, n, r = 1e3, i = 40) {
|
|
|
404
590
|
trimmedColumnNumber: o
|
|
405
591
|
};
|
|
406
592
|
}
|
|
407
|
-
function
|
|
408
|
-
return new Promise((
|
|
409
|
-
if (!
|
|
410
|
-
let
|
|
593
|
+
function k(e, t, n) {
|
|
594
|
+
return new Promise((r) => {
|
|
595
|
+
if (!_e(e)) return r([A("stacktrace missing")]);
|
|
596
|
+
let i;
|
|
411
597
|
try {
|
|
412
|
-
|
|
413
|
-
} catch (
|
|
414
|
-
return
|
|
598
|
+
i = c.default.parse(e);
|
|
599
|
+
} catch (n) {
|
|
600
|
+
return f(!1, "Couldn't parse stacktrace of below error:", t), t && (console.error(n), console.error(e)), r([A("stacktrace could not be parsed")]);
|
|
415
601
|
}
|
|
416
|
-
Promise.all(
|
|
602
|
+
Promise.all(i.map((e) => me(n, e.fileName, e.lineNumber, e.columnNumber).then((t) => ({
|
|
417
603
|
lineNumber: e.lineNumber || 1,
|
|
418
604
|
columnNumber: e.columnNumber || 1,
|
|
419
605
|
method: e.functionName || "Anonymous or unknown function",
|
|
420
606
|
file: e.fileName || "Unknown file",
|
|
421
607
|
codeSnippet: t.codeSnippet,
|
|
422
608
|
class: "",
|
|
423
|
-
isApplicationFrame:
|
|
424
|
-
})))).then(
|
|
609
|
+
isApplicationFrame: ve(e.fileName)
|
|
610
|
+
})))).then(r);
|
|
425
611
|
});
|
|
426
612
|
}
|
|
427
|
-
function
|
|
613
|
+
function A(e) {
|
|
428
614
|
return {
|
|
429
615
|
lineNumber: 0,
|
|
430
616
|
columnNumber: 0,
|
|
@@ -434,93 +620,134 @@ function N(e) {
|
|
|
434
620
|
class: "unknown"
|
|
435
621
|
};
|
|
436
622
|
}
|
|
437
|
-
function
|
|
623
|
+
function _e(e) {
|
|
438
624
|
if (!e || typeof e != "object") return !1;
|
|
439
625
|
let t = e, n = t.stack ?? t.stacktrace ?? t["opera#sourceloc"];
|
|
440
626
|
return typeof n == "string" && n !== `${t.name}: ${t.message}`;
|
|
441
627
|
}
|
|
442
|
-
function
|
|
628
|
+
function ve(e) {
|
|
443
629
|
return e ? !(/[/\\]node_modules[/\\]/.test(e) || /(^|[/\\])(vendor|vendors)[.~-][^/\\]*\.js/i.test(e)) : !0;
|
|
444
630
|
}
|
|
445
|
-
var
|
|
631
|
+
var ye = class {
|
|
632
|
+
read(e) {
|
|
633
|
+
return Promise.resolve(null);
|
|
634
|
+
}
|
|
635
|
+
}, be = "@flareapp/core", j = class {
|
|
636
|
+
inflight = /* @__PURE__ */ new Set();
|
|
637
|
+
_logger;
|
|
446
638
|
_config = {
|
|
447
639
|
key: null,
|
|
448
640
|
version: "",
|
|
449
|
-
sourcemapVersionId:
|
|
641
|
+
sourcemapVersionId: d,
|
|
450
642
|
stage: "",
|
|
451
643
|
maxGlowsPerReport: 30,
|
|
452
644
|
ingestUrl: "https://ingress.flareapp.io/v1/errors",
|
|
453
645
|
reportBrowserExtensionErrors: !1,
|
|
454
646
|
debug: !1,
|
|
455
|
-
urlDenylist:
|
|
647
|
+
urlDenylist: b,
|
|
456
648
|
replaceDefaultUrlDenylist: !1,
|
|
457
649
|
sampleRate: 1,
|
|
458
650
|
beforeEvaluate: (e) => e,
|
|
459
|
-
beforeSubmit: (e) => e
|
|
651
|
+
beforeSubmit: (e) => e,
|
|
652
|
+
enableLogs: !1,
|
|
653
|
+
logsIngestUrl: "https://ingress.flareapp.io/v1/logs",
|
|
654
|
+
maxLogBufferSize: 100,
|
|
655
|
+
logFlushIntervalMs: 5e3,
|
|
656
|
+
logFlushMaxBytes: 8e5,
|
|
657
|
+
keepaliveMaxBytes: 6e4
|
|
460
658
|
};
|
|
461
|
-
_glows = [];
|
|
462
|
-
pendingAttributes = {};
|
|
463
|
-
entryPoint = null;
|
|
464
659
|
sdkInfo = {
|
|
465
|
-
name:
|
|
466
|
-
version:
|
|
660
|
+
name: be,
|
|
661
|
+
version: l
|
|
467
662
|
};
|
|
468
663
|
framework = null;
|
|
469
|
-
constructor(e = new
|
|
470
|
-
this.api = e
|
|
664
|
+
constructor(e = new C(), t = () => ({}), n = new ye(), r = new D(), i = new le()) {
|
|
665
|
+
this.api = e, this.contextCollector = t, this.fileReader = n, this.scopeProvider = r, this._logger = new ce({
|
|
666
|
+
api: this.api,
|
|
667
|
+
getConfig: () => this._config,
|
|
668
|
+
getSdkInfo: () => this.sdkInfo,
|
|
669
|
+
getFramework: () => this.framework,
|
|
670
|
+
buildLogAttributes: (e) => this.buildLogAttributes(e),
|
|
671
|
+
track: (e) => this.track(e),
|
|
672
|
+
scheduler: i
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
track(e) {
|
|
676
|
+
let t = e.then(() => void 0, () => void 0);
|
|
677
|
+
return this.inflight.add(t), t.finally(() => this.inflight.delete(t)), e;
|
|
678
|
+
}
|
|
679
|
+
flush(e = 2e3) {
|
|
680
|
+
this._logger.flush();
|
|
681
|
+
let t = [...this.inflight];
|
|
682
|
+
return t.length === 0 ? Promise.resolve() : new Promise((n) => {
|
|
683
|
+
let r = setTimeout(n, e);
|
|
684
|
+
Promise.allSettled(t).then(() => {
|
|
685
|
+
clearTimeout(r), n();
|
|
686
|
+
});
|
|
687
|
+
});
|
|
471
688
|
}
|
|
472
689
|
get config() {
|
|
473
690
|
return this._config;
|
|
474
691
|
}
|
|
475
692
|
get glows() {
|
|
476
|
-
return this.
|
|
693
|
+
return this.scopeProvider.active().glows;
|
|
694
|
+
}
|
|
695
|
+
get logger() {
|
|
696
|
+
return this._logger;
|
|
477
697
|
}
|
|
478
|
-
light(e =
|
|
479
|
-
return this._config.key = e, t !== void 0 && (this._config.debug = t), this;
|
|
698
|
+
light(e = u, t) {
|
|
699
|
+
return this._config.key = e, t !== void 0 && (this._config.debug = t), this._logger.flush(), this;
|
|
480
700
|
}
|
|
481
701
|
configure(e) {
|
|
702
|
+
let t = this._config.enableLogs;
|
|
482
703
|
return this._config = {
|
|
483
704
|
...this._config,
|
|
484
705
|
...e
|
|
485
|
-
}, e.sampleRate !== void 0 && (this._config.sampleRate = Math.max(0, Math.min(1, e.sampleRate))), this._config.urlDenylist =
|
|
706
|
+
}, e.sampleRate !== void 0 && (this._config.sampleRate = Math.max(0, Math.min(1, e.sampleRate))), this._config.urlDenylist = x(e.urlDenylist, e.replaceDefaultUrlDenylist ?? this._config.replaceDefaultUrlDenylist), t && this._config.enableLogs === !1 && this._logger.clear(), e.key !== void 0 && this._logger.flush(), this;
|
|
486
707
|
}
|
|
487
|
-
|
|
708
|
+
test() {
|
|
709
|
+
return this.track(this.testInternal());
|
|
710
|
+
}
|
|
711
|
+
async testInternal() {
|
|
488
712
|
let e = await this.createReportFromError(/* @__PURE__ */ Error("The Flare client is set up correctly!"));
|
|
489
713
|
if (e) return this.sendReport(e);
|
|
490
714
|
}
|
|
491
715
|
glow(e, t = "info", n = []) {
|
|
492
|
-
let r =
|
|
493
|
-
return this.
|
|
716
|
+
let r = te();
|
|
717
|
+
return this.scopeProvider.active().addGlow({
|
|
494
718
|
name: e,
|
|
495
719
|
messageLevel: t,
|
|
496
720
|
metaData: n,
|
|
497
721
|
time: r,
|
|
498
722
|
microtime: r
|
|
499
|
-
}
|
|
723
|
+
}, this._config.maxGlowsPerReport), this;
|
|
500
724
|
}
|
|
501
725
|
clearGlows() {
|
|
502
|
-
return this.
|
|
726
|
+
return this.scopeProvider.active().clearGlows(), this;
|
|
503
727
|
}
|
|
504
728
|
addContext(e, t) {
|
|
505
|
-
let n = this.pendingAttributes["context.custom"] ?? {};
|
|
506
|
-
return
|
|
507
|
-
...
|
|
729
|
+
let n = this.scopeProvider.active(), r = n.pendingAttributes["context.custom"] ?? {};
|
|
730
|
+
return n.setAttribute("context.custom", {
|
|
731
|
+
...r,
|
|
508
732
|
[e]: t
|
|
509
|
-
}, this;
|
|
733
|
+
}), this;
|
|
510
734
|
}
|
|
511
735
|
addContextGroup(e, t) {
|
|
512
|
-
return this.
|
|
736
|
+
return this.scopeProvider.active().setAttribute(`context.${e}`, t), this;
|
|
513
737
|
}
|
|
514
738
|
setEntryPoint(e) {
|
|
515
|
-
return this.entryPoint = e, this;
|
|
739
|
+
return this.scopeProvider.active().entryPoint = e, this;
|
|
516
740
|
}
|
|
517
741
|
setSdkInfo(e) {
|
|
518
742
|
return this.sdkInfo = e, this;
|
|
519
743
|
}
|
|
520
744
|
setFramework(e) {
|
|
521
|
-
return this.framework = e, this
|
|
745
|
+
return this.framework = e, this;
|
|
746
|
+
}
|
|
747
|
+
report(e, t = {}) {
|
|
748
|
+
return this.track(this.reportInternal(e, t));
|
|
522
749
|
}
|
|
523
|
-
async
|
|
750
|
+
async reportInternal(e, t = {}) {
|
|
524
751
|
if (this._config.sampleRate < 1 && Math.random() >= this._config.sampleRate) return;
|
|
525
752
|
let n = Date.now() * 1e6, r = e instanceof Error ? e : Error(typeof e == "string" ? e : String(e)), i = await this._config.beforeEvaluate(r);
|
|
526
753
|
if (!i) return;
|
|
@@ -528,10 +755,13 @@ var ue = "@flareapp/js", P = new class {
|
|
|
528
755
|
if (a) return this.sendReport(a);
|
|
529
756
|
}
|
|
530
757
|
reportSilently(e, t = {}) {
|
|
531
|
-
|
|
758
|
+
this.track(this.reportInternal(e, t).catch(() => {}));
|
|
759
|
+
}
|
|
760
|
+
reportUnhandledRejection(e, t = {}) {
|
|
761
|
+
return this.track(this.reportUnhandledRejectionInternal(e, t));
|
|
532
762
|
}
|
|
533
|
-
async
|
|
534
|
-
if (Math.random() >= this._config.sampleRate) return;
|
|
763
|
+
async reportUnhandledRejectionInternal(e, t = {}) {
|
|
764
|
+
if (this._config.sampleRate < 1 && Math.random() >= this._config.sampleRate) return;
|
|
535
765
|
let n = Date.now() * 1e6, r = this.buildReport({
|
|
536
766
|
exceptionClass: "UnhandledRejection",
|
|
537
767
|
message: e,
|
|
@@ -544,9 +774,12 @@ var ue = "@flareapp/js", P = new class {
|
|
|
544
774
|
});
|
|
545
775
|
return this.sendReport(r);
|
|
546
776
|
}
|
|
547
|
-
|
|
777
|
+
reportMessage(e, t, n = {}) {
|
|
778
|
+
return this.track(this.reportMessageInternal(e, t, n));
|
|
779
|
+
}
|
|
780
|
+
async reportMessageInternal(e, t, n = {}) {
|
|
548
781
|
if (this._config.sampleRate < 1 && Math.random() >= this._config.sampleRate) return;
|
|
549
|
-
let r = Date.now() * 1e6, i = await
|
|
782
|
+
let r = Date.now() * 1e6, i = await k(/* @__PURE__ */ Error(), this._config.debug, this.fileReader);
|
|
550
783
|
i.shift();
|
|
551
784
|
let a = this.buildReport({
|
|
552
785
|
exceptionClass: "Log",
|
|
@@ -561,9 +794,9 @@ var ue = "@flareapp/js", P = new class {
|
|
|
561
794
|
return this.sendReport(a);
|
|
562
795
|
}
|
|
563
796
|
async createReportFromError(e, t = {}, n = Date.now() * 1e6) {
|
|
564
|
-
if (!
|
|
565
|
-
let r = await
|
|
566
|
-
|
|
797
|
+
if (!f(e, "No error provided.", this._config.debug)) return !1;
|
|
798
|
+
let r = await k(e, this._config.debug, this.fileReader);
|
|
799
|
+
f(r.length, "Couldn't generate stacktrace of this error: " + e, this._config.debug);
|
|
567
800
|
let i = e.constructor && e.constructor.name ? e.constructor.name : "undefined";
|
|
568
801
|
return this.buildReport({
|
|
569
802
|
exceptionClass: i,
|
|
@@ -572,62 +805,161 @@ var ue = "@flareapp/js", P = new class {
|
|
|
572
805
|
isLog: !1,
|
|
573
806
|
level: void 0,
|
|
574
807
|
extraAttributes: t,
|
|
575
|
-
code:
|
|
808
|
+
code: g(e),
|
|
576
809
|
seenAtUnixNano: n
|
|
577
810
|
});
|
|
578
811
|
}
|
|
579
|
-
|
|
580
|
-
let
|
|
812
|
+
buildBaseAttributes() {
|
|
813
|
+
let e = {
|
|
581
814
|
"telemetry.sdk.language": "javascript",
|
|
582
815
|
"telemetry.sdk.name": this.sdkInfo.name,
|
|
583
816
|
"telemetry.sdk.version": this.sdkInfo.version,
|
|
584
|
-
"flare.language.name": "javascript"
|
|
585
|
-
"flare.entry_point.type": "web"
|
|
817
|
+
"flare.language.name": "javascript"
|
|
586
818
|
};
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
let i = {
|
|
591
|
-
|
|
592
|
-
...E(this._config.urlDenylist),
|
|
593
|
-
...this.pendingAttributes,
|
|
594
|
-
...e.extraAttributes
|
|
595
|
-
}, a = this.pendingAttributes["context.custom"], o = e.extraAttributes["context.custom"];
|
|
596
|
-
a && o && typeof a == "object" && typeof o == "object" && !Array.isArray(a) && !Array.isArray(o) && (i["context.custom"] = {
|
|
597
|
-
...a,
|
|
598
|
-
...o
|
|
599
|
-
});
|
|
819
|
+
return this._config.stage && (e["service.stage"] = this._config.stage), this._config.version && (e["service.version"] = this._config.version), this.framework?.name && (e["flare.framework.name"] = this.framework.name), this.framework?.version && (e["flare.framework.version"] = this.framework.version), e;
|
|
820
|
+
}
|
|
821
|
+
assembleAttributes(e, t, n) {
|
|
822
|
+
let r = this.scopeProvider.active(), i = n ? this.buildBaseAttributes() : {}, a = r.entryPoint, o = {};
|
|
823
|
+
a?.identifier !== void 0 && (o["flare.entry_point.handler.identifier"] = a.identifier), a?.type !== void 0 && (o["flare.entry_point.handler.type"] = a.type), a?.name !== void 0 && (o["flare.entry_point.handler.name"] = a.name);
|
|
600
824
|
let s = {
|
|
825
|
+
...i,
|
|
826
|
+
...e,
|
|
827
|
+
...o,
|
|
828
|
+
...r.pendingAttributes,
|
|
829
|
+
...t
|
|
830
|
+
}, c = r.pendingAttributes["context.custom"], l = t["context.custom"];
|
|
831
|
+
return c && l && typeof c == "object" && typeof l == "object" && !Array.isArray(c) && !Array.isArray(l) && (s["context.custom"] = {
|
|
832
|
+
...c,
|
|
833
|
+
...l
|
|
834
|
+
}), this.framework?.name && (s["context.custom"] = {
|
|
835
|
+
...s["context.custom"] ?? {},
|
|
836
|
+
framework: this.framework.name.toLowerCase()
|
|
837
|
+
}), s;
|
|
838
|
+
}
|
|
839
|
+
buildLogAttributes(e) {
|
|
840
|
+
let { resource: t, record: n } = fe(this.contextCollector(this._config));
|
|
841
|
+
return {
|
|
842
|
+
resource: t,
|
|
843
|
+
record: this.assembleAttributes(n, e, !1)
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
buildReport(e) {
|
|
847
|
+
let t = this.scopeProvider.active(), n = this.assembleAttributes(this.contextCollector(this._config), e.extraAttributes, !0), r = {
|
|
601
848
|
exceptionClass: e.exceptionClass,
|
|
602
849
|
message: e.message,
|
|
603
850
|
seenAtUnixNano: e.seenAtUnixNano,
|
|
604
851
|
stacktrace: e.stacktrace,
|
|
605
|
-
events:
|
|
606
|
-
attributes:
|
|
852
|
+
events: ee(t.glows),
|
|
853
|
+
attributes: n
|
|
607
854
|
};
|
|
608
|
-
return e.isLog && (
|
|
855
|
+
return e.isLog && (r.isLog = !0), e.level !== void 0 && (r.level = e.level), this._config.sourcemapVersionId && (r.sourcemapVersionId = this._config.sourcemapVersionId), e.code !== void 0 && (r.code = e.code), r;
|
|
609
856
|
}
|
|
610
857
|
async sendReport(e) {
|
|
611
|
-
if (!
|
|
858
|
+
if (!p(this._config.key, this._config.debug)) return;
|
|
612
859
|
let t = await this._config.beforeSubmit(e);
|
|
613
860
|
if (t) return this.api.report(t, this._config.ingestUrl, this._config.key, this._config.reportBrowserExtensionErrors, this._config.debug);
|
|
614
861
|
}
|
|
862
|
+
}, M = class {
|
|
863
|
+
register(e) {
|
|
864
|
+
typeof document > "u" || !document || document.addEventListener("visibilitychange", () => {
|
|
865
|
+
document.visibilityState === "hidden" && e({ keepalive: !0 });
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
function N() {
|
|
870
|
+
if (!window.document.cookie) return {};
|
|
871
|
+
let e = {};
|
|
872
|
+
return window.document.cookie.split("; ").forEach((t) => {
|
|
873
|
+
let n = t.indexOf("=");
|
|
874
|
+
if (n === -1) {
|
|
875
|
+
e[t] = "";
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
let r = t.slice(0, n);
|
|
879
|
+
e[r] = t.slice(n + 1);
|
|
880
|
+
}), { "http.request.cookies": e };
|
|
881
|
+
}
|
|
882
|
+
function xe(e) {
|
|
883
|
+
return {
|
|
884
|
+
"url.full": S(window.location.href, e),
|
|
885
|
+
"user_agent.original": window.navigator.userAgent,
|
|
886
|
+
"http.request.referrer": S(window.document.referrer, e),
|
|
887
|
+
"document.ready_state": window.document.readyState
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
function Se(e) {
|
|
891
|
+
return window.location.search ? { "url.query": S(window.location.search, e).replace(/^\?/, "") } : {};
|
|
892
|
+
}
|
|
893
|
+
var Ce = (e) => {
|
|
894
|
+
if (typeof window > "u") return { "flare.entry_point.type": "server" };
|
|
895
|
+
let t = { "flare.entry_point.type": "web" };
|
|
896
|
+
return window?.location?.href && (t["flare.entry_point.value"] = S(window.location.href, e.urlDenylist), window.location.pathname && (t["flare.entry_point.handler.identifier"] = window.location.pathname, t["flare.entry_point.handler.type"] = "browser")), window?.location?.hostname && (t["host.name"] = window.location.hostname), Object.assign(t, xe(e.urlDenylist)), Object.assign(t, Se(e.urlDenylist)), Object.assign(t, N()), t;
|
|
897
|
+
}, P = class {
|
|
898
|
+
read(e) {
|
|
899
|
+
return /^https?:\/\//i.test(e) ? fetch(e).then((e) => e.status === 200 ? e.text() : null).catch(() => null) : Promise.resolve(null);
|
|
900
|
+
}
|
|
901
|
+
}, we = typeof process < "u" ? "2.4.0" : "?";
|
|
902
|
+
function Te() {
|
|
903
|
+
typeof window > "u" || (window.addEventListener("error", (e) => {
|
|
904
|
+
let t = window.flare;
|
|
905
|
+
t && e.error instanceof Error && t.reportSilently(e.error);
|
|
906
|
+
}), window.addEventListener("unhandledrejection", (e) => {
|
|
907
|
+
let t = window.flare;
|
|
908
|
+
if (!t) return;
|
|
909
|
+
let n = e.reason;
|
|
910
|
+
if (n instanceof Error) {
|
|
911
|
+
t.reportSilently(n);
|
|
912
|
+
return;
|
|
913
|
+
}
|
|
914
|
+
if (Ee(n)) {
|
|
915
|
+
let e = Error(F(n));
|
|
916
|
+
e.stack = n.stack, t.reportSilently(e);
|
|
917
|
+
return;
|
|
918
|
+
}
|
|
919
|
+
Promise.resolve(t.reportUnhandledRejection(F(n))).catch(() => {});
|
|
920
|
+
}));
|
|
921
|
+
}
|
|
922
|
+
function F(e) {
|
|
923
|
+
if (typeof e == "string") return e;
|
|
924
|
+
if (e && typeof e == "object") {
|
|
925
|
+
let t = e.message;
|
|
926
|
+
if (typeof t == "string") return t;
|
|
927
|
+
try {
|
|
928
|
+
return JSON.stringify(e);
|
|
929
|
+
} catch {
|
|
930
|
+
return "Unhandled promise rejection (non-serializable reason)";
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
return String(e);
|
|
934
|
+
}
|
|
935
|
+
function Ee(e) {
|
|
936
|
+
return typeof e == "object" && !!e && "stack" in e && typeof e.stack == "string";
|
|
937
|
+
}
|
|
938
|
+
//#endregion
|
|
939
|
+
//#region node_modules/@flareapp/js/dist/index.mjs
|
|
940
|
+
var I = new class extends j {
|
|
941
|
+
constructor(e = new C(), t = Ce, n = new P(), r = new D()) {
|
|
942
|
+
super(e, t, n, r, new M()), this.setSdkInfo({
|
|
943
|
+
name: "@flareapp/js",
|
|
944
|
+
version: we
|
|
945
|
+
});
|
|
946
|
+
}
|
|
615
947
|
}();
|
|
616
|
-
typeof window < "u" && window && (window.flare =
|
|
948
|
+
typeof window < "u" && window && (window.flare = I, Te());
|
|
617
949
|
//#endregion
|
|
618
950
|
//#region src/plugins/flare.ts
|
|
619
|
-
var
|
|
620
|
-
|
|
621
|
-
for (let t = 0; t <
|
|
951
|
+
var L = /* @__PURE__ */ "fancybox,jQuery,Modernizr,cssua,ScrollTrigger,calcSelectArrowDimensions,this.elements.$menu.smartmenus,woocommerce,elementor,avadaAddQuantityBoxes,fusion,FLBuilderAccordion,_initLayerSlider,Divi,gsap,Swiper,mailchimp,_AutofillCallbackHandler,$(...),imagesLoaded,accessing a cross-origin frame,scrollspy,No layout mode: packery,Vimeo,Network Error,Request aborted,timeout exceeded,Loading chunk,TrackerStorageType,Failed to load because no supported source was found.,The element has no supported sources.,grecaptcha,lightbox,priceCalcElement,AwesomeMenu,breakdance,Maximum call stack size exceeded.,Cookies is not defined,getUniqId,Cannot read properties of null (reading 'classList'),n.getModal,e.target.closest is not a function,Cannot read properties of undefined (reading 'Item'),refreshFsLightbox,fbq,Cannot assign to read only property 'push' of object '[object Array]',naturalWidth,Request failed with status code,Can't find variable: _,astraNavMenuTogglePro,The operation was aborted.,Failed to fetch dynamically imported module:,Importing a module script failed.,The request is not allowed by the user agent,this.Vi.close,The operation is insecure.,gformValidateFileSize,BreakdanceEntrance,Cannot read properties of undefined (reading '__'),The play() request was interrupted because video-only,Animation is interrupted by user input.,Animation is already playing.,Position \"NaN\" is not reachable.,Cannot redefine property: onbeforeunload,e.remove is not a function,Can't find variable: Cookies,Load failed,wp is not defined,Backbone,Invalid attempt to destructure non-iterable instance,Can't find variable: EmptyRanges,Cannot read properties of undefined (reading 'setLocaleData'),Function snaptr not implemented.,window.sbi_init is not a function".split(",");
|
|
952
|
+
I.light("5pqzBljrmDvquWZYSrSUKldIUREtPyB3"), I.addContext("version", "4.5.9"), I.beforeEvaluate = (e) => {
|
|
953
|
+
for (let t = 0; t < L.length; t++) if (e.message.includes(L[t])) return !1;
|
|
622
954
|
return e;
|
|
623
955
|
};
|
|
624
956
|
//#endregion
|
|
625
957
|
//#region node_modules/@flareapp/vue/dist/index.mjs
|
|
626
|
-
var
|
|
627
|
-
function
|
|
628
|
-
return
|
|
958
|
+
var De = typeof process < "u" && process.env?.PACKAGE_VERSION !== void 0 ? process.env.PACKAGE_VERSION : "?", R = 50, z = /password|passwd|pwd|token|secret|authorization|\bauth\b|bearer|oauth|credentials?|cookie|api[-_]?key|private[-_]?key|session|csrf|xsrf|\bpin\b|\bssn\b|card[-_]?number|\bcvv\b/i;
|
|
959
|
+
function B(e, t = !1) {
|
|
960
|
+
return x(e, t, z);
|
|
629
961
|
}
|
|
630
|
-
var
|
|
962
|
+
var V = 1e3, H = 100, U = 100, Oe = {
|
|
631
963
|
"setup function": "setup",
|
|
632
964
|
"render function": "render",
|
|
633
965
|
"component update": "render",
|
|
@@ -691,67 +1023,67 @@ var B = 1e3, V = 100, H = 100, de = {
|
|
|
691
1023
|
rtc: "lifecycle",
|
|
692
1024
|
rtg: "lifecycle"
|
|
693
1025
|
};
|
|
694
|
-
function
|
|
1026
|
+
function W(e) {
|
|
695
1027
|
if (!e) return "AnonymousComponent";
|
|
696
1028
|
let t = e.$options;
|
|
697
1029
|
return t.__name || t.name || "AnonymousComponent";
|
|
698
1030
|
}
|
|
699
|
-
function
|
|
1031
|
+
function G(e) {
|
|
700
1032
|
let t = [], n = e;
|
|
701
|
-
for (; n && t.length <
|
|
1033
|
+
for (; n && t.length < R;) t.push(W(n)), n = n.$parent;
|
|
702
1034
|
return t;
|
|
703
1035
|
}
|
|
704
|
-
function
|
|
705
|
-
return
|
|
1036
|
+
function K(e, t, n = z) {
|
|
1037
|
+
return q(e, 0, t, /* @__PURE__ */ new WeakSet(), n);
|
|
706
1038
|
}
|
|
707
|
-
function
|
|
1039
|
+
function q(e, t, n, r, i) {
|
|
708
1040
|
if (e === null) return null;
|
|
709
1041
|
let a = typeof e;
|
|
710
1042
|
if (a === "function") return "[Function]";
|
|
711
1043
|
if (a === "symbol") return "[Symbol]";
|
|
712
1044
|
if (a === "bigint") return e.toString();
|
|
713
|
-
if (a === "string") return
|
|
1045
|
+
if (a === "string") return ke(e);
|
|
714
1046
|
if (a !== "object") return e;
|
|
715
1047
|
if (r.has(e)) return "[Circular]";
|
|
716
1048
|
if (Array.isArray(e)) {
|
|
717
1049
|
if (t > n) return "[Array]";
|
|
718
1050
|
r.add(e);
|
|
719
|
-
let a = (e.length >
|
|
720
|
-
return e.length >
|
|
1051
|
+
let a = (e.length > H ? e.slice(0, H) : e).map((e) => q(e, t + 1, n, r, i));
|
|
1052
|
+
return e.length > H && a.push(`[… ${e.length - H} more items]`), r.delete(e), a;
|
|
721
1053
|
}
|
|
722
|
-
if (!
|
|
1054
|
+
if (!Ae(e) || t > n) return "[Object]";
|
|
723
1055
|
r.add(e);
|
|
724
|
-
let o = {}, s = Object.keys(e), c = s.length >
|
|
1056
|
+
let o = {}, s = Object.keys(e), c = s.length > U ? s.slice(0, U) : s;
|
|
725
1057
|
for (let a of c) {
|
|
726
1058
|
if (i.test(a)) {
|
|
727
1059
|
o[a] = "[redacted]";
|
|
728
1060
|
continue;
|
|
729
1061
|
}
|
|
730
|
-
o[a] =
|
|
1062
|
+
o[a] = q(e[a], t + 1, n, r, i);
|
|
731
1063
|
}
|
|
732
|
-
return s.length >
|
|
1064
|
+
return s.length > U && (o["…"] = `[${s.length - U} more keys]`), r.delete(e), o;
|
|
733
1065
|
}
|
|
734
|
-
function
|
|
735
|
-
return e.length <=
|
|
1066
|
+
function ke(e) {
|
|
1067
|
+
return e.length <= V ? e : `${e.slice(0, V)}…[truncated ${e.length - V} chars]`;
|
|
736
1068
|
}
|
|
737
|
-
function
|
|
1069
|
+
function Ae(e) {
|
|
738
1070
|
if (typeof e != "object" || !e) return !1;
|
|
739
1071
|
let t = Object.getPrototypeOf(e);
|
|
740
1072
|
return t === null || t === Object.prototype;
|
|
741
1073
|
}
|
|
742
1074
|
function J(e, t) {
|
|
743
1075
|
let n = [], r = e;
|
|
744
|
-
for (; r && n.length <
|
|
1076
|
+
for (; r && n.length < R;) {
|
|
745
1077
|
let e = r.$options, i = {
|
|
746
|
-
component:
|
|
1078
|
+
component: W(r),
|
|
747
1079
|
file: e.__file ?? null
|
|
748
1080
|
};
|
|
749
|
-
t.attachProps && r.$props && (i.props =
|
|
1081
|
+
t.attachProps && r.$props && (i.props = K(r.$props, t.propsMaxDepth, t.propsDenylist)), n.push(i), r = r.$parent;
|
|
750
1082
|
}
|
|
751
1083
|
return n;
|
|
752
1084
|
}
|
|
753
1085
|
function Y(e) {
|
|
754
|
-
return
|
|
1086
|
+
return Oe[e] ?? "unknown";
|
|
755
1087
|
}
|
|
756
1088
|
var X = 2;
|
|
757
1089
|
function Z(e, t = {}) {
|
|
@@ -760,13 +1092,13 @@ function Z(e, t = {}) {
|
|
|
760
1092
|
if (!n || typeof n != "object" || !("value" in n)) return null;
|
|
761
1093
|
let r = n.value;
|
|
762
1094
|
if (!r || typeof r != "object") return null;
|
|
763
|
-
let i = r, a = i.name, o = t.denylist ??
|
|
1095
|
+
let i = r, a = i.name, o = t.denylist ?? z, s = i.params && typeof i.params == "object" ? i.params : {}, c = i.query && typeof i.query == "object" ? i.query : {};
|
|
764
1096
|
return {
|
|
765
1097
|
name: typeof a == "string" ? a : typeof a == "symbol" ? a.toString() : null,
|
|
766
1098
|
path: typeof i.path == "string" ? i.path : "",
|
|
767
|
-
fullPath: typeof i.fullPath == "string" ?
|
|
768
|
-
params:
|
|
769
|
-
query:
|
|
1099
|
+
fullPath: typeof i.fullPath == "string" ? S(i.fullPath, o) : "",
|
|
1100
|
+
params: K(s, X, o),
|
|
1101
|
+
query: K(c, X, o),
|
|
770
1102
|
hash: typeof i.hash == "string" ? i.hash : "",
|
|
771
1103
|
matched: Array.isArray(i.matched) ? i.matched.map((e) => {
|
|
772
1104
|
if (!e || typeof e != "object") return "unknown";
|
|
@@ -785,7 +1117,7 @@ function Q(e) {
|
|
|
785
1117
|
};
|
|
786
1118
|
return e.vue.componentProps && (t.componentProps = e.vue.componentProps), e.vue.route && (t.route = e.vue.route), { "context.custom": { vue: t } };
|
|
787
1119
|
}
|
|
788
|
-
function
|
|
1120
|
+
function je(e) {
|
|
789
1121
|
let t = {
|
|
790
1122
|
type: e.vue.type,
|
|
791
1123
|
info: e.vue.info,
|
|
@@ -794,42 +1126,42 @@ function pe(e) {
|
|
|
794
1126
|
};
|
|
795
1127
|
return e.vue.route && (t.route = e.vue.route), { "context.custom": { vue: t } };
|
|
796
1128
|
}
|
|
797
|
-
var $ = /* @__PURE__ */ new WeakSet(),
|
|
1129
|
+
var $ = /* @__PURE__ */ new WeakSet(), Me = (e, t) => {
|
|
798
1130
|
if ($.has(e)) return;
|
|
799
|
-
$.add(e),
|
|
1131
|
+
$.add(e), I.setSdkInfo({
|
|
800
1132
|
name: "@flareapp/vue",
|
|
801
|
-
version:
|
|
802
|
-
}),
|
|
1133
|
+
version: De
|
|
1134
|
+
}), I.setFramework({
|
|
803
1135
|
name: "Vue",
|
|
804
1136
|
version: e.version
|
|
805
1137
|
});
|
|
806
|
-
let n = t?.attachProps ?? !1, r = t?.propsMaxDepth ?? 2, i =
|
|
1138
|
+
let n = t?.attachProps ?? !1, r = t?.propsMaxDepth ?? 2, i = B(t?.propsDenylist, t?.replaceDefaultDenylist), a = e.config.errorHandler;
|
|
807
1139
|
if (e.config.errorHandler = (o, s, c) => {
|
|
808
|
-
let l =
|
|
1140
|
+
let l = m(o);
|
|
809
1141
|
t?.beforeEvaluate?.({
|
|
810
1142
|
error: l,
|
|
811
1143
|
instance: s,
|
|
812
1144
|
info: c
|
|
813
1145
|
});
|
|
814
|
-
let u = Y(c), d =
|
|
1146
|
+
let u = Y(c), d = W(s), f = n && s?.$props ? K(s.$props, r, i) : void 0, p = G(s), h = J(s, {
|
|
815
1147
|
attachProps: n,
|
|
816
1148
|
propsMaxDepth: r,
|
|
817
1149
|
propsDenylist: i
|
|
818
|
-
}),
|
|
1150
|
+
}), g = Z(e.config.globalProperties.$router, { denylist: i }), _ = { vue: {
|
|
819
1151
|
info: c,
|
|
820
1152
|
errorOrigin: u,
|
|
821
1153
|
componentName: d,
|
|
822
1154
|
...f && { componentProps: f },
|
|
823
1155
|
componentHierarchy: p,
|
|
824
|
-
componentHierarchyFrames:
|
|
825
|
-
...
|
|
1156
|
+
componentHierarchyFrames: h,
|
|
1157
|
+
...g && { route: g }
|
|
826
1158
|
} }, v = t?.beforeSubmit?.({
|
|
827
1159
|
error: l,
|
|
828
1160
|
instance: s,
|
|
829
1161
|
info: c,
|
|
830
1162
|
context: _
|
|
831
1163
|
}) ?? _;
|
|
832
|
-
if (
|
|
1164
|
+
if (I.reportSilently(l, Q(v)), t?.afterSubmit?.({
|
|
833
1165
|
error: l,
|
|
834
1166
|
instance: s,
|
|
835
1167
|
info: c,
|
|
@@ -842,14 +1174,14 @@ var $ = /* @__PURE__ */ new WeakSet(), me = (e, t) => {
|
|
|
842
1174
|
}, t?.captureWarnings) {
|
|
843
1175
|
let t = e.config.warnHandler;
|
|
844
1176
|
e.config.warnHandler = (n, r, a) => {
|
|
845
|
-
let o =
|
|
1177
|
+
let o = W(r), s = Z(e.config.globalProperties.$router, { denylist: i }), c = { vue: {
|
|
846
1178
|
type: "warning",
|
|
847
1179
|
info: n,
|
|
848
1180
|
componentName: o,
|
|
849
1181
|
componentTrace: a,
|
|
850
1182
|
...s && { route: s }
|
|
851
1183
|
} };
|
|
852
|
-
Promise.resolve(
|
|
1184
|
+
Promise.resolve(I.reportMessage(n, "warning", je(c))).catch(() => {}), typeof t == "function" && t(n, r, a);
|
|
853
1185
|
};
|
|
854
1186
|
}
|
|
855
1187
|
};
|
|
@@ -902,24 +1234,24 @@ i({
|
|
|
902
1234
|
let n = t.length !== e.length, r = e.some((e, n) => !Object.is(e, t[n]));
|
|
903
1235
|
(n || r) && d();
|
|
904
1236
|
}), r((t, n, r) => {
|
|
905
|
-
let a =
|
|
1237
|
+
let a = m(t);
|
|
906
1238
|
e.beforeEvaluate?.({
|
|
907
1239
|
error: a,
|
|
908
1240
|
instance: n,
|
|
909
1241
|
info: r
|
|
910
1242
|
});
|
|
911
|
-
let o =
|
|
1243
|
+
let o = B(e.propsDenylist, e.replaceDefaultDenylist), d = G(n), f = J(n, {
|
|
912
1244
|
attachProps: e.attachProps,
|
|
913
1245
|
propsMaxDepth: e.propsMaxDepth,
|
|
914
1246
|
propsDenylist: o
|
|
915
|
-
}), p =
|
|
1247
|
+
}), p = W(n);
|
|
916
1248
|
s.value = a;
|
|
917
|
-
let
|
|
1249
|
+
let h = e.attachProps && n?.$props ? K(n.$props, e.propsMaxDepth, o) : void 0, g = Y(r), _ = Z(i?.appContext.config.globalProperties.$router, { denylist: o }), v = { vue: {
|
|
918
1250
|
info: r,
|
|
919
|
-
errorOrigin:
|
|
1251
|
+
errorOrigin: g,
|
|
920
1252
|
..._ && { route: _ },
|
|
921
1253
|
componentName: p,
|
|
922
|
-
...
|
|
1254
|
+
...h && { componentProps: h },
|
|
923
1255
|
componentHierarchy: d,
|
|
924
1256
|
componentHierarchyFrames: f
|
|
925
1257
|
} }, y = e.beforeSubmit?.({
|
|
@@ -928,7 +1260,7 @@ i({
|
|
|
928
1260
|
info: r,
|
|
929
1261
|
context: v
|
|
930
1262
|
}) ?? v;
|
|
931
|
-
return c.value = y.vue.componentProps, l.value = y.vue.componentHierarchy, u.value = y.vue.componentHierarchyFrames,
|
|
1263
|
+
return c.value = y.vue.componentProps, l.value = y.vue.componentHierarchy, u.value = y.vue.componentHierarchyFrames, I.reportSilently(a, Q(y)), e.afterSubmit?.({
|
|
932
1264
|
error: a,
|
|
933
1265
|
instance: n,
|
|
934
1266
|
info: r,
|
|
@@ -944,4 +1276,4 @@ i({
|
|
|
944
1276
|
}
|
|
945
1277
|
});
|
|
946
1278
|
//#endregion
|
|
947
|
-
export {
|
|
1279
|
+
export { Me as t };
|