@microsoft/applicationinsights-common 3.1.1-nightly3.2403-04 → 3.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 (97) hide show
  1. package/browser/es5/applicationinsights-common.cjs.js +394 -409
  2. package/browser/es5/applicationinsights-common.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-common.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-common.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-common.gbl.js +396 -411
  6. package/browser/es5/applicationinsights-common.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-common.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-common.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-common.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-common.js +396 -411
  11. package/browser/es5/applicationinsights-common.js.map +1 -1
  12. package/browser/es5/applicationinsights-common.min.js +2 -2
  13. package/browser/es5/applicationinsights-common.min.js.map +1 -1
  14. package/dist/es5/applicationinsights-common.js +394 -409
  15. package/dist/es5/applicationinsights-common.js.map +1 -1
  16. package/dist/es5/applicationinsights-common.min.js +2 -2
  17. package/dist/es5/applicationinsights-common.min.js.map +1 -1
  18. package/dist-es5/ConnectionStringParser.js +1 -1
  19. package/dist-es5/Constants.js +1 -1
  20. package/dist-es5/DomHelperFuncs.js +1 -1
  21. package/dist-es5/Enums.js +1 -1
  22. package/dist-es5/HelperFuncs.js +1 -1
  23. package/dist-es5/Interfaces/ConnectionString.js +1 -1
  24. package/dist-es5/Interfaces/Context/IApplication.js +1 -1
  25. package/dist-es5/Interfaces/Context/IDevice.js +1 -1
  26. package/dist-es5/Interfaces/Context/IInternal.js +1 -1
  27. package/dist-es5/Interfaces/Context/ILocation.js +1 -1
  28. package/dist-es5/Interfaces/Context/IOperatingSystem.js +1 -1
  29. package/dist-es5/Interfaces/Context/ISample.js +1 -1
  30. package/dist-es5/Interfaces/Context/ISession.js +1 -1
  31. package/dist-es5/Interfaces/Context/ISessionManager.js +1 -1
  32. package/dist-es5/Interfaces/Context/ITelemetryTrace.js +1 -1
  33. package/dist-es5/Interfaces/Context/IUser.js +1 -1
  34. package/dist-es5/Interfaces/Context/IWeb.js +1 -1
  35. package/dist-es5/Interfaces/Contracts/AvailabilityData.js +1 -1
  36. package/dist-es5/Interfaces/Contracts/ContextTagKeys.js +1 -1
  37. package/dist-es5/Interfaces/Contracts/DataPointType.js +1 -1
  38. package/dist-es5/Interfaces/Contracts/DependencyKind.js +1 -1
  39. package/dist-es5/Interfaces/Contracts/DependencySourceType.js +1 -1
  40. package/dist-es5/Interfaces/Contracts/IBase.js +1 -1
  41. package/dist-es5/Interfaces/Contracts/IData.js +1 -1
  42. package/dist-es5/Interfaces/Contracts/IDataPoint.js +1 -1
  43. package/dist-es5/Interfaces/Contracts/IDomain.js +1 -1
  44. package/dist-es5/Interfaces/Contracts/IEnvelope.js +1 -1
  45. package/dist-es5/Interfaces/Contracts/IEventData.js +1 -1
  46. package/dist-es5/Interfaces/Contracts/IExceptionData.js +1 -1
  47. package/dist-es5/Interfaces/Contracts/IExceptionDetails.js +1 -1
  48. package/dist-es5/Interfaces/Contracts/IMessageData.js +1 -1
  49. package/dist-es5/Interfaces/Contracts/IMetricData.js +1 -1
  50. package/dist-es5/Interfaces/Contracts/IPageViewData.js +1 -1
  51. package/dist-es5/Interfaces/Contracts/IPageViewPerfData.js +1 -1
  52. package/dist-es5/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
  53. package/dist-es5/Interfaces/Contracts/IStackFrame.js +1 -1
  54. package/dist-es5/Interfaces/Contracts/RequestData.js +1 -1
  55. package/dist-es5/Interfaces/Contracts/SeverityLevel.js +1 -1
  56. package/dist-es5/Interfaces/IAppInsights.js +1 -1
  57. package/dist-es5/Interfaces/IConfig.js +1 -1
  58. package/dist-es5/Interfaces/ICorrelationConfig.js +1 -1
  59. package/dist-es5/Interfaces/IDependencyTelemetry.js +1 -1
  60. package/dist-es5/Interfaces/IEventTelemetry.js +1 -1
  61. package/dist-es5/Interfaces/IExceptionTelemetry.js +1 -1
  62. package/dist-es5/Interfaces/IMetricTelemetry.js +1 -1
  63. package/dist-es5/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  64. package/dist-es5/Interfaces/IPageViewTelemetry.js +1 -1
  65. package/dist-es5/Interfaces/IPartC.js +1 -1
  66. package/dist-es5/Interfaces/IPropertiesPlugin.js +1 -1
  67. package/dist-es5/Interfaces/IRequestContext.js +1 -1
  68. package/dist-es5/Interfaces/IStorageBuffer.js +1 -1
  69. package/dist-es5/Interfaces/ITelemetryContext.js +1 -1
  70. package/dist-es5/Interfaces/IThrottleMgr.js +1 -1
  71. package/dist-es5/Interfaces/ITraceTelemetry.js +1 -1
  72. package/dist-es5/Interfaces/PartAExtensions.js +1 -1
  73. package/dist-es5/Interfaces/Telemetry/IEnvelope.js +1 -1
  74. package/dist-es5/Interfaces/Telemetry/ISerializable.js +1 -1
  75. package/dist-es5/Offline.js +1 -1
  76. package/dist-es5/RequestResponseHeaders.js +1 -1
  77. package/dist-es5/StorageHelperFuncs.js +1 -1
  78. package/dist-es5/Telemetry/Common/Data.js +1 -1
  79. package/dist-es5/Telemetry/Common/DataPoint.js +1 -1
  80. package/dist-es5/Telemetry/Common/DataSanitizer.js +1 -1
  81. package/dist-es5/Telemetry/Common/Envelope.js +1 -1
  82. package/dist-es5/Telemetry/Event.js +1 -1
  83. package/dist-es5/Telemetry/Exception.js +1 -1
  84. package/dist-es5/Telemetry/Metric.js +1 -1
  85. package/dist-es5/Telemetry/PageView.js +1 -1
  86. package/dist-es5/Telemetry/PageViewPerformance.js +1 -1
  87. package/dist-es5/Telemetry/RemoteDependencyData.js +1 -1
  88. package/dist-es5/Telemetry/Trace.js +1 -1
  89. package/dist-es5/TelemetryItemCreator.js +1 -1
  90. package/dist-es5/ThrottleMgr.js +1 -1
  91. package/dist-es5/UrlHelperFuncs.js +1 -1
  92. package/dist-es5/Util.js +1 -1
  93. package/dist-es5/__DynamicConstants.js +1 -1
  94. package/dist-es5/applicationinsights-common.js +1 -1
  95. package/package.json +63 -66
  96. package/types/applicationinsights-common.d.ts +1 -1
  97. package/types/applicationinsights-common.namespaced.d.ts +2 -1
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Common, 3.1.1-nightly3.2403-04
2
+ * Application Insights JavaScript SDK - Common, 3.1.2
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
6
6
  var undef = "undefined";
