@microsoft/applicationinsights-dependencies-js 3.1.1-nightly3.2403-02 → 3.1.1-nightly3.2403-04

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/browser/es5/applicationinsights-dependencies-js.cjs.js +296 -297
  2. package/browser/es5/applicationinsights-dependencies-js.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-dependencies-js.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-dependencies-js.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-dependencies-js.gbl.js +298 -299
  6. package/browser/es5/applicationinsights-dependencies-js.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-dependencies-js.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-dependencies-js.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-dependencies-js.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-dependencies-js.js +298 -299
  11. package/browser/es5/applicationinsights-dependencies-js.js.map +1 -1
  12. package/browser/es5/applicationinsights-dependencies-js.min.js +2 -2
  13. package/browser/es5/applicationinsights-dependencies-js.min.js.map +1 -1
  14. package/dist/es5/applicationinsights-dependencies-js.js +296 -297
  15. package/dist/es5/applicationinsights-dependencies-js.js.map +1 -1
  16. package/dist/es5/applicationinsights-dependencies-js.min.js +2 -2
  17. package/dist/es5/applicationinsights-dependencies-js.min.js.map +1 -1
  18. package/dist-es5/DependencyInitializer.js +1 -1
  19. package/dist-es5/DependencyListener.js +1 -1
  20. package/dist-es5/InternalConstants.js +1 -1
  21. package/dist-es5/__DynamicConstants.js +1 -1
  22. package/dist-es5/ajax.js +1 -1
  23. package/dist-es5/ajaxRecord.js +1 -1
  24. package/dist-es5/ajaxUtils.js +1 -1
  25. package/dist-es5/applicationinsights-dependencies-js.js +1 -1
  26. package/package.json +3 -3
  27. package/types/applicationinsights-dependencies-js.d.ts +1 -1
  28. package/types/applicationinsights-dependencies-js.namespaced.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Dependencies Plugin, 3.1.1-nightly3.2403-02
2
+ * Application Insights JavaScript SDK - Dependencies Plugin, 3.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
6
6
  var undef = "undefined";
7
- var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_dependencies_js_3_1_1_nightly3_2403_02", msMod="__ms$mod__";
8
- var mods={}, modDetail=mods[modName]={}, ver="3.1.1-nightly3.2403-02";
7
+ var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_dependencies_js_3_1_1_nightly3_2403_04", msMod="__ms$mod__";
8
+ var mods={}, modDetail=mods[modName]={}, ver="3.1.1-nightly3.2403-04";
9
9
  var baseNs=global, nsKey="Microsoft", baseNs=baseNs[nsKey]=(baseNs[nsKey]||{});
10
10
  // Versioned namespace "Microsoft.ApplicationInsights3"
11
11
  var exportNs=baseNs, nsKey="ApplicationInsights3", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
@@ -1175,80 +1175,20 @@ var STR_PRIORITY = "priority";
1175
1175
  var STR_GET_PERF_MGR = "getPerfMgr";
1176
1176
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1177
1177
 
