@microsoft/applicationinsights-analytics-js 2.8.0-nightly.2204-04 → 2.8.0-nightly.2204-05

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 (29) hide show
  1. package/browser/applicationinsights-analytics-js.integrity.json +9 -9
  2. package/browser/applicationinsights-analytics-js.js +311 -386
  3. package/browser/applicationinsights-analytics-js.js.map +1 -1
  4. package/browser/applicationinsights-analytics-js.min.js +2 -2
  5. package/browser/applicationinsights-analytics-js.min.js.map +1 -1
  6. package/dist/applicationinsights-analytics-js.d.ts +1 -1
  7. package/dist/applicationinsights-analytics-js.js +311 -386
  8. package/dist/applicationinsights-analytics-js.js.map +1 -1
  9. package/dist/applicationinsights-analytics-js.min.js +2 -2
  10. package/dist/applicationinsights-analytics-js.min.js.map +1 -1
  11. package/dist/applicationinsights-analytics-js.rollup.d.ts +1 -1
  12. package/dist-esm/JavaScriptSDK/AnalyticsPlugin.js +14 -14
  13. package/dist-esm/JavaScriptSDK/AnalyticsPlugin.js.map +1 -1
  14. package/dist-esm/JavaScriptSDK/Telemetry/PageViewManager.js +4 -4
  15. package/dist-esm/JavaScriptSDK/Telemetry/PageViewManager.js.map +1 -1
  16. package/dist-esm/JavaScriptSDK/Telemetry/PageViewPerformanceManager.js +6 -5
  17. package/dist-esm/JavaScriptSDK/Telemetry/PageViewPerformanceManager.js.map +1 -1
  18. package/dist-esm/JavaScriptSDK/Telemetry/PageVisitTimeManager.js +6 -6
  19. package/dist-esm/JavaScriptSDK/Telemetry/PageVisitTimeManager.js.map +1 -1
  20. package/dist-esm/JavaScriptSDK/Timing.js +4 -4
  21. package/dist-esm/JavaScriptSDK/Timing.js.map +1 -1
  22. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryConfig.js +1 -1
  23. package/dist-esm/applicationinsights-analytics-js.js +1 -1
  24. package/package.json +5 -5
  25. package/src/JavaScriptSDK/AnalyticsPlugin.ts +25 -25
  26. package/src/JavaScriptSDK/Telemetry/PageViewManager.ts +8 -8
  27. package/src/JavaScriptSDK/Telemetry/PageViewPerformanceManager.ts +13 -11
  28. package/src/JavaScriptSDK/Telemetry/PageVisitTimeManager.ts +5 -5
  29. package/src/JavaScriptSDK/Timing.ts +3 -3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Web Analytics, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Web Analytics, 2.8.0-nightly.2204-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -98,247 +98,6 @@
98
98
  d[strShimPrototype] = b === null ? objCreateFn(b) : (__[strShimPrototype] = b[strShimPrototype], new __());
99
99
  }
100
100
 
