@microsoft/1ds-post-js 4.1.1 → 4.1.2

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 (47) hide show
  1. package/bundle/es5/{ms.post-4.1.1.gbl.js → ms.post-4.1.2.gbl.js} +452 -469
  2. package/bundle/es5/ms.post-4.1.2.gbl.js.map +1 -0
  3. package/bundle/es5/ms.post-4.1.2.gbl.min.js +7 -0
  4. package/bundle/es5/ms.post-4.1.2.gbl.min.js.map +1 -0
  5. package/bundle/es5/ms.post-4.1.2.integrity.json +46 -0
  6. package/bundle/es5/{ms.post-4.1.1.js → ms.post-4.1.2.js} +452 -469
  7. package/bundle/es5/ms.post-4.1.2.js.map +1 -0
  8. package/bundle/es5/ms.post-4.1.2.min.js +7 -0
  9. package/bundle/es5/ms.post-4.1.2.min.js.map +1 -0
  10. package/bundle/es5/ms.post.gbl.js +451 -468
  11. package/bundle/es5/ms.post.gbl.js.map +1 -1
  12. package/bundle/es5/ms.post.gbl.min.js +2 -2
  13. package/bundle/es5/ms.post.gbl.min.js.map +1 -1
  14. package/bundle/es5/ms.post.integrity.json +17 -17
  15. package/bundle/es5/ms.post.js +451 -468
  16. package/bundle/es5/ms.post.js.map +1 -1
  17. package/bundle/es5/ms.post.min.js +2 -2
  18. package/bundle/es5/ms.post.min.js.map +1 -1
  19. package/dist/es5/ms.post.js +449 -466
  20. package/dist/es5/ms.post.js.map +1 -1
  21. package/dist/es5/ms.post.min.js +2 -2
  22. package/dist/es5/ms.post.min.js.map +1 -1
  23. package/dist-es5/BatchNotificationActions.js +1 -1
  24. package/dist-es5/ClockSkewManager.js +1 -1
  25. package/dist-es5/DataModels.js +1 -1
  26. package/dist-es5/EventBatch.js +1 -1
  27. package/dist-es5/HttpManager.js +1 -1
  28. package/dist-es5/Index.js +1 -1
  29. package/dist-es5/InternalConstants.js +1 -1
  30. package/dist-es5/KillSwitch.js +1 -1
  31. package/dist-es5/PostChannel.js +2 -2
  32. package/dist-es5/PostChannel.js.map +1 -1
  33. package/dist-es5/RetryPolicy.js +1 -1
  34. package/dist-es5/Serializer.js +1 -1
  35. package/dist-es5/TimeoutOverrideWrapper.js +1 -1
  36. package/dist-es5/__DynamicConstants.js +1 -1
  37. package/dist-es5/typings/XDomainRequest.js +1 -1
  38. package/package.json +3 -3
  39. package/types/1ds-post-js.d.ts +1 -1
  40. package/types/1ds-post-js.namespaced.d.ts +2 -1
  41. package/bundle/es5/ms.post-4.1.1.gbl.js.map +0 -1
  42. package/bundle/es5/ms.post-4.1.1.gbl.min.js +0 -7
  43. package/bundle/es5/ms.post-4.1.1.gbl.min.js.map +0 -1
  44. package/bundle/es5/ms.post-4.1.1.integrity.json +0 -46
  45. package/bundle/es5/ms.post-4.1.1.js.map +0 -1
  46. package/bundle/es5/ms.post-4.1.1.min.js +0 -7
  47. package/bundle/es5/ms.post-4.1.1.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * 1DS JS SDK POST plugin, 4.1.1
2
+ * 1DS JS SDK POST plugin, 4.1.2
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
@@ -23,23 +23,16 @@
23
23
  var UNDEF_VALUE = undefined;
24
24
  var NULL_VALUE = null;
25
25
  var EMPTY = "";
26
- var BOOLEAN = "boolean";
27
26
  var FUNCTION = "function";
28
- var NUMBER = "number";
29
27
  var OBJECT = "object";
30
28
  var PROTOTYPE = "prototype";
31
29
  var __PROTO__ = "__proto__";
32
- var STRING = "string";
33
30
  var UNDEFINED = "undefined";
34
31
  var CONSTRUCTOR = "constructor";
35
32
  var SYMBOL = "Symbol";
36
33
  var POLYFILL_TAG = "_polyfill";
37
- var INDEX_OF = "indexOf";
38
34
  var LENGTH = "length";
39
- var DONE = "done";
40
- var VALUE = "value";
41
35
  var NAME = "name";
42
- var SLICE = "slice";
43
36
  var CALL = "call";
44
37
  var TO_STRING = "toString";
45
38
  var ObjClass = Object;
@@ -49,6 +42,7 @@
49
42
  var MathCls = Math;
50
43
  var ArrCls = Array;
51
44
  var ArrProto = ArrCls[PROTOTYPE];
45
+ var ArrSlice = ArrProto["slice"];
52
46
 
