@xylabs/log 2.11.22 → 2.11.24

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.
@@ -1,17 +1,8 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
- var __export = (target, all) => {
12
- for (var name in all)
13
- __defProp(target, name, { get: all[name], enumerable: true });
14
- };
15
6
  var __copyProps = (to, from, except, desc) => {
16
7
  if (from && typeof from === "object" || typeof from === "function") {
17
8
  for (let key of __getOwnPropNames(from))
@@ -20,2367 +11,9 @@ var __copyProps = (to, from, except, desc) => {
20
11
  }
21
12
  return to;
22
13
  };
23
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
- // If the importer is in node compatibility mode or this is not an ESM
25
- // file that has been converted to a CommonJS file using a Babel-
26
- // compatible transform (i.e. "__esModule" has not been set), then set
27
- // "default" to the CommonJS "module.exports" for node compatibility.
28
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
- mod
30
- ));
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
31
15
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
-
33
- // ../../node_modules/rollbar/dist/rollbar.umd.min.js
34
- var require_rollbar_umd_min = __commonJS({
35
- "../../node_modules/rollbar/dist/rollbar.umd.min.js"(exports, module2) {
36
- "use strict";
37
- !function(t, e) {
38
- "object" == typeof exports && "object" == typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.rollbar = e() : t.rollbar = e();
39
- }(exports, function() {
40
- return function(t) {
41
- var e = {};
42
- function r(n) {
43
- if (e[n])
44
- return e[n].exports;
45
- var o = e[n] = { i: n, l: false, exports: {} };
46
- return t[n].call(o.exports, o, o.exports, r), o.l = true, o.exports;
47
- }
48
- return r.m = t, r.c = e, r.d = function(t2, e2, n) {
49
- r.o(t2, e2) || Object.defineProperty(t2, e2, { enumerable: true, get: n });
50
- }, r.r = function(t2) {
51
- "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
52
- }, r.t = function(t2, e2) {
53
- if (1 & e2 && (t2 = r(t2)), 8 & e2)
54
- return t2;
55
- if (4 & e2 && "object" == typeof t2 && t2 && t2.__esModule)
56
- return t2;
57
- var n = /* @__PURE__ */ Object.create(null);
58
- if (r.r(n), Object.defineProperty(n, "default", { enumerable: true, value: t2 }), 2 & e2 && "string" != typeof t2)
59
- for (var o in t2)
60
- r.d(n, o, function(e3) {
61
- return t2[e3];
62
- }.bind(null, o));
63
- return n;
64
- }, r.n = function(t2) {
65
- var e2 = t2 && t2.__esModule ? function() {
66
- return t2.default;
67
- } : function() {
68
- return t2;
69
- };
70
- return r.d(e2, "a", e2), e2;
71
- }, r.o = function(t2, e2) {
72
- return Object.prototype.hasOwnProperty.call(t2, e2);
73
- }, r.p = "", r(r.s = 6);
74
- }([function(t, e, r) {
75
- "use strict";
76
- var n = r(12), o = {};
77
- function i(t2, e2) {
78
- return e2 === s(t2);
79
- }
80
- function s(t2) {
81
- var e2 = typeof t2;
82
- return "object" !== e2 ? e2 : t2 ? t2 instanceof Error ? "error" : {}.toString.call(t2).match(/\s([a-zA-Z]+)/)[1].toLowerCase() : "null";
83
- }
84
- function a(t2) {
85
- return i(t2, "function");
86
- }
87
- function u(t2) {
88
- var e2 = Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?"), r2 = RegExp("^" + e2 + "$");
89
- return c(t2) && r2.test(t2);
90
- }
91
- function c(t2) {
92
- var e2 = typeof t2;
93
- return null != t2 && ("object" == e2 || "function" == e2);
94
- }
95
- function l() {
96
- var t2 = y();
97
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e2) {
98
- var r2 = (t2 + 16 * Math.random()) % 16 | 0;
99
- return t2 = Math.floor(t2 / 16), ("x" === e2 ? r2 : 7 & r2 | 8).toString(16);
100
- });
101
- }
102
- var p = { strictMode: false, key: ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"], q: { name: "queryKey", parser: /(?:^|&)([^&=]*)=?([^&]*)/g }, parser: { strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ } };
103
- function f(t2, e2) {
104
- var r2, n2;
105
- try {
106
- r2 = o.stringify(t2);
107
- } catch (o2) {
108
- if (e2 && a(e2))
109
- try {
110
- r2 = e2(t2);
111
- } catch (t3) {
112
- n2 = t3;
113
- }
114
- else
115
- n2 = o2;
116
- }
117
- return { error: n2, value: r2 };
118
- }
119
- function h(t2, e2) {
120
- return function(r2, n2) {
121
- try {
122
- e2(r2, n2);
123
- } catch (e3) {
124
- t2.error(e3);
125
- }
126
- };
127
- }
128
- function d(t2) {
129
- return function t3(e2, r2) {
130
- var n2, o2, a2, u2 = {};
131
- try {
132
- for (o2 in e2)
133
- (n2 = e2[o2]) && (i(n2, "object") || i(n2, "array")) ? r2.includes(n2) ? u2[o2] = "Removed circular reference: " + s(n2) : ((a2 = r2.slice()).push(n2), u2[o2] = t3(n2, a2)) : u2[o2] = n2;
134
- } catch (t4) {
135
- u2 = "Failed cloning custom data: " + t4.message;
136
- }
137
- return u2;
138
- }(t2, [t2]);
139
- }
140
- var m = ["log", "network", "dom", "navigation", "error", "manual"], g = ["critical", "error", "warning", "info", "debug"];
141
- function v(t2, e2) {
142
- for (var r2 = 0; r2 < t2.length; ++r2)
143
- if (t2[r2] === e2)
144
- return true;
145
- return false;
146
- }
147
- function y() {
148
- return Date.now ? +Date.now() : +/* @__PURE__ */ new Date();
149
- }
150
- t.exports = { addParamsAndAccessTokenToPath: function(t2, e2, r2) {
151
- (r2 = r2 || {}).access_token = t2;
152
- var n2, o2 = [];
153
- for (n2 in r2)
154
- Object.prototype.hasOwnProperty.call(r2, n2) && o2.push([n2, r2[n2]].join("="));
155
- var i2 = "?" + o2.sort().join("&");
156
- (e2 = e2 || {}).path = e2.path || "";
157
- var s2, a2 = e2.path.indexOf("?"), u2 = e2.path.indexOf("#");
158
- -1 !== a2 && (-1 === u2 || u2 > a2) ? (s2 = e2.path, e2.path = s2.substring(0, a2) + i2 + "&" + s2.substring(a2 + 1)) : -1 !== u2 ? (s2 = e2.path, e2.path = s2.substring(0, u2) + i2 + s2.substring(u2)) : e2.path = e2.path + i2;
159
- }, createItem: function(t2, e2, r2, n2, o2) {
160
- for (var i2, a2, u2, c2, p2, f2, m2 = [], g2 = [], v2 = 0, b = t2.length; v2 < b; ++v2) {
161
- var w = s(f2 = t2[v2]);
162
- switch (g2.push(w), w) {
163
- case "undefined":
164
- break;
165
- case "string":
166
- i2 ? m2.push(f2) : i2 = f2;
167
- break;
168
- case "function":
169
- c2 = h(e2, f2);
170
- break;
171
- case "date":
172
- m2.push(f2);
173
- break;
174
- case "error":
175
- case "domexception":
176
- case "exception":
177
- a2 ? m2.push(f2) : a2 = f2;
178
- break;
179
- case "object":
180
- case "array":
181
- if (f2 instanceof Error || "undefined" != typeof DOMException && f2 instanceof DOMException) {
182
- a2 ? m2.push(f2) : a2 = f2;
183
- break;
184
- }
185
- if (n2 && "object" === w && !p2) {
186
- for (var _ = 0, x = n2.length; _ < x; ++_)
187
- if (void 0 !== f2[n2[_]]) {
188
- p2 = f2;
189
- break;
190
- }
191
- if (p2)
192
- break;
193
- }
194
- u2 ? m2.push(f2) : u2 = f2;
195
- break;
196
- default:
197
- if (f2 instanceof Error || "undefined" != typeof DOMException && f2 instanceof DOMException) {
198
- a2 ? m2.push(f2) : a2 = f2;
199
- break;
200
- }
201
- m2.push(f2);
202
- }
203
- }
204
- u2 && (u2 = d(u2)), m2.length > 0 && (u2 || (u2 = d({})), u2.extraArgs = d(m2));
205
- var k = { message: i2, err: a2, custom: u2, timestamp: y(), callback: c2, notifier: r2, diagnostic: {}, uuid: l() };
206
- return function(t3, e3) {
207
- e3 && void 0 !== e3.level && (t3.level = e3.level, delete e3.level);
208
- e3 && void 0 !== e3.skipFrames && (t3.skipFrames = e3.skipFrames, delete e3.skipFrames);
209
- }(k, u2), n2 && p2 && (k.request = p2), o2 && (k.lambdaContext = o2), k._originalArgs = t2, k.diagnostic.original_arg_types = g2, k;
210
- }, addErrorContext: function(t2, e2) {
211
- var r2 = t2.data.custom || {}, o2 = false;
212
- try {
213
- for (var i2 = 0; i2 < e2.length; ++i2)
214
- e2[i2].hasOwnProperty("rollbarContext") && (r2 = n(r2, d(e2[i2].rollbarContext)), o2 = true);
215
- o2 && (t2.data.custom = r2);
216
- } catch (e3) {
217
- t2.diagnostic.error_context = "Failed: " + e3.message;
218
- }
219
- }, createTelemetryEvent: function(t2) {
220
- for (var e2, r2, n2, o2, i2 = 0, a2 = t2.length; i2 < a2; ++i2) {
221
- switch (s(o2 = t2[i2])) {
222
- case "string":
223
- !e2 && v(m, o2) ? e2 = o2 : !n2 && v(g, o2) && (n2 = o2);
224
- break;
225
- case "object":
226
- r2 = o2;
227
- }
228
- }
229
- return { type: e2 || "manual", metadata: r2 || {}, level: n2 };
230
- }, filterIp: function(t2, e2) {
231
- if (t2 && t2.user_ip && true !== e2) {
232
- var r2 = t2.user_ip;
233
- if (e2)
234
- try {
235
- var n2;
236
- if (-1 !== r2.indexOf("."))
237
- (n2 = r2.split(".")).pop(), n2.push("0"), r2 = n2.join(".");
238
- else if (-1 !== r2.indexOf(":")) {
239
- if ((n2 = r2.split(":")).length > 2) {
240
- var o2 = n2.slice(0, 3), i2 = o2[2].indexOf("/");
241
- -1 !== i2 && (o2[2] = o2[2].substring(0, i2));
242
- r2 = o2.concat("0000:0000:0000:0000:0000").join(":");
243
- }
244
- } else
245
- r2 = null;
246
- } catch (t3) {
247
- r2 = null;
248
- }
249
- else
250
- r2 = null;
251
- t2.user_ip = r2;
252
- }
253
- }, formatArgsAsString: function(t2) {
254
- var e2, r2, n2, o2 = [];
255
- for (e2 = 0, r2 = t2.length; e2 < r2; ++e2) {
256
- switch (s(n2 = t2[e2])) {
257
- case "object":
258
- (n2 = (n2 = f(n2)).error || n2.value).length > 500 && (n2 = n2.substr(0, 497) + "...");
259
- break;
260
- case "null":
261
- n2 = "null";
262
- break;
263
- case "undefined":
264
- n2 = "undefined";
265
- break;
266
- case "symbol":
267
- n2 = n2.toString();
268
- }
269
- o2.push(n2);
270
- }
271
- return o2.join(" ");
272
- }, formatUrl: function(t2, e2) {
273
- if (!(e2 = e2 || t2.protocol) && t2.port && (80 === t2.port ? e2 = "http:" : 443 === t2.port && (e2 = "https:")), e2 = e2 || "https:", !t2.hostname)
274
- return null;
275
- var r2 = e2 + "//" + t2.hostname;
276
- return t2.port && (r2 = r2 + ":" + t2.port), t2.path && (r2 += t2.path), r2;
277
- }, get: function(t2, e2) {
278
- if (t2) {
279
- var r2 = e2.split("."), n2 = t2;
280
- try {
281
- for (var o2 = 0, i2 = r2.length; o2 < i2; ++o2)
282
- n2 = n2[r2[o2]];
283
- } catch (t3) {
284
- n2 = void 0;
285
- }
286
- return n2;
287
- }
288
- }, handleOptions: function(t2, e2, r2, o2) {
289
- var i2 = n(t2, e2, r2);
290
- return i2 = function(t3, e3) {
291
- t3.hostWhiteList && !t3.hostSafeList && (t3.hostSafeList = t3.hostWhiteList, t3.hostWhiteList = void 0, e3 && e3.log("hostWhiteList is deprecated. Use hostSafeList."));
292
- t3.hostBlackList && !t3.hostBlockList && (t3.hostBlockList = t3.hostBlackList, t3.hostBlackList = void 0, e3 && e3.log("hostBlackList is deprecated. Use hostBlockList."));
293
- return t3;
294
- }(i2, o2), !e2 || e2.overwriteScrubFields || e2.scrubFields && (i2.scrubFields = (t2.scrubFields || []).concat(e2.scrubFields)), i2;
295
- }, isError: function(t2) {
296
- return i(t2, "error") || i(t2, "exception");
297
- }, isFiniteNumber: function(t2) {
298
- return Number.isFinite(t2);
299
- }, isFunction: a, isIterable: function(t2) {
300
- var e2 = s(t2);
301
- return "object" === e2 || "array" === e2;
302
- }, isNativeFunction: u, isObject: c, isString: function(t2) {
303
- return "string" == typeof t2 || t2 instanceof String;
304
- }, isType: i, isPromise: function(t2) {
305
- return c(t2) && i(t2.then, "function");
306
- }, jsonParse: function(t2) {
307
- var e2, r2;
308
- try {
309
- e2 = o.parse(t2);
310
- } catch (t3) {
311
- r2 = t3;
312
- }
313
- return { error: r2, value: e2 };
314
- }, LEVELS: { debug: 0, info: 1, warning: 2, error: 3, critical: 4 }, makeUnhandledStackInfo: function(t2, e2, r2, n2, o2, i2, s2, a2) {
315
- var u2 = { url: e2 || "", line: r2, column: n2 };
316
- u2.func = a2.guessFunctionName(u2.url, u2.line), u2.context = a2.gatherContext(u2.url, u2.line);
317
- var c2 = "undefined" != typeof document && document && document.location && document.location.href, l2 = "undefined" != typeof window && window && window.navigator && window.navigator.userAgent;
318
- return { mode: i2, message: o2 ? String(o2) : t2 || s2, url: c2, stack: [u2], useragent: l2 };
319
- }, merge: n, now: y, redact: function() {
320
- return "********";
321
- }, RollbarJSON: o, sanitizeUrl: function(t2) {
322
- var e2 = function(t3) {
323
- if (!i(t3, "string"))
324
- return;
325
- for (var e3 = p, r2 = e3.parser[e3.strictMode ? "strict" : "loose"].exec(t3), n2 = {}, o2 = 0, s2 = e3.key.length; o2 < s2; ++o2)
326
- n2[e3.key[o2]] = r2[o2] || "";
327
- return n2[e3.q.name] = {}, n2[e3.key[12]].replace(e3.q.parser, function(t4, r3, o3) {
328
- r3 && (n2[e3.q.name][r3] = o3);
329
- }), n2;
330
- }(t2);
331
- return e2 ? ("" === e2.anchor && (e2.source = e2.source.replace("#", "")), t2 = e2.source.replace("?" + e2.query, "")) : "(unknown)";
332
- }, set: function(t2, e2, r2) {
333
- if (t2) {
334
- var n2 = e2.split("."), o2 = n2.length;
335
- if (!(o2 < 1))
336
- if (1 !== o2)
337
- try {
338
- for (var i2 = t2[n2[0]] || {}, s2 = i2, a2 = 1; a2 < o2 - 1; ++a2)
339
- i2[n2[a2]] = i2[n2[a2]] || {}, i2 = i2[n2[a2]];
340
- i2[n2[o2 - 1]] = r2, t2[n2[0]] = s2;
341
- } catch (t3) {
342
- return;
343
- }
344
- else
345
- t2[n2[0]] = r2;
346
- }
347
- }, setupJSON: function(t2) {
348
- a(o.stringify) && a(o.parse) || (i(JSON, "undefined") || (t2 ? (u(JSON.stringify) && (o.stringify = JSON.stringify), u(JSON.parse) && (o.parse = JSON.parse)) : (a(JSON.stringify) && (o.stringify = JSON.stringify), a(JSON.parse) && (o.parse = JSON.parse))), a(o.stringify) && a(o.parse) || t2 && t2(o));
349
- }, stringify: f, maxByteSize: function(t2) {
350
- for (var e2 = 0, r2 = t2.length, n2 = 0; n2 < r2; n2++) {
351
- var o2 = t2.charCodeAt(n2);
352
- o2 < 128 ? e2 += 1 : o2 < 2048 ? e2 += 2 : o2 < 65536 && (e2 += 3);
353
- }
354
- return e2;
355
- }, typeName: s, uuid4: l };
356
- }, function(t, e, r) {
357
- "use strict";
358
- r(17);
359
- var n = r(18), o = r(0);
360
- t.exports = { error: function() {
361
- var t2 = Array.prototype.slice.call(arguments, 0);
362
- t2.unshift("Rollbar:"), n.ieVersion() <= 8 ? console.error(o.formatArgsAsString(t2)) : console.error.apply(console, t2);
363
- }, info: function() {
364
- var t2 = Array.prototype.slice.call(arguments, 0);
365
- t2.unshift("Rollbar:"), n.ieVersion() <= 8 ? console.info(o.formatArgsAsString(t2)) : console.info.apply(console, t2);
366
- }, log: function() {
367
- var t2 = Array.prototype.slice.call(arguments, 0);
368
- t2.unshift("Rollbar:"), n.ieVersion() <= 8 ? console.log(o.formatArgsAsString(t2)) : console.log.apply(console, t2);
369
- } };
370
- }, function(t, e, r) {
371
- "use strict";
372
- t.exports = { parse: function(t2) {
373
- var e2, r2, n = { protocol: null, auth: null, host: null, path: null, hash: null, href: t2, hostname: null, port: null, pathname: null, search: null, query: null };
374
- if (-1 !== (e2 = t2.indexOf("//")) ? (n.protocol = t2.substring(0, e2), r2 = e2 + 2) : r2 = 0, -1 !== (e2 = t2.indexOf("@", r2)) && (n.auth = t2.substring(r2, e2), r2 = e2 + 1), -1 === (e2 = t2.indexOf("/", r2))) {
375
- if (-1 === (e2 = t2.indexOf("?", r2)))
376
- return -1 === (e2 = t2.indexOf("#", r2)) ? n.host = t2.substring(r2) : (n.host = t2.substring(r2, e2), n.hash = t2.substring(e2)), n.hostname = n.host.split(":")[0], n.port = n.host.split(":")[1], n.port && (n.port = parseInt(n.port, 10)), n;
377
- n.host = t2.substring(r2, e2), n.hostname = n.host.split(":")[0], n.port = n.host.split(":")[1], n.port && (n.port = parseInt(n.port, 10)), r2 = e2;
378
- } else
379
- n.host = t2.substring(r2, e2), n.hostname = n.host.split(":")[0], n.port = n.host.split(":")[1], n.port && (n.port = parseInt(n.port, 10)), r2 = e2;
380
- if (-1 === (e2 = t2.indexOf("#", r2)) ? n.path = t2.substring(r2) : (n.path = t2.substring(r2, e2), n.hash = t2.substring(e2)), n.path) {
381
- var o = n.path.split("?");
382
- n.pathname = o[0], n.query = o[1], n.search = n.query ? "?" + n.query : null;
383
- }
384
- return n;
385
- } };
386
- }, function(t, e, r) {
387
- "use strict";
388
- var n = r(24), o = new RegExp("^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ");
389
- function i() {
390
- return null;
391
- }
392
- function s(t2) {
393
- var e2 = {};
394
- return e2._stackFrame = t2, e2.url = t2.fileName, e2.line = t2.lineNumber, e2.func = t2.functionName, e2.column = t2.columnNumber, e2.args = t2.args, e2.context = null, e2;
395
- }
396
- function a(t2, e2) {
397
- return { stack: function() {
398
- var r2 = [];
399
- e2 = e2 || 0;
400
- try {
401
- r2 = n.parse(t2);
402
- } catch (t3) {
403
- r2 = [];
404
- }
405
- for (var o2 = [], i2 = e2; i2 < r2.length; i2++)
406
- o2.push(new s(r2[i2]));
407
- return o2;
408
- }(), message: t2.message, name: u(t2), rawStack: t2.stack, rawException: t2 };
409
- }
410
- function u(t2) {
411
- var e2 = t2.name && t2.name.length && t2.name, r2 = t2.constructor.name && t2.constructor.name.length && t2.constructor.name;
412
- return e2 && r2 ? "Error" === e2 ? r2 : e2 : e2 || r2;
413
- }
414
- t.exports = { guessFunctionName: function() {
415
- return "?";
416
- }, guessErrorClass: function(t2) {
417
- if (!t2 || !t2.match)
418
- return ["Unknown error. There was no error message to display.", ""];
419
- var e2 = t2.match(o), r2 = "(unknown)";
420
- return e2 && (r2 = e2[e2.length - 1], t2 = (t2 = t2.replace((e2[e2.length - 2] || "") + r2 + ":", "")).replace(/(^[\s]+|[\s]+$)/g, "")), [r2, t2];
421
- }, gatherContext: i, parse: function(t2, e2) {
422
- var r2 = t2;
423
- if (r2.nested || r2.cause) {
424
- for (var n2 = []; r2; )
425
- n2.push(new a(r2, e2)), r2 = r2.nested || r2.cause, e2 = 0;
426
- return n2[0].traceChain = n2, n2[0];
427
- }
428
- return new a(r2, e2);
429
- }, Stack: a, Frame: s };
430
- }, function(t, e, r) {
431
- "use strict";
432
- var n = r(0), o = r(5);
433
- function i(t2, e2) {
434
- var r2 = e2.split("."), o2 = r2.length - 1;
435
- try {
436
- for (var i2 = 0; i2 <= o2; ++i2)
437
- i2 < o2 ? t2 = t2[r2[i2]] : t2[r2[i2]] = n.redact();
438
- } catch (t3) {
439
- }
440
- }
441
- t.exports = function(t2, e2, r2) {
442
- if (e2 = e2 || [], r2)
443
- for (var s = 0; s < r2.length; ++s)
444
- i(t2, r2[s]);
445
- var a = function(t3) {
446
- for (var e3, r3 = [], n2 = 0; n2 < t3.length; ++n2)
447
- e3 = "^\\[?(%5[bB])?" + t3[n2] + "\\[?(%5[bB])?\\]?(%5[dD])?$", r3.push(new RegExp(e3, "i"));
448
- return r3;
449
- }(e2), u = function(t3) {
450
- for (var e3, r3 = [], n2 = 0; n2 < t3.length; ++n2)
451
- e3 = "\\[?(%5[bB])?" + t3[n2] + "\\[?(%5[bB])?\\]?(%5[dD])?", r3.push(new RegExp("(" + e3 + "=)([^&\\n]+)", "igm"));
452
- return r3;
453
- }(e2);
454
- function c(t3, e3) {
455
- return e3 + n.redact();
456
- }
457
- return o(t2, function t3(e3, r3, i2) {
458
- var s2 = function(t4, e4) {
459
- var r4;
460
- for (r4 = 0; r4 < a.length; ++r4)
461
- if (a[r4].test(t4)) {
462
- e4 = n.redact();
463
- break;
464
- }
465
- return e4;
466
- }(e3, r3);
467
- return s2 === r3 ? n.isType(r3, "object") || n.isType(r3, "array") ? o(r3, t3, i2) : function(t4) {
468
- var e4;
469
- if (n.isType(t4, "string"))
470
- for (e4 = 0; e4 < u.length; ++e4)
471
- t4 = t4.replace(u[e4], c);
472
- return t4;
473
- }(s2) : s2;
474
- });
475
- };
476
- }, function(t, e, r) {
477
- "use strict";
478
- var n = r(0);
479
- t.exports = function(t2, e2, r2) {
480
- var o, i, s, a, u = n.isType(t2, "object"), c = n.isType(t2, "array"), l = [];
481
- if (r2 = r2 || { obj: [], mapped: [] }, u) {
482
- if (a = r2.obj.indexOf(t2), u && -1 !== a)
483
- return r2.mapped[a] || r2.obj[a];
484
- r2.obj.push(t2), a = r2.obj.length - 1;
485
- }
486
- if (u)
487
- for (o in t2)
488
- Object.prototype.hasOwnProperty.call(t2, o) && l.push(o);
489
- else if (c)
490
- for (s = 0; s < t2.length; ++s)
491
- l.push(s);
492
- var p = u ? {} : [], f = true;
493
- for (s = 0; s < l.length; ++s)
494
- i = t2[o = l[s]], p[o] = e2(o, i, r2), f = f && p[o] === t2[o];
495
- return u && !f && (r2.mapped[a] = p), f ? t2 : p;
496
- };
497
- }, function(t, e, r) {
498
- t.exports = r(7);
499
- }, function(t, e, r) {
500
- "use strict";
501
- var n = r(8), o = "undefined" != typeof window && window._rollbarConfig, i = o && o.globalAlias || "Rollbar", s = "undefined" != typeof window && window[i] && "function" == typeof window[i].shimId && void 0 !== window[i].shimId();
502
- if ("undefined" == typeof window || window._rollbarStartTime || (window._rollbarStartTime = (/* @__PURE__ */ new Date()).getTime()), !s && o) {
503
- var a = new n(o);
504
- window[i] = a;
505
- } else
506
- "undefined" != typeof window ? (window.rollbar = n, window._rollbarDidLoad = true) : "undefined" != typeof self && (self.rollbar = n, self._rollbarDidLoad = true);
507
- t.exports = n;
508
- }, function(t, e, r) {
509
- "use strict";
510
- var n = r(9), o = r(31), i = r(32), s = r(35), a = r(37), u = r(4), c = r(38);
511
- n.setComponents({ telemeter: o, instrumenter: i, polyfillJSON: s, wrapGlobals: a, scrub: u, truncation: c }), t.exports = n;
512
- }, function(t, e, r) {
513
- "use strict";
514
- var n = r(10), o = r(0), i = r(15), s = r(1), a = r(19), u = r(20), c = r(2), l = r(23), p = r(26), f = r(27), h = r(28), d = r(3);
515
- function m(t2, e2) {
516
- this.options = o.handleOptions(x, t2, null, s), this.options._configuredOptions = t2;
517
- var r2 = this.components.telemeter, a2 = this.components.instrumenter, d2 = this.components.polyfillJSON;
518
- this.wrapGlobals = this.components.wrapGlobals, this.scrub = this.components.scrub;
519
- var m2 = this.components.truncation, g2 = new u(m2), v2 = new i(this.options, g2, c, m2);
520
- r2 && (this.telemeter = new r2(this.options)), this.client = e2 || new n(this.options, v2, s, this.telemeter, "browser");
521
- var y2 = b(), w2 = "undefined" != typeof document && document;
522
- this.isChrome = y2.chrome && y2.chrome.runtime, this.anonymousErrorsPending = 0, function(t3, e3, r3) {
523
- t3.addTransform(l.handleDomException).addTransform(l.handleItemWithError).addTransform(l.ensureItemHasSomethingToSay).addTransform(l.addBaseInfo).addTransform(l.addRequestInfo(r3)).addTransform(l.addClientInfo(r3)).addTransform(l.addPluginInfo(r3)).addTransform(l.addBody).addTransform(p.addMessageWithError).addTransform(p.addTelemetryData).addTransform(p.addConfigToPayload).addTransform(l.addScrubber(e3.scrub)).addTransform(p.addPayloadOptions).addTransform(p.userTransform(s)).addTransform(p.addConfiguredOptions).addTransform(p.addDiagnosticKeys).addTransform(p.itemToPayload);
524
- }(this.client.notifier, this, y2), this.client.queue.addPredicate(h.checkLevel).addPredicate(f.checkIgnore).addPredicate(h.userCheckIgnore(s)).addPredicate(h.urlIsNotBlockListed(s)).addPredicate(h.urlIsSafeListed(s)).addPredicate(h.messageIsIgnored(s)), this.setupUnhandledCapture(), a2 && (this.instrumenter = new a2(this.options, this.client.telemeter, this, y2, w2), this.instrumenter.instrument()), o.setupJSON(d2), this.rollbar = this;
525
- }
526
- var g = null;
527
- function v(t2) {
528
- var e2 = "Rollbar is not initialized";
529
- s.error(e2), t2 && t2(new Error(e2));
530
- }
531
- function y(t2) {
532
- for (var e2 = 0, r2 = t2.length; e2 < r2; ++e2)
533
- if (o.isFunction(t2[e2]))
534
- return t2[e2];
535
- }
536
- function b() {
537
- return "undefined" != typeof window && window || "undefined" != typeof self && self;
538
- }
539
- m.init = function(t2, e2) {
540
- return g ? g.global(t2).configure(t2) : g = new m(t2, e2);
541
- }, m.prototype.components = {}, m.setComponents = function(t2) {
542
- m.prototype.components = t2;
543
- }, m.prototype.global = function(t2) {
544
- return this.client.global(t2), this;
545
- }, m.global = function(t2) {
546
- if (g)
547
- return g.global(t2);
548
- v();
549
- }, m.prototype.configure = function(t2, e2) {
550
- var r2 = this.options, n2 = {};
551
- return e2 && (n2 = { payload: e2 }), this.options = o.handleOptions(r2, t2, n2, s), this.options._configuredOptions = o.handleOptions(r2._configuredOptions, t2, n2), this.client.configure(this.options, e2), this.instrumenter && this.instrumenter.configure(this.options), this.setupUnhandledCapture(), this;
552
- }, m.configure = function(t2, e2) {
553
- if (g)
554
- return g.configure(t2, e2);
555
- v();
556
- }, m.prototype.lastError = function() {
557
- return this.client.lastError;
558
- }, m.lastError = function() {
559
- if (g)
560
- return g.lastError();
561
- v();
562
- }, m.prototype.log = function() {
563
- var t2 = this._createItem(arguments), e2 = t2.uuid;
564
- return this.client.log(t2), { uuid: e2 };
565
- }, m.log = function() {
566
- if (g)
567
- return g.log.apply(g, arguments);
568
- var t2 = y(arguments);
569
- v(t2);
570
- }, m.prototype.debug = function() {
571
- var t2 = this._createItem(arguments), e2 = t2.uuid;
572
- return this.client.debug(t2), { uuid: e2 };
573
- }, m.debug = function() {
574
- if (g)
575
- return g.debug.apply(g, arguments);
576
- var t2 = y(arguments);
577
- v(t2);
578
- }, m.prototype.info = function() {
579
- var t2 = this._createItem(arguments), e2 = t2.uuid;
580
- return this.client.info(t2), { uuid: e2 };
581
- }, m.info = function() {
582
- if (g)
583
- return g.info.apply(g, arguments);
584
- var t2 = y(arguments);
585
- v(t2);
586
- }, m.prototype.warn = function() {
587
- var t2 = this._createItem(arguments), e2 = t2.uuid;
588
- return this.client.warn(t2), { uuid: e2 };
589
- }, m.warn = function() {
590
- if (g)
591
- return g.warn.apply(g, arguments);
592
- var t2 = y(arguments);
593
- v(t2);
594
- }, m.prototype.warning = function() {
595
- var t2 = this._createItem(arguments), e2 = t2.uuid;
596
- return this.client.warning(t2), { uuid: e2 };
597
- }, m.warning = function() {
598
- if (g)
599
- return g.warning.apply(g, arguments);
600
- var t2 = y(arguments);
601
- v(t2);
602
- }, m.prototype.error = function() {
603
- var t2 = this._createItem(arguments), e2 = t2.uuid;
604
- return this.client.error(t2), { uuid: e2 };
605
- }, m.error = function() {
606
- if (g)
607
- return g.error.apply(g, arguments);
608
- var t2 = y(arguments);
609
- v(t2);
610
- }, m.prototype.critical = function() {
611
- var t2 = this._createItem(arguments), e2 = t2.uuid;
612
- return this.client.critical(t2), { uuid: e2 };
613
- }, m.critical = function() {
614
- if (g)
615
- return g.critical.apply(g, arguments);
616
- var t2 = y(arguments);
617
- v(t2);
618
- }, m.prototype.buildJsonPayload = function(t2) {
619
- return this.client.buildJsonPayload(t2);
620
- }, m.buildJsonPayload = function() {
621
- if (g)
622
- return g.buildJsonPayload.apply(g, arguments);
623
- v();
624
- }, m.prototype.sendJsonPayload = function(t2) {
625
- return this.client.sendJsonPayload(t2);
626
- }, m.sendJsonPayload = function() {
627
- if (g)
628
- return g.sendJsonPayload.apply(g, arguments);
629
- v();
630
- }, m.prototype.setupUnhandledCapture = function() {
631
- var t2 = b();
632
- this.unhandledExceptionsInitialized || (this.options.captureUncaught || this.options.handleUncaughtExceptions) && (a.captureUncaughtExceptions(t2, this), this.wrapGlobals && this.options.wrapGlobalEventHandlers && this.wrapGlobals(t2, this), this.unhandledExceptionsInitialized = true), this.unhandledRejectionsInitialized || (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) && (a.captureUnhandledRejections(t2, this), this.unhandledRejectionsInitialized = true);
633
- }, m.prototype.handleUncaughtException = function(t2, e2, r2, n2, i2, s2) {
634
- if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {
635
- if (this.options.inspectAnonymousErrors && this.isChrome && null === i2 && "" === e2)
636
- return "anonymous";
637
- var a2, u2 = o.makeUnhandledStackInfo(t2, e2, r2, n2, i2, "onerror", "uncaught exception", d);
638
- o.isError(i2) ? (a2 = this._createItem([t2, i2, s2]))._unhandledStackInfo = u2 : o.isError(e2) ? (a2 = this._createItem([t2, e2, s2]))._unhandledStackInfo = u2 : (a2 = this._createItem([t2, s2])).stackInfo = u2, a2.level = this.options.uncaughtErrorLevel, a2._isUncaught = true, this.client.log(a2);
639
- }
640
- }, m.prototype.handleAnonymousErrors = function() {
641
- if (this.options.inspectAnonymousErrors && this.isChrome) {
642
- var t2 = this;
643
- try {
644
- Error.prepareStackTrace = function(e2, r2) {
645
- if (t2.options.inspectAnonymousErrors && t2.anonymousErrorsPending) {
646
- if (t2.anonymousErrorsPending -= 1, !e2)
647
- return;
648
- e2._isAnonymous = true, t2.handleUncaughtException(e2.message, null, null, null, e2);
649
- }
650
- return e2.stack;
651
- };
652
- } catch (t3) {
653
- this.options.inspectAnonymousErrors = false, this.error("anonymous error handler failed", t3);
654
- }
655
- }
656
- }, m.prototype.handleUnhandledRejection = function(t2, e2) {
657
- if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {
658
- var r2 = "unhandled rejection was null or undefined!";
659
- if (t2)
660
- if (t2.message)
661
- r2 = t2.message;
662
- else {
663
- var n2 = o.stringify(t2);
664
- n2.value && (r2 = n2.value);
665
- }
666
- var i2, s2 = t2 && t2._rollbarContext || e2 && e2._rollbarContext;
667
- o.isError(t2) ? i2 = this._createItem([r2, t2, s2]) : (i2 = this._createItem([r2, t2, s2])).stackInfo = o.makeUnhandledStackInfo(r2, "", 0, 0, null, "unhandledrejection", "", d), i2.level = this.options.uncaughtErrorLevel, i2._isUncaught = true, i2._originalArgs = i2._originalArgs || [], i2._originalArgs.push(e2), this.client.log(i2);
668
- }
669
- }, m.prototype.wrap = function(t2, e2, r2) {
670
- try {
671
- var n2;
672
- if (n2 = o.isFunction(e2) ? e2 : function() {
673
- return e2 || {};
674
- }, !o.isFunction(t2))
675
- return t2;
676
- if (t2._isWrap)
677
- return t2;
678
- if (!t2._rollbar_wrapped && (t2._rollbar_wrapped = function() {
679
- r2 && o.isFunction(r2) && r2.apply(this, arguments);
680
- try {
681
- return t2.apply(this, arguments);
682
- } catch (r3) {
683
- var e3 = r3;
684
- throw e3 && window._rollbarWrappedError !== e3 && (o.isType(e3, "string") && (e3 = new String(e3)), e3._rollbarContext = n2() || {}, e3._rollbarContext._wrappedSource = t2.toString(), window._rollbarWrappedError = e3), e3;
685
- }
686
- }, t2._rollbar_wrapped._isWrap = true, t2.hasOwnProperty))
687
- for (var i2 in t2)
688
- t2.hasOwnProperty(i2) && "_rollbar_wrapped" !== i2 && (t2._rollbar_wrapped[i2] = t2[i2]);
689
- return t2._rollbar_wrapped;
690
- } catch (e3) {
691
- return t2;
692
- }
693
- }, m.wrap = function(t2, e2) {
694
- if (g)
695
- return g.wrap(t2, e2);
696
- v();
697
- }, m.prototype.captureEvent = function() {
698
- var t2 = o.createTelemetryEvent(arguments);
699
- return this.client.captureEvent(t2.type, t2.metadata, t2.level);
700
- }, m.captureEvent = function() {
701
- if (g)
702
- return g.captureEvent.apply(g, arguments);
703
- v();
704
- }, m.prototype.captureDomContentLoaded = function(t2, e2) {
705
- return e2 || (e2 = /* @__PURE__ */ new Date()), this.client.captureDomContentLoaded(e2);
706
- }, m.prototype.captureLoad = function(t2, e2) {
707
- return e2 || (e2 = /* @__PURE__ */ new Date()), this.client.captureLoad(e2);
708
- }, m.prototype.loadFull = function() {
709
- s.info("Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.");
710
- }, m.prototype._createItem = function(t2) {
711
- return o.createItem(t2, s, this);
712
- };
713
- var w = r(29), _ = r(30), x = { version: w.version, scrubFields: _.scrubFields, logLevel: w.logLevel, reportLevel: w.reportLevel, uncaughtErrorLevel: w.uncaughtErrorLevel, endpoint: w.endpoint, verbose: false, enabled: true, transmit: true, sendConfig: false, includeItemsInTelemetry: true, captureIp: true, inspectAnonymousErrors: true, ignoreDuplicateErrors: true, wrapGlobalEventHandlers: false };
714
- t.exports = m;
715
- }, function(t, e, r) {
716
- "use strict";
717
- var n = r(11), o = r(13), i = r(14), s = r(0);
718
- function a(t2, e2, r2, n2, l) {
719
- this.options = s.merge(t2), this.logger = r2, a.rateLimiter.configureGlobal(this.options), a.rateLimiter.setPlatformOptions(l, this.options), this.api = e2, this.queue = new o(a.rateLimiter, e2, r2, this.options);
720
- var p = this.options.tracer || null;
721
- c(p) ? (this.tracer = p, this.options.tracer = "opentracing-tracer-enabled", this.options._configuredOptions.tracer = "opentracing-tracer-enabled") : this.tracer = null, this.notifier = new i(this.queue, this.options), this.telemeter = n2, u(t2), this.lastError = null, this.lastErrorHash = "none";
722
- }
723
- function u(t2) {
724
- t2.stackTraceLimit && (Error.stackTraceLimit = t2.stackTraceLimit);
725
- }
726
- function c(t2) {
727
- if (!t2)
728
- return false;
729
- if (!t2.scope || "function" != typeof t2.scope)
730
- return false;
731
- var e2 = t2.scope();
732
- return !(!e2 || !e2.active || "function" != typeof e2.active);
733
- }
734
- a.rateLimiter = new n({ maxItems: 0, itemsPerMinute: 60 }), a.prototype.global = function(t2) {
735
- return a.rateLimiter.configureGlobal(t2), this;
736
- }, a.prototype.configure = function(t2, e2) {
737
- var r2 = this.options, n2 = {};
738
- e2 && (n2 = { payload: e2 }), this.options = s.merge(r2, t2, n2);
739
- var o2 = this.options.tracer || null;
740
- return c(o2) ? (this.tracer = o2, this.options.tracer = "opentracing-tracer-enabled", this.options._configuredOptions.tracer = "opentracing-tracer-enabled") : this.tracer = null, this.notifier && this.notifier.configure(this.options), this.telemeter && this.telemeter.configure(this.options), u(t2), this.global(this.options), c(t2.tracer) && (this.tracer = t2.tracer), this;
741
- }, a.prototype.log = function(t2) {
742
- var e2 = this._defaultLogLevel();
743
- return this._log(e2, t2);
744
- }, a.prototype.debug = function(t2) {
745
- this._log("debug", t2);
746
- }, a.prototype.info = function(t2) {
747
- this._log("info", t2);
748
- }, a.prototype.warn = function(t2) {
749
- this._log("warning", t2);
750
- }, a.prototype.warning = function(t2) {
751
- this._log("warning", t2);
752
- }, a.prototype.error = function(t2) {
753
- this._log("error", t2);
754
- }, a.prototype.critical = function(t2) {
755
- this._log("critical", t2);
756
- }, a.prototype.wait = function(t2) {
757
- this.queue.wait(t2);
758
- }, a.prototype.captureEvent = function(t2, e2, r2) {
759
- return this.telemeter && this.telemeter.captureEvent(t2, e2, r2);
760
- }, a.prototype.captureDomContentLoaded = function(t2) {
761
- return this.telemeter && this.telemeter.captureDomContentLoaded(t2);
762
- }, a.prototype.captureLoad = function(t2) {
763
- return this.telemeter && this.telemeter.captureLoad(t2);
764
- }, a.prototype.buildJsonPayload = function(t2) {
765
- return this.api.buildJsonPayload(t2);
766
- }, a.prototype.sendJsonPayload = function(t2) {
767
- this.api.postJsonPayload(t2);
768
- }, a.prototype._log = function(t2, e2) {
769
- var r2;
770
- if (e2.callback && (r2 = e2.callback, delete e2.callback), this.options.ignoreDuplicateErrors && this._sameAsLastError(e2)) {
771
- if (r2) {
772
- var n2 = new Error("ignored identical item");
773
- n2.item = e2, r2(n2);
774
- }
775
- } else
776
- try {
777
- this._addTracingInfo(e2), e2.level = e2.level || t2, this.telemeter && this.telemeter._captureRollbarItem(e2), e2.telemetryEvents = this.telemeter && this.telemeter.copyEvents() || [], this.notifier.log(e2, r2);
778
- } catch (t3) {
779
- r2 && r2(t3), this.logger.error(t3);
780
- }
781
- }, a.prototype._defaultLogLevel = function() {
782
- return this.options.logLevel || "debug";
783
- }, a.prototype._sameAsLastError = function(t2) {
784
- if (!t2._isUncaught)
785
- return false;
786
- var e2 = function(t3) {
787
- var e3 = t3.message || "", r2 = (t3.err || {}).stack || String(t3.err);
788
- return e3 + "::" + r2;
789
- }(t2);
790
- return this.lastErrorHash === e2 || (this.lastError = t2.err, this.lastErrorHash = e2, false);
791
- }, a.prototype._addTracingInfo = function(t2) {
792
- if (this.tracer) {
793
- var e2 = this.tracer.scope().active();
794
- if (function(t3) {
795
- if (!t3 || !t3.context || "function" != typeof t3.context)
796
- return false;
797
- var e3 = t3.context();
798
- if (!e3 || !e3.toSpanId || !e3.toTraceId || "function" != typeof e3.toSpanId || "function" != typeof e3.toTraceId)
799
- return false;
800
- return true;
801
- }(e2)) {
802
- e2.setTag("rollbar.error_uuid", t2.uuid), e2.setTag("rollbar.has_error", true), e2.setTag("error", true), e2.setTag("rollbar.item_url", "https://rollbar.com/item/uuid/?uuid=" + t2.uuid), e2.setTag("rollbar.occurrence_url", "https://rollbar.com/occurrence/uuid/?uuid=" + t2.uuid);
803
- var r2 = e2.context().toSpanId(), n2 = e2.context().toTraceId();
804
- t2.custom ? (t2.custom.opentracing_span_id = r2, t2.custom.opentracing_trace_id = n2) : t2.custom = { opentracing_span_id: r2, opentracing_trace_id: n2 };
805
- }
806
- }
807
- }, t.exports = a;
808
- }, function(t, e, r) {
809
- "use strict";
810
- var n = r(0);
811
- function o(t2) {
812
- this.startTime = n.now(), this.counter = 0, this.perMinCounter = 0, this.platform = null, this.platformOptions = {}, this.configureGlobal(t2);
813
- }
814
- function i(t2, e2, r2) {
815
- return !t2.ignoreRateLimit && e2 >= 1 && r2 > e2;
816
- }
817
- function s(t2, e2, r2, n2, o2, i2, s2) {
818
- var a = null;
819
- return r2 && (r2 = new Error(r2)), r2 || n2 || (a = function(t3, e3, r3, n3, o3) {
820
- var i3, s3 = e3.environment || e3.payload && e3.payload.environment;
821
- i3 = o3 ? "item per minute limit reached, ignoring errors until timeout" : "maxItems has been hit, ignoring errors until reset.";
822
- var a2 = { body: { message: { body: i3, extra: { maxItems: r3, itemsPerMinute: n3 } } }, language: "javascript", environment: s3, notifier: { version: e3.notifier && e3.notifier.version || e3.version } };
823
- "browser" === t3 ? (a2.platform = "browser", a2.framework = "browser-js", a2.notifier.name = "rollbar-browser-js") : "server" === t3 ? (a2.framework = e3.framework || "node-js", a2.notifier.name = e3.notifier.name) : "react-native" === t3 && (a2.framework = e3.framework || "react-native", a2.notifier.name = e3.notifier.name);
824
- return a2;
825
- }(t2, e2, o2, i2, s2)), { error: r2, shouldSend: n2, payload: a };
826
- }
827
- o.globalSettings = { startTime: n.now(), maxItems: void 0, itemsPerMinute: void 0 }, o.prototype.configureGlobal = function(t2) {
828
- void 0 !== t2.startTime && (o.globalSettings.startTime = t2.startTime), void 0 !== t2.maxItems && (o.globalSettings.maxItems = t2.maxItems), void 0 !== t2.itemsPerMinute && (o.globalSettings.itemsPerMinute = t2.itemsPerMinute);
829
- }, o.prototype.shouldSend = function(t2, e2) {
830
- var r2 = (e2 = e2 || n.now()) - this.startTime;
831
- (r2 < 0 || r2 >= 6e4) && (this.startTime = e2, this.perMinCounter = 0);
832
- var a = o.globalSettings.maxItems, u = o.globalSettings.itemsPerMinute;
833
- if (i(t2, a, this.counter))
834
- return s(this.platform, this.platformOptions, a + " max items reached", false);
835
- if (i(t2, u, this.perMinCounter))
836
- return s(this.platform, this.platformOptions, u + " items per minute reached", false);
837
- this.counter++, this.perMinCounter++;
838
- var c = !i(t2, a, this.counter), l = c;
839
- return c = c && !i(t2, u, this.perMinCounter), s(this.platform, this.platformOptions, null, c, a, u, l);
840
- }, o.prototype.setPlatformOptions = function(t2, e2) {
841
- this.platform = t2, this.platformOptions = e2;
842
- }, t.exports = o;
843
- }, function(t, e, r) {
844
- "use strict";
845
- var n = Object.prototype.hasOwnProperty, o = Object.prototype.toString, i = function(t2) {
846
- if (!t2 || "[object Object]" !== o.call(t2))
847
- return false;
848
- var e2, r2 = n.call(t2, "constructor"), i2 = t2.constructor && t2.constructor.prototype && n.call(t2.constructor.prototype, "isPrototypeOf");
849
- if (t2.constructor && !r2 && !i2)
850
- return false;
851
- for (e2 in t2)
852
- ;
853
- return void 0 === e2 || n.call(t2, e2);
854
- };
855
- t.exports = function t2() {
856
- var e2, r2, n2, o2, s, a = {}, u = null, c = arguments.length;
857
- for (e2 = 0; e2 < c; e2++)
858
- if (null != (u = arguments[e2]))
859
- for (s in u)
860
- r2 = a[s], a !== (n2 = u[s]) && (n2 && i(n2) ? (o2 = r2 && i(r2) ? r2 : {}, a[s] = t2(o2, n2)) : void 0 !== n2 && (a[s] = n2));
861
- return a;
862
- };
863
- }, function(t, e, r) {
864
- "use strict";
865
- var n = r(0);
866
- function o(t2, e2, r2, n2) {
867
- this.rateLimiter = t2, this.api = e2, this.logger = r2, this.options = n2, this.predicates = [], this.pendingItems = [], this.pendingRequests = [], this.retryQueue = [], this.retryHandle = null, this.waitCallback = null, this.waitIntervalID = null;
868
- }
869
- o.prototype.configure = function(t2) {
870
- this.api && this.api.configure(t2);
871
- var e2 = this.options;
872
- return this.options = n.merge(e2, t2), this;
873
- }, o.prototype.addPredicate = function(t2) {
874
- return n.isFunction(t2) && this.predicates.push(t2), this;
875
- }, o.prototype.addPendingItem = function(t2) {
876
- this.pendingItems.push(t2);
877
- }, o.prototype.removePendingItem = function(t2) {
878
- var e2 = this.pendingItems.indexOf(t2);
879
- -1 !== e2 && this.pendingItems.splice(e2, 1);
880
- }, o.prototype.addItem = function(t2, e2, r2, o2) {
881
- e2 && n.isFunction(e2) || (e2 = function() {
882
- });
883
- var i2 = this._applyPredicates(t2);
884
- if (i2.stop)
885
- return this.removePendingItem(o2), void e2(i2.err);
886
- if (this._maybeLog(t2, r2), this.removePendingItem(o2), this.options.transmit) {
887
- this.pendingRequests.push(t2);
888
- try {
889
- this._makeApiRequest(t2, function(r3, n2) {
890
- this._dequeuePendingRequest(t2), e2(r3, n2);
891
- }.bind(this));
892
- } catch (r3) {
893
- this._dequeuePendingRequest(t2), e2(r3);
894
- }
895
- } else
896
- e2(new Error("Transmit disabled"));
897
- }, o.prototype.wait = function(t2) {
898
- n.isFunction(t2) && (this.waitCallback = t2, this._maybeCallWait() || (this.waitIntervalID && (this.waitIntervalID = clearInterval(this.waitIntervalID)), this.waitIntervalID = setInterval(function() {
899
- this._maybeCallWait();
900
- }.bind(this), 500)));
901
- }, o.prototype._applyPredicates = function(t2) {
902
- for (var e2 = null, r2 = 0, n2 = this.predicates.length; r2 < n2; r2++)
903
- if (!(e2 = this.predicates[r2](t2, this.options)) || void 0 !== e2.err)
904
- return { stop: true, err: e2.err };
905
- return { stop: false, err: null };
906
- }, o.prototype._makeApiRequest = function(t2, e2) {
907
- var r2 = this.rateLimiter.shouldSend(t2);
908
- r2.shouldSend ? this.api.postItem(t2, function(r3, n2) {
909
- r3 ? this._maybeRetry(r3, t2, e2) : e2(r3, n2);
910
- }.bind(this)) : r2.error ? e2(r2.error) : this.api.postItem(r2.payload, e2);
911
- };
912
- var i = ["ECONNRESET", "ENOTFOUND", "ESOCKETTIMEDOUT", "ETIMEDOUT", "ECONNREFUSED", "EHOSTUNREACH", "EPIPE", "EAI_AGAIN"];
913
- o.prototype._maybeRetry = function(t2, e2, r2) {
914
- var o2 = false;
915
- if (this.options.retryInterval) {
916
- for (var s = 0, a = i.length; s < a; s++)
917
- if (t2.code === i[s]) {
918
- o2 = true;
919
- break;
920
- }
921
- o2 && n.isFiniteNumber(this.options.maxRetries) && (e2.retries = e2.retries ? e2.retries + 1 : 1, e2.retries > this.options.maxRetries && (o2 = false));
922
- }
923
- o2 ? this._retryApiRequest(e2, r2) : r2(t2);
924
- }, o.prototype._retryApiRequest = function(t2, e2) {
925
- this.retryQueue.push({ item: t2, callback: e2 }), this.retryHandle || (this.retryHandle = setInterval(function() {
926
- for (; this.retryQueue.length; ) {
927
- var t3 = this.retryQueue.shift();
928
- this._makeApiRequest(t3.item, t3.callback);
929
- }
930
- }.bind(this), this.options.retryInterval));
931
- }, o.prototype._dequeuePendingRequest = function(t2) {
932
- var e2 = this.pendingRequests.indexOf(t2);
933
- -1 !== e2 && (this.pendingRequests.splice(e2, 1), this._maybeCallWait());
934
- }, o.prototype._maybeLog = function(t2, e2) {
935
- if (this.logger && this.options.verbose) {
936
- var r2 = e2;
937
- if (r2 = (r2 = r2 || n.get(t2, "body.trace.exception.message")) || n.get(t2, "body.trace_chain.0.exception.message"))
938
- return void this.logger.error(r2);
939
- (r2 = n.get(t2, "body.message.body")) && this.logger.log(r2);
940
- }
941
- }, o.prototype._maybeCallWait = function() {
942
- return !(!n.isFunction(this.waitCallback) || 0 !== this.pendingItems.length || 0 !== this.pendingRequests.length) && (this.waitIntervalID && (this.waitIntervalID = clearInterval(this.waitIntervalID)), this.waitCallback(), true);
943
- }, t.exports = o;
944
- }, function(t, e, r) {
945
- "use strict";
946
- var n = r(0);
947
- function o(t2, e2) {
948
- this.queue = t2, this.options = e2, this.transforms = [], this.diagnostic = {};
949
- }
950
- o.prototype.configure = function(t2) {
951
- this.queue && this.queue.configure(t2);
952
- var e2 = this.options;
953
- return this.options = n.merge(e2, t2), this;
954
- }, o.prototype.addTransform = function(t2) {
955
- return n.isFunction(t2) && this.transforms.push(t2), this;
956
- }, o.prototype.log = function(t2, e2) {
957
- if (e2 && n.isFunction(e2) || (e2 = function() {
958
- }), !this.options.enabled)
959
- return e2(new Error("Rollbar is not enabled"));
960
- this.queue.addPendingItem(t2);
961
- var r2 = t2.err;
962
- this._applyTransforms(t2, function(n2, o2) {
963
- if (n2)
964
- return this.queue.removePendingItem(t2), e2(n2, null);
965
- this.queue.addItem(o2, e2, r2, t2);
966
- }.bind(this));
967
- }, o.prototype._applyTransforms = function(t2, e2) {
968
- var r2 = -1, n2 = this.transforms.length, o2 = this.transforms, i = this.options, s = function(t3, a) {
969
- t3 ? e2(t3, null) : ++r2 !== n2 ? o2[r2](a, i, s) : e2(null, a);
970
- };
971
- s(null, t2);
972
- }, t.exports = o;
973
- }, function(t, e, r) {
974
- "use strict";
975
- var n = r(0), o = r(16), i = { hostname: "api.rollbar.com", path: "/api/1/item/", search: null, version: "1", protocol: "https:", port: 443 };
976
- function s(t2, e2, r2, n2, o2) {
977
- this.options = t2, this.transport = e2, this.url = r2, this.truncation = n2, this.jsonBackup = o2, this.accessToken = t2.accessToken, this.transportOptions = a(t2, r2);
978
- }
979
- function a(t2, e2) {
980
- return o.getTransportFromOptions(t2, i, e2);
981
- }
982
- s.prototype.postItem = function(t2, e2) {
983
- var r2 = o.transportOptions(this.transportOptions, "POST"), n2 = o.buildPayload(this.accessToken, t2, this.jsonBackup), i2 = this;
984
- setTimeout(function() {
985
- i2.transport.post(i2.accessToken, r2, n2, e2);
986
- }, 0);
987
- }, s.prototype.buildJsonPayload = function(t2, e2) {
988
- var r2, i2 = o.buildPayload(this.accessToken, t2, this.jsonBackup);
989
- return (r2 = this.truncation ? this.truncation.truncate(i2) : n.stringify(i2)).error ? (e2 && e2(r2.error), null) : r2.value;
990
- }, s.prototype.postJsonPayload = function(t2, e2) {
991
- var r2 = o.transportOptions(this.transportOptions, "POST");
992
- this.transport.postJsonPayload(this.accessToken, r2, t2, e2);
993
- }, s.prototype.configure = function(t2) {
994
- var e2 = this.oldOptions;
995
- return this.options = n.merge(e2, t2), this.transportOptions = a(this.options, this.url), void 0 !== this.options.accessToken && (this.accessToken = this.options.accessToken), this;
996
- }, t.exports = s;
997
- }, function(t, e, r) {
998
- "use strict";
999
- var n = r(0);
1000
- t.exports = { buildPayload: function(t2, e2, r2) {
1001
- if (!n.isType(e2.context, "string")) {
1002
- var o = n.stringify(e2.context, r2);
1003
- o.error ? e2.context = "Error: could not serialize 'context'" : e2.context = o.value || "", e2.context.length > 255 && (e2.context = e2.context.substr(0, 255));
1004
- }
1005
- return { access_token: t2, data: e2 };
1006
- }, getTransportFromOptions: function(t2, e2, r2) {
1007
- var n2 = e2.hostname, o = e2.protocol, i = e2.port, s = e2.path, a = e2.search, u = t2.timeout, c = function(t3) {
1008
- var e3 = "undefined" != typeof window && window || "undefined" != typeof self && self, r3 = t3.defaultTransport || "xhr";
1009
- void 0 === e3.fetch && (r3 = "xhr");
1010
- void 0 === e3.XMLHttpRequest && (r3 = "fetch");
1011
- return r3;
1012
- }(t2), l = t2.proxy;
1013
- if (t2.endpoint) {
1014
- var p = r2.parse(t2.endpoint);
1015
- n2 = p.hostname, o = p.protocol, i = p.port, s = p.pathname, a = p.search;
1016
- }
1017
- return { timeout: u, hostname: n2, protocol: o, port: i, path: s, search: a, proxy: l, transport: c };
1018
- }, transportOptions: function(t2, e2) {
1019
- var r2 = t2.protocol || "https:", n2 = t2.port || ("http:" === r2 ? 80 : "https:" === r2 ? 443 : void 0), o = t2.hostname, i = t2.path, s = t2.timeout, a = t2.transport;
1020
- return t2.search && (i += t2.search), t2.proxy && (i = r2 + "//" + o + i, o = t2.proxy.host || t2.proxy.hostname, n2 = t2.proxy.port, r2 = t2.proxy.protocol || r2), { timeout: s, protocol: r2, hostname: o, path: i, port: n2, method: e2, transport: a };
1021
- }, appendPathToPath: function(t2, e2) {
1022
- var r2 = /\/$/.test(t2), n2 = /^\//.test(e2);
1023
- return r2 && n2 ? e2 = e2.substring(1) : r2 || n2 || (e2 = "/" + e2), t2 + e2;
1024
- } };
1025
- }, function(t, e) {
1026
- !function(t2) {
1027
- "use strict";
1028
- t2.console || (t2.console = {});
1029
- for (var e2, r, n = t2.console, o = function() {
1030
- }, i = ["memory"], s = "assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(","); e2 = i.pop(); )
1031
- n[e2] || (n[e2] = {});
1032
- for (; r = s.pop(); )
1033
- n[r] || (n[r] = o);
1034
- }("undefined" == typeof window ? this : window);
1035
- }, function(t, e, r) {
1036
- "use strict";
1037
- var n = { ieVersion: function() {
1038
- if ("undefined" != typeof document) {
1039
- for (var t2 = 3, e2 = document.createElement("div"), r2 = e2.getElementsByTagName("i"); e2.innerHTML = "<!--[if gt IE " + ++t2 + "]><i></i><![endif]-->", r2[0]; )
1040
- ;
1041
- return t2 > 4 ? t2 : void 0;
1042
- }
1043
- } };
1044
- t.exports = n;
1045
- }, function(t, e, r) {
1046
- "use strict";
1047
- function n(t2, e2, r2, n2) {
1048
- t2._rollbarWrappedError && (n2[4] || (n2[4] = t2._rollbarWrappedError), n2[5] || (n2[5] = t2._rollbarWrappedError._rollbarContext), t2._rollbarWrappedError = null);
1049
- var o = e2.handleUncaughtException.apply(e2, n2);
1050
- r2 && r2.apply(t2, n2), "anonymous" === o && (e2.anonymousErrorsPending += 1);
1051
- }
1052
- t.exports = { captureUncaughtExceptions: function(t2, e2, r2) {
1053
- if (t2) {
1054
- var o;
1055
- if ("function" == typeof e2._rollbarOldOnError)
1056
- o = e2._rollbarOldOnError;
1057
- else if (t2.onerror) {
1058
- for (o = t2.onerror; o._rollbarOldOnError; )
1059
- o = o._rollbarOldOnError;
1060
- e2._rollbarOldOnError = o;
1061
- }
1062
- e2.handleAnonymousErrors();
1063
- var i = function() {
1064
- var r3 = Array.prototype.slice.call(arguments, 0);
1065
- n(t2, e2, o, r3);
1066
- };
1067
- r2 && (i._rollbarOldOnError = o), t2.onerror = i;
1068
- }
1069
- }, captureUnhandledRejections: function(t2, e2, r2) {
1070
- if (t2) {
1071
- "function" == typeof t2._rollbarURH && t2._rollbarURH.belongsToShim && t2.removeEventListener("unhandledrejection", t2._rollbarURH);
1072
- var n2 = function(t3) {
1073
- var r3, n3, o;
1074
- try {
1075
- r3 = t3.reason;
1076
- } catch (t4) {
1077
- r3 = void 0;
1078
- }
1079
- try {
1080
- n3 = t3.promise;
1081
- } catch (t4) {
1082
- n3 = "[unhandledrejection] error getting `promise` from event";
1083
- }
1084
- try {
1085
- o = t3.detail, !r3 && o && (r3 = o.reason, n3 = o.promise);
1086
- } catch (t4) {
1087
- }
1088
- r3 || (r3 = "[unhandledrejection] error getting `reason` from event"), e2 && e2.handleUnhandledRejection && e2.handleUnhandledRejection(r3, n3);
1089
- };
1090
- n2.belongsToShim = r2, t2._rollbarURH = n2, t2.addEventListener("unhandledrejection", n2);
1091
- }
1092
- } };
1093
- }, function(t, e, r) {
1094
- "use strict";
1095
- var n = r(0), o = r(21), i = r(22);
1096
- function s(t2) {
1097
- this.truncation = t2;
1098
- }
1099
- s.prototype.get = function(t2, e2, r2, o2, i2) {
1100
- o2 && n.isFunction(o2) || (o2 = function() {
1101
- }), n.addParamsAndAccessTokenToPath(t2, e2, r2);
1102
- var s2 = n.formatUrl(e2);
1103
- this._makeZoneRequest(t2, s2, "GET", null, o2, i2, e2.timeout, e2.transport);
1104
- }, s.prototype.post = function(t2, e2, r2, o2, i2) {
1105
- if (o2 && n.isFunction(o2) || (o2 = function() {
1106
- }), !r2)
1107
- return o2(new Error("Cannot send empty request"));
1108
- var s2;
1109
- if ((s2 = this.truncation ? this.truncation.truncate(r2) : n.stringify(r2)).error)
1110
- return o2(s2.error);
1111
- var a = s2.value, u = n.formatUrl(e2);
1112
- this._makeZoneRequest(t2, u, "POST", a, o2, i2, e2.timeout, e2.transport);
1113
- }, s.prototype.postJsonPayload = function(t2, e2, r2, o2, i2) {
1114
- o2 && n.isFunction(o2) || (o2 = function() {
1115
- });
1116
- var s2 = n.formatUrl(e2);
1117
- this._makeZoneRequest(t2, s2, "POST", r2, o2, i2, e2.timeout, e2.transport);
1118
- }, s.prototype._makeZoneRequest = function() {
1119
- var t2 = "undefined" != typeof window && window || void 0 !== o2 && o2, e2 = t2 && t2.Zone && t2.Zone.current, r2 = Array.prototype.slice.call(arguments);
1120
- if (e2 && "angular" === e2._name) {
1121
- var n2 = e2._parent, o2 = this;
1122
- n2.run(function() {
1123
- o2._makeRequest.apply(void 0, r2);
1124
- });
1125
- } else
1126
- this._makeRequest.apply(void 0, r2);
1127
- }, s.prototype._makeRequest = function(t2, e2, r2, n2, s2, a, u, c) {
1128
- if ("undefined" != typeof RollbarProxy)
1129
- return function(t3, e3) {
1130
- new RollbarProxy().sendJsonPayload(t3, function(t4) {
1131
- }, function(t4) {
1132
- e3(new Error(t4));
1133
- });
1134
- }(n2, s2);
1135
- "fetch" === c ? o(t2, e2, r2, n2, s2, u) : i(t2, e2, r2, n2, s2, a, u);
1136
- }, t.exports = s;
1137
- }, function(t, e, r) {
1138
- "use strict";
1139
- var n = r(1), o = r(0);
1140
- t.exports = function(t2, e2, r2, i, s, a) {
1141
- var u, c;
1142
- o.isFiniteNumber(a) && (u = new AbortController(), c = setTimeout(function() {
1143
- u.abort();
1144
- }, a)), fetch(e2, { method: r2, headers: { "Content-Type": "application/json", "X-Rollbar-Access-Token": t2, signal: u && u.signal }, body: i }).then(function(t3) {
1145
- return c && clearTimeout(c), t3.json();
1146
- }).then(function(t3) {
1147
- s(null, t3);
1148
- }).catch(function(t3) {
1149
- n.error(t3.message), s(t3);
1150
- });
1151
- };
1152
- }, function(t, e, r) {
1153
- "use strict";
1154
- var n = r(0), o = r(1);
1155
- function i(t2, e2) {
1156
- var r2 = new Error(t2);
1157
- return r2.code = e2 || "ENOTFOUND", r2;
1158
- }
1159
- t.exports = function(t2, e2, r2, s, a, u, c) {
1160
- var l;
1161
- if (!(l = u ? u() : function() {
1162
- var t3, e3, r3 = [function() {
1163
- return new XMLHttpRequest();
1164
- }, function() {
1165
- return new ActiveXObject("Msxml2.XMLHTTP");
1166
- }, function() {
1167
- return new ActiveXObject("Msxml3.XMLHTTP");
1168
- }, function() {
1169
- return new ActiveXObject("Microsoft.XMLHTTP");
1170
- }], n2 = r3.length;
1171
- for (e3 = 0; e3 < n2; e3++)
1172
- try {
1173
- t3 = r3[e3]();
1174
- break;
1175
- } catch (t4) {
1176
- }
1177
- return t3;
1178
- }()))
1179
- return a(new Error("No way to send a request"));
1180
- try {
1181
- try {
1182
- var p = function() {
1183
- try {
1184
- if (p && 4 === l.readyState) {
1185
- p = void 0;
1186
- var t3 = n.jsonParse(l.responseText);
1187
- if ((s2 = l) && s2.status && 200 === s2.status)
1188
- return void a(t3.error, t3.value);
1189
- if (function(t4) {
1190
- return t4 && n.isType(t4.status, "number") && t4.status >= 400 && t4.status < 600;
1191
- }(l)) {
1192
- if (403 === l.status) {
1193
- var e3 = t3.value && t3.value.message;
1194
- o.error(e3);
1195
- }
1196
- a(new Error(String(l.status)));
1197
- } else {
1198
- a(i("XHR response had no status code (likely connection failure)"));
1199
- }
1200
- }
1201
- } catch (t4) {
1202
- var r3;
1203
- r3 = t4 && t4.stack ? t4 : new Error(t4), a(r3);
1204
- }
1205
- var s2;
1206
- };
1207
- l.open(r2, e2, true), l.setRequestHeader && (l.setRequestHeader("Content-Type", "application/json"), l.setRequestHeader("X-Rollbar-Access-Token", t2)), n.isFiniteNumber(c) && (l.timeout = c), l.onreadystatechange = p, l.send(s);
1208
- } catch (t3) {
1209
- if ("undefined" != typeof XDomainRequest) {
1210
- if (!window || !window.location)
1211
- return a(new Error("No window available during request, unknown environment"));
1212
- "http:" === window.location.href.substring(0, 5) && "https" === e2.substring(0, 5) && (e2 = "http" + e2.substring(5));
1213
- var f = new XDomainRequest();
1214
- f.onprogress = function() {
1215
- }, f.ontimeout = function() {
1216
- a(i("Request timed out", "ETIMEDOUT"));
1217
- }, f.onerror = function() {
1218
- a(new Error("Error during request"));
1219
- }, f.onload = function() {
1220
- var t4 = n.jsonParse(f.responseText);
1221
- a(t4.error, t4.value);
1222
- }, f.open(r2, e2, true), f.send(s);
1223
- } else
1224
- a(new Error("Cannot find a method to transport a request"));
1225
- }
1226
- } catch (t3) {
1227
- a(t3);
1228
- }
1229
- };
1230
- }, function(t, e, r) {
1231
- "use strict";
1232
- var n = r(0), o = r(3), i = r(1);
1233
- function s(t2, e2, r2) {
1234
- var o2 = t2.message, i2 = t2.custom;
1235
- o2 || (o2 = "Item sent with null or missing arguments.");
1236
- var s2 = { body: o2 };
1237
- i2 && (s2.extra = n.merge(i2)), n.set(t2, "data.body", { message: s2 }), r2(null, t2);
1238
- }
1239
- function a(t2) {
1240
- var e2 = t2.stackInfo.stack;
1241
- return e2 && 0 === e2.length && t2._unhandledStackInfo && t2._unhandledStackInfo.stack && (e2 = t2._unhandledStackInfo.stack), e2;
1242
- }
1243
- function u(t2, e2, r2) {
1244
- var i2 = t2 && t2.data.description, s2 = t2 && t2.custom, u2 = a(t2), l = o.guessErrorClass(e2.message), p = { exception: { class: c(e2, l[0], r2), message: l[1] } };
1245
- if (i2 && (p.exception.description = i2), u2) {
1246
- var f, h, d, m, g, v, y, b;
1247
- for (0 === u2.length && (p.exception.stack = e2.rawStack, p.exception.raw = String(e2.rawException)), p.frames = [], y = 0; y < u2.length; ++y)
1248
- h = { filename: (f = u2[y]).url ? n.sanitizeUrl(f.url) : "(unknown)", lineno: f.line || null, method: f.func && "?" !== f.func ? f.func : "[anonymous]", colno: f.column }, r2.sendFrameUrl && (h.url = f.url), h.method && h.method.endsWith && h.method.endsWith("_rollbar_wrapped") || (d = m = g = null, (v = f.context ? f.context.length : 0) && (b = Math.floor(v / 2), m = f.context.slice(0, b), d = f.context[b], g = f.context.slice(b)), d && (h.code = d), (m || g) && (h.context = {}, m && m.length && (h.context.pre = m), g && g.length && (h.context.post = g)), f.args && (h.args = f.args), p.frames.push(h));
1249
- p.frames.reverse(), s2 && (p.extra = n.merge(s2));
1250
- }
1251
- return p;
1252
- }
1253
- function c(t2, e2, r2) {
1254
- return t2.name ? t2.name : r2.guessErrorClass ? e2 : "(unknown)";
1255
- }
1256
- t.exports = { handleDomException: function(t2, e2, r2) {
1257
- if (t2.err && "DOMException" === o.Stack(t2.err).name) {
1258
- var n2 = new Error();
1259
- n2.name = t2.err.name, n2.message = t2.err.message, n2.stack = t2.err.stack, n2.nested = t2.err, t2.err = n2;
1260
- }
1261
- r2(null, t2);
1262
- }, handleItemWithError: function(t2, e2, r2) {
1263
- if (t2.data = t2.data || {}, t2.err)
1264
- try {
1265
- t2.stackInfo = t2.err._savedStackTrace || o.parse(t2.err, t2.skipFrames), e2.addErrorContext && function(t3) {
1266
- var e3 = [], r3 = t3.err;
1267
- e3.push(r3);
1268
- for (; r3.nested || r3.cause; )
1269
- r3 = r3.nested || r3.cause, e3.push(r3);
1270
- n.addErrorContext(t3, e3);
1271
- }(t2);
1272
- } catch (e3) {
1273
- i.error("Error while parsing the error object.", e3);
1274
- try {
1275
- t2.message = t2.err.message || t2.err.description || t2.message || String(t2.err);
1276
- } catch (e4) {
1277
- t2.message = String(t2.err) || String(e4);
1278
- }
1279
- delete t2.err;
1280
- }
1281
- r2(null, t2);
1282
- }, ensureItemHasSomethingToSay: function(t2, e2, r2) {
1283
- t2.message || t2.stackInfo || t2.custom || r2(new Error("No message, stack info, or custom data"), null), r2(null, t2);
1284
- }, addBaseInfo: function(t2, e2, r2) {
1285
- var o2 = e2.payload && e2.payload.environment || e2.environment;
1286
- t2.data = n.merge(t2.data, { environment: o2, level: t2.level, endpoint: e2.endpoint, platform: "browser", framework: "browser-js", language: "javascript", server: {}, uuid: t2.uuid, notifier: { name: "rollbar-browser-js", version: e2.version }, custom: t2.custom }), r2(null, t2);
1287
- }, addRequestInfo: function(t2) {
1288
- return function(e2, r2, o2) {
1289
- var i2 = {};
1290
- t2 && t2.location && (i2.url = t2.location.href, i2.query_string = t2.location.search);
1291
- var s2 = "$remote_ip";
1292
- r2.captureIp ? true !== r2.captureIp && (s2 += "_anonymize") : s2 = null, s2 && (i2.user_ip = s2), Object.keys(i2).length > 0 && n.set(e2, "data.request", i2), o2(null, e2);
1293
- };
1294
- }, addClientInfo: function(t2) {
1295
- return function(e2, r2, o2) {
1296
- if (!t2)
1297
- return o2(null, e2);
1298
- var i2 = t2.navigator || {}, s2 = t2.screen || {};
1299
- n.set(e2, "data.client", { runtime_ms: e2.timestamp - t2._rollbarStartTime, timestamp: Math.round(e2.timestamp / 1e3), javascript: { browser: i2.userAgent, language: i2.language, cookie_enabled: i2.cookieEnabled, screen: { width: s2.width, height: s2.height } } }), o2(null, e2);
1300
- };
1301
- }, addPluginInfo: function(t2) {
1302
- return function(e2, r2, o2) {
1303
- if (!t2 || !t2.navigator)
1304
- return o2(null, e2);
1305
- for (var i2, s2 = [], a2 = t2.navigator.plugins || [], u2 = 0, c2 = a2.length; u2 < c2; ++u2)
1306
- i2 = a2[u2], s2.push({ name: i2.name, description: i2.description });
1307
- n.set(e2, "data.client.javascript.plugins", s2), o2(null, e2);
1308
- };
1309
- }, addBody: function(t2, e2, r2) {
1310
- t2.stackInfo ? t2.stackInfo.traceChain ? function(t3, e3, r3) {
1311
- for (var o2 = t3.stackInfo.traceChain, i2 = [], s2 = o2.length, a2 = 0; a2 < s2; a2++) {
1312
- var c2 = u(t3, o2[a2], e3);
1313
- i2.push(c2);
1314
- }
1315
- n.set(t3, "data.body", { trace_chain: i2 }), r3(null, t3);
1316
- }(t2, e2, r2) : function(t3, e3, r3) {
1317
- if (a(t3)) {
1318
- var i2 = u(t3, t3.stackInfo, e3);
1319
- n.set(t3, "data.body", { trace: i2 }), r3(null, t3);
1320
- } else {
1321
- var l = t3.stackInfo, p = o.guessErrorClass(l.message), f = c(l, p[0], e3), h = p[1];
1322
- t3.message = f + ": " + h, s(t3, e3, r3);
1323
- }
1324
- }(t2, e2, r2) : s(t2, e2, r2);
1325
- }, addScrubber: function(t2) {
1326
- return function(e2, r2, n2) {
1327
- if (t2) {
1328
- var o2 = r2.scrubFields || [], i2 = r2.scrubPaths || [];
1329
- e2.data = t2(e2.data, o2, i2);
1330
- }
1331
- n2(null, e2);
1332
- };
1333
- } };
1334
- }, function(t, e, r) {
1335
- var n, o, i;
1336
- !function(s, a) {
1337
- "use strict";
1338
- o = [r(25)], void 0 === (i = "function" == typeof (n = function(t2) {
1339
- var e2 = /(^|@)\S+:\d+/, r2 = /^\s*at .*(\S+:\d+|\(native\))/m, n2 = /^(eval@)?(\[native code])?$/;
1340
- return { parse: function(t3) {
1341
- if (void 0 !== t3.stacktrace || void 0 !== t3["opera#sourceloc"])
1342
- return this.parseOpera(t3);
1343
- if (t3.stack && t3.stack.match(r2))
1344
- return this.parseV8OrIE(t3);
1345
- if (t3.stack)
1346
- return this.parseFFOrSafari(t3);
1347
- throw new Error("Cannot parse given Error object");
1348
- }, extractLocation: function(t3) {
1349
- if (-1 === t3.indexOf(":"))
1350
- return [t3];
1351
- var e3 = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t3.replace(/[()]/g, ""));
1352
- return [e3[1], e3[2] || void 0, e3[3] || void 0];
1353
- }, parseV8OrIE: function(e3) {
1354
- return e3.stack.split("\n").filter(function(t3) {
1355
- return !!t3.match(r2);
1356
- }, this).map(function(e4) {
1357
- e4.indexOf("(eval ") > -1 && (e4 = e4.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, ""));
1358
- var r3 = e4.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), n3 = r3.match(/ (\(.+\)$)/);
1359
- r3 = n3 ? r3.replace(n3[0], "") : r3;
1360
- var o2 = this.extractLocation(n3 ? n3[1] : r3), i2 = n3 && r3 || void 0, s2 = ["eval", "<anonymous>"].indexOf(o2[0]) > -1 ? void 0 : o2[0];
1361
- return new t2({ functionName: i2, fileName: s2, lineNumber: o2[1], columnNumber: o2[2], source: e4 });
1362
- }, this);
1363
- }, parseFFOrSafari: function(e3) {
1364
- return e3.stack.split("\n").filter(function(t3) {
1365
- return !t3.match(n2);
1366
- }, this).map(function(e4) {
1367
- if (e4.indexOf(" > eval") > -1 && (e4 = e4.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e4.indexOf("@") && -1 === e4.indexOf(":"))
1368
- return new t2({ functionName: e4 });
1369
- var r3 = /((.*".+"[^@]*)?[^@]*)(?:@)/, n3 = e4.match(r3), o2 = n3 && n3[1] ? n3[1] : void 0, i2 = this.extractLocation(e4.replace(r3, ""));
1370
- return new t2({ functionName: o2, fileName: i2[0], lineNumber: i2[1], columnNumber: i2[2], source: e4 });
1371
- }, this);
1372
- }, parseOpera: function(t3) {
1373
- return !t3.stacktrace || t3.message.indexOf("\n") > -1 && t3.message.split("\n").length > t3.stacktrace.split("\n").length ? this.parseOpera9(t3) : t3.stack ? this.parseOpera11(t3) : this.parseOpera10(t3);
1374
- }, parseOpera9: function(e3) {
1375
- for (var r3 = /Line (\d+).*script (?:in )?(\S+)/i, n3 = e3.message.split("\n"), o2 = [], i2 = 2, s2 = n3.length; i2 < s2; i2 += 2) {
1376
- var a2 = r3.exec(n3[i2]);
1377
- a2 && o2.push(new t2({ fileName: a2[2], lineNumber: a2[1], source: n3[i2] }));
1378
- }
1379
- return o2;
1380
- }, parseOpera10: function(e3) {
1381
- for (var r3 = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, n3 = e3.stacktrace.split("\n"), o2 = [], i2 = 0, s2 = n3.length; i2 < s2; i2 += 2) {
1382
- var a2 = r3.exec(n3[i2]);
1383
- a2 && o2.push(new t2({ functionName: a2[3] || void 0, fileName: a2[2], lineNumber: a2[1], source: n3[i2] }));
1384
- }
1385
- return o2;
1386
- }, parseOpera11: function(r3) {
1387
- return r3.stack.split("\n").filter(function(t3) {
1388
- return !!t3.match(e2) && !t3.match(/^Error created at/);
1389
- }, this).map(function(e3) {
1390
- var r4, n3 = e3.split("@"), o2 = this.extractLocation(n3.pop()), i2 = n3.shift() || "", s2 = i2.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
1391
- i2.match(/\(([^)]*)\)/) && (r4 = i2.replace(/^[^(]+\(([^)]*)\)$/, "$1"));
1392
- var a2 = void 0 === r4 || "[arguments not available]" === r4 ? void 0 : r4.split(",");
1393
- return new t2({ functionName: s2, args: a2, fileName: o2[0], lineNumber: o2[1], columnNumber: o2[2], source: e3 });
1394
- }, this);
1395
- } };
1396
- }) ? n.apply(e, o) : n) || (t.exports = i);
1397
- }();
1398
- }, function(t, e, r) {
1399
- var n, o, i;
1400
- !function(r2, s) {
1401
- "use strict";
1402
- o = [], void 0 === (i = "function" == typeof (n = function() {
1403
- function t2(t3) {
1404
- return t3.charAt(0).toUpperCase() + t3.substring(1);
1405
- }
1406
- function e2(t3) {
1407
- return function() {
1408
- return this[t3];
1409
- };
1410
- }
1411
- var r3 = ["isConstructor", "isEval", "isNative", "isToplevel"], n2 = ["columnNumber", "lineNumber"], o2 = ["fileName", "functionName", "source"], i2 = r3.concat(n2, o2, ["args"], ["evalOrigin"]);
1412
- function s2(e3) {
1413
- if (e3)
1414
- for (var r4 = 0; r4 < i2.length; r4++)
1415
- void 0 !== e3[i2[r4]] && this["set" + t2(i2[r4])](e3[i2[r4]]);
1416
- }
1417
- s2.prototype = { getArgs: function() {
1418
- return this.args;
1419
- }, setArgs: function(t3) {
1420
- if ("[object Array]" !== Object.prototype.toString.call(t3))
1421
- throw new TypeError("Args must be an Array");
1422
- this.args = t3;
1423
- }, getEvalOrigin: function() {
1424
- return this.evalOrigin;
1425
- }, setEvalOrigin: function(t3) {
1426
- if (t3 instanceof s2)
1427
- this.evalOrigin = t3;
1428
- else {
1429
- if (!(t3 instanceof Object))
1430
- throw new TypeError("Eval Origin must be an Object or StackFrame");
1431
- this.evalOrigin = new s2(t3);
1432
- }
1433
- }, toString: function() {
1434
- var t3 = this.getFileName() || "", e3 = this.getLineNumber() || "", r4 = this.getColumnNumber() || "", n3 = this.getFunctionName() || "";
1435
- return this.getIsEval() ? t3 ? "[eval] (" + t3 + ":" + e3 + ":" + r4 + ")" : "[eval]:" + e3 + ":" + r4 : n3 ? n3 + " (" + t3 + ":" + e3 + ":" + r4 + ")" : t3 + ":" + e3 + ":" + r4;
1436
- } }, s2.fromString = function(t3) {
1437
- var e3 = t3.indexOf("("), r4 = t3.lastIndexOf(")"), n3 = t3.substring(0, e3), o3 = t3.substring(e3 + 1, r4).split(","), i3 = t3.substring(r4 + 1);
1438
- if (0 === i3.indexOf("@"))
1439
- var a2 = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(i3, ""), u2 = a2[1], c2 = a2[2], l = a2[3];
1440
- return new s2({ functionName: n3, args: o3 || void 0, fileName: u2, lineNumber: c2 || void 0, columnNumber: l || void 0 });
1441
- };
1442
- for (var a = 0; a < r3.length; a++)
1443
- s2.prototype["get" + t2(r3[a])] = e2(r3[a]), s2.prototype["set" + t2(r3[a])] = function(t3) {
1444
- return function(e3) {
1445
- this[t3] = Boolean(e3);
1446
- };
1447
- }(r3[a]);
1448
- for (var u = 0; u < n2.length; u++)
1449
- s2.prototype["get" + t2(n2[u])] = e2(n2[u]), s2.prototype["set" + t2(n2[u])] = function(t3) {
1450
- return function(e3) {
1451
- if (r4 = e3, isNaN(parseFloat(r4)) || !isFinite(r4))
1452
- throw new TypeError(t3 + " must be a Number");
1453
- var r4;
1454
- this[t3] = Number(e3);
1455
- };
1456
- }(n2[u]);
1457
- for (var c = 0; c < o2.length; c++)
1458
- s2.prototype["get" + t2(o2[c])] = e2(o2[c]), s2.prototype["set" + t2(o2[c])] = function(t3) {
1459
- return function(e3) {
1460
- this[t3] = String(e3);
1461
- };
1462
- }(o2[c]);
1463
- return s2;
1464
- }) ? n.apply(e, o) : n) || (t.exports = i);
1465
- }();
1466
- }, function(t, e, r) {
1467
- "use strict";
1468
- var n = r(0);
1469
- function o(t2, e2) {
1470
- n.isFunction(t2[e2]) && (t2[e2] = t2[e2].toString());
1471
- }
1472
- t.exports = { itemToPayload: function(t2, e2, r2) {
1473
- var n2 = t2.data;
1474
- t2._isUncaught && (n2._isUncaught = true), t2._originalArgs && (n2._originalArgs = t2._originalArgs), r2(null, n2);
1475
- }, addPayloadOptions: function(t2, e2, r2) {
1476
- var o2 = e2.payload || {};
1477
- o2.body && delete o2.body, t2.data = n.merge(t2.data, o2), r2(null, t2);
1478
- }, addTelemetryData: function(t2, e2, r2) {
1479
- t2.telemetryEvents && n.set(t2, "data.body.telemetry", t2.telemetryEvents), r2(null, t2);
1480
- }, addMessageWithError: function(t2, e2, r2) {
1481
- if (t2.message) {
1482
- var o2 = "data.body.trace_chain.0", i = n.get(t2, o2);
1483
- if (i || (o2 = "data.body.trace", i = n.get(t2, o2)), i) {
1484
- if (!i.exception || !i.exception.description)
1485
- return n.set(t2, o2 + ".exception.description", t2.message), void r2(null, t2);
1486
- var s = n.get(t2, o2 + ".extra") || {}, a = n.merge(s, { message: t2.message });
1487
- n.set(t2, o2 + ".extra", a);
1488
- }
1489
- r2(null, t2);
1490
- } else
1491
- r2(null, t2);
1492
- }, userTransform: function(t2) {
1493
- return function(e2, r2, o2) {
1494
- var i = n.merge(e2), s = null;
1495
- try {
1496
- n.isFunction(r2.transform) && (s = r2.transform(i.data, e2));
1497
- } catch (n2) {
1498
- return r2.transform = null, t2.error("Error while calling custom transform() function. Removing custom transform().", n2), void o2(null, e2);
1499
- }
1500
- n.isPromise(s) ? s.then(function(t3) {
1501
- t3 && (i.data = t3), o2(null, i);
1502
- }, function(t3) {
1503
- o2(t3, e2);
1504
- }) : o2(null, i);
1505
- };
1506
- }, addConfigToPayload: function(t2, e2, r2) {
1507
- if (!e2.sendConfig)
1508
- return r2(null, t2);
1509
- var o2 = n.get(t2, "data.custom") || {};
1510
- o2._rollbarConfig = e2, t2.data.custom = o2, r2(null, t2);
1511
- }, addConfiguredOptions: function(t2, e2, r2) {
1512
- var n2 = e2._configuredOptions;
1513
- o(n2, "transform"), o(n2, "checkIgnore"), o(n2, "onSendCallback"), delete n2.accessToken, t2.data.notifier.configured_options = n2, r2(null, t2);
1514
- }, addDiagnosticKeys: function(t2, e2, r2) {
1515
- var o2 = n.merge(t2.notifier.client.notifier.diagnostic, t2.diagnostic);
1516
- if (n.get(t2, "err._isAnonymous") && (o2.is_anonymous = true), t2._isUncaught && (o2.is_uncaught = t2._isUncaught), t2.err)
1517
- try {
1518
- o2.raw_error = { message: t2.err.message, name: t2.err.name, constructor_name: t2.err.constructor && t2.err.constructor.name, filename: t2.err.fileName, line: t2.err.lineNumber, column: t2.err.columnNumber, stack: t2.err.stack };
1519
- } catch (t3) {
1520
- o2.raw_error = { failed: String(t3) };
1521
- }
1522
- t2.data.notifier.diagnostic = n.merge(t2.data.notifier.diagnostic, o2), r2(null, t2);
1523
- } };
1524
- }, function(t, e, r) {
1525
- "use strict";
1526
- var n = r(0);
1527
- t.exports = { checkIgnore: function(t2, e2) {
1528
- return !n.get(e2, "plugins.jquery.ignoreAjaxErrors") || !n.get(t2, "body.message.extra.isAjax");
1529
- } };
1530
- }, function(t, e, r) {
1531
- "use strict";
1532
- var n = r(0);
1533
- function o(t2, e2, r2) {
1534
- if (!t2)
1535
- return !r2;
1536
- var o2, i2, s = t2.frames;
1537
- if (!s || 0 === s.length)
1538
- return !r2;
1539
- for (var a = e2.length, u = s.length, c = 0; c < u; c++) {
1540
- if (o2 = s[c].filename, !n.isType(o2, "string"))
1541
- return !r2;
1542
- for (var l = 0; l < a; l++)
1543
- if (i2 = e2[l], new RegExp(i2).test(o2))
1544
- return true;
1545
- }
1546
- return false;
1547
- }
1548
- function i(t2, e2, r2, i2) {
1549
- var s, a, u = false;
1550
- "blocklist" === r2 && (u = true);
1551
- try {
1552
- if (s = u ? e2.hostBlockList : e2.hostSafeList, a = n.get(t2, "body.trace_chain") || [n.get(t2, "body.trace")], !s || 0 === s.length)
1553
- return !u;
1554
- if (0 === a.length || !a[0])
1555
- return !u;
1556
- for (var c = a.length, l = 0; l < c; l++)
1557
- if (o(a[l], s, u))
1558
- return true;
1559
- } catch (t3) {
1560
- u ? e2.hostBlockList = null : e2.hostSafeList = null;
1561
- var p = u ? "hostBlockList" : "hostSafeList";
1562
- return i2.error("Error while reading your configuration's " + p + " option. Removing custom " + p + ".", t3), !u;
1563
- }
1564
- return false;
1565
- }
1566
- t.exports = { checkLevel: function(t2, e2) {
1567
- var r2 = t2.level, o2 = n.LEVELS[r2] || 0, i2 = e2.reportLevel;
1568
- return !(o2 < (n.LEVELS[i2] || 0));
1569
- }, userCheckIgnore: function(t2) {
1570
- return function(e2, r2) {
1571
- var o2 = !!e2._isUncaught;
1572
- delete e2._isUncaught;
1573
- var i2 = e2._originalArgs;
1574
- delete e2._originalArgs;
1575
- try {
1576
- n.isFunction(r2.onSendCallback) && r2.onSendCallback(o2, i2, e2);
1577
- } catch (e3) {
1578
- r2.onSendCallback = null, t2.error("Error while calling onSendCallback, removing", e3);
1579
- }
1580
- try {
1581
- if (n.isFunction(r2.checkIgnore) && r2.checkIgnore(o2, i2, e2))
1582
- return false;
1583
- } catch (e3) {
1584
- r2.checkIgnore = null, t2.error("Error while calling custom checkIgnore(), removing", e3);
1585
- }
1586
- return true;
1587
- };
1588
- }, urlIsNotBlockListed: function(t2) {
1589
- return function(e2, r2) {
1590
- return !i(e2, r2, "blocklist", t2);
1591
- };
1592
- }, urlIsSafeListed: function(t2) {
1593
- return function(e2, r2) {
1594
- return i(e2, r2, "safelist", t2);
1595
- };
1596
- }, messageIsIgnored: function(t2) {
1597
- return function(e2, r2) {
1598
- var o2, i2, s, a, u, c;
1599
- try {
1600
- if (false, !(s = r2.ignoredMessages) || 0 === s.length)
1601
- return true;
1602
- if (0 === (c = function(t3) {
1603
- var e3 = t3.body, r3 = [];
1604
- if (e3.trace_chain)
1605
- for (var o3 = e3.trace_chain, i3 = 0; i3 < o3.length; i3++) {
1606
- var s2 = o3[i3];
1607
- r3.push(n.get(s2, "exception.message"));
1608
- }
1609
- e3.trace && r3.push(n.get(e3, "trace.exception.message"));
1610
- e3.message && r3.push(n.get(e3, "message.body"));
1611
- return r3;
1612
- }(e2)).length)
1613
- return true;
1614
- for (a = s.length, o2 = 0; o2 < a; o2++)
1615
- for (u = new RegExp(s[o2], "gi"), i2 = 0; i2 < c.length; i2++)
1616
- if (u.test(c[i2]))
1617
- return false;
1618
- } catch (e3) {
1619
- r2.ignoredMessages = null, t2.error("Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.");
1620
- }
1621
- return true;
1622
- };
1623
- } };
1624
- }, function(t, e, r) {
1625
- "use strict";
1626
- t.exports = { version: "2.26.2", endpoint: "api.rollbar.com/api/1/item/", logLevel: "debug", reportLevel: "debug", uncaughtErrorLevel: "error", maxItems: 0, itemsPerMin: 60 };
1627
- }, function(t, e, r) {
1628
- "use strict";
1629
- t.exports = { scrubFields: ["pw", "pass", "passwd", "password", "secret", "confirm_password", "confirmPassword", "password_confirmation", "passwordConfirmation", "access_token", "accessToken", "X-Rollbar-Access-Token", "secret_key", "secretKey", "secretToken", "cc-number", "card number", "cardnumber", "cardnum", "ccnum", "ccnumber", "cc num", "creditcardnumber", "credit card number", "newcreditcardnumber", "new credit card", "creditcardno", "credit card no", "card#", "card #", "cc-csc", "cvc", "cvc2", "cvv2", "ccv2", "security code", "card verification", "name on credit card", "name on card", "nameoncard", "cardholder", "card holder", "name des karteninhabers", "ccname", "card type", "cardtype", "cc type", "cctype", "payment type", "expiration date", "expirationdate", "expdate", "cc-exp", "ccmonth", "ccyear"] };
1630
- }, function(t, e, r) {
1631
- "use strict";
1632
- var n = r(0);
1633
- function o(t2) {
1634
- this.queue = [], this.options = n.merge(t2);
1635
- var e2 = this.options.maxTelemetryEvents || 100;
1636
- this.maxQueueSize = Math.max(0, Math.min(e2, 100));
1637
- }
1638
- function i(t2, e2) {
1639
- if (e2)
1640
- return e2;
1641
- return { error: "error", manual: "info" }[t2] || "info";
1642
- }
1643
- o.prototype.configure = function(t2) {
1644
- var e2 = this.options;
1645
- this.options = n.merge(e2, t2);
1646
- var r2 = this.options.maxTelemetryEvents || 100, o2 = Math.max(0, Math.min(r2, 100)), i2 = 0;
1647
- this.queue.length > o2 && (i2 = this.queue.length - o2), this.maxQueueSize = o2, this.queue.splice(0, i2);
1648
- }, o.prototype.copyEvents = function() {
1649
- var t2 = Array.prototype.slice.call(this.queue, 0);
1650
- if (n.isFunction(this.options.filterTelemetry))
1651
- try {
1652
- for (var e2 = t2.length; e2--; )
1653
- this.options.filterTelemetry(t2[e2]) && t2.splice(e2, 1);
1654
- } catch (t3) {
1655
- this.options.filterTelemetry = null;
1656
- }
1657
- return t2;
1658
- }, o.prototype.capture = function(t2, e2, r2, o2, s) {
1659
- var a = { level: i(t2, r2), type: t2, timestamp_ms: s || n.now(), body: e2, source: "client" };
1660
- o2 && (a.uuid = o2);
1661
- try {
1662
- if (n.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(a))
1663
- return false;
1664
- } catch (t3) {
1665
- this.options.filterTelemetry = null;
1666
- }
1667
- return this.push(a), a;
1668
- }, o.prototype.captureEvent = function(t2, e2, r2, n2) {
1669
- return this.capture(t2, e2, r2, n2);
1670
- }, o.prototype.captureError = function(t2, e2, r2, n2) {
1671
- var o2 = { message: t2.message || String(t2) };
1672
- return t2.stack && (o2.stack = t2.stack), this.capture("error", o2, e2, r2, n2);
1673
- }, o.prototype.captureLog = function(t2, e2, r2, n2) {
1674
- return this.capture("log", { message: t2 }, e2, r2, n2);
1675
- }, o.prototype.captureNetwork = function(t2, e2, r2, n2) {
1676
- e2 = e2 || "xhr", t2.subtype = t2.subtype || e2, n2 && (t2.request = n2);
1677
- var o2 = this.levelFromStatus(t2.status_code);
1678
- return this.capture("network", t2, o2, r2);
1679
- }, o.prototype.levelFromStatus = function(t2) {
1680
- return t2 >= 200 && t2 < 400 ? "info" : 0 === t2 || t2 >= 400 ? "error" : "info";
1681
- }, o.prototype.captureDom = function(t2, e2, r2, n2, o2) {
1682
- var i2 = { subtype: t2, element: e2 };
1683
- return void 0 !== r2 && (i2.value = r2), void 0 !== n2 && (i2.checked = n2), this.capture("dom", i2, "info", o2);
1684
- }, o.prototype.captureNavigation = function(t2, e2, r2) {
1685
- return this.capture("navigation", { from: t2, to: e2 }, "info", r2);
1686
- }, o.prototype.captureDomContentLoaded = function(t2) {
1687
- return this.capture("navigation", { subtype: "DOMContentLoaded" }, "info", void 0, t2 && t2.getTime());
1688
- }, o.prototype.captureLoad = function(t2) {
1689
- return this.capture("navigation", { subtype: "load" }, "info", void 0, t2 && t2.getTime());
1690
- }, o.prototype.captureConnectivityChange = function(t2, e2) {
1691
- return this.captureNetwork({ change: t2 }, "connectivity", e2);
1692
- }, o.prototype._captureRollbarItem = function(t2) {
1693
- if (this.options.includeItemsInTelemetry)
1694
- return t2.err ? this.captureError(t2.err, t2.level, t2.uuid, t2.timestamp) : t2.message ? this.captureLog(t2.message, t2.level, t2.uuid, t2.timestamp) : t2.custom ? this.capture("log", t2.custom, t2.level, t2.uuid, t2.timestamp) : void 0;
1695
- }, o.prototype.push = function(t2) {
1696
- this.queue.push(t2), this.queue.length > this.maxQueueSize && this.queue.shift();
1697
- }, t.exports = o;
1698
- }, function(t, e, r) {
1699
- "use strict";
1700
- var n = r(0), o = r(33), i = r(4), s = r(2), a = r(34), u = { network: true, networkResponseHeaders: false, networkResponseBody: false, networkRequestHeaders: false, networkRequestBody: false, networkErrorOnHttp5xx: false, networkErrorOnHttp4xx: false, networkErrorOnHttp0: false, log: true, dom: true, navigation: true, connectivity: true, contentSecurityPolicy: true, errorOnContentSecurityPolicy: false };
1701
- function c(t2, e2, r2, n2, o2) {
1702
- var i2 = t2[e2];
1703
- t2[e2] = r2(i2), n2 && n2[o2].push([t2, e2, i2]);
1704
- }
1705
- function l(t2, e2) {
1706
- for (var r2; t2[e2].length; )
1707
- (r2 = t2[e2].shift())[0][r2[1]] = r2[2];
1708
- }
1709
- function p(t2, e2, r2, o2, i2) {
1710
- this.options = t2;
1711
- var s2 = t2.autoInstrument;
1712
- false === t2.enabled || false === s2 ? this.autoInstrument = {} : (n.isType(s2, "object") || (s2 = u), this.autoInstrument = n.merge(u, s2)), this.scrubTelemetryInputs = !!t2.scrubTelemetryInputs, this.telemetryScrubber = t2.telemetryScrubber, this.defaultValueScrubber = function(t3) {
1713
- for (var e3 = [], r3 = 0; r3 < t3.length; ++r3)
1714
- e3.push(new RegExp(t3[r3], "i"));
1715
- return function(t4) {
1716
- var r4 = function(t5) {
1717
- if (!t5 || !t5.attributes)
1718
- return null;
1719
- for (var e4 = t5.attributes, r5 = 0; r5 < e4.length; ++r5)
1720
- if ("name" === e4[r5].key)
1721
- return e4[r5].value;
1722
- return null;
1723
- }(t4);
1724
- if (!r4)
1725
- return false;
1726
- for (var n2 = 0; n2 < e3.length; ++n2)
1727
- if (e3[n2].test(r4))
1728
- return true;
1729
- return false;
1730
- };
1731
- }(t2.scrubFields), this.telemeter = e2, this.rollbar = r2, this.diagnostic = r2.client.notifier.diagnostic, this._window = o2 || {}, this._document = i2 || {}, this.replacements = { network: [], log: [], navigation: [], connectivity: [] }, this.eventRemovers = { dom: [], connectivity: [], contentsecuritypolicy: [] }, this._location = this._window.location, this._lastHref = this._location && this._location.href;
1732
- }
1733
- p.prototype.configure = function(t2) {
1734
- this.options = n.merge(this.options, t2);
1735
- var e2 = t2.autoInstrument, r2 = n.merge(this.autoInstrument);
1736
- false === t2.enabled || false === e2 ? this.autoInstrument = {} : (n.isType(e2, "object") || (e2 = u), this.autoInstrument = n.merge(u, e2)), this.instrument(r2), void 0 !== t2.scrubTelemetryInputs && (this.scrubTelemetryInputs = !!t2.scrubTelemetryInputs), void 0 !== t2.telemetryScrubber && (this.telemetryScrubber = t2.telemetryScrubber);
1737
- }, p.prototype.instrument = function(t2) {
1738
- !this.autoInstrument.network || t2 && t2.network ? !this.autoInstrument.network && t2 && t2.network && this.deinstrumentNetwork() : this.instrumentNetwork(), !this.autoInstrument.log || t2 && t2.log ? !this.autoInstrument.log && t2 && t2.log && this.deinstrumentConsole() : this.instrumentConsole(), !this.autoInstrument.dom || t2 && t2.dom ? !this.autoInstrument.dom && t2 && t2.dom && this.deinstrumentDom() : this.instrumentDom(), !this.autoInstrument.navigation || t2 && t2.navigation ? !this.autoInstrument.navigation && t2 && t2.navigation && this.deinstrumentNavigation() : this.instrumentNavigation(), !this.autoInstrument.connectivity || t2 && t2.connectivity ? !this.autoInstrument.connectivity && t2 && t2.connectivity && this.deinstrumentConnectivity() : this.instrumentConnectivity(), !this.autoInstrument.contentSecurityPolicy || t2 && t2.contentSecurityPolicy ? !this.autoInstrument.contentSecurityPolicy && t2 && t2.contentSecurityPolicy && this.deinstrumentContentSecurityPolicy() : this.instrumentContentSecurityPolicy();
1739
- }, p.prototype.deinstrumentNetwork = function() {
1740
- l(this.replacements, "network");
1741
- }, p.prototype.instrumentNetwork = function() {
1742
- var t2 = this;
1743
- function e2(e3, r3) {
1744
- e3 in r3 && n.isFunction(r3[e3]) && c(r3, e3, function(e4) {
1745
- return t2.rollbar.wrap(e4);
1746
- });
1747
- }
1748
- if ("XMLHttpRequest" in this._window) {
1749
- var r2 = this._window.XMLHttpRequest.prototype;
1750
- c(r2, "open", function(t3) {
1751
- return function(e3, r3) {
1752
- return n.isType(r3, "string") && (this.__rollbar_xhr ? (this.__rollbar_xhr.method = e3, this.__rollbar_xhr.url = r3, this.__rollbar_xhr.status_code = null, this.__rollbar_xhr.start_time_ms = n.now(), this.__rollbar_xhr.end_time_ms = null) : this.__rollbar_xhr = { method: e3, url: r3, status_code: null, start_time_ms: n.now(), end_time_ms: null }), t3.apply(this, arguments);
1753
- };
1754
- }, this.replacements, "network"), c(r2, "setRequestHeader", function(e3) {
1755
- return function(r3, o2) {
1756
- return this.__rollbar_xhr || (this.__rollbar_xhr = {}), n.isType(r3, "string") && n.isType(o2, "string") && (t2.autoInstrument.networkRequestHeaders && (this.__rollbar_xhr.request_headers || (this.__rollbar_xhr.request_headers = {}), this.__rollbar_xhr.request_headers[r3] = o2), "content-type" === r3.toLowerCase() && (this.__rollbar_xhr.request_content_type = o2)), e3.apply(this, arguments);
1757
- };
1758
- }, this.replacements, "network"), c(r2, "send", function(r3) {
1759
- return function(o2) {
1760
- var i2 = this;
1761
- function s2() {
1762
- if (i2.__rollbar_xhr && (null === i2.__rollbar_xhr.status_code && (i2.__rollbar_xhr.status_code = 0, t2.autoInstrument.networkRequestBody && (i2.__rollbar_xhr.request = o2), i2.__rollbar_event = t2.captureNetwork(i2.__rollbar_xhr, "xhr", void 0)), i2.readyState < 2 && (i2.__rollbar_xhr.start_time_ms = n.now()), i2.readyState > 3)) {
1763
- i2.__rollbar_xhr.end_time_ms = n.now();
1764
- var e3 = null;
1765
- if (i2.__rollbar_xhr.response_content_type = i2.getResponseHeader("Content-Type"), t2.autoInstrument.networkResponseHeaders) {
1766
- var r4 = t2.autoInstrument.networkResponseHeaders;
1767
- e3 = {};
1768
- try {
1769
- var s3, a2;
1770
- if (true === r4) {
1771
- var u2 = i2.getAllResponseHeaders();
1772
- if (u2) {
1773
- var c2, l2, p2 = u2.trim().split(/[\r\n]+/);
1774
- for (a2 = 0; a2 < p2.length; a2++)
1775
- s3 = (c2 = p2[a2].split(": ")).shift(), l2 = c2.join(": "), e3[s3] = l2;
1776
- }
1777
- } else
1778
- for (a2 = 0; a2 < r4.length; a2++)
1779
- e3[s3 = r4[a2]] = i2.getResponseHeader(s3);
1780
- } catch (t3) {
1781
- }
1782
- }
1783
- var f = null;
1784
- if (t2.autoInstrument.networkResponseBody)
1785
- try {
1786
- f = i2.responseText;
1787
- } catch (t3) {
1788
- }
1789
- var h = null;
1790
- (f || e3) && (h = {}, f && (t2.isJsonContentType(i2.__rollbar_xhr.response_content_type) ? h.body = t2.scrubJson(f) : h.body = f), e3 && (h.headers = e3)), h && (i2.__rollbar_xhr.response = h);
1791
- try {
1792
- var d = i2.status;
1793
- d = 1223 === d ? 204 : d, i2.__rollbar_xhr.status_code = d, i2.__rollbar_event.level = t2.telemeter.levelFromStatus(d), t2.errorOnHttpStatus(i2.__rollbar_xhr);
1794
- } catch (t3) {
1795
- }
1796
- }
1797
- }
1798
- return e2("onload", i2), e2("onerror", i2), e2("onprogress", i2), "onreadystatechange" in i2 && n.isFunction(i2.onreadystatechange) ? c(i2, "onreadystatechange", function(e3) {
1799
- return t2.rollbar.wrap(e3, void 0, s2);
1800
- }) : i2.onreadystatechange = s2, i2.__rollbar_xhr && t2.trackHttpErrors() && (i2.__rollbar_xhr.stack = new Error().stack), r3.apply(this, arguments);
1801
- };
1802
- }, this.replacements, "network");
1803
- }
1804
- "fetch" in this._window && c(this._window, "fetch", function(e3) {
1805
- return function(r3, i2) {
1806
- for (var s2 = new Array(arguments.length), a2 = 0, u2 = s2.length; a2 < u2; a2++)
1807
- s2[a2] = arguments[a2];
1808
- var c2, l2 = s2[0], p2 = "GET";
1809
- n.isType(l2, "string") ? c2 = l2 : l2 && (c2 = l2.url, l2.method && (p2 = l2.method)), s2[1] && s2[1].method && (p2 = s2[1].method);
1810
- var f = { method: p2, url: c2, status_code: null, start_time_ms: n.now(), end_time_ms: null };
1811
- if (s2[1] && s2[1].headers) {
1812
- var h = o(s2[1].headers);
1813
- f.request_content_type = h.get("Content-Type"), t2.autoInstrument.networkRequestHeaders && (f.request_headers = t2.fetchHeaders(h, t2.autoInstrument.networkRequestHeaders));
1814
- }
1815
- return t2.autoInstrument.networkRequestBody && (s2[1] && s2[1].body ? f.request = s2[1].body : s2[0] && !n.isType(s2[0], "string") && s2[0].body && (f.request = s2[0].body)), t2.captureNetwork(f, "fetch", void 0), t2.trackHttpErrors() && (f.stack = new Error().stack), e3.apply(this, s2).then(function(e4) {
1816
- f.end_time_ms = n.now(), f.status_code = e4.status, f.response_content_type = e4.headers.get("Content-Type");
1817
- var r4 = null;
1818
- t2.autoInstrument.networkResponseHeaders && (r4 = t2.fetchHeaders(e4.headers, t2.autoInstrument.networkResponseHeaders));
1819
- var o2 = null;
1820
- return t2.autoInstrument.networkResponseBody && "function" == typeof e4.text && (o2 = e4.clone().text()), (r4 || o2) && (f.response = {}, o2 && ("function" == typeof o2.then ? o2.then(function(e5) {
1821
- e5 && t2.isJsonContentType(f.response_content_type) ? f.response.body = t2.scrubJson(e5) : f.response.body = e5;
1822
- }) : f.response.body = o2), r4 && (f.response.headers = r4)), t2.errorOnHttpStatus(f), e4;
1823
- });
1824
- };
1825
- }, this.replacements, "network");
1826
- }, p.prototype.captureNetwork = function(t2, e2, r2) {
1827
- return t2.request && this.isJsonContentType(t2.request_content_type) && (t2.request = this.scrubJson(t2.request)), this.telemeter.captureNetwork(t2, e2, r2);
1828
- }, p.prototype.isJsonContentType = function(t2) {
1829
- return !!(t2 && n.isType(t2, "string") && t2.toLowerCase().includes("json"));
1830
- }, p.prototype.scrubJson = function(t2) {
1831
- return JSON.stringify(i(JSON.parse(t2), this.options.scrubFields));
1832
- }, p.prototype.fetchHeaders = function(t2, e2) {
1833
- var r2 = {};
1834
- try {
1835
- var n2;
1836
- if (true === e2) {
1837
- if ("function" == typeof t2.entries)
1838
- for (var o2 = t2.entries(), i2 = o2.next(); !i2.done; )
1839
- r2[i2.value[0]] = i2.value[1], i2 = o2.next();
1840
- } else
1841
- for (n2 = 0; n2 < e2.length; n2++) {
1842
- var s2 = e2[n2];
1843
- r2[s2] = t2.get(s2);
1844
- }
1845
- } catch (t3) {
1846
- }
1847
- return r2;
1848
- }, p.prototype.trackHttpErrors = function() {
1849
- return this.autoInstrument.networkErrorOnHttp5xx || this.autoInstrument.networkErrorOnHttp4xx || this.autoInstrument.networkErrorOnHttp0;
1850
- }, p.prototype.errorOnHttpStatus = function(t2) {
1851
- var e2 = t2.status_code;
1852
- if (e2 >= 500 && this.autoInstrument.networkErrorOnHttp5xx || e2 >= 400 && this.autoInstrument.networkErrorOnHttp4xx || 0 === e2 && this.autoInstrument.networkErrorOnHttp0) {
1853
- var r2 = new Error("HTTP request failed with Status " + e2);
1854
- r2.stack = t2.stack, this.rollbar.error(r2, { skipFrames: 1 });
1855
- }
1856
- }, p.prototype.deinstrumentConsole = function() {
1857
- if ("console" in this._window && this._window.console.log)
1858
- for (var t2; this.replacements.log.length; )
1859
- t2 = this.replacements.log.shift(), this._window.console[t2[0]] = t2[1];
1860
- }, p.prototype.instrumentConsole = function() {
1861
- if ("console" in this._window && this._window.console.log) {
1862
- var t2 = this, e2 = this._window.console, r2 = ["debug", "info", "warn", "error", "log"];
1863
- try {
1864
- for (var o2 = 0, i2 = r2.length; o2 < i2; o2++)
1865
- s2(r2[o2]);
1866
- } catch (t3) {
1867
- this.diagnostic.instrumentConsole = { error: t3.message };
1868
- }
1869
- }
1870
- function s2(r3) {
1871
- var o3 = e2[r3], i3 = e2, s3 = "warn" === r3 ? "warning" : r3;
1872
- e2[r3] = function() {
1873
- var e3 = Array.prototype.slice.call(arguments), r4 = n.formatArgsAsString(e3);
1874
- t2.telemeter.captureLog(r4, s3), o3 && Function.prototype.apply.call(o3, i3, e3);
1875
- }, t2.replacements.log.push([r3, o3]);
1876
- }
1877
- }, p.prototype.deinstrumentDom = function() {
1878
- ("addEventListener" in this._window || "attachEvent" in this._window) && this.removeListeners("dom");
1879
- }, p.prototype.instrumentDom = function() {
1880
- if ("addEventListener" in this._window || "attachEvent" in this._window) {
1881
- var t2 = this.handleClick.bind(this), e2 = this.handleBlur.bind(this);
1882
- this.addListener("dom", this._window, "click", "onclick", t2, true), this.addListener("dom", this._window, "blur", "onfocusout", e2, true);
1883
- }
1884
- }, p.prototype.handleClick = function(t2) {
1885
- try {
1886
- var e2 = a.getElementFromEvent(t2, this._document), r2 = e2 && e2.tagName, n2 = a.isDescribedElement(e2, "a") || a.isDescribedElement(e2, "button");
1887
- r2 && (n2 || a.isDescribedElement(e2, "input", ["button", "submit"])) ? this.captureDomEvent("click", e2) : a.isDescribedElement(e2, "input", ["checkbox", "radio"]) && this.captureDomEvent("input", e2, e2.value, e2.checked);
1888
- } catch (t3) {
1889
- }
1890
- }, p.prototype.handleBlur = function(t2) {
1891
- try {
1892
- var e2 = a.getElementFromEvent(t2, this._document);
1893
- e2 && e2.tagName && (a.isDescribedElement(e2, "textarea") ? this.captureDomEvent("input", e2, e2.value) : a.isDescribedElement(e2, "select") && e2.options && e2.options.length ? this.handleSelectInputChanged(e2) : a.isDescribedElement(e2, "input") && !a.isDescribedElement(e2, "input", ["button", "submit", "hidden", "checkbox", "radio"]) && this.captureDomEvent("input", e2, e2.value));
1894
- } catch (t3) {
1895
- }
1896
- }, p.prototype.handleSelectInputChanged = function(t2) {
1897
- if (t2.multiple)
1898
- for (var e2 = 0; e2 < t2.options.length; e2++)
1899
- t2.options[e2].selected && this.captureDomEvent("input", t2, t2.options[e2].value);
1900
- else
1901
- t2.selectedIndex >= 0 && t2.options[t2.selectedIndex] && this.captureDomEvent("input", t2, t2.options[t2.selectedIndex].value);
1902
- }, p.prototype.captureDomEvent = function(t2, e2, r2, n2) {
1903
- if (void 0 !== r2)
1904
- if (this.scrubTelemetryInputs || "password" === a.getElementType(e2))
1905
- r2 = "[scrubbed]";
1906
- else {
1907
- var o2 = a.describeElement(e2);
1908
- this.telemetryScrubber ? this.telemetryScrubber(o2) && (r2 = "[scrubbed]") : this.defaultValueScrubber(o2) && (r2 = "[scrubbed]");
1909
- }
1910
- var i2 = a.elementArrayToString(a.treeToArray(e2));
1911
- this.telemeter.captureDom(t2, i2, r2, n2);
1912
- }, p.prototype.deinstrumentNavigation = function() {
1913
- var t2 = this._window.chrome;
1914
- !(t2 && t2.app && t2.app.runtime) && this._window.history && this._window.history.pushState && l(this.replacements, "navigation");
1915
- }, p.prototype.instrumentNavigation = function() {
1916
- var t2 = this._window.chrome;
1917
- if (!(t2 && t2.app && t2.app.runtime) && this._window.history && this._window.history.pushState) {
1918
- var e2 = this;
1919
- c(this._window, "onpopstate", function(t3) {
1920
- return function() {
1921
- var r2 = e2._location.href;
1922
- e2.handleUrlChange(e2._lastHref, r2), t3 && t3.apply(this, arguments);
1923
- };
1924
- }, this.replacements, "navigation"), c(this._window.history, "pushState", function(t3) {
1925
- return function() {
1926
- var r2 = arguments.length > 2 ? arguments[2] : void 0;
1927
- return r2 && e2.handleUrlChange(e2._lastHref, r2 + ""), t3.apply(this, arguments);
1928
- };
1929
- }, this.replacements, "navigation");
1930
- }
1931
- }, p.prototype.handleUrlChange = function(t2, e2) {
1932
- var r2 = s.parse(this._location.href), n2 = s.parse(e2), o2 = s.parse(t2);
1933
- this._lastHref = e2, r2.protocol === n2.protocol && r2.host === n2.host && (e2 = n2.path + (n2.hash || "")), r2.protocol === o2.protocol && r2.host === o2.host && (t2 = o2.path + (o2.hash || "")), this.telemeter.captureNavigation(t2, e2);
1934
- }, p.prototype.deinstrumentConnectivity = function() {
1935
- ("addEventListener" in this._window || "body" in this._document) && (this._window.addEventListener ? this.removeListeners("connectivity") : l(this.replacements, "connectivity"));
1936
- }, p.prototype.instrumentConnectivity = function() {
1937
- if ("addEventListener" in this._window || "body" in this._document)
1938
- if (this._window.addEventListener)
1939
- this.addListener("connectivity", this._window, "online", void 0, function() {
1940
- this.telemeter.captureConnectivityChange("online");
1941
- }.bind(this), true), this.addListener("connectivity", this._window, "offline", void 0, function() {
1942
- this.telemeter.captureConnectivityChange("offline");
1943
- }.bind(this), true);
1944
- else {
1945
- var t2 = this;
1946
- c(this._document.body, "ononline", function(e2) {
1947
- return function() {
1948
- t2.telemeter.captureConnectivityChange("online"), e2 && e2.apply(this, arguments);
1949
- };
1950
- }, this.replacements, "connectivity"), c(this._document.body, "onoffline", function(e2) {
1951
- return function() {
1952
- t2.telemeter.captureConnectivityChange("offline"), e2 && e2.apply(this, arguments);
1953
- };
1954
- }, this.replacements, "connectivity");
1955
- }
1956
- }, p.prototype.handleCspEvent = function(t2) {
1957
- var e2 = "Security Policy Violation: blockedURI: " + t2.blockedURI + ", violatedDirective: " + t2.violatedDirective + ", effectiveDirective: " + t2.effectiveDirective + ", ";
1958
- t2.sourceFile && (e2 += "location: " + t2.sourceFile + ", line: " + t2.lineNumber + ", col: " + t2.columnNumber + ", "), e2 += "originalPolicy: " + t2.originalPolicy, this.telemeter.captureLog(e2, "error"), this.handleCspError(e2);
1959
- }, p.prototype.handleCspError = function(t2) {
1960
- this.autoInstrument.errorOnContentSecurityPolicy && this.rollbar.error(t2);
1961
- }, p.prototype.deinstrumentContentSecurityPolicy = function() {
1962
- "addEventListener" in this._document && this.removeListeners("contentsecuritypolicy");
1963
- }, p.prototype.instrumentContentSecurityPolicy = function() {
1964
- if ("addEventListener" in this._document) {
1965
- var t2 = this.handleCspEvent.bind(this);
1966
- this.addListener("contentsecuritypolicy", this._document, "securitypolicyviolation", null, t2, false);
1967
- }
1968
- }, p.prototype.addListener = function(t2, e2, r2, n2, o2, i2) {
1969
- e2.addEventListener ? (e2.addEventListener(r2, o2, i2), this.eventRemovers[t2].push(function() {
1970
- e2.removeEventListener(r2, o2, i2);
1971
- })) : n2 && (e2.attachEvent(n2, o2), this.eventRemovers[t2].push(function() {
1972
- e2.detachEvent(n2, o2);
1973
- }));
1974
- }, p.prototype.removeListeners = function(t2) {
1975
- for (; this.eventRemovers[t2].length; )
1976
- this.eventRemovers[t2].shift()();
1977
- }, t.exports = p;
1978
- }, function(t, e, r) {
1979
- "use strict";
1980
- function n(t2) {
1981
- return "string" != typeof t2 && (t2 = String(t2)), t2.toLowerCase();
1982
- }
1983
- function o(t2) {
1984
- this.map = {}, t2 instanceof o ? t2.forEach(function(t3, e2) {
1985
- this.append(e2, t3);
1986
- }, this) : Array.isArray(t2) ? t2.forEach(function(t3) {
1987
- this.append(t3[0], t3[1]);
1988
- }, this) : t2 && Object.getOwnPropertyNames(t2).forEach(function(e2) {
1989
- this.append(e2, t2[e2]);
1990
- }, this);
1991
- }
1992
- o.prototype.append = function(t2, e2) {
1993
- t2 = n(t2), e2 = function(t3) {
1994
- return "string" != typeof t3 && (t3 = String(t3)), t3;
1995
- }(e2);
1996
- var r2 = this.map[t2];
1997
- this.map[t2] = r2 ? r2 + ", " + e2 : e2;
1998
- }, o.prototype.get = function(t2) {
1999
- return t2 = n(t2), this.has(t2) ? this.map[t2] : null;
2000
- }, o.prototype.has = function(t2) {
2001
- return this.map.hasOwnProperty(n(t2));
2002
- }, o.prototype.forEach = function(t2, e2) {
2003
- for (var r2 in this.map)
2004
- this.map.hasOwnProperty(r2) && t2.call(e2, this.map[r2], r2, this);
2005
- }, o.prototype.entries = function() {
2006
- var t2 = [];
2007
- return this.forEach(function(e2, r2) {
2008
- t2.push([r2, e2]);
2009
- }), function(t3) {
2010
- return { next: function() {
2011
- var e2 = t3.shift();
2012
- return { done: void 0 === e2, value: e2 };
2013
- } };
2014
- }(t2);
2015
- }, t.exports = function(t2) {
2016
- return "undefined" == typeof Headers ? new o(t2) : new Headers(t2);
2017
- };
2018
- }, function(t, e, r) {
2019
- "use strict";
2020
- function n(t2) {
2021
- return (t2.getAttribute("type") || "").toLowerCase();
2022
- }
2023
- function o(t2) {
2024
- if (!t2 || !t2.tagName)
2025
- return "";
2026
- var e2 = [t2.tagName];
2027
- t2.id && e2.push("#" + t2.id), t2.classes && e2.push("." + t2.classes.join("."));
2028
- for (var r2 = 0; r2 < t2.attributes.length; r2++)
2029
- e2.push("[" + t2.attributes[r2].key + '="' + t2.attributes[r2].value + '"]');
2030
- return e2.join("");
2031
- }
2032
- function i(t2) {
2033
- if (!t2 || !t2.tagName)
2034
- return null;
2035
- var e2, r2, n2, o2, i2 = {};
2036
- i2.tagName = t2.tagName.toLowerCase(), t2.id && (i2.id = t2.id), (e2 = t2.className) && "string" == typeof e2 && (i2.classes = e2.split(/\s+/));
2037
- var s = ["type", "name", "title", "alt"];
2038
- for (i2.attributes = [], o2 = 0; o2 < s.length; o2++)
2039
- r2 = s[o2], (n2 = t2.getAttribute(r2)) && i2.attributes.push({ key: r2, value: n2 });
2040
- return i2;
2041
- }
2042
- t.exports = { describeElement: i, descriptionToString: o, elementArrayToString: function(t2) {
2043
- for (var e2, r2, n2 = " > ".length, i2 = [], s = 0, a = t2.length - 1; a >= 0; a--) {
2044
- if (e2 = o(t2[a]), r2 = s + i2.length * n2 + e2.length, a < t2.length - 1 && r2 >= 83) {
2045
- i2.unshift("...");
2046
- break;
2047
- }
2048
- i2.unshift(e2), s += e2.length;
2049
- }
2050
- return i2.join(" > ");
2051
- }, treeToArray: function(t2) {
2052
- for (var e2, r2 = [], n2 = 0; t2 && n2 < 5 && "html" !== (e2 = i(t2)).tagName; n2++)
2053
- r2.unshift(e2), t2 = t2.parentNode;
2054
- return r2;
2055
- }, getElementFromEvent: function(t2, e2) {
2056
- return t2.target ? t2.target : e2 && e2.elementFromPoint ? e2.elementFromPoint(t2.clientX, t2.clientY) : void 0;
2057
- }, isDescribedElement: function(t2, e2, r2) {
2058
- if (t2.tagName.toLowerCase() !== e2.toLowerCase())
2059
- return false;
2060
- if (!r2)
2061
- return true;
2062
- t2 = n(t2);
2063
- for (var o2 = 0; o2 < r2.length; o2++)
2064
- if (r2[o2] === t2)
2065
- return true;
2066
- return false;
2067
- }, getElementType: n };
2068
- }, function(t, e, r) {
2069
- "use strict";
2070
- var n = r(36);
2071
- t.exports = n;
2072
- }, function(t, e) {
2073
- t.exports = function(t2) {
2074
- var e2, r, n, o, i, s, a, u, c, l, p, f, h, d = /[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
2075
- function m(t3) {
2076
- return t3 < 10 ? "0" + t3 : t3;
2077
- }
2078
- function g() {
2079
- return this.valueOf();
2080
- }
2081
- function v(t3) {
2082
- return d.lastIndex = 0, d.test(t3) ? '"' + t3.replace(d, function(t4) {
2083
- var e3 = n[t4];
2084
- return "string" == typeof e3 ? e3 : "\\u" + ("0000" + t4.charCodeAt(0).toString(16)).slice(-4);
2085
- }) + '"' : '"' + t3 + '"';
2086
- }
2087
- "function" != typeof Date.prototype.toJSON && (Date.prototype.toJSON = function() {
2088
- return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + m(this.getUTCMonth() + 1) + "-" + m(this.getUTCDate()) + "T" + m(this.getUTCHours()) + ":" + m(this.getUTCMinutes()) + ":" + m(this.getUTCSeconds()) + "Z" : null;
2089
- }, Boolean.prototype.toJSON = g, Number.prototype.toJSON = g, String.prototype.toJSON = g), "function" != typeof t2.stringify && (n = { "\b": "\\b", " ": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, t2.stringify = function(t3, n2, i2) {
2090
- var s2;
2091
- if (e2 = "", r = "", "number" == typeof i2)
2092
- for (s2 = 0; s2 < i2; s2 += 1)
2093
- r += " ";
2094
- else
2095
- "string" == typeof i2 && (r = i2);
2096
- if (o = n2, n2 && "function" != typeof n2 && ("object" != typeof n2 || "number" != typeof n2.length))
2097
- throw new Error("JSON.stringify");
2098
- return function t4(n3, i3) {
2099
- var s3, a2, u2, c2, l2, p2 = e2, f2 = i3[n3];
2100
- switch (f2 && "object" == typeof f2 && "function" == typeof f2.toJSON && (f2 = f2.toJSON(n3)), "function" == typeof o && (f2 = o.call(i3, n3, f2)), typeof f2) {
2101
- case "string":
2102
- return v(f2);
2103
- case "number":
2104
- return isFinite(f2) ? String(f2) : "null";
2105
- case "boolean":
2106
- case "null":
2107
- return String(f2);
2108
- case "object":
2109
- if (!f2)
2110
- return "null";
2111
- if (e2 += r, l2 = [], "[object Array]" === Object.prototype.toString.apply(f2)) {
2112
- for (c2 = f2.length, s3 = 0; s3 < c2; s3 += 1)
2113
- l2[s3] = t4(s3, f2) || "null";
2114
- return u2 = 0 === l2.length ? "[]" : e2 ? "[\n" + e2 + l2.join(",\n" + e2) + "\n" + p2 + "]" : "[" + l2.join(",") + "]", e2 = p2, u2;
2115
- }
2116
- if (o && "object" == typeof o)
2117
- for (c2 = o.length, s3 = 0; s3 < c2; s3 += 1)
2118
- "string" == typeof o[s3] && (u2 = t4(a2 = o[s3], f2)) && l2.push(v(a2) + (e2 ? ": " : ":") + u2);
2119
- else
2120
- for (a2 in f2)
2121
- Object.prototype.hasOwnProperty.call(f2, a2) && (u2 = t4(a2, f2)) && l2.push(v(a2) + (e2 ? ": " : ":") + u2);
2122
- return u2 = 0 === l2.length ? "{}" : e2 ? "{\n" + e2 + l2.join(",\n" + e2) + "\n" + p2 + "}" : "{" + l2.join(",") + "}", e2 = p2, u2;
2123
- }
2124
- }("", { "": t3 });
2125
- }), "function" != typeof t2.parse && (t2.parse = (l = { "\\": "\\", '"': '"', "/": "/", t: " ", n: "\n", r: "\r", f: "\f", b: "\b" }, p = { go: function() {
2126
- i = "ok";
2127
- }, firstokey: function() {
2128
- u = c, i = "colon";
2129
- }, okey: function() {
2130
- u = c, i = "colon";
2131
- }, ovalue: function() {
2132
- i = "ocomma";
2133
- }, firstavalue: function() {
2134
- i = "acomma";
2135
- }, avalue: function() {
2136
- i = "acomma";
2137
- } }, f = { go: function() {
2138
- i = "ok";
2139
- }, ovalue: function() {
2140
- i = "ocomma";
2141
- }, firstavalue: function() {
2142
- i = "acomma";
2143
- }, avalue: function() {
2144
- i = "acomma";
2145
- } }, h = { "{": { go: function() {
2146
- s.push({ state: "ok" }), a = {}, i = "firstokey";
2147
- }, ovalue: function() {
2148
- s.push({ container: a, state: "ocomma", key: u }), a = {}, i = "firstokey";
2149
- }, firstavalue: function() {
2150
- s.push({ container: a, state: "acomma" }), a = {}, i = "firstokey";
2151
- }, avalue: function() {
2152
- s.push({ container: a, state: "acomma" }), a = {}, i = "firstokey";
2153
- } }, "}": { firstokey: function() {
2154
- var t3 = s.pop();
2155
- c = a, a = t3.container, u = t3.key, i = t3.state;
2156
- }, ocomma: function() {
2157
- var t3 = s.pop();
2158
- a[u] = c, c = a, a = t3.container, u = t3.key, i = t3.state;
2159
- } }, "[": { go: function() {
2160
- s.push({ state: "ok" }), a = [], i = "firstavalue";
2161
- }, ovalue: function() {
2162
- s.push({ container: a, state: "ocomma", key: u }), a = [], i = "firstavalue";
2163
- }, firstavalue: function() {
2164
- s.push({ container: a, state: "acomma" }), a = [], i = "firstavalue";
2165
- }, avalue: function() {
2166
- s.push({ container: a, state: "acomma" }), a = [], i = "firstavalue";
2167
- } }, "]": { firstavalue: function() {
2168
- var t3 = s.pop();
2169
- c = a, a = t3.container, u = t3.key, i = t3.state;
2170
- }, acomma: function() {
2171
- var t3 = s.pop();
2172
- a.push(c), c = a, a = t3.container, u = t3.key, i = t3.state;
2173
- } }, ":": { colon: function() {
2174
- if (Object.hasOwnProperty.call(a, u))
2175
- throw new SyntaxError("Duplicate key '" + u + '"');
2176
- i = "ovalue";
2177
- } }, ",": { ocomma: function() {
2178
- a[u] = c, i = "okey";
2179
- }, acomma: function() {
2180
- a.push(c), i = "avalue";
2181
- } }, true: { go: function() {
2182
- c = true, i = "ok";
2183
- }, ovalue: function() {
2184
- c = true, i = "ocomma";
2185
- }, firstavalue: function() {
2186
- c = true, i = "acomma";
2187
- }, avalue: function() {
2188
- c = true, i = "acomma";
2189
- } }, false: { go: function() {
2190
- c = false, i = "ok";
2191
- }, ovalue: function() {
2192
- c = false, i = "ocomma";
2193
- }, firstavalue: function() {
2194
- c = false, i = "acomma";
2195
- }, avalue: function() {
2196
- c = false, i = "acomma";
2197
- } }, null: { go: function() {
2198
- c = null, i = "ok";
2199
- }, ovalue: function() {
2200
- c = null, i = "ocomma";
2201
- }, firstavalue: function() {
2202
- c = null, i = "acomma";
2203
- }, avalue: function() {
2204
- c = null, i = "acomma";
2205
- } } }, function(t3, e3) {
2206
- var r2, n2, o2 = /^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;
2207
- i = "go", s = [];
2208
- try {
2209
- for (; r2 = o2.exec(t3); )
2210
- r2[1] ? h[r2[1]][i]() : r2[2] ? (c = +r2[2], f[i]()) : (n2 = r2[3], c = n2.replace(/\\(?:u(.{4})|([^u]))/g, function(t4, e4, r3) {
2211
- return e4 ? String.fromCharCode(parseInt(e4, 16)) : l[r3];
2212
- }), p[i]()), t3 = t3.slice(r2[0].length);
2213
- } catch (t4) {
2214
- i = t4;
2215
- }
2216
- if ("ok" !== i || /[^\u0020\t\n\r]/.test(t3))
2217
- throw i instanceof SyntaxError ? i : new SyntaxError("JSON");
2218
- return "function" == typeof e3 ? function t4(r3, n3) {
2219
- var o3, i2, s2 = r3[n3];
2220
- if (s2 && "object" == typeof s2)
2221
- for (o3 in c)
2222
- Object.prototype.hasOwnProperty.call(s2, o3) && (void 0 !== (i2 = t4(s2, o3)) ? s2[o3] = i2 : delete s2[o3]);
2223
- return e3.call(r3, n3, s2);
2224
- }({ "": c }, "") : c;
2225
- }));
2226
- };
2227
- }, function(t, e, r) {
2228
- "use strict";
2229
- function n(t2, e2, r2) {
2230
- if (e2.hasOwnProperty && e2.hasOwnProperty("addEventListener")) {
2231
- for (var n2 = e2.addEventListener; n2._rollbarOldAdd && n2.belongsToShim; )
2232
- n2 = n2._rollbarOldAdd;
2233
- var o = function(e3, r3, o2) {
2234
- n2.call(this, e3, t2.wrap(r3), o2);
2235
- };
2236
- o._rollbarOldAdd = n2, o.belongsToShim = r2, e2.addEventListener = o;
2237
- for (var i = e2.removeEventListener; i._rollbarOldRemove && i.belongsToShim; )
2238
- i = i._rollbarOldRemove;
2239
- var s = function(t3, e3, r3) {
2240
- i.call(this, t3, e3 && e3._rollbar_wrapped || e3, r3);
2241
- };
2242
- s._rollbarOldRemove = i, s.belongsToShim = r2, e2.removeEventListener = s;
2243
- }
2244
- }
2245
- t.exports = function(t2, e2, r2) {
2246
- if (t2) {
2247
- var o, i, s = "EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");
2248
- for (o = 0; o < s.length; ++o)
2249
- t2[i = s[o]] && t2[i].prototype && n(e2, t2[i].prototype, r2);
2250
- }
2251
- };
2252
- }, function(t, e, r) {
2253
- "use strict";
2254
- var n = r(0), o = r(5);
2255
- function i(t2, e2) {
2256
- return [t2, n.stringify(t2, e2)];
2257
- }
2258
- function s(t2, e2) {
2259
- var r2 = t2.length;
2260
- return r2 > 2 * e2 ? t2.slice(0, e2).concat(t2.slice(r2 - e2)) : t2;
2261
- }
2262
- function a(t2, e2, r2) {
2263
- r2 = void 0 === r2 ? 30 : r2;
2264
- var o2, i2 = t2.data.body;
2265
- if (i2.trace_chain)
2266
- for (var a2 = i2.trace_chain, u2 = 0; u2 < a2.length; u2++)
2267
- o2 = s(o2 = a2[u2].frames, r2), a2[u2].frames = o2;
2268
- else
2269
- i2.trace && (o2 = s(o2 = i2.trace.frames, r2), i2.trace.frames = o2);
2270
- return [t2, n.stringify(t2, e2)];
2271
- }
2272
- function u(t2, e2) {
2273
- return e2 && e2.length > t2 ? e2.slice(0, t2 - 3).concat("...") : e2;
2274
- }
2275
- function c(t2, e2, r2) {
2276
- return [e2 = o(e2, function e3(r3, i2, s2) {
2277
- switch (n.typeName(i2)) {
2278
- case "string":
2279
- return u(t2, i2);
2280
- case "object":
2281
- case "array":
2282
- return o(i2, e3, s2);
2283
- default:
2284
- return i2;
2285
- }
2286
- }), n.stringify(e2, r2)];
2287
- }
2288
- function l(t2) {
2289
- return t2.exception && (delete t2.exception.description, t2.exception.message = u(255, t2.exception.message)), t2.frames = s(t2.frames, 1), t2;
2290
- }
2291
- function p(t2, e2) {
2292
- var r2 = t2.data.body;
2293
- if (r2.trace_chain)
2294
- for (var o2 = r2.trace_chain, i2 = 0; i2 < o2.length; i2++)
2295
- o2[i2] = l(o2[i2]);
2296
- else
2297
- r2.trace && (r2.trace = l(r2.trace));
2298
- return [t2, n.stringify(t2, e2)];
2299
- }
2300
- function f(t2, e2) {
2301
- return n.maxByteSize(t2) > e2;
2302
- }
2303
- t.exports = { truncate: function(t2, e2, r2) {
2304
- r2 = void 0 === r2 ? 524288 : r2;
2305
- for (var n2, o2, s2, u2 = [i, a, c.bind(null, 1024), c.bind(null, 512), c.bind(null, 256), p]; n2 = u2.shift(); )
2306
- if (t2 = (o2 = n2(t2, e2))[0], (s2 = o2[1]).error || !f(s2.value, r2))
2307
- return s2;
2308
- return s2;
2309
- }, raw: i, truncateFrames: a, truncateStrings: c, maybeTruncateValue: u };
2310
- }]);
2311
- });
2312
- }
2313
- });
2314
-
2315
- // src/index.ts
2316
16
  var src_exports = {};
