@microsoft/applicationinsights-analytics-js 3.4.2-nightly3.2605-06 → 3.4.2-nightly3.2605-11

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/es5/applicationinsights-analytics-js.cjs.js +85 -44
  2. package/browser/es5/applicationinsights-analytics-js.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-analytics-js.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-analytics-js.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-analytics-js.gbl.js +87 -46
  6. package/browser/es5/applicationinsights-analytics-js.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-analytics-js.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-analytics-js.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-analytics-js.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-analytics-js.js +87 -46
  11. package/browser/es5/applicationinsights-analytics-js.js.map +1 -1
  12. package/browser/es5/applicationinsights-analytics-js.min.js +2 -2
  13. package/browser/es5/applicationinsights-analytics-js.min.js.map +1 -1
  14. package/dist/es5/applicationinsights-analytics-js.js +85 -44
  15. package/dist/es5/applicationinsights-analytics-js.js.map +1 -1
  16. package/dist/es5/applicationinsights-analytics-js.min.js +2 -2
  17. package/dist/es5/applicationinsights-analytics-js.min.js.map +1 -1
  18. package/dist-es5/JavaScriptSDK/AnalyticsPlugin.js +2 -2
  19. package/dist-es5/JavaScriptSDK/AnalyticsPlugin.js.map +1 -1
  20. package/dist-es5/JavaScriptSDK/Interfaces/IAnalyticsConfig.js +1 -1
  21. package/dist-es5/JavaScriptSDK/Telemetry/PageViewManager.js +1 -1
  22. package/dist-es5/JavaScriptSDK/Telemetry/PageViewPerformanceManager.js +1 -1
  23. package/dist-es5/JavaScriptSDK/Telemetry/PageVisitTimeManager.js +1 -1
  24. package/dist-es5/JavaScriptSDK/Timing.js +1 -1
  25. package/dist-es5/__DynamicConstants.js +1 -1
  26. package/dist-es5/applicationinsights-analytics-js.js +1 -1
  27. package/package.json +6 -6
  28. package/types/applicationinsights-analytics-js.d.ts +1 -1
  29. package/types/applicationinsights-analytics-js.namespaced.d.ts +3 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Web Analytics, 3.4.2-nightly3.2605-06
2
+ * Application Insights JavaScript SDK - Web Analytics, 3.4.2-nightly3.2605-11
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  'use strict';
@@ -12,14 +12,14 @@ var strShimPrototype = "prototype";
12
12
  var ObjClass$1 = Object;
13
13
  var ObjProto$1 = ObjClass$1[strShimPrototype];
14
14
 
15
- /*! https://github.com/nevware21/ts-utils v0.13.0 */
15
+ /*! https://github.com/nevware21/ts-utils v0.14.0 */
16
16
  /*#__NO_SIDE_EFFECTS__*/
17
17
  function _pureAssign(func1, func2) {
18
18
  return func1 || func2;
19
19
  }
20
20
  /*#__NO_SIDE_EFFECTS__*/
21
21
  function _pureRef(value, name) {
22
- return value[name];
22
+ return value !== null && value !== undefined ? value[name] : undefined;
23
23
  }
24
24
  var UNDEF_VALUE = undefined;
25
25
  var NULL_VALUE = null;
