@microsoft/applicationinsights-common 3.3.7-nightly3.2504-10 → 3.3.7-nightly3.2504-11

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 (97) hide show
  1. package/browser/es5/applicationinsights-common.cjs.js +272 -114
  2. package/browser/es5/applicationinsights-common.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-common.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-common.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-common.gbl.js +274 -116
  6. package/browser/es5/applicationinsights-common.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-common.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-common.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-common.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-common.js +274 -116
  11. package/browser/es5/applicationinsights-common.js.map +1 -1
  12. package/browser/es5/applicationinsights-common.min.js +2 -2
  13. package/browser/es5/applicationinsights-common.min.js.map +1 -1
  14. package/dist/es5/applicationinsights-common.js +272 -114
  15. package/dist/es5/applicationinsights-common.js.map +1 -1
  16. package/dist/es5/applicationinsights-common.min.js +2 -2
  17. package/dist/es5/applicationinsights-common.min.js.map +1 -1
  18. package/dist-es5/ConnectionStringParser.js +1 -1
  19. package/dist-es5/Constants.js +1 -1
  20. package/dist-es5/DomHelperFuncs.js +1 -1
  21. package/dist-es5/Enums.js +1 -1
  22. package/dist-es5/HelperFuncs.js +1 -1
  23. package/dist-es5/Interfaces/ConnectionString.js +1 -1
  24. package/dist-es5/Interfaces/Context/IApplication.js +1 -1
  25. package/dist-es5/Interfaces/Context/IDevice.js +1 -1
  26. package/dist-es5/Interfaces/Context/IInternal.js +1 -1
  27. package/dist-es5/Interfaces/Context/ILocation.js +1 -1
  28. package/dist-es5/Interfaces/Context/IOperatingSystem.js +1 -1
  29. package/dist-es5/Interfaces/Context/ISample.js +1 -1
  30. package/dist-es5/Interfaces/Context/ISession.js +1 -1
  31. package/dist-es5/Interfaces/Context/ISessionManager.js +1 -1
  32. package/dist-es5/Interfaces/Context/ITelemetryTrace.js +1 -1
  33. package/dist-es5/Interfaces/Context/IUser.js +1 -1
  34. package/dist-es5/Interfaces/Context/IWeb.js +1 -1
  35. package/dist-es5/Interfaces/Contracts/AvailabilityData.js +1 -1
  36. package/dist-es5/Interfaces/Contracts/ContextTagKeys.js +1 -1
  37. package/dist-es5/Interfaces/Contracts/DataPointType.js +1 -1
  38. package/dist-es5/Interfaces/Contracts/DependencyKind.js +1 -1
  39. package/dist-es5/Interfaces/Contracts/DependencySourceType.js +1 -1
  40. package/dist-es5/Interfaces/Contracts/IBase.js +1 -1
  41. package/dist-es5/Interfaces/Contracts/IData.js +1 -1
  42. package/dist-es5/Interfaces/Contracts/IDataPoint.js +1 -1
  43. package/dist-es5/Interfaces/Contracts/IDomain.js +1 -1
  44. package/dist-es5/Interfaces/Contracts/IEnvelope.js +1 -1
  45. package/dist-es5/Interfaces/Contracts/IEventData.js +1 -1
  46. package/dist-es5/Interfaces/Contracts/IExceptionData.js +1 -1
  47. package/dist-es5/Interfaces/Contracts/IExceptionDetails.js +1 -1
  48. package/dist-es5/Interfaces/Contracts/IMessageData.js +1 -1
  49. package/dist-es5/Interfaces/Contracts/IMetricData.js +1 -1
  50. package/dist-es5/Interfaces/Contracts/IPageViewData.js +1 -1
  51. package/dist-es5/Interfaces/Contracts/IPageViewPerfData.js +1 -1
  52. package/dist-es5/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
  53. package/dist-es5/Interfaces/Contracts/IStackFrame.js +1 -1
  54. package/dist-es5/Interfaces/Contracts/RequestData.js +1 -1
  55. package/dist-es5/Interfaces/Contracts/SeverityLevel.js +1 -1
  56. package/dist-es5/Interfaces/IAppInsights.js +1 -1
  57. package/dist-es5/Interfaces/IConfig.js +1 -1
  58. package/dist-es5/Interfaces/ICorrelationConfig.js +1 -1
  59. package/dist-es5/Interfaces/IDependencyTelemetry.js +1 -1
  60. package/dist-es5/Interfaces/IEventTelemetry.js +1 -1
  61. package/dist-es5/Interfaces/IExceptionTelemetry.js +1 -1
  62. package/dist-es5/Interfaces/IMetricTelemetry.js +1 -1
  63. package/dist-es5/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  64. package/dist-es5/Interfaces/IPageViewTelemetry.js +1 -1
  65. package/dist-es5/Interfaces/IPartC.js +1 -1
  66. package/dist-es5/Interfaces/IPropertiesPlugin.js +1 -1
  67. package/dist-es5/Interfaces/IRequestContext.js +1 -1
  68. package/dist-es5/Interfaces/IStorageBuffer.js +1 -1
  69. package/dist-es5/Interfaces/ITelemetryContext.js +1 -1
  70. package/dist-es5/Interfaces/IThrottleMgr.js +1 -1
  71. package/dist-es5/Interfaces/ITraceTelemetry.js +1 -1
  72. package/dist-es5/Interfaces/PartAExtensions.js +1 -1
  73. package/dist-es5/Interfaces/Telemetry/IEnvelope.js +1 -1
  74. package/dist-es5/Interfaces/Telemetry/ISerializable.js +1 -1
  75. package/dist-es5/Offline.js +1 -1
  76. package/dist-es5/RequestResponseHeaders.js +1 -1
  77. package/dist-es5/StorageHelperFuncs.js +1 -1
  78. package/dist-es5/Telemetry/Common/Data.js +1 -1
  79. package/dist-es5/Telemetry/Common/DataPoint.js +1 -1
  80. package/dist-es5/Telemetry/Common/DataSanitizer.js +1 -1
  81. package/dist-es5/Telemetry/Common/Envelope.js +1 -1
  82. package/dist-es5/Telemetry/Event.js +1 -1
  83. package/dist-es5/Telemetry/Exception.js +1 -1
  84. package/dist-es5/Telemetry/Metric.js +1 -1
  85. package/dist-es5/Telemetry/PageView.js +1 -1
  86. package/dist-es5/Telemetry/PageViewPerformance.js +1 -1
  87. package/dist-es5/Telemetry/RemoteDependencyData.js +1 -1
  88. package/dist-es5/Telemetry/Trace.js +1 -1
  89. package/dist-es5/TelemetryItemCreator.js +1 -1
  90. package/dist-es5/ThrottleMgr.js +1 -1
  91. package/dist-es5/UrlHelperFuncs.js +1 -1
  92. package/dist-es5/Util.js +1 -1
  93. package/dist-es5/__DynamicConstants.js +1 -1
  94. package/dist-es5/applicationinsights-common.js +1 -1
  95. package/package.json +2 -2
  96. package/types/applicationinsights-common.d.ts +1 -1
  97. package/types/applicationinsights-common.namespaced.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Common, 3.3.7-nightly3.2504-10