7
- var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_common_3_1_1_nightly3_2403_04", msMod="__ms$mod__";
8
- var mods={}, modDetail=mods[modName]={}, ver="3.1.1-nightly3.2403-04";
7
+ var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_common_3_1_2", msMod="__ms$mod__";
8
+ var mods={}, modDetail=mods[modName]={}, ver="3.1.2";
9
9
  var baseNs=global, nsKey="Microsoft", baseNs=baseNs[nsKey]=(baseNs[nsKey]||{});
10
10
  // Versioned namespace "Microsoft.ApplicationInsights3"
11
11
  var exportNs=baseNs, nsKey="ApplicationInsights3", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
@@ -30,20 +30,15 @@ var UNDEF_VALUE = undefined;
30
30
  var NULL_VALUE = null;
31
31
  var EMPTY = "";
32
32
  var FUNCTION = "function";
33
- var NUMBER = "number";
34
33
  var OBJECT = "object";
35
34
  var PROTOTYPE = "prototype";
36
35
  var __PROTO__ = "__proto__";
37
- var STRING = "string";
38
36
  var UNDEFINED = "undefined";
39
37
  var CONSTRUCTOR = "constructor";
40
38
  var SYMBOL = "Symbol";
41
39
  var POLYFILL_TAG = "_polyfill";
42
- var INDEX_OF = "indexOf";
43
40
  var LENGTH = "length";
44
- var VALUE = "value";
45
41
  var NAME = "name";
46
- var SLICE = "slice";
47
42
  var CALL = "call";
48
43
  var TO_STRING = "toString";
49
44
  var ObjClass$1 = Object;
@@ -53,6 +48,7 @@ var StrProto = StrCls[PROTOTYPE];
53
48
  var MathCls = Math;
54
49
  var ArrCls = Array;
55
50
  var ArrProto = ArrCls[PROTOTYPE];
51
+ var ArrSlice = ArrProto["slice"];
56
52
 