1178
- var strGetPrototypeOf = "getPrototypeOf";
1179
- var rCamelCase = /-([a-z])/g;
1180
- var rNormalizeInvalid = /([^\w\d_$])/g;
1181
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
1182
- var _getObjProto = Object[strGetPrototypeOf];
1183
- function isNotNullOrUndefined(value) {
1184
- return !isNullOrUndefined(value);
1185
- }
1186
- function normalizeJsName(name) {
1187
- var value = name;
1188
- if (value && isString(value)) {
1189
- value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1190
- return letter.toUpperCase();
1191
- });
1192
- value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1193
- value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1194
- return "_" + match;
1195
- });
1196
- }
1197
- return value;
1198
- }
1199
- function strContains(value, search) {
1200
- if (value && search) {
1201
- return strIndexOf(value, search) !== -1;
1202
- }
1203
- return false;
1204
- }
1205
- function toISOString(date) {
1206
- return date && date.toISOString() || "";
1207
- }
1208
- function getExceptionName(object) {
1209
- if (isError(object)) {
1210
- return object[_DYN_NAME$2 ];
1211
- }
1212
- return STR_EMPTY;
1213
- }
1214
- function _createProxyFunction(source, funcName) {
1215
- var srcFunc = null;
1216
- var src = null;
1217
- if (isFunction(source)) {
1218
- srcFunc = source;
1219
- }
1220
- else {
1221
- src = source;
1178
+ var _aiNamespace = null;
1179
+ function _getExtensionNamespace() {
1180
+ var target = getInst("Microsoft");
1181
+ if (target) {
1182
+ _aiNamespace = target["ApplicationInsights"];
1222
1183
  }
1223
- return function () {
1224
- var originalArguments = arguments;
1225
- if (srcFunc) {
1226
- src = srcFunc();
1227
- }
1228
- if (src) {
1229
- return src[funcName][_DYN_APPLY ](src, originalArguments);
1230
- }
1231
- };
1184
+ return _aiNamespace;
1232
1185
  }
1233
- function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1234
- if (target && name && source) {
1235
- if (overwriteTarget !== false || isUndefined(target[name])) {
1236
- target[name] = _createProxyFunction(source, theFunc);
1237
- }
1186
+ function getDebugExt(config) {
1187
+ var ns = _aiNamespace;
1188
+ if (!ns && config.disableDbgExt !== true) {
1189
+ ns = _aiNamespace || _getExtensionNamespace();
1238
1190
  }
1239
- }
1240
- function createClassFromInterface(defaults) {
1241
- return /** @class */ (function () {
1242
- function class_1() {
1243
- var _this = this;
1244
- if (defaults) {
1245
- objForEachKey(defaults, function (field, value) {
1246
- _this[field] = value;
1247
- });
1248
- }
1249
- }
1250
- return class_1;
1251
- }());
1191
+ return ns ? ns["ChromeDbgExt"] : null;
1252
1192
  }
1253
1193
 
1254
1194
  var strDocumentMode = "documentMode";
@@ -1303,36 +1243,294 @@ function isIE() {
1303
1243
  var userAgent = (_navUserAgentCheck || STR_EMPTY)[_DYN_TO_LOWER_CASE$2 ]();
1304
1244
  _isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
1305
1245
  }
1306
- return _isTrident;
1246
+ return _isTrident;
1247
+ }
1248
+ function getIEVersion(userAgentStr) {
1249
+ if (userAgentStr === void 0) { userAgentStr = null; }
1250
+ if (!userAgentStr) {
1251
+ var navigator_1 = getNavigator() || {};
1252
+ userAgentStr = navigator_1 ? (navigator_1.userAgent || STR_EMPTY)[_DYN_TO_LOWER_CASE$2 ]() : STR_EMPTY;
1253
+ }
1254
+ var ua = (userAgentStr || STR_EMPTY)[_DYN_TO_LOWER_CASE$2 ]();
1255
+ if (strContains(ua, strMsie)) {
1256
+ var doc = getDocument() || {};
1257
+ return Math.max(parseInt(ua[_DYN_SPLIT$1 ](strMsie)[1]), (doc[strDocumentMode] || 0));
1258
+ }
1259
+ else if (strContains(ua, strTrident)) {
1260
+ var tridentVer = parseInt(ua[_DYN_SPLIT$1 ](strTrident)[1]);
1261
+ if (tridentVer) {
1262
+ return tridentVer + 4;
1263
+ }
1264
+ }
1265
+ return null;
1266
+ }
1267
+ function isXhrSupported() {
1268
+ var isSupported = false;
1269
+ try {
1270
+ var xmlHttpRequest = getInst(strXMLHttpRequest);
1271
+ isSupported = !!xmlHttpRequest;
1272
+ }
1273
+ catch (e) {
1274
+ }
1275
+ return isSupported;
1276
+ }
1277
+
1278
+ var _a$2;
1279
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
1280
+ var AiNonUserActionablePrefix = "AI (Internal): ";
1281
+ var AiUserActionablePrefix = "AI: ";
1282
+ var AIInternalMessagePrefix = "AITR_";
1283
+ var defaultValues$1 = {
1284
+ loggingLevelConsole: 0,
1285
+ loggingLevelTelemetry: 1,
1286
+ maxMessageLimit: 25,
1287
+ enableDebug: false
1288
+ };
1289
+ var _logFuncs = (_a$2 = {},
1290
+ _a$2[0 ] = null,
1291
+ _a$2[1 ] = "errorToConsole",
1292
+ _a$2[2 ] = STR_WARN_TO_CONSOLE,
1293
+ _a$2[3 ] = "debugToConsole",
1294
+ _a$2);
1295
+ function _sanitizeDiagnosticText(text) {
1296
+ if (text) {
1297
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1298
+ }
1299
+ return STR_EMPTY;
1300
+ }
1301
+ function _logToConsole(func, message) {
1302
+ var theConsole = getConsole();
1303
+ if (!!theConsole) {
1304
+ var logFunc = "log";
1305
+ if (theConsole[func]) {
1306
+ logFunc = func;
1307
+ }
1308
+ if (isFunction(theConsole[logFunc])) {
1309
+ theConsole[logFunc](message);
1310
+ }
1311
+ }
1312
+ }
1313
+ var _InternalLogMessage = /** @class */ (function () {
1314
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1315
+ if (isUserAct === void 0) { isUserAct = false; }
1316
+ var _self = this;
1317
+ _self[_DYN_MESSAGE_ID ] = msgId;
1318
+ _self[_DYN_MESSAGE ] =
1319
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1320
+ msgId;
1321
+ var strProps = STR_EMPTY;
1322
+ if (hasJSON()) {
1323
+ strProps = getJSON().stringify(properties);
1324
+ }
1325
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1326
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1327
+ _self[_DYN_MESSAGE ] += diagnosticText;
1328
+ }
1329
+ _InternalLogMessage.dataType = "MessageData";
1330
+ return _InternalLogMessage;
1331
+ }());
1332
+ function safeGetLogger(core, config) {
1333
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1334
+ }
1335
+ var DiagnosticLogger = /** @class */ (function () {
1336
+ function DiagnosticLogger(config) {
1337
+ this.identifier = "DiagnosticLogger";
1338
+ this.queue = [];
1339
+ var _messageCount = 0;
1340
+ var _messageLogged = {};
1341
+ var _loggingLevelConsole;
1342
+ var _loggingLevelTelemetry;
1343
+ var _maxInternalMessageLimit;
1344
+ var _enableDebug;
1345
+ var _unloadHandler;
1346
+ dynamicProto(DiagnosticLogger, this, function (_self) {
1347
+ _unloadHandler = _setDefaultsFromConfig(config || {});
1348
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1349
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1350
+ if (isUserAct === void 0) { isUserAct = false; }
1351
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1352
+ if (_enableDebug) {
1353
+ throw dumpObj(message);
1354
+ }
1355
+ else {
1356
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1357
+ if (!isUndefined(message[_DYN_MESSAGE ])) {
1358
+ if (isUserAct) {
1359
+ var messageKey = +message[_DYN_MESSAGE_ID ];
1360
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1361
+ _self[logFunc](message[_DYN_MESSAGE ]);
1362
+ _messageLogged[messageKey] = true;
1363
+ }
1364
+ }
1365
+ else {
1366
+ if (_loggingLevelConsole >= severity) {
1367
+ _self[logFunc](message[_DYN_MESSAGE ]);
1368
+ }
1369
+ }
1370
+ _logInternalMessage(severity, message);
1371
+ }
1372
+ else {
1373
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1374
+ }
1375
+ }
1376
+ };
1377
+ _self.debugToConsole = function (message) {
1378
+ _logToConsole("debug", message);
1379
+ _debugExtMsg("warning", message);
1380
+ };
1381
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1382
+ _logToConsole("warn", message);
1383
+ _debugExtMsg("warning", message);
1384
+ };
1385
+ _self.errorToConsole = function (message) {
1386
+ _logToConsole("error", message);
1387
+ _debugExtMsg("error", message);
1388
+ };
1389
+ _self.resetInternalMessageCount = function () {
1390
+ _messageCount = 0;
1391
+ _messageLogged = {};
1392
+ };
1393
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1394
+ _self[_DYN_UNLOAD ] = function (isAsync) {
1395
+ _unloadHandler && _unloadHandler.rm();
1396
+ _unloadHandler = null;
1397
+ };
1398
+ function _logInternalMessage(severity, message) {
1399
+ if (_areInternalMessagesThrottled()) {
1400
+ return;
1401
+ }
1402
+ var logMessage = true;
1403
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1404
+ if (_messageLogged[messageKey]) {
1405
+ logMessage = false;
1406
+ }
1407
+ else {
1408
+ _messageLogged[messageKey] = true;
1409
+ }
1410
+ if (logMessage) {
1411
+ if (severity <= _loggingLevelTelemetry) {
1412
+ _self.queue[_DYN_PUSH ](message);
1413
+ _messageCount++;
1414
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1415
+ }
1416
+ if (_messageCount === _maxInternalMessageLimit) {
1417
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1418
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1419
+ _self.queue[_DYN_PUSH ](throttleMessage);
1420
+ if (severity === 1 ) {
1421
+ _self.errorToConsole(throttleLimitMessage);
1422
+ }
1423
+ else {
1424
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1425
+ }
1426
+ }
1427
+ }
1428
+ }
1429
+ function _setDefaultsFromConfig(config) {
1430
+ return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
1431
+ var config = details.cfg;
1432
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1433
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
1434
+ _maxInternalMessageLimit = config.maxMessageLimit;
1435
+ _enableDebug = config.enableDebug;
1436
+ });
1437
+ }
1438
+ function _areInternalMessagesThrottled() {
1439
+ return _messageCount >= _maxInternalMessageLimit;
1440
+ }
1441
+ function _debugExtMsg(name, data) {
1442
+ var dbgExt = getDebugExt(config || {});
1443
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1444
+ dbgExt[_DYN_DIAG_LOG ](name, data);
1445
+ }
1446
+ }
1447
+ });
1448
+ }
1449
+ DiagnosticLogger.__ieDyn=1;
1450
+ return DiagnosticLogger;
1451
+ }());
1452
+ function _getLogger(logger) {
1453
+ return (logger || new DiagnosticLogger());
1454
+ }
1455
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1456
+ if (isUserAct === void 0) { isUserAct = false; }
1457
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1458
+ }
1459
+
1460
+ var strGetPrototypeOf = "getPrototypeOf";
1461
+ var rCamelCase = /-([a-z])/g;
1462
+ var rNormalizeInvalid = /([^\w\d_$])/g;
1463
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
1464
+ var _getObjProto = Object[strGetPrototypeOf];
1465
+ function isNotNullOrUndefined(value) {
1466
+ return !isNullOrUndefined(value);
1467
+ }
1468
+ function normalizeJsName(name) {
1469
+ var value = name;
1470
+ if (value && isString(value)) {
1471
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1472
+ return letter.toUpperCase();
1473
+ });
1474
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1475
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1476
+ return "_" + match;
1477
+ });
1478
+ }
1479
+ return value;
1480
+ }
1481
+ function strContains(value, search) {
1482
+ if (value && search) {
1483
+ return strIndexOf(value, search) !== -1;
1484
+ }
1485
+ return false;
1486
+ }
1487
+ function toISOString(date) {
1488
+ return date && date.toISOString() || "";
1489
+ }
1490
+ function getExceptionName(object) {
1491
+ if (isError(object)) {
1492
+ return object[_DYN_NAME$2 ];
1493
+ }
1494
+ return STR_EMPTY;
1307
1495
  }