101
- /*!
102
- * Microsoft Dynamic Proto Utility, 1.1.4
103
- * Copyright (c) Microsoft and contributors. All rights reserved.
104
- */
105
- var Constructor = 'constructor';
106
- var Prototype = 'prototype';
107
- var strFunction = 'function';
108
- var DynInstFuncTable = '_dynInstFuncs';
109
- var DynProxyTag = '_isDynProxy';
110
- var DynClassName = '_dynClass';
111
- var DynClassNamePrefix = '_dynCls$';
112
- var DynInstChkTag = '_dynInstChk';
113
- var DynAllowInstChkTag = DynInstChkTag;
114
- var DynProtoDefaultOptions = '_dfOpts';
115
- var UnknownValue = '_unknown_';
116
- var str__Proto$1 = "__proto__";
117
- var strUseBaseInst = 'useBaseInst';
118
- var strSetInstFuncs = 'setInstFuncs';
119
- var Obj = Object;
120
- var _objGetPrototypeOf$1 = Obj["getPrototypeOf"];
121
- var _dynamicNames = 0;
122
- function _hasOwnProperty(obj, prop) {
123
- return obj && Obj[Prototype].hasOwnProperty.call(obj, prop);
124
- }
125
- function _isObjectOrArrayPrototype(target) {
126
- return target && (target === Obj[Prototype] || target === Array[Prototype]);
127
- }
128
- function _isObjectArrayOrFunctionPrototype(target) {
129
- return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
130
- }
131
- function _getObjProto$1(target) {
132
- if (target) {
133
- if (_objGetPrototypeOf$1) {
134
- return _objGetPrototypeOf$1(target);
135
- }
136
- var newProto = target[str__Proto$1] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
137
- if (newProto) {
138
- return newProto;
139
- }
140
- }
141
- return null;
142
- }
143
- function _forEachProp(target, func) {
144
- var props = [];
145
- var getOwnProps = Obj["getOwnPropertyNames"];
146
- if (getOwnProps) {
147
- props = getOwnProps(target);
148
- }
149
- else {
150
- for (var name_1 in target) {
151
- if (typeof name_1 === "string" && _hasOwnProperty(target, name_1)) {
152
- props.push(name_1);
153
- }
154
- }
155
- }
156
- if (props && props.length > 0) {
157
- for (var lp = 0; lp < props.length; lp++) {
158
- func(props[lp]);
159
- }
160
- }
161
- }
162
- function _isDynamicCandidate(target, funcName, skipOwn) {
163
- return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || _hasOwnProperty(target, funcName)));
164
- }
165
- function _throwTypeError(message) {
166
- throw new TypeError("DynamicProto: " + message);
167
- }
168
- function _getInstanceFuncs(thisTarget) {
169
- var instFuncs = {};
170
- _forEachProp(thisTarget, function (name) {
171
- if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {
172
- instFuncs[name] = thisTarget[name];
173
- }
174
- });
175
- return instFuncs;
176
- }
177
- function _hasVisited(values, value) {
178
- for (var lp = values.length - 1; lp >= 0; lp--) {
179
- if (values[lp] === value) {
180
- return true;
181
- }
182
- }
183
- return false;
184
- }
185
- function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
186
- function _instFuncProxy(target, funcHost, funcName) {
187
- var theFunc = funcHost[funcName];
188
- if (theFunc[DynProxyTag] && useBaseInst) {
189
- var instFuncTable = target[DynInstFuncTable] || {};
190
- if (instFuncTable[DynAllowInstChkTag] !== false) {
191
- theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;
192
- }
193
- }
194
- return function () {
195
- return theFunc.apply(target, arguments);
196
- };
197
- }
198
- var baseFuncs = {};
199
- _forEachProp(instFuncs, function (name) {
200
- baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
201
- });
202
- var baseProto = _getObjProto$1(classProto);
203
- var visited = [];
204
- while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
205
- _forEachProp(baseProto, function (name) {
206
- if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf$1)) {
207
- baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
208
- }
209
- });
210
- visited.push(baseProto);
211
- baseProto = _getObjProto$1(baseProto);
212
- }
213
- return baseFuncs;
214
- }
215
- function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
216
- var instFunc = null;
217
- if (target && _hasOwnProperty(proto, DynClassName)) {
218
- var instFuncTable = target[DynInstFuncTable] || {};
219
- instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];
220
- if (!instFunc) {
221
- _throwTypeError("Missing [" + funcName + "] " + strFunction);
222
- }
223
- if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
224
- var canAddInst = !_hasOwnProperty(target, funcName);
225
- var objProto = _getObjProto$1(target);
226
- var visited = [];
227
- while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
228
- var protoFunc = objProto[funcName];
229
- if (protoFunc) {
230
- canAddInst = (protoFunc === currentDynProtoProxy);
231
- break;
232
- }
233
- visited.push(objProto);
234
- objProto = _getObjProto$1(objProto);
235
- }
236
- try {
237
- if (canAddInst) {
238
- target[funcName] = instFunc;
239
- }
240
- instFunc[DynInstChkTag] = 1;
241
- }
242
- catch (e) {
243
- instFuncTable[DynAllowInstChkTag] = false;
244
- }
245
- }
246
- }
247
- return instFunc;
248
- }
249
- function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
250
- var protoFunc = proto[funcName];
251
- if (protoFunc === currentDynProtoProxy) {
252
- protoFunc = _getObjProto$1(proto)[funcName];
253
- }
254
- if (typeof protoFunc !== strFunction) {
255
- _throwTypeError("[" + funcName + "] is not a " + strFunction);
256
- }
257
- return protoFunc;
258
- }
259
- function _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {
260
- function _createDynamicPrototype(proto, funcName) {
261
- var dynProtoProxy = function () {
262
- var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
263
- return instFunc.apply(this, arguments);
264
- };
265
- dynProtoProxy[DynProxyTag] = 1;
266
- return dynProtoProxy;
267
- }
268
- if (!_isObjectOrArrayPrototype(proto)) {
269
- var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};
270
- var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || {});
271
- if (instFuncTable[DynAllowInstChkTag] !== false) {
272
- instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
273
- }
274
- _forEachProp(target, function (name) {
275
- if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
276
- instFuncs_1[name] = target[name];
277
- delete target[name];
278
- if (!_hasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
279
- proto[name] = _createDynamicPrototype(proto, name);
280
- }
281
- }
282
- });
283
- }
284
- }
285
- function _checkPrototype(classProto, thisTarget) {
286
- if (_objGetPrototypeOf$1) {
287
- var visited = [];
288
- var thisProto = _getObjProto$1(thisTarget);
289
- while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
290
- if (thisProto === classProto) {
291
- return true;
292
- }
293
- visited.push(thisProto);
294
- thisProto = _getObjProto$1(thisProto);
295
- }
296
- }
297
- return false;
298
- }
299
- function _getObjName(target, unknownValue) {
300
- if (_hasOwnProperty(target, Prototype)) {
301
- return target.name || unknownValue || UnknownValue;
302
- }
303
- return (((target || {})[Constructor]) || {}).name || unknownValue || UnknownValue;
304
- }
305
- function dynamicProto(theClass, target, delegateFunc, options) {
306
- if (!_hasOwnProperty(theClass, Prototype)) {
307
- _throwTypeError("theClass is an invalid class definition.");
308
- }
309
- var classProto = theClass[Prototype];
310
- if (!_checkPrototype(classProto, target)) {
311
- _throwTypeError("[" + _getObjName(theClass) + "] is not in class hierarchy of [" + _getObjName(target) + "]");
312
- }
313
- var className = null;
314
- if (_hasOwnProperty(classProto, DynClassName)) {
315
- className = classProto[DynClassName];
316
- }
317
- else {
318
- className = DynClassNamePrefix + _getObjName(theClass, "_") + "$" + _dynamicNames;
319
- _dynamicNames++;
320
- classProto[DynClassName] = className;
321
- }
322
- var perfOptions = dynamicProto[DynProtoDefaultOptions];
323
- var useBaseInst = !!perfOptions[strUseBaseInst];
324
- if (useBaseInst && options && options[strUseBaseInst] !== undefined) {
325
- useBaseInst = !!options[strUseBaseInst];
326
- }
327
- var instFuncs = _getInstanceFuncs(target);
328
- var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);
329
- delegateFunc(target, baseFuncs);
330
- var setInstanceFunc = !!_objGetPrototypeOf$1 && !!perfOptions[strSetInstFuncs];
331
- if (setInstanceFunc && options) {
332
- setInstanceFunc = !!options[strSetInstFuncs];
333
- }
334
- _populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);
335
- }
336
- var perfDefaults = {
337
- setInstFuncs: true,
338
- useBaseInst: true
339
- };
340
- dynamicProto[DynProtoDefaultOptions] = perfDefaults;
341
-
342
101
  var strEmpty$1 = "";
343
102
  var strSetNextPlugin = "setNextPlugin";
344
103
  var strIsInitialized = "isInitialized";
@@ -353,7 +112,7 @@
353
112
  var strMap = "map";
