@microsoft/applicationinsights-common 3.0.7-nightly3.2312-03 → 3.0.7
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.
- package/browser/es5/applicationinsights-common.cjs.js +14 -358
- package/browser/es5/applicationinsights-common.cjs.js.map +1 -1
- package/browser/es5/applicationinsights-common.cjs.min.js +2 -2
- package/browser/es5/applicationinsights-common.cjs.min.js.map +1 -1
- package/browser/es5/applicationinsights-common.gbl.js +16 -360
- package/browser/es5/applicationinsights-common.gbl.js.map +1 -1
- package/browser/es5/applicationinsights-common.gbl.min.js +2 -2
- package/browser/es5/applicationinsights-common.gbl.min.js.map +1 -1
- package/browser/es5/applicationinsights-common.integrity.json +25 -25
- package/browser/es5/applicationinsights-common.js +16 -360
- package/browser/es5/applicationinsights-common.js.map +1 -1
- package/browser/es5/applicationinsights-common.min.js +2 -2
- package/browser/es5/applicationinsights-common.min.js.map +1 -1
- package/dist/es5/applicationinsights-common.js +14 -358
- package/dist/es5/applicationinsights-common.js.map +1 -1
- package/dist/es5/applicationinsights-common.min.js +2 -2
- package/dist/es5/applicationinsights-common.min.js.map +1 -1
- package/dist-es5/ConnectionStringParser.js +1 -1
- package/dist-es5/Constants.js +1 -1
- package/dist-es5/DomHelperFuncs.js +1 -1
- package/dist-es5/Enums.js +1 -1
- package/dist-es5/HelperFuncs.js +1 -1
- package/dist-es5/Interfaces/ConnectionString.js +1 -1
- package/dist-es5/Interfaces/Context/IApplication.js +1 -1
- package/dist-es5/Interfaces/Context/IDevice.js +1 -1
- package/dist-es5/Interfaces/Context/IInternal.js +1 -1
- package/dist-es5/Interfaces/Context/ILocation.js +1 -1
- package/dist-es5/Interfaces/Context/IOperatingSystem.js +1 -1
- package/dist-es5/Interfaces/Context/ISample.js +1 -1
- package/dist-es5/Interfaces/Context/ISession.js +1 -1
- package/dist-es5/Interfaces/Context/ISessionManager.js +1 -1
- package/dist-es5/Interfaces/Context/ITelemetryTrace.js +1 -1
- package/dist-es5/Interfaces/Context/IUser.js +1 -1
- package/dist-es5/Interfaces/Context/IWeb.js +1 -1
- package/dist-es5/Interfaces/Contracts/AvailabilityData.js +1 -1
- package/dist-es5/Interfaces/Contracts/ContextTagKeys.js +1 -1
- package/dist-es5/Interfaces/Contracts/DataPointType.js +1 -1
- package/dist-es5/Interfaces/Contracts/DependencyKind.js +1 -1
- package/dist-es5/Interfaces/Contracts/DependencySourceType.js +1 -1
- package/dist-es5/Interfaces/Contracts/IBase.js +1 -1
- package/dist-es5/Interfaces/Contracts/IData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IDataPoint.js +1 -1
- package/dist-es5/Interfaces/Contracts/IDomain.js +1 -1
- package/dist-es5/Interfaces/Contracts/IEnvelope.js +1 -1
- package/dist-es5/Interfaces/Contracts/IEventData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IExceptionData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IExceptionDetails.js +1 -1
- package/dist-es5/Interfaces/Contracts/IMessageData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IMetricData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IPageViewData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IPageViewPerfData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IStackFrame.js +1 -1
- package/dist-es5/Interfaces/Contracts/RequestData.js +1 -1
- package/dist-es5/Interfaces/Contracts/SeverityLevel.js +1 -1
- package/dist-es5/Interfaces/IAppInsights.js +1 -1
- package/dist-es5/Interfaces/IConfig.js +1 -1
- package/dist-es5/Interfaces/ICorrelationConfig.js +1 -1
- package/dist-es5/Interfaces/IDependencyTelemetry.js +1 -1
- package/dist-es5/Interfaces/IEventTelemetry.js +1 -1
- package/dist-es5/Interfaces/IExceptionTelemetry.js +1 -1
- package/dist-es5/Interfaces/IMetricTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPageViewTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPartC.js +1 -1
- package/dist-es5/Interfaces/IPropertiesPlugin.js +1 -1
- package/dist-es5/Interfaces/IRequestContext.js +1 -1
- package/dist-es5/Interfaces/IStorageBuffer.js +1 -1
- package/dist-es5/Interfaces/ITelemetryContext.js +1 -1
- package/dist-es5/Interfaces/IThrottleMgr.js +1 -1
- package/dist-es5/Interfaces/ITraceTelemetry.js +1 -1
- package/dist-es5/Interfaces/PartAExtensions.js +1 -1
- package/dist-es5/Interfaces/Telemetry/IEnvelope.js +1 -1
- package/dist-es5/Interfaces/Telemetry/ISerializable.js +1 -1
- package/dist-es5/RequestResponseHeaders.js +1 -1
- package/dist-es5/StorageHelperFuncs.js +3 -3
- package/dist-es5/StorageHelperFuncs.js.map +1 -1
- package/dist-es5/Telemetry/Common/Data.js +1 -1
- package/dist-es5/Telemetry/Common/DataPoint.js +1 -1
- package/dist-es5/Telemetry/Common/DataSanitizer.js +1 -1
- package/dist-es5/Telemetry/Common/Envelope.js +1 -1
- package/dist-es5/Telemetry/Event.js +1 -1
- package/dist-es5/Telemetry/Exception.js +4 -4
- package/dist-es5/Telemetry/Exception.js.map +1 -1
- package/dist-es5/Telemetry/Metric.js +1 -1
- package/dist-es5/Telemetry/PageView.js +1 -1
- package/dist-es5/Telemetry/PageViewPerformance.js +1 -1
- package/dist-es5/Telemetry/RemoteDependencyData.js +1 -1
- package/dist-es5/Telemetry/Trace.js +1 -1
- package/dist-es5/TelemetryItemCreator.js +1 -1
- package/dist-es5/ThrottleMgr.js +3 -3
- package/dist-es5/ThrottleMgr.js.map +1 -1
- package/dist-es5/UrlHelperFuncs.js +1 -1
- package/dist-es5/Util.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -2
- package/dist-es5/__DynamicConstants.js.map +1 -1
- package/dist-es5/applicationinsights-common.js +1 -2
- package/dist-es5/applicationinsights-common.js.map +1 -1
- package/package.json +63 -66
- package/types/applicationinsights-common.d.ts +1 -47
- package/types/applicationinsights-common.namespaced.d.ts +1 -47
- package/dist-es5/Offline.js +0 -138
- package/dist-es5/Offline.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 3.0.7
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 3.0.7
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
6
6
|
var undef = "undefined";
|
|
7
|
-
var nsKey, key, nm, theExports = {}, modName = "
|
|
8
|
-
var mods={}, modDetail=mods[modName]={}, ver="3.0.7
|
|
7
|
+
var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_common_3_0_7", msMod="__ms$mod__";
|
|
8
|
+
var mods={}, modDetail=mods[modName]={}, ver="3.0.7";
|
|
9
9
|
var baseNs=global, nsKey="Microsoft", baseNs=baseNs[nsKey]=(baseNs[nsKey]||{});
|
|
10
10
|
// Versioned namespace "Microsoft.ApplicationInsights3"
|
|
11
11
|
var exportNs=baseNs, nsKey="ApplicationInsights3", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
|
|
@@ -707,7 +707,7 @@ var _DYN_SET_DF = "setDf";
|
|
|
707
707
|
var _DYN_WATCH = "watch";
|
|
708
708
|
var _DYN_LOGGER = "logger";
|
|
709
709
|
var _DYN_APPLY = "apply";
|
|
710
|
-
var _DYN_PUSH
|
|
710
|
+
var _DYN_PUSH = "push";
|
|
711
711
|
var _DYN_SPLICE = "splice";
|
|
712
712
|
var _DYN_HDLR = "hdlr";
|
|
713
713
|
var _DYN_CANCEL = "cancel";
|
|
@@ -720,11 +720,8 @@ var _DYN_MESSAGE$1 = "message";
|
|
|
720
720
|
var _DYN_DIAG_LOG = "diagLog";
|
|
721
721
|
var _DYN_USER_AGENT = "userAgent";
|
|
722
722
|
var _DYN_SPLIT$1 = "split";
|
|
723
|
-
var _DYN_NODE_TYPE = "nodeType";
|
|
724
723
|
var _DYN_REPLACE = "replace";
|
|
725
724
|
var _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
|
|
726
|
-
var _DYN_TYPE = "type";
|
|
727
|
-
var _DYN_HANDLER = "handler";
|
|
728
725
|
var _DYN_TRACE_ID = "traceId";
|
|
729
726
|
var _DYN_SPAN_ID = "spanId";
|
|
730
727
|
var _DYN_TRACE_FLAGS = "traceFlags";
|
|
@@ -1241,62 +1238,13 @@ function newId(maxLength) {
|
|
|
1241
1238
|
return result;
|
|
1242
1239
|
}
|
|
1243
1240
|
|
|
1244
|
-
var version = '3.0.7
|
|
1241
|
+
var version = '3.0.7';
|
|
1245
1242
|
var instanceName = "." + newId(6);
|
|
1246
1243
|
var _dataUid = 0;
|
|
1247
|
-
function _canAcceptData(target) {
|
|
1248
|
-
return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
|
|
1249
|
-
}
|
|
1250
|
-
function _getCache(data, target) {
|
|
1251
|
-
var theCache = target[data.id];
|
|
1252
|
-
if (!theCache) {
|
|
1253
|
-
theCache = {};
|
|
1254
|
-
try {
|
|
1255
|
-
if (_canAcceptData(target)) {
|
|
1256
|
-
objDefine(target, data.id, {
|
|
1257
|
-
e: false,
|
|
1258
|
-
v: theCache
|
|
1259
|
-
});
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
catch (e) {
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
return theCache;
|
|
1266
|
-
}
|
|
1267
1244
|
function createUniqueNamespace(name, includeVersion) {
|
|
1268
1245
|
if (includeVersion === void 0) { includeVersion = false; }
|
|
1269
1246
|
return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : STR_EMPTY) + instanceName);
|
|
1270
1247
|
}
|
|
1271
|
-
function createElmNodeData(name) {
|
|
1272
|
-
var data = {
|
|
1273
|
-
id: createUniqueNamespace("_aiData-" + (name || STR_EMPTY) + "." + version),
|
|
1274
|
-
accept: function (target) {
|
|
1275
|
-
return _canAcceptData(target);
|
|
1276
|
-
},
|
|
1277
|
-
get: function (target, name, defValue, addDefault) {
|
|
1278
|
-
var theCache = target[data.id];
|
|
1279
|
-
if (!theCache) {
|
|
1280
|
-
if (addDefault) {
|
|
1281
|
-
theCache = _getCache(data, target);
|
|
1282
|
-
theCache[normalizeJsName(name)] = defValue;
|
|
1283
|
-
}
|
|
1284
|
-
return defValue;
|
|
1285
|
-
}
|
|
1286
|
-
return theCache[normalizeJsName(name)];
|
|
1287
|
-
},
|
|
1288
|
-
kill: function (target, name) {
|
|
1289
|
-
if (target && target[name]) {
|
|
1290
|
-
try {
|
|
1291
|
-
delete target[name];
|
|
1292
|
-
}
|
|
1293
|
-
catch (e) {
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
};
|
|
1298
|
-
return data;
|
|
1299
|
-
}
|
|
1300
1248
|
|
|
1301
1249
|
function _isConfigDefaults(value) {
|
|
1302
1250
|
return (value && isObject(value) && (value.isVal || value.fb || objHasOwn(value, "v") || objHasOwn(value, "mrg") || objHasOwn(value, "ref") || value.set));
|
|
@@ -1519,7 +1467,7 @@ function _createDynamicProperty(state, theConfig, name, value) {
|
|
|
1519
1467
|
trk: function (handler) {
|
|
1520
1468
|
if (handler && handler.fn) {
|
|
1521
1469
|
if (arrIndexOf(detail.h, handler) === -1) {
|
|
1522
|
-
detail.h[_DYN_PUSH
|
|
1470
|
+
detail.h[_DYN_PUSH ](handler);
|
|
1523
1471
|
}
|
|
1524
1472
|
state.trk(handler, detail);
|
|
1525
1473
|
}
|
|
@@ -1731,7 +1679,7 @@ function _createState(cfgHandler) {
|
|
|
1731
1679
|
_useHandler(handler, handler.fn);
|
|
1732
1680
|
}
|
|
1733
1681
|
catch (e) {
|
|
1734
|
-
watcherFailures_1[_DYN_PUSH
|
|
1682
|
+
watcherFailures_1[_DYN_PUSH ](e);
|
|
1735
1683
|
}
|
|
1736
1684
|
}
|
|
1737
1685
|
}
|
|
@@ -1741,7 +1689,7 @@ function _createState(cfgHandler) {
|
|
|
1741
1689
|
_notifyWatchers();
|
|
1742
1690
|
}
|
|
1743
1691
|
catch (e) {
|
|
1744
|
-
watcherFailures_1[_DYN_PUSH
|
|
1692
|
+
watcherFailures_1[_DYN_PUSH ](e);
|
|
1745
1693
|
}
|
|
1746
1694
|
}
|
|
1747
1695
|
if (watcherFailures_1[_DYN_LENGTH$1 ] > 0) {
|
|
@@ -1763,7 +1711,7 @@ function _createState(cfgHandler) {
|
|
|
1763
1711
|
for (var idx = 0; idx < detail.h[_DYN_LENGTH$1 ]; idx++) {
|
|
1764
1712
|
var handler = detail.h[idx];
|
|
1765
1713
|
if (handler && arrIndexOf(_waitingHandlers, handler) === -1) {
|
|
1766
|
-
_waitingHandlers[_DYN_PUSH
|
|
1714
|
+
_waitingHandlers[_DYN_PUSH ](handler);
|
|
1767
1715
|
}
|
|
1768
1716
|
}
|
|
1769
1717
|
}
|
|
@@ -1772,7 +1720,7 @@ function _createState(cfgHandler) {
|
|
|
1772
1720
|
if (handler) {
|
|
1773
1721
|
var details = handler[dynamicPropertyDetail] = handler[dynamicPropertyDetail] || [];
|
|
1774
1722
|
if (arrIndexOf(details, detail) === -1) {
|
|
1775
|
-
details[_DYN_PUSH
|
|
1723
|
+
details[_DYN_PUSH ](detail);
|
|
1776
1724
|
}
|
|
1777
1725
|
}
|
|
1778
1726
|
}
|
|
@@ -2060,14 +2008,14 @@ var DiagnosticLogger = /** @class */ (function () {
|
|
|
2060
2008
|
}
|
|
2061
2009
|
if (logMessage) {
|
|
2062
2010
|
if (severity <= _loggingLevelTelemetry) {
|
|
2063
|
-
_self.queue[_DYN_PUSH
|
|
2011
|
+
_self.queue[_DYN_PUSH ](message);
|
|
2064
2012
|
_messageCount++;
|
|
2065
2013
|
_debugExtMsg((severity === 1 ? "error" : "warn"), message);
|
|
2066
2014
|
}
|
|
2067
2015
|
if (_messageCount === _maxInternalMessageLimit) {
|
|
2068
2016
|
var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
|
|
2069
2017
|
var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
|
|
2070
|
-
_self.queue[_DYN_PUSH
|
|
2018
|
+
_self.queue[_DYN_PUSH ](throttleMessage);
|
|
2071
2019
|
if (severity === 1 ) {
|
|
2072
2020
|
_self.errorToConsole(throttleLimitMessage);
|
|
2073
2021
|
}
|
|
@@ -2239,180 +2187,6 @@ function findW3cTraceParent(selectIdx) {
|
|
|
2239
2187
|
return traceParent;
|
|
2240
2188
|
}
|
|
2241
2189
|
|
|
2242
|
-
var strOnPrefix = "on";
|
|
2243
|
-
var strAttachEvent = "attachEvent";
|
|
2244
|
-
var strAddEventHelper = "addEventListener";
|
|
2245
|
-
var strDetachEvent = "detachEvent";
|
|
2246
|
-
var strRemoveEventListener = "removeEventListener";
|
|
2247
|
-
var strEvents = "events";
|
|
2248
|
-
createUniqueNamespace("aiEvtPageHide");
|
|
2249
|
-
createUniqueNamespace("aiEvtPageShow");
|
|
2250
|
-
var rRemoveEmptyNs = /\.[\.]+/g;
|
|
2251
|
-
var rRemoveTrailingEmptyNs = /[\.]+$/;
|
|
2252
|
-
var _guid = 1;
|
|
2253
|
-
var elmNodeData = createElmNodeData("events");
|
|
2254
|
-
var eventNamespace = /^([^.]*)(?:\.(.+)|)/;
|
|
2255
|
-
function _normalizeNamespace(name) {
|
|
2256
|
-
if (name && name[_DYN_REPLACE ]) {
|
|
2257
|
-
return name[_DYN_REPLACE ](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g, STR_EMPTY);
|
|
2258
|
-
}
|
|
2259
|
-
return name;
|
|
2260
|
-
}
|
|
2261
|
-
function _getEvtNamespace(eventName, evtNamespace) {
|
|
2262
|
-
var _a;
|
|
2263
|
-
if (evtNamespace) {
|
|
2264
|
-
var theNamespace_1 = STR_EMPTY;
|
|
2265
|
-
if (isArray(evtNamespace)) {
|
|
2266
|
-
theNamespace_1 = STR_EMPTY;
|
|
2267
|
-
arrForEach(evtNamespace, function (name) {
|
|
2268
|
-
name = _normalizeNamespace(name);
|
|
2269
|
-
if (name) {
|
|
2270
|
-
if (name[0] !== ".") {
|
|
2271
|
-
name = "." + name;
|
|
2272
|
-
}
|
|
2273
|
-
theNamespace_1 += name;
|
|
2274
|
-
}
|
|
2275
|
-
});
|
|
2276
|
-
}
|
|
2277
|
-
else {
|
|
2278
|
-
theNamespace_1 = _normalizeNamespace(evtNamespace);
|
|
2279
|
-
}
|
|
2280
|
-
if (theNamespace_1) {
|
|
2281
|
-
if (theNamespace_1[0] !== ".") {
|
|
2282
|
-
theNamespace_1 = "." + theNamespace_1;
|
|
2283
|
-
}
|
|
2284
|
-
eventName = (eventName || STR_EMPTY) + theNamespace_1;
|
|
2285
|
-
}
|
|
2286
|
-
}
|
|
2287
|
-
var parsedEvent = (eventNamespace.exec(eventName || STR_EMPTY) || []);
|
|
2288
|
-
return _a = {},
|
|
2289
|
-
_a[_DYN_TYPE ] = parsedEvent[1],
|
|
2290
|
-
_a.ns = ((parsedEvent[2] || STR_EMPTY).replace(rRemoveEmptyNs, ".").replace(rRemoveTrailingEmptyNs, STR_EMPTY)[_DYN_SPLIT$1 ](".").sort()).join("."),
|
|
2291
|
-
_a;
|
|
2292
|
-
}
|
|
2293
|
-
function _getRegisteredEvents(target, evtName, addDefault) {
|
|
2294
|
-
if (addDefault === void 0) { addDefault = true; }
|
|
2295
|
-
var aiEvts = elmNodeData.get(target, strEvents, {}, addDefault);
|
|
2296
|
-
var registeredEvents = aiEvts[evtName];
|
|
2297
|
-
if (!registeredEvents) {
|
|
2298
|
-
registeredEvents = aiEvts[evtName] = [];
|
|
2299
|
-
}
|
|
2300
|
-
return registeredEvents;
|
|
2301
|
-
}
|
|
2302
|
-
function _doDetach(obj, evtName, handlerRef, useCapture) {
|
|
2303
|
-
if (obj && evtName && evtName[_DYN_TYPE ]) {
|
|
2304
|
-
if (obj[strRemoveEventListener]) {
|
|
2305
|
-
obj[strRemoveEventListener](evtName[_DYN_TYPE ], handlerRef, useCapture);
|
|
2306
|
-
}
|
|
2307
|
-
else if (obj[strDetachEvent]) {
|
|
2308
|
-
obj[strDetachEvent](strOnPrefix + evtName[_DYN_TYPE ], handlerRef);
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
|
-
}
|
|
2312
|
-
function _doAttach(obj, evtName, handlerRef, useCapture) {
|
|
2313
|
-
var result = false;
|
|
2314
|
-
if (obj && evtName && evtName[_DYN_TYPE ] && handlerRef) {
|
|
2315
|
-
if (obj[strAddEventHelper]) {
|
|
2316
|
-
obj[strAddEventHelper](evtName[_DYN_TYPE ], handlerRef, useCapture);
|
|
2317
|
-
result = true;
|
|
2318
|
-
}
|
|
2319
|
-
else if (obj[strAttachEvent]) {
|
|
2320
|
-
obj[strAttachEvent](strOnPrefix + evtName[_DYN_TYPE ], handlerRef);
|
|
2321
|
-
result = true;
|
|
2322
|
-
}
|
|
2323
|
-
}
|
|
2324
|
-
return result;
|
|
2325
|
-
}
|
|
2326
|
-
function _doUnregister(target, events, evtName, unRegFn) {
|
|
2327
|
-
var idx = events[_DYN_LENGTH$1 ];
|
|
2328
|
-
while (idx--) {
|
|
2329
|
-
var theEvent = events[idx];
|
|
2330
|
-
if (theEvent) {
|
|
2331
|
-
if (!evtName.ns || evtName.ns === theEvent.evtName.ns) {
|
|
2332
|
-
if (!unRegFn || unRegFn(theEvent)) {
|
|
2333
|
-
_doDetach(target, theEvent.evtName, theEvent[_DYN_HANDLER ], theEvent.capture);
|
|
2334
|
-
events[_DYN_SPLICE ](idx, 1);
|
|
2335
|
-
}
|
|
2336
|
-
}
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
}
|
|
2340
|
-
function _unregisterEvents(target, evtName, unRegFn) {
|
|
2341
|
-
if (evtName[_DYN_TYPE ]) {
|
|
2342
|
-
_doUnregister(target, _getRegisteredEvents(target, evtName[_DYN_TYPE ]), evtName, unRegFn);
|
|
2343
|
-
}
|
|
2344
|
-
else {
|
|
2345
|
-
var eventCache = elmNodeData.get(target, strEvents, {});
|
|
2346
|
-
objForEachKey(eventCache, function (evtType, events) {
|
|
2347
|
-
_doUnregister(target, events, evtName, unRegFn);
|
|
2348
|
-
});
|
|
2349
|
-
if (objKeys(eventCache)[_DYN_LENGTH$1 ] === 0) {
|
|
2350
|
-
elmNodeData.kill(target, strEvents);
|
|
2351
|
-
}
|
|
2352
|
-
}
|
|
2353
|
-
}
|
|
2354
|
-
function mergeEvtNamespace(theNamespace, namespaces) {
|
|
2355
|
-
var newNamespaces;
|
|
2356
|
-
if (namespaces) {
|
|
2357
|
-
if (isArray(namespaces)) {
|
|
2358
|
-
newNamespaces = [theNamespace].concat(namespaces);
|
|
2359
|
-
}
|
|
2360
|
-
else {
|
|
2361
|
-
newNamespaces = [theNamespace, namespaces];
|
|
2362
|
-
}
|
|
2363
|
-
newNamespaces = (_getEvtNamespace("xx", newNamespaces).ns)[_DYN_SPLIT$1 ](".");
|
|
2364
|
-
}
|
|
2365
|
-
else {
|
|
2366
|
-
newNamespaces = theNamespace;
|
|
2367
|
-
}
|
|
2368
|
-
return newNamespaces;
|
|
2369
|
-
}
|
|
2370
|
-
function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {
|
|
2371
|
-
var _a;
|
|
2372
|
-
if (useCapture === void 0) { useCapture = false; }
|
|
2373
|
-
var result = false;
|
|
2374
|
-
if (target) {
|
|
2375
|
-
try {
|
|
2376
|
-
var evtName = _getEvtNamespace(eventName, evtNamespace);
|
|
2377
|
-
result = _doAttach(target, evtName, handlerRef, useCapture);
|
|
2378
|
-
if (result && elmNodeData.accept(target)) {
|
|
2379
|
-
var registeredEvent = (_a = {
|
|
2380
|
-
guid: _guid++,
|
|
2381
|
-
evtName: evtName
|
|
2382
|
-
},
|
|
2383
|
-
_a[_DYN_HANDLER ] = handlerRef,
|
|
2384
|
-
_a.capture = useCapture,
|
|
2385
|
-
_a);
|
|
2386
|
-
_getRegisteredEvents(target, evtName.type)[_DYN_PUSH$1 ](registeredEvent);
|
|
2387
|
-
}
|
|
2388
|
-
}
|
|
2389
|
-
catch (e) {
|
|
2390
|
-
}
|
|
2391
|
-
}
|
|
2392
|
-
return result;
|
|
2393
|
-
}
|
|
2394
|
-
function eventOff(target, eventName, handlerRef, evtNamespace, useCapture) {
|
|
2395
|
-
if (useCapture === void 0) { useCapture = false; }
|
|
2396
|
-
if (target) {
|
|
2397
|
-
try {
|
|
2398
|
-
var evtName_1 = _getEvtNamespace(eventName, evtNamespace);
|
|
2399
|
-
var found_1 = false;
|
|
2400
|
-
_unregisterEvents(target, evtName_1, function (regEvent) {
|
|
2401
|
-
if ((evtName_1.ns && !handlerRef) || regEvent[_DYN_HANDLER ] === handlerRef) {
|
|
2402
|
-
found_1 = true;
|
|
2403
|
-
return true;
|
|
2404
|
-
}
|
|
2405
|
-
return false;
|
|
2406
|
-
});
|
|
2407
|
-
if (!found_1) {
|
|
2408
|
-
_doDetach(target, evtName_1, handlerRef, useCapture);
|
|
2409
|
-
}
|
|
2410
|
-
}
|
|
2411
|
-
catch (e) {
|
|
2412
|
-
}
|
|
2413
|
-
}
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
2190
|
var DisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|
|
2417
2191
|
var SampleRate = "sampleRate";
|
|
2418
2192
|
var ProcessLegacy = "ProcessLegacy";
|
|
@@ -2439,7 +2213,6 @@ var _DYN_LENGTH = "length";
|
|
|
2439
2213
|
var _DYN_TO_LOWER_CASE = "toLowerCase";
|
|
2440
2214
|
var _DYN_INGESTIONENDPOINT = "ingestionendpoint";
|
|
2441
2215
|
var _DYN_TO_STRING = "toString";
|
|
2442
|
-
var _DYN_PUSH = "push";
|
|
2443
2216
|
var _DYN_REMOVE_ITEM = "removeItem";
|
|
2444
2217
|
var _DYN_NAME = "name";
|
|
2445
2218
|
var _DYN_MESSAGE = "message";
|
|
@@ -2931,7 +2704,7 @@ function utlGetSessionStorageKeys() {
|
|
|
2931
2704
|
var keys = [];
|
|
2932
2705
|
if (utlCanUseSessionStorage()) {
|
|
2933
2706
|
objForEachKey(getInst("sessionStorage"), function (key) {
|
|
2934
|
-
keys
|
|
2707
|
+
keys.push(key);
|
|
2935
2708
|
});
|
|
2936
2709
|
}
|
|
2937
2710
|
return keys;
|
|
@@ -3091,7 +2864,7 @@ var ThrottleMgr = /** @class */ (function () {
|
|
|
3091
2864
|
else {
|
|
3092
2865
|
if (!!saveUnsentMsg) {
|
|
3093
2866
|
var queue = _getQueueByKey(msgID);
|
|
3094
|
-
queue
|
|
2867
|
+
queue.push({
|
|
3095
2868
|
msgID: msgID,
|
|
3096
2869
|
message: message,
|
|
3097
2870
|
severity: severity
|
|
@@ -3470,7 +3243,7 @@ function _getOperaStack(errorMessage) {
|
|
|
3470
3243
|
entry += "@" + lines[lp + 1];
|
|
3471
3244
|
lp++;
|
|
3472
3245
|
}
|
|
3473
|
-
stack
|
|
3246
|
+
stack.push(entry);
|
|
3474
3247
|
}
|
|
3475
3248
|
return {
|
|
3476
3249
|
src: errorMessage,
|
|
@@ -3553,7 +3326,7 @@ function _parseStack(stack) {
|
|
|
3553
3326
|
if (_StackFrame.regex.test(theFrame)) {
|
|
3554
3327
|
var parsedFrame = new _StackFrame(theFrame, level_1++);
|
|
3555
3328
|
totalSizeInBytes_1 += parsedFrame[_DYN_SIZE_IN_BYTES ];
|
|
3556
|
-
parsedStack
|
|
3329
|
+
parsedStack.push(parsedFrame);
|
|
3557
3330
|
}
|
|
3558
3331
|
});
|
|
3559
3332
|
var exceptionParsedStackThreshold = 32 * 1024;
|
|
@@ -4241,122 +4014,6 @@ function createDomEvent(eventName) {
|
|
|
4241
4014
|
return event;
|
|
4242
4015
|
}
|
|
4243
4016
|
|
|
4244
|
-
function _disableEvents(target, evtNamespace) {
|
|
4245
|
-
eventOff(target, null, null, evtNamespace);
|
|
4246
|
-
}
|
|
4247
|
-
function createOfflineListener(parentEvtNamespace) {
|
|
4248
|
-
var _document = getDocument();
|
|
4249
|
-
var _navigator = getNavigator();
|
|
4250
|
-
var _isListening = false;
|
|
4251
|
-
var listenerList = [];
|
|
4252
|
-
var rState = 1 ;
|
|
4253
|
-
if (_navigator && !isNullOrUndefined(_navigator.onLine) && !_navigator.onLine) {
|
|
4254
|
-
rState = 2 ;
|
|
4255
|
-
}
|
|
4256
|
-
var uState = 0 ;
|
|
4257
|
-
var _currentState = calCurrentState();
|
|
4258
|
-
var _evtNamespace = mergeEvtNamespace(createUniqueNamespace("OfflineListener"), parentEvtNamespace);
|
|
4259
|
-
try {
|
|
4260
|
-
if (_enableEvents(getWindow())) {
|
|
4261
|
-
_isListening = true;
|
|
4262
|
-
}
|
|
4263
|
-
if (_document) {
|
|
4264
|
-
var target = _document.body || _document;
|
|
4265
|
-
if (target.ononline) {
|
|
4266
|
-
if (_enableEvents(target)) {
|
|
4267
|
-
_isListening = true;
|
|
4268
|
-
}
|
|
4269
|
-
}
|
|
4270
|
-
}
|
|
4271
|
-
}
|
|
4272
|
-
catch (e) {
|
|
4273
|
-
_isListening = false;
|
|
4274
|
-
}
|
|
4275
|
-
function _enableEvents(target) {
|
|
4276
|
-
var enabled = false;
|
|
4277
|
-
if (target) {
|
|
4278
|
-
enabled = eventOn(target, "online", _setOnline, _evtNamespace);
|
|
4279
|
-
if (enabled) {
|
|
4280
|
-
eventOn(target, "offline", _setOffline, _evtNamespace);
|
|
4281
|
-
}
|
|
4282
|
-
}
|
|
4283
|
-
return enabled;
|
|
4284
|
-
}
|
|
4285
|
-
function _isOnline() {
|
|
4286
|
-
return _currentState;
|
|
4287
|
-
}
|
|
4288
|
-
function calCurrentState() {
|
|
4289
|
-
if (uState === 2 || rState === 2 ) {
|
|
4290
|
-
return false;
|
|
4291
|
-
}
|
|
4292
|
-
return true;
|
|
4293
|
-
}
|
|
4294
|
-
function listnerNoticeCheck() {
|
|
4295
|
-
var newState = calCurrentState();
|
|
4296
|
-
if (_currentState !== newState) {
|
|
4297
|
-
_currentState = newState;
|
|
4298
|
-
arrForEach(listenerList, function (callback) {
|
|
4299
|
-
var offlineState = {
|
|
4300
|
-
isOnline: _currentState,
|
|
4301
|
-
rState: rState,
|
|
4302
|
-
uState: uState
|
|
4303
|
-
};
|
|
4304
|
-
try {
|
|
4305
|
-
callback(offlineState);
|
|
4306
|
-
}
|
|
4307
|
-
catch (e) {
|
|
4308
|
-
}
|
|
4309
|
-
});
|
|
4310
|
-
}
|
|
4311
|
-
}
|
|
4312
|
-
function setOnlineState(newState) {
|
|
4313
|
-
uState = newState;
|
|
4314
|
-
listnerNoticeCheck();
|
|
4315
|
-
}
|
|
4316
|
-
function _setOnline() {
|
|
4317
|
-
rState = 1 ;
|
|
4318
|
-
listnerNoticeCheck();
|
|
4319
|
-
}
|
|
4320
|
-
function _setOffline() {
|
|
4321
|
-
rState = 2 ;
|
|
4322
|
-
listnerNoticeCheck();
|
|
4323
|
-
}
|
|
4324
|
-
function _unload() {
|
|
4325
|
-
var win = getWindow();
|
|
4326
|
-
if (win && _isListening) {
|
|
4327
|
-
_disableEvents(win, _evtNamespace);
|
|
4328
|
-
if (_document) {
|
|
4329
|
-
var target = _document.body || _document;
|
|
4330
|
-
if (!isUndefined(target.ononline)) {
|
|
4331
|
-
_disableEvents(target, _evtNamespace);
|
|
4332
|
-
}
|
|
4333
|
-
}
|
|
4334
|
-
_isListening = false;
|
|
4335
|
-
}
|
|
4336
|
-
}
|
|
4337
|
-
function addListener(callback) {
|
|
4338
|
-
listenerList[_DYN_PUSH ](callback);
|
|
4339
|
-
return {
|
|
4340
|
-
rm: function () {
|
|
4341
|
-
var index = listenerList.indexOf(callback);
|
|
4342
|
-
if (index > -1) {
|
|
4343
|
-
return listenerList.splice(index, 1);
|
|
4344
|
-
}
|
|
4345
|
-
else {
|
|
4346
|
-
return;
|
|
4347
|
-
}
|
|
4348
|
-
}
|
|
4349
|
-
};
|
|
4350
|
-
}
|
|
4351
|
-
return {
|
|
4352
|
-
isOnline: _isOnline,
|
|
4353
|
-
isListening: function () { return _isListening; },
|
|
4354
|
-
unload: _unload,
|
|
4355
|
-
addListener: addListener,
|
|
4356
|
-
setOnlineState: setOnlineState
|
|
4357
|
-
};
|
|
4358
|
-
}
|
|
4359
|
-
|
|
4360
4017
|
var PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
|
|
4361
4018
|
var BreezeChannelIdentifier = "AppInsightsChannelPlugin";
|
|
4362
4019
|
var AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
|
|
@@ -4396,7 +4053,6 @@ exports.correlationIdGetPrefix = correlationIdGetPrefix;
|
|
|
4396
4053
|
exports.correlationIdSetPrefix = correlationIdSetPrefix;
|
|
4397
4054
|
exports.createDistributedTraceContextFromTrace = createDistributedTraceContextFromTrace;
|
|
4398
4055
|
exports.createDomEvent = createDomEvent;
|
|
4399
|
-
exports.createOfflineListener = createOfflineListener;
|
|
4400
4056
|
exports.createTelemetryItem = createTelemetryItem;
|
|
4401
4057
|
exports.createTraceParent = createTraceParent;
|
|
4402
4058
|
exports.dataSanitizeException = dataSanitizeException;
|