@microsoft/applicationinsights-debugplugin-js 2.7.5-nightly.2204-03 → 2.7.6

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 (65) hide show
  1. package/browser/{ai.dbg.2.7.5-nightly.2204-03.cjs.js → ai.dbg.2.7.6.cjs.js} +491 -1046
  2. package/browser/ai.dbg.2.7.6.cjs.js.map +1 -0
  3. package/browser/ai.dbg.2.7.6.cjs.min.js +6 -0
  4. package/browser/ai.dbg.2.7.6.cjs.min.js.map +1 -0
  5. package/browser/{ai.dbg.2.7.5-nightly.2204-03.gbl.js → ai.dbg.2.7.6.gbl.js} +491 -1046
  6. package/browser/ai.dbg.2.7.6.gbl.js.map +1 -0
  7. package/browser/ai.dbg.2.7.6.gbl.min.js +6 -0
  8. package/browser/ai.dbg.2.7.6.gbl.min.js.map +1 -0
  9. package/browser/ai.dbg.2.7.6.integrity.json +66 -0
  10. package/browser/{ai.dbg.2.7.5-nightly.2204-03.js → ai.dbg.2.7.6.js} +491 -1046
  11. package/browser/ai.dbg.2.7.6.js.map +1 -0
  12. package/browser/ai.dbg.2.7.6.min.js +6 -0
  13. package/browser/ai.dbg.2.7.6.min.js.map +1 -0
  14. package/browser/ai.dbg.2.cjs.js +490 -1045
  15. package/browser/ai.dbg.2.cjs.js.map +1 -1
  16. package/browser/ai.dbg.2.cjs.min.js +2 -2
  17. package/browser/ai.dbg.2.cjs.min.js.map +1 -1
  18. package/browser/ai.dbg.2.gbl.js +490 -1045
  19. package/browser/ai.dbg.2.gbl.js.map +1 -1
  20. package/browser/ai.dbg.2.gbl.min.js +2 -2
  21. package/browser/ai.dbg.2.gbl.min.js.map +1 -1
  22. package/browser/ai.dbg.2.js +490 -1045
  23. package/browser/ai.dbg.2.js.map +1 -1
  24. package/browser/ai.dbg.2.min.js +2 -2
  25. package/browser/ai.dbg.2.min.js.map +1 -1
  26. package/dist/applicationinsights-debugplugin-js.api.json +17 -10
  27. package/dist/applicationinsights-debugplugin-js.d.ts +1 -1
  28. package/dist/applicationinsights-debugplugin-js.js +490 -1045
  29. package/dist/applicationinsights-debugplugin-js.js.map +1 -1
  30. package/dist/applicationinsights-debugplugin-js.min.js +2 -2
  31. package/dist/applicationinsights-debugplugin-js.min.js.map +1 -1
  32. package/dist/applicationinsights-debugplugin-js.rollup.d.ts +1 -1
  33. package/dist-esm/DebugPlugin.js +8 -8
  34. package/dist-esm/DebugPlugin.js.map +1 -1
  35. package/dist-esm/applicationinsights-debugplugin-js.js +1 -1
  36. package/dist-esm/components/Dashboard.js +5 -5
  37. package/dist-esm/components/Dashboard.js.map +1 -1
  38. package/dist-esm/components/LogEntry.js +3 -3
  39. package/dist-esm/components/LogEntry.js.map +1 -1
  40. package/dist-esm/components/debugBins.js +1 -1
  41. package/dist-esm/components/filterList.js +3 -2
  42. package/dist-esm/components/filterList.js.map +1 -1
  43. package/dist-esm/components/helpers.js +4 -4
  44. package/dist-esm/components/helpers.js.map +1 -1
  45. package/dist-esm/components/styleNodeSrc.js +1 -1
  46. package/dist-esm/interfaces/IDebugPluginConfig.js +1 -1
  47. package/package.json +54 -57
  48. package/src/DebugPlugin.ts +7 -7
  49. package/src/components/Dashboard.ts +4 -4
  50. package/src/components/LogEntry.ts +2 -2
  51. package/src/components/debugBins.ts +6 -7
  52. package/src/components/filterList.ts +3 -1
  53. package/src/components/helpers.ts +48 -58
  54. package/src/components/styleNodeSrc.ts +33 -33
  55. package/types/tsdoc-metadata.json +1 -1
  56. package/browser/ai.dbg.2.7.5-nightly.2204-03.cjs.js.map +0 -1
  57. package/browser/ai.dbg.2.7.5-nightly.2204-03.cjs.min.js +0 -6
  58. package/browser/ai.dbg.2.7.5-nightly.2204-03.cjs.min.js.map +0 -1
  59. package/browser/ai.dbg.2.7.5-nightly.2204-03.gbl.js.map +0 -1
  60. package/browser/ai.dbg.2.7.5-nightly.2204-03.gbl.min.js +0 -6
  61. package/browser/ai.dbg.2.7.5-nightly.2204-03.gbl.min.js.map +0 -1
  62. package/browser/ai.dbg.2.7.5-nightly.2204-03.integrity.json +0 -66
  63. package/browser/ai.dbg.2.7.5-nightly.2204-03.js.map +0 -1
  64. package/browser/ai.dbg.2.7.5-nightly.2204-03.min.js +0 -6
  65. package/browser/ai.dbg.2.7.5-nightly.2204-03.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Debug Plugin, 2.7.5-nightly.2204-03