354
113
  var cStrTrim = "trim";
355
114
  var strToString = "toString";
356
- var str__Proto = "__proto__";
115
+ var str__Proto$1 = "__proto__";
357
116
  var strConstructor = "constructor";
358
117
  var _objDefineProperty$1 = ObjDefineProperty;
359
118
  var _objFreeze = ObjClass.freeze;
@@ -370,13 +129,13 @@
370
129
  var rCamelCase = /-([a-z])/g;
371
130
  var rNormalizeInvalid = /([^\w\d_$])/g;
372
131
  var rLeadingNumeric = /^(\d+[\w\d_$])/;
373
- var _objGetPrototypeOf = Object["getPrototypeOf"];
374
- function _getObjProto(target) {
132
+ var _objGetPrototypeOf$1 = Object["getPrototypeOf"];
133
+ function _getObjProto$1(target) {
375
134
  if (target) {
376
- if (_objGetPrototypeOf) {
377
- return _objGetPrototypeOf(target);
135
+ if (_objGetPrototypeOf$1) {
136
+ return _objGetPrototypeOf$1(target);
378
137
  }
379
- var newProto = target[str__Proto] || target[strShimPrototype] || target[strConstructor];
138
+ var newProto = target[str__Proto$1] || target[strShimPrototype] || target[strConstructor];
380
139
  if (newProto) {
381
140
  return newProto;
382
141
  }
@@ -468,7 +227,7 @@
468
227
  function isPlainObject(value) {
469
228
  var result = false;
470
229
  if (value && typeof value === "object") {
471
- var proto = _objGetPrototypeOf ? _objGetPrototypeOf(value) : _getObjProto(value);
230
+ var proto = _objGetPrototypeOf$1 ? _objGetPrototypeOf$1(value) : _getObjProto$1(value);
472
231
  if (!proto) {
473
232
  result = true;
474
233
  }
@@ -604,6 +363,16 @@
604
363
  function _doNothing(value) {
605
364
  return value;
606
365
  }
366
+ function deepFreeze(obj) {
367
+ if (_objFreeze) {
368
+ objForEachKey(obj, function (name, value) {
369
+ if (isArray(value) || isObject(value)) {
370
+ _objFreeze(value);
371
+ }
372
+ });
373
+ }
374
+ return objFreeze(obj);
375
+ }
607
376
  var objFreeze = _objFreeze || _doNothing;
608
377
  function dateNow() {
609
378
  var dt = Date;
@@ -652,24 +421,12 @@
652
421
  };
653
422
  }
654
423
  function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
655
- if (overwriteTarget === void 0) { overwriteTarget = true; }
656
424
  if (target && name && source) {
657
- if (overwriteTarget || isUndefined(target[name])) {
425
+ if (overwriteTarget !== false || isUndefined(target[name])) {
658
426
  target[name] = _createProxyFunction(source, theFunc);
659
427
  }
660
428
  }
661
429
  }
662
- function createEnumStyle(values) {
663
- var enumClass = {};
664
- objForEachKey(values, function (field, value) {
665
- enumClass[field] = value;
666
- if (!isUndefined(enumClass[value])) {
667
- throwError("[" + value + "] exists for " + field);
668
- }
669
- enumClass[value] = field;
670
- });
671
- return objFreeze(enumClass);
672
- }
673
430
  function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {
674
431
  var theArgs = arguments;
675
432
  var extended = theArgs[0] || {};
@@ -715,6 +472,256 @@
715
472
  return extended;
716
473
  }
717
474
 
475
+ function createEnumStyle(values) {
476
+ var enumClass = {};
477
+ objForEachKey(values, function (field, value) {
478
+ enumClass[field] = value;
479
+ enumClass[value] = field;
480
+ });
481
+ return deepFreeze(enumClass);
482
+ }
483
+
484
+ /*!
485
+ * Microsoft Dynamic Proto Utility, 1.1.4
486
+ * Copyright (c) Microsoft and contributors. All rights reserved.
487
+ */
488
+ var Constructor = 'constructor';
489
+ var Prototype = 'prototype';
490
+ var strFunction = 'function';
491
+ var DynInstFuncTable = '_dynInstFuncs';
492
+ var DynProxyTag = '_isDynProxy';
493
+ var DynClassName = '_dynClass';
494
+ var DynClassNamePrefix = '_dynCls$';
495
+ var DynInstChkTag = '_dynInstChk';
496
+ var DynAllowInstChkTag = DynInstChkTag;
497
+ var DynProtoDefaultOptions = '_dfOpts';
498
+ var UnknownValue = '_unknown_';
499
+ var str__Proto = "__proto__";
500
+ var strUseBaseInst = 'useBaseInst';
501
+ var strSetInstFuncs = 'setInstFuncs';
502
+ var Obj = Object;
503
+ var _objGetPrototypeOf = Obj["getPrototypeOf"];
504
+ var _dynamicNames = 0;
505
+ function _hasOwnProperty(obj, prop) {
506
+ return obj && Obj[Prototype].hasOwnProperty.call(obj, prop);
507
+ }
508
+ function _isObjectOrArrayPrototype(target) {
509
+ return target && (target === Obj[Prototype] || target === Array[Prototype]);
510
+ }
511
+ function _isObjectArrayOrFunctionPrototype(target) {
512
+ return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
513
+ }
514
+ function _getObjProto(target) {
515
+ if (target) {
516
+ if (_objGetPrototypeOf) {
517
+ return _objGetPrototypeOf(target);
518
+ }
519
+ var newProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
520
+ if (newProto) {
521
+ return newProto;
522
+ }
523
+ }
524
+ return null;
525
+ }
526
+ function _forEachProp(target, func) {
527
+ var props = [];
528
+ var getOwnProps = Obj["getOwnPropertyNames"];
529
+ if (getOwnProps) {
530
+ props = getOwnProps(target);
531
+ }
532
+ else {
533
+ for (var name_1 in target) {
534
+ if (typeof name_1 === "string" && _hasOwnProperty(target, name_1)) {
535
+ props.push(name_1);
536
+ }
537
+ }
538
+ }
539
+ if (props && props.length > 0) {
540
+ for (var lp = 0; lp < props.length; lp++) {
541
+ func(props[lp]);
542
+ }
543
+ }
544
+ }
545
+ function _isDynamicCandidate(target, funcName, skipOwn) {
546
+ return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || _hasOwnProperty(target, funcName)));
547
+ }
548
+ function _throwTypeError(message) {
549
+ throw new TypeError("DynamicProto: " + message);
550
+ }
551
+ function _getInstanceFuncs(thisTarget) {
552
+ var instFuncs = {};
553
+ _forEachProp(thisTarget, function (name) {
554
+ if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {
555
+ instFuncs[name] = thisTarget[name];
556
+ }
557
+ });
558
+ return instFuncs;
559
+ }
560
+ function _hasVisited(values, value) {
561
+ for (var lp = values.length - 1; lp >= 0; lp--) {
562
+ if (values[lp] === value) {
563
+ return true;
564
+ }
565
+ }
566
+ return false;
567
+ }
568
+ function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
569
+ function _instFuncProxy(target, funcHost, funcName) {
570
+ var theFunc = funcHost[funcName];
571
+ if (theFunc[DynProxyTag] && useBaseInst) {
572
+ var instFuncTable = target[DynInstFuncTable] || {};
573
+ if (instFuncTable[DynAllowInstChkTag] !== false) {
574
+ theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;
575
+ }
576
+ }
577
+ return function () {
578
+ return theFunc.apply(target, arguments);
579
+ };
580
+ }
581
+ var baseFuncs = {};
582
+ _forEachProp(instFuncs, function (name) {
583
+ baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
584
+ });
585
+ var baseProto = _getObjProto(classProto);
586
+ var visited = [];
587
+ while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
588
+ _forEachProp(baseProto, function (name) {
589
+ if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {
590
+ baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
591
+ }
592
+ });
593
+ visited.push(baseProto);
594
+ baseProto = _getObjProto(baseProto);
595
+ }
596
+ return baseFuncs;
597
+ }
598
+ function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
599
+ var instFunc = null;
600
+ if (target && _hasOwnProperty(proto, DynClassName)) {
601
+ var instFuncTable = target[DynInstFuncTable] || {};
602
+ instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];
603
+ if (!instFunc) {
604
+ _throwTypeError("Missing [" + funcName + "] " + strFunction);
605
+ }
606
+ if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
607
+ var canAddInst = !_hasOwnProperty(target, funcName);
608
+ var objProto = _getObjProto(target);
609
+ var visited = [];
610
+ while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
611
+ var protoFunc = objProto[funcName];
612
+ if (protoFunc) {
613
+ canAddInst = (protoFunc === currentDynProtoProxy);
614
+ break;
615
+ }
616
+ visited.push(objProto);
617
+ objProto = _getObjProto(objProto);
618
+ }
619
+ try {
620
+ if (canAddInst) {
621
+ target[funcName] = instFunc;
622
+ }
623
+ instFunc[DynInstChkTag] = 1;
624
+ }
625
+ catch (e) {
626
+ instFuncTable[DynAllowInstChkTag] = false;
627
+ }
628
+ }
629
+ }
630
+ return instFunc;
631
+ }
632
+ function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
633
+ var protoFunc = proto[funcName];
634
+ if (protoFunc === currentDynProtoProxy) {
635
+ protoFunc = _getObjProto(proto)[funcName];
636
+ }
637
+ if (typeof protoFunc !== strFunction) {
638
+ _throwTypeError("[" + funcName + "] is not a " + strFunction);
639
+ }
640
+ return protoFunc;
641
+ }
642
+ function _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {
643
+ function _createDynamicPrototype(proto, funcName) {
644
+ var dynProtoProxy = function () {
645
+ var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
646
+ return instFunc.apply(this, arguments);
647
+ };
648
+ dynProtoProxy[DynProxyTag] = 1;
649
+ return dynProtoProxy;
650
+ }
651
+ if (!_isObjectOrArrayPrototype(proto)) {
652
+ var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};
653
+ var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || {});
654
+ if (instFuncTable[DynAllowInstChkTag] !== false) {
655
+ instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
656
+ }
657
+ _forEachProp(target, function (name) {
658
+ if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
659
+ instFuncs_1[name] = target[name];
660
+ delete target[name];
661
+ if (!_hasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
662
+ proto[name] = _createDynamicPrototype(proto, name);
663
+ }
664
+ }
665
+ });
666
+ }
667
+ }
668
+ function _checkPrototype(classProto, thisTarget) {
669
+ if (_objGetPrototypeOf) {
670
+ var visited = [];
671
+ var thisProto = _getObjProto(thisTarget);
672
+ while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
673
+ if (thisProto === classProto) {
674
+ return true;
675
+ }
676
+ visited.push(thisProto);
677
+ thisProto = _getObjProto(thisProto);
678
+ }
679
+ }
680
+ return false;
681
+ }
682
+ function _getObjName(target, unknownValue) {
683
+ if (_hasOwnProperty(target, Prototype)) {
684
+ return target.name || unknownValue || UnknownValue;
685
+ }
686
+ return (((target || {})[Constructor]) || {}).name || unknownValue || UnknownValue;
687
+ }
688
+ function dynamicProto(theClass, target, delegateFunc, options) {
689
+ if (!_hasOwnProperty(theClass, Prototype)) {
690
+ _throwTypeError("theClass is an invalid class definition.");
691
+ }
692
+ var classProto = theClass[Prototype];
693
+ if (!_checkPrototype(classProto, target)) {
694
+ _throwTypeError("[" + _getObjName(theClass) + "] is not in class hierarchy of [" + _getObjName(target) + "]");
695
+ }
696
+ var className = null;
697
+ if (_hasOwnProperty(classProto, DynClassName)) {
698
+ className = classProto[DynClassName];
699
+ }
700
+ else {
701
+ className = DynClassNamePrefix + _getObjName(theClass, "_") + "$" + _dynamicNames;
702
+ _dynamicNames++;
703
+ classProto[DynClassName] = className;
704
+ }
705
+ var perfOptions = dynamicProto[DynProtoDefaultOptions];
706
+ var useBaseInst = !!perfOptions[strUseBaseInst];
707
+ if (useBaseInst && options && options[strUseBaseInst] !== undefined) {
708
+ useBaseInst = !!options[strUseBaseInst];
709
+ }
710
+ var instFuncs = _getInstanceFuncs(target);
711
+ var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);
712
+ delegateFunc(target, baseFuncs);
713
+ var setInstanceFunc = !!_objGetPrototypeOf && !!perfOptions[strSetInstFuncs];
714
+ if (setInstanceFunc && options) {
715
+ setInstanceFunc = !!options[strSetInstFuncs];
716
+ }
717
+ _populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);
718
+ }
719
+ var perfDefaults = {
720
+ setInstFuncs: true,
721
+ useBaseInst: true
722
+ };
723
+ dynamicProto[DynProtoDefaultOptions] = perfDefaults;
724
+
718
725
  var strWindow = "window";
