@microsoft/applicationinsights-react-native 4.3.7-nightly.2504-05 → 4.3.7-nightly.2504-06

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, 4.3.7-nightly.2504-05
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.3.7-nightly.2504-06
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -18,7 +18,7 @@
18
18
  var strShimPrototype = "prototype";
19
19
  var ObjClass$1 = Object;
20
20
 
21
- /*! https://github.com/nevware21/ts-utils v0.12.1 */
21
+ /*! https://github.com/nevware21/ts-utils v0.12.2 */
22
22
  function _pureAssign(func1, func2) {
23
23
  return func1 || func2;
24
24
  }
@@ -39,8 +39,6 @@
39
39
  var NAME = "name";
40
40
  var CALL = "call";
41
41
  var TO_STRING = "toString";
42
- var GETTER_NAME = "__lookupGetter__";
43
- var SETTER_NAME = "__lookupSetter__";
44
42
  var ObjClass = ( _pureAssign(Object));
45
43
  var ObjProto = ( _pureRef(ObjClass, PROTOTYPE));
46
44
  var StrCls = ( _pureAssign(String));
@@ -139,83 +137,13 @@
139
137
  throwTypeError("'" + dumpObj(value) + "' is not a string");
140
138
  }
141
139
  }
140
+ function _returnNothing() {
141
+ return UNDEF_VALUE;
142
+ }
143
+ var objGetOwnPropertyDescriptor = ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyDescriptor")), _returnNothing));
142
144
  function objHasOwnProperty(obj, prop) {
143
145
  return !!obj && ObjProto.hasOwnProperty[CALL](obj, prop);
144
146
  }
145
- var _unwrapFunction = ( _unwrapFunctionWithPoly);
146
- function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
147
- var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
148
- return function (thisArg) {
149
- var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;
150
- if (theFunc || polyFunc) {
151
- var theArgs = arguments;
152
- return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
153
- }
154
- throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
155
- };
156
- }
157
- function _objPropertyIsEnum(obj, propKey) {
158
- var desc;
159
- var fn = ObjClass.getOwnPropertyDescriptor;
160
- if (!isStrictNullOrUndefined(obj) && fn) {
161
- desc = safe(fn, [obj, propKey]).v || NULL_VALUE;
162
- }
163
- if (!desc) {
164
- desc = safe(function () {
165
- for (var key in obj) {
166
- if (key === propKey) {
167
- return { enumerable: true };
168
- }
169
- }
170
- }).v;
171
- }
172
- return (desc && desc.enumerable) || false;
173
- }
174
- var objPropertyIsEnumerable = ( _unwrapFunctionWithPoly("propertyIsEnumerable", NULL_VALUE, _objPropertyIsEnum));
175
- function _isPropertyWritable(obj, prop) {
176
- var result = false;
177
- if (!(isString(obj) && (prop === LENGTH || isNumber(prop) || (isString(prop) && !isNaN(Number(prop)))))) {
178
- var originalValue = obj[prop];
179
- try {
180
- obj[prop] = originalValue;
181
- result = true;
182
- }
183
- catch (e) {
184
- }
185
- }
186
- return result;
187
- }
188
- function polyObjGetOwnPropertyDescriptor(obj, prop) {
189
- var descriptor;
190
- _throwIfNullOrUndefined(obj);
191
- var isLength = (prop === LENGTH && (isArray(obj) || isString(obj)));
192
- if (isLength || objHasOwnProperty(obj, prop)) {
193
- descriptor = {
194
- configurable: !isLength,
195
- enumerable: !isLength ? objPropertyIsEnumerable(obj, prop) : false
196
- };
197
- var isData = true;
198
- if (GETTER_NAME in ObjProto && SETTER_NAME in ObjProto) {
199
- var getter = obj[GETTER_NAME](prop);
200
- var setter = obj[SETTER_NAME](prop);
201
- if (getter || setter) {
202
- isData = false;
203
- if (getter) {
204
- descriptor.get = getter;
205
- }
206
- if (setter) {
207
- descriptor.set = setter;
208
- }
209
- }
210
- }
211
- if (isData) {
212
- descriptor.value = obj[prop];
213
- descriptor.writable = _isPropertyWritable(obj, prop);
214
- }
215
- }
216
- return descriptor;
217
- }
218
- var objGetOwnPropertyDescriptor = ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyDescriptor")), polyObjGetOwnPropertyDescriptor));
219
147
  function polyObjHasOwn(obj, prop) {
220
148
  _throwIfNullOrUndefined(obj);
221
149
  return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
@@ -245,6 +173,36 @@
245
173
  }