53
47
  function safe(func, argArray) {
54
48
  try {
@@ -83,7 +77,7 @@
83
77
  function isDefined(arg) {
84
78
  return !!arg || arg !== UNDEF_VALUE;
85
79
  }
86
- var isString = ( /*#__PURE__*/_createIs(STRING));
80
+ var isString = ( /*#__PURE__*/_createIs("string"));
87
81
  var isFunction = ( /*#__PURE__*/_createIs(FUNCTION));
88
82
  /*#__NO_SIDE_EFFECTS__*/
89
83
  function isObject(value) {
@@ -93,8 +87,8 @@
93
87
  return !!value && typeof value === OBJECT;
94
88
  }
95
89
  var isArray = ArrCls.isArray;
96
- var isNumber = ( /*#__PURE__*/_createIs(NUMBER));
97
- var isBoolean = ( /*#__PURE__*/_createIs(BOOLEAN));
90
+ var isNumber = ( /*#__PURE__*/_createIs("number"));
91
+ var isBoolean = ( /*#__PURE__*/_createIs("boolean"));
98
92
  /*#__NO_SIDE_EFFECTS__*/
99
93
  function isPromiseLike(value) {
100
94
  return !!(value && value.then && isFunction(value.then));
@@ -191,6 +185,7 @@
191
185
 
192
186
  var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
193
187
  var _globalCfg;
188
+ /*#__NO_SIDE_EFFECTS__*/
194
189
  function _getGlobalValue() {
195
190
  var result;
196
191
  if (typeof globalThis !== UNDEFINED) {
@@ -225,7 +220,7 @@
225
220
  object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
226
221
  }
227
222
  try {
228
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
223
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
229
224
  propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
230
225
  }
231
226
  catch (e) {
@@ -234,18 +229,15 @@
234
229
  return objType + ": " + propertyValueDump;
235
230
  }
236
231
 
237
- var _slice;
238
- var _unwrapInstFunction = _unwrapFunctionWithPoly;
239
232
  var _unwrapFunction = _unwrapFunctionWithPoly;
240
233
  /*#__NO_SIDE_EFFECTS__*/
241
234
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
242
- _slice = _slice || ArrProto[SLICE];
243
235
  var clsFn = clsProto && clsProto[funcName];
244
236
  return function (thisArg) {
245
237
  var theFunc = (thisArg && thisArg[funcName]) || clsFn;
246
238
  if (theFunc || polyFunc) {
247
239
  var theArgs = arguments;
248
- return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
240
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
249
241
  }
250
242
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
251
243
  };
@@ -253,7 +245,7 @@
253
245
 
254
246
  var mathMax = MathCls.max;
255
247
 
256
- var strSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, StrProto));
248
+ var strSlice = ( /*#__PURE__*/_unwrapFunction("slice", StrProto));
257
249
 
258
250
  var strSubstring = ( /*#__PURE__*/_unwrapFunction("substring", StrProto));
259
251
  var strSubstr = ( /*#__PURE__*/_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
@@ -325,7 +317,7 @@
325
317
  var propMap = {
326
318
  e: "enumerable",
327
319
  c: "configurable",
328
- v: VALUE,
320
+ v: "value",
329
321
  w: "writable",
330
322
  g: "get",
331
323
  s: "set"
@@ -358,6 +350,7 @@
358
350
  function _initTestHooks() {
359
351
  _globalLazyTestHooks = _getGlobalConfig();
360
352
  }
353
+ /*#__NO_SIDE_EFFECTS__*/
361
354
  function getLazy(cb) {
362
355
  var lazyValue = {};
363
356
  !_globalLazyTestHooks && _initTestHooks();
@@ -395,10 +388,14 @@
395
388
 
396
389
  var WINDOW = "window";
397
390
  var _cachedGlobal;
398
- var _cachedWindow;
399
- var _cachedDocument;
400
- var _cachedNavigator;
401
- var _isNode;
391
+ function _getGlobalInstFn(getFn, theArgs) {
392
+ var cachedValue;
393
+ return function () {
394
+ !_globalLazyTestHooks && _initTestHooks();
395
+ (!cachedValue || _globalLazyTestHooks.lzy) && (cachedValue = createCachedValue(safe(getFn, theArgs).v));
396
+ return cachedValue.v;
397
+ };
398
+ }
402
399
  /*#__NO_SIDE_EFFECTS__*/
403
400
  function lazySafeGetInst(name) {
404
401
  return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
@@ -415,41 +412,25 @@
415
412
  if (gbl && gbl[name]) {
416
413
  return gbl[name];
417
414
  }
418
- if (name === WINDOW && _cachedWindow) {
419
- return _cachedWindow.v;
415
+ if (name === WINDOW) {
416
+ return getWindow();
420
417
  }
421
418
  return NULL_VALUE;
422
419
  }
423
- /*#__NO_SIDE_EFFECTS__*/
424
- function getDocument() {
425
- !_globalLazyTestHooks && _initTestHooks();
426
- (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
427
- return _cachedDocument.v;
428
- }
420
+ var getDocument = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["document"]));
429
421
  /*#__NO_SIDE_EFFECTS__*/
430
422
  function hasWindow() {
431
423
  return !!getWindow();
432
424
  }
433
- /*#__NO_SIDE_EFFECTS__*/
434
- function getWindow() {
435
- !_globalLazyTestHooks && _initTestHooks();
436
- (!_cachedWindow || _globalLazyTestHooks.lzy) && (_cachedWindow = createCachedValue(safe((getInst), [WINDOW]).v));
437
- return _cachedWindow.v;
438
- }
425
+ var getWindow = ( /*#__PURE__*/_getGlobalInstFn(getInst, [WINDOW]));
439
426
  /*#__NO_SIDE_EFFECTS__*/
440
427
  function hasNavigator() {
441
428
  return !!getNavigator();
442
429
  }
443
- /*#__NO_SIDE_EFFECTS__*/
444
- function getNavigator() {
445
- !_globalLazyTestHooks && _initTestHooks();
446
- (!_cachedNavigator || _globalLazyTestHooks.lzy) && (_cachedNavigator = createCachedValue(safe((getInst), ["navigator"]).v));
447
- return _cachedNavigator.v;
448
- }
449
- function isNode() {
450
- !_isNode && (_isNode = createCachedValue(!!safe(function () { return (process && (process.versions || {}).node); }).v));
451
- return _isNode.v;
452
- }
430
+ var getNavigator = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["navigator"]));
431
+ var isNode = ( /*#__PURE__*/_getGlobalInstFn(function () {
432
+ return !!safe(function () { return (process && (process.versions || {}).node); }).v;
433
+ }));
453
434
 
454
435
  var _symbol;
455
436
  var _symbolFor;
@@ -510,8 +491,8 @@
510
491
  var iterResult = void 0;
511
492
  try {
512
493
  var count = 0;
513
- while (!(iterResult = iter.next())[DONE]) {
514
- if (callbackfn[CALL](thisArg || iter, iterResult[VALUE], count, iter) === -1) {
494
+ while (!(iterResult = iter.next()).done) {
495
+ if (callbackfn[CALL](thisArg || iter, iterResult.value, count, iter) === -1) {
515
496
  break;
516
497
  }
517
498
  count++;
@@ -526,7 +507,7 @@
526
507
  }
527
508
  finally {
528
509
  try {
529
- if (iterResult && !iterResult[DONE]) {
510
+ if (iterResult && !iterResult.done) {
530
511
  iter.return && iter.return(iterResult);
531
512
  }
532
513
  }
@@ -540,7 +521,9 @@
540
521
  }
541
522
  }
542
523
 
543
- var fnApply = ( /*#__PURE__*/_unwrapInstFunction("apply"));
524
+ function fnApply(fn, thisArg, argArray) {
525
+ return fn.apply(thisArg, argArray);
526
+ }
544
527
 
545
528
  function arrAppend(target, elms) {
546
529
  if (!isUndefined(elms) && target) {
@@ -572,9 +555,11 @@
572
555
  }
573
556
  }
574
557
 
575
- var arrIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, ArrProto));
558
+ var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
576
559
 
577
- var arrSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, ArrProto));
560
+ function arrSlice(theArray, start, end) {
561
+ return ((theArray && theArray["slice"]) || ArrSlice).apply(theArray, ArrSlice[CALL](arguments, 1));
562
+ }
578
563
 
579
564
  var objCreate = ObjClass["create"] || polyObjCreate;
580
565
  /*#__NO_SIDE_EFFECTS__*/
@@ -604,6 +589,7 @@
604
589
  return fn(obj, proto);
605
590
  }
606
591
 
592
+ /*#__NO_SIDE_EFFECTS__*/
607
593
  function _createCustomError(name, d, b) {
608
594
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
609
595
  d = objSetPrototypeOf(d, b);
@@ -627,7 +613,7 @@
627
613
  var theArgs = arguments;
628
614
  try {
629
615
  safe(_setName, [theBaseClass, name]);
630
- var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
616
+ var _self = fnApply(theBaseClass, _this, ArrSlice[CALL](theArgs)) || _this;
631
617
  if (_self !== _this) {
632
618
  var orgProto = objGetPrototypeOf(_this);
633
619
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -707,7 +693,7 @@
707
693
  return utcNow();
708
694
  }
709
695
 
710
- var strIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, StrProto));
696
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
711
697
 
712
698
  var strStartsWith = ( /*#__PURE__*/_unwrapFunctionWithPoly("startsWith", StrProto, polyStrStartsWith));
713
699
  /*#__NO_SIDE_EFFECTS__*/
@@ -721,55 +707,51 @@
721
707
  }