719
726
  var strDocument = "document";
720
727
  var strNavigator = "navigator";
@@ -1000,10 +1007,16 @@
1000
1007
  }
1001
1008
  return DiagnosticLogger;
1002
1009
  }());
1010
+ function _getLogger(logger) {
1011
+ return (logger || new DiagnosticLogger());
1012
+ }
1003
1013
  function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1004
1014
  if (isUserAct === void 0) { isUserAct = false; }
1005
1015
  (logger || new DiagnosticLogger()).throwInternal(severity, msgId, msg, properties, isUserAct);
1006
1016
  }
1017
+ function _warnToConsole(logger, message) {
1018
+ _getLogger(logger).warnToConsole(message);
1019
+ }
1007
1020
 
1008
1021
  var strExecutionContextKey = "ctx";
1009
1022
  var PerfEvent = /** @class */ (function () {
@@ -1186,7 +1199,7 @@
1186
1199
  }
1187
1200
 
1188
1201
  var _objDefineProperty = ObjDefineProperty;
1189
- var version = "2.8.0-nightly.2204-04";
1202
+ var version = "2.8.0-nightly.2204-05";
1190
1203
  var instanceName = "." + newId(6);
1191
1204
  var _dataUid = 0;
1192
1205
  function _createAccessor(target, prop, value) {
@@ -2213,95 +2226,6 @@
2213
2226
  return oct.substr(0, 8) + oct.substr(9, 4) + "4" + oct.substr(13, 3) + clockSequenceHi + oct.substr(16, 3) + oct.substr(19, 12);
2214
2227
  }
2215
2228
 
2216
- var LoggingSeverity = createEnumStyle({
2217
- CRITICAL: 1 ,
2218
- WARNING: 2
2219
- });
2220
- var _InternalMessageId = createEnumStyle({
2221
- BrowserDoesNotSupportLocalStorage: 0 ,
2222
- BrowserCannotReadLocalStorage: 1 ,
2223
- BrowserCannotReadSessionStorage: 2 ,
2224
- BrowserCannotWriteLocalStorage: 3 ,
2225
- BrowserCannotWriteSessionStorage: 4 ,
2226
- BrowserFailedRemovalFromLocalStorage: 5 ,
2227
- BrowserFailedRemovalFromSessionStorage: 6 ,
2228
- CannotSendEmptyTelemetry: 7 ,
2229
- ClientPerformanceMathError: 8 ,
2230
- ErrorParsingAISessionCookie: 9 ,
2231
- ErrorPVCalc: 10 ,
2232
- ExceptionWhileLoggingError: 11 ,
2233
- FailedAddingTelemetryToBuffer: 12 ,
2234
- FailedMonitorAjaxAbort: 13 ,
2235
- FailedMonitorAjaxDur: 14 ,
2236
- FailedMonitorAjaxOpen: 15 ,
2237
- FailedMonitorAjaxRSC: 16 ,
2238
- FailedMonitorAjaxSend: 17 ,
2239
- FailedMonitorAjaxGetCorrelationHeader: 18 ,
2240
- FailedToAddHandlerForOnBeforeUnload: 19 ,
2241
- FailedToSendQueuedTelemetry: 20 ,
2242
- FailedToReportDataLoss: 21 ,
2243
- FlushFailed: 22 ,
2244
- MessageLimitPerPVExceeded: 23 ,
2245
- MissingRequiredFieldSpecification: 24 ,
2246
- NavigationTimingNotSupported: 25 ,
2247
- OnError: 26 ,
2248
- SessionRenewalDateIsZero: 27 ,
2249
- SenderNotInitialized: 28 ,
2250
- StartTrackEventFailed: 29 ,
2251
- StopTrackEventFailed: 30 ,
2252
- StartTrackFailed: 31 ,
2253
- StopTrackFailed: 32 ,
2254
- TelemetrySampledAndNotSent: 33 ,
2255
- TrackEventFailed: 34 ,
2256
- TrackExceptionFailed: 35 ,
2257
- TrackMetricFailed: 36 ,
2258
- TrackPVFailed: 37 ,
2259
- TrackPVFailedCalc: 38 ,
2260
- TrackTraceFailed: 39 ,
2261
- TransmissionFailed: 40 ,
2262
- FailedToSetStorageBuffer: 41 ,
2263
- FailedToRestoreStorageBuffer: 42 ,
2264
- InvalidBackendResponse: 43 ,
2265
- FailedToFixDepricatedValues: 44 ,
2266
- InvalidDurationValue: 45 ,
2267
- TelemetryEnvelopeInvalid: 46 ,
2268
- CreateEnvelopeError: 47 ,
2269
- CannotSerializeObject: 48 ,
2270
- CannotSerializeObjectNonSerializable: 49 ,
2271
- CircularReferenceDetected: 50 ,
2272
- ClearAuthContextFailed: 51 ,
2273
- ExceptionTruncated: 52 ,
2274
- IllegalCharsInName: 53 ,
2275
- ItemNotInArray: 54 ,
2276
- MaxAjaxPerPVExceeded: 55 ,
2277
- MessageTruncated: 56 ,
2278
- NameTooLong: 57 ,
2279
- SampleRateOutOfRange: 58 ,
2280
- SetAuthContextFailed: 59 ,
2281
- SetAuthContextFailedAccountName: 60 ,
2282
- StringValueTooLong: 61 ,
2283
- StartCalledMoreThanOnce: 62 ,
2284
- StopCalledWithoutStart: 63 ,
2285
- TelemetryInitializerFailed: 64 ,
2286
- TrackArgumentsNotSpecified: 65 ,
2287
- UrlTooLong: 66 ,
2288
- SessionStorageBufferFull: 67 ,
2289
- CannotAccessCookie: 68 ,
2290
- IdTooLong: 69 ,
2291
- InvalidEvent: 70 ,
2292
- FailedMonitorAjaxSetRequestHeader: 71 ,
2293
- SendBrowserInfoOnUserInit: 72 ,
2294
- PluginException: 73 ,
2295
- NotificationException: 74 ,
2296
- SnippetScriptLoadFailure: 99 ,
2297
- InvalidInstrumentationKey: 100 ,
2298
- CannotParseAiBlobValue: 101 ,
2299
- InvalidContentBlob: 102 ,
2300
- TrackPageActionEventFailed: 103 ,
2301
- FailedAddingCustomDefinedRequestContext: 104 ,
2302
- InMemoryStorageBufferFull: 105
2303
- });
2304
-
2305
2229
  var aiInstrumentHooks = "_aiHooks";
2306
2230
  var cbNames = [
2307
2231
  "req", "rsp", "hkErr", "fnErr"
@@ -2393,7 +2317,7 @@
2393
2317
  owner = target;
2394
2318
  }
2395
2319
  else if (checkPrototype) {
2396
- owner = _getOwner(_getObjProto(target), name, false);
2320
+ owner = _getOwner(_getObjProto$1(target), name, false);
2397
2321
  }
2398
2322
  }