246
174
  }
247
175
  }
176
+ var _unwrapFunction = ( _unwrapFunctionWithPoly);
177
+ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
178
+ var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
179
+ return function (thisArg) {
180
+ var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;
181
+ if (theFunc || polyFunc) {
182
+ var theArgs = arguments;
183
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
184
+ }
185
+ throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
186
+ };
187
+ }
188
+ function _objPropertyIsEnum(obj, propKey) {
189
+ var desc;
190
+ var fn = ObjClass.getOwnPropertyDescriptor;
191
+ if (!isStrictNullOrUndefined(obj) && fn) {
192
+ desc = safe(fn, [obj, propKey]).v || NULL_VALUE;
193
+ }
194
+ if (!desc) {
195
+ desc = safe(function () {
196
+ for (var key in obj) {
197
+ if (key === propKey) {
198
+ return { enumerable: true };
199
+ }
200
+ }
201
+ }).v;
202
+ }
203
+ return (desc && desc.enumerable) || false;
204
+ }
205
+ ( _unwrapFunctionWithPoly("propertyIsEnumerable", NULL_VALUE, _objPropertyIsEnum));
248
206
  var propMap = {
249
207
  e: "enumerable",
250
208
  c: "configurable",
@@ -314,38 +272,11 @@
314
272
  });
315
273
  return result;
316
274
  }
317
- function polyObjIsFrozen(obj) {
318
- if (isStrictNullOrUndefined(obj) || (!isObject(obj) && !isFunction(obj))) {
319
- return true;
320
- }
321
- if (isFunction(obj)) {
322
- return false;
323
- }
324
- for (var prop in obj) {
325
- var desc = objGetOwnPropertyDescriptor(obj, prop);
326
- if (desc && (desc.configurable || (desc.writable !== false && "value" in desc))) {
327
- return false;
328
- }
329
- }
330
- return true;
331
- }
332
- function polyObjIsSealed(obj) {
333
- if (isStrictNullOrUndefined(obj) || (!isObject(obj) && !isFunction(obj))) {
334
- return true;
335
- }
336
- if (isFunction(obj)) {
337
- return false;
338
- }
339
- for (var prop in obj) {
340
- var desc = objGetOwnPropertyDescriptor(obj, prop);
341
- if (desc && desc.configurable) {
342
- return false;
343
- }
344
- }
345
- return true;
275
+ function _returnFalse() {
276
+ return false;
346
277
  }
347
- var objIsFrozen = ( _pureAssign(( _pureRef(ObjClass, "isFrozen")), polyObjIsFrozen));
348
- ( _pureAssign(( _pureRef(ObjClass, "isSealed")), polyObjIsSealed));
278
+ var objIsFrozen = ( _pureAssign(( _pureRef(ObjClass, "isFrozen")), _returnFalse));
279
+ ( _pureAssign(( _pureRef(ObjClass, "isSealed")), _returnFalse));
349
280
  var _objFreeze = ( _pureRef(ObjClass, "freeze"));
350
281
  function _doNothing(value) {
351
282
  return value;
@@ -461,22 +392,9 @@
461
392
  }
462
393
  return target;
463
394
  }