2
+ * Application Insights JavaScript SDK - Debug Plugin, 2.7.6
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  'use strict';
@@ -60,9 +60,7 @@ function objCreateFn(obj) {
60
60
  (getGlobal() || {})["Reflect"];
61
61
  var extendStaticsFn = function (d, b) {
62
62
  extendStaticsFn = ObjClass["setPrototypeOf"] ||
63
- ({ __proto__: [] } instanceof Array && function (d, b) {
64
- d.__proto__ = b;
65
- }) ||
63
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
66
64
  function (d, b) {
67
65
  for (var p in b) {
68
66
  if (b[strShimHasOwnProperty](p)) {
@@ -77,14 +75,12 @@ function __extendsFn(d, b) {
77
75
  throwTypeError("Class extends value " + String(b) + " is not a constructor or null");
78
76
  }
79
77
  extendStaticsFn(d, b);
80
- function __() {
81
- this.constructor = d;
82
- }
78
+ function __() { this.constructor = d; }
83
79
  d[strShimPrototype] = b === null ? objCreateFn(b) : (__[strShimPrototype] = b[strShimPrototype], new __());
84
80
  }
85
81
 
86
82
  /*!
87
- * Microsoft Dynamic Proto Utility, 1.1.4
83
+ * Microsoft Dynamic Proto Utility, 1.1.6
88
84
  * Copyright (c) Microsoft and contributors. All rights reserved.
89
85
  */
90
86
  var Constructor = 'constructor';
@@ -99,10 +95,13 @@ var DynAllowInstChkTag = DynInstChkTag;
99
95
  var DynProtoDefaultOptions = '_dfOpts';
100
96
  var UnknownValue = '_unknown_';
101
97
  var str__Proto$1 = "__proto__";
98
+ var DynProtoBaseProto = "_dyn" + str__Proto$1;
99
+ var DynProtoCurrent = "_dynInstProto";
102
100
  var strUseBaseInst = 'useBaseInst';
103
101
  var strSetInstFuncs = 'setInstFuncs';
104
102
  var Obj = Object;
105
103
  var _objGetPrototypeOf$1 = Obj["getPrototypeOf"];
104
+ var _objGetOwnProps = Obj["getOwnPropertyNames"];
106
105
  var _dynamicNames = 0;
107
106
  function _hasOwnProperty(obj, prop) {
108
107
  return obj && Obj[Prototype].hasOwnProperty.call(obj, prop);
@@ -114,22 +113,25 @@ function _isObjectArrayOrFunctionPrototype(target) {
114
113
  return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
115
114
  }
116
115
  function _getObjProto$1(target) {
116
+ var newProto;
117
117
  if (target) {
118
118
  if (_objGetPrototypeOf$1) {
119
119
  return _objGetPrototypeOf$1(target);
120
120
  }
121
- var newProto = target[str__Proto$1] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
122
- if (newProto) {
123
- return newProto;
121
+ var curProto = target[str__Proto$1] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
122
+ newProto = target[DynProtoBaseProto] || curProto;
123
+ if (!_hasOwnProperty(target, DynProtoBaseProto)) {
124
+ delete target[DynProtoCurrent];
125
+ newProto = target[DynProtoBaseProto] = target[DynProtoCurrent] || target[DynProtoBaseProto];
126
+ target[DynProtoCurrent] = curProto;
124
127
  }
125
128
  }
126
- return null;
129
+ return newProto;
127
130
  }
128
131
  function _forEachProp(target, func) {
129
132
  var props = [];
130
- var getOwnProps = Obj["getOwnPropertyNames"];
131
- if (getOwnProps) {
132
- props = getOwnProps(target);
133
+ if (_objGetOwnProps) {
134
+ props = _objGetOwnProps(target);
133
135
  }
134
136
  else {
135
137
  for (var name_1 in target) {
@@ -278,8 +280,9 @@ function _checkPrototype(classProto, thisTarget) {
278
280
  visited.push(thisProto);
279
281
  thisProto = _getObjProto$1(thisProto);
280
282
  }
283
+ return false;
281
284
  }
282
- return false;
285
+ return true;
283
286
  }
284
287
  function _getObjName(target, unknownValue) {
285
288
  if (_hasOwnProperty(target, Prototype)) {
@@ -324,15 +327,99 @@ var perfDefaults = {
324
327
  };
325
328
  dynamicProto[DynProtoDefaultOptions] = perfDefaults;
326
329
 
327
- var strEmpty$1 = "";
328
- var strSetNextPlugin = "setNextPlugin";
329
- var strIsInitialized = "isInitialized";
330
- var strTeardown = "teardown";
331
- var strCore = "core";
332
- var strUpdate = "update";
333
- var strDisabled = "disabled";
334
- var strDoTeardown = "_doTeardown";
330
+ var LoggingSeverity;
331
+ (function (LoggingSeverity) {
332
+ LoggingSeverity[LoggingSeverity["CRITICAL"] = 1] = "CRITICAL";
333
+ LoggingSeverity[LoggingSeverity["WARNING"] = 2] = "WARNING";
334
+ })(LoggingSeverity || (LoggingSeverity = {}));
335
+ var _InternalMessageId = {
336
+ BrowserDoesNotSupportLocalStorage: 0,
337
+ BrowserCannotReadLocalStorage: 1,
338
+ BrowserCannotReadSessionStorage: 2,
339
+ BrowserCannotWriteLocalStorage: 3,
340
+ BrowserCannotWriteSessionStorage: 4,
341
+ BrowserFailedRemovalFromLocalStorage: 5,
342
+ BrowserFailedRemovalFromSessionStorage: 6,
343
+ CannotSendEmptyTelemetry: 7,
344
+ ClientPerformanceMathError: 8,
345
+ ErrorParsingAISessionCookie: 9,
346
+ ErrorPVCalc: 10,
347
+ ExceptionWhileLoggingError: 11,
348
+ FailedAddingTelemetryToBuffer: 12,
349
+ FailedMonitorAjaxAbort: 13,
350
+ FailedMonitorAjaxDur: 14,
351
+ FailedMonitorAjaxOpen: 15,
352
+ FailedMonitorAjaxRSC: 16,
353
+ FailedMonitorAjaxSend: 17,
354
+ FailedMonitorAjaxGetCorrelationHeader: 18,
355
+ FailedToAddHandlerForOnBeforeUnload: 19,
356
+ FailedToSendQueuedTelemetry: 20,
357
+ FailedToReportDataLoss: 21,
358
+ FlushFailed: 22,
359
+ MessageLimitPerPVExceeded: 23,
360
+ MissingRequiredFieldSpecification: 24,
361
+ NavigationTimingNotSupported: 25,
362
+ OnError: 26,
363
+ SessionRenewalDateIsZero: 27,
364
+ SenderNotInitialized: 28,
365
+ StartTrackEventFailed: 29,
366
+ StopTrackEventFailed: 30,
367
+ StartTrackFailed: 31,
368
+ StopTrackFailed: 32,
369
+ TelemetrySampledAndNotSent: 33,
370
+ TrackEventFailed: 34,
371
+ TrackExceptionFailed: 35,
372
+ TrackMetricFailed: 36,
373
+ TrackPVFailed: 37,
374
+ TrackPVFailedCalc: 38,
375
+ TrackTraceFailed: 39,
376
+ TransmissionFailed: 40,
377
+ FailedToSetStorageBuffer: 41,
378
+ FailedToRestoreStorageBuffer: 42,
379
+ InvalidBackendResponse: 43,
380
+ FailedToFixDepricatedValues: 44,
381
+ InvalidDurationValue: 45,
382
+ TelemetryEnvelopeInvalid: 46,
383
+ CreateEnvelopeError: 47,
384
+ CannotSerializeObject: 48,
385
+ CannotSerializeObjectNonSerializable: 49,
386
+ CircularReferenceDetected: 50,
387
+ ClearAuthContextFailed: 51,
388
+ ExceptionTruncated: 52,
389
+ IllegalCharsInName: 53,
390
+ ItemNotInArray: 54,
391
+ MaxAjaxPerPVExceeded: 55,
392
+ MessageTruncated: 56,
393
+ NameTooLong: 57,
394
+ SampleRateOutOfRange: 58,
395
+ SetAuthContextFailed: 59,
396
+ SetAuthContextFailedAccountName: 60,
397
+ StringValueTooLong: 61,
398
+ StartCalledMoreThanOnce: 62,
399
+ StopCalledWithoutStart: 63,
400
+ TelemetryInitializerFailed: 64,
401
+ TrackArgumentsNotSpecified: 65,
402
+ UrlTooLong: 66,
403
+ SessionStorageBufferFull: 67,
404
+ CannotAccessCookie: 68,
405
+ IdTooLong: 69,
406
+ InvalidEvent: 70,
407
+ FailedMonitorAjaxSetRequestHeader: 71,
408
+ SendBrowserInfoOnUserInit: 72,
409
+ PluginException: 73,
410
+ NotificationException: 74,
411
+ SnippetScriptLoadFailure: 99,
412
+ InvalidInstrumentationKey: 100,
413
+ CannotParseAiBlobValue: 101,
414
+ InvalidContentBlob: 102,
415
+ TrackPageActionEventFailed: 103,
416
+ FailedAddingCustomDefinedRequestContext: 104,
417
+ InMemoryStorageBufferFull: 105
418
+ };
335
419
 
420
+ var strOnPrefix = "on";
421
+ var strAttachEvent = "attachEvent";
422
+ var strAddEventHelper = "addEventListener";
336
423
  var strToISOString = "toISOString";
337
424
  var cStrEndsWith = "endsWith";
338
425
  var strIndexOf = "indexOf";
@@ -342,8 +429,7 @@ var cStrTrim = "trim";
342
429
  var strToString = "toString";
343
430
  var str__Proto = "__proto__";
344
431
  var strConstructor$1 = "constructor";
345
- var _objDefineProperty$1 = ObjDefineProperty;
346
- var _objFreeze = ObjClass.freeze;
432
+ var _objDefineProperty = ObjDefineProperty;
347
433
  var _objKeys = ObjClass.keys;
348
434
  var StringProto = String[strShimPrototype];
349
435
  var _strTrim = StringProto[cStrTrim];
@@ -353,10 +439,7 @@ var _dataToISOString = DateProto[strToISOString];
353
439
  var _isArray = Array.isArray;
354
440
  var _objToString = ObjProto[strToString];
355
441
  var _fnToString = ObjHasOwnProperty[strToString];
356
- var _objFunctionString = _fnToString.call(ObjClass);
357
- var rCamelCase = /-([a-z])/g;
358
- var rNormalizeInvalid = /([^\w\d_$])/g;
359
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
442
+ _fnToString.call(ObjClass);
360
443
  var _objGetPrototypeOf = Object["getPrototypeOf"];
361
444
  function _getObjProto(target) {
362
445
  if (target) {
@@ -370,9 +453,6 @@ function _getObjProto(target) {
370
453
  }
371
454
  return null;
372
455
  }
373
- function objToString(obj) {
374
- return _objToString.call(obj);
375
- }
376
456
  function isTypeof(value, theType) {
377
457
  return typeof value === theType;
378
458
  }
@@ -394,18 +474,24 @@ function isObject(value) {
394
474
  function isFunction(value) {
395
475
  return !!(value && typeof value === strShimFunction);
396
476
  }
397
- function normalizeJsName(name) {
398
- var value = name;
399
- if (value && isString(value)) {
400
- value = value.replace(rCamelCase, function (_all, letter) {
401
- return letter.toUpperCase();
402
- });
403
- value = value.replace(rNormalizeInvalid, "_");
404
- value = value.replace(rLeadingNumeric, function (_all, match) {
405
- return "_" + match;
406
- });
477
+ function attachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {
478
+ if (useCapture === void 0) { useCapture = false; }
479
+ var result = false;
480
+ if (!isNullOrUndefined(obj)) {
481
+ try {
482
+ if (!isNullOrUndefined(obj[strAddEventHelper])) {
483
+ obj[strAddEventHelper](eventNameWithoutOn, handlerRef, useCapture);
484
+ result = true;
485
+ }
486
+ else if (!isNullOrUndefined(obj[strAttachEvent])) {
487
+ obj[strAttachEvent](strOnPrefix + eventNameWithoutOn, handlerRef);
488
+ result = true;
489
+ }
490
+ }
491
+ catch (e) {
492
+ }
407
493
  }
408
- return value;
494
+ return result;
409
495
  }
410
496
  function objForEachKey(target, callbackfn) {
411
497
  if (target) {
@@ -467,22 +553,6 @@ function isBoolean(value) {
467
553
  function isSymbol(value) {
468
554
  return typeof value === "symbol";
469
555
  }
470
- function isPlainObject(value) {
471
- var result = false;
472
- if (value && typeof value === "object") {
473
- var proto = _objGetPrototypeOf ? _objGetPrototypeOf(value) : _getObjProto(value);
474
- if (!proto) {
475
- result = true;
476
- }
477
- else {
478
- if (proto[strConstructor$1] && ObjHasOwnProperty.call(proto, strConstructor$1)) {
479
- proto = proto[strConstructor$1];
480
- }
481
- result = typeof proto === strShimFunction && _fnToString.call(proto) === _objFunctionString;
482
- }
483
- }
484
- return result;
485
- }
486
556
  function toISOString(date) {
487
557
  if (date) {
488
558
  return _dataToISOString ? date[strToISOString]() : _toISOStringPoly(date);
@@ -628,7 +698,7 @@ function objKeys(obj) {
628
698
  return result;
629
699
  }
630
700
  function objDefineAccessors(target, prop, getProp, setProp) {
631
- if (_objDefineProperty$1) {
701
+ if (_objDefineProperty) {
632
702
  try {
633
703
  var descriptor = {
634
704
  enumerable: true,
@@ -640,7 +710,7 @@ function objDefineAccessors(target, prop, getProp, setProp) {
640
710
  if (setProp) {
641
711
  descriptor.set = setProp;
642
712
  }
643
- _objDefineProperty$1(target, prop, descriptor);
713
+ _objDefineProperty(target, prop, descriptor);
644
714
  return true;
645
715
  }
646
716
  catch (e) {
@@ -648,10 +718,6 @@ function objDefineAccessors(target, prop, getProp, setProp) {
648
718
  }
649
719
  return false;
650
720
  }
651
- function _doNothing(value) {
652
- return value;
653
- }
654
- var objFreeze = _objFreeze || _doNothing;
655
721
  function dateNow() {
656
722
  var dt = Date;
657
723
  return dt.now ? dt.now() : new dt().getTime();
@@ -660,7 +726,7 @@ function getExceptionName(object) {
660
726
  if (isError(object)) {
661
727
  return object.name;
662
728
  }
663
- return strEmpty$1;
729
+ return "";
664
730
  }
665
731
  function setValue(target, field, value, valChk, srcChk) {
666
732
  var theValue = value;
@@ -676,91 +742,6 @@ function setValue(target, field, value, valChk, srcChk) {
676
742
  function isTruthy(value) {
677
743
  return !!value;
678
744
  }
679
- function throwError(message) {
680
- throw new Error(message);
681
- }
682
- function _createProxyFunction(source, funcName) {
683
- var srcFunc = null;
684
- var src = null;
685
- if (isFunction(source)) {
686
- srcFunc = source;
687
- }
688
- else {
689
- src = source;
690
- }
691
- return function () {
692
- var originalArguments = arguments;
693
- if (srcFunc) {
694
- src = srcFunc();
695
- }
696
- if (src) {
697
- return src[funcName].apply(src, originalArguments);
698
- }
699
- };
700
- }
701
- function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
702
- if (overwriteTarget === void 0) { overwriteTarget = true; }
703
- if (target && name && source) {
704
- if (overwriteTarget || isUndefined(target[name])) {
705
- target[name] = _createProxyFunction(source, theFunc);
706
- }
707
- }
708
- }
709
- function createEnumStyle(values) {
710
- var enumClass = {};
711
- objForEachKey(values, function (field, value) {
712
- enumClass[field] = value;
713
- if (!isUndefined(enumClass[value])) {
714
- throwError("[" + value + "] exists for " + field);
715
- }
716
- enumClass[value] = field;
717
- });
718
- return objFreeze(enumClass);
719
- }
720
- function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {
721
- var theArgs = arguments;
722
- var extended = theArgs[0] || {};
723
- var argLen = theArgs.length;
724
- var deep = false;
725
- var idx = 1;
726
- if (argLen > 0 && isBoolean(extended)) {
727
- deep = extended;
728
- extended = theArgs[idx] || {};
729
- idx++;
730
- }
731
- if (!isObject(extended)) {
732
- extended = {};
733
- }
734
- for (; idx < argLen; idx++) {
735
- var arg = theArgs[idx];
736
- var isArgArray = isArray(arg);
737
- var isArgObj = isObject(arg);
738
- for (var prop in arg) {
739
- var propOk = (isArgArray && (prop in arg)) || (isArgObj && (ObjHasOwnProperty.call(arg, prop)));
740
- if (!propOk) {
741
- continue;
742
- }
743
- var newValue = arg[prop];
744
- var isNewArray = void 0;
745
- if (deep && newValue && ((isNewArray = isArray(newValue)) || isPlainObject(newValue))) {
746
- var clone = extended[prop];
747
- if (isNewArray) {
748
- if (!isArray(clone)) {
749
- clone = [];
750
- }
751
- }
752
- else if (!isPlainObject(clone)) {
753
- clone = {};
754
- }
755
- newValue = objExtend(deep, clone, newValue);
756
- }
757
- if (newValue !== undefined) {
758
- extended[prop] = newValue;
759
- }
760
- }
761
- }
762
- return extended;
763
- }
764
745
 
765
746
  var strWindow = "window";
766
747
  var strDocument = "document";
@@ -855,7 +836,7 @@ function isIE() {
855
836
  var nav = getNavigator();
856
837
  if (nav && (nav.userAgent !== _navUserAgentCheck || _isTrident === null)) {
857
838
  _navUserAgentCheck = nav.userAgent;
858
- var userAgent = (_navUserAgentCheck || strEmpty$1).toLowerCase();
839
+ var userAgent = (_navUserAgentCheck || "").toLowerCase();
859
840
  _isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
860
841
  }
861
842
  return _isTrident;
@@ -864,9 +845,9 @@ function getIEVersion(userAgentStr) {
864
845
  if (userAgentStr === void 0) { userAgentStr = null; }
865
846
  if (!userAgentStr) {
866
847
  var navigator_1 = getNavigator() || {};
867
- userAgentStr = navigator_1 ? (navigator_1.userAgent || strEmpty$1).toLowerCase() : strEmpty$1;
848
+ userAgentStr = navigator_1 ? (navigator_1.userAgent || "").toLowerCase() : "";
868
849
  }
869
- var ua = (userAgentStr || strEmpty$1).toLowerCase();
850
+ var ua = (userAgentStr || "").toLowerCase();
870
851
  if (strContains(ua, strMsie)) {
871
852
  var doc = getDocument() || {};
872
853
  return Math.max(parseInt(ua.split(strMsie)[1]), (doc[strDocumentMode] || 0));
@@ -881,7 +862,7 @@ function getIEVersion(userAgentStr) {
881
862
  }
882
863
  function dumpObj(object) {
883
864
  var objectTypeDump = Object[strShimPrototype].toString.call(object);
884
- var propertyValueDump = strEmpty$1;
865
+ var propertyValueDump = "";
885
866
  if (objectTypeDump === "[object Error]") {
886
867
  propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
887
868
  }
@@ -920,9 +901,9 @@ var strErrorToConsole = "errorToConsole";
920
901
  var strWarnToConsole = "warnToConsole";
921
902
  function _sanitizeDiagnosticText(text) {
922
903
  if (text) {
923
- return "\"" + text.replace(/\"/g, strEmpty$1) + "\"";
904
+ return "\"" + text.replace(/\"/g, "") + "\"";
924
905
  }
925
- return strEmpty$1;
906
+ return "";
926
907
  }
927
908
  function _logToConsole(func, message) {
928
909
  var theConsole = getConsole();
@@ -944,12 +925,12 @@ var _InternalLogMessage = /** @class */ (function () {
944
925
  _self.message =
945
926
  (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
946
927
  msgId;
947
- var strProps = strEmpty$1;
928
+ var strProps = "";
948
929
  if (hasJSON()) {
949
930
  strProps = getJSON().stringify(properties);
950
931
  }
951
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : strEmpty$1) +
952
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : strEmpty$1);
932
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : "") +
933
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : "");
953
934
  _self.message += diagnosticText;
954
935
  }
955
936
  _InternalLogMessage.dataType = "MessageData";
@@ -976,10 +957,10 @@ var DiagnosticLogger = /** @class */ (function () {
976
957
  if (isUserAct === void 0) { isUserAct = false; }
977
958
  var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
978
959
  if (_self.enableDebugExceptions()) {
979
- throw message;
960
+ throw dumpObj(message);
980
961
  }
981
962
  else {
982
- var logFunc = severity === 1 ? strErrorToConsole : strWarnToConsole;
963
+ var logFunc = severity === LoggingSeverity.CRITICAL ? strErrorToConsole : strWarnToConsole;
983
964
  if (!isUndefined(message.message)) {
984
965
  var logLevel = _self.consoleLoggingLevel();
985
966
  if (isUserAct) {
@@ -997,7 +978,7 @@ var DiagnosticLogger = /** @class */ (function () {
997
978
  _self.logInternalMessage(severity, message);
998
979
  }
999
980
  else {
1000
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
981
+ _debugExtMsg("throw" + (severity === LoggingSeverity.CRITICAL ? "Critical" : "Warning"), message);
1001
982
  }
1002
983
  }
1003
984
  };
@@ -1029,13 +1010,13 @@ var DiagnosticLogger = /** @class */ (function () {
1029
1010
  if (severity <= _self.telemetryLoggingLevel()) {
1030
1011
  _self.queue.push(message);
1031
1012
  _messageCount++;
1032
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1013
+ _debugExtMsg((severity === LoggingSeverity.CRITICAL ? "error" : "warn"), message);
1033
1014
  }
1034
1015
  if (_messageCount === _self.maxInternalMessageLimit()) {
1035
1016
  var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1036
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1017
+ var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);
1037
1018
  _self.queue.push(throttleMessage);
1038
- if (severity === 1 ) {
1019
+ if (severity === LoggingSeverity.CRITICAL) {
1039
1020
  _self.errorToConsole(throttleLimitMessage);
1040
1021
  }
1041
1022
  else {
@@ -1064,10 +1045,6 @@ var DiagnosticLogger = /** @class */ (function () {
1064
1045
  }
1065
1046
  return DiagnosticLogger;
1066
1047
  }());
1067
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1068
- if (isUserAct === void 0) { isUserAct = false; }
1069
- (logger || new DiagnosticLogger()).throwInternal(severity, msgId, msg, properties, isUserAct);
1070
- }
1071
1048
 
1072
1049
  var strExecutionContextKey = "ctx";
1073
1050
  var PerfEvent = /** @class */ (function () {
@@ -1181,509 +1158,252 @@ function doPerf(mgrSource, getSource, func, details, isAsync) {
1181
1158
  return func();
1182
1159
  }
1183
1160
 
1184
- var UInt32Mask = 0x100000000;
1185
- var MaxUInt32 = 0xffffffff;
1186
- var _mwcSeeded = false;
1187
- var _mwcW = 123456789;
1188
- var _mwcZ = 987654321;
1189
- function _mwcSeed(seedValue) {
1190
- if (seedValue < 0) {
1191
- seedValue >>>= 0;
1192
- }
1193
- _mwcW = (123456789 + seedValue) & MaxUInt32;
1194
- _mwcZ = (987654321 - seedValue) & MaxUInt32;
1195
- _mwcSeeded = true;
1196
- }
1197
- function _autoSeedMwc() {
1198
- try {
1199
- var now = dateNow() & 0x7fffffff;
1200
- _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1201
- }
1202
- catch (e) {
1203
- }
1204
- }
1205
- function randomValue(maxValue) {
1206
- if (maxValue > 0) {
1207
- return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
1208
- }
1209
- return 0;
1210
- }
1211
- function random32(signed) {
1212
- var value = 0;
1213
- var c = getCrypto() || getMsCrypto();
1214
- if (c && c.getRandomValues) {
1215
- value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1216
- }
1217
- if (value === 0 && isIE()) {
1218
- if (!_mwcSeeded) {
1219
- _autoSeedMwc();
1220
- }
1221
- value = mwcRandom32() & MaxUInt32;
1222
- }
1223
- if (value === 0) {
1224
- value = Math.floor((UInt32Mask * Math.random()) | 0);
1225
- }
1226
- if (!signed) {
1227
- value >>>= 0;
1228
- }
1229
- return value;
1230
- }
1231
- function mwcRandomSeed(value) {
1232
- if (!value) {
1233
- _autoSeedMwc();
1234
- }
1235
- else {
1236
- _mwcSeed(value);
1237
- }
1238
- }
1239
- function mwcRandom32(signed) {
1240
- _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
1241
- _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
1242
- var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
1243
- if (!signed) {
1244
- value >>>= 0;
1245
- }
1246
- return value;
1247
- }
1248
- function newId(maxLength) {
1249
- if (maxLength === void 0) { maxLength = 22; }
1250
- var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1251
- var number = random32() >>> 0;
1252
- var chars = 0;
1253
- var result = strEmpty$1;
1254
- while (result.length < maxLength) {
1255
- chars++;
1256
- result += base64chars.charAt(number & 0x3F);
1257
- number >>>= 6;
1258
- if (chars === 5) {
1259
- number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
1260
- chars = 0;
1261
- }
1262
- }
1263
- return result;
1264
- }
1265
-
1266
- var _objDefineProperty = ObjDefineProperty;
1267
- var version = "2.7.5-nightly.2204-03";
1268
- var instanceName = "." + newId(6);
1269
- var _dataUid = 0;
1270
- function _createAccessor(target, prop, value) {
1271
- if (_objDefineProperty) {
1272
- try {
1273
- _objDefineProperty(target, prop, {
1274
- value: value,
1275
- enumerable: false,
1276
- configurable: true
1277
- });
1278
- return true;
1279
- }
1280
- catch (e) {
1281
- }
1282
- }
1283
- return false;
1284
- }
1285
- function _canAcceptData(target) {
1286
- return target.nodeType === 1 || target.nodeType === 9 || !(+target.nodeType);
1287
- }
1288
- function _getCache(data, target) {
1289
- var theCache = target[data.id];
1290
- if (!theCache) {
1291
- theCache = {};
1292
- try {
1293
- if (_canAcceptData(target)) {
1294
- if (!_createAccessor(target, data.id, theCache)) {
1295
- target[data.id] = theCache;
1296
- }
1297
- }
1298
- }
1299
- catch (e) {
1300
- }
1301
- }
1302
- return theCache;
1303
- }
1304
- function createUniqueNamespace(name, includeVersion) {
1305
- if (includeVersion === void 0) { includeVersion = false; }
1306
- return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : "") + instanceName);
1307
- }
1308
- function createElmNodeData(name) {
1309
- var data = {
1310
- id: createUniqueNamespace("_aiData-" + (name || "") + "." + version),
1311
- accept: function (target) {
1312
- return _canAcceptData(target);
1313
- },
1314
- get: function (target, name, defValue, addDefault) {
1315
- var theCache = target[data.id];
1316
- if (!theCache) {
1317
- if (addDefault) {
1318
- theCache = _getCache(data, target);
1319
- theCache[normalizeJsName(name)] = defValue;
1320
- }
1321
- return defValue;
1322
- }
1323
- return theCache[normalizeJsName(name)];
1324
- },
1325
- kill: function (target, name) {
1326
- if (target && target[name]) {
1327
- try {
1328
- delete target[name];
1329
- }
1330
- catch (e) {
1331
- }
1161
+ var TelemetryPluginChain = /** @class */ (function () {
1162
+ function TelemetryPluginChain(plugin, defItemCtx) {
1163
+ var _self = this;
1164
+ var _nextProxy = null;
1165
+ var _hasProcessTelemetry = isFunction(plugin.processTelemetry);
1166
+ var _hasSetNext = isFunction(plugin.setNextPlugin);
1167
+ _self._hasRun = false;
1168
+ _self.getPlugin = function () {
1169
+ return plugin;
1170
+ };
1171
+ _self.getNext = function () {
1172
+ return _nextProxy;
1173
+ };
1174
+ _self.setNext = function (nextPlugin) {
1175
+ _nextProxy = nextPlugin;
1176
+ };
1177
+ _self.processTelemetry = function (env, itemCtx) {
1178
+ if (!itemCtx) {
1179
+ itemCtx = defItemCtx;
1332
1180
  }
1333
- }
1334
- };
1335
- return data;
1336
- }
1337
-
1338
- var pluginStateData = createElmNodeData("plugin");
1339
- function _getPluginState(plugin) {
1340
- return pluginStateData.get(plugin, "state", {}, true);
1341
- }
1342
-
1343
- var strTelemetryPluginChain = "TelemetryPluginChain";
1344
- var strHasRunFlags = "_hasRun";
1345
- var strGetTelCtx = "_getTelCtx";
1346
- var _chainId = 0;
1347
- function _getNextProxyStart(proxy, config, core, startAt) {
1348
- while (proxy) {
1349
- if (proxy.getPlugin() === startAt) {
1350
- return proxy;
1351
- }
1352
- proxy = proxy.getNext();
1353
- }
1354
- return createTelemetryProxyChain([startAt], config, core);
1355
- }
1356
- function _createInternalContext(telemetryChain, config, core, startAt) {
1357
- var _nextProxy = null;
1358
- var _onComplete = [];
1359
- if (startAt !== null) {
1360
- _nextProxy = startAt ? _getNextProxyStart(telemetryChain, config, core, startAt) : telemetryChain;
1361
- }
1362
- var context = {
1363
- _next: _moveNext,
1364
- ctx: {
1365
- core: function () {
1366
- return core;
1367
- },
1368
- diagLog: function () {
1369
- return safeGetLogger(core, config);
1370
- },
1371
- getCfg: function () {
1372
- return config;
1373
- },
1374
- getExtCfg: _getExtCfg,
1375
- getConfig: _getConfig,
1376
- hasNext: function () {
1377
- return !!_nextProxy;
1378
- },
1379
- getNext: function () {
1380
- return _nextProxy;
1381
- },
1382
- setNext: function (nextPlugin) {
1383
- _nextProxy = nextPlugin;
1384
- },
1385
- iterate: _iterateChain,
1386
- onComplete: _addOnComplete
1387
- }
1388
- };
1389
- function _addOnComplete(onComplete, that) {
1390
- var args = [];
1391
- for (var _i = 2; _i < arguments.length; _i++) {
1392
- args[_i - 2] = arguments[_i];
1393
- }
1394
- if (onComplete) {
1395
- _onComplete.push({
1396
- func: onComplete,
1397
- self: !isUndefined(that) ? that : context.ctx,
1398
- args: args
1399
- });
1400
- }
1401
- }
1402
- function _moveNext() {
1403
- var nextProxy = _nextProxy;
1404
- _nextProxy = nextProxy ? nextProxy.getNext() : null;
1405
- if (!nextProxy) {
1406
- var onComplete = _onComplete;
1407
- if (onComplete && onComplete.length > 0) {
1408
- arrForEach(onComplete, function (completeDetails) {
1181
+ var identifier = plugin ? plugin.identifier : "TelemetryPluginChain";
1182
+ doPerf(itemCtx ? itemCtx.core() : null, function () { return identifier + ":processTelemetry"; }, function () {
1183
+ if (plugin && _hasProcessTelemetry) {
1184
+ _self._hasRun = true;
1409
1185
  try {
1410
- completeDetails.func.call(completeDetails.self, completeDetails.args);
1411
- }
1412
- catch (e) {
1413
- _throwInternal(core.logger, 2 , 73 , "Unexpected Exception during onComplete - " + dumpObj(e));
1186
+ itemCtx.setNext(_nextProxy);
1187
+ if (_hasSetNext) {
1188
+ plugin.setNextPlugin(_nextProxy);
1189
+ }
1190
+ _nextProxy && (_nextProxy._hasRun = false);
1191
+ plugin.processTelemetry(env, itemCtx);
1414
1192
  }
1415
- });
1416
- _onComplete = [];
1417
- }
1418
- }
1419
- return nextProxy;
1420
- }
1421
- function _getExtCfg(identifier, defaultValue, mergeDefault) {
1422
- if (defaultValue === void 0) { defaultValue = {}; }
1423
- if (mergeDefault === void 0) { mergeDefault = 0 ; }
1424
- var theConfig;
1425
- if (config) {
1426
- var extConfig = config.extensionConfig;
1427
- if (extConfig && identifier) {
1428
- theConfig = extConfig[identifier];
1429
- }
1430
- }
1431
- if (!theConfig) {
1432
- theConfig = defaultValue;
1433
- }
1434
- else if (isObject(defaultValue)) {
1435
- if (mergeDefault !== 0 ) {
1436
- var newConfig_1 = objExtend(true, defaultValue, theConfig);
1437
- if (config && mergeDefault === 2 ) {
1438
- objForEachKey(defaultValue, function (field) {
1439
- if (isNullOrUndefined(newConfig_1[field])) {
1440
- var cfgValue = config[field];
1441
- if (!isNullOrUndefined(cfgValue)) {
1442
- newConfig_1[field] = cfgValue;
1443
- }
1193
+ catch (error) {
1194
+ var hasRun = _nextProxy && _nextProxy._hasRun;
1195
+ if (!_nextProxy || !hasRun) {
1196
+ itemCtx.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.PluginException, "Plugin [" + plugin.identifier + "] failed during processTelemetry - " + dumpObj(error));
1444
1197
  }
1445
- });
1198
+ if (_nextProxy && !hasRun) {
1199
+ _nextProxy.processTelemetry(env, itemCtx);
1200
+ }
1201
+ }
1446
1202
  }
1447
- }
1448
- }
1449
- return theConfig;
1450
- }
1451
- function _getConfig(identifier, field, defaultValue) {
1452
- if (defaultValue === void 0) { defaultValue = false; }
1453
- var theValue;
1454
- var extConfig = _getExtCfg(identifier, null);
1455
- if (extConfig && !isNullOrUndefined(extConfig[field])) {
1456
- theValue = extConfig[field];
1457
- }
1458
- else if (config && !isNullOrUndefined(config[field])) {
1459
- theValue = config[field];
1460
- }
1461
- return !isNullOrUndefined(theValue) ? theValue : defaultValue;
1203
+ else if (_nextProxy) {
1204
+ _self._hasRun = true;
1205
+ _nextProxy.processTelemetry(env, itemCtx);
1206
+ }
1207
+ }, function () { return ({ item: env }); }, !(env.sync));
1208
+ };
1462
1209
  }
1463
- function _iterateChain(cb) {
1464
- var nextPlugin;
1465
- while (!!(nextPlugin = context._next())) {
1466
- var plugin = nextPlugin.getPlugin();
1467
- if (plugin) {
1468
- cb(plugin);
1210
+ return TelemetryPluginChain;
1211
+ }());
1212
+
1213
+ function _createProxyChain(plugins, itemCtx) {
1214
+ var proxies = [];
1215
+ if (plugins && plugins.length > 0) {
1216
+ var lastProxy = null;
1217
+ for (var idx = 0; idx < plugins.length; idx++) {
1218
+ var thePlugin = plugins[idx];
1219
+ if (thePlugin && isFunction(thePlugin.processTelemetry)) {
1220
+ var newProxy = new TelemetryPluginChain(thePlugin, itemCtx);
1221
+ proxies.push(newProxy);
1222
+ if (lastProxy) {
1223
+ lastProxy.setNext(newProxy);
1224
+ }
1225
+ lastProxy = newProxy;
1469
1226
  }
1470
1227
  }
1471
1228
  }
1472
- return context;
1229
+ return proxies.length > 0 ? proxies[0] : null;
1473
1230
  }
1474
- function createProcessTelemetryContext(telemetryChain, config, core, startAt) {
1475
- var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1476
- var context = internalContext.ctx;
1477
- function _processNext(env) {
1478
- var nextPlugin = internalContext._next();
1479
- nextPlugin && nextPlugin.processTelemetry(env, context);
1480
- return !nextPlugin;
1481
- }
1482
- function _createNew(plugins, startAt) {
1483
- if (plugins === void 0) { plugins = null; }
1484
- if (isArray(plugins)) {
1485
- plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1231
+ function _copyProxyChain(proxy, itemCtx, startAt) {
1232
+ var plugins = [];
1233
+ var add = startAt ? false : true;
1234
+ if (proxy) {
1235
+ while (proxy) {
1236
+ var thePlugin = proxy.getPlugin();
1237
+ if (add || thePlugin === startAt) {
1238
+ add = true;
1239
+ plugins.push(thePlugin);
1240
+ }
1241
+ proxy = proxy.getNext();
1486
1242
  }
1487
- return createProcessTelemetryContext(plugins || context.getNext(), config, core, startAt);
1488
- }
1489
- context.processNext = _processNext;
1490
- context.createNew = _createNew;
1491
- return context;
1492
- }
1493
- function createProcessTelemetryUnloadContext(telemetryChain, config, core, startAt) {
1494
- var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1495
- var context = internalContext.ctx;
1496
- function _processNext(unloadState) {
1497
- var nextPlugin = internalContext._next();
1498
- nextPlugin && nextPlugin.unload(context, unloadState);
1499
- return !nextPlugin;
1500
1243
  }
1501
- function _createNew(plugins, startAt) {
1502
- if (plugins === void 0) { plugins = null; }
1503
- if (isArray(plugins)) {
1504
- plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1505
- }
1506
- return createProcessTelemetryUnloadContext(plugins || context.getNext(), config, core, startAt);
1244
+ if (!add) {
1245
+ plugins.push(startAt);
1507
1246
  }
1508
- context.processNext = _processNext;
1509
- context.createNew = _createNew;
1510
- return context;
1247
+ return _createProxyChain(plugins, itemCtx);
1511
1248
  }
1512
- function createProcessTelemetryUpdateContext(telemetryChain, config, core, startAt) {
1513
- var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1514
- var context = internalContext.ctx;
1515
- function _processNext(updateState) {
1516
- return context.iterate(function (plugin) {
1517
- if (isFunction(plugin[strUpdate])) {
1518
- plugin[strUpdate](context, updateState);
1249
+ function _copyPluginChain(srcPlugins, itemCtx, startAt) {
1250
+ var plugins = srcPlugins;
1251
+ var add = false;
1252
+ if (startAt && srcPlugins) {
1253
+ plugins = [];
1254
+ arrForEach(srcPlugins, function (thePlugin) {
1255
+ if (add || thePlugin === startAt) {
1256
+ add = true;
1257
+ plugins.push(thePlugin);
1519
1258
  }
1520
1259
  });
1521
1260
  }
1522
- function _createNew(plugins, startAt) {
1523
- if (plugins === void 0) { plugins = null; }
1524
- if (isArray(plugins)) {
1525
- plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1261
+ if (startAt && !add) {
1262
+ if (!plugins) {
1263
+ plugins = [];
1526
1264
  }
1527
- return createProcessTelemetryUpdateContext(plugins || context.getNext(), config, core, startAt);
1265
+ plugins.push(startAt);
1528
1266
  }
1529
- context.processNext = _processNext;
1530
- context.createNew = _createNew;
1531
- return context;
1267
+ return _createProxyChain(plugins, itemCtx);
1532
1268
  }
1533
- function createTelemetryProxyChain(plugins, config, core, startAt) {
1534
- var firstProxy = null;
1535
- var add = startAt ? false : true;
1536
- if (isArray(plugins) && plugins.length > 0) {
1537
- var lastProxy_1 = null;
1538
- arrForEach(plugins, function (thePlugin) {
1539
- if (!add && startAt === thePlugin) {
1540
- add = true;
1269
+ var ProcessTelemetryContext = /** @class */ (function () {
1270
+ function ProcessTelemetryContext(plugins, config, core, startAt) {
1271
+ var _self = this;
1272
+ var _nextProxy = null;
1273
+ if (startAt !== null) {
1274
+ if (plugins && isFunction(plugins.getPlugin)) {
1275
+ _nextProxy = _copyProxyChain(plugins, _self, startAt || plugins.getPlugin());
1541
1276
  }
1542
- if (add && thePlugin && isFunction(thePlugin.processTelemetry)) {
1543
- var newProxy = createTelemetryPluginProxy(thePlugin, config, core);
1544
- if (!firstProxy) {
1545
- firstProxy = newProxy;
1277
+ else {
1278
+ if (startAt) {
1279
+ _nextProxy = _copyPluginChain(plugins, _self, startAt);
1546
1280
  }
1547
- if (lastProxy_1) {
1548
- lastProxy_1._setNext(newProxy);
1281
+ else if (isUndefined(startAt)) {
1282
+ _nextProxy = _createProxyChain(plugins, _self);
1549
1283
  }
1550
- lastProxy_1 = newProxy;
1551
1284
  }
1552
- });
1553
- }
1554
- if (startAt && !firstProxy) {
1555
- return createTelemetryProxyChain([startAt], config, core);
1556
- }
1557
- return firstProxy;
1558
- }
1559
- function createTelemetryPluginProxy(plugin, config, core) {
1560
- var nextProxy = null;
1561
- var hasProcessTelemetry = isFunction(plugin.processTelemetry);
1562
- var hasSetNext = isFunction(plugin.setNextPlugin);
1563
- var chainId;
1564
- if (plugin) {
1565
- chainId = plugin.identifier + "-" + plugin.priority + "-" + _chainId++;
1566
- }
1567
- else {
1568
- chainId = "Unknown-0-" + _chainId++;
1569
- }
1570
- var proxyChain = {
1571
- getPlugin: function () {
1572
- return plugin;
1573
- },
1574
- getNext: function () {
1575
- return nextProxy;
1576
- },
1577
- processTelemetry: _processTelemetry,
1578
- unload: _unloadPlugin,
1579
- update: _updatePlugin,
1580
- _id: chainId,
1581
- _setNext: function (nextPlugin) {
1582
- nextProxy = nextPlugin;
1583
1285
  }
1584
- };
1585
- function _getTelCtx() {
1586
- var itemCtx;
1587
- if (plugin && isFunction(plugin[strGetTelCtx])) {
1588
- itemCtx = plugin[strGetTelCtx]();
1589
- }
1590
- if (!itemCtx) {
1591
- itemCtx = createProcessTelemetryContext(proxyChain, config, core);
1592
- }
1593
- return itemCtx;
1594
- }
1595
- function _processChain(itemCtx, processPluginFn, name, details, isAsync) {
1596
- var hasRun = false;
1597
- var identifier = plugin ? plugin.identifier : strTelemetryPluginChain;
1598
- var hasRunContext = itemCtx[strHasRunFlags];
1599
- if (!hasRunContext) {
1600
- hasRunContext = itemCtx[strHasRunFlags] = {};
1601
- }
1602
- itemCtx.setNext(nextProxy);
1603
- if (plugin) {
1604
- doPerf(itemCtx[strCore](), function () { return identifier + ":" + name; }, function () {
1605
- hasRunContext[chainId] = true;
1606
- try {
1607
- var nextId = nextProxy ? nextProxy._id : strEmpty$1;
1608
- if (nextId) {
1609
- hasRunContext[nextId] = false;
1610
- }
1611
- hasRun = processPluginFn(itemCtx);
1612
- }
1613
- catch (error) {
1614
- var hasNextRun = nextProxy ? hasRunContext[nextProxy._id] : true;
1615
- if (hasNextRun) {
1616
- hasRun = true;
1617
- }
1618
- if (!nextProxy || !hasNextRun) {
1619
- _throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + plugin.identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1620
- }
1286
+ _self.core = function () {
1287
+ return core;
1288
+ };
1289
+ _self.diagLog = function () {
1290
+ return safeGetLogger(core, config);
1291
+ };
1292
+ _self.getCfg = function () {
1293
+ return config;
1294
+ };
1295
+ _self.getExtCfg = function (identifier, defaultValue) {
1296
+ if (defaultValue === void 0) { defaultValue = {}; }
1297
+ var theConfig;
1298
+ if (config) {
1299
+ var extConfig = config.extensionConfig;
1300
+ if (extConfig && identifier) {
1301
+ theConfig = extConfig[identifier];
1621
1302
  }
1622
- }, details, isAsync);
1623
- }
1624
- return hasRun;
1625
- }
1626
- function _processTelemetry(env, itemCtx) {
1627
- itemCtx = itemCtx || _getTelCtx();
1628
- function _callProcessTelemetry(itemCtx) {
1629
- if (!plugin || !hasProcessTelemetry) {
1630
- return false;
1631
1303
  }
1632
- var pluginState = _getPluginState(plugin);
1633
- if (pluginState[strTeardown] || pluginState[strDisabled]) {
1634
- return false;
1304
+ return (theConfig ? theConfig : defaultValue);
1305
+ };
1306
+ _self.getConfig = function (identifier, field, defaultValue) {
1307
+ if (defaultValue === void 0) { defaultValue = false; }
1308
+ var theValue;
1309
+ var extConfig = _self.getExtCfg(identifier, null);
1310
+ if (extConfig && !isNullOrUndefined(extConfig[field])) {
1311
+ theValue = extConfig[field];
1635
1312
  }
1636
- if (hasSetNext) {
1637
- plugin.setNextPlugin(nextProxy);
1313
+ else if (config && !isNullOrUndefined(config[field])) {
1314
+ theValue = config[field];
1638
1315
  }
1639
- plugin.processTelemetry(env, itemCtx);
1640
- return true;
1641
- }
1642
- if (!_processChain(itemCtx, _callProcessTelemetry, "processTelemetry", function () { return ({ item: env }); }, !(env.sync))) {
1643
- itemCtx.processNext(env);
1644
- }
1645
- }
1646
- function _unloadPlugin(unloadCtx, unloadState) {
1647
- function _callTeardown() {
1648
- var hasRun = false;
1649
- if (plugin) {
1650
- var pluginState = _getPluginState(plugin);
1651
- var pluginCore = plugin[strCore] || pluginState.core;
1652
- if (plugin && (!pluginCore || pluginCore === unloadCtx[strCore]()) && !pluginState[strTeardown]) {
1653
- pluginState[strCore] = null;
1654
- pluginState[strTeardown] = true;
1655
- pluginState[strIsInitialized] = false;
1656
- if (plugin[strTeardown] && plugin[strTeardown](unloadCtx, unloadState) === true) {
1657
- hasRun = true;
1658
- }
1659
- }
1316
+ return !isNullOrUndefined(theValue) ? theValue : defaultValue;
1317
+ };
1318
+ _self.hasNext = function () {
1319
+ return _nextProxy != null;
1320
+ };
1321
+ _self.getNext = function () {
1322
+ return _nextProxy;
1323
+ };
1324
+ _self.setNext = function (nextPlugin) {
1325
+ _nextProxy = nextPlugin;
1326
+ };
1327
+ _self.processNext = function (env) {
1328
+ var nextPlugin = _nextProxy;
1329
+ if (nextPlugin) {
1330
+ _nextProxy = nextPlugin.getNext();
1331
+ nextPlugin.processTelemetry(env, _self);
1660
1332
  }
1661
- return hasRun;
1662
- }
1663
- if (!_processChain(unloadCtx, _callTeardown, "unload", function () { }, unloadState.isAsync)) {
1664
- unloadCtx.processNext(unloadState);
1665
- }
1333
+ };
1334
+ _self.createNew = function (plugins, startAt) {
1335
+ if (plugins === void 0) { plugins = null; }
1336
+ return new ProcessTelemetryContext(plugins || _nextProxy, config, core, startAt);
1337
+ };
1666
1338
  }
1667
- function _updatePlugin(updateCtx, updateState) {
1668
- function _callUpdate() {
1669
- var hasRun = false;
1670
- if (plugin) {
1671
- var pluginState = _getPluginState(plugin);
1672
- var pluginCore = plugin[strCore] || pluginState.core;
1673
- if (plugin && (!pluginCore || pluginCore === updateCtx[strCore]()) && !pluginState[strTeardown]) {
1674
- if (plugin[strUpdate] && plugin[strUpdate](updateCtx, updateState) === true) {
1675
- hasRun = true;
1676
- }
1339
+ return ProcessTelemetryContext;
1340
+ }());
1341
+
1342
+ var strExtensionConfig = "extensionConfig";
1343
+
1344
+ var strGetPlugin = "getPlugin";
1345
+ var BaseTelemetryPlugin = /** @class */ (function () {
1346
+ function BaseTelemetryPlugin() {
1347
+ var _self = this;
1348
+ var _isinitialized = false;
1349
+ var _rootCtx = null;
1350
+ var _nextPlugin = null;
1351
+ _self.core = null;
1352
+ _self.diagLog = function (itemCtx) {
1353
+ return _self._getTelCtx(itemCtx).diagLog();
1354
+ };
1355
+ _self.isInitialized = function () {
1356
+ return _isinitialized;
1357
+ };
1358
+ _self.setInitialized = function (isInitialized) {
1359
+ _isinitialized = isInitialized;
1360
+ };
1361
+ _self.setNextPlugin = function (next) {
1362
+ _nextPlugin = next;
1363
+ };
1364
+ _self.processNext = function (env, itemCtx) {
1365
+ if (itemCtx) {
1366
+ itemCtx.processNext(env);
1367
+ }
1368
+ else if (_nextPlugin && isFunction(_nextPlugin.processTelemetry)) {
1369
+ _nextPlugin.processTelemetry(env, null);
1370
+ }
1371
+ };
1372
+ _self._getTelCtx = function (currentCtx) {
1373
+ if (currentCtx === void 0) { currentCtx = null; }
1374
+ var itemCtx = currentCtx;
1375
+ if (!itemCtx) {
1376
+ var rootCtx = _rootCtx || new ProcessTelemetryContext(null, {}, _self.core);
1377
+ if (_nextPlugin && _nextPlugin[strGetPlugin]) {
1378
+ itemCtx = rootCtx.createNew(null, _nextPlugin[strGetPlugin]);
1379
+ }
1380
+ else {
1381
+ itemCtx = rootCtx.createNew(null, _nextPlugin);
1677
1382
  }
1678
1383
  }
1679
- return hasRun;
1680
- }
1681
- if (!_processChain(updateCtx, _callUpdate, "update", function () { }, false)) {
1682
- updateCtx.processNext(updateState);
1683
- }
1384
+ return itemCtx;
1385
+ };
1386
+ _self._baseTelInit = function (config, core, extensions, pluginChain) {
1387
+ if (config) {
1388
+ setValue(config, strExtensionConfig, [], null, isNullOrUndefined);
1389
+ }
1390
+ if (!pluginChain && core) {
1391
+ pluginChain = core.getProcessTelContext().getNext();
1392
+ }
1393
+ var nextPlugin = _nextPlugin;
1394
+ if (_nextPlugin && _nextPlugin[strGetPlugin]) {
1395
+ nextPlugin = _nextPlugin[strGetPlugin]();
1396
+ }
1397
+ _self.core = core;
1398
+ _rootCtx = new ProcessTelemetryContext(pluginChain, config, core, nextPlugin);
1399
+ _isinitialized = true;
1400
+ };
1684
1401
  }
1685
- return objFreeze(proxyChain);
1686
- }
1402
+ BaseTelemetryPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {
1403
+ this._baseTelInit(config, core, extensions, pluginChain);
1404
+ };
1405
+ return BaseTelemetryPlugin;
1406
+ }());
1687
1407
 
1688
1408
  var strToGMTString = "toGMTString";
1689
1409
  var strToUTCString = "toUTCString";
@@ -1693,6 +1413,7 @@ var strEnabled = "enabled";
1693
1413
  var strIsCookieUseDisabled = "isCookieUseDisabled";
1694
1414
  var strDisableCookiesUsage = "disableCookiesUsage";
1695
1415
  var strConfigCookieMgr = "_ckMgr";
1416
+ var strEmpty = "";
1696
1417
  var _supportsCookies = null;
1697
1418
  var _allowUaSameSite = null;
1698
1419
  var _parsedCookieValue = null;
@@ -1750,7 +1471,7 @@ function createCookieMgr(rootConfig, logger) {
1750
1471
  var result = false;
1751
1472
  if (_isMgrEnabled(cookieMgr)) {
1752
1473
  var values = {};
1753
- var theValue = strTrim(value || strEmpty$1);
1474
+ var theValue = strTrim(value || strEmpty);
1754
1475
  var idx = theValue.indexOf(";");
1755
1476
  if (idx !== -1) {
1756
1477
  theValue = strTrim(value.substring(0, idx));
@@ -1765,11 +1486,11 @@ function createCookieMgr(rootConfig, logger) {
1765
1486
  if (expireMs > 0) {
1766
1487
  var expiry = new Date();
1767
1488
  expiry.setTime(expireMs);
1768
- setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || strEmpty$1, isTruthy);
1489
+ setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || strEmpty, isTruthy);
1769
1490
  }
1770
1491
  }
1771
1492
  if (!_isIE) {
1772
- setValue(values, "max-age", strEmpty$1 + maxAgeSec, null, isUndefined);
1493
+ setValue(values, "max-age", strEmpty + maxAgeSec, null, isUndefined);
1773
1494
  }
1774
1495
  }
1775
1496
  var location_1 = getLocation();
@@ -1790,7 +1511,7 @@ function createCookieMgr(rootConfig, logger) {
1790
1511
  return result;
1791
1512
  },
1792
1513
  get: function (name) {
1793
- var value = strEmpty$1;
1514
+ var value = strEmpty;
1794
1515
  if (_isMgrEnabled(cookieMgr)) {
1795
1516
  value = (cookieMgrConfig.getCookie || _getCookieValue)(name);
1796
1517
  }
@@ -1815,7 +1536,7 @@ function createCookieMgr(rootConfig, logger) {
1815
1536
  values["max-age"] = "0";
1816
1537
  }
1817
1538
  var delCookie = cookieMgrConfig.delCookie || _setCookieValue;
1818
- delCookie(name, _formatCookieValue(strEmpty$1, values));
1539
+ delCookie(name, _formatCookieValue(strEmpty, values));
1819
1540
  result = true;
1820
1541
  }
1821
1542
  return result;
@@ -1832,7 +1553,7 @@ function areCookiesSupported(logger) {
1832
1553
  _supportsCookies = doc[strCookie] !== undefined;
1833
1554
  }
1834
1555
  catch (e) {
1835
- _throwInternal(logger, 2 , 68 , "Cannot access document.cookie - " + getExceptionName(e), { exception: dumpObj(e) });
1556
+ logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotAccessCookie, "Cannot access document.cookie - " + getExceptionName(e), { exception: dumpObj(e) });
1836
1557
  }
1837
1558
  }
1838
1559
  return _supportsCookies;
@@ -1842,7 +1563,7 @@ function _extractParts(theValue) {
1842
1563
  if (theValue && theValue.length) {
1843
1564
  var parts = strTrim(theValue).split(";");
1844
1565
  arrForEach(parts, function (thePart) {
1845
- thePart = strTrim(thePart || strEmpty$1);
1566
+ thePart = strTrim(thePart || strEmpty);
1846
1567
  if (thePart) {
1847
1568
  var idx = thePart.indexOf("=");
1848
1569
  if (idx === -1) {
@@ -1863,21 +1584,21 @@ function _formatDate(theDate, func) {
1863
1584
  return null;
1864
1585
  }
1865
1586
  function _formatCookieValue(value, values) {
1866
- var cookieValue = value || strEmpty$1;
1587
+ var cookieValue = value || strEmpty;
1867
1588
  objForEachKey(values, function (name, theValue) {
1868
- cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : strEmpty$1);
1589
+ cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : strEmpty);
1869
1590
  });
1870
1591
  return cookieValue;
1871
1592
  }
1872
1593
  function _getCookieValue(name) {
1873
- var cookieValue = strEmpty$1;
1594
+ var cookieValue = strEmpty;
1874
1595
  if (_doc) {
1875
- var theCookie = _doc[strCookie] || strEmpty$1;
1596
+ var theCookie = _doc[strCookie] || strEmpty;
1876
1597
  if (_parsedCookieValue !== theCookie) {
1877
1598
  _cookieCache = _extractParts(theCookie);
1878
1599
  _parsedCookieValue = theCookie;
1879
1600
  }
1880
- cookieValue = strTrim(_cookieCache[name] || strEmpty$1);
1601
+ cookieValue = strTrim(_cookieCache[name] || strEmpty);
1881
1602
  }
1882
1603
  return cookieValue;
1883
1604
  }
@@ -1911,290 +1632,86 @@ function uaDisallowsSameSiteNone(userAgent) {
1911
1632
  return false;
1912
1633
  }
1913
1634
 
1914
- var strExtensionConfig = "extensionConfig";
1915
-
1916
- function createUnloadHandlerContainer() {
1917
- var handlers = [];
1918
- function _addHandler(handler) {
1919
- if (handler) {
1920
- handlers.push(handler);
1921
- }
1922
- }
1923
- function _runHandlers(unloadCtx, unloadState) {
1924
- arrForEach(handlers, function (handler) {
1925
- try {
1926
- handler(unloadCtx, unloadState);
1927
- }
1928
- catch (e) {
1929
- _throwInternal(unloadCtx.diagLog(), 2 , 73 , "Unexpected error calling unload handler - " + dumpObj(e));
1930
- }
1931
- });
1932
- handlers = [];
1635
+ var UInt32Mask = 0x100000000;
1636
+ var MaxUInt32 = 0xffffffff;
1637
+ var _mwcSeeded = false;
1638
+ var _mwcW = 123456789;
1639
+ var _mwcZ = 987654321;
1640
+ function _mwcSeed(seedValue) {
1641
+ if (seedValue < 0) {
1642
+ seedValue >>>= 0;
1933
1643
  }
1934
- return {
1935
- add: _addHandler,
1936
- run: _runHandlers
1937
- };
1644
+ _mwcW = (123456789 + seedValue) & MaxUInt32;
1645
+ _mwcZ = (987654321 - seedValue) & MaxUInt32;
1646
+ _mwcSeeded = true;
1938
1647
  }
1939
-
1940
- var strGetPlugin = "getPlugin";
1941
- var BaseTelemetryPlugin = /** @class */ (function () {
1942
- function BaseTelemetryPlugin() {
1943
- var _self = this;
1944
- var _isinitialized;
1945
- var _rootCtx;
1946
- var _nextPlugin;
1947
- var _unloadHandlerContainer;
1948
- var _hooks;
1949
- _initDefaults();
1950
- dynamicProto(BaseTelemetryPlugin, _self, function (_self) {
1951
- _self.initialize = function (config, core, extensions, pluginChain) {
1952
- _setDefaults(config, core, pluginChain);
1953
- _isinitialized = true;
1954
- };
1955
- _self.teardown = function (unloadCtx, unloadState) {
1956
- if (!_self.core || (unloadCtx && _self.core !== unloadCtx.core())) {
1957
- return;
1958
- }
1959
- var result;
1960
- var unloadDone = false;
1961
- var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, {}, _self.core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
1962
- var theUnloadState = unloadState || {
1963
- reason: 0 ,
1964
- isAsync: false
1965
- };
1966
- function _unloadCallback() {
1967
- if (!unloadDone) {
1968
- unloadDone = true;
1969
- _unloadHandlerContainer.run(theUnloadCtx, unloadState);
1970
- arrForEach(_hooks, function (fn) {
1971
- fn.rm();
1972
- });
1973
- _hooks = [];
1974
- if (result === true) {
1975
- theUnloadCtx.processNext(theUnloadState);
1976
- }
1977
- _initDefaults();
1978
- }
1979
- }
1980
- if (!_self[strDoTeardown] || _self[strDoTeardown](theUnloadCtx, theUnloadState, _unloadCallback) !== true) {
1981
- _unloadCallback();
1982
- }
1983
- else {
1984
- result = true;
1985
- }
1986
- return result;
1987
- };
1988
- _self.update = function (updateCtx, updateState) {
1989
- if (!_self.core || (updateCtx && _self.core !== updateCtx.core())) {
1990
- return;
1991
- }
1992
- var result;
1993
- var updateDone = false;
1994
- var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, {}, _self.core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
1995
- var theUpdateState = updateState || {
1996
- reason: 0
1997
- };
1998
- function _updateCallback() {
1999
- if (!updateDone) {
2000
- updateDone = true;
2001
- _setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx.getNext());
2002
- }
2003
- }
2004
- if (!_self._doUpdate || _self._doUpdate(theUpdateCtx, theUpdateState, _updateCallback) !== true) {
2005
- _updateCallback();
2006
- }
2007
- else {
2008
- result = true;
2009
- }
2010
- return result;
2011
- };
2012
- _self._addHook = function (hooks) {
2013
- if (hooks) {
2014
- if (isArray(hooks)) {
2015
- _hooks = _hooks.concat(hooks);
2016
- }
2017
- else {
2018
- _hooks.push(hooks);
2019
- }
2020
- }
2021
- };
2022
- proxyFunctionAs(_self, "_addUnloadCb", function () { return _unloadHandlerContainer; }, "add");
2023
- });
2024
- _self.diagLog = function (itemCtx) {
2025
- return _getTelCtx(itemCtx).diagLog();
2026
- };
2027
- _self[strIsInitialized] = function () {
2028
- return _isinitialized;
2029
- };
2030
- _self.setInitialized = function (isInitialized) {
2031
- _isinitialized = isInitialized;
2032
- };
2033
- _self[strSetNextPlugin] = function (next) {
2034
- _nextPlugin = next;
2035
- };
2036
- _self.processNext = function (env, itemCtx) {
2037
- if (itemCtx) {
2038
- itemCtx.processNext(env);
2039
- }
2040
- else if (_nextPlugin && isFunction(_nextPlugin.processTelemetry)) {
2041
- _nextPlugin.processTelemetry(env, null);
2042
- }
2043
- };
2044
- _self._getTelCtx = _getTelCtx;
2045
- function _getTelCtx(currentCtx) {
2046
- if (currentCtx === void 0) { currentCtx = null; }
2047
- var itemCtx = currentCtx;
2048
- if (!itemCtx) {
2049
- var rootCtx = _rootCtx || createProcessTelemetryContext(null, {}, _self.core);
2050
- if (_nextPlugin && _nextPlugin[strGetPlugin]) {
2051
- itemCtx = rootCtx.createNew(null, _nextPlugin[strGetPlugin]);
2052
- }
2053
- else {
2054
- itemCtx = rootCtx.createNew(null, _nextPlugin);
2055
- }
2056
- }
2057
- return itemCtx;
2058
- }
2059
- function _setDefaults(config, core, pluginChain) {
2060
- if (config) {
2061
- setValue(config, strExtensionConfig, [], null, isNullOrUndefined);
2062
- }
2063
- if (!pluginChain && core) {
2064
- pluginChain = core.getProcessTelContext().getNext();
2065
- }
2066
- var nextPlugin = _nextPlugin;
2067
- if (_nextPlugin && _nextPlugin[strGetPlugin]) {
2068
- nextPlugin = _nextPlugin[strGetPlugin]();
2069
- }
2070
- _self.core = core;
2071
- _rootCtx = createProcessTelemetryContext(pluginChain, config, core, nextPlugin);
2072
- }
2073
- function _initDefaults() {
2074
- _isinitialized = false;
2075
- _self.core = null;
2076
- _rootCtx = null;
2077
- _nextPlugin = null;
2078
- _hooks = [];
2079
- _unloadHandlerContainer = createUnloadHandlerContainer();
2080
- }
1648
+ function _autoSeedMwc() {
1649
+ try {
1650
+ var now = dateNow() & 0x7fffffff;
1651
+ _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
2081
1652
  }
2082
- return BaseTelemetryPlugin;
2083
- }());
2084
-
2085
- var strOnPrefix = "on";
2086
- var strAttachEvent = "attachEvent";
2087
- var strAddEventHelper = "addEventListener";
2088
- var strEvents = "events";
2089
- createUniqueNamespace("aiEvtPageHide");
2090
- createUniqueNamespace("aiEvtPageShow");
2091
- var rRemoveEmptyNs = /\.[\.]+/g;
2092
- var rRemoveTrailingEmptyNs = /[\.]+$/;
2093
- var _guid = 1;
2094
- var elmNodeData = createElmNodeData("events");
2095
- var eventNamespace = /^([^.]*)(?:\.(.+)|)/;
2096
- function _normalizeNamespace(name) {
2097
- if (name && name.replace) {
2098
- return name.replace(/^\s*\.*|\.*\s*$/g, "");
2099
- }
2100
- return name;
2101
- }
2102
- function _getEvtNamespace(eventName, evtNamespace) {
2103
- if (evtNamespace) {
2104
- var theNamespace_1 = "";
2105
- if (isArray(evtNamespace)) {
2106
- theNamespace_1 = "";
2107
- arrForEach(evtNamespace, function (name) {
2108
- name = _normalizeNamespace(name);
2109
- if (name) {
2110
- if (name[0] !== ".") {
2111
- name = "." + name;
2112
- }
2113
- theNamespace_1 += name;
2114
- }
2115
- });
2116
- }
2117
- else {
2118
- theNamespace_1 = _normalizeNamespace(evtNamespace);
2119
- }
2120
- if (theNamespace_1) {
2121
- if (theNamespace_1[0] !== ".") {
2122
- theNamespace_1 = "." + theNamespace_1;
2123
- }
2124
- eventName = (eventName || "") + theNamespace_1;
2125
- }
1653
+ catch (e) {
2126
1654
  }
2127
- var parsedEvent = (eventNamespace.exec(eventName || "") || []);
2128
- return {
2129
- type: parsedEvent[1],
2130
- ns: ((parsedEvent[2] || "").replace(rRemoveEmptyNs, ".").replace(rRemoveTrailingEmptyNs, "").split(".").sort()).join(".")
2131
- };
2132
1655
  }
2133
- function _getRegisteredEvents(target, evtName, addDefault) {
2134
- if (addDefault === void 0) { addDefault = true; }
2135
- var aiEvts = elmNodeData.get(target, strEvents, {}, addDefault);
2136
- var registeredEvents = aiEvts[evtName];
2137
- if (!registeredEvents) {
2138
- registeredEvents = aiEvts[evtName] = [];
1656
+ function randomValue(maxValue) {
1657
+ if (maxValue > 0) {
1658
+ return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
2139
1659
  }
2140
- return registeredEvents;
1660
+ return 0;
2141
1661
  }
2142
- function _doAttach(obj, evtName, handlerRef, useCapture) {
2143
- var result = false;
2144
- if (obj && evtName && evtName.type && handlerRef) {
2145
- if (obj[strAddEventHelper]) {
2146
- obj[strAddEventHelper](evtName.type, handlerRef, useCapture);
2147
- result = true;
2148
- }
2149
- else if (obj[strAttachEvent]) {
2150
- obj[strAttachEvent](strOnPrefix + evtName.type, handlerRef);
2151
- result = true;
1662
+ function random32(signed) {
1663
+ var value;
1664
+ var c = getCrypto() || getMsCrypto();
1665
+ if (c && c.getRandomValues) {
1666
+ value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1667
+ }
1668
+ else if (isIE()) {
1669
+ if (!_mwcSeeded) {
1670
+ _autoSeedMwc();
2152
1671
  }
1672
+ value = mwcRandom32() & MaxUInt32;
2153
1673
  }
2154
- return result;
1674
+ else {
1675
+ value = Math.floor((UInt32Mask * Math.random()) | 0);
1676
+ }
1677
+ if (!signed) {
1678
+ value >>>= 0;
1679
+ }
1680
+ return value;
2155
1681
  }
2156
- function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {
2157
- if (useCapture === void 0) { useCapture = false; }
2158
- var result = false;
2159
- if (target) {
2160
- try {
2161
- var evtName = _getEvtNamespace(eventName, evtNamespace);
2162
- result = _doAttach(target, evtName, handlerRef, useCapture);
2163
- if (result && elmNodeData.accept(target)) {
2164
- var registeredEvent = {
2165
- guid: _guid++,
2166
- evtName: evtName,
2167
- handler: handlerRef,
2168
- capture: useCapture
2169
- };
2170
- _getRegisteredEvents(target, evtName.type).push(registeredEvent);
2171
- }
2172
- }
2173
- catch (e) {
2174
- }
1682
+ function mwcRandomSeed(value) {
1683
+ if (!value) {
1684
+ _autoSeedMwc();
1685
+ }
1686
+ else {
1687
+ _mwcSeed(value);
2175
1688
  }
2176
- return result;
2177
1689
  }
2178
- function attachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {
2179
- if (useCapture === void 0) { useCapture = false; }
2180
- return eventOn(obj, eventNameWithoutOn, handlerRef, null, useCapture);
1690
+ function mwcRandom32(signed) {
1691
+ _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
1692
+ _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
1693
+ var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
1694
+ if (!signed) {
1695
+ value >>>= 0;
1696
+ }
1697
+ return value;
2181
1698
  }
2182
- function addEventHandler(eventName, callback, evtNamespace) {
1699
+
1700
+ var _cookieMgrs = null;
1701
+ var _canUseCookies;
1702
+ function addEventHandler(eventName, callback) {
2183
1703
  var result = false;
2184
1704
  var w = getWindow();
2185
1705
  if (w) {
2186
- result = eventOn(w, eventName, callback, evtNamespace);
2187
- result = eventOn(w["body"], eventName, callback, evtNamespace) || result;
1706
+ result = attachEvent(w, eventName, callback);
1707
+ result = attachEvent(w["body"], eventName, callback) || result;
2188
1708
  }
2189
1709
  var doc = getDocument();
2190
1710
  if (doc) {
2191
- result = eventOn(doc, eventName, callback, evtNamespace) || result;
1711
+ result = attachEvent(doc, eventName, callback) || result;
2192
1712
  }
2193
1713
  return result;
2194
1714
  }
2195
-
2196
- var _cookieMgrs = null;
2197
- var _canUseCookies;
2198
1715
  function newGuid() {
2199
1716
  function randomHexDigit() {
2200
1717
  return randomValue(15);
@@ -2211,9 +1728,26 @@ function perfNow() {
2211
1728
  }
2212
1729
  return dateNow();
2213
1730
  }
1731
+ function newId(maxLength) {
1732
+ if (maxLength === void 0) { maxLength = 22; }
1733
+ var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1734
+ var number = random32() >>> 0;
1735
+ var chars = 0;
1736
+ var result = "";
1737
+ while (result.length < maxLength) {
1738
+ chars++;
1739
+ result += base64chars.charAt(number & 0x3F);
1740
+ number >>>= 6;
1741
+ if (chars === 5) {
1742
+ number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
1743
+ chars = 0;
1744
+ }
1745
+ }
1746
+ return result;
1747
+ }
2214
1748
  function generateW3CId() {
2215
1749
  var hexValues = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
2216
- var oct = strEmpty$1, tmp;
1750
+ var oct = "", tmp;
2217
1751
  for (var a = 0; a < 4; a++) {
2218
1752
  tmp = random32();
2219
1753
  oct +=
@@ -2308,95 +1842,6 @@ function deleteCookie(logger, name) {
2308
1842
  return _legacyCookieMgr(null, logger).del(name);
2309
1843
  }
2310
1844
 
2311
- createEnumStyle({
2312
- CRITICAL: 1 ,
2313
- WARNING: 2
2314
- });
2315
- var _InternalMessageId = createEnumStyle({
2316
- BrowserDoesNotSupportLocalStorage: 0 ,
2317
- BrowserCannotReadLocalStorage: 1 ,
2318
- BrowserCannotReadSessionStorage: 2 ,
2319
- BrowserCannotWriteLocalStorage: 3 ,
2320
- BrowserCannotWriteSessionStorage: 4 ,
2321
- BrowserFailedRemovalFromLocalStorage: 5 ,
2322
- BrowserFailedRemovalFromSessionStorage: 6 ,
2323
- CannotSendEmptyTelemetry: 7 ,
2324
- ClientPerformanceMathError: 8 ,
2325
- ErrorParsingAISessionCookie: 9 ,
2326
- ErrorPVCalc: 10 ,
2327
- ExceptionWhileLoggingError: 11 ,
2328
- FailedAddingTelemetryToBuffer: 12 ,
2329
- FailedMonitorAjaxAbort: 13 ,
2330
- FailedMonitorAjaxDur: 14 ,
2331
- FailedMonitorAjaxOpen: 15 ,
2332
- FailedMonitorAjaxRSC: 16 ,
2333
- FailedMonitorAjaxSend: 17 ,
2334
- FailedMonitorAjaxGetCorrelationHeader: 18 ,
2335
- FailedToAddHandlerForOnBeforeUnload: 19 ,
2336
- FailedToSendQueuedTelemetry: 20 ,
2337
- FailedToReportDataLoss: 21 ,
2338
- FlushFailed: 22 ,
2339
- MessageLimitPerPVExceeded: 23 ,
2340
- MissingRequiredFieldSpecification: 24 ,
2341
- NavigationTimingNotSupported: 25 ,
2342
- OnError: 26 ,
2343
- SessionRenewalDateIsZero: 27 ,
2344
- SenderNotInitialized: 28 ,
2345
- StartTrackEventFailed: 29 ,
2346
- StopTrackEventFailed: 30 ,
2347
- StartTrackFailed: 31 ,
2348
- StopTrackFailed: 32 ,
2349
- TelemetrySampledAndNotSent: 33 ,
2350
- TrackEventFailed: 34 ,
2351
- TrackExceptionFailed: 35 ,
2352
- TrackMetricFailed: 36 ,
2353
- TrackPVFailed: 37 ,
2354
- TrackPVFailedCalc: 38 ,
2355
- TrackTraceFailed: 39 ,
2356
- TransmissionFailed: 40 ,
2357
- FailedToSetStorageBuffer: 41 ,
2358
- FailedToRestoreStorageBuffer: 42 ,
2359
- InvalidBackendResponse: 43 ,
2360
- FailedToFixDepricatedValues: 44 ,
2361
- InvalidDurationValue: 45 ,
2362
- TelemetryEnvelopeInvalid: 46 ,
2363
- CreateEnvelopeError: 47 ,
2364
- CannotSerializeObject: 48 ,
2365
- CannotSerializeObjectNonSerializable: 49 ,
2366
- CircularReferenceDetected: 50 ,
2367
- ClearAuthContextFailed: 51 ,
2368
- ExceptionTruncated: 52 ,
2369
- IllegalCharsInName: 53 ,
2370
- ItemNotInArray: 54 ,
2371
- MaxAjaxPerPVExceeded: 55 ,
2372
- MessageTruncated: 56 ,
2373
- NameTooLong: 57 ,
2374
- SampleRateOutOfRange: 58 ,
2375
- SetAuthContextFailed: 59 ,
2376
- SetAuthContextFailedAccountName: 60 ,
2377
- StringValueTooLong: 61 ,
2378
- StartCalledMoreThanOnce: 62 ,
2379
- StopCalledWithoutStart: 63 ,
2380
- TelemetryInitializerFailed: 64 ,
2381
- TrackArgumentsNotSpecified: 65 ,
2382
- UrlTooLong: 66 ,
2383
- SessionStorageBufferFull: 67 ,
2384
- CannotAccessCookie: 68 ,
2385
- IdTooLong: 69 ,
2386
- InvalidEvent: 70 ,
2387
- FailedMonitorAjaxSetRequestHeader: 71 ,
2388
- SendBrowserInfoOnUserInit: 72 ,
2389
- PluginException: 73 ,
2390
- NotificationException: 74 ,
2391
- SnippetScriptLoadFailure: 99 ,
2392
- InvalidInstrumentationKey: 100 ,
2393
- CannotParseAiBlobValue: 101 ,
2394
- InvalidContentBlob: 102 ,
2395
- TrackPageActionEventFailed: 103 ,
2396
- FailedAddingCustomDefinedRequestContext: 104 ,
2397
- InMemoryStorageBufferFull: 105
2398
- });
2399
-
2400
1845
  var aiInstrumentHooks = "_aiHooks";
2401
1846
  var cbNames = [
2402
1847
  "req", "rsp", "hkErr", "fnErr"
@@ -2455,7 +1900,6 @@ function _createFunctionHook(aiHook) {
2455
1900
  };
2456
1901
  var hookCtx = [];
2457
1902
  var cbArgs = _createArgs([funcArgs], orgArgs);
2458
- funcArgs.evt = getGlobalInst("event");
2459
1903
  function _createArgs(target, theArgs) {
2460
1904
  _arrLoop(theArgs, function (arg) {
2461
1905
  target.push(arg);
@@ -2549,7 +1993,6 @@ function createDomEvent(eventName) {
2549
1993
  return event;
2550
1994
  }
2551
1995
 
2552
- var strEmpty = "";
2553
1996
  function stringToBoolOrDefault(str, defaultValue) {
2554
1997
  if (defaultValue === void 0) { defaultValue = false; }
2555
1998
  if (str === undefined || str === null) {
@@ -2562,16 +2005,16 @@ function msToTimeSpan(totalms) {
2562
2005
  totalms = 0;
2563
2006
  }
2564
2007
  totalms = Math.round(totalms);
2565
- var ms = strEmpty + totalms % 1000;
2566
- var sec = strEmpty + Math.floor(totalms / 1000) % 60;
2567
- var min = strEmpty + Math.floor(totalms / (1000 * 60)) % 60;
2568
- var hour = strEmpty + Math.floor(totalms / (1000 * 60 * 60)) % 24;
2008
+ var ms = "" + totalms % 1000;
2009
+ var sec = "" + Math.floor(totalms / 1000) % 60;
2010
+ var min = "" + Math.floor(totalms / (1000 * 60)) % 60;
2011
+ var hour = "" + Math.floor(totalms / (1000 * 60 * 60)) % 24;
2569
2012
  var days = Math.floor(totalms / (1000 * 60 * 60 * 24));
2570
2013
  ms = ms.length === 1 ? "00" + ms : ms.length === 2 ? "0" + ms : ms;
2571
2014
  sec = sec.length < 2 ? "0" + sec : sec;
2572
2015
  min = min.length < 2 ? "0" + min : min;
2573
2016
  hour = hour.length < 2 ? "0" + hour : hour;
2574
- return (days > 0 ? days + "." : strEmpty) + hour + ":" + min + ":" + sec + "." + ms;
2017
+ return (days > 0 ? days + "." : "") + hour + ":" + min + ":" + sec + "." + ms;
2575
2018
  }
2576
2019
  function getExtensionByName(extensions, identifier) {
2577
2020
  var extension = null;
@@ -2589,15 +2032,17 @@ function isCrossOriginError(message, url, lineNumber, columnNumber, error) {
2589
2032
 
2590
2033
  var strNotSpecified = "not_specified";
2591
2034
 
2592
- var StorageType = createEnumStyle({
2593
- LocalStorage: 0 ,
2594
- SessionStorage: 1
2595
- });
2596
- createEnumStyle({
2597
- AI: 0 ,
2598
- AI_AND_W3C: 1 ,
2599
- W3C: 2
2600
- });
2035
+ var StorageType;
2036
+ (function (StorageType) {
2037
+ StorageType[StorageType["LocalStorage"] = 0] = "LocalStorage";
2038
+ StorageType[StorageType["SessionStorage"] = 1] = "SessionStorage";
2039
+ })(StorageType || (StorageType = {}));
2040
+ var DistributedTracingModes;
2041
+ (function (DistributedTracingModes) {
2042
+ DistributedTracingModes[DistributedTracingModes["AI"] = 0] = "AI";
2043
+ DistributedTracingModes[DistributedTracingModes["AI_AND_W3C"] = 1] = "AI_AND_W3C";
2044
+ DistributedTracingModes[DistributedTracingModes["W3C"] = 2] = "W3C";
2045
+ })(DistributedTracingModes || (DistributedTracingModes = {}));
2601
2046
 
2602
2047
  var _canUseLocalStorage = undefined;
2603
2048
  var _canUseSessionStorage = undefined;
@@ -2635,8 +2080,8 @@ function utlDisableStorage() {
2635
2080
  _canUseLocalStorage = false;
2636
2081
  _canUseSessionStorage = false;
2637
2082
  }
2638
- function utlCanUseLocalStorage(reset) {
2639
- if (reset || _canUseLocalStorage === undefined) {
2083
+ function utlCanUseLocalStorage() {
2084
+ if (_canUseLocalStorage === undefined) {
2640
2085
  _canUseLocalStorage = !!_getVerifiedStorageObject(StorageType.LocalStorage);
2641
2086
  }
2642
2087
  return _canUseLocalStorage;
@@ -2649,7 +2094,7 @@ function utlGetLocalStorage(logger, name) {
2649
2094
  }
2650
2095
  catch (e) {
2651
2096
  _canUseLocalStorage = false;
2652
- _throwInternal(logger, 2 , _InternalMessageId.BrowserCannotReadLocalStorage, "Browser failed read of local storage. " + getExceptionName(e), { exception: dumpObj(e) });
2097
+ logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotReadLocalStorage, "Browser failed read of local storage. " + getExceptionName(e), { exception: dumpObj(e) });
2653
2098
  }
2654
2099
  }
2655
2100
  return null;
@@ -2663,7 +2108,7 @@ function utlSetLocalStorage(logger, name, data) {
2663
2108
  }
2664
2109
  catch (e) {
2665
2110
  _canUseLocalStorage = false;
2666
- _throwInternal(logger, 2 , _InternalMessageId.BrowserCannotWriteLocalStorage, "Browser failed write to local storage. " + getExceptionName(e), { exception: dumpObj(e) });
2111
+ logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotWriteLocalStorage, "Browser failed write to local storage. " + getExceptionName(e), { exception: dumpObj(e) });
2667
2112
  }
2668
2113
  }
2669
2114
  return false;
@@ -2677,13 +2122,13 @@ function utlRemoveStorage(logger, name) {
2677
2122
  }
2678
2123
  catch (e) {
2679
2124
  _canUseLocalStorage = false;
2680
- _throwInternal(logger, 2 , _InternalMessageId.BrowserFailedRemovalFromLocalStorage, "Browser failed removal of local storage item. " + getExceptionName(e), { exception: dumpObj(e) });
2125
+ logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserFailedRemovalFromLocalStorage, "Browser failed removal of local storage item. " + getExceptionName(e), { exception: dumpObj(e) });
2681
2126
  }
2682
2127
  }
2683
2128
  return false;
2684
2129
  }
2685
- function utlCanUseSessionStorage(reset) {
2686
- if (reset || _canUseSessionStorage === undefined) {
2130
+ function utlCanUseSessionStorage() {
2131
+ if (_canUseSessionStorage === undefined) {
2687
2132
  _canUseSessionStorage = !!_getVerifiedStorageObject(StorageType.SessionStorage);
2688
2133
  }
2689
2134
  return _canUseSessionStorage;
@@ -2705,7 +2150,7 @@ function utlGetSessionStorage(logger, name) {
2705
2150
  }
2706
2151
  catch (e) {
2707
2152
  _canUseSessionStorage = false;
2708
- _throwInternal(logger, 2 , _InternalMessageId.BrowserCannotReadSessionStorage, "Browser failed read of session storage. " + getExceptionName(e), { exception: dumpObj(e) });
2153
+ logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotReadSessionStorage, "Browser failed read of session storage. " + getExceptionName(e), { exception: dumpObj(e) });
2709
2154
  }
2710
2155
  }
2711
2156
  return null;
@@ -2719,7 +2164,7 @@ function utlSetSessionStorage(logger, name, data) {
2719
2164
  }
2720
2165
  catch (e) {
2721
2166
  _canUseSessionStorage = false;
2722
- _throwInternal(logger, 2 , _InternalMessageId.BrowserCannotWriteSessionStorage, "Browser failed write to session storage. " + getExceptionName(e), { exception: dumpObj(e) });
2167
+ logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotWriteSessionStorage, "Browser failed write to session storage. " + getExceptionName(e), { exception: dumpObj(e) });
2723
2168
  }
2724
2169
  }
2725
2170
  return false;
@@ -2733,7 +2178,7 @@ function utlRemoveSessionStorage(logger, name) {
2733
2178
  }
2734
2179
  catch (e) {
2735
2180
  _canUseSessionStorage = false;
2736
- _throwInternal(logger, 2 , _InternalMessageId.BrowserFailedRemovalFromSessionStorage, "Browser failed removal of session storage item. " + getExceptionName(e), { exception: dumpObj(e) });
2181
+ logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserFailedRemovalFromSessionStorage, "Browser failed removal of session storage item. " + getExceptionName(e), { exception: dumpObj(e) });
2737
2182
  }
2738
2183
  }
2739
2184
  return false;
@@ -2745,7 +2190,7 @@ var _internalEndpoints = [
2745
2190
  "https://dc-int.services.visualstudio.com/v2/track"
2746
2191
  ];
2747
2192
  function isInternalApplicationInsightsEndpoint(endpointUrl) {
2748
- return _internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;
2193
+ return arrIndexOf(_internalEndpoints, endpointUrl.toLowerCase()) !== -1;
2749
2194
  }
2750
2195
  var Util = {
2751
2196
  NotSpecified: strNotSpecified,
@@ -2864,7 +2309,7 @@ var FilterList = /** @class */ (function () {
2864
2309
  ch.childNodes[0].className = "checkbox off";
2865
2310
  }
2866
2311
  }
2867
- _self.filterList.splice(_self.filterList.indexOf(t), 1);
2312
+ _self.filterList.splice(arrIndexOf(_self.filterList, t), 1);
2868
2313
  checkbox.className = "checkbox on";
2869
2314
  }
2870
2315
  else {
@@ -3114,7 +2559,7 @@ function getTargetKeys(target, excludedKeys, includeFunctions) {
3114
2559
  if (propKeys) {
3115
2560
  arrForEach(propKeys, function (key) {
3116
2561
  var theKey = _toString(key);
3117
- if (theKey && keys.indexOf(theKey) === -1) {
2562
+ if (theKey && arrIndexOf(keys, theKey) === -1) {
3118
2563
  keys.push(key);
3119
2564
  }
3120
2565
  });
@@ -3130,7 +2575,7 @@ function getTargetKeys(target, excludedKeys, includeFunctions) {
3130
2575
  return;
3131
2576
  }
3132
2577
  var theKey = _toString(key);
3133
- if (theKey && excludedKeys.indexOf(theKey) === -1) {
2578
+ if (theKey && arrIndexOf(excludedKeys, theKey) === -1) {
3134
2579
  theKeys.push(theKey);
3135
2580
  }
3136
2581
  });
@@ -3172,7 +2617,7 @@ function formatLogElements(target, tmLabel, key, level, textFilter, excludeKeys,
3172
2617
  }
3173
2618
  for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
3174
2619
  var key_1 = keys_1[_i];
3175
- if (excludeKeys.indexOf(key_1) !== -1) {
2620
+ if (arrIndexOf(excludeKeys, key_1) !== -1) {
3176
2621
  continue;
3177
2622
  }
3178
2623
  var targetValue = target[key_1];
@@ -3362,7 +2807,7 @@ var LogEntry = /** @class */ (function () {
3362
2807
  }
3363
2808
  }
3364
2809
  else if (isString(value) || isNumber(value) || isBoolean(value)) {
3365
- return _testValue(rg, objToString(value));
2810
+ return _testValue(rg, value.toString());
3366
2811
  }
3367
2812
  }
3368
2813
  return false;
@@ -3505,11 +2950,11 @@ var Dashboard = /** @class */ (function () {
3505
2950
  return;
3506
2951
  }
3507
2952
  var type = entry.getKind();
3508
- var allowOther = excludedTypes_1.indexOf("other") === -1;
3509
- if (trackers.indexOf(type) === -1 && !allowOther) {
2953
+ var allowOther = arrIndexOf(excludedTypes_1, "other") === -1;
2954
+ if (arrIndexOf(trackers, type) === -1 && !allowOther) {
3510
2955
  return;
3511
2956
  }
3512
- else if (excludedTypes_1.indexOf(type) !== -1) {
2957
+ else if (arrIndexOf(excludedTypes_1, type) !== -1) {
3513
2958
  return;
3514
2959
  }
3515
2960
  var newEl = entry.render(textFilter, config.excludeKeys, config.includeFunctions);
@@ -3783,16 +3228,16 @@ var DebugPlugin = /** @class */ (function (_super) {
3783
3228
  dashboard.newLogEntry(perfEvent, dateNow() - startTime, evtName, 0, "perfEvent");
3784
3229
  }
3785
3230
  });
3786
- if (trackers.indexOf("eventsSent") !== -1) {
3231
+ if (arrIndexOf(trackers, "eventsSent") !== -1) {
3787
3232
  foundTrackers_1.push("eventsSent");
3788
3233
  }
3789
- if (trackers.indexOf("eventsSendRequest") !== -1) {
3234
+ if (arrIndexOf(trackers, "eventsSendRequest") !== -1) {
3790
3235
  foundTrackers_1.push("eventsSendRequest");
3791
3236
  }
3792
- if (trackers.indexOf("eventsDiscarded") !== -1) {
3237
+ if (arrIndexOf(trackers, "eventsDiscarded") !== -1) {
3793
3238
  foundTrackers_1.push("eventsDiscarded");
3794
3239
  }
3795
- if (trackers.indexOf("perfEvent") !== -1) {
3240
+ if (arrIndexOf(trackers, "perfEvent") !== -1) {
3796
3241
  foundTrackers_1.push("perfEvent");
3797
3242
  }
3798
3243
  }
@@ -3828,7 +3273,7 @@ var DebugPlugin = /** @class */ (function (_super) {
3828
3273
  rsp: _handleInstPostHook()
3829
3274
  }, true);
3830
3275
  if (val) {
3831
- if (foundTrackers_1.indexOf(tracker) === -1) {
3276
+ if (arrIndexOf(foundTrackers_1, tracker) === -1) {
3832
3277
  foundTrackers_1.push(tracker);
3833
3278
  }
3834
3279
  }
@@ -3865,7 +3310,7 @@ var DebugPlugin = /** @class */ (function (_super) {
3865
3310
  }
3866
3311
  };
3867
3312
  function _addTarget(targetObjects, ext) {
3868
- if (ext && targetObjects.indexOf(ext) === -1) {
3313
+ if (ext && arrIndexOf(targetObjects, ext) === -1) {
3869
3314
  targetObjects.push(ext);
3870
3315
  return true;
3871
3316
  }
@@ -3968,4 +3413,4 @@ var DebugPlugin = /** @class */ (function (_super) {
3968
3413
  var DebugPlugin$1 = DebugPlugin;
3969
3414
 
3970
3415
  exports.DebugPlugin = DebugPlugin$1;
3971
- //# sourceMappingURL=ai.dbg.2.7.5-nightly.2204-03.cjs.js.map
3416
+ //# sourceMappingURL=ai.dbg.2.7.6.cjs.js.map