2399
2323
  return owner;
@@ -2459,7 +2383,7 @@
2459
2383
  name = strTrim(name.toString());
2460
2384
  if (name.length > 150 ) {
2461
2385
  nameTrunc = name.substring(0, 150 );
2462
- _throwInternal(logger, 2 , _InternalMessageId.NameTooLong, "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
2386
+ _throwInternal(logger, 2 , 57 , "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
2463
2387
  }
2464
2388
  }
2465
2389
  return nameTrunc || name;
@@ -2472,20 +2396,20 @@
2472
2396
  value = strTrim(value);
2473
2397
  if (value.toString().length > maxLength) {
2474
2398
  valueTrunc = value.toString().substring(0, maxLength);
2475
- _throwInternal(logger, 2 , _InternalMessageId.StringValueTooLong, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
2399
+ _throwInternal(logger, 2 , 61 , "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
2476
2400
  }
2477
2401
  }
2478
2402
  return valueTrunc || value;
2479
2403
  }
2480
2404
  function dataSanitizeUrl(logger, url) {
2481
- return dataSanitizeInput(logger, url, 2048 , _InternalMessageId.UrlTooLong);
2405
+ return dataSanitizeInput(logger, url, 2048 , 66 );
2482
2406
  }
2483
2407
  function dataSanitizeMessage(logger, message) {
2484
2408
  var messageTrunc;
2485
2409
  if (message) {
2486
2410
  if (message.length > 32768 ) {
2487
2411
  messageTrunc = message.substring(0, 32768 );
2488
- _throwInternal(logger, 2 , _InternalMessageId.MessageTruncated, "message is too long, it has been truncated to " + 32768 + " characters.", { message: message }, true);
2412
+ _throwInternal(logger, 2 , 56 , "message is too long, it has been truncated to " + 32768 + " characters.", { message: message }, true);
2489
2413
  }
2490
2414
  }
2491
2415
  return messageTrunc || message;
@@ -2496,7 +2420,7 @@
2496
2420
  var value = "" + exception;
2497
2421
  if (value.length > 32768 ) {
2498
2422
  exceptionTrunc = value.substring(0, 32768 );
2499
- _throwInternal(logger, 2 , _InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + 32768 + " characters.", { exception: exception }, true);
2423
+ _throwInternal(logger, 2 , 52 , "exception is too long, it has been truncated to " + 32768 + " characters.", { exception: exception }, true);
2500
2424
  }
2501
2425
  }
2502
2426
  return exceptionTrunc || exception;
@@ -2510,7 +2434,7 @@
2510
2434
  value = getJSON().stringify(value);
2511
2435
  }