57
53
  function safe(func, argArray) {
58
54
  try {
@@ -94,7 +90,7 @@ function isNullOrUndefined(value) {
94
90
  function isDefined(arg) {
95
91
  return !!arg || arg !== UNDEF_VALUE;
96
92
  }
97
- var isString = ( /*#__PURE__*/_createIs(STRING));
93
+ var isString = ( /*#__PURE__*/_createIs("string"));
98
94
  var isFunction = ( /*#__PURE__*/_createIs(FUNCTION));
99
95
  /*#__NO_SIDE_EFFECTS__*/
100
96
  function isObject(value) {
@@ -193,6 +189,7 @@ var asString = StrCls;
193
189
 
194
190
  var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
195
191
  var _globalCfg;
192
+ /*#__NO_SIDE_EFFECTS__*/
196
193
  function _getGlobalValue() {
197
194
  var result;
198
195
  if (typeof globalThis !== UNDEFINED) {
@@ -227,7 +224,7 @@ function dumpObj(object, format) {
227
224
  object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
228
225
  }
229
226
  try {
230
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
227
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
231
228
  propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
232
229
  }
233
230
  catch (e) {
@@ -236,18 +233,15 @@ function dumpObj(object, format) {
236
233
  return objType + ": " + propertyValueDump;
237
234
  }
238
235
 
239
- var _slice;
240
- var _unwrapInstFunction = _unwrapFunctionWithPoly;
241
236
  var _unwrapFunction = _unwrapFunctionWithPoly;
242
237
  /*#__NO_SIDE_EFFECTS__*/
243
238
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
244
- _slice = _slice || ArrProto[SLICE];
245
239
  var clsFn = clsProto && clsProto[funcName];
246
240
  return function (thisArg) {
247
241
  var theFunc = (thisArg && thisArg[funcName]) || clsFn;
248
242
  if (theFunc || polyFunc) {
249
243
  var theArgs = arguments;
250
- return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
244
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
251
245
  }
252
246
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
253
247
  };
@@ -255,7 +249,7 @@ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
255
249
 
256
250
  var mathMax = MathCls.max;
257
251
 
258
- var strSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, StrProto));
252
+ var strSlice = ( /*#__PURE__*/_unwrapFunction("slice", StrProto));
259
253
 
260
254
  var strSubstring = ( /*#__PURE__*/_unwrapFunction("substring", StrProto));
261
255
  var strSubstr = ( /*#__PURE__*/_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
@@ -316,7 +310,7 @@ function polySymbolFor(key) {
316
310
  var propMap = {
317
311
  e: "enumerable",
318
312
  c: "configurable",
319
- v: VALUE,
313
+ v: "value",
320
314
  w: "writable",
321
315
  g: "get",
322
316
  s: "set"
@@ -349,6 +343,7 @@ var _globalLazyTestHooks;
349
343
  function _initTestHooks() {
350
344
  _globalLazyTestHooks = _getGlobalConfig();
351
345
  }
346
+ /*#__NO_SIDE_EFFECTS__*/
352
347
  function getLazy(cb) {
353
348
  var lazyValue = {};
354
349
  !_globalLazyTestHooks && _initTestHooks();
@@ -386,9 +381,14 @@ function createCachedValue(value) {
386
381
 
387
382
  var WINDOW = "window";
388
383
  var _cachedGlobal;
389
- var _cachedWindow;
390
- var _cachedDocument;
391
- var _cachedNavigator;
384
+ function _getGlobalInstFn(getFn, theArgs) {
385
+ var cachedValue;
386
+ return function () {
387
+ !_globalLazyTestHooks && _initTestHooks();
388
+ (!cachedValue || _globalLazyTestHooks.lzy) && (cachedValue = createCachedValue(safe(getFn, theArgs).v));
389
+ return cachedValue.v;
390
+ };
391
+ }
392
392
  /*#__NO_SIDE_EFFECTS__*/
393
393
  function lazySafeGetInst(name) {
394
394
  return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
@@ -405,37 +405,22 @@ function getInst(name, useCached) {
405
405
  if (gbl && gbl[name]) {
406
406
  return gbl[name];
407
407
  }
408
- if (name === WINDOW && _cachedWindow) {
409
- return _cachedWindow.v;
408
+ if (name === WINDOW) {
409
+ return getWindow();
410
410
  }
411
411
  return NULL_VALUE;
412
412
  }
413
- /*#__NO_SIDE_EFFECTS__*/
414
- function getDocument() {
415
- !_globalLazyTestHooks && _initTestHooks();
416
- (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
417
- return _cachedDocument.v;
418
- }
413
+ var getDocument = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["document"]));
419
414
  /*#__NO_SIDE_EFFECTS__*/
420
415
  function hasWindow() {
421
416
  return !!getWindow();
422
417
  }
423
- /*#__NO_SIDE_EFFECTS__*/
424
- function getWindow() {
425
- !_globalLazyTestHooks && _initTestHooks();
426
- (!_cachedWindow || _globalLazyTestHooks.lzy) && (_cachedWindow = createCachedValue(safe((getInst), [WINDOW]).v));
427
- return _cachedWindow.v;
428
- }
418
+ var getWindow = ( /*#__PURE__*/_getGlobalInstFn(getInst, [WINDOW]));
429
419
  /*#__NO_SIDE_EFFECTS__*/
430
420
  function hasNavigator() {
431
421
  return !!getNavigator();
432
422
  }
433
- /*#__NO_SIDE_EFFECTS__*/
434
- function getNavigator() {
435
- !_globalLazyTestHooks && _initTestHooks();
436
- (!_cachedNavigator || _globalLazyTestHooks.lzy) && (_cachedNavigator = createCachedValue(safe((getInst), ["navigator"]).v));
437
- return _cachedNavigator.v;
438
- }
423
+ var getNavigator = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["navigator"]));
439
424
 
440
425
  var _symbol;
441
426
  var _symbolFor;
@@ -458,7 +443,9 @@ function symbolFor(key) {
458
443
  return (_symbolFor.v || polySymbolFor)(key);
459
444
  }
460
445
 
461
- var fnApply = ( /*#__PURE__*/_unwrapInstFunction("apply"));
446
+ function fnApply(fn, thisArg, argArray) {
447
+ return fn.apply(thisArg, argArray);
448
+ }
462
449
 
463
450
  function arrForEach(theArray, callbackfn, thisArg) {
464
451
  if (theArray) {
@@ -473,7 +460,7 @@ function arrForEach(theArray, callbackfn, thisArg) {
473
460
  }
474
461
  }
475
462
 
476
- var arrIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, ArrProto));
463
+ var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
477
464
 
478
465
  var arrMap = ( /*#__PURE__*/_unwrapFunction("map", ArrProto));
479
466
 
@@ -507,6 +494,7 @@ function objSetPrototypeOf(obj, proto) {
507
494
  return fn(obj, proto);
508
495
  }
509
496
 
497
+ /*#__NO_SIDE_EFFECTS__*/
510
498
  function _createCustomError(name, d, b) {
511
499
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
512
500
  d = objSetPrototypeOf(d, b);
@@ -530,7 +518,7 @@ function createCustomError(name, constructCb, errorBase) {
530
518
  var theArgs = arguments;
531
519
  try {
532
520
  safe(_setName, [theBaseClass, name]);
533
- var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
521
+ var _self = fnApply(theBaseClass, _this, ArrSlice[CALL](theArgs)) || _this;
534
522
  if (_self !== _this) {
535
523
  var orgProto = objGetPrototypeOf(_this);
536
524
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -624,58 +612,54 @@ function polyStrEndsWith(value, searchString, length) {
624
612
  return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
625
613
  }
626
614
 
627
- var strIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, StrProto));
615
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
628
616
 
629
617
  var REF = "ref";
630
- var UNREF = "un" + REF;
618
+ var UNREF = "unref";
631
619
  var HAS_REF = "hasRef";
632
620
  var ENABLED = "enabled";
621
+ /*#__NO_SIDE_EFFECTS__*/
633
622
  function _createTimerHandler(startTimer, refreshFn, cancelFn) {
634
- var _a;
635
623
  var ref = true;
636
624
  var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;
637
625
  var theTimerHandler;
638
- var _unref = function () {
626
+ function _unref() {
639
627
  ref = false;
640
628
  timerId && timerId[UNREF] && timerId[UNREF]();
641
629
  return theTimerHandler;
642
- };
643
- var _ref = function () {
644
- ref = true;
645
- timerId && timerId[REF] && timerId[REF]();
630
+ }
631
+ function _cancel() {
632
+ timerId && cancelFn(timerId);
633
+ timerId = NULL_VALUE;
634
+ }
635
+ function _refresh() {
636
+ timerId = refreshFn(timerId);
637
+ if (!ref) {
638
+ _unref();
639
+ }
646
640
  return theTimerHandler;
641
+ }
642
+ function _setEnabled(value) {
643
+ !value && timerId && _cancel();
644
+ value && !timerId && _refresh();
645
+ }
646
+ theTimerHandler = {
647
+ cancel: _cancel,
648
+ refresh: _refresh
647
649
  };
648
- var _hasRef = function () {
650
+ theTimerHandler[HAS_REF] = function () {
649
651
  if (timerId && timerId[HAS_REF]) {
650
652
  return timerId[HAS_REF]();
651
653
  }
652
654
  return ref;
653
655
  };
654
- var _refresh = function () {
655
- timerId = refreshFn(timerId);
656
- if (!ref) {
657
- _unref();
658
- }
656
+ theTimerHandler[REF] = function () {
657
+ ref = true;
658
+ timerId && timerId[REF] && timerId[REF]();
659
659
  return theTimerHandler;
660
660
  };
661
- var _cancel = function () {
662
- timerId && cancelFn(timerId);
663
- timerId = NULL_VALUE;
664
- };
665
- var _setEnabled = function (value) {
666
- !value && timerId && _cancel();
667
- value && !timerId && _refresh();
668
- };
669
- theTimerHandler = (_a = {
670
- cancel: _cancel,
671
- refresh: _refresh
672
- },
673
- _a[HAS_REF] = _hasRef,
674
- _a[REF] = _ref,
675
- _a[UNREF] = _unref,
676
- _a[ENABLED] = false,
677
- _a);
678
- objDefineProp(theTimerHandler, ENABLED, {
661
+ theTimerHandler[UNREF] = _unref;
662
+ theTimerHandler = objDefineProp(theTimerHandler, ENABLED, {
679
663
  get: function () { return !!timerId; },
680
664
  set: _setEnabled
681
665
  });
@@ -687,7 +671,7 @@ function _createTimerHandler(startTimer, refreshFn, cancelFn) {
687
671
  };
688
672
  }
689
673
 
690
- function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
674
+ function _createTimeoutWith(startTimer, overrideFn, theArgs) {
691
675
  var isArr = isArray(overrideFn);
692
676
  var len = isArr ? overrideFn.length : 0;
693
677
  var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
@@ -695,7 +679,7 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
695
679
  var timerFn = theArgs[0];
696
680
  theArgs[0] = function () {
697
681
  handler.dn();
698
- fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
682
+ fnApply(timerFn, UNDEF_VALUE, ArrSlice[CALL](arguments));
699
683
  };
700
684
  var handler = _createTimerHandler(startTimer, function (timerId) {
701
685
  if (timerId) {
@@ -703,16 +687,16 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
703
687
  timerId.refresh();
704
688
  return timerId;
705
689
  }
706
- fnApply(clearFn, self, [timerId]);
690
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
707
691
  }
708
- return fnApply(setFn, self, theArgs);
692
+ return fnApply(setFn, UNDEF_VALUE, theArgs);
709
693
  }, function (timerId) {
710
- fnApply(clearFn, self, [timerId]);
694
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
711
695
  });
712
696
  return handler.h;
713
697
  }
714
698
  function scheduleTimeout(callback, timeout) {
715
- return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
699
+ return _createTimeoutWith(true, UNDEF_VALUE, ArrSlice[CALL](arguments));
716
700
  }
717
701
 
718
702
  var createEnumStyle = createEnum;
@@ -1066,20 +1050,52 @@ var UNDEFINED_VALUE = undefined;
1066
1050
  var STR_EMPTY = "";
1067
1051
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1068
1052
 
1069
- var _aiNamespace = null;
1070
- function _getExtensionNamespace() {
1071
- var target = getInst("Microsoft");
1072
- if (target) {
1073
- _aiNamespace = target["ApplicationInsights"];
1053
+ var rCamelCase = /-([a-z])/g;
1054
+ var rNormalizeInvalid = /([^\w\d_$])/g;
1055
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
1056
+ function isNotNullOrUndefined(value) {
1057
+ return !isNullOrUndefined(value);
1058
+ }
1059
+ function normalizeJsName(name) {
1060
+ var value = name;
1061
+ if (value && isString(value)) {
1062
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1063
+ return letter.toUpperCase();
1064
+ });
1065
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1066
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1067
+ return "_" + match;
1068
+ });
1074
1069
  }
1075
- return _aiNamespace;
1070
+ return value;
1076
1071
  }
1077
- function getDebugExt(config) {
1078
- var ns = _aiNamespace;
1079
- if (!ns && config.disableDbgExt !== true) {
1080
- ns = _aiNamespace || _getExtensionNamespace();
1072
+ function strContains(value, search) {
1073
+ if (value && search) {
1074
+ return strIndexOf(value, search) !== -1;
1081
1075
  }
1082
- return ns ? ns["ChromeDbgExt"] : null;
1076
+ return false;
1077
+ }
1078
+ function toISOString(date) {
1079
+ return date && date.toISOString() || "";
1080
+ }
1081
+ function getExceptionName(object) {
1082
+ if (isError(object)) {
1083
+ return object[_DYN_NAME$1 ];
1084
+ }
1085
+ return STR_EMPTY;
1086
+ }
1087
+ function createClassFromInterface(defaults) {
1088
+ return /** @class */ (function () {
1089
+ function class_1() {
1090
+ var _this = this;
1091
+ if (defaults) {
1092
+ objForEachKey(defaults, function (field, value) {
1093
+ _this[field] = value;
1094
+ });
1095
+ }
1096
+ }
1097
+ return class_1;
1098
+ }());
1083
1099
  }
1084
1100
 
1085
1101
  var strConsole = "console";
@@ -1157,334 +1173,104 @@ function findNamedServerTiming(name) {
1157
1173
  return value;
1158
1174
  }
1159
1175
 
1160
- var _a;
1161
- var STR_WARN_TO_CONSOLE = "warnToConsole";
1162
- var AiNonUserActionablePrefix = "AI (Internal): ";
1163
- var AiUserActionablePrefix = "AI: ";
1164
- var AIInternalMessagePrefix = "AITR_";
1165
- var defaultValues = {
1166
- loggingLevelConsole: 0,
1167
- loggingLevelTelemetry: 1,
1168
- maxMessageLimit: 25,
1169
- enableDebug: false
1170
- };
1171
- var _logFuncs = (_a = {},
1172
- _a[0 ] = null,
1173
- _a[1 ] = "errorToConsole",
1174
- _a[2 ] = STR_WARN_TO_CONSOLE,
1175
- _a[3 ] = "debugToConsole",
1176
- _a);
1177
- function _sanitizeDiagnosticText(text) {
1178
- if (text) {
1179
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1176
+ var UInt32Mask = 0x100000000;
1177
+ var MaxUInt32 = 0xffffffff;
1178
+ var SEED1 = 123456789;
1179
+ var SEED2 = 987654321;
1180
+ var _mwcSeeded = false;
1181
+ var _mwcW = SEED1;
1182
+ var _mwcZ = SEED2;
1183
+ function _mwcSeed(seedValue) {
1184
+ if (seedValue < 0) {
1185
+ seedValue >>>= 0;
1180
1186
  }
1181
- return STR_EMPTY;
1187
+ _mwcW = (SEED1 + seedValue) & MaxUInt32;
1188
+ _mwcZ = (SEED2 - seedValue) & MaxUInt32;
1189
+ _mwcSeeded = true;
1182
1190
  }
1183
- function _logToConsole(func, message) {
1184
- var theConsole = getConsole();
1185
- if (!!theConsole) {
1186
- var logFunc = "log";
1187
- if (theConsole[func]) {
1188
- logFunc = func;
1191
+ function _autoSeedMwc() {
1192
+ try {
1193
+ var now = utcNow() & 0x7fffffff;
1194
+ _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1195
+ }
1196
+ catch (e) {
1197
+ }
1198
+ }
1199
+ function randomValue(maxValue) {
1200
+ if (maxValue > 0) {
1201
+ return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
1202
+ }
1203
+ return 0;
1204
+ }
1205
+ function random32(signed) {
1206
+ var value = 0;
1207
+ var c = getCrypto() || getMsCrypto();
1208
+ if (c && c.getRandomValues) {
1209
+ value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1210
+ }
1211
+ if (value === 0 && isIE()) {
1212
+ if (!_mwcSeeded) {
1213
+ _autoSeedMwc();
1189
1214
  }
1190
- if (isFunction(theConsole[logFunc])) {
1191
- theConsole[logFunc](message);
1215
+ value = mwcRandom32() & MaxUInt32;
1216
+ }
1217
+ if (value === 0) {
1218
+ value = Math.floor((UInt32Mask * Math.random()) | 0);
1219
+ }
1220
+ if (!signed) {
1221
+ value >>>= 0;
1222
+ }
1223
+ return value;
1224
+ }
1225
+ function mwcRandom32(signed) {
1226
+ _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
1227
+ _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
1228
+ var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
1229
+ if (!signed) {
1230
+ value >>>= 0;
1231
+ }
1232
+ return value;
1233
+ }
1234
+ function newId(maxLength) {
1235
+ if (maxLength === void 0) { maxLength = 22; }
1236
+ var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1237
+ var number = random32() >>> 0;
1238
+ var chars = 0;
1239
+ var result = STR_EMPTY;
1240
+ while (result[_DYN_LENGTH$1 ] < maxLength) {
1241
+ chars++;
1242
+ result += base64chars.charAt(number & 0x3F);
1243
+ number >>>= 6;
1244
+ if (chars === 5) {
1245
+ number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
1246
+ chars = 0;
1192
1247
  }
1193
1248
  }
1249
+ return result;
1194
1250
  }
1195
- var _InternalLogMessage = /** @class */ (function () {
1196
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1197
- if (isUserAct === void 0) { isUserAct = false; }
1198
- var _self = this;
1199
- _self[_DYN_MESSAGE_ID ] = msgId;
1200
- _self[_DYN_MESSAGE$1 ] =
1201
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1202
- msgId;
1203
- var strProps = STR_EMPTY;
1204
- if (hasJSON()) {
1205
- strProps = getJSON().stringify(properties);
1251
+
1252
+ var version = "3.0.5";
1253
+ var instanceName = "." + newId(6);
1254
+ var _dataUid = 0;
1255
+ function _canAcceptData(target) {
1256
+ return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
1257
+ }
1258
+ function _getCache(data, target) {
1259
+ var theCache = target[data.id];
1260
+ if (!theCache) {
1261
+ theCache = {};
1262
+ try {
1263
+ if (_canAcceptData(target)) {
1264
+ objDefine(target, data.id, {
1265
+ e: false,
1266
+ v: theCache
1267
+ });
1268
+ }
1269
+ }
1270
+ catch (e) {
1206
1271
  }
1207
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1208
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1209
- _self[_DYN_MESSAGE$1 ] += diagnosticText;
1210
1272
  }
1211
- _InternalLogMessage.dataType = "MessageData";
1212
- return _InternalLogMessage;
1213
- }());
1214
- function safeGetLogger(core, config) {
1215
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1216
- }
1217
- var DiagnosticLogger = /** @class */ (function () {
1218
- function DiagnosticLogger(config) {
1219
- this.identifier = "DiagnosticLogger";
1220
- this.queue = [];
1221
- var _messageCount = 0;
1222
- var _messageLogged = {};
1223
- var _loggingLevelConsole;
1224
- var _loggingLevelTelemetry;
1225
- var _maxInternalMessageLimit;
1226
- var _enableDebug;
1227
- var _unloadHandler;
1228
- dynamicProto(DiagnosticLogger, this, function (_self) {
1229
- _unloadHandler = _setDefaultsFromConfig(config || {});
1230
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1231
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1232
- if (isUserAct === void 0) { isUserAct = false; }
1233
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1234
- if (_enableDebug) {
1235
- throw dumpObj(message);
1236
- }
1237
- else {
1238
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1239
- if (!isUndefined(message[_DYN_MESSAGE$1 ])) {
1240
- if (isUserAct) {
1241
- var messageKey = +message[_DYN_MESSAGE_ID ];
1242
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1243
- _self[logFunc](message[_DYN_MESSAGE$1 ]);
1244
- _messageLogged[messageKey] = true;
1245
- }
1246
- }
1247
- else {
1248
- if (_loggingLevelConsole >= severity) {
1249
- _self[logFunc](message[_DYN_MESSAGE$1 ]);
1250
- }
1251
- }
1252
- _logInternalMessage(severity, message);
1253
- }
1254
- else {
1255
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1256
- }
1257
- }
1258
- };
1259
- _self.debugToConsole = function (message) {
1260
- _logToConsole("debug", message);
1261
- _debugExtMsg("warning", message);
1262
- };
1263
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1264
- _logToConsole("warn", message);
1265
- _debugExtMsg("warning", message);
1266
- };
1267
- _self.errorToConsole = function (message) {
1268
- _logToConsole("error", message);
1269
- _debugExtMsg("error", message);
1270
- };
1271
- _self.resetInternalMessageCount = function () {
1272
- _messageCount = 0;
1273
- _messageLogged = {};
1274
- };
1275
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1276
- _self[_DYN_UNLOAD ] = function (isAsync) {
1277
- _unloadHandler && _unloadHandler.rm();
1278
- _unloadHandler = null;
1279
- };
1280
- function _logInternalMessage(severity, message) {
1281
- if (_areInternalMessagesThrottled()) {
1282
- return;
1283
- }
1284
- var logMessage = true;
1285
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1286
- if (_messageLogged[messageKey]) {
1287
- logMessage = false;
1288
- }
1289
- else {
1290
- _messageLogged[messageKey] = true;
1291
- }
1292
- if (logMessage) {
1293
- if (severity <= _loggingLevelTelemetry) {
1294
- _self.queue[_DYN_PUSH$1 ](message);
1295
- _messageCount++;
1296
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1297
- }
1298
- if (_messageCount === _maxInternalMessageLimit) {
1299
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1300
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1301
- _self.queue[_DYN_PUSH$1 ](throttleMessage);
1302
- if (severity === 1 ) {
1303
- _self.errorToConsole(throttleLimitMessage);
1304
- }
1305
- else {
1306
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1307
- }
1308
- }
1309
- }
1310
- }
1311
- function _setDefaultsFromConfig(config) {
1312
- return onConfigChange(createDynamicConfig(config, defaultValues, _self).cfg, function (details) {
1313
- var config = details.cfg;
1314
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1315
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
1316
- _maxInternalMessageLimit = config.maxMessageLimit;
1317
- _enableDebug = config.enableDebug;
1318
- });
1319
- }
1320
- function _areInternalMessagesThrottled() {
1321
- return _messageCount >= _maxInternalMessageLimit;
1322
- }
1323
- function _debugExtMsg(name, data) {
1324
- var dbgExt = getDebugExt(config || {});
1325
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1326
- dbgExt[_DYN_DIAG_LOG ](name, data);
1327
- }
1328
- }
1329
- });
1330
- }
1331
- DiagnosticLogger.__ieDyn=1;
1332
- return DiagnosticLogger;
1333
- }());
1334
- function _getLogger(logger) {
1335
- return (logger || new DiagnosticLogger());
1336
- }
1337
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1338
- if (isUserAct === void 0) { isUserAct = false; }
1339
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1340
- }
1341
-
1342
- var rCamelCase = /-([a-z])/g;
1343
- var rNormalizeInvalid = /([^\w\d_$])/g;
1344
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
1345
- function isNotNullOrUndefined(value) {
1346
- return !isNullOrUndefined(value);
1347
- }
1348
- function normalizeJsName(name) {
1349
- var value = name;
1350
- if (value && isString(value)) {
1351
- value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1352
- return letter.toUpperCase();
1353
- });
1354
- value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1355
- value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1356
- return "_" + match;
1357
- });
1358
- }
1359
- return value;
1360
- }
1361
- function strContains(value, search) {
1362
- if (value && search) {
1363
- return strIndexOf(value, search) !== -1;
1364
- }
1365
- return false;
1366
- }
1367
- function toISOString(date) {
1368
- return date && date.toISOString() || "";
1369
- }
1370
- function getExceptionName(object) {
1371
- if (isError(object)) {
1372
- return object[_DYN_NAME$1 ];
1373
- }
1374
- return STR_EMPTY;
1375
- }
1376
- function createClassFromInterface(defaults) {
1377
- return /** @class */ (function () {
1378
- function class_1() {
1379
- var _this = this;
1380
- if (defaults) {
1381
- objForEachKey(defaults, function (field, value) {
1382
- _this[field] = value;
1383
- });
1384
- }
1385
- }
1386
- return class_1;
1387
- }());
1388
- }
1389
-
1390
- var UInt32Mask = 0x100000000;
1391
- var MaxUInt32 = 0xffffffff;
1392
- var SEED1 = 123456789;
1393
- var SEED2 = 987654321;
1394
- var _mwcSeeded = false;
1395
- var _mwcW = SEED1;
1396
- var _mwcZ = SEED2;
1397
- function _mwcSeed(seedValue) {
1398
- if (seedValue < 0) {
1399
- seedValue >>>= 0;
1400
- }
1401
- _mwcW = (SEED1 + seedValue) & MaxUInt32;
1402
- _mwcZ = (SEED2 - seedValue) & MaxUInt32;
1403
- _mwcSeeded = true;
1404
- }
1405
- function _autoSeedMwc() {
1406
- try {
1407
- var now = utcNow() & 0x7fffffff;
1408
- _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1409
- }
1410
- catch (e) {
1411
- }
1412
- }
1413
- function randomValue(maxValue) {
1414
- if (maxValue > 0) {
1415
- return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
1416
- }
1417
- return 0;
1418
- }
1419
- function random32(signed) {
1420
- var value = 0;
1421
- var c = getCrypto() || getMsCrypto();
1422
- if (c && c.getRandomValues) {
1423
- value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1424
- }
1425
- if (value === 0 && isIE()) {
1426
- if (!_mwcSeeded) {
1427
- _autoSeedMwc();
1428
- }
1429
- value = mwcRandom32() & MaxUInt32;
1430
- }
1431
- if (value === 0) {
1432
- value = Math.floor((UInt32Mask * Math.random()) | 0);
1433
- }
1434
- if (!signed) {
1435
- value >>>= 0;
1436
- }
1437
- return value;
1438
- }
1439
- function mwcRandom32(signed) {
1440
- _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
1441
- _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
1442
- var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
1443
- if (!signed) {
1444
- value >>>= 0;
1445
- }
1446
- return value;
1447
- }
1448
- function newId(maxLength) {
1449
- if (maxLength === void 0) { maxLength = 22; }
1450
- var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1451
- var number = random32() >>> 0;
1452
- var chars = 0;
1453
- var result = STR_EMPTY;
1454
- while (result[_DYN_LENGTH$1 ] < maxLength) {
1455
- chars++;
1456
- result += base64chars.charAt(number & 0x3F);
1457
- number >>>= 6;
1458
- if (chars === 5) {
1459
- number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
1460
- chars = 0;
1461
- }
1462
- }
1463
- return result;
1464
- }
1465
-
1466
- var version = "3.0.5";
1467
- var instanceName = "." + newId(6);
1468
- var _dataUid = 0;
1469
- function _canAcceptData(target) {
1470
- return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
1471
- }
1472
- function _getCache(data, target) {
1473
- var theCache = target[data.id];
1474
- if (!theCache) {
1475
- theCache = {};
1476
- try {
1477
- if (_canAcceptData(target)) {
1478
- objDefine(target, data.id, {
1479
- e: false,
1480
- v: theCache
1481
- });
1482
- }
1483
- }
1484
- catch (e) {
1485
- }
1486
- }
1487
- return theCache;
1273
+ return theCache;
1488
1274
  }
1489
1275
  function createUniqueNamespace(name, includeVersion) {
1490
1276
  if (includeVersion === void 0) { includeVersion = false; }
@@ -2022,6 +1808,7 @@ function _createAndUseHandler(state, configHandler) {
2022
1808
  configHandler = null;
2023
1809
  }
2024
1810
  };
1811
+ objDefine(handler, "toJSON", { v: function () { return "WatcherHandler" + (handler.fn ? "" : "[X]"); } });
2025
1812
  state.use(handler, configHandler);
2026
1813
  return handler;
2027
1814
  }
@@ -2132,6 +1919,204 @@ function onConfigChange(config, configHandler, logger) {
2132
1919
  return createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
2133
1920
  }
2134
1921
 
1922
+ var _aiNamespace = null;
1923
+ function _getExtensionNamespace() {
1924
+ var target = getInst("Microsoft");
1925
+ if (target) {
1926
+ _aiNamespace = target["ApplicationInsights"];
1927
+ }
1928
+ return _aiNamespace;
1929
+ }
1930
+ function getDebugExt(config) {
1931
+ var ns = _aiNamespace;
1932
+ if (!ns && config.disableDbgExt !== true) {
1933
+ ns = _aiNamespace || _getExtensionNamespace();
1934
+ }
1935
+ return ns ? ns["ChromeDbgExt"] : null;
1936
+ }
1937
+
1938
+ var _a;
1939
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
1940
+ var AiNonUserActionablePrefix = "AI (Internal): ";
1941
+ var AiUserActionablePrefix = "AI: ";
1942
+ var AIInternalMessagePrefix = "AITR_";
1943
+ var defaultValues = {
1944
+ loggingLevelConsole: 0,
1945
+ loggingLevelTelemetry: 1,
1946
+ maxMessageLimit: 25,
1947
+ enableDebug: false
1948
+ };
1949
+ var _logFuncs = (_a = {},
1950
+ _a[0 ] = null,
1951
+ _a[1 ] = "errorToConsole",
1952
+ _a[2 ] = STR_WARN_TO_CONSOLE,
1953
+ _a[3 ] = "debugToConsole",
1954
+ _a);
1955
+ function _sanitizeDiagnosticText(text) {
1956
+ if (text) {
1957
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1958
+ }
1959
+ return STR_EMPTY;
1960
+ }
1961
+ function _logToConsole(func, message) {
1962
+ var theConsole = getConsole();
1963
+ if (!!theConsole) {
1964
+ var logFunc = "log";
1965
+ if (theConsole[func]) {
1966
+ logFunc = func;
1967
+ }
1968
+ if (isFunction(theConsole[logFunc])) {
1969
+ theConsole[logFunc](message);
1970
+ }
1971
+ }
1972
+ }
1973
+ var _InternalLogMessage = /** @class */ (function () {
1974
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1975
+ if (isUserAct === void 0) { isUserAct = false; }
1976
+ var _self = this;
1977
+ _self[_DYN_MESSAGE_ID ] = msgId;
1978
+ _self[_DYN_MESSAGE$1 ] =
1979
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1980
+ msgId;
1981
+ var strProps = STR_EMPTY;
1982
+ if (hasJSON()) {
1983
+ strProps = getJSON().stringify(properties);
1984
+ }
1985
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1986
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1987
+ _self[_DYN_MESSAGE$1 ] += diagnosticText;
1988
+ }
1989
+ _InternalLogMessage.dataType = "MessageData";
1990
+ return _InternalLogMessage;
1991
+ }());
1992
+ function safeGetLogger(core, config) {
1993
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1994
+ }
1995
+ var DiagnosticLogger = /** @class */ (function () {
1996
+ function DiagnosticLogger(config) {
1997
+ this.identifier = "DiagnosticLogger";
1998
+ this.queue = [];
1999
+ var _messageCount = 0;
2000
+ var _messageLogged = {};
2001
+ var _loggingLevelConsole;
2002
+ var _loggingLevelTelemetry;
2003
+ var _maxInternalMessageLimit;
2004
+ var _enableDebug;
2005
+ var _unloadHandler;
2006
+ dynamicProto(DiagnosticLogger, this, function (_self) {
2007
+ _unloadHandler = _setDefaultsFromConfig(config || {});
2008
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2009
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2010
+ if (isUserAct === void 0) { isUserAct = false; }
2011
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2012
+ if (_enableDebug) {
2013
+ throw dumpObj(message);
2014
+ }
2015
+ else {
2016
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2017
+ if (!isUndefined(message[_DYN_MESSAGE$1 ])) {
2018
+ if (isUserAct) {
2019
+ var messageKey = +message[_DYN_MESSAGE_ID ];
2020
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2021
+ _self[logFunc](message[_DYN_MESSAGE$1 ]);
2022
+ _messageLogged[messageKey] = true;
2023
+ }
2024
+ }
2025
+ else {
2026
+ if (_loggingLevelConsole >= severity) {
2027
+ _self[logFunc](message[_DYN_MESSAGE$1 ]);
2028
+ }
2029
+ }
2030
+ _logInternalMessage(severity, message);
2031
+ }
2032
+ else {
2033
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2034
+ }
2035
+ }
2036
+ };
2037
+ _self.debugToConsole = function (message) {
2038
+ _logToConsole("debug", message);
2039
+ _debugExtMsg("warning", message);
2040
+ };
2041
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2042
+ _logToConsole("warn", message);
2043
+ _debugExtMsg("warning", message);
2044
+ };
2045
+ _self.errorToConsole = function (message) {
2046
+ _logToConsole("error", message);
2047
+ _debugExtMsg("error", message);
2048
+ };
2049
+ _self.resetInternalMessageCount = function () {
2050
+ _messageCount = 0;
2051
+ _messageLogged = {};
2052
+ };
2053
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2054
+ _self[_DYN_UNLOAD ] = function (isAsync) {
2055
+ _unloadHandler && _unloadHandler.rm();
2056
+ _unloadHandler = null;
2057
+ };
2058
+ function _logInternalMessage(severity, message) {
2059
+ if (_areInternalMessagesThrottled()) {
2060
+ return;
2061
+ }
2062
+ var logMessage = true;
2063
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2064
+ if (_messageLogged[messageKey]) {
2065
+ logMessage = false;
2066
+ }
2067
+ else {
2068
+ _messageLogged[messageKey] = true;
2069
+ }
2070
+ if (logMessage) {
2071
+ if (severity <= _loggingLevelTelemetry) {
2072
+ _self.queue[_DYN_PUSH$1 ](message);
2073
+ _messageCount++;
2074
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2075
+ }
2076
+ if (_messageCount === _maxInternalMessageLimit) {
2077
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2078
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2079
+ _self.queue[_DYN_PUSH$1 ](throttleMessage);
2080
+ if (severity === 1 ) {
2081
+ _self.errorToConsole(throttleLimitMessage);
2082
+ }
2083
+ else {
2084
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2085
+ }
2086
+ }
2087
+ }
2088
+ }
2089
+ function _setDefaultsFromConfig(config) {
2090
+ return onConfigChange(createDynamicConfig(config, defaultValues, _self).cfg, function (details) {
2091
+ var config = details.cfg;
2092
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2093
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
2094
+ _maxInternalMessageLimit = config.maxMessageLimit;
2095
+ _enableDebug = config.enableDebug;
2096
+ });
2097
+ }
2098
+ function _areInternalMessagesThrottled() {
2099
+ return _messageCount >= _maxInternalMessageLimit;
2100
+ }
2101
+ function _debugExtMsg(name, data) {
2102
+ var dbgExt = getDebugExt(config || {});
2103
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2104
+ dbgExt[_DYN_DIAG_LOG ](name, data);
2105
+ }
2106
+ }
2107
+ });
2108
+ }
2109
+ DiagnosticLogger.__ieDyn=1;
2110
+ return DiagnosticLogger;
2111
+ }());
2112
+ function _getLogger(logger) {
2113
+ return (logger || new DiagnosticLogger());
2114
+ }
2115
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2116
+ if (isUserAct === void 0) { isUserAct = false; }
2117
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2118
+ }
2119
+
2135
2120
  function generateW3CId() {
2136
2121
  var hexValues = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
2137
2122
  var oct = STR_EMPTY, tmp;