@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,5 +1,5 @@
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
  'use strict';
@@ -9,20 +9,15 @@ var UNDEF_VALUE = undefined;
9
9
  var NULL_VALUE = null;
10
10
  var EMPTY = "";
11
11
  var FUNCTION = "function";
12
- var NUMBER = "number";
13
12
  var OBJECT = "object";
14
13
  var PROTOTYPE = "prototype";
15
14
  var __PROTO__ = "__proto__";
16
- var STRING = "string";
17
15
  var UNDEFINED = "undefined";
18
16
  var CONSTRUCTOR = "constructor";
19
17
  var SYMBOL = "Symbol";
20
18
  var POLYFILL_TAG = "_polyfill";
21
- var INDEX_OF = "indexOf";
22
19
  var LENGTH = "length";
23
- var VALUE = "value";
24
20
  var NAME = "name";
25
- var SLICE = "slice";
26
21
  var CALL = "call";
27
22
  var TO_STRING = "toString";
28
23
  var ObjClass$1 = Object;
@@ -32,6 +27,7 @@ var StrProto = StrCls[PROTOTYPE];
32
27
  var MathCls = Math;
33
28
  var ArrCls = Array;
34
29
  var ArrProto = ArrCls[PROTOTYPE];
30
+ var ArrSlice = ArrProto["slice"];
35
31
 
36
32
  function safe(func, argArray) {
37
33
  try {
@@ -73,7 +69,7 @@ function isNullOrUndefined(value) {
73
69
  function isDefined(arg) {
74
70
  return !!arg || arg !== UNDEF_VALUE;
75
71
  }
76
- var isString = ( /*#__PURE__*/_createIs(STRING));
72
+ var isString = ( /*#__PURE__*/_createIs("string"));
77
73
  var isFunction = ( /*#__PURE__*/_createIs(FUNCTION));
78
74
  /*#__NO_SIDE_EFFECTS__*/
79
75
  function isObject(value) {
@@ -172,6 +168,7 @@ var asString = StrCls;
172
168
 
173
169
  var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
174
170
  var _globalCfg;
171
+ /*#__NO_SIDE_EFFECTS__*/
175
172
  function _getGlobalValue() {
176
173
  var result;
177
174
  if (typeof globalThis !== UNDEFINED) {
@@ -206,7 +203,7 @@ function dumpObj(object, format) {
206
203
  object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
207
204
  }
208
205
  try {
209
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
206
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
210
207
  propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
211
208
  }
212
209
  catch (e) {
@@ -215,18 +212,15 @@ function dumpObj(object, format) {
215
212
  return objType + ": " + propertyValueDump;
216
213
  }
217
214
 
218
- var _slice;
219
- var _unwrapInstFunction = _unwrapFunctionWithPoly;
220
215
  var _unwrapFunction = _unwrapFunctionWithPoly;
221
216
  /*#__NO_SIDE_EFFECTS__*/
222
217
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
223
- _slice = _slice || ArrProto[SLICE];
224
218
  var clsFn = clsProto && clsProto[funcName];
225
219
  return function (thisArg) {
226
220
  var theFunc = (thisArg && thisArg[funcName]) || clsFn;
227
221
  if (theFunc || polyFunc) {
228
222
  var theArgs = arguments;
229
- return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
223
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
230
224
  }
231
225
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
232
226
  };
@@ -234,7 +228,7 @@ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
234
228
 
235
229
  var mathMax = MathCls.max;
236
230
 
237
- var strSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, StrProto));
231
+ var strSlice = ( /*#__PURE__*/_unwrapFunction("slice", StrProto));
238
232
 
239
233
  var strSubstring = ( /*#__PURE__*/_unwrapFunction("substring", StrProto));
240
234
  var strSubstr = ( /*#__PURE__*/_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
@@ -295,7 +289,7 @@ function polySymbolFor(key) {
295
289
  var propMap = {
296
290
  e: "enumerable",
297
291
  c: "configurable",
298
- v: VALUE,
292
+ v: "value",
299
293
  w: "writable",
300
294
  g: "get",
301
295
  s: "set"
@@ -328,6 +322,7 @@ var _globalLazyTestHooks;
328
322
  function _initTestHooks() {
329
323
  _globalLazyTestHooks = _getGlobalConfig();
330
324
  }
325
+ /*#__NO_SIDE_EFFECTS__*/
331
326
  function getLazy(cb) {
332
327
  var lazyValue = {};
333
328
  !_globalLazyTestHooks && _initTestHooks();
@@ -365,9 +360,14 @@ function createCachedValue(value) {
365
360
 
366
361
  var WINDOW = "window";
367
362
  var _cachedGlobal;
368
- var _cachedWindow;
369
- var _cachedDocument;
370
- var _cachedNavigator;
363
+ function _getGlobalInstFn(getFn, theArgs) {
364
+ var cachedValue;
365
+ return function () {
366
+ !_globalLazyTestHooks && _initTestHooks();
367
+ (!cachedValue || _globalLazyTestHooks.lzy) && (cachedValue = createCachedValue(safe(getFn, theArgs).v));
368
+ return cachedValue.v;
369
+ };
370
+ }
371
371
  /*#__NO_SIDE_EFFECTS__*/
372
372
  function lazySafeGetInst(name) {
373
373
  return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
@@ -384,37 +384,22 @@ function getInst(name, useCached) {
384
384
  if (gbl && gbl[name]) {
385
385
  return gbl[name];
386
386
  }
387
- if (name === WINDOW && _cachedWindow) {
388
- return _cachedWindow.v;
387
+ if (name === WINDOW) {
388
+ return getWindow();
389
389
  }
390
390
  return NULL_VALUE;
391
391
  }
392
- /*#__NO_SIDE_EFFECTS__*/
393
- function getDocument() {
394
- !_globalLazyTestHooks && _initTestHooks();
395
- (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
396
- return _cachedDocument.v;
397
- }
392
+ var getDocument = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["document"]));
398
393
  /*#__NO_SIDE_EFFECTS__*/
399
394
  function hasWindow() {
400
395
  return !!getWindow();
401
396
  }
402
- /*#__NO_SIDE_EFFECTS__*/
403
- function getWindow() {
404
- !_globalLazyTestHooks && _initTestHooks();
405
- (!_cachedWindow || _globalLazyTestHooks.lzy) && (_cachedWindow = createCachedValue(safe((getInst), [WINDOW]).v));
406
- return _cachedWindow.v;
407
- }
397
+ var getWindow = ( /*#__PURE__*/_getGlobalInstFn(getInst, [WINDOW]));
408
398
  /*#__NO_SIDE_EFFECTS__*/
409
399
  function hasNavigator() {
410
400
  return !!getNavigator();
411
401
  }
412
- /*#__NO_SIDE_EFFECTS__*/
413
- function getNavigator() {
414
- !_globalLazyTestHooks && _initTestHooks();
415
- (!_cachedNavigator || _globalLazyTestHooks.lzy) && (_cachedNavigator = createCachedValue(safe((getInst), ["navigator"]).v));
416
- return _cachedNavigator.v;
417
- }
402
+ var getNavigator = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["navigator"]));
418
403
 
419
404
  var _symbol;
420
405
  var _symbolFor;
@@ -437,7 +422,9 @@ function symbolFor(key) {
437
422
  return (_symbolFor.v || polySymbolFor)(key);
438
423
  }
439
424
 
440
- var fnApply = ( /*#__PURE__*/_unwrapInstFunction("apply"));
425
+ function fnApply(fn, thisArg, argArray) {
426
+ return fn.apply(thisArg, argArray);
427
+ }
441
428
 
442
429
  function arrForEach(theArray, callbackfn, thisArg) {
443
430
  if (theArray) {
@@ -452,7 +439,7 @@ function arrForEach(theArray, callbackfn, thisArg) {
452
439
  }
453
440
  }
454
441
 
455
- var arrIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, ArrProto));
442
+ var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
456
443
 
457
444
  var arrMap = ( /*#__PURE__*/_unwrapFunction("map", ArrProto));
458
445
 
@@ -486,6 +473,7 @@ function objSetPrototypeOf(obj, proto) {
486
473
  return fn(obj, proto);
487
474
  }
488
475
 
476
+ /*#__NO_SIDE_EFFECTS__*/
489
477
  function _createCustomError(name, d, b) {
490
478
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
491
479
  d = objSetPrototypeOf(d, b);
@@ -509,7 +497,7 @@ function createCustomError(name, constructCb, errorBase) {
509
497
  var theArgs = arguments;
510
498
  try {
511
499
  safe(_setName, [theBaseClass, name]);
512
- var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
500
+ var _self = fnApply(theBaseClass, _this, ArrSlice[CALL](theArgs)) || _this;
513
501
  if (_self !== _this) {
514
502
  var orgProto = objGetPrototypeOf(_this);
515
503
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -603,58 +591,54 @@ function polyStrEndsWith(value, searchString, length) {
603
591
  return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
604
592
  }
605
593
 
606
- var strIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, StrProto));
594
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
607
595
 
608
596
  var REF = "ref";
609
- var UNREF = "un" + REF;
597
+ var UNREF = "unref";
610
598
  var HAS_REF = "hasRef";
611
599
  var ENABLED = "enabled";
600
+ /*#__NO_SIDE_EFFECTS__*/
612
601
  function _createTimerHandler(startTimer, refreshFn, cancelFn) {
613
- var _a;
614
602
  var ref = true;
615
603
  var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;
616
604
  var theTimerHandler;
617
- var _unref = function () {
605
+ function _unref() {
618
606
  ref = false;
619
607
  timerId && timerId[UNREF] && timerId[UNREF]();
620
608
  return theTimerHandler;
621
- };
622
- var _ref = function () {
623
- ref = true;
624
- timerId && timerId[REF] && timerId[REF]();
609
+ }
610
+ function _cancel() {
611
+ timerId && cancelFn(timerId);
612
+ timerId = NULL_VALUE;
613
+ }
614
+ function _refresh() {
615
+ timerId = refreshFn(timerId);
616
+ if (!ref) {
617
+ _unref();
618
+ }
625
619
  return theTimerHandler;
620
+ }
621
+ function _setEnabled(value) {
622
+ !value && timerId && _cancel();
623
+ value && !timerId && _refresh();
624
+ }
625
+ theTimerHandler = {
626
+ cancel: _cancel,
627
+ refresh: _refresh
626
628
  };
627
- var _hasRef = function () {
629
+ theTimerHandler[HAS_REF] = function () {
628
630
  if (timerId && timerId[HAS_REF]) {
629
631
  return timerId[HAS_REF]();
630
632
  }
631
633
  return ref;
632
634
  };
633
- var _refresh = function () {
634
- timerId = refreshFn(timerId);
635
- if (!ref) {
636
- _unref();
637
- }
635
+ theTimerHandler[REF] = function () {
636
+ ref = true;
637
+ timerId && timerId[REF] && timerId[REF]();
638
638
  return theTimerHandler;
639
639
  };
640
- var _cancel = function () {
641
- timerId && cancelFn(timerId);
642
- timerId = NULL_VALUE;
643
- };
644
- var _setEnabled = function (value) {
645
- !value && timerId && _cancel();
646
- value && !timerId && _refresh();
647
- };
648
- theTimerHandler = (_a = {
649
- cancel: _cancel,
650
- refresh: _refresh
651
- },
652
- _a[HAS_REF] = _hasRef,
653
- _a[REF] = _ref,
654
- _a[UNREF] = _unref,
655
- _a[ENABLED] = false,
656
- _a);
657
- objDefineProp(theTimerHandler, ENABLED, {
640
+ theTimerHandler[UNREF] = _unref;
641
+ theTimerHandler = objDefineProp(theTimerHandler, ENABLED, {
658
642
  get: function () { return !!timerId; },
659
643
  set: _setEnabled
660
644
  });
@@ -666,7 +650,7 @@ function _createTimerHandler(startTimer, refreshFn, cancelFn) {
666
650
  };
667
651
  }
668
652
 
669
- function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
653
+ function _createTimeoutWith(startTimer, overrideFn, theArgs) {
670
654
  var isArr = isArray(overrideFn);
671
655
  var len = isArr ? overrideFn.length : 0;
672
656
  var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
@@ -674,7 +658,7 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
674
658
  var timerFn = theArgs[0];
675
659
  theArgs[0] = function () {
676
660
  handler.dn();
677
- fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
661
+ fnApply(timerFn, UNDEF_VALUE, ArrSlice[CALL](arguments));
678
662
  };
679
663
  var handler = _createTimerHandler(startTimer, function (timerId) {
680
664
  if (timerId) {
@@ -682,16 +666,16 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
682
666
  timerId.refresh();
683
667
  return timerId;
684
668
  }
685
- fnApply(clearFn, self, [timerId]);
669
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
686
670
  }
687
- return fnApply(setFn, self, theArgs);
671
+ return fnApply(setFn, UNDEF_VALUE, theArgs);
688
672
  }, function (timerId) {
689
- fnApply(clearFn, self, [timerId]);
673
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
690
674
  });
691
675
  return handler.h;
692
676
  }
693
677
  function scheduleTimeout(callback, timeout) {
694
- return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
678
+ return _createTimeoutWith(true, UNDEF_VALUE, ArrSlice[CALL](arguments));
695
679
  }
696
680
 
697
681
  var createEnumStyle = createEnum;
@@ -1045,20 +1029,52 @@ var UNDEFINED_VALUE = undefined;
1045
1029
  var STR_EMPTY = "";
1046
1030
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1047
1031
 
1048
- var _aiNamespace = null;
1049
- function _getExtensionNamespace() {
1050
- var target = getInst("Microsoft");
1051
- if (target) {
1052
- _aiNamespace = target["ApplicationInsights"];
1032
+ var rCamelCase = /-([a-z])/g;
1033
+ var rNormalizeInvalid = /([^\w\d_$])/g;
1034
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
1035
+ function isNotNullOrUndefined(value) {
1036
+ return !isNullOrUndefined(value);
1037
+ }
1038
+ function normalizeJsName(name) {
1039
+ var value = name;
1040
+ if (value && isString(value)) {
1041
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1042
+ return letter.toUpperCase();
1043
+ });
1044
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1045
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1046
+ return "_" + match;
1047
+ });
1053
1048
  }
1054
- return _aiNamespace;
1049
+ return value;
1055
1050
  }
1056
- function getDebugExt(config) {
1057
- var ns = _aiNamespace;
1058
- if (!ns && config.disableDbgExt !== true) {
1059
- ns = _aiNamespace || _getExtensionNamespace();
1051
+ function strContains(value, search) {
1052
+ if (value && search) {
1053
+ return strIndexOf(value, search) !== -1;
1060
1054
  }
1061
- return ns ? ns["ChromeDbgExt"] : null;
1055
+ return false;
1056
+ }
1057
+ function toISOString(date) {
1058
+ return date && date.toISOString() || "";
1059
+ }
1060
+ function getExceptionName(object) {
1061
+ if (isError(object)) {
1062
+ return object[_DYN_NAME$1 ];
1063
+ }
1064
+ return STR_EMPTY;
1065
+ }
1066
+ function createClassFromInterface(defaults) {
1067
+ return /** @class */ (function () {
1068
+ function class_1() {
1069
+ var _this = this;
1070
+ if (defaults) {
1071
+ objForEachKey(defaults, function (field, value) {
1072
+ _this[field] = value;
1073
+ });
1074
+ }
1075
+ }
1076
+ return class_1;
1077
+ }());
1062
1078
  }
1063
1079
 
1064
1080
  var strConsole = "console";
@@ -1136,334 +1152,104 @@ function findNamedServerTiming(name) {
1136
1152
  return value;
1137
1153
  }
1138
1154
 
1139
- var _a;
1140
- var STR_WARN_TO_CONSOLE = "warnToConsole";
1141
- var AiNonUserActionablePrefix = "AI (Internal): ";
1142
- var AiUserActionablePrefix = "AI: ";
1143
- var AIInternalMessagePrefix = "AITR_";
1144
- var defaultValues = {
1145
- loggingLevelConsole: 0,
1146
- loggingLevelTelemetry: 1,
1147
- maxMessageLimit: 25,
1148
- enableDebug: false
1149
- };
1150
- var _logFuncs = (_a = {},
1151
- _a[0 ] = null,
1152
- _a[1 ] = "errorToConsole",
1153
- _a[2 ] = STR_WARN_TO_CONSOLE,
1154
- _a[3 ] = "debugToConsole",
1155
- _a);
1156
- function _sanitizeDiagnosticText(text) {
1157
- if (text) {
1158
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1155
+ var UInt32Mask = 0x100000000;
1156
+ var MaxUInt32 = 0xffffffff;
1157
+ var SEED1 = 123456789;
1158
+ var SEED2 = 987654321;
1159
+ var _mwcSeeded = false;
1160
+ var _mwcW = SEED1;
1161
+ var _mwcZ = SEED2;
1162
+ function _mwcSeed(seedValue) {
1163
+ if (seedValue < 0) {
1164
+ seedValue >>>= 0;
1159
1165
  }
1160
- return STR_EMPTY;
1166
+ _mwcW = (SEED1 + seedValue) & MaxUInt32;
1167
+ _mwcZ = (SEED2 - seedValue) & MaxUInt32;
1168
+ _mwcSeeded = true;
1161
1169
  }
1162
- function _logToConsole(func, message) {
1163
- var theConsole = getConsole();
1164
- if (!!theConsole) {
1165
- var logFunc = "log";
1166
- if (theConsole[func]) {
1167
- logFunc = func;
1170
+ function _autoSeedMwc() {
1171
+ try {
1172
+ var now = utcNow() & 0x7fffffff;
1173
+ _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1174
+ }
1175
+ catch (e) {
1176
+ }
1177
+ }
1178
+ function randomValue(maxValue) {
1179
+ if (maxValue > 0) {
1180
+ return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
1181
+ }
1182
+ return 0;
1183
+ }
1184
+ function random32(signed) {
1185
+ var value = 0;
1186
+ var c = getCrypto() || getMsCrypto();
1187
+ if (c && c.getRandomValues) {
1188
+ value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1189
+ }
1190
+ if (value === 0 && isIE()) {
1191
+ if (!_mwcSeeded) {
1192
+ _autoSeedMwc();
1168
1193
  }
1169
- if (isFunction(theConsole[logFunc])) {
1170
- theConsole[logFunc](message);
1194
+ value = mwcRandom32() & MaxUInt32;
1195
+ }
1196
+ if (value === 0) {
1197
+ value = Math.floor((UInt32Mask * Math.random()) | 0);
1198
+ }
1199
+ if (!signed) {
1200
+ value >>>= 0;
1201
+ }
1202
+ return value;
1203
+ }
1204
+ function mwcRandom32(signed) {
1205
+ _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
1206
+ _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
1207
+ var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
1208
+ if (!signed) {
1209
+ value >>>= 0;
1210
+ }
1211
+ return value;
1212
+ }
1213
+ function newId(maxLength) {
1214
+ if (maxLength === void 0) { maxLength = 22; }
1215
+ var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1216
+ var number = random32() >>> 0;
1217
+ var chars = 0;
1218
+ var result = STR_EMPTY;
1219
+ while (result[_DYN_LENGTH$1 ] < maxLength) {
1220
+ chars++;
1221
+ result += base64chars.charAt(number & 0x3F);
1222
+ number >>>= 6;
1223
+ if (chars === 5) {
1224
+ number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
1225
+ chars = 0;
1171
1226
  }
1172
1227
  }
1228
+ return result;
1173
1229
  }
1174
- var _InternalLogMessage = /** @class */ (function () {
1175
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1176
- if (isUserAct === void 0) { isUserAct = false; }
1177
- var _self = this;
1178
- _self[_DYN_MESSAGE_ID ] = msgId;
1179
- _self[_DYN_MESSAGE$1 ] =
1180
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1181
- msgId;
1182
- var strProps = STR_EMPTY;
1183
- if (hasJSON()) {
1184
- strProps = getJSON().stringify(properties);
1230
+
1231
+ var version = "3.0.5";
1232
+ var instanceName = "." + newId(6);
1233
+ var _dataUid = 0;
1234
+ function _canAcceptData(target) {
1235
+ return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
1236
+ }
1237
+ function _getCache(data, target) {
1238
+ var theCache = target[data.id];
1239
+ if (!theCache) {
1240
+ theCache = {};
1241
+ try {
1242
+ if (_canAcceptData(target)) {
1243
+ objDefine(target, data.id, {
1244
+ e: false,
1245
+ v: theCache
1246
+ });
1247
+ }
1248
+ }
1249
+ catch (e) {
1185
1250
  }
1186
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1187
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1188
- _self[_DYN_MESSAGE$1 ] += diagnosticText;
1189
1251
  }
1190
- _InternalLogMessage.dataType = "MessageData";
1191
- return _InternalLogMessage;
1192
- }());
1193
- function safeGetLogger(core, config) {
1194
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1195
- }
1196
- var DiagnosticLogger = /** @class */ (function () {
1197
- function DiagnosticLogger(config) {
1198
- this.identifier = "DiagnosticLogger";
1199
- this.queue = [];
1200
- var _messageCount = 0;
1201
- var _messageLogged = {};
1202
- var _loggingLevelConsole;
1203
- var _loggingLevelTelemetry;
1204
- var _maxInternalMessageLimit;
1205
- var _enableDebug;
1206
- var _unloadHandler;
1207
- dynamicProto(DiagnosticLogger, this, function (_self) {
1208
- _unloadHandler = _setDefaultsFromConfig(config || {});
1209
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1210
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1211
- if (isUserAct === void 0) { isUserAct = false; }
1212
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1213
- if (_enableDebug) {
1214
- throw dumpObj(message);
1215
- }
1216
- else {
1217
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1218
- if (!isUndefined(message[_DYN_MESSAGE$1 ])) {
1219
- if (isUserAct) {
1220
- var messageKey = +message[_DYN_MESSAGE_ID ];
1221
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1222
- _self[logFunc](message[_DYN_MESSAGE$1 ]);
1223
- _messageLogged[messageKey] = true;
1224
- }
1225
- }
1226
- else {
1227
- if (_loggingLevelConsole >= severity) {
1228
- _self[logFunc](message[_DYN_MESSAGE$1 ]);
1229
- }
1230
- }
1231
- _logInternalMessage(severity, message);
1232
- }
1233
- else {
1234
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1235
- }
1236
- }
1237
- };
1238
- _self.debugToConsole = function (message) {
1239
- _logToConsole("debug", message);
1240
- _debugExtMsg("warning", message);
1241
- };
1242
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1243
- _logToConsole("warn", message);
1244
- _debugExtMsg("warning", message);
1245
- };
1246
- _self.errorToConsole = function (message) {
1247
- _logToConsole("error", message);
1248
- _debugExtMsg("error", message);
1249
- };
1250
- _self.resetInternalMessageCount = function () {
1251
- _messageCount = 0;
1252
- _messageLogged = {};
1253
- };
1254
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1255
- _self[_DYN_UNLOAD ] = function (isAsync) {
1256
- _unloadHandler && _unloadHandler.rm();
1257
- _unloadHandler = null;
1258
- };
1259
- function _logInternalMessage(severity, message) {
1260
- if (_areInternalMessagesThrottled()) {
1261
- return;
1262
- }
1263
- var logMessage = true;
1264
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1265
- if (_messageLogged[messageKey]) {
1266
- logMessage = false;
1267
- }
1268
- else {
1269
- _messageLogged[messageKey] = true;
1270
- }
1271
- if (logMessage) {
1272
- if (severity <= _loggingLevelTelemetry) {
1273
- _self.queue[_DYN_PUSH$1 ](message);
1274
- _messageCount++;
1275
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1276
- }
1277
- if (_messageCount === _maxInternalMessageLimit) {
1278
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1279
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1280
- _self.queue[_DYN_PUSH$1 ](throttleMessage);
1281
- if (severity === 1 ) {
1282
- _self.errorToConsole(throttleLimitMessage);
1283
- }
1284
- else {
1285
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1286
- }
1287
- }
1288
- }
1289
- }
1290
- function _setDefaultsFromConfig(config) {
1291
- return onConfigChange(createDynamicConfig(config, defaultValues, _self).cfg, function (details) {
1292
- var config = details.cfg;
1293
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1294
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
1295
- _maxInternalMessageLimit = config.maxMessageLimit;
1296
- _enableDebug = config.enableDebug;
1297
- });
1298
- }
1299
- function _areInternalMessagesThrottled() {
1300
- return _messageCount >= _maxInternalMessageLimit;
1301
- }
1302
- function _debugExtMsg(name, data) {
1303
- var dbgExt = getDebugExt(config || {});
1304
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1305
- dbgExt[_DYN_DIAG_LOG ](name, data);
1306
- }
1307
- }
1308
- });
1309
- }
1310
- DiagnosticLogger.__ieDyn=1;
1311
- return DiagnosticLogger;
1312
- }());
1313
- function _getLogger(logger) {
1314
- return (logger || new DiagnosticLogger());
1315
- }
1316
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1317
- if (isUserAct === void 0) { isUserAct = false; }
1318
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1319
- }
1320
-
1321
- var rCamelCase = /-([a-z])/g;
1322
- var rNormalizeInvalid = /([^\w\d_$])/g;
1323
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
1324
- function isNotNullOrUndefined(value) {
1325
- return !isNullOrUndefined(value);
1326
- }
1327
- function normalizeJsName(name) {
1328
- var value = name;
1329
- if (value && isString(value)) {
1330
- value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1331
- return letter.toUpperCase();
1332
- });
1333
- value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1334
- value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1335
- return "_" + match;
1336
- });
1337
- }
1338
- return value;
1339
- }
1340
- function strContains(value, search) {
1341
- if (value && search) {
1342
- return strIndexOf(value, search) !== -1;
1343
- }
1344
- return false;
1345
- }
1346
- function toISOString(date) {
1347
- return date && date.toISOString() || "";
1348
- }
1349
- function getExceptionName(object) {
1350
- if (isError(object)) {
1351
- return object[_DYN_NAME$1 ];
1352
- }
1353
- return STR_EMPTY;
1354
- }
1355
- function createClassFromInterface(defaults) {
1356
- return /** @class */ (function () {
1357
- function class_1() {
1358
- var _this = this;
1359
- if (defaults) {
1360
- objForEachKey(defaults, function (field, value) {
1361
- _this[field] = value;
1362
- });
1363
- }
1364
- }
1365
- return class_1;
1366
- }());
1367
- }
1368
-
1369
- var UInt32Mask = 0x100000000;
1370
- var MaxUInt32 = 0xffffffff;
1371
- var SEED1 = 123456789;
1372
- var SEED2 = 987654321;
1373
- var _mwcSeeded = false;
1374
- var _mwcW = SEED1;
1375
- var _mwcZ = SEED2;
1376
- function _mwcSeed(seedValue) {
1377
- if (seedValue < 0) {
1378
- seedValue >>>= 0;
1379
- }
1380
- _mwcW = (SEED1 + seedValue) & MaxUInt32;
1381
- _mwcZ = (SEED2 - seedValue) & MaxUInt32;
1382
- _mwcSeeded = true;
1383
- }
1384
- function _autoSeedMwc() {
1385
- try {
1386
- var now = utcNow() & 0x7fffffff;
1387
- _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1388
- }
1389
- catch (e) {
1390
- }
1391
- }
1392
- function randomValue(maxValue) {
1393
- if (maxValue > 0) {
1394
- return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
1395
- }
1396
- return 0;
1397
- }
1398
- function random32(signed) {
1399
- var value = 0;
1400
- var c = getCrypto() || getMsCrypto();
1401
- if (c && c.getRandomValues) {
1402
- value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1403
- }
1404
- if (value === 0 && isIE()) {
1405
- if (!_mwcSeeded) {
1406
- _autoSeedMwc();
1407
- }
1408
- value = mwcRandom32() & MaxUInt32;
1409
- }
1410
- if (value === 0) {
1411
- value = Math.floor((UInt32Mask * Math.random()) | 0);
1412
- }
1413
- if (!signed) {
1414
- value >>>= 0;
1415
- }
1416
- return value;
1417
- }
1418
- function mwcRandom32(signed) {
1419
- _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
1420
- _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
1421
- var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
1422
- if (!signed) {
1423
- value >>>= 0;
1424
- }
1425
- return value;
1426
- }
1427
- function newId(maxLength) {
1428
- if (maxLength === void 0) { maxLength = 22; }
1429
- var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1430
- var number = random32() >>> 0;
1431
- var chars = 0;
1432
- var result = STR_EMPTY;
1433
- while (result[_DYN_LENGTH$1 ] < maxLength) {
1434
- chars++;
1435
- result += base64chars.charAt(number & 0x3F);
1436
- number >>>= 6;
1437
- if (chars === 5) {
1438
- number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
1439
- chars = 0;
1440
- }
1441
- }
1442
- return result;
1443
- }
1444
-
1445
- var version = "3.0.5";
1446
- var instanceName = "." + newId(6);
1447
- var _dataUid = 0;
1448
- function _canAcceptData(target) {
1449
- return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
1450
- }
1451
- function _getCache(data, target) {
1452
- var theCache = target[data.id];
1453
- if (!theCache) {
1454
- theCache = {};
1455
- try {
1456
- if (_canAcceptData(target)) {
1457
- objDefine(target, data.id, {
1458
- e: false,
1459
- v: theCache
1460
- });
1461
- }
1462
- }
1463
- catch (e) {
1464
- }
1465
- }
1466
- return theCache;
1252
+ return theCache;
1467
1253
  }
1468
1254
  function createUniqueNamespace(name, includeVersion) {
1469
1255
  if (includeVersion === void 0) { includeVersion = false; }
@@ -2001,6 +1787,7 @@ function _createAndUseHandler(state, configHandler) {
2001
1787
  configHandler = null;
2002
1788
  }
2003
1789
  };
1790
+ objDefine(handler, "toJSON", { v: function () { return "WatcherHandler" + (handler.fn ? "" : "[X]"); } });
2004
1791
  state.use(handler, configHandler);
2005
1792
  return handler;
2006
1793
  }
@@ -2111,6 +1898,204 @@ function onConfigChange(config, configHandler, logger) {
2111
1898
  return createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
2112
1899
  }
2113
1900
 
1901
+ var _aiNamespace = null;
1902
+ function _getExtensionNamespace() {
1903
+ var target = getInst("Microsoft");
1904
+ if (target) {
1905
+ _aiNamespace = target["ApplicationInsights"];
1906
+ }
1907
+ return _aiNamespace;
1908
+ }
1909
+ function getDebugExt(config) {
1910
+ var ns = _aiNamespace;
1911
+ if (!ns && config.disableDbgExt !== true) {
1912
+ ns = _aiNamespace || _getExtensionNamespace();
1913
+ }
1914
+ return ns ? ns["ChromeDbgExt"] : null;
1915
+ }
1916
+
1917
+ var _a;
1918
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
1919
+ var AiNonUserActionablePrefix = "AI (Internal): ";
1920
+ var AiUserActionablePrefix = "AI: ";
1921
+ var AIInternalMessagePrefix = "AITR_";
1922
+ var defaultValues = {
1923
+ loggingLevelConsole: 0,
1924
+ loggingLevelTelemetry: 1,
1925
+ maxMessageLimit: 25,
1926
+ enableDebug: false
1927
+ };
1928
+ var _logFuncs = (_a = {},
1929
+ _a[0 ] = null,
1930
+ _a[1 ] = "errorToConsole",
1931
+ _a[2 ] = STR_WARN_TO_CONSOLE,
1932
+ _a[3 ] = "debugToConsole",
1933
+ _a);
1934
+ function _sanitizeDiagnosticText(text) {
1935
+ if (text) {
1936
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1937
+ }
1938
+ return STR_EMPTY;
1939
+ }
1940
+ function _logToConsole(func, message) {
1941
+ var theConsole = getConsole();
1942
+ if (!!theConsole) {
1943
+ var logFunc = "log";
1944
+ if (theConsole[func]) {
1945
+ logFunc = func;
1946
+ }
1947
+ if (isFunction(theConsole[logFunc])) {
1948
+ theConsole[logFunc](message);
1949
+ }
1950
+ }
1951
+ }
1952
+ var _InternalLogMessage = /** @class */ (function () {
1953
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1954
+ if (isUserAct === void 0) { isUserAct = false; }
1955
+ var _self = this;
1956
+ _self[_DYN_MESSAGE_ID ] = msgId;
1957
+ _self[_DYN_MESSAGE$1 ] =
1958
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1959
+ msgId;
1960
+ var strProps = STR_EMPTY;
1961
+ if (hasJSON()) {
1962
+ strProps = getJSON().stringify(properties);
1963
+ }
1964
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1965
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1966
+ _self[_DYN_MESSAGE$1 ] += diagnosticText;
1967
+ }
1968
+ _InternalLogMessage.dataType = "MessageData";
1969
+ return _InternalLogMessage;
1970
+ }());
1971
+ function safeGetLogger(core, config) {
1972
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1973
+ }
1974
+ var DiagnosticLogger = /** @class */ (function () {
1975
+ function DiagnosticLogger(config) {
1976
+ this.identifier = "DiagnosticLogger";
1977
+ this.queue = [];
1978
+ var _messageCount = 0;
1979
+ var _messageLogged = {};
1980
+ var _loggingLevelConsole;
1981
+ var _loggingLevelTelemetry;
1982
+ var _maxInternalMessageLimit;
1983
+ var _enableDebug;
1984
+ var _unloadHandler;
1985
+ dynamicProto(DiagnosticLogger, this, function (_self) {
1986
+ _unloadHandler = _setDefaultsFromConfig(config || {});
1987
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1988
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1989
+ if (isUserAct === void 0) { isUserAct = false; }
1990
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1991
+ if (_enableDebug) {
1992
+ throw dumpObj(message);
1993
+ }
1994
+ else {
1995
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1996
+ if (!isUndefined(message[_DYN_MESSAGE$1 ])) {
1997
+ if (isUserAct) {
1998
+ var messageKey = +message[_DYN_MESSAGE_ID ];
1999
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2000
+ _self[logFunc](message[_DYN_MESSAGE$1 ]);
2001
+ _messageLogged[messageKey] = true;
2002
+ }
2003
+ }
2004
+ else {
2005
+ if (_loggingLevelConsole >= severity) {
2006
+ _self[logFunc](message[_DYN_MESSAGE$1 ]);
2007
+ }
2008
+ }
2009
+ _logInternalMessage(severity, message);
2010
+ }
2011
+ else {
2012
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2013
+ }
2014
+ }
2015
+ };
2016
+ _self.debugToConsole = function (message) {
2017
+ _logToConsole("debug", message);
2018
+ _debugExtMsg("warning", message);
2019
+ };
2020
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2021
+ _logToConsole("warn", message);
2022
+ _debugExtMsg("warning", message);
2023
+ };
2024
+ _self.errorToConsole = function (message) {
2025
+ _logToConsole("error", message);
2026
+ _debugExtMsg("error", message);
2027
+ };
2028
+ _self.resetInternalMessageCount = function () {
2029
+ _messageCount = 0;
2030
+ _messageLogged = {};
2031
+ };
2032
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2033
+ _self[_DYN_UNLOAD ] = function (isAsync) {
2034
+ _unloadHandler && _unloadHandler.rm();
2035
+ _unloadHandler = null;
2036
+ };
2037
+ function _logInternalMessage(severity, message) {
2038
+ if (_areInternalMessagesThrottled()) {
2039
+ return;
2040
+ }
2041
+ var logMessage = true;
2042
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2043
+ if (_messageLogged[messageKey]) {
2044
+ logMessage = false;
2045
+ }
2046
+ else {
2047
+ _messageLogged[messageKey] = true;
2048
+ }
2049
+ if (logMessage) {
2050
+ if (severity <= _loggingLevelTelemetry) {
2051
+ _self.queue[_DYN_PUSH$1 ](message);
2052
+ _messageCount++;
2053
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2054
+ }
2055
+ if (_messageCount === _maxInternalMessageLimit) {
2056
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2057
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2058
+ _self.queue[_DYN_PUSH$1 ](throttleMessage);
2059
+ if (severity === 1 ) {
2060
+ _self.errorToConsole(throttleLimitMessage);
2061
+ }
2062
+ else {
2063
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2064
+ }
2065
+ }
2066
+ }
2067
+ }
2068
+ function _setDefaultsFromConfig(config) {
2069
+ return onConfigChange(createDynamicConfig(config, defaultValues, _self).cfg, function (details) {
2070
+ var config = details.cfg;
2071
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2072
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
2073
+ _maxInternalMessageLimit = config.maxMessageLimit;
2074
+ _enableDebug = config.enableDebug;
2075
+ });
2076
+ }
2077
+ function _areInternalMessagesThrottled() {
2078
+ return _messageCount >= _maxInternalMessageLimit;
2079
+ }
2080
+ function _debugExtMsg(name, data) {
2081
+ var dbgExt = getDebugExt(config || {});
2082
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2083
+ dbgExt[_DYN_DIAG_LOG ](name, data);
2084
+ }
2085
+ }
2086
+ });
2087
+ }
2088
+ DiagnosticLogger.__ieDyn=1;
2089
+ return DiagnosticLogger;
2090
+ }());
2091
+ function _getLogger(logger) {
2092
+ return (logger || new DiagnosticLogger());
2093
+ }
2094
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2095
+ if (isUserAct === void 0) { isUserAct = false; }
2096
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2097
+ }
2098
+
2114
2099
  function generateW3CId() {
2115
2100
  var hexValues = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
2116
2101
  var oct = STR_EMPTY, tmp;