@microsoft/1ds-core-js 3.1.8 → 3.1.11
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 +1 -1
- package/bundle/{ms.core-3.1.8.gbl.js → ms.core-3.1.11.gbl.js} +221 -101
- package/bundle/ms.core-3.1.11.gbl.js.map +1 -0
- package/bundle/ms.core-3.1.11.gbl.min.js +7 -0
- package/bundle/ms.core-3.1.11.gbl.min.js.map +1 -0
- package/bundle/ms.core-3.1.11.integrity.json +46 -0
- package/bundle/{ms.core-3.1.8.js → ms.core-3.1.11.js} +221 -101
- package/bundle/ms.core-3.1.11.js.map +1 -0
- package/bundle/ms.core-3.1.11.min.js +7 -0
- package/bundle/ms.core-3.1.11.min.js.map +1 -0
- package/bundle/ms.core.gbl.js +220 -100
- package/bundle/ms.core.gbl.js.map +1 -1
- package/bundle/ms.core.gbl.min.js +2 -2
- package/bundle/ms.core.gbl.min.js.map +1 -1
- package/bundle/ms.core.integrity.json +17 -17
- package/bundle/ms.core.js +220 -100
- package/bundle/ms.core.js.map +1 -1
- package/bundle/ms.core.min.js +2 -2
- package/bundle/ms.core.min.js.map +1 -1
- package/dist/ms.core.js +7 -3
- package/dist/ms.core.js.map +1 -1
- package/dist/ms.core.min.js +2 -2
- package/dist/ms.core.min.js.map +1 -1
- package/dist-esm/src/AppInsightsCore.js +1 -1
- package/dist-esm/src/BaseCore.d.ts +0 -8
- package/dist-esm/src/BaseCore.js +2 -2
- package/dist-esm/src/BaseCore.js.map +1 -1
- package/dist-esm/src/DataModels.js +1 -1
- package/dist-esm/src/ESPromise.js +1 -1
- package/dist-esm/src/ESPromiseScheduler.js +1 -1
- package/dist-esm/src/Enums.js +1 -1
- package/dist-esm/src/Index.js +1 -1
- package/dist-esm/src/Utils.d.ts +5 -4
- package/dist-esm/src/Utils.js +11 -3
- package/dist-esm/src/Utils.js.map +1 -1
- package/dist-esm/src/ValueSanitizer.js +1 -1
- package/package.json +3 -3
- package/src/BaseCore.ts +1 -1
- package/src/Utils.ts +11 -2
- package/bundle/ms.core-3.1.8.gbl.js.map +0 -1
- package/bundle/ms.core-3.1.8.gbl.min.js +0 -7
- package/bundle/ms.core-3.1.8.gbl.min.js.map +0 -1
- package/bundle/ms.core-3.1.8.integrity.json +0 -46
- package/bundle/ms.core-3.1.8.js.map +0 -1
- package/bundle/ms.core-3.1.8.min.js +0 -7
- package/bundle/ms.core-3.1.8.min.js.map +0 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ms.core",
|
|
3
|
+
"version": "3.1.11",
|
|
4
|
+
"ext": {
|
|
5
|
+
"@gbl.js": {
|
|
6
|
+
"file": "ms.core-3.1.11.gbl.js",
|
|
7
|
+
"type": "text/javascript; charset=utf-8",
|
|
8
|
+
"integrity": "sha256-yLpfxE4319DWPW2mbVl17Qjf69iFejeEyGmcMRX0cRU= sha384-r1xWGyMaqHleHNh7aaecvs7zF9CepVjoTLehws9D04YGIc/HqhhZ9NTsebY7m5rD sha512-UkoXOTG1VEA0gMVVV7taIrN8Whb6UzxXjHy0PC40owGaw5vEZb/8/gVLn17EOJHA+yJQrGymf82BRm+J9VI0Kg==",
|
|
9
|
+
"hashes": {
|
|
10
|
+
"sha256": "yLpfxE4319DWPW2mbVl17Qjf69iFejeEyGmcMRX0cRU=",
|
|
11
|
+
"sha384": "r1xWGyMaqHleHNh7aaecvs7zF9CepVjoTLehws9D04YGIc/HqhhZ9NTsebY7m5rD",
|
|
12
|
+
"sha512": "UkoXOTG1VEA0gMVVV7taIrN8Whb6UzxXjHy0PC40owGaw5vEZb/8/gVLn17EOJHA+yJQrGymf82BRm+J9VI0Kg=="
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"@gbl.min.js": {
|
|
16
|
+
"file": "ms.core-3.1.11.gbl.min.js",
|
|
17
|
+
"type": "text/javascript; charset=utf-8",
|
|
18
|
+
"integrity": "sha256-uE1bNfWHvDnxYnksKskAY+0AEwNtX2gIpAJcLkCffTo= sha384-mz4k74/pxbw8CktScxluONsm8UElNN+XAxI6K5fbS4izJo90JnrgSkcTfb31FNqk sha512-SgS7x92FVoImXXkhIEjSD7+yvH+NB+SRxzMUoCE9wcvvfsDuImI9n9op0mcYj66QKhkhQhEaJjR+sclLeYVsqQ==",
|
|
19
|
+
"hashes": {
|
|
20
|
+
"sha256": "uE1bNfWHvDnxYnksKskAY+0AEwNtX2gIpAJcLkCffTo=",
|
|
21
|
+
"sha384": "mz4k74/pxbw8CktScxluONsm8UElNN+XAxI6K5fbS4izJo90JnrgSkcTfb31FNqk",
|
|
22
|
+
"sha512": "SgS7x92FVoImXXkhIEjSD7+yvH+NB+SRxzMUoCE9wcvvfsDuImI9n9op0mcYj66QKhkhQhEaJjR+sclLeYVsqQ=="
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"@js": {
|
|
26
|
+
"file": "ms.core-3.1.11.js",
|
|
27
|
+
"type": "text/javascript; charset=utf-8",
|
|
28
|
+
"integrity": "sha256-bJkbCV1g1ZupZwRTK4pGiRKOxMtgMaGqZ0ETQjUe18o= sha384-hFaU7cV95EwGK/sE1avyg0ELjIRQ1lABe6vPf5dEr3ZJsT4kctrgImzJtqWt6mwM sha512-QYQ9gUC56Ra17D1SdihiP20VM+Ze88T0rlrX4Gvhus4wQ3uzyKM0ziV77JkgZx9sHfaedVdXVL1lsdHcLQgmEQ==",
|
|
29
|
+
"hashes": {
|
|
30
|
+
"sha256": "bJkbCV1g1ZupZwRTK4pGiRKOxMtgMaGqZ0ETQjUe18o=",
|
|
31
|
+
"sha384": "hFaU7cV95EwGK/sE1avyg0ELjIRQ1lABe6vPf5dEr3ZJsT4kctrgImzJtqWt6mwM",
|
|
32
|
+
"sha512": "QYQ9gUC56Ra17D1SdihiP20VM+Ze88T0rlrX4Gvhus4wQ3uzyKM0ziV77JkgZx9sHfaedVdXVL1lsdHcLQgmEQ=="
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"@min.js": {
|
|
36
|
+
"file": "ms.core-3.1.11.min.js",
|
|
37
|
+
"type": "text/javascript; charset=utf-8",
|
|
38
|
+
"integrity": "sha256-gR+xrkVI7KOCvU6H6Bq4iYUGFN+S94dpxK9ySE4gL8c= sha384-LamiJfGMCZI5UeOgDbSoO/o+jSE4fgHY4CH0l0Pehrx2fS5LWMsPPTWOmITFF/2u sha512-akKd5LgYSt5vwt/7kFfE3dvs16u7ej1CBPK6/FE54yY3wwGZo8SE4zX7zW8b3Ffzd0ypsuYt/4syyam4RP+T+A==",
|
|
39
|
+
"hashes": {
|
|
40
|
+
"sha256": "gR+xrkVI7KOCvU6H6Bq4iYUGFN+S94dpxK9ySE4gL8c=",
|
|
41
|
+
"sha384": "LamiJfGMCZI5UeOgDbSoO/o+jSE4fgHY4CH0l0Pehrx2fS5LWMsPPTWOmITFF/2u",
|
|
42
|
+
"sha512": "akKd5LgYSt5vwt/7kFfE3dvs16u7ej1CBPK6/FE54yY3wwGZo8SE4zX7zW8b3Ffzd0ypsuYt/4syyam4RP+T+A=="
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* 1DS JS SDK Core, 3.1.
|
|
2
|
+
* 1DS JS SDK Core, 3.1.11
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
@@ -21,20 +21,24 @@
|
|
|
21
21
|
var ObjDefineProperty = ObjClass["defineProperty"];
|
|
22
22
|
var ObjHasOwnProperty = ObjProto[strShimHasOwnProperty];
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
var _cachedGlobal = null;
|
|
25
|
+
function getGlobal(useCached) {
|
|
26
|
+
if (useCached === void 0) { useCached = true; }
|
|
27
|
+
if (!_cachedGlobal || !useCached) {
|
|
28
|
+
if (typeof globalThis !== strShimUndefined && globalThis) {
|
|
29
|
+
_cachedGlobal = globalThis;
|
|
30
|
+
}
|
|
31
|
+
if (typeof self !== strShimUndefined && self) {
|
|
32
|
+
_cachedGlobal = self;
|
|
33
|
+
}
|
|
34
|
+
if (typeof window !== strShimUndefined && window) {
|
|
35
|
+
_cachedGlobal = window;
|
|
36
|
+
}
|
|
37
|
+
if (typeof global !== strShimUndefined && global) {
|
|
38
|
+
_cachedGlobal = global;
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
|
-
return
|
|
41
|
+
return _cachedGlobal;
|
|
38
42
|
}
|
|
39
43
|
function throwTypeError(message) {
|
|
40
44
|
throw new TypeError(message);
|
|
@@ -49,7 +53,7 @@
|
|
|
49
53
|
}
|
|
50
54
|
var type = typeof obj;
|
|
51
55
|
if (type !== strShimObject && type !== strShimFunction) {
|
|
52
|
-
throwTypeError(
|
|
56
|
+
throwTypeError("Object prototype may only be an Object:" + obj);
|
|
53
57
|
}
|
|
54
58
|
function tmpFunc() { }
|
|
55
59
|
tmpFunc[strShimPrototype] = obj;
|
|
@@ -444,10 +448,29 @@
|
|
|
444
448
|
var strAddEventHelper = "addEventListener";
|
|
445
449
|
var strDetachEvent = "detachEvent";
|
|
446
450
|
var strRemoveEventListener = "removeEventListener";
|
|
451
|
+
var strToISOString = "toISOString";
|
|
452
|
+
var cStrEndsWith = "endsWith";
|
|
453
|
+
var cStrStartsWith = "startsWith";
|
|
454
|
+
var strIndexOf = "indexOf";
|
|
455
|
+
var strMap = "map";
|
|
456
|
+
var strReduce = "reduce";
|
|
457
|
+
var cStrTrim = "trim";
|
|
458
|
+
var strToString = "toString";
|
|
447
459
|
var _objDefineProperty = ObjDefineProperty;
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
460
|
+
var _objKeys = ObjClass.keys;
|
|
461
|
+
var StringProto = String[strShimPrototype];
|
|
462
|
+
var _strTrim = StringProto[cStrTrim];
|
|
463
|
+
var _strEndsWith = StringProto[cStrEndsWith];
|
|
464
|
+
var _strStartsWith = StringProto[cStrStartsWith];
|
|
465
|
+
var DateProto = Date[strShimPrototype];
|
|
466
|
+
var _dataToISOString = DateProto[strToISOString];
|
|
467
|
+
var _isArray = Array.isArray;
|
|
468
|
+
var _objToString = ObjProto[strToString];
|
|
469
|
+
var _fnToString = ObjHasOwnProperty[strToString];
|
|
470
|
+
_fnToString.call(ObjClass);
|
|
471
|
+
var rCamelCase = /-([a-z])/g;
|
|
472
|
+
var rNormalizeInvalid = /([^\w\d_$])/g;
|
|
473
|
+
var rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
451
474
|
function isTypeof(value, theType) {
|
|
452
475
|
return typeof value === theType;
|
|
453
476
|
}
|
|
@@ -461,13 +484,13 @@
|
|
|
461
484
|
return !isNullOrUndefined(value);
|
|
462
485
|
}
|
|
463
486
|
function hasOwnProperty(obj, prop) {
|
|
464
|
-
return obj && ObjHasOwnProperty.call(obj, prop);
|
|
487
|
+
return !!(obj && ObjHasOwnProperty.call(obj, prop));
|
|
465
488
|
}
|
|
466
489
|
function isObject(value) {
|
|
467
|
-
return typeof value === strShimObject;
|
|
490
|
+
return !!(value && typeof value === strShimObject);
|
|
468
491
|
}
|
|
469
492
|
function isFunction(value) {
|
|
470
|
-
return typeof value === strShimFunction;
|
|
493
|
+
return !!(value && typeof value === strShimFunction);
|
|
471
494
|
}
|
|
472
495
|
function attachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {
|
|
473
496
|
if (useCapture === void 0) { useCapture = false; }
|
|
@@ -505,9 +528,14 @@
|
|
|
505
528
|
}
|
|
506
529
|
function normalizeJsName(name) {
|
|
507
530
|
var value = name;
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
531
|
+
if (value && isString(value)) {
|
|
532
|
+
value = value.replace(rCamelCase, function (_all, letter) {
|
|
533
|
+
return letter.toUpperCase();
|
|
534
|
+
});
|
|
535
|
+
value = value.replace(rNormalizeInvalid, "_");
|
|
536
|
+
value = value.replace(rLeadingNumeric, function (_all, match) {
|
|
537
|
+
return "_" + match;
|
|
538
|
+
});
|
|
511
539
|
}
|
|
512
540
|
return value;
|
|
513
541
|
}
|
|
@@ -521,40 +549,45 @@
|
|
|
521
549
|
}
|
|
522
550
|
}
|
|
523
551
|
function strEndsWith(value, search) {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
552
|
+
var result = false;
|
|
553
|
+
if (value && search && !(result = value === search)) {
|
|
554
|
+
result = _strEndsWith ? value[cStrEndsWith](search) : _strEndsWithPoly(value, search);
|
|
555
|
+
}
|
|
556
|
+
return result;
|
|
557
|
+
}
|
|
558
|
+
function _strEndsWithPoly(value, search) {
|
|
559
|
+
var result = false;
|
|
560
|
+
var searchLen = search ? search.length : 0;
|
|
561
|
+
var valLen = value ? value.length : 0;
|
|
562
|
+
if (searchLen && valLen && valLen >= searchLen && !(result = value === search)) {
|
|
563
|
+
var pos = valLen - 1;
|
|
564
|
+
for (var lp = searchLen - 1; lp >= 0; lp--) {
|
|
565
|
+
if (value[pos] != search[lp]) {
|
|
566
|
+
return false;
|
|
537
567
|
}
|
|
538
|
-
|
|
568
|
+
pos--;
|
|
539
569
|
}
|
|
570
|
+
result = true;
|
|
540
571
|
}
|
|
541
|
-
return
|
|
572
|
+
return result;
|
|
542
573
|
}
|
|
543
574
|
function strStartsWith(value, checkValue) {
|
|
544
575
|
var result = false;
|
|
545
|
-
if (value && checkValue) {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
576
|
+
if (value && checkValue && !(result = value === checkValue)) {
|
|
577
|
+
result = _strStartsWith ? value[cStrStartsWith](checkValue) : _strStartsWithPoly(value, checkValue);
|
|
578
|
+
}
|
|
579
|
+
return result;
|
|
580
|
+
}
|
|
581
|
+
function _strStartsWithPoly(value, checkValue) {
|
|
582
|
+
var result = false;
|
|
583
|
+
var chkLen = checkValue ? checkValue.length : 0;
|
|
584
|
+
if (value && chkLen && value.length >= chkLen && !(result = value === checkValue)) {
|
|
585
|
+
for (var lp = 0; lp < chkLen; lp++) {
|
|
586
|
+
if (value[lp] !== checkValue[lp]) {
|
|
587
|
+
return false;
|
|
555
588
|
}
|
|
556
|
-
result = true;
|
|
557
589
|
}
|
|
590
|
+
result = true;
|
|
558
591
|
}
|
|
559
592
|
return result;
|
|
560
593
|
}
|
|
@@ -565,13 +598,14 @@
|
|
|
565
598
|
return false;
|
|
566
599
|
}
|
|
567
600
|
function isDate(obj) {
|
|
568
|
-
return
|
|
601
|
+
return !!(obj && _objToString.call(obj) === "[object Date]");
|
|
569
602
|
}
|
|
570
|
-
|
|
571
|
-
|
|
603
|
+
var isArray = _isArray || _isArrayPoly;
|
|
604
|
+
function _isArrayPoly(obj) {
|
|
605
|
+
return !!(obj && _objToString.call(obj) === "[object Array]");
|
|
572
606
|
}
|
|
573
607
|
function isError(obj) {
|
|
574
|
-
return
|
|
608
|
+
return !!(obj && _objToString.call(obj) === "[object Error]");
|
|
575
609
|
}
|
|
576
610
|
function isString(value) {
|
|
577
611
|
return typeof value === "string";
|
|
@@ -583,7 +617,12 @@
|
|
|
583
617
|
return typeof value === "boolean";
|
|
584
618
|
}
|
|
585
619
|
function toISOString(date) {
|
|
586
|
-
if (
|
|
620
|
+
if (date) {
|
|
621
|
+
return _dataToISOString ? date[strToISOString]() : _toISOStringPoly(date);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
function _toISOStringPoly(date) {
|
|
625
|
+
if (date && date.getUTCFullYear) {
|
|
587
626
|
var pad = function (num) {
|
|
588
627
|
var r = String(num);
|
|
589
628
|
if (r.length === 1) {
|
|
@@ -616,60 +655,76 @@
|
|
|
616
655
|
}
|
|
617
656
|
}
|
|
618
657
|
function arrIndexOf(arr, searchElement, fromIndex) {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
658
|
+
if (arr) {
|
|
659
|
+
if (arr[strIndexOf]) {
|
|
660
|
+
return arr[strIndexOf](searchElement, fromIndex);
|
|
661
|
+
}
|
|
662
|
+
var len = arr.length;
|
|
663
|
+
var from = fromIndex || 0;
|
|
664
|
+
try {
|
|
665
|
+
for (var lp = Math.max(from >= 0 ? from : len - Math.abs(from), 0); lp < len; lp++) {
|
|
666
|
+
if (lp in arr && arr[lp] === searchElement) {
|
|
667
|
+
return lp;
|
|
668
|
+
}
|
|
625
669
|
}
|
|
626
670
|
}
|
|
627
|
-
|
|
628
|
-
|
|
671
|
+
catch (e) {
|
|
672
|
+
}
|
|
629
673
|
}
|
|
630
674
|
return -1;
|
|
631
675
|
}
|
|
632
676
|
function arrMap(arr, callbackfn, thisArg) {
|
|
633
|
-
var
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
677
|
+
var results;
|
|
678
|
+
if (arr) {
|
|
679
|
+
if (arr[strMap]) {
|
|
680
|
+
return arr[strMap](callbackfn, thisArg);
|
|
681
|
+
}
|
|
682
|
+
var len = arr.length;
|
|
683
|
+
var _this = thisArg || arr;
|
|
684
|
+
results = new Array(len);
|
|
685
|
+
try {
|
|
686
|
+
for (var lp = 0; lp < len; lp++) {
|
|
687
|
+
if (lp in arr) {
|
|
688
|
+
results[lp] = callbackfn.call(_this, arr[lp], arr);
|
|
689
|
+
}
|
|
640
690
|
}
|
|
641
691
|
}
|
|
642
|
-
|
|
643
|
-
|
|
692
|
+
catch (e) {
|
|
693
|
+
}
|
|
644
694
|
}
|
|
645
695
|
return results;
|
|
646
696
|
}
|
|
647
697
|
function arrReduce(arr, callbackfn, initialValue) {
|
|
648
|
-
var len = arr.length;
|
|
649
|
-
var lp = 0;
|
|
650
698
|
var value;
|
|
651
|
-
if (
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
else {
|
|
655
|
-
while (lp < len && !(lp in arr)) {
|
|
656
|
-
lp++;
|
|
699
|
+
if (arr) {
|
|
700
|
+
if (arr[strReduce]) {
|
|
701
|
+
return arr[strReduce](callbackfn, initialValue);
|
|
657
702
|
}
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
703
|
+
var len = arr.length;
|
|
704
|
+
var lp = 0;
|
|
705
|
+
if (arguments.length >= 3) {
|
|
706
|
+
value = arguments[2];
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
while (lp < len && !(lp in arr)) {
|
|
710
|
+
lp++;
|
|
711
|
+
}
|
|
712
|
+
value = arr[lp++];
|
|
713
|
+
}
|
|
714
|
+
while (lp < len) {
|
|
715
|
+
if (lp in arr) {
|
|
716
|
+
value = callbackfn(value, arr[lp], lp, arr);
|
|
717
|
+
}
|
|
718
|
+
lp++;
|
|
663
719
|
}
|
|
664
|
-
lp++;
|
|
665
720
|
}
|
|
666
721
|
return value;
|
|
667
722
|
}
|
|
668
723
|
function strTrim(str) {
|
|
669
|
-
if (
|
|
670
|
-
|
|
724
|
+
if (str) {
|
|
725
|
+
str = (_strTrim && str[cStrTrim]) ? str[cStrTrim]() : (str.replace ? str.replace(/^\s+|\s+$/g, "") : str);
|
|
671
726
|
}
|
|
672
|
-
return str
|
|
727
|
+
return str;
|
|
673
728
|
}
|
|
674
729
|
var _objKeysHasDontEnumBug = !({ toString: null }).propertyIsEnumerable("toString");
|
|
675
730
|
var _objKeysDontEnums = [
|
|
@@ -686,6 +741,9 @@
|
|
|
686
741
|
if (objType !== strShimFunction && (objType !== strShimObject || obj === null)) {
|
|
687
742
|
throwTypeError("objKeys called on non-object");
|
|
688
743
|
}
|
|
744
|
+
if (!_objKeysHasDontEnumBug && _objKeys) {
|
|
745
|
+
return _objKeys(obj);
|
|
746
|
+
}
|
|
689
747
|
var result = [];
|
|
690
748
|
for (var prop in obj) {
|
|
691
749
|
if (obj && ObjHasOwnProperty.call(obj, prop)) {
|
|
@@ -725,10 +783,7 @@
|
|
|
725
783
|
}
|
|
726
784
|
function dateNow() {
|
|
727
785
|
var dt = Date;
|
|
728
|
-
|
|
729
|
-
return dt.now();
|
|
730
|
-
}
|
|
731
|
-
return new dt().getTime();
|
|
786
|
+
return dt.now ? dt.now() : new dt().getTime();
|
|
732
787
|
}
|
|
733
788
|
function getExceptionName(object) {
|
|
734
789
|
if (isError(object)) {
|
|
@@ -806,14 +861,15 @@
|
|
|
806
861
|
return target;
|
|
807
862
|
}
|
|
808
863
|
function optimizeObject(theObject) {
|
|
809
|
-
if (theObject) {
|
|
810
|
-
theObject = ObjClass(ObjAssign
|
|
864
|
+
if (theObject && ObjAssign) {
|
|
865
|
+
theObject = ObjClass(ObjAssign({}, theObject));
|
|
811
866
|
}
|
|
812
867
|
return theObject;
|
|
813
868
|
}
|
|
814
869
|
|
|
815
870
|
var strWindow = "window";
|
|
816
871
|
var strDocument = "document";
|
|
872
|
+
var strDocumentMode = "documentMode";
|
|
817
873
|
var strNavigator = "navigator";
|
|
818
874
|
var strHistory = "history";
|
|
819
875
|
var strLocation = "location";
|
|
@@ -964,7 +1020,8 @@
|
|
|
964
1020
|
}
|
|
965
1021
|
var ua = (userAgentStr || "").toLowerCase();
|
|
966
1022
|
if (strContains(ua, strMsie)) {
|
|
967
|
-
|
|
1023
|
+
var doc = getDocument() || {};
|
|
1024
|
+
return Math.max(parseInt(ua.split(strMsie)[1]), (doc[strDocumentMode] || 0));
|
|
968
1025
|
}
|
|
969
1026
|
else if (strContains(ua, strTrident)) {
|
|
970
1027
|
var tridentVer = parseInt(ua.split(strTrident)[1]);
|
|
@@ -1007,7 +1064,7 @@
|
|
|
1007
1064
|
}
|
|
1008
1065
|
function useXDomainRequest() {
|
|
1009
1066
|
if (_useXDomainRequest === null) {
|
|
1010
|
-
_useXDomainRequest = (typeof XDomainRequest !== undefined);
|
|
1067
|
+
_useXDomainRequest = (typeof XDomainRequest !== "undefined");
|
|
1011
1068
|
if (_useXDomainRequest && isXhrSupported()) {
|
|
1012
1069
|
_useXDomainRequest = _useXDomainRequest && !_hasProperty(getGlobalInst("XMLHttpRequest"), "withCredentials");
|
|
1013
1070
|
}
|
|
@@ -1025,6 +1082,45 @@
|
|
|
1025
1082
|
return isSupported;
|
|
1026
1083
|
}
|
|
1027
1084
|
|
|
1085
|
+
var listenerFuncs = ["eventsSent", "eventsDiscarded", "eventsSendRequest", "perfEvent"];
|
|
1086
|
+
var _aiNamespace = null;
|
|
1087
|
+
var _debugListener;
|
|
1088
|
+
function _listenerProxyFunc(name, config) {
|
|
1089
|
+
return function () {
|
|
1090
|
+
var args = arguments;
|
|
1091
|
+
var dbgExt = getDebugExt(config);
|
|
1092
|
+
if (dbgExt) {
|
|
1093
|
+
var listener = dbgExt.listener;
|
|
1094
|
+
if (listener && listener[name]) {
|
|
1095
|
+
listener[name].apply(listener, args);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
function _getExtensionNamespace() {
|
|
1101
|
+
var target = getGlobalInst("Microsoft");
|
|
1102
|
+
if (target) {
|
|
1103
|
+
_aiNamespace = target["ApplicationInsights"];
|
|
1104
|
+
}
|
|
1105
|
+
return _aiNamespace;
|
|
1106
|
+
}
|
|
1107
|
+
function getDebugExt(config) {
|
|
1108
|
+
var ns = _aiNamespace;
|
|
1109
|
+
if (!ns && config.disableDbgExt !== true) {
|
|
1110
|
+
ns = _aiNamespace || _getExtensionNamespace();
|
|
1111
|
+
}
|
|
1112
|
+
return ns ? ns["ChromeDbgExt"] : null;
|
|
1113
|
+
}
|
|
1114
|
+
function getDebugListener(config) {
|
|
1115
|
+
if (!_debugListener) {
|
|
1116
|
+
_debugListener = {};
|
|
1117
|
+
for (var lp = 0; lp < listenerFuncs.length; lp++) {
|
|
1118
|
+
_debugListener[listenerFuncs[lp]] = _listenerProxyFunc(listenerFuncs[lp], config);
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
return _debugListener;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1028
1124
|
var AiNonUserActionablePrefix = "AI (Internal): ";
|
|
1029
1125
|
var AiUserActionablePrefix = "AI: ";
|
|
1030
1126
|
var AIInternalMessagePrefix = "AITR_";
|
|
@@ -1108,13 +1204,18 @@
|
|
|
1108
1204
|
}
|
|
1109
1205
|
_self.logInternalMessage(severity, message);
|
|
1110
1206
|
}
|
|
1207
|
+
else {
|
|
1208
|
+
_debugExtMsg("throw" + (severity === exports.LoggingSeverity.CRITICAL ? "Critical" : "Warning"), message);
|
|
1209
|
+
}
|
|
1111
1210
|
}
|
|
1112
1211
|
};
|
|
1113
1212
|
_self.warnToConsole = function (message) {
|
|
1114
1213
|
_logToConsole("warn", message);
|
|
1214
|
+
_debugExtMsg("warning", message);
|
|
1115
1215
|
};
|
|
1116
1216
|
_self.errorToConsole = function (message) {
|
|
1117
1217
|
_logToConsole("error", message);
|
|
1218
|
+
_debugExtMsg("error", message);
|
|
1118
1219
|
};
|
|
1119
1220
|
_self.resetInternalMessageCount = function () {
|
|
1120
1221
|
_messageCount = 0;
|
|
@@ -1136,12 +1237,18 @@
|
|
|
1136
1237
|
if (severity <= _self.telemetryLoggingLevel()) {
|
|
1137
1238
|
_self.queue.push(message);
|
|
1138
1239
|
_messageCount++;
|
|
1240
|
+
_debugExtMsg((severity === exports.LoggingSeverity.CRITICAL ? "error" : "warn"), message);
|
|
1139
1241
|
}
|
|
1140
1242
|
if (_messageCount === _self.maxInternalMessageLimit()) {
|
|
1141
1243
|
var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
|
|
1142
1244
|
var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);
|
|
1143
1245
|
_self.queue.push(throttleMessage);
|
|
1144
|
-
|
|
1246
|
+
if (severity === exports.LoggingSeverity.CRITICAL) {
|
|
1247
|
+
_self.errorToConsole(throttleLimitMessage);
|
|
1248
|
+
}
|
|
1249
|
+
else {
|
|
1250
|
+
_self.warnToConsole(throttleLimitMessage);
|
|
1251
|
+
}
|
|
1145
1252
|
}
|
|
1146
1253
|
}
|
|
1147
1254
|
};
|
|
@@ -1155,6 +1262,12 @@
|
|
|
1155
1262
|
function _areInternalMessagesThrottled() {
|
|
1156
1263
|
return _messageCount >= _self.maxInternalMessageLimit();
|
|
1157
1264
|
}
|
|
1265
|
+
function _debugExtMsg(name, data) {
|
|
1266
|
+
var dbgExt = getDebugExt(config);
|
|
1267
|
+
if (dbgExt && dbgExt.diagLog) {
|
|
1268
|
+
dbgExt.diagLog(name, data);
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1158
1271
|
});
|
|
1159
1272
|
}
|
|
1160
1273
|
return DiagnosticLogger;
|
|
@@ -1943,6 +2056,9 @@
|
|
|
1943
2056
|
_notificationManager = notificationManager;
|
|
1944
2057
|
_self[strNotificationManager] = notificationManager;
|
|
1945
2058
|
_self.config = config || {};
|
|
2059
|
+
if (notificationManager && _self.config.disableDbgExt !== true) {
|
|
2060
|
+
notificationManager.addNotificationListener(getDebugListener(config));
|
|
2061
|
+
}
|
|
1946
2062
|
if (_self.config.enablePerfMgr) {
|
|
1947
2063
|
setValue(_self.config, "createPerfMgr", _createPerfManager);
|
|
1948
2064
|
}
|
|
@@ -2457,10 +2573,11 @@
|
|
|
2457
2573
|
var _ExtendedInternalMessageId = __assignFn(__assignFn({}, _InternalMessageId), { AuthHandShakeError: 501, AuthRedirectFail: 502, BrowserCannotReadLocalStorage: 503, BrowserCannotWriteLocalStorage: 504, BrowserDoesNotSupportLocalStorage: 505, CannotParseBiBlobValue: 506, CannotParseDataAttribute: 507, CVPluginNotAvailable: 508, DroppedEvent: 509, ErrorParsingAISessionCookie: 510, ErrorProvidedChannels: 511, FailedToGetCookies: 512, FailedToInitializeCorrelationVector: 513, FailedToInitializeSDK: 514, InvalidContentBlob: 515, InvalidCorrelationValue: 516, SessionRenewalDateIsZero: 517, SendPostOnCompleteFailure: 518, PostResponseHandler: 519, SDKNotInitialized: 520 });
|
|
2458
2574
|
|
|
2459
2575
|
var _a;
|
|
2460
|
-
var Version = '3.1.
|
|
2576
|
+
var Version = '3.1.11';
|
|
2461
2577
|
var FullVersionString = "1DS-Web-JS-" + Version;
|
|
2462
2578
|
var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|
|
2463
2579
|
var strWithCredentials = "withCredentials";
|
|
2580
|
+
var strTimeout = "timeout";
|
|
2464
2581
|
var _fieldTypeEventPropMap = (_a = {},
|
|
2465
2582
|
_a[0 ] = EventPropertyType.Unspecified,
|
|
2466
2583
|
_a[2 ] = EventPropertyType.Double,
|
|
@@ -2784,7 +2901,7 @@
|
|
|
2784
2901
|
function isChromium() {
|
|
2785
2902
|
return !!getGlobalInst("chrome");
|
|
2786
2903
|
}
|
|
2787
|
-
function openXhr(method, urlString, withCredentials, disabled, isSync) {
|
|
2904
|
+
function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {
|
|
2788
2905
|
if (disabled === void 0) { disabled = false; }
|
|
2789
2906
|
if (isSync === void 0) { isSync = false; }
|
|
2790
2907
|
function _wrapSetXhrProp(xhr, prop, value) {
|
|
@@ -2805,6 +2922,9 @@
|
|
|
2805
2922
|
if (withCredentials) {
|
|
2806
2923
|
_wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
|
|
2807
2924
|
}
|
|
2925
|
+
if (!isSync && timeout) {
|
|
2926
|
+
_wrapSetXhrProp(xhr, strTimeout, timeout);
|
|
2927
|
+
}
|
|
2808
2928
|
return xhr;
|
|
2809
2929
|
}
|
|
2810
2930
|
|
|
@@ -3651,4 +3771,4 @@
|
|
|
3651
3771
|
(function(obj, prop, descriptor) { /* ai_es3_polyfil defineProperty */ var func = Object["defineProperty"]; if (func) { try { return func(obj, prop, descriptor); } catch(e) { /* IE8 defines defineProperty, but will throw */ } } if (descriptor && typeof descriptor.value !== undefined) { obj[prop] = descriptor.value; } return obj; })(exports, '__esModule', { value: true });
|
|
3652
3772
|
|
|
3653
3773
|
}));
|
|
3654
|
-
//# sourceMappingURL=ms.core-3.1.
|
|
3774
|
+
//# sourceMappingURL=ms.core-3.1.11.js.map
|