2
+ * Application Insights JavaScript SDK - Common, 3.3.7-nightly3.2504-11
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  'use strict';
6
6
 
7
7
 
8
- /*! https://github.com/nevware21/ts-utils v0.11.8 */
8
+ /*! https://github.com/nevware21/ts-utils v0.12.1 */
9
9
  /*#__NO_SIDE_EFFECTS__*/
10
10
  function _pureAssign(func1, func2) {
11
11
  return func1 || func2;
@@ -24,11 +24,12 @@ var __PROTO__ = "__proto__";
24
24
  var UNDEFINED = "undefined";
25
25
  var CONSTRUCTOR = "constructor";
26
26
  var SYMBOL = "Symbol";
27
- var POLYFILL_TAG = "_polyfill";
28
27
  var LENGTH = "length";
29
28
  var NAME = "name";
30
29
  var CALL = "call";
31
30
  var TO_STRING = "toString";
31
+ var GETTER_NAME = "__lookupGetter__";
32
+ var SETTER_NAME = "__lookupSetter__";
32
33
  var ObjClass$1 = ( /*#__PURE__*/_pureAssign(Object));
33
34
  var ObjProto$1 = ( /*#__PURE__*/_pureRef(ObjClass$1, PROTOTYPE));
34
35
  var StrCls = ( /*#__PURE__*/_pureAssign(String));
@@ -37,6 +38,8 @@ var MathCls = ( /*#__PURE__*/_pureAssign(Math));
37
38
  var ArrCls = ( /*#__PURE__*/_pureAssign(Array));
38
39
  var ArrProto = ( /*#__PURE__*/_pureRef(ArrCls, PROTOTYPE));
39
40
  var ArrSlice = ( /*#__PURE__*/_pureRef(ArrProto, "slice"));
41
+ var POLYFILL_TAG = "_polyfill";
42
+ var POLYFILL_TYPE_NAME = "__nw21$polytype__";
40
43
  function safe(func, argArray) {
41
44
  try {
42
45
  return {
@@ -70,13 +73,17 @@ function isUndefined(value) {
70
73
  }
71
74
  /*#__NO_SIDE_EFFECTS__*/
72
75
  function isStrictUndefined(arg) {
73
- return !isDefined(arg);
76
+ return arg === UNDEF_VALUE;
74
77
  }
75
78
  /*#__NO_SIDE_EFFECTS__*/
76
79
  function isNullOrUndefined(value) {
77
80
  return value === NULL_VALUE || isUndefined(value);
78
81
  }
79
82
  /*#__NO_SIDE_EFFECTS__*/
83
+ function isStrictNullOrUndefined(value) {
84
+ return value === NULL_VALUE || value === UNDEF_VALUE;
85
+ }
86
+ /*#__NO_SIDE_EFFECTS__*/
80
87
  function isDefined(arg) {
81
88
  return !!arg || arg !== UNDEF_VALUE;
82
89
  }
@@ -90,19 +97,129 @@ function isObject(value) {
90
97
  return !!value && typeof value === OBJECT;
91
98
  }
92
99
  var isArray = ( /* #__PURE__*/_pureRef(ArrCls, "isArray"));
100
+ var isNumber = ( /*#__PURE__*/_createIs("number"));
93
101
  var isError = ( /*#__PURE__*/_createObjIs("Error"));
94
- var objGetOwnPropertyDescriptor = ( /* #__PURE__ */_pureRef(ObjClass$1, "getOwnPropertyDescriptor"));
102
+ var asString = ( /* #__PURE__ */_pureAssign(StrCls));
103
+ var ERROR_TYPE = "[object Error]";
104
+ /*#__NO_SIDE_EFFECTS__*/
105
+ function dumpObj(object, format) {
106
+ var propertyValueDump = EMPTY;
107
+ var objType = ObjProto$1[TO_STRING][CALL](object);
108
+ if (objType === ERROR_TYPE) {
109
+ object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
110
+ }
111
+ try {
112
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
113
+ propertyValueDump = (propertyValueDump ? propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ") : NULL_VALUE) || asString(object);
114
+ }
115
+ catch (e) {
116
+ propertyValueDump = " - " + dumpObj(e, format);
117
+ }
118
+ return objType + ": " + propertyValueDump;
119
+ }
120
+ function throwError(message) {
121
+ throw new Error(message);
122
+ }
123
+ function throwTypeError(message) {
124
+ throw new TypeError(message);
125
+ }
126
+ function _throwIfNullOrUndefined(obj) {
127
+ if (isStrictNullOrUndefined(obj)) {
128
+ throwTypeError("Cannot convert undefined or null to object");
129
+ }
130
+ }
131
+ function _throwIfNotString(value) {
132
+ if (!isString(value)) {
133
+ throwTypeError("'" + dumpObj(value) + "' is not a string");
134
+ }
135
+ }
95
136
  /*#__NO_SIDE_EFFECTS__*/
96
137
  function objHasOwnProperty(obj, prop) {
97
138
  return !!obj && ObjProto$1.hasOwnProperty[CALL](obj, prop);
98
139
  }
99
- var objHasOwn = ( /*#__PURE__*/_pureAssign(( /* #__PURE__ */_pureRef(ObjClass$1, "hasOwn")), polyObjHasOwn));
140
+ var _unwrapFunction = ( _unwrapFunctionWithPoly);
141
+ /*#__NO_SIDE_EFFECTS__*/
142
+ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
143
+ var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
144
+ return function (thisArg) {
145
+ var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;
146
+ if (theFunc || polyFunc) {
147
+ var theArgs = arguments;
148
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
149
+ }
150
+ throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
151
+ };
152
+ }
153
+ function _objPropertyIsEnum(obj, propKey) {
154
+ var desc;
155
+ var fn = ObjClass$1.getOwnPropertyDescriptor;
156
+ if (!isStrictNullOrUndefined(obj) && fn) {
157
+ desc = safe(fn, [obj, propKey]).v || NULL_VALUE;
158
+ }
159
+ if (!desc) {
160
+ desc = safe(function () {
161
+ for (var key in obj) {
162
+ if (key === propKey) {
163
+ return { enumerable: true };
164
+ }
165
+ }
166
+ }).v;
167
+ }
168
+ return (desc && desc.enumerable) || false;
169
+ }
170
+ var objPropertyIsEnumerable = ( /*#__PURE__*/_unwrapFunctionWithPoly("propertyIsEnumerable", NULL_VALUE, _objPropertyIsEnum));
171
+ function _isPropertyWritable(obj, prop) {
172
+ var result = false;
173
+ if (!(isString(obj) && (prop === LENGTH || isNumber(prop) || (isString(prop) && !isNaN(Number(prop)))))) {
174
+ var originalValue = obj[prop];
175
+ try {
176
+ obj[prop] = originalValue;
177
+ result = true;
178
+ }
179
+ catch (e) {
180
+ }
181
+ }
182
+ return result;
183
+ }
184
+ function polyObjGetOwnPropertyDescriptor(obj, prop) {
185
+ var descriptor;
186
+ _throwIfNullOrUndefined(obj);
187
+ var isLength = (prop === LENGTH && (isArray(obj) || isString(obj)));
188
+ if (isLength || objHasOwnProperty(obj, prop)) {
189
+ descriptor = {
190
+ configurable: !isLength,
191
+ enumerable: !isLength ? objPropertyIsEnumerable(obj, prop) : false
192
+ };
193
+ var isData = true;
194
+ if (GETTER_NAME in ObjProto$1 && SETTER_NAME in ObjProto$1) {
195
+ var getter = obj[GETTER_NAME](prop);
196
+ var setter = obj[SETTER_NAME](prop);
197
+ if (getter || setter) {
198
+ isData = false;
199
+ if (getter) {
200
+ descriptor.get = getter;
201
+ }
202
+ if (setter) {
203
+ descriptor.set = setter;
204
+ }
205
+ }
206
+ }
207
+ if (isData) {
208
+ descriptor.value = obj[prop];
209
+ descriptor.writable = _isPropertyWritable(obj, prop);
210
+ }
211
+ }
212
+ return descriptor;
213
+ }
214
+ var objGetOwnPropertyDescriptor = ( /* #__PURE__ */_pureAssign(( /* #__PURE__ */_pureRef(ObjClass$1, "getOwnPropertyDescriptor")), polyObjGetOwnPropertyDescriptor));
100
215
  /*#__NO_SIDE_EFFECTS__*/
101
216
  function polyObjHasOwn(obj, prop) {
217
+ _throwIfNullOrUndefined(obj);
102
218
  return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
103
219
  }
220
+ var objHasOwn = ( /*#__PURE__*/_pureAssign(( /* #__PURE__ */_pureRef(ObjClass$1, "hasOwn")), polyObjHasOwn));
104
221
  function objForEachKey(theObject, callbackfn, thisArg) {
105
- if (theObject && isObject(theObject)) {
222
+ if (theObject && (isObject(theObject) || isFunction(theObject))) {
106
223
  for (var prop in theObject) {
107
224
  if (objHasOwn(theObject, prop)) {
108
225
  if (callbackfn[CALL](thisArg || theObject, prop, theObject[prop]) === -1) {
@@ -112,6 +229,18 @@ function objForEachKey(theObject, callbackfn, thisArg) {
112
229
  }
113
230
  }
114
231
  }
232
+ function arrForEach(theArray, callbackfn, thisArg) {
233
+ if (theArray) {
234
+ var len = theArray[LENGTH] >>> 0;
235
+ for (var idx = 0; idx < len; idx++) {
236
+ if (idx in theArray) {
237
+ if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
238
+ break;
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
115
244
  var propMap = {
116
245
  e: "enumerable",
117
246
  c: "configurable",
@@ -140,6 +269,7 @@ function _createProp(value) {
140
269
  return prop;
141
270
  }
142
271
  var objDefineProp = ( /*#__PURE__*/_pureRef(ObjClass$1, "defineProperty"));
272
+ var objDefineProperties = ( /*#__PURE__*/_pureRef(ObjClass$1, "defineProperties"));
143
273
  function objDefine(target, key, propDesc) {
144
274
  return objDefineProp(target, key, _createProp(propDesc));
145
275
  }
@@ -159,36 +289,13 @@ function _assignMapValue(theMap, key, value, writable) {
159
289
  writable: false
160
290
  });
161
291
  }
162
- var asString = ( /* #__PURE__ */_pureAssign(StrCls));
163
- var ERROR_TYPE = "[object Error]";
164
- /*#__NO_SIDE_EFFECTS__*/
165
- function dumpObj(object, format) {
166
- var propertyValueDump = EMPTY;
167
- var objType = ObjProto$1[TO_STRING][CALL](object);
168
- if (objType === ERROR_TYPE) {
169
- object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
170
- }
171
- try {
172
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
173
- propertyValueDump = (propertyValueDump ? propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ") : NULL_VALUE) || asString(object);
174
- }
175
- catch (e) {
176
- propertyValueDump = " - " + dumpObj(e, format);
177
- }
178
- return objType + ": " + propertyValueDump;
179
- }
180
- function throwError(message) {
181
- throw new Error(message);
182
- }
183
- function throwTypeError(message) {
184
- throw new TypeError(message);
185
- }
186
292
  var _objFreeze = ( /* #__PURE__ */_pureRef(ObjClass$1, "freeze"));
187
293
  function _doNothing(value) {
188
294
  return value;
189
295
  }
190
296
  /*#__NO_SIDE_EFFECTS__*/
191
297
  function _getProto(value) {
298
+ _throwIfNullOrUndefined(value);
192
299
  return value[__PROTO__] || NULL_VALUE;
193
300
  }
194
301
  var objAssign = ( /*#__PURE__*/_pureRef(ObjClass$1, "assign"));
@@ -239,19 +346,6 @@ function _getGlobalConfig() {
239
346
  }
240
347
  return _globalCfg;
241
348
  }
242
- var _unwrapFunction = ( _unwrapFunctionWithPoly);
243
- /*#__NO_SIDE_EFFECTS__*/
244
- function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
245
- var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
246
- return function (thisArg) {
247
- var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;
248
- if (theFunc || polyFunc) {
249
- var theArgs = arguments;
250
- return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
251
- }
252
- throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
253
- };
254
- }
255
349
  var mathMin = ( /*#__PURE__*/_pureRef(MathCls, "min"));
256
350
  var mathMax = ( /*#__PURE__*/_pureRef(MathCls, "max"));
257
351
  var strSlice = ( /*#__PURE__*/_unwrapFunction("slice", StrProto));
@@ -259,9 +353,7 @@ var strSubstring = ( /*#__PURE__*/_unwrapFunction("substring", StrProto));
259
353
  var strSubstr = ( /*#__PURE__*/_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
260
354
  /*#__NO_SIDE_EFFECTS__*/
261
355
  function polyStrSubstr(value, start, length) {
262
- if (isNullOrUndefined(value)) {
263
- throwTypeError("Invalid " + dumpObj(value));
264
- }
356
+ _throwIfNullOrUndefined(value);
265
357
  if (length < 0) {
266
358
  return EMPTY;
267
359
  }
@@ -278,8 +370,109 @@ function polyStrSubstr(value, start, length) {
278
370
  function strLeft(value, count) {
279
371
  return strSubstring(value, 0, count);
280
372
  }
373
+ function _tagAsPolyfill(target, polyfillTypeName) {
374
+ if (target) {
375
+ safe(function () {
376
+ target[POLYFILL_TAG] = true;
377
+ target[POLYFILL_TYPE_NAME] = polyfillTypeName;
378
+ });
379
+ safe(objDefine, [target, POLYFILL_TAG, {
380
+ v: true,
381
+ w: false,
382
+ e: false
383
+ }]);
384
+ safe(objDefine, [target, POLYFILL_TYPE_NAME, {
385
+ v: polyfillTypeName,
386
+ w: false,
387
+ e: false
388
+ }]);
389
+ }
390
+ return target;
391
+ }
392
+ /*#__NO_SIDE_EFFECTS__*/
393
+ function createCachedValue(value) {
394
+ return objDefineProp({
395
+ toJSON: function () { return value; }
396
+ }, "v", { value: value });
397
+ }
398
+ var _isProtoArray;
399
+ var objSetPrototypeOf = ( /* #__PURE__*/_pureAssign(( /* #__PURE__ */_pureRef(ObjClass$1, "setPrototypeOf")), _polyObjSetPrototypeOf));
400
+ function _polyObjSetPrototypeOf(obj, proto) {
401
+ var _a;
402
+ !_isProtoArray && (_isProtoArray = createCachedValue((_a = {}, _a[__PROTO__] = [], _a) instanceof Array));
403
+ _isProtoArray.v ? obj[__PROTO__] = proto : objForEachKey(proto, function (key, value) { return obj[key] = value; });
404
+ return obj;
405
+ }
406
+ var objCreate = ( /* #__PURE__*/_pureAssign(( /* #__PURE__*/_pureRef(ObjClass$1, "create")), polyObjCreate));
407
+ /*#__NO_SIDE_EFFECTS__*/
408
+ function polyObjCreate(obj, properties) {
409
+ var newObj;
410
+ function tempFunc() { }
411
+ if (!isStrictNullOrUndefined(obj)) {
412
+ var type = typeof obj;
413
+ if (type !== OBJECT && type !== FUNCTION) {
414
+ throwTypeError("Prototype must be an Object or function: " + dumpObj(obj));
415
+ }
416
+ tempFunc[PROTOTYPE] = obj;
417
+ safe(function () {
418
+ tempFunc[__PROTO__] = obj;
419
+ });
420
+ newObj = new tempFunc();
421
+ }
422
+ else {
423
+ newObj = {};
424
+ }
425
+ safe(_polyObjSetPrototypeOf, [newObj, obj]);
426
+ if (properties) {
427
+ safe(objDefineProperties, [newObj, properties]);
428
+ }
429
+ return newObj;
430
+ }
431
+ /*#__NO_SIDE_EFFECTS__*/
432
+ function utcNow() {
433
+ return (Date.now || polyUtcNow)();
434
+ }
435
+ /*#__NO_SIDE_EFFECTS__*/
436
+ function polyUtcNow() {
437
+ return new Date().getTime();
438
+ }
439
+ var _globalLazyTestHooks;
440
+ function _initTestHooks() {
441
+ _globalLazyTestHooks = _getGlobalConfig();
442
+ }
443
+ /*#__NO_SIDE_EFFECTS__*/
444
+ function getLazy(cb) {
445
+ var lazyValue = {};
446
+ !_globalLazyTestHooks && _initTestHooks();
447
+ lazyValue.b = _globalLazyTestHooks.lzy;
448
+ objDefineProp(lazyValue, "v", {
449
+ configurable: true,
450
+ get: function () {
451
+ var result = cb();
452
+ if (!_globalLazyTestHooks.lzy) {
453
+ objDefineProp(lazyValue, "v", {
454
+ value: result
455
+ });
456
+ }
457
+ lazyValue.b = _globalLazyTestHooks.lzy;
458
+ return result;
459
+ }
460
+ });
461
+ return lazyValue;
462
+ }
463
+ var mathRandom = ( /*#__PURE__*/_pureRef(MathCls, "random"));
464
+ var _uniqueInstanceId = ( /*#__PURE__*/getLazy(function () {
465
+ var value = (utcNow().toString(36).slice(2));
466
+ while (value.length < 16) {
467
+ value += mathRandom().toString(36).slice(2);
468
+ }
469
+ value = value.substring(0, 16);
470
+ return value;
471
+ }));
281
472
  var UNIQUE_REGISTRY_ID = "_urid";
473
+ var POLY_SYM = "$nw21sym";
282
474
  var _polySymbols;
475
+ var _polyId = 0;
283
476
  /*#__NO_SIDE_EFFECTS__*/
284
477
  function _globalSymbolRegistry() {
285
478
  if (!_polySymbols) {
@@ -290,12 +483,35 @@ function _globalSymbolRegistry() {
290
483
  }
291
484
  /*#__NO_SIDE_EFFECTS__*/
292
485
  function polyNewSymbol(description) {
293
- var theSymbol = {
294
- description: asString(description),
295
- toString: function () { return SYMBOL + "(" + description + ")"; }
296
- };
297
- theSymbol[POLYFILL_TAG] = true;
298
- return theSymbol;
486
+ var uniqueId = "_" + _polyId++ + "_" + _uniqueInstanceId.v;
487
+ var symString = SYMBOL + "(" + description + ")";
488
+ var theSymbol = objCreate(null);
489
+ objDefine(theSymbol, "description", {
490
+ v: asString(description),
491
+ e: false,
492
+ w: false
493
+ });
494
+ objDefine(theSymbol, TO_STRING, {
495
+ v: function () { return symString + POLY_SYM + uniqueId; },
496
+ e: false,
497
+ w: false
498
+ });
499
+ objDefine(theSymbol, "valueOf", {
500
+ v: function () { return theSymbol; },
501
+ e: false,
502
+ w: false
503
+ });
504
+ objDefine(theSymbol, "v", {
505
+ v: symString,
506
+ e: false,
507
+ w: false
508
+ });
509
+ objDefine(theSymbol, "_uid", {
510
+ v: uniqueId,
511
+ e: false,
512
+ w: false
513
+ });
514
+ return _tagAsPolyfill(theSymbol, "symbol");
299
515
  }
300
516
  /*#__NO_SIDE_EFFECTS__*/
301
517
  function polySymbolFor(key) {
@@ -309,16 +525,6 @@ function polySymbolFor(key) {
309
525
  }
310
526
  return registry.k[key];
311
527
  }
312
- var _globalLazyTestHooks;
313
- function _initTestHooks() {
314
- _globalLazyTestHooks = _getGlobalConfig();
315
- }
316
- /*#__NO_SIDE_EFFECTS__*/
317
- function createCachedValue(value) {
318
- return objDefineProp({
319
- toJSON: function () { return value; }
320
- }, "v", { value: value });
321
- }
322
528
  var WINDOW = "window";
323
529
  var _cachedGlobal;
324
530
  function _getGlobalInstFn(getFn, theArgs) {
@@ -396,45 +602,9 @@ function symbolFor(key) {
396
602
  function fnApply(fn, thisArg, argArray) {
397
603
  return fn.apply(thisArg, argArray);
398
604
  }
399
- function arrForEach(theArray, callbackfn, thisArg) {
400
- if (theArray) {
401
- var len = theArray[LENGTH] >>> 0;
402
- for (var idx = 0; idx < len; idx++) {
403
- if (idx in theArray) {
404
- if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
405
- break;
406
- }
407
- }
408
- }
409
- }
410
- }
411
605
  var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
412
606
  var arrMap = ( /*#__PURE__*/_unwrapFunction("map", ArrProto));
413
607
  var arrReduce = ( /*#__PURE__*/_unwrapFunction("reduce", ArrProto));
414
- var objCreate = ( /* #__PURE__*/_pureAssign(( /* #__PURE__*/_pureRef(ObjClass$1, "create")), polyObjCreate));
415
- /*#__NO_SIDE_EFFECTS__*/
416
- function polyObjCreate(obj) {
417
- if (!obj) {
418
- return {};
419
- }
420
- var type = typeof obj;
421
- if (type !== OBJECT && type !== FUNCTION) {
422
- throwTypeError("Prototype must be an Object or function: " + dumpObj(obj));
423
- }
424
- function tempFunc() { }
425
- tempFunc[PROTOTYPE] = obj;
426
- return new tempFunc();
427
- }
428
- var _isProtoArray;
429
- function objSetPrototypeOf(obj, proto) {
430
- var fn = ObjClass$1["setPrototypeOf"] ||
431
- function (d, b) {
432
- var _a;
433
- !_isProtoArray && (_isProtoArray = createCachedValue((_a = {}, _a[__PROTO__] = [], _a) instanceof Array));
434
- _isProtoArray.v ? d[__PROTO__] = b : objForEachKey(b, function (key, value) { return d[key] = value; });
435
- };
436
- return fn(obj, proto);
437
- }
438
608
  /*#__NO_SIDE_EFFECTS__*/
439
609
  function _createCustomError(name, d, b) {
440
610
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
@@ -476,19 +646,9 @@ function createCustomError(name, constructCb, errorBase) {
476
646
  }, theBaseClass);
477
647
  }
478
648
  /*#__NO_SIDE_EFFECTS__*/
479
- function utcNow() {
480
- return (Date.now || polyUtcNow)();
481
- }
482
- /*#__NO_SIDE_EFFECTS__*/
483
- function polyUtcNow() {
484
- return new Date().getTime();
485
- }
486
- /*#__NO_SIDE_EFFECTS__*/
487
649
  function _createTrimFn(exp) {
488
650
  return function _doTrim(value) {
489
- if (isNullOrUndefined(value)) {
490
- throwTypeError("strTrim called [" + dumpObj(value) + "]");
491
- }
651
+ _throwIfNullOrUndefined(value);
492
652
  if (value && value.replace) {
493
653
  value = value.replace(exp, EMPTY);
494
654
  }
@@ -543,9 +703,7 @@ var mathRound = ( /*#__PURE__*/_pureRef(MathCls, "round"));
543
703
  var strEndsWith = ( /*#__PURE__*/_unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith));
544
704
  /*#__NO_SIDE_EFFECTS__*/
545
705
  function polyStrEndsWith(value, searchString, length) {
546
- if (!isString(value)) {
547
- throwTypeError("'" + dumpObj(value) + "' is not a string");
548
- }
706
+ _throwIfNotString(value);
549
707
  var searchValue = isString(searchString) ? searchString : asString(searchString);
550
708
  var end = (!isUndefined(length) && length < value[LENGTH]) ? length : value[LENGTH];
551
709
  return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
@@ -1179,7 +1337,7 @@ function newId(maxLength) {
1179
1337
  return result;
1180
1338
  }
1181
1339
 
1182
- var version = '3.3.7-nightly3.2504-10';
1340
+ var version = '3.3.7-nightly3.2504-11';
1183
1341
  var instanceName = "." + newId(6);
1184
1342
  var _dataUid = 0;
1185
1343
  function _canAcceptData(target) {