@microsoft/applicationinsights-react-native 4.3.7-nightly.2504-04 → 4.3.7-nightly.2504-05

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.7-nightly.2504-04
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.3.7-nightly.2504-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -18,7 +18,7 @@
18
18
  var strShimPrototype = "prototype";
19
19
  var ObjClass$1 = Object;
20
20
 
21
- /*! https://github.com/nevware21/ts-utils v0.11.8 */
21
+ /*! https://github.com/nevware21/ts-utils v0.12.1 */
22
22
  function _pureAssign(func1, func2) {
23
23
  return func1 || func2;
24
24
  }
@@ -35,11 +35,12 @@
35
35
  var UNDEFINED = "undefined";
36
36
  var CONSTRUCTOR = "constructor";
37
37
  var SYMBOL = "Symbol";
38
- var POLYFILL_TAG = "_polyfill";
39
38
  var LENGTH = "length";
40
39
  var NAME = "name";
41
40
  var CALL = "call";
42
41
  var TO_STRING = "toString";
42
+ var GETTER_NAME = "__lookupGetter__";
43
+ var SETTER_NAME = "__lookupSetter__";
43
44
  var ObjClass = ( _pureAssign(Object));
44
45
  var ObjProto = ( _pureRef(ObjClass, PROTOTYPE));
45
46
  var StrCls = ( _pureAssign(String));
@@ -48,6 +49,9 @@
48
49
  var ArrCls = ( _pureAssign(Array));
49
50
  var ArrProto = ( _pureRef(ArrCls, PROTOTYPE));
50
51
  var ArrSlice = ( _pureRef(ArrProto, "slice"));