722
708
 
723
709
  var REF = "ref";
724
- var UNREF = "un" + REF;
710
+ var UNREF = "unref";
725
711
  var HAS_REF = "hasRef";
726
712
  var ENABLED = "enabled";
713
+ /*#__NO_SIDE_EFFECTS__*/
727
714
  function _createTimerHandler(startTimer, refreshFn, cancelFn) {
728
- var _a;
729
715
  var ref = true;
730
716
  var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;
731
717
  var theTimerHandler;
732
- var _unref = function () {
718
+ function _unref() {
733
719
  ref = false;
734
720
  timerId && timerId[UNREF] && timerId[UNREF]();
735
721
  return theTimerHandler;
736
- };
737
- var _ref = function () {
738
- ref = true;
739
- timerId && timerId[REF] && timerId[REF]();
722
+ }
723
+ function _cancel() {
724
+ timerId && cancelFn(timerId);
725
+ timerId = NULL_VALUE;
726
+ }
727
+ function _refresh() {
728
+ timerId = refreshFn(timerId);
729
+ if (!ref) {
730
+ _unref();
731
+ }
740
732
  return theTimerHandler;
733
+ }
734
+ function _setEnabled(value) {
735
+ !value && timerId && _cancel();
736
+ value && !timerId && _refresh();
737
+ }
738
+ theTimerHandler = {
739
+ cancel: _cancel,
740
+ refresh: _refresh
741
741
  };
742
- var _hasRef = function () {
742
+ theTimerHandler[HAS_REF] = function () {
743
743
  if (timerId && timerId[HAS_REF]) {
744
744
  return timerId[HAS_REF]();
745
745
  }
746
746
  return ref;
747
747
  };
748
- var _refresh = function () {
749
- timerId = refreshFn(timerId);
750
- if (!ref) {
751
- _unref();
752
- }
748
+ theTimerHandler[REF] = function () {
749
+ ref = true;
750
+ timerId && timerId[REF] && timerId[REF]();
753
751
  return theTimerHandler;
754
752
  };
755
- var _cancel = function () {
756
- timerId && cancelFn(timerId);
757
- timerId = NULL_VALUE;
758
- };
759
- var _setEnabled = function (value) {
760
- !value && timerId && _cancel();
761
- value && !timerId && _refresh();
762
- };
763
- theTimerHandler = (_a = {
764
- cancel: _cancel,
765
- refresh: _refresh
766
- },
767
- _a[HAS_REF] = _hasRef,
768
- _a[REF] = _ref,
769
- _a[UNREF] = _unref,
770
- _a[ENABLED] = false,
771
- _a);
772
- objDefineProp(theTimerHandler, ENABLED, {
753
+ theTimerHandler[UNREF] = _unref;
754
+ theTimerHandler = objDefineProp(theTimerHandler, ENABLED, {
773
755
  get: function () { return !!timerId; },
774
756
  set: _setEnabled
775
757
  });
@@ -781,7 +763,7 @@
781
763
  };
782
764
  }
783
765
 
784
- function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
766
+ function _createTimeoutWith(startTimer, overrideFn, theArgs) {
785
767
  var isArr = isArray(overrideFn);
786
768
  var len = isArr ? overrideFn.length : 0;
787
769
  var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
@@ -789,7 +771,7 @@
789
771
  var timerFn = theArgs[0];
790
772
  theArgs[0] = function () {
791
773
  handler.dn();
792
- fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
774
+ fnApply(timerFn, UNDEF_VALUE, ArrSlice[CALL](arguments));
793
775
  };
794
776
  var handler = _createTimerHandler(startTimer, function (timerId) {
795
777
  if (timerId) {
@@ -797,19 +779,19 @@
797
779
  timerId.refresh();
798
780
  return timerId;
799
781
  }
800
- fnApply(clearFn, self, [timerId]);
782
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
801
783
  }
802
- return fnApply(setFn, self, theArgs);
784
+ return fnApply(setFn, UNDEF_VALUE, theArgs);
803
785
  }, function (timerId) {
804
- fnApply(clearFn, self, [timerId]);
786
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
805
787
  });
806
788
  return handler.h;
807
789
  }
808
790
  function scheduleTimeout(callback, timeout) {
809
- return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
791
+ return _createTimeoutWith(true, UNDEF_VALUE, ArrSlice[CALL](arguments));
810
792
  }
811
793
  function scheduleTimeoutWith(overrideFn, callback, timeout) {
812
- return _createTimeoutWith(this, true, overrideFn, ArrProto[SLICE][CALL](arguments, 1));
794
+ return _createTimeoutWith(true, overrideFn, ArrSlice[CALL](arguments, 1));
813
795
  }
814
796
 
815
797
  var strHasOwnProperty = "hasOwnProperty";
@@ -1121,7 +1103,7 @@
1121
1103
  var _DYN_NAME = "name";
1122
1104
  var _DYN_TIME = "time";
1123
1105
  var _DYN_PROCESS_NEXT = "processNext";
1124
- var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
1106
+ var _DYN_GET_PROCESS_TEL_CONT2 = "getProcessTelContext";
1125
1107
  var _DYN_UNLOAD = "unload";
1126
1108
  var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole";
1127
1109
  var _DYN_CREATE_NEW = "createNew";
@@ -1482,20 +1464,178 @@
1482
1464
  var STR_GET_PERF_MGR = "getPerfMgr";
1483
1465
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1484
1466
 
1485
- var _aiNamespace = null;
1486
- function _getExtensionNamespace() {
1487
- var target = getInst("Microsoft");
1488
- if (target) {
1489
- _aiNamespace = target["ApplicationInsights"];
1467
+ var rCamelCase = /-([a-z])/g;
1468
+ var rNormalizeInvalid = /([^\w\d_$])/g;
1469
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
1470
+ function isNotNullOrUndefined(value) {
1471
+ return !isNullOrUndefined(value);
1472
+ }
1473
+ function normalizeJsName(name) {
1474
+ var value = name;
1475
+ if (value && isString(value)) {
1476
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1477
+ return letter.toUpperCase();
1478
+ });
1479
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1480
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1481
+ return "_" + match;
1482
+ });
1490
1483
  }
1491
- return _aiNamespace;
1484
+ return value;
1492
1485
  }
1493
- function getDebugExt(config) {
1494
- var ns = _aiNamespace;
1495
- if (!ns && config.disableDbgExt !== true) {
1496
- ns = _aiNamespace || _getExtensionNamespace();
1486
+ function strContains(value, search) {
1487
+ if (value && search) {
1488
+ return strIndexOf(value, search) !== -1;
1497
1489
  }
1498
- return ns ? ns["ChromeDbgExt"] : null;
1490
+ return false;
1491
+ }
1492
+ function _createProxyFunction(source, funcName) {
1493
+ var srcFunc = null;
1494
+ var src = null;
1495
+ if (isFunction(source)) {
1496
+ srcFunc = source;
1497
+ }
1498
+ else {
1499
+ src = source;
1500
+ }
1501
+ return function () {
1502
+ var originalArguments = arguments;
1503
+ if (srcFunc) {
1504
+ src = srcFunc();
1505
+ }
1506
+ if (src) {
1507
+ return src[funcName][_DYN_APPLY ](src, originalArguments);
1508
+ }
1509
+ };
1510
+ }
1511
+ function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1512
+ if (target && name && source) {
1513
+ if (overwriteTarget !== false || isUndefined(target[name])) {
1514
+ target[name] = _createProxyFunction(source, theFunc);
1515
+ }
1516
+ }
1517
+ }
1518
+ function proxyFunctions(target, source, functionsToProxy, overwriteTarget) {
1519
+ if (target && source && isObject(target) && isArray(functionsToProxy)) {
1520
+ arrForEach(functionsToProxy, function (theFuncName) {
1521
+ if (isString(theFuncName)) {
1522
+ proxyFunctionAs(target, theFuncName, source, theFuncName, overwriteTarget);
1523
+ }
1524
+ });
1525
+ }
1526
+ return target;
1527
+ }
1528
+ function optimizeObject(theObject) {
1529
+ if (theObject && objAssign) {
1530
+ theObject = ObjClass$1(objAssign({}, theObject));
1531
+ }
1532
+ return theObject;
1533
+ }
1534
+ function getResponseText(xhr) {
1535
+ try {
1536
+ return xhr.responseText;
1537
+ }
1538
+ catch (e) {
1539
+ }
1540
+ return null;
1541
+ }
1542
+ function formatErrorMessageXdr(xdr, message) {
1543
+ if (xdr) {
1544
+ return "XDomainRequest,Response:" + getResponseText(xdr) || "";
1545
+ }
1546
+ return message;
1547
+ }
1548
+ function formatErrorMessageXhr(xhr, message) {
1549
+ if (xhr) {
1550
+ return "XMLHttpRequest,Status:" + xhr[_DYN_STATUS ] + ",Response:" + getResponseText(xhr) || xhr.response || "";
1551
+ }
1552
+ return message;
1553
+ }
1554
+ function prependTransports(theTransports, newTransports) {
1555
+ if (newTransports) {
1556
+ if (isNumber(newTransports)) {
1557
+ theTransports = [newTransports].concat(theTransports);
1558
+ }
1559
+ else if (isArray(newTransports)) {
1560
+ theTransports = newTransports.concat(theTransports);
1561
+ }
1562
+ }
1563
+ return theTransports;
1564
+ }
1565
+ var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
1566
+ var strWithCredentials = "withCredentials";
1567
+ var strTimeout = "timeout";
1568
+ function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {
1569
+ if (disabled === void 0) { disabled = false; }
1570
+ if (isSync === void 0) { isSync = false; }
1571
+ function _wrapSetXhrProp(xhr, prop, value) {
1572
+ try {
1573
+ xhr[prop] = value;
1574
+ }
1575
+ catch (e) {
1576
+ }
1577
+ }
1578
+ var xhr = new XMLHttpRequest();
1579
+ if (disabled) {
1580
+ _wrapSetXhrProp(xhr, strDisabledPropertyName, disabled);
1581
+ }
1582
+ if (withCredentials) {
1583
+ _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1584
+ }
1585
+ xhr.open(method, urlString, !isSync);
1586
+ if (withCredentials) {
1587
+ _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1588
+ }
1589
+ if (!isSync && timeout) {
1590
+ _wrapSetXhrProp(xhr, strTimeout, timeout);
1591
+ }
1592
+ return xhr;
1593
+ }
1594
+ function convertAllHeadersToMap(headersString) {
1595
+ var headers = {};
1596
+ if (isString(headersString)) {
1597
+ var headersArray = strTrim(headersString)[_DYN_SPLIT$1 ](/[\r\n]+/);
1598
+ arrForEach(headersArray, function (headerEntry) {
1599
+ if (headerEntry) {
1600
+ var idx = headerEntry.indexOf(": ");
1601
+ if (idx !== -1) {
1602
+ var header = strTrim(headerEntry.substring(0, idx))[_DYN_TO_LOWER_CASE$1 ]();
1603
+ var value = strTrim(headerEntry.substring(idx + 1));
1604
+ headers[header] = value;
1605
+ }
1606
+ else {
1607
+ headers[strTrim(headerEntry)] = 1;
1608
+ }
1609
+ }
1610
+ });
1611
+ }
1612
+ return headers;
1613
+ }
1614
+ function _appendHeader(theHeaders, xhr, name) {
1615
+ if (!theHeaders[name] && xhr && xhr[_DYN_GET_RESPONSE_HEADER ]) {
1616
+ var value = xhr[_DYN_GET_RESPONSE_HEADER ](name);
1617
+ if (value) {
1618
+ theHeaders[name] = strTrim(value);
1619
+ }
1620
+ }
1621
+ return theHeaders;
1622
+ }
1623
+ var STR_KILL_DURATION_HEADER$1 = "kill-duration";
1624
+ var STR_KILL_DURATION_SECONDS_HEADER = "kill-duration-seconds";
1625
+ var STR_TIME_DELTA_HEADER$1 = "time-delta-millis";
1626
+ function _getAllResponseHeaders(xhr, isOneDs) {
1627
+ var theHeaders = {};
1628
+ if (!xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]) {
1629
+ if (!!isOneDs) {
1630
+ theHeaders = _appendHeader(theHeaders, xhr, STR_TIME_DELTA_HEADER$1);
1631
+ theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_HEADER$1);
1632
+ theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_SECONDS_HEADER);
1633
+ }
1634
+ }
1635
+ else {
1636
+ theHeaders = convertAllHeadersToMap(xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]());
1637
+ }
1638
+ return theHeaders;
1499
1639
  }