@@ -173,7 +173,7 @@ function objForEachKey(theObject, callbackfn, thisArg) {
173
173
  if (theObject && (isObject(theObject) || isFunction(theObject))) {
174
174
  for (var prop in theObject) {
175
175
  if (objHasOwn(theObject, prop)) {
176
- if (callbackfn[CALL](thisArg || theObject, prop, theObject[prop]) === -1) {
176
+ if (callbackfn[CALL](isStrictNullOrUndefined(thisArg) ? theObject : thisArg, prop, theObject[prop]) === -1) {
177
177
  break;
178
178
  }
179
179
  }
@@ -185,14 +185,14 @@ function arrForEach(theArray, callbackfn, thisArg) {
185
185
  var len = theArray[LENGTH] >>> 0;
186
186
  for (var idx = 0; idx < len; idx++) {
187
187
  if (idx in theArray) {
188
- if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
188
+ if (callbackfn[CALL](isStrictNullOrUndefined(thisArg) ? theArray : thisArg, theArray[idx], idx, theArray) === -1) {
189
189
  break;
190
190
  }
191
191
  }
192
192
  }
193
193
  }
194
194
  }
195
- var _unwrapFunction = ( _unwrapFunctionWithPoly);
195
+ var _unwrapFunction = _unwrapFunctionWithPoly;
196
196
  /*#__NO_SIDE_EFFECTS__*/
197
197
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
198
198
  var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
@@ -205,24 +205,36 @@ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
205
205
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
206
206
  };
207
207
  }
208
+ /*#__NO_SIDE_EFFECTS__*/
209
+ function _unwrapFunctionNoInstWithPoly(funcName, clsProto, polyFunc) {
210
+ var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
211
+ return function (thisArg) {
212
+ var theFunc = clsFn;
213
+ if (theFunc || polyFunc) {
214
+ var theArgs = arguments;
215
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
216
+ }
217
+ throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
218
+ };
219
+ }
208
220
  function _objPropertyIsEnum(obj, propKey) {
209
221
  var desc;
210
222
  var fn = ObjClass.getOwnPropertyDescriptor;
211
223
  if (!isStrictNullOrUndefined(obj) && fn) {
212
224
  desc = safe(fn, [obj, propKey]).v || NULL_VALUE;
213
225
  }
214
- if (!desc) {
226
+ if (!desc && !isStrictNullOrUndefined(obj)) {
215
227
  desc = safe(function () {
216
228
  for (var key in obj) {
217
- if (key === propKey) {
218
- return { enumerable: true };
229
+ if (key == propKey) {
230
+ return { enumerable: objHasOwnProperty(obj, key) };
219
231
  }
220
232
  }
221
233
  }).v;
222
234
  }
223
235
  return (desc && desc.enumerable) || false;
224
236
  }
225
- var objPropertyIsEnumerable = ( /*#__PURE__*/_unwrapFunctionWithPoly("propertyIsEnumerable", NULL_VALUE, _objPropertyIsEnum));
237
+ var _objPropertyIsEnumerable = ( /*#__PURE__*/_unwrapFunctionNoInstWithPoly("propertyIsEnumerable", ObjProto, _objPropertyIsEnum));
226
238
  var _objGetOwnPropertyDescriptor$1 = ( /*#__PURE__*/_pureAssign(( /*#__PURE__*/_pureRef(ObjClass, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
227
239
  var _objGetOwnPropertySymbols = ( /*#__PURE__*/_pureAssign(( /*#__PURE__*/_pureRef(ObjClass, GET_OWN_PROPERTY_SYMBOLS)), _returnEmptyArray));
228
240
  var propMap = {
@@ -263,7 +275,7 @@ function objDefineProps(target, propDescMap) {
263
275
  props[key] = _createProp(value);
264
276
  });
265
277
  arrForEach(_objGetOwnPropertySymbols(propDescMap), function (sym) {
266
- if (objPropertyIsEnumerable(propDescMap, sym)) {
278
+ if (_objPropertyIsEnumerable(propDescMap, sym)) {
267
279
  props[sym] = _createProp(propDescMap[sym]);
268
280
  }
269
281
  });
@@ -658,7 +670,7 @@ function iterForOf(iter, callbackfn, thisArg) {
658
670
  try {
659
671
  var count = 0;
660
672
  while (!(iterResult = iter.next()).done) {
661
- if (callbackfn[CALL](thisArg || iter, iterResult.value, count, iter) === -1) {
673
+ if (callbackfn[CALL](isStrictNullOrUndefined(thisArg) ? iter : thisArg, iterResult.value, count, iter) === -1) {
662
674
  break;
663
675
  }
664
676
  count++;
@@ -704,6 +716,7 @@ function arrAppend(target, elms) {
704
716
  }
705
717
  var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
706
718
  var arrMap = ( /*#__PURE__*/_unwrapFunction("map", ArrProto));
719
+ var mathFloor = ( /*#__PURE__*/_pureRef(MathCls, "floor"));
707
720
  var _isProtoArray;
708
721
  var objSetPrototypeOf = ( /*#__PURE__*/_pureAssign(( /*#__PURE__*/_pureRef(ObjClass, "setPrototypeOf")), _polyObjSetPrototypeOf));
709
722
  function _polyObjSetPrototypeOf(obj, proto) {
@@ -752,19 +765,20 @@ function createCustomError(name, constructCb, errorBase, superArgsFn) {
752
765
  }
753
766
  }, theBaseClass);
754
767
  }
768
+ var strReplace = ( /*#__PURE__*/_unwrapFunction("replace", StrProto));
755
769
  /*#__NO_SIDE_EFFECTS__*/
756
770
  function _createTrimFn(exp) {
757
771
  return function _doTrim(value) {
758
772
  _throwIfNullOrUndefined(value);
759
- if (value && value.replace) {
760
- value = value.replace(exp, EMPTY);
773
+ value = asString(value);
774
+ if (value) {
775
+ value = strReplace(value, exp, EMPTY);
761
776
  }
762
777
  return value;
763
778
  };
764
779
  }
765
780
  var polyStrTrim = ( /*#__PURE__*/_createTrimFn(/^\s+|(?=\s)\s+$/g));
766
781
  var strTrim = ( /*#__PURE__*/_unwrapFunctionWithPoly("trim", StrProto, polyStrTrim));
767
- var mathFloor = ( /*#__PURE__*/_pureRef(MathCls, "floor"));
768
782
  /*#__NO_SIDE_EFFECTS__*/
769
783
  function safeGetDeferred(cb, defValue, argArray) {
770
784
  return getDeferred(function () {
@@ -772,6 +786,7 @@ function safeGetDeferred(cb, defValue, argArray) {
772
786
  return result.e ? defValue : result.v;
773
787
  });
774
788
  }
789
+ var objGetOwnPropertyDescriptor = ( /*#__PURE__*/_pureAssign(( /*#__PURE__*/_pureRef(ObjClass, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
775
790
  var _fnToString;
776
791
  var _objCtrFnString;
777
792
  var _gblWindow;
@@ -815,7 +830,7 @@ function getPerformance() {
815
830
  return _perf.v;
816
831
  }
817
832
  var mathRound = ( /*#__PURE__*/_pureRef(MathCls, "round"));
818
- var objGetOwnPropertyDescriptor = ( /*#__PURE__*/_pureAssign(( /*#__PURE__*/_pureRef(ObjClass, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
833
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
819
834
  var strEndsWith = ( /*#__PURE__*/_unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith));
820
835
  /*#__NO_SIDE_EFFECTS__*/
821
836
  function polyStrEndsWith(value, searchString, length) {
@@ -824,7 +839,6 @@ function polyStrEndsWith(value, searchString, length) {
824
839
  var end = (!isUndefined(length) && length < value[LENGTH]) ? length : value[LENGTH];
825
840
  return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
826
841
  }
827
- var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
828
842
  var REF = "ref";
829
843
  var UNREF = "unref";
830
844
  var HAS_REF = "hasRef";
@@ -978,9 +992,11 @@ var strFunction = 'function';
978
992
  var DynInstFuncTable = '_dynInstFuncs';
979
993
  var DynProxyTag = '_isDynProxy';
980
994
  var DynClassName = '_dynClass';
995
+ var DynBaseProtoFuncs = '_dynBaseFuncs';
981
996
  var DynClassNamePrefix = '_dynCls$';
982
997
  var DynInstChkTag = '_dynInstChk';
983
998
  var DynAllowInstChkTag = DynInstChkTag;
999
+ var DynResolvedCachePrefix = '_dyn_r$';
984
1000
  var DynProtoDefaultOptions = '_dfOpts';
985
1001
  var UnknownValue = '_unknown_';
986
1002
  var str__Proto = "__proto__";
@@ -1063,6 +1079,25 @@ function _hasVisited(values, value) {
1063
1079
  }
1064
1080
  return false;
1065
1081
  }
1082
+ function _getBaseProtoFuncs(classProto) {
1083
+ if (objHasOwnProperty(classProto, DynBaseProtoFuncs)) {
1084
+ return classProto[DynBaseProtoFuncs];
1085
+ }
1086
+ var baseFuncSources = objCreate(null);
1087
+ var baseProto = _getObjProto$1(classProto);
1088
+ var visited = [];
1089
+ while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
1090
+ _forEachProp(baseProto, function (name) {
1091
+ if (!baseFuncSources[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {
1092
+ baseFuncSources[name] = baseProto;
1093
+ }
1094
+ });
1095
+ visited.push(baseProto);
1096
+ baseProto = _getObjProto$1(baseProto);
1097
+ }
1098
+ classProto[DynBaseProtoFuncs] = baseFuncSources;
1099
+ return baseFuncSources;
1100
+ }
1066
1101
  function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
1067
1102
  function _instFuncProxy(target, funcHost, funcName) {
1068
1103
  var theFunc = funcHost[funcName];
@@ -1080,16 +1115,11 @@ function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
1080
1115
  _forEachProp(instFuncs, function (name) {
1081
1116
  baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
1082
1117
  });
1083
- var baseProto = _getObjProto$1(classProto);
1084
- var visited = [];
1085
- while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
1086
- _forEachProp(baseProto, function (name) {
1087
- if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {
1088
- baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
1089
- }
1090
- });
1091
- visited.push(baseProto);
1092
- baseProto = _getObjProto$1(baseProto);
1118
+ var baseFuncSources = _getBaseProtoFuncs(classProto);
1119
+ for (var name_2 in baseFuncSources) {
1120
+ if (!baseFuncs[name_2]) {
1121
+ baseFuncs[name_2] = _instFuncProxy(thisTarget, baseFuncSources[name_2], name_2);
1122
+ }
1093
1123
  }
1094
1124
  return baseFuncs;
1095
1125
  }
@@ -1103,16 +1133,18 @@ function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
1103
1133
  }
1104
1134
  if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
1105
1135
  var canAddInst = !objHasOwnProperty(target, funcName);
1106
- var objProto = _getObjProto$1(target);
1107
- var visited = [];
1108
- while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
1109
- var protoFunc = objProto[funcName];
1110
- if (protoFunc) {
1111
- canAddInst = (protoFunc === currentDynProtoProxy);
1112
- break;
1136
+ if (canAddInst) {
1137
+ var objProto = _getObjProto$1(target);
1138
+ var visited = [];
1139
+ while (objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
1140
+ var protoFunc = objProto[funcName];
1141
+ if (protoFunc) {
1142
+ canAddInst = (protoFunc === currentDynProtoProxy);
1143
+ break;
1144
+ }
1145
+ visited.push(objProto);
1146
+ objProto = _getObjProto$1(objProto);
1113
1147
  }
1114
- visited.push(objProto);
1115
- objProto = _getObjProto$1(objProto);
1116
1148
  }
1117
1149
  try {
1118
1150
  if (canAddInst) {
@@ -1139,25 +1171,34 @@ function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
1139
1171
  }
1140
1172
  function _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {
1141
1173
  function _createDynamicPrototype(proto, funcName) {
1174
+ var cacheKey = DynResolvedCachePrefix + className + "." + funcName;
1142
1175
  var dynProtoProxy = function () {
1143
- var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
1176
+ var instFuncTable = this[DynInstFuncTable];
1177
+ var instFunc = instFuncTable ? instFuncTable[cacheKey] : undefined;
1178
+ if (!instFunc) {
1179
+ instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
1180
+ if (instFuncTable) {
1181
+ instFuncTable[cacheKey] = instFunc;
1182
+ }
1183
+ }
1144
1184
  return instFunc.apply(this, arguments);
1145
1185
  };
1146
1186
  dynProtoProxy[DynProxyTag] = 1;
1147
1187
  return dynProtoProxy;
1148
1188
  }
1149
1189
  if (!_isObjectOrArrayPrototype(proto)) {
1150
- var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || objCreate(null);
1151
- if (!_isObjectOrArrayPrototype(instFuncTable)) {
1152
- var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || objCreate(null));
1153
- if (instFuncTable[DynAllowInstChkTag] !== false) {
1154
- instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
1190
+ var instFuncTable_1 = target[DynInstFuncTable] = target[DynInstFuncTable] || objCreate(null);
1191
+ if (!_isObjectOrArrayPrototype(instFuncTable_1)) {
1192
+ var instFuncs_1 = instFuncTable_1[className] = (instFuncTable_1[className] || objCreate(null));
1193
+ if (instFuncTable_1[DynAllowInstChkTag] !== false) {
1194
+ instFuncTable_1[DynAllowInstChkTag] = !!setInstanceFunc;
1155
1195
  }
1156
1196
  if (!_isObjectOrArrayPrototype(instFuncs_1)) {
1157
1197
  _forEachProp(target, function (name) {
1158
1198
  if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
1159
1199
  instFuncs_1[name] = target[name];
1160
1200
  delete target[name];
1201
+ delete instFuncTable_1[DynResolvedCachePrefix + className + "." + name];
1161
1202
  if (!objHasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
1162
1203
  proto[name] = _createDynamicPrototype(proto, name);
1163
1204
  }
@@ -1786,7 +1827,7 @@ function newId(maxLength) {
1786
1827
  return result;
1787
1828
  }
1788
1829
 
1789
- var version = '3.4.2-nightly3.2605-06';
1830
+ var version = "3.4.2-nightly3.2605-11";
1790
1831
  var instanceName = "." + newId(6);
1791
1832
  var _dataUid = 0;
1792
1833
  function _canAcceptData(target) {
@@ -6448,7 +6489,7 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
6448
6489
  });
6449
6490
  return _this;
6450
6491
  }
6451
- AnalyticsPlugin.Version = '3.4.2-nightly3.2605-06';
6492
+ AnalyticsPlugin.Version = '3.4.2-nightly3.2605-11';
6452
6493
  return AnalyticsPlugin;
6453
6494
  }(BaseTelemetryPlugin));
6454
6495