@microsoft/applicationinsights-dependencies-js 3.0.0-beta.2302-05 → 3.0.0-beta.2303-02
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/browser/applicationinsights-dependencies-js.integrity.json +9 -9
- package/browser/applicationinsights-dependencies-js.js +144 -97
- package/browser/applicationinsights-dependencies-js.js.map +1 -1
- package/browser/applicationinsights-dependencies-js.min.js +2 -2
- package/browser/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.d.ts +1 -1
- package/dist/applicationinsights-dependencies-js.js +144 -97
- package/dist/applicationinsights-dependencies-js.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.min.js +2 -2
- package/dist/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.rollup.d.ts +1 -1
- package/dist-esm/DependencyInitializer.js +1 -1
- package/dist-esm/DependencyListener.js +1 -1
- package/dist-esm/InternalConstants.js +1 -1
- package/dist-esm/__DynamicConstants.js +2 -2
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/ajax.js +3 -3
- package/dist-esm/ajax.js.map +1 -1
- package/dist-esm/ajaxRecord.js +1 -2
- package/dist-esm/ajaxRecord.js.map +1 -1
- package/dist-esm/ajaxUtils.js +1 -1
- package/dist-esm/applicationinsights-dependencies-js.js +1 -1
- package/package.json +4 -4
- package/src/__DynamicConstants.ts +1 -1
- package/src/ajax.ts +2 -2
- package/src/ajaxRecord.ts +0 -1
package/README.md
CHANGED
|
@@ -5,15 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
Dependencies Plugin for the Application Insights Javascript SDK
|
|
7
7
|
|
|
8
|
-
## Build
|
|
9
|
-
|
|
8
|
+
## Build
|
|
9
|
+
|
|
10
|
+
``` javascript
|
|
10
11
|
npm install -g grunt-cli
|
|
11
12
|
npm install
|
|
12
13
|
npm run build --silent
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
## Run unit tests
|
|
16
|
-
|
|
16
|
+
## Run unit tests
|
|
17
|
+
|
|
18
|
+
```javascript
|
|
17
19
|
npm run test
|
|
18
20
|
```
|
|
19
21
|
|
|
@@ -22,7 +24,7 @@ npm run test
|
|
|
22
24
|
This project welcomes contributions and suggestions. Most contributions require you to
|
|
23
25
|
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
|
|
24
26
|
and actually do, grant us the rights to use your contribution. For details, visit
|
|
25
|
-
https://cla.microsoft.com
|
|
27
|
+
<https://cla.microsoft.com>.
|
|
26
28
|
|
|
27
29
|
When you submit a pull request, a CLA-bot will automatically determine whether you need
|
|
28
30
|
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
|
|
@@ -36,7 +38,7 @@ or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any addi
|
|
|
36
38
|
|
|
37
39
|
As this SDK is designed to enable applications to perform data collection which is sent to the Microsoft collection endpoints the following is required to identify our privacy statement.
|
|
38
40
|
|
|
39
|
-
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704
|
|
41
|
+
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at <https://go.microsoft.com/fwlink/?LinkID=824704>. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
|
|
40
42
|
|
|
41
43
|
## Trademarks
|
|
42
44
|
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "applicationinsights-dependencies-js",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.2303-02",
|
|
4
4
|
"ext": {
|
|
5
5
|
"@js": {
|
|
6
6
|
"file": "applicationinsights-dependencies-js.js",
|
|
7
7
|
"type": "text/javascript; charset=utf-8",
|
|
8
|
-
"integrity": "sha256
|
|
8
|
+
"integrity": "sha256-woXqBn0yLFpPxO6983f26V5nCZn9TfQMUfuM/24jta8= sha384-p10nkONR3QHHnoc2uq22LRC2lCO6Vn9Tf/2LWCtqOh1tZLC0Vf4PKWkC93yFRhz1 sha512-hFi4cPHsy1RqbUkkkvYpP4FTwVEGJ2tdHo+p6pfpXxL4BkHN6pe31O2bvEjPIJTIZ7MEIH5a21IYmL6cXeKp7w==",
|
|
9
9
|
"hashes": {
|
|
10
|
-
"sha256": "
|
|
11
|
-
"sha384": "
|
|
12
|
-
"sha512": "
|
|
10
|
+
"sha256": "woXqBn0yLFpPxO6983f26V5nCZn9TfQMUfuM/24jta8=",
|
|
11
|
+
"sha384": "p10nkONR3QHHnoc2uq22LRC2lCO6Vn9Tf/2LWCtqOh1tZLC0Vf4PKWkC93yFRhz1",
|
|
12
|
+
"sha512": "hFi4cPHsy1RqbUkkkvYpP4FTwVEGJ2tdHo+p6pfpXxL4BkHN6pe31O2bvEjPIJTIZ7MEIH5a21IYmL6cXeKp7w=="
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"@min.js": {
|
|
16
16
|
"file": "applicationinsights-dependencies-js.min.js",
|
|
17
17
|
"type": "text/javascript; charset=utf-8",
|
|
18
|
-
"integrity": "sha256-
|
|
18
|
+
"integrity": "sha256-A1Q50/FiwNEqPCWvXRqtLkkOt2Bt9wi4WNQqRUvfcIg= sha384-1yZUmioFDkP623VwBFXIW6VfPC8D42mT2F2ra8pqtmALge9BSiKCTv4P+gNXLaqd sha512-dcdDwPAoB4O1GTVJUNPqUXfr+jQ4IGR7edAm9IGm+QXRIRoxHW8XxTzEN87Wv2a6N8KRcC3WPOHCuVEweljY3A==",
|
|
19
19
|
"hashes": {
|
|
20
|
-
"sha256": "
|
|
21
|
-
"sha384": "
|
|
22
|
-
"sha512": "
|
|
20
|
+
"sha256": "A1Q50/FiwNEqPCWvXRqtLkkOt2Bt9wi4WNQqRUvfcIg=",
|
|
21
|
+
"sha384": "1yZUmioFDkP623VwBFXIW6VfPC8D42mT2F2ra8pqtmALge9BSiKCTv4P+gNXLaqd",
|
|
22
|
+
"sha512": "dcdDwPAoB4O1GTVJUNPqUXfr+jQ4IGR7edAm9IGm+QXRIRoxHW8XxTzEN87Wv2a6N8KRcC3WPOHCuVEweljY3A=="
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Dependencies Plugin, 3.0.0-beta.
|
|
2
|
+
* Application Insights JavaScript SDK - Dependencies Plugin, 3.0.0-beta.2303-02
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/*!
|
|
103
|
-
* Microsoft Dynamic Proto Utility, 1.1.
|
|
103
|
+
* Microsoft Dynamic Proto Utility, 1.1.8
|
|
104
104
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
105
105
|
*/
|
|
106
106
|
var _a$3;
|
|
@@ -369,6 +369,12 @@
|
|
|
369
369
|
}
|
|
370
370
|
dynamicProto[DynProtoDefaultOptions] = _gblInst.o;
|
|
371
371
|
|
|
372
|
+
/*!
|
|
373
|
+
* NevWare21 - ts-utils, 0.8.1
|
|
374
|
+
* https://github.com/nevware21/ts-utils
|
|
375
|
+
* Copyright (c) NevWare21 and contributors. All rights reserved.
|
|
376
|
+
* Licensed under the MIT license.
|
|
377
|
+
*/
|
|
372
378
|
var UNDEF_VALUE = undefined;
|
|
373
379
|
var EMPTY = "";
|
|
374
380
|
var FUNCTION = "function";
|
|
@@ -385,13 +391,13 @@
|
|
|
385
391
|
var LENGTH = "length";
|
|
386
392
|
var DONE = "done";
|
|
387
393
|
var VALUE = "value";
|
|
394
|
+
var NAME = "name";
|
|
388
395
|
var ObjClass = Object;
|
|
389
396
|
var ObjProto = ObjClass[PROTOTYPE];
|
|
390
397
|
var StrCls = String;
|
|
391
|
-
var StrProto = StrCls[PROTOTYPE];
|
|
392
398
|
var MathCls = Math;
|
|
393
399
|
var ArrCls = Array;
|
|
394
|
-
|
|
400
|
+
var ArrProto = ArrCls[PROTOTYPE];
|
|
395
401
|
function _safeGet(cb, defValue) {
|
|
396
402
|
var result = defValue;
|
|
397
403
|
try {
|
|
@@ -401,7 +407,6 @@
|
|
|
401
407
|
}
|
|
402
408
|
return result;
|
|
403
409
|
}
|
|
404
|
-
|
|
405
410
|
function _createIs(theType) {
|
|
406
411
|
return function (value) {
|
|
407
412
|
return typeof value === theType;
|
|
@@ -436,18 +441,14 @@
|
|
|
436
441
|
var isArray = ArrCls.isArray;
|
|
437
442
|
var isNumber = _createIs(NUMBER);
|
|
438
443
|
var isError = _createObjIs("Error");
|
|
439
|
-
|
|
440
444
|
var objGetOwnPropertyDescriptor = ObjClass.getOwnPropertyDescriptor;
|
|
441
|
-
|
|
442
445
|
function objHasOwnProperty(obj, prop) {
|
|
443
446
|
return obj && ObjProto[HAS_OWN_PROPERTY].call(obj, prop);
|
|
444
447
|
}
|
|
445
|
-
|
|
446
448
|
var objHasOwn = ObjClass["hasOwn"] || polyObjHasOwn;
|
|
447
449
|
function polyObjHasOwn(obj, prop) {
|
|
448
450
|
return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
|
|
449
451
|
}
|
|
450
|
-
|
|
451
452
|
function objForEachKey(theObject, callbackfn, thisArg) {
|
|
452
453
|
if (theObject && isObject(theObject)) {
|
|
453
454
|
for (var prop in theObject) {
|
|
@@ -459,17 +460,22 @@
|
|
|
459
460
|
}
|
|
460
461
|
}
|
|
461
462
|
}
|
|
462
|
-
|
|
463
|
+
function _createKeyValueMap(values, keyType, valueType, completeFn) {
|
|
464
|
+
var theMap = {};
|
|
465
|
+
objForEachKey(values, function (key, value) {
|
|
466
|
+
theMap[key] = keyType ? value : key;
|
|
467
|
+
theMap[value] = valueType ? value : key;
|
|
468
|
+
});
|
|
469
|
+
return completeFn(theMap);
|
|
470
|
+
}
|
|
463
471
|
function throwError(message) {
|
|
464
472
|
throw new Error(message);
|
|
465
473
|
}
|
|
466
474
|
function throwTypeError(message) {
|
|
467
475
|
throw new TypeError(message);
|
|
468
476
|
}
|
|
469
|
-
|
|
470
477
|
var _objFreeze = ObjClass["freeze"];
|
|
471
478
|
var _doNothing = function (value) { return value; };
|
|
472
|
-
ObjClass["assign"];
|
|
473
479
|
function objKeys(value) {
|
|
474
480
|
if (!isObject(value) || value === null) {
|
|
475
481
|
throwTypeError("objKeys called on non-object");
|
|
@@ -487,9 +493,10 @@
|
|
|
487
493
|
return objFreeze(value);
|
|
488
494
|
}
|
|
489
495
|
var objFreeze = _objFreeze || _doNothing;
|
|
490
|
-
ObjClass["seal"] || _doNothing;
|
|
491
496
|
var objGetPrototypeOf = ObjClass["getPrototypeOf"] || _doNothing;
|
|
492
|
-
|
|
497
|
+
function createEnumKeyMap(values) {
|
|
498
|
+
return _createKeyValueMap(values, 0 , 0 , objDeepFreeze);
|
|
499
|
+
}
|
|
493
500
|
function createSimpleMap(values) {
|
|
494
501
|
var mapClass = {};
|
|
495
502
|
objForEachKey(values, function (key, value) {
|
|
@@ -501,9 +508,22 @@
|
|
|
501
508
|
function createTypeMap(values) {
|
|
502
509
|
return createSimpleMap(values);
|
|
503
510
|
}
|
|
504
|
-
|
|
511
|
+
createEnumKeyMap({
|
|
512
|
+
asyncIterator: 0 ,
|
|
513
|
+
hasInstance: 1 ,
|
|
514
|
+
isConcatSpreadable: 2 ,
|
|
515
|
+
iterator: 3 ,
|
|
516
|
+
match: 4 ,
|
|
517
|
+
matchAll: 5 ,
|
|
518
|
+
replace: 6 ,
|
|
519
|
+
search: 7 ,
|
|
520
|
+
species: 8 ,
|
|
521
|
+
split: 9 ,
|
|
522
|
+
toPrimitive: 10 ,
|
|
523
|
+
toStringTag: 11 ,
|
|
524
|
+
unscopables: 12
|
|
525
|
+
});
|
|
505
526
|
var asString = StrCls;
|
|
506
|
-
|
|
507
527
|
var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
|
|
508
528
|
var _globalCfg;
|
|
509
529
|
function _getGlobalValue() {
|
|
@@ -529,7 +549,6 @@
|
|
|
529
549
|
}
|
|
530
550
|
return _globalCfg;
|
|
531
551
|
}
|
|
532
|
-
|
|
533
552
|
function dumpObj(object, format) {
|
|
534
553
|
var propertyValueDump = "";
|
|
535
554
|
if (isError(object)) {
|
|
@@ -545,7 +564,6 @@
|
|
|
545
564
|
}
|
|
546
565
|
return objToString(object) + ": " + propertyValueDump;
|
|
547
566
|
}
|
|
548
|
-
|
|
549
567
|
function _extractArgs(args, startAt) {
|
|
550
568
|
var theArgs = [];
|
|
551
569
|
for (var lp = startAt; lp < args[LENGTH]; lp++) {
|
|
@@ -553,24 +571,25 @@
|
|
|
553
571
|
}
|
|
554
572
|
return theArgs;
|
|
555
573
|
}
|
|
556
|
-
|
|
557
|
-
function _unwrapFunction(funcName) {
|
|
574
|
+
function _unwrapFunction(funcName, target, polyFunc) {
|
|
558
575
|
return function (thisArg) {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
576
|
+
if ((thisArg || thisArg === EMPTY)) {
|
|
577
|
+
var theFunc = thisArg[funcName] || (target && target[funcName]);
|
|
578
|
+
if (theFunc) {
|
|
579
|
+
return theFunc.apply(thisArg, _extractArgs(arguments, 1));
|
|
580
|
+
}
|
|
581
|
+
if (polyFunc) {
|
|
582
|
+
return polyFunc.apply(thisArg, arguments);
|
|
583
|
+
}
|
|
562
584
|
}
|
|
563
|
-
throwTypeError("'" + funcName + "' not defined for " + dumpObj(thisArg));
|
|
585
|
+
throwTypeError("'" + asString(funcName) + "' not defined for " + dumpObj(thisArg));
|
|
564
586
|
};
|
|
565
587
|
}
|
|
566
|
-
|
|
567
588
|
var mathMax = MathCls.max;
|
|
568
|
-
|
|
569
589
|
var strSlice = _unwrapFunction("slice");
|
|
570
|
-
|
|
571
590
|
var SUB_STR = "substr";
|
|
572
591
|
var strSubstring = _unwrapFunction("substring");
|
|
573
|
-
var strSubstr =
|
|
592
|
+
var strSubstr = _unwrapFunction(SUB_STR, UNDEF_VALUE, polyStrSubstr);
|
|
574
593
|
function polyStrSubstr(value, start, length) {
|
|
575
594
|
if (isNullOrUndefined(value)) {
|
|
576
595
|
throwTypeError("'polyStrSubstr called with invalid " + dumpObj(value));
|
|
@@ -590,7 +609,6 @@
|
|
|
590
609
|
function strLeft(value, count) {
|
|
591
610
|
return strSubstring(value, 0, count);
|
|
592
611
|
}
|
|
593
|
-
|
|
594
612
|
var _polySymbols;
|
|
595
613
|
function _globalSymbolRegistry() {
|
|
596
614
|
if (!_polySymbols) {
|
|
@@ -616,7 +634,6 @@
|
|
|
616
634
|
}
|
|
617
635
|
return registry.k[key];
|
|
618
636
|
}
|
|
619
|
-
|
|
620
637
|
var propMap = {
|
|
621
638
|
e: "enumerable",
|
|
622
639
|
c: "configurable",
|
|
@@ -634,7 +651,7 @@
|
|
|
634
651
|
});
|
|
635
652
|
return prop;
|
|
636
653
|
}
|
|
637
|
-
var objDefineProp = ObjClass
|
|
654
|
+
var objDefineProp = ObjClass["defineProperty"];
|
|
638
655
|
function objDefineAccessors(target, prop, getProp, setProp, configurable, enumerable) {
|
|
639
656
|
var desc = {
|
|
640
657
|
e: enumerable,
|
|
@@ -651,7 +668,6 @@
|
|
|
651
668
|
function objDefine(target, key, propDesc) {
|
|
652
669
|
return objDefineProp(target, key, _createProp(propDesc));
|
|
653
670
|
}
|
|
654
|
-
|
|
655
671
|
var _globalLazyTestHooks;
|
|
656
672
|
var _fetchLazyTestHooks = function () {
|
|
657
673
|
_globalLazyTestHooks = _getGlobalConfig();
|
|
@@ -678,11 +694,9 @@
|
|
|
678
694
|
});
|
|
679
695
|
return lazyValue;
|
|
680
696
|
}
|
|
681
|
-
|
|
682
697
|
function _lazySafeGet(cb, defValue) {
|
|
683
698
|
return getLazy(function () { return _safeGet(cb, defValue); });
|
|
684
699
|
}
|
|
685
|
-
|
|
686
700
|
var DOCUMENT = "document";
|
|
687
701
|
var NAVIGATOR = "navigator";
|
|
688
702
|
var WINDOW = "window";
|
|
@@ -690,6 +704,7 @@
|
|
|
690
704
|
var _cachedWindow;
|
|
691
705
|
var _cachedDocument;
|
|
692
706
|
var _cachedNavigator;
|
|
707
|
+
var _isWebWorker;
|
|
693
708
|
function _lazySafeGetInst(name) {
|
|
694
709
|
return _lazySafeGet(function () { return getInst(name) || UNDEF_VALUE; }, UNDEF_VALUE);
|
|
695
710
|
}
|
|
@@ -722,7 +737,10 @@
|
|
|
722
737
|
(!_cachedNavigator || (_globalLazyTestHooks.lzy && !_cachedNavigator.b)) && (_cachedNavigator = _lazySafeGetInst(NAVIGATOR));
|
|
723
738
|
return _cachedNavigator.v;
|
|
724
739
|
}
|
|
725
|
-
|
|
740
|
+
function isWebWorker() {
|
|
741
|
+
!_isWebWorker && (_isWebWorker = _lazySafeGet(function () { return !!(self && self instanceof WorkerGlobalScope); }, false));
|
|
742
|
+
return _isWebWorker.v;
|
|
743
|
+
}
|
|
726
744
|
var _symbol;
|
|
727
745
|
var _symbolFor;
|
|
728
746
|
var _symbolKeyFor;
|
|
@@ -746,11 +764,9 @@
|
|
|
746
764
|
(!_symbolFor || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();
|
|
747
765
|
return (_symbolFor.v || polySymbolFor)(key);
|
|
748
766
|
}
|
|
749
|
-
|
|
750
767
|
function isIterator(value) {
|
|
751
768
|
return !!value && isFunction(value.next);
|
|
752
769
|
}
|
|
753
|
-
|
|
754
770
|
function arrAppend(target, elms) {
|
|
755
771
|
if (!isUndefined(elms) && target) {
|
|
756
772
|
if (isArray(elms)) {
|
|
@@ -769,22 +785,19 @@
|
|
|
769
785
|
}
|
|
770
786
|
return target;
|
|
771
787
|
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
var len = arr[LENGTH];
|
|
788
|
+
function arrForEach(theArray, callbackfn, thisArg) {
|
|
789
|
+
if (theArray) {
|
|
790
|
+
var len = theArray[LENGTH] >>> 0;
|
|
776
791
|
for (var idx = 0; idx < len; idx++) {
|
|
777
|
-
if (idx in
|
|
778
|
-
if (callbackfn.call(thisArg ||
|
|
792
|
+
if (idx in theArray) {
|
|
793
|
+
if (callbackfn.call(thisArg || theArray, theArray[idx], idx, theArray) === -1) {
|
|
779
794
|
break;
|
|
780
795
|
}
|
|
781
796
|
}
|
|
782
797
|
}
|
|
783
798
|
}
|
|
784
799
|
}
|
|
785
|
-
|
|
786
|
-
var arrIndexOf = _unwrapFunction(INDEX_OF);
|
|
787
|
-
|
|
800
|
+
var arrIndexOf = _unwrapFunction(INDEX_OF, ArrProto);
|
|
788
801
|
function objSetPrototypeOf(obj, proto) {
|
|
789
802
|
var fn = ObjClass["setPrototypeOf"] ||
|
|
790
803
|
({ __proto__: [] } instanceof Array && function (d, b) {
|
|
@@ -795,35 +808,47 @@
|
|
|
795
808
|
};
|
|
796
809
|
return fn(obj, proto);
|
|
797
810
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
objSetPrototypeOf(d, b);
|
|
811
|
+
function _createCustomError(name, d, baseClass) {
|
|
812
|
+
objSetPrototypeOf(d, baseClass);
|
|
801
813
|
function __() {
|
|
802
814
|
this.constructor = d;
|
|
815
|
+
this[NAME] = name;
|
|
803
816
|
}
|
|
804
|
-
__[PROTOTYPE] =
|
|
805
|
-
__[PROTOTYPE].name = name;
|
|
817
|
+
__[PROTOTYPE] = baseClass[PROTOTYPE];
|
|
806
818
|
d[PROTOTYPE] = new __();
|
|
807
819
|
return d;
|
|
808
820
|
}
|
|
821
|
+
var _safeSetName = function (baseClass, name) {
|
|
822
|
+
try {
|
|
823
|
+
baseClass[PROTOTYPE][NAME] = name;
|
|
824
|
+
}
|
|
825
|
+
catch (e) {
|
|
826
|
+
}
|
|
827
|
+
};
|
|
809
828
|
function createCustomError(name, constructCb) {
|
|
810
829
|
var baseClass = Error;
|
|
830
|
+
var orgName = baseClass[PROTOTYPE][NAME];
|
|
811
831
|
var customError = _createCustomError(name, function () {
|
|
812
832
|
var _this = this;
|
|
813
|
-
|
|
814
|
-
|
|
833
|
+
try {
|
|
834
|
+
_safeSetName(baseClass, name);
|
|
835
|
+
_this = baseClass.apply(_this, arguments) || _this;
|
|
836
|
+
_this[NAME] = name;
|
|
837
|
+
constructCb && constructCb(_this, arguments);
|
|
838
|
+
}
|
|
839
|
+
finally {
|
|
840
|
+
_safeSetName(baseClass, orgName);
|
|
841
|
+
}
|
|
815
842
|
return _this;
|
|
816
843
|
}, baseClass);
|
|
817
844
|
return customError;
|
|
818
845
|
}
|
|
819
|
-
|
|
820
846
|
function utcNow() {
|
|
821
847
|
return (Date.now || polyUtcNow)();
|
|
822
848
|
}
|
|
823
849
|
function polyUtcNow() {
|
|
824
850
|
return new Date().getTime();
|
|
825
851
|
}
|
|
826
|
-
|
|
827
852
|
var _fnToString;
|
|
828
853
|
var _objCtrFnString;
|
|
829
854
|
var _gblWindow;
|
|
@@ -855,15 +880,12 @@
|
|
|
855
880
|
}
|
|
856
881
|
return result;
|
|
857
882
|
}
|
|
858
|
-
|
|
859
883
|
var _perf;
|
|
860
884
|
function getPerformance() {
|
|
861
885
|
(!_perf || (_globalLazyTestHooks.lzy && !_perf.b)) && (_perf = _lazySafeGetInst("performance"));
|
|
862
886
|
return _perf.v;
|
|
863
887
|
}
|
|
864
|
-
|
|
865
888
|
var strIndexOf = _unwrapFunction(INDEX_OF);
|
|
866
|
-
|
|
867
889
|
function _createTrimFn(exp) {
|
|
868
890
|
return function _doTrim(value) {
|
|
869
891
|
if (isNullOrUndefined(value)) {
|
|
@@ -876,54 +898,79 @@
|
|
|
876
898
|
};
|
|
877
899
|
}
|
|
878
900
|
var polyStrTrim = _createTrimFn(/^\s+|(?=\s)\s+$/g);
|
|
879
|
-
|
|
880
901
|
var TRIM = "trim";
|
|
881
|
-
var strTrim =
|
|
882
|
-
|
|
902
|
+
var strTrim = _unwrapFunction(TRIM, UNDEF_VALUE, polyStrTrim);
|
|
903
|
+
var REF = "ref";
|
|
904
|
+
var UNREF = "un" + REF;
|
|
905
|
+
var HAS_REF = "hasRef";
|
|
906
|
+
var ENABLED = "enabled";
|
|
883
907
|
function _createTimerHandler(startTimer, refreshFn, cancelFn) {
|
|
908
|
+
var _a;
|
|
884
909
|
var ref = true;
|
|
885
910
|
var timerId = startTimer ? refreshFn(null) : null;
|
|
886
|
-
|
|
911
|
+
var theTimerHandler;
|
|
912
|
+
var _unref = function () {
|
|
887
913
|
ref = false;
|
|
888
|
-
timerId && timerId[
|
|
889
|
-
return
|
|
890
|
-
}
|
|
891
|
-
function
|
|
914
|
+
timerId && timerId[UNREF] && timerId[UNREF]();
|
|
915
|
+
return theTimerHandler;
|
|
916
|
+
};
|
|
917
|
+
var _ref = function () {
|
|
892
918
|
ref = true;
|
|
893
|
-
timerId && timerId[
|
|
894
|
-
return
|
|
895
|
-
}
|
|
896
|
-
function
|
|
897
|
-
if (timerId && timerId[
|
|
898
|
-
return timerId[
|
|
919
|
+
timerId && timerId[REF] && timerId[REF]();
|
|
920
|
+
return theTimerHandler;
|
|
921
|
+
};
|
|
922
|
+
var _hasRef = function () {
|
|
923
|
+
if (timerId && timerId[HAS_REF]) {
|
|
924
|
+
return timerId[HAS_REF]();
|
|
899
925
|
}
|
|
900
926
|
return ref;
|
|
901
|
-
}
|
|
902
|
-
var
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
927
|
+
};
|
|
928
|
+
var _refresh = function () {
|
|
929
|
+
timerId = refreshFn(timerId);
|
|
930
|
+
if (!ref) {
|
|
931
|
+
_unref();
|
|
932
|
+
}
|
|
933
|
+
return theTimerHandler;
|
|
934
|
+
};
|
|
935
|
+
var _cancel = function () {
|
|
936
|
+
timerId && cancelFn(timerId);
|
|
937
|
+
timerId = null;
|
|
938
|
+
};
|
|
939
|
+
var _setEnabled = function (value) {
|
|
940
|
+
!value && timerId && _cancel();
|
|
941
|
+
value && !timerId && _refresh();
|
|
942
|
+
};
|
|
943
|
+
theTimerHandler = (_a = {
|
|
944
|
+
cancel: _cancel,
|
|
945
|
+
refresh: _refresh
|
|
913
946
|
},
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
947
|
+
_a[HAS_REF] = _hasRef,
|
|
948
|
+
_a[REF] = _ref,
|
|
949
|
+
_a[UNREF] = _unref,
|
|
950
|
+
_a[ENABLED] = false,
|
|
951
|
+
_a);
|
|
952
|
+
objDefineProp(theTimerHandler, ENABLED, {
|
|
953
|
+
get: function () { return !!timerId; },
|
|
954
|
+
set: _setEnabled
|
|
955
|
+
});
|
|
956
|
+
return {
|
|
957
|
+
h: theTimerHandler,
|
|
958
|
+
dn: function () {
|
|
959
|
+
timerId = null;
|
|
960
|
+
}
|
|
917
961
|
};
|
|
918
|
-
return timer;
|
|
919
962
|
}
|
|
920
|
-
|
|
921
963
|
function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
|
|
922
964
|
var isArr = isArray(overrideFn);
|
|
923
965
|
var len = isArr ? overrideFn.length : 0;
|
|
924
966
|
var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
|
|
925
967
|
var clearFn = (len > 1 ? overrideFn[1] : UNDEF_VALUE) || clearTimeout;
|
|
926
|
-
|
|
968
|
+
var timerFn = theArgs[0];
|
|
969
|
+
theArgs[0] = function () {
|
|
970
|
+
handler.dn();
|
|
971
|
+
timerFn.apply(self, arguments);
|
|
972
|
+
};
|
|
973
|
+
var handler = _createTimerHandler(startTimer, function (timerId) {
|
|
927
974
|
if (timerId) {
|
|
928
975
|
if (timerId.refresh) {
|
|
929
976
|
timerId.refresh();
|
|
@@ -935,6 +982,7 @@
|
|
|
935
982
|
}, function (timerId) {
|
|
936
983
|
clearFn.call(self, timerId);
|
|
937
984
|
});
|
|
985
|
+
return handler.h;
|
|
938
986
|
}
|
|
939
987
|
function scheduleTimeout(callback, timeout) {
|
|
940
988
|
return _createTimeoutWith(this, true, UNDEF_VALUE, _extractArgs(arguments, 0));
|
|
@@ -1249,7 +1297,7 @@
|
|
|
1249
1297
|
}
|
|
1250
1298
|
|
|
1251
1299
|
var _objDefineProperty = ObjDefineProperty;
|
|
1252
|
-
var version = "3.0.0-beta.
|
|
1300
|
+
var version = "3.0.0-beta.2303-02";
|
|
1253
1301
|
var instanceName = "." + newId(6);
|
|
1254
1302
|
var _dataUid = 0;
|
|
1255
1303
|
function _createAccessor(target, prop, value) {
|
|
@@ -2971,14 +3019,14 @@
|
|
|
2971
3019
|
return funcArgs.rslt;
|
|
2972
3020
|
};
|
|
2973
3021
|
}
|
|
2974
|
-
function _getOwner(target, name, checkPrototype) {
|
|
3022
|
+
function _getOwner(target, name, checkPrototype, checkParentProto) {
|
|
2975
3023
|
var owner = null;
|
|
2976
3024
|
if (target) {
|
|
2977
3025
|
if (objHasOwnProperty(target, name)) {
|
|
2978
3026
|
owner = target;
|
|
2979
3027
|
}
|
|
2980
3028
|
else if (checkPrototype) {
|
|
2981
|
-
owner = _getOwner(_getObjProto(target), name, false);
|
|
3029
|
+
owner = _getOwner(_getObjProto(target), name, checkParentProto, false);
|
|
2982
3030
|
}
|
|
2983
3031
|
}
|
|
2984
3032
|
return owner;
|
|
@@ -3019,10 +3067,10 @@
|
|
|
3019
3067
|
aiHook.h[_DYN_PUSH ](theHook);
|
|
3020
3068
|
return theHook;
|
|
3021
3069
|
}
|
|
3022
|
-
function InstrumentFunc(target, funcName, callbacks, checkPrototype) {
|
|
3070
|
+
function InstrumentFunc(target, funcName, callbacks, checkPrototype, checkParentProto) {
|
|
3023
3071
|
if (checkPrototype === void 0) { checkPrototype = true; }
|
|
3024
3072
|
if (target && funcName && callbacks) {
|
|
3025
|
-
var owner = _getOwner(target, funcName, checkPrototype);
|
|
3073
|
+
var owner = _getOwner(target, funcName, checkPrototype, checkParentProto);
|
|
3026
3074
|
if (owner) {
|
|
3027
3075
|
var fn = owner[funcName];
|
|
3028
3076
|
if (typeof fn === strShimFunction) {
|
|
@@ -3798,7 +3846,6 @@
|
|
|
3798
3846
|
_a.duration = self[_DYN_AJAX_TOTAL_DURATION ],
|
|
3799
3847
|
_a.success = (+(self[_DYN_STATUS ])) >= 200 && (+(self[_DYN_STATUS ])) < 400,
|
|
3800
3848
|
_a.responseCode = (+(self[_DYN_STATUS ])),
|
|
3801
|
-
_a.method = self[_DYN_METHOD ],
|
|
3802
3849
|
_a[STR_PROPERTIES] = { HttpMethod: self[_DYN_METHOD ] },
|
|
3803
3850
|
_a);
|
|
3804
3851
|
var props = dependency[STR_PROPERTIES];
|
|
@@ -4331,7 +4378,7 @@
|
|
|
4331
4378
|
}
|
|
4332
4379
|
},
|
|
4333
4380
|
hkErr: _createErrorCallbackFunc(_self, 15 , "Failed to monitor Window.fetch" + ERROR_POSTFIX)
|
|
4334
|
-
}));
|
|
4381
|
+
}, true, isWebWorker()));
|
|
4335
4382
|
_fetchInitialized = true;
|
|
4336
4383
|
}
|
|
4337
4384
|
else if (isPolyfill && !_polyfillInitialized) {
|