1500
1640
 
1501
1641
  var strLocation = "location";
@@ -1625,365 +1765,6 @@
1625
1765
  return isSupported;
1626
1766
  }
1627
1767
 
1628
- var _a$3;
1629
- var STR_WARN_TO_CONSOLE = "warnToConsole";
1630
- var AiNonUserActionablePrefix = "AI (Internal): ";
1631
- var AiUserActionablePrefix = "AI: ";
1632
- var AIInternalMessagePrefix = "AITR_";
1633
- var defaultValues$1 = {
1634
- loggingLevelConsole: 0,
1635
- loggingLevelTelemetry: 1,
1636
- maxMessageLimit: 25,
1637
- enableDebug: false
1638
- };
1639
- var _logFuncs = (_a$3 = {},
1640
- _a$3[0 ] = null,
1641
- _a$3[1 ] = "errorToConsole",
1642
- _a$3[2 ] = STR_WARN_TO_CONSOLE,
1643
- _a$3[3 ] = "debugToConsole",
1644
- _a$3);
1645
- function _sanitizeDiagnosticText(text) {
1646
- if (text) {
1647
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY$3) + "\"";
1648
- }
1649
- return STR_EMPTY$3;
1650
- }
1651
- function _logToConsole(func, message) {
1652
- var theConsole = getConsole();
1653
- if (!!theConsole) {
1654
- var logFunc = "log";
1655
- if (theConsole[func]) {
1656
- logFunc = func;
1657
- }
1658
- if (isFunction(theConsole[logFunc])) {
1659
- theConsole[logFunc](message);
1660
- }
1661
- }
1662
- }
1663
- var _InternalLogMessage = /** @class */ (function () {
1664
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1665
- if (isUserAct === void 0) { isUserAct = false; }
1666
- var _self = this;
1667
- _self[_DYN_MESSAGE_ID ] = msgId;
1668
- _self[_DYN_MESSAGE ] =
1669
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1670
- msgId;
1671
- var strProps = STR_EMPTY$3;
1672
- if (hasJSON()) {
1673
- strProps = getJSON().stringify(properties);
1674
- }
1675
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY$3) +
1676
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY$3);
1677
- _self[_DYN_MESSAGE ] += diagnosticText;
1678
- }
1679
- _InternalLogMessage.dataType = "MessageData";
1680
- return _InternalLogMessage;
1681
- }());
1682
- function safeGetLogger(core, config) {
1683
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1684
- }
1685
- var DiagnosticLogger = /** @class */ (function () {
1686
- function DiagnosticLogger(config) {
1687
- this.identifier = "DiagnosticLogger";
1688
- this.queue = [];
1689
- var _messageCount = 0;
1690
- var _messageLogged = {};
1691
- var _loggingLevelConsole;
1692
- var _loggingLevelTelemetry;
1693
- var _maxInternalMessageLimit;
1694
- var _enableDebug;
1695
- var _unloadHandler;
1696
- dynamicProto(DiagnosticLogger, this, function (_self) {
1697
- _unloadHandler = _setDefaultsFromConfig(config || {});
1698
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1699
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1700
- if (isUserAct === void 0) { isUserAct = false; }
1701
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1702
- if (_enableDebug) {
1703
- throw dumpObj(message);
1704
- }
1705
- else {
1706
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1707
- if (!isUndefined(message[_DYN_MESSAGE ])) {
1708
- if (isUserAct) {
1709
- var messageKey = +message[_DYN_MESSAGE_ID ];
1710
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1711
- _self[logFunc](message[_DYN_MESSAGE ]);
1712
- _messageLogged[messageKey] = true;
1713
- }
1714
- }
1715
- else {
1716
- if (_loggingLevelConsole >= severity) {
1717
- _self[logFunc](message[_DYN_MESSAGE ]);
1718
- }
1719
- }
1720
- _logInternalMessage(severity, message);
1721
- }
1722
- else {
1723
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1724
- }
1725
- }
1726
- };
1727
- _self.debugToConsole = function (message) {
1728
- _logToConsole("debug", message);
1729
- _debugExtMsg("warning", message);
1730
- };
1731
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1732
- _logToConsole("warn", message);
1733
- _debugExtMsg("warning", message);
1734
- };
1735
- _self.errorToConsole = function (message) {
1736
- _logToConsole("error", message);
1737
- _debugExtMsg("error", message);
1738
- };
1739
- _self.resetInternalMessageCount = function () {
1740
- _messageCount = 0;
1741
- _messageLogged = {};
1742
- };
1743
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1744
- _self[_DYN_UNLOAD ] = function (isAsync) {
1745
- _unloadHandler && _unloadHandler.rm();
1746
- _unloadHandler = null;
1747
- };
1748
- function _logInternalMessage(severity, message) {
1749
- if (_areInternalMessagesThrottled()) {
1750
- return;
1751
- }
1752
- var logMessage = true;
1753
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1754
- if (_messageLogged[messageKey]) {
1755
- logMessage = false;
1756
- }
1757
- else {
1758
- _messageLogged[messageKey] = true;
1759
- }
1760
- if (logMessage) {
1761
- if (severity <= _loggingLevelTelemetry) {
1762
- _self.queue[_DYN_PUSH$1 ](message);
1763
- _messageCount++;
1764
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1765
- }
1766
- if (_messageCount === _maxInternalMessageLimit) {
1767
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1768
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1769
- _self.queue[_DYN_PUSH$1 ](throttleMessage);
1770
- if (severity === 1 ) {
1771
- _self.errorToConsole(throttleLimitMessage);
1772
- }
1773
- else {
1774
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1775
- }
1776
- }
1777
- }
1778
- }
1779
- function _setDefaultsFromConfig(config) {
1780
- return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
1781
- var config = details.cfg;
1782
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1783
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
1784
- _maxInternalMessageLimit = config.maxMessageLimit;
1785
- _enableDebug = config.enableDebug;
1786
- });
1787
- }
1788
- function _areInternalMessagesThrottled() {
1789
- return _messageCount >= _maxInternalMessageLimit;
1790
- }
1791
- function _debugExtMsg(name, data) {
1792
- var dbgExt = getDebugExt(config || {});
1793
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1794
- dbgExt[_DYN_DIAG_LOG ](name, data);
1795
- }
1796
- }
1797
- });
1798
- }
1799
- DiagnosticLogger.__ieDyn=1;
1800
- return DiagnosticLogger;
1801
- }());
1802
- function _getLogger(logger) {
1803
- return (logger || new DiagnosticLogger());
1804
- }
1805
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1806
- if (isUserAct === void 0) { isUserAct = false; }
1807
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1808
- }
1809
- function _warnToConsole(logger, message) {
1810
- _getLogger(logger)[_DYN_WARN_TO_CONSOLE ](message);
1811
- }
1812
-
1813
- var rCamelCase = /-([a-z])/g;
1814
- var rNormalizeInvalid = /([^\w\d_$])/g;
1815
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
1816
- function isNotNullOrUndefined(value) {
1817
- return !isNullOrUndefined(value);
1818
- }
1819
- function normalizeJsName(name) {
1820
- var value = name;
1821
- if (value && isString(value)) {
1822
- value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1823
- return letter.toUpperCase();
1824
- });
1825
- value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1826
- value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1827
- return "_" + match;
1828
- });
1829
- }
1830
- return value;
1831
- }
1832
- function strContains(value, search) {
1833
- if (value && search) {
1834
- return strIndexOf(value, search) !== -1;
1835
- }
1836
- return false;
1837
- }
1838
- function _createProxyFunction(source, funcName) {
1839
- var srcFunc = null;
1840
- var src = null;
1841
- if (isFunction(source)) {
1842
- srcFunc = source;
1843
- }
1844
- else {
1845
- src = source;
1846
- }
1847
- return function () {
1848
- var originalArguments = arguments;
1849
- if (srcFunc) {
1850
- src = srcFunc();
1851
- }
1852
- if (src) {
1853
- return src[funcName][_DYN_APPLY ](src, originalArguments);
1854
- }
1855
- };
1856
- }
1857
- function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1858
- if (target && name && source) {
1859
- if (overwriteTarget !== false || isUndefined(target[name])) {
1860
- target[name] = _createProxyFunction(source, theFunc);
1861
- }
1862
- }
1863
- }
1864
- function proxyFunctions(target, source, functionsToProxy, overwriteTarget) {
1865
- if (target && source && isObject(target) && isArray(functionsToProxy)) {
1866
- arrForEach(functionsToProxy, function (theFuncName) {
1867
- if (isString(theFuncName)) {
1868
- proxyFunctionAs(target, theFuncName, source, theFuncName, overwriteTarget);
1869
- }
1870
- });
1871
- }
1872
- return target;
1873
- }
1874
- function optimizeObject(theObject) {
1875
- if (theObject && objAssign) {
1876
- theObject = ObjClass$1(objAssign({}, theObject));
1877
- }
1878
- return theObject;
1879
- }
1880
- function getResponseText(xhr) {
1881
- try {
1882
- return xhr.responseText;
1883
- }
1884
- catch (e) {
1885
- }
1886
- return null;
1887
- }
1888
- function formatErrorMessageXdr(xdr, message) {
1889
- if (xdr) {
1890
- return "XDomainRequest,Response:" + getResponseText(xdr) || "";
1891
- }
1892
- return message;
1893
- }
1894
- function formatErrorMessageXhr(xhr, message) {
1895
- if (xhr) {
1896
- return "XMLHttpRequest,Status:" + xhr[_DYN_STATUS ] + ",Response:" + getResponseText(xhr) || xhr.response || "";
1897
- }
1898
- return message;
1899
- }
1900
- function prependTransports(theTransports, newTransports) {
1901
- if (newTransports) {
1902
- if (isNumber(newTransports)) {
1903
- theTransports = [newTransports].concat(theTransports);
1904
- }
1905
- else if (isArray(newTransports)) {
1906
- theTransports = newTransports.concat(theTransports);
1907
- }
1908
- }
1909
- return theTransports;
1910
- }
1911
- var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
1912
- var strWithCredentials = "withCredentials";
1913
- var strTimeout = "timeout";
1914
- function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {
1915
- if (disabled === void 0) { disabled = false; }
1916
- if (isSync === void 0) { isSync = false; }
1917
- function _wrapSetXhrProp(xhr, prop, value) {
1918
- try {
1919
- xhr[prop] = value;
1920
- }
1921
- catch (e) {
1922
- }
1923
- }
1924
- var xhr = new XMLHttpRequest();
1925
- if (disabled) {
1926
- _wrapSetXhrProp(xhr, strDisabledPropertyName, disabled);
1927
- }
1928
- if (withCredentials) {
1929
- _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1930
- }
1931
- xhr.open(method, urlString, !isSync);
1932
- if (withCredentials) {
1933
- _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1934
- }
1935
- if (!isSync && timeout) {
1936
- _wrapSetXhrProp(xhr, strTimeout, timeout);
1937
- }
1938
- return xhr;
1939
- }
1940
- function convertAllHeadersToMap(headersString) {
1941
- var headers = {};
1942
- if (isString(headersString)) {
1943
- var headersArray = strTrim(headersString)[_DYN_SPLIT$1 ](/[\r\n]+/);
1944
- arrForEach(headersArray, function (headerEntry) {
1945
- if (headerEntry) {
1946
- var idx = headerEntry.indexOf(": ");
1947
- if (idx !== -1) {
1948
- var header = strTrim(headerEntry.substring(0, idx))[_DYN_TO_LOWER_CASE$1 ]();
1949
- var value = strTrim(headerEntry.substring(idx + 1));
1950
- headers[header] = value;
1951
- }
1952
- else {
1953
- headers[strTrim(headerEntry)] = 1;
1954
- }
1955
- }
1956
- });
1957
- }
1958
- return headers;
1959
- }
1960
- function _appendHeader(theHeaders, xhr, name) {
1961
- if (!theHeaders[name] && xhr && xhr[_DYN_GET_RESPONSE_HEADER ]) {
1962
- var value = xhr[_DYN_GET_RESPONSE_HEADER ](name);
1963
- if (value) {
1964
- theHeaders[name] = strTrim(value);
1965
- }
1966
- }
1967
- return theHeaders;
1968
- }
1969
- var STR_KILL_DURATION_HEADER$1 = "kill-duration";
1970
- var STR_KILL_DURATION_SECONDS_HEADER = "kill-duration-seconds";
1971
- var STR_TIME_DELTA_HEADER$1 = "time-delta-millis";
1972
- function _getAllResponseHeaders(xhr, isOneDs) {
1973
- var theHeaders = {};
1974
- if (!xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]) {
1975
- if (!!isOneDs) {
1976
- theHeaders = _appendHeader(theHeaders, xhr, STR_TIME_DELTA_HEADER$1);
1977
- theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_HEADER$1);
1978
- theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_SECONDS_HEADER);
1979
- }
1980
- }
1981
- else {
1982
- theHeaders = convertAllHeadersToMap(xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]());
1983
- }
1984
- return theHeaders;
1985
- }
1986
-
1987
1768
  var UInt32Mask = 0x100000000;
