@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,11 +1,11 @@
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
  (function (global, factory) {
6
6
  var undef = "undefined";
7
- var nsKey, key, nm, theExports = {}, modName = "es5_ai_props_3_1_1", msMod="__ms$mod__";
8
- var mods={}, modDetail=mods[modName]={}, ver="3.1.1";
7
+ var nsKey, key, nm, theExports = {}, modName = "es5_ai_props_3_1_3_nightly3_2403_15", msMod="__ms$mod__";
8
+ var mods={}, modDetail=mods[modName]={}, ver="3.1.3-nightly3.2403-15";
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]||{});
@@ -36,21 +36,15 @@ var UNDEF_VALUE = undefined;
36
36
  var NULL_VALUE = null;
37
37
  var EMPTY = "";
38
38
  var FUNCTION = "function";
39
- var NUMBER = "number";
40
39
  var OBJECT = "object";
41
40
  var PROTOTYPE = "prototype";
42
41
  var __PROTO__ = "__proto__";
43
- var STRING = "string";
44
42
  var UNDEFINED = "undefined";
45
43
  var CONSTRUCTOR = "constructor";
46
44
  var SYMBOL = "Symbol";
47
45
  var POLYFILL_TAG = "_polyfill";
48
- var INDEX_OF = "indexOf";
49
46
  var LENGTH = "length";
50
- var DONE = "done";
51
- var VALUE = "value";
52
47
  var NAME = "name";
53
- var SLICE = "slice";
54
48
  var CALL = "call";
55
49
  var TO_STRING = "toString";
56
50
  var ObjClass = Object;
@@ -60,6 +54,7 @@ var StrProto = StrCls[PROTOTYPE];
60
54
  var MathCls = Math;
61
55
  var ArrCls = Array;
62
56
  var ArrProto = ArrCls[PROTOTYPE];
57
+ var ArrSlice = ArrProto["slice"];
63
58
 