52
+ var NumberCls = ( _pureAssign(Number));
53
+ var POLYFILL_TAG = "_polyfill";
54
+ var POLYFILL_TYPE_NAME = "__nw21$polytype__";
51
55
  function safe(func, argArray) {
52
56
  try {
53
57
  return {
@@ -76,13 +80,13 @@
76
80
  return typeof value === UNDEFINED || value === UNDEFINED;
77
81
  }
78
82
  function isStrictUndefined(arg) {
79
- return !isDefined(arg);
83
+ return arg === UNDEF_VALUE;
80
84
  }
81
85
  function isNullOrUndefined(value) {
82
86
  return value === NULL_VALUE || isUndefined(value);
83
87
  }
84
88
  function isStrictNullOrUndefined(value) {
85
- return value === NULL_VALUE || !isDefined(value);
89
+ return value === NULL_VALUE || value === UNDEF_VALUE;
86
90
  }
87
91
  function isDefined(arg) {
88
92
  return !!arg || arg !== UNDEF_VALUE;
@@ -96,21 +100,129 @@
96
100
  return !!value && typeof value === OBJECT;
97
101
  }
98
102
  var isArray = ( _pureRef(ArrCls, "isArray"));
103
+ var isNumber = ( _createIs("number"));
99
104
  var isRegExp = ( _createObjIs("RegExp"));
100
105
  var isError = ( _createObjIs("Error"));
101
106
  function isPromiseLike(value) {
102
107
  return !!(value && value.then && isFunction(value.then));
103
108
  }
104
- var objGetOwnPropertyDescriptor = ( _pureRef(ObjClass, "getOwnPropertyDescriptor"));
109
+ var asString = ( _pureAssign(StrCls));
110
+ var ERROR_TYPE = "[object Error]";
111
+ function dumpObj(object, format) {
112
+ var propertyValueDump = EMPTY;
113
+ var objType = ObjProto[TO_STRING][CALL](object);
114
+ if (objType === ERROR_TYPE) {
115
+ object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
116
+ }
117
+ try {
118
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
119
+ propertyValueDump = (propertyValueDump ? propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ") : NULL_VALUE) || asString(object);
120
+ }
121
+ catch (e) {
122
+ propertyValueDump = " - " + dumpObj(e, format);
123
+ }
124
+ return objType + ": " + propertyValueDump;
125
+ }
126
+ function throwTypeError(message) {
127
+ throw new TypeError(message);
128
+ }
129
+ function throwRangeError(message) {
130
+ throw new RangeError(message);
131
+ }
132
+ function _throwIfNullOrUndefined(obj) {
133
+ if (isStrictNullOrUndefined(obj)) {
134
+ throwTypeError("Cannot convert undefined or null to object");
135
+ }
136
+ }
137
+ function _throwIfNotString(value) {
138
+ if (!isString(value)) {
139
+ throwTypeError("'" + dumpObj(value) + "' is not a string");
140
+ }
141
+ }
105
142
  function objHasOwnProperty(obj, prop) {
106
143
  return !!obj && ObjProto.hasOwnProperty[CALL](obj, prop);
107
144
  }
108
- var objHasOwn = ( _pureAssign(( _pureRef(ObjClass, "hasOwn")), polyObjHasOwn));
145
+ var _unwrapFunction = ( _unwrapFunctionWithPoly);
146
+ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
147
+ var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
148
+ return function (thisArg) {
149
+ var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;
150
+ if (theFunc || polyFunc) {
151
+ var theArgs = arguments;
152
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
153
+ }
154
+ throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
155
+ };
156
+ }
157
+ function _objPropertyIsEnum(obj, propKey) {
158
+ var desc;
159
+ var fn = ObjClass.getOwnPropertyDescriptor;
160
+ if (!isStrictNullOrUndefined(obj) && fn) {
161
+ desc = safe(fn, [obj, propKey]).v || NULL_VALUE;
162
+ }
163
+ if (!desc) {
164
+ desc = safe(function () {
165
+ for (var key in obj) {
166
+ if (key === propKey) {
167
+ return { enumerable: true };
168
+ }
169
+ }
170
+ }).v;
171
+ }
172
+ return (desc && desc.enumerable) || false;
173
+ }
174
+ var objPropertyIsEnumerable = ( _unwrapFunctionWithPoly("propertyIsEnumerable", NULL_VALUE, _objPropertyIsEnum));
175
+ function _isPropertyWritable(obj, prop) {
176
+ var result = false;
177
+ if (!(isString(obj) && (prop === LENGTH || isNumber(prop) || (isString(prop) && !isNaN(Number(prop)))))) {
178
+ var originalValue = obj[prop];
179
+ try {
180
+ obj[prop] = originalValue;
181
+ result = true;
182
+ }
183
+ catch (e) {
184
+ }
185
+ }
186
+ return result;
187
+ }
188
+ function polyObjGetOwnPropertyDescriptor(obj, prop) {
189
+ var descriptor;
190
+ _throwIfNullOrUndefined(obj);
191
+ var isLength = (prop === LENGTH && (isArray(obj) || isString(obj)));
192
+ if (isLength || objHasOwnProperty(obj, prop)) {
193
+ descriptor = {
194
+ configurable: !isLength,
195
+ enumerable: !isLength ? objPropertyIsEnumerable(obj, prop) : false
196
+ };
197
+ var isData = true;
198
+ if (GETTER_NAME in ObjProto && SETTER_NAME in ObjProto) {
199
+ var getter = obj[GETTER_NAME](prop);
200
+ var setter = obj[SETTER_NAME](prop);
201
+ if (getter || setter) {
202
+ isData = false;
203
+ if (getter) {
204
+ descriptor.get = getter;
205
+ }
206
+ if (setter) {
207
+ descriptor.set = setter;
208
+ }
209
+ }
210
+ }
211
+ if (isData) {
212
+ descriptor.value = obj[prop];
213
+ descriptor.writable = _isPropertyWritable(obj, prop);
214
+ }
215
+ }
216
+ return descriptor;
217
+ }
218
+ var objGetOwnPropertyDescriptor = ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyDescriptor")), polyObjGetOwnPropertyDescriptor));
109
219
  function polyObjHasOwn(obj, prop) {
220
+ _throwIfNullOrUndefined(obj);
110
221
  return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
111
222
  }
223
+ var objHasOwn = ( _pureAssign(( _pureRef(ObjClass, "hasOwn")), polyObjHasOwn));
112
224
  function objForEachKey(theObject, callbackfn, thisArg) {
113
- if (theObject && isObject(theObject)) {
225
+ if (theObject && (isObject(theObject) || isFunction(theObject))) {
114
226
  for (var prop in theObject) {
115
227
  if (objHasOwn(theObject, prop)) {
116
228
  if (callbackfn[CALL](thisArg || theObject, prop, theObject[prop]) === -1) {
@@ -120,6 +232,19 @@
120
232
  }
121
233
  }
122
234
  }
235
+ ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertySymbols")), function () { return []; }));
236
+ function arrForEach(theArray, callbackfn, thisArg) {
237
+ if (theArray) {
238
+ var len = theArray[LENGTH] >>> 0;
239
+ for (var idx = 0; idx < len; idx++) {
240
+ if (idx in theArray) {
241
+ if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
242
+ break;
243
+ }
244
+ }
245
+ }
246
+ }
247
+ }
123
248
  var propMap = {
124
249
  e: "enumerable",
125
250
  c: "configurable",
@@ -147,7 +272,7 @@
147
272
  return prop;
148
273
  }
149
274
  var objDefineProp = ( _pureRef(ObjClass, "defineProperty"));
150
- ( _pureRef(ObjClass, "defineProperties"));
275
+ var objDefineProperties = ( _pureRef(ObjClass, "defineProperties"));
151
276
  function objDefine(target, key, propDesc) {
152
277
  return objDefineProp(target, key, _createProp(propDesc));
153
278
  }
@@ -166,59 +291,95 @@
166
291
  writable: false
167
292
  });
168
293
  }
169
- var asString = ( _pureAssign(StrCls));
170
- var ERROR_TYPE = "[object Error]";
171
- function dumpObj(object, format) {
172
- var propertyValueDump = EMPTY;
173
- var objType = ObjProto[TO_STRING][CALL](object);
174
- if (objType === ERROR_TYPE) {
175
- object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
176
- }
177
- try {
178
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
179
- propertyValueDump = (propertyValueDump ? propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ") : NULL_VALUE) || asString(object);
294
+ function polyObjEntries(value) {
295
+ var result = [];
296
+ objForEachKey(value, function (key, value) {
297
+ result.push([key, value]);
298
+ });
299
+ return result;
300
+ }
301
+ function polyObjIs(value1, value2) {
302
+ if (value1 !== value1) {
303
+ return value2 !== value2;
180
304
  }
181
- catch (e) {
182
- propertyValueDump = " - " + dumpObj(e, format);
305
+ if (value1 === 0 && value2 === 0) {
306
+ return 1 / value1 === 1 / value2;
183
307
  }
184
- return objType + ": " + propertyValueDump;
185
- }
186
- function throwTypeError(message) {
187
- throw new TypeError(message);
188
- }
189
- function throwRangeError(message) {
190
- throw new RangeError(message);
308
+ return value1 === value2;
191
309
  }
192
- function polyObjEntries(value) {
310
+ function polyObjValues(value) {
193
311
  var result = [];
194
312
  objForEachKey(value, function (key, value) {
195
- result.push([key, value]);
313
+ result.push(value);
196
314
  });
197
315
  return result;
198
316
  }
317
+ function polyObjIsFrozen(obj) {
318
+ if (isStrictNullOrUndefined(obj) || (!isObject(obj) && !isFunction(obj))) {
319
+ return true;
320
+ }
321
+ if (isFunction(obj)) {
322
+ return false;
323
+ }
324
+ for (var prop in obj) {
325
+ var desc = objGetOwnPropertyDescriptor(obj, prop);
326
+ if (desc && (desc.configurable || (desc.writable !== false && "value" in desc))) {
327
+ return false;
328
+ }
329
+ }
330
+ return true;
331
+ }
332
+ function polyObjIsSealed(obj) {
333
+ if (isStrictNullOrUndefined(obj) || (!isObject(obj) && !isFunction(obj))) {
334
+ return true;
335
+ }
336
+ if (isFunction(obj)) {
337
+ return false;
338
+ }
339
+ for (var prop in obj) {
340
+ var desc = objGetOwnPropertyDescriptor(obj, prop);
341
+ if (desc && desc.configurable) {
342
+ return false;
343
+ }
344
+ }
345
+ return true;
346
+ }
347
+ var objIsFrozen = ( _pureAssign(( _pureRef(ObjClass, "isFrozen")), polyObjIsFrozen));
348
+ ( _pureAssign(( _pureRef(ObjClass, "isSealed")), polyObjIsSealed));
199
349
  var _objFreeze = ( _pureRef(ObjClass, "freeze"));
200
350
  function _doNothing(value) {
201
351
  return value;
202
352
  }
203
353
  function _getProto(value) {
354
+ _throwIfNullOrUndefined(value);
204
355
  return value[__PROTO__] || NULL_VALUE;
205
356
  }
206
357
  ( _pureRef(ObjClass, "assign"));
207
358
  var objKeys = ( _pureRef(ObjClass, "keys"));
208
- function objDeepFreeze(value) {
209
- if (_objFreeze) {
210
- objForEachKey(value, function (key, value) {
211
- if (isArray(value) || isObject(value)) {
212
- objDeepFreeze(value);
359
+ function _deepFreeze(val, visited) {
360
+ if ((isArray(val) || isObject(val) || isFunction(val)) && !objIsFrozen(val)) {
361
+ for (var lp = 0; lp < visited.length; lp++) {
362
+ if (visited[lp] === val) {
363
+ return val;
213
364
  }
365
+ }
366
+ visited.push(val);
367
+ objForEachKey(val, function (_key, propValue) {
368
+ _deepFreeze(propValue, visited);
214
369
  });
370
+ objFreeze(val);
215
371
  }
216
- return objFreeze(value);
372
+ return val;
373
+ }
374
+ function objDeepFreeze(value) {
375
+ return _objFreeze ? _deepFreeze(value, []) : value;
217
376
  }
218
377
  var objFreeze = ( _pureAssign(_objFreeze, _doNothing));
219
378
  ( _pureAssign(( _pureRef(ObjClass, "seal")), _doNothing));
220
379
  var objGetPrototypeOf = ( _pureAssign(( _pureRef(ObjClass, "getPrototypeOf")), _getProto));
221
380
  ( _pureAssign(( _pureRef(ObjClass, "entries")), polyObjEntries));
381
+ ( _pureAssign(( _pureRef(ObjClass, "values")), polyObjValues));
382
+ ( _pureAssign(( _pureRef(ObjClass, "is")), polyObjIs));
222
383
  function createEnumKeyMap(values) {
223
384
  return _createKeyValueMap(values, 0 , 0 , objFreeze);
224
385
  }
@@ -262,27 +423,13 @@
262
423
  }
263
424
  return _globalCfg;
264
425
  }
265
- var _unwrapFunction = ( _unwrapFunctionWithPoly);
266
- function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
267
- var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
268
- return function (thisArg) {
269
- var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;
270
- if (theFunc || polyFunc) {
271
- var theArgs = arguments;
272
- return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
273
- }
274
- throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
275
- };
276
- }
277
426
  ( _pureRef(MathCls, "min"));
278
427
  var mathMax = ( _pureRef(MathCls, "max"));
279
428
  var strSlice = ( _unwrapFunction("slice", StrProto));
280
429
  var strSubstring = ( _unwrapFunction("substring", StrProto));
281
430
  ( _unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
282
431
  function polyStrSubstr(value, start, length) {
283
- if (isNullOrUndefined(value)) {
284
- throwTypeError("Invalid " + dumpObj(value));
285
- }
432
+ _throwIfNullOrUndefined(value);
286
433
  if (length < 0) {
287
434
  return EMPTY;
288
435
  }
@@ -295,8 +442,104 @@
295
442
  }
296
443
  return strSlice(value, start, start + length);
297
444
  }
445
+ function _tagAsPolyfill(target, polyfillTypeName) {
446
+ if (target) {
447
+ safe(function () {
448
+ target[POLYFILL_TAG] = true;
449
+ target[POLYFILL_TYPE_NAME] = polyfillTypeName;
450
+ });
451
+ safe(objDefine, [target, POLYFILL_TAG, {
452
+ v: true,
453
+ w: false,
454
+ e: false
455
+ }]);
456
+ safe(objDefine, [target, POLYFILL_TYPE_NAME, {
457
+ v: polyfillTypeName,
458
+ w: false,
459
+ e: false
460
+ }]);
461
+ }
462
+ return target;
463
+ }
464
+ function createCachedValue(value) {
465
+ return objDefineProp({
466
+ toJSON: function () { return value; }
467
+ }, "v", { value: value });
468
+ }
469
+ var _isProtoArray;
470
+ var objSetPrototypeOf = ( _pureAssign(( _pureRef(ObjClass, "setPrototypeOf")), _polyObjSetPrototypeOf));
471
+ function _polyObjSetPrototypeOf(obj, proto) {
472
+ var _a;
473
+ !_isProtoArray && (_isProtoArray = createCachedValue((_a = {}, _a[__PROTO__] = [], _a) instanceof Array));
474
+ _isProtoArray.v ? obj[__PROTO__] = proto : objForEachKey(proto, function (key, value) { return obj[key] = value; });
475
+ return obj;
476
+ }
477
+ var objCreate = ( _pureAssign(( _pureRef(ObjClass, "create")), polyObjCreate));
478
+ function polyObjCreate(obj, properties) {
479
+ var newObj;
480
+ function tempFunc() { }
481
+ if (!isStrictNullOrUndefined(obj)) {
482
+ var type = typeof obj;
483
+ if (type !== OBJECT && type !== FUNCTION) {
484
+ throwTypeError("Prototype must be an Object or function: " + dumpObj(obj));
485
+ }
486
+ tempFunc[PROTOTYPE] = obj;
487
+ safe(function () {
488
+ tempFunc[__PROTO__] = obj;
489
+ });
490
+ newObj = new tempFunc();
491
+ }
492
+ else {
493
+ newObj = {};
494
+ }
495
+ safe(_polyObjSetPrototypeOf, [newObj, obj]);
496
+ if (properties) {
497
+ safe(objDefineProperties, [newObj, properties]);
498
+ }
499
+ return newObj;
500
+ }
501
+ function utcNow() {
502
+ return (Date.now || polyUtcNow)();
503
+ }
504
+ function polyUtcNow() {
505
+ return new Date().getTime();
506
+ }
507
+ var _globalLazyTestHooks;
508
+ function _initTestHooks() {
509
+ _globalLazyTestHooks = _getGlobalConfig();
510
+ }
511
+ function getLazy(cb) {
512
+ var lazyValue = {};
513
+ !_globalLazyTestHooks && _initTestHooks();
514
+ lazyValue.b = _globalLazyTestHooks.lzy;
515
+ objDefineProp(lazyValue, "v", {
516
+ configurable: true,
517
+ get: function () {
518
+ var result = cb();
519
+ if (!_globalLazyTestHooks.lzy) {
520
+ objDefineProp(lazyValue, "v", {
521
+ value: result
522
+ });
523
+ }
524
+ lazyValue.b = _globalLazyTestHooks.lzy;
525
+ return result;
526
+ }
527
+ });
528
+ return lazyValue;
529
+ }
530
+ var mathRandom = ( _pureRef(MathCls, "random"));
531
+ var _uniqueInstanceId = ( getLazy(function () {
532
+ var value = (utcNow().toString(36).slice(2));
533
+ while (value.length < 16) {
534
+ value += mathRandom().toString(36).slice(2);
535
+ }
536
+ value = value.substring(0, 16);
537
+ return value;
538
+ }));
298
539
  var UNIQUE_REGISTRY_ID = "_urid";
540
+ var POLY_SYM = "$nw21sym";
299
541
  var _polySymbols;
542
+ var _polyId = 0;
300
543
  function _globalSymbolRegistry() {
301
544
  if (!_polySymbols) {
302
545
  var gblCfg = _getGlobalConfig();
@@ -306,12 +549,35 @@
306
549
  }
307
550
  var _wellKnownSymbolCache;
308
551
  function polyNewSymbol(description) {
309
- var theSymbol = {
310
- description: asString(description),
311
- toString: function () { return SYMBOL + "(" + description + ")"; }
312
- };
313
- theSymbol[POLYFILL_TAG] = true;
314
- return theSymbol;
552
+ var uniqueId = "_" + _polyId++ + "_" + _uniqueInstanceId.v;
553
+ var symString = SYMBOL + "(" + description + ")";
554
+ var theSymbol = objCreate(null);
555
+ objDefine(theSymbol, "description", {
556
+ v: asString(description),
557
+ e: false,
558
+ w: false
559
+ });
560
+ objDefine(theSymbol, TO_STRING, {
561
+ v: function () { return symString + POLY_SYM + uniqueId; },
562
+ e: false,
563
+ w: false
564
+ });
565
+ objDefine(theSymbol, "valueOf", {
566
+ v: function () { return theSymbol; },
567
+ e: false,
568
+ w: false
569
+ });
570
+ objDefine(theSymbol, "v", {
571
+ v: symString,
572
+ e: false,
573
+ w: false
574
+ });
575
+ objDefine(theSymbol, "_uid", {
576
+ v: uniqueId,
577
+ e: false,
578
+ w: false
579
+ });
580
+ return _tagAsPolyfill(theSymbol, "symbol");
315
581
  }
316
582
  function polySymbolFor(key) {
317
583
  var registry = _globalSymbolRegistry();
@@ -333,15 +599,6 @@
333
599
  }
334
600
  return result;
335
601
  }
336
- var _globalLazyTestHooks;
337
- function _initTestHooks() {
338
- _globalLazyTestHooks = _getGlobalConfig();
339
- }
340
- function createCachedValue(value) {
341
- return objDefineProp({
342
- toJSON: function () { return value; }
343
- }, "v", { value: value });
344
- }
345
602
  var WINDOW = "window";
346
603
  var _cachedGlobal;
347
604
  function _getGlobalInstFn(getFn, theArgs) {
@@ -487,18 +744,6 @@
487
744
  }
488
745
  _unwrapFunction("every", ArrProto);
489
746
  _unwrapFunction("filter", ArrProto);
490
- function arrForEach(theArray, callbackfn, thisArg) {
491
- if (theArray) {
492
- var len = theArray[LENGTH] >>> 0;
493
- for (var idx = 0; idx < len; idx++) {
494
- if (idx in theArray) {
495
- if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
496
- break;
497
- }
498
- }
499
- }
500
- }
501
- }
502
747
  var arrIndexOf = ( _unwrapFunction("indexOf", ArrProto));
503
748
  ( _unwrapFunction("lastIndexOf", ArrProto));
504
749
  var arrMap = ( _unwrapFunction("map", ArrProto));
@@ -558,29 +803,6 @@
558
803
  ( _unwrapFunctionWithPoly("includes", ArrProto, polyArrIncludes));
559
804
  ( _unwrapFunction("reduce", ArrProto));
560
805
  ( _unwrapFunction("some", ArrProto));
561
- var objCreate = ( _pureAssign(( _pureRef(ObjClass, "create")), polyObjCreate));
562
- function polyObjCreate(obj) {
563
- if (!obj) {
564
- return {};
565
- }
566
- var type = typeof obj;
567
- if (type !== OBJECT && type !== FUNCTION) {
568
- throwTypeError("Prototype must be an Object or function: " + dumpObj(obj));
569
- }
570
- function tempFunc() { }
571
- tempFunc[PROTOTYPE] = obj;
572
- return new tempFunc();
573
- }
574
- var _isProtoArray;
575
- function objSetPrototypeOf(obj, proto) {
576
- var fn = ObjClass["setPrototypeOf"] ||
577
- function (d, b) {
578
- var _a;
579
- !_isProtoArray && (_isProtoArray = createCachedValue((_a = {}, _a[__PROTO__] = [], _a) instanceof Array));
580
- _isProtoArray.v ? d[__PROTO__] = b : objForEachKey(b, function (key, value) { return d[key] = value; });
581
- };
582
- return fn(obj, proto);
583
- }
584
806
  function _createCustomError(name, d, b) {
585
807
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
586
808
  d = objSetPrototypeOf(d, b);
@@ -619,17 +841,9 @@
619
841
  }
620
842
  }, theBaseClass);
621
843
  }
622
- function utcNow() {
623
- return (Date.now || polyUtcNow)();
624
- }
625
- function polyUtcNow() {
626
- return new Date().getTime();
627
- }
628
844
  function _createTrimFn(exp) {
629
845
  return function _doTrim(value) {
630
- if (isNullOrUndefined(value)) {
631
- throwTypeError("strTrim called [" + dumpObj(value) + "]");
632
- }
846
+ _throwIfNullOrUndefined(value);
633
847
  if (value && value.replace) {
634
848
  value = value.replace(exp, EMPTY);
635
849
  }
@@ -660,9 +874,7 @@
660
874
  }
661
875
  var strRepeat = ( _unwrapFunctionWithPoly("repeat", StrProto, polyStrRepeat));
662
876
  function polyStrRepeat(value, count) {
663
- if (isNullOrUndefined(value)) {
664
- throwTypeError("can't convert [" + dumpObj(value) + "]");
665
- }
877
+ _throwIfNullOrUndefined(value);
666
878
  count = mathToInt(count, true);
667
879
  if (count < 0) {
668
880
  throwRangeError("invalid count must be >= 0 && < Infinity");
@@ -732,18 +944,130 @@
732
944
  }
733
945
  return result;
734
946
  }
735
- ( _pureRef(MathCls, "round"));
736
947
  function polyStrSymSplit(value, splitter, limit) {
737
948
  var splitFn = splitter ? splitter[getKnownSymbol(9 )] : UNDEF_VALUE;
738
949
  return splitFn ? splitFn(value, limit) : [value];
739
950
  }
740
951
  ( _unwrapFunction("split", StrProto));
741
952
  ( _unwrapFunctionWithPoly("split", StrProto, !hasSymbol() ? polyStrSymSplit : NULL_VALUE));
953
+ ( _pureAssign(( _pureRef(NumberCls, "isInteger")), _polyNumberIsInteger));
954
+ function _polyNumberIsInteger(value) {
955
+ return isNumber(value) && !isNaN(value) &&
956
+ isFinite(value) &&
957
+ mathFloor(value) === value;
958
+ }
959
+ ( _pureRef(MathCls, "abs"));
960
+ ( _pureRef(MathCls, "exp"));
961
+ ( _pureRef(MathCls, "log"));
962
+ ( _pureRef(MathCls, "asin"));
963
+ ( _pureRef(MathCls, "acos"));
964
+ ( _pureRef(MathCls, "atan"));
965
+ ( _pureRef(MathCls, "atan2"));
966
+ ( _pureRef(MathCls, "pow"));
967
+ ( _pureRef(MathCls, "sqrt"));
968
+ ( _pureRef(MathCls, "round"));
969
+ ( _pureRef(MathCls, "sin"));
970
+ ( _pureRef(MathCls, "cos"));
971
+ ( _pureRef(MathCls, "tan"));
972
+ function polyObjGetOwnPropertyNames(obj) {
973
+ var result = [];
974
+ _throwIfNullOrUndefined(obj);
975
+ for (var key in obj) {
976
+ if (ObjProto.hasOwnProperty.call(obj, key)) {
977
+ result.push(key);
978
+ }
979
+ }
980
+ if (isArray(obj) || isString(obj)) {
981
+ if (arrIndexOf(result, LENGTH) === -1) {
982
+ result.push(LENGTH);
983
+ }
984
+ }
985
+ return result;
986
+ }
987
+ var objGetOwnPropertyNames = ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyNames")), polyObjGetOwnPropertyNames));
988
+ var recursionCheckOwnDescriptors;
989
+ function polyObjGetOwnPropertyDescriptors(obj) {
990
+ var result = {};
991
+ _throwIfNullOrUndefined(obj);
992
+ if (!recursionCheckOwnDescriptors) {
993
+ try {
994
+ recursionCheckOwnDescriptors = true;
995
+ arrForEach(objGetOwnPropertyNames(obj), function (propName) {
996
+ var descriptor = polyObjGetOwnPropertyDescriptor(obj, propName);
997
+ if (descriptor !== undefined) {
998
+ result[propName] = descriptor;
999
+ }
1000
+ });
1001
+ arrForEach(polyObjGetOwnPropertySymbols(obj), function (sym) {
1002
+ var descriptor = polyObjGetOwnPropertyDescriptor(obj, sym);
1003
+ if (descriptor !== undefined) {
1004
+ result[sym] = descriptor;
1005
+ }
1006
+ });
1007
+ }
1008
+ finally {
1009
+ recursionCheckOwnDescriptors = false;
1010
+ }
1011
+ }
1012
+ return result;
1013
+ }
1014
+ var recursionCheckOwnSymbols;
1015
+ function polyObjGetOwnPropertySymbols(obj) {
1016
+ var result = [];
1017
+ var objHasOwn = ObjClass.hasOwn || polyObjHasOwn;
1018
+ if (!recursionCheckOwnSymbols) {
1019
+ try {
1020
+ recursionCheckOwnSymbols = true;
1021
+ var symEnum = 0 ;
1022
+ while (symEnum <= 12 ) {
1023
+ var sym = getKnownSymbol(symEnum);
1024
+ if (sym && objHasOwn(obj, sym)) {
1025
+ result.push(sym);
1026
+ }
1027
+ symEnum++;
1028
+ }
1029
+ }
1030
+ finally {
1031
+ recursionCheckOwnSymbols = false;
1032
+ }
1033
+ }
1034
+ return result;
1035
+ }
1036
+ ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyDescriptors")), polyObjGetOwnPropertyDescriptors));
1037
+ function polyObjFromEntries(entries) {
1038
+ var result = {};
1039
+ function addEntry(entry) {
1040
+ if (isArray(entry) && entry.length >= 2) {
1041
+ result[entry[0]] = entry[1];
1042
+ }
1043
+ }
1044
+ if (isArray(entries)) {
1045
+ arrForEach(entries, addEntry);
1046
+ }
1047
+ else if (isIterable(entries)) {
1048
+ iterForOf(entries, addEntry);
1049
+ }
1050
+ return result;
1051
+ }
1052
+ ( _pureAssign(( _pureRef(ObjClass, "fromEntries")), polyObjFromEntries));
1053
+ function polyObjIsExtensible(obj) {
1054
+ if (isStrictNullOrUndefined(obj) || (!isObject(obj) && !isFunction(obj))) {
1055
+ return false;
1056
+ }
1057
+ return true;
1058
+ }
1059
+ function polyObjPreventExtensions(obj) {
1060
+ _throwIfNullOrUndefined(obj);
1061
+ if (!isObject(obj) && !isFunction(obj)) {
1062
+ throwTypeError("objPreventExtensions can only be called on Objects");
1063
+ }
1064
+ return obj;
1065
+ }
1066
+ ( _pureAssign(( _pureRef(ObjClass, "preventExtensions")), polyObjPreventExtensions));
1067
+ ( _pureAssign(( _pureRef(ObjClass, "isExtensible")), polyObjIsExtensible));
742
1068
  ( _unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith));
743
1069
  function polyStrEndsWith(value, searchString, length) {
744
- if (!isString(value)) {
745
- throwTypeError("'" + dumpObj(value) + "' is not a string");
746
- }
1070
+ _throwIfNotString(value);
747
1071
  var searchValue = isString(searchString) ? searchString : asString(searchString);
748
1072
  var end = (!isUndefined(length) && length < value[LENGTH]) ? length : value[LENGTH];
749
1073
  return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
@@ -759,9 +1083,7 @@
759
1083
  }
760
1084
  ( _unwrapFunctionWithPoly("startsWith", StrProto, polyStrStartsWith));
761
1085
  function polyStrStartsWith(value, searchString, position) {
762
- if (!isString(value)) {
763
- throwTypeError("'" + dumpObj(value) + "' is not a string");
764
- }
1086
+ _throwIfNotString(value);
765
1087
  var searchValue = isString(searchString) ? searchString : asString(searchString);
766
1088
  var pos = position > 0 ? position : 0;
767
1089
  return strSubstring(value, pos, pos + searchValue[LENGTH]) === searchValue;
@@ -1358,7 +1680,7 @@
1358
1680
  return result;
1359
1681
  }
1360
1682
 
1361
- var version = '3.3.7-nightly3.2504-08';
1683
+ var version = '3.3.7-nightly3.2504-11';
1362
1684
  var instanceName = "." + newId(6);
1363
1685
  var _dataUid = 0;
1364
1686
  function _canAcceptData(target) {