2512
2436
  catch (e) {
2513
- _throwInternal(logger, 2 , _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e }, true);
2437
+ _throwInternal(logger, 2 , 49 , "custom property is not valid", { exception: e }, true);
2514
2438
  }
2515
2439
  }
2516
2440
  value = dataSanitizeString(logger, value, 8192 );
@@ -2533,7 +2457,7 @@
2533
2457
  return measurements;
2534
2458
  }
2535
2459
  function dataSanitizeId(logger, id) {
2536
- return id ? dataSanitizeInput(logger, id, 128 , _InternalMessageId.IdTooLong).toString() : id;
2460
+ return id ? dataSanitizeInput(logger, id, 128 , 69 ).toString() : id;
2537
2461
  }
2538
2462
  function dataSanitizeInput(logger, input, maxLength, _msgId) {
2539
2463
  var inputTrunc;
@@ -2661,7 +2585,7 @@
2661
2585
  }
2662
2586
  catch (e) {
2663
2587
  _canUseSessionStorage = false;
2664
- _throwInternal(logger, 2 , _InternalMessageId.BrowserCannotReadSessionStorage, "Browser failed read of session storage. " + getExceptionName(e), { exception: dumpObj(e) });
2588
+ _throwInternal(logger, 2 , 2 , "Browser failed read of session storage. " + getExceptionName(e), { exception: dumpObj(e) });
2665
2589
  }
