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