64
59
  function safe(func, argArray) {
65
60
  try {
@@ -72,6 +67,7 @@ function safe(func, argArray) {
72
67
  }
73
68
  }
74
69
 
70
+ /*#__NO_SIDE_EFFECTS__*/
75
71
  function safeGet(cb, defValue) {
76
72
  var result = safe(cb);
77
73
  return result.e ? defValue : result.v;
@@ -110,7 +106,7 @@ function isStrictNullOrUndefined(value) {
110
106
  function isDefined(arg) {
111
107
  return !!arg || arg !== UNDEF_VALUE;
112
108
  }
113
- var isString = ( /*#__PURE__*/_createIs(STRING));
109
+ var isString = ( /*#__PURE__*/_createIs("string"));
114
110
  var isFunction = ( /*#__PURE__*/_createIs(FUNCTION));
115
111
  /*#__NO_SIDE_EFFECTS__*/
116
112
  function isObject(value) {
@@ -216,6 +212,7 @@ var asString = StrCls;
216
212
 
217
213
  var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
218
214
  var _globalCfg;
215
+ /*#__NO_SIDE_EFFECTS__*/
219
216
  function _getGlobalValue() {
220
217
  var result;
221
218
  if (typeof globalThis !== UNDEFINED) {
@@ -250,7 +247,7 @@ function dumpObj(object, format) {
250
247
  object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
251
248
  }
252
249
  try {
253
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
250
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
254
251
  propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
255
252
  }
256
253
  catch (e) {
@@ -259,18 +256,15 @@ function dumpObj(object, format) {
259
256
  return objType + ": " + propertyValueDump;
260
257
  }
261
258
 
262
- var _slice;
263
- var _unwrapInstFunction = _unwrapFunctionWithPoly;
264
259
  var _unwrapFunction = _unwrapFunctionWithPoly;
265
260
  /*#__NO_SIDE_EFFECTS__*/
266
261
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
267
- _slice = _slice || ArrProto[SLICE];
268
262
  var clsFn = clsProto && clsProto[funcName];
269
263
  return function (thisArg) {
270
264
  var theFunc = (thisArg && thisArg[funcName]) || clsFn;
271
265
  if (theFunc || polyFunc) {
272
266
  var theArgs = arguments;
273
- return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
267
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
274
268
  }
275
269
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
276
270
  };
@@ -278,7 +272,7 @@ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
278
272
 
279
273
  var mathMax = MathCls.max;
280
274
 
281
- var strSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, StrProto));
275
+ var strSlice = ( /*#__PURE__*/_unwrapFunction("slice", StrProto));
282
276
 
283
277
  var strSubstring = ( /*#__PURE__*/_unwrapFunction("substring", StrProto));
284
278
  var strSubstr = ( /*#__PURE__*/_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
@@ -350,7 +344,7 @@ function polyGetKnownSymbol(name) {
350
344
  var propMap = {
351
345
  e: "enumerable",
352
346
  c: "configurable",
353
- v: VALUE,
347
+ v: "value",
354
348
  w: "writable",
355
349
  g: "get",
356
350
  s: "set"
@@ -383,6 +377,7 @@ var _globalLazyTestHooks;
383
377
  function _initTestHooks() {
384
378
  _globalLazyTestHooks = _getGlobalConfig();
385
379
  }
380
+ /*#__NO_SIDE_EFFECTS__*/
386
381
  function getLazy(cb) {
387
382
  var lazyValue = {};
388
383
  !_globalLazyTestHooks && _initTestHooks();
@@ -420,9 +415,14 @@ function createCachedValue(value) {
420
415
 
421
416
  var WINDOW = "window";
422
417
  var _cachedGlobal;
423
- var _cachedWindow;
424
- var _cachedDocument;
425
- var _cachedNavigator;
418
+ function _getGlobalInstFn(getFn, theArgs) {
419
+ var cachedValue;
420
+ return function () {
421
+ !_globalLazyTestHooks && _initTestHooks();
422
+ (!cachedValue || _globalLazyTestHooks.lzy) && (cachedValue = createCachedValue(safe(getFn, theArgs).v));
423
+ return cachedValue.v;
424
+ };
425
+ }
426
426
  /*#__NO_SIDE_EFFECTS__*/
427
427
  function lazySafeGetInst(name) {
428
428
  return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
@@ -439,33 +439,18 @@ function getInst(name, useCached) {
439
439
  if (gbl && gbl[name]) {
440
440
  return gbl[name];
441
441
  }
442
- if (name === WINDOW && _cachedWindow) {
443
- return _cachedWindow.v;
442
+ if (name === WINDOW) {
443
+ return getWindow();
444
444
  }
445
445
  return NULL_VALUE;
446
446
  }
447
- /*#__NO_SIDE_EFFECTS__*/
448
- function getDocument() {
449
- !_globalLazyTestHooks && _initTestHooks();
450
- (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
451
- return _cachedDocument.v;
452
- }
447
+ var getDocument = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["document"]));
453
448
  /*#__NO_SIDE_EFFECTS__*/
454
449
  function hasWindow() {
455
450
  return !!getWindow();
456
451
  }
457
- /*#__NO_SIDE_EFFECTS__*/
458
- function getWindow() {
459
- !_globalLazyTestHooks && _initTestHooks();
460
- (!_cachedWindow || _globalLazyTestHooks.lzy) && (_cachedWindow = createCachedValue(safe((getInst), [WINDOW]).v));
461
- return _cachedWindow.v;
462
- }
463
- /*#__NO_SIDE_EFFECTS__*/
464
- function getNavigator() {
465
- !_globalLazyTestHooks && _initTestHooks();
466
- (!_cachedNavigator || _globalLazyTestHooks.lzy) && (_cachedNavigator = createCachedValue(safe((getInst), ["navigator"]).v));
467
- return _cachedNavigator.v;
468
- }
452
+ var getWindow = ( /*#__PURE__*/_getGlobalInstFn(getInst, [WINDOW]));
453
+ var getNavigator = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["navigator"]));
469
454
 
470
455
  var _symbol;
471
456
  var _symbolFor;
@@ -516,8 +501,8 @@ function iterForOf(iter, callbackfn, thisArg) {
516
501
  var iterResult = void 0;
517
502
  try {
518
503
  var count = 0;
519
- while (!(iterResult = iter.next())[DONE]) {
520
- if (callbackfn[CALL](thisArg || iter, iterResult[VALUE], count, iter) === -1) {
504
+ while (!(iterResult = iter.next()).done) {
505
+ if (callbackfn[CALL](thisArg || iter, iterResult.value, count, iter) === -1) {
521
506
  break;
522
507
  }
523
508
  count++;
@@ -532,7 +517,7 @@ function iterForOf(iter, callbackfn, thisArg) {
532
517
  }
533
518
  finally {
534
519
  try {
535
- if (iterResult && !iterResult[DONE]) {
520
+ if (iterResult && !iterResult.done) {
536
521
  iter.return && iter.return(iterResult);
537
522
  }
538
523
  }
@@ -546,7 +531,9 @@ function iterForOf(iter, callbackfn, thisArg) {
546
531
  }
547
532
  }
548
533
 
549
- var fnApply = ( /*#__PURE__*/_unwrapInstFunction("apply"));
534
+ function fnApply(fn, thisArg, argArray) {
535
+ return fn.apply(thisArg, argArray);
536
+ }
550
537
 
551
538
  function arrAppend(target, elms) {
552
539
  if (!isUndefined(elms) && target) {
@@ -578,7 +565,7 @@ function arrForEach(theArray, callbackfn, thisArg) {
578
565
  }
579
566
  }
580
567
 
581
- var arrIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, ArrProto));
568
+ var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
582
569
 
583
570
  var objCreate = ObjClass["create"] || polyObjCreate;
584
571
  /*#__NO_SIDE_EFFECTS__*/
@@ -608,6 +595,7 @@ function objSetPrototypeOf(obj, proto) {
608
595
  return fn(obj, proto);
609
596
  }
610
597
 
598
+ /*#__NO_SIDE_EFFECTS__*/
611
599
  function _createCustomError(name, d, b) {
612
600
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
613
601
  d = objSetPrototypeOf(d, b);
@@ -631,7 +619,7 @@ function createCustomError(name, constructCb, errorBase) {
631
619
  var theArgs = arguments;
632
620
  try {
633
621
  safe(_setName, [theBaseClass, name]);
634
- var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
622
+ var _self = fnApply(theBaseClass, _this, ArrSlice[CALL](theArgs)) || _this;
635
623
  if (_self !== _this) {
636
624
  var orgProto = objGetPrototypeOf(_this);
637
625
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -717,58 +705,54 @@ function polyStrEndsWith(value, searchString, length) {
717
705
  return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
718
706
  }
719
707
 
720
- var strIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, StrProto));
708
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
721
709
 
722
710
  var REF = "ref";
723
- var UNREF = "un" + REF;
711
+ var UNREF = "unref";
724
712
  var HAS_REF = "hasRef";
725
713
  var ENABLED = "enabled";
714
+ /*#__NO_SIDE_EFFECTS__*/
726
715
  function _createTimerHandler(startTimer, refreshFn, cancelFn) {
727
- var _a;
728
716
  var ref = true;
729
717
  var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;
730
718
  var theTimerHandler;
731
- var _unref = function () {
719
+ function _unref() {
732
720
  ref = false;
733
721
  timerId && timerId[UNREF] && timerId[UNREF]();
734
722
  return theTimerHandler;
735
- };
736
- var _ref = function () {
737
- ref = true;
738
- timerId && timerId[REF] && timerId[REF]();
723
+ }
724
+ function _cancel() {
725
+ timerId && cancelFn(timerId);
726
+ timerId = NULL_VALUE;
727
+ }
728
+ function _refresh() {
729
+ timerId = refreshFn(timerId);
730
+ if (!ref) {
731
+ _unref();
732
+ }
739
733
  return theTimerHandler;
734
+ }
735
+ function _setEnabled(value) {
736
+ !value && timerId && _cancel();
737
+ value && !timerId && _refresh();
738
+ }
739
+ theTimerHandler = {
740
+ cancel: _cancel,
741
+ refresh: _refresh
740
742
  };
741
- var _hasRef = function () {
743
+ theTimerHandler[HAS_REF] = function () {
742
744
  if (timerId && timerId[HAS_REF]) {
743
745
  return timerId[HAS_REF]();
744
746
  }
745
747
  return ref;
746
748
  };
747
- var _refresh = function () {
748
- timerId = refreshFn(timerId);
749
- if (!ref) {
750
- _unref();
751
- }
749
+ theTimerHandler[REF] = function () {
750
+ ref = true;
751
+ timerId && timerId[REF] && timerId[REF]();
752
752
  return theTimerHandler;
753
753
  };
754
- var _cancel = function () {
755
- timerId && cancelFn(timerId);
756
- timerId = NULL_VALUE;
757
- };
758
- var _setEnabled = function (value) {
759
- !value && timerId && _cancel();
760
- value && !timerId && _refresh();
761
- };
762
- theTimerHandler = (_a = {
763
- cancel: _cancel,
764
- refresh: _refresh
765
- },
766
- _a[HAS_REF] = _hasRef,
767
- _a[REF] = _ref,
768
- _a[UNREF] = _unref,
769
- _a[ENABLED] = false,
770
- _a);
771
- objDefineProp(theTimerHandler, ENABLED, {
754
+ theTimerHandler[UNREF] = _unref;
755
+ theTimerHandler = objDefineProp(theTimerHandler, ENABLED, {
772
756
  get: function () { return !!timerId; },
773
757
  set: _setEnabled
774
758
  });
@@ -780,7 +764,7 @@ function _createTimerHandler(startTimer, refreshFn, cancelFn) {
780
764
  };
781
765
  }
782
766
 
783
- function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
767
+ function _createTimeoutWith(startTimer, overrideFn, theArgs) {
784
768
  var isArr = isArray(overrideFn);
785
769
  var len = isArr ? overrideFn.length : 0;
786
770
  var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
@@ -788,7 +772,7 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
788
772
  var timerFn = theArgs[0];
789
773
  theArgs[0] = function () {
790
774
  handler.dn();
791
- fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
775
+ fnApply(timerFn, UNDEF_VALUE, ArrSlice[CALL](arguments));
792
776
  };
793
777
  var handler = _createTimerHandler(startTimer, function (timerId) {
794
778
  if (timerId) {
@@ -796,16 +780,16 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
796
780
  timerId.refresh();
797
781
  return timerId;
798
782
  }
799
- fnApply(clearFn, self, [timerId]);
783
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
800
784
  }
801
- return fnApply(setFn, self, theArgs);
785
+ return fnApply(setFn, UNDEF_VALUE, theArgs);
802
786
  }, function (timerId) {
803
- fnApply(clearFn, self, [timerId]);
787
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
804
788
  });
805
789
  return handler.h;
806
790
  }
807
791
  function scheduleTimeout(callback, timeout) {
808
- return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
792
+ return _createTimeoutWith(true, UNDEF_VALUE, ArrSlice[CALL](arguments));
809
793
  }
810
794
 
811
795
  var strHasOwnProperty = "hasOwnProperty";
@@ -1108,7 +1092,7 @@ var _DYN_GET_PLUGIN = "getPlugin";
1108
1092
  var _DYN_NAME$1 = "name";
1109
1093
  var _DYN_TIME = "time";
1110
1094
  var _DYN_PROCESS_NEXT = "processNext";
1111
- var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
1095
+ var _DYN_GET_PROCESS_TEL_CONT2 = "getProcessTelContext";
1112
1096
  var _DYN_ENABLED = "enabled";
1113
1097
  var _DYN_UNLOAD = "unload";
1114
1098
  var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole";
@@ -1161,20 +1145,103 @@ var STR_DOMAIN = "domain";
1161
1145
  var STR_PATH = "path";
1162
1146
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1163
1147
 
1164
- var _aiNamespace = null;
1165
- function _getExtensionNamespace() {
1166
- var target = getInst("Microsoft");
1148
+ var rCamelCase = /-([a-z])/g;
1149
+ var rNormalizeInvalid = /([^\w\d_$])/g;
1150
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
1151
+ function isNotNullOrUndefined(value) {
1152
+ return !isNullOrUndefined(value);
1153
+ }
1154
+ function normalizeJsName(name) {
1155
+ var value = name;
1156
+ if (value && isString(value)) {
1157
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1158
+ return letter.toUpperCase();
1159
+ });
1160
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1161
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1162
+ return "_" + match;
1163
+ });
1164
+ }
1165
+ return value;
1166
+ }
1167
+ function strContains(value, search) {
1168
+ if (value && search) {
1169
+ return strIndexOf(value, search) !== -1;
1170
+ }
1171
+ return false;
1172
+ }
1173
+ function toISOString(date) {
1174
+ return date && date.toISOString() || "";
1175
+ }
1176
+ function getExceptionName(object) {
1177
+ if (isError(object)) {
1178
+ return object[_DYN_NAME$1 ];
1179
+ }
1180
+ return STR_EMPTY;
1181
+ }
1182
+ function setValue(target, field, value, valChk, srcChk) {
1183
+ var theValue = value;
1167
1184
  if (target) {
1168
- _aiNamespace = target["ApplicationInsights"];
1185
+ theValue = target[field];
1186
+ if (theValue !== value && (!srcChk || srcChk(theValue)) && (!valChk || valChk(value))) {
1187
+ theValue = value;
1188
+ target[field] = theValue;
1189
+ }
1169
1190
  }
1170
- return _aiNamespace;
1191
+ return theValue;
1171
1192
  }
1172
- function getDebugExt(config) {
1173
- var ns = _aiNamespace;
1174
- if (!ns && config.disableDbgExt !== true) {
1175
- ns = _aiNamespace || _getExtensionNamespace();
1193
+ function getSetValue(target, field, defValue) {
1194
+ var theValue;
1195
+ if (target) {
1196
+ theValue = target[field];
1197
+ if (!theValue && isNullOrUndefined(theValue)) {
1198
+ theValue = !isUndefined(defValue) ? defValue : {};
1199
+ target[field] = theValue;
1200
+ }
1176
1201
  }
1177
- return ns ? ns["ChromeDbgExt"] : null;
1202
+ else {
1203
+ theValue = !isUndefined(defValue) ? defValue : {};
1204
+ }
1205
+ return theValue;
1206
+ }
1207
+ function _createProxyFunction(source, funcName) {
1208
+ var srcFunc = null;
1209
+ var src = null;
1210
+ if (isFunction(source)) {
1211
+ srcFunc = source;
1212
+ }
1213
+ else {
1214
+ src = source;
1215
+ }
1216
+ return function () {
1217
+ var originalArguments = arguments;
1218
+ if (srcFunc) {
1219
+ src = srcFunc();
1220
+ }
1221
+ if (src) {
1222
+ return src[funcName][_DYN_APPLY ](src, originalArguments);
1223
+ }
1224
+ };
1225
+ }
1226
+ function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1227
+ if (target && name && source) {
1228
+ if (overwriteTarget !== false || isUndefined(target[name])) {
1229
+ target[name] = _createProxyFunction(source, theFunc);
1230
+ }
1231
+ }
1232
+ }
1233
+ function createClassFromInterface(defaults) {
1234
+ return /** @class */ (function () {
1235
+ function class_1() {
1236
+ var _this = this;
1237
+ if (defaults) {
1238
+ objForEachKey(defaults, function (field, value) {
1239
+ _this[field] = value;
1240
+ });
1241
+ }
1242
+ }
1243
+ return class_1;
1244
+ }());
1178
1245
  }
1179
1246
 
1180
1247
  var strLocation = "location";
@@ -1230,332 +1297,48 @@ function isIE() {
1230
1297
  return _isTrident;
1231
1298
  }
1232
1299
 
1233
- var _a$3;
1234
- var STR_WARN_TO_CONSOLE = "warnToConsole";
1235
- var AiNonUserActionablePrefix = "AI (Internal): ";
1236
- var AiUserActionablePrefix = "AI: ";
1237
- var AIInternalMessagePrefix = "AITR_";
1238
- var defaultValues$1 = {
1239
- loggingLevelConsole: 0,
1240
- loggingLevelTelemetry: 1,
1241
- maxMessageLimit: 25,
1242
- enableDebug: false
1243
- };
1244
- var _logFuncs = (_a$3 = {},
1245
- _a$3[0 ] = null,
1246
- _a$3[1 ] = "errorToConsole",
1247
- _a$3[2 ] = STR_WARN_TO_CONSOLE,
1248
- _a$3[3 ] = "debugToConsole",
1249
- _a$3);
1250
- function _sanitizeDiagnosticText(text) {
1251
- if (text) {
1252
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1300
+ var UInt32Mask = 0x100000000;
1301
+ var MaxUInt32 = 0xffffffff;
1302
+ var SEED1 = 123456789;
1303
+ var SEED2 = 987654321;
1304
+ var _mwcSeeded = false;
1305
+ var _mwcW = SEED1;
1306
+ var _mwcZ = SEED2;
1307
+ function _mwcSeed(seedValue) {
1308
+ if (seedValue < 0) {
1309
+ seedValue >>>= 0;
1253
1310
  }
1254
- return STR_EMPTY;
1311
+ _mwcW = (SEED1 + seedValue) & MaxUInt32;
1312
+ _mwcZ = (SEED2 - seedValue) & MaxUInt32;
1313
+ _mwcSeeded = true;
1255
1314
  }
1256
- function _logToConsole(func, message) {
1257
- var theConsole = getConsole();
1258
- if (!!theConsole) {
1259
- var logFunc = "log";
1260
- if (theConsole[func]) {
1261
- logFunc = func;
1262
- }
1263
- if (isFunction(theConsole[logFunc])) {
1264
- theConsole[logFunc](message);
1265
- }
1315
+ function _autoSeedMwc() {
1316
+ try {
1317
+ var now = utcNow() & 0x7fffffff;
1318
+ _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1319
+ }
1320
+ catch (e) {
1266
1321
  }
1267
1322
  }
1268
- var _InternalLogMessage = /** @class */ (function () {
1269
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1270
- if (isUserAct === void 0) { isUserAct = false; }
1271
- var _self = this;
1272
- _self[_DYN_MESSAGE_ID ] = msgId;
1273
- _self[_DYN_MESSAGE ] =
1274
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1275
- msgId;
1276
- var strProps = STR_EMPTY;
1277
- if (hasJSON()) {
1278
- strProps = getJSON().stringify(properties);
1323
+ function random32(signed) {
1324
+ var value = 0;
1325
+ var c = getCrypto() || getMsCrypto();
1326
+ if (c && c.getRandomValues) {
1327
+ value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1328
+ }
1329
+ if (value === 0 && isIE()) {
1330
+ if (!_mwcSeeded) {
1331
+ _autoSeedMwc();
1279
1332
  }
1280
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1281
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1282
- _self[_DYN_MESSAGE ] += diagnosticText;
1333
+ value = mwcRandom32() & MaxUInt32;
1283
1334
  }
1284
- _InternalLogMessage.dataType = "MessageData";
1285
- return _InternalLogMessage;
1286
- }());
1287
- function safeGetLogger(core, config) {
1288
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1289
- }
1290
- var DiagnosticLogger = /** @class */ (function () {
1291
- function DiagnosticLogger(config) {
1292
- this.identifier = "DiagnosticLogger";
1293
- this.queue = [];
1294
- var _messageCount = 0;
1295
- var _messageLogged = {};
1296
- var _loggingLevelConsole;
1297
- var _loggingLevelTelemetry;
1298
- var _maxInternalMessageLimit;
1299
- var _enableDebug;
1300
- var _unloadHandler;
1301
- dynamicProto(DiagnosticLogger, this, function (_self) {
1302
- _unloadHandler = _setDefaultsFromConfig(config || {});
1303
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1304
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1305
- if (isUserAct === void 0) { isUserAct = false; }
1306
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1307
- if (_enableDebug) {
1308
- throw dumpObj(message);
1309
- }
1310
- else {
1311
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1312
- if (!isUndefined(message[_DYN_MESSAGE ])) {
1313
- if (isUserAct) {
1314
- var messageKey = +message[_DYN_MESSAGE_ID ];
1315
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1316
- _self[logFunc](message[_DYN_MESSAGE ]);
1317
- _messageLogged[messageKey] = true;
1318
- }
1319
- }
1320
- else {
1321
- if (_loggingLevelConsole >= severity) {
1322
- _self[logFunc](message[_DYN_MESSAGE ]);
1323
- }
1324
- }
1325
- _logInternalMessage(severity, message);
1326
- }
1327
- else {
1328
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1329
- }
1330
- }
1331
- };
1332
- _self.debugToConsole = function (message) {
1333
- _logToConsole("debug", message);
1334
- _debugExtMsg("warning", message);
1335
- };
1336
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1337
- _logToConsole("warn", message);
1338
- _debugExtMsg("warning", message);
1339
- };
1340
- _self.errorToConsole = function (message) {
1341
- _logToConsole("error", message);
1342
- _debugExtMsg("error", message);
1343
- };
1344
- _self.resetInternalMessageCount = function () {
1345
- _messageCount = 0;
1346
- _messageLogged = {};
1347
- };
1348
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1349
- _self[_DYN_UNLOAD ] = function (isAsync) {
1350
- _unloadHandler && _unloadHandler.rm();
1351
- _unloadHandler = null;
1352
- };
1353
- function _logInternalMessage(severity, message) {
1354
- if (_areInternalMessagesThrottled()) {
1355
- return;
1356
- }
1357
- var logMessage = true;
1358
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1359
- if (_messageLogged[messageKey]) {
1360
- logMessage = false;
1361
- }
1362
- else {
1363
- _messageLogged[messageKey] = true;
1364
- }
1365
- if (logMessage) {
1366
- if (severity <= _loggingLevelTelemetry) {
1367
- _self.queue[_DYN_PUSH ](message);
1368
- _messageCount++;
1369
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1370
- }
1371
- if (_messageCount === _maxInternalMessageLimit) {
1372
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1373
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1374
- _self.queue[_DYN_PUSH ](throttleMessage);
1375
- if (severity === 1 ) {
1376
- _self.errorToConsole(throttleLimitMessage);
1377
- }
1378
- else {
1379
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1380
- }
1381
- }
1382
- }
1383
- }
1384
- function _setDefaultsFromConfig(config) {
1385
- return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
1386
- var config = details.cfg;
1387
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1388
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
1389
- _maxInternalMessageLimit = config.maxMessageLimit;
1390
- _enableDebug = config.enableDebug;
1391
- });
1392
- }
1393
- function _areInternalMessagesThrottled() {
1394
- return _messageCount >= _maxInternalMessageLimit;
1395
- }
1396
- function _debugExtMsg(name, data) {
1397
- var dbgExt = getDebugExt(config || {});
1398
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1399
- dbgExt[_DYN_DIAG_LOG ](name, data);
1400
- }
1401
- }
1402
- });
1403
- }
1404
- DiagnosticLogger.__ieDyn=1;
1405
- return DiagnosticLogger;
1406
- }());
1407
- function _getLogger(logger) {
1408
- return (logger || new DiagnosticLogger());
1409
- }
1410
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1411
- if (isUserAct === void 0) { isUserAct = false; }
1412
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1413
- }
1414
- function _logInternalMessage(logger, severity, message) {
1415
- _getLogger(logger)[_DYN_LOG_INTERNAL_MESSAGE ](severity, message);
1416
- }
1417
-
1418
- var rCamelCase = /-([a-z])/g;
1419
- var rNormalizeInvalid = /([^\w\d_$])/g;
1420
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
1421
- function isNotNullOrUndefined(value) {
1422
- return !isNullOrUndefined(value);
1423
- }
1424
- function normalizeJsName(name) {
1425
- var value = name;
1426
- if (value && isString(value)) {
1427
- value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1428
- return letter.toUpperCase();
1429
- });
1430
- value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1431
- value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1432
- return "_" + match;
1433
- });
1434
- }
1435
- return value;
1436
- }
1437
- function strContains(value, search) {
1438
- if (value && search) {
1439
- return strIndexOf(value, search) !== -1;
1440
- }
1441
- return false;
1442
- }
1443
- function toISOString(date) {
1444
- return date && date.toISOString() || "";
1445
- }
1446
- function getExceptionName(object) {
1447
- if (isError(object)) {
1448
- return object[_DYN_NAME$1 ];
1449
- }
1450
- return STR_EMPTY;
1451
- }
1452
- function setValue(target, field, value, valChk, srcChk) {
1453
- var theValue = value;
1454
- if (target) {
1455
- theValue = target[field];
1456
- if (theValue !== value && (!srcChk || srcChk(theValue)) && (!valChk || valChk(value))) {
1457
- theValue = value;
1458
- target[field] = theValue;
1459
- }
1460
- }
1461
- return theValue;
1462
- }
1463
- function getSetValue(target, field, defValue) {
1464
- var theValue;
1465
- if (target) {
1466
- theValue = target[field];
1467
- if (!theValue && isNullOrUndefined(theValue)) {
1468
- theValue = !isUndefined(defValue) ? defValue : {};
1469
- target[field] = theValue;
1470
- }
1471
- }
1472
- else {
1473
- theValue = !isUndefined(defValue) ? defValue : {};
1474
- }
1475
- return theValue;
1476
- }
1477
- function _createProxyFunction(source, funcName) {
1478
- var srcFunc = null;
1479
- var src = null;
1480
- if (isFunction(source)) {
1481
- srcFunc = source;
1482
- }
1483
- else {
1484
- src = source;
1485
- }
1486
- return function () {
1487
- var originalArguments = arguments;
1488
- if (srcFunc) {
1489
- src = srcFunc();
1490
- }
1491
- if (src) {
1492
- return src[funcName][_DYN_APPLY ](src, originalArguments);
1493
- }
1494
- };
1495
- }
1496
- function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1497
- if (target && name && source) {
1498
- if (overwriteTarget !== false || isUndefined(target[name])) {
1499
- target[name] = _createProxyFunction(source, theFunc);
1500
- }
1501
- }
1502
- }
1503
- function createClassFromInterface(defaults) {
1504
- return /** @class */ (function () {
1505
- function class_1() {
1506
- var _this = this;
1507
- if (defaults) {
1508
- objForEachKey(defaults, function (field, value) {
1509
- _this[field] = value;
1510
- });
1511
- }
1512
- }
1513
- return class_1;
1514
- }());
1515
- }
1516
-
1517
- var UInt32Mask = 0x100000000;
1518
- var MaxUInt32 = 0xffffffff;
1519
- var SEED1 = 123456789;
1520
- var SEED2 = 987654321;
1521
- var _mwcSeeded = false;
1522
- var _mwcW = SEED1;
1523
- var _mwcZ = SEED2;
1524
- function _mwcSeed(seedValue) {
1525
- if (seedValue < 0) {
1526
- seedValue >>>= 0;
1527
- }
1528
- _mwcW = (SEED1 + seedValue) & MaxUInt32;
1529
- _mwcZ = (SEED2 - seedValue) & MaxUInt32;
1530
- _mwcSeeded = true;
1531
- }
1532
- function _autoSeedMwc() {
1533
- try {
1534
- var now = utcNow() & 0x7fffffff;
1535
- _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1536
- }
1537
- catch (e) {
1538
- }
1539
- }
1540
- function random32(signed) {
1541
- var value = 0;
1542
- var c = getCrypto() || getMsCrypto();
1543
- if (c && c.getRandomValues) {
1544
- value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1545
- }
1546
- if (value === 0 && isIE()) {
1547
- if (!_mwcSeeded) {
1548
- _autoSeedMwc();
1549
- }
1550
- value = mwcRandom32() & MaxUInt32;
1551
- }
1552
- if (value === 0) {
1553
- value = Math.floor((UInt32Mask * Math.random()) | 0);
1554
- }
1555
- if (!signed) {
1556
- value >>>= 0;
1557
- }
1558
- return value;
1335
+ if (value === 0) {
1336
+ value = Math.floor((UInt32Mask * Math.random()) | 0);
1337
+ }
1338
+ if (!signed) {
1339
+ value >>>= 0;
1340
+ }
1341
+ return value;
1559
1342
  }
1560
1343
  function mwcRandom32(signed) {
1561
1344
  _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
@@ -2143,6 +1926,7 @@ function _createAndUseHandler(state, configHandler) {
2143
1926
  configHandler = null;
2144
1927
  }
2145
1928
  };
1929
+ objDefine(handler, "toJSON", { v: function () { return "WatcherHandler" + (handler.fn ? "" : "[X]"); } });
2146
1930
  state.use(handler, configHandler);
2147
1931
  return handler;
2148
1932
  }
@@ -2260,6 +2044,207 @@ function cfgDfMerge(defaultValue) {
2260
2044
  };
2261
2045
  }
2262
2046
 
2047
+ var _aiNamespace = null;
2048
+ function _getExtensionNamespace() {
2049
+ var target = getInst("Microsoft");
2050
+ if (target) {
2051
+ _aiNamespace = target["ApplicationInsights"];
2052
+ }
2053
+ return _aiNamespace;
2054
+ }
2055
+ function getDebugExt(config) {
2056
+ var ns = _aiNamespace;
2057
+ if (!ns && config.disableDbgExt !== true) {
2058
+ ns = _aiNamespace || _getExtensionNamespace();
2059
+ }
2060
+ return ns ? ns["ChromeDbgExt"] : null;
2061
+ }
2062
+
2063
+ var _a$3;
2064
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
2065
+ var AiNonUserActionablePrefix = "AI (Internal): ";
2066
+ var AiUserActionablePrefix = "AI: ";
2067
+ var AIInternalMessagePrefix = "AITR_";
2068
+ var defaultValues$1 = {
2069
+ loggingLevelConsole: 0,
2070
+ loggingLevelTelemetry: 1,
2071
+ maxMessageLimit: 25,
2072
+ enableDebug: false
2073
+ };
2074
+ var _logFuncs = (_a$3 = {},
2075
+ _a$3[0 ] = null,
2076
+ _a$3[1 ] = "errorToConsole",
2077
+ _a$3[2 ] = STR_WARN_TO_CONSOLE,
2078
+ _a$3[3 ] = "debugToConsole",
2079
+ _a$3);
2080
+ function _sanitizeDiagnosticText(text) {
2081
+ if (text) {
2082
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
2083
+ }
2084
+ return STR_EMPTY;
2085
+ }
2086
+ function _logToConsole(func, message) {
2087
+ var theConsole = getConsole();
2088
+ if (!!theConsole) {
2089
+ var logFunc = "log";
2090
+ if (theConsole[func]) {
2091
+ logFunc = func;
2092
+ }
2093
+ if (isFunction(theConsole[logFunc])) {
2094
+ theConsole[logFunc](message);
2095
+ }
2096
+ }
2097
+ }
2098
+ var _InternalLogMessage = /** @class */ (function () {
2099
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
2100
+ if (isUserAct === void 0) { isUserAct = false; }
2101
+ var _self = this;
2102
+ _self[_DYN_MESSAGE_ID ] = msgId;
2103
+ _self[_DYN_MESSAGE ] =
2104
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
2105
+ msgId;
2106
+ var strProps = STR_EMPTY;
2107
+ if (hasJSON()) {
2108
+ strProps = getJSON().stringify(properties);
2109
+ }
2110
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
2111
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
2112
+ _self[_DYN_MESSAGE ] += diagnosticText;
2113
+ }
2114
+ _InternalLogMessage.dataType = "MessageData";
2115
+ return _InternalLogMessage;
2116
+ }());
2117
+ function safeGetLogger(core, config) {
2118
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
2119
+ }
2120
+ var DiagnosticLogger = /** @class */ (function () {
2121
+ function DiagnosticLogger(config) {
2122
+ this.identifier = "DiagnosticLogger";
2123
+ this.queue = [];
2124
+ var _messageCount = 0;
2125
+ var _messageLogged = {};
2126
+ var _loggingLevelConsole;
2127
+ var _loggingLevelTelemetry;
2128
+ var _maxInternalMessageLimit;
2129
+ var _enableDebug;
2130
+ var _unloadHandler;
2131
+ dynamicProto(DiagnosticLogger, this, function (_self) {
2132
+ _unloadHandler = _setDefaultsFromConfig(config || {});
2133
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2134
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2135
+ if (isUserAct === void 0) { isUserAct = false; }
2136
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2137
+ if (_enableDebug) {
2138
+ throw dumpObj(message);
2139
+ }
2140
+ else {
2141
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2142
+ if (!isUndefined(message[_DYN_MESSAGE ])) {
2143
+ if (isUserAct) {
2144
+ var messageKey = +message[_DYN_MESSAGE_ID ];
2145
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2146
+ _self[logFunc](message[_DYN_MESSAGE ]);
2147
+ _messageLogged[messageKey] = true;
2148
+ }
2149
+ }
2150
+ else {
2151
+ if (_loggingLevelConsole >= severity) {
2152
+ _self[logFunc](message[_DYN_MESSAGE ]);
2153
+ }
2154
+ }
2155
+ _logInternalMessage(severity, message);
2156
+ }
2157
+ else {
2158
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2159
+ }
2160
+ }
2161
+ };
2162
+ _self.debugToConsole = function (message) {
2163
+ _logToConsole("debug", message);
2164
+ _debugExtMsg("warning", message);
2165
+ };
2166
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2167
+ _logToConsole("warn", message);
2168
+ _debugExtMsg("warning", message);
2169
+ };
2170
+ _self.errorToConsole = function (message) {
2171
+ _logToConsole("error", message);
2172
+ _debugExtMsg("error", message);
2173
+ };
2174
+ _self.resetInternalMessageCount = function () {
2175
+ _messageCount = 0;
2176
+ _messageLogged = {};
2177
+ };
2178
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2179
+ _self[_DYN_UNLOAD ] = function (isAsync) {
2180
+ _unloadHandler && _unloadHandler.rm();
2181
+ _unloadHandler = null;
2182
+ };
2183
+ function _logInternalMessage(severity, message) {
2184
+ if (_areInternalMessagesThrottled()) {
2185
+ return;
2186
+ }
2187
+ var logMessage = true;
2188
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2189
+ if (_messageLogged[messageKey]) {
2190
+ logMessage = false;
2191
+ }
2192
+ else {
2193
+ _messageLogged[messageKey] = true;
2194
+ }
2195
+ if (logMessage) {
2196
+ if (severity <= _loggingLevelTelemetry) {
2197
+ _self.queue[_DYN_PUSH ](message);
2198
+ _messageCount++;
2199
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2200
+ }
2201
+ if (_messageCount === _maxInternalMessageLimit) {
2202
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2203
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2204
+ _self.queue[_DYN_PUSH ](throttleMessage);
2205
+ if (severity === 1 ) {
2206
+ _self.errorToConsole(throttleLimitMessage);
2207
+ }
2208
+ else {
2209
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2210
+ }
2211
+ }
2212
+ }
2213
+ }
2214
+ function _setDefaultsFromConfig(config) {
2215
+ return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
2216
+ var config = details.cfg;
2217
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2218
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
2219
+ _maxInternalMessageLimit = config.maxMessageLimit;
2220
+ _enableDebug = config.enableDebug;
2221
+ });
2222
+ }
2223
+ function _areInternalMessagesThrottled() {
2224
+ return _messageCount >= _maxInternalMessageLimit;
2225
+ }
2226
+ function _debugExtMsg(name, data) {
2227
+ var dbgExt = getDebugExt(config || {});
2228
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2229
+ dbgExt[_DYN_DIAG_LOG ](name, data);
2230
+ }
2231
+ }
2232
+ });
2233
+ }
2234
+ DiagnosticLogger.__ieDyn=1;
2235
+ return DiagnosticLogger;
2236
+ }());
2237
+ function _getLogger(logger) {
2238
+ return (logger || new DiagnosticLogger());
2239
+ }
2240
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2241
+ if (isUserAct === void 0) { isUserAct = false; }
2242
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2243
+ }
2244
+ function _logInternalMessage(logger, severity, message) {
2245
+ _getLogger(logger)[_DYN_LOG_INTERNAL_MESSAGE ](severity, message);
2246
+ }
2247
+
2263
2248
  var _a$2, _b;
2264
2249
  var strToGMTString = "toGMTString";
2265
2250
  var strToUTCString = "toUTCString";
@@ -3235,7 +3220,7 @@ var BaseTelemetryPlugin = /** @class */ (function () {
3235
3220
  function _setDefaults(config, core, pluginChain) {
3236
3221
  createDynamicConfig(config, defaultValues, safeGetLogger(core));
3237
3222
  if (!pluginChain && core) {
3238
- pluginChain = core[_DYN_GET_PROCESS_TEL_CONT0 ]()[_DYN_GET_NEXT ]();
3223
+ pluginChain = core[_DYN_GET_PROCESS_TEL_CONT2 ]()[_DYN_GET_NEXT ]();
3239
3224
  }
3240
3225
  var nextPlugin = _nextPlugin;
3241
3226
  if (_nextPlugin && _nextPlugin[strGetPlugin]) {
@@ -3634,7 +3619,7 @@ var Device = /** @class */ (function () {
3634
3619
  return Device;
3635
3620
  }());
3636
3621
 
3637
- var Version = '3.1.1';
3622
+ var Version = '3.1.3-nightly3.2403-15';
3638
3623
  var Internal = /** @class */ (function () {
3639
3624
  function Internal(config, unloadHookContainer) {
3640
3625
  var _this = this;
@@ -4204,4 +4189,4 @@ exports.TelemetryContext = TelemetryContext;
4204
4189
  exports.TelemetryTrace = TelemetryTrace;
4205
4190
 
4206
4191
  }));
4207
- //# sourceMappingURL=ai.props.3.1.1.gbl.js.map
4192
+ //# sourceMappingURL=ai.props.3.1.3-nightly3.2403-15.gbl.js.map