@microsoft/applicationinsights-common 2.7.5-nightly.2202-11 → 2.7.5-nightly.2203-03
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/applicationinsights-common.integrity.json +9 -9
- package/browser/applicationinsights-common.js +852 -243
- package/browser/applicationinsights-common.js.map +1 -1
- package/browser/applicationinsights-common.min.js +2 -2
- package/browser/applicationinsights-common.min.js.map +1 -1
- package/dist/applicationinsights-common.api.json +172 -62
- package/dist/applicationinsights-common.api.md +21 -8
- package/dist/applicationinsights-common.d.ts +33 -12
- package/dist/applicationinsights-common.js +852 -243
- package/dist/applicationinsights-common.js.map +1 -1
- package/dist/applicationinsights-common.min.js +2 -2
- package/dist/applicationinsights-common.min.js.map +1 -1
- package/dist/applicationinsights-common.rollup.d.ts +33 -12
- package/dist-esm/ConnectionStringParser.js +1 -1
- package/dist-esm/Constants.js +1 -1
- package/dist-esm/DomHelperFuncs.js +1 -1
- package/dist-esm/Enums.js +11 -24
- package/dist-esm/Enums.js.map +1 -1
- package/dist-esm/HelperFuncs.js +7 -6
- package/dist-esm/HelperFuncs.js.map +1 -1
- package/dist-esm/Interfaces/ConnectionString.js +1 -1
- package/dist-esm/Interfaces/Context/IApplication.js +1 -1
- package/dist-esm/Interfaces/Context/IDevice.js +1 -1
- package/dist-esm/Interfaces/Context/IInternal.js +1 -1
- package/dist-esm/Interfaces/Context/ILocation.js +1 -1
- package/dist-esm/Interfaces/Context/IOperatingSystem.js +1 -1
- package/dist-esm/Interfaces/Context/ISample.js +1 -1
- package/dist-esm/Interfaces/Context/ISession.js +1 -1
- package/dist-esm/Interfaces/Context/ITelemetryTrace.js +1 -1
- package/dist-esm/Interfaces/Context/IUser.js +1 -1
- package/dist-esm/Interfaces/Context/IWeb.js +1 -1
- package/dist-esm/Interfaces/Contracts/AvailabilityData.js +52 -0
- package/dist-esm/Interfaces/Contracts/AvailabilityData.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/ContextTagKeys.js +89 -0
- package/dist-esm/Interfaces/Contracts/ContextTagKeys.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/DataPointType.js +8 -0
- package/dist-esm/Interfaces/Contracts/DataPointType.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/DependencyKind.js +8 -0
- package/dist-esm/Interfaces/Contracts/DependencyKind.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/DependencySourceType.js +8 -0
- package/dist-esm/Interfaces/Contracts/DependencySourceType.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/Generated/AvailabilityData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/Base.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/ContextTagKeys.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/Data.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/Domain.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/Envelope.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/EventData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/MessageData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/MetricData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/RequestData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/SeverityLevel.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js +1 -1
- package/dist-esm/Interfaces/Contracts/IBase.js +8 -0
- package/dist-esm/Interfaces/Contracts/IBase.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IData.js +8 -0
- package/dist-esm/Interfaces/Contracts/IData.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IDataPoint.js +6 -0
- package/dist-esm/Interfaces/Contracts/IDataPoint.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IDomain.js +8 -0
- package/dist-esm/Interfaces/Contracts/IDomain.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IEnvelope.js +46 -0
- package/dist-esm/Interfaces/Contracts/IEnvelope.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IEventData.js +8 -0
- package/dist-esm/Interfaces/Contracts/IEventData.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IExceptionData.js +8 -0
- package/dist-esm/Interfaces/Contracts/IExceptionData.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +8 -0
- package/dist-esm/Interfaces/Contracts/IExceptionDetails.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IMessageData.js +8 -0
- package/dist-esm/Interfaces/Contracts/IMessageData.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IMetricData.js +8 -0
- package/dist-esm/Interfaces/Contracts/IMetricData.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IPageViewData.js +8 -0
- package/dist-esm/Interfaces/Contracts/IPageViewData.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +8 -0
- package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +8 -0
- package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/IStackFrame.js +8 -0
- package/dist-esm/Interfaces/Contracts/IStackFrame.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/RequestData.js +46 -0
- package/dist-esm/Interfaces/Contracts/RequestData.js.map +1 -0
- package/dist-esm/Interfaces/Contracts/SeverityLevel.js +19 -0
- package/dist-esm/Interfaces/Contracts/SeverityLevel.js.map +1 -0
- package/dist-esm/Interfaces/IAppInsights.js +1 -1
- package/dist-esm/Interfaces/IChannelControlsAI.js +1 -1
- package/dist-esm/Interfaces/IConfig.js +1 -1
- package/dist-esm/Interfaces/ICorrelationConfig.js +1 -1
- package/dist-esm/Interfaces/IDependencyTelemetry.js +1 -1
- package/dist-esm/Interfaces/IEventTelemetry.js +1 -1
- package/dist-esm/Interfaces/IExceptionTelemetry.js +1 -1
- package/dist-esm/Interfaces/IMetricTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPageViewTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPartC.js +1 -1
- package/dist-esm/Interfaces/IPropertiesPlugin.js +1 -1
- package/dist-esm/Interfaces/IRequestContext.js +1 -1
- package/dist-esm/Interfaces/ITelemetryContext.js +1 -1
- package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
- package/dist-esm/Interfaces/PartAExtensions.js +1 -1
- package/dist-esm/Interfaces/Telemetry/IEnvelope.js +1 -1
- package/dist-esm/Interfaces/Telemetry/ISerializable.js +1 -1
- package/dist-esm/RequestResponseHeaders.js +1 -1
- package/dist-esm/StorageHelperFuncs.js +27 -12
- package/dist-esm/StorageHelperFuncs.js.map +1 -1
- package/dist-esm/Telemetry/Common/Base.js +1 -1
- package/dist-esm/Telemetry/Common/Data.js +1 -1
- package/dist-esm/Telemetry/Common/DataPoint.js +1 -1
- package/dist-esm/Telemetry/Common/DataSanitizer.js +8 -8
- package/dist-esm/Telemetry/Common/DataSanitizer.js.map +1 -1
- package/dist-esm/Telemetry/Common/Envelope.js +1 -1
- package/dist-esm/Telemetry/Event.js +1 -1
- package/dist-esm/Telemetry/Exception.js +1 -1
- package/dist-esm/Telemetry/Metric.js +1 -1
- package/dist-esm/Telemetry/PageView.js +1 -1
- package/dist-esm/Telemetry/PageViewPerformance.js +1 -1
- package/dist-esm/Telemetry/RemoteDependencyData.js +1 -1
- package/dist-esm/Telemetry/Trace.js +1 -1
- package/dist-esm/TelemetryItemCreator.js +1 -1
- package/dist-esm/UrlHelperFuncs.js +1 -1
- package/dist-esm/Util.js +1 -1
- package/dist-esm/applicationinsights-common.js +2 -2
- package/dist-esm/applicationinsights-common.js.map +1 -1
- package/package.json +3 -3
- package/src/Enums.ts +19 -3
- package/src/HelperFuncs.ts +7 -5
- package/src/Interfaces/Contracts/AvailabilityData.ts +57 -0
- package/src/Interfaces/Contracts/ContextTagKeys.ts +299 -0
- package/src/Interfaces/Contracts/DataPointType.ts +10 -0
- package/src/Interfaces/Contracts/DependencyKind.ts +11 -0
- package/src/Interfaces/Contracts/DependencySourceType.ts +11 -0
- package/src/Interfaces/Contracts/IBase.ts +13 -0
- package/src/Interfaces/Contracts/IData.ts +19 -0
- package/src/Interfaces/Contracts/IDataPoint.ts +44 -0
- package/src/Interfaces/Contracts/IDomain.ts +8 -0
- package/src/Interfaces/Contracts/IEnvelope.ts +50 -0
- package/src/Interfaces/Contracts/IEventData.ts +30 -0
- package/src/Interfaces/Contracts/IExceptionData.ts +37 -0
- package/src/Interfaces/Contracts/IExceptionDetails.ts +45 -0
- package/src/Interfaces/Contracts/IMessageData.ts +36 -0
- package/src/Interfaces/Contracts/IMetricData.ts +31 -0
- package/src/Interfaces/Contracts/IPageViewData.ts +26 -0
- package/src/Interfaces/Contracts/IPageViewPerfData.ts +35 -0
- package/src/Interfaces/Contracts/IRemoteDependencyData.ts +65 -0
- package/src/Interfaces/Contracts/IStackFrame.ts +33 -0
- package/src/Interfaces/Contracts/RequestData.ts +50 -0
- package/src/Interfaces/Contracts/SeverityLevel.ts +15 -0
- package/src/StorageHelperFuncs.ts +34 -17
- package/src/Telemetry/Common/DataSanitizer.ts +13 -13
- package/src/Telemetry/Exception.ts +27 -15
- package/src/TelemetryItemCreator.ts +1 -1
- package/src/applicationinsights-common.ts +2 -2
- package/types/Enums.d.ts +13 -2
- package/types/Interfaces/Contracts/AvailabilityData.d.ts +0 -0
- package/types/Interfaces/Contracts/ContextTagKeys.d.ts +175 -0
- package/types/Interfaces/Contracts/DataPointType.d.ts +7 -0
- package/types/Interfaces/Contracts/DependencyKind.d.ts +8 -0
- package/types/Interfaces/Contracts/DependencySourceType.d.ts +8 -0
- package/types/Interfaces/Contracts/IBase.d.ts +9 -0
- package/types/Interfaces/Contracts/IData.d.ts +14 -0
- package/types/Interfaces/Contracts/IDataPoint.d.ts +34 -0
- package/types/Interfaces/Contracts/IDomain.d.ts +5 -0
- package/types/Interfaces/Contracts/IEnvelope.d.ts +0 -0
- package/types/Interfaces/Contracts/IEventData.d.ts +22 -0
- package/types/Interfaces/Contracts/IExceptionData.d.ts +28 -0
- package/types/Interfaces/Contracts/IExceptionDetails.d.ts +34 -0
- package/types/Interfaces/Contracts/IMessageData.d.ts +27 -0
- package/types/Interfaces/Contracts/IMetricData.d.ts +23 -0
- package/types/Interfaces/Contracts/IPageViewData.d.ts +18 -0
- package/types/Interfaces/Contracts/IPageViewPerfData.d.ts +26 -0
- package/types/Interfaces/Contracts/IRemoteDependencyData.d.ts +50 -0
- package/types/Interfaces/Contracts/IStackFrame.d.ts +25 -0
- package/types/Interfaces/Contracts/RequestData.d.ts +0 -0
- package/types/Interfaces/Contracts/SeverityLevel.d.ts +10 -0
- package/types/StorageHelperFuncs.d.ts +14 -2
- package/types/applicationinsights-common.d.ts +2 -2
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 2.7.5-nightly.
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 2.7.5-nightly.2203-03
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -75,7 +75,9 @@
|
|
|
75
75
|
var __assignFn = ObjAssign || __objAssignFnImpl;
|
|
76
76
|
var extendStaticsFn = function (d, b) {
|
|
77
77
|
extendStaticsFn = ObjClass["setPrototypeOf"] ||
|
|
78
|
-
({ __proto__: [] } instanceof Array && function (d, b) {
|
|
78
|
+
({ __proto__: [] } instanceof Array && function (d, b) {
|
|
79
|
+
d.__proto__ = b;
|
|
80
|
+
}) ||
|
|
79
81
|
function (d, b) {
|
|
80
82
|
for (var p in b) {
|
|
81
83
|
if (b[strShimHasOwnProperty](p)) {
|
|
@@ -90,103 +92,255 @@
|
|
|
90
92
|
throwTypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
91
93
|
}
|
|
92
94
|
extendStaticsFn(d, b);
|
|
93
|
-
function __() {
|
|
95
|
+
function __() {
|
|
96
|
+
this.constructor = d;
|
|
97
|
+
}
|
|
94
98
|
d[strShimPrototype] = b === null ? objCreateFn(b) : (__[strShimPrototype] = b[strShimPrototype], new __());
|
|
95
99
|
}
|
|
96
100
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
101
|
+
/*!
|
|
102
|
+
* Microsoft Dynamic Proto Utility, 1.1.4
|
|
103
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
104
|
+
*/
|
|
105
|
+
var Constructor = 'constructor';
|
|
106
|
+
var Prototype = 'prototype';
|
|
107
|
+
var strFunction = 'function';
|
|
108
|
+
var DynInstFuncTable = '_dynInstFuncs';
|
|
109
|
+
var DynProxyTag = '_isDynProxy';
|
|
110
|
+
var DynClassName = '_dynClass';
|
|
111
|
+
var DynClassNamePrefix = '_dynCls$';
|
|
112
|
+
var DynInstChkTag = '_dynInstChk';
|
|
113
|
+
var DynAllowInstChkTag = DynInstChkTag;
|
|
114
|
+
var DynProtoDefaultOptions = '_dfOpts';
|
|
115
|
+
var UnknownValue = '_unknown_';
|
|
116
|
+
var str__Proto = "__proto__";
|
|
117
|
+
var strUseBaseInst = 'useBaseInst';
|
|
118
|
+
var strSetInstFuncs = 'setInstFuncs';
|
|
119
|
+
var Obj = Object;
|
|
120
|
+
var _objGetPrototypeOf = Obj["getPrototypeOf"];
|
|
121
|
+
var _dynamicNames = 0;
|
|
122
|
+
function _hasOwnProperty(obj, prop) {
|
|
123
|
+
return obj && Obj[Prototype].hasOwnProperty.call(obj, prop);
|
|
124
|
+
}
|
|
125
|
+
function _isObjectOrArrayPrototype(target) {
|
|
126
|
+
return target && (target === Obj[Prototype] || target === Array[Prototype]);
|
|
127
|
+
}
|
|
128
|
+
function _isObjectArrayOrFunctionPrototype(target) {
|
|
129
|
+
return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
|
|
130
|
+
}
|
|
131
|
+
function _getObjProto(target) {
|
|
132
|
+
if (target) {
|
|
133
|
+
if (_objGetPrototypeOf) {
|
|
134
|
+
return _objGetPrototypeOf(target);
|
|
135
|
+
}
|
|
136
|
+
var newProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
|
|
137
|
+
if (newProto) {
|
|
138
|
+
return newProto;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
function _forEachProp(target, func) {
|
|
144
|
+
var props = [];
|
|
145
|
+
var getOwnProps = Obj["getOwnPropertyNames"];
|
|
146
|
+
if (getOwnProps) {
|
|
147
|
+
props = getOwnProps(target);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
for (var name_1 in target) {
|
|
151
|
+
if (typeof name_1 === "string" && _hasOwnProperty(target, name_1)) {
|
|
152
|
+
props.push(name_1);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (props && props.length > 0) {
|
|
157
|
+
for (var lp = 0; lp < props.length; lp++) {
|
|
158
|
+
func(props[lp]);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function _isDynamicCandidate(target, funcName, skipOwn) {
|
|
163
|
+
return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || _hasOwnProperty(target, funcName)));
|
|
164
|
+
}
|
|
165
|
+
function _throwTypeError(message) {
|
|
166
|
+
throw new TypeError("DynamicProto: " + message);
|
|
167
|
+
}
|
|
168
|
+
function _getInstanceFuncs(thisTarget) {
|
|
169
|
+
var instFuncs = {};
|
|
170
|
+
_forEachProp(thisTarget, function (name) {
|
|
171
|
+
if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {
|
|
172
|
+
instFuncs[name] = thisTarget[name];
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
return instFuncs;
|
|
176
|
+
}
|
|
177
|
+
function _hasVisited(values, value) {
|
|
178
|
+
for (var lp = values.length - 1; lp >= 0; lp--) {
|
|
179
|
+
if (values[lp] === value) {
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
|
|
186
|
+
function _instFuncProxy(target, funcHost, funcName) {
|
|
187
|
+
var theFunc = funcHost[funcName];
|
|
188
|
+
if (theFunc[DynProxyTag] && useBaseInst) {
|
|
189
|
+
var instFuncTable = target[DynInstFuncTable] || {};
|
|
190
|
+
if (instFuncTable[DynAllowInstChkTag] !== false) {
|
|
191
|
+
theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return function () {
|
|
195
|
+
return theFunc.apply(target, arguments);
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
var baseFuncs = {};
|
|
199
|
+
_forEachProp(instFuncs, function (name) {
|
|
200
|
+
baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
|
|
201
|
+
});
|
|
202
|
+
var baseProto = _getObjProto(classProto);
|
|
203
|
+
var visited = [];
|
|
204
|
+
while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
|
|
205
|
+
_forEachProp(baseProto, function (name) {
|
|
206
|
+
if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {
|
|
207
|
+
baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
visited.push(baseProto);
|
|
211
|
+
baseProto = _getObjProto(baseProto);
|
|
212
|
+
}
|
|
213
|
+
return baseFuncs;
|
|
214
|
+
}
|
|
215
|
+
function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
|
|
216
|
+
var instFunc = null;
|
|
217
|
+
if (target && _hasOwnProperty(proto, DynClassName)) {
|
|
218
|
+
var instFuncTable = target[DynInstFuncTable] || {};
|
|
219
|
+
instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];
|
|
220
|
+
if (!instFunc) {
|
|
221
|
+
_throwTypeError("Missing [" + funcName + "] " + strFunction);
|
|
222
|
+
}
|
|
223
|
+
if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
|
|
224
|
+
var canAddInst = !_hasOwnProperty(target, funcName);
|
|
225
|
+
var objProto = _getObjProto(target);
|
|
226
|
+
var visited = [];
|
|
227
|
+
while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
|
|
228
|
+
var protoFunc = objProto[funcName];
|
|
229
|
+
if (protoFunc) {
|
|
230
|
+
canAddInst = (protoFunc === currentDynProtoProxy);
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
visited.push(objProto);
|
|
234
|
+
objProto = _getObjProto(objProto);
|
|
235
|
+
}
|
|
236
|
+
try {
|
|
237
|
+
if (canAddInst) {
|
|
238
|
+
target[funcName] = instFunc;
|
|
239
|
+
}
|
|
240
|
+
instFunc[DynInstChkTag] = 1;
|
|
241
|
+
}
|
|
242
|
+
catch (e) {
|
|
243
|
+
instFuncTable[DynAllowInstChkTag] = false;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return instFunc;
|
|
248
|
+
}
|
|
249
|
+
function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
|
|
250
|
+
var protoFunc = proto[funcName];
|
|
251
|
+
if (protoFunc === currentDynProtoProxy) {
|
|
252
|
+
protoFunc = _getObjProto(proto)[funcName];
|
|
253
|
+
}
|
|
254
|
+
if (typeof protoFunc !== strFunction) {
|
|
255
|
+
_throwTypeError("[" + funcName + "] is not a " + strFunction);
|
|
256
|
+
}
|
|
257
|
+
return protoFunc;
|
|
258
|
+
}
|
|
259
|
+
function _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {
|
|
260
|
+
function _createDynamicPrototype(proto, funcName) {
|
|
261
|
+
var dynProtoProxy = function () {
|
|
262
|
+
var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
|
|
263
|
+
return instFunc.apply(this, arguments);
|
|
264
|
+
};
|
|
265
|
+
dynProtoProxy[DynProxyTag] = 1;
|
|
266
|
+
return dynProtoProxy;
|
|
267
|
+
}
|
|
268
|
+
if (!_isObjectOrArrayPrototype(proto)) {
|
|
269
|
+
var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};
|
|
270
|
+
var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || {});
|
|
271
|
+
if (instFuncTable[DynAllowInstChkTag] !== false) {
|
|
272
|
+
instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
|
|
273
|
+
}
|
|
274
|
+
_forEachProp(target, function (name) {
|
|
275
|
+
if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
|
|
276
|
+
instFuncs_1[name] = target[name];
|
|
277
|
+
delete target[name];
|
|
278
|
+
if (!_hasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
|
|
279
|
+
proto[name] = _createDynamicPrototype(proto, name);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
function _checkPrototype(classProto, thisTarget) {
|
|
286
|
+
if (_objGetPrototypeOf) {
|
|
287
|
+
var visited = [];
|
|
288
|
+
var thisProto = _getObjProto(thisTarget);
|
|
289
|
+
while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
|
|
290
|
+
if (thisProto === classProto) {
|
|
291
|
+
return true;
|
|
292
|
+
}
|
|
293
|
+
visited.push(thisProto);
|
|
294
|
+
thisProto = _getObjProto(thisProto);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return false;
|
|
298
|
+
}
|
|
299
|
+
function _getObjName(target, unknownValue) {
|
|
300
|
+
if (_hasOwnProperty(target, Prototype)) {
|
|
301
|
+
return target.name || unknownValue || UnknownValue;
|
|
302
|
+
}
|
|
303
|
+
return (((target || {})[Constructor]) || {}).name || unknownValue || UnknownValue;
|
|
304
|
+
}
|
|
305
|
+
function dynamicProto(theClass, target, delegateFunc, options) {
|
|
306
|
+
if (!_hasOwnProperty(theClass, Prototype)) {
|
|
307
|
+
_throwTypeError("theClass is an invalid class definition.");
|
|
308
|
+
}
|
|
309
|
+
var classProto = theClass[Prototype];
|
|
310
|
+
if (!_checkPrototype(classProto, target)) {
|
|
311
|
+
_throwTypeError("[" + _getObjName(theClass) + "] is not in class hierarchy of [" + _getObjName(target) + "]");
|
|
312
|
+
}
|
|
313
|
+
var className = null;
|
|
314
|
+
if (_hasOwnProperty(classProto, DynClassName)) {
|
|
315
|
+
className = classProto[DynClassName];
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
className = DynClassNamePrefix + _getObjName(theClass, "_") + "$" + _dynamicNames;
|
|
319
|
+
_dynamicNames++;
|
|
320
|
+
classProto[DynClassName] = className;
|
|
321
|
+
}
|
|
322
|
+
var perfOptions = dynamicProto[DynProtoDefaultOptions];
|
|
323
|
+
var useBaseInst = !!perfOptions[strUseBaseInst];
|
|
324
|
+
if (useBaseInst && options && options[strUseBaseInst] !== undefined) {
|
|
325
|
+
useBaseInst = !!options[strUseBaseInst];
|
|
326
|
+
}
|
|
327
|
+
var instFuncs = _getInstanceFuncs(target);
|
|
328
|
+
var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);
|
|
329
|
+
delegateFunc(target, baseFuncs);
|
|
330
|
+
var setInstanceFunc = !!_objGetPrototypeOf && !!perfOptions[strSetInstFuncs];
|
|
331
|
+
if (setInstanceFunc && options) {
|
|
332
|
+
setInstanceFunc = !!options[strSetInstFuncs];
|
|
333
|
+
}
|
|
334
|
+
_populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);
|
|
335
|
+
}
|
|
336
|
+
var perfDefaults = {
|
|
337
|
+
setInstFuncs: true,
|
|
338
|
+
useBaseInst: true
|
|
185
339
|
};
|
|
340
|
+
dynamicProto[DynProtoDefaultOptions] = perfDefaults;
|
|
341
|
+
|
|
342
|
+
var strEmpty$1 = "";
|
|
186
343
|
|
|
187
|
-
var strOnPrefix = "on";
|
|
188
|
-
var strAttachEvent = "attachEvent";
|
|
189
|
-
var strAddEventHelper = "addEventListener";
|
|
190
344
|
var strToISOString = "toISOString";
|
|
191
345
|
var cStrEndsWith = "endsWith";
|
|
192
346
|
var strIndexOf = "indexOf";
|
|
@@ -194,7 +348,8 @@
|
|
|
194
348
|
var strReduce = "reduce";
|
|
195
349
|
var cStrTrim = "trim";
|
|
196
350
|
var strToString = "toString";
|
|
197
|
-
var _objDefineProperty = ObjDefineProperty;
|
|
351
|
+
var _objDefineProperty$1 = ObjDefineProperty;
|
|
352
|
+
var _objFreeze = ObjClass.freeze;
|
|
198
353
|
var _objKeys = ObjClass.keys;
|
|
199
354
|
var StringProto = String[strShimPrototype];
|
|
200
355
|
var _strTrim = StringProto[cStrTrim];
|
|
@@ -205,6 +360,9 @@
|
|
|
205
360
|
var _objToString = ObjProto[strToString];
|
|
206
361
|
var _fnToString = ObjHasOwnProperty[strToString];
|
|
207
362
|
_fnToString.call(ObjClass);
|
|
363
|
+
var rCamelCase = /-([a-z])/g;
|
|
364
|
+
var rNormalizeInvalid = /([^\w\d_$])/g;
|
|
365
|
+
var rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
208
366
|
function isTypeof(value, theType) {
|
|
209
367
|
return typeof value === theType;
|
|
210
368
|
}
|
|
@@ -226,24 +384,18 @@
|
|
|
226
384
|
function isFunction(value) {
|
|
227
385
|
return !!(value && typeof value === strShimFunction);
|
|
228
386
|
}
|
|
229
|
-
function
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
obj[strAttachEvent](strOnPrefix + eventNameWithoutOn, handlerRef);
|
|
240
|
-
result = true;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
catch (e) {
|
|
244
|
-
}
|
|
387
|
+
function normalizeJsName(name) {
|
|
388
|
+
var value = name;
|
|
389
|
+
if (value && isString(value)) {
|
|
390
|
+
value = value.replace(rCamelCase, function (_all, letter) {
|
|
391
|
+
return letter.toUpperCase();
|
|
392
|
+
});
|
|
393
|
+
value = value.replace(rNormalizeInvalid, "_");
|
|
394
|
+
value = value.replace(rLeadingNumeric, function (_all, match) {
|
|
395
|
+
return "_" + match;
|
|
396
|
+
});
|
|
245
397
|
}
|
|
246
|
-
return
|
|
398
|
+
return value;
|
|
247
399
|
}
|
|
248
400
|
function objForEachKey(target, callbackfn) {
|
|
249
401
|
if (target) {
|
|
@@ -447,7 +599,7 @@
|
|
|
447
599
|
return result;
|
|
448
600
|
}
|
|
449
601
|
function objDefineAccessors(target, prop, getProp, setProp) {
|
|
450
|
-
if (_objDefineProperty) {
|
|
602
|
+
if (_objDefineProperty$1) {
|
|
451
603
|
try {
|
|
452
604
|
var descriptor = {
|
|
453
605
|
enumerable: true,
|
|
@@ -459,7 +611,7 @@
|
|
|
459
611
|
if (setProp) {
|
|
460
612
|
descriptor.set = setProp;
|
|
461
613
|
}
|
|
462
|
-
_objDefineProperty(target, prop, descriptor);
|
|
614
|
+
_objDefineProperty$1(target, prop, descriptor);
|
|
463
615
|
return true;
|
|
464
616
|
}
|
|
465
617
|
catch (e) {
|
|
@@ -467,6 +619,10 @@
|
|
|
467
619
|
}
|
|
468
620
|
return false;
|
|
469
621
|
}
|
|
622
|
+
function _doNothing(value) {
|
|
623
|
+
return value;
|
|
624
|
+
}
|
|
625
|
+
var objFreeze = _objFreeze || _doNothing;
|
|
470
626
|
function dateNow() {
|
|
471
627
|
var dt = Date;
|
|
472
628
|
return dt.now ? dt.now() : new dt().getTime();
|
|
@@ -475,7 +631,7 @@
|
|
|
475
631
|
if (isError(object)) {
|
|
476
632
|
return object.name;
|
|
477
633
|
}
|
|
478
|
-
return
|
|
634
|
+
return strEmpty$1;
|
|
479
635
|
}
|
|
480
636
|
function setValue(target, field, value, valChk, srcChk) {
|
|
481
637
|
var theValue = value;
|
|
@@ -491,6 +647,9 @@
|
|
|
491
647
|
function isTruthy(value) {
|
|
492
648
|
return !!value;
|
|
493
649
|
}
|
|
650
|
+
function throwError(message) {
|
|
651
|
+
throw new Error(message);
|
|
652
|
+
}
|
|
494
653
|
function createClassFromInterface(defaults) {
|
|
495
654
|
return /** @class */ (function () {
|
|
496
655
|
function class_1() {
|
|
@@ -504,12 +663,24 @@
|
|
|
504
663
|
return class_1;
|
|
505
664
|
}());
|
|
506
665
|
}
|
|
666
|
+
function createEnumStyle(values) {
|
|
667
|
+
var enumClass = {};
|
|
668
|
+
objForEachKey(values, function (field, value) {
|
|
669
|
+
enumClass[field] = value;
|
|
670
|
+
if (!isUndefined(enumClass[value])) {
|
|
671
|
+
throwError("[" + value + "] exists for " + field);
|
|
672
|
+
}
|
|
673
|
+
enumClass[value] = field;
|
|
674
|
+
});
|
|
675
|
+
return objFreeze(enumClass);
|
|
676
|
+
}
|
|
507
677
|
|
|
508
678
|
var strWindow = "window";
|
|
509
679
|
var strDocument = "document";
|
|
510
680
|
var strDocumentMode = "documentMode";
|
|
511
681
|
var strNavigator = "navigator";
|
|
512
682
|
var strLocation = "location";
|
|
683
|
+
var strConsole = "console";
|
|
513
684
|
var strPerformance = "performance";
|
|
514
685
|
var strJSON = "JSON";
|
|
515
686
|
var strCrypto = "crypto";
|
|
@@ -569,6 +740,12 @@
|
|
|
569
740
|
}
|
|
570
741
|
return getGlobalInst(strLocation);
|
|
571
742
|
}
|
|
743
|
+
function getConsole() {
|
|
744
|
+
if (typeof console !== strShimUndefined) {
|
|
745
|
+
return console;
|
|
746
|
+
}
|
|
747
|
+
return getGlobalInst(strConsole);
|
|
748
|
+
}
|
|
572
749
|
function getPerformance() {
|
|
573
750
|
return getGlobalInst(strPerformance);
|
|
574
751
|
}
|
|
@@ -591,7 +768,7 @@
|
|
|
591
768
|
var nav = getNavigator();
|
|
592
769
|
if (nav && (nav.userAgent !== _navUserAgentCheck || _isTrident === null)) {
|
|
593
770
|
_navUserAgentCheck = nav.userAgent;
|
|
594
|
-
var userAgent = (_navUserAgentCheck ||
|
|
771
|
+
var userAgent = (_navUserAgentCheck || strEmpty$1).toLowerCase();
|
|
595
772
|
_isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
|
|
596
773
|
}
|
|
597
774
|
return _isTrident;
|
|
@@ -600,9 +777,9 @@
|
|
|
600
777
|
if (userAgentStr === void 0) { userAgentStr = null; }
|
|
601
778
|
if (!userAgentStr) {
|
|
602
779
|
var navigator_1 = getNavigator() || {};
|
|
603
|
-
userAgentStr = navigator_1 ? (navigator_1.userAgent ||
|
|
780
|
+
userAgentStr = navigator_1 ? (navigator_1.userAgent || strEmpty$1).toLowerCase() : strEmpty$1;
|
|
604
781
|
}
|
|
605
|
-
var ua = (userAgentStr ||
|
|
782
|
+
var ua = (userAgentStr || strEmpty$1).toLowerCase();
|
|
606
783
|
if (strContains(ua, strMsie)) {
|
|
607
784
|
var doc = getDocument() || {};
|
|
608
785
|
return Math.max(parseInt(ua.split(strMsie)[1]), (doc[strDocumentMode] || 0));
|
|
@@ -617,7 +794,7 @@
|
|
|
617
794
|
}
|
|
618
795
|
function dumpObj(object) {
|
|
619
796
|
var objectTypeDump = Object[strShimPrototype].toString.call(object);
|
|
620
|
-
var propertyValueDump =
|
|
797
|
+
var propertyValueDump = strEmpty$1;
|
|
621
798
|
if (objectTypeDump === "[object Error]") {
|
|
622
799
|
propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
|
|
623
800
|
}
|
|
@@ -633,6 +810,329 @@
|
|
|
633
810
|
return _beaconsSupported;
|
|
634
811
|
}
|
|
635
812
|
|
|
813
|
+
var _aiNamespace = null;
|
|
814
|
+
function _getExtensionNamespace() {
|
|
815
|
+
var target = getGlobalInst("Microsoft");
|
|
816
|
+
if (target) {
|
|
817
|
+
_aiNamespace = target["ApplicationInsights"];
|
|
818
|
+
}
|
|
819
|
+
return _aiNamespace;
|
|
820
|
+
}
|
|
821
|
+
function getDebugExt(config) {
|
|
822
|
+
var ns = _aiNamespace;
|
|
823
|
+
if (!ns && config.disableDbgExt !== true) {
|
|
824
|
+
ns = _aiNamespace || _getExtensionNamespace();
|
|
825
|
+
}
|
|
826
|
+
return ns ? ns["ChromeDbgExt"] : null;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
var AiNonUserActionablePrefix = "AI (Internal): ";
|
|
830
|
+
var AiUserActionablePrefix = "AI: ";
|
|
831
|
+
var AIInternalMessagePrefix = "AITR_";
|
|
832
|
+
var strErrorToConsole = "errorToConsole";
|
|
833
|
+
var strWarnToConsole = "warnToConsole";
|
|
834
|
+
function _sanitizeDiagnosticText(text) {
|
|
835
|
+
if (text) {
|
|
836
|
+
return "\"" + text.replace(/\"/g, strEmpty$1) + "\"";
|
|
837
|
+
}
|
|
838
|
+
return strEmpty$1;
|
|
839
|
+
}
|
|
840
|
+
function _logToConsole(func, message) {
|
|
841
|
+
var theConsole = getConsole();
|
|
842
|
+
if (!!theConsole) {
|
|
843
|
+
var logFunc = "log";
|
|
844
|
+
if (theConsole[func]) {
|
|
845
|
+
logFunc = func;
|
|
846
|
+
}
|
|
847
|
+
if (isFunction(theConsole[logFunc])) {
|
|
848
|
+
theConsole[logFunc](message);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
var _InternalLogMessage = /** @class */ (function () {
|
|
853
|
+
function _InternalLogMessage(msgId, msg, isUserAct, properties) {
|
|
854
|
+
if (isUserAct === void 0) { isUserAct = false; }
|
|
855
|
+
var _self = this;
|
|
856
|
+
_self.messageId = msgId;
|
|
857
|
+
_self.message =
|
|
858
|
+
(isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
|
|
859
|
+
msgId;
|
|
860
|
+
var strProps = strEmpty$1;
|
|
861
|
+
if (hasJSON()) {
|
|
862
|
+
strProps = getJSON().stringify(properties);
|
|
863
|
+
}
|
|
864
|
+
var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : strEmpty$1) +
|
|
865
|
+
(properties ? " props:" + _sanitizeDiagnosticText(strProps) : strEmpty$1);
|
|
866
|
+
_self.message += diagnosticText;
|
|
867
|
+
}
|
|
868
|
+
_InternalLogMessage.dataType = "MessageData";
|
|
869
|
+
return _InternalLogMessage;
|
|
870
|
+
}());
|
|
871
|
+
var DiagnosticLogger = /** @class */ (function () {
|
|
872
|
+
function DiagnosticLogger(config) {
|
|
873
|
+
this.identifier = "DiagnosticLogger";
|
|
874
|
+
this.queue = [];
|
|
875
|
+
var _messageCount = 0;
|
|
876
|
+
var _messageLogged = {};
|
|
877
|
+
dynamicProto(DiagnosticLogger, this, function (_self) {
|
|
878
|
+
if (isNullOrUndefined(config)) {
|
|
879
|
+
config = {};
|
|
880
|
+
}
|
|
881
|
+
_self.consoleLoggingLevel = function () { return _getConfigValue("loggingLevelConsole", 0); };
|
|
882
|
+
_self.telemetryLoggingLevel = function () { return _getConfigValue("loggingLevelTelemetry", 1); };
|
|
883
|
+
_self.maxInternalMessageLimit = function () { return _getConfigValue("maxMessageLimit", 25); };
|
|
884
|
+
_self.enableDebugExceptions = function () { return _getConfigValue("enableDebugExceptions", false); };
|
|
885
|
+
_self.throwInternal = function (severity, msgId, msg, properties, isUserAct) {
|
|
886
|
+
if (isUserAct === void 0) { isUserAct = false; }
|
|
887
|
+
var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
|
|
888
|
+
if (_self.enableDebugExceptions()) {
|
|
889
|
+
throw message;
|
|
890
|
+
}
|
|
891
|
+
else {
|
|
892
|
+
var logFunc = severity === 1 ? strErrorToConsole : strWarnToConsole;
|
|
893
|
+
if (!isUndefined(message.message)) {
|
|
894
|
+
var logLevel = _self.consoleLoggingLevel();
|
|
895
|
+
if (isUserAct) {
|
|
896
|
+
var messageKey = +message.messageId;
|
|
897
|
+
if (!_messageLogged[messageKey] && logLevel >= severity) {
|
|
898
|
+
_self[logFunc](message.message);
|
|
899
|
+
_messageLogged[messageKey] = true;
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
else {
|
|
903
|
+
if (logLevel >= severity) {
|
|
904
|
+
_self[logFunc](message.message);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
_self.logInternalMessage(severity, message);
|
|
908
|
+
}
|
|
909
|
+
else {
|
|
910
|
+
_debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
};
|
|
914
|
+
_self.warnToConsole = function (message) {
|
|
915
|
+
_logToConsole("warn", message);
|
|
916
|
+
_debugExtMsg("warning", message);
|
|
917
|
+
};
|
|
918
|
+
_self.errorToConsole = function (message) {
|
|
919
|
+
_logToConsole("error", message);
|
|
920
|
+
_debugExtMsg("error", message);
|
|
921
|
+
};
|
|
922
|
+
_self.resetInternalMessageCount = function () {
|
|
923
|
+
_messageCount = 0;
|
|
924
|
+
_messageLogged = {};
|
|
925
|
+
};
|
|
926
|
+
_self.logInternalMessage = function (severity, message) {
|
|
927
|
+
if (_areInternalMessagesThrottled()) {
|
|
928
|
+
return;
|
|
929
|
+
}
|
|
930
|
+
var logMessage = true;
|
|
931
|
+
var messageKey = AIInternalMessagePrefix + message.messageId;
|
|
932
|
+
if (_messageLogged[messageKey]) {
|
|
933
|
+
logMessage = false;
|
|
934
|
+
}
|
|
935
|
+
else {
|
|
936
|
+
_messageLogged[messageKey] = true;
|
|
937
|
+
}
|
|
938
|
+
if (logMessage) {
|
|
939
|
+
if (severity <= _self.telemetryLoggingLevel()) {
|
|
940
|
+
_self.queue.push(message);
|
|
941
|
+
_messageCount++;
|
|
942
|
+
_debugExtMsg((severity === 1 ? "error" : "warn"), message);
|
|
943
|
+
}
|
|
944
|
+
if (_messageCount === _self.maxInternalMessageLimit()) {
|
|
945
|
+
var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
|
|
946
|
+
var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
|
|
947
|
+
_self.queue.push(throttleMessage);
|
|
948
|
+
if (severity === 1 ) {
|
|
949
|
+
_self.errorToConsole(throttleLimitMessage);
|
|
950
|
+
}
|
|
951
|
+
else {
|
|
952
|
+
_self.warnToConsole(throttleLimitMessage);
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
};
|
|
957
|
+
function _getConfigValue(name, defValue) {
|
|
958
|
+
var value = config[name];
|
|
959
|
+
if (!isNullOrUndefined(value)) {
|
|
960
|
+
return value;
|
|
961
|
+
}
|
|
962
|
+
return defValue;
|
|
963
|
+
}
|
|
964
|
+
function _areInternalMessagesThrottled() {
|
|
965
|
+
return _messageCount >= _self.maxInternalMessageLimit();
|
|
966
|
+
}
|
|
967
|
+
function _debugExtMsg(name, data) {
|
|
968
|
+
var dbgExt = getDebugExt(config);
|
|
969
|
+
if (dbgExt && dbgExt.diagLog) {
|
|
970
|
+
dbgExt.diagLog(name, data);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
}
|
|
975
|
+
return DiagnosticLogger;
|
|
976
|
+
}());
|
|
977
|
+
function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
|
|
978
|
+
if (isUserAct === void 0) { isUserAct = false; }
|
|
979
|
+
(logger || new DiagnosticLogger()).throwInternal(severity, msgId, msg, properties, isUserAct);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
var UInt32Mask = 0x100000000;
|
|
983
|
+
var MaxUInt32 = 0xffffffff;
|
|
984
|
+
var _mwcSeeded = false;
|
|
985
|
+
var _mwcW = 123456789;
|
|
986
|
+
var _mwcZ = 987654321;
|
|
987
|
+
function _mwcSeed(seedValue) {
|
|
988
|
+
if (seedValue < 0) {
|
|
989
|
+
seedValue >>>= 0;
|
|
990
|
+
}
|
|
991
|
+
_mwcW = (123456789 + seedValue) & MaxUInt32;
|
|
992
|
+
_mwcZ = (987654321 - seedValue) & MaxUInt32;
|
|
993
|
+
_mwcSeeded = true;
|
|
994
|
+
}
|
|
995
|
+
function _autoSeedMwc() {
|
|
996
|
+
try {
|
|
997
|
+
var now = dateNow() & 0x7fffffff;
|
|
998
|
+
_mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
|
|
999
|
+
}
|
|
1000
|
+
catch (e) {
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
function randomValue(maxValue) {
|
|
1004
|
+
if (maxValue > 0) {
|
|
1005
|
+
return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
|
|
1006
|
+
}
|
|
1007
|
+
return 0;
|
|
1008
|
+
}
|
|
1009
|
+
function random32(signed) {
|
|
1010
|
+
var value = 0;
|
|
1011
|
+
var c = getCrypto() || getMsCrypto();
|
|
1012
|
+
if (c && c.getRandomValues) {
|
|
1013
|
+
value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
|
|
1014
|
+
}
|
|
1015
|
+
if (value === 0 && isIE()) {
|
|
1016
|
+
if (!_mwcSeeded) {
|
|
1017
|
+
_autoSeedMwc();
|
|
1018
|
+
}
|
|
1019
|
+
value = mwcRandom32() & MaxUInt32;
|
|
1020
|
+
}
|
|
1021
|
+
if (value === 0) {
|
|
1022
|
+
value = Math.floor((UInt32Mask * Math.random()) | 0);
|
|
1023
|
+
}
|
|
1024
|
+
if (!signed) {
|
|
1025
|
+
value >>>= 0;
|
|
1026
|
+
}
|
|
1027
|
+
return value;
|
|
1028
|
+
}
|
|
1029
|
+
function mwcRandomSeed(value) {
|
|
1030
|
+
if (!value) {
|
|
1031
|
+
_autoSeedMwc();
|
|
1032
|
+
}
|
|
1033
|
+
else {
|
|
1034
|
+
_mwcSeed(value);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
function mwcRandom32(signed) {
|
|
1038
|
+
_mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
|
|
1039
|
+
_mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
|
|
1040
|
+
var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
|
|
1041
|
+
if (!signed) {
|
|
1042
|
+
value >>>= 0;
|
|
1043
|
+
}
|
|
1044
|
+
return value;
|
|
1045
|
+
}
|
|
1046
|
+
function newId(maxLength) {
|
|
1047
|
+
if (maxLength === void 0) { maxLength = 22; }
|
|
1048
|
+
var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1049
|
+
var number = random32() >>> 0;
|
|
1050
|
+
var chars = 0;
|
|
1051
|
+
var result = strEmpty$1;
|
|
1052
|
+
while (result.length < maxLength) {
|
|
1053
|
+
chars++;
|
|
1054
|
+
result += base64chars.charAt(number & 0x3F);
|
|
1055
|
+
number >>>= 6;
|
|
1056
|
+
if (chars === 5) {
|
|
1057
|
+
number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
|
|
1058
|
+
chars = 0;
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
return result;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
var _objDefineProperty = ObjDefineProperty;
|
|
1065
|
+
var version = "2.7.5-nightly.2203-03";
|
|
1066
|
+
var instanceName = "." + newId(6);
|
|
1067
|
+
var _dataUid = 0;
|
|
1068
|
+
function _createAccessor(target, prop, value) {
|
|
1069
|
+
if (_objDefineProperty) {
|
|
1070
|
+
try {
|
|
1071
|
+
_objDefineProperty(target, prop, {
|
|
1072
|
+
value: value,
|
|
1073
|
+
enumerable: false,
|
|
1074
|
+
configurable: true
|
|
1075
|
+
});
|
|
1076
|
+
return true;
|
|
1077
|
+
}
|
|
1078
|
+
catch (e) {
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
return false;
|
|
1082
|
+
}
|
|
1083
|
+
function _canAcceptData(target) {
|
|
1084
|
+
return target.nodeType === 1 || target.nodeType === 9 || !(+target.nodeType);
|
|
1085
|
+
}
|
|
1086
|
+
function _getCache(data, target) {
|
|
1087
|
+
var theCache = target[data.id];
|
|
1088
|
+
if (!theCache) {
|
|
1089
|
+
theCache = {};
|
|
1090
|
+
try {
|
|
1091
|
+
if (_canAcceptData(target)) {
|
|
1092
|
+
if (!_createAccessor(target, data.id, theCache)) {
|
|
1093
|
+
target[data.id] = theCache;
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
catch (e) {
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
return theCache;
|
|
1101
|
+
}
|
|
1102
|
+
function createUniqueNamespace(name, includeVersion) {
|
|
1103
|
+
if (includeVersion === void 0) { includeVersion = false; }
|
|
1104
|
+
return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : "") + instanceName);
|
|
1105
|
+
}
|
|
1106
|
+
function createElmNodeData(name) {
|
|
1107
|
+
var data = {
|
|
1108
|
+
id: createUniqueNamespace("_aiData-" + (name || "") + "." + version),
|
|
1109
|
+
accept: function (target) {
|
|
1110
|
+
return _canAcceptData(target);
|
|
1111
|
+
},
|
|
1112
|
+
get: function (target, name, defValue, addDefault) {
|
|
1113
|
+
var theCache = target[data.id];
|
|
1114
|
+
if (!theCache) {
|
|
1115
|
+
if (addDefault) {
|
|
1116
|
+
theCache = _getCache(data, target);
|
|
1117
|
+
theCache[normalizeJsName(name)] = defValue;
|
|
1118
|
+
}
|
|
1119
|
+
return defValue;
|
|
1120
|
+
}
|
|
1121
|
+
return theCache[normalizeJsName(name)];
|
|
1122
|
+
},
|
|
1123
|
+
kill: function (target, name) {
|
|
1124
|
+
if (target && target[name]) {
|
|
1125
|
+
try {
|
|
1126
|
+
delete target[name];
|
|
1127
|
+
}
|
|
1128
|
+
catch (e) {
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
};
|
|
1133
|
+
return data;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
636
1136
|
var strToGMTString = "toGMTString";
|
|
637
1137
|
var strToUTCString = "toUTCString";
|
|
638
1138
|
var strCookie = "cookie";
|
|
@@ -641,7 +1141,6 @@
|
|
|
641
1141
|
var strIsCookieUseDisabled = "isCookieUseDisabled";
|
|
642
1142
|
var strDisableCookiesUsage = "disableCookiesUsage";
|
|
643
1143
|
var strConfigCookieMgr = "_ckMgr";
|
|
644
|
-
var strEmpty = "";
|
|
645
1144
|
var _supportsCookies = null;
|
|
646
1145
|
var _allowUaSameSite = null;
|
|
647
1146
|
var _parsedCookieValue = null;
|
|
@@ -699,7 +1198,7 @@
|
|
|
699
1198
|
var result = false;
|
|
700
1199
|
if (_isMgrEnabled(cookieMgr)) {
|
|
701
1200
|
var values = {};
|
|
702
|
-
var theValue = strTrim(value || strEmpty);
|
|
1201
|
+
var theValue = strTrim(value || strEmpty$1);
|
|
703
1202
|
var idx = theValue.indexOf(";");
|
|
704
1203
|
if (idx !== -1) {
|
|
705
1204
|
theValue = strTrim(value.substring(0, idx));
|
|
@@ -714,11 +1213,11 @@
|
|
|
714
1213
|
if (expireMs > 0) {
|
|
715
1214
|
var expiry = new Date();
|
|
716
1215
|
expiry.setTime(expireMs);
|
|
717
|
-
setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || strEmpty, isTruthy);
|
|
1216
|
+
setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || strEmpty$1, isTruthy);
|
|
718
1217
|
}
|
|
719
1218
|
}
|
|
720
1219
|
if (!_isIE) {
|
|
721
|
-
setValue(values, "max-age", strEmpty + maxAgeSec, null, isUndefined);
|
|
1220
|
+
setValue(values, "max-age", strEmpty$1 + maxAgeSec, null, isUndefined);
|
|
722
1221
|
}
|
|
723
1222
|
}
|
|
724
1223
|
var location_1 = getLocation();
|
|
@@ -739,7 +1238,7 @@
|
|
|
739
1238
|
return result;
|
|
740
1239
|
},
|
|
741
1240
|
get: function (name) {
|
|
742
|
-
var value = strEmpty;
|
|
1241
|
+
var value = strEmpty$1;
|
|
743
1242
|
if (_isMgrEnabled(cookieMgr)) {
|
|
744
1243
|
value = (cookieMgrConfig.getCookie || _getCookieValue)(name);
|
|
745
1244
|
}
|
|
@@ -764,7 +1263,7 @@
|
|
|
764
1263
|
values["max-age"] = "0";
|
|
765
1264
|
}
|
|
766
1265
|
var delCookie = cookieMgrConfig.delCookie || _setCookieValue;
|
|
767
|
-
delCookie(name, _formatCookieValue(strEmpty, values));
|
|
1266
|
+
delCookie(name, _formatCookieValue(strEmpty$1, values));
|
|
768
1267
|
result = true;
|
|
769
1268
|
}
|
|
770
1269
|
return result;
|
|
@@ -781,7 +1280,7 @@
|
|
|
781
1280
|
_supportsCookies = doc[strCookie] !== undefined;
|
|
782
1281
|
}
|
|
783
1282
|
catch (e) {
|
|
784
|
-
logger
|
|
1283
|
+
_throwInternal(logger, 2 , 68 , "Cannot access document.cookie - " + getExceptionName(e), { exception: dumpObj(e) });
|
|
785
1284
|
}
|
|
786
1285
|
}
|
|
787
1286
|
return _supportsCookies;
|
|
@@ -791,7 +1290,7 @@
|
|
|
791
1290
|
if (theValue && theValue.length) {
|
|
792
1291
|
var parts = strTrim(theValue).split(";");
|
|
793
1292
|
arrForEach(parts, function (thePart) {
|
|
794
|
-
thePart = strTrim(thePart || strEmpty);
|
|
1293
|
+
thePart = strTrim(thePart || strEmpty$1);
|
|
795
1294
|
if (thePart) {
|
|
796
1295
|
var idx = thePart.indexOf("=");
|
|
797
1296
|
if (idx === -1) {
|
|
@@ -812,21 +1311,21 @@
|
|
|
812
1311
|
return null;
|
|
813
1312
|
}
|
|
814
1313
|
function _formatCookieValue(value, values) {
|
|
815
|
-
var cookieValue = value || strEmpty;
|
|
1314
|
+
var cookieValue = value || strEmpty$1;
|
|
816
1315
|
objForEachKey(values, function (name, theValue) {
|
|
817
|
-
cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : strEmpty);
|
|
1316
|
+
cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : strEmpty$1);
|
|
818
1317
|
});
|
|
819
1318
|
return cookieValue;
|
|
820
1319
|
}
|
|
821
1320
|
function _getCookieValue(name) {
|
|
822
|
-
var cookieValue = strEmpty;
|
|
1321
|
+
var cookieValue = strEmpty$1;
|
|
823
1322
|
if (_doc) {
|
|
824
|
-
var theCookie = _doc[strCookie] || strEmpty;
|
|
1323
|
+
var theCookie = _doc[strCookie] || strEmpty$1;
|
|
825
1324
|
if (_parsedCookieValue !== theCookie) {
|
|
826
1325
|
_cookieCache = _extractParts(theCookie);
|
|
827
1326
|
_parsedCookieValue = theCookie;
|
|
828
1327
|
}
|
|
829
|
-
cookieValue = strTrim(_cookieCache[name] || strEmpty);
|
|
1328
|
+
cookieValue = strTrim(_cookieCache[name] || strEmpty$1);
|
|
830
1329
|
}
|
|
831
1330
|
return cookieValue;
|
|
832
1331
|
}
|
|
@@ -860,86 +1359,119 @@
|
|
|
860
1359
|
return false;
|
|
861
1360
|
}
|
|
862
1361
|
|
|
863
|
-
var
|
|
864
|
-
var
|
|
865
|
-
var
|
|
866
|
-
var
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
1362
|
+
var strOnPrefix = "on";
|
|
1363
|
+
var strAttachEvent = "attachEvent";
|
|
1364
|
+
var strAddEventHelper = "addEventListener";
|
|
1365
|
+
var strEvents = "events";
|
|
1366
|
+
createUniqueNamespace("aiEvtPageHide");
|
|
1367
|
+
createUniqueNamespace("aiEvtPageShow");
|
|
1368
|
+
var rRemoveEmptyNs = /\.[\.]+/g;
|
|
1369
|
+
var rRemoveTrailingEmptyNs = /[\.]+$/;
|
|
1370
|
+
var _guid = 1;
|
|
1371
|
+
var elmNodeData = createElmNodeData("events");
|
|
1372
|
+
var eventNamespace = /^([^.]*)(?:\.(.+)|)/;
|
|
1373
|
+
function _normalizeNamespace(name) {
|
|
1374
|
+
if (name && name.replace) {
|
|
1375
|
+
return name.replace(/^\s*\.*|\.*\s*$/g, "");
|
|
1376
|
+
}
|
|
1377
|
+
return name;
|
|
1378
|
+
}
|
|
1379
|
+
function _getEvtNamespace(eventName, evtNamespace) {
|
|
1380
|
+
if (evtNamespace) {
|
|
1381
|
+
var theNamespace_1 = "";
|
|
1382
|
+
if (isArray(evtNamespace)) {
|
|
1383
|
+
theNamespace_1 = "";
|
|
1384
|
+
arrForEach(evtNamespace, function (name) {
|
|
1385
|
+
name = _normalizeNamespace(name);
|
|
1386
|
+
if (name) {
|
|
1387
|
+
if (name[0] !== ".") {
|
|
1388
|
+
name = "." + name;
|
|
1389
|
+
}
|
|
1390
|
+
theNamespace_1 += name;
|
|
1391
|
+
}
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
else {
|
|
1395
|
+
theNamespace_1 = _normalizeNamespace(evtNamespace);
|
|
1396
|
+
}
|
|
1397
|
+
if (theNamespace_1) {
|
|
1398
|
+
if (theNamespace_1[0] !== ".") {
|
|
1399
|
+
theNamespace_1 = "." + theNamespace_1;
|
|
1400
|
+
}
|
|
1401
|
+
eventName = (eventName || "") + theNamespace_1;
|
|
1402
|
+
}
|
|
882
1403
|
}
|
|
1404
|
+
var parsedEvent = (eventNamespace.exec(eventName || "") || []);
|
|
1405
|
+
return {
|
|
1406
|
+
type: parsedEvent[1],
|
|
1407
|
+
ns: ((parsedEvent[2] || "").replace(rRemoveEmptyNs, ".").replace(rRemoveTrailingEmptyNs, "").split(".").sort()).join(".")
|
|
1408
|
+
};
|
|
883
1409
|
}
|
|
884
|
-
function
|
|
885
|
-
if (
|
|
886
|
-
|
|
1410
|
+
function _getRegisteredEvents(target, evtName, addDefault) {
|
|
1411
|
+
if (addDefault === void 0) { addDefault = true; }
|
|
1412
|
+
var aiEvts = elmNodeData.get(target, strEvents, {}, addDefault);
|
|
1413
|
+
var registeredEvents = aiEvts[evtName];
|
|
1414
|
+
if (!registeredEvents) {
|
|
1415
|
+
registeredEvents = aiEvts[evtName] = [];
|
|
887
1416
|
}
|
|
888
|
-
return
|
|
1417
|
+
return registeredEvents;
|
|
889
1418
|
}
|
|
890
|
-
function
|
|
891
|
-
var
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
if (
|
|
898
|
-
|
|
1419
|
+
function _doAttach(obj, evtName, handlerRef, useCapture) {
|
|
1420
|
+
var result = false;
|
|
1421
|
+
if (obj && evtName && evtName.type && handlerRef) {
|
|
1422
|
+
if (obj[strAddEventHelper]) {
|
|
1423
|
+
obj[strAddEventHelper](evtName.type, handlerRef, useCapture);
|
|
1424
|
+
result = true;
|
|
1425
|
+
}
|
|
1426
|
+
else if (obj[strAttachEvent]) {
|
|
1427
|
+
obj[strAttachEvent](strOnPrefix + evtName.type, handlerRef);
|
|
1428
|
+
result = true;
|
|
899
1429
|
}
|
|
900
|
-
value = mwcRandom32() & MaxUInt32;
|
|
901
|
-
}
|
|
902
|
-
else {
|
|
903
|
-
value = Math.floor((UInt32Mask * Math.random()) | 0);
|
|
904
|
-
}
|
|
905
|
-
if (!signed) {
|
|
906
|
-
value >>>= 0;
|
|
907
1430
|
}
|
|
908
|
-
return
|
|
1431
|
+
return result;
|
|
909
1432
|
}
|
|
910
|
-
function
|
|
911
|
-
if (
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
1433
|
+
function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {
|
|
1434
|
+
if (useCapture === void 0) { useCapture = false; }
|
|
1435
|
+
var result = false;
|
|
1436
|
+
if (target) {
|
|
1437
|
+
try {
|
|
1438
|
+
var evtName = _getEvtNamespace(eventName, evtNamespace);
|
|
1439
|
+
result = _doAttach(target, evtName, handlerRef, useCapture);
|
|
1440
|
+
if (result && elmNodeData.accept(target)) {
|
|
1441
|
+
var registeredEvent = {
|
|
1442
|
+
guid: _guid++,
|
|
1443
|
+
evtName: evtName,
|
|
1444
|
+
handler: handlerRef,
|
|
1445
|
+
capture: useCapture
|
|
1446
|
+
};
|
|
1447
|
+
_getRegisteredEvents(target, evtName.type).push(registeredEvent);
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
catch (e) {
|
|
1451
|
+
}
|
|
916
1452
|
}
|
|
1453
|
+
return result;
|
|
917
1454
|
}
|
|
918
|
-
function
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
|
|
922
|
-
if (!signed) {
|
|
923
|
-
value >>>= 0;
|
|
924
|
-
}
|
|
925
|
-
return value;
|
|
1455
|
+
function attachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {
|
|
1456
|
+
if (useCapture === void 0) { useCapture = false; }
|
|
1457
|
+
return eventOn(obj, eventNameWithoutOn, handlerRef, null, useCapture);
|
|
926
1458
|
}
|
|
927
|
-
|
|
928
|
-
var _cookieMgrs = null;
|
|
929
|
-
var _canUseCookies;
|
|
930
|
-
function addEventHandler(eventName, callback) {
|
|
1459
|
+
function addEventHandler(eventName, callback, evtNamespace) {
|
|
931
1460
|
var result = false;
|
|
932
1461
|
var w = getWindow();
|
|
933
1462
|
if (w) {
|
|
934
|
-
result =
|
|
935
|
-
result =
|
|
1463
|
+
result = eventOn(w, eventName, callback, evtNamespace);
|
|
1464
|
+
result = eventOn(w["body"], eventName, callback, evtNamespace) || result;
|
|
936
1465
|
}
|
|
937
1466
|
var doc = getDocument();
|
|
938
1467
|
if (doc) {
|
|
939
|
-
result =
|
|
1468
|
+
result = eventOn(doc, eventName, callback, evtNamespace) || result;
|
|
940
1469
|
}
|
|
941
1470
|
return result;
|
|
942
1471
|
}
|
|
1472
|
+
|
|
1473
|
+
var _cookieMgrs = null;
|
|
1474
|
+
var _canUseCookies;
|
|
943
1475
|
function newGuid() {
|
|
944
1476
|
function randomHexDigit() {
|
|
945
1477
|
return randomValue(15);
|
|
@@ -956,26 +1488,9 @@
|
|
|
956
1488
|
}
|
|
957
1489
|
return dateNow();
|
|
958
1490
|
}
|
|
959
|
-
function newId(maxLength) {
|
|
960
|
-
if (maxLength === void 0) { maxLength = 22; }
|
|
961
|
-
var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
962
|
-
var number = random32() >>> 0;
|
|
963
|
-
var chars = 0;
|
|
964
|
-
var result = "";
|
|
965
|
-
while (result.length < maxLength) {
|
|
966
|
-
chars++;
|
|
967
|
-
result += base64chars.charAt(number & 0x3F);
|
|
968
|
-
number >>>= 6;
|
|
969
|
-
if (chars === 5) {
|
|
970
|
-
number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
|
|
971
|
-
chars = 0;
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
return result;
|
|
975
|
-
}
|
|
976
1491
|
function generateW3CId() {
|
|
977
1492
|
var hexValues = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
|
|
978
|
-
var oct =
|
|
1493
|
+
var oct = strEmpty$1, tmp;
|
|
979
1494
|
for (var a = 0; a < 4; a++) {
|
|
980
1495
|
tmp = random32();
|
|
981
1496
|
oct +=
|
|
@@ -1070,6 +1585,95 @@
|
|
|
1070
1585
|
return _legacyCookieMgr(null, logger).del(name);
|
|
1071
1586
|
}
|
|
1072
1587
|
|
|
1588
|
+
createEnumStyle({
|
|
1589
|
+
CRITICAL: 1 ,
|
|
1590
|
+
WARNING: 2
|
|
1591
|
+
});
|
|
1592
|
+
var _InternalMessageId = createEnumStyle({
|
|
1593
|
+
BrowserDoesNotSupportLocalStorage: 0 ,
|
|
1594
|
+
BrowserCannotReadLocalStorage: 1 ,
|
|
1595
|
+
BrowserCannotReadSessionStorage: 2 ,
|
|
1596
|
+
BrowserCannotWriteLocalStorage: 3 ,
|
|
1597
|
+
BrowserCannotWriteSessionStorage: 4 ,
|
|
1598
|
+
BrowserFailedRemovalFromLocalStorage: 5 ,
|
|
1599
|
+
BrowserFailedRemovalFromSessionStorage: 6 ,
|
|
1600
|
+
CannotSendEmptyTelemetry: 7 ,
|
|
1601
|
+
ClientPerformanceMathError: 8 ,
|
|
1602
|
+
ErrorParsingAISessionCookie: 9 ,
|
|
1603
|
+
ErrorPVCalc: 10 ,
|
|
1604
|
+
ExceptionWhileLoggingError: 11 ,
|
|
1605
|
+
FailedAddingTelemetryToBuffer: 12 ,
|
|
1606
|
+
FailedMonitorAjaxAbort: 13 ,
|
|
1607
|
+
FailedMonitorAjaxDur: 14 ,
|
|
1608
|
+
FailedMonitorAjaxOpen: 15 ,
|
|
1609
|
+
FailedMonitorAjaxRSC: 16 ,
|
|
1610
|
+
FailedMonitorAjaxSend: 17 ,
|
|
1611
|
+
FailedMonitorAjaxGetCorrelationHeader: 18 ,
|
|
1612
|
+
FailedToAddHandlerForOnBeforeUnload: 19 ,
|
|
1613
|
+
FailedToSendQueuedTelemetry: 20 ,
|
|
1614
|
+
FailedToReportDataLoss: 21 ,
|
|
1615
|
+
FlushFailed: 22 ,
|
|
1616
|
+
MessageLimitPerPVExceeded: 23 ,
|
|
1617
|
+
MissingRequiredFieldSpecification: 24 ,
|
|
1618
|
+
NavigationTimingNotSupported: 25 ,
|
|
1619
|
+
OnError: 26 ,
|
|
1620
|
+
SessionRenewalDateIsZero: 27 ,
|
|
1621
|
+
SenderNotInitialized: 28 ,
|
|
1622
|
+
StartTrackEventFailed: 29 ,
|
|
1623
|
+
StopTrackEventFailed: 30 ,
|
|
1624
|
+
StartTrackFailed: 31 ,
|
|
1625
|
+
StopTrackFailed: 32 ,
|
|
1626
|
+
TelemetrySampledAndNotSent: 33 ,
|
|
1627
|
+
TrackEventFailed: 34 ,
|
|
1628
|
+
TrackExceptionFailed: 35 ,
|
|
1629
|
+
TrackMetricFailed: 36 ,
|
|
1630
|
+
TrackPVFailed: 37 ,
|
|
1631
|
+
TrackPVFailedCalc: 38 ,
|
|
1632
|
+
TrackTraceFailed: 39 ,
|
|
1633
|
+
TransmissionFailed: 40 ,
|
|
1634
|
+
FailedToSetStorageBuffer: 41 ,
|
|
1635
|
+
FailedToRestoreStorageBuffer: 42 ,
|
|
1636
|
+
InvalidBackendResponse: 43 ,
|
|
1637
|
+
FailedToFixDepricatedValues: 44 ,
|
|
1638
|
+
InvalidDurationValue: 45 ,
|
|
1639
|
+
TelemetryEnvelopeInvalid: 46 ,
|
|
1640
|
+
CreateEnvelopeError: 47 ,
|
|
1641
|
+
CannotSerializeObject: 48 ,
|
|
1642
|
+
CannotSerializeObjectNonSerializable: 49 ,
|
|
1643
|
+
CircularReferenceDetected: 50 ,
|
|
1644
|
+
ClearAuthContextFailed: 51 ,
|
|
1645
|
+
ExceptionTruncated: 52 ,
|
|
1646
|
+
IllegalCharsInName: 53 ,
|
|
1647
|
+
ItemNotInArray: 54 ,
|
|
1648
|
+
MaxAjaxPerPVExceeded: 55 ,
|
|
1649
|
+
MessageTruncated: 56 ,
|
|
1650
|
+
NameTooLong: 57 ,
|
|
1651
|
+
SampleRateOutOfRange: 58 ,
|
|
1652
|
+
SetAuthContextFailed: 59 ,
|
|
1653
|
+
SetAuthContextFailedAccountName: 60 ,
|
|
1654
|
+
StringValueTooLong: 61 ,
|
|
1655
|
+
StartCalledMoreThanOnce: 62 ,
|
|
1656
|
+
StopCalledWithoutStart: 63 ,
|
|
1657
|
+
TelemetryInitializerFailed: 64 ,
|
|
1658
|
+
TrackArgumentsNotSpecified: 65 ,
|
|
1659
|
+
UrlTooLong: 66 ,
|
|
1660
|
+
SessionStorageBufferFull: 67 ,
|
|
1661
|
+
CannotAccessCookie: 68 ,
|
|
1662
|
+
IdTooLong: 69 ,
|
|
1663
|
+
InvalidEvent: 70 ,
|
|
1664
|
+
FailedMonitorAjaxSetRequestHeader: 71 ,
|
|
1665
|
+
SendBrowserInfoOnUserInit: 72 ,
|
|
1666
|
+
PluginException: 73 ,
|
|
1667
|
+
NotificationException: 74 ,
|
|
1668
|
+
SnippetScriptLoadFailure: 99 ,
|
|
1669
|
+
InvalidInstrumentationKey: 100 ,
|
|
1670
|
+
CannotParseAiBlobValue: 101 ,
|
|
1671
|
+
InvalidContentBlob: 102 ,
|
|
1672
|
+
TrackPageActionEventFailed: 103 ,
|
|
1673
|
+
FailedAddingCustomDefinedRequestContext: 104 ,
|
|
1674
|
+
InMemoryStorageBufferFull: 105
|
|
1675
|
+
});
|
|
1676
|
+
|
|
1073
1677
|
var RequestHeaders = {
|
|
1074
1678
|
requestContextHeader: "Request-Context",
|
|
1075
1679
|
requestContextTargetKey: "appId",
|
|
@@ -1102,7 +1706,7 @@
|
|
|
1102
1706
|
name = strTrim(name.toString());
|
|
1103
1707
|
if (name.length > 150 ) {
|
|
1104
1708
|
nameTrunc = name.substring(0, 150 );
|
|
1105
|
-
logger
|
|
1709
|
+
_throwInternal(logger, 2 , _InternalMessageId.NameTooLong, "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
|
|
1106
1710
|
}
|
|
1107
1711
|
}
|
|
1108
1712
|
return nameTrunc || name;
|
|
@@ -1115,7 +1719,7 @@
|
|
|
1115
1719
|
value = strTrim(value);
|
|
1116
1720
|
if (value.toString().length > maxLength) {
|
|
1117
1721
|
valueTrunc = value.toString().substring(0, maxLength);
|
|
1118
|
-
logger
|
|
1722
|
+
_throwInternal(logger, 2 , _InternalMessageId.StringValueTooLong, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
|
|
1119
1723
|
}
|
|
1120
1724
|
}
|
|
1121
1725
|
return valueTrunc || value;
|
|
@@ -1128,7 +1732,7 @@
|
|
|
1128
1732
|
if (message) {
|
|
1129
1733
|
if (message.length > 32768 ) {
|
|
1130
1734
|
messageTrunc = message.substring(0, 32768 );
|
|
1131
|
-
logger
|
|
1735
|
+
_throwInternal(logger, 2 , _InternalMessageId.MessageTruncated, "message is too long, it has been truncated to " + 32768 + " characters.", { message: message }, true);
|
|
1132
1736
|
}
|
|
1133
1737
|
}
|
|
1134
1738
|
return messageTrunc || message;
|
|
@@ -1139,7 +1743,7 @@
|
|
|
1139
1743
|
var value = "" + exception;
|
|
1140
1744
|
if (value.length > 32768 ) {
|
|
1141
1745
|
exceptionTrunc = value.substring(0, 32768 );
|
|
1142
|
-
logger
|
|
1746
|
+
_throwInternal(logger, 2 , _InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + 32768 + " characters.", { exception: exception }, true);
|
|
1143
1747
|
}
|
|
1144
1748
|
}
|
|
1145
1749
|
return exceptionTrunc || exception;
|
|
@@ -1153,7 +1757,7 @@
|
|
|
1153
1757
|
value = getJSON().stringify(value);
|
|
1154
1758
|
}
|
|
1155
1759
|
catch (e) {
|
|
1156
|
-
logger
|
|
1760
|
+
_throwInternal(logger, 2 , _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e }, true);
|
|
1157
1761
|
}
|
|
1158
1762
|
}
|
|
1159
1763
|
value = dataSanitizeString(logger, value, 8192 );
|
|
@@ -1184,7 +1788,7 @@
|
|
|
1184
1788
|
input = strTrim(input);
|
|
1185
1789
|
if (input.length > maxLength) {
|
|
1186
1790
|
inputTrunc = input.substring(0, maxLength);
|
|
1187
|
-
logger
|
|
1791
|
+
_throwInternal(logger, 2 , _msgId, "input is too long, it has been truncated to " + maxLength + " characters.", { data: input }, true);
|
|
1188
1792
|
}
|
|
1189
1793
|
}
|
|
1190
1794
|
return inputTrunc || input;
|
|
@@ -1230,6 +1834,7 @@
|
|
|
1230
1834
|
return event;
|
|
1231
1835
|
}
|
|
1232
1836
|
|
|
1837
|
+
var strEmpty = "";
|
|
1233
1838
|
function stringToBoolOrDefault(str, defaultValue) {
|
|
1234
1839
|
if (defaultValue === void 0) { defaultValue = false; }
|
|
1235
1840
|
if (str === undefined || str === null) {
|
|
@@ -1242,16 +1847,16 @@
|
|
|
1242
1847
|
totalms = 0;
|
|
1243
1848
|
}
|
|
1244
1849
|
totalms = Math.round(totalms);
|
|
1245
|
-
var ms =
|
|
1246
|
-
var sec =
|
|
1247
|
-
var min =
|
|
1248
|
-
var hour =
|
|
1850
|
+
var ms = strEmpty + totalms % 1000;
|
|
1851
|
+
var sec = strEmpty + Math.floor(totalms / 1000) % 60;
|
|
1852
|
+
var min = strEmpty + Math.floor(totalms / (1000 * 60)) % 60;
|
|
1853
|
+
var hour = strEmpty + Math.floor(totalms / (1000 * 60 * 60)) % 24;
|
|
1249
1854
|
var days = Math.floor(totalms / (1000 * 60 * 60 * 24));
|
|
1250
1855
|
ms = ms.length === 1 ? "00" + ms : ms.length === 2 ? "0" + ms : ms;
|
|
1251
1856
|
sec = sec.length < 2 ? "0" + sec : sec;
|
|
1252
1857
|
min = min.length < 2 ? "0" + min : min;
|
|
1253
1858
|
hour = hour.length < 2 ? "0" + hour : hour;
|
|
1254
|
-
return (days > 0 ? days + "." :
|
|
1859
|
+
return (days > 0 ? days + "." : strEmpty) + hour + ":" + min + ":" + sec + "." + ms;
|
|
1255
1860
|
}
|
|
1256
1861
|
function getExtensionByName(extensions, identifier) {
|
|
1257
1862
|
var extension = null;
|
|
@@ -1275,17 +1880,15 @@
|
|
|
1275
1880
|
var strNotSpecified = "not_specified";
|
|
1276
1881
|
var strIkey = "iKey";
|
|
1277
1882
|
|
|
1278
|
-
var StorageType
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
DistributedTracingModes[DistributedTracingModes["W3C"] = 2] = "W3C";
|
|
1288
|
-
})(exports.DistributedTracingModes || (exports.DistributedTracingModes = {}));
|
|
1883
|
+
var StorageType = createEnumStyle({
|
|
1884
|
+
LocalStorage: 0 ,
|
|
1885
|
+
SessionStorage: 1
|
|
1886
|
+
});
|
|
1887
|
+
var DistributedTracingModes = createEnumStyle({
|
|
1888
|
+
AI: 0 ,
|
|
1889
|
+
AI_AND_W3C: 1 ,
|
|
1890
|
+
W3C: 2
|
|
1891
|
+
});
|
|
1289
1892
|
|
|
1290
1893
|
var _canUseLocalStorage = undefined;
|
|
1291
1894
|
var _canUseSessionStorage = undefined;
|
|
@@ -1323,8 +1926,12 @@
|
|
|
1323
1926
|
_canUseLocalStorage = false;
|
|
1324
1927
|
_canUseSessionStorage = false;
|
|
1325
1928
|
}
|
|
1326
|
-
function
|
|
1327
|
-
|
|
1929
|
+
function utlEnableStorage() {
|
|
1930
|
+
_canUseLocalStorage = utlCanUseLocalStorage(true);
|
|
1931
|
+
_canUseSessionStorage = utlCanUseSessionStorage(true);
|
|
1932
|
+
}
|
|
1933
|
+
function utlCanUseLocalStorage(reset) {
|
|
1934
|
+
if (reset || _canUseLocalStorage === undefined) {
|
|
1328
1935
|
_canUseLocalStorage = !!_getVerifiedStorageObject(StorageType.LocalStorage);
|
|
1329
1936
|
}
|
|
1330
1937
|
return _canUseLocalStorage;
|
|
@@ -1337,7 +1944,7 @@
|
|
|
1337
1944
|
}
|
|
1338
1945
|
catch (e) {
|
|
1339
1946
|
_canUseLocalStorage = false;
|
|
1340
|
-
logger
|
|
1947
|
+
_throwInternal(logger, 2 , _InternalMessageId.BrowserCannotReadLocalStorage, "Browser failed read of local storage. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
1341
1948
|
}
|
|
1342
1949
|
}
|
|
1343
1950
|
return null;
|
|
@@ -1351,7 +1958,7 @@
|
|
|
1351
1958
|
}
|
|
1352
1959
|
catch (e) {
|
|
1353
1960
|
_canUseLocalStorage = false;
|
|
1354
|
-
logger
|
|
1961
|
+
_throwInternal(logger, 2 , _InternalMessageId.BrowserCannotWriteLocalStorage, "Browser failed write to local storage. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
1355
1962
|
}
|
|
1356
1963
|
}
|
|
1357
1964
|
return false;
|
|
@@ -1365,13 +1972,13 @@
|
|
|
1365
1972
|
}
|
|
1366
1973
|
catch (e) {
|
|
1367
1974
|
_canUseLocalStorage = false;
|
|
1368
|
-
logger
|
|
1975
|
+
_throwInternal(logger, 2 , _InternalMessageId.BrowserFailedRemovalFromLocalStorage, "Browser failed removal of local storage item. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
1369
1976
|
}
|
|
1370
1977
|
}
|
|
1371
1978
|
return false;
|
|
1372
1979
|
}
|
|
1373
|
-
function utlCanUseSessionStorage() {
|
|
1374
|
-
if (_canUseSessionStorage === undefined) {
|
|
1980
|
+
function utlCanUseSessionStorage(reset) {
|
|
1981
|
+
if (reset || _canUseSessionStorage === undefined) {
|
|
1375
1982
|
_canUseSessionStorage = !!_getVerifiedStorageObject(StorageType.SessionStorage);
|
|
1376
1983
|
}
|
|
1377
1984
|
return _canUseSessionStorage;
|
|
@@ -1393,7 +2000,7 @@
|
|
|
1393
2000
|
}
|
|
1394
2001
|
catch (e) {
|
|
1395
2002
|
_canUseSessionStorage = false;
|
|
1396
|
-
logger
|
|
2003
|
+
_throwInternal(logger, 2 , _InternalMessageId.BrowserCannotReadSessionStorage, "Browser failed read of session storage. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
1397
2004
|
}
|
|
1398
2005
|
}
|
|
1399
2006
|
return null;
|
|
@@ -1407,7 +2014,7 @@
|
|
|
1407
2014
|
}
|
|
1408
2015
|
catch (e) {
|
|
1409
2016
|
_canUseSessionStorage = false;
|
|
1410
|
-
logger
|
|
2017
|
+
_throwInternal(logger, 2 , _InternalMessageId.BrowserCannotWriteSessionStorage, "Browser failed write to session storage. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
1411
2018
|
}
|
|
1412
2019
|
}
|
|
1413
2020
|
return false;
|
|
@@ -1421,7 +2028,7 @@
|
|
|
1421
2028
|
}
|
|
1422
2029
|
catch (e) {
|
|
1423
2030
|
_canUseSessionStorage = false;
|
|
1424
|
-
logger
|
|
2031
|
+
_throwInternal(logger, 2 , _InternalMessageId.BrowserFailedRemovalFromSessionStorage, "Browser failed removal of session storage item. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
1425
2032
|
}
|
|
1426
2033
|
}
|
|
1427
2034
|
return false;
|
|
@@ -2691,6 +3298,7 @@
|
|
|
2691
3298
|
exports.DataSanitizer = DataSanitizer;
|
|
2692
3299
|
exports.DateTimeUtils = DateTimeUtils;
|
|
2693
3300
|
exports.DisabledPropertyName = DisabledPropertyName;
|
|
3301
|
+
exports.DistributedTracingModes = DistributedTracingModes;
|
|
2694
3302
|
exports.Envelope = Envelope;
|
|
2695
3303
|
exports.Event = Event$1;
|
|
2696
3304
|
exports.Exception = Exception;
|
|
@@ -2740,6 +3348,7 @@
|
|
|
2740
3348
|
exports.utlCanUseLocalStorage = utlCanUseLocalStorage;
|
|
2741
3349
|
exports.utlCanUseSessionStorage = utlCanUseSessionStorage;
|
|
2742
3350
|
exports.utlDisableStorage = utlDisableStorage;
|
|
3351
|
+
exports.utlEnableStorage = utlEnableStorage;
|
|
2743
3352
|
exports.utlGetLocalStorage = utlGetLocalStorage;
|
|
2744
3353
|
exports.utlGetSessionStorage = utlGetSessionStorage;
|
|
2745
3354
|
exports.utlGetSessionStorageKeys = utlGetSessionStorageKeys;
|