@microsoft/applicationinsights-common 3.4.2-nightly3.2605-01 → 3.4.2-nightly3.2605-07

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,18 +1,18 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Common, 3.4.2-nightly3.2605-01
2
+ * Application Insights JavaScript SDK - Common, 3.4.2-nightly3.2605-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  'use strict';
6
6
 
7
7
 
8
- /*! https://github.com/nevware21/ts-utils v0.13.0 */
8
+ /*! https://github.com/nevware21/ts-utils v0.14.0 */
9
9
  /*#__NO_SIDE_EFFECTS__*/
10
10
  function _pureAssign(func1, func2) {
11
11
  return func1 || func2;
12
12
  }
13
13
  /*#__NO_SIDE_EFFECTS__*/
14
14
  function _pureRef(value, name) {
15
- return value[name];
15
+ return value !== null && value !== undefined ? value[name] : undefined;
16
16
  }
17
17
  var UNDEF_VALUE = undefined;
18
18
  var NULL_VALUE = null;
@@ -153,7 +153,7 @@ function objForEachKey(theObject, callbackfn, thisArg) {
153
153
  if (theObject && (isObject(theObject) || isFunction(theObject))) {
154
154
  for (var prop in theObject) {
155
155
  if (objHasOwn(theObject, prop)) {
156
- if (callbackfn[CALL](thisArg || theObject, prop, theObject[prop]) === -1) {
156
+ if (callbackfn[CALL](isStrictNullOrUndefined(thisArg) ? theObject : thisArg, prop, theObject[prop]) === -1) {
157
157
  break;
158
158
  }
159
159
  }
@@ -165,14 +165,14 @@ function arrForEach(theArray, callbackfn, thisArg) {
165
165
  var len = theArray[LENGTH] >>> 0;
166
166
  for (var idx = 0; idx < len; idx++) {
167
167
  if (idx in theArray) {
168
- if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
168
+ if (callbackfn[CALL](isStrictNullOrUndefined(thisArg) ? theArray : thisArg, theArray[idx], idx, theArray) === -1) {
169
169
  break;
170
170
  }
171
171
  }
172
172
  }
173
173
  }
174
174
  }
175
- var _unwrapFunction = ( _unwrapFunctionWithPoly);
175
+ var _unwrapFunction = _unwrapFunctionWithPoly;
176
176
  /*#__NO_SIDE_EFFECTS__*/
177
177
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
178
178
  var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
@@ -185,24 +185,36 @@ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
185
185
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
186
186
  };
187
187
  }
188
+ /*#__NO_SIDE_EFFECTS__*/
189
+ function _unwrapFunctionNoInstWithPoly(funcName, clsProto, polyFunc) {
190
+ var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
191
+ return function (thisArg) {
192
+ var theFunc = clsFn;
193
+ if (theFunc || polyFunc) {
194
+ var theArgs = arguments;
195
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
196
+ }
197
+ throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
198
+ };
199
+ }
188
200
  function _objPropertyIsEnum(obj, propKey) {
189
201
  var desc;
190
202
  var fn = ObjClass$1.getOwnPropertyDescriptor;
191
203
  if (!isStrictNullOrUndefined(obj) && fn) {
192
204
  desc = safe(fn, [obj, propKey]).v || NULL_VALUE;
193
205
  }
194
- if (!desc) {
206
+ if (!desc && !isStrictNullOrUndefined(obj)) {
195
207
  desc = safe(function () {
196
208
  for (var key in obj) {
197
- if (key === propKey) {
198
- return { enumerable: true };
209
+ if (key == propKey) {
210
+ return { enumerable: objHasOwnProperty(obj, key) };
199
211
  }
200
212
  }
201
213
  }).v;
202
214
  }
203
215
  return (desc && desc.enumerable) || false;
204
216
  }
205
- var objPropertyIsEnumerable = ( /*#__PURE__*/_unwrapFunctionWithPoly("propertyIsEnumerable", NULL_VALUE, _objPropertyIsEnum));
217
+ var _objPropertyIsEnumerable = ( /*#__PURE__*/_unwrapFunctionNoInstWithPoly("propertyIsEnumerable", ObjProto$1, _objPropertyIsEnum));
206
218
  var _objGetOwnPropertyDescriptor$1 = ( /*#__PURE__*/_pureAssign(( /*#__PURE__*/_pureRef(ObjClass$1, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
207
219
  var _objGetOwnPropertySymbols = ( /*#__PURE__*/_pureAssign(( /*#__PURE__*/_pureRef(ObjClass$1, GET_OWN_PROPERTY_SYMBOLS)), _returnEmptyArray));
208
220
  var propMap = {
@@ -243,7 +255,7 @@ function objDefineProps(target, propDescMap) {
243
255
  props[key] = _createProp(value);
244
256
  });
245
257
  arrForEach(_objGetOwnPropertySymbols(propDescMap), function (sym) {
246
- if (objPropertyIsEnumerable(propDescMap, sym)) {
258
+ if (_objPropertyIsEnumerable(propDescMap, sym)) {
247
259
  props[sym] = _createProp(propDescMap[sym]);
248
260
  }
249
261
  });
@@ -610,6 +622,7 @@ function symbolFor(key) {
610
622
  }
611
623
  var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
612
624
  var arrMap = ( /*#__PURE__*/_unwrapFunction("map", ArrProto));
625
+ var mathFloor = ( /*#__PURE__*/_pureRef(MathCls, "floor"));
613
626
  var arrReduce = ( /*#__PURE__*/_unwrapFunction("reduce", ArrProto));
614
627
  var _isProtoArray;
615
628
  var objSetPrototypeOf = ( /*#__PURE__*/_pureAssign(( /*#__PURE__*/_pureRef(ObjClass$1, "setPrototypeOf")), _polyObjSetPrototypeOf));
@@ -659,19 +672,20 @@ function createCustomError(name, constructCb, errorBase, superArgsFn) {
659
672
  }
660
673
  }, theBaseClass);
661
674
  }
675
+ var strReplace = ( /*#__PURE__*/_unwrapFunction("replace", StrProto));
662
676
  /*#__NO_SIDE_EFFECTS__*/
663
677
  function _createTrimFn(exp) {
664
678
  return function _doTrim(value) {
665
679
  _throwIfNullOrUndefined(value);
666
- if (value && value.replace) {
667
- value = value.replace(exp, EMPTY);
680
+ value = asString(value);
681
+ if (value) {
682
+ value = strReplace(value, exp, EMPTY);
668
683
  }
669
684
  return value;
670
685
  };
671
686
  }
672
687
  var polyStrTrim = ( /*#__PURE__*/_createTrimFn(/^\s+|(?=\s)\s+$/g));
673
688
  var strTrim = ( /*#__PURE__*/_unwrapFunctionWithPoly("trim", StrProto, polyStrTrim));
674
- var mathFloor = ( /*#__PURE__*/_pureRef(MathCls, "floor"));
675
689
  /*#__NO_SIDE_EFFECTS__*/
676
690
  function safeGetDeferred(cb, defValue, argArray) {
677
691
  return getDeferred(function () {
@@ -679,6 +693,7 @@ function safeGetDeferred(cb, defValue, argArray) {
679
693
  return result.e ? defValue : result.v;
680
694
  });
681
695
  }
696
+ var objGetOwnPropertyDescriptor = ( /*#__PURE__*/_pureAssign(( /*#__PURE__*/_pureRef(ObjClass$1, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
682
697
  var _fnToString;
683
698
  var _objCtrFnString;
684
699
  var _gblWindow;
@@ -722,7 +737,7 @@ function getPerformance() {
722
737
  return _perf.v;
723
738
  }
724
739
  var mathRound = ( /*#__PURE__*/_pureRef(MathCls, "round"));
725
- var objGetOwnPropertyDescriptor = ( /*#__PURE__*/_pureAssign(( /*#__PURE__*/_pureRef(ObjClass$1, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
740
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
726
741
  var strEndsWith = ( /*#__PURE__*/_unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith));
727
742
  /*#__NO_SIDE_EFFECTS__*/
728
743
  function polyStrEndsWith(value, searchString, length) {
@@ -731,7 +746,6 @@ function polyStrEndsWith(value, searchString, length) {
731
746
  var end = (!isUndefined(length) && length < value[LENGTH]) ? length : value[LENGTH];
732
747
  return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
733
748
  }
734
- var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
735
749
  var REF = "ref";
736
750
  var UNREF = "unref";
737
751
  var HAS_REF = "hasRef";
@@ -1710,7 +1724,7 @@ function newId(maxLength) {
1710
1724
  return result;
1711
1725
  }
1712
1726
 
1713
- var version = '3.4.2-nightly3.2605-01';
1727
+ var version = "3.4.2-nightly3.2605-07";
1714
1728
  var instanceName = "." + newId(6);
1715
1729
  var _dataUid = 0;
1716
1730
  function _canAcceptData(target) {