1988
1769
  var MaxUInt32 = 0xffffffff;
1989
1770
  var SEED1 = 123456789;
@@ -2613,6 +2394,7 @@
2613
2394
  configHandler = null;
2614
2395
  }
2615
2396
  };
2397
+ objDefine(handler, "toJSON", { v: function () { return "WatcherHandler" + (handler.fn ? "" : "[X]"); } });
2616
2398
  state.use(handler, configHandler);
2617
2399
  return handler;
2618
2400
  }
@@ -2725,6 +2507,207 @@
2725
2507
 
2726
2508
  var DisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
2727
2509
 
2510
+ var _aiNamespace = null;
2511
+ function _getExtensionNamespace() {
2512
+ var target = getInst("Microsoft");
2513
+ if (target) {
2514
+ _aiNamespace = target["ApplicationInsights"];
2515
+ }
2516
+ return _aiNamespace;
2517
+ }
2518
+ function getDebugExt(config) {
2519
+ var ns = _aiNamespace;
2520
+ if (!ns && config.disableDbgExt !== true) {
2521
+ ns = _aiNamespace || _getExtensionNamespace();
2522
+ }
2523
+ return ns ? ns["ChromeDbgExt"] : null;
2524
+ }
2525
+
2526
+ var _a$3;
2527
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
2528
+ var AiNonUserActionablePrefix = "AI (Internal): ";
2529
+ var AiUserActionablePrefix = "AI: ";
2530
+ var AIInternalMessagePrefix = "AITR_";
2531
+ var defaultValues$1 = {
2532
+ loggingLevelConsole: 0,
2533
+ loggingLevelTelemetry: 1,
2534
+ maxMessageLimit: 25,
2535
+ enableDebug: false
2536
+ };
2537
+ var _logFuncs = (_a$3 = {},
2538
+ _a$3[0 ] = null,
2539
+ _a$3[1 ] = "errorToConsole",
2540
+ _a$3[2 ] = STR_WARN_TO_CONSOLE,
2541
+ _a$3[3 ] = "debugToConsole",
2542
+ _a$3);
2543
+ function _sanitizeDiagnosticText(text) {
2544
+ if (text) {
2545
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY$3) + "\"";
2546
+ }
2547
+ return STR_EMPTY$3;
2548
+ }
2549
+ function _logToConsole(func, message) {
2550
+ var theConsole = getConsole();
2551
+ if (!!theConsole) {
2552
+ var logFunc = "log";
2553
+ if (theConsole[func]) {
2554
+ logFunc = func;
2555
+ }
2556
+ if (isFunction(theConsole[logFunc])) {
2557
+ theConsole[logFunc](message);
2558
+ }
2559
+ }
2560
+ }
2561
+ var _InternalLogMessage = /** @class */ (function () {
2562
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
2563
+ if (isUserAct === void 0) { isUserAct = false; }
2564
+ var _self = this;
2565
+ _self[_DYN_MESSAGE_ID ] = msgId;
2566
+ _self[_DYN_MESSAGE ] =
2567
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
2568
+ msgId;
2569
+ var strProps = STR_EMPTY$3;
2570
+ if (hasJSON()) {
2571
+ strProps = getJSON().stringify(properties);
2572
+ }
2573
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY$3) +
2574
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY$3);
2575
+ _self[_DYN_MESSAGE ] += diagnosticText;
2576
+ }
2577
+ _InternalLogMessage.dataType = "MessageData";
2578
+ return _InternalLogMessage;
2579
+ }());
2580
+ function safeGetLogger(core, config) {
2581
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
2582
+ }
2583
+ var DiagnosticLogger = /** @class */ (function () {
2584
+ function DiagnosticLogger(config) {
2585
+ this.identifier = "DiagnosticLogger";
2586
+ this.queue = [];
2587
+ var _messageCount = 0;
2588
+ var _messageLogged = {};
2589
+ var _loggingLevelConsole;
2590
+ var _loggingLevelTelemetry;
2591
+ var _maxInternalMessageLimit;
2592
+ var _enableDebug;
2593
+ var _unloadHandler;
2594
+ dynamicProto(DiagnosticLogger, this, function (_self) {
2595
+ _unloadHandler = _setDefaultsFromConfig(config || {});
2596
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2597
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2598
+ if (isUserAct === void 0) { isUserAct = false; }
2599
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2600
+ if (_enableDebug) {
2601
+ throw dumpObj(message);
2602
+ }
2603
+ else {
2604
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2605
+ if (!isUndefined(message[_DYN_MESSAGE ])) {
2606
+ if (isUserAct) {
2607
+ var messageKey = +message[_DYN_MESSAGE_ID ];
2608
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2609
+ _self[logFunc](message[_DYN_MESSAGE ]);
2610
+ _messageLogged[messageKey] = true;
2611
+ }
2612
+ }
2613
+ else {
2614
+ if (_loggingLevelConsole >= severity) {
2615
+ _self[logFunc](message[_DYN_MESSAGE ]);
2616
+ }
2617
+ }
2618
+ _logInternalMessage(severity, message);
2619
+ }
2620
+ else {
2621
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2622
+ }
2623
+ }
2624
+ };
2625
+ _self.debugToConsole = function (message) {
2626
+ _logToConsole("debug", message);
2627
+ _debugExtMsg("warning", message);
2628
+ };
2629
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2630
+ _logToConsole("warn", message);
2631
+ _debugExtMsg("warning", message);
2632
+ };
2633
+ _self.errorToConsole = function (message) {
2634
+ _logToConsole("error", message);
2635
+ _debugExtMsg("error", message);
2636
+ };
2637
+ _self.resetInternalMessageCount = function () {
2638
+ _messageCount = 0;
2639
+ _messageLogged = {};
2640
+ };
2641
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2642
+ _self[_DYN_UNLOAD ] = function (isAsync) {
2643
+ _unloadHandler && _unloadHandler.rm();
2644
+ _unloadHandler = null;
2645
+ };
2646
+ function _logInternalMessage(severity, message) {
2647
+ if (_areInternalMessagesThrottled()) {
2648
+ return;
2649
+ }
2650
+ var logMessage = true;
2651
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2652
+ if (_messageLogged[messageKey]) {
2653
+ logMessage = false;
2654
+ }
2655
+ else {
2656
+ _messageLogged[messageKey] = true;
2657
+ }
2658
+ if (logMessage) {
2659
+ if (severity <= _loggingLevelTelemetry) {
2660
+ _self.queue[_DYN_PUSH$1 ](message);
2661
+ _messageCount++;
2662
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2663
+ }
2664
+ if (_messageCount === _maxInternalMessageLimit) {
2665
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2666
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2667
+ _self.queue[_DYN_PUSH$1 ](throttleMessage);
2668
+ if (severity === 1 ) {
2669
+ _self.errorToConsole(throttleLimitMessage);
2670
+ }
2671
+ else {
2672
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2673
+ }
2674
+ }
2675
+ }
2676
+ }
2677
+ function _setDefaultsFromConfig(config) {
2678
+ return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
2679
+ var config = details.cfg;
2680
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2681
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
2682
+ _maxInternalMessageLimit = config.maxMessageLimit;
2683
+ _enableDebug = config.enableDebug;
2684
+ });
2685
+ }
2686
+ function _areInternalMessagesThrottled() {
2687
+ return _messageCount >= _maxInternalMessageLimit;
2688
+ }
2689
+ function _debugExtMsg(name, data) {
2690
+ var dbgExt = getDebugExt(config || {});
2691
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2692
+ dbgExt[_DYN_DIAG_LOG ](name, data);
2693
+ }
2694
+ }
2695
+ });
2696
+ }
2697
+ DiagnosticLogger.__ieDyn=1;
2698
+ return DiagnosticLogger;
2699
+ }());
2700
+ function _getLogger(logger) {
2701
+ return (logger || new DiagnosticLogger());
2702
+ }
2703
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2704
+ if (isUserAct === void 0) { isUserAct = false; }
2705
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2706
+ }
2707
+ function _warnToConsole(logger, message) {
2708
+ _getLogger(logger)[_DYN_WARN_TO_CONSOLE ](message);
2709
+ }
2710
+
2728
2711
  var strExecutionContextKey = "ctx";