1308
- function getIEVersion(userAgentStr) {
1309
- if (userAgentStr === void 0) { userAgentStr = null; }
1310
- if (!userAgentStr) {
1311
- var navigator_1 = getNavigator() || {};
1312
- userAgentStr = navigator_1 ? (navigator_1.userAgent || STR_EMPTY)[_DYN_TO_LOWER_CASE$2 ]() : STR_EMPTY;
1496
+ function _createProxyFunction(source, funcName) {
1497
+ var srcFunc = null;
1498
+ var src = null;
1499
+ if (isFunction(source)) {
1500
+ srcFunc = source;
1313
1501
  }
1314
- var ua = (userAgentStr || STR_EMPTY)[_DYN_TO_LOWER_CASE$2 ]();
1315
- if (strContains(ua, strMsie)) {
1316
- var doc = getDocument() || {};
1317
- return Math.max(parseInt(ua[_DYN_SPLIT$1 ](strMsie)[1]), (doc[strDocumentMode] || 0));
1502
+ else {
1503
+ src = source;
1318
1504
  }
1319
- else if (strContains(ua, strTrident)) {
1320
- var tridentVer = parseInt(ua[_DYN_SPLIT$1 ](strTrident)[1]);
1321
- if (tridentVer) {
1322
- return tridentVer + 4;
1505
+ return function () {
1506
+ var originalArguments = arguments;
1507
+ if (srcFunc) {
1508
+ src = srcFunc();
1323
1509
  }
1324
- }
1325
- return null;
1510
+ if (src) {
1511
+ return src[funcName][_DYN_APPLY ](src, originalArguments);
1512
+ }
1513
+ };
1326
1514
  }
1327
- function isXhrSupported() {
1328
- var isSupported = false;
1329
- try {
1330
- var xmlHttpRequest = getInst(strXMLHttpRequest);
1331
- isSupported = !!xmlHttpRequest;
1332
- }
1333
- catch (e) {
1515
+ function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1516
+ if (target && name && source) {
1517
+ if (overwriteTarget !== false || isUndefined(target[name])) {
1518
+ target[name] = _createProxyFunction(source, theFunc);
1519
+ }
1334
1520
  }
1335
- return isSupported;
1521
+ }
1522
+ function createClassFromInterface(defaults) {
1523
+ return /** @class */ (function () {
1524
+ function class_1() {
1525
+ var _this = this;
1526
+ if (defaults) {
1527
+ objForEachKey(defaults, function (field, value) {
1528
+ _this[field] = value;
1529
+ });
1530
+ }
1531
+ }
1532
+ return class_1;
1533
+ }());
1336
1534
  }
1337
1535
 
1338
1536
  var UInt32Mask = 0x100000000;
@@ -2074,204 +2272,6 @@ function onConfigChange(config, configHandler, logger) {
2074
2272
  return createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
2075
2273
  }
2076
2274
 
2077
- var _aiNamespace = null;
2078
- function _getExtensionNamespace() {
2079
- var target = getInst("Microsoft");
2080
- if (target) {
2081
- _aiNamespace = target["ApplicationInsights"];
2082
- }
2083
- return _aiNamespace;
2084
- }
2085
- function getDebugExt(config) {
2086
- var ns = _aiNamespace;
2087
- if (!ns && config.disableDbgExt !== true) {
2088
- ns = _aiNamespace || _getExtensionNamespace();
2089
- }
2090
- return ns ? ns["ChromeDbgExt"] : null;
2091
- }
2092
-
2093
- var _a$2;
2094
- var STR_WARN_TO_CONSOLE = "warnToConsole";
2095
- var AiNonUserActionablePrefix = "AI (Internal): ";
2096
- var AiUserActionablePrefix = "AI: ";
2097
- var AIInternalMessagePrefix = "AITR_";
2098
- var defaultValues$1 = {
2099
- loggingLevelConsole: 0,
2100
- loggingLevelTelemetry: 1,
2101
- maxMessageLimit: 25,
2102
- enableDebug: false
2103
- };
2104
- var _logFuncs = (_a$2 = {},
2105
- _a$2[0 ] = null,
2106
- _a$2[1 ] = "errorToConsole",
2107
- _a$2[2 ] = STR_WARN_TO_CONSOLE,
2108
- _a$2[3 ] = "debugToConsole",
2109
- _a$2);
2110
- function _sanitizeDiagnosticText(text) {
2111
- if (text) {
2112
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
2113
- }
2114
- return STR_EMPTY;
2115
- }
2116
- function _logToConsole(func, message) {
2117
- var theConsole = getConsole();
2118
- if (!!theConsole) {
2119
- var logFunc = "log";
2120
- if (theConsole[func]) {
2121
- logFunc = func;
2122
- }
2123
- if (isFunction(theConsole[logFunc])) {
2124
- theConsole[logFunc](message);
2125
- }
2126
- }
2127
- }
2128
- var _InternalLogMessage = /** @class */ (function () {
2129
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
2130
- if (isUserAct === void 0) { isUserAct = false; }
2131
- var _self = this;
2132
- _self[_DYN_MESSAGE_ID ] = msgId;
2133
- _self[_DYN_MESSAGE ] =
2134
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
2135
- msgId;
2136
- var strProps = STR_EMPTY;
2137
- if (hasJSON()) {
2138
- strProps = getJSON().stringify(properties);
2139
- }
2140
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
2141
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
2142
- _self[_DYN_MESSAGE ] += diagnosticText;
2143
- }
2144
- _InternalLogMessage.dataType = "MessageData";
2145
- return _InternalLogMessage;
2146
- }());
2147
- function safeGetLogger(core, config) {
2148
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
2149
- }
2150
- var DiagnosticLogger = /** @class */ (function () {
2151
- function DiagnosticLogger(config) {
2152
- this.identifier = "DiagnosticLogger";
2153
- this.queue = [];
2154
- var _messageCount = 0;
2155
- var _messageLogged = {};
2156
- var _loggingLevelConsole;
2157
- var _loggingLevelTelemetry;
2158
- var _maxInternalMessageLimit;
2159
- var _enableDebug;
2160
- var _unloadHandler;
2161
- dynamicProto(DiagnosticLogger, this, function (_self) {
2162
- _unloadHandler = _setDefaultsFromConfig(config || {});
2163
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2164
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2165
- if (isUserAct === void 0) { isUserAct = false; }
2166
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2167
- if (_enableDebug) {
2168
- throw dumpObj(message);
2169
- }
2170
- else {
2171
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2172
- if (!isUndefined(message[_DYN_MESSAGE ])) {
2173
- if (isUserAct) {
2174
- var messageKey = +message[_DYN_MESSAGE_ID ];
2175
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2176
- _self[logFunc](message[_DYN_MESSAGE ]);
2177
- _messageLogged[messageKey] = true;
2178
- }
2179
- }
2180
- else {
2181
- if (_loggingLevelConsole >= severity) {
2182
- _self[logFunc](message[_DYN_MESSAGE ]);
2183
- }
2184
- }
2185
- _logInternalMessage(severity, message);
2186
- }
2187
- else {
2188
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2189
- }
2190
- }
2191
- };
2192
- _self.debugToConsole = function (message) {
2193
- _logToConsole("debug", message);
2194
- _debugExtMsg("warning", message);
2195
- };
2196
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2197
- _logToConsole("warn", message);
2198
- _debugExtMsg("warning", message);
2199
- };
2200
- _self.errorToConsole = function (message) {
2201
- _logToConsole("error", message);
2202
- _debugExtMsg("error", message);
2203
- };
2204
- _self.resetInternalMessageCount = function () {
2205
- _messageCount = 0;
2206
- _messageLogged = {};
2207
- };
2208
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2209
- _self[_DYN_UNLOAD ] = function (isAsync) {
2210
- _unloadHandler && _unloadHandler.rm();
2211
- _unloadHandler = null;
2212
- };
2213
- function _logInternalMessage(severity, message) {
2214
- if (_areInternalMessagesThrottled()) {
2215
- return;
2216
- }
2217
- var logMessage = true;
2218
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2219
- if (_messageLogged[messageKey]) {
2220
- logMessage = false;
2221
- }
2222
- else {
2223
- _messageLogged[messageKey] = true;
2224
- }
2225
- if (logMessage) {
2226
- if (severity <= _loggingLevelTelemetry) {
2227
- _self.queue[_DYN_PUSH ](message);
2228
- _messageCount++;
2229
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2230
- }
2231
- if (_messageCount === _maxInternalMessageLimit) {
2232
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2233
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2234
- _self.queue[_DYN_PUSH ](throttleMessage);
2235
- if (severity === 1 ) {
2236
- _self.errorToConsole(throttleLimitMessage);
2237
- }
2238
- else {
2239
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2240
- }
2241
- }
2242
- }
2243
- }
2244
- function _setDefaultsFromConfig(config) {
2245
- return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
2246
- var config = details.cfg;
2247
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2248
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
2249
- _maxInternalMessageLimit = config.maxMessageLimit;
2250
- _enableDebug = config.enableDebug;
2251
- });
2252
- }
2253
- function _areInternalMessagesThrottled() {
2254
- return _messageCount >= _maxInternalMessageLimit;
2255
- }
2256
- function _debugExtMsg(name, data) {
2257
- var dbgExt = getDebugExt(config || {});
2258
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2259
- dbgExt[_DYN_DIAG_LOG ](name, data);
2260
- }
2261
- }
2262
- });
2263
- }
2264
- DiagnosticLogger.__ieDyn=1;
2265
- return DiagnosticLogger;
2266
- }());
2267
- function _getLogger(logger) {
2268
- return (logger || new DiagnosticLogger());
2269
- }
2270
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2271
- if (isUserAct === void 0) { isUserAct = false; }
2272
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2273
- }
2274
-
2275
2275
  var strExecutionContextKey = "ctx";
