@microsoft/applicationinsights-offlinechannel-js 0.3.3 → 0.3.4-nightly3.2409-17

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 - Offline Channel, 0.3.3
2
+ * Application Insights JavaScript SDK - Offline Channel, 0.3.4-nightly3.2409-17
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -8,7 +8,7 @@
8
8
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.Microsoft = global.Microsoft || {}, global.Microsoft.ApplicationInsights = global.Microsoft.ApplicationInsights || {})));
9
9
  })(this, (function (exports) { 'use strict';
10
10
 
11
- /*! https://github.com/nevware21/ts-utils v0.11.3 */
11
+ /*! https://github.com/nevware21/ts-utils v0.11.4 */
12
12
  /*#__NO_SIDE_EFFECTS__*/
13
13
  function _pureAssign(func1, func2) {
14
14
  return func1 || func2;
@@ -61,6 +61,10 @@
61
61
  return typeof value === UNDEFINED || value === UNDEFINED;
62
62
  }
63
63
  /*#__NO_SIDE_EFFECTS__*/
64
+ function isStrictUndefined(arg) {
65
+ return !isDefined(arg);
66
+ }
67
+ /*#__NO_SIDE_EFFECTS__*/
64
68
  function isNullOrUndefined(value) {
65
69
  return value === NULL_VALUE || isUndefined(value);
66
70
  }
@@ -131,7 +135,7 @@
131
135
  }
132
136
  }
133
137
  objForEachKey(value, function (key, value) {
134
- prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;
138
+ prop[propMap[key]] = isStrictUndefined(value) ? prop[propMap[key]] : value;
135
139
  });
136
140
  return prop;
137
141
  }
@@ -166,7 +170,7 @@
166
170
  }
167
171
  try {
168
172
  propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
169
- propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
173
+ propertyValueDump = (propertyValueDump ? propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ") : NULL_VALUE) || asString(object);
170
174
  }
171
175
  catch (e) {
172
176
  propertyValueDump = " - " + dumpObj(e, format);
@@ -250,9 +254,9 @@
250
254
  var _unwrapFunction = ( _unwrapFunctionWithPoly);
251
255
  /*#__NO_SIDE_EFFECTS__*/
252
256
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
253
- var clsFn = clsProto && clsProto[funcName];
257
+ var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
254
258
  return function (thisArg) {
255
- var theFunc = (thisArg && thisArg[funcName]) || clsFn;
259
+ var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;
256
260
  if (theFunc || polyFunc) {
257
261
  var theArgs = arguments;
258
262
  return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
@@ -345,24 +349,37 @@
345
349
  var cachedValue;
346
350
  return function () {
347
351
  !_globalLazyTestHooks && _initTestHooks();
348
- (!cachedValue || _globalLazyTestHooks.lzy) && (cachedValue = createCachedValue(safe(getFn, theArgs).v));
352
+ if (!cachedValue || _globalLazyTestHooks.lzy) {
353
+ cachedValue = createCachedValue(safe(getFn, theArgs).v);
354
+ }
349
355
  return cachedValue.v;
350
356
  };
351
357
  }
352
- /*#__NO_SIDE_EFFECTS__*/
353
358
  function getGlobal(useCached) {
354
359
  !_globalLazyTestHooks && _initTestHooks();
355
- (!_cachedGlobal || useCached === false || _globalLazyTestHooks.lzy) && (_cachedGlobal = createCachedValue(safe(_getGlobalValue).v || NULL_VALUE));
360
+ if (!_cachedGlobal || useCached === false || _globalLazyTestHooks.lzy) {
361
+ _cachedGlobal = createCachedValue(safe(_getGlobalValue).v || NULL_VALUE);
362
+ }
356
363
  return _cachedGlobal.v;
357
364
  }
358
365
  /*#__NO_SIDE_EFFECTS__*/
359
366
  function getInst(name, useCached) {
360
- var gbl = (!_cachedGlobal || useCached === false) ? getGlobal(useCached) : _cachedGlobal.v;
367
+ var gbl;
368
+ if (!_cachedGlobal || useCached === false) {
369
+ gbl = getGlobal(useCached);
370
+ }
371
+ else {
372
+ gbl = _cachedGlobal.v;
373
+ }
361
374
  if (gbl && gbl[name]) {
362
375
  return gbl[name];
363
376
  }
364
377
  if (name === WINDOW) {
365
- return getWindow();
378
+ try {
379
+ return window;
380
+ }
381
+ catch (e) {
382
+ }
366
383
  }
367
384
  return NULL_VALUE;
368
385
  }
@@ -432,7 +449,7 @@
432
449
  if (iter) {
433
450
  if (!isIterator(iter)) {
434
451
  !_iterSymbol$1 && (_iterSymbol$1 = createCachedValue(getKnownSymbol(3 )));
435
- iter = iter[_iterSymbol$1.v] ? iter[_iterSymbol$1.v]() : null;
452
+ iter = iter[_iterSymbol$1.v] ? iter[_iterSymbol$1.v]() : NULL_VALUE;
436
453
  }
437
454
  if (isIterator(iter)) {
438
455
  var err = UNDEF_VALUE;
@@ -501,7 +518,7 @@
501
518
  }
502
519
  var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
503
520
  function arrSlice(theArray, start, end) {
504
- return ((theArray && theArray["slice"]) || ArrSlice).apply(theArray, ArrSlice[CALL](arguments, 1));
521
+ return ((theArray ? theArray["slice"] : NULL_VALUE) || ArrSlice).apply(theArray, ArrSlice[CALL](arguments, 1));
505
522
  }
506
523
  var objCreate = ( /* #__PURE__*/_pureAssign(( /* #__PURE__*/_pureRef(ObjClass$1, "create")), polyObjCreate));
507
524
  /*#__NO_SIDE_EFFECTS__*/
@@ -613,7 +630,7 @@
613
630
  if (objHasOwnProperty(proto, CONSTRUCTOR)) {
614
631
  proto = proto[CONSTRUCTOR];
615
632
  }
616
- result = proto && typeof proto === FUNCTION && _fnToString[CALL](proto) === _objCtrFnString;
633
+ result = !!(proto && typeof proto === FUNCTION && _fnToString[CALL](proto) === _objCtrFnString);
617
634
  }
618
635
  }
619
636
  catch (ex) {
@@ -799,6 +816,8 @@
799
816
  var strShimPrototype = "prototype";
800
817
  var ObjClass = Object;
801
818
 
819
+ (getGlobal() || {})["Symbol"];
820
+ (getGlobal() || {})["Reflect"];
802
821
  var strHasOwnProperty = "hasOwnProperty";
803
822
  var extendStaticsFn = function (d, b) {
804
823
  extendStaticsFn = ObjClass["setPrototypeOf"] ||
@@ -1980,7 +1999,7 @@
1980
1999
  return result;
1981
2000
  }
1982
2001
 
1983
- var version$1 = '3.3.3';
2002
+ var version$1 = '3.3.4-nightly3.2409-17';
1984
2003
  var instanceName = "." + newId(6);
1985
2004
  var _dataUid = 0;
1986
2005
  function _canAcceptData(target) {
@@ -6349,7 +6368,7 @@
6349
6368
  return Sender;
6350
6369
  }());
6351
6370
 
6352
- var version = '0.3.3';
6371
+ var version = '0.3.4-nightly3.2409-17';
6353
6372
  var DefaultOfflineIdentifier = "OfflineChannel";
6354
6373
  var DefaultBatchInterval = 15000;
6355
6374
  var DefaultInMemoMaxTime = 15000;