@microsoft/applicationinsights-react-native 2.5.5-nightly.2206-03 → 2.5.5-nightly.2207-01

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - React Native Plugin, 2.5.5-nightly.2206-03
2
+ * Application Insights JavaScript SDK - React Native Plugin, 2.5.5-nightly.2207-01
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -89,243 +89,6 @@
89
89
  d[strShimPrototype] = b === null ? objCreateFn(b) : (__[strShimPrototype] = b[strShimPrototype], new __());
90
90
  }
91
91
 
92
- var strEmpty = "";
93
- var strSetNextPlugin = "setNextPlugin";
94
- var strIsInitialized = "isInitialized";
95
- var strTeardown = "teardown";
96
- var strCore = "core";
97
- var strUpdate = "update";
98
- var strDisabled = "disabled";
99
- var strDoTeardown = "_doTeardown";
100
-
101
- var strToString = "toString";
102
- var str__Proto$1 = "__proto__";
103
- var strConstructor = "constructor";
104
- var _objDefineProperty$1 = ObjDefineProperty;
105
- var _objFreeze = ObjClass.freeze;
106
- var _isArray = Array.isArray;
107
- var _objToString = ObjProto[strToString];
108
- var _fnToString = ObjHasOwnProperty[strToString];
109
- var _objFunctionString = _fnToString.call(ObjClass);
110
- var rCamelCase = /-([a-z])/g;
111
- var rNormalizeInvalid = /([^\w\d_$])/g;
112
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
113
- var _objGetPrototypeOf$1 = Object["getPrototypeOf"];
114
- function _getObjProto$1(target) {
115
- if (target) {
116
- if (_objGetPrototypeOf$1) {
117
- return _objGetPrototypeOf$1(target);
118
- }
119
- var newProto = target[str__Proto$1] || target[strShimPrototype] || target[strConstructor];
120
- if (newProto) {
121
- return newProto;
122
- }
123
- }
124
- return null;
125
- }
126
- function isUndefined(value) {
127
- return value === undefined || typeof value === strShimUndefined;
128
- }
129
- function isNullOrUndefined(value) {
130
- return (value === null || isUndefined(value));
131
- }
132
- function hasOwnProperty(obj, prop) {
133
- return !!(obj && ObjHasOwnProperty.call(obj, prop));
134
- }
135
- function isObject(value) {
136
- return !!(value && typeof value === strShimObject);
137
- }
138
- function isFunction(value) {
139
- return !!(value && typeof value === strShimFunction);
140
- }
141
- function normalizeJsName(name) {
142
- var value = name;
143
- if (value && isString(value)) {
144
- value = value.replace(rCamelCase, function (_all, letter) {
145
- return letter.toUpperCase();
146
- });
147
- value = value.replace(rNormalizeInvalid, "_");
148
- value = value.replace(rLeadingNumeric, function (_all, match) {
149
- return "_" + match;
150
- });
151
- }
152
- return value;
153
- }
154
- function objForEachKey$1(target, callbackfn) {
155
- if (target) {
156
- for (var prop in target) {
157
- if (ObjHasOwnProperty.call(target, prop)) {
158
- callbackfn.call(target, prop, target[prop]);
159
- }
160
- }
161
- }
162
- }
163
- function strContains(value, search) {
164
- if (value && search) {
165
- return value.indexOf(search) !== -1;
166
- }
167
- return false;
168
- }
169
- var isArray = _isArray || _isArrayPoly;
170
- function _isArrayPoly(obj) {
171
- return !!(obj && _objToString.call(obj) === "[object Array]");
172
- }
173
- function isError(obj) {
174
- return !!(obj && _objToString.call(obj) === "[object Error]");
175
- }
176
- function isString(value) {
177
- return typeof value === "string";
178
- }
179
- function isBoolean(value) {
180
- return typeof value === "boolean";
181
- }
182
- function isPlainObject(value) {
183
- var result = false;
184
- if (value && typeof value === "object") {
185
- var proto = _objGetPrototypeOf$1 ? _objGetPrototypeOf$1(value) : _getObjProto$1(value);
186
- if (!proto) {
187
- result = true;
188
- }
189
- else {
190
- if (proto[strConstructor] && ObjHasOwnProperty.call(proto, strConstructor)) {
191
- proto = proto[strConstructor];
192
- }
193
- result = typeof proto === strShimFunction && _fnToString.call(proto) === _objFunctionString;
194
- }
195
- }
196
- return result;
197
- }
198
- function arrForEach(arr, callbackfn, thisArg) {
199
- var len = arr.length;
200
- try {
201
- for (var idx = 0; idx < len; idx++) {
202
- if (idx in arr) {
203
- if (callbackfn.call(thisArg || arr, arr[idx], idx, arr) === -1) {
204
- break;
205
- }
206
- }
207
- }
208
- }
209
- catch (e) {
210
- }
211
- }
212
- function objDefineAccessors(target, prop, getProp, setProp) {
213
- if (_objDefineProperty$1) {
214
- try {
215
- var descriptor = {
216
- enumerable: true,
217
- configurable: true
218
- };
219
- if (getProp) {
220
- descriptor.get = getProp;
221
- }
222
- if (setProp) {
223
- descriptor.set = setProp;
224
- }
225
- _objDefineProperty$1(target, prop, descriptor);
226
- return true;
227
- }
228
- catch (e) {
229
- }
230
- }
231
- return false;
232
- }
233
- function _doNothing(value) {
234
- return value;
235
- }
236
- var objFreeze = _objFreeze || _doNothing;
237
- function dateNow() {
238
- var dt = Date;
239
- return dt.now ? dt.now() : new dt().getTime();
240
- }
241
- function getExceptionName(object) {
242
- if (isError(object)) {
243
- return object.name;
244
- }
245
- return strEmpty;
246
- }
247
- function setValue(target, field, value, valChk, srcChk) {
248
- var theValue = value;
249
- if (target) {
250
- theValue = target[field];
251
- if (theValue !== value && (!srcChk || srcChk(theValue)) && (!valChk || valChk(value))) {
252
- theValue = value;
253
- target[field] = theValue;
254
- }
255
- }
256
- return theValue;
257
- }
258
- function _createProxyFunction(source, funcName) {
259
- var srcFunc = null;
260
- var src = null;
261
- if (isFunction(source)) {
262
- srcFunc = source;
263
- }
264
- else {
265
- src = source;
266
- }
267
- return function () {
268
- var originalArguments = arguments;
269
- if (srcFunc) {
270
- src = srcFunc();
271
- }
272
- if (src) {
273
- return src[funcName].apply(src, originalArguments);
274
- }
275
- };
276
- }
277
- function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
278
- if (target && name && source) {
279
- if (overwriteTarget !== false || isUndefined(target[name])) {
280
- target[name] = _createProxyFunction(source, theFunc);
281
- }
282
- }
283
- }
284
- function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {
285
- var theArgs = arguments;
286
- var extended = theArgs[0] || {};
287
- var argLen = theArgs.length;
288
- var deep = false;
289
- var idx = 1;
290
- if (argLen > 0 && isBoolean(extended)) {
291
- deep = extended;
292
- extended = theArgs[idx] || {};
293
- idx++;
294
- }
295
- if (!isObject(extended)) {
296
- extended = {};
297
- }
298
- for (; idx < argLen; idx++) {
299
- var arg = theArgs[idx];
300
- var isArgArray = isArray(arg);
301
- var isArgObj = isObject(arg);
302
- for (var prop in arg) {
303
- var propOk = (isArgArray && (prop in arg)) || (isArgObj && (ObjHasOwnProperty.call(arg, prop)));
304
- if (!propOk) {
305
- continue;
306
- }
307
- var newValue = arg[prop];
308
- var isNewArray = void 0;
309
- if (deep && newValue && ((isNewArray = isArray(newValue)) || isPlainObject(newValue))) {
310
- var clone = extended[prop];
311
- if (isNewArray) {
312
- if (!isArray(clone)) {
313
- clone = [];
314
- }
315
- }
316
- else if (!isPlainObject(clone)) {
317
- clone = {};
318
- }
319
- newValue = objExtend(deep, clone, newValue);
320
- }
321
- if (newValue !== undefined) {
322
- extended[prop] = newValue;
323
- }
324
- }
325
- }
326
- return extended;
327
- }
328
-
329
92
  /*!
330
93
  * Microsoft Dynamic Proto Utility, 1.1.6
331
94
  * Copyright (c) Microsoft and contributors. All rights reserved.
@@ -341,13 +104,13 @@
341
104
  var DynAllowInstChkTag = DynInstChkTag;
342
105
  var DynProtoDefaultOptions = '_dfOpts';
343
106
  var UnknownValue = '_unknown_';
344
- var str__Proto = "__proto__";
345
- var DynProtoBaseProto = "_dyn" + str__Proto;
107
+ var str__Proto$1 = "__proto__";
108
+ var DynProtoBaseProto = "_dyn" + str__Proto$1;
346
109
  var DynProtoCurrent = "_dynInstProto";
347
110
  var strUseBaseInst = 'useBaseInst';
348
111
  var strSetInstFuncs = 'setInstFuncs';
349
112
  var Obj = Object;
350
- var _objGetPrototypeOf = Obj["getPrototypeOf"];
113
+ var _objGetPrototypeOf$1 = Obj["getPrototypeOf"];
351
114
  var _objGetOwnProps = Obj["getOwnPropertyNames"];
352
115
  var _dynamicNames = 0;
353
116
  function _hasOwnProperty(obj, prop) {
@@ -359,13 +122,13 @@
359
122
  function _isObjectArrayOrFunctionPrototype(target) {
360
123
  return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
361
124
  }
362
- function _getObjProto(target) {
125
+ function _getObjProto$1(target) {
363
126
  var newProto;
364
127
  if (target) {
365
- if (_objGetPrototypeOf) {
366
- return _objGetPrototypeOf(target);
128
+ if (_objGetPrototypeOf$1) {
129
+ return _objGetPrototypeOf$1(target);
367
130
  }
368
- var curProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
131
+ var curProto = target[str__Proto$1] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
369
132
  newProto = target[DynProtoBaseProto] || curProto;
370
133
  if (!_hasOwnProperty(target, DynProtoBaseProto)) {
371
134
  delete target[DynProtoCurrent];
@@ -433,16 +196,16 @@
433
196
  _forEachProp(instFuncs, function (name) {
434
197
  baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
435
198
  });
436
- var baseProto = _getObjProto(classProto);
199
+ var baseProto = _getObjProto$1(classProto);
437
200
  var visited = [];
438
201
  while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
439
202
  _forEachProp(baseProto, function (name) {
440
- if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {
203
+ if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf$1)) {
441
204
  baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
442
205
  }
443
206
  });
444
207
  visited.push(baseProto);
445
- baseProto = _getObjProto(baseProto);
208
+ baseProto = _getObjProto$1(baseProto);
446
209
  }
447
210
  return baseFuncs;
448
211
  }
@@ -456,7 +219,7 @@
456
219
  }
457
220
  if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
458
221
  var canAddInst = !_hasOwnProperty(target, funcName);
459
- var objProto = _getObjProto(target);
222
+ var objProto = _getObjProto$1(target);
460
223
  var visited = [];
461
224
  while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
462
225
  var protoFunc = objProto[funcName];
@@ -465,7 +228,7 @@
465
228
  break;
466
229
  }
467
230
  visited.push(objProto);
468
- objProto = _getObjProto(objProto);
231
+ objProto = _getObjProto$1(objProto);
469
232
  }
470
233
  try {
471
234
  if (canAddInst) {
@@ -483,7 +246,7 @@
483
246
  function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
484
247
  var protoFunc = proto[funcName];
485
248
  if (protoFunc === currentDynProtoProxy) {
486
- protoFunc = _getObjProto(proto)[funcName];
249
+ protoFunc = _getObjProto$1(proto)[funcName];
487
250
  }
488
251
  if (typeof protoFunc !== strFunction) {
489
252
  _throwTypeError("[" + funcName + "] is not a " + strFunction);
@@ -517,15 +280,15 @@
517
280
  }
518
281
  }
519
282
  function _checkPrototype(classProto, thisTarget) {
520
- if (_objGetPrototypeOf) {
283
+ if (_objGetPrototypeOf$1) {
521
284
  var visited = [];
522
- var thisProto = _getObjProto(thisTarget);
285
+ var thisProto = _getObjProto$1(thisTarget);
523
286
  while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
524
287
  if (thisProto === classProto) {
525
288
  return true;
526
289
  }
527
290
  visited.push(thisProto);
528
- thisProto = _getObjProto(thisProto);
291
+ thisProto = _getObjProto$1(thisProto);
529
292
  }
530
293
  return false;
531
294
  }
@@ -562,7 +325,7 @@
562
325
  var instFuncs = _getInstanceFuncs(target);
563
326
  var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);
564
327
  delegateFunc(target, baseFuncs);
565
- var setInstanceFunc = !!_objGetPrototypeOf && !!perfOptions[strSetInstFuncs];
328
+ var setInstanceFunc = !!_objGetPrototypeOf$1 && !!perfOptions[strSetInstFuncs];
566
329
  if (setInstanceFunc && options) {
567
330
  setInstanceFunc = !!options[strSetInstFuncs];
568
331
  }
@@ -574,6 +337,283 @@
574
337
  };
575
338
  dynamicProto[DynProtoDefaultOptions] = perfDefaults;
576
339
 
340
+ var _DYN_INITIALIZE = "initialize";
341
+ var _DYN_NAME = "name";
342
+ var _DYN_IDENTIFIER = "identifier";
343
+ var _DYN_PUSH = "push";
344
+ var _DYN_IS_INITIALIZED = "isInitialized";
345
+ var _DYN_CONFIG = "config";
346
+ var _DYN_LOGGER = "logger";
347
+ var _DYN_LENGTH = "length";
348
+ var _DYN_TIME = "time";
349
+ var _DYN_PROCESS_NEXT = "processNext";
350
+ var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
351
+ var _DYN_GET_PLUGIN = "getPlugin";
352
+ var _DYN_TEARDOWN = "teardown";
353
+ var _DYN_MESSAGE_ID = "messageId";
354
+ var _DYN_MESSAGE = "message";
355
+ var _DYN_IS_ASYNC = "isAsync";
356
+ var _DYN__DO_TEARDOWN = "_doTeardown";
357
+ var _DYN_UPDATE = "update";
358
+ var _DYN_GET_NEXT = "getNext";
359
+ var _DYN_DIAG_LOG = "diagLog";
360
+ var _DYN_SET_NEXT_PLUGIN = "setNextPlugin";
361
+ var _DYN_CREATE_NEW = "createNew";
362
+ var _DYN_INDEX_OF = "indexOf";
363
+ var _DYN_USER_AGENT = "userAgent";
364
+ var _DYN_REPLACE = "replace";
365
+ var _DYN_NODE_TYPE = "nodeType";
366
+ var _DYN_APPLY = "apply";
367
+ var _DYN_ENABLE_DEBUG_EXCEPTI4 = "enableDebugExceptions";
368
+ var _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
369
+ var _DYN_TO_LOWER_CASE = "toLowerCase";
370
+ var _DYN_CALL = "call";
371
+ var _DYN_IS_CHILD_EVT = "isChildEvt";
372
+ var _DYN_GET_CTX = "getCtx";
373
+ var _DYN_SET_CTX = "setCtx";
374
+ var _DYN_COMPLETE = "complete";
375
+
376
+ var STR_EMPTY = "";
377
+ var STR_CORE = "core";
378
+ var STR_DISABLED = "disabled";
379
+ var STR_EXTENSION_CONFIG = "extensionConfig";
380
+ var STR_PROCESS_TELEMETRY = "processTelemetry";
381
+ var STR_PRIORITY = "priority";
382
+ var STR_ERROR_TO_CONSOLE = "errorToConsole";
383
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
384
+ var STR_GET_PERF_MGR = "getPerfMgr";
385
+
386
+ var strToString = "toString";
387
+ var str__Proto = "__proto__";
388
+ var strConstructor = "constructor";
389
+ var _objDefineProperty$1 = ObjDefineProperty;
390
+ var _objFreeze = ObjClass.freeze;
391
+ var _isArray = Array.isArray;
392
+ var _objToString = ObjProto[strToString];
393
+ var _fnToString = ObjHasOwnProperty[strToString];
394
+ var _objFunctionString = _fnToString[_DYN_CALL ](ObjClass);
395
+ var rCamelCase = /-([a-z])/g;
396
+ var rNormalizeInvalid = /([^\w\d_$])/g;
397
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
398
+ var _objGetPrototypeOf = Object["getPrototypeOf"];
399
+ function _getObjProto(target) {
400
+ if (target) {
401
+ if (_objGetPrototypeOf) {
402
+ return _objGetPrototypeOf(target);
403
+ }
404
+ var newProto = target[str__Proto] || target[strShimPrototype] || target[strConstructor];
405
+ if (newProto) {
406
+ return newProto;
407
+ }
408
+ }
409
+ return null;
410
+ }
411
+ function isUndefined(value) {
412
+ return value === undefined || typeof value === strShimUndefined;
413
+ }
414
+ function isNullOrUndefined(value) {
415
+ return (value === null || isUndefined(value));
416
+ }
417
+ function hasOwnProperty(obj, prop) {
418
+ return !!(obj && ObjHasOwnProperty[_DYN_CALL ](obj, prop));
419
+ }
420
+ function isObject(value) {
421
+ return !!(value && typeof value === strShimObject);
422
+ }
423
+ function isFunction(value) {
424
+ return !!(value && typeof value === strShimFunction);
425
+ }
426
+ function normalizeJsName(name) {
427
+ var value = name;
428
+ if (value && isString(value)) {
429
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
430
+ return letter.toUpperCase();
431
+ });
432
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
433
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
434
+ return "_" + match;
435
+ });
436
+ }
437
+ return value;
438
+ }
439
+ function objForEachKey$1(target, callbackfn) {
440
+ if (target) {
441
+ for (var prop in target) {
442
+ if (ObjHasOwnProperty[_DYN_CALL ](target, prop)) {
443
+ callbackfn[_DYN_CALL ](target, prop, target[prop]);
444
+ }
445
+ }
446
+ }
447
+ }
448
+ function strContains(value, search) {
449
+ if (value && search) {
450
+ return value[_DYN_INDEX_OF ](search) !== -1;
451
+ }
452
+ return false;
453
+ }
454
+ var isArray = _isArray || _isArrayPoly;
455
+ function _isArrayPoly(obj) {
456
+ return !!(obj && _objToString[_DYN_CALL ](obj) === "[object Array]");
457
+ }
458
+ function isError(obj) {
459
+ return !!(obj && _objToString[_DYN_CALL ](obj) === "[object Error]");
460
+ }
461
+ function isString(value) {
462
+ return typeof value === "string";
463
+ }
464
+ function isBoolean(value) {
465
+ return typeof value === "boolean";
466
+ }
467
+ function isPlainObject(value) {
468
+ var result = false;
469
+ if (value && typeof value === "object") {
470
+ var proto = _objGetPrototypeOf ? _objGetPrototypeOf(value) : _getObjProto(value);
471
+ if (!proto) {
472
+ result = true;
473
+ }
474
+ else {
475
+ if (proto[strConstructor] && ObjHasOwnProperty[_DYN_CALL ](proto, strConstructor)) {
476
+ proto = proto[strConstructor];
477
+ }
478
+ result = typeof proto === strShimFunction && _fnToString[_DYN_CALL ](proto) === _objFunctionString;
479
+ }
480
+ }
481
+ return result;
482
+ }
483
+ function arrForEach(arr, callbackfn, thisArg) {
484
+ var len = arr[_DYN_LENGTH ];
485
+ try {
486
+ for (var idx = 0; idx < len; idx++) {
487
+ if (idx in arr) {
488
+ if (callbackfn[_DYN_CALL ](thisArg || arr, arr[idx], idx, arr) === -1) {
489
+ break;
490
+ }
491
+ }
492
+ }
493
+ }
494
+ catch (e) {
495
+ }
496
+ }
497
+ function objDefineAccessors(target, prop, getProp, setProp) {
498
+ if (_objDefineProperty$1) {
499
+ try {
500
+ var descriptor = {
501
+ enumerable: true,
502
+ configurable: true
503
+ };
504
+ if (getProp) {
505
+ descriptor.get = getProp;
506
+ }
507
+ if (setProp) {
508
+ descriptor.set = setProp;
509
+ }
510
+ _objDefineProperty$1(target, prop, descriptor);
511
+ return true;
512
+ }
513
+ catch (e) {
514
+ }
515
+ }
516
+ return false;
517
+ }
518
+ function _doNothing(value) {
519
+ return value;
520
+ }
521
+ var objFreeze = _objFreeze || _doNothing;
522
+ function dateNow() {
523
+ var dt = Date;
524
+ return dt.now ? dt.now() : new dt().getTime();
525
+ }
526
+ function getExceptionName(object) {
527
+ if (isError(object)) {
528
+ return object[_DYN_NAME ];
529
+ }
530
+ return STR_EMPTY;
531
+ }
532
+ function setValue(target, field, value, valChk, srcChk) {
533
+ var theValue = value;
534
+ if (target) {
535
+ theValue = target[field];
536
+ if (theValue !== value && (!srcChk || srcChk(theValue)) && (!valChk || valChk(value))) {
537
+ theValue = value;
538
+ target[field] = theValue;
539
+ }
540
+ }
541
+ return theValue;
542
+ }
543
+ function getCfgValue(theValue, defaultValue) {
544
+ return !isNullOrUndefined(theValue) ? theValue : defaultValue;
545
+ }
546
+ function _createProxyFunction(source, funcName) {
547
+ var srcFunc = null;
548
+ var src = null;
549
+ if (isFunction(source)) {
550
+ srcFunc = source;
551
+ }
552
+ else {
553
+ src = source;
554
+ }
555
+ return function () {
556
+ var originalArguments = arguments;
557
+ if (srcFunc) {
558
+ src = srcFunc();
559
+ }
560
+ if (src) {
561
+ return src[funcName][_DYN_APPLY ](src, originalArguments);
562
+ }
563
+ };
564
+ }
565
+ function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
566
+ if (target && name && source) {
567
+ if (overwriteTarget !== false || isUndefined(target[name])) {
568
+ target[name] = _createProxyFunction(source, theFunc);
569
+ }
570
+ }
571
+ }
572
+ function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {
573
+ var theArgs = arguments;
574
+ var extended = theArgs[0] || {};
575
+ var argLen = theArgs[_DYN_LENGTH ];
576
+ var deep = false;
577
+ var idx = 1;
578
+ if (argLen > 0 && isBoolean(extended)) {
579
+ deep = extended;
580
+ extended = theArgs[idx] || {};
581
+ idx++;
582
+ }
583
+ if (!isObject(extended)) {
584
+ extended = {};
585
+ }
586
+ for (; idx < argLen; idx++) {
587
+ var arg = theArgs[idx];
588
+ var isArgArray = isArray(arg);
589
+ var isArgObj = isObject(arg);
590
+ for (var prop in arg) {
591
+ var propOk = (isArgArray && (prop in arg)) || (isArgObj && (ObjHasOwnProperty[_DYN_CALL ](arg, prop)));
592
+ if (!propOk) {
593
+ continue;
594
+ }
595
+ var newValue = arg[prop];
596
+ var isNewArray = void 0;
597
+ if (deep && newValue && ((isNewArray = isArray(newValue)) || isPlainObject(newValue))) {
598
+ var clone = extended[prop];
599
+ if (isNewArray) {
600
+ if (!isArray(clone)) {
601
+ clone = [];
602
+ }
603
+ }
604
+ else if (!isPlainObject(clone)) {
605
+ clone = {};
606
+ }
607
+ newValue = objExtend(deep, clone, newValue);
608
+ }
609
+ if (newValue !== undefined) {
610
+ extended[prop] = newValue;
611
+ }
612
+ }
613
+ }
614
+ return extended;
615
+ }
616
+
577
617
  var strWindow = "window";
578
618
  var strNavigator = "navigator";
579
619
  var strConsole = "console";
@@ -629,18 +669,18 @@
629
669
  }
630
670
  function isIE() {
631
671
  var nav = getNavigator();
632
- if (nav && (nav.userAgent !== _navUserAgentCheck || _isTrident === null)) {
633
- _navUserAgentCheck = nav.userAgent;
634
- var userAgent = (_navUserAgentCheck || strEmpty).toLowerCase();
672
+ if (nav && (nav[_DYN_USER_AGENT ] !== _navUserAgentCheck || _isTrident === null)) {
673
+ _navUserAgentCheck = nav[_DYN_USER_AGENT ];
674
+ var userAgent = (_navUserAgentCheck || STR_EMPTY)[_DYN_TO_LOWER_CASE ]();
635
675
  _isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
636
676
  }
637
677
  return _isTrident;
638
678
  }
639
679
  function dumpObj(object) {
640
- var objectTypeDump = Object[strShimPrototype].toString.call(object);
641
- var propertyValueDump = strEmpty;
680
+ var objectTypeDump = Object[strShimPrototype].toString[_DYN_CALL ](object);
681
+ var propertyValueDump = STR_EMPTY;
642
682
  if (objectTypeDump === "[object Error]") {
643
- propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
683
+ propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object[_DYN_NAME ] + "'";
644
684
  }
645
685
  else if (hasJSON()) {
646
686
  propertyValueDump = getJSON().stringify(object);
@@ -667,13 +707,11 @@
667
707
  var AiNonUserActionablePrefix = "AI (Internal): ";
668
708
  var AiUserActionablePrefix = "AI: ";
669
709
  var AIInternalMessagePrefix = "AITR_";
670
- var strErrorToConsole = "errorToConsole";
671
- var strWarnToConsole = "warnToConsole";
672
710
  function _sanitizeDiagnosticText(text) {
673
711
  if (text) {
674
- return "\"" + text.replace(/\"/g, strEmpty) + "\"";
712
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
675
713
  }
676
- return strEmpty;
714
+ return STR_EMPTY;
677
715
  }
678
716
  function _logToConsole(func, message) {
679
717
  var theConsole = getConsole();
@@ -691,23 +729,23 @@
691
729
  function _InternalLogMessage(msgId, msg, isUserAct, properties) {
692
730
  if (isUserAct === void 0) { isUserAct = false; }
693
731
  var _self = this;
694
- _self.messageId = msgId;
695
- _self.message =
732
+ _self[_DYN_MESSAGE_ID ] = msgId;
733
+ _self[_DYN_MESSAGE ] =
696
734
  (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
697
735
  msgId;
698
- var strProps = strEmpty;
736
+ var strProps = STR_EMPTY;
699
737
  if (hasJSON()) {
700
738
  strProps = getJSON().stringify(properties);
701
739
  }
702
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : strEmpty) +
703
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : strEmpty);
704
- _self.message += diagnosticText;
740
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
741
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
742
+ _self[_DYN_MESSAGE ] += diagnosticText;
705
743
  }
706
744
  _InternalLogMessage.dataType = "MessageData";
707
745
  return _InternalLogMessage;
708
746
  }());
709
747
  function safeGetLogger(core, config) {
710
- return (core || {}).logger || new DiagnosticLogger(config);
748
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
711
749
  }
712
750
  var DiagnosticLogger = /** @class */ (function () {
713
751
  function DiagnosticLogger(config) {
@@ -715,48 +753,49 @@
715
753
  this.queue = [];
716
754
  var _messageCount = 0;
717
755
  var _messageLogged = {};
756
+ var _loggingLevelConsole;
757
+ var _loggingLevelTelemetry;
758
+ var _maxInternalMessageLimit;
759
+ var _enableDebugExceptions;
718
760
  dynamicProto(DiagnosticLogger, this, function (_self) {
719
- if (isNullOrUndefined(config)) {
720
- config = {};
721
- }
722
- _self.consoleLoggingLevel = function () { return _getConfigValue("loggingLevelConsole", 0); };
723
- _self.telemetryLoggingLevel = function () { return _getConfigValue("loggingLevelTelemetry", 1); };
724
- _self.maxInternalMessageLimit = function () { return _getConfigValue("maxMessageLimit", 25); };
725
- _self.enableDebugExceptions = function () { return _getConfigValue("enableDebugExceptions", false); };
761
+ _setDefaultsFromConfig(config || {});
762
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
763
+ _self.telemetryLoggingLevel = function () { return _loggingLevelTelemetry; };
764
+ _self.maxInternalMessageLimit = function () { return _maxInternalMessageLimit; };
765
+ _self[_DYN_ENABLE_DEBUG_EXCEPTI4 ] = function () { return _enableDebugExceptions; };
726
766
  _self.throwInternal = function (severity, msgId, msg, properties, isUserAct) {
727
767
  if (isUserAct === void 0) { isUserAct = false; }
728
768
  var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
729
- if (_self.enableDebugExceptions()) {
769
+ if (_enableDebugExceptions) {
730
770
  throw dumpObj(message);
731
771
  }
732
772
  else {
733
- var logFunc = severity === 1 ? strErrorToConsole : strWarnToConsole;
734
- if (!isUndefined(message.message)) {
735
- var logLevel = _self.consoleLoggingLevel();
773
+ var logFunc = severity === 1 ? STR_ERROR_TO_CONSOLE : STR_WARN_TO_CONSOLE;
774
+ if (!isUndefined(message[_DYN_MESSAGE ])) {
736
775
  if (isUserAct) {
737
- var messageKey = +message.messageId;
738
- if (!_messageLogged[messageKey] && logLevel >= severity) {
739
- _self[logFunc](message.message);
776
+ var messageKey = +message[_DYN_MESSAGE_ID ];
777
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
778
+ _self[logFunc](message[_DYN_MESSAGE ]);
740
779
  _messageLogged[messageKey] = true;
741
780
  }
742
781
  }
743
782
  else {
744
- if (logLevel >= severity) {
745
- _self[logFunc](message.message);
783
+ if (_loggingLevelConsole >= severity) {
784
+ _self[logFunc](message[_DYN_MESSAGE ]);
746
785
  }
747
786
  }
748
- _self.logInternalMessage(severity, message);
787
+ _logInternalMessage(severity, message);
749
788
  }
750
789
  else {
751
790
  _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
752
791
  }
753
792
  }
754
793
  };
755
- _self.warnToConsole = function (message) {
794
+ _self[STR_WARN_TO_CONSOLE ] = function (message) {
756
795
  _logToConsole("warn", message);
757
796
  _debugExtMsg("warning", message);
758
797
  };
759
- _self.errorToConsole = function (message) {
798
+ _self[STR_ERROR_TO_CONSOLE ] = function (message) {
760
799
  _logToConsole("error", message);
761
800
  _debugExtMsg("error", message);
762
801
  };
@@ -764,12 +803,13 @@
764
803
  _messageCount = 0;
765
804
  _messageLogged = {};
766
805
  };
767
- _self.logInternalMessage = function (severity, message) {
806
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
807
+ function _logInternalMessage(severity, message) {
768
808
  if (_areInternalMessagesThrottled()) {
769
809
  return;
770
810
  }
771
811
  var logMessage = true;
772
- var messageKey = AIInternalMessagePrefix + message.messageId;
812
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
773
813
  if (_messageLogged[messageKey]) {
774
814
  logMessage = false;
775
815
  }
@@ -777,38 +817,37 @@
777
817
  _messageLogged[messageKey] = true;
778
818
  }
779
819
  if (logMessage) {
780
- if (severity <= _self.telemetryLoggingLevel()) {
781
- _self.queue.push(message);
820
+ if (severity <= _loggingLevelTelemetry) {
821
+ _self.queue[_DYN_PUSH ](message);
782
822
  _messageCount++;
783
823
  _debugExtMsg((severity === 1 ? "error" : "warn"), message);
784
824
  }
785
- if (_messageCount === _self.maxInternalMessageLimit()) {
825
+ if (_messageCount === _maxInternalMessageLimit) {
786
826
  var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
787
827
  var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
788
- _self.queue.push(throttleMessage);
828
+ _self.queue[_DYN_PUSH ](throttleMessage);
789
829
  if (severity === 1 ) {
790
- _self.errorToConsole(throttleLimitMessage);
830
+ _self[STR_ERROR_TO_CONSOLE ](throttleLimitMessage);
791
831
  }
792
832
  else {
793
- _self.warnToConsole(throttleLimitMessage);
833
+ _self[STR_WARN_TO_CONSOLE ](throttleLimitMessage);
794
834
  }
795
835
  }
796
836
  }
797
- };
798
- function _getConfigValue(name, defValue) {
799
- var value = config[name];
800
- if (!isNullOrUndefined(value)) {
801
- return value;
802
- }
803
- return defValue;
837
+ }
838
+ function _setDefaultsFromConfig(config) {
839
+ _loggingLevelConsole = getCfgValue(config.loggingLevelConsole, 0);
840
+ _loggingLevelTelemetry = getCfgValue(config.loggingLevelTelemetry, 1);
841
+ _maxInternalMessageLimit = getCfgValue(config.maxMessageLimit, 25);
842
+ _enableDebugExceptions = getCfgValue(config[_DYN_ENABLE_DEBUG_EXCEPTI4 ], false);
804
843
  }
805
844
  function _areInternalMessagesThrottled() {
806
- return _messageCount >= _self.maxInternalMessageLimit();
845
+ return _messageCount >= _maxInternalMessageLimit;
807
846
  }
808
847
  function _debugExtMsg(name, data) {
809
- var dbgExt = getDebugExt(config);
810
- if (dbgExt && dbgExt.diagLog) {
811
- dbgExt.diagLog(name, data);
848
+ var dbgExt = getDebugExt(config || {});
849
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
850
+ dbgExt[_DYN_DIAG_LOG ](name, data);
812
851
  }
813
852
  }
814
853
  });
@@ -821,21 +860,23 @@
821
860
  }
822
861
  function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
823
862
  if (isUserAct === void 0) { isUserAct = false; }
824
- (logger || new DiagnosticLogger()).throwInternal(severity, msgId, msg, properties, isUserAct);
863
+ _getLogger(logger).throwInternal(severity, msgId, msg, properties, isUserAct);
825
864
  }
826
865
  function _warnToConsole(logger, message) {
827
- _getLogger(logger).warnToConsole(message);
866
+ _getLogger(logger)[STR_WARN_TO_CONSOLE ](message);
828
867
  }
829
868
 
830
869
  var strExecutionContextKey = "ctx";
870
+ var strParentContextKey = "ParentContextKey";
871
+ var strChildrenContextKey = "ChildrenContextKey";
831
872
  var PerfEvent = /** @class */ (function () {
832
873
  function PerfEvent(name, payloadDetails, isAsync) {
833
874
  var _self = this;
834
875
  var accessorDefined = false;
835
876
  _self.start = dateNow();
836
- _self.name = name;
837
- _self.isAsync = isAsync;
838
- _self.isChildEvt = function () { return false; };
877
+ _self[_DYN_NAME ] = name;
878
+ _self[_DYN_IS_ASYNC ] = isAsync;
879
+ _self[_DYN_IS_CHILD_EVT ] = function () { return false; };
839
880
  if (isFunction(payloadDetails)) {
840
881
  var theDetails_1;
841
882
  accessorDefined = objDefineAccessors(_self, "payload", function () {
@@ -846,24 +887,24 @@
846
887
  return theDetails_1;
847
888
  });
848
889
  }
849
- _self.getCtx = function (key) {
890
+ _self[_DYN_GET_CTX ] = function (key) {
850
891
  if (key) {
851
- if (key === PerfEvent.ParentContextKey || key === PerfEvent.ChildrenContextKey) {
892
+ if (key === PerfEvent[strParentContextKey] || key === PerfEvent[strChildrenContextKey]) {
852
893
  return _self[key];
853
894
  }
854
895
  return (_self[strExecutionContextKey] || {})[key];
855
896
  }
856
897
  return null;
857
898
  };
858
- _self.setCtx = function (key, value) {
899
+ _self[_DYN_SET_CTX ] = function (key, value) {
859
900
  if (key) {
860
- if (key === PerfEvent.ParentContextKey) {
901
+ if (key === PerfEvent[strParentContextKey]) {
861
902
  if (!_self[key]) {
862
- _self.isChildEvt = function () { return true; };
903
+ _self[_DYN_IS_CHILD_EVT ] = function () { return true; };
863
904
  }
864
905
  _self[key] = value;
865
906
  }
866
- else if (key === PerfEvent.ChildrenContextKey) {
907
+ else if (key === PerfEvent[strChildrenContextKey]) {
867
908
  _self[key] = value;
868
909
  }
869
910
  else {
@@ -872,20 +913,20 @@
872
913
  }
873
914
  }
874
915
  };
875
- _self.complete = function () {
916
+ _self[_DYN_COMPLETE ] = function () {
876
917
  var childTime = 0;
877
- var childEvts = _self.getCtx(PerfEvent.ChildrenContextKey);
918
+ var childEvts = _self[_DYN_GET_CTX ](PerfEvent[strChildrenContextKey]);
878
919
  if (isArray(childEvts)) {
879
- for (var lp = 0; lp < childEvts.length; lp++) {
920
+ for (var lp = 0; lp < childEvts[_DYN_LENGTH ]; lp++) {
880
921
  var childEvt = childEvts[lp];
881
922
  if (childEvt) {
882
- childTime += childEvt.time;
923
+ childTime += childEvt[_DYN_TIME ];
883
924
  }
884
925
  }
885
926
  }
886
- _self.time = dateNow() - _self.start;
887
- _self.exTime = _self.time - childTime;
888
- _self.complete = function () { };
927
+ _self[_DYN_TIME ] = dateNow() - _self.start;
928
+ _self.exTime = _self[_DYN_TIME ] - childTime;
929
+ _self[_DYN_COMPLETE ] = function () { };
889
930
  if (!accessorDefined && isFunction(payloadDetails)) {
890
931
  _self.payload = payloadDetails();
891
932
  }
@@ -899,40 +940,40 @@
899
940
  function doPerf(mgrSource, getSource, func, details, isAsync) {
900
941
  if (mgrSource) {
901
942
  var perfMgr = mgrSource;
902
- if (isFunction(perfMgr["getPerfMgr"])) {
903
- perfMgr = perfMgr["getPerfMgr"]();
943
+ if (perfMgr[STR_GET_PERF_MGR]) {
944
+ perfMgr = perfMgr[STR_GET_PERF_MGR]();
904
945
  }
905
946
  if (perfMgr) {
906
947
  var perfEvt = void 0;
907
- var currentActive = perfMgr.getCtx(doPerfActiveKey);
948
+ var currentActive = perfMgr[_DYN_GET_CTX ](doPerfActiveKey);
908
949
  try {
909
950
  perfEvt = perfMgr.create(getSource(), details, isAsync);
910
951
  if (perfEvt) {
911
- if (currentActive && perfEvt.setCtx) {
912
- perfEvt.setCtx(PerfEvent.ParentContextKey, currentActive);
913
- if (currentActive.getCtx && currentActive.setCtx) {
914
- var children = currentActive.getCtx(PerfEvent.ChildrenContextKey);
952
+ if (currentActive && perfEvt[_DYN_SET_CTX ]) {
953
+ perfEvt[_DYN_SET_CTX ](PerfEvent[strParentContextKey], currentActive);
954
+ if (currentActive[_DYN_GET_CTX ] && currentActive[_DYN_SET_CTX ]) {
955
+ var children = currentActive[_DYN_GET_CTX ](PerfEvent[strChildrenContextKey]);
915
956
  if (!children) {
916
957
  children = [];
917
- currentActive.setCtx(PerfEvent.ChildrenContextKey, children);
958
+ currentActive[_DYN_SET_CTX ](PerfEvent[strChildrenContextKey], children);
918
959
  }
919
- children.push(perfEvt);
960
+ children[_DYN_PUSH ](perfEvt);
920
961
  }
921
962
  }
922
- perfMgr.setCtx(doPerfActiveKey, perfEvt);
963
+ perfMgr[_DYN_SET_CTX ](doPerfActiveKey, perfEvt);
923
964
  return func(perfEvt);
924
965
  }
925
966
  }
926
967
  catch (ex) {
927
- if (perfEvt && perfEvt.setCtx) {
928
- perfEvt.setCtx("exception", ex);
968
+ if (perfEvt && perfEvt[_DYN_SET_CTX ]) {
969
+ perfEvt[_DYN_SET_CTX ]("exception", ex);
929
970
  }
930
971
  }
931
972
  finally {
932
973
  if (perfEvt) {
933
974
  perfMgr.fire(perfEvt);
934
975
  }
935
- perfMgr.setCtx(doPerfActiveKey, currentActive);
976
+ perfMgr[_DYN_SET_CTX ](doPerfActiveKey, currentActive);
936
977
  }
937
978
  }
938
979
  }
@@ -994,8 +1035,8 @@
994
1035
  var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
995
1036
  var number = random32() >>> 0;
996
1037
  var chars = 0;
997
- var result = strEmpty;
998
- while (result.length < maxLength) {
1038
+ var result = STR_EMPTY;
1039
+ while (result[_DYN_LENGTH ] < maxLength) {
999
1040
  chars++;
1000
1041
  result += base64chars.charAt(number & 0x3F);
1001
1042
  number >>>= 6;
@@ -1008,7 +1049,7 @@
1008
1049
  }
1009
1050
 
1010
1051
  var _objDefineProperty = ObjDefineProperty;
1011
- var version = "2.8.5-nightly.2206-03";
1052
+ var version = "2.8.5-nightly.2207-01";
1012
1053
  var instanceName = "." + newId(6);
1013
1054
  var _dataUid = 0;
1014
1055
  function _createAccessor(target, prop, value) {
@@ -1027,7 +1068,7 @@
1027
1068
  return false;
1028
1069
  }
1029
1070
  function _canAcceptData(target) {
1030
- return target.nodeType === 1 || target.nodeType === 9 || !(+target.nodeType);
1071
+ return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
1031
1072
  }
1032
1073
  function _getCache(data, target) {
1033
1074
  var theCache = target[data.id];
@@ -1047,11 +1088,11 @@
1047
1088
  }
1048
1089
  function createUniqueNamespace(name, includeVersion) {
1049
1090
  if (includeVersion === void 0) { includeVersion = false; }
1050
- return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : "") + instanceName);
1091
+ return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : STR_EMPTY) + instanceName);
1051
1092
  }
1052
1093
  function createElmNodeData(name) {
1053
1094
  var data = {
1054
- id: createUniqueNamespace("_aiData-" + (name || "") + "." + version),
1095
+ id: createUniqueNamespace("_aiData-" + (name || STR_EMPTY) + "." + version),
1055
1096
  accept: function (target) {
1056
1097
  return _canAcceptData(target);
1057
1098
  },
@@ -1090,12 +1131,12 @@
1090
1131
  var _chainId = 0;
1091
1132
  function _getNextProxyStart(proxy, core, startAt) {
1092
1133
  while (proxy) {
1093
- if (proxy.getPlugin() === startAt) {
1134
+ if (proxy[_DYN_GET_PLUGIN ]() === startAt) {
1094
1135
  return proxy;
1095
1136
  }
1096
- proxy = proxy.getNext();
1137
+ proxy = proxy[_DYN_GET_NEXT ]();
1097
1138
  }
1098
- return createTelemetryProxyChain([startAt], core.config || {}, core);
1139
+ return createTelemetryProxyChain([startAt], core[_DYN_CONFIG ] || {}, core);
1099
1140
  }
1100
1141
  function _createInternalContext(telemetryChain, config, core, startAt) {
1101
1142
  var _nextProxy = null;
@@ -1136,7 +1177,7 @@
1136
1177
  args[_i - 2] = arguments[_i];
1137
1178
  }
1138
1179
  if (onComplete) {
1139
- _onComplete.push({
1180
+ _onComplete[_DYN_PUSH ]({
1140
1181
  func: onComplete,
1141
1182
  self: !isUndefined(that) ? that : context.ctx,
1142
1183
  args: args
@@ -1145,16 +1186,16 @@
1145
1186
  }
1146
1187
  function _moveNext() {
1147
1188
  var nextProxy = _nextProxy;
1148
- _nextProxy = nextProxy ? nextProxy.getNext() : null;
1189
+ _nextProxy = nextProxy ? nextProxy[_DYN_GET_NEXT ]() : null;
1149
1190
  if (!nextProxy) {
1150
1191
  var onComplete = _onComplete;
1151
- if (onComplete && onComplete.length > 0) {
1192
+ if (onComplete && onComplete[_DYN_LENGTH ] > 0) {
1152
1193
  arrForEach(onComplete, function (completeDetails) {
1153
1194
  try {
1154
- completeDetails.func.call(completeDetails.self, completeDetails.args);
1195
+ completeDetails.func[_DYN_CALL ](completeDetails.self, completeDetails.args);
1155
1196
  }
1156
1197
  catch (e) {
1157
- _throwInternal(core.logger, 2 , 73 , "Unexpected Exception during onComplete - " + dumpObj(e));
1198
+ _throwInternal(core[_DYN_LOGGER ], 2 , 73 , "Unexpected Exception during onComplete - " + dumpObj(e));
1158
1199
  }
1159
1200
  });
1160
1201
  _onComplete = [];
@@ -1167,7 +1208,7 @@
1167
1208
  if (mergeDefault === void 0) { mergeDefault = 0 ; }
1168
1209
  var theConfig;
1169
1210
  if (config) {
1170
- var extConfig = config.extensionConfig;
1211
+ var extConfig = config[STR_EXTENSION_CONFIG ];
1171
1212
  if (extConfig && identifier) {
1172
1213
  theConfig = extConfig[identifier];
1173
1214
  }
@@ -1208,7 +1249,7 @@
1208
1249
  function _iterateChain(cb) {
1209
1250
  var nextPlugin;
1210
1251
  while (!!(nextPlugin = context._next())) {
1211
- var plugin = nextPlugin.getPlugin();
1252
+ var plugin = nextPlugin[_DYN_GET_PLUGIN ]();
1212
1253
  if (plugin) {
1213
1254
  cb(plugin);
1214
1255
  }
@@ -1221,7 +1262,7 @@
1221
1262
  var context = internalContext.ctx;
1222
1263
  function _processNext(env) {
1223
1264
  var nextPlugin = internalContext._next();
1224
- nextPlugin && nextPlugin.processTelemetry(env, context);
1265
+ nextPlugin && nextPlugin[STR_PROCESS_TELEMETRY ](env, context);
1225
1266
  return !nextPlugin;
1226
1267
  }
1227
1268
  function _createNew(plugins, startAt) {
@@ -1229,14 +1270,14 @@
1229
1270
  if (isArray(plugins)) {
1230
1271
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1231
1272
  }
1232
- return createProcessTelemetryContext(plugins || context.getNext(), config, core, startAt);
1273
+ return createProcessTelemetryContext(plugins || context[_DYN_GET_NEXT ](), config, core, startAt);
1233
1274
  }
1234
- context.processNext = _processNext;
1235
- context.createNew = _createNew;
1275
+ context[_DYN_PROCESS_NEXT ] = _processNext;
1276
+ context[_DYN_CREATE_NEW ] = _createNew;
1236
1277
  return context;
1237
1278
  }
1238
1279
  function createProcessTelemetryUnloadContext(telemetryChain, core, startAt) {
1239
- var config = core.config || {};
1280
+ var config = core[_DYN_CONFIG ] || {};
1240
1281
  var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1241
1282
  var context = internalContext.ctx;
1242
1283
  function _processNext(unloadState) {
@@ -1249,20 +1290,20 @@
1249
1290
  if (isArray(plugins)) {
1250
1291
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1251
1292
  }
1252
- return createProcessTelemetryUnloadContext(plugins || context.getNext(), core, startAt);
1293
+ return createProcessTelemetryUnloadContext(plugins || context[_DYN_GET_NEXT ](), core, startAt);
1253
1294
  }
1254
- context.processNext = _processNext;
1255
- context.createNew = _createNew;
1295
+ context[_DYN_PROCESS_NEXT ] = _processNext;
1296
+ context[_DYN_CREATE_NEW ] = _createNew;
1256
1297
  return context;
1257
1298
  }
1258
1299
  function createProcessTelemetryUpdateContext(telemetryChain, core, startAt) {
1259
- var config = core.config || {};
1300
+ var config = core[_DYN_CONFIG ] || {};
1260
1301
  var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1261
1302
  var context = internalContext.ctx;
1262
1303
  function _processNext(updateState) {
1263
1304
  return context.iterate(function (plugin) {
1264
- if (isFunction(plugin.update)) {
1265
- plugin.update(context, updateState);
1305
+ if (isFunction(plugin[_DYN_UPDATE ])) {
1306
+ plugin[_DYN_UPDATE ](context, updateState);
1266
1307
  }
1267
1308
  });
1268
1309
  }
@@ -1271,22 +1312,22 @@
1271
1312
  if (isArray(plugins)) {
1272
1313
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1273
1314
  }
1274
- return createProcessTelemetryUpdateContext(plugins || context.getNext(), core, startAt);
1315
+ return createProcessTelemetryUpdateContext(plugins || context[_DYN_GET_NEXT ](), core, startAt);
1275
1316
  }
1276
- context.processNext = _processNext;
1277
- context.createNew = _createNew;
1317
+ context[_DYN_PROCESS_NEXT ] = _processNext;
1318
+ context[_DYN_CREATE_NEW ] = _createNew;
1278
1319
  return context;
1279
1320
  }
1280
1321
  function createTelemetryProxyChain(plugins, config, core, startAt) {
1281
1322
  var firstProxy = null;
1282
1323
  var add = startAt ? false : true;
1283
- if (isArray(plugins) && plugins.length > 0) {
1324
+ if (isArray(plugins) && plugins[_DYN_LENGTH ] > 0) {
1284
1325
  var lastProxy_1 = null;
1285
1326
  arrForEach(plugins, function (thePlugin) {
1286
1327
  if (!add && startAt === thePlugin) {
1287
1328
  add = true;
1288
1329
  }
1289
- if (add && thePlugin && isFunction(thePlugin.processTelemetry)) {
1330
+ if (add && thePlugin && isFunction(thePlugin[STR_PROCESS_TELEMETRY ])) {
1290
1331
  var newProxy = createTelemetryPluginProxy(thePlugin, config, core);
1291
1332
  if (!firstProxy) {
1292
1333
  firstProxy = newProxy;
@@ -1305,11 +1346,11 @@
1305
1346
  }
1306
1347
  function createTelemetryPluginProxy(plugin, config, core) {
1307
1348
  var nextProxy = null;
1308
- var hasProcessTelemetry = isFunction(plugin.processTelemetry);
1309
- var hasSetNext = isFunction(plugin.setNextPlugin);
1349
+ var hasProcessTelemetry = isFunction(plugin[STR_PROCESS_TELEMETRY ]);
1350
+ var hasSetNext = isFunction(plugin[_DYN_SET_NEXT_PLUGIN ]);
1310
1351
  var chainId;
1311
1352
  if (plugin) {
1312
- chainId = plugin.identifier + "-" + plugin.priority + "-" + _chainId++;
1353
+ chainId = plugin[_DYN_IDENTIFIER ] + "-" + plugin[STR_PRIORITY ] + "-" + _chainId++;
1313
1354
  }
1314
1355
  else {
1315
1356
  chainId = "Unknown-0-" + _chainId++;
@@ -1341,17 +1382,17 @@
1341
1382
  }
1342
1383
  function _processChain(itemCtx, processPluginFn, name, details, isAsync) {
1343
1384
  var hasRun = false;
1344
- var identifier = plugin ? plugin.identifier : strTelemetryPluginChain;
1385
+ var identifier = plugin ? plugin[_DYN_IDENTIFIER ] : strTelemetryPluginChain;
1345
1386
  var hasRunContext = itemCtx[strHasRunFlags];
1346
1387
  if (!hasRunContext) {
1347
1388
  hasRunContext = itemCtx[strHasRunFlags] = {};
1348
1389
  }
1349
1390
  itemCtx.setNext(nextProxy);
1350
1391
  if (plugin) {
1351
- doPerf(itemCtx[strCore](), function () { return identifier + ":" + name; }, function () {
1392
+ doPerf(itemCtx[STR_CORE ](), function () { return identifier + ":" + name; }, function () {
1352
1393
  hasRunContext[chainId] = true;
1353
1394
  try {
1354
- var nextId = nextProxy ? nextProxy._id : strEmpty;
1395
+ var nextId = nextProxy ? nextProxy._id : STR_EMPTY;
1355
1396
  if (nextId) {
1356
1397
  hasRunContext[nextId] = false;
1357
1398
  }
@@ -1363,7 +1404,7 @@
1363
1404
  hasRun = true;
1364
1405
  }
1365
1406
  if (!nextProxy || !hasNextRun) {
1366
- _throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1407
+ _throwInternal(itemCtx[_DYN_DIAG_LOG ](), 1 , 73 , "Plugin [" + identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1367
1408
  }
1368
1409
  }
1369
1410
  }, details, isAsync);
@@ -1377,17 +1418,17 @@
1377
1418
  return false;
1378
1419
  }
1379
1420
  var pluginState = _getPluginState(plugin);
1380
- if (pluginState.teardown || pluginState[strDisabled]) {
1421
+ if (pluginState[_DYN_TEARDOWN ] || pluginState[STR_DISABLED]) {
1381
1422
  return false;
1382
1423
  }
1383
1424
  if (hasSetNext) {
1384
- plugin.setNextPlugin(nextProxy);
1425
+ plugin[_DYN_SET_NEXT_PLUGIN ](nextProxy);
1385
1426
  }
1386
- plugin.processTelemetry(env, itemCtx);
1427
+ plugin[STR_PROCESS_TELEMETRY ](env, itemCtx);
1387
1428
  return true;
1388
1429
  }
1389
1430
  if (!_processChain(itemCtx, _callProcessTelemetry, "processTelemetry", function () { return ({ item: env }); }, !(env.sync))) {
1390
- itemCtx.processNext(env);
1431
+ itemCtx[_DYN_PROCESS_NEXT ](env);
1391
1432
  }
1392
1433
  }
1393
1434
  function _unloadPlugin(unloadCtx, unloadState) {
@@ -1395,20 +1436,20 @@
1395
1436
  var hasRun = false;
1396
1437
  if (plugin) {
1397
1438
  var pluginState = _getPluginState(plugin);
1398
- var pluginCore = plugin[strCore] || pluginState.core;
1399
- if (plugin && (!pluginCore || pluginCore === unloadCtx[strCore]()) && !pluginState[strTeardown]) {
1400
- pluginState[strCore] = null;
1401
- pluginState[strTeardown] = true;
1402
- pluginState[strIsInitialized] = false;
1403
- if (plugin[strTeardown] && plugin[strTeardown](unloadCtx, unloadState) === true) {
1439
+ var pluginCore = plugin[STR_CORE] || pluginState[STR_CORE ];
1440
+ if (plugin && (!pluginCore || pluginCore === unloadCtx.core()) && !pluginState[_DYN_TEARDOWN ]) {
1441
+ pluginState[STR_CORE ] = null;
1442
+ pluginState[_DYN_TEARDOWN ] = true;
1443
+ pluginState[_DYN_IS_INITIALIZED ] = false;
1444
+ if (plugin[_DYN_TEARDOWN ] && plugin[_DYN_TEARDOWN ](unloadCtx, unloadState) === true) {
1404
1445
  hasRun = true;
1405
1446
  }
1406
1447
  }
1407
1448
  }
1408
1449
  return hasRun;
1409
1450
  }
1410
- if (!_processChain(unloadCtx, _callTeardown, "unload", function () { }, unloadState.isAsync)) {
1411
- unloadCtx.processNext(unloadState);
1451
+ if (!_processChain(unloadCtx, _callTeardown, "unload", function () { }, unloadState[_DYN_IS_ASYNC ])) {
1452
+ unloadCtx[_DYN_PROCESS_NEXT ](unloadState);
1412
1453
  }
1413
1454
  }
1414
1455
  function _updatePlugin(updateCtx, updateState) {
@@ -1416,9 +1457,9 @@
1416
1457
  var hasRun = false;
1417
1458
  if (plugin) {
1418
1459
  var pluginState = _getPluginState(plugin);
1419
- var pluginCore = plugin[strCore] || pluginState.core;
1420
- if (plugin && (!pluginCore || pluginCore === updateCtx[strCore]()) && !pluginState[strTeardown]) {
1421
- if (plugin[strUpdate] && plugin[strUpdate](updateCtx, updateState) === true) {
1460
+ var pluginCore = plugin[STR_CORE] || pluginState[STR_CORE ];
1461
+ if (plugin && (!pluginCore || pluginCore === updateCtx.core()) && !pluginState[_DYN_TEARDOWN ]) {
1462
+ if (plugin[_DYN_UPDATE ] && plugin[_DYN_UPDATE ](updateCtx, updateState) === true) {
1422
1463
  hasRun = true;
1423
1464
  }
1424
1465
  }
@@ -1426,19 +1467,17 @@
1426
1467
  return hasRun;
1427
1468
  }
1428
1469
  if (!_processChain(updateCtx, _callUpdate, "update", function () { }, false)) {
1429
- updateCtx.processNext(updateState);
1470
+ updateCtx[_DYN_PROCESS_NEXT ](updateState);
1430
1471
  }
1431
1472
  }
1432
1473
  return objFreeze(proxyChain);
1433
1474
  }
1434
1475
 
1435
- var strExtensionConfig = "extensionConfig";
1436
-
1437
1476
  function createUnloadHandlerContainer() {
1438
1477
  var handlers = [];
1439
1478
  function _addHandler(handler) {
1440
1479
  if (handler) {
1441
- handlers.push(handler);
1480
+ handlers[_DYN_PUSH ](handler);
1442
1481
  }
1443
1482
  }
1444
1483
  function _runHandlers(unloadCtx, unloadState) {
@@ -1447,7 +1486,7 @@
1447
1486
  handler(unloadCtx, unloadState);
1448
1487
  }
1449
1488
  catch (e) {
1450
- _throwInternal(unloadCtx.diagLog(), 2 , 73 , "Unexpected error calling unload handler - " + dumpObj(e));
1489
+ _throwInternal(unloadCtx[_DYN_DIAG_LOG ](), 2 , 73 , "Unexpected error calling unload handler - " + dumpObj(e));
1451
1490
  }
1452
1491
  });
1453
1492
  handlers = [];
@@ -1469,37 +1508,40 @@
1469
1508
  var _hooks;
1470
1509
  _initDefaults();
1471
1510
  dynamicProto(BaseTelemetryPlugin, _self, function (_self) {
1472
- _self.initialize = function (config, core, extensions, pluginChain) {
1511
+ _self[_DYN_INITIALIZE ] = function (config, core, extensions, pluginChain) {
1473
1512
  _setDefaults(config, core, pluginChain);
1474
1513
  _isinitialized = true;
1475
1514
  };
1476
- _self.teardown = function (unloadCtx, unloadState) {
1477
- var core = _self.core;
1478
- if (!core || (unloadCtx && core !== unloadCtx.core())) {
1515
+ _self[_DYN_TEARDOWN ] = function (unloadCtx, unloadState) {
1516
+ var _a;
1517
+ var core = _self[STR_CORE ];
1518
+ if (!core || (unloadCtx && core !== unloadCtx[STR_CORE ]())) {
1479
1519
  return;
1480
1520
  }
1481
1521
  var result;
1482
1522
  var unloadDone = false;
1483
1523
  var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
1484
- var theUnloadState = unloadState || {
1485
- reason: 0 ,
1486
- isAsync: false
1487
- };
1524
+ var theUnloadState = unloadState || (_a = {
1525
+ reason: 0
1526
+ },
1527
+ _a[_DYN_IS_ASYNC ] = false,
1528
+ _a);
1488
1529
  function _unloadCallback() {
1489
1530
  if (!unloadDone) {
1490
1531
  unloadDone = true;
1491
1532
  _unloadHandlerContainer.run(theUnloadCtx, unloadState);
1492
- arrForEach(_hooks, function (fn) {
1533
+ var oldHooks = _hooks;
1534
+ _hooks = [];
1535
+ arrForEach(oldHooks, function (fn) {
1493
1536
  fn.rm();
1494
1537
  });
1495
- _hooks = [];
1496
1538
  if (result === true) {
1497
- theUnloadCtx.processNext(theUnloadState);
1539
+ theUnloadCtx[_DYN_PROCESS_NEXT ](theUnloadState);
1498
1540
  }
1499
1541
  _initDefaults();
1500
1542
  }
1501
1543
  }
1502
- if (!_self[strDoTeardown] || _self[strDoTeardown](theUnloadCtx, theUnloadState, _unloadCallback) !== true) {
1544
+ if (!_self[_DYN__DO_TEARDOWN ] || _self[_DYN__DO_TEARDOWN ](theUnloadCtx, theUnloadState, _unloadCallback) !== true) {
1503
1545
  _unloadCallback();
1504
1546
  }
1505
1547
  else {
@@ -1507,9 +1549,9 @@
1507
1549
  }
1508
1550
  return result;
1509
1551
  };
1510
- _self.update = function (updateCtx, updateState) {
1511
- var core = _self.core;
1512
- if (!core || (updateCtx && core !== updateCtx.core())) {
1552
+ _self[_DYN_UPDATE ] = function (updateCtx, updateState) {
1553
+ var core = _self[STR_CORE ];
1554
+ if (!core || (updateCtx && core !== updateCtx[STR_CORE ]())) {
1513
1555
  return;
1514
1556
  }
1515
1557
  var result;
@@ -1521,7 +1563,7 @@
1521
1563
  function _updateCallback() {
1522
1564
  if (!updateDone) {
1523
1565
  updateDone = true;
1524
- _setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx.getNext());
1566
+ _setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx[_DYN_GET_NEXT ]());
1525
1567
  }
1526
1568
  }
1527
1569
  if (!_self._doUpdate || _self._doUpdate(theUpdateCtx, theUpdateState, _updateCallback) !== true) {
@@ -1538,30 +1580,30 @@
1538
1580
  _hooks = _hooks.concat(hooks);
1539
1581
  }
1540
1582
  else {
1541
- _hooks.push(hooks);
1583
+ _hooks[_DYN_PUSH ](hooks);
1542
1584
  }
1543
1585
  }
1544
1586
  };
1545
1587
  proxyFunctionAs(_self, "_addUnloadCb", function () { return _unloadHandlerContainer; }, "add");
1546
1588
  });
1547
- _self.diagLog = function (itemCtx) {
1548
- return _getTelCtx(itemCtx).diagLog();
1589
+ _self[_DYN_DIAG_LOG ] = function (itemCtx) {
1590
+ return _getTelCtx(itemCtx)[_DYN_DIAG_LOG ]();
1549
1591
  };
1550
- _self[strIsInitialized] = function () {
1592
+ _self[_DYN_IS_INITIALIZED ] = function () {
1551
1593
  return _isinitialized;
1552
1594
  };
1553
1595
  _self.setInitialized = function (isInitialized) {
1554
1596
  _isinitialized = isInitialized;
1555
1597
  };
1556
- _self[strSetNextPlugin] = function (next) {
1598
+ _self[_DYN_SET_NEXT_PLUGIN ] = function (next) {
1557
1599
  _nextPlugin = next;
1558
1600
  };
1559
- _self.processNext = function (env, itemCtx) {
1601
+ _self[_DYN_PROCESS_NEXT ] = function (env, itemCtx) {
1560
1602
  if (itemCtx) {
1561
- itemCtx.processNext(env);
1603
+ itemCtx[_DYN_PROCESS_NEXT ](env);
1562
1604
  }
1563
- else if (_nextPlugin && isFunction(_nextPlugin.processTelemetry)) {
1564
- _nextPlugin.processTelemetry(env, null);
1605
+ else if (_nextPlugin && isFunction(_nextPlugin[STR_PROCESS_TELEMETRY ])) {
1606
+ _nextPlugin[STR_PROCESS_TELEMETRY ](env, null);
1565
1607
  }
1566
1608
  };
1567
1609
  _self._getTelCtx = _getTelCtx;
@@ -1569,33 +1611,33 @@
1569
1611
  if (currentCtx === void 0) { currentCtx = null; }
1570
1612
  var itemCtx = currentCtx;
1571
1613
  if (!itemCtx) {
1572
- var rootCtx = _rootCtx || createProcessTelemetryContext(null, {}, _self.core);
1614
+ var rootCtx = _rootCtx || createProcessTelemetryContext(null, {}, _self[STR_CORE ]);
1573
1615
  if (_nextPlugin && _nextPlugin[strGetPlugin]) {
1574
- itemCtx = rootCtx.createNew(null, _nextPlugin[strGetPlugin]);
1616
+ itemCtx = rootCtx[_DYN_CREATE_NEW ](null, _nextPlugin[strGetPlugin]);
1575
1617
  }
1576
1618
  else {
1577
- itemCtx = rootCtx.createNew(null, _nextPlugin);
1619
+ itemCtx = rootCtx[_DYN_CREATE_NEW ](null, _nextPlugin);
1578
1620
  }
1579
1621
  }
1580
1622
  return itemCtx;
1581
1623
  }
1582
1624
  function _setDefaults(config, core, pluginChain) {
1583
1625
  if (config) {
1584
- setValue(config, strExtensionConfig, [], null, isNullOrUndefined);
1626
+ setValue(config, STR_EXTENSION_CONFIG, [], null, isNullOrUndefined);
1585
1627
  }
1586
1628
  if (!pluginChain && core) {
1587
- pluginChain = core.getProcessTelContext().getNext();
1629
+ pluginChain = core[_DYN_GET_PROCESS_TEL_CONT0 ]()[_DYN_GET_NEXT ]();
1588
1630
  }
1589
1631
  var nextPlugin = _nextPlugin;
1590
1632
  if (_nextPlugin && _nextPlugin[strGetPlugin]) {
1591
1633
  nextPlugin = _nextPlugin[strGetPlugin]();
1592
1634
  }
1593
- _self.core = core;
1635
+ _self[STR_CORE ] = core;
1594
1636
  _rootCtx = createProcessTelemetryContext(pluginChain, config, core, nextPlugin);
1595
1637
  }
1596
1638
  function _initDefaults() {
1597
1639
  _isinitialized = false;
1598
- _self.core = null;
1640
+ _self[STR_CORE ] = null;
1599
1641
  _rootCtx = null;
1600
1642
  _nextPlugin = null;
1601
1643
  _hooks = [];
@@ -1606,14 +1648,16 @@
1606
1648
  return BaseTelemetryPlugin;
1607
1649
  }());
1608
1650
 
1651
+ var _DYN_EXTENSION_CONFIG = "extensionConfig";
1652
+
1609
1653
  var ConfigurationManager = /** @class */ (function () {
1610
1654
  function ConfigurationManager() {
1611
1655
  }
1612
1656
  ConfigurationManager.getConfig = function (config, field, identifier, defaultValue) {
1613
1657
  if (defaultValue === void 0) { defaultValue = false; }
1614
1658
  var configValue;
1615
- if (identifier && config.extensionConfig && config.extensionConfig[identifier] && !isNullOrUndefined(config.extensionConfig[identifier][field])) {
1616
- configValue = config.extensionConfig[identifier][field];
1659
+ if (identifier && config[_DYN_EXTENSION_CONFIG ] && config[_DYN_EXTENSION_CONFIG ][identifier] && !isNullOrUndefined(config[_DYN_EXTENSION_CONFIG ][identifier][field])) {
1660
+ configValue = config[_DYN_EXTENSION_CONFIG ][identifier][field];
1617
1661
  }
1618
1662
  else {
1619
1663
  configValue = config[field];