2666
2590
  }
2667
2591
  return null;
@@ -2675,7 +2599,7 @@
2675
2599
  }
2676
2600
  catch (e) {
2677
2601
  _canUseSessionStorage = false;
2678
- _throwInternal(logger, 2 , _InternalMessageId.BrowserCannotWriteSessionStorage, "Browser failed write to session storage. " + getExceptionName(e), { exception: dumpObj(e) });
2602
+ _throwInternal(logger, 2 , 4 , "Browser failed write to session storage. " + getExceptionName(e), { exception: dumpObj(e) });
2679
2603
  }
2680
2604
  }
2681
2605
  return false;
@@ -2689,7 +2613,7 @@
2689
2613
  }
2690
2614
  catch (e) {
2691
2615
  _canUseSessionStorage = false;
2692
- _throwInternal(logger, 2 , _InternalMessageId.BrowserFailedRemovalFromSessionStorage, "Browser failed removal of session storage item. " + getExceptionName(e), { exception: dumpObj(e) });
2616
+ _throwInternal(logger, 2 , 6 , "Browser failed removal of session storage item. " + getExceptionName(e), { exception: dumpObj(e) });
2693
2617
  }
2694
2618
  }
2695
2619
  return false;
@@ -3534,7 +3458,7 @@
3534
3458
  if (!pageViewPerformanceManager.isPerformanceTimingSupported()) {
3535
3459
  appInsights.sendPageViewInternal(pageView, customProperties);
3536
3460
  _flushChannels(true);
3537
- _logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.NavigationTimingNotSupported, "trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");
3461
+ _throwInternal(_logger, 2 , 25 , "trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");
3538
3462
  return;
3539
3463
  }
3540
3464
  var pageViewSent = false;
@@ -3600,7 +3524,7 @@
3600
3524
  }
3601
3525
  }
3602
3526
  catch (e) {
3603
- _logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackPVFailedCalc, "trackPageView failed on page load calculation: " + getExceptionName(e), { exception: dumpObj(e) });
3527
+ _throwInternal(_logger, 1 , 38 , "trackPageView failed on page load calculation: " + getExceptionName(e), { exception: dumpObj(e) });
3604
3528
  }
3605
3529
  return processed;
3606
3530
  });
@@ -3635,7 +3559,7 @@
3635
3559
  }
3636
3560
  }
3637
3561
  catch (e) {
3638
- this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: " + dumpObj(e));
3562
+ _warnToConsole(this._logger, "Auto track page visit time failed, metric will not be collected: " + dumpObj(e));
3639
3563
  }
3640
3564
  };
3641
3565
  PageVisitTimeManager.prototype.restartPageVisitTimer = function (pageName, pageUrl) {
@@ -3645,7 +3569,7 @@
3645
3569
  return prevPageVisitData;
3646
3570
  }
3647
3571
  catch (e) {
3648
- this._logger.warnToConsole("Call to restart failed: " + dumpObj(e));
3572
+ _warnToConsole(this._logger, "Call to restart failed: " + dumpObj(e));
3649
3573
  return null;
3650
3574
  }
3651
3575
  };
@@ -3661,7 +3585,7 @@
3661
3585
  }
3662
3586
  }
3663
3587
  catch (e) {
3664
- this._logger.warnToConsole("Call to start failed: " + dumpObj(e));
3588
+ _warnToConsole(this._logger, "Call to start failed: " + dumpObj(e));
3665
3589
  }
3666
3590
  };
3667
3591
  PageVisitTimeManager.prototype.stopPageVisitTimer = function () {
@@ -3682,7 +3606,7 @@
3682
3606
  return null;
3683
3607
  }
3684
3608
  catch (e) {
3685
- this._logger.warnToConsole("Stop page visit timer failed: " + dumpObj(e));
3609
+ _warnToConsole(this._logger, "Stop page visit timer failed: " + dumpObj(e));
3686
3610
  return null;
3687
3611
  }
3688
3612
  };
@@ -3728,14 +3652,15 @@
3728
3652
  response = dateTimeUtilsDuration(timing.responseStart, timing.responseEnd);
3729
3653
  dom = dateTimeUtilsDuration(timing.responseEnd, timing.loadEventEnd);
3730
3654
  }
3655
+ var logger = this._logger;
3731
3656
  if (total === 0) {
3732
- this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.ErrorPVCalc, "error calculating page view performance.", { total: total, network: network, request: request, response: response, dom: dom });
3657
+ _throwInternal(logger, 2 , 10 , "error calculating page view performance.", { total: total, network: network, request: request, response: response, dom: dom });
3733
3658
  }
3734
3659
  else if (!this.shouldCollectDuration(total, network, request, response, dom)) {
3735
- this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.InvalidDurationValue, "Invalid page load duration value. Browser perf data won't be sent.", { total: total, network: network, request: request, response: response, dom: dom });
3660
+ _throwInternal(logger, 2 , 45 , "Invalid page load duration value. Browser perf data won't be sent.", { total: total, network: network, request: request, response: response, dom: dom });
3736
3661
  }
3737
3662
  else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {
3738
- this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.ClientPerformanceMathError, "client performance math error.", { total: total, network: network, request: request, response: response, dom: dom });
3663
+ _throwInternal(logger, 2 , 8 , "client performance math error.", { total: total, network: network, request: request, response: response, dom: dom });
3739
3664
  }