2317
- __export(src_exports, {
2318
- Log: () => Log
2319
- });
2320
17
  module.exports = __toCommonJS(src_exports);
2321
-
2322
- // src/Log.ts
2323
- var import_rollbar = __toESM(require_rollbar_umd_min());
2324
- var Log = class {
2325
- devMode;
2326
- rollbar;
2327
- constructor(config) {
2328
- this.devMode = config.devMode ?? false;
2329
- if (config.rollbarToken) {
2330
- this.rollbar = new import_rollbar.default({
2331
- accessToken: config.rollbarToken,
2332
- captureUncaught: true,
2333
- captureUnhandledRejections: true,
2334
- codeVersion: config.commitHash,
2335
- code_version: config.commitHash,
2336
- payload: {
2337
- client: {
2338
- javascript: {
2339
- code_version: config.commitHash,
2340
- guess_uncaught_frames: true,
2341
- source_map_enabled: true
2342
- }
2343
- },
2344
- codeVersion: config.commitHash,
2345
- code_version: config.commitHash,
2346
- environment: this.devMode ? "development" : "production",
2347
- ...config.payload
2348
- },
2349
- sendConfig: true
2350
- });
2351
- }
2352
- }
2353
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2354
- debug(...params) {
2355
- if (this.devMode) {
2356
- console.debug(params);
2357
- }
2358
- }
2359
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2360
- error(...params) {
2361
- console.error(params);
2362
- if (!this.devMode) {
2363
- this.rollbar?.error(params);
2364
- }
2365
- }
2366
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2367
- info(...params) {
2368
- if (this.devMode) {
2369
- console.info(params);
2370
- }
2371
- }
2372
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2373
- log(...params) {
2374
- if (this.devMode) {
2375
- console.log(params);
2376
- }
2377
- }
2378
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2379
- warn(...params) {
2380
- console.warn(params);
2381
- if (!this.devMode) {
2382
- this.rollbar?.warn(params);
2383
- }
2384
- }
2385
- };
18
+ __reExport(src_exports, require("./Log"), module.exports);
2386
19
  //# sourceMappingURL=index.cjs.map