@microsoft/applicationinsights-properties-js 3.1.1 → 3.1.3-nightly3.2403-15

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 (57) hide show
  1. package/browser/es5/{ai.props.3.1.1.cjs.js → ai.props.3.1.3-nightly3.2403-15.cjs.js} +401 -416
  2. package/browser/es5/ai.props.3.1.3-nightly3.2403-15.cjs.js.map +1 -0
  3. package/browser/es5/ai.props.3.1.3-nightly3.2403-15.cjs.min.js +6 -0
  4. package/browser/es5/ai.props.3.1.3-nightly3.2403-15.cjs.min.js.map +1 -0
  5. package/browser/es5/{ai.props.3.1.1.gbl.js → ai.props.3.1.3-nightly3.2403-15.gbl.js} +403 -418
  6. package/browser/es5/ai.props.3.1.3-nightly3.2403-15.gbl.js.map +1 -0
  7. package/browser/es5/ai.props.3.1.3-nightly3.2403-15.gbl.min.js +6 -0
  8. package/browser/es5/ai.props.3.1.3-nightly3.2403-15.gbl.min.js.map +1 -0
  9. package/browser/es5/ai.props.3.1.3-nightly3.2403-15.integrity.json +66 -0
  10. package/browser/es5/{ai.props.3.1.1.js → ai.props.3.1.3-nightly3.2403-15.js} +403 -418
  11. package/browser/es5/ai.props.3.1.3-nightly3.2403-15.js.map +1 -0
  12. package/browser/es5/ai.props.3.1.3-nightly3.2403-15.min.js +6 -0
  13. package/browser/es5/ai.props.3.1.3-nightly3.2403-15.min.js.map +1 -0
  14. package/browser/es5/ai.props.3.cjs.js +400 -415
  15. package/browser/es5/ai.props.3.cjs.js.map +1 -1
  16. package/browser/es5/ai.props.3.cjs.min.js +2 -2
  17. package/browser/es5/ai.props.3.cjs.min.js.map +1 -1
  18. package/browser/es5/ai.props.3.gbl.js +402 -417
  19. package/browser/es5/ai.props.3.gbl.js.map +1 -1
  20. package/browser/es5/ai.props.3.gbl.min.js +2 -2
  21. package/browser/es5/ai.props.3.gbl.min.js.map +1 -1
  22. package/browser/es5/ai.props.3.integrity.json +25 -25
  23. package/browser/es5/ai.props.3.js +402 -417
  24. package/browser/es5/ai.props.3.js.map +1 -1
  25. package/browser/es5/ai.props.3.min.js +2 -2
  26. package/browser/es5/ai.props.3.min.js.map +1 -1
  27. package/dist/es5/applicationinsights-properties-js.js +400 -415
  28. package/dist/es5/applicationinsights-properties-js.js.map +1 -1
  29. package/dist/es5/applicationinsights-properties-js.min.js +2 -2
  30. package/dist/es5/applicationinsights-properties-js.min.js.map +1 -1
  31. package/dist-es5/Context/Application.js +1 -1
  32. package/dist-es5/Context/Device.js +1 -1
  33. package/dist-es5/Context/Internal.js +2 -2
  34. package/dist-es5/Context/Internal.js.map +1 -1
  35. package/dist-es5/Context/Location.js +1 -1
  36. package/dist-es5/Context/Session.js +1 -1
  37. package/dist-es5/Context/TelemetryTrace.js +1 -1
  38. package/dist-es5/Context/User.js +1 -1
  39. package/dist-es5/Interfaces/IPropTelemetryContext.js +1 -1
  40. package/dist-es5/Interfaces/IPropertiesConfig.js +1 -1
  41. package/dist-es5/PropertiesPlugin.js +1 -1
  42. package/dist-es5/TelemetryContext.js +1 -1
  43. package/dist-es5/__DynamicConstants.js +1 -1
  44. package/dist-es5/applicationinsights-properties-js.js +1 -1
  45. package/package.json +69 -66
  46. package/types/applicationinsights-properties-js.d.ts +1 -1
  47. package/types/applicationinsights-properties-js.namespaced.d.ts +2 -1
  48. package/browser/es5/ai.props.3.1.1.cjs.js.map +0 -1
  49. package/browser/es5/ai.props.3.1.1.cjs.min.js +0 -6
  50. package/browser/es5/ai.props.3.1.1.cjs.min.js.map +0 -1
  51. package/browser/es5/ai.props.3.1.1.gbl.js.map +0 -1
  52. package/browser/es5/ai.props.3.1.1.gbl.min.js +0 -6
  53. package/browser/es5/ai.props.3.1.1.gbl.min.js.map +0 -1
  54. package/browser/es5/ai.props.3.1.1.integrity.json +0 -66
  55. package/browser/es5/ai.props.3.1.1.js.map +0 -1
  56. package/browser/es5/ai.props.3.1.1.min.js +0 -6
  57. package/browser/es5/ai.props.3.1.1.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Properties Plugin, 3.1.1
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.1.3-nightly3.2403-15
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  'use strict';
@@ -15,21 +15,15 @@ var UNDEF_VALUE = undefined;
15
15
  var NULL_VALUE = null;
16
16
  var EMPTY = "";
17
17
  var FUNCTION = "function";
18
- var NUMBER = "number";
19
18
  var OBJECT = "object";
20
19
  var PROTOTYPE = "prototype";
21
20
  var __PROTO__ = "__proto__";
22
- var STRING = "string";
23
21
  var UNDEFINED = "undefined";
24
22
  var CONSTRUCTOR = "constructor";
25
23
  var SYMBOL = "Symbol";
26
24
  var POLYFILL_TAG = "_polyfill";
27
- var INDEX_OF = "indexOf";
28
25
  var LENGTH = "length";
29
- var DONE = "done";
30
- var VALUE = "value";
31
26
  var NAME = "name";
32
- var SLICE = "slice";
33
27
  var CALL = "call";