3740
3665
  else {
3741
3666
  pageViewPerformance.durationMs = total;
@@ -3816,14 +3741,14 @@
3816
3741
  var _events = {};
3817
3742
  _self.start = function (name) {
3818
3743
  if (typeof _events[name] !== "undefined") {
3819
- _throwInternal(logger, LoggingSeverity.WARNING, _InternalMessageId.StartCalledMoreThanOnce, "start was called more than once for this event without calling stop.", { name: name, key: name }, true);
3744
+ _throwInternal(logger, 2 , 62 , "start was called more than once for this event without calling stop.", { name: name, key: name }, true);
3820
3745
  }
3821
3746
  _events[name] = +new Date;
3822
3747
  };
3823
3748
  _self.stop = function (name, url, properties, measurements) {
3824
3749
  var start = _events[name];
3825
3750
  if (isNaN(start)) {
3826
- _throwInternal(logger, LoggingSeverity.WARNING, _InternalMessageId.StopCalledWithoutStart, "stop was called without a corresponding start.", { name: name, key: name }, true);
3751
+ _throwInternal(logger, 2 , 63 , "stop was called without a corresponding start.", { name: name, key: name }, true);
3827
3752
  }
3828
3753
  else {
3829
3754
  var end = +new Date;
@@ -3933,7 +3858,7 @@
3933
3858
  _self.core.track(telemetryItem);
3934
3859
  }
3935
3860
  catch (e) {
3936
- _throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TrackTraceFailed, "trackTrace failed, trace will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3861
+ _throwInternal(2 , 39 , "trackTrace failed, trace will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3937
3862
  }
3938
3863
  };
3939
3864
  _self.startTrackEvent = function (name) {
@@ -3941,7 +3866,7 @@
3941
3866
  _eventTracking.start(name);
3942
3867
  }
3943
3868
  catch (e) {
3944
- _throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.StartTrackEventFailed, "startTrackEvent failed, event will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3869
+ _throwInternal(1 , 29 , "startTrackEvent failed, event will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3945
3870
  }
3946
3871
  };
3947
3872
  _self.stopTrackEvent = function (name, properties, measurements) {
@@ -3949,7 +3874,7 @@
3949
3874
  _eventTracking.stop(name, undefined, properties);
3950
3875
  }
3951
3876
  catch (e) {
3952
- _throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.StopTrackEventFailed, "stopTrackEvent failed, event will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3877
+ _throwInternal(1 , 30 , "stopTrackEvent failed, event will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3953
3878
  }
3954
3879
  };
3955
3880
  _self.trackTrace = function (trace, customProperties) {
@@ -3958,7 +3883,7 @@
3958
3883
  _self.core.track(telemetryItem);
3959
3884
  }
3960
3885
  catch (e) {
3961
- _throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TrackTraceFailed, "trackTrace failed, trace will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3886
+ _throwInternal(2 , 39 , "trackTrace failed, trace will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3962
3887
  }
3963
3888
  };
3964
3889
  _self.trackMetric = function (metric, customProperties) {
@@ -3967,7 +3892,7 @@
3967
3892
  _self.core.track(telemetryItem);
3968
3893
  }
3969
3894
  catch (e) {
3970
- _throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackMetricFailed, "trackMetric failed, metric will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3895
+ _throwInternal(1 , 36 , "trackMetric failed, metric will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3971
3896
  }
3972
3897
  };
3973
3898
  _self.trackPageView = function (pageView, customProperties) {
@@ -3979,7 +3904,7 @@
3979
3904
  }
3980
3905
  }
3981
3906
  catch (e) {
3982
- _throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackPVFailed, "trackPageView failed, page view will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3907
+ _throwInternal(1 , 37 , "trackPageView failed, page view will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3983
3908
  }
3984
3909
  };
3985
3910
  _self.sendPageViewInternal = function (pageView, properties, systemProperties) {
@@ -4001,7 +3926,7 @@
4001
3926
  _self.sendPageViewPerformanceInternal(inPvp, customProperties);
4002
3927
  }
4003
3928
  catch (e) {
4004
- _throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackPVFailed, "trackPageViewPerformance failed, page view will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3929
+ _throwInternal(1 , 37 , "trackPageViewPerformance failed, page view will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
4005
3930
  }
4006
3931
  };
4007
3932
  _self.startTrackPage = function (name) {
@@ -4013,7 +3938,7 @@
4013
3938
  _pageTracking.start(name);
4014
3939
  }
4015
3940
  catch (e) {
4016
- _throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.StartTrackFailed, "startTrackPage failed, page view may not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3941
+ _throwInternal(1 , 31 , "startTrackPage failed, page view may not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
4017
3942
  }
4018
3943
  };
4019
3944
  _self.stopTrackPage = function (name, url, properties, measurement) {
@@ -4032,7 +3957,7 @@
4032
3957
  }
4033
3958
  }
4034
3959
  catch (e) {
4035
- _throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.StopTrackFailed, "stopTrackPage failed, page view will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3960
+ _throwInternal(1 , 32 , "stopTrackPage failed, page view will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
4036
3961
  }
4037
3962
  };
4038
3963
  _self.sendExceptionInternal = function (exception, customProperties, systemProperties) {
@@ -4049,7 +3974,7 @@
4049
3974
  _self.sendExceptionInternal(exception, customProperties);
4050
3975
  }
4051
3976
  catch (e) {
4052
- _throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackExceptionFailed, "trackException failed, exception will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
3977
+ _throwInternal(1 , 35 , "trackException failed, exception will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
4053
3978
  }
4054
3979
  };
4055
3980
  _self._onerror = function (exception) {
@@ -4083,7 +4008,7 @@
4083
4008
  }
4084
4009
  catch (e) {
4085
4010
  var errorString = error ? (error.name + ", " + error.message) : "null";
4086
- _throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.ExceptionWhileLoggingError, "_onError threw exception while logging error, error will not be collected: "
4011
+ _throwInternal(1 , 11 , "_onError threw exception while logging error, error will not be collected: "
4087
4012
  + getExceptionName(e), { exception: dumpObj(e), errorString: errorString });
4088
4013
  }
4089
4014
  };
@@ -4338,7 +4263,7 @@
4338
4263
  });
4339
4264
  return _this;
4340
4265
  }
4341
- AnalyticsPlugin.Version = "2.8.0-nightly.2204-04";
4266
+ AnalyticsPlugin.Version = "2.8.0-nightly.2204-05";
4342
4267
  AnalyticsPlugin.getDefaultConfig = _getDefaultConfig;
4343
4268
  return AnalyticsPlugin;
4344
4269
  }(BaseTelemetryPlugin));