2276
2276
  var strParentContextKey = "ParentContextKey";
2277
2277
  var strChildrenContextKey = "ChildrenContextKey";
@@ -3297,7 +3297,6 @@ var RequestHeaders = createValueMap({
3297
3297
  var _DYN_SPLIT = "split";
3298
3298
  var _DYN_LENGTH$1 = "length";
3299
3299
  var _DYN_TO_LOWER_CASE$1 = "toLowerCase";
3300
- var _DYN_DATA = "data";
3301
3300
  var _DYN_NAME$1 = "name";
3302
3301
  var _DYN_STRINGIFY = "stringify";
3303
3302
  var _DYN_PATHNAME = "pathname";
@@ -3666,7 +3665,7 @@ var RemoteDependencyData = /** @class */ (function () {
3666
3665
  _self.resultCode = resultCode + "";
3667
3666
  _self.type = dataSanitizeString(logger, requestAPI);
3668
3667
  var dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);
3669
- _self[_DYN_DATA ] = dataSanitizeUrl(logger, commandName) || dependencyFields[_DYN_DATA ];
3668
+ _self.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data;
3670
3669
  _self.target = dataSanitizeString(logger, dependencyFields.target);
3671
3670
  if (correlationContext) {
3672
3671
  _self.target = "".concat(_self.target, " | ").concat(correlationContext);
@@ -3786,7 +3785,7 @@ function createTelemetryItem(item, baseType, envelopeName, logger, customPropert
3786
3785
  _a);
3787
3786
  if (!isNullOrUndefined(customProperties)) {
3788
3787
  objForEachKey(customProperties, function (prop, value) {
3789
- telemetryItem[_DYN_DATA ][prop] = value;
3788
+ telemetryItem.data[prop] = value;
3790
3789
  });
3791
3790
  }
3792
3791
  return telemetryItem;