@microsoft/applicationinsights-core-js 3.0.0-beta.2208-03 → 3.0.0-beta.2208-16
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/README.md +7 -0
- package/browser/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +2040 -2155
- package/browser/applicationinsights-core-js.js.map +1 -1
- package/browser/applicationinsights-core-js.min.js +2 -2
- package/browser/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.api.json +6998 -10817
- package/dist/applicationinsights-core-js.api.md +88 -177
- package/dist/applicationinsights-core-js.d.ts +94 -494
- package/dist/applicationinsights-core-js.js +2040 -2155
- package/dist/applicationinsights-core-js.js.map +1 -1
- package/dist/applicationinsights-core-js.min.js +2 -2
- package/dist/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.rollup.d.ts +94 -494
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +2 -2
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +11 -12
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +3 -2
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +2 -2
- package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +27 -26
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +8 -140
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +3 -3
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +4 -3
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +132 -136
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +2 -3
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +23 -470
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +5 -5
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +4 -4
- package/dist-esm/JavaScriptSDK/InternalConstants.js.map +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +2 -2
- package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +4 -8
- package/dist-esm/JavaScriptSDK/PerfManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +3 -3
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +2 -2
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +3 -3
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +2 -3
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js.map +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +2 -2
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +5 -31
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-esm/__DynamicConstants.js +11 -13
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +6 -5
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +4 -3
- package/src/JavaScriptSDK/AppInsightsCore.ts +1 -1
- package/src/JavaScriptSDK/BaseCore.ts +2 -4
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +2 -1
- package/src/JavaScriptSDK/ChannelController.ts +1 -1
- package/src/JavaScriptSDK/CookieMgr.ts +6 -5
- package/src/JavaScriptSDK/CoreUtils.ts +7 -423
- package/src/JavaScriptSDK/DbgExtensionUtils.ts +2 -2
- package/src/JavaScriptSDK/DiagnosticLogger.ts +3 -2
- package/src/JavaScriptSDK/EnvUtils.ts +145 -148
- package/src/JavaScriptSDK/EventHelpers.ts +1 -2
- package/src/JavaScriptSDK/HelperFuncs.ts +22 -536
- package/src/JavaScriptSDK/InstrumentHooks.ts +4 -4
- package/src/JavaScriptSDK/InternalConstants.ts +3 -3
- package/src/JavaScriptSDK/NotificationManager.ts +1 -1
- package/src/JavaScriptSDK/PerfManager.ts +3 -7
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +4 -4
- package/src/JavaScriptSDK/TelemetryHelpers.ts +1 -1
- package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +2 -2
- package/src/JavaScriptSDK/UnloadHandlerContainer.ts +1 -2
- package/src/JavaScriptSDK/W3cTraceParent.ts +1 -1
- package/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +5 -36
- package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +7 -0
- package/tsconfig.json +1 -1
- package/types/JavaScriptSDK/CoreUtils.d.ts +0 -270
- package/types/JavaScriptSDK/EnvUtils.d.ts +0 -65
- package/types/JavaScriptSDK/HelperFuncs.d.ts +3 -154
- package/types/JavaScriptSDK.Enums/EnumHelperFuncs.d.ts +6 -18
- package/types/JavaScriptSDK.Interfaces/ITelemetryPlugin.d.ts +6 -0
- package/types/__DynamicConstants.d.ts +2 -4
- package/types/applicationinsights-core-js.d.ts +5 -4
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,51 +1,33 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
+
import { ObjAssign, ObjClass, ObjHasOwnProperty, ObjProto, strShimFunction, strShimPrototype } from "@microsoft/applicationinsights-shims";
|
|
3
4
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "@
|
|
5
|
+
arrForEach, isArray, isBoolean, isError, isFunction, isNullOrUndefined, isObject, isString, isUndefined, objDeepFreeze,
|
|
6
|
+
objDefineAccessors, objForEachKey, objHasOwnProperty, strIndexOf, throwUnsupported
|
|
7
|
+
} from "@nevware21/ts-utils";
|
|
7
8
|
import { STR_EMPTY } from "./InternalConstants";
|
|
8
9
|
|
|
9
10
|
// RESTRICT and AVOID circular dependencies you should not import other contained modules or export the contents of this file directly
|
|
10
11
|
|
|
11
|
-
// Added to help with
|
|
12
|
+
// Added to help with minification
|
|
13
|
+
const cString = "String";
|
|
14
|
+
const cObject = "Object";
|
|
12
15
|
const strToISOString = "toISOString";
|
|
13
|
-
const cStrEndsWith = "endsWith";
|
|
14
|
-
const cStrStartsWith = "startsWith";
|
|
15
|
-
const strIndexOf = "indexOf";
|
|
16
16
|
const strMap = "map";
|
|
17
|
-
const strReduce = "reduce";
|
|
18
|
-
const cStrTrim = "trim";
|
|
19
17
|
const strToString = "toString";
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Constant string defined to support minimization
|
|
23
|
-
* @ignore
|
|
24
|
-
*/
|
|
25
|
-
const str__Proto = "__proto__";
|
|
18
|
+
const strGetPrototypeOf = "getPrototypeOf";
|
|
26
19
|
|
|
27
20
|
/**
|
|
28
21
|
* Constant string defined to support minimization
|
|
29
22
|
* @ignore
|
|
30
23
|
*/
|
|
31
24
|
const strConstructor = "constructor";
|
|
32
|
-
|
|
33
|
-
const _objDefineProperty = ObjDefineProperty;
|
|
34
|
-
const _objFreeze = ObjClass.freeze;
|
|
35
|
-
const _objSeal = ObjClass.seal;
|
|
36
|
-
const _objKeys = ObjClass.keys;
|
|
37
|
-
|
|
38
|
-
const StringProto = String[strShimPrototype];
|
|
39
|
-
const _strTrim = StringProto[cStrTrim];
|
|
40
|
-
const _strEndsWith = StringProto[cStrEndsWith];
|
|
41
|
-
const _strStartsWith = StringProto[cStrStartsWith];
|
|
42
25
|
|
|
43
26
|
const DateProto = Date[strShimPrototype];
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const _objToString = ObjProto[strToString];
|
|
27
|
+
const _dateToISOString = DateProto[strToISOString] || _polyfillRequired("Date", strToISOString);
|
|
28
|
+
const _objToString = ObjProto[strToString] || _polyfillRequired(cObject, strToString);
|
|
47
29
|
|
|
48
|
-
const _fnToString = ObjHasOwnProperty[strToString];
|
|
30
|
+
const _fnToString = ObjHasOwnProperty[strToString] || _polyfillRequired(cString, strToString);
|
|
49
31
|
// Cache what this browser reports as the object function constructor (as a string)
|
|
50
32
|
const _objFunctionString = _fnToString.call(ObjClass);
|
|
51
33
|
|
|
@@ -53,76 +35,26 @@ const rCamelCase = /-([a-z])/g;
|
|
|
53
35
|
const rNormalizeInvalid = /([^\w\d_$])/g;
|
|
54
36
|
const rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
55
37
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
* @ignore
|
|
60
|
-
*/
|
|
61
|
-
let _objGetPrototypeOf = Object["getPrototypeOf"];
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.
|
|
65
|
-
* @ignore
|
|
66
|
-
*/
|
|
67
|
-
export function _getObjProto(target:any) {
|
|
68
|
-
if (target) {
|
|
69
|
-
// This method doesn't existing in older browsers (e.g. IE8)
|
|
70
|
-
if (_objGetPrototypeOf) {
|
|
71
|
-
return _objGetPrototypeOf(target);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// target[Constructor] May break if the constructor has been changed or removed
|
|
75
|
-
let newProto = target[str__Proto] || target[strShimPrototype] || target[strConstructor];
|
|
76
|
-
if(newProto) {
|
|
77
|
-
return newProto;
|
|
78
|
-
}
|
|
38
|
+
function _polyfillRequired(object:string, name: string): any {
|
|
39
|
+
return function() {
|
|
40
|
+
throwUnsupported("Polyfill required for [" + name + "]");
|
|
79
41
|
}
|
|
80
|
-
|
|
81
|
-
return null;
|
|
82
42
|
}
|
|
83
43
|
|
|
44
|
+
export let _getObjProto = Object[strGetPrototypeOf] || _polyfillRequired(cObject, strGetPrototypeOf);
|
|
45
|
+
|
|
84
46
|
export function objToString(obj: any) {
|
|
85
47
|
return _objToString.call(obj);
|
|
86
48
|
}
|
|
87
49
|
|
|
88
|
-
export function isTypeof(value: any, theType: string): boolean {
|
|
89
|
-
return typeof value === theType;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export function isUndefined(value: any): value is undefined {
|
|
93
|
-
return value === undefined || typeof value === strShimUndefined;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
50
|
export function isNotUndefined<T>(value: T): value is T {
|
|
97
51
|
return !isUndefined(value);
|
|
98
52
|
}
|
|
99
53
|
|
|
100
|
-
export function isNullOrUndefined(value: any): value is null | undefined {
|
|
101
|
-
return (value === null || isUndefined(value));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
54
|
export function isNotNullOrUndefined<T>(value: T): value is T {
|
|
105
55
|
return !isNullOrUndefined(value);
|
|
106
56
|
}
|
|
107
57
|
|
|
108
|
-
export function hasOwnProperty(obj: any, prop: string): boolean {
|
|
109
|
-
return !!(obj && ObjHasOwnProperty.call(obj, prop));
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export function isObject<T>(value: T): value is T {
|
|
113
|
-
// Changing to inline for performance
|
|
114
|
-
return !!(value && typeof value === strShimObject);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export function isFunction(value: any): value is Function {
|
|
118
|
-
// Changing to inline for performance
|
|
119
|
-
return !!(value && typeof value === strShimFunction);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export function isPromiseLike<T>(value: any): value is PromiseLike<T> {
|
|
123
|
-
return value && isFunction(value.then);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
58
|
/**
|
|
127
59
|
* Validates that the string name conforms to the JS IdentifierName specification and if not
|
|
128
60
|
* normalizes the name so that it would. This method does not identify or change any keywords
|
|
@@ -148,178 +80,19 @@ export function normalizeJsName(name: string): string {
|
|
|
148
80
|
return value;
|
|
149
81
|
}
|
|
150
82
|
|
|
151
|
-
/**
|
|
152
|
-
* This is a helper function for the equivalent of arForEach(objKeys(target), callbackFn), this is a
|
|
153
|
-
* performance optimization to avoid the creation of a new array for large objects
|
|
154
|
-
* @param target The target object to find and process the keys
|
|
155
|
-
* @param callbackfn The function to call with the details
|
|
156
|
-
*/
|
|
157
|
-
export function objForEachKey<T = any>(target: T, callbackfn: (name: string, value: T[keyof T]) => void) {
|
|
158
|
-
if (target) {
|
|
159
|
-
for (let prop in target) {
|
|
160
|
-
if (ObjHasOwnProperty.call(target, prop)) {
|
|
161
|
-
callbackfn.call(target, prop, target[prop]);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* The strEndsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
|
|
169
|
-
* @param value - The value to check whether it ends with the search value.
|
|
170
|
-
* @param search - The characters to be searched for at the end of the value.
|
|
171
|
-
* @returns true if the given search value is found at the end of the string, otherwise false.
|
|
172
|
-
*/
|
|
173
|
-
export function strEndsWith(value: string, search: string) {
|
|
174
|
-
let result = false;
|
|
175
|
-
if (value && search && !(result = value === search)) {
|
|
176
|
-
// For Performance try and use the native instance, using string lookup of the function to easily pass the ES3 build checks and minification
|
|
177
|
-
result = _strEndsWith ? value[cStrEndsWith](search) : _strEndsWithPoly(value, search);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
return result;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* The _strEndsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
|
|
185
|
-
* @param value - The value to check whether it ends with the search value.
|
|
186
|
-
* @param search - The characters to be searched for at the end of the value.
|
|
187
|
-
* @returns true if the given search value is found at the end of the string, otherwise false.
|
|
188
|
-
*/
|
|
189
|
-
export function _strEndsWithPoly(value: string, search: string) {
|
|
190
|
-
let result = false;
|
|
191
|
-
let searchLen = search ? search.length : 0;
|
|
192
|
-
let valLen = value ? value.length : 0;
|
|
193
|
-
if (searchLen && valLen && valLen >= searchLen && !(result = value === search)) {
|
|
194
|
-
let pos = valLen - 1;
|
|
195
|
-
for (let lp = searchLen - 1; lp >= 0; lp--) {
|
|
196
|
-
if (value[pos] != search[lp]) {
|
|
197
|
-
return false;
|
|
198
|
-
}
|
|
199
|
-
pos--;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
result = true;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
return result;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* The strStartsWith() method determines whether a string starts with the characters of the specified string, returning true or false as appropriate.
|
|
210
|
-
* @param value - The value to check whether it ends with the search value.
|
|
211
|
-
* @param checkValue - The characters to be searched for at the start of the value.
|
|
212
|
-
* @returns true if the given search value is found at the start of the string, otherwise false.
|
|
213
|
-
*/
|
|
214
|
-
export function strStartsWith(value: string, checkValue: string) {
|
|
215
|
-
let result = false;
|
|
216
|
-
if (value && checkValue && !(result = value === checkValue)) {
|
|
217
|
-
// For Performance try and use the native instance, using string lookup of the function to easily pass the ES3 build checks and minification
|
|
218
|
-
result = _strStartsWith ? value[cStrStartsWith](checkValue) : _strStartsWithPoly(value, checkValue);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
return result;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* The strStartsWith() method determines whether a string starts with the characters of the specified string, returning true or false as appropriate.
|
|
226
|
-
* @param value - The value to check whether it ends with the search value.
|
|
227
|
-
* @param checkValue - The characters to be searched for at the start of the value.
|
|
228
|
-
* @returns true if the given search value is found at the start of the string, otherwise false.
|
|
229
|
-
*/
|
|
230
|
-
export function _strStartsWithPoly(value: string, checkValue: string) {
|
|
231
|
-
// Using helper for performance and because string startsWith() is not available on IE
|
|
232
|
-
let result = false;
|
|
233
|
-
let chkLen = checkValue ? checkValue.length : 0;
|
|
234
|
-
if (value && chkLen && value.length >= chkLen && !(result = value === checkValue)) {
|
|
235
|
-
for (let lp = 0; lp < chkLen; lp++) {
|
|
236
|
-
if (value[lp] !== checkValue[lp]) {
|
|
237
|
-
return false;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
result = true;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
return result;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
83
|
/**
|
|
248
84
|
* A simple wrapper (for minification support) to check if the value contains the search string.
|
|
249
85
|
* @param value - The string value to check for the existence of the search value
|
|
250
86
|
* @param search - The value search within the value
|
|
251
87
|
*/
|
|
252
|
-
export function strContains(value: string, search: string) {
|
|
88
|
+
export function strContains(value: string, search: string): boolean {
|
|
253
89
|
if (value && search) {
|
|
254
|
-
return value
|
|
90
|
+
return strIndexOf(value, search) !== -1;
|
|
255
91
|
}
|
|
256
92
|
|
|
257
93
|
return false;
|
|
258
94
|
}
|
|
259
95
|
|
|
260
|
-
/**
|
|
261
|
-
* Check if an object is of type Date
|
|
262
|
-
*/
|
|
263
|
-
export function isDate(obj: any): obj is Date {
|
|
264
|
-
return !!(obj && _objToString.call(obj) === "[object Date]");
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Check if an object is of type Array with optional generic T, the generic type is not validated
|
|
269
|
-
* and exists to help with TypeScript validation only.
|
|
270
|
-
*/
|
|
271
|
-
export let isArray: <T = any>(obj: any) => obj is Array<T> = _isArray || _isArrayPoly;
|
|
272
|
-
function _isArrayPoly<T = any>(obj: any): obj is Array<T> {
|
|
273
|
-
return !!(obj && _objToString.call(obj) === "[object Array]");
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* Check if an object is of type Error
|
|
278
|
-
*/
|
|
279
|
-
export function isError(obj: any): obj is Error {
|
|
280
|
-
return !!(obj && _objToString.call(obj) === "[object Error]");
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* Checks if the type of value is a string.
|
|
285
|
-
* @param {any} value - Value to be checked.
|
|
286
|
-
* @return {boolean} True if the value is a string, false otherwise.
|
|
287
|
-
*/
|
|
288
|
-
export function isString(value: any): value is string {
|
|
289
|
-
// Changing to inline for performance
|
|
290
|
-
return typeof value === "string";
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Checks if the type of value is a number.
|
|
295
|
-
* @param {any} value - Value to be checked.
|
|
296
|
-
* @return {boolean} True if the value is a number, false otherwise.
|
|
297
|
-
*/
|
|
298
|
-
export function isNumber(value: any): value is number {
|
|
299
|
-
// Changing to inline for performance
|
|
300
|
-
return typeof value === "number";
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Checks if the type of value is a boolean.
|
|
305
|
-
* @param {any} value - Value to be checked.
|
|
306
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
307
|
-
*/
|
|
308
|
-
export function isBoolean(value: any): value is boolean {
|
|
309
|
-
// Changing to inline for performance
|
|
310
|
-
return typeof value === "boolean";
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Checks if the type of value is a Symbol.
|
|
315
|
-
* This only returns a boolean as returning value is Symbol will cause issues for older TypeScript consumers
|
|
316
|
-
* @param {any} value - Value to be checked.
|
|
317
|
-
* @return {boolean} True if the value is a Symbol, false otherwise.
|
|
318
|
-
*/
|
|
319
|
-
export function isSymbol(value: any): boolean {
|
|
320
|
-
return typeof value === "symbol";
|
|
321
|
-
}
|
|
322
|
-
|
|
323
96
|
/**
|
|
324
97
|
* Checks if the type of the value is a normal plain object (not a null or data)
|
|
325
98
|
* @param value
|
|
@@ -329,7 +102,7 @@ export function isPlainObject(value: any): boolean {
|
|
|
329
102
|
|
|
330
103
|
if (value && typeof value === "object") {
|
|
331
104
|
// Inlining _objGetPrototypeOf for performance to avoid an additional function call
|
|
332
|
-
let proto =
|
|
105
|
+
let proto = _getObjProto(value);
|
|
333
106
|
if (!proto) {
|
|
334
107
|
// No prototype found so this is a plain Object eg. 'Object.create(null)'
|
|
335
108
|
result = true;
|
|
@@ -350,285 +123,10 @@ export function isPlainObject(value: any): boolean {
|
|
|
350
123
|
* Convert a date to I.S.O. format in IE8
|
|
351
124
|
*/
|
|
352
125
|
export function toISOString(date: Date) {
|
|
353
|
-
|
|
354
|
-
// For Performance try and use the native instance, using string lookup of the function to easily pass the ES3 build checks and minification
|
|
355
|
-
return _dataToISOString ? date[strToISOString]() : _toISOStringPoly(date);
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* Convert a date to I.S.O. format in IE8
|
|
361
|
-
*/
|
|
362
|
-
export function _toISOStringPoly(date: Date) {
|
|
363
|
-
if (date && date.getUTCFullYear) {
|
|
364
|
-
const pad = (num: number) => {
|
|
365
|
-
let r = String(num);
|
|
366
|
-
if (r.length === 1) {
|
|
367
|
-
r = "0" + r;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
return r;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
return date.getUTCFullYear()
|
|
374
|
-
+ "-" + pad(date.getUTCMonth() + 1)
|
|
375
|
-
+ "-" + pad(date.getUTCDate())
|
|
376
|
-
+ "T" + pad(date.getUTCHours())
|
|
377
|
-
+ ":" + pad(date.getUTCMinutes())
|
|
378
|
-
+ ":" + pad(date.getUTCSeconds())
|
|
379
|
-
+ "." + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)
|
|
380
|
-
+ "Z";
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
386
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
387
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
388
|
-
* cause a testing requirement to test with and without the implementations
|
|
389
|
-
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. It can return -1 to break out of the loop
|
|
390
|
-
* @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
391
|
-
*/
|
|
392
|
-
export function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => undefined | void | number, thisArg?: any): void {
|
|
393
|
-
let len = arr.length;
|
|
394
|
-
try {
|
|
395
|
-
for (let idx = 0; idx < len; idx++) {
|
|
396
|
-
if (idx in arr) {
|
|
397
|
-
if (callbackfn.call(thisArg || arr, arr[idx], idx, arr) === -1) {
|
|
398
|
-
break;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
} catch (e) {
|
|
403
|
-
// This can happen with some native browser objects, but should not happen for the type we are checking for
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
409
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
410
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
411
|
-
* cause a testing requirement to test with and without the implementations
|
|
412
|
-
* @param searchElement The value to locate in the array.
|
|
413
|
-
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
|
|
414
|
-
*/
|
|
415
|
-
export function arrIndexOf<T>(arr: T[], searchElement: T, fromIndex?: number): number {
|
|
416
|
-
if (arr) {
|
|
417
|
-
// For Performance try and use the native instance, using string lookup of the function to easily pass the ES3 build checks and minification
|
|
418
|
-
if (arr[strIndexOf]) {
|
|
419
|
-
return arr[strIndexOf](searchElement, fromIndex);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
let len = arr.length;
|
|
423
|
-
let from = fromIndex || 0;
|
|
424
|
-
try {
|
|
425
|
-
for (let lp = Math.max(from >= 0 ? from : len - Math.abs(from), 0); lp < len; lp++) {
|
|
426
|
-
if (lp in arr && arr[lp] === searchElement) {
|
|
427
|
-
return lp;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
} catch (e) {
|
|
431
|
-
// This can happen with some native browser objects, but should not happen for the type we are checking for
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
return -1;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
* Calls a defined callback function on each element of an array, and returns an array that contains the results. This helper exists
|
|
440
|
-
* to avoid adding a polyfil for older browsers that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page
|
|
441
|
-
* checks for presence/absence of the prototype implementation. Note: For consistency this will not use the Array.prototype.xxxx
|
|
442
|
-
* implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
443
|
-
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
|
444
|
-
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
445
|
-
*/
|
|
446
|
-
export function arrMap<T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any): R[] {
|
|
447
|
-
let results: R[];
|
|
448
|
-
|
|
449
|
-
if (arr) {
|
|
450
|
-
// For Performance try and use the native instance, using string lookup of the function to easily pass the ES3 build checks and minification
|
|
451
|
-
if (arr[strMap]) {
|
|
452
|
-
return arr[strMap](callbackfn, thisArg);
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
let len = arr.length;
|
|
456
|
-
let _this = thisArg || arr;
|
|
457
|
-
results = new Array(len);
|
|
458
|
-
|
|
459
|
-
try {
|
|
460
|
-
for (let lp = 0; lp < len; lp++) {
|
|
461
|
-
if (lp in arr) {
|
|
462
|
-
results[lp] = callbackfn.call(_this, arr[lp], arr);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
} catch (e) {
|
|
466
|
-
// This can happen with some native browser objects, but should not happen for the type we are checking for
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
return results;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
/**
|
|
475
|
-
* Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is
|
|
476
|
-
* provided as an argument in the next call to the callback function. This helper exists to avoid adding a polyfil for older browsers that do not define
|
|
477
|
-
* Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype implementation. Note: For consistency
|
|
478
|
-
* this will not use the Array.prototype.xxxx implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
479
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
|
480
|
-
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
481
|
-
*/
|
|
482
|
-
export function arrReduce<T, R>(arr: T[], callbackfn: (previousValue: T | R, currentValue?: T, currentIndex?: number, array?: T[]) => R, initialValue?: R): R {
|
|
483
|
-
let value;
|
|
484
|
-
|
|
485
|
-
if (arr) {
|
|
486
|
-
// For Performance try and use the native instance, using string lookup of the function to easily pass the ES3 build checks and minification
|
|
487
|
-
if (arr[strReduce]) {
|
|
488
|
-
return arr[strReduce]<R>(callbackfn, initialValue);
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
let len = arr.length;
|
|
492
|
-
let lp = 0;
|
|
493
|
-
|
|
494
|
-
// Specifically checking the number of passed arguments as the value could be anything
|
|
495
|
-
if (arguments.length >= 3) {
|
|
496
|
-
value = arguments[2];
|
|
497
|
-
} else {
|
|
498
|
-
while (lp < len && !(lp in arr)) {
|
|
499
|
-
lp++;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
value = arr[lp++];
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
while (lp < len) {
|
|
506
|
-
if (lp in arr) {
|
|
507
|
-
value = callbackfn(value, arr[lp], lp, arr);
|
|
508
|
-
}
|
|
509
|
-
lp++;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
return value;
|
|
126
|
+
return _dateToISOString.call(date);
|
|
514
127
|
}
|
|
515
128
|
|
|
516
|
-
|
|
517
|
-
* helper method to trim strings (IE8 does not implement String.prototype.trim)
|
|
518
|
-
*/
|
|
519
|
-
export function strTrim(str: any): string {
|
|
520
|
-
if (str) {
|
|
521
|
-
// For Performance try and use the native instance, using string lookup of the function to easily pass the ES3 build checks and minification
|
|
522
|
-
str = (_strTrim && str[cStrTrim]) ? str[cStrTrim]() : (str.replace ? str.replace(/^\s+|\s+$/g, STR_EMPTY) : str);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
return str;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
let _objKeysHasDontEnumBug = !({ toString: null }).propertyIsEnumerable("toString");
|
|
529
|
-
let _objKeysDontEnums = [
|
|
530
|
-
"toString",
|
|
531
|
-
"toLocaleString",
|
|
532
|
-
"valueOf",
|
|
533
|
-
"hasOwnProperty",
|
|
534
|
-
"isPrototypeOf",
|
|
535
|
-
"propertyIsEnumerable",
|
|
536
|
-
"constructor"
|
|
537
|
-
];
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers
|
|
541
|
-
* that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
|
|
542
|
-
* Note: For consistency this will not use the Object.keys implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
543
|
-
* @param obj Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
544
|
-
*/
|
|
545
|
-
export function objKeys(obj: {}): string[] {
|
|
546
|
-
var objType = typeof obj;
|
|
547
|
-
|
|
548
|
-
if (objType !== strShimFunction && (objType !== strShimObject || obj === null)) {
|
|
549
|
-
throwTypeError("objKeys called on non-object");
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
// For Performance try and use the native instance, using string lookup of the function to easily pass the ES3 build checks and minification
|
|
553
|
-
if (!_objKeysHasDontEnumBug && _objKeys) {
|
|
554
|
-
return _objKeys(obj);
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
let result: string[] = [];
|
|
558
|
-
|
|
559
|
-
for (let prop in obj) {
|
|
560
|
-
if (obj && ObjHasOwnProperty.call(obj, prop)) {
|
|
561
|
-
result.push(prop);
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
if (_objKeysHasDontEnumBug) {
|
|
566
|
-
let dontEnumsLength = _objKeysDontEnums.length;
|
|
567
|
-
|
|
568
|
-
for (let lp = 0; lp < dontEnumsLength; lp++) {
|
|
569
|
-
if (obj && ObjHasOwnProperty.call(obj, _objKeysDontEnums[lp])) {
|
|
570
|
-
result.push(_objKeysDontEnums[lp]);
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
return result;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with
|
|
580
|
-
* existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded
|
|
581
|
-
* and executed in an ES3 container, providing basic IE8 compatibility.
|
|
582
|
-
* @param target The object on which to define the property.
|
|
583
|
-
* @param prop The name of the property to be defined or modified.
|
|
584
|
-
* @param getProp The getter function to wire against the getter.
|
|
585
|
-
* @param setProp The setter function to wire against the setter.
|
|
586
|
-
* @returns True if it was able to create the accessors otherwise false
|
|
587
|
-
*/
|
|
588
|
-
export function objDefineAccessors<T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void): boolean {
|
|
589
|
-
if (_objDefineProperty) {
|
|
590
|
-
try {
|
|
591
|
-
let descriptor: PropertyDescriptor = {
|
|
592
|
-
enumerable: true,
|
|
593
|
-
configurable: true
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
if (getProp) {
|
|
597
|
-
descriptor.get = getProp;
|
|
598
|
-
}
|
|
599
|
-
if (setProp) {
|
|
600
|
-
descriptor.set = setProp;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
_objDefineProperty(target, prop, descriptor);
|
|
604
|
-
return true;
|
|
605
|
-
} catch (e) {
|
|
606
|
-
// IE8 Defines a defineProperty on Object but it's only supported for DOM elements so it will throw
|
|
607
|
-
// We will just ignore this here.
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
return false;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
function _doNothing<T>(value: T): T {
|
|
615
|
-
return value;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
export function deepFreeze<T>(obj: T): T {
|
|
619
|
-
if (_objFreeze) {
|
|
620
|
-
objForEachKey(obj, (name, value) => {
|
|
621
|
-
if (isArray(value) || isObject(value)) {
|
|
622
|
-
_objFreeze(value);
|
|
623
|
-
}
|
|
624
|
-
});
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
return objFreeze(obj);
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
export const objFreeze: <T>(value: T) => T = _objFreeze || _doNothing;
|
|
631
|
-
export const objSeal: <T>(value: T) => T = _objSeal || _doNothing;
|
|
129
|
+
export const deepFreeze: <T>(obj: T) => T = objDeepFreeze;
|
|
632
130
|
|
|
633
131
|
/**
|
|
634
132
|
* Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
|
|
@@ -706,18 +204,6 @@ export function getCfgValue<V>(theValue: V, defaultValue?: V): V {
|
|
|
706
204
|
return !isNullOrUndefined(theValue) ? theValue : defaultValue;
|
|
707
205
|
}
|
|
708
206
|
|
|
709
|
-
export function isNotTruthy(value: any) {
|
|
710
|
-
return !value;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
export function isTruthy(value: any) {
|
|
714
|
-
return !!value;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
export function throwError(message: string): never {
|
|
718
|
-
throw new Error(message);
|
|
719
|
-
}
|
|
720
|
-
|
|
721
207
|
function _createProxyFunction<S>(source: S | (() => S), funcName: (keyof S)) {
|
|
722
208
|
let srcFunc: () => S = null;
|
|
723
209
|
let src: S = null;
|
|
@@ -767,7 +253,7 @@ export function proxyAssign<T, S>(target: T, source: S, chkSet?: (name: string,
|
|
|
767
253
|
target[field as string] = _createProxyFunction(source, field);
|
|
768
254
|
}
|
|
769
255
|
} else if (!chkSet || chkSet(field, false, source, target)) {
|
|
770
|
-
if (
|
|
256
|
+
if (objHasOwnProperty(target, field)) {
|
|
771
257
|
// Remove any previous instance property
|
|
772
258
|
delete (target as any)[field];
|
|
773
259
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
4
|
import { strShimFunction, strShimPrototype } from "@microsoft/applicationinsights-shims";
|
|
5
|
+
import { getInst, objHasOwnProperty } from "@nevware21/ts-utils";
|
|
5
6
|
import {
|
|
6
7
|
IInstrumentCallDetails, IInstrumentHook, IInstrumentHooks, IInstrumentHooksCallbacks, InstrumentorHooksCallback
|
|
7
8
|
} from "../JavaScriptSDK.Interfaces/IInstrumentHooks";
|
|
8
|
-
import {
|
|
9
|
-
import { _getObjProto, hasOwnProperty } from "./HelperFuncs";
|
|
9
|
+
import { _getObjProto } from "./HelperFuncs";
|
|
10
10
|
|
|
11
11
|
const aiInstrumentHooks = "_aiHooks";
|
|
12
12
|
|
|
@@ -88,7 +88,7 @@ function _createFunctionHook(aiHook:IInstrumentHooks) {
|
|
|
88
88
|
|
|
89
89
|
let hookCtx: any[] = [];
|
|
90
90
|
let cbArgs = _createArgs([funcArgs], orgArgs);
|
|
91
|
-
funcArgs.evt =
|
|
91
|
+
funcArgs.evt = getInst("event");
|
|
92
92
|
|
|
93
93
|
function _createArgs(target:any[], theArgs:any[]): any[] {
|
|
94
94
|
_arrLoop((theArgs as any), (arg) => {
|
|
@@ -134,7 +134,7 @@ function _createFunctionHook(aiHook:IInstrumentHooks) {
|
|
|
134
134
|
function _getOwner(target:any, name:string, checkPrototype: boolean): any {
|
|
135
135
|
let owner = null;
|
|
136
136
|
if (target) {
|
|
137
|
-
if (
|
|
137
|
+
if (objHasOwnProperty(target, name)) {
|
|
138
138
|
owner = target;
|
|
139
139
|
} else if (checkPrototype) {
|
|
140
140
|
owner = _getOwner(_getObjProto(target), name, false);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
//
|
|
5
|
-
// Note: DON'T Export these const from the package as we are still targeting
|
|
6
|
-
//
|
|
4
|
+
// ###################################################################################################################################################
|
|
5
|
+
// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###
|
|
6
|
+
// ###################################################################################################################################################
|
|
7
7
|
|
|
8
8
|
export const STR_EMPTY = "";
|
|
9
9
|
export const STR_CHANNELS = "channels";
|