2729
2712
  var strParentContextKey = "ParentContextKey";
2730
2713
  var strChildrenContextKey = "ChildrenContextKey";
@@ -3370,7 +3353,7 @@
3370
3353
  function _setDefaults(config, core, pluginChain) {
3371
3354
  createDynamicConfig(config, defaultValues, safeGetLogger(core));
3372
3355
  if (!pluginChain && core) {
3373
- pluginChain = core[_DYN_GET_PROCESS_TEL_CONT0 ]()[_DYN_GET_NEXT ]();
3356
+ pluginChain = core[_DYN_GET_PROCESS_TEL_CONT2 ]()[_DYN_GET_NEXT ]();
3374
3357
  }
3375
3358
  var nextPlugin = _nextPlugin;
3376
3359
  if (_nextPlugin && _nextPlugin[strGetPlugin]) {
@@ -4115,7 +4098,7 @@
4115
4098
  var _DYN_PROCESS_TELEMETRY_ST0 = "processTelemetryStart";
4116
4099
 
4117
4100
  var _a$1;
4118
- var Version = '4.1.1';
4101
+ var Version = '4.1.2';
4119
4102
  var FullVersionString = "1DS-Web-JS-" + Version;
4120
4103
  var ObjHasOwnProperty = ObjProto$1.hasOwnProperty;
4121
4104
  var _fieldTypeEventPropMap = (_a$1 = {},
@@ -5756,7 +5739,7 @@
5756
5739
  var _this = _super.call(this) || this;
5757
5740
  _this.identifier = "PostChannel";
5758
5741
  _this.priority = 1011;
5759
- _this.version = '4.1.1';
5742
+ _this.version = '4.1.2';
5760
5743
  var _postConfig;
5761
5744
  var _isTeardownCalled = false;
5762
5745
  var _flushCallbackQueue = [];