34
28
  var TO_STRING = "toString";
35
29
  var ObjClass = Object;
@@ -39,6 +33,7 @@ var StrProto = StrCls[PROTOTYPE];
39
33
  var MathCls = Math;
40
34
  var ArrCls = Array;
41
35
  var ArrProto = ArrCls[PROTOTYPE];
36
+ var ArrSlice = ArrProto["slice"];
42
37
 
43
38
  function safe(func, argArray) {
44
39
  try {
@@ -51,6 +46,7 @@ function safe(func, argArray) {
51
46
  }
52
47
  }
53
48
 
49
+ /*#__NO_SIDE_EFFECTS__*/
54
50
  function safeGet(cb, defValue) {
55
51
  var result = safe(cb);
56
52
  return result.e ? defValue : result.v;
@@ -89,7 +85,7 @@ function isStrictNullOrUndefined(value) {
89
85
  function isDefined(arg) {
90
86
  return !!arg || arg !== UNDEF_VALUE;
91
87
  }
92
- var isString = ( /*#__PURE__*/_createIs(STRING));
88
+ var isString = ( /*#__PURE__*/_createIs("string"));
93
89
  var isFunction = ( /*#__PURE__*/_createIs(FUNCTION));
94
90
  /*#__NO_SIDE_EFFECTS__*/
95
91
  function isObject(value) {
@@ -195,6 +191,7 @@ var asString = StrCls;
195
191
 
196
192
  var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
197
193
  var _globalCfg;
194
+ /*#__NO_SIDE_EFFECTS__*/
198
195
  function _getGlobalValue() {
199
196
  var result;
200
197
  if (typeof globalThis !== UNDEFINED) {
@@ -229,7 +226,7 @@ function dumpObj(object, format) {
229
226
  object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
230
227
  }
231
228
  try {
232
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
229
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
233
230
  propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
234
231
  }
235
232
  catch (e) {
@@ -238,18 +235,15 @@ function dumpObj(object, format) {
238
235
  return objType + ": " + propertyValueDump;
239
236
  }
240
237
 
241
- var _slice;
242
- var _unwrapInstFunction = _unwrapFunctionWithPoly;
243
238
  var _unwrapFunction = _unwrapFunctionWithPoly;
244
239
  /*#__NO_SIDE_EFFECTS__*/
245
240
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
246
- _slice = _slice || ArrProto[SLICE];
247
241
  var clsFn = clsProto && clsProto[funcName];
248
242
  return function (thisArg) {
249
243
  var theFunc = (thisArg && thisArg[funcName]) || clsFn;
250
244
  if (theFunc || polyFunc) {
251
245
  var theArgs = arguments;
252
- return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
246
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
253
247
  }
254
248
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
255
249
  };
@@ -257,7 +251,7 @@ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
257
251
 
258
252
  var mathMax = MathCls.max;
259
253
 
260
- var strSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, StrProto));
254
+ var strSlice = ( /*#__PURE__*/_unwrapFunction("slice", StrProto));
261
255
 
262
256
  var strSubstring = ( /*#__PURE__*/_unwrapFunction("substring", StrProto));
263
257
  var strSubstr = ( /*#__PURE__*/_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
@@ -329,7 +323,7 @@ function polyGetKnownSymbol(name) {
329
323
  var propMap = {
330
324
  e: "enumerable",
331
325
  c: "configurable",
332
- v: VALUE,
326
+ v: "value",
333
327
  w: "writable",
334
328
  g: "get",
335
329
  s: "set"
@@ -362,6 +356,7 @@ var _globalLazyTestHooks;
362
356
  function _initTestHooks() {
363
357
  _globalLazyTestHooks = _getGlobalConfig();
364
358
  }
359
+ /*#__NO_SIDE_EFFECTS__*/
365
360
  function getLazy(cb) {
366
361
  var lazyValue = {};
367
362
  !_globalLazyTestHooks && _initTestHooks();
@@ -399,9 +394,14 @@ function createCachedValue(value) {
399
394
 
400
395
  var WINDOW = "window";
401
396
  var _cachedGlobal;
402
- var _cachedWindow;
403
- var _cachedDocument;
404
- var _cachedNavigator;
397
+ function _getGlobalInstFn(getFn, theArgs) {
398
+ var cachedValue;
399
+ return function () {
400
+ !_globalLazyTestHooks && _initTestHooks();
401
+ (!cachedValue || _globalLazyTestHooks.lzy) && (cachedValue = createCachedValue(safe(getFn, theArgs).v));
402
+ return cachedValue.v;
403
+ };
404
+ }
405
405
  /*#__NO_SIDE_EFFECTS__*/
406
406
  function lazySafeGetInst(name) {
407
407
  return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
@@ -418,33 +418,18 @@ function getInst(name, useCached) {
418
418
  if (gbl && gbl[name]) {
419
419
  return gbl[name];
420
420
  }
421
- if (name === WINDOW && _cachedWindow) {
422
- return _cachedWindow.v;
421
+ if (name === WINDOW) {
422
+ return getWindow();
423
423
  }
424
424
  return NULL_VALUE;
425
425
  }
426
- /*#__NO_SIDE_EFFECTS__*/
427
- function getDocument() {
428
- !_globalLazyTestHooks && _initTestHooks();
429
- (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
430
- return _cachedDocument.v;
431
- }
426
+ var getDocument = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["document"]));
432
427
  /*#__NO_SIDE_EFFECTS__*/
433
428
  function hasWindow() {
434
429
  return !!getWindow();
435
430
  }
436
- /*#__NO_SIDE_EFFECTS__*/
437
- function getWindow() {
438
- !_globalLazyTestHooks && _initTestHooks();
439
- (!_cachedWindow || _globalLazyTestHooks.lzy) && (_cachedWindow = createCachedValue(safe((getInst), [WINDOW]).v));
440
- return _cachedWindow.v;
441
- }
442
- /*#__NO_SIDE_EFFECTS__*/
443
- function getNavigator() {
444
- !_globalLazyTestHooks && _initTestHooks();
445
- (!_cachedNavigator || _globalLazyTestHooks.lzy) && (_cachedNavigator = createCachedValue(safe((getInst), ["navigator"]).v));
446
- return _cachedNavigator.v;
447
- }
431
+ var getWindow = ( /*#__PURE__*/_getGlobalInstFn(getInst, [WINDOW]));
432
+ var getNavigator = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["navigator"]));
448
433
 
449
434
  var _symbol;
450
435
  var _symbolFor;
@@ -495,8 +480,8 @@ function iterForOf(iter, callbackfn, thisArg) {
495
480
  var iterResult = void 0;
496
481
  try {
497
482
  var count = 0;
498
- while (!(iterResult = iter.next())[DONE]) {
499
- if (callbackfn[CALL](thisArg || iter, iterResult[VALUE], count, iter) === -1) {
483
+ while (!(iterResult = iter.next()).done) {
484
+ if (callbackfn[CALL](thisArg || iter, iterResult.value, count, iter) === -1) {
500
485
  break;
501
486
  }
502
487
  count++;
@@ -511,7 +496,7 @@ function iterForOf(iter, callbackfn, thisArg) {
511
496
  }
512
497
  finally {
513
498
  try {
514
- if (iterResult && !iterResult[DONE]) {
499
+ if (iterResult && !iterResult.done) {
515
500
  iter.return && iter.return(iterResult);
516
501
  }
517
502
  }
@@ -525,7 +510,9 @@ function iterForOf(iter, callbackfn, thisArg) {
525
510
  }
526
511
  }
527
512
 
528
- var fnApply = ( /*#__PURE__*/_unwrapInstFunction("apply"));
513
+ function fnApply(fn, thisArg, argArray) {
514
+ return fn.apply(thisArg, argArray);
515
+ }
529
516
 
530
517
  function arrAppend(target, elms) {
531
518
  if (!isUndefined(elms) && target) {
@@ -557,7 +544,7 @@ function arrForEach(theArray, callbackfn, thisArg) {
557
544
  }
558
545
  }
559
546
 
560
- var arrIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, ArrProto));
547
+ var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
561
548
 
562
549
  var objCreate = ObjClass["create"] || polyObjCreate;
563
550
  /*#__NO_SIDE_EFFECTS__*/
@@ -587,6 +574,7 @@ function objSetPrototypeOf(obj, proto) {
587
574
  return fn(obj, proto);
588
575
  }
589
576
 
577
+ /*#__NO_SIDE_EFFECTS__*/
590
578
  function _createCustomError(name, d, b) {
591
579
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
592
580
  d = objSetPrototypeOf(d, b);
@@ -610,7 +598,7 @@ function createCustomError(name, constructCb, errorBase) {
610
598
  var theArgs = arguments;
611
599
  try {
612
600
  safe(_setName, [theBaseClass, name]);
613
- var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
601
+ var _self = fnApply(theBaseClass, _this, ArrSlice[CALL](theArgs)) || _this;
614
602
  if (_self !== _this) {
615
603
  var orgProto = objGetPrototypeOf(_this);
616
604
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -696,58 +684,54 @@ function polyStrEndsWith(value, searchString, length) {
696
684
  return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
697
685
  }
698
686
 
699
- var strIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, StrProto));
687
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
700
688
 
701
689
  var REF = "ref";
702
- var UNREF = "un" + REF;
690
+ var UNREF = "unref";
703
691
  var HAS_REF = "hasRef";
704
692
  var ENABLED = "enabled";
693
+ /*#__NO_SIDE_EFFECTS__*/
705
694
  function _createTimerHandler(startTimer, refreshFn, cancelFn) {
706
- var _a;
707
695
  var ref = true;
708
696
  var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;
709
697
  var theTimerHandler;
710
- var _unref = function () {
698
+ function _unref() {
711
699
  ref = false;
712
700
  timerId && timerId[UNREF] && timerId[UNREF]();
713
701
  return theTimerHandler;
714
- };
715
- var _ref = function () {
716
- ref = true;
717
- timerId && timerId[REF] && timerId[REF]();
702
+ }
703
+ function _cancel() {
704
+ timerId && cancelFn(timerId);
705
+ timerId = NULL_VALUE;
706
+ }
707
+ function _refresh() {
708
+ timerId = refreshFn(timerId);
709
+ if (!ref) {
710
+ _unref();
711
+ }
718
712
  return theTimerHandler;
713
+ }
714
+ function _setEnabled(value) {
715
+ !value && timerId && _cancel();
716
+ value && !timerId && _refresh();
717
+ }
718
+ theTimerHandler = {
719
+ cancel: _cancel,
720
+ refresh: _refresh
719
721
  };
720
- var _hasRef = function () {
722
+ theTimerHandler[HAS_REF] = function () {
721
723
  if (timerId && timerId[HAS_REF]) {
722
724
  return timerId[HAS_REF]();
723
725
  }
724
726
  return ref;
725
727
  };
726
- var _refresh = function () {
727
- timerId = refreshFn(timerId);
728
- if (!ref) {
729
- _unref();
730
- }
728
+ theTimerHandler[REF] = function () {
729
+ ref = true;
730
+ timerId && timerId[REF] && timerId[REF]();
731
731
  return theTimerHandler;
732
732
  };
733
- var _cancel = function () {
734
- timerId && cancelFn(timerId);
735
- timerId = NULL_VALUE;
736
- };
737
- var _setEnabled = function (value) {
738
- !value && timerId && _cancel();
739
- value && !timerId && _refresh();
740
- };
741
- theTimerHandler = (_a = {
742
- cancel: _cancel,
743
- refresh: _refresh
744
- },
745
- _a[HAS_REF] = _hasRef,
746
- _a[REF] = _ref,
747
- _a[UNREF] = _unref,
748
- _a[ENABLED] = false,
749
- _a);
750
- objDefineProp(theTimerHandler, ENABLED, {
733
+ theTimerHandler[UNREF] = _unref;
734
+ theTimerHandler = objDefineProp(theTimerHandler, ENABLED, {
751
735
  get: function () { return !!timerId; },
752
736
  set: _setEnabled
753
737
  });
@@ -759,7 +743,7 @@ function _createTimerHandler(startTimer, refreshFn, cancelFn) {
759
743
  };
760
744
  }
761
745
 
762
- function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
746
+ function _createTimeoutWith(startTimer, overrideFn, theArgs) {
763
747
  var isArr = isArray(overrideFn);
764
748
  var len = isArr ? overrideFn.length : 0;
765
749
  var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
@@ -767,7 +751,7 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
767
751
  var timerFn = theArgs[0];
768
752
  theArgs[0] = function () {
769
753
  handler.dn();
770
- fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
754
+ fnApply(timerFn, UNDEF_VALUE, ArrSlice[CALL](arguments));
771
755
  };
772
756
  var handler = _createTimerHandler(startTimer, function (timerId) {
773
757
  if (timerId) {
@@ -775,16 +759,16 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
775
759
  timerId.refresh();
776
760
  return timerId;
777
761
  }
778
- fnApply(clearFn, self, [timerId]);
762
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
779
763
  }
780
- return fnApply(setFn, self, theArgs);
764
+ return fnApply(setFn, UNDEF_VALUE, theArgs);
781
765
  }, function (timerId) {
782
- fnApply(clearFn, self, [timerId]);
766
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
783
767
  });
784
768
  return handler.h;
785
769
  }
786
770
  function scheduleTimeout(callback, timeout) {
787
- return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
771
+ return _createTimeoutWith(true, UNDEF_VALUE, ArrSlice[CALL](arguments));
788
772
  }
789
773
 
790
774
  var strHasOwnProperty = "hasOwnProperty";
@@ -1087,7 +1071,7 @@ var _DYN_GET_PLUGIN = "getPlugin";
1087
1071
  var _DYN_NAME$1 = "name";
1088
1072
  var _DYN_TIME = "time";
1089
1073
  var _DYN_PROCESS_NEXT = "processNext";
1090
- var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
1074
+ var _DYN_GET_PROCESS_TEL_CONT2 = "getProcessTelContext";
1091
1075
  var _DYN_ENABLED = "enabled";
1092
1076
  var _DYN_UNLOAD = "unload";
1093
1077
  var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole";
@@ -1140,20 +1124,103 @@ var STR_DOMAIN = "domain";
1140
1124
  var STR_PATH = "path";
1141
1125
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1142
1126
 
1143
- var _aiNamespace = null;
1144
- function _getExtensionNamespace() {
1145
- var target = getInst("Microsoft");
1127
+ var rCamelCase = /-([a-z])/g;
1128
+ var rNormalizeInvalid = /([^\w\d_$])/g;
1129
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
1130
+ function isNotNullOrUndefined(value) {
1131
+ return !isNullOrUndefined(value);
1132
+ }
1133
+ function normalizeJsName(name) {
1134
+ var value = name;
1135
+ if (value && isString(value)) {
1136
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1137
+ return letter.toUpperCase();
1138
+ });
1139
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1140
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1141
+ return "_" + match;
1142
+ });
1143
+ }
1144
+ return value;
1145
+ }
1146
+ function strContains(value, search) {
1147
+ if (value && search) {
1148
+ return strIndexOf(value, search) !== -1;
1149
+ }
1150
+ return false;
1151
+ }
1152
+ function toISOString(date) {
1153
+ return date && date.toISOString() || "";
1154
+ }
1155
+ function getExceptionName(object) {
1156
+ if (isError(object)) {
1157
+ return object[_DYN_NAME$1 ];
1158
+ }
1159
+ return STR_EMPTY;
1160
+ }
1161
+ function setValue(target, field, value, valChk, srcChk) {
1162
+ var theValue = value;
1146
1163
  if (target) {
1147
- _aiNamespace = target["ApplicationInsights"];
1164
+ theValue = target[field];
1165
+ if (theValue !== value && (!srcChk || srcChk(theValue)) && (!valChk || valChk(value))) {
1166
+ theValue = value;
1167
+ target[field] = theValue;
1168
+ }
1148
1169
  }
1149
- return _aiNamespace;
1170
+ return theValue;
1150
1171
  }
1151
- function getDebugExt(config) {
1152
- var ns = _aiNamespace;
1153
- if (!ns && config.disableDbgExt !== true) {
1154
- ns = _aiNamespace || _getExtensionNamespace();
1172
+ function getSetValue(target, field, defValue) {
1173
+ var theValue;
1174
+ if (target) {
1175
+ theValue = target[field];
1176
+ if (!theValue && isNullOrUndefined(theValue)) {
1177
+ theValue = !isUndefined(defValue) ? defValue : {};
1178
+ target[field] = theValue;
1179
+ }
1155
1180
  }
1156
- return ns ? ns["ChromeDbgExt"] : null;
1181
+ else {
1182
+ theValue = !isUndefined(defValue) ? defValue : {};
1183
+ }
1184
+ return theValue;
1185
+ }
1186
+ function _createProxyFunction(source, funcName) {
1187
+ var srcFunc = null;
1188
+ var src = null;
1189
+ if (isFunction(source)) {
1190
+ srcFunc = source;
1191
+ }
1192
+ else {
1193
+ src = source;
1194
+ }
1195
+ return function () {
1196
+ var originalArguments = arguments;
1197
+ if (srcFunc) {
1198
+ src = srcFunc();
1199
+ }
1200
+ if (src) {
1201
+ return src[funcName][_DYN_APPLY ](src, originalArguments);
1202
+ }
1203
+ };
1204
+ }
1205
+ function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1206
+ if (target && name && source) {
1207
+ if (overwriteTarget !== false || isUndefined(target[name])) {
1208
+ target[name] = _createProxyFunction(source, theFunc);
1209
+ }
1210
+ }
1211
+ }
1212
+ function createClassFromInterface(defaults) {
1213
+ return /** @class */ (function () {
1214
+ function class_1() {
1215
+ var _this = this;
1216
+ if (defaults) {
1217
+ objForEachKey(defaults, function (field, value) {
1218
+ _this[field] = value;
1219
+ });
1220
+ }
1221
+ }
1222
+ return class_1;
1223
+ }());
1157
1224
  }
1158
1225
 
1159
1226
  var strLocation = "location";
@@ -1209,332 +1276,48 @@ function isIE() {
1209
1276
  return _isTrident;
1210
1277
  }
1211
1278
 
1212
- var _a$3;
1213
- var STR_WARN_TO_CONSOLE = "warnToConsole";
1214
- var AiNonUserActionablePrefix = "AI (Internal): ";
1215
- var AiUserActionablePrefix = "AI: ";
1216
- var AIInternalMessagePrefix = "AITR_";
1217
- var defaultValues$1 = {
1218
- loggingLevelConsole: 0,
1219
- loggingLevelTelemetry: 1,
1220
- maxMessageLimit: 25,
1221
- enableDebug: false
1222
- };
1223
- var _logFuncs = (_a$3 = {},
1224
- _a$3[0 ] = null,
1225
- _a$3[1 ] = "errorToConsole",
1226
- _a$3[2 ] = STR_WARN_TO_CONSOLE,
1227
- _a$3[3 ] = "debugToConsole",
1228
- _a$3);
1229
- function _sanitizeDiagnosticText(text) {
1230
- if (text) {
1231
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1279
+ var UInt32Mask = 0x100000000;
1280
+ var MaxUInt32 = 0xffffffff;
1281
+ var SEED1 = 123456789;
1282
+ var SEED2 = 987654321;
1283
+ var _mwcSeeded = false;
1284
+ var _mwcW = SEED1;
1285
+ var _mwcZ = SEED2;
1286
+ function _mwcSeed(seedValue) {
1287
+ if (seedValue < 0) {
1288
+ seedValue >>>= 0;
1232
1289
  }
1233
- return STR_EMPTY;
1290
+ _mwcW = (SEED1 + seedValue) & MaxUInt32;
1291
+ _mwcZ = (SEED2 - seedValue) & MaxUInt32;
1292
+ _mwcSeeded = true;
1234
1293
  }
1235
- function _logToConsole(func, message) {
1236
- var theConsole = getConsole();
1237
- if (!!theConsole) {
1238
- var logFunc = "log";
1239
- if (theConsole[func]) {
1240
- logFunc = func;
1241
- }
1242
- if (isFunction(theConsole[logFunc])) {
1243
- theConsole[logFunc](message);
1244
- }
1294
+ function _autoSeedMwc() {
1295
+ try {
1296
+ var now = utcNow() & 0x7fffffff;
1297
+ _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1298
+ }
1299
+ catch (e) {
1245
1300
  }
1246
1301
  }
1247
- var _InternalLogMessage = /** @class */ (function () {
1248
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1249
- if (isUserAct === void 0) { isUserAct = false; }
1250
- var _self = this;
1251
- _self[_DYN_MESSAGE_ID ] = msgId;
1252
- _self[_DYN_MESSAGE ] =
1253
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1254
- msgId;
1255
- var strProps = STR_EMPTY;
1256
- if (hasJSON()) {
1257
- strProps = getJSON().stringify(properties);
1302
+ function random32(signed) {
1303
+ var value = 0;
1304
+ var c = getCrypto() || getMsCrypto();
1305
+ if (c && c.getRandomValues) {
1306
+ value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1307
+ }
1308
+ if (value === 0 && isIE()) {
1309
+ if (!_mwcSeeded) {
1310
+ _autoSeedMwc();
1258
1311
  }
1259
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1260
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1261
- _self[_DYN_MESSAGE ] += diagnosticText;
1312
+ value = mwcRandom32() & MaxUInt32;
1262
1313
  }
1263
- _InternalLogMessage.dataType = "MessageData";
1264
- return _InternalLogMessage;
1265
- }());
1266
- function safeGetLogger(core, config) {
1267
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1268
- }
1269
- var DiagnosticLogger = /** @class */ (function () {
1270
- function DiagnosticLogger(config) {
1271
- this.identifier = "DiagnosticLogger";
1272
- this.queue = [];
1273
- var _messageCount = 0;
1274
- var _messageLogged = {};
1275
- var _loggingLevelConsole;
1276
- var _loggingLevelTelemetry;
1277
- var _maxInternalMessageLimit;
1278
- var _enableDebug;
1279
- var _unloadHandler;
1280
- dynamicProto(DiagnosticLogger, this, function (_self) {
1281
- _unloadHandler = _setDefaultsFromConfig(config || {});
1282
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1283
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1284
- if (isUserAct === void 0) { isUserAct = false; }
1285
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1286
- if (_enableDebug) {
1287
- throw dumpObj(message);
1288
- }
1289
- else {
1290
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1291
- if (!isUndefined(message[_DYN_MESSAGE ])) {
1292
- if (isUserAct) {
1293
- var messageKey = +message[_DYN_MESSAGE_ID ];
1294
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1295
- _self[logFunc](message[_DYN_MESSAGE ]);
1296
- _messageLogged[messageKey] = true;
1297
- }
1298
- }
1299
- else {
1300
- if (_loggingLevelConsole >= severity) {
1301
- _self[logFunc](message[_DYN_MESSAGE ]);
1302
- }
1303
- }
1304
- _logInternalMessage(severity, message);
1305
- }
1306
- else {
1307
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1308
- }
1309
- }
1310
- };
1311
- _self.debugToConsole = function (message) {
1312
- _logToConsole("debug", message);
1313
- _debugExtMsg("warning", message);
1314
- };
1315
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1316
- _logToConsole("warn", message);
1317
- _debugExtMsg("warning", message);
1318
- };
1319
- _self.errorToConsole = function (message) {
1320
- _logToConsole("error", message);
1321
- _debugExtMsg("error", message);
1322
- };
1323
- _self.resetInternalMessageCount = function () {
1324
- _messageCount = 0;
1325
- _messageLogged = {};
1326
- };
1327
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1328
- _self[_DYN_UNLOAD ] = function (isAsync) {
1329
- _unloadHandler && _unloadHandler.rm();
1330
- _unloadHandler = null;
1331
- };
1332
- function _logInternalMessage(severity, message) {
1333
- if (_areInternalMessagesThrottled()) {
1334
- return;
1335
- }
1336
- var logMessage = true;
1337
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1338
- if (_messageLogged[messageKey]) {
1339
- logMessage = false;
1340
- }
1341
- else {
1342
- _messageLogged[messageKey] = true;
1343
- }
1344
- if (logMessage) {
1345
- if (severity <= _loggingLevelTelemetry) {
1346
- _self.queue[_DYN_PUSH ](message);
1347
- _messageCount++;
1348
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1349
- }
1350
- if (_messageCount === _maxInternalMessageLimit) {
1351
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1352
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1353
- _self.queue[_DYN_PUSH ](throttleMessage);
1354
- if (severity === 1 ) {
1355
- _self.errorToConsole(throttleLimitMessage);
1356
- }
1357
- else {
1358
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1359
- }
1360
- }
1361
- }
1362
- }
1363
- function _setDefaultsFromConfig(config) {
1364
- return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
1365
- var config = details.cfg;
1366
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1367
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
1368
- _maxInternalMessageLimit = config.maxMessageLimit;
1369
- _enableDebug = config.enableDebug;
1370
- });
1371
- }
1372
- function _areInternalMessagesThrottled() {
1373
- return _messageCount >= _maxInternalMessageLimit;
1374
- }
1375
- function _debugExtMsg(name, data) {
1376
- var dbgExt = getDebugExt(config || {});
1377
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1378
- dbgExt[_DYN_DIAG_LOG ](name, data);
1379
- }
1380
- }
1381
- });
1382
- }
1383
- DiagnosticLogger.__ieDyn=1;
1384
- return DiagnosticLogger;
1385
- }());
1386
- function _getLogger(logger) {
1387
- return (logger || new DiagnosticLogger());
1388
- }
1389
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1390
- if (isUserAct === void 0) { isUserAct = false; }
1391
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1392
- }
1393
- function _logInternalMessage(logger, severity, message) {
1394
- _getLogger(logger)[_DYN_LOG_INTERNAL_MESSAGE ](severity, message);
1395
- }
1396
-
1397
- var rCamelCase = /-([a-z])/g;
1398
- var rNormalizeInvalid = /([^\w\d_$])/g;
1399
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
1400
- function isNotNullOrUndefined(value) {
1401
- return !isNullOrUndefined(value);
1402
- }
1403
- function normalizeJsName(name) {
1404
- var value = name;
1405
- if (value && isString(value)) {
1406
- value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1407
- return letter.toUpperCase();
1408
- });
1409
- value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1410
- value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1411
- return "_" + match;
1412
- });
1413
- }
1414
- return value;
1415
- }
1416
- function strContains(value, search) {
1417
- if (value && search) {
1418
- return strIndexOf(value, search) !== -1;
1419
- }
1420
- return false;
1421
- }
1422
- function toISOString(date) {
1423
- return date && date.toISOString() || "";
1424
- }
1425
- function getExceptionName(object) {
1426
- if (isError(object)) {
1427
- return object[_DYN_NAME$1 ];
1428
- }
1429
- return STR_EMPTY;
1430
- }
1431
- function setValue(target, field, value, valChk, srcChk) {
1432
- var theValue = value;
1433
- if (target) {
1434
- theValue = target[field];
1435
- if (theValue !== value && (!srcChk || srcChk(theValue)) && (!valChk || valChk(value))) {
1436
- theValue = value;
1437
- target[field] = theValue;
1438
- }
1439
- }
1440
- return theValue;
1441
- }
1442
- function getSetValue(target, field, defValue) {
1443
- var theValue;
1444
- if (target) {
1445
- theValue = target[field];
1446
- if (!theValue && isNullOrUndefined(theValue)) {
1447
- theValue = !isUndefined(defValue) ? defValue : {};
1448
- target[field] = theValue;
1449
- }
1450
- }
1451
- else {
1452
- theValue = !isUndefined(defValue) ? defValue : {};
1453
- }
1454
- return theValue;
1455
- }
1456
- function _createProxyFunction(source, funcName) {
1457
- var srcFunc = null;
1458
- var src = null;
1459
- if (isFunction(source)) {
1460
- srcFunc = source;
1461
- }
1462
- else {
1463
- src = source;
1464
- }
1465
- return function () {
1466
- var originalArguments = arguments;
1467
- if (srcFunc) {
1468
- src = srcFunc();
1469
- }
1470
- if (src) {
1471
- return src[funcName][_DYN_APPLY ](src, originalArguments);
1472
- }
1473
- };
1474
- }
1475
- function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1476
- if (target && name && source) {
1477
- if (overwriteTarget !== false || isUndefined(target[name])) {
1478
- target[name] = _createProxyFunction(source, theFunc);
1479
- }
1480
- }
1481
- }
1482
- function createClassFromInterface(defaults) {
1483
- return /** @class */ (function () {
1484
- function class_1() {
1485
- var _this = this;
1486
- if (defaults) {
1487
- objForEachKey(defaults, function (field, value) {
1488
- _this[field] = value;
1489
- });
1490
- }
1491
- }
1492
- return class_1;
1493
- }());
1494
- }
1495
-
1496
- var UInt32Mask = 0x100000000;
1497
- var MaxUInt32 = 0xffffffff;
1498
- var SEED1 = 123456789;
1499
- var SEED2 = 987654321;
1500
- var _mwcSeeded = false;
1501
- var _mwcW = SEED1;
1502
- var _mwcZ = SEED2;
1503
- function _mwcSeed(seedValue) {
1504
- if (seedValue < 0) {
1505
- seedValue >>>= 0;
1506
- }
1507
- _mwcW = (SEED1 + seedValue) & MaxUInt32;
1508
- _mwcZ = (SEED2 - seedValue) & MaxUInt32;
1509
- _mwcSeeded = true;
1510
- }
1511
- function _autoSeedMwc() {
1512
- try {
1513
- var now = utcNow() & 0x7fffffff;
1514
- _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1515
- }
1516
- catch (e) {
1517
- }
1518
- }
1519
- function random32(signed) {
1520
- var value = 0;
1521
- var c = getCrypto() || getMsCrypto();
1522
- if (c && c.getRandomValues) {
1523
- value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1524
- }
1525
- if (value === 0 && isIE()) {
1526
- if (!_mwcSeeded) {
1527
- _autoSeedMwc();
1528
- }
1529
- value = mwcRandom32() & MaxUInt32;
1530
- }
1531
- if (value === 0) {
1532
- value = Math.floor((UInt32Mask * Math.random()) | 0);
1533
- }
1534
- if (!signed) {
1535
- value >>>= 0;
1536
- }
1537
- return value;
1314
+ if (value === 0) {
1315
+ value = Math.floor((UInt32Mask * Math.random()) | 0);
1316
+ }
1317
+ if (!signed) {
1318
+ value >>>= 0;
1319
+ }
1320
+ return value;
1538
1321
  }
1539
1322
  function mwcRandom32(signed) {
1540
1323
  _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
@@ -2122,6 +1905,7 @@ function _createAndUseHandler(state, configHandler) {
2122
1905
  configHandler = null;
2123
1906
  }
2124
1907
  };
1908
+ objDefine(handler, "toJSON", { v: function () { return "WatcherHandler" + (handler.fn ? "" : "[X]"); } });
2125
1909
  state.use(handler, configHandler);
2126
1910
  return handler;
2127
1911
  }
@@ -2239,6 +2023,207 @@ function cfgDfMerge(defaultValue) {
2239
2023
  };
2240
2024
  }
2241
2025
 
2026
+ var _aiNamespace = null;
2027
+ function _getExtensionNamespace() {
2028
+ var target = getInst("Microsoft");
2029
+ if (target) {
2030
+ _aiNamespace = target["ApplicationInsights"];
2031
+ }
2032
+ return _aiNamespace;
2033
+ }
2034
+ function getDebugExt(config) {
2035
+ var ns = _aiNamespace;
2036
+ if (!ns && config.disableDbgExt !== true) {
2037
+ ns = _aiNamespace || _getExtensionNamespace();
2038
+ }
2039
+ return ns ? ns["ChromeDbgExt"] : null;
2040
+ }
2041
+
2042
+ var _a$3;
2043
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
2044
+ var AiNonUserActionablePrefix = "AI (Internal): ";
2045
+ var AiUserActionablePrefix = "AI: ";
2046
+ var AIInternalMessagePrefix = "AITR_";
2047
+ var defaultValues$1 = {
2048
+ loggingLevelConsole: 0,
2049
+ loggingLevelTelemetry: 1,
2050
+ maxMessageLimit: 25,
2051
+ enableDebug: false
2052
+ };
2053
+ var _logFuncs = (_a$3 = {},
2054
+ _a$3[0 ] = null,
2055
+ _a$3[1 ] = "errorToConsole",
2056
+ _a$3[2 ] = STR_WARN_TO_CONSOLE,
2057
+ _a$3[3 ] = "debugToConsole",
2058
+ _a$3);
2059
+ function _sanitizeDiagnosticText(text) {
2060
+ if (text) {
2061
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
2062
+ }
2063
+ return STR_EMPTY;
2064
+ }
2065
+ function _logToConsole(func, message) {
2066
+ var theConsole = getConsole();
2067
+ if (!!theConsole) {
2068
+ var logFunc = "log";
2069
+ if (theConsole[func]) {
2070
+ logFunc = func;
2071
+ }
2072
+ if (isFunction(theConsole[logFunc])) {
2073
+ theConsole[logFunc](message);
2074
+ }
2075
+ }
2076
+ }
2077
+ var _InternalLogMessage = /** @class */ (function () {
2078
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
2079
+ if (isUserAct === void 0) { isUserAct = false; }
2080
+ var _self = this;
2081
+ _self[_DYN_MESSAGE_ID ] = msgId;
2082
+ _self[_DYN_MESSAGE ] =
2083
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
2084
+ msgId;
2085
+ var strProps = STR_EMPTY;
2086
+ if (hasJSON()) {
2087
+ strProps = getJSON().stringify(properties);
2088
+ }
2089
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
2090
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
2091
+ _self[_DYN_MESSAGE ] += diagnosticText;
2092
+ }
2093
+ _InternalLogMessage.dataType = "MessageData";
2094
+ return _InternalLogMessage;
2095
+ }());
2096
+ function safeGetLogger(core, config) {
2097
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
2098
+ }
2099
+ var DiagnosticLogger = /** @class */ (function () {
2100
+ function DiagnosticLogger(config) {
2101
+ this.identifier = "DiagnosticLogger";
2102
+ this.queue = [];
2103
+ var _messageCount = 0;
2104
+ var _messageLogged = {};
2105
+ var _loggingLevelConsole;
2106
+ var _loggingLevelTelemetry;
2107
+ var _maxInternalMessageLimit;
2108
+ var _enableDebug;
2109
+ var _unloadHandler;
2110
+ dynamicProto(DiagnosticLogger, this, function (_self) {
2111
+ _unloadHandler = _setDefaultsFromConfig(config || {});
2112
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2113
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2114
+ if (isUserAct === void 0) { isUserAct = false; }
2115
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2116
+ if (_enableDebug) {
2117
+ throw dumpObj(message);
2118
+ }
2119
+ else {
2120
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2121
+ if (!isUndefined(message[_DYN_MESSAGE ])) {
2122
+ if (isUserAct) {
2123
+ var messageKey = +message[_DYN_MESSAGE_ID ];
2124
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2125
+ _self[logFunc](message[_DYN_MESSAGE ]);
2126
+ _messageLogged[messageKey] = true;
2127
+ }
2128
+ }
2129
+ else {
2130
+ if (_loggingLevelConsole >= severity) {
2131
+ _self[logFunc](message[_DYN_MESSAGE ]);
2132
+ }
2133
+ }
2134
+ _logInternalMessage(severity, message);
2135
+ }
2136
+ else {
2137
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2138
+ }
2139
+ }
2140
+ };
2141
+ _self.debugToConsole = function (message) {
2142
+ _logToConsole("debug", message);
2143
+ _debugExtMsg("warning", message);
2144
+ };
2145
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2146
+ _logToConsole("warn", message);
2147
+ _debugExtMsg("warning", message);
2148
+ };
2149
+ _self.errorToConsole = function (message) {
2150
+ _logToConsole("error", message);
2151
+ _debugExtMsg("error", message);
2152
+ };
2153
+ _self.resetInternalMessageCount = function () {
2154
+ _messageCount = 0;
2155
+ _messageLogged = {};
2156
+ };
2157
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2158
+ _self[_DYN_UNLOAD ] = function (isAsync) {
2159
+ _unloadHandler && _unloadHandler.rm();
2160
+ _unloadHandler = null;
2161
+ };
2162
+ function _logInternalMessage(severity, message) {
2163
+ if (_areInternalMessagesThrottled()) {
2164
+ return;
2165
+ }
2166
+ var logMessage = true;
2167
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2168
+ if (_messageLogged[messageKey]) {
2169
+ logMessage = false;
2170
+ }
2171
+ else {
2172
+ _messageLogged[messageKey] = true;
2173
+ }
2174
+ if (logMessage) {
2175
+ if (severity <= _loggingLevelTelemetry) {
2176
+ _self.queue[_DYN_PUSH ](message);
2177
+ _messageCount++;
2178
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2179
+ }
2180
+ if (_messageCount === _maxInternalMessageLimit) {
2181
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2182
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2183
+ _self.queue[_DYN_PUSH ](throttleMessage);
2184
+ if (severity === 1 ) {
2185
+ _self.errorToConsole(throttleLimitMessage);
2186
+ }
2187
+ else {
2188
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2189
+ }
2190
+ }
2191
+ }
2192
+ }
2193
+ function _setDefaultsFromConfig(config) {
2194
+ return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
2195
+ var config = details.cfg;
2196
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2197
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
2198
+ _maxInternalMessageLimit = config.maxMessageLimit;
2199
+ _enableDebug = config.enableDebug;
2200
+ });
2201
+ }
2202
+ function _areInternalMessagesThrottled() {
2203
+ return _messageCount >= _maxInternalMessageLimit;
2204
+ }
2205
+ function _debugExtMsg(name, data) {
2206
+ var dbgExt = getDebugExt(config || {});
2207
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2208
+ dbgExt[_DYN_DIAG_LOG ](name, data);
2209
+ }
2210
+ }
2211
+ });
2212
+ }
2213
+ DiagnosticLogger.__ieDyn=1;
2214
+ return DiagnosticLogger;
2215
+ }());
2216
+ function _getLogger(logger) {
2217
+ return (logger || new DiagnosticLogger());
2218
+ }
2219
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2220
+ if (isUserAct === void 0) { isUserAct = false; }
2221
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2222
+ }
2223
+ function _logInternalMessage(logger, severity, message) {
2224
+ _getLogger(logger)[_DYN_LOG_INTERNAL_MESSAGE ](severity, message);
2225
+ }
2226
+
2242
2227
  var _a$2, _b;
2243
2228
  var strToGMTString = "toGMTString";
2244
2229
  var strToUTCString = "toUTCString";
@@ -3214,7 +3199,7 @@ var BaseTelemetryPlugin = /** @class */ (function () {
3214
3199
  function _setDefaults(config, core, pluginChain) {
3215
3200
  createDynamicConfig(config, defaultValues, safeGetLogger(core));
3216
3201
  if (!pluginChain && core) {
3217
- pluginChain = core[_DYN_GET_PROCESS_TEL_CONT0 ]()[_DYN_GET_NEXT ]();
3202
+ pluginChain = core[_DYN_GET_PROCESS_TEL_CONT2 ]()[_DYN_GET_NEXT ]();
3218
3203
  }
3219
3204
  var nextPlugin = _nextPlugin;
3220
3205
  if (_nextPlugin && _nextPlugin[strGetPlugin]) {
@@ -3613,7 +3598,7 @@ var Device = /** @class */ (function () {
3613
3598
  return Device;
3614
3599
  }());
3615
3600
 
3616
- var Version = '3.1.1';
3601
+ var Version = '3.1.3-nightly3.2403-15';
3617
3602
  var Internal = /** @class */ (function () {
3618
3603
  function Internal(config, unloadHookContainer) {
3619
3604
  var _this = this;
@@ -4181,4 +4166,4 @@ exports.Session = Session;
4181
4166
  exports.SessionManager = _SessionManager;
4182
4167
  exports.TelemetryContext = TelemetryContext;
4183
4168
  exports.TelemetryTrace = TelemetryTrace;
4184
- //# sourceMappingURL=ai.props.3.1.1.cjs.js.map
4169
+ //# sourceMappingURL=ai.props.3.1.3-nightly3.2403-15.cjs.js.map