464
- function createCachedValue(value) {
465
- return objDefineProp({
466
- toJSON: function () { return value; }
467
- }, "v", { value: value });
468
- }
469
- var _isProtoArray;
470
- var objSetPrototypeOf = ( _pureAssign(( _pureRef(ObjClass, "setPrototypeOf")), _polyObjSetPrototypeOf));
471
- function _polyObjSetPrototypeOf(obj, proto) {
472
- var _a;
473
- !_isProtoArray && (_isProtoArray = createCachedValue((_a = {}, _a[__PROTO__] = [], _a) instanceof Array));
474
- _isProtoArray.v ? obj[__PROTO__] = proto : objForEachKey(proto, function (key, value) { return obj[key] = value; });
475
- return obj;
476
- }
477
395
  var objCreate = ( _pureAssign(( _pureRef(ObjClass, "create")), polyObjCreate));
478
396
  function polyObjCreate(obj, properties) {
479
- var newObj;
397
+ var newObj = null;
480
398
  function tempFunc() { }
481
399
  if (!isStrictNullOrUndefined(obj)) {
482
400
  var type = typeof obj;
@@ -492,7 +410,6 @@
492
410
  else {
493
411
  newObj = {};
494
412
  }
495
- safe(_polyObjSetPrototypeOf, [newObj, obj]);
496
413
  if (properties) {
497
414
  safe(objDefineProperties, [newObj, properties]);
498
415
  }
@@ -551,32 +468,19 @@
551
468
  function polyNewSymbol(description) {
552
469
  var uniqueId = "_" + _polyId++ + "_" + _uniqueInstanceId.v;
553
470
  var symString = SYMBOL + "(" + description + ")";
471
+ function _setProp(name, value) {
472
+ objDefine(theSymbol, name, {
473
+ v: value,
474
+ e: false,
475
+ w: false
476
+ });
477
+ }
554
478
  var theSymbol = objCreate(null);
555
- objDefine(theSymbol, "description", {
556
- v: asString(description),
557
- e: false,
558
- w: false
559
- });
560
- objDefine(theSymbol, TO_STRING, {
561
- v: function () { return symString + POLY_SYM + uniqueId; },
562
- e: false,
563
- w: false
564
- });
565
- objDefine(theSymbol, "valueOf", {
566
- v: function () { return theSymbol; },
567
- e: false,
568
- w: false
569
- });
570
- objDefine(theSymbol, "v", {
571
- v: symString,
572
- e: false,
573
- w: false
574
- });
575
- objDefine(theSymbol, "_uid", {
576
- v: uniqueId,
577
- e: false,
578
- w: false
579
- });
479
+ _setProp("description", asString(description));
480
+ _setProp(TO_STRING, function () { return symString + POLY_SYM + uniqueId; });
481
+ _setProp("valueOf", function () { return theSymbol; });
482
+ _setProp("v", symString);
483
+ _setProp("_uid", uniqueId);
580
484
  return _tagAsPolyfill(theSymbol, "symbol");
581
485
  }
582
486
  function polySymbolFor(key) {
@@ -599,6 +503,11 @@
599
503
  }
600
504
  return result;
601
505
  }
506
+ function createCachedValue(value) {
507
+ return objDefineProp({
508
+ toJSON: function () { return value; }
509
+ }, "v", { value: value });
510
+ }
602
511
  var WINDOW = "window";
603
512
  var _cachedGlobal;
604
513
  function _getGlobalInstFn(getFn, theArgs) {
@@ -803,6 +712,14 @@
803
712
  ( _unwrapFunctionWithPoly("includes", ArrProto, polyArrIncludes));
804
713
  ( _unwrapFunction("reduce", ArrProto));
805
714
  ( _unwrapFunction("some", ArrProto));
715
+ var _isProtoArray;
716
+ var objSetPrototypeOf = ( _pureAssign(( _pureRef(ObjClass, "setPrototypeOf")), _polyObjSetPrototypeOf));
717
+ function _polyObjSetPrototypeOf(obj, proto) {
718
+ var _a;
719
+ !_isProtoArray && (_isProtoArray = createCachedValue((_a = {}, _a[__PROTO__] = [], _a) instanceof Array));
720
+ _isProtoArray.v ? obj[__PROTO__] = proto : objForEachKey(proto, function (key, value) { return obj[key] = value; });
721
+ return obj;
722
+ }
806
723
  function _createCustomError(name, d, b) {
807
724
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
808
725
  d = objSetPrototypeOf(d, b);
@@ -867,7 +784,7 @@
867
784
  }
868
785
  function mathToInt(value, throwInfinity) {
869
786
  var result = +value;
870
- if (result == Infinity && throwInfinity) {
787
+ if (throwInfinity && (result === Infinity || result == Infinity)) {
871
788
  throwRangeError("invalid value [" + dumpObj(value) + "]");
872
789
  }
873
790
  return result !== result || result === 0 ? 0 : mathTrunc(result);
@@ -969,22 +886,10 @@
969
886
  ( _pureRef(MathCls, "sin"));
970
887
  ( _pureRef(MathCls, "cos"));
971
888
  ( _pureRef(MathCls, "tan"));
972
- function polyObjGetOwnPropertyNames(obj) {
973
- var result = [];
974
- _throwIfNullOrUndefined(obj);
975
- for (var key in obj) {
976
- if (ObjProto.hasOwnProperty.call(obj, key)) {
977
- result.push(key);
978
- }
979
- }
980
- if (isArray(obj) || isString(obj)) {
981
- if (arrIndexOf(result, LENGTH) === -1) {
982
- result.push(LENGTH);
983
- }
984
- }
985
- return result;
889
+ function _returnEmptyArray() {
890
+ return [];
986
891
  }
987
- var objGetOwnPropertyNames = ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyNames")), polyObjGetOwnPropertyNames));
892
+ var objGetOwnPropertyNames = ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyNames")), _returnEmptyArray));
988
893
  var recursionCheckOwnDescriptors;
989
894
  function polyObjGetOwnPropertyDescriptors(obj) {
990
895
  var result = {};
@@ -993,13 +898,13 @@
993
898
  try {
994
899
  recursionCheckOwnDescriptors = true;
995
900
  arrForEach(objGetOwnPropertyNames(obj), function (propName) {
996
- var descriptor = polyObjGetOwnPropertyDescriptor(obj, propName);
901
+ var descriptor = objGetOwnPropertyDescriptor(obj, propName);
997
902
  if (descriptor !== undefined) {
998
903
  result[propName] = descriptor;
999
904
  }
1000
905
  });
1001
906
  arrForEach(polyObjGetOwnPropertySymbols(obj), function (sym) {
1002
- var descriptor = polyObjGetOwnPropertyDescriptor(obj, sym);
907
+ var descriptor = objGetOwnPropertyDescriptor(obj, sym);
1003
908
  if (descriptor !== undefined) {
1004
909
  result[sym] = descriptor;
1005
910
  }
@@ -1056,14 +961,7 @@
1056
961
  }
1057
962
  return true;
1058
963
  }
1059
- function polyObjPreventExtensions(obj) {
1060
- _throwIfNullOrUndefined(obj);
1061
- if (!isObject(obj) && !isFunction(obj)) {
1062
- throwTypeError("objPreventExtensions can only be called on Objects");
1063
- }
1064
- return obj;
1065
- }
1066
- ( _pureAssign(( _pureRef(ObjClass, "preventExtensions")), polyObjPreventExtensions));
964
+ ( _pureAssign(( _pureRef(ObjClass, "preventExtensions")), _doNothing));
1067
965
  ( _pureAssign(( _pureRef(ObjClass, "isExtensible")), polyObjIsExtensible));
1068
966
  ( _unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith));
1069
967
  function polyStrEndsWith(value, searchString, length) {
@@ -1680,7 +1578,7 @@
1680
1578
  return result;
1681
1579
  }
1682
1580
 
1683
- var version = '3.3.7-nightly3.2504-11';
1581
+ var version = '3.3.7-nightly3.2504-13';
1684
1582
  var instanceName = "." + newId(6);
1685
1583
  var _dataUid = 0;
1686
1584
  function _canAcceptData(target) {