@haluo/util 1.0.19 → 1.0.22

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.
Files changed (29) hide show
  1. package/package.json +1 -1
  2. package/src/modules/monitor/lib/xhr.ts +1 -1
  3. package/src/modules/monitor/utils/tracker.ts +1 -1
  4. package/src/modules/monitor/.cache/00/33c4762af1e693b15e3fa078d74a0c.json +0 -1
  5. package/src/modules/monitor/.cache/05/4a95cc6ce509574551163397e6e349.json +0 -1
  6. package/src/modules/monitor/.cache/08/605045b6ae5c61b27bdafb25804d2f.json +0 -1
  7. package/src/modules/monitor/.cache/0c/dac2b7827892f4a24d1a77ac25432b.json +0 -1
  8. package/src/modules/monitor/.cache/0d/a7a0d6ef14604e1c38f209f9136c30.json +0 -1
  9. package/src/modules/monitor/.cache/13/dd597f42863f28fa335f1f5de4bd28.json +0 -1
  10. package/src/modules/monitor/.cache/20/f6fb741d627f7380914fec21c52ae0.json +0 -1
  11. package/src/modules/monitor/.cache/2b/43c7d967bc42e53b253e533c27a446.json +0 -1
  12. package/src/modules/monitor/.cache/31/f6b67a62a949d0d23542a0faf3a7ae.json +0 -1
  13. package/src/modules/monitor/.cache/36/37a4a35458c91650e820353fe14075.json +0 -1
  14. package/src/modules/monitor/.cache/44/ac0ec962164e52d524289bc6ddd746.json +0 -1
  15. package/src/modules/monitor/.cache/9b/c674aad8cee84e65a79172fb6ec4b6.json +0 -1
  16. package/src/modules/monitor/.cache/a0/8fa1dac8016c963a5865b0c2611e95.json +0 -1
  17. package/src/modules/monitor/.cache/a4/9a86eef551556949bfc33f94f813ce.json +0 -1
  18. package/src/modules/monitor/.cache/a5/ba2231eb63e08a146e516420de499c.json +0 -1
  19. package/src/modules/monitor/.cache/a6/a8ccd67182599a1ccb79a6165ecc8c.json +0 -1
  20. package/src/modules/monitor/.cache/af/77f95b5271855deb2590d95897a574.json +0 -1
  21. package/src/modules/monitor/.cache/c6/9ce3f6f2dd9e9eb0ae529457e551a9.json +0 -1
  22. package/src/modules/monitor/.cache/c7/9d09bcd88576bb759e1d8c4a4e0a60.json +0 -1
  23. package/src/modules/monitor/.cache/db/a09a856f25cd41813ee5e4e84e58f6.json +0 -1
  24. package/src/modules/monitor/.cache/f1/86d3395b74f70f5ae6289d48269ccb.json +0 -1
  25. package/src/modules/monitor/.cache/f5/4fd5972b6b66ba9484f0aa61a0d512.json +0 -1
  26. package/src/modules/monitor/dist/index.html +0 -18
  27. package/src/modules/monitor/dist/monitor.77de5100.js +0 -1462
  28. package/src/modules/monitor/dist/monitor.77de5100.js.map +0 -1
  29. package/src/modules/monitor/index.html +0 -21
@@ -1,1462 +0,0 @@
1
- // modules are defined as an array
2
- // [ module function, map of requires ]
3
- //
4
- // map of requires is short require name -> numeric require
5
- //
6
- // anything defined in a previous bundle is accessed via the
7
- // orig method which is the require for previous bundles
8
- parcelRequire = (function (modules, cache, entry, globalName) {
9
- // Save the require from previous bundle to this closure if any
10
- var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
11
- var nodeRequire = typeof require === 'function' && require;
12
-
13
- function newRequire(name, jumped) {
14
- if (!cache[name]) {
15
- if (!modules[name]) {
16
- // if we cannot find the module within our internal map or
17
- // cache jump to the current global require ie. the last bundle
18
- // that was added to the page.
19
- var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
20
- if (!jumped && currentRequire) {
21
- return currentRequire(name, true);
22
- }
23
-
24
- // If there are other bundles on this page the require from the
25
- // previous one is saved to 'previousRequire'. Repeat this as
26
- // many times as there are bundles until the module is found or
27
- // we exhaust the require chain.
28
- if (previousRequire) {
29
- return previousRequire(name, true);
30
- }
31
-
32
- // Try the node require function if it exists.
33
- if (nodeRequire && typeof name === 'string') {
34
- return nodeRequire(name);
35
- }
36
-
37
- var err = new Error('Cannot find module \'' + name + '\'');
38
- err.code = 'MODULE_NOT_FOUND';
39
- throw err;
40
- }
41
-
42
- localRequire.resolve = resolve;
43
- localRequire.cache = {};
44
-
45
- var module = cache[name] = new newRequire.Module(name);
46
-
47
- modules[name][0].call(module.exports, localRequire, module, module.exports, this);
48
- }
49
-
50
- return cache[name].exports;
51
-
52
- function localRequire(x){
53
- return newRequire(localRequire.resolve(x));
54
- }
55
-
56
- function resolve(x){
57
- return modules[name][1][x] || x;
58
- }
59
- }
60
-
61
- function Module(moduleName) {
62
- this.id = moduleName;
63
- this.bundle = newRequire;
64
- this.exports = {};
65
- }
66
-
67
- newRequire.isParcelRequire = true;
68
- newRequire.Module = Module;
69
- newRequire.modules = modules;
70
- newRequire.cache = cache;
71
- newRequire.parent = previousRequire;
72
- newRequire.register = function (id, exports) {
73
- modules[id] = [function (require, module) {
74
- module.exports = exports;
75
- }, {}];
76
- };
77
-
78
- var error;
79
- for (var i = 0; i < entry.length; i++) {
80
- try {
81
- newRequire(entry[i]);
82
- } catch (e) {
83
- // Save first error but execute all entries
84
- if (!error) {
85
- error = e;
86
- }
87
- }
88
- }
89
-
90
- if (entry.length) {
91
- // Expose entry point to Node, AMD or browser globals
92
- // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
93
- var mainExports = newRequire(entry[entry.length - 1]);
94
-
95
- // CommonJS
96
- if (typeof exports === "object" && typeof module !== "undefined") {
97
- module.exports = mainExports;
98
-
99
- // RequireJS
100
- } else if (typeof define === "function" && define.amd) {
101
- define(function () {
102
- return mainExports;
103
- });
104
-
105
- // <script>
106
- } else if (globalName) {
107
- this[globalName] = mainExports;
108
- }
109
- }
110
-
111
- // Override the current require with this new one
112
- parcelRequire = newRequire;
113
-
114
- if (error) {
115
- // throw error from earlier, _after updating parcelRequire_
116
- throw error;
117
- }
118
-
119
- return newRequire;
120
- })({"../../../node_modules/uuid/dist/esm-browser/rng.js":[function(require,module,exports) {
121
- "use strict";
122
-
123
- Object.defineProperty(exports, "__esModule", {
124
- value: true
125
- });
126
- exports.default = rng;
127
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
128
- // require the crypto API and do not support built-in fallback to lower quality random number
129
- // generators (like Math.random()).
130
- var getRandomValues;
131
- var rnds8 = new Uint8Array(16);
132
-
133
- function rng() {
134
- // lazy load so that environments that need to polyfill have a chance to do so
135
- if (!getRandomValues) {
136
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
137
- // find the complete implementation of crypto (msCrypto) on IE11.
138
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
139
-
140
- if (!getRandomValues) {
141
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
142
- }
143
- }
144
-
145
- return getRandomValues(rnds8);
146
- }
147
- },{}],"../../../node_modules/uuid/dist/esm-browser/regex.js":[function(require,module,exports) {
148
- "use strict";
149
-
150
- Object.defineProperty(exports, "__esModule", {
151
- value: true
152
- });
153
- exports.default = void 0;
154
- var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
155
- exports.default = _default;
156
- },{}],"../../../node_modules/uuid/dist/esm-browser/validate.js":[function(require,module,exports) {
157
- "use strict";
158
-
159
- Object.defineProperty(exports, "__esModule", {
160
- value: true
161
- });
162
- exports.default = void 0;
163
-
164
- var _regex = _interopRequireDefault(require("./regex.js"));
165
-
166
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
167
-
168
- function validate(uuid) {
169
- return typeof uuid === 'string' && _regex.default.test(uuid);
170
- }
171
-
172
- var _default = validate;
173
- exports.default = _default;
174
- },{"./regex.js":"../../../node_modules/uuid/dist/esm-browser/regex.js"}],"../../../node_modules/uuid/dist/esm-browser/stringify.js":[function(require,module,exports) {
175
- "use strict";
176
-
177
- Object.defineProperty(exports, "__esModule", {
178
- value: true
179
- });
180
- exports.default = void 0;
181
-
182
- var _validate = _interopRequireDefault(require("./validate.js"));
183
-
184
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
185
-
186
- /**
187
- * Convert array of 16 byte values to UUID string format of the form:
188
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
189
- */
190
- var byteToHex = [];
191
-
192
- for (var i = 0; i < 256; ++i) {
193
- byteToHex.push((i + 0x100).toString(16).substr(1));
194
- }
195
-
196
- function stringify(arr) {
197
- var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; // Note: Be careful editing this code! It's been tuned for performance
198
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
199
-
200
- var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
201
- // of the following:
202
- // - One or more input array values don't map to a hex octet (leading to
203
- // "undefined" in the uuid)
204
- // - Invalid input values for the RFC `version` or `variant` fields
205
-
206
- if (!(0, _validate.default)(uuid)) {
207
- throw TypeError('Stringified UUID is invalid');
208
- }
209
-
210
- return uuid;
211
- }
212
-
213
- var _default = stringify;
214
- exports.default = _default;
215
- },{"./validate.js":"../../../node_modules/uuid/dist/esm-browser/validate.js"}],"../../../node_modules/uuid/dist/esm-browser/v1.js":[function(require,module,exports) {
216
- "use strict";
217
-
218
- Object.defineProperty(exports, "__esModule", {
219
- value: true
220
- });
221
- exports.default = void 0;
222
-
223
- var _rng = _interopRequireDefault(require("./rng.js"));
224
-
225
- var _stringify = _interopRequireDefault(require("./stringify.js"));
226
-
227
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
228
-
229
- // **`v1()` - Generate time-based UUID**
230
- //
231
- // Inspired by https://github.com/LiosK/UUID.js
232
- // and http://docs.python.org/library/uuid.html
233
- var _nodeId;
234
-
235
- var _clockseq; // Previous uuid creation time
236
-
237
-
238
- var _lastMSecs = 0;
239
- var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
240
-
241
- function v1(options, buf, offset) {
242
- var i = buf && offset || 0;
243
- var b = buf || new Array(16);
244
- options = options || {};
245
- var node = options.node || _nodeId;
246
- var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
247
- // specified. We do this lazily to minimize issues related to insufficient
248
- // system entropy. See #189
249
-
250
- if (node == null || clockseq == null) {
251
- var seedBytes = options.random || (options.rng || _rng.default)();
252
-
253
- if (node == null) {
254
- // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
255
- node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
256
- }
257
-
258
- if (clockseq == null) {
259
- // Per 4.2.2, randomize (14 bit) clockseq
260
- clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
261
- }
262
- } // UUID timestamps are 100 nano-second units since the Gregorian epoch,
263
- // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
264
- // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
265
- // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
266
-
267
-
268
- var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
269
- // cycle to simulate higher resolution clock
270
-
271
- var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
272
-
273
- var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
274
-
275
- if (dt < 0 && options.clockseq === undefined) {
276
- clockseq = clockseq + 1 & 0x3fff;
277
- } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
278
- // time interval
279
-
280
-
281
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
282
- nsecs = 0;
283
- } // Per 4.2.1.2 Throw error if too many uuids are requested
284
-
285
-
286
- if (nsecs >= 10000) {
287
- throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
288
- }
289
-
290
- _lastMSecs = msecs;
291
- _lastNSecs = nsecs;
292
- _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
293
-
294
- msecs += 12219292800000; // `time_low`
295
-
296
- var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
297
- b[i++] = tl >>> 24 & 0xff;
298
- b[i++] = tl >>> 16 & 0xff;
299
- b[i++] = tl >>> 8 & 0xff;
300
- b[i++] = tl & 0xff; // `time_mid`
301
-
302
- var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
303
- b[i++] = tmh >>> 8 & 0xff;
304
- b[i++] = tmh & 0xff; // `time_high_and_version`
305
-
306
- b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
307
-
308
- b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
309
-
310
- b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
311
-
312
- b[i++] = clockseq & 0xff; // `node`
313
-
314
- for (var n = 0; n < 6; ++n) {
315
- b[i + n] = node[n];
316
- }
317
-
318
- return buf || (0, _stringify.default)(b);
319
- }
320
-
321
- var _default = v1;
322
- exports.default = _default;
323
- },{"./rng.js":"../../../node_modules/uuid/dist/esm-browser/rng.js","./stringify.js":"../../../node_modules/uuid/dist/esm-browser/stringify.js"}],"../../../node_modules/uuid/dist/esm-browser/parse.js":[function(require,module,exports) {
324
- "use strict";
325
-
326
- Object.defineProperty(exports, "__esModule", {
327
- value: true
328
- });
329
- exports.default = void 0;
330
-
331
- var _validate = _interopRequireDefault(require("./validate.js"));
332
-
333
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
334
-
335
- function parse(uuid) {
336
- if (!(0, _validate.default)(uuid)) {
337
- throw TypeError('Invalid UUID');
338
- }
339
-
340
- var v;
341
- var arr = new Uint8Array(16); // Parse ########-....-....-....-............
342
-
343
- arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
344
- arr[1] = v >>> 16 & 0xff;
345
- arr[2] = v >>> 8 & 0xff;
346
- arr[3] = v & 0xff; // Parse ........-####-....-....-............
347
-
348
- arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
349
- arr[5] = v & 0xff; // Parse ........-....-####-....-............
350
-
351
- arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
352
- arr[7] = v & 0xff; // Parse ........-....-....-####-............
353
-
354
- arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
355
- arr[9] = v & 0xff; // Parse ........-....-....-....-############
356
- // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
357
-
358
- arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
359
- arr[11] = v / 0x100000000 & 0xff;
360
- arr[12] = v >>> 24 & 0xff;
361
- arr[13] = v >>> 16 & 0xff;
362
- arr[14] = v >>> 8 & 0xff;
363
- arr[15] = v & 0xff;
364
- return arr;
365
- }
366
-
367
- var _default = parse;
368
- exports.default = _default;
369
- },{"./validate.js":"../../../node_modules/uuid/dist/esm-browser/validate.js"}],"../../../node_modules/uuid/dist/esm-browser/v35.js":[function(require,module,exports) {
370
- "use strict";
371
-
372
- Object.defineProperty(exports, "__esModule", {
373
- value: true
374
- });
375
- exports.URL = exports.DNS = void 0;
376
- exports.default = _default;
377
-
378
- var _stringify = _interopRequireDefault(require("./stringify.js"));
379
-
380
- var _parse = _interopRequireDefault(require("./parse.js"));
381
-
382
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
383
-
384
- function stringToBytes(str) {
385
- str = unescape(encodeURIComponent(str)); // UTF8 escape
386
-
387
- var bytes = [];
388
-
389
- for (var i = 0; i < str.length; ++i) {
390
- bytes.push(str.charCodeAt(i));
391
- }
392
-
393
- return bytes;
394
- }
395
-
396
- var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
397
- exports.DNS = DNS;
398
- var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
399
- exports.URL = URL;
400
-
401
- function _default(name, version, hashfunc) {
402
- function generateUUID(value, namespace, buf, offset) {
403
- if (typeof value === 'string') {
404
- value = stringToBytes(value);
405
- }
406
-
407
- if (typeof namespace === 'string') {
408
- namespace = (0, _parse.default)(namespace);
409
- }
410
-
411
- if (namespace.length !== 16) {
412
- throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
413
- } // Compute hash of namespace and value, Per 4.3
414
- // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
415
- // hashfunc([...namespace, ... value])`
416
-
417
-
418
- var bytes = new Uint8Array(16 + value.length);
419
- bytes.set(namespace);
420
- bytes.set(value, namespace.length);
421
- bytes = hashfunc(bytes);
422
- bytes[6] = bytes[6] & 0x0f | version;
423
- bytes[8] = bytes[8] & 0x3f | 0x80;
424
-
425
- if (buf) {
426
- offset = offset || 0;
427
-
428
- for (var i = 0; i < 16; ++i) {
429
- buf[offset + i] = bytes[i];
430
- }
431
-
432
- return buf;
433
- }
434
-
435
- return (0, _stringify.default)(bytes);
436
- } // Function#name is not settable on some platforms (#270)
437
-
438
-
439
- try {
440
- generateUUID.name = name; // eslint-disable-next-line no-empty
441
- } catch (err) {} // For CommonJS default export support
442
-
443
-
444
- generateUUID.DNS = DNS;
445
- generateUUID.URL = URL;
446
- return generateUUID;
447
- }
448
- },{"./stringify.js":"../../../node_modules/uuid/dist/esm-browser/stringify.js","./parse.js":"../../../node_modules/uuid/dist/esm-browser/parse.js"}],"../../../node_modules/uuid/dist/esm-browser/md5.js":[function(require,module,exports) {
449
- "use strict";
450
-
451
- Object.defineProperty(exports, "__esModule", {
452
- value: true
453
- });
454
- exports.default = void 0;
455
-
456
- /*
457
- * Browser-compatible JavaScript MD5
458
- *
459
- * Modification of JavaScript MD5
460
- * https://github.com/blueimp/JavaScript-MD5
461
- *
462
- * Copyright 2011, Sebastian Tschan
463
- * https://blueimp.net
464
- *
465
- * Licensed under the MIT license:
466
- * https://opensource.org/licenses/MIT
467
- *
468
- * Based on
469
- * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
470
- * Digest Algorithm, as defined in RFC 1321.
471
- * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
472
- * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
473
- * Distributed under the BSD License
474
- * See http://pajhome.org.uk/crypt/md5 for more info.
475
- */
476
- function md5(bytes) {
477
- if (typeof bytes === 'string') {
478
- var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
479
-
480
- bytes = new Uint8Array(msg.length);
481
-
482
- for (var i = 0; i < msg.length; ++i) {
483
- bytes[i] = msg.charCodeAt(i);
484
- }
485
- }
486
-
487
- return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
488
- }
489
- /*
490
- * Convert an array of little-endian words to an array of bytes
491
- */
492
-
493
-
494
- function md5ToHexEncodedArray(input) {
495
- var output = [];
496
- var length32 = input.length * 32;
497
- var hexTab = '0123456789abcdef';
498
-
499
- for (var i = 0; i < length32; i += 8) {
500
- var x = input[i >> 5] >>> i % 32 & 0xff;
501
- var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
502
- output.push(hex);
503
- }
504
-
505
- return output;
506
- }
507
- /**
508
- * Calculate output length with padding and bit length
509
- */
510
-
511
-
512
- function getOutputLength(inputLength8) {
513
- return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
514
- }
515
- /*
516
- * Calculate the MD5 of an array of little-endian words, and a bit length.
517
- */
518
-
519
-
520
- function wordsToMd5(x, len) {
521
- /* append padding */
522
- x[len >> 5] |= 0x80 << len % 32;
523
- x[getOutputLength(len) - 1] = len;
524
- var a = 1732584193;
525
- var b = -271733879;
526
- var c = -1732584194;
527
- var d = 271733878;
528
-
529
- for (var i = 0; i < x.length; i += 16) {
530
- var olda = a;
531
- var oldb = b;
532
- var oldc = c;
533
- var oldd = d;
534
- a = md5ff(a, b, c, d, x[i], 7, -680876936);
535
- d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
536
- c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
537
- b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
538
- a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
539
- d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
540
- c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
541
- b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
542
- a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
543
- d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
544
- c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
545
- b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
546
- a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
547
- d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
548
- c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
549
- b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
550
- a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
551
- d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
552
- c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
553
- b = md5gg(b, c, d, a, x[i], 20, -373897302);
554
- a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
555
- d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
556
- c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
557
- b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
558
- a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
559
- d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
560
- c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
561
- b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
562
- a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
563
- d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
564
- c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
565
- b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
566
- a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
567
- d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
568
- c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
569
- b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
570
- a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
571
- d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
572
- c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
573
- b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
574
- a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
575
- d = md5hh(d, a, b, c, x[i], 11, -358537222);
576
- c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
577
- b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
578
- a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
579
- d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
580
- c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
581
- b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
582
- a = md5ii(a, b, c, d, x[i], 6, -198630844);
583
- d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
584
- c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
585
- b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
586
- a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
587
- d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
588
- c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
589
- b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
590
- a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
591
- d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
592
- c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
593
- b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
594
- a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
595
- d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
596
- c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
597
- b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
598
- a = safeAdd(a, olda);
599
- b = safeAdd(b, oldb);
600
- c = safeAdd(c, oldc);
601
- d = safeAdd(d, oldd);
602
- }
603
-
604
- return [a, b, c, d];
605
- }
606
- /*
607
- * Convert an array bytes to an array of little-endian words
608
- * Characters >255 have their high-byte silently ignored.
609
- */
610
-
611
-
612
- function bytesToWords(input) {
613
- if (input.length === 0) {
614
- return [];
615
- }
616
-
617
- var length8 = input.length * 8;
618
- var output = new Uint32Array(getOutputLength(length8));
619
-
620
- for (var i = 0; i < length8; i += 8) {
621
- output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
622
- }
623
-
624
- return output;
625
- }
626
- /*
627
- * Add integers, wrapping at 2^32. This uses 16-bit operations internally
628
- * to work around bugs in some JS interpreters.
629
- */
630
-
631
-
632
- function safeAdd(x, y) {
633
- var lsw = (x & 0xffff) + (y & 0xffff);
634
- var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
635
- return msw << 16 | lsw & 0xffff;
636
- }
637
- /*
638
- * Bitwise rotate a 32-bit number to the left.
639
- */
640
-
641
-
642
- function bitRotateLeft(num, cnt) {
643
- return num << cnt | num >>> 32 - cnt;
644
- }
645
- /*
646
- * These functions implement the four basic operations the algorithm uses.
647
- */
648
-
649
-
650
- function md5cmn(q, a, b, x, s, t) {
651
- return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
652
- }
653
-
654
- function md5ff(a, b, c, d, x, s, t) {
655
- return md5cmn(b & c | ~b & d, a, b, x, s, t);
656
- }
657
-
658
- function md5gg(a, b, c, d, x, s, t) {
659
- return md5cmn(b & d | c & ~d, a, b, x, s, t);
660
- }
661
-
662
- function md5hh(a, b, c, d, x, s, t) {
663
- return md5cmn(b ^ c ^ d, a, b, x, s, t);
664
- }
665
-
666
- function md5ii(a, b, c, d, x, s, t) {
667
- return md5cmn(c ^ (b | ~d), a, b, x, s, t);
668
- }
669
-
670
- var _default = md5;
671
- exports.default = _default;
672
- },{}],"../../../node_modules/uuid/dist/esm-browser/v3.js":[function(require,module,exports) {
673
- "use strict";
674
-
675
- Object.defineProperty(exports, "__esModule", {
676
- value: true
677
- });
678
- exports.default = void 0;
679
-
680
- var _v = _interopRequireDefault(require("./v35.js"));
681
-
682
- var _md = _interopRequireDefault(require("./md5.js"));
683
-
684
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
685
-
686
- var v3 = (0, _v.default)('v3', 0x30, _md.default);
687
- var _default = v3;
688
- exports.default = _default;
689
- },{"./v35.js":"../../../node_modules/uuid/dist/esm-browser/v35.js","./md5.js":"../../../node_modules/uuid/dist/esm-browser/md5.js"}],"../../../node_modules/uuid/dist/esm-browser/v4.js":[function(require,module,exports) {
690
- "use strict";
691
-
692
- Object.defineProperty(exports, "__esModule", {
693
- value: true
694
- });
695
- exports.default = void 0;
696
-
697
- var _rng = _interopRequireDefault(require("./rng.js"));
698
-
699
- var _stringify = _interopRequireDefault(require("./stringify.js"));
700
-
701
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
702
-
703
- function v4(options, buf, offset) {
704
- options = options || {};
705
-
706
- var rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
707
-
708
-
709
- rnds[6] = rnds[6] & 0x0f | 0x40;
710
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
711
-
712
- if (buf) {
713
- offset = offset || 0;
714
-
715
- for (var i = 0; i < 16; ++i) {
716
- buf[offset + i] = rnds[i];
717
- }
718
-
719
- return buf;
720
- }
721
-
722
- return (0, _stringify.default)(rnds);
723
- }
724
-
725
- var _default = v4;
726
- exports.default = _default;
727
- },{"./rng.js":"../../../node_modules/uuid/dist/esm-browser/rng.js","./stringify.js":"../../../node_modules/uuid/dist/esm-browser/stringify.js"}],"../../../node_modules/uuid/dist/esm-browser/sha1.js":[function(require,module,exports) {
728
- "use strict";
729
-
730
- Object.defineProperty(exports, "__esModule", {
731
- value: true
732
- });
733
- exports.default = void 0;
734
-
735
- // Adapted from Chris Veness' SHA1 code at
736
- // http://www.movable-type.co.uk/scripts/sha1.html
737
- function f(s, x, y, z) {
738
- switch (s) {
739
- case 0:
740
- return x & y ^ ~x & z;
741
-
742
- case 1:
743
- return x ^ y ^ z;
744
-
745
- case 2:
746
- return x & y ^ x & z ^ y & z;
747
-
748
- case 3:
749
- return x ^ y ^ z;
750
- }
751
- }
752
-
753
- function ROTL(x, n) {
754
- return x << n | x >>> 32 - n;
755
- }
756
-
757
- function sha1(bytes) {
758
- var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
759
- var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
760
-
761
- if (typeof bytes === 'string') {
762
- var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
763
-
764
- bytes = [];
765
-
766
- for (var i = 0; i < msg.length; ++i) {
767
- bytes.push(msg.charCodeAt(i));
768
- }
769
- } else if (!Array.isArray(bytes)) {
770
- // Convert Array-like to Array
771
- bytes = Array.prototype.slice.call(bytes);
772
- }
773
-
774
- bytes.push(0x80);
775
- var l = bytes.length / 4 + 2;
776
- var N = Math.ceil(l / 16);
777
- var M = new Array(N);
778
-
779
- for (var _i = 0; _i < N; ++_i) {
780
- var arr = new Uint32Array(16);
781
-
782
- for (var j = 0; j < 16; ++j) {
783
- arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];
784
- }
785
-
786
- M[_i] = arr;
787
- }
788
-
789
- M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
790
- M[N - 1][14] = Math.floor(M[N - 1][14]);
791
- M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
792
-
793
- for (var _i2 = 0; _i2 < N; ++_i2) {
794
- var W = new Uint32Array(80);
795
-
796
- for (var t = 0; t < 16; ++t) {
797
- W[t] = M[_i2][t];
798
- }
799
-
800
- for (var _t = 16; _t < 80; ++_t) {
801
- W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);
802
- }
803
-
804
- var a = H[0];
805
- var b = H[1];
806
- var c = H[2];
807
- var d = H[3];
808
- var e = H[4];
809
-
810
- for (var _t2 = 0; _t2 < 80; ++_t2) {
811
- var s = Math.floor(_t2 / 20);
812
- var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;
813
- e = d;
814
- d = c;
815
- c = ROTL(b, 30) >>> 0;
816
- b = a;
817
- a = T;
818
- }
819
-
820
- H[0] = H[0] + a >>> 0;
821
- H[1] = H[1] + b >>> 0;
822
- H[2] = H[2] + c >>> 0;
823
- H[3] = H[3] + d >>> 0;
824
- H[4] = H[4] + e >>> 0;
825
- }
826
-
827
- return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
828
- }
829
-
830
- var _default = sha1;
831
- exports.default = _default;
832
- },{}],"../../../node_modules/uuid/dist/esm-browser/v5.js":[function(require,module,exports) {
833
- "use strict";
834
-
835
- Object.defineProperty(exports, "__esModule", {
836
- value: true
837
- });
838
- exports.default = void 0;
839
-
840
- var _v = _interopRequireDefault(require("./v35.js"));
841
-
842
- var _sha = _interopRequireDefault(require("./sha1.js"));
843
-
844
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
845
-
846
- var v5 = (0, _v.default)('v5', 0x50, _sha.default);
847
- var _default = v5;
848
- exports.default = _default;
849
- },{"./v35.js":"../../../node_modules/uuid/dist/esm-browser/v35.js","./sha1.js":"../../../node_modules/uuid/dist/esm-browser/sha1.js"}],"../../../node_modules/uuid/dist/esm-browser/nil.js":[function(require,module,exports) {
850
- "use strict";
851
-
852
- Object.defineProperty(exports, "__esModule", {
853
- value: true
854
- });
855
- exports.default = void 0;
856
- var _default = '00000000-0000-0000-0000-000000000000';
857
- exports.default = _default;
858
- },{}],"../../../node_modules/uuid/dist/esm-browser/version.js":[function(require,module,exports) {
859
- "use strict";
860
-
861
- Object.defineProperty(exports, "__esModule", {
862
- value: true
863
- });
864
- exports.default = void 0;
865
-
866
- var _validate = _interopRequireDefault(require("./validate.js"));
867
-
868
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
869
-
870
- function version(uuid) {
871
- if (!(0, _validate.default)(uuid)) {
872
- throw TypeError('Invalid UUID');
873
- }
874
-
875
- return parseInt(uuid.substr(14, 1), 16);
876
- }
877
-
878
- var _default = version;
879
- exports.default = _default;
880
- },{"./validate.js":"../../../node_modules/uuid/dist/esm-browser/validate.js"}],"../../../node_modules/uuid/dist/esm-browser/index.js":[function(require,module,exports) {
881
- "use strict";
882
-
883
- Object.defineProperty(exports, "__esModule", {
884
- value: true
885
- });
886
- Object.defineProperty(exports, "NIL", {
887
- enumerable: true,
888
- get: function () {
889
- return _nil.default;
890
- }
891
- });
892
- Object.defineProperty(exports, "parse", {
893
- enumerable: true,
894
- get: function () {
895
- return _parse.default;
896
- }
897
- });
898
- Object.defineProperty(exports, "stringify", {
899
- enumerable: true,
900
- get: function () {
901
- return _stringify.default;
902
- }
903
- });
904
- Object.defineProperty(exports, "v1", {
905
- enumerable: true,
906
- get: function () {
907
- return _v.default;
908
- }
909
- });
910
- Object.defineProperty(exports, "v3", {
911
- enumerable: true,
912
- get: function () {
913
- return _v2.default;
914
- }
915
- });
916
- Object.defineProperty(exports, "v4", {
917
- enumerable: true,
918
- get: function () {
919
- return _v3.default;
920
- }
921
- });
922
- Object.defineProperty(exports, "v5", {
923
- enumerable: true,
924
- get: function () {
925
- return _v4.default;
926
- }
927
- });
928
- Object.defineProperty(exports, "validate", {
929
- enumerable: true,
930
- get: function () {
931
- return _validate.default;
932
- }
933
- });
934
- Object.defineProperty(exports, "version", {
935
- enumerable: true,
936
- get: function () {
937
- return _version.default;
938
- }
939
- });
940
-
941
- var _v = _interopRequireDefault(require("./v1.js"));
942
-
943
- var _v2 = _interopRequireDefault(require("./v3.js"));
944
-
945
- var _v3 = _interopRequireDefault(require("./v4.js"));
946
-
947
- var _v4 = _interopRequireDefault(require("./v5.js"));
948
-
949
- var _nil = _interopRequireDefault(require("./nil.js"));
950
-
951
- var _version = _interopRequireDefault(require("./version.js"));
952
-
953
- var _validate = _interopRequireDefault(require("./validate.js"));
954
-
955
- var _stringify = _interopRequireDefault(require("./stringify.js"));
956
-
957
- var _parse = _interopRequireDefault(require("./parse.js"));
958
-
959
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
960
- },{"./v1.js":"../../../node_modules/uuid/dist/esm-browser/v1.js","./v3.js":"../../../node_modules/uuid/dist/esm-browser/v3.js","./v4.js":"../../../node_modules/uuid/dist/esm-browser/v4.js","./v5.js":"../../../node_modules/uuid/dist/esm-browser/v5.js","./nil.js":"../../../node_modules/uuid/dist/esm-browser/nil.js","./version.js":"../../../node_modules/uuid/dist/esm-browser/version.js","./validate.js":"../../../node_modules/uuid/dist/esm-browser/validate.js","./stringify.js":"../../../node_modules/uuid/dist/esm-browser/stringify.js","./parse.js":"../../../node_modules/uuid/dist/esm-browser/parse.js"}],"utils/tracker.ts":[function(require,module,exports) {
961
- "use strict";
962
-
963
- var __assign = this && this.__assign || function () {
964
- __assign = Object.assign || function (t) {
965
- for (var s, i = 1, n = arguments.length; i < n; i++) {
966
- s = arguments[i];
967
-
968
- for (var p in s) {
969
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
970
- }
971
- }
972
-
973
- return t;
974
- };
975
-
976
- return __assign.apply(this, arguments);
977
- };
978
-
979
- Object.defineProperty(exports, "__esModule", {
980
- value: true
981
- });
982
-
983
- var uuidv4 = require('uuid').v4; // const Parser = require('ua-parser-js');
984
-
985
-
986
- var SendTracker =
987
- /** @class */
988
- function () {
989
- function SendTracker() {
990
- this.url = '';
991
- }
992
-
993
- SendTracker.prototype.send = function (data) {
994
- if (data === void 0) {
995
- data = {};
996
- }
997
-
998
- var log = __assign(__assign({}, getExtraData()), data);
999
-
1000
- var formBody = [];
1001
-
1002
- for (var property in log) {
1003
- var encodedKey = encodeURIComponent(property);
1004
- var encodedValue = encodeURIComponent(log[property]);
1005
- formBody.push(encodedKey + "=" + encodedValue);
1006
- }
1007
-
1008
- formBody = formBody.join("&");
1009
- fetch('https://apm-collect.58moto.com/app/collect/original/info/report/v2', {
1010
- method: 'POST',
1011
- headers: {
1012
- "Content-Type": "application/x-www-form-urlencoded"
1013
- },
1014
- body: formBody
1015
- }).then(function (res) {
1016
- console.log(res);
1017
- }).catch(function (e) {
1018
- console.log(e);
1019
- });
1020
- };
1021
-
1022
- return SendTracker;
1023
- }();
1024
-
1025
- function getExtraData() {
1026
- return {
1027
- deviceId: uuidv4(),
1028
- platform: 3,
1029
- errorType: 3,
1030
- channel: 'h5',
1031
- bundle: 'com.jdd.motorfans',
1032
- title: '',
1033
- frontStatus: 3,
1034
- occurTimeStamp: Date.now()
1035
- };
1036
- }
1037
-
1038
- exports.default = new SendTracker();
1039
- },{"uuid":"../../../node_modules/uuid/dist/esm-browser/index.js"}],"lib/jsError.ts":[function(require,module,exports) {
1040
- "use strict";
1041
-
1042
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1043
-
1044
- var __assign = this && this.__assign || function () {
1045
- __assign = Object.assign || function (t) {
1046
- for (var s, i = 1, n = arguments.length; i < n; i++) {
1047
- s = arguments[i];
1048
-
1049
- for (var p in s) {
1050
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1051
- }
1052
- }
1053
-
1054
- return t;
1055
- };
1056
-
1057
- return __assign.apply(this, arguments);
1058
- };
1059
-
1060
- var __importDefault = this && this.__importDefault || function (mod) {
1061
- return mod && mod.__esModule ? mod : {
1062
- "default": mod
1063
- };
1064
- };
1065
-
1066
- Object.defineProperty(exports, "__esModule", {
1067
- value: true
1068
- });
1069
- exports.injectJsError = void 0;
1070
-
1071
- var tracker_1 = __importDefault(require("../utils/tracker"));
1072
-
1073
- function injectJsError(data) {
1074
- if (data === void 0) {
1075
- data = {};
1076
- }
1077
-
1078
- window.addEventListener('error', function (e) {
1079
- if (e.target && (e.target.src || e.target.href)) {
1080
- tracker_1.default.send(__assign({
1081
- kind: 'stability',
1082
- type: 'error',
1083
- title: 'resourceError',
1084
- filename: e.target.src || e.target.href,
1085
- tagName: e.target.tagName,
1086
- reason: e.target.src || e.target.href
1087
- }, data // selector: lastEvent ? get
1088
- ));
1089
- return;
1090
- }
1091
-
1092
- tracker_1.default.send(__assign({
1093
- kind: 'stability',
1094
- type: 'error',
1095
- title: 'jsError',
1096
- message: e.message,
1097
- filename: e.filename,
1098
- position: e.lineno + ":" + e.colno,
1099
- reason: e.error.stack
1100
- }, data // selector: lastEvent ? get
1101
- ));
1102
- }, true);
1103
- window.addEventListener('unhandledrejection', function (e) {
1104
- var message, filename, line, column, stack;
1105
- var reason = e.reason;
1106
-
1107
- if (typeof reason === 'string') {
1108
- message = reason;
1109
- } else if (_typeof(reason) === 'object') {
1110
- if (reason.stack) {
1111
- var matchResult = reason.stack.match(/at\s+(.+):(\d+):(\d+)/);
1112
- filename = matchResult[1];
1113
- line = matchResult[2];
1114
- column = matchResult[3];
1115
- }
1116
-
1117
- message = reason.message;
1118
- stack = reason.stack;
1119
- }
1120
-
1121
- tracker_1.default.send(__assign({
1122
- kind: 'stability',
1123
- type: 'error',
1124
- title: 'promiseError',
1125
- message: message,
1126
- filename: filename,
1127
- position: line + ":" + column,
1128
- reason: stack
1129
- }, data // selector: lastEvent ? get
1130
- ));
1131
- });
1132
- }
1133
-
1134
- exports.injectJsError = injectJsError;
1135
- },{"../utils/tracker":"utils/tracker.ts"}],"lib/xhr.ts":[function(require,module,exports) {
1136
- "use strict";
1137
-
1138
- var __assign = this && this.__assign || function () {
1139
- __assign = Object.assign || function (t) {
1140
- for (var s, i = 1, n = arguments.length; i < n; i++) {
1141
- s = arguments[i];
1142
-
1143
- for (var p in s) {
1144
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1145
- }
1146
- }
1147
-
1148
- return t;
1149
- };
1150
-
1151
- return __assign.apply(this, arguments);
1152
- };
1153
-
1154
- var __importDefault = this && this.__importDefault || function (mod) {
1155
- return mod && mod.__esModule ? mod : {
1156
- "default": mod
1157
- };
1158
- };
1159
-
1160
- Object.defineProperty(exports, "__esModule", {
1161
- value: true
1162
- });
1163
-
1164
- var tracker_1 = __importDefault(require("../utils/tracker"));
1165
-
1166
- function injectXHR(data) {
1167
- if (data === void 0) {
1168
- data = {};
1169
- }
1170
-
1171
- var XMLHttpRequest = window.XMLHttpRequest;
1172
- var oldOpen = XMLHttpRequest.prototype.open;
1173
-
1174
- XMLHttpRequest.prototype.open = function (method, url, async) {
1175
- this.logData = {
1176
- method: method,
1177
- url: url,
1178
- async: async
1179
- };
1180
- return oldOpen.apply(this, arguments);
1181
- };
1182
-
1183
- var oldSend = XMLHttpRequest.prototype.send;
1184
-
1185
- XMLHttpRequest.prototype.send = function (body) {
1186
- var _this = this;
1187
-
1188
- if (this.logData) {
1189
- var startTime_1 = Date.now();
1190
-
1191
- var handler = function handler(type) {
1192
- return function (event) {
1193
- if (_this.logData.url.indexOf('/collect/oss/original/info/report') > -1) return;
1194
- var duration = Date.now() - startTime_1;
1195
- var status = _this.status;
1196
- var statusText = _this.statusText;
1197
- tracker_1.default.send(__assign({
1198
- kind: 'stability',
1199
- type: 'xhr',
1200
- eventType: event.type,
1201
- pathname: _this.logData.url,
1202
- status: status + '-' + statusText,
1203
- duration: duration,
1204
- response: _this.response ? JSON.stringify(_this.response) : '',
1205
- params: body || '',
1206
- title: 'xhr',
1207
- reason: status + '-' + statusText + (" " + _this.logData.url + " " + (_this.response ? JSON.stringify(_this.response) : ''))
1208
- }, data));
1209
- };
1210
- };
1211
-
1212
- this.addEventListener('load', handler('load'), false);
1213
- this.addEventListener('error', handler('error'), false);
1214
- this.addEventListener('abort', handler('abort'), false);
1215
- }
1216
-
1217
- return oldSend.apply(this, arguments);
1218
- };
1219
- }
1220
-
1221
- exports.default = injectXHR;
1222
- },{"../utils/tracker":"utils/tracker.ts"}],"index.ts":[function(require,module,exports) {
1223
- "use strict";
1224
-
1225
- var __importDefault = this && this.__importDefault || function (mod) {
1226
- return mod && mod.__esModule ? mod : {
1227
- "default": mod
1228
- };
1229
- };
1230
-
1231
- Object.defineProperty(exports, "__esModule", {
1232
- value: true
1233
- });
1234
- exports.Tracker = void 0;
1235
-
1236
- var jsError_1 = require("./lib/jsError");
1237
-
1238
- var xhr_1 = __importDefault(require("./lib/xhr"));
1239
-
1240
- var tracker_1 = __importDefault(require("./utils/tracker"));
1241
-
1242
- exports.Tracker = tracker_1.default; // import timing from './lib/timing'
1243
-
1244
- jsError_1.injectJsError({
1245
- version: 'wap'
1246
- });
1247
- xhr_1.default({
1248
- version: 'wap'
1249
- });
1250
-
1251
- function setup(data) {
1252
- jsError_1.injectJsError(data);
1253
- xhr_1.default(data);
1254
- }
1255
-
1256
- exports.default = setup; // timing()
1257
- },{"./lib/jsError":"lib/jsError.ts","./lib/xhr":"lib/xhr.ts","./utils/tracker":"utils/tracker.ts"}],"../../../../../../.nvm/versions/node/v14.17.3/lib/node_modules/parcel-bundler/src/builtins/hmr-runtime.js":[function(require,module,exports) {
1258
- var global = arguments[3];
1259
- var OVERLAY_ID = '__parcel__error__overlay__';
1260
- var OldModule = module.bundle.Module;
1261
-
1262
- function Module(moduleName) {
1263
- OldModule.call(this, moduleName);
1264
- this.hot = {
1265
- data: module.bundle.hotData,
1266
- _acceptCallbacks: [],
1267
- _disposeCallbacks: [],
1268
- accept: function (fn) {
1269
- this._acceptCallbacks.push(fn || function () {});
1270
- },
1271
- dispose: function (fn) {
1272
- this._disposeCallbacks.push(fn);
1273
- }
1274
- };
1275
- module.bundle.hotData = null;
1276
- }
1277
-
1278
- module.bundle.Module = Module;
1279
- var checkedAssets, assetsToAccept;
1280
- var parent = module.bundle.parent;
1281
-
1282
- if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
1283
- var hostname = "" || location.hostname;
1284
- var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
1285
- var ws = new WebSocket(protocol + '://' + hostname + ':' + "56802" + '/');
1286
-
1287
- ws.onmessage = function (event) {
1288
- checkedAssets = {};
1289
- assetsToAccept = [];
1290
- var data = JSON.parse(event.data);
1291
-
1292
- if (data.type === 'update') {
1293
- var handled = false;
1294
- data.assets.forEach(function (asset) {
1295
- if (!asset.isNew) {
1296
- var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
1297
-
1298
- if (didAccept) {
1299
- handled = true;
1300
- }
1301
- }
1302
- }); // Enable HMR for CSS by default.
1303
-
1304
- handled = handled || data.assets.every(function (asset) {
1305
- return asset.type === 'css' && asset.generated.js;
1306
- });
1307
-
1308
- if (handled) {
1309
- console.clear();
1310
- data.assets.forEach(function (asset) {
1311
- hmrApply(global.parcelRequire, asset);
1312
- });
1313
- assetsToAccept.forEach(function (v) {
1314
- hmrAcceptRun(v[0], v[1]);
1315
- });
1316
- } else if (location.reload) {
1317
- // `location` global exists in a web worker context but lacks `.reload()` function.
1318
- location.reload();
1319
- }
1320
- }
1321
-
1322
- if (data.type === 'reload') {
1323
- ws.close();
1324
-
1325
- ws.onclose = function () {
1326
- location.reload();
1327
- };
1328
- }
1329
-
1330
- if (data.type === 'error-resolved') {
1331
- console.log('[parcel] ✨ Error resolved');
1332
- removeErrorOverlay();
1333
- }
1334
-
1335
- if (data.type === 'error') {
1336
- console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
1337
- removeErrorOverlay();
1338
- var overlay = createErrorOverlay(data);
1339
- document.body.appendChild(overlay);
1340
- }
1341
- };
1342
- }
1343
-
1344
- function removeErrorOverlay() {
1345
- var overlay = document.getElementById(OVERLAY_ID);
1346
-
1347
- if (overlay) {
1348
- overlay.remove();
1349
- }
1350
- }
1351
-
1352
- function createErrorOverlay(data) {
1353
- var overlay = document.createElement('div');
1354
- overlay.id = OVERLAY_ID; // html encode message and stack trace
1355
-
1356
- var message = document.createElement('div');
1357
- var stackTrace = document.createElement('pre');
1358
- message.innerText = data.error.message;
1359
- stackTrace.innerText = data.error.stack;
1360
- overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
1361
- return overlay;
1362
- }
1363
-
1364
- function getParents(bundle, id) {
1365
- var modules = bundle.modules;
1366
-
1367
- if (!modules) {
1368
- return [];
1369
- }
1370
-
1371
- var parents = [];
1372
- var k, d, dep;
1373
-
1374
- for (k in modules) {
1375
- for (d in modules[k][1]) {
1376
- dep = modules[k][1][d];
1377
-
1378
- if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
1379
- parents.push(k);
1380
- }
1381
- }
1382
- }
1383
-
1384
- if (bundle.parent) {
1385
- parents = parents.concat(getParents(bundle.parent, id));
1386
- }
1387
-
1388
- return parents;
1389
- }
1390
-
1391
- function hmrApply(bundle, asset) {
1392
- var modules = bundle.modules;
1393
-
1394
- if (!modules) {
1395
- return;
1396
- }
1397
-
1398
- if (modules[asset.id] || !bundle.parent) {
1399
- var fn = new Function('require', 'module', 'exports', asset.generated.js);
1400
- asset.isNew = !modules[asset.id];
1401
- modules[asset.id] = [fn, asset.deps];
1402
- } else if (bundle.parent) {
1403
- hmrApply(bundle.parent, asset);
1404
- }
1405
- }
1406
-
1407
- function hmrAcceptCheck(bundle, id) {
1408
- var modules = bundle.modules;
1409
-
1410
- if (!modules) {
1411
- return;
1412
- }
1413
-
1414
- if (!modules[id] && bundle.parent) {
1415
- return hmrAcceptCheck(bundle.parent, id);
1416
- }
1417
-
1418
- if (checkedAssets[id]) {
1419
- return;
1420
- }
1421
-
1422
- checkedAssets[id] = true;
1423
- var cached = bundle.cache[id];
1424
- assetsToAccept.push([bundle, id]);
1425
-
1426
- if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
1427
- return true;
1428
- }
1429
-
1430
- return getParents(global.parcelRequire, id).some(function (id) {
1431
- return hmrAcceptCheck(global.parcelRequire, id);
1432
- });
1433
- }
1434
-
1435
- function hmrAcceptRun(bundle, id) {
1436
- var cached = bundle.cache[id];
1437
- bundle.hotData = {};
1438
-
1439
- if (cached) {
1440
- cached.hot.data = bundle.hotData;
1441
- }
1442
-
1443
- if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
1444
- cached.hot._disposeCallbacks.forEach(function (cb) {
1445
- cb(bundle.hotData);
1446
- });
1447
- }
1448
-
1449
- delete bundle.cache[id];
1450
- bundle(id);
1451
- cached = bundle.cache[id];
1452
-
1453
- if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
1454
- cached.hot._acceptCallbacks.forEach(function (cb) {
1455
- cb();
1456
- });
1457
-
1458
- return true;
1459
- }
1460
- }
1461
- },{}]},{},["../../../../../../.nvm/versions/node/v14.17.3/lib/node_modules/parcel-bundler/src/builtins/hmr-runtime.js","index.ts"], null)
1462
- //# sourceMappingURL=/monitor.77de5100.js.map