@microsoft/applicationinsights-debugplugin-js 2.8.5-nightly.2206-03 → 2.8.5-nightly.2207-01
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/{ai.dbg.2.8.5-nightly.2206-03.cjs.js → ai.dbg.2.8.5-nightly.2207-01.cjs.js} +1092 -984
- package/browser/ai.dbg.2.8.5-nightly.2207-01.cjs.js.map +1 -0
- package/browser/ai.dbg.2.8.5-nightly.2207-01.cjs.min.js +6 -0
- package/browser/ai.dbg.2.8.5-nightly.2207-01.cjs.min.js.map +1 -0
- package/browser/{ai.dbg.2.8.5-nightly.2206-03.gbl.js → ai.dbg.2.8.5-nightly.2207-01.gbl.js} +1092 -984
- package/browser/ai.dbg.2.8.5-nightly.2207-01.gbl.js.map +1 -0
- package/browser/ai.dbg.2.8.5-nightly.2207-01.gbl.min.js +6 -0
- package/browser/ai.dbg.2.8.5-nightly.2207-01.gbl.min.js.map +1 -0
- package/browser/ai.dbg.2.8.5-nightly.2207-01.integrity.json +66 -0
- package/browser/{ai.dbg.2.8.5-nightly.2206-03.js → ai.dbg.2.8.5-nightly.2207-01.js} +1092 -984
- package/browser/ai.dbg.2.8.5-nightly.2207-01.js.map +1 -0
- package/browser/ai.dbg.2.8.5-nightly.2207-01.min.js +6 -0
- package/browser/ai.dbg.2.8.5-nightly.2207-01.min.js.map +1 -0
- package/browser/ai.dbg.2.cjs.js +1091 -983
- package/browser/ai.dbg.2.cjs.js.map +1 -1
- package/browser/ai.dbg.2.cjs.min.js +2 -2
- package/browser/ai.dbg.2.cjs.min.js.map +1 -1
- package/browser/ai.dbg.2.gbl.js +1091 -983
- package/browser/ai.dbg.2.gbl.js.map +1 -1
- package/browser/ai.dbg.2.gbl.min.js +2 -2
- package/browser/ai.dbg.2.gbl.min.js.map +1 -1
- package/browser/ai.dbg.2.js +1091 -983
- package/browser/ai.dbg.2.js.map +1 -1
- package/browser/ai.dbg.2.min.js +2 -2
- package/browser/ai.dbg.2.min.js.map +1 -1
- package/dist/applicationinsights-debugplugin-js.api.json +5 -2
- package/dist/applicationinsights-debugplugin-js.d.ts +1 -1
- package/dist/applicationinsights-debugplugin-js.js +1091 -983
- package/dist/applicationinsights-debugplugin-js.js.map +1 -1
- package/dist/applicationinsights-debugplugin-js.min.js +2 -2
- package/dist/applicationinsights-debugplugin-js.min.js.map +1 -1
- package/dist/applicationinsights-debugplugin-js.rollup.d.ts +1 -1
- package/dist-esm/DebugPlugin.js +44 -43
- package/dist-esm/DebugPlugin.js.map +1 -1
- package/dist-esm/__DynamicConstants.js +55 -0
- package/dist-esm/__DynamicConstants.js.map +1 -0
- package/dist-esm/applicationinsights-debugplugin-js.js +1 -1
- package/dist-esm/components/Dashboard.js +80 -79
- package/dist-esm/components/Dashboard.js.map +1 -1
- package/dist-esm/components/LogEntry.js +12 -11
- package/dist-esm/components/LogEntry.js.map +1 -1
- package/dist-esm/components/debugBins.js +46 -45
- package/dist-esm/components/debugBins.js.map +1 -1
- package/dist-esm/components/filterList.js +52 -51
- package/dist-esm/components/filterList.js.map +1 -1
- package/dist-esm/components/helpers.js +104 -103
- package/dist-esm/components/helpers.js.map +1 -1
- package/dist-esm/components/styleNodeSrc.js +2 -1
- package/dist-esm/components/styleNodeSrc.js.map +1 -1
- package/dist-esm/interfaces/IDebugPluginConfig.js +1 -1
- package/package.json +6 -4
- package/src/DebugPlugin.ts +16 -17
- package/src/__DynamicConstants.ts +53 -0
- package/src/components/Dashboard.ts +8 -8
- package/src/components/LogEntry.ts +5 -6
- package/src/components/debugBins.ts +4 -4
- package/src/components/filterList.ts +6 -6
- package/src/components/helpers.ts +10 -8
- package/src/components/styleNodeSrc.ts +1 -0
- package/types/DebugPlugin.d.ts +1 -1
- package/types/__DynamicConstants.d.ts +41 -0
- package/types/components/LogEntry.d.ts +3 -2
- package/types/tsdoc-metadata.json +1 -1
- package/browser/ai.dbg.2.8.5-nightly.2206-03.cjs.js.map +0 -1
- package/browser/ai.dbg.2.8.5-nightly.2206-03.cjs.min.js +0 -6
- package/browser/ai.dbg.2.8.5-nightly.2206-03.cjs.min.js.map +0 -1
- package/browser/ai.dbg.2.8.5-nightly.2206-03.gbl.js.map +0 -1
- package/browser/ai.dbg.2.8.5-nightly.2206-03.gbl.min.js +0 -6
- package/browser/ai.dbg.2.8.5-nightly.2206-03.gbl.min.js.map +0 -1
- package/browser/ai.dbg.2.8.5-nightly.2206-03.integrity.json +0 -66
- package/browser/ai.dbg.2.8.5-nightly.2206-03.js.map +0 -1
- package/browser/ai.dbg.2.8.5-nightly.2206-03.min.js +0 -6
- package/browser/ai.dbg.2.8.5-nightly.2206-03.min.js.map +0 -1
package/browser/ai.dbg.2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Debug Plugin, 2.8.5-nightly.
|
|
2
|
+
* Application Insights JavaScript SDK - Debug Plugin, 2.8.5-nightly.2207-01
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -85,14 +85,307 @@
|
|
|
85
85
|
d[strShimPrototype] = b === null ? objCreateFn(b) : (__[strShimPrototype] = b[strShimPrototype], new __());
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
var
|
|
93
|
-
var
|
|
94
|
-
var
|
|
95
|
-
var
|
|
88
|
+
/*!
|
|
89
|
+
* Microsoft Dynamic Proto Utility, 1.1.6
|
|
90
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
91
|
+
*/
|
|
92
|
+
var Constructor = 'constructor';
|
|
93
|
+
var Prototype = 'prototype';
|
|
94
|
+
var strFunction = 'function';
|
|
95
|
+
var DynInstFuncTable = '_dynInstFuncs';
|
|
96
|
+
var DynProxyTag = '_isDynProxy';
|
|
97
|
+
var DynClassName = '_dynClass';
|
|
98
|
+
var DynClassNamePrefix = '_dynCls$';
|
|
99
|
+
var DynInstChkTag = '_dynInstChk';
|
|
100
|
+
var DynAllowInstChkTag = DynInstChkTag;
|
|
101
|
+
var DynProtoDefaultOptions = '_dfOpts';
|
|
102
|
+
var UnknownValue = '_unknown_';
|
|
103
|
+
var str__Proto$1 = "__proto__";
|
|
104
|
+
var DynProtoBaseProto = "_dyn" + str__Proto$1;
|
|
105
|
+
var DynProtoCurrent = "_dynInstProto";
|
|
106
|
+
var strUseBaseInst = 'useBaseInst';
|
|
107
|
+
var strSetInstFuncs = 'setInstFuncs';
|
|
108
|
+
var Obj = Object;
|
|
109
|
+
var _objGetPrototypeOf$1 = Obj["getPrototypeOf"];
|
|
110
|
+
var _objGetOwnProps = Obj["getOwnPropertyNames"];
|
|
111
|
+
var _dynamicNames = 0;
|
|
112
|
+
function _hasOwnProperty(obj, prop) {
|
|
113
|
+
return obj && Obj[Prototype].hasOwnProperty.call(obj, prop);
|
|
114
|
+
}
|
|
115
|
+
function _isObjectOrArrayPrototype(target) {
|
|
116
|
+
return target && (target === Obj[Prototype] || target === Array[Prototype]);
|
|
117
|
+
}
|
|
118
|
+
function _isObjectArrayOrFunctionPrototype(target) {
|
|
119
|
+
return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
|
|
120
|
+
}
|
|
121
|
+
function _getObjProto$1(target) {
|
|
122
|
+
var newProto;
|
|
123
|
+
if (target) {
|
|
124
|
+
if (_objGetPrototypeOf$1) {
|
|
125
|
+
return _objGetPrototypeOf$1(target);
|
|
126
|
+
}
|
|
127
|
+
var curProto = target[str__Proto$1] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
|
|
128
|
+
newProto = target[DynProtoBaseProto] || curProto;
|
|
129
|
+
if (!_hasOwnProperty(target, DynProtoBaseProto)) {
|
|
130
|
+
delete target[DynProtoCurrent];
|
|
131
|
+
newProto = target[DynProtoBaseProto] = target[DynProtoCurrent] || target[DynProtoBaseProto];
|
|
132
|
+
target[DynProtoCurrent] = curProto;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return newProto;
|
|
136
|
+
}
|
|
137
|
+
function _forEachProp(target, func) {
|
|
138
|
+
var props = [];
|
|
139
|
+
if (_objGetOwnProps) {
|
|
140
|
+
props = _objGetOwnProps(target);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
for (var name_1 in target) {
|
|
144
|
+
if (typeof name_1 === "string" && _hasOwnProperty(target, name_1)) {
|
|
145
|
+
props.push(name_1);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (props && props.length > 0) {
|
|
150
|
+
for (var lp = 0; lp < props.length; lp++) {
|
|
151
|
+
func(props[lp]);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function _isDynamicCandidate(target, funcName, skipOwn) {
|
|
156
|
+
return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || _hasOwnProperty(target, funcName)));
|
|
157
|
+
}
|
|
158
|
+
function _throwTypeError(message) {
|
|
159
|
+
throw new TypeError("DynamicProto: " + message);
|
|
160
|
+
}
|
|
161
|
+
function _getInstanceFuncs(thisTarget) {
|
|
162
|
+
var instFuncs = {};
|
|
163
|
+
_forEachProp(thisTarget, function (name) {
|
|
164
|
+
if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {
|
|
165
|
+
instFuncs[name] = thisTarget[name];
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
return instFuncs;
|
|
169
|
+
}
|
|
170
|
+
function _hasVisited(values, value) {
|
|
171
|
+
for (var lp = values.length - 1; lp >= 0; lp--) {
|
|
172
|
+
if (values[lp] === value) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
|
|
179
|
+
function _instFuncProxy(target, funcHost, funcName) {
|
|
180
|
+
var theFunc = funcHost[funcName];
|
|
181
|
+
if (theFunc[DynProxyTag] && useBaseInst) {
|
|
182
|
+
var instFuncTable = target[DynInstFuncTable] || {};
|
|
183
|
+
if (instFuncTable[DynAllowInstChkTag] !== false) {
|
|
184
|
+
theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return function () {
|
|
188
|
+
return theFunc.apply(target, arguments);
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
var baseFuncs = {};
|
|
192
|
+
_forEachProp(instFuncs, function (name) {
|
|
193
|
+
baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
|
|
194
|
+
});
|
|
195
|
+
var baseProto = _getObjProto$1(classProto);
|
|
196
|
+
var visited = [];
|
|
197
|
+
while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
|
|
198
|
+
_forEachProp(baseProto, function (name) {
|
|
199
|
+
if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf$1)) {
|
|
200
|
+
baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
visited.push(baseProto);
|
|
204
|
+
baseProto = _getObjProto$1(baseProto);
|
|
205
|
+
}
|
|
206
|
+
return baseFuncs;
|
|
207
|
+
}
|
|
208
|
+
function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
|
|
209
|
+
var instFunc = null;
|
|
210
|
+
if (target && _hasOwnProperty(proto, DynClassName)) {
|
|
211
|
+
var instFuncTable = target[DynInstFuncTable] || {};
|
|
212
|
+
instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];
|
|
213
|
+
if (!instFunc) {
|
|
214
|
+
_throwTypeError("Missing [" + funcName + "] " + strFunction);
|
|
215
|
+
}
|
|
216
|
+
if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
|
|
217
|
+
var canAddInst = !_hasOwnProperty(target, funcName);
|
|
218
|
+
var objProto = _getObjProto$1(target);
|
|
219
|
+
var visited = [];
|
|
220
|
+
while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
|
|
221
|
+
var protoFunc = objProto[funcName];
|
|
222
|
+
if (protoFunc) {
|
|
223
|
+
canAddInst = (protoFunc === currentDynProtoProxy);
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
visited.push(objProto);
|
|
227
|
+
objProto = _getObjProto$1(objProto);
|
|
228
|
+
}
|
|
229
|
+
try {
|
|
230
|
+
if (canAddInst) {
|
|
231
|
+
target[funcName] = instFunc;
|
|
232
|
+
}
|
|
233
|
+
instFunc[DynInstChkTag] = 1;
|
|
234
|
+
}
|
|
235
|
+
catch (e) {
|
|
236
|
+
instFuncTable[DynAllowInstChkTag] = false;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return instFunc;
|
|
241
|
+
}
|
|
242
|
+
function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
|
|
243
|
+
var protoFunc = proto[funcName];
|
|
244
|
+
if (protoFunc === currentDynProtoProxy) {
|
|
245
|
+
protoFunc = _getObjProto$1(proto)[funcName];
|
|
246
|
+
}
|
|
247
|
+
if (typeof protoFunc !== strFunction) {
|
|
248
|
+
_throwTypeError("[" + funcName + "] is not a " + strFunction);
|
|
249
|
+
}
|
|
250
|
+
return protoFunc;
|
|
251
|
+
}
|
|
252
|
+
function _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {
|
|
253
|
+
function _createDynamicPrototype(proto, funcName) {
|
|
254
|
+
var dynProtoProxy = function () {
|
|
255
|
+
var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
|
|
256
|
+
return instFunc.apply(this, arguments);
|
|
257
|
+
};
|
|
258
|
+
dynProtoProxy[DynProxyTag] = 1;
|
|
259
|
+
return dynProtoProxy;
|
|
260
|
+
}
|
|
261
|
+
if (!_isObjectOrArrayPrototype(proto)) {
|
|
262
|
+
var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};
|
|
263
|
+
var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || {});
|
|
264
|
+
if (instFuncTable[DynAllowInstChkTag] !== false) {
|
|
265
|
+
instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
|
|
266
|
+
}
|
|
267
|
+
_forEachProp(target, function (name) {
|
|
268
|
+
if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
|
|
269
|
+
instFuncs_1[name] = target[name];
|
|
270
|
+
delete target[name];
|
|
271
|
+
if (!_hasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
|
|
272
|
+
proto[name] = _createDynamicPrototype(proto, name);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
function _checkPrototype(classProto, thisTarget) {
|
|
279
|
+
if (_objGetPrototypeOf$1) {
|
|
280
|
+
var visited = [];
|
|
281
|
+
var thisProto = _getObjProto$1(thisTarget);
|
|
282
|
+
while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
|
|
283
|
+
if (thisProto === classProto) {
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
visited.push(thisProto);
|
|
287
|
+
thisProto = _getObjProto$1(thisProto);
|
|
288
|
+
}
|
|
289
|
+
return false;
|
|
290
|
+
}
|
|
291
|
+
return true;
|
|
292
|
+
}
|
|
293
|
+
function _getObjName(target, unknownValue) {
|
|
294
|
+
if (_hasOwnProperty(target, Prototype)) {
|
|
295
|
+
return target.name || unknownValue || UnknownValue;
|
|
296
|
+
}
|
|
297
|
+
return (((target || {})[Constructor]) || {}).name || unknownValue || UnknownValue;
|
|
298
|
+
}
|
|
299
|
+
function dynamicProto(theClass, target, delegateFunc, options) {
|
|
300
|
+
if (!_hasOwnProperty(theClass, Prototype)) {
|
|
301
|
+
_throwTypeError("theClass is an invalid class definition.");
|
|
302
|
+
}
|
|
303
|
+
var classProto = theClass[Prototype];
|
|
304
|
+
if (!_checkPrototype(classProto, target)) {
|
|
305
|
+
_throwTypeError("[" + _getObjName(theClass) + "] is not in class hierarchy of [" + _getObjName(target) + "]");
|
|
306
|
+
}
|
|
307
|
+
var className = null;
|
|
308
|
+
if (_hasOwnProperty(classProto, DynClassName)) {
|
|
309
|
+
className = classProto[DynClassName];
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
className = DynClassNamePrefix + _getObjName(theClass, "_") + "$" + _dynamicNames;
|
|
313
|
+
_dynamicNames++;
|
|
314
|
+
classProto[DynClassName] = className;
|
|
315
|
+
}
|
|
316
|
+
var perfOptions = dynamicProto[DynProtoDefaultOptions];
|
|
317
|
+
var useBaseInst = !!perfOptions[strUseBaseInst];
|
|
318
|
+
if (useBaseInst && options && options[strUseBaseInst] !== undefined) {
|
|
319
|
+
useBaseInst = !!options[strUseBaseInst];
|
|
320
|
+
}
|
|
321
|
+
var instFuncs = _getInstanceFuncs(target);
|
|
322
|
+
var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);
|
|
323
|
+
delegateFunc(target, baseFuncs);
|
|
324
|
+
var setInstanceFunc = !!_objGetPrototypeOf$1 && !!perfOptions[strSetInstFuncs];
|
|
325
|
+
if (setInstanceFunc && options) {
|
|
326
|
+
setInstanceFunc = !!options[strSetInstFuncs];
|
|
327
|
+
}
|
|
328
|
+
_populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);
|
|
329
|
+
}
|
|
330
|
+
var perfDefaults = {
|
|
331
|
+
setInstFuncs: true,
|
|
332
|
+
useBaseInst: true
|
|
333
|
+
};
|
|
334
|
+
dynamicProto[DynProtoDefaultOptions] = perfDefaults;
|
|
335
|
+
|
|
336
|
+
var _DYN_INITIALIZE = "initialize";
|
|
337
|
+
var _DYN_NAME$1 = "name";
|
|
338
|
+
var _DYN_IDENTIFIER$1 = "identifier";
|
|
339
|
+
var _DYN_PUSH$1 = "push";
|
|
340
|
+
var _DYN_IS_INITIALIZED = "isInitialized";
|
|
341
|
+
var _DYN_CONFIG = "config";
|
|
342
|
+
var _DYN_LOGGER = "logger";
|
|
343
|
+
var _DYN_LENGTH$2 = "length";
|
|
344
|
+
var _DYN_TIME = "time";
|
|
345
|
+
var _DYN_PROCESS_NEXT = "processNext";
|
|
346
|
+
var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
|
|
347
|
+
var _DYN_GET_PLUGIN = "getPlugin";
|
|
348
|
+
var _DYN_SPLICE = "splice";
|
|
349
|
+
var _DYN_TEARDOWN = "teardown";
|
|
350
|
+
var _DYN_MESSAGE_ID = "messageId";
|
|
351
|
+
var _DYN_MESSAGE = "message";
|
|
352
|
+
var _DYN_IS_ASYNC = "isAsync";
|
|
353
|
+
var _DYN__DO_TEARDOWN = "_doTeardown";
|
|
354
|
+
var _DYN_UPDATE = "update";
|
|
355
|
+
var _DYN_GET_NEXT = "getNext";
|
|
356
|
+
var _DYN_DIAG_LOG = "diagLog";
|
|
357
|
+
var _DYN_SET_NEXT_PLUGIN = "setNextPlugin";
|
|
358
|
+
var _DYN_CREATE_NEW = "createNew";
|
|
359
|
+
var _DYN_COOKIE_CFG = "cookieCfg";
|
|
360
|
+
var _DYN_INDEX_OF = "indexOf";
|
|
361
|
+
var _DYN_SUBSTRING$1 = "substring";
|
|
362
|
+
var _DYN_USER_AGENT = "userAgent";
|
|
363
|
+
var _DYN_SPLIT = "split";
|
|
364
|
+
var _DYN_SET_ENABLED = "setEnabled";
|
|
365
|
+
var _DYN_REPLACE$1 = "replace";
|
|
366
|
+
var _DYN_SUBSTR = "substr";
|
|
367
|
+
var _DYN_NODE_TYPE = "nodeType";
|
|
368
|
+
var _DYN_APPLY = "apply";
|
|
369
|
+
var _DYN_ENABLE_DEBUG_EXCEPTI4 = "enableDebugExceptions";
|
|
370
|
+
var _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
|
|
371
|
+
var _DYN_TO_LOWER_CASE$1 = "toLowerCase";
|
|
372
|
+
var _DYN_CALL = "call";
|
|
373
|
+
var _DYN_TYPE = "type";
|
|
374
|
+
var _DYN_HANDLER = "handler";
|
|
375
|
+
var _DYN_IS_CHILD_EVT = "isChildEvt";
|
|
376
|
+
var _DYN_GET_CTX = "getCtx";
|
|
377
|
+
var _DYN_SET_CTX = "setCtx";
|
|
378
|
+
var _DYN_COMPLETE = "complete";
|
|
379
|
+
|
|
380
|
+
var STR_EMPTY = "";
|
|
381
|
+
var STR_CORE = "core";
|
|
382
|
+
var STR_DISABLED = "disabled";
|
|
383
|
+
var STR_EXTENSION_CONFIG = "extensionConfig";
|
|
384
|
+
var STR_PROCESS_TELEMETRY = "processTelemetry";
|
|
385
|
+
var STR_PRIORITY = "priority";
|
|
386
|
+
var STR_ERROR_TO_CONSOLE = "errorToConsole";
|
|
387
|
+
var STR_WARN_TO_CONSOLE = "warnToConsole";
|
|
388
|
+
var STR_GET_PERF_MGR = "getPerfMgr";
|
|
96
389
|
|
|
97
390
|
var strToISOString = "toISOString";
|
|
98
391
|
var cStrEndsWith = "endsWith";
|
|
@@ -101,7 +394,7 @@
|
|
|
101
394
|
var strReduce = "reduce";
|
|
102
395
|
var cStrTrim = "trim";
|
|
103
396
|
var strToString = "toString";
|
|
104
|
-
var str__Proto
|
|
397
|
+
var str__Proto = "__proto__";
|
|
105
398
|
var strConstructor$1 = "constructor";
|
|
106
399
|
var _objDefineProperty$1 = ObjDefineProperty;
|
|
107
400
|
var _objFreeze = ObjClass.freeze;
|
|
@@ -114,17 +407,17 @@
|
|
|
114
407
|
var _isArray = Array.isArray;
|
|
115
408
|
var _objToString = ObjProto[strToString];
|
|
116
409
|
var _fnToString = ObjHasOwnProperty[strToString];
|
|
117
|
-
var _objFunctionString = _fnToString
|
|
410
|
+
var _objFunctionString = _fnToString[_DYN_CALL ](ObjClass);
|
|
118
411
|
var rCamelCase = /-([a-z])/g;
|
|
119
412
|
var rNormalizeInvalid = /([^\w\d_$])/g;
|
|
120
413
|
var rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
121
|
-
var _objGetPrototypeOf
|
|
122
|
-
function _getObjProto
|
|
414
|
+
var _objGetPrototypeOf = Object["getPrototypeOf"];
|
|
415
|
+
function _getObjProto(target) {
|
|
123
416
|
if (target) {
|
|
124
|
-
if (_objGetPrototypeOf
|
|
125
|
-
return _objGetPrototypeOf
|
|
417
|
+
if (_objGetPrototypeOf) {
|
|
418
|
+
return _objGetPrototypeOf(target);
|
|
126
419
|
}
|
|
127
|
-
var newProto = target[str__Proto
|
|
420
|
+
var newProto = target[str__Proto] || target[strShimPrototype] || target[strConstructor$1];
|
|
128
421
|
if (newProto) {
|
|
129
422
|
return newProto;
|
|
130
423
|
}
|
|
@@ -132,7 +425,7 @@
|
|
|
132
425
|
return null;
|
|
133
426
|
}
|
|
134
427
|
function objToString(obj) {
|
|
135
|
-
return _objToString
|
|
428
|
+
return _objToString[_DYN_CALL ](obj);
|
|
136
429
|
}
|
|
137
430
|
function isTypeof(value, theType) {
|
|
138
431
|
return typeof value === theType;
|
|
@@ -147,7 +440,7 @@
|
|
|
147
440
|
return !isNullOrUndefined(value);
|
|
148
441
|
}
|
|
149
442
|
function hasOwnProperty(obj, prop) {
|
|
150
|
-
return !!(obj && ObjHasOwnProperty
|
|
443
|
+
return !!(obj && ObjHasOwnProperty[_DYN_CALL ](obj, prop));
|
|
151
444
|
}
|
|
152
445
|
function isObject(value) {
|
|
153
446
|
return !!(value && typeof value === strShimObject);
|
|
@@ -158,11 +451,11 @@
|
|
|
158
451
|
function normalizeJsName(name) {
|
|
159
452
|
var value = name;
|
|
160
453
|
if (value && isString(value)) {
|
|
161
|
-
value = value
|
|
454
|
+
value = value[_DYN_REPLACE$1 ](rCamelCase, function (_all, letter) {
|
|
162
455
|
return letter.toUpperCase();
|
|
163
456
|
});
|
|
164
|
-
value = value
|
|
165
|
-
value = value
|
|
457
|
+
value = value[_DYN_REPLACE$1 ](rNormalizeInvalid, "_");
|
|
458
|
+
value = value[_DYN_REPLACE$1 ](rLeadingNumeric, function (_all, match) {
|
|
166
459
|
return "_" + match;
|
|
167
460
|
});
|
|
168
461
|
}
|
|
@@ -171,8 +464,8 @@
|
|
|
171
464
|
function objForEachKey(target, callbackfn) {
|
|
172
465
|
if (target) {
|
|
173
466
|
for (var prop in target) {
|
|
174
|
-
if (ObjHasOwnProperty
|
|
175
|
-
callbackfn
|
|
467
|
+
if (ObjHasOwnProperty[_DYN_CALL ](target, prop)) {
|
|
468
|
+
callbackfn[_DYN_CALL ](target, prop, target[prop]);
|
|
176
469
|
}
|
|
177
470
|
}
|
|
178
471
|
}
|
|
@@ -186,8 +479,8 @@
|
|
|
186
479
|
}
|
|
187
480
|
function _strEndsWithPoly(value, search) {
|
|
188
481
|
var result = false;
|
|
189
|
-
var searchLen = search ? search
|
|
190
|
-
var valLen = value ? value
|
|
482
|
+
var searchLen = search ? search[_DYN_LENGTH$2 ] : 0;
|
|
483
|
+
var valLen = value ? value[_DYN_LENGTH$2 ] : 0;
|
|
191
484
|
if (searchLen && valLen && valLen >= searchLen && !(result = value === search)) {
|
|
192
485
|
var pos = valLen - 1;
|
|
193
486
|
for (var lp = searchLen - 1; lp >= 0; lp--) {
|
|
@@ -202,19 +495,19 @@
|
|
|
202
495
|
}
|
|
203
496
|
function strContains(value, search) {
|
|
204
497
|
if (value && search) {
|
|
205
|
-
return value
|
|
498
|
+
return value[_DYN_INDEX_OF ](search) !== -1;
|
|
206
499
|
}
|
|
207
500
|
return false;
|
|
208
501
|
}
|
|
209
502
|
function isDate(obj) {
|
|
210
|
-
return !!(obj && _objToString
|
|
503
|
+
return !!(obj && _objToString[_DYN_CALL ](obj) === "[object Date]");
|
|
211
504
|
}
|
|
212
505
|
var isArray = _isArray || _isArrayPoly;
|
|
213
506
|
function _isArrayPoly(obj) {
|
|
214
|
-
return !!(obj && _objToString
|
|
507
|
+
return !!(obj && _objToString[_DYN_CALL ](obj) === "[object Array]");
|
|
215
508
|
}
|
|
216
509
|
function isError(obj) {
|
|
217
|
-
return !!(obj && _objToString
|
|
510
|
+
return !!(obj && _objToString[_DYN_CALL ](obj) === "[object Error]");
|
|
218
511
|
}
|
|
219
512
|
function isString(value) {
|
|
220
513
|
return typeof value === "string";
|
|
@@ -231,15 +524,15 @@
|
|
|
231
524
|
function isPlainObject(value) {
|
|
232
525
|
var result = false;
|
|
233
526
|
if (value && typeof value === "object") {
|
|
234
|
-
var proto = _objGetPrototypeOf
|
|
527
|
+
var proto = _objGetPrototypeOf ? _objGetPrototypeOf(value) : _getObjProto(value);
|
|
235
528
|
if (!proto) {
|
|
236
529
|
result = true;
|
|
237
530
|
}
|
|
238
531
|
else {
|
|
239
|
-
if (proto[strConstructor$1] && ObjHasOwnProperty
|
|
532
|
+
if (proto[strConstructor$1] && ObjHasOwnProperty[_DYN_CALL ](proto, strConstructor$1)) {
|
|
240
533
|
proto = proto[strConstructor$1];
|
|
241
534
|
}
|
|
242
|
-
result = typeof proto === strShimFunction && _fnToString
|
|
535
|
+
result = typeof proto === strShimFunction && _fnToString[_DYN_CALL ](proto) === _objFunctionString;
|
|
243
536
|
}
|
|
244
537
|
}
|
|
245
538
|
return result;
|
|
@@ -253,7 +546,7 @@
|
|
|
253
546
|
if (date && date.getUTCFullYear) {
|
|
254
547
|
var pad = function (num) {
|
|
255
548
|
var r = String(num);
|
|
256
|
-
if (r
|
|
549
|
+
if (r[_DYN_LENGTH$2 ] === 1) {
|
|
257
550
|
r = "0" + r;
|
|
258
551
|
}
|
|
259
552
|
return r;
|
|
@@ -269,11 +562,11 @@
|
|
|
269
562
|
}
|
|
270
563
|
}
|
|
271
564
|
function arrForEach(arr, callbackfn, thisArg) {
|
|
272
|
-
var len = arr
|
|
565
|
+
var len = arr[_DYN_LENGTH$2 ];
|
|
273
566
|
try {
|
|
274
567
|
for (var idx = 0; idx < len; idx++) {
|
|
275
568
|
if (idx in arr) {
|
|
276
|
-
if (callbackfn
|
|
569
|
+
if (callbackfn[_DYN_CALL ](thisArg || arr, arr[idx], idx, arr) === -1) {
|
|
277
570
|
break;
|
|
278
571
|
}
|
|
279
572
|
}
|
|
@@ -287,7 +580,7 @@
|
|
|
287
580
|
if (arr[strIndexOf]) {
|
|
288
581
|
return arr[strIndexOf](searchElement, fromIndex);
|
|
289
582
|
}
|
|
290
|
-
var len = arr
|
|
583
|
+
var len = arr[_DYN_LENGTH$2 ];
|
|
291
584
|
var from = fromIndex || 0;
|
|
292
585
|
try {
|
|
293
586
|
for (var lp = Math.max(from >= 0 ? from : len - Math.abs(from), 0); lp < len; lp++) {
|
|
@@ -307,13 +600,13 @@
|
|
|
307
600
|
if (arr[strMap]) {
|
|
308
601
|
return arr[strMap](callbackfn, thisArg);
|
|
309
602
|
}
|
|
310
|
-
var len = arr
|
|
603
|
+
var len = arr[_DYN_LENGTH$2 ];
|
|
311
604
|
var _this = thisArg || arr;
|
|
312
605
|
results = new Array(len);
|
|
313
606
|
try {
|
|
314
607
|
for (var lp = 0; lp < len; lp++) {
|
|
315
608
|
if (lp in arr) {
|
|
316
|
-
results[lp] = callbackfn
|
|
609
|
+
results[lp] = callbackfn[_DYN_CALL ](_this, arr[lp], arr);
|
|
317
610
|
}
|
|
318
611
|
}
|
|
319
612
|
}
|
|
@@ -328,9 +621,9 @@
|
|
|
328
621
|
if (arr[strReduce]) {
|
|
329
622
|
return arr[strReduce](callbackfn, initialValue);
|
|
330
623
|
}
|
|
331
|
-
var len = arr
|
|
624
|
+
var len = arr[_DYN_LENGTH$2 ];
|
|
332
625
|
var lp = 0;
|
|
333
|
-
if (arguments
|
|
626
|
+
if (arguments[_DYN_LENGTH$2 ] >= 3) {
|
|
334
627
|
value = arguments[2];
|
|
335
628
|
}
|
|
336
629
|
else {
|
|
@@ -350,7 +643,7 @@
|
|
|
350
643
|
}
|
|
351
644
|
function strTrim(str) {
|
|
352
645
|
if (str) {
|
|
353
|
-
str = (_strTrim && str[cStrTrim]) ? str[cStrTrim]() : (str
|
|
646
|
+
str = (_strTrim && str[cStrTrim]) ? str[cStrTrim]() : (str[_DYN_REPLACE$1 ] ? str[_DYN_REPLACE$1 ](/^\s+|\s+$/g, STR_EMPTY) : str);
|
|
354
647
|
}
|
|
355
648
|
return str;
|
|
356
649
|
}
|
|
@@ -374,15 +667,15 @@
|
|
|
374
667
|
}
|
|
375
668
|
var result = [];
|
|
376
669
|
for (var prop in obj) {
|
|
377
|
-
if (obj && ObjHasOwnProperty
|
|
378
|
-
result
|
|
670
|
+
if (obj && ObjHasOwnProperty[_DYN_CALL ](obj, prop)) {
|
|
671
|
+
result[_DYN_PUSH$1 ](prop);
|
|
379
672
|
}
|
|
380
673
|
}
|
|
381
674
|
if (_objKeysHasDontEnumBug) {
|
|
382
|
-
var dontEnumsLength = _objKeysDontEnums
|
|
675
|
+
var dontEnumsLength = _objKeysDontEnums[_DYN_LENGTH$2 ];
|
|
383
676
|
for (var lp = 0; lp < dontEnumsLength; lp++) {
|
|
384
|
-
if (obj && ObjHasOwnProperty
|
|
385
|
-
result
|
|
677
|
+
if (obj && ObjHasOwnProperty[_DYN_CALL ](obj, _objKeysDontEnums[lp])) {
|
|
678
|
+
result[_DYN_PUSH$1 ](_objKeysDontEnums[lp]);
|
|
386
679
|
}
|
|
387
680
|
}
|
|
388
681
|
}
|
|
@@ -429,9 +722,9 @@
|
|
|
429
722
|
}
|
|
430
723
|
function getExceptionName(object) {
|
|
431
724
|
if (isError(object)) {
|
|
432
|
-
return object
|
|
725
|
+
return object[_DYN_NAME$1 ];
|
|
433
726
|
}
|
|
434
|
-
return
|
|
727
|
+
return STR_EMPTY;
|
|
435
728
|
}
|
|
436
729
|
function setValue(target, field, value, valChk, srcChk) {
|
|
437
730
|
var theValue = value;
|
|
@@ -444,6 +737,9 @@
|
|
|
444
737
|
}
|
|
445
738
|
return theValue;
|
|
446
739
|
}
|
|
740
|
+
function getCfgValue(theValue, defaultValue) {
|
|
741
|
+
return !isNullOrUndefined(theValue) ? theValue : defaultValue;
|
|
742
|
+
}
|
|
447
743
|
function isTruthy(value) {
|
|
448
744
|
return !!value;
|
|
449
745
|
}
|
|
@@ -462,7 +758,7 @@
|
|
|
462
758
|
src = srcFunc();
|
|
463
759
|
}
|
|
464
760
|
if (src) {
|
|
465
|
-
return src[funcName]
|
|
761
|
+
return src[funcName][_DYN_APPLY ](src, originalArguments);
|
|
466
762
|
}
|
|
467
763
|
};
|
|
468
764
|
}
|
|
@@ -476,7 +772,7 @@
|
|
|
476
772
|
function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {
|
|
477
773
|
var theArgs = arguments;
|
|
478
774
|
var extended = theArgs[0] || {};
|
|
479
|
-
var argLen = theArgs
|
|
775
|
+
var argLen = theArgs[_DYN_LENGTH$2 ];
|
|
480
776
|
var deep = false;
|
|
481
777
|
var idx = 1;
|
|
482
778
|
if (argLen > 0 && isBoolean(extended)) {
|
|
@@ -492,7 +788,7 @@
|
|
|
492
788
|
var isArgArray = isArray(arg);
|
|
493
789
|
var isArgObj = isObject(arg);
|
|
494
790
|
for (var prop in arg) {
|
|
495
|
-
var propOk = (isArgArray && (prop in arg)) || (isArgObj && (ObjHasOwnProperty
|
|
791
|
+
var propOk = (isArgArray && (prop in arg)) || (isArgObj && (ObjHasOwnProperty[_DYN_CALL ](arg, prop)));
|
|
496
792
|
if (!propOk) {
|
|
497
793
|
continue;
|
|
498
794
|
}
|
|
@@ -506,274 +802,26 @@
|
|
|
506
802
|
}
|
|
507
803
|
}
|
|
508
804
|
else if (!isPlainObject(clone)) {
|
|
509
|
-
clone = {};
|
|
510
|
-
}
|
|
511
|
-
newValue = objExtend(deep, clone, newValue);
|
|
512
|
-
}
|
|
513
|
-
if (newValue !== undefined) {
|
|
514
|
-
extended[prop] = newValue;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
return extended;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
function createEnumStyle(values) {
|
|
522
|
-
var enumClass = {};
|
|
523
|
-
objForEachKey(values, function (field, value) {
|
|
524
|
-
enumClass[field] = value;
|
|
525
|
-
enumClass[value] = field;
|
|
526
|
-
});
|
|
527
|
-
return deepFreeze(enumClass);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
/*!
|
|
531
|
-
* Microsoft Dynamic Proto Utility, 1.1.6
|
|
532
|
-
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
533
|
-
*/
|
|
534
|
-
var Constructor = 'constructor';
|
|
535
|
-
var Prototype = 'prototype';
|
|
536
|
-
var strFunction = 'function';
|
|
537
|
-
var DynInstFuncTable = '_dynInstFuncs';
|
|
538
|
-
var DynProxyTag = '_isDynProxy';
|
|
539
|
-
var DynClassName = '_dynClass';
|
|
540
|
-
var DynClassNamePrefix = '_dynCls$';
|
|
541
|
-
var DynInstChkTag = '_dynInstChk';
|
|
542
|
-
var DynAllowInstChkTag = DynInstChkTag;
|
|
543
|
-
var DynProtoDefaultOptions = '_dfOpts';
|
|
544
|
-
var UnknownValue = '_unknown_';
|
|
545
|
-
var str__Proto = "__proto__";
|
|
546
|
-
var DynProtoBaseProto = "_dyn" + str__Proto;
|
|
547
|
-
var DynProtoCurrent = "_dynInstProto";
|
|
548
|
-
var strUseBaseInst = 'useBaseInst';
|
|
549
|
-
var strSetInstFuncs = 'setInstFuncs';
|
|
550
|
-
var Obj = Object;
|
|
551
|
-
var _objGetPrototypeOf = Obj["getPrototypeOf"];
|
|
552
|
-
var _objGetOwnProps = Obj["getOwnPropertyNames"];
|
|
553
|
-
var _dynamicNames = 0;
|
|
554
|
-
function _hasOwnProperty(obj, prop) {
|
|
555
|
-
return obj && Obj[Prototype].hasOwnProperty.call(obj, prop);
|
|
556
|
-
}
|
|
557
|
-
function _isObjectOrArrayPrototype(target) {
|
|
558
|
-
return target && (target === Obj[Prototype] || target === Array[Prototype]);
|
|
559
|
-
}
|
|
560
|
-
function _isObjectArrayOrFunctionPrototype(target) {
|
|
561
|
-
return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
|
|
562
|
-
}
|
|
563
|
-
function _getObjProto(target) {
|
|
564
|
-
var newProto;
|
|
565
|
-
if (target) {
|
|
566
|
-
if (_objGetPrototypeOf) {
|
|
567
|
-
return _objGetPrototypeOf(target);
|
|
568
|
-
}
|
|
569
|
-
var curProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
|
|
570
|
-
newProto = target[DynProtoBaseProto] || curProto;
|
|
571
|
-
if (!_hasOwnProperty(target, DynProtoBaseProto)) {
|
|
572
|
-
delete target[DynProtoCurrent];
|
|
573
|
-
newProto = target[DynProtoBaseProto] = target[DynProtoCurrent] || target[DynProtoBaseProto];
|
|
574
|
-
target[DynProtoCurrent] = curProto;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
return newProto;
|
|
578
|
-
}
|
|
579
|
-
function _forEachProp(target, func) {
|
|
580
|
-
var props = [];
|
|
581
|
-
if (_objGetOwnProps) {
|
|
582
|
-
props = _objGetOwnProps(target);
|
|
583
|
-
}
|
|
584
|
-
else {
|
|
585
|
-
for (var name_1 in target) {
|
|
586
|
-
if (typeof name_1 === "string" && _hasOwnProperty(target, name_1)) {
|
|
587
|
-
props.push(name_1);
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
if (props && props.length > 0) {
|
|
592
|
-
for (var lp = 0; lp < props.length; lp++) {
|
|
593
|
-
func(props[lp]);
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
function _isDynamicCandidate(target, funcName, skipOwn) {
|
|
598
|
-
return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || _hasOwnProperty(target, funcName)));
|
|
599
|
-
}
|
|
600
|
-
function _throwTypeError(message) {
|
|
601
|
-
throw new TypeError("DynamicProto: " + message);
|
|
602
|
-
}
|
|
603
|
-
function _getInstanceFuncs(thisTarget) {
|
|
604
|
-
var instFuncs = {};
|
|
605
|
-
_forEachProp(thisTarget, function (name) {
|
|
606
|
-
if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {
|
|
607
|
-
instFuncs[name] = thisTarget[name];
|
|
608
|
-
}
|
|
609
|
-
});
|
|
610
|
-
return instFuncs;
|
|
611
|
-
}
|
|
612
|
-
function _hasVisited(values, value) {
|
|
613
|
-
for (var lp = values.length - 1; lp >= 0; lp--) {
|
|
614
|
-
if (values[lp] === value) {
|
|
615
|
-
return true;
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
return false;
|
|
619
|
-
}
|
|
620
|
-
function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
|
|
621
|
-
function _instFuncProxy(target, funcHost, funcName) {
|
|
622
|
-
var theFunc = funcHost[funcName];
|
|
623
|
-
if (theFunc[DynProxyTag] && useBaseInst) {
|
|
624
|
-
var instFuncTable = target[DynInstFuncTable] || {};
|
|
625
|
-
if (instFuncTable[DynAllowInstChkTag] !== false) {
|
|
626
|
-
theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
return function () {
|
|
630
|
-
return theFunc.apply(target, arguments);
|
|
631
|
-
};
|
|
632
|
-
}
|
|
633
|
-
var baseFuncs = {};
|
|
634
|
-
_forEachProp(instFuncs, function (name) {
|
|
635
|
-
baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
|
|
636
|
-
});
|
|
637
|
-
var baseProto = _getObjProto(classProto);
|
|
638
|
-
var visited = [];
|
|
639
|
-
while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
|
|
640
|
-
_forEachProp(baseProto, function (name) {
|
|
641
|
-
if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {
|
|
642
|
-
baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
|
|
643
|
-
}
|
|
644
|
-
});
|
|
645
|
-
visited.push(baseProto);
|
|
646
|
-
baseProto = _getObjProto(baseProto);
|
|
647
|
-
}
|
|
648
|
-
return baseFuncs;
|
|
649
|
-
}
|
|
650
|
-
function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
|
|
651
|
-
var instFunc = null;
|
|
652
|
-
if (target && _hasOwnProperty(proto, DynClassName)) {
|
|
653
|
-
var instFuncTable = target[DynInstFuncTable] || {};
|
|
654
|
-
instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];
|
|
655
|
-
if (!instFunc) {
|
|
656
|
-
_throwTypeError("Missing [" + funcName + "] " + strFunction);
|
|
657
|
-
}
|
|
658
|
-
if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
|
|
659
|
-
var canAddInst = !_hasOwnProperty(target, funcName);
|
|
660
|
-
var objProto = _getObjProto(target);
|
|
661
|
-
var visited = [];
|
|
662
|
-
while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
|
|
663
|
-
var protoFunc = objProto[funcName];
|
|
664
|
-
if (protoFunc) {
|
|
665
|
-
canAddInst = (protoFunc === currentDynProtoProxy);
|
|
666
|
-
break;
|
|
667
|
-
}
|
|
668
|
-
visited.push(objProto);
|
|
669
|
-
objProto = _getObjProto(objProto);
|
|
670
|
-
}
|
|
671
|
-
try {
|
|
672
|
-
if (canAddInst) {
|
|
673
|
-
target[funcName] = instFunc;
|
|
674
|
-
}
|
|
675
|
-
instFunc[DynInstChkTag] = 1;
|
|
676
|
-
}
|
|
677
|
-
catch (e) {
|
|
678
|
-
instFuncTable[DynAllowInstChkTag] = false;
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
return instFunc;
|
|
683
|
-
}
|
|
684
|
-
function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
|
|
685
|
-
var protoFunc = proto[funcName];
|
|
686
|
-
if (protoFunc === currentDynProtoProxy) {
|
|
687
|
-
protoFunc = _getObjProto(proto)[funcName];
|
|
688
|
-
}
|
|
689
|
-
if (typeof protoFunc !== strFunction) {
|
|
690
|
-
_throwTypeError("[" + funcName + "] is not a " + strFunction);
|
|
691
|
-
}
|
|
692
|
-
return protoFunc;
|
|
693
|
-
}
|
|
694
|
-
function _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {
|
|
695
|
-
function _createDynamicPrototype(proto, funcName) {
|
|
696
|
-
var dynProtoProxy = function () {
|
|
697
|
-
var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
|
|
698
|
-
return instFunc.apply(this, arguments);
|
|
699
|
-
};
|
|
700
|
-
dynProtoProxy[DynProxyTag] = 1;
|
|
701
|
-
return dynProtoProxy;
|
|
702
|
-
}
|
|
703
|
-
if (!_isObjectOrArrayPrototype(proto)) {
|
|
704
|
-
var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};
|
|
705
|
-
var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || {});
|
|
706
|
-
if (instFuncTable[DynAllowInstChkTag] !== false) {
|
|
707
|
-
instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
|
|
708
|
-
}
|
|
709
|
-
_forEachProp(target, function (name) {
|
|
710
|
-
if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
|
|
711
|
-
instFuncs_1[name] = target[name];
|
|
712
|
-
delete target[name];
|
|
713
|
-
if (!_hasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
|
|
714
|
-
proto[name] = _createDynamicPrototype(proto, name);
|
|
805
|
+
clone = {};
|
|
715
806
|
}
|
|
807
|
+
newValue = objExtend(deep, clone, newValue);
|
|
716
808
|
}
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
}
|
|
720
|
-
function _checkPrototype(classProto, thisTarget) {
|
|
721
|
-
if (_objGetPrototypeOf) {
|
|
722
|
-
var visited = [];
|
|
723
|
-
var thisProto = _getObjProto(thisTarget);
|
|
724
|
-
while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
|
|
725
|
-
if (thisProto === classProto) {
|
|
726
|
-
return true;
|
|
809
|
+
if (newValue !== undefined) {
|
|
810
|
+
extended[prop] = newValue;
|
|
727
811
|
}
|
|
728
|
-
visited.push(thisProto);
|
|
729
|
-
thisProto = _getObjProto(thisProto);
|
|
730
812
|
}
|
|
731
|
-
return false;
|
|
732
|
-
}
|
|
733
|
-
return true;
|
|
734
|
-
}
|
|
735
|
-
function _getObjName(target, unknownValue) {
|
|
736
|
-
if (_hasOwnProperty(target, Prototype)) {
|
|
737
|
-
return target.name || unknownValue || UnknownValue;
|
|
738
813
|
}
|
|
739
|
-
return
|
|
814
|
+
return extended;
|
|
740
815
|
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
var className = null;
|
|
750
|
-
if (_hasOwnProperty(classProto, DynClassName)) {
|
|
751
|
-
className = classProto[DynClassName];
|
|
752
|
-
}
|
|
753
|
-
else {
|
|
754
|
-
className = DynClassNamePrefix + _getObjName(theClass, "_") + "$" + _dynamicNames;
|
|
755
|
-
_dynamicNames++;
|
|
756
|
-
classProto[DynClassName] = className;
|
|
757
|
-
}
|
|
758
|
-
var perfOptions = dynamicProto[DynProtoDefaultOptions];
|
|
759
|
-
var useBaseInst = !!perfOptions[strUseBaseInst];
|
|
760
|
-
if (useBaseInst && options && options[strUseBaseInst] !== undefined) {
|
|
761
|
-
useBaseInst = !!options[strUseBaseInst];
|
|
762
|
-
}
|
|
763
|
-
var instFuncs = _getInstanceFuncs(target);
|
|
764
|
-
var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);
|
|
765
|
-
delegateFunc(target, baseFuncs);
|
|
766
|
-
var setInstanceFunc = !!_objGetPrototypeOf && !!perfOptions[strSetInstFuncs];
|
|
767
|
-
if (setInstanceFunc && options) {
|
|
768
|
-
setInstanceFunc = !!options[strSetInstFuncs];
|
|
769
|
-
}
|
|
770
|
-
_populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);
|
|
816
|
+
|
|
817
|
+
function createEnumStyle(values) {
|
|
818
|
+
var enumClass = {};
|
|
819
|
+
objForEachKey(values, function (field, value) {
|
|
820
|
+
enumClass[field] = value;
|
|
821
|
+
enumClass[value] = field;
|
|
822
|
+
});
|
|
823
|
+
return deepFreeze(enumClass);
|
|
771
824
|
}
|
|
772
|
-
var perfDefaults = {
|
|
773
|
-
setInstFuncs: true,
|
|
774
|
-
useBaseInst: true
|
|
775
|
-
};
|
|
776
|
-
dynamicProto[DynProtoDefaultOptions] = perfDefaults;
|
|
777
825
|
|
|
778
826
|
var strWindow = "window";
|
|
779
827
|
var strDocument = "document";
|
|
@@ -866,9 +914,9 @@
|
|
|
866
914
|
}
|
|
867
915
|
function isIE() {
|
|
868
916
|
var nav = getNavigator();
|
|
869
|
-
if (nav && (nav
|
|
870
|
-
_navUserAgentCheck = nav
|
|
871
|
-
var userAgent = (_navUserAgentCheck ||
|
|
917
|
+
if (nav && (nav[_DYN_USER_AGENT ] !== _navUserAgentCheck || _isTrident === null)) {
|
|
918
|
+
_navUserAgentCheck = nav[_DYN_USER_AGENT ];
|
|
919
|
+
var userAgent = (_navUserAgentCheck || STR_EMPTY)[_DYN_TO_LOWER_CASE$1 ]();
|
|
872
920
|
_isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
|
|
873
921
|
}
|
|
874
922
|
return _isTrident;
|
|
@@ -877,15 +925,15 @@
|
|
|
877
925
|
if (userAgentStr === void 0) { userAgentStr = null; }
|
|
878
926
|
if (!userAgentStr) {
|
|
879
927
|
var navigator_1 = getNavigator() || {};
|
|
880
|
-
userAgentStr = navigator_1 ? (navigator_1
|
|
928
|
+
userAgentStr = navigator_1 ? (navigator_1[_DYN_USER_AGENT ] || STR_EMPTY)[_DYN_TO_LOWER_CASE$1 ]() : STR_EMPTY;
|
|
881
929
|
}
|
|
882
|
-
var ua = (userAgentStr ||
|
|
930
|
+
var ua = (userAgentStr || STR_EMPTY)[_DYN_TO_LOWER_CASE$1 ]();
|
|
883
931
|
if (strContains(ua, strMsie)) {
|
|
884
932
|
var doc = getDocument() || {};
|
|
885
|
-
return Math.max(parseInt(ua
|
|
933
|
+
return Math.max(parseInt(ua[_DYN_SPLIT ](strMsie)[1]), (doc[strDocumentMode] || 0));
|
|
886
934
|
}
|
|
887
935
|
else if (strContains(ua, strTrident)) {
|
|
888
|
-
var tridentVer = parseInt(ua
|
|
936
|
+
var tridentVer = parseInt(ua[_DYN_SPLIT ](strTrident)[1]);
|
|
889
937
|
if (tridentVer) {
|
|
890
938
|
return tridentVer + 4;
|
|
891
939
|
}
|
|
@@ -893,10 +941,10 @@
|
|
|
893
941
|
return null;
|
|
894
942
|
}
|
|
895
943
|
function dumpObj(object) {
|
|
896
|
-
var objectTypeDump = Object[strShimPrototype].toString
|
|
897
|
-
var propertyValueDump =
|
|
944
|
+
var objectTypeDump = Object[strShimPrototype].toString[_DYN_CALL ](object);
|
|
945
|
+
var propertyValueDump = STR_EMPTY;
|
|
898
946
|
if (objectTypeDump === "[object Error]") {
|
|
899
|
-
propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object
|
|
947
|
+
propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object[_DYN_NAME$1 ] + "'";
|
|
900
948
|
}
|
|
901
949
|
else if (hasJSON()) {
|
|
902
950
|
propertyValueDump = getJSON().stringify(object);
|
|
@@ -929,13 +977,11 @@
|
|
|
929
977
|
var AiNonUserActionablePrefix = "AI (Internal): ";
|
|
930
978
|
var AiUserActionablePrefix = "AI: ";
|
|
931
979
|
var AIInternalMessagePrefix = "AITR_";
|
|
932
|
-
var strErrorToConsole = "errorToConsole";
|
|
933
|
-
var strWarnToConsole = "warnToConsole";
|
|
934
980
|
function _sanitizeDiagnosticText(text) {
|
|
935
981
|
if (text) {
|
|
936
|
-
return "\"" + text
|
|
982
|
+
return "\"" + text[_DYN_REPLACE$1 ](/\"/g, STR_EMPTY) + "\"";
|
|
937
983
|
}
|
|
938
|
-
return
|
|
984
|
+
return STR_EMPTY;
|
|
939
985
|
}
|
|
940
986
|
function _logToConsole(func, message) {
|
|
941
987
|
var theConsole = getConsole();
|
|
@@ -953,23 +999,23 @@
|
|
|
953
999
|
function _InternalLogMessage(msgId, msg, isUserAct, properties) {
|
|
954
1000
|
if (isUserAct === void 0) { isUserAct = false; }
|
|
955
1001
|
var _self = this;
|
|
956
|
-
_self
|
|
957
|
-
_self
|
|
1002
|
+
_self[_DYN_MESSAGE_ID ] = msgId;
|
|
1003
|
+
_self[_DYN_MESSAGE ] =
|
|
958
1004
|
(isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
|
|
959
1005
|
msgId;
|
|
960
|
-
var strProps =
|
|
1006
|
+
var strProps = STR_EMPTY;
|
|
961
1007
|
if (hasJSON()) {
|
|
962
1008
|
strProps = getJSON().stringify(properties);
|
|
963
1009
|
}
|
|
964
|
-
var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) :
|
|
965
|
-
(properties ? " props:" + _sanitizeDiagnosticText(strProps) :
|
|
966
|
-
_self
|
|
1010
|
+
var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
|
|
1011
|
+
(properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
|
|
1012
|
+
_self[_DYN_MESSAGE ] += diagnosticText;
|
|
967
1013
|
}
|
|
968
1014
|
_InternalLogMessage.dataType = "MessageData";
|
|
969
1015
|
return _InternalLogMessage;
|
|
970
1016
|
}());
|
|
971
1017
|
function safeGetLogger(core, config) {
|
|
972
|
-
return (core || {})
|
|
1018
|
+
return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
|
|
973
1019
|
}
|
|
974
1020
|
var DiagnosticLogger = /** @class */ (function () {
|
|
975
1021
|
function DiagnosticLogger(config) {
|
|
@@ -977,48 +1023,49 @@
|
|
|
977
1023
|
this.queue = [];
|
|
978
1024
|
var _messageCount = 0;
|
|
979
1025
|
var _messageLogged = {};
|
|
1026
|
+
var _loggingLevelConsole;
|
|
1027
|
+
var _loggingLevelTelemetry;
|
|
1028
|
+
var _maxInternalMessageLimit;
|
|
1029
|
+
var _enableDebugExceptions;
|
|
980
1030
|
dynamicProto(DiagnosticLogger, this, function (_self) {
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
}
|
|
984
|
-
_self.
|
|
985
|
-
_self
|
|
986
|
-
_self.maxInternalMessageLimit = function () { return _getConfigValue("maxMessageLimit", 25); };
|
|
987
|
-
_self.enableDebugExceptions = function () { return _getConfigValue("enableDebugExceptions", false); };
|
|
1031
|
+
_setDefaultsFromConfig(config || {});
|
|
1032
|
+
_self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
|
|
1033
|
+
_self.telemetryLoggingLevel = function () { return _loggingLevelTelemetry; };
|
|
1034
|
+
_self.maxInternalMessageLimit = function () { return _maxInternalMessageLimit; };
|
|
1035
|
+
_self[_DYN_ENABLE_DEBUG_EXCEPTI4 ] = function () { return _enableDebugExceptions; };
|
|
988
1036
|
_self.throwInternal = function (severity, msgId, msg, properties, isUserAct) {
|
|
989
1037
|
if (isUserAct === void 0) { isUserAct = false; }
|
|
990
1038
|
var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
|
|
991
|
-
if (
|
|
1039
|
+
if (_enableDebugExceptions) {
|
|
992
1040
|
throw dumpObj(message);
|
|
993
1041
|
}
|
|
994
1042
|
else {
|
|
995
|
-
var logFunc = severity === 1 ?
|
|
996
|
-
if (!isUndefined(message
|
|
997
|
-
var logLevel = _self.consoleLoggingLevel();
|
|
1043
|
+
var logFunc = severity === 1 ? STR_ERROR_TO_CONSOLE : STR_WARN_TO_CONSOLE;
|
|
1044
|
+
if (!isUndefined(message[_DYN_MESSAGE ])) {
|
|
998
1045
|
if (isUserAct) {
|
|
999
|
-
var messageKey = +message
|
|
1000
|
-
if (!_messageLogged[messageKey] &&
|
|
1001
|
-
_self[logFunc](message
|
|
1046
|
+
var messageKey = +message[_DYN_MESSAGE_ID ];
|
|
1047
|
+
if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
|
|
1048
|
+
_self[logFunc](message[_DYN_MESSAGE ]);
|
|
1002
1049
|
_messageLogged[messageKey] = true;
|
|
1003
1050
|
}
|
|
1004
1051
|
}
|
|
1005
1052
|
else {
|
|
1006
|
-
if (
|
|
1007
|
-
_self[logFunc](message
|
|
1053
|
+
if (_loggingLevelConsole >= severity) {
|
|
1054
|
+
_self[logFunc](message[_DYN_MESSAGE ]);
|
|
1008
1055
|
}
|
|
1009
1056
|
}
|
|
1010
|
-
|
|
1057
|
+
_logInternalMessage(severity, message);
|
|
1011
1058
|
}
|
|
1012
1059
|
else {
|
|
1013
1060
|
_debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
|
|
1014
1061
|
}
|
|
1015
1062
|
}
|
|
1016
1063
|
};
|
|
1017
|
-
_self
|
|
1064
|
+
_self[STR_WARN_TO_CONSOLE ] = function (message) {
|
|
1018
1065
|
_logToConsole("warn", message);
|
|
1019
1066
|
_debugExtMsg("warning", message);
|
|
1020
1067
|
};
|
|
1021
|
-
_self
|
|
1068
|
+
_self[STR_ERROR_TO_CONSOLE ] = function (message) {
|
|
1022
1069
|
_logToConsole("error", message);
|
|
1023
1070
|
_debugExtMsg("error", message);
|
|
1024
1071
|
};
|
|
@@ -1026,12 +1073,13 @@
|
|
|
1026
1073
|
_messageCount = 0;
|
|
1027
1074
|
_messageLogged = {};
|
|
1028
1075
|
};
|
|
1029
|
-
_self
|
|
1076
|
+
_self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
|
|
1077
|
+
function _logInternalMessage(severity, message) {
|
|
1030
1078
|
if (_areInternalMessagesThrottled()) {
|
|
1031
1079
|
return;
|
|
1032
1080
|
}
|
|
1033
1081
|
var logMessage = true;
|
|
1034
|
-
var messageKey = AIInternalMessagePrefix + message
|
|
1082
|
+
var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
|
|
1035
1083
|
if (_messageLogged[messageKey]) {
|
|
1036
1084
|
logMessage = false;
|
|
1037
1085
|
}
|
|
@@ -1039,38 +1087,37 @@
|
|
|
1039
1087
|
_messageLogged[messageKey] = true;
|
|
1040
1088
|
}
|
|
1041
1089
|
if (logMessage) {
|
|
1042
|
-
if (severity <=
|
|
1043
|
-
_self.queue
|
|
1090
|
+
if (severity <= _loggingLevelTelemetry) {
|
|
1091
|
+
_self.queue[_DYN_PUSH$1 ](message);
|
|
1044
1092
|
_messageCount++;
|
|
1045
1093
|
_debugExtMsg((severity === 1 ? "error" : "warn"), message);
|
|
1046
1094
|
}
|
|
1047
|
-
if (_messageCount ===
|
|
1095
|
+
if (_messageCount === _maxInternalMessageLimit) {
|
|
1048
1096
|
var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
|
|
1049
1097
|
var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
|
|
1050
|
-
_self.queue
|
|
1098
|
+
_self.queue[_DYN_PUSH$1 ](throttleMessage);
|
|
1051
1099
|
if (severity === 1 ) {
|
|
1052
|
-
_self
|
|
1100
|
+
_self[STR_ERROR_TO_CONSOLE ](throttleLimitMessage);
|
|
1053
1101
|
}
|
|
1054
1102
|
else {
|
|
1055
|
-
_self
|
|
1103
|
+
_self[STR_WARN_TO_CONSOLE ](throttleLimitMessage);
|
|
1056
1104
|
}
|
|
1057
1105
|
}
|
|
1058
1106
|
}
|
|
1059
|
-
}
|
|
1060
|
-
function
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
return defValue;
|
|
1107
|
+
}
|
|
1108
|
+
function _setDefaultsFromConfig(config) {
|
|
1109
|
+
_loggingLevelConsole = getCfgValue(config.loggingLevelConsole, 0);
|
|
1110
|
+
_loggingLevelTelemetry = getCfgValue(config.loggingLevelTelemetry, 1);
|
|
1111
|
+
_maxInternalMessageLimit = getCfgValue(config.maxMessageLimit, 25);
|
|
1112
|
+
_enableDebugExceptions = getCfgValue(config[_DYN_ENABLE_DEBUG_EXCEPTI4 ], false);
|
|
1066
1113
|
}
|
|
1067
1114
|
function _areInternalMessagesThrottled() {
|
|
1068
|
-
return _messageCount >=
|
|
1115
|
+
return _messageCount >= _maxInternalMessageLimit;
|
|
1069
1116
|
}
|
|
1070
1117
|
function _debugExtMsg(name, data) {
|
|
1071
|
-
var dbgExt = getDebugExt(config);
|
|
1072
|
-
if (dbgExt && dbgExt
|
|
1073
|
-
dbgExt
|
|
1118
|
+
var dbgExt = getDebugExt(config || {});
|
|
1119
|
+
if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
|
|
1120
|
+
dbgExt[_DYN_DIAG_LOG ](name, data);
|
|
1074
1121
|
}
|
|
1075
1122
|
}
|
|
1076
1123
|
});
|
|
@@ -1078,20 +1125,25 @@
|
|
|
1078
1125
|
DiagnosticLogger.__ieDyn=1;
|
|
1079
1126
|
return DiagnosticLogger;
|
|
1080
1127
|
}());
|
|
1128
|
+
function _getLogger(logger) {
|
|
1129
|
+
return (logger || new DiagnosticLogger());
|
|
1130
|
+
}
|
|
1081
1131
|
function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
|
|
1082
1132
|
if (isUserAct === void 0) { isUserAct = false; }
|
|
1083
|
-
(logger
|
|
1133
|
+
_getLogger(logger).throwInternal(severity, msgId, msg, properties, isUserAct);
|
|
1084
1134
|
}
|
|
1085
1135
|
|
|
1086
1136
|
var strExecutionContextKey = "ctx";
|
|
1137
|
+
var strParentContextKey = "ParentContextKey";
|
|
1138
|
+
var strChildrenContextKey = "ChildrenContextKey";
|
|
1087
1139
|
var PerfEvent = /** @class */ (function () {
|
|
1088
1140
|
function PerfEvent(name, payloadDetails, isAsync) {
|
|
1089
1141
|
var _self = this;
|
|
1090
1142
|
var accessorDefined = false;
|
|
1091
1143
|
_self.start = dateNow();
|
|
1092
|
-
_self
|
|
1093
|
-
_self
|
|
1094
|
-
_self
|
|
1144
|
+
_self[_DYN_NAME$1 ] = name;
|
|
1145
|
+
_self[_DYN_IS_ASYNC ] = isAsync;
|
|
1146
|
+
_self[_DYN_IS_CHILD_EVT ] = function () { return false; };
|
|
1095
1147
|
if (isFunction(payloadDetails)) {
|
|
1096
1148
|
var theDetails_1;
|
|
1097
1149
|
accessorDefined = objDefineAccessors(_self, "payload", function () {
|
|
@@ -1102,24 +1154,24 @@
|
|
|
1102
1154
|
return theDetails_1;
|
|
1103
1155
|
});
|
|
1104
1156
|
}
|
|
1105
|
-
_self
|
|
1157
|
+
_self[_DYN_GET_CTX ] = function (key) {
|
|
1106
1158
|
if (key) {
|
|
1107
|
-
if (key === PerfEvent
|
|
1159
|
+
if (key === PerfEvent[strParentContextKey] || key === PerfEvent[strChildrenContextKey]) {
|
|
1108
1160
|
return _self[key];
|
|
1109
1161
|
}
|
|
1110
1162
|
return (_self[strExecutionContextKey] || {})[key];
|
|
1111
1163
|
}
|
|
1112
1164
|
return null;
|
|
1113
1165
|
};
|
|
1114
|
-
_self
|
|
1166
|
+
_self[_DYN_SET_CTX ] = function (key, value) {
|
|
1115
1167
|
if (key) {
|
|
1116
|
-
if (key === PerfEvent
|
|
1168
|
+
if (key === PerfEvent[strParentContextKey]) {
|
|
1117
1169
|
if (!_self[key]) {
|
|
1118
|
-
_self
|
|
1170
|
+
_self[_DYN_IS_CHILD_EVT ] = function () { return true; };
|
|
1119
1171
|
}
|
|
1120
1172
|
_self[key] = value;
|
|
1121
1173
|
}
|
|
1122
|
-
else if (key === PerfEvent
|
|
1174
|
+
else if (key === PerfEvent[strChildrenContextKey]) {
|
|
1123
1175
|
_self[key] = value;
|
|
1124
1176
|
}
|
|
1125
1177
|
else {
|
|
@@ -1128,20 +1180,20 @@
|
|
|
1128
1180
|
}
|
|
1129
1181
|
}
|
|
1130
1182
|
};
|
|
1131
|
-
_self
|
|
1183
|
+
_self[_DYN_COMPLETE ] = function () {
|
|
1132
1184
|
var childTime = 0;
|
|
1133
|
-
var childEvts = _self
|
|
1185
|
+
var childEvts = _self[_DYN_GET_CTX ](PerfEvent[strChildrenContextKey]);
|
|
1134
1186
|
if (isArray(childEvts)) {
|
|
1135
|
-
for (var lp = 0; lp < childEvts
|
|
1187
|
+
for (var lp = 0; lp < childEvts[_DYN_LENGTH$2 ]; lp++) {
|
|
1136
1188
|
var childEvt = childEvts[lp];
|
|
1137
1189
|
if (childEvt) {
|
|
1138
|
-
childTime += childEvt
|
|
1190
|
+
childTime += childEvt[_DYN_TIME ];
|
|
1139
1191
|
}
|
|
1140
1192
|
}
|
|
1141
1193
|
}
|
|
1142
|
-
_self
|
|
1143
|
-
_self.exTime = _self
|
|
1144
|
-
_self
|
|
1194
|
+
_self[_DYN_TIME ] = dateNow() - _self.start;
|
|
1195
|
+
_self.exTime = _self[_DYN_TIME ] - childTime;
|
|
1196
|
+
_self[_DYN_COMPLETE ] = function () { };
|
|
1145
1197
|
if (!accessorDefined && isFunction(payloadDetails)) {
|
|
1146
1198
|
_self.payload = payloadDetails();
|
|
1147
1199
|
}
|
|
@@ -1155,40 +1207,40 @@
|
|
|
1155
1207
|
function doPerf(mgrSource, getSource, func, details, isAsync) {
|
|
1156
1208
|
if (mgrSource) {
|
|
1157
1209
|
var perfMgr = mgrSource;
|
|
1158
|
-
if (
|
|
1159
|
-
perfMgr = perfMgr[
|
|
1210
|
+
if (perfMgr[STR_GET_PERF_MGR]) {
|
|
1211
|
+
perfMgr = perfMgr[STR_GET_PERF_MGR]();
|
|
1160
1212
|
}
|
|
1161
1213
|
if (perfMgr) {
|
|
1162
1214
|
var perfEvt = void 0;
|
|
1163
|
-
var currentActive = perfMgr
|
|
1215
|
+
var currentActive = perfMgr[_DYN_GET_CTX ](doPerfActiveKey);
|
|
1164
1216
|
try {
|
|
1165
1217
|
perfEvt = perfMgr.create(getSource(), details, isAsync);
|
|
1166
1218
|
if (perfEvt) {
|
|
1167
|
-
if (currentActive && perfEvt
|
|
1168
|
-
perfEvt
|
|
1169
|
-
if (currentActive
|
|
1170
|
-
var children = currentActive
|
|
1219
|
+
if (currentActive && perfEvt[_DYN_SET_CTX ]) {
|
|
1220
|
+
perfEvt[_DYN_SET_CTX ](PerfEvent[strParentContextKey], currentActive);
|
|
1221
|
+
if (currentActive[_DYN_GET_CTX ] && currentActive[_DYN_SET_CTX ]) {
|
|
1222
|
+
var children = currentActive[_DYN_GET_CTX ](PerfEvent[strChildrenContextKey]);
|
|
1171
1223
|
if (!children) {
|
|
1172
1224
|
children = [];
|
|
1173
|
-
currentActive
|
|
1225
|
+
currentActive[_DYN_SET_CTX ](PerfEvent[strChildrenContextKey], children);
|
|
1174
1226
|
}
|
|
1175
|
-
children
|
|
1227
|
+
children[_DYN_PUSH$1 ](perfEvt);
|
|
1176
1228
|
}
|
|
1177
1229
|
}
|
|
1178
|
-
perfMgr
|
|
1230
|
+
perfMgr[_DYN_SET_CTX ](doPerfActiveKey, perfEvt);
|
|
1179
1231
|
return func(perfEvt);
|
|
1180
1232
|
}
|
|
1181
1233
|
}
|
|
1182
1234
|
catch (ex) {
|
|
1183
|
-
if (perfEvt && perfEvt
|
|
1184
|
-
perfEvt
|
|
1235
|
+
if (perfEvt && perfEvt[_DYN_SET_CTX ]) {
|
|
1236
|
+
perfEvt[_DYN_SET_CTX ]("exception", ex);
|
|
1185
1237
|
}
|
|
1186
1238
|
}
|
|
1187
1239
|
finally {
|
|
1188
1240
|
if (perfEvt) {
|
|
1189
1241
|
perfMgr.fire(perfEvt);
|
|
1190
1242
|
}
|
|
1191
|
-
perfMgr
|
|
1243
|
+
perfMgr[_DYN_SET_CTX ](doPerfActiveKey, currentActive);
|
|
1192
1244
|
}
|
|
1193
1245
|
}
|
|
1194
1246
|
}
|
|
@@ -1264,8 +1316,8 @@
|
|
|
1264
1316
|
var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1265
1317
|
var number = random32() >>> 0;
|
|
1266
1318
|
var chars = 0;
|
|
1267
|
-
var result =
|
|
1268
|
-
while (result
|
|
1319
|
+
var result = STR_EMPTY;
|
|
1320
|
+
while (result[_DYN_LENGTH$2 ] < maxLength) {
|
|
1269
1321
|
chars++;
|
|
1270
1322
|
result += base64chars.charAt(number & 0x3F);
|
|
1271
1323
|
number >>>= 6;
|
|
@@ -1278,7 +1330,7 @@
|
|
|
1278
1330
|
}
|
|
1279
1331
|
|
|
1280
1332
|
var _objDefineProperty = ObjDefineProperty;
|
|
1281
|
-
var version = "2.8.5-nightly.
|
|
1333
|
+
var version = "2.8.5-nightly.2207-01";
|
|
1282
1334
|
var instanceName = "." + newId(6);
|
|
1283
1335
|
var _dataUid = 0;
|
|
1284
1336
|
function _createAccessor(target, prop, value) {
|
|
@@ -1297,7 +1349,7 @@
|
|
|
1297
1349
|
return false;
|
|
1298
1350
|
}
|
|
1299
1351
|
function _canAcceptData(target) {
|
|
1300
|
-
return target
|
|
1352
|
+
return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
|
|
1301
1353
|
}
|
|
1302
1354
|
function _getCache(data, target) {
|
|
1303
1355
|
var theCache = target[data.id];
|
|
@@ -1317,11 +1369,11 @@
|
|
|
1317
1369
|
}
|
|
1318
1370
|
function createUniqueNamespace(name, includeVersion) {
|
|
1319
1371
|
if (includeVersion === void 0) { includeVersion = false; }
|
|
1320
|
-
return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version :
|
|
1372
|
+
return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : STR_EMPTY) + instanceName);
|
|
1321
1373
|
}
|
|
1322
1374
|
function createElmNodeData(name) {
|
|
1323
1375
|
var data = {
|
|
1324
|
-
id: createUniqueNamespace("_aiData-" + (name ||
|
|
1376
|
+
id: createUniqueNamespace("_aiData-" + (name || STR_EMPTY) + "." + version),
|
|
1325
1377
|
accept: function (target) {
|
|
1326
1378
|
return _canAcceptData(target);
|
|
1327
1379
|
},
|
|
@@ -1378,7 +1430,7 @@
|
|
|
1378
1430
|
return true;
|
|
1379
1431
|
}
|
|
1380
1432
|
function _createCookieMgrConfig(rootConfig) {
|
|
1381
|
-
var cookieMgrCfg = rootConfig
|
|
1433
|
+
var cookieMgrCfg = rootConfig[_DYN_COOKIE_CFG ] = rootConfig[_DYN_COOKIE_CFG ] || {};
|
|
1382
1434
|
setValue(cookieMgrCfg, "domain", rootConfig.cookieDomain, isNotNullOrUndefined, isNullOrUndefined);
|
|
1383
1435
|
setValue(cookieMgrCfg, "path", rootConfig.cookiePath || "/", null, isNullOrUndefined);
|
|
1384
1436
|
if (isNullOrUndefined(cookieMgrCfg[strEnabled])) {
|
|
@@ -1394,31 +1446,33 @@
|
|
|
1394
1446
|
return cookieMgrCfg;
|
|
1395
1447
|
}
|
|
1396
1448
|
function createCookieMgr(rootConfig, logger) {
|
|
1449
|
+
var _a;
|
|
1397
1450
|
var cookieMgrConfig = _createCookieMgrConfig(rootConfig || _globalCookieConfig);
|
|
1398
1451
|
var _path = cookieMgrConfig.path || "/";
|
|
1399
1452
|
var _domain = cookieMgrConfig.domain;
|
|
1400
1453
|
var _enabled = cookieMgrConfig[strEnabled] !== false;
|
|
1401
|
-
var cookieMgr = {
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1454
|
+
var cookieMgr = (_a = {
|
|
1455
|
+
isEnabled: function () {
|
|
1456
|
+
var enabled = _enabled && areCookiesSupported(logger);
|
|
1457
|
+
var gblManager = _globalCookieConfig[strConfigCookieMgr];
|
|
1458
|
+
if (enabled && gblManager && cookieMgr !== gblManager) {
|
|
1459
|
+
enabled = _isMgrEnabled(gblManager);
|
|
1460
|
+
}
|
|
1461
|
+
return enabled;
|
|
1462
|
+
}
|
|
1409
1463
|
},
|
|
1410
|
-
|
|
1464
|
+
_a[_DYN_SET_ENABLED ] = function (value) {
|
|
1411
1465
|
_enabled = value !== false;
|
|
1412
1466
|
},
|
|
1413
|
-
set
|
|
1467
|
+
_a.set = function (name, value, maxAgeSec, domain, path) {
|
|
1414
1468
|
var result = false;
|
|
1415
1469
|
if (_isMgrEnabled(cookieMgr)) {
|
|
1416
1470
|
var values = {};
|
|
1417
|
-
var theValue = strTrim(value ||
|
|
1418
|
-
var idx = theValue
|
|
1471
|
+
var theValue = strTrim(value || STR_EMPTY);
|
|
1472
|
+
var idx = theValue[_DYN_INDEX_OF ](";");
|
|
1419
1473
|
if (idx !== -1) {
|
|
1420
|
-
theValue = strTrim(value
|
|
1421
|
-
values = _extractParts(value
|
|
1474
|
+
theValue = strTrim(value[_DYN_SUBSTRING$1 ](0, idx));
|
|
1475
|
+
values = _extractParts(value[_DYN_SUBSTRING$1 ](idx + 1));
|
|
1422
1476
|
}
|
|
1423
1477
|
setValue(values, "domain", domain || _domain, isTruthy, isUndefined);
|
|
1424
1478
|
if (!isNullOrUndefined(maxAgeSec)) {
|
|
@@ -1429,18 +1483,18 @@
|
|
|
1429
1483
|
if (expireMs > 0) {
|
|
1430
1484
|
var expiry = new Date();
|
|
1431
1485
|
expiry.setTime(expireMs);
|
|
1432
|
-
setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) ||
|
|
1486
|
+
setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || STR_EMPTY, isTruthy);
|
|
1433
1487
|
}
|
|
1434
1488
|
}
|
|
1435
1489
|
if (!_isIE) {
|
|
1436
|
-
setValue(values, "max-age",
|
|
1490
|
+
setValue(values, "max-age", STR_EMPTY + maxAgeSec, null, isUndefined);
|
|
1437
1491
|
}
|
|
1438
1492
|
}
|
|
1439
1493
|
var location_1 = getLocation();
|
|
1440
1494
|
if (location_1 && location_1.protocol === "https:") {
|
|
1441
1495
|
setValue(values, "secure", null, null, isUndefined);
|
|
1442
1496
|
if (_allowUaSameSite === null) {
|
|
1443
|
-
_allowUaSameSite = !uaDisallowsSameSiteNone((getNavigator() || {})
|
|
1497
|
+
_allowUaSameSite = !uaDisallowsSameSiteNone((getNavigator() || {})[_DYN_USER_AGENT ]);
|
|
1444
1498
|
}
|
|
1445
1499
|
if (_allowUaSameSite) {
|
|
1446
1500
|
setValue(values, "SameSite", "None", null, isUndefined);
|
|
@@ -1453,21 +1507,21 @@
|
|
|
1453
1507
|
}
|
|
1454
1508
|
return result;
|
|
1455
1509
|
},
|
|
1456
|
-
get
|
|
1457
|
-
var value =
|
|
1510
|
+
_a.get = function (name) {
|
|
1511
|
+
var value = STR_EMPTY;
|
|
1458
1512
|
if (_isMgrEnabled(cookieMgr)) {
|
|
1459
1513
|
value = (cookieMgrConfig.getCookie || _getCookieValue)(name);
|
|
1460
1514
|
}
|
|
1461
1515
|
return value;
|
|
1462
1516
|
},
|
|
1463
|
-
del
|
|
1517
|
+
_a.del = function (name, path) {
|
|
1464
1518
|
var result = false;
|
|
1465
1519
|
if (_isMgrEnabled(cookieMgr)) {
|
|
1466
1520
|
result = cookieMgr.purge(name, path);
|
|
1467
1521
|
}
|
|
1468
1522
|
return result;
|
|
1469
1523
|
},
|
|
1470
|
-
purge
|
|
1524
|
+
_a.purge = function (name, path) {
|
|
1471
1525
|
var _a;
|
|
1472
1526
|
var result = false;
|
|
1473
1527
|
if (areCookiesSupported(logger)) {
|
|
@@ -1479,12 +1533,12 @@
|
|
|
1479
1533
|
values["max-age"] = "0";
|
|
1480
1534
|
}
|
|
1481
1535
|
var delCookie = cookieMgrConfig.delCookie || _setCookieValue;
|
|
1482
|
-
delCookie(name, _formatCookieValue(
|
|
1536
|
+
delCookie(name, _formatCookieValue(STR_EMPTY, values));
|
|
1483
1537
|
result = true;
|
|
1484
1538
|
}
|
|
1485
1539
|
return result;
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1540
|
+
},
|
|
1541
|
+
_a);
|
|
1488
1542
|
cookieMgr[strConfigCookieMgr] = cookieMgr;
|
|
1489
1543
|
return cookieMgr;
|
|
1490
1544
|
}
|
|
@@ -1503,17 +1557,17 @@
|
|
|
1503
1557
|
}
|
|
1504
1558
|
function _extractParts(theValue) {
|
|
1505
1559
|
var values = {};
|
|
1506
|
-
if (theValue && theValue
|
|
1507
|
-
var parts = strTrim(theValue)
|
|
1560
|
+
if (theValue && theValue[_DYN_LENGTH$2 ]) {
|
|
1561
|
+
var parts = strTrim(theValue)[_DYN_SPLIT ](";");
|
|
1508
1562
|
arrForEach(parts, function (thePart) {
|
|
1509
|
-
thePart = strTrim(thePart ||
|
|
1563
|
+
thePart = strTrim(thePart || STR_EMPTY);
|
|
1510
1564
|
if (thePart) {
|
|
1511
|
-
var idx = thePart
|
|
1565
|
+
var idx = thePart[_DYN_INDEX_OF ]("=");
|
|
1512
1566
|
if (idx === -1) {
|
|
1513
1567
|
values[thePart] = null;
|
|
1514
1568
|
}
|
|
1515
1569
|
else {
|
|
1516
|
-
values[strTrim(thePart
|
|
1570
|
+
values[strTrim(thePart[_DYN_SUBSTRING$1 ](0, idx))] = strTrim(thePart[_DYN_SUBSTRING$1 ](idx + 1));
|
|
1517
1571
|
}
|
|
1518
1572
|
}
|
|
1519
1573
|
});
|
|
@@ -1527,21 +1581,21 @@
|
|
|
1527
1581
|
return null;
|
|
1528
1582
|
}
|
|
1529
1583
|
function _formatCookieValue(value, values) {
|
|
1530
|
-
var cookieValue = value ||
|
|
1584
|
+
var cookieValue = value || STR_EMPTY;
|
|
1531
1585
|
objForEachKey(values, function (name, theValue) {
|
|
1532
|
-
cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue :
|
|
1586
|
+
cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : STR_EMPTY);
|
|
1533
1587
|
});
|
|
1534
1588
|
return cookieValue;
|
|
1535
1589
|
}
|
|
1536
1590
|
function _getCookieValue(name) {
|
|
1537
|
-
var cookieValue =
|
|
1591
|
+
var cookieValue = STR_EMPTY;
|
|
1538
1592
|
if (_doc) {
|
|
1539
|
-
var theCookie = _doc[strCookie] ||
|
|
1593
|
+
var theCookie = _doc[strCookie] || STR_EMPTY;
|
|
1540
1594
|
if (_parsedCookieValue !== theCookie) {
|
|
1541
1595
|
_cookieCache = _extractParts(theCookie);
|
|
1542
1596
|
_parsedCookieValue = theCookie;
|
|
1543
1597
|
}
|
|
1544
|
-
cookieValue = strTrim(_cookieCache[name] ||
|
|
1598
|
+
cookieValue = strTrim(_cookieCache[name] || STR_EMPTY);
|
|
1545
1599
|
}
|
|
1546
1600
|
return cookieValue;
|
|
1547
1601
|
}
|
|
@@ -1587,16 +1641,17 @@
|
|
|
1587
1641
|
var elmNodeData = createElmNodeData("events");
|
|
1588
1642
|
var eventNamespace = /^([^.]*)(?:\.(.+)|)/;
|
|
1589
1643
|
function _normalizeNamespace(name) {
|
|
1590
|
-
if (name && name
|
|
1591
|
-
return name.replace(/^\s*\.*|\.*\s*$/g,
|
|
1644
|
+
if (name && name[_DYN_REPLACE$1 ]) {
|
|
1645
|
+
return name.replace(/^\s*\.*|\.*\s*$/g, STR_EMPTY);
|
|
1592
1646
|
}
|
|
1593
1647
|
return name;
|
|
1594
1648
|
}
|
|
1595
1649
|
function _getEvtNamespace(eventName, evtNamespace) {
|
|
1650
|
+
var _a;
|
|
1596
1651
|
if (evtNamespace) {
|
|
1597
|
-
var theNamespace_1 =
|
|
1652
|
+
var theNamespace_1 = STR_EMPTY;
|
|
1598
1653
|
if (isArray(evtNamespace)) {
|
|
1599
|
-
theNamespace_1 =
|
|
1654
|
+
theNamespace_1 = STR_EMPTY;
|
|
1600
1655
|
arrForEach(evtNamespace, function (name) {
|
|
1601
1656
|
name = _normalizeNamespace(name);
|
|
1602
1657
|
if (name) {
|
|
@@ -1614,14 +1669,14 @@
|
|
|
1614
1669
|
if (theNamespace_1[0] !== ".") {
|
|
1615
1670
|
theNamespace_1 = "." + theNamespace_1;
|
|
1616
1671
|
}
|
|
1617
|
-
eventName = (eventName ||
|
|
1672
|
+
eventName = (eventName || STR_EMPTY) + theNamespace_1;
|
|
1618
1673
|
}
|
|
1619
1674
|
}
|
|
1620
|
-
var parsedEvent = (eventNamespace.exec(eventName ||
|
|
1621
|
-
return {
|
|
1622
|
-
|
|
1623
|
-
ns
|
|
1624
|
-
|
|
1675
|
+
var parsedEvent = (eventNamespace.exec(eventName || STR_EMPTY) || []);
|
|
1676
|
+
return _a = {},
|
|
1677
|
+
_a[_DYN_TYPE ] = parsedEvent[1],
|
|
1678
|
+
_a.ns = ((parsedEvent[2] || STR_EMPTY).replace(rRemoveEmptyNs, ".").replace(rRemoveTrailingEmptyNs, STR_EMPTY)[_DYN_SPLIT ](".").sort()).join("."),
|
|
1679
|
+
_a;
|
|
1625
1680
|
}
|
|
1626
1681
|
function _getRegisteredEvents(target, evtName, addDefault) {
|
|
1627
1682
|
if (addDefault === void 0) { addDefault = true; }
|
|
@@ -1634,19 +1689,20 @@
|
|
|
1634
1689
|
}
|
|
1635
1690
|
function _doAttach(obj, evtName, handlerRef, useCapture) {
|
|
1636
1691
|
var result = false;
|
|
1637
|
-
if (obj && evtName && evtName
|
|
1692
|
+
if (obj && evtName && evtName[_DYN_TYPE ] && handlerRef) {
|
|
1638
1693
|
if (obj[strAddEventHelper]) {
|
|
1639
|
-
obj[strAddEventHelper](evtName
|
|
1694
|
+
obj[strAddEventHelper](evtName[_DYN_TYPE ], handlerRef, useCapture);
|
|
1640
1695
|
result = true;
|
|
1641
1696
|
}
|
|
1642
1697
|
else if (obj[strAttachEvent]) {
|
|
1643
|
-
obj[strAttachEvent](strOnPrefix + evtName
|
|
1698
|
+
obj[strAttachEvent](strOnPrefix + evtName[_DYN_TYPE ], handlerRef);
|
|
1644
1699
|
result = true;
|
|
1645
1700
|
}
|
|
1646
1701
|
}
|
|
1647
1702
|
return result;
|
|
1648
1703
|
}
|
|
1649
1704
|
function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {
|
|
1705
|
+
var _a;
|
|
1650
1706
|
if (useCapture === void 0) { useCapture = false; }
|
|
1651
1707
|
var result = false;
|
|
1652
1708
|
if (target) {
|
|
@@ -1654,13 +1710,14 @@
|
|
|
1654
1710
|
var evtName = _getEvtNamespace(eventName, evtNamespace);
|
|
1655
1711
|
result = _doAttach(target, evtName, handlerRef, useCapture);
|
|
1656
1712
|
if (result && elmNodeData.accept(target)) {
|
|
1657
|
-
var registeredEvent = {
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1713
|
+
var registeredEvent = (_a = {
|
|
1714
|
+
guid: _guid++,
|
|
1715
|
+
evtName: evtName
|
|
1716
|
+
},
|
|
1717
|
+
_a[_DYN_HANDLER ] = handlerRef,
|
|
1718
|
+
_a.capture = useCapture,
|
|
1719
|
+
_a);
|
|
1720
|
+
_getRegisteredEvents(target, evtName.type)[_DYN_PUSH$1 ](registeredEvent);
|
|
1664
1721
|
}
|
|
1665
1722
|
}
|
|
1666
1723
|
catch (e) {
|
|
@@ -1692,7 +1749,7 @@
|
|
|
1692
1749
|
function randomHexDigit() {
|
|
1693
1750
|
return randomValue(15);
|
|
1694
1751
|
}
|
|
1695
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
|
|
1752
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[_DYN_REPLACE$1 ](GuidRegex, function (c) {
|
|
1696
1753
|
var r = (randomHexDigit() | 0), v = (c === "x" ? r : r & 0x3 | 0x8);
|
|
1697
1754
|
return v.toString(16);
|
|
1698
1755
|
});
|
|
@@ -1706,7 +1763,7 @@
|
|
|
1706
1763
|
}
|
|
1707
1764
|
function generateW3CId() {
|
|
1708
1765
|
var hexValues = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
|
|
1709
|
-
var oct =
|
|
1766
|
+
var oct = STR_EMPTY, tmp;
|
|
1710
1767
|
for (var a = 0; a < 4; a++) {
|
|
1711
1768
|
tmp = random32();
|
|
1712
1769
|
oct +=
|
|
@@ -1720,7 +1777,7 @@
|
|
|
1720
1777
|
hexValues[tmp >> 28 & 0xF];
|
|
1721
1778
|
}
|
|
1722
1779
|
var clockSequenceHi = hexValues[8 + (random32() & 0x03) | 0];
|
|
1723
|
-
return oct
|
|
1780
|
+
return oct[_DYN_SUBSTR ](0, 8) + oct[_DYN_SUBSTR ](9, 4) + "4" + oct[_DYN_SUBSTR ](13, 3) + clockSequenceHi + oct[_DYN_SUBSTR ](16, 3) + oct[_DYN_SUBSTR ](19, 12);
|
|
1724
1781
|
}
|
|
1725
1782
|
var CoreUtils = {
|
|
1726
1783
|
_canUseCookies: undefined,
|
|
@@ -1770,23 +1827,23 @@
|
|
|
1770
1827
|
}, function (value) {
|
|
1771
1828
|
_canUseCookies = value;
|
|
1772
1829
|
arrForEach(_cookieMgrs, function (mgr) {
|
|
1773
|
-
mgr
|
|
1830
|
+
mgr[_DYN_SET_ENABLED ](value);
|
|
1774
1831
|
});
|
|
1775
1832
|
});
|
|
1776
1833
|
}
|
|
1777
1834
|
if (arrIndexOf(_cookieMgrs, cookieMgr) === -1) {
|
|
1778
|
-
_cookieMgrs
|
|
1835
|
+
_cookieMgrs[_DYN_PUSH$1 ](cookieMgr);
|
|
1779
1836
|
}
|
|
1780
1837
|
if (isBoolean(legacyCanUseCookies)) {
|
|
1781
|
-
cookieMgr
|
|
1838
|
+
cookieMgr[_DYN_SET_ENABLED ](legacyCanUseCookies);
|
|
1782
1839
|
}
|
|
1783
1840
|
if (isBoolean(_canUseCookies)) {
|
|
1784
|
-
cookieMgr
|
|
1841
|
+
cookieMgr[_DYN_SET_ENABLED ](_canUseCookies);
|
|
1785
1842
|
}
|
|
1786
1843
|
return cookieMgr;
|
|
1787
1844
|
}
|
|
1788
1845
|
function disableCookies() {
|
|
1789
|
-
_legacyCookieMgr()
|
|
1846
|
+
_legacyCookieMgr()[_DYN_SET_ENABLED ](false);
|
|
1790
1847
|
}
|
|
1791
1848
|
function canUseCookies(logger) {
|
|
1792
1849
|
return _legacyCookieMgr(null, logger).isEnabled();
|
|
@@ -1812,12 +1869,12 @@
|
|
|
1812
1869
|
var _chainId = 0;
|
|
1813
1870
|
function _getNextProxyStart(proxy, core, startAt) {
|
|
1814
1871
|
while (proxy) {
|
|
1815
|
-
if (proxy
|
|
1872
|
+
if (proxy[_DYN_GET_PLUGIN ]() === startAt) {
|
|
1816
1873
|
return proxy;
|
|
1817
1874
|
}
|
|
1818
|
-
proxy = proxy
|
|
1875
|
+
proxy = proxy[_DYN_GET_NEXT ]();
|
|
1819
1876
|
}
|
|
1820
|
-
return createTelemetryProxyChain([startAt], core
|
|
1877
|
+
return createTelemetryProxyChain([startAt], core[_DYN_CONFIG ] || {}, core);
|
|
1821
1878
|
}
|
|
1822
1879
|
function _createInternalContext(telemetryChain, config, core, startAt) {
|
|
1823
1880
|
var _nextProxy = null;
|
|
@@ -1858,7 +1915,7 @@
|
|
|
1858
1915
|
args[_i - 2] = arguments[_i];
|
|
1859
1916
|
}
|
|
1860
1917
|
if (onComplete) {
|
|
1861
|
-
_onComplete
|
|
1918
|
+
_onComplete[_DYN_PUSH$1 ]({
|
|
1862
1919
|
func: onComplete,
|
|
1863
1920
|
self: !isUndefined(that) ? that : context.ctx,
|
|
1864
1921
|
args: args
|
|
@@ -1867,16 +1924,16 @@
|
|
|
1867
1924
|
}
|
|
1868
1925
|
function _moveNext() {
|
|
1869
1926
|
var nextProxy = _nextProxy;
|
|
1870
|
-
_nextProxy = nextProxy ? nextProxy
|
|
1927
|
+
_nextProxy = nextProxy ? nextProxy[_DYN_GET_NEXT ]() : null;
|
|
1871
1928
|
if (!nextProxy) {
|
|
1872
1929
|
var onComplete = _onComplete;
|
|
1873
|
-
if (onComplete && onComplete
|
|
1930
|
+
if (onComplete && onComplete[_DYN_LENGTH$2 ] > 0) {
|
|
1874
1931
|
arrForEach(onComplete, function (completeDetails) {
|
|
1875
1932
|
try {
|
|
1876
|
-
completeDetails.func
|
|
1933
|
+
completeDetails.func[_DYN_CALL ](completeDetails.self, completeDetails.args);
|
|
1877
1934
|
}
|
|
1878
1935
|
catch (e) {
|
|
1879
|
-
_throwInternal(core
|
|
1936
|
+
_throwInternal(core[_DYN_LOGGER ], 2 , 73 , "Unexpected Exception during onComplete - " + dumpObj(e));
|
|
1880
1937
|
}
|
|
1881
1938
|
});
|
|
1882
1939
|
_onComplete = [];
|
|
@@ -1889,7 +1946,7 @@
|
|
|
1889
1946
|
if (mergeDefault === void 0) { mergeDefault = 0 ; }
|
|
1890
1947
|
var theConfig;
|
|
1891
1948
|
if (config) {
|
|
1892
|
-
var extConfig = config
|
|
1949
|
+
var extConfig = config[STR_EXTENSION_CONFIG ];
|
|
1893
1950
|
if (extConfig && identifier) {
|
|
1894
1951
|
theConfig = extConfig[identifier];
|
|
1895
1952
|
}
|
|
@@ -1930,7 +1987,7 @@
|
|
|
1930
1987
|
function _iterateChain(cb) {
|
|
1931
1988
|
var nextPlugin;
|
|
1932
1989
|
while (!!(nextPlugin = context._next())) {
|
|
1933
|
-
var plugin = nextPlugin
|
|
1990
|
+
var plugin = nextPlugin[_DYN_GET_PLUGIN ]();
|
|
1934
1991
|
if (plugin) {
|
|
1935
1992
|
cb(plugin);
|
|
1936
1993
|
}
|
|
@@ -1943,7 +2000,7 @@
|
|
|
1943
2000
|
var context = internalContext.ctx;
|
|
1944
2001
|
function _processNext(env) {
|
|
1945
2002
|
var nextPlugin = internalContext._next();
|
|
1946
|
-
nextPlugin && nextPlugin
|
|
2003
|
+
nextPlugin && nextPlugin[STR_PROCESS_TELEMETRY ](env, context);
|
|
1947
2004
|
return !nextPlugin;
|
|
1948
2005
|
}
|
|
1949
2006
|
function _createNew(plugins, startAt) {
|
|
@@ -1951,14 +2008,14 @@
|
|
|
1951
2008
|
if (isArray(plugins)) {
|
|
1952
2009
|
plugins = createTelemetryProxyChain(plugins, config, core, startAt);
|
|
1953
2010
|
}
|
|
1954
|
-
return createProcessTelemetryContext(plugins || context
|
|
2011
|
+
return createProcessTelemetryContext(plugins || context[_DYN_GET_NEXT ](), config, core, startAt);
|
|
1955
2012
|
}
|
|
1956
|
-
context
|
|
1957
|
-
context
|
|
2013
|
+
context[_DYN_PROCESS_NEXT ] = _processNext;
|
|
2014
|
+
context[_DYN_CREATE_NEW ] = _createNew;
|
|
1958
2015
|
return context;
|
|
1959
2016
|
}
|
|
1960
2017
|
function createProcessTelemetryUnloadContext(telemetryChain, core, startAt) {
|
|
1961
|
-
var config = core
|
|
2018
|
+
var config = core[_DYN_CONFIG ] || {};
|
|
1962
2019
|
var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
|
|
1963
2020
|
var context = internalContext.ctx;
|
|
1964
2021
|
function _processNext(unloadState) {
|
|
@@ -1971,20 +2028,20 @@
|
|
|
1971
2028
|
if (isArray(plugins)) {
|
|
1972
2029
|
plugins = createTelemetryProxyChain(plugins, config, core, startAt);
|
|
1973
2030
|
}
|
|
1974
|
-
return createProcessTelemetryUnloadContext(plugins || context
|
|
2031
|
+
return createProcessTelemetryUnloadContext(plugins || context[_DYN_GET_NEXT ](), core, startAt);
|
|
1975
2032
|
}
|
|
1976
|
-
context
|
|
1977
|
-
context
|
|
2033
|
+
context[_DYN_PROCESS_NEXT ] = _processNext;
|
|
2034
|
+
context[_DYN_CREATE_NEW ] = _createNew;
|
|
1978
2035
|
return context;
|
|
1979
2036
|
}
|
|
1980
2037
|
function createProcessTelemetryUpdateContext(telemetryChain, core, startAt) {
|
|
1981
|
-
var config = core
|
|
2038
|
+
var config = core[_DYN_CONFIG ] || {};
|
|
1982
2039
|
var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
|
|
1983
2040
|
var context = internalContext.ctx;
|
|
1984
2041
|
function _processNext(updateState) {
|
|
1985
2042
|
return context.iterate(function (plugin) {
|
|
1986
|
-
if (isFunction(plugin
|
|
1987
|
-
plugin
|
|
2043
|
+
if (isFunction(plugin[_DYN_UPDATE ])) {
|
|
2044
|
+
plugin[_DYN_UPDATE ](context, updateState);
|
|
1988
2045
|
}
|
|
1989
2046
|
});
|
|
1990
2047
|
}
|
|
@@ -1993,22 +2050,22 @@
|
|
|
1993
2050
|
if (isArray(plugins)) {
|
|
1994
2051
|
plugins = createTelemetryProxyChain(plugins, config, core, startAt);
|
|
1995
2052
|
}
|
|
1996
|
-
return createProcessTelemetryUpdateContext(plugins || context
|
|
2053
|
+
return createProcessTelemetryUpdateContext(plugins || context[_DYN_GET_NEXT ](), core, startAt);
|
|
1997
2054
|
}
|
|
1998
|
-
context
|
|
1999
|
-
context
|
|
2055
|
+
context[_DYN_PROCESS_NEXT ] = _processNext;
|
|
2056
|
+
context[_DYN_CREATE_NEW ] = _createNew;
|
|
2000
2057
|
return context;
|
|
2001
2058
|
}
|
|
2002
2059
|
function createTelemetryProxyChain(plugins, config, core, startAt) {
|
|
2003
2060
|
var firstProxy = null;
|
|
2004
2061
|
var add = startAt ? false : true;
|
|
2005
|
-
if (isArray(plugins) && plugins
|
|
2062
|
+
if (isArray(plugins) && plugins[_DYN_LENGTH$2 ] > 0) {
|
|
2006
2063
|
var lastProxy_1 = null;
|
|
2007
2064
|
arrForEach(plugins, function (thePlugin) {
|
|
2008
2065
|
if (!add && startAt === thePlugin) {
|
|
2009
2066
|
add = true;
|
|
2010
2067
|
}
|
|
2011
|
-
if (add && thePlugin && isFunction(thePlugin
|
|
2068
|
+
if (add && thePlugin && isFunction(thePlugin[STR_PROCESS_TELEMETRY ])) {
|
|
2012
2069
|
var newProxy = createTelemetryPluginProxy(thePlugin, config, core);
|
|
2013
2070
|
if (!firstProxy) {
|
|
2014
2071
|
firstProxy = newProxy;
|
|
@@ -2027,11 +2084,11 @@
|
|
|
2027
2084
|
}
|
|
2028
2085
|
function createTelemetryPluginProxy(plugin, config, core) {
|
|
2029
2086
|
var nextProxy = null;
|
|
2030
|
-
var hasProcessTelemetry = isFunction(plugin
|
|
2031
|
-
var hasSetNext = isFunction(plugin
|
|
2087
|
+
var hasProcessTelemetry = isFunction(plugin[STR_PROCESS_TELEMETRY ]);
|
|
2088
|
+
var hasSetNext = isFunction(plugin[_DYN_SET_NEXT_PLUGIN ]);
|
|
2032
2089
|
var chainId;
|
|
2033
2090
|
if (plugin) {
|
|
2034
|
-
chainId = plugin
|
|
2091
|
+
chainId = plugin[_DYN_IDENTIFIER$1 ] + "-" + plugin[STR_PRIORITY ] + "-" + _chainId++;
|
|
2035
2092
|
}
|
|
2036
2093
|
else {
|
|
2037
2094
|
chainId = "Unknown-0-" + _chainId++;
|
|
@@ -2063,17 +2120,17 @@
|
|
|
2063
2120
|
}
|
|
2064
2121
|
function _processChain(itemCtx, processPluginFn, name, details, isAsync) {
|
|
2065
2122
|
var hasRun = false;
|
|
2066
|
-
var identifier = plugin ? plugin
|
|
2123
|
+
var identifier = plugin ? plugin[_DYN_IDENTIFIER$1 ] : strTelemetryPluginChain;
|
|
2067
2124
|
var hasRunContext = itemCtx[strHasRunFlags];
|
|
2068
2125
|
if (!hasRunContext) {
|
|
2069
2126
|
hasRunContext = itemCtx[strHasRunFlags] = {};
|
|
2070
2127
|
}
|
|
2071
2128
|
itemCtx.setNext(nextProxy);
|
|
2072
2129
|
if (plugin) {
|
|
2073
|
-
doPerf(itemCtx[
|
|
2130
|
+
doPerf(itemCtx[STR_CORE ](), function () { return identifier + ":" + name; }, function () {
|
|
2074
2131
|
hasRunContext[chainId] = true;
|
|
2075
2132
|
try {
|
|
2076
|
-
var nextId = nextProxy ? nextProxy._id :
|
|
2133
|
+
var nextId = nextProxy ? nextProxy._id : STR_EMPTY;
|
|
2077
2134
|
if (nextId) {
|
|
2078
2135
|
hasRunContext[nextId] = false;
|
|
2079
2136
|
}
|
|
@@ -2085,7 +2142,7 @@
|
|
|
2085
2142
|
hasRun = true;
|
|
2086
2143
|
}
|
|
2087
2144
|
if (!nextProxy || !hasNextRun) {
|
|
2088
|
-
_throwInternal(itemCtx
|
|
2145
|
+
_throwInternal(itemCtx[_DYN_DIAG_LOG ](), 1 , 73 , "Plugin [" + identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
|
|
2089
2146
|
}
|
|
2090
2147
|
}
|
|
2091
2148
|
}, details, isAsync);
|
|
@@ -2099,17 +2156,17 @@
|
|
|
2099
2156
|
return false;
|
|
2100
2157
|
}
|
|
2101
2158
|
var pluginState = _getPluginState(plugin);
|
|
2102
|
-
if (pluginState
|
|
2159
|
+
if (pluginState[_DYN_TEARDOWN ] || pluginState[STR_DISABLED]) {
|
|
2103
2160
|
return false;
|
|
2104
2161
|
}
|
|
2105
2162
|
if (hasSetNext) {
|
|
2106
|
-
plugin
|
|
2163
|
+
plugin[_DYN_SET_NEXT_PLUGIN ](nextProxy);
|
|
2107
2164
|
}
|
|
2108
|
-
plugin
|
|
2165
|
+
plugin[STR_PROCESS_TELEMETRY ](env, itemCtx);
|
|
2109
2166
|
return true;
|
|
2110
2167
|
}
|
|
2111
2168
|
if (!_processChain(itemCtx, _callProcessTelemetry, "processTelemetry", function () { return ({ item: env }); }, !(env.sync))) {
|
|
2112
|
-
itemCtx
|
|
2169
|
+
itemCtx[_DYN_PROCESS_NEXT ](env);
|
|
2113
2170
|
}
|
|
2114
2171
|
}
|
|
2115
2172
|
function _unloadPlugin(unloadCtx, unloadState) {
|
|
@@ -2117,20 +2174,20 @@
|
|
|
2117
2174
|
var hasRun = false;
|
|
2118
2175
|
if (plugin) {
|
|
2119
2176
|
var pluginState = _getPluginState(plugin);
|
|
2120
|
-
var pluginCore = plugin[
|
|
2121
|
-
if (plugin && (!pluginCore || pluginCore === unloadCtx
|
|
2122
|
-
pluginState[
|
|
2123
|
-
pluginState[
|
|
2124
|
-
pluginState[
|
|
2125
|
-
if (plugin[
|
|
2177
|
+
var pluginCore = plugin[STR_CORE] || pluginState[STR_CORE ];
|
|
2178
|
+
if (plugin && (!pluginCore || pluginCore === unloadCtx.core()) && !pluginState[_DYN_TEARDOWN ]) {
|
|
2179
|
+
pluginState[STR_CORE ] = null;
|
|
2180
|
+
pluginState[_DYN_TEARDOWN ] = true;
|
|
2181
|
+
pluginState[_DYN_IS_INITIALIZED ] = false;
|
|
2182
|
+
if (plugin[_DYN_TEARDOWN ] && plugin[_DYN_TEARDOWN ](unloadCtx, unloadState) === true) {
|
|
2126
2183
|
hasRun = true;
|
|
2127
2184
|
}
|
|
2128
2185
|
}
|
|
2129
2186
|
}
|
|
2130
2187
|
return hasRun;
|
|
2131
2188
|
}
|
|
2132
|
-
if (!_processChain(unloadCtx, _callTeardown, "unload", function () { }, unloadState
|
|
2133
|
-
unloadCtx
|
|
2189
|
+
if (!_processChain(unloadCtx, _callTeardown, "unload", function () { }, unloadState[_DYN_IS_ASYNC ])) {
|
|
2190
|
+
unloadCtx[_DYN_PROCESS_NEXT ](unloadState);
|
|
2134
2191
|
}
|
|
2135
2192
|
}
|
|
2136
2193
|
function _updatePlugin(updateCtx, updateState) {
|
|
@@ -2138,9 +2195,9 @@
|
|
|
2138
2195
|
var hasRun = false;
|
|
2139
2196
|
if (plugin) {
|
|
2140
2197
|
var pluginState = _getPluginState(plugin);
|
|
2141
|
-
var pluginCore = plugin[
|
|
2142
|
-
if (plugin && (!pluginCore || pluginCore === updateCtx
|
|
2143
|
-
if (plugin[
|
|
2198
|
+
var pluginCore = plugin[STR_CORE] || pluginState[STR_CORE ];
|
|
2199
|
+
if (plugin && (!pluginCore || pluginCore === updateCtx.core()) && !pluginState[_DYN_TEARDOWN ]) {
|
|
2200
|
+
if (plugin[_DYN_UPDATE ] && plugin[_DYN_UPDATE ](updateCtx, updateState) === true) {
|
|
2144
2201
|
hasRun = true;
|
|
2145
2202
|
}
|
|
2146
2203
|
}
|
|
@@ -2148,19 +2205,17 @@
|
|
|
2148
2205
|
return hasRun;
|
|
2149
2206
|
}
|
|
2150
2207
|
if (!_processChain(updateCtx, _callUpdate, "update", function () { }, false)) {
|
|
2151
|
-
updateCtx
|
|
2208
|
+
updateCtx[_DYN_PROCESS_NEXT ](updateState);
|
|
2152
2209
|
}
|
|
2153
2210
|
}
|
|
2154
2211
|
return objFreeze(proxyChain);
|
|
2155
2212
|
}
|
|
2156
2213
|
|
|
2157
|
-
var strExtensionConfig = "extensionConfig";
|
|
2158
|
-
|
|
2159
2214
|
function createUnloadHandlerContainer() {
|
|
2160
2215
|
var handlers = [];
|
|
2161
2216
|
function _addHandler(handler) {
|
|
2162
2217
|
if (handler) {
|
|
2163
|
-
handlers
|
|
2218
|
+
handlers[_DYN_PUSH$1 ](handler);
|
|
2164
2219
|
}
|
|
2165
2220
|
}
|
|
2166
2221
|
function _runHandlers(unloadCtx, unloadState) {
|
|
@@ -2169,7 +2224,7 @@
|
|
|
2169
2224
|
handler(unloadCtx, unloadState);
|
|
2170
2225
|
}
|
|
2171
2226
|
catch (e) {
|
|
2172
|
-
_throwInternal(unloadCtx
|
|
2227
|
+
_throwInternal(unloadCtx[_DYN_DIAG_LOG ](), 2 , 73 , "Unexpected error calling unload handler - " + dumpObj(e));
|
|
2173
2228
|
}
|
|
2174
2229
|
});
|
|
2175
2230
|
handlers = [];
|
|
@@ -2191,37 +2246,40 @@
|
|
|
2191
2246
|
var _hooks;
|
|
2192
2247
|
_initDefaults();
|
|
2193
2248
|
dynamicProto(BaseTelemetryPlugin, _self, function (_self) {
|
|
2194
|
-
_self
|
|
2249
|
+
_self[_DYN_INITIALIZE ] = function (config, core, extensions, pluginChain) {
|
|
2195
2250
|
_setDefaults(config, core, pluginChain);
|
|
2196
2251
|
_isinitialized = true;
|
|
2197
2252
|
};
|
|
2198
|
-
_self
|
|
2199
|
-
var
|
|
2200
|
-
|
|
2253
|
+
_self[_DYN_TEARDOWN ] = function (unloadCtx, unloadState) {
|
|
2254
|
+
var _a;
|
|
2255
|
+
var core = _self[STR_CORE ];
|
|
2256
|
+
if (!core || (unloadCtx && core !== unloadCtx[STR_CORE ]())) {
|
|
2201
2257
|
return;
|
|
2202
2258
|
}
|
|
2203
2259
|
var result;
|
|
2204
2260
|
var unloadDone = false;
|
|
2205
2261
|
var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
|
|
2206
|
-
var theUnloadState = unloadState || {
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2262
|
+
var theUnloadState = unloadState || (_a = {
|
|
2263
|
+
reason: 0
|
|
2264
|
+
},
|
|
2265
|
+
_a[_DYN_IS_ASYNC ] = false,
|
|
2266
|
+
_a);
|
|
2210
2267
|
function _unloadCallback() {
|
|
2211
2268
|
if (!unloadDone) {
|
|
2212
2269
|
unloadDone = true;
|
|
2213
2270
|
_unloadHandlerContainer.run(theUnloadCtx, unloadState);
|
|
2214
|
-
|
|
2271
|
+
var oldHooks = _hooks;
|
|
2272
|
+
_hooks = [];
|
|
2273
|
+
arrForEach(oldHooks, function (fn) {
|
|
2215
2274
|
fn.rm();
|
|
2216
2275
|
});
|
|
2217
|
-
_hooks = [];
|
|
2218
2276
|
if (result === true) {
|
|
2219
|
-
theUnloadCtx
|
|
2277
|
+
theUnloadCtx[_DYN_PROCESS_NEXT ](theUnloadState);
|
|
2220
2278
|
}
|
|
2221
2279
|
_initDefaults();
|
|
2222
2280
|
}
|
|
2223
2281
|
}
|
|
2224
|
-
if (!_self[
|
|
2282
|
+
if (!_self[_DYN__DO_TEARDOWN ] || _self[_DYN__DO_TEARDOWN ](theUnloadCtx, theUnloadState, _unloadCallback) !== true) {
|
|
2225
2283
|
_unloadCallback();
|
|
2226
2284
|
}
|
|
2227
2285
|
else {
|
|
@@ -2229,9 +2287,9 @@
|
|
|
2229
2287
|
}
|
|
2230
2288
|
return result;
|
|
2231
2289
|
};
|
|
2232
|
-
_self
|
|
2233
|
-
var core = _self
|
|
2234
|
-
if (!core || (updateCtx && core !== updateCtx
|
|
2290
|
+
_self[_DYN_UPDATE ] = function (updateCtx, updateState) {
|
|
2291
|
+
var core = _self[STR_CORE ];
|
|
2292
|
+
if (!core || (updateCtx && core !== updateCtx[STR_CORE ]())) {
|
|
2235
2293
|
return;
|
|
2236
2294
|
}
|
|
2237
2295
|
var result;
|
|
@@ -2243,7 +2301,7 @@
|
|
|
2243
2301
|
function _updateCallback() {
|
|
2244
2302
|
if (!updateDone) {
|
|
2245
2303
|
updateDone = true;
|
|
2246
|
-
_setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx
|
|
2304
|
+
_setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx[_DYN_GET_NEXT ]());
|
|
2247
2305
|
}
|
|
2248
2306
|
}
|
|
2249
2307
|
if (!_self._doUpdate || _self._doUpdate(theUpdateCtx, theUpdateState, _updateCallback) !== true) {
|
|
@@ -2260,30 +2318,30 @@
|
|
|
2260
2318
|
_hooks = _hooks.concat(hooks);
|
|
2261
2319
|
}
|
|
2262
2320
|
else {
|
|
2263
|
-
_hooks
|
|
2321
|
+
_hooks[_DYN_PUSH$1 ](hooks);
|
|
2264
2322
|
}
|
|
2265
2323
|
}
|
|
2266
2324
|
};
|
|
2267
2325
|
proxyFunctionAs(_self, "_addUnloadCb", function () { return _unloadHandlerContainer; }, "add");
|
|
2268
2326
|
});
|
|
2269
|
-
_self
|
|
2270
|
-
return _getTelCtx(itemCtx)
|
|
2327
|
+
_self[_DYN_DIAG_LOG ] = function (itemCtx) {
|
|
2328
|
+
return _getTelCtx(itemCtx)[_DYN_DIAG_LOG ]();
|
|
2271
2329
|
};
|
|
2272
|
-
_self[
|
|
2330
|
+
_self[_DYN_IS_INITIALIZED ] = function () {
|
|
2273
2331
|
return _isinitialized;
|
|
2274
2332
|
};
|
|
2275
2333
|
_self.setInitialized = function (isInitialized) {
|
|
2276
2334
|
_isinitialized = isInitialized;
|
|
2277
2335
|
};
|
|
2278
|
-
_self[
|
|
2336
|
+
_self[_DYN_SET_NEXT_PLUGIN ] = function (next) {
|
|
2279
2337
|
_nextPlugin = next;
|
|
2280
2338
|
};
|
|
2281
|
-
_self
|
|
2339
|
+
_self[_DYN_PROCESS_NEXT ] = function (env, itemCtx) {
|
|
2282
2340
|
if (itemCtx) {
|
|
2283
|
-
itemCtx
|
|
2341
|
+
itemCtx[_DYN_PROCESS_NEXT ](env);
|
|
2284
2342
|
}
|
|
2285
|
-
else if (_nextPlugin && isFunction(_nextPlugin
|
|
2286
|
-
_nextPlugin
|
|
2343
|
+
else if (_nextPlugin && isFunction(_nextPlugin[STR_PROCESS_TELEMETRY ])) {
|
|
2344
|
+
_nextPlugin[STR_PROCESS_TELEMETRY ](env, null);
|
|
2287
2345
|
}
|
|
2288
2346
|
};
|
|
2289
2347
|
_self._getTelCtx = _getTelCtx;
|
|
@@ -2291,33 +2349,33 @@
|
|
|
2291
2349
|
if (currentCtx === void 0) { currentCtx = null; }
|
|
2292
2350
|
var itemCtx = currentCtx;
|
|
2293
2351
|
if (!itemCtx) {
|
|
2294
|
-
var rootCtx = _rootCtx || createProcessTelemetryContext(null, {}, _self
|
|
2352
|
+
var rootCtx = _rootCtx || createProcessTelemetryContext(null, {}, _self[STR_CORE ]);
|
|
2295
2353
|
if (_nextPlugin && _nextPlugin[strGetPlugin]) {
|
|
2296
|
-
itemCtx = rootCtx
|
|
2354
|
+
itemCtx = rootCtx[_DYN_CREATE_NEW ](null, _nextPlugin[strGetPlugin]);
|
|
2297
2355
|
}
|
|
2298
2356
|
else {
|
|
2299
|
-
itemCtx = rootCtx
|
|
2357
|
+
itemCtx = rootCtx[_DYN_CREATE_NEW ](null, _nextPlugin);
|
|
2300
2358
|
}
|
|
2301
2359
|
}
|
|
2302
2360
|
return itemCtx;
|
|
2303
2361
|
}
|
|
2304
2362
|
function _setDefaults(config, core, pluginChain) {
|
|
2305
2363
|
if (config) {
|
|
2306
|
-
setValue(config,
|
|
2364
|
+
setValue(config, STR_EXTENSION_CONFIG, [], null, isNullOrUndefined);
|
|
2307
2365
|
}
|
|
2308
2366
|
if (!pluginChain && core) {
|
|
2309
|
-
pluginChain = core
|
|
2367
|
+
pluginChain = core[_DYN_GET_PROCESS_TEL_CONT0 ]()[_DYN_GET_NEXT ]();
|
|
2310
2368
|
}
|
|
2311
2369
|
var nextPlugin = _nextPlugin;
|
|
2312
2370
|
if (_nextPlugin && _nextPlugin[strGetPlugin]) {
|
|
2313
2371
|
nextPlugin = _nextPlugin[strGetPlugin]();
|
|
2314
2372
|
}
|
|
2315
|
-
_self
|
|
2373
|
+
_self[STR_CORE ] = core;
|
|
2316
2374
|
_rootCtx = createProcessTelemetryContext(pluginChain, config, core, nextPlugin);
|
|
2317
2375
|
}
|
|
2318
2376
|
function _initDefaults() {
|
|
2319
2377
|
_isinitialized = false;
|
|
2320
|
-
_self
|
|
2378
|
+
_self[STR_CORE ] = null;
|
|
2321
2379
|
_rootCtx = null;
|
|
2322
2380
|
_nextPlugin = null;
|
|
2323
2381
|
_hooks = [];
|
|
@@ -2334,7 +2392,7 @@
|
|
|
2334
2392
|
];
|
|
2335
2393
|
function _arrLoop(arr, fn) {
|
|
2336
2394
|
if (arr) {
|
|
2337
|
-
for (var lp = 0; lp < arr
|
|
2395
|
+
for (var lp = 0; lp < arr[_DYN_LENGTH$2 ]; lp++) {
|
|
2338
2396
|
if (fn(arr[lp], lp)) {
|
|
2339
2397
|
break;
|
|
2340
2398
|
}
|
|
@@ -2352,7 +2410,7 @@
|
|
|
2352
2410
|
return ctx;
|
|
2353
2411
|
};
|
|
2354
2412
|
try {
|
|
2355
|
-
cb
|
|
2413
|
+
cb[_DYN_APPLY ](callDetails.inst, cbArgs);
|
|
2356
2414
|
}
|
|
2357
2415
|
catch (err) {
|
|
2358
2416
|
var orgEx = callDetails.err;
|
|
@@ -2360,7 +2418,7 @@
|
|
|
2360
2418
|
var hookErrorCb = cbks[cbNames[2 ]];
|
|
2361
2419
|
if (hookErrorCb) {
|
|
2362
2420
|
callDetails.err = err;
|
|
2363
|
-
hookErrorCb
|
|
2421
|
+
hookErrorCb[_DYN_APPLY ](callDetails.inst, cbArgs);
|
|
2364
2422
|
}
|
|
2365
2423
|
}
|
|
2366
2424
|
catch (e) {
|
|
@@ -2375,21 +2433,22 @@
|
|
|
2375
2433
|
}
|
|
2376
2434
|
function _createFunctionHook(aiHook) {
|
|
2377
2435
|
return function () {
|
|
2436
|
+
var _a;
|
|
2378
2437
|
var funcThis = this;
|
|
2379
2438
|
var orgArgs = arguments;
|
|
2380
2439
|
var hooks = aiHook.h;
|
|
2381
|
-
var funcArgs = {
|
|
2382
|
-
|
|
2383
|
-
inst
|
|
2384
|
-
ctx
|
|
2385
|
-
set
|
|
2386
|
-
|
|
2440
|
+
var funcArgs = (_a = {},
|
|
2441
|
+
_a[_DYN_NAME$1 ] = aiHook.n,
|
|
2442
|
+
_a.inst = funcThis,
|
|
2443
|
+
_a.ctx = null,
|
|
2444
|
+
_a.set = _replaceArg,
|
|
2445
|
+
_a);
|
|
2387
2446
|
var hookCtx = [];
|
|
2388
2447
|
var cbArgs = _createArgs([funcArgs], orgArgs);
|
|
2389
2448
|
funcArgs.evt = getGlobalInst("event");
|
|
2390
2449
|
function _createArgs(target, theArgs) {
|
|
2391
2450
|
_arrLoop(theArgs, function (arg) {
|
|
2392
|
-
target
|
|
2451
|
+
target[_DYN_PUSH$1 ](arg);
|
|
2393
2452
|
});
|
|
2394
2453
|
return target;
|
|
2395
2454
|
}
|
|
@@ -2402,7 +2461,7 @@
|
|
|
2402
2461
|
var theFunc = aiHook.f;
|
|
2403
2462
|
if (theFunc) {
|
|
2404
2463
|
try {
|
|
2405
|
-
funcArgs.rslt = theFunc
|
|
2464
|
+
funcArgs.rslt = theFunc[_DYN_APPLY ](funcThis, orgArgs);
|
|
2406
2465
|
}
|
|
2407
2466
|
catch (err) {
|
|
2408
2467
|
funcArgs.err = err;
|
|
@@ -2421,7 +2480,7 @@
|
|
|
2421
2480
|
owner = target;
|
|
2422
2481
|
}
|
|
2423
2482
|
else if (checkPrototype) {
|
|
2424
|
-
owner = _getOwner(_getObjProto
|
|
2483
|
+
owner = _getOwner(_getObjProto(target), name, false);
|
|
2425
2484
|
}
|
|
2426
2485
|
}
|
|
2427
2486
|
return owner;
|
|
@@ -2446,14 +2505,14 @@
|
|
|
2446
2505
|
var id = this.id;
|
|
2447
2506
|
_arrLoop(aiHook.h, function (hook, idx) {
|
|
2448
2507
|
if (hook.id === id) {
|
|
2449
|
-
aiHook.h
|
|
2508
|
+
aiHook.h[_DYN_SPLICE ](idx, 1);
|
|
2450
2509
|
return 1;
|
|
2451
2510
|
}
|
|
2452
2511
|
});
|
|
2453
2512
|
}
|
|
2454
2513
|
};
|
|
2455
2514
|
aiHook.i++;
|
|
2456
|
-
aiHook.h
|
|
2515
|
+
aiHook.h[_DYN_PUSH$1 ](theHook);
|
|
2457
2516
|
return theHook;
|
|
2458
2517
|
}
|
|
2459
2518
|
function InstrumentFunc(target, funcName, callbacks, checkPrototype) {
|
|
@@ -2470,6 +2529,52 @@
|
|
|
2470
2529
|
return null;
|
|
2471
2530
|
}
|
|
2472
2531
|
|
|
2532
|
+
var _DYN_IDENTIFIER = "identifier";
|
|
2533
|
+
var _DYN_TRACKERS = "trackers";
|
|
2534
|
+
var _DYN_DISABLE_NOTIFICATION0 = "disableNotifications";
|
|
2535
|
+
var _DYN_NEW_LOG_ENTRY = "newLogEntry";
|
|
2536
|
+
var _DYN_PUSH = "push";
|
|
2537
|
+
var _DYN_GET_TRANSMISSION_CON1 = "getTransmissionControls";
|
|
2538
|
+
var _DYN_EXCLUDE_KEYS = "excludeKeys";
|
|
2539
|
+
var _DYN_MAX_MESSAGES = "maxMessages";
|
|
2540
|
+
var _DYN_CREATE_ELEMENT = "createElement";
|
|
2541
|
+
var _DYN_CLASS_NAME = "className";
|
|
2542
|
+
var _DYN_INNER_HTML = "innerHTML";
|
|
2543
|
+
var _DYN_APPEND_CHILD = "appendChild";
|
|
2544
|
+
var _DYN_STOP_PROPAGATION = "stopPropagation";
|
|
2545
|
+
var _DYN_IS_DISPLAYED = "isDisplayed";
|
|
2546
|
+
var _DYN_NAME = "name";
|
|
2547
|
+
var _DYN_LENGTH$1 = "length";
|
|
2548
|
+
var _DYN_SHOW_CHILDREN = "showChildren";
|
|
2549
|
+
var _DYN_DUMP_TO_CONSOLE = "dumpToConsole";
|
|
2550
|
+
var _DYN_LOG_PROCESS_TELEMETR2 = "logProcessTelemetry";
|
|
2551
|
+
var _DYN_INCLUDE_FUNCTIONS = "includeFunctions";
|
|
2552
|
+
var _DYN_POINTER_EVENTS = "pointerEvents";
|
|
2553
|
+
var _DYN_PARENT_ELEMENT = "parentElement";
|
|
2554
|
+
var _DYN_SET_TEXT_FILTER = "setTextFilter";
|
|
2555
|
+
var _DYN_RENDER = "render";
|
|
2556
|
+
var _DYN_GET_EL = "getEl";
|
|
2557
|
+
var _DYN_REMOVE_CHILD = "removeChild";
|
|
2558
|
+
var _DYN_SET_ATTRIBUTE = "setAttribute";
|
|
2559
|
+
var _DYN_ONKEYUP = "onkeyup";
|
|
2560
|
+
var _DYN_INNER_TEXT = "innerText";
|
|
2561
|
+
var _DYN_ONCLICK = "onclick";
|
|
2562
|
+
var _DYN_ONTOUCHEND = "ontouchend";
|
|
2563
|
+
var _DYN_ONKEYDOWN = "onkeydown";
|
|
2564
|
+
var _DYN_PREVENT_DEFAULT = "preventDefault";
|
|
2565
|
+
var _DYN_TARGET = "target";
|
|
2566
|
+
var _DYN_CHILDREN = "children";
|
|
2567
|
+
var _DYN_FILTER_LIST = "filterList";
|
|
2568
|
+
var _DYN_FOCUS = "focus";
|
|
2569
|
+
var _DYN_REPLACE = "replace";
|
|
2570
|
+
var _DYN_SUBSTRING = "substring";
|
|
2571
|
+
var _DYN_TO_STRING$1 = "toString";
|
|
2572
|
+
var _DYN_IS_ERROR = "isError";
|
|
2573
|
+
|
|
2574
|
+
var DEFAULT_BREEZE_ENDPOINT = "https://dc.services.visualstudio.com";
|
|
2575
|
+
var DEFAULT_BREEZE_PATH = "/v2/track";
|
|
2576
|
+
var strNotSpecified = "not_specified";
|
|
2577
|
+
|
|
2473
2578
|
function createDomEvent(eventName) {
|
|
2474
2579
|
var event = null;
|
|
2475
2580
|
if (isFunction(Event)) {
|
|
@@ -2485,13 +2590,18 @@
|
|
|
2485
2590
|
return event;
|
|
2486
2591
|
}
|
|
2487
2592
|
|
|
2593
|
+
var _DYN_LENGTH = "length";
|
|
2594
|
+
var _DYN_TO_LOWER_CASE = "toLowerCase";
|
|
2595
|
+
var _DYN_TO_STRING = "toString";
|
|
2596
|
+
var _DYN_REMOVE_ITEM = "removeItem";
|
|
2597
|
+
|
|
2488
2598
|
var strEmpty = "";
|
|
2489
2599
|
function stringToBoolOrDefault(str, defaultValue) {
|
|
2490
2600
|
if (defaultValue === void 0) { defaultValue = false; }
|
|
2491
2601
|
if (str === undefined || str === null) {
|
|
2492
2602
|
return defaultValue;
|
|
2493
2603
|
}
|
|
2494
|
-
return str.toString()
|
|
2604
|
+
return str.toString()[_DYN_TO_LOWER_CASE ]() === "true";
|
|
2495
2605
|
}
|
|
2496
2606
|
function msToTimeSpan(totalms) {
|
|
2497
2607
|
if (isNaN(totalms) || totalms < 0) {
|
|
@@ -2503,10 +2613,10 @@
|
|
|
2503
2613
|
var min = strEmpty + Math.floor(totalms / (1000 * 60)) % 60;
|
|
2504
2614
|
var hour = strEmpty + Math.floor(totalms / (1000 * 60 * 60)) % 24;
|
|
2505
2615
|
var days = Math.floor(totalms / (1000 * 60 * 60 * 24));
|
|
2506
|
-
ms = ms
|
|
2507
|
-
sec = sec
|
|
2508
|
-
min = min
|
|
2509
|
-
hour = hour
|
|
2616
|
+
ms = ms[_DYN_LENGTH ] === 1 ? "00" + ms : ms[_DYN_LENGTH ] === 2 ? "0" + ms : ms;
|
|
2617
|
+
sec = sec[_DYN_LENGTH ] < 2 ? "0" + sec : sec;
|
|
2618
|
+
min = min[_DYN_LENGTH ] < 2 ? "0" + min : min;
|
|
2619
|
+
hour = hour[_DYN_LENGTH ] < 2 ? "0" + hour : hour;
|
|
2510
2620
|
return (days > 0 ? days + "." : strEmpty) + hour + ":" + min + ":" + sec + "." + ms;
|
|
2511
2621
|
}
|
|
2512
2622
|
function getExtensionByName(extensions, identifier) {
|
|
@@ -2523,8 +2633,6 @@
|
|
|
2523
2633
|
return !error && isString(message) && (message === "Script error." || message === "Script error");
|
|
2524
2634
|
}
|
|
2525
2635
|
|
|
2526
|
-
var strNotSpecified = "not_specified";
|
|
2527
|
-
|
|
2528
2636
|
var StorageType = createEnumStyle({
|
|
2529
2637
|
LocalStorage: 0 ,
|
|
2530
2638
|
SessionStorage: 1
|
|
@@ -2548,11 +2656,11 @@
|
|
|
2548
2656
|
if (isNullOrUndefined(getGlobal())) {
|
|
2549
2657
|
return null;
|
|
2550
2658
|
}
|
|
2551
|
-
var uid = (new Date)
|
|
2659
|
+
var uid = (new Date)[_DYN_TO_STRING ]();
|
|
2552
2660
|
var storage = getGlobalInst(storageType === StorageType.LocalStorage ? "localStorage" : "sessionStorage");
|
|
2553
2661
|
storage.setItem(uid, uid);
|
|
2554
2662
|
var fail = storage.getItem(uid) !== uid;
|
|
2555
|
-
storage
|
|
2663
|
+
storage[_DYN_REMOVE_ITEM ](uid);
|
|
2556
2664
|
if (!fail) {
|
|
2557
2665
|
return storage;
|
|
2558
2666
|
}
|
|
@@ -2608,7 +2716,7 @@
|
|
|
2608
2716
|
var storage = _getLocalStorageObject();
|
|
2609
2717
|
if (storage !== null) {
|
|
2610
2718
|
try {
|
|
2611
|
-
storage
|
|
2719
|
+
storage[_DYN_REMOVE_ITEM ](name);
|
|
2612
2720
|
return true;
|
|
2613
2721
|
}
|
|
2614
2722
|
catch (e) {
|
|
@@ -2664,7 +2772,7 @@
|
|
|
2664
2772
|
var storage = _getSessionStorageObject();
|
|
2665
2773
|
if (storage !== null) {
|
|
2666
2774
|
try {
|
|
2667
|
-
storage
|
|
2775
|
+
storage[_DYN_REMOVE_ITEM ](name);
|
|
2668
2776
|
return true;
|
|
2669
2777
|
}
|
|
2670
2778
|
catch (e) {
|
|
@@ -2676,12 +2784,12 @@
|
|
|
2676
2784
|
}
|
|
2677
2785
|
|
|
2678
2786
|
var _internalEndpoints = [
|
|
2679
|
-
|
|
2680
|
-
"https://breeze.aimon.applicationinsights.io
|
|
2681
|
-
"https://dc-int.services.visualstudio.com
|
|
2787
|
+
DEFAULT_BREEZE_ENDPOINT + DEFAULT_BREEZE_PATH,
|
|
2788
|
+
"https://breeze.aimon.applicationinsights.io" + DEFAULT_BREEZE_PATH,
|
|
2789
|
+
"https://dc-int.services.visualstudio.com" + DEFAULT_BREEZE_PATH
|
|
2682
2790
|
];
|
|
2683
2791
|
function isInternalApplicationInsightsEndpoint(endpointUrl) {
|
|
2684
|
-
return arrIndexOf(_internalEndpoints, endpointUrl
|
|
2792
|
+
return arrIndexOf(_internalEndpoints, endpointUrl[_DYN_TO_LOWER_CASE ]()) !== -1;
|
|
2685
2793
|
}
|
|
2686
2794
|
var Util = {
|
|
2687
2795
|
NotSpecified: strNotSpecified,
|
|
@@ -2724,157 +2832,25 @@
|
|
|
2724
2832
|
getExtension: getExtensionByName
|
|
2725
2833
|
};
|
|
2726
2834
|
|
|
2727
|
-
var BG_INFO = "#F0F6FF", BG_ERROR = "#FEF0F1", ICON_ERROR = "#E00B1C", BTN_PRIMARY = "#0078d4", BTN_HOVER = "#106EBE", BTN_ACTIVE = "#005A9E", TEXT_PRIMARY = "#323130", TEXT_MATCHED = "yellow", BORDER_GREY_160 = "1px solid #605E5C", BORDER_GREY_60 = "1px solid #B3B0AD";
|
|
2728
|
-
console.log(Util.getIEVersion());
|
|
2729
|
-
var tempStyle = function (prefix) { return "\n .".concat(prefix, "-dbg-lgr-dashboard {\n z-index: 1000\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .controls {\n width: 90%;\n min-width: 600px;\n position: relative;\n margin: auto;\n left: 0;\n right: 0;\n font-family: monospace;\n font-size: 16px;\n border-color: ").concat(BG_INFO, ";\n border: 1px solid;\n background-color: transparent;\n display: block;\n padding-top: 3px;\n padding-bottom: 3px;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .controls > div {\n display: inline-block;\n position: relative;\n padding: 3px 20px;\n z-index: 1010\n }\n\n .").concat(prefix, "-dbg-lgr {\n width: 90%;\n min-width: 600px;\n height: 80%;\n position: relative;\n margin: auto;\n left: 0;\n right: 0;\n font-family: monospace;\n font-size: 16px;\n overflow-y: scroll;\n overflow-x: ").concat((Util.getIEVersion()) ? "scroll" : "hidden", ";\n border: ").concat(BORDER_GREY_160, ";\n border-radius: 2px;\n }\n\n .").concat(prefix, "-dbg-lgr div:focus {\n outline: 2px solid black;\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
2730
|
-
? ""
|
|
2731
|
-
: ".".concat(prefix, "-dbg-lgr .tree-root div::before {\n content: '';\n position: absolute;\n left: -1.25em;\n height: 100%;\n border-right: 2px dotted #CCCCCC;\n }"), "\n\n .").concat(prefix, "-dbg-lgr .tree-root div:hover::before {\n border-right: 2px solid #000;\n }\n\n .").concat(prefix, "-dbg-lgr > div {\n display: block;\n position: relative;\n }\n\n .").concat(prefix, "-dbg-lgr > div:not(.controls) div {\n display: block;\n position: relative;\n margin-left: 2em;\n width: 100%;\n }\n\n .").concat(prefix, "-dbg-lgr .expandable {\n cursor: pointer;\n }\n\n .").concat(prefix, "-dbg-lgr > .tree-root div > span {\n width: 100%;\n display: block;\n }\n\n .").concat(prefix, "-dbg-lgr .exception {\n background-color: ").concat(BG_ERROR, ";\n color: ").concat(TEXT_PRIMARY, ";\n }\n\n .").concat(prefix, "-dbg-lgr .matched-text-filter {\n background-color: ").concat(TEXT_MATCHED, ";\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
2732
|
-
? ""
|
|
2733
|
-
: ".".concat(prefix, "-dbg-lgr .expandable.open::before {\n content: '[-] ';\n font-weight: bold;\n }\n\n .").concat(prefix, "-dbg-lgr .expandable.closed::before {\n content: '[+] ';\n font-weight: bold;\n }"), "\n\n .").concat(prefix, "-dbg-lgr div:hover > .obj-key {\n text-decoration: underline;\n }\n\n .").concat(prefix, "-dbg-lgr .obj-time {\n padding-right: 15px;\n color: #605E5C;\n }\n \n .").concat(prefix, "-dbg-lgr .object {pointer-events: auto;}\n .").concat(prefix, "-dbg-lgr .function {color: #881391;}\n .").concat(prefix, "-dbg-lgr .string {color: #CB3632;}\n .").concat(prefix, "-dbg-lgr .number {color: #1C00CF;}\n .").concat(prefix, "-dbg-lgr .key {color: #881391; font-weight: bold;}\n .").concat(prefix, "-dbg-lgr .empty {color: #AAAAAA; font-style: italic;}\n\n .").concat(prefix, "-dbg-lgr-dashboard ").concat(prefix, "-last-selected-element > span {\n display: block;\n background-color: black;\n border-radius: 2px;\n color: white\n }\n .").concat(prefix, "-last-selected-element > span > span,\n .").concat(prefix, "-last-selected-element > span > span[class] {\n color: white;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard #close-dashboard {\n float: right;\n margin-right: 2em;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-primary {\n display: inline-block;\n background-color: ").concat(BTN_PRIMARY, ";\n color: #FFFFFF;\n border-radius: 2px;\n cursor: pointer;\n border: 1px solid;\n padding: 3px 20px;\n margin-left: 2em;\n height: 24px;\n min-width: 80px;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-primary:hover {\n background-color: ").concat(BTN_HOVER, ";\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-primary:active {\n background-color: ").concat(BTN_ACTIVE, ";\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-secondary {\n display: inline-block;\n border: 1px solid;\n bolder-color: ").concat(BTN_PRIMARY, ";\n color: ").concat(BTN_PRIMARY, ";\n background-color: transparent;\n border-radius: 2px;\n cursor: pointer;\n border: 1px solid;\n padding: 3px 20px;\n margin-left: 2em;\n height: 24px;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-secondary:hover {\n background-color: ").concat(BTN_HOVER, ";\n color: #FFFFFF;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-secondary:active {\n background-color: ").concat(BTN_ACTIVE, ";\n color: #FFFFFF;\n }\n \n .").concat(prefix, "-dbg-lgr-dashboard .filterlist {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n width: 180px;\n min-height: 24px;\n margin-left: 2em;\n user-select: none;\n cursor: pointer;\n }\n .").concat(prefix, "-dbg-lgr-dashboard .filterlist-input {\n position: relative;\n padding: 3px 8px;\n border: ").concat(BORDER_GREY_60, ";\n border-radius: 2px;\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
2734
|
-
? ""
|
|
2735
|
-
: ".".concat(prefix, "-dbg-lgr-dashboard .filterlist-input::after {\n content: '';\n width: 8px;\n height: 8px;\n position: absolute;\n right: 8px;\n top: 5px;\n margin: auto;\n transform: rotate(45deg);\n border: ").concat(BORDER_GREY_160, ";\n border-top: none;\n border-left: none;\n }"), "\n\n .").concat(prefix, "-dbg-lgr-dashboard .filterlist-input:focus {\n border: ").concat(BORDER_GREY_60, "\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .filterlist-dropdown {\n position: absolute;\n top: 100%;\n margin: auto;\n background-color: #FFFFFF;\n overflow: hidden;\n min-width: 180px;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.16);\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .filterlist-toggle {\n position: relative;\n padding: 3px 8px;\n height: 32px;\n width: 100%;\n ").concat((Util.getIEVersion()) ? "" : "box-sizing: border-box;", "\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .filterlist-toggle:focus {\n outline: none;\n border: ").concat(BORDER_GREY_60, ";\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .text-filter-input {\n font-family: monospace;\n margin-left: 2em;\n padding: 3px 8px;\n width: 180px;\n height: 24px;\n border-radius: 2px;\n border: ").concat(BORDER_GREY_160, ";\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .text-filter-input:focus {\n border: ").concat(BORDER_GREY_60, ";\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .label {\n vertical-align: middle;\n width: 80%;\n display: inline-block;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .checkbox {\n display: inline-block;\n width: 18px;\n height: 18px;\n border-radius: 2px;\n vertical-align: middle;\n margin-right: 8px;\n ").concat((Util.getIEVersion()) ? "" : "box-sizing: border-box;", "\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .checkbox.on {\n background-color: #0078D4;\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
2736
|
-
? ""
|
|
2737
|
-
: ".".concat(prefix, "-dbg-lgr-dashboard .checkbox.on::after {\n content: '';\n width: 5px;\n height: 10px;\n display: inline-block;\n margin: 2px 6px;\n padding: 0;\n transform: rotate(45deg);\n border: 1px solid #FFFFFF;\n border-top: none;\n border-left: none;\n }"), "\n\n\n .").concat(prefix, "-dbg-lgr-dashboard .checkbox.off {\n border: ").concat(BORDER_GREY_160, ";\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
2738
|
-
? ""
|
|
2739
|
-
: "@media only screen and (max-width: 600px) {\n .".concat(prefix, "-dbg-lgr {\n width: 100%;\n min-width: 200px;\n }\n }"), "\n\n"); };
|
|
2740
|
-
var permStyle = function (prefix) { return "\n .".concat(prefix, "-debug-bin-container {\n position: fixed;\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
2741
|
-
? "width: 100%;\n height: 100%;\n top: 0;\n left: 0;"
|
|
2742
|
-
: "width: 100vw;\n height: 100vh;", "\n pointer-events: none;\n }\n\n .").concat(prefix, "-debug-bin-parent {\n position: fixed;\n right: 20px;\n margin: auto;\n padding: 10px;\n border-radius: 2px;\n min-height: 20px;\n min-width: 20px;\n overflow: hidden;\n pointer-events: auto;\n text-align: right;\n font-family: monospace;\n font-size: 16px;\n color: #FFFFFF;\n background-color: ").concat(BTN_PRIMARY, ";\n border: 2px solid #FFFFFF;\n transition: 2s color linear;\n cursor: pointer;\n transition: .2s width ease-in-out, .2s height ease-in-out;\n ").concat((Util.getIEVersion()) ? "" : "box-sizing: border-box;", "\n }\n\n .").concat(prefix, "-debug-bin-parent.active {\n background-color: ").concat(BG_INFO, ";\n color: ").concat(TEXT_PRIMARY, ";\n }\n\n .").concat(prefix, "-debug-bin-parent:focus {\n border: ").concat(BORDER_GREY_160, ";\n outline: none;\n }\n\n .").concat(prefix, "-debug-bin-parent.notify {\n background-color: ").concat(ICON_ERROR, ";\n }\n\n .").concat(prefix, "-debug-bin-parent button {\n display: block;\n width: 100%;\n background-color: ").concat(BTN_PRIMARY, ";\n color: #FFFFFF;\n border-radius: 2px;\n margin-bottom: 5px;\n margin-top: 10px;\n cursor: pointer;\n border: none;\n padding: 3px 20px;\n height: 24px;\n }\n\n .").concat(prefix, "-debug-bin-parent button:hover {\n background-color: ").concat(BTN_HOVER, ";\n }\n\n .").concat(prefix, "-debug-bin-parent button:active {\n background-color: ").concat(BTN_ACTIVE, ";\n }\n\n .").concat(prefix, "-debug-bin-parent .el-name {\n text-align: left;\n }\n\n .").concat(prefix, "-debug-bin-parent .el-value {\n display: inline-block;\n transform: scale(1);\n transition: 2s transform linear, 0s 2s font-weight linear;\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
2743
|
-
? ""
|
|
2744
|
-
: ".".concat(prefix, "-debug-bin-parent.notify::after {\n content: \" (!)\";\n }"), "\n\n .").concat(prefix, "-debug-bin-parent .el-value.incremented {\n transform: scale(1.5);\n font-weight: bold;\n transition: 0s transform linear, 0s font-weight linear;\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
2745
|
-
? ""
|
|
2746
|
-
: ".".concat(prefix, "-debug-bin-parent:focus > span::before,\n .").concat(prefix, "-debug-bin-parent:hover > span::before,\n .").concat(prefix, "-debug-bin-parent.active > span::before {\n content: attr(data-name) \": \";\n }"), "\n"); };
|
|
2747
|
-
|
|
2748
|
-
var FilterList = /** @class */ (function () {
|
|
2749
|
-
function FilterList(parent, trackers, toggleCb) {
|
|
2750
|
-
var _this = this;
|
|
2751
|
-
this.children = [];
|
|
2752
|
-
this.getCurrentFilter = function () {
|
|
2753
|
-
return _this.filterList;
|
|
2754
|
-
};
|
|
2755
|
-
var _self = this;
|
|
2756
|
-
var active = false;
|
|
2757
|
-
trackers = trackers.concat("other");
|
|
2758
|
-
_self.filterList = [];
|
|
2759
|
-
_self.el = document.createElement("div");
|
|
2760
|
-
_self.el.className = "filterlist";
|
|
2761
|
-
var inputEl = document.createElement("div");
|
|
2762
|
-
inputEl.className = "filterlist-input";
|
|
2763
|
-
inputEl.innerText = "filter nodes...";
|
|
2764
|
-
_self.el.appendChild(inputEl);
|
|
2765
|
-
var dropdownMenuEl = document.createElement("div");
|
|
2766
|
-
dropdownMenuEl.className = "filterlist-dropdown";
|
|
2767
|
-
_self.el.appendChild(dropdownMenuEl);
|
|
2768
|
-
dropdownMenuEl.onkeyup = function (evt) {
|
|
2769
|
-
if (active && evt.keyCode === 27) {
|
|
2770
|
-
evt.stopPropagation();
|
|
2771
|
-
_hideDropdown();
|
|
2772
|
-
}
|
|
2773
|
-
};
|
|
2774
|
-
var _loop_1 = function (t) {
|
|
2775
|
-
var chEl = document.createElement("div");
|
|
2776
|
-
chEl.setAttribute("tabindex", "0");
|
|
2777
|
-
chEl.setAttribute("filter-type", t);
|
|
2778
|
-
chEl.className = "filterlist-toggle";
|
|
2779
|
-
var checkbox = document.createElement("div");
|
|
2780
|
-
checkbox.className = "checkbox on";
|
|
2781
|
-
var label = document.createElement("span");
|
|
2782
|
-
label.className = "label";
|
|
2783
|
-
label.innerText = t;
|
|
2784
|
-
chEl.appendChild(checkbox);
|
|
2785
|
-
chEl.appendChild(label);
|
|
2786
|
-
chEl.onkeyup = function (evt) {
|
|
2787
|
-
if (active && evt.keyCode === 27) {
|
|
2788
|
-
evt.stopPropagation();
|
|
2789
|
-
_hideDropdown();
|
|
2790
|
-
}
|
|
2791
|
-
};
|
|
2792
|
-
chEl.onclick = function (evt) {
|
|
2793
|
-
evt.stopPropagation();
|
|
2794
|
-
chEl.focus();
|
|
2795
|
-
if (checkbox.className === "checkbox off") {
|
|
2796
|
-
if (evt.shiftKey) {
|
|
2797
|
-
_self.filterList = trackers.concat();
|
|
2798
|
-
for (var _i = 0, _a = _self.children; _i < _a.length; _i++) {
|
|
2799
|
-
var ch = _a[_i];
|
|
2800
|
-
ch.childNodes[0].className = "checkbox off";
|
|
2801
|
-
}
|
|
2802
|
-
}
|
|
2803
|
-
_self.filterList.splice(arrIndexOf(_self.filterList, t), 1);
|
|
2804
|
-
checkbox.className = "checkbox on";
|
|
2805
|
-
}
|
|
2806
|
-
else {
|
|
2807
|
-
if (evt.shiftKey) {
|
|
2808
|
-
_self.filterList = [];
|
|
2809
|
-
for (var _b = 0, _c = _self.children; _b < _c.length; _b++) {
|
|
2810
|
-
var ch = _c[_b];
|
|
2811
|
-
ch.childNodes[0].className = "checkbox on";
|
|
2812
|
-
}
|
|
2813
|
-
}
|
|
2814
|
-
_self.filterList.push(t);
|
|
2815
|
-
checkbox.className = "checkbox off";
|
|
2816
|
-
}
|
|
2817
|
-
toggleCb();
|
|
2818
|
-
};
|
|
2819
|
-
_self.children.push(chEl);
|
|
2820
|
-
};
|
|
2821
|
-
for (var _i = 0, trackers_1 = trackers; _i < trackers_1.length; _i++) {
|
|
2822
|
-
var t = trackers_1[_i];
|
|
2823
|
-
_loop_1(t);
|
|
2824
|
-
}
|
|
2825
|
-
function _hideDropdown() {
|
|
2826
|
-
active = false;
|
|
2827
|
-
for (var _i = 0, _a = _self.children; _i < _a.length; _i++) {
|
|
2828
|
-
var ch = _a[_i];
|
|
2829
|
-
dropdownMenuEl.removeChild(ch);
|
|
2830
|
-
}
|
|
2831
|
-
}
|
|
2832
|
-
function _showDropdown() {
|
|
2833
|
-
active = true;
|
|
2834
|
-
for (var _i = 0, _a = _self.children; _i < _a.length; _i++) {
|
|
2835
|
-
var ch = _a[_i];
|
|
2836
|
-
dropdownMenuEl.appendChild(ch);
|
|
2837
|
-
}
|
|
2838
|
-
dropdownMenuEl.focus();
|
|
2839
|
-
}
|
|
2840
|
-
_self.el.onkeyup = function (evt) {
|
|
2841
|
-
if (active && evt.keyCode === 27) {
|
|
2842
|
-
evt.stopPropagation();
|
|
2843
|
-
_hideDropdown();
|
|
2844
|
-
}
|
|
2845
|
-
};
|
|
2846
|
-
_self.el.onclick = function () {
|
|
2847
|
-
if (!active) {
|
|
2848
|
-
_showDropdown();
|
|
2849
|
-
}
|
|
2850
|
-
else {
|
|
2851
|
-
_hideDropdown();
|
|
2852
|
-
}
|
|
2853
|
-
};
|
|
2854
|
-
parent.appendChild(_self.el);
|
|
2855
|
-
}
|
|
2856
|
-
return FilterList;
|
|
2857
|
-
}());
|
|
2858
|
-
|
|
2859
2835
|
var strConstructor = "constructor";
|
|
2860
2836
|
var strGetOwnPropertyNames = "getOwnPropertyNames";
|
|
2861
2837
|
var MAX_DEPTH = 16;
|
|
2862
2838
|
function makeRegex(value) {
|
|
2863
|
-
if (value && value
|
|
2864
|
-
value = value
|
|
2865
|
-
value = value
|
|
2839
|
+
if (value && value[_DYN_LENGTH$1 ] > 0) {
|
|
2840
|
+
value = value[_DYN_REPLACE ](/\\/g, "\\\\");
|
|
2841
|
+
value = value[_DYN_REPLACE ](/([\+\?\|\{\}\[\]\(\)\^\$\#\.\=\!\:\/])/g, "\\$1");
|
|
2866
2842
|
value = value.replace(/\*/g, ".*");
|
|
2867
2843
|
return new RegExp("(" + value + ")");
|
|
2868
2844
|
}
|
|
2869
2845
|
return null;
|
|
2870
2846
|
}
|
|
2871
2847
|
function toggleClassName(el, className) {
|
|
2872
|
-
var idx = el.
|
|
2848
|
+
var idx = el[_DYN_CLASS_NAME ].indexOf(className);
|
|
2873
2849
|
if (idx === -1) {
|
|
2874
|
-
el
|
|
2850
|
+
el[_DYN_CLASS_NAME ] += className;
|
|
2875
2851
|
}
|
|
2876
2852
|
else {
|
|
2877
|
-
el
|
|
2853
|
+
el[_DYN_CLASS_NAME ] = el[_DYN_CLASS_NAME ][_DYN_SUBSTRING ](0, idx) + el[_DYN_CLASS_NAME ][_DYN_SUBSTRING ](idx + className[_DYN_LENGTH$1 ]);
|
|
2878
2854
|
}
|
|
2879
2855
|
}
|
|
2880
2856
|
function traverseAndReplace(target, maxDepth, currentDepth, thingsReferenced, excludedKeys, includeFunctions) {
|
|
@@ -2887,7 +2863,7 @@
|
|
|
2887
2863
|
var key = _a[_i];
|
|
2888
2864
|
var targetValue = target[key];
|
|
2889
2865
|
if (isSymbol(targetValue)) {
|
|
2890
|
-
targetValue = targetValue
|
|
2866
|
+
targetValue = targetValue[_DYN_TO_STRING$1 ]();
|
|
2891
2867
|
}
|
|
2892
2868
|
if (targetValue !== null && arrIndexOf(thingsReferenced, targetValue) !== -1) {
|
|
2893
2869
|
out[key] = "<circular (".concat(key, " - \"").concat(getTargetName(targetValue), "\")>");
|
|
@@ -2897,7 +2873,7 @@
|
|
|
2897
2873
|
out[key] = "<max allowed depth reached>";
|
|
2898
2874
|
}
|
|
2899
2875
|
else {
|
|
2900
|
-
thingsReferenced
|
|
2876
|
+
thingsReferenced[_DYN_PUSH ](target);
|
|
2901
2877
|
out[key] = traverseAndReplace(targetValue, maxDepth, currentDepth + 1, thingsReferenced, excludedKeys, includeFunctions);
|
|
2902
2878
|
thingsReferenced.pop();
|
|
2903
2879
|
}
|
|
@@ -2911,9 +2887,9 @@
|
|
|
2911
2887
|
}
|
|
2912
2888
|
function _sanitizeText(value) {
|
|
2913
2889
|
if (value) {
|
|
2914
|
-
value = value
|
|
2915
|
-
value = value
|
|
2916
|
-
value = value
|
|
2890
|
+
value = value[_DYN_REPLACE ](/&/g, "&");
|
|
2891
|
+
value = value[_DYN_REPLACE ](/>/g, ">");
|
|
2892
|
+
value = value[_DYN_REPLACE ](/</g, "<");
|
|
2917
2893
|
}
|
|
2918
2894
|
return value;
|
|
2919
2895
|
}
|
|
@@ -2926,19 +2902,19 @@
|
|
|
2926
2902
|
var matchTxt = rg.exec(innerText);
|
|
2927
2903
|
if (matchTxt && matchTxt[1]) {
|
|
2928
2904
|
matchPos = theText.indexOf(matchTxt[1]);
|
|
2929
|
-
matchLen = matchTxt[1]
|
|
2905
|
+
matchLen = matchTxt[1][_DYN_LENGTH$1 ];
|
|
2930
2906
|
}
|
|
2931
2907
|
}
|
|
2932
2908
|
if (matchPos !== -1) {
|
|
2933
|
-
var innerHtml = _sanitizeText(theText
|
|
2909
|
+
var innerHtml = _sanitizeText(theText[_DYN_SUBSTRING ](0, matchPos)) +
|
|
2934
2910
|
"<span class=\"matched-text-filter\">" +
|
|
2935
|
-
_sanitizeText(theText
|
|
2911
|
+
_sanitizeText(theText[_DYN_SUBSTRING ](matchPos, matchPos + matchLen)) +
|
|
2936
2912
|
"</span>" +
|
|
2937
|
-
theText
|
|
2938
|
-
elm
|
|
2913
|
+
theText[_DYN_SUBSTRING ](matchPos + matchLen);
|
|
2914
|
+
elm[_DYN_INNER_HTML ] = innerHtml;
|
|
2939
2915
|
return true;
|
|
2940
2916
|
}
|
|
2941
|
-
elm
|
|
2917
|
+
elm[_DYN_INNER_TEXT ] = theText;
|
|
2942
2918
|
return false;
|
|
2943
2919
|
}
|
|
2944
2920
|
var lastSelectedElement;
|
|
@@ -2948,53 +2924,53 @@
|
|
|
2948
2924
|
if (!toCopy) {
|
|
2949
2925
|
return;
|
|
2950
2926
|
}
|
|
2951
|
-
var textArea = document
|
|
2952
|
-
textArea
|
|
2927
|
+
var textArea = document[_DYN_CREATE_ELEMENT ]("textarea");
|
|
2928
|
+
textArea[_DYN_INNER_TEXT ] = JSON.stringify(toCopy);
|
|
2953
2929
|
textArea.style.opacity = "0";
|
|
2954
|
-
document.body
|
|
2930
|
+
document.body[_DYN_APPEND_CHILD ](textArea);
|
|
2955
2931
|
textArea.select();
|
|
2956
2932
|
document.execCommand("copy");
|
|
2957
|
-
textArea
|
|
2933
|
+
textArea[_DYN_PARENT_ELEMENT ][_DYN_REMOVE_CHILD ](textArea);
|
|
2958
2934
|
}
|
|
2959
2935
|
function focusHandler(evt, target, level, excludeKeys, includeFunctions) {
|
|
2960
2936
|
if (lastSelectedElement) {
|
|
2961
2937
|
toggleClassName(lastSelectedElement, " last-selected-element");
|
|
2962
2938
|
}
|
|
2963
|
-
lastSelectedElement = evt
|
|
2939
|
+
lastSelectedElement = evt[_DYN_TARGET ];
|
|
2964
2940
|
for (var i = 0; i < 10; i++) {
|
|
2965
2941
|
if (lastSelectedElement.tagName === "DIV") {
|
|
2966
2942
|
break;
|
|
2967
2943
|
}
|
|
2968
|
-
lastSelectedElement = lastSelectedElement
|
|
2944
|
+
lastSelectedElement = lastSelectedElement[_DYN_PARENT_ELEMENT ];
|
|
2969
2945
|
}
|
|
2970
|
-
lastSelectedElement
|
|
2946
|
+
lastSelectedElement[_DYN_CLASS_NAME ] += " last-selected-element";
|
|
2971
2947
|
selectedObject = traverseAndReplace(target, MAX_DEPTH, level, null, excludeKeys, includeFunctions);
|
|
2972
2948
|
}
|
|
2973
2949
|
function _navHandler(evt, openHandler, currentState) {
|
|
2974
|
-
var el = evt
|
|
2950
|
+
var el = evt[_DYN_TARGET ];
|
|
2975
2951
|
switch (evt.which) {
|
|
2976
2952
|
case 13:
|
|
2977
2953
|
(openHandler) ? openHandler(evt) : void 0;
|
|
2978
2954
|
break;
|
|
2979
2955
|
case 38:
|
|
2980
|
-
evt
|
|
2956
|
+
evt[_DYN_PREVENT_DEFAULT ]();
|
|
2981
2957
|
var prev = el.previousElementSibling;
|
|
2982
2958
|
if (prev && prev.tagName !== "BUTTON") {
|
|
2983
|
-
prev
|
|
2959
|
+
prev[_DYN_FOCUS ]();
|
|
2984
2960
|
}
|
|
2985
2961
|
break;
|
|
2986
2962
|
case 40:
|
|
2987
|
-
evt
|
|
2963
|
+
evt[_DYN_PREVENT_DEFAULT ]();
|
|
2988
2964
|
var next = el.nextElementSibling;
|
|
2989
2965
|
if (next) {
|
|
2990
|
-
next
|
|
2966
|
+
next[_DYN_FOCUS ]();
|
|
2991
2967
|
}
|
|
2992
2968
|
break;
|
|
2993
2969
|
case 39:
|
|
2994
2970
|
if (openHandler) {
|
|
2995
2971
|
openHandler(evt, true);
|
|
2996
2972
|
if (currentState) {
|
|
2997
|
-
el.firstElementChild.nextSibling
|
|
2973
|
+
el.firstElementChild.nextSibling[_DYN_FOCUS ]();
|
|
2998
2974
|
}
|
|
2999
2975
|
}
|
|
3000
2976
|
break;
|
|
@@ -3003,29 +2979,29 @@
|
|
|
3003
2979
|
openHandler(evt, false);
|
|
3004
2980
|
}
|
|
3005
2981
|
if (!currentState) {
|
|
3006
|
-
el
|
|
2982
|
+
el[_DYN_PARENT_ELEMENT ][_DYN_FOCUS ]();
|
|
3007
2983
|
}
|
|
3008
2984
|
break;
|
|
3009
2985
|
case 67:
|
|
3010
2986
|
if (evt.ctrlKey) {
|
|
3011
2987
|
copySelectedTree();
|
|
3012
|
-
evt
|
|
2988
|
+
evt[_DYN_TARGET ][_DYN_FOCUS ]();
|
|
3013
2989
|
}
|
|
3014
2990
|
break;
|
|
3015
2991
|
}
|
|
3016
2992
|
}
|
|
3017
2993
|
function getTargetName(target) {
|
|
3018
2994
|
if (target) {
|
|
3019
|
-
if (isString(target
|
|
3020
|
-
return target
|
|
2995
|
+
if (isString(target[_DYN_IDENTIFIER ])) {
|
|
2996
|
+
return target[_DYN_IDENTIFIER ];
|
|
3021
2997
|
}
|
|
3022
|
-
if (isString(target
|
|
3023
|
-
return target
|
|
2998
|
+
if (isString(target[_DYN_NAME ])) {
|
|
2999
|
+
return target[_DYN_NAME ];
|
|
3024
3000
|
}
|
|
3025
3001
|
if (hasOwnProperty(target, strShimPrototype)) {
|
|
3026
|
-
return target
|
|
3002
|
+
return target[_DYN_NAME ] || "";
|
|
3027
3003
|
}
|
|
3028
|
-
return ((target[strConstructor]) || {})
|
|
3004
|
+
return ((target[strConstructor]) || {})[_DYN_NAME ] || "";
|
|
3029
3005
|
}
|
|
3030
3006
|
return "";
|
|
3031
3007
|
}
|
|
@@ -3034,7 +3010,7 @@
|
|
|
3034
3010
|
return value;
|
|
3035
3011
|
}
|
|
3036
3012
|
if (isSymbol(value)) {
|
|
3037
|
-
return value
|
|
3013
|
+
return value[_DYN_TO_STRING$1 ]();
|
|
3038
3014
|
}
|
|
3039
3015
|
if (isFunction(value["toString"])) {
|
|
3040
3016
|
return value["toString"]() || "";
|
|
@@ -3051,7 +3027,7 @@
|
|
|
3051
3027
|
arrForEach(propKeys, function (key) {
|
|
3052
3028
|
var theKey = _toString(key);
|
|
3053
3029
|
if (theKey && arrIndexOf(keys, theKey) === -1) {
|
|
3054
|
-
keys
|
|
3030
|
+
keys[_DYN_PUSH ](key);
|
|
3055
3031
|
}
|
|
3056
3032
|
});
|
|
3057
3033
|
}
|
|
@@ -3067,7 +3043,7 @@
|
|
|
3067
3043
|
}
|
|
3068
3044
|
var theKey = _toString(key);
|
|
3069
3045
|
if (theKey && arrIndexOf(excludedKeys, theKey) === -1) {
|
|
3070
|
-
theKeys
|
|
3046
|
+
theKeys[_DYN_PUSH ](theKey);
|
|
3071
3047
|
}
|
|
3072
3048
|
});
|
|
3073
3049
|
return theKeys;
|
|
@@ -3080,28 +3056,28 @@
|
|
|
3080
3056
|
if (!thingsReferenced) {
|
|
3081
3057
|
thingsReferenced = [];
|
|
3082
3058
|
}
|
|
3083
|
-
var isObj = isObject(target) || Util
|
|
3084
|
-
var isErr = target["baseType"] === "ExceptionData" || Util
|
|
3059
|
+
var isObj = isObject(target) || Util[_DYN_IS_ERROR ](target);
|
|
3060
|
+
var isErr = target["baseType"] === "ExceptionData" || Util[_DYN_IS_ERROR ](target);
|
|
3085
3061
|
var children = [];
|
|
3086
3062
|
function _openNode(currentLine) {
|
|
3087
3063
|
openState = true;
|
|
3088
3064
|
arrForEach(children, function (child) {
|
|
3089
|
-
rootDiv
|
|
3065
|
+
rootDiv[_DYN_APPEND_CHILD ](child);
|
|
3090
3066
|
});
|
|
3091
|
-
currentLine
|
|
3067
|
+
currentLine[_DYN_CLASS_NAME ] = "obj-key expandable open";
|
|
3092
3068
|
}
|
|
3093
3069
|
function _collapseNode(currentLine) {
|
|
3094
3070
|
arrForEach(children, function (child) {
|
|
3095
|
-
rootDiv
|
|
3071
|
+
rootDiv[_DYN_REMOVE_CHILD ](child);
|
|
3096
3072
|
});
|
|
3097
3073
|
openState = false;
|
|
3098
|
-
currentLine
|
|
3074
|
+
currentLine[_DYN_CLASS_NAME ] = "obj-key expandable closed";
|
|
3099
3075
|
}
|
|
3100
3076
|
var matched = false;
|
|
3101
3077
|
var childOpened = false;
|
|
3102
3078
|
var keys = getTargetKeys(target, excludeKeys, includeFunctions);
|
|
3103
|
-
if (keys
|
|
3104
|
-
keys
|
|
3079
|
+
if (keys[_DYN_LENGTH$1 ] === 0) {
|
|
3080
|
+
keys[_DYN_PUSH ]("<empty>");
|
|
3105
3081
|
}
|
|
3106
3082
|
if (level >= MAX_DEPTH) {
|
|
3107
3083
|
keys.unshift("<maxdepth>");
|
|
@@ -3113,29 +3089,29 @@
|
|
|
3113
3089
|
}
|
|
3114
3090
|
var targetValue = target[key_1];
|
|
3115
3091
|
if (isSymbol(targetValue)) {
|
|
3116
|
-
targetValue = targetValue
|
|
3092
|
+
targetValue = targetValue[_DYN_TO_STRING$1 ]();
|
|
3117
3093
|
}
|
|
3118
3094
|
if (key_1 === "<maxdepth>") {
|
|
3119
|
-
var builder = document
|
|
3120
|
-
builder
|
|
3121
|
-
builder
|
|
3122
|
-
children
|
|
3095
|
+
var builder = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3096
|
+
builder[_DYN_CLASS_NAME ] = "empty";
|
|
3097
|
+
builder[_DYN_INNER_TEXT ] = "<max allowed depth reached>";
|
|
3098
|
+
children[_DYN_PUSH ](builder);
|
|
3123
3099
|
break;
|
|
3124
3100
|
}
|
|
3125
3101
|
else if (key_1 === "<empty>") {
|
|
3126
|
-
var builder = document
|
|
3127
|
-
builder
|
|
3128
|
-
builder
|
|
3129
|
-
children
|
|
3102
|
+
var builder = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3103
|
+
builder[_DYN_CLASS_NAME ] = "empty";
|
|
3104
|
+
builder[_DYN_INNER_TEXT ] = "<empty>";
|
|
3105
|
+
children[_DYN_PUSH ](builder);
|
|
3130
3106
|
}
|
|
3131
3107
|
else if (targetValue !== null && arrIndexOf(thingsReferenced, targetValue) !== -1) {
|
|
3132
|
-
var builder = document
|
|
3133
|
-
builder
|
|
3134
|
-
builder
|
|
3135
|
-
children
|
|
3108
|
+
var builder = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3109
|
+
builder[_DYN_CLASS_NAME ] = "empty";
|
|
3110
|
+
builder[_DYN_INNER_TEXT ] = "<circular (".concat(key_1, ") - \"").concat(getTargetName(targetValue), "\">");
|
|
3111
|
+
children[_DYN_PUSH ](builder);
|
|
3136
3112
|
}
|
|
3137
|
-
else if (targetValue !== null && (isObject(targetValue) || Util
|
|
3138
|
-
thingsReferenced
|
|
3113
|
+
else if (targetValue !== null && (isObject(targetValue) || Util[_DYN_IS_ERROR ](targetValue))) {
|
|
3114
|
+
thingsReferenced[_DYN_PUSH ](target);
|
|
3139
3115
|
var formatted = formatLogElements(targetValue, null, key_1, level + 1, textFilter, excludeKeys, thingsReferenced, includeFunctions);
|
|
3140
3116
|
thingsReferenced.pop();
|
|
3141
3117
|
if (formatted.matched) {
|
|
@@ -3144,34 +3120,34 @@
|
|
|
3144
3120
|
if (formatted.isErr) {
|
|
3145
3121
|
isErr = true;
|
|
3146
3122
|
}
|
|
3147
|
-
children
|
|
3123
|
+
children[_DYN_PUSH ](formatted.root);
|
|
3148
3124
|
}
|
|
3149
3125
|
else {
|
|
3150
|
-
var builder = document
|
|
3151
|
-
builder
|
|
3152
|
-
builder
|
|
3153
|
-
evt
|
|
3126
|
+
var builder = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3127
|
+
builder[_DYN_SET_ATTRIBUTE ]("tabindex", "0");
|
|
3128
|
+
builder[_DYN_ONCLICK ] = function (evt) {
|
|
3129
|
+
evt[_DYN_STOP_PROPAGATION ]();
|
|
3154
3130
|
};
|
|
3155
|
-
builder
|
|
3156
|
-
evt
|
|
3131
|
+
builder[_DYN_ONTOUCHEND ] = function (evt) {
|
|
3132
|
+
evt[_DYN_STOP_PROPAGATION ]();
|
|
3157
3133
|
};
|
|
3158
|
-
builder
|
|
3159
|
-
evt
|
|
3134
|
+
builder[_DYN_ONKEYDOWN ] = function (evt) {
|
|
3135
|
+
evt[_DYN_STOP_PROPAGATION ]();
|
|
3160
3136
|
_navHandler(evt);
|
|
3161
3137
|
};
|
|
3162
3138
|
builder.onfocus = function (evt) {
|
|
3163
3139
|
focusHandler(evt, target, level, excludeKeys, includeFunctions);
|
|
3164
3140
|
};
|
|
3165
|
-
var outerSpan = document
|
|
3166
|
-
var keySpan = document
|
|
3167
|
-
keySpan
|
|
3141
|
+
var outerSpan = document[_DYN_CREATE_ELEMENT ]("span");
|
|
3142
|
+
var keySpan = document[_DYN_CREATE_ELEMENT ]("span");
|
|
3143
|
+
keySpan[_DYN_CLASS_NAME ] = "key";
|
|
3168
3144
|
if (_setInnerText(keySpan, "".concat(key_1, ": "), textFilter)) {
|
|
3169
3145
|
childOpened = true;
|
|
3170
3146
|
}
|
|
3171
|
-
outerSpan
|
|
3172
|
-
var valueSpan = document
|
|
3147
|
+
outerSpan[_DYN_APPEND_CHILD ](keySpan);
|
|
3148
|
+
var valueSpan = document[_DYN_CREATE_ELEMENT ]("span");
|
|
3173
3149
|
if (isFunction(targetValue)) {
|
|
3174
|
-
var fnStr = targetValue
|
|
3150
|
+
var fnStr = targetValue[_DYN_TO_STRING$1 ]();
|
|
3175
3151
|
var fnHead = fnStr.match(/^([^{]+)/)[1];
|
|
3176
3152
|
valueSpan.textContent = "".concat(fnHead, "{...}");
|
|
3177
3153
|
}
|
|
@@ -3180,16 +3156,16 @@
|
|
|
3180
3156
|
childOpened = true;
|
|
3181
3157
|
}
|
|
3182
3158
|
}
|
|
3183
|
-
valueSpan
|
|
3184
|
-
outerSpan
|
|
3185
|
-
builder
|
|
3186
|
-
children
|
|
3159
|
+
valueSpan[_DYN_CLASS_NAME ] = "".concat(typeof targetValue);
|
|
3160
|
+
outerSpan[_DYN_APPEND_CHILD ](valueSpan);
|
|
3161
|
+
builder[_DYN_APPEND_CHILD ](outerSpan);
|
|
3162
|
+
children[_DYN_PUSH ](builder);
|
|
3187
3163
|
}
|
|
3188
3164
|
}
|
|
3189
|
-
var rootDiv = document
|
|
3165
|
+
var rootDiv = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3190
3166
|
var innerText = "";
|
|
3191
|
-
var currentLine = document
|
|
3192
|
-
if (isObj || children
|
|
3167
|
+
var currentLine = document[_DYN_CREATE_ELEMENT ]("span");
|
|
3168
|
+
if (isObj || children[_DYN_LENGTH$1 ]) {
|
|
3193
3169
|
innerText = "".concat(key ? key : "obj", ": ");
|
|
3194
3170
|
if (Util.isArray(target)) {
|
|
3195
3171
|
innerText += "[".concat(getTargetKeys(target, excludeKeys, includeFunctions).length, "]");
|
|
@@ -3203,32 +3179,32 @@
|
|
|
3203
3179
|
}
|
|
3204
3180
|
matched = _setInnerText(currentLine, innerText, textFilter);
|
|
3205
3181
|
if (tmLabel) {
|
|
3206
|
-
var tmWrapper = document
|
|
3207
|
-
var tmDetails = document
|
|
3208
|
-
tmDetails
|
|
3209
|
-
tmDetails
|
|
3210
|
-
tmWrapper
|
|
3211
|
-
tmWrapper
|
|
3182
|
+
var tmWrapper = document[_DYN_CREATE_ELEMENT ]("span");
|
|
3183
|
+
var tmDetails = document[_DYN_CREATE_ELEMENT ]("span");
|
|
3184
|
+
tmDetails[_DYN_CLASS_NAME ] = "obj-time";
|
|
3185
|
+
tmDetails[_DYN_INNER_TEXT ] = tmLabel;
|
|
3186
|
+
tmWrapper[_DYN_APPEND_CHILD ](tmDetails);
|
|
3187
|
+
tmWrapper[_DYN_APPEND_CHILD ](currentLine);
|
|
3212
3188
|
currentLine = tmWrapper;
|
|
3213
3189
|
}
|
|
3214
|
-
currentLine
|
|
3190
|
+
currentLine[_DYN_CLASS_NAME ] = "obj-key expandable closed";
|
|
3215
3191
|
}
|
|
3216
3192
|
else {
|
|
3217
3193
|
innerText = "".concat(key ? key : "obj", ": ").concat(target.toString());
|
|
3218
3194
|
matched = _setInnerText(currentLine, innerText, textFilter);
|
|
3219
|
-
currentLine
|
|
3195
|
+
currentLine[_DYN_CLASS_NAME ] = "obj-key";
|
|
3220
3196
|
}
|
|
3221
|
-
rootDiv
|
|
3222
|
-
rootDiv
|
|
3197
|
+
rootDiv[_DYN_APPEND_CHILD ](currentLine);
|
|
3198
|
+
rootDiv[_DYN_SET_ATTRIBUTE ]("tabindex", "0");
|
|
3223
3199
|
if (childOpened) {
|
|
3224
3200
|
_openNode(currentLine);
|
|
3225
3201
|
}
|
|
3226
3202
|
if (isObj) {
|
|
3227
3203
|
if (isErr) {
|
|
3228
|
-
rootDiv
|
|
3204
|
+
rootDiv[_DYN_CLASS_NAME ] = "exception";
|
|
3229
3205
|
}
|
|
3230
3206
|
var openHandler_1 = function (evt, forceState) {
|
|
3231
|
-
evt
|
|
3207
|
+
evt[_DYN_STOP_PROPAGATION ]();
|
|
3232
3208
|
if (Util.getIEVersion()) {
|
|
3233
3209
|
focusHandler(evt, target, level, excludeKeys, includeFunctions);
|
|
3234
3210
|
}
|
|
@@ -3244,13 +3220,13 @@
|
|
|
3244
3220
|
}
|
|
3245
3221
|
}
|
|
3246
3222
|
};
|
|
3247
|
-
rootDiv
|
|
3223
|
+
rootDiv[_DYN_ONKEYDOWN ] = function (evt) {
|
|
3248
3224
|
_navHandler(evt, openHandler_1, openState);
|
|
3249
3225
|
};
|
|
3250
|
-
rootDiv
|
|
3226
|
+
rootDiv[_DYN_ONCLICK ] = function (evt) {
|
|
3251
3227
|
openHandler_1(evt);
|
|
3252
3228
|
};
|
|
3253
|
-
rootDiv
|
|
3229
|
+
rootDiv[_DYN_ONTOUCHEND ] = function (evt) {
|
|
3254
3230
|
openHandler_1(evt);
|
|
3255
3231
|
};
|
|
3256
3232
|
rootDiv.onfocus = function (evt) {
|
|
@@ -3282,15 +3258,15 @@
|
|
|
3282
3258
|
function _testObj(rg, value, excludedKeys, includeFunctions) {
|
|
3283
3259
|
if (value !== null && value !== undefined && value !== "") {
|
|
3284
3260
|
if (Util.isArray(value)) {
|
|
3285
|
-
for (var lp = 0; lp < value
|
|
3261
|
+
for (var lp = 0; lp < value[_DYN_LENGTH$1 ]; lp++) {
|
|
3286
3262
|
if (_testObj(rg, value[lp], excludedKeys, includeFunctions)) {
|
|
3287
3263
|
return true;
|
|
3288
3264
|
}
|
|
3289
3265
|
}
|
|
3290
3266
|
}
|
|
3291
|
-
else if (isObject(value) || Util
|
|
3267
|
+
else if (isObject(value) || Util[_DYN_IS_ERROR ](value)) {
|
|
3292
3268
|
var keys = getTargetKeys(value, excludedKeys, includeFunctions);
|
|
3293
|
-
for (var lp = 0; lp < keys
|
|
3269
|
+
for (var lp = 0; lp < keys[_DYN_LENGTH$1 ]; lp++) {
|
|
3294
3270
|
var key_1 = keys[lp];
|
|
3295
3271
|
if (_testValue(rg, key_1) || _testObj(rg, value[key_1], excludedKeys, includeFunctions)) {
|
|
3296
3272
|
return true;
|
|
@@ -3319,15 +3295,15 @@
|
|
|
3319
3295
|
}
|
|
3320
3296
|
return true;
|
|
3321
3297
|
};
|
|
3322
|
-
_self
|
|
3298
|
+
_self[_DYN_RENDER ] = function (textFilter, excludeKeys, includeFunctions) {
|
|
3323
3299
|
if (!theEl || lastTextFilter !== textFilter) {
|
|
3324
3300
|
lastTextFilter = textFilter;
|
|
3325
3301
|
var ms = "" + tm;
|
|
3326
|
-
while (ms
|
|
3302
|
+
while (ms[_DYN_LENGTH$1 ] < 4) {
|
|
3327
3303
|
ms = "0" + ms;
|
|
3328
3304
|
}
|
|
3329
|
-
ms = ms
|
|
3330
|
-
while (ms
|
|
3305
|
+
ms = ms[_DYN_REPLACE ](/(.)(\d{3}){1}$/g, "$1.$2s");
|
|
3306
|
+
while (ms[_DYN_LENGTH$1 ] <= 9) {
|
|
3331
3307
|
ms = " " + ms;
|
|
3332
3308
|
}
|
|
3333
3309
|
theEl = formatLogElements(target, "[".concat(ms, "]"), key, level, textFilter, excludeKeys, [], includeFunctions).root;
|
|
@@ -3335,7 +3311,7 @@
|
|
|
3335
3311
|
}
|
|
3336
3312
|
return theEl;
|
|
3337
3313
|
};
|
|
3338
|
-
_self
|
|
3314
|
+
_self[_DYN_GET_EL ] = function () {
|
|
3339
3315
|
return theEl;
|
|
3340
3316
|
};
|
|
3341
3317
|
_self.getKind = function () {
|
|
@@ -3345,6 +3321,138 @@
|
|
|
3345
3321
|
return LogEntry;
|
|
3346
3322
|
}());
|
|
3347
3323
|
|
|
3324
|
+
var FilterList = /** @class */ (function () {
|
|
3325
|
+
function FilterList(parent, trackers, toggleCb) {
|
|
3326
|
+
var _this = this;
|
|
3327
|
+
this.children = [];
|
|
3328
|
+
this.getCurrentFilter = function () {
|
|
3329
|
+
return _this[_DYN_FILTER_LIST ];
|
|
3330
|
+
};
|
|
3331
|
+
var _self = this;
|
|
3332
|
+
var active = false;
|
|
3333
|
+
trackers = trackers.concat("other");
|
|
3334
|
+
_self[_DYN_FILTER_LIST ] = [];
|
|
3335
|
+
_self.el = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3336
|
+
_self.el[_DYN_CLASS_NAME ] = "filterlist";
|
|
3337
|
+
var inputEl = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3338
|
+
inputEl[_DYN_CLASS_NAME ] = "filterlist-input";
|
|
3339
|
+
inputEl[_DYN_INNER_TEXT ] = "filter nodes...";
|
|
3340
|
+
_self.el[_DYN_APPEND_CHILD ](inputEl);
|
|
3341
|
+
var dropdownMenuEl = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3342
|
+
dropdownMenuEl[_DYN_CLASS_NAME ] = "filterlist-dropdown";
|
|
3343
|
+
_self.el[_DYN_APPEND_CHILD ](dropdownMenuEl);
|
|
3344
|
+
dropdownMenuEl[_DYN_ONKEYUP ] = function (evt) {
|
|
3345
|
+
if (active && evt.keyCode === 27) {
|
|
3346
|
+
evt[_DYN_STOP_PROPAGATION ]();
|
|
3347
|
+
_hideDropdown();
|
|
3348
|
+
}
|
|
3349
|
+
};
|
|
3350
|
+
var _loop_1 = function (t) {
|
|
3351
|
+
var chEl = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3352
|
+
chEl[_DYN_SET_ATTRIBUTE ]("tabindex", "0");
|
|
3353
|
+
chEl[_DYN_SET_ATTRIBUTE ]("filter-type", t);
|
|
3354
|
+
chEl[_DYN_CLASS_NAME ] = "filterlist-toggle";
|
|
3355
|
+
var checkbox = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3356
|
+
checkbox[_DYN_CLASS_NAME ] = "checkbox on";
|
|
3357
|
+
var label = document[_DYN_CREATE_ELEMENT ]("span");
|
|
3358
|
+
label[_DYN_CLASS_NAME ] = "label";
|
|
3359
|
+
label[_DYN_INNER_TEXT ] = t;
|
|
3360
|
+
chEl[_DYN_APPEND_CHILD ](checkbox);
|
|
3361
|
+
chEl[_DYN_APPEND_CHILD ](label);
|
|
3362
|
+
chEl[_DYN_ONKEYUP ] = function (evt) {
|
|
3363
|
+
if (active && evt.keyCode === 27) {
|
|
3364
|
+
evt[_DYN_STOP_PROPAGATION ]();
|
|
3365
|
+
_hideDropdown();
|
|
3366
|
+
}
|
|
3367
|
+
};
|
|
3368
|
+
chEl[_DYN_ONCLICK ] = function (evt) {
|
|
3369
|
+
evt[_DYN_STOP_PROPAGATION ]();
|
|
3370
|
+
chEl[_DYN_FOCUS ]();
|
|
3371
|
+
if (checkbox[_DYN_CLASS_NAME ] === "checkbox off") {
|
|
3372
|
+
if (evt.shiftKey) {
|
|
3373
|
+
_self[_DYN_FILTER_LIST ] = trackers.concat();
|
|
3374
|
+
for (var _i = 0, _a = _self[_DYN_CHILDREN ]; _i < _a.length; _i++) {
|
|
3375
|
+
var ch = _a[_i];
|
|
3376
|
+
ch.childNodes[0][_DYN_CLASS_NAME ] = "checkbox off";
|
|
3377
|
+
}
|
|
3378
|
+
}
|
|
3379
|
+
_self[_DYN_FILTER_LIST ].splice(arrIndexOf(_self[_DYN_FILTER_LIST ], t), 1);
|
|
3380
|
+
checkbox[_DYN_CLASS_NAME ] = "checkbox on";
|
|
3381
|
+
}
|
|
3382
|
+
else {
|
|
3383
|
+
if (evt.shiftKey) {
|
|
3384
|
+
_self[_DYN_FILTER_LIST ] = [];
|
|
3385
|
+
for (var _b = 0, _c = _self[_DYN_CHILDREN ]; _b < _c.length; _b++) {
|
|
3386
|
+
var ch = _c[_b];
|
|
3387
|
+
ch.childNodes[0][_DYN_CLASS_NAME ] = "checkbox on";
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3390
|
+
_self.filterList[_DYN_PUSH ](t);
|
|
3391
|
+
checkbox[_DYN_CLASS_NAME ] = "checkbox off";
|
|
3392
|
+
}
|
|
3393
|
+
toggleCb();
|
|
3394
|
+
};
|
|
3395
|
+
_self.children[_DYN_PUSH ](chEl);
|
|
3396
|
+
};
|
|
3397
|
+
for (var _i = 0, trackers_1 = trackers; _i < trackers_1.length; _i++) {
|
|
3398
|
+
var t = trackers_1[_i];
|
|
3399
|
+
_loop_1(t);
|
|
3400
|
+
}
|
|
3401
|
+
function _hideDropdown() {
|
|
3402
|
+
active = false;
|
|
3403
|
+
for (var _i = 0, _a = _self[_DYN_CHILDREN ]; _i < _a.length; _i++) {
|
|
3404
|
+
var ch = _a[_i];
|
|
3405
|
+
dropdownMenuEl[_DYN_REMOVE_CHILD ](ch);
|
|
3406
|
+
}
|
|
3407
|
+
}
|
|
3408
|
+
function _showDropdown() {
|
|
3409
|
+
active = true;
|
|
3410
|
+
for (var _i = 0, _a = _self[_DYN_CHILDREN ]; _i < _a.length; _i++) {
|
|
3411
|
+
var ch = _a[_i];
|
|
3412
|
+
dropdownMenuEl[_DYN_APPEND_CHILD ](ch);
|
|
3413
|
+
}
|
|
3414
|
+
dropdownMenuEl[_DYN_FOCUS ]();
|
|
3415
|
+
}
|
|
3416
|
+
_self.el[_DYN_ONKEYUP ] = function (evt) {
|
|
3417
|
+
if (active && evt.keyCode === 27) {
|
|
3418
|
+
evt[_DYN_STOP_PROPAGATION ]();
|
|
3419
|
+
_hideDropdown();
|
|
3420
|
+
}
|
|
3421
|
+
};
|
|
3422
|
+
_self.el[_DYN_ONCLICK ] = function () {
|
|
3423
|
+
if (!active) {
|
|
3424
|
+
_showDropdown();
|
|
3425
|
+
}
|
|
3426
|
+
else {
|
|
3427
|
+
_hideDropdown();
|
|
3428
|
+
}
|
|
3429
|
+
};
|
|
3430
|
+
parent[_DYN_APPEND_CHILD ](_self.el);
|
|
3431
|
+
}
|
|
3432
|
+
return FilterList;
|
|
3433
|
+
}());
|
|
3434
|
+
|
|
3435
|
+
var BG_INFO = "#F0F6FF", BG_ERROR = "#FEF0F1", ICON_ERROR = "#E00B1C", BTN_PRIMARY = "#0078d4", BTN_HOVER = "#106EBE", BTN_ACTIVE = "#005A9E", TEXT_PRIMARY = "#323130", TEXT_MATCHED = "yellow", BORDER_GREY_160 = "1px solid #605E5C", BORDER_GREY_60 = "1px solid #B3B0AD";
|
|
3436
|
+
console.log(Util.getIEVersion());
|
|
3437
|
+
var tempStyle = function (prefix) { return "\n .".concat(prefix, "-dbg-lgr-dashboard {\n z-index: 1000\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .controls {\n width: 90%;\n min-width: 600px;\n position: relative;\n margin: auto;\n left: 0;\n right: 0;\n font-family: monospace;\n font-size: 16px;\n border-color: ").concat(BG_INFO, ";\n border: 1px solid;\n background-color: transparent;\n display: block;\n padding-top: 3px;\n padding-bottom: 3px;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .controls > div {\n display: inline-block;\n position: relative;\n padding: 3px 20px;\n z-index: 1010\n }\n\n .").concat(prefix, "-dbg-lgr {\n width: 90%;\n min-width: 600px;\n height: 80%;\n position: relative;\n margin: auto;\n left: 0;\n right: 0;\n font-family: monospace;\n font-size: 16px;\n overflow-y: scroll;\n overflow-x: ").concat((Util.getIEVersion()) ? "scroll" : "hidden", ";\n border: ").concat(BORDER_GREY_160, ";\n border-radius: 2px;\n }\n\n .").concat(prefix, "-dbg-lgr div:focus {\n outline: 2px solid black;\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
3438
|
+
? ""
|
|
3439
|
+
: ".".concat(prefix, "-dbg-lgr .tree-root div::before {\n content: '';\n position: absolute;\n left: -1.25em;\n height: 100%;\n border-right: 2px dotted #CCCCCC;\n }"), "\n\n .").concat(prefix, "-dbg-lgr .tree-root div:hover::before {\n border-right: 2px solid #000;\n }\n\n .").concat(prefix, "-dbg-lgr > div {\n display: block;\n position: relative;\n }\n\n .").concat(prefix, "-dbg-lgr > div:not(.controls) div {\n display: block;\n position: relative;\n margin-left: 2em;\n width: 100%;\n }\n\n .").concat(prefix, "-dbg-lgr .expandable {\n cursor: pointer;\n }\n\n .").concat(prefix, "-dbg-lgr > .tree-root div > span {\n width: 100%;\n display: block;\n }\n\n .").concat(prefix, "-dbg-lgr .exception {\n background-color: ").concat(BG_ERROR, ";\n color: ").concat(TEXT_PRIMARY, ";\n }\n\n .").concat(prefix, "-dbg-lgr .matched-text-filter {\n background-color: ").concat(TEXT_MATCHED, ";\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
3440
|
+
? ""
|
|
3441
|
+
: ".".concat(prefix, "-dbg-lgr .expandable.open::before {\n content: '[-] ';\n font-weight: bold;\n }\n\n .").concat(prefix, "-dbg-lgr .expandable.closed::before {\n content: '[+] ';\n font-weight: bold;\n }"), "\n\n .").concat(prefix, "-dbg-lgr div:hover > .obj-key {\n text-decoration: underline;\n }\n\n .").concat(prefix, "-dbg-lgr .obj-time {\n padding-right: 15px;\n color: #605E5C;\n }\n \n .").concat(prefix, "-dbg-lgr .object {pointer-events: auto;}\n .").concat(prefix, "-dbg-lgr .function {color: #881391;}\n .").concat(prefix, "-dbg-lgr .string {color: #CB3632;}\n .").concat(prefix, "-dbg-lgr .number {color: #1C00CF;}\n .").concat(prefix, "-dbg-lgr .key {color: #881391; font-weight: bold;}\n .").concat(prefix, "-dbg-lgr .empty {color: #AAAAAA; font-style: italic;}\n\n .").concat(prefix, "-dbg-lgr-dashboard ").concat(prefix, "-last-selected-element > span {\n display: block;\n background-color: black;\n border-radius: 2px;\n color: white\n }\n .").concat(prefix, "-last-selected-element > span > span,\n .").concat(prefix, "-last-selected-element > span > span[class] {\n color: white;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard #close-dashboard {\n float: right;\n margin-right: 2em;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-primary {\n display: inline-block;\n background-color: ").concat(BTN_PRIMARY, ";\n color: #FFFFFF;\n border-radius: 2px;\n cursor: pointer;\n border: 1px solid;\n padding: 3px 20px;\n margin-left: 2em;\n height: 24px;\n min-width: 80px;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-primary:hover {\n background-color: ").concat(BTN_HOVER, ";\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-primary:active {\n background-color: ").concat(BTN_ACTIVE, ";\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-secondary {\n display: inline-block;\n border: 1px solid;\n bolder-color: ").concat(BTN_PRIMARY, ";\n color: ").concat(BTN_PRIMARY, ";\n background-color: transparent;\n border-radius: 2px;\n cursor: pointer;\n border: 1px solid;\n padding: 3px 20px;\n margin-left: 2em;\n height: 24px;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-secondary:hover {\n background-color: ").concat(BTN_HOVER, ";\n color: #FFFFFF;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .btn-secondary:active {\n background-color: ").concat(BTN_ACTIVE, ";\n color: #FFFFFF;\n }\n \n .").concat(prefix, "-dbg-lgr-dashboard .filterlist {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n width: 180px;\n min-height: 24px;\n margin-left: 2em;\n user-select: none;\n cursor: pointer;\n }\n .").concat(prefix, "-dbg-lgr-dashboard .filterlist-input {\n position: relative;\n padding: 3px 8px;\n border: ").concat(BORDER_GREY_60, ";\n border-radius: 2px;\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
3442
|
+
? ""
|
|
3443
|
+
: ".".concat(prefix, "-dbg-lgr-dashboard .filterlist-input::after {\n content: '';\n width: 8px;\n height: 8px;\n position: absolute;\n right: 8px;\n top: 5px;\n margin: auto;\n transform: rotate(45deg);\n border: ").concat(BORDER_GREY_160, ";\n border-top: none;\n border-left: none;\n }"), "\n\n .").concat(prefix, "-dbg-lgr-dashboard .filterlist-input:focus {\n border: ").concat(BORDER_GREY_60, "\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .filterlist-dropdown {\n position: absolute;\n top: 100%;\n margin: auto;\n background-color: #FFFFFF;\n overflow: hidden;\n min-width: 180px;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.16);\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .filterlist-toggle {\n position: relative;\n padding: 3px 8px;\n height: 32px;\n width: 100%;\n ").concat((Util.getIEVersion()) ? "" : "box-sizing: border-box;", "\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .filterlist-toggle:focus {\n outline: none;\n border: ").concat(BORDER_GREY_60, ";\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .text-filter-input {\n font-family: monospace;\n margin-left: 2em;\n padding: 3px 8px;\n width: 180px;\n height: 24px;\n border-radius: 2px;\n border: ").concat(BORDER_GREY_160, ";\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .text-filter-input:focus {\n border: ").concat(BORDER_GREY_60, ";\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .label {\n vertical-align: middle;\n width: 80%;\n display: inline-block;\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .checkbox {\n display: inline-block;\n width: 18px;\n height: 18px;\n border-radius: 2px;\n vertical-align: middle;\n margin-right: 8px;\n ").concat((Util.getIEVersion()) ? "" : "box-sizing: border-box;", "\n }\n\n .").concat(prefix, "-dbg-lgr-dashboard .checkbox.on {\n background-color: #0078D4;\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
3444
|
+
? ""
|
|
3445
|
+
: ".".concat(prefix, "-dbg-lgr-dashboard .checkbox.on::after {\n content: '';\n width: 5px;\n height: 10px;\n display: inline-block;\n margin: 2px 6px;\n padding: 0;\n transform: rotate(45deg);\n border: 1px solid #FFFFFF;\n border-top: none;\n border-left: none;\n }"), "\n\n\n .").concat(prefix, "-dbg-lgr-dashboard .checkbox.off {\n border: ").concat(BORDER_GREY_160, ";\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
3446
|
+
? ""
|
|
3447
|
+
: "@media only screen and (max-width: 600px) {\n .".concat(prefix, "-dbg-lgr {\n width: 100%;\n min-width: 200px;\n }\n }"), "\n\n"); };
|
|
3448
|
+
var permStyle = function (prefix) { return "\n .".concat(prefix, "-debug-bin-container {\n position: fixed;\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
3449
|
+
? "width: 100%;\n height: 100%;\n top: 0;\n left: 0;"
|
|
3450
|
+
: "width: 100vw;\n height: 100vh;", "\n pointer-events: none;\n }\n\n .").concat(prefix, "-debug-bin-parent {\n position: fixed;\n right: 20px;\n margin: auto;\n padding: 10px;\n border-radius: 2px;\n min-height: 20px;\n min-width: 20px;\n overflow: hidden;\n pointer-events: auto;\n text-align: right;\n font-family: monospace;\n font-size: 16px;\n color: #FFFFFF;\n background-color: ").concat(BTN_PRIMARY, ";\n border: 2px solid #FFFFFF;\n transition: 2s color linear;\n cursor: pointer;\n transition: .2s width ease-in-out, .2s height ease-in-out;\n ").concat((Util.getIEVersion()) ? "" : "box-sizing: border-box;", "\n }\n\n .").concat(prefix, "-debug-bin-parent.active {\n background-color: ").concat(BG_INFO, ";\n color: ").concat(TEXT_PRIMARY, ";\n }\n\n .").concat(prefix, "-debug-bin-parent:focus {\n border: ").concat(BORDER_GREY_160, ";\n outline: none;\n }\n\n .").concat(prefix, "-debug-bin-parent.notify {\n background-color: ").concat(ICON_ERROR, ";\n }\n\n .").concat(prefix, "-debug-bin-parent button {\n display: block;\n width: 100%;\n background-color: ").concat(BTN_PRIMARY, ";\n color: #FFFFFF;\n border-radius: 2px;\n margin-bottom: 5px;\n margin-top: 10px;\n cursor: pointer;\n border: none;\n padding: 3px 20px;\n height: 24px;\n }\n\n .").concat(prefix, "-debug-bin-parent button:hover {\n background-color: ").concat(BTN_HOVER, ";\n }\n\n .").concat(prefix, "-debug-bin-parent button:active {\n background-color: ").concat(BTN_ACTIVE, ";\n }\n\n .").concat(prefix, "-debug-bin-parent .el-name {\n text-align: left;\n }\n\n .").concat(prefix, "-debug-bin-parent .el-value {\n display: inline-block;\n transform: scale(1);\n transition: 2s transform linear, 0s 2s font-weight linear;\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
3451
|
+
? ""
|
|
3452
|
+
: ".".concat(prefix, "-debug-bin-parent.notify::after {\n content: \" (!)\";\n }"), "\n\n .").concat(prefix, "-debug-bin-parent .el-value.incremented {\n transform: scale(1.5);\n font-weight: bold;\n transition: 0s transform linear, 0s font-weight linear;\n }\n\n ").concat(Util.getIEVersion() && Util.getIEVersion() < 9
|
|
3453
|
+
? ""
|
|
3454
|
+
: ".".concat(prefix, "-debug-bin-parent:focus > span::before,\n .").concat(prefix, "-debug-bin-parent:hover > span::before,\n .").concat(prefix, "-debug-bin-parent.active > span::before {\n content: attr(data-name) \": \";\n }"), "\n"); };
|
|
3455
|
+
|
|
3348
3456
|
var Dashboard = /** @class */ (function () {
|
|
3349
3457
|
function Dashboard(config) {
|
|
3350
3458
|
var _this = this;
|
|
@@ -3355,54 +3463,54 @@
|
|
|
3355
3463
|
var loggerEl;
|
|
3356
3464
|
dynamicProto(Dashboard, this, function (_self) {
|
|
3357
3465
|
var prefix = config.prefix;
|
|
3358
|
-
var trackers = config
|
|
3359
|
-
var rootEl = document
|
|
3360
|
-
rootEl
|
|
3361
|
-
tempStyleEl = document
|
|
3362
|
-
tempStyleEl
|
|
3466
|
+
var trackers = config[_DYN_TRACKERS ];
|
|
3467
|
+
var rootEl = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3468
|
+
rootEl[_DYN_CLASS_NAME ] = "".concat(prefix, "-dbg-lgr-dashboard");
|
|
3469
|
+
tempStyleEl = document[_DYN_CREATE_ELEMENT ]("style");
|
|
3470
|
+
tempStyleEl[_DYN_INNER_HTML ] = tempStyle(prefix);
|
|
3363
3471
|
rootEl.style.position = "fixed";
|
|
3364
3472
|
rootEl.style.width = "100vw";
|
|
3365
3473
|
rootEl.style.height = "100vh";
|
|
3366
3474
|
rootEl.style.backgroundColor = "#ffffff";
|
|
3367
3475
|
rootEl.style.opacity = "1";
|
|
3368
|
-
rootEl.style
|
|
3476
|
+
rootEl.style[_DYN_POINTER_EVENTS ] = "auto";
|
|
3369
3477
|
rootEl.style.top = "-100%";
|
|
3370
3478
|
rootEl.style.transition = ".2s top cubic-bezier(0.87, 0, 0.13, 1)";
|
|
3371
|
-
var logHeading = document
|
|
3479
|
+
var logHeading = document[_DYN_CREATE_ELEMENT ]("h1");
|
|
3372
3480
|
logHeading.textContent = "dashboard";
|
|
3373
3481
|
logHeading.style.fontFamily = "monospace";
|
|
3374
3482
|
logHeading.style.textAlign = "center";
|
|
3375
|
-
rootEl
|
|
3483
|
+
rootEl[_DYN_APPEND_CHILD ](logHeading);
|
|
3376
3484
|
_createLogger(rootEl, prefix, trackers);
|
|
3377
3485
|
_self.getElm = function () {
|
|
3378
3486
|
return rootEl;
|
|
3379
3487
|
};
|
|
3380
|
-
_self
|
|
3381
|
-
return !!(rootEl
|
|
3488
|
+
_self[_DYN_IS_DISPLAYED ] = function () {
|
|
3489
|
+
return !!(rootEl[_DYN_PARENT_ELEMENT ] || rootEl.parentNode);
|
|
3382
3490
|
};
|
|
3383
3491
|
_self.getTextFilter = function () {
|
|
3384
3492
|
return textFilter;
|
|
3385
3493
|
};
|
|
3386
|
-
_self
|
|
3494
|
+
_self[_DYN_SET_TEXT_FILTER ] = function (value) {
|
|
3387
3495
|
if (value !== textFilter) {
|
|
3388
3496
|
textFilter = value;
|
|
3389
|
-
_self
|
|
3497
|
+
_self[_DYN_RENDER ]();
|
|
3390
3498
|
}
|
|
3391
3499
|
};
|
|
3392
3500
|
_self.getTrackers = function () {
|
|
3393
3501
|
return trackers;
|
|
3394
3502
|
};
|
|
3395
|
-
_self
|
|
3503
|
+
_self[_DYN_NEW_LOG_ENTRY ] = function (target, tm, key, level, kind, keep) {
|
|
3396
3504
|
var _self = _this;
|
|
3397
|
-
msgTracker
|
|
3398
|
-
if (msgTracker.length > config
|
|
3505
|
+
msgTracker[_DYN_PUSH ](new LogEntry(target, tm, key, level, kind, keep));
|
|
3506
|
+
if (msgTracker.length > config[_DYN_MAX_MESSAGES ]) {
|
|
3399
3507
|
var lp = 0;
|
|
3400
|
-
while (lp < msgTracker
|
|
3508
|
+
while (lp < msgTracker[_DYN_LENGTH$1 ]) {
|
|
3401
3509
|
var entry = msgTracker[lp];
|
|
3402
3510
|
if (!entry.isKeep()) {
|
|
3403
|
-
var el = entry
|
|
3404
|
-
if (el && el
|
|
3405
|
-
el
|
|
3511
|
+
var el = entry[_DYN_GET_EL ]();
|
|
3512
|
+
if (el && el[_DYN_PARENT_ELEMENT ]) {
|
|
3513
|
+
el[_DYN_PARENT_ELEMENT ][_DYN_REMOVE_CHILD ](el);
|
|
3406
3514
|
}
|
|
3407
3515
|
msgTracker.splice(lp, 1);
|
|
3408
3516
|
break;
|
|
@@ -3410,34 +3518,34 @@
|
|
|
3410
3518
|
lp++;
|
|
3411
3519
|
}
|
|
3412
3520
|
}
|
|
3413
|
-
_self
|
|
3521
|
+
_self[_DYN_RENDER ]();
|
|
3414
3522
|
};
|
|
3415
3523
|
_self.show = function () {
|
|
3416
|
-
if (!_this
|
|
3417
|
-
document.body
|
|
3418
|
-
document.head
|
|
3524
|
+
if (!_this[_DYN_IS_DISPLAYED ]()) {
|
|
3525
|
+
document.body[_DYN_APPEND_CHILD ](rootEl);
|
|
3526
|
+
document.head[_DYN_APPEND_CHILD ](tempStyleEl);
|
|
3419
3527
|
rootEl.style.top = "0%";
|
|
3420
|
-
rootEl.style
|
|
3421
|
-
_self
|
|
3528
|
+
rootEl.style[_DYN_POINTER_EVENTS ] = "auto";
|
|
3529
|
+
_self[_DYN_RENDER ]();
|
|
3422
3530
|
}
|
|
3423
3531
|
};
|
|
3424
3532
|
_self.hide = function () {
|
|
3425
|
-
if (_self
|
|
3533
|
+
if (_self[_DYN_IS_DISPLAYED ]()) {
|
|
3426
3534
|
rootEl.style.top = "-100%";
|
|
3427
|
-
rootEl.style
|
|
3428
|
-
document.head
|
|
3429
|
-
document.body
|
|
3535
|
+
rootEl.style[_DYN_POINTER_EVENTS ] = "none";
|
|
3536
|
+
document.head[_DYN_REMOVE_CHILD ](tempStyleEl);
|
|
3537
|
+
document.body[_DYN_REMOVE_CHILD ](rootEl);
|
|
3430
3538
|
}
|
|
3431
3539
|
};
|
|
3432
|
-
_self
|
|
3433
|
-
if (_self
|
|
3540
|
+
_self[_DYN_RENDER ] = function () {
|
|
3541
|
+
if (_self[_DYN_IS_DISPLAYED ]()) {
|
|
3434
3542
|
var excludedTypes_1 = filterList.getCurrentFilter();
|
|
3435
3543
|
arrForEach(msgTracker, function (entry) {
|
|
3436
|
-
var el = entry
|
|
3437
|
-
if (el && el
|
|
3438
|
-
el
|
|
3544
|
+
var el = entry[_DYN_GET_EL ]();
|
|
3545
|
+
if (el && el[_DYN_PARENT_ELEMENT ]) {
|
|
3546
|
+
el[_DYN_PARENT_ELEMENT ][_DYN_REMOVE_CHILD ](el);
|
|
3439
3547
|
}
|
|
3440
|
-
if (!entry.isMatch(textFilter, config
|
|
3548
|
+
if (!entry.isMatch(textFilter, config[_DYN_EXCLUDE_KEYS ], config[_DYN_INCLUDE_FUNCTIONS ])) {
|
|
3441
3549
|
return;
|
|
3442
3550
|
}
|
|
3443
3551
|
var type = entry.getKind();
|
|
@@ -3448,9 +3556,9 @@
|
|
|
3448
3556
|
else if (arrIndexOf(excludedTypes_1, type) !== -1) {
|
|
3449
3557
|
return;
|
|
3450
3558
|
}
|
|
3451
|
-
var newEl = entry.render(textFilter, config
|
|
3559
|
+
var newEl = entry.render(textFilter, config[_DYN_EXCLUDE_KEYS ], config[_DYN_INCLUDE_FUNCTIONS ]);
|
|
3452
3560
|
if (newEl) {
|
|
3453
|
-
loggerEl
|
|
3561
|
+
loggerEl[_DYN_APPEND_CHILD ](newEl);
|
|
3454
3562
|
}
|
|
3455
3563
|
});
|
|
3456
3564
|
}
|
|
@@ -3459,36 +3567,36 @@
|
|
|
3459
3567
|
var newEvents = [];
|
|
3460
3568
|
arrForEach(msgTracker, function (entry) {
|
|
3461
3569
|
if (entry.isKeep()) {
|
|
3462
|
-
newEvents
|
|
3570
|
+
newEvents[_DYN_PUSH ](entry);
|
|
3463
3571
|
}
|
|
3464
3572
|
else {
|
|
3465
|
-
var el = entry
|
|
3466
|
-
if (el && el
|
|
3467
|
-
el
|
|
3573
|
+
var el = entry[_DYN_GET_EL ]();
|
|
3574
|
+
if (el && el[_DYN_PARENT_ELEMENT ]) {
|
|
3575
|
+
el[_DYN_PARENT_ELEMENT ][_DYN_REMOVE_CHILD ](el);
|
|
3468
3576
|
}
|
|
3469
3577
|
}
|
|
3470
3578
|
});
|
|
3471
3579
|
msgTracker = newEvents;
|
|
3472
|
-
_self
|
|
3580
|
+
_self[_DYN_RENDER ]();
|
|
3473
3581
|
}
|
|
3474
3582
|
function closeDashboard() {
|
|
3475
3583
|
_self.hide();
|
|
3476
3584
|
}
|
|
3477
3585
|
function _createLogger(hostDiv, prefix, trackers) {
|
|
3478
|
-
loggerEl = document
|
|
3479
|
-
loggerEl
|
|
3480
|
-
var controlDiv = document
|
|
3481
|
-
controlDiv
|
|
3482
|
-
var textFilterInput = document
|
|
3483
|
-
textFilterInput
|
|
3484
|
-
textFilterInput
|
|
3586
|
+
loggerEl = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3587
|
+
loggerEl[_DYN_CLASS_NAME ] = "".concat(prefix, "-dbg-lgr");
|
|
3588
|
+
var controlDiv = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3589
|
+
controlDiv[_DYN_CLASS_NAME ] = "controls";
|
|
3590
|
+
var textFilterInput = document[_DYN_CREATE_ELEMENT ]("input");
|
|
3591
|
+
textFilterInput[_DYN_CLASS_NAME ] = "text-filter-input";
|
|
3592
|
+
textFilterInput[_DYN_SET_ATTRIBUTE ]("placeholder", "filter text");
|
|
3485
3593
|
textFilterInput.onchange = function (evt) {
|
|
3486
|
-
_self
|
|
3594
|
+
_self[_DYN_SET_TEXT_FILTER ](textFilterInput.value);
|
|
3487
3595
|
};
|
|
3488
3596
|
textFilterInput.onblur = function (evt) {
|
|
3489
|
-
_self
|
|
3597
|
+
_self[_DYN_SET_TEXT_FILTER ](textFilterInput.value);
|
|
3490
3598
|
};
|
|
3491
|
-
textFilterInput
|
|
3599
|
+
textFilterInput[_DYN_ONKEYUP ] = function (evt) {
|
|
3492
3600
|
if (keyupTimer != null) {
|
|
3493
3601
|
clearTimeout(keyupTimer);
|
|
3494
3602
|
}
|
|
@@ -3496,34 +3604,34 @@
|
|
|
3496
3604
|
if (newValue !== _self.getTextFilter()) {
|
|
3497
3605
|
keyupTimer = setTimeout(function () {
|
|
3498
3606
|
keyupTimer = null;
|
|
3499
|
-
_self
|
|
3607
|
+
_self[_DYN_SET_TEXT_FILTER ](textFilterInput.value);
|
|
3500
3608
|
}, 200);
|
|
3501
3609
|
}
|
|
3502
3610
|
};
|
|
3503
|
-
controlDiv
|
|
3504
|
-
var copyButton = document
|
|
3505
|
-
copyButton
|
|
3506
|
-
copyButton
|
|
3507
|
-
copyButton
|
|
3508
|
-
copyButton
|
|
3611
|
+
controlDiv[_DYN_APPEND_CHILD ](textFilterInput);
|
|
3612
|
+
var copyButton = document[_DYN_CREATE_ELEMENT ]("button");
|
|
3613
|
+
copyButton[_DYN_INNER_TEXT ] = "copy current node";
|
|
3614
|
+
copyButton[_DYN_CLASS_NAME ] = "btn-secondary";
|
|
3615
|
+
copyButton[_DYN_ONCLICK ] = copySelectedTree;
|
|
3616
|
+
copyButton[_DYN_ONTOUCHEND ] = copySelectedTree;
|
|
3509
3617
|
var keyupTimer = null;
|
|
3510
|
-
filterList = new FilterList(controlDiv, trackers.slice(0), function () { return _self
|
|
3511
|
-
controlDiv
|
|
3512
|
-
var clearEventsBtn = document
|
|
3513
|
-
clearEventsBtn
|
|
3514
|
-
clearEventsBtn
|
|
3515
|
-
clearEventsBtn
|
|
3516
|
-
clearEventsBtn
|
|
3517
|
-
controlDiv
|
|
3518
|
-
var closeEventsBtn = document
|
|
3618
|
+
filterList = new FilterList(controlDiv, trackers.slice(0), function () { return _self[_DYN_RENDER ](); });
|
|
3619
|
+
controlDiv[_DYN_APPEND_CHILD ](copyButton);
|
|
3620
|
+
var clearEventsBtn = document[_DYN_CREATE_ELEMENT ]("button");
|
|
3621
|
+
clearEventsBtn[_DYN_INNER_TEXT ] = "clear events";
|
|
3622
|
+
clearEventsBtn[_DYN_CLASS_NAME ] = "btn-secondary";
|
|
3623
|
+
clearEventsBtn[_DYN_ONCLICK ] = clearEvents;
|
|
3624
|
+
clearEventsBtn[_DYN_ONTOUCHEND ] = clearEvents;
|
|
3625
|
+
controlDiv[_DYN_APPEND_CHILD ](clearEventsBtn);
|
|
3626
|
+
var closeEventsBtn = document[_DYN_CREATE_ELEMENT ]("button");
|
|
3519
3627
|
closeEventsBtn.id = "close-dashboard";
|
|
3520
|
-
closeEventsBtn
|
|
3521
|
-
closeEventsBtn
|
|
3522
|
-
closeEventsBtn
|
|
3523
|
-
closeEventsBtn
|
|
3524
|
-
controlDiv
|
|
3525
|
-
hostDiv
|
|
3526
|
-
hostDiv
|
|
3628
|
+
closeEventsBtn[_DYN_INNER_TEXT ] = "close dashboard";
|
|
3629
|
+
closeEventsBtn[_DYN_CLASS_NAME ] = "btn-primary";
|
|
3630
|
+
closeEventsBtn[_DYN_ONCLICK ] = closeDashboard;
|
|
3631
|
+
closeEventsBtn[_DYN_ONTOUCHEND ] = closeDashboard;
|
|
3632
|
+
controlDiv[_DYN_APPEND_CHILD ](closeEventsBtn);
|
|
3633
|
+
hostDiv[_DYN_APPEND_CHILD ](controlDiv);
|
|
3634
|
+
hostDiv[_DYN_APPEND_CHILD ](loggerEl);
|
|
3527
3635
|
}
|
|
3528
3636
|
});
|
|
3529
3637
|
}
|
|
@@ -3538,67 +3646,67 @@
|
|
|
3538
3646
|
this.showChildren = false;
|
|
3539
3647
|
this.value = 0;
|
|
3540
3648
|
var _self = this;
|
|
3541
|
-
_self.el = document
|
|
3542
|
-
_self.el
|
|
3543
|
-
_self.el
|
|
3649
|
+
_self.el = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3650
|
+
_self.el[_DYN_SET_ATTRIBUTE ]("tabindex", "0");
|
|
3651
|
+
_self.el[_DYN_CLASS_NAME ] = "".concat(prefix, "-debug-bin-parent");
|
|
3544
3652
|
_self.el.style.bottom = "".concat(20 + bottomDistance, "px");
|
|
3545
|
-
_self.elSpan = document
|
|
3546
|
-
_self.elSpan
|
|
3547
|
-
_self.elSpan
|
|
3548
|
-
_self.el
|
|
3549
|
-
_self.el
|
|
3550
|
-
_self
|
|
3551
|
-
_self.el
|
|
3552
|
-
_self
|
|
3653
|
+
_self.elSpan = document[_DYN_CREATE_ELEMENT ]("span");
|
|
3654
|
+
_self.elSpan[_DYN_INNER_TEXT ] = "".concat(_self.value);
|
|
3655
|
+
_self.elSpan[_DYN_SET_ATTRIBUTE ]("data-name", "AppInsights");
|
|
3656
|
+
_self.el[_DYN_APPEND_CHILD ](_self.elSpan);
|
|
3657
|
+
_self.el[_DYN_ONCLICK ] = function () {
|
|
3658
|
+
_self[_DYN_SHOW_CHILDREN ] = !_self[_DYN_SHOW_CHILDREN ];
|
|
3659
|
+
_self.el[_DYN_CLASS_NAME ] = (_self[_DYN_SHOW_CHILDREN ]) ? "".concat(prefix, "-debug-bin-parent active") : "".concat(prefix, "-debug-bin-parent");
|
|
3660
|
+
_self[_DYN_RENDER ]();
|
|
3553
3661
|
};
|
|
3554
|
-
_self.el
|
|
3662
|
+
_self.el[_DYN_ONKEYDOWN ] = function (evt) {
|
|
3555
3663
|
if (evt.which === 13 || evt.which === 32) {
|
|
3556
|
-
evt
|
|
3557
|
-
evt.
|
|
3664
|
+
evt[_DYN_PREVENT_DEFAULT ]();
|
|
3665
|
+
evt[_DYN_TARGET ].click();
|
|
3558
3666
|
}
|
|
3559
3667
|
};
|
|
3560
|
-
_self
|
|
3668
|
+
_self[_DYN_RENDER ]();
|
|
3561
3669
|
}
|
|
3562
3670
|
DebugBinParent.prototype.addClassToEl = function (name) {
|
|
3563
3671
|
var _self = this;
|
|
3564
|
-
if (_self.el.
|
|
3565
|
-
_self.el
|
|
3672
|
+
if (_self.el[_DYN_CLASS_NAME ].indexOf(name) === -1) {
|
|
3673
|
+
_self.el[_DYN_CLASS_NAME ] += " ".concat(name);
|
|
3566
3674
|
}
|
|
3567
3675
|
};
|
|
3568
3676
|
DebugBinParent.prototype.addChild = function (bin) {
|
|
3569
|
-
this.children
|
|
3677
|
+
this.children[_DYN_PUSH ](bin);
|
|
3570
3678
|
};
|
|
3571
3679
|
DebugBinParent.prototype.addButton = function (handler, label) {
|
|
3572
|
-
var btn = document
|
|
3573
|
-
btn
|
|
3574
|
-
btn
|
|
3680
|
+
var btn = document[_DYN_CREATE_ELEMENT ]("button");
|
|
3681
|
+
btn[_DYN_INNER_TEXT ] = label;
|
|
3682
|
+
btn[_DYN_ONCLICK ] = handler;
|
|
3575
3683
|
this.addChild(btn);
|
|
3576
3684
|
};
|
|
3577
3685
|
DebugBinParent.prototype.increment = function () {
|
|
3578
3686
|
var _self = this;
|
|
3579
|
-
_self.elSpan
|
|
3687
|
+
_self.elSpan[_DYN_INNER_TEXT ] = "".concat(++_self.value);
|
|
3580
3688
|
};
|
|
3581
3689
|
DebugBinParent.prototype.render = function () {
|
|
3582
3690
|
var _self = this;
|
|
3583
|
-
if (!_self.el
|
|
3584
|
-
_self.parent
|
|
3691
|
+
if (!_self.el[_DYN_PARENT_ELEMENT ]) {
|
|
3692
|
+
_self.parent[_DYN_APPEND_CHILD ](_self.el);
|
|
3585
3693
|
}
|
|
3586
|
-
for (var _i = 0, _a = _self
|
|
3694
|
+
for (var _i = 0, _a = _self[_DYN_CHILDREN ]; _i < _a.length; _i++) {
|
|
3587
3695
|
var ch = _a[_i];
|
|
3588
3696
|
if (ch instanceof DebugBin) {
|
|
3589
|
-
if (ch.el.parentElement !== _self.el && _self
|
|
3590
|
-
_self.el
|
|
3697
|
+
if (ch.el.parentElement !== _self.el && _self[_DYN_SHOW_CHILDREN ]) {
|
|
3698
|
+
_self.el[_DYN_APPEND_CHILD ](ch.el);
|
|
3591
3699
|
}
|
|
3592
|
-
else if (ch.el.parentElement === _self.el && !_self
|
|
3593
|
-
_self.el
|
|
3700
|
+
else if (ch.el.parentElement === _self.el && !_self[_DYN_SHOW_CHILDREN ]) {
|
|
3701
|
+
_self.el[_DYN_REMOVE_CHILD ](ch.el);
|
|
3594
3702
|
}
|
|
3595
3703
|
}
|
|
3596
3704
|
else {
|
|
3597
|
-
if (_self
|
|
3598
|
-
_self.el
|
|
3705
|
+
if (_self[_DYN_SHOW_CHILDREN ]) {
|
|
3706
|
+
_self.el[_DYN_APPEND_CHILD ](ch);
|
|
3599
3707
|
}
|
|
3600
3708
|
else {
|
|
3601
|
-
_self.el
|
|
3709
|
+
_self.el[_DYN_REMOVE_CHILD ](ch);
|
|
3602
3710
|
}
|
|
3603
3711
|
}
|
|
3604
3712
|
}
|
|
@@ -3612,22 +3720,22 @@
|
|
|
3612
3720
|
this.parent = parent;
|
|
3613
3721
|
var _self = this;
|
|
3614
3722
|
parent.addChild(_self);
|
|
3615
|
-
_self.el = document
|
|
3616
|
-
_self.elName = document
|
|
3617
|
-
_self.elName
|
|
3618
|
-
_self.elName
|
|
3619
|
-
_self.el
|
|
3620
|
-
_self.elValue = document
|
|
3621
|
-
_self.elValue
|
|
3622
|
-
_self.elValue
|
|
3623
|
-
_self.el
|
|
3723
|
+
_self.el = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3724
|
+
_self.elName = document[_DYN_CREATE_ELEMENT ]("span");
|
|
3725
|
+
_self.elName[_DYN_INNER_TEXT ] = "".concat(name, ": ");
|
|
3726
|
+
_self.elName[_DYN_CLASS_NAME ] = "el-name";
|
|
3727
|
+
_self.el[_DYN_APPEND_CHILD ](_self.elName);
|
|
3728
|
+
_self.elValue = document[_DYN_CREATE_ELEMENT ]("span");
|
|
3729
|
+
_self.elValue[_DYN_INNER_TEXT ] = "".concat(value);
|
|
3730
|
+
_self.elValue[_DYN_CLASS_NAME ] = "el-value";
|
|
3731
|
+
_self.el[_DYN_APPEND_CHILD ](_self.elValue);
|
|
3624
3732
|
}
|
|
3625
3733
|
DebugBin.prototype.increment = function () {
|
|
3626
3734
|
var _self = this;
|
|
3627
|
-
_self.elValue
|
|
3735
|
+
_self.elValue[_DYN_INNER_TEXT ] = "".concat(++_self.value);
|
|
3628
3736
|
_self.parent.increment();
|
|
3629
|
-
_self.elValue
|
|
3630
|
-
setTimeout(function () { return _self.elValue
|
|
3737
|
+
_self.elValue[_DYN_CLASS_NAME ] = "el-value incremented";
|
|
3738
|
+
setTimeout(function () { return _self.elValue[_DYN_CLASS_NAME ] = "el-value"; }, 1);
|
|
3631
3739
|
};
|
|
3632
3740
|
return DebugBin;
|
|
3633
3741
|
}());
|
|
@@ -3675,7 +3783,7 @@
|
|
|
3675
3783
|
__extendsFn(DebugPlugin, _super);
|
|
3676
3784
|
function DebugPlugin() {
|
|
3677
3785
|
var _this = _super.call(this) || this;
|
|
3678
|
-
_this.identifier = DebugPlugin
|
|
3786
|
+
_this.identifier = DebugPlugin[_DYN_IDENTIFIER ];
|
|
3679
3787
|
var dashboard;
|
|
3680
3788
|
var permStyleEl;
|
|
3681
3789
|
var debugBins;
|
|
@@ -3689,48 +3797,48 @@
|
|
|
3689
3797
|
base.initialize(config, core, extensions, pluginChain);
|
|
3690
3798
|
var defaultConfig = getDefaultConfig();
|
|
3691
3799
|
var ctx_1 = _self._getTelCtx();
|
|
3692
|
-
var identifier_1 = _self
|
|
3800
|
+
var identifier_1 = _self[_DYN_IDENTIFIER ];
|
|
3693
3801
|
objForEachKey(defaultConfig, function (field, value) {
|
|
3694
3802
|
_theConfig[field] = function () { return ctx_1.getConfig(identifier_1, field, value()); };
|
|
3695
3803
|
});
|
|
3696
3804
|
var foundTrackers_1 = [];
|
|
3697
|
-
trackers = _theConfig
|
|
3805
|
+
trackers = _theConfig[_DYN_TRACKERS ]();
|
|
3698
3806
|
var prefix = _theConfig.cssPrefix();
|
|
3699
|
-
if (!_theConfig
|
|
3807
|
+
if (!_theConfig[_DYN_DISABLE_NOTIFICATION0 ]()) {
|
|
3700
3808
|
var notifyMgr = (isFunction(core.getNotifyMgr) && core.getNotifyMgr()) || core["_notificationManager"];
|
|
3701
3809
|
if (notifyMgr) {
|
|
3702
3810
|
notifyMgr.addNotificationListener({
|
|
3703
3811
|
eventsSent: function (events) {
|
|
3704
|
-
dashboard
|
|
3812
|
+
dashboard[_DYN_NEW_LOG_ENTRY ](events, dateNow() - startTime, "Notification:eventsSent", 0, "eventsSent");
|
|
3705
3813
|
},
|
|
3706
3814
|
eventsDiscarded: function (events, reason) {
|
|
3707
|
-
dashboard
|
|
3815
|
+
dashboard[_DYN_NEW_LOG_ENTRY ]({
|
|
3708
3816
|
events: events,
|
|
3709
3817
|
reason: reason
|
|
3710
3818
|
}, dateNow() - startTime, "Notification:eventsDiscarded", 0, "eventsDiscarded");
|
|
3711
3819
|
},
|
|
3712
3820
|
eventsSendRequest: function (sendReason, isAsync) {
|
|
3713
|
-
dashboard
|
|
3821
|
+
dashboard[_DYN_NEW_LOG_ENTRY ]({
|
|
3714
3822
|
sendReason: sendReason,
|
|
3715
3823
|
isAsync: isAsync
|
|
3716
3824
|
}, dateNow() - startTime, "Notification:eventsSendRequest", 0, "eventsSendRequest");
|
|
3717
3825
|
},
|
|
3718
3826
|
perfEvent: function (perfEvent) {
|
|
3719
3827
|
var evtName = "Notification:perfEvent[".concat(perfEvent.name, "]");
|
|
3720
|
-
dashboard
|
|
3828
|
+
dashboard[_DYN_NEW_LOG_ENTRY ](perfEvent, dateNow() - startTime, evtName, 0, "perfEvent");
|
|
3721
3829
|
}
|
|
3722
3830
|
});
|
|
3723
3831
|
if (arrIndexOf(trackers, "eventsSent") !== -1) {
|
|
3724
|
-
foundTrackers_1
|
|
3832
|
+
foundTrackers_1[_DYN_PUSH ]("eventsSent");
|
|
3725
3833
|
}
|
|
3726
3834
|
if (arrIndexOf(trackers, "eventsSendRequest") !== -1) {
|
|
3727
|
-
foundTrackers_1
|
|
3835
|
+
foundTrackers_1[_DYN_PUSH ]("eventsSendRequest");
|
|
3728
3836
|
}
|
|
3729
3837
|
if (arrIndexOf(trackers, "eventsDiscarded") !== -1) {
|
|
3730
|
-
foundTrackers_1
|
|
3838
|
+
foundTrackers_1[_DYN_PUSH ]("eventsDiscarded");
|
|
3731
3839
|
}
|
|
3732
3840
|
if (arrIndexOf(trackers, "perfEvent") !== -1) {
|
|
3733
|
-
foundTrackers_1
|
|
3841
|
+
foundTrackers_1[_DYN_PUSH ]("perfEvent");
|
|
3734
3842
|
}
|
|
3735
3843
|
}
|
|
3736
3844
|
}
|
|
@@ -3746,8 +3854,8 @@
|
|
|
3746
3854
|
_addTargets(targetObjects_1, ext);
|
|
3747
3855
|
});
|
|
3748
3856
|
}
|
|
3749
|
-
if (isFunction(core
|
|
3750
|
-
var channelControls = core
|
|
3857
|
+
if (isFunction(core[_DYN_GET_TRANSMISSION_CON1 ])) {
|
|
3858
|
+
var channelControls = core[_DYN_GET_TRANSMISSION_CON1 ]();
|
|
3751
3859
|
if (channelControls) {
|
|
3752
3860
|
arrForEach(channelControls, function (channel) {
|
|
3753
3861
|
if (isArray(channel)) {
|
|
@@ -3766,7 +3874,7 @@
|
|
|
3766
3874
|
}, true);
|
|
3767
3875
|
if (val) {
|
|
3768
3876
|
if (arrIndexOf(foundTrackers_1, tracker) === -1) {
|
|
3769
|
-
foundTrackers_1
|
|
3877
|
+
foundTrackers_1[_DYN_PUSH ](tracker);
|
|
3770
3878
|
}
|
|
3771
3879
|
}
|
|
3772
3880
|
});
|
|
@@ -3775,35 +3883,35 @@
|
|
|
3775
3883
|
dashboard = new Dashboard({
|
|
3776
3884
|
prefix: prefix,
|
|
3777
3885
|
trackers: foundTrackers_1,
|
|
3778
|
-
excludeKeys: _theConfig
|
|
3779
|
-
maxMessages: _theConfig
|
|
3886
|
+
excludeKeys: _theConfig[_DYN_EXCLUDE_KEYS ](),
|
|
3887
|
+
maxMessages: _theConfig[_DYN_MAX_MESSAGES ](),
|
|
3780
3888
|
includeFunctions: _theConfig.showFunctions()
|
|
3781
3889
|
});
|
|
3782
|
-
var debugBinContainer = document
|
|
3783
|
-
debugBinContainer
|
|
3890
|
+
var debugBinContainer = document[_DYN_CREATE_ELEMENT ]("div");
|
|
3891
|
+
debugBinContainer[_DYN_CLASS_NAME ] = "".concat(prefix, "-debug-bin-container");
|
|
3784
3892
|
debugBinParent = new DebugBinParent(debugBinContainer, [], 0, prefix);
|
|
3785
3893
|
arrForEach(foundTrackers_1, function (tracker, idx) {
|
|
3786
3894
|
debugBins[tracker] = new DebugBin(tracker, 0, debugBinParent, (idx + 1) * 50);
|
|
3787
3895
|
});
|
|
3788
|
-
permStyleEl = document
|
|
3789
|
-
permStyleEl
|
|
3790
|
-
document.head
|
|
3896
|
+
permStyleEl = document[_DYN_CREATE_ELEMENT ]("style");
|
|
3897
|
+
permStyleEl[_DYN_INNER_HTML ] = permStyle(prefix);
|
|
3898
|
+
document.head[_DYN_APPEND_CHILD ](permStyleEl);
|
|
3791
3899
|
debugBinParent.addButton(function (evt) {
|
|
3792
|
-
evt
|
|
3793
|
-
if (dashboard
|
|
3900
|
+
evt[_DYN_STOP_PROPAGATION ]();
|
|
3901
|
+
if (dashboard[_DYN_IS_DISPLAYED ]()) {
|
|
3794
3902
|
dashboard.hide();
|
|
3795
3903
|
}
|
|
3796
3904
|
else {
|
|
3797
3905
|
dashboard.show();
|
|
3798
3906
|
}
|
|
3799
3907
|
}, "show dashboard");
|
|
3800
|
-
document.body
|
|
3801
|
-
dashboard
|
|
3908
|
+
document.body[_DYN_APPEND_CHILD ](debugBinContainer);
|
|
3909
|
+
dashboard[_DYN_NEW_LOG_ENTRY ](config, 0, "config", 0, "config", true);
|
|
3802
3910
|
}
|
|
3803
3911
|
};
|
|
3804
3912
|
function _addTarget(targetObjects, ext) {
|
|
3805
3913
|
if (ext && arrIndexOf(targetObjects, ext) === -1) {
|
|
3806
|
-
targetObjects
|
|
3914
|
+
targetObjects[_DYN_PUSH ](ext);
|
|
3807
3915
|
return true;
|
|
3808
3916
|
}
|
|
3809
3917
|
return false;
|
|
@@ -3822,10 +3930,10 @@
|
|
|
3822
3930
|
}
|
|
3823
3931
|
function _createInstrumentObject(funcArgs, orgArgs) {
|
|
3824
3932
|
var result = {
|
|
3825
|
-
funcName: funcArgs
|
|
3933
|
+
funcName: funcArgs[_DYN_NAME ],
|
|
3826
3934
|
inst: funcArgs.inst
|
|
3827
3935
|
};
|
|
3828
|
-
if (orgArgs && orgArgs
|
|
3936
|
+
if (orgArgs && orgArgs[_DYN_LENGTH$1 ]) {
|
|
3829
3937
|
result.args = orgArgs;
|
|
3830
3938
|
}
|
|
3831
3939
|
if (!isUndefined(funcArgs.err)) {
|
|
@@ -3838,14 +3946,14 @@
|
|
|
3838
3946
|
}
|
|
3839
3947
|
function _getEvtPrefix(funcArgs) {
|
|
3840
3948
|
var identifier = getTargetName(funcArgs.inst);
|
|
3841
|
-
var evtPrefix = funcArgs
|
|
3949
|
+
var evtPrefix = funcArgs[_DYN_NAME ];
|
|
3842
3950
|
if (identifier) {
|
|
3843
3951
|
evtPrefix += ":" + identifier;
|
|
3844
3952
|
}
|
|
3845
3953
|
return evtPrefix;
|
|
3846
3954
|
}
|
|
3847
3955
|
function _logEntry(theEvent, evtName, kind) {
|
|
3848
|
-
dashboard
|
|
3956
|
+
dashboard[_DYN_NEW_LOG_ENTRY ](theEvent, dateNow() - startTime, evtName, 0, kind);
|
|
3849
3957
|
var dbgExt = getDebugExt(_self.core.config);
|
|
3850
3958
|
if (dbgExt && dbgExt.debugMsg) {
|
|
3851
3959
|
dbgExt.debugMsg(evtName, theEvent);
|
|
@@ -3858,12 +3966,12 @@
|
|
|
3858
3966
|
orgArgs[_i - 1] = arguments[_i];
|
|
3859
3967
|
}
|
|
3860
3968
|
(debugBins[funcArgs.name] || debugBins["default"]).increment();
|
|
3861
|
-
if (funcArgs
|
|
3969
|
+
if (funcArgs[_DYN_NAME ] === "trackException" && !debugBinParent[_DYN_SHOW_CHILDREN ]) {
|
|
3862
3970
|
debugBinParent.addClassToEl("notify");
|
|
3863
3971
|
}
|
|
3864
3972
|
var evtPrefix = _getEvtPrefix(funcArgs);
|
|
3865
|
-
_logEntry(_createInstrumentObject(funcArgs, orgArgs), evtPrefix, funcArgs
|
|
3866
|
-
if (_theConfig
|
|
3973
|
+
_logEntry(_createInstrumentObject(funcArgs, orgArgs), evtPrefix, funcArgs[_DYN_NAME ]);
|
|
3974
|
+
if (_theConfig[_DYN_DUMP_TO_CONSOLE ]() && console && console.log) {
|
|
3867
3975
|
console.log("[".concat(evtPrefix, "] preProcess - funcArgs: "), funcArgs);
|
|
3868
3976
|
console.log("[".concat(evtPrefix, "] preProcess - orgArgs: "), orgArgs);
|
|
3869
3977
|
}
|
|
@@ -3877,21 +3985,21 @@
|
|
|
3877
3985
|
}
|
|
3878
3986
|
if (!isUndefined(funcArgs.err)) {
|
|
3879
3987
|
var evtPrefix = _getEvtPrefix(funcArgs);
|
|
3880
|
-
if (!debugBinParent
|
|
3988
|
+
if (!debugBinParent[_DYN_SHOW_CHILDREN ]) {
|
|
3881
3989
|
debugBinParent.addClassToEl("notify");
|
|
3882
3990
|
}
|
|
3883
|
-
_logEntry(_createInstrumentObject(funcArgs, orgArgs), evtPrefix, funcArgs
|
|
3884
|
-
if (_theConfig
|
|
3991
|
+
_logEntry(_createInstrumentObject(funcArgs, orgArgs), evtPrefix, funcArgs[_DYN_NAME ]);
|
|
3992
|
+
if (_theConfig[_DYN_DUMP_TO_CONSOLE ]() && console && console.log) {
|
|
3885
3993
|
console.log("[".concat(evtPrefix, "] complete"));
|
|
3886
3994
|
}
|
|
3887
3995
|
}
|
|
3888
3996
|
};
|
|
3889
3997
|
}
|
|
3890
3998
|
_self.processTelemetry = function (event, itemCtx) {
|
|
3891
|
-
if (_theConfig
|
|
3999
|
+
if (_theConfig[_DYN_DUMP_TO_CONSOLE ]() && console && console.log) {
|
|
3892
4000
|
console.log("[".concat(_self.identifier, ":processTelemetry] complete"));
|
|
3893
4001
|
}
|
|
3894
|
-
if (!debugBins["processTelemetry"] && _theConfig
|
|
4002
|
+
if (!debugBins["processTelemetry"] && _theConfig[_DYN_LOG_PROCESS_TELEMETR2 ]() === true) {
|
|
3895
4003
|
_logEntry(event, "[".concat(_self.identifier, ":processTelemetry[").concat(event.baseType, "]"), "processTelemetry");
|
|
3896
4004
|
}
|
|
3897
4005
|
_self.processNext(event, itemCtx);
|