@microsoft/applicationinsights-react-js 19.4.1-nightly.2605-03 → 19.4.1

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 Plugin, 19.4.1-nightly.2605-03
2
+ * Application Insights JavaScript SDK - React Plugin, 19.4.1
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -38,12 +38,12 @@
38
38
  var ObjClass$1 = Object;
39
39
  var ObjProto$1 = ObjClass$1[strShimPrototype];
40
40
 
41
- /*! https://github.com/nevware21/ts-utils v0.13.0 */
41
+ /*! https://github.com/nevware21/ts-utils v0.15.0 */
42
42
  function _pureAssign(func1, func2) {
43
43
  return func1 || func2;
44
44
  }
45
45
  function _pureRef(value, name) {
46
- return value[name];
46
+ return value !== null && value !== undefined ? value[name] : undefined;
47
47
  }
48
48
  var UNDEF_VALUE = undefined;
49
49
  var NULL_VALUE = null;
@@ -62,15 +62,26 @@
62
62
  var GET_OWN_PROPERTY_DESCRIPTOR = "getOwnPropertyDescriptor";
63
63
  var GET_OWN_PROPERTY_NAMES = "getOwnPropertyNames";
64
64
  var GET_OWN_PROPERTY_SYMBOLS = "getOwnPropertySymbols";
65
- var ObjClass = ( _pureAssign(Object));
66
- var ObjProto = ( _pureRef(ObjClass, PROTOTYPE));
67
- var StrCls = ( _pureAssign(String));
68
- var StrProto = ( _pureRef(StrCls, PROTOTYPE));
69
- var MathCls = ( _pureAssign(Math));
70
- var ArrCls = ( _pureAssign(Array));
71
- var ArrProto = ( _pureRef(ArrCls, PROTOTYPE));
72
- var ArrSlice = ( _pureRef(ArrProto, "slice"));
73
- var NumberCls = ( _pureAssign(Number));
65
+ var ObjClass = (_pureAssign(Object));
66
+ var ObjProto = (_pureRef(ObjClass, PROTOTYPE));
67
+ var StrCls = (_pureAssign(String));
68
+ var StrProto = (_pureRef(StrCls, PROTOTYPE));
69
+ var MathCls = (_pureAssign(Math));
70
+ var ArrCls = (_pureAssign(Array));
71
+ var ArrProto = (_pureRef(ArrCls, PROTOTYPE));
72
+ var ArrSlice = (_pureRef(ArrProto, "slice"));
73
+ var NumberCls = (_pureAssign(Number));
74
+ (_pureRef(NumberCls, PROTOTYPE));
75
+ var FuncCls = (_pureAssign(Function));
76
+ (_pureRef(FuncCls, PROTOTYPE));
77
+ var DateCls = (_pureAssign(Date));
78
+ (_pureRef(DateCls, PROTOTYPE));
79
+ var RegExpCls = (_pureAssign(RegExp));
80
+ (_pureRef(RegExpCls, PROTOTYPE));
81
+ var BooleanCls = (_pureAssign(Boolean));
82
+ (_pureRef(BooleanCls, PROTOTYPE));
83
+ var ErrorCls = (_pureAssign(Error));
84
+ (_pureRef(ErrorCls, PROTOTYPE));
74
85
  var POLYFILL_TAG = "_polyfill";
75
86
  var POLYFILL_TYPE_NAME = "__nw21$polytype__";
76
87
  function safe(func, argArray) {
@@ -116,18 +127,21 @@
116
127
  function isDefined(arg) {
117
128
  return !!arg || arg !== UNDEF_VALUE;
118
129
  }
119
- var isString = ( _createIs("string"));
120
- var isFunction = ( _createIs(FUNCTION));
130
+ var isString = (_createIs("string"));
131
+ var isFunction = (_createIs(FUNCTION));
121
132
  function isObject(value) {
122
133
  if (!value && isNullOrUndefined(value)) {
123
134
  return false;
124
135
  }
125
136
  return !!value && typeof value === OBJECT;
126
137
  }
127
- var isArray = ( _pureRef(ArrCls, "isArray"));
128
- var isNumber = ( _createIs("number"));
129
- var isRegExp = ( _createObjIs("RegExp"));
130
- var isError = ( _createObjIs("Error"));
138
+ var isArray = (_pureRef(ArrCls, "isArray"));
139
+ function isArrayLike(arg) {
140
+ return !isStrictNullOrUndefined(arg) && !isFunction(arg) && isNumber(arg[LENGTH]) && arg[LENGTH] >= 0;
141
+ }
142
+ var isNumber = (_createIs("number"));
143
+ var isRegExp = (_createObjIs("RegExp"));
144
+ var isError = (_createObjIs("Error"));
131
145
  function isTruthy(value) {
132
146
  return !(!value || safeGet(function () { return !(value && (0 + value)); }, !value));
133
147
  }
@@ -140,7 +154,7 @@
140
154
  function _returnFalse() {
141
155
  return false;
142
156
  }
143
- var asString = ( _pureAssign(StrCls));
157
+ var asString = (_pureAssign(StrCls));
144
158
  var ERROR_TYPE = "[object Error]";
145
159
  function dumpObj(object, format) {
146
160
  var propertyValueDump = EMPTY;
@@ -176,8 +190,8 @@
176
190
  function objHasOwnProperty(obj, prop) {
177
191
  return !!obj && ObjProto.hasOwnProperty[CALL](obj, prop);
178
192
  }
179
- var _objGetOwnPropertyDescriptor$2 = ( _pureAssign(( _pureRef(ObjClass, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
180
- var objHasOwn = ( _pureAssign(( _pureRef(ObjClass, "hasOwn")), polyObjHasOwn));
193
+ var _objGetOwnPropertyDescriptor$2 = (_pureAssign((_pureRef(ObjClass, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
194
+ var objHasOwn = (_pureAssign((_pureRef(ObjClass, "hasOwn")), polyObjHasOwn));
181
195
  function polyObjHasOwn(obj, prop) {
182
196
  _throwIfNullOrUndefined(obj);
183
197
  return objHasOwnProperty(obj, prop) || !!_objGetOwnPropertyDescriptor$2(obj, prop);
@@ -186,7 +200,7 @@
186
200
  if (theObject && (isObject(theObject) || isFunction(theObject))) {
187
201
  for (var prop in theObject) {
188
202
  if (objHasOwn(theObject, prop)) {
189
- if (callbackfn[CALL](thisArg || theObject, prop, theObject[prop]) === -1) {
203
+ if (callbackfn[CALL](isStrictNullOrUndefined(thisArg) ? theObject : thisArg, prop, theObject[prop]) === -1) {
190
204
  break;
191
205
  }
192
206
  }
@@ -198,14 +212,14 @@
198
212
  var len = theArray[LENGTH] >>> 0;
199
213
  for (var idx = 0; idx < len; idx++) {
200
214
  if (idx in theArray) {
201
- if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
215
+ if (callbackfn[CALL](isStrictNullOrUndefined(thisArg) ? theArray : thisArg, theArray[idx], idx, theArray) === -1) {
202
216
  break;
203
217
  }
204
218
  }
205
219
  }
206
220
  }
207
221
  }
208
- var _unwrapFunction = ( _unwrapFunctionWithPoly);
222
+ var _unwrapFunction = _unwrapFunctionWithPoly;
209
223
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
210
224
  var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
211
225
  return function (thisArg) {
@@ -217,26 +231,43 @@
217
231
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
218
232
  };
219
233
  }
234
+ function _unwrapFunctionNoInstWithPoly(funcName, clsProto, polyFunc) {
235
+ var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
236
+ return function (thisArg) {
237
+ var theFunc = clsFn;
238
+ if (theFunc || polyFunc) {
239
+ var theArgs = arguments;
240
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
241
+ }
242
+ throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
243
+ };
244
+ }
245
+ function _unwrapProp(propName) {
246
+ return function (thisArg) {
247
+ return thisArg[propName];
248
+ };
249
+ }
220
250
  function _objPropertyIsEnum(obj, propKey) {
221
251
  var desc;
222
252
  var fn = ObjClass.getOwnPropertyDescriptor;
223
253
  if (!isStrictNullOrUndefined(obj) && fn) {
224
254
  desc = safe(fn, [obj, propKey]).v || NULL_VALUE;
225
255
  }
226
- if (!desc) {
256
+ if (!desc && !isStrictNullOrUndefined(obj)) {
227
257
  desc = safe(function () {
228
258
  for (var key in obj) {
229
- if (key === propKey) {
230
- return { enumerable: true };
259
+ if (key == propKey) {
260
+ return { enumerable: objHasOwnProperty(obj, key) };
231
261
  }
232
262
  }
233
263
  }).v;
234
264
  }
235
265
  return (desc && desc.enumerable) || false;
236
266
  }
237
- ( _unwrapFunctionWithPoly("propertyIsEnumerable", NULL_VALUE, _objPropertyIsEnum));
238
- var _objGetOwnPropertyDescriptor$1 = ( _pureAssign(( _pureRef(ObjClass, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
239
- ( _pureAssign(( _pureRef(ObjClass, GET_OWN_PROPERTY_SYMBOLS)), _returnEmptyArray));
267
+ (_unwrapFunctionWithPoly("propertyIsEnumerable", NULL_VALUE, _objPropertyIsEnum));
268
+ (_unwrapFunctionNoInstWithPoly("propertyIsEnumerable", ObjProto, _objPropertyIsEnum));
269
+ var _objGetOwnPropertyDescriptor$1 = (_pureAssign((_pureRef(ObjClass, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
270
+ (_pureAssign((_pureRef(ObjClass, GET_OWN_PROPERTY_SYMBOLS)), _returnEmptyArray));
240
271
  var propMap = {
241
272
  e: "enumerable",
242
273
  c: "configurable",
@@ -263,8 +294,8 @@
263
294
  });
264
295
  return prop;
265
296
  }
266
- var objDefineProp = ( _pureRef(ObjClass, "defineProperty"));
267
- var objDefineProperties = ( _pureRef(ObjClass, "defineProperties"));
297
+ var objDefineProp = (_pureRef(ObjClass, "defineProperty"));
298
+ var objDefineProperties = (_pureRef(ObjClass, "defineProperties"));
268
299
  function objDefine(target, key, propDesc) {
269
300
  return objDefineProp(target, key, _createProp(propDesc));
270
301
  }
@@ -305,9 +336,9 @@
305
336
  }
306
337
  return value1 === value2;
307
338
  }
308
- var objIsFrozen = ( _pureAssign(( _pureRef(ObjClass, "isFrozen")), _returnFalse));
309
- ( _pureAssign(( _pureRef(ObjClass, "isSealed")), _returnFalse));
310
- var _objFreeze = ( _pureRef(ObjClass, "freeze"));
339
+ var objIsFrozen = (_pureAssign((_pureRef(ObjClass, "isFrozen")), _returnFalse));
340
+ (_pureAssign((_pureRef(ObjClass, "isSealed")), _returnFalse));
341
+ var _objFreeze = (_pureRef(ObjClass, "freeze"));
311
342
  function _doNothing(value) {
312
343
  return value;
313
344
  }
@@ -315,8 +346,8 @@
315
346
  _throwIfNullOrUndefined(value);
316
347
  return value[__PROTO__] || NULL_VALUE;
317
348
  }
318
- var objAssign = ( _pureRef(ObjClass, "assign"));
319
- var objKeys = ( _pureRef(ObjClass, "keys"));
349
+ var objAssign = (_pureRef(ObjClass, "assign"));
350
+ var objKeys = (_pureRef(ObjClass, "keys"));
320
351
  function _deepFreeze(val, visited) {
321
352
  if ((isArray(val) || isObject(val) || isFunction(val)) && !objIsFrozen(val)) {
322
353
  for (var lp = 0; lp < visited.length; lp++) {
@@ -335,19 +366,19 @@
335
366
  function objDeepFreeze(value) {
336
367
  return _objFreeze ? _deepFreeze(value, []) : value;
337
368
  }
338
- var objFreeze = ( _pureAssign(_objFreeze, _doNothing));
339
- ( _pureAssign(( _pureRef(ObjClass, "seal")), _doNothing));
340
- var objGetPrototypeOf = ( _pureAssign(( _pureRef(ObjClass, "getPrototypeOf")), _getProto));
341
- ( _pureAssign(( _pureRef(ObjClass, "entries")), polyObjEntries));
342
- ( _pureAssign(( _pureRef(ObjClass, "values")), polyObjValues));
343
- ( _pureAssign(( _pureRef(ObjClass, "is")), polyObjIs));
369
+ var objFreeze = (_pureAssign(_objFreeze, _doNothing));
370
+ (_pureAssign((_pureRef(ObjClass, "seal")), _doNothing));
371
+ var objGetPrototypeOf = (_pureAssign((_pureRef(ObjClass, "getPrototypeOf")), _getProto));
372
+ (_pureAssign((_pureRef(ObjClass, "entries")), polyObjEntries));
373
+ (_pureAssign((_pureRef(ObjClass, "values")), polyObjValues));
374
+ (_pureAssign((_pureRef(ObjClass, "is")), polyObjIs));
344
375
  function createEnum(values) {
345
376
  return _createKeyValueMap(values, 1 , 0 , objFreeze);
346
377
  }
347
378
  function createEnumKeyMap(values) {
348
379
  return _createKeyValueMap(values, 0 , 0 , objFreeze);
349
380
  }
350
- var _wellKnownSymbolMap = ( createEnumKeyMap({
381
+ var _wellKnownSymbolMap = (createEnumKeyMap({
351
382
  asyncIterator: 0 ,
352
383
  hasInstance: 1 ,
353
384
  isConcatSpreadable: 2 ,
@@ -387,11 +418,11 @@
387
418
  }
388
419
  return _globalCfg;
389
420
  }
390
- ( _pureRef(MathCls, "min"));
391
- var mathMax = ( _pureRef(MathCls, "max"));
392
- var strSlice = ( _unwrapFunction("slice", StrProto));
393
- var strSubstring = ( _unwrapFunction("substring", StrProto));
394
- ( _unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
421
+ var mathMin = (_pureRef(MathCls, "min"));
422
+ var mathMax = (_pureRef(MathCls, "max"));
423
+ var strSlice = (_unwrapFunction("slice", StrProto));
424
+ var strSubstring = (_unwrapFunction("substring", StrProto));
425
+ (_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
395
426
  function polyStrSubstr(value, start, length) {
396
427
  _throwIfNullOrUndefined(value);
397
428
  if (length < 0) {
@@ -428,7 +459,7 @@
428
459
  }
429
460
  return target;
430
461
  }
431
- var objCreate = ( _pureAssign(( _pureRef(ObjClass, "create")), polyObjCreate));
462
+ var objCreate = (_pureAssign((_pureRef(ObjClass, "create")), polyObjCreate));
432
463
  function polyObjCreate(obj, properties) {
433
464
  var newObj = null;
434
465
  function tempFunc() { }
@@ -460,6 +491,9 @@
460
491
  function fnApply(fn, thisArg, argArray) {
461
492
  return fn.apply(thisArg, argArray);
462
493
  }
494
+ function fnCall(fn, thisArg) {
495
+ return fn.apply(thisArg, ArrSlice[CALL](arguments, 2));
496
+ }
463
497
  var _globalLazyTestHooks;
464
498
  function _initTestHooks() {
465
499
  _globalLazyTestHooks = _getGlobalConfig();
@@ -483,8 +517,8 @@
483
517
  });
484
518
  return lazyValue;
485
519
  }
486
- var mathRandom = ( _pureRef(MathCls, "random"));
487
- var _uniqueInstanceId = ( getLazy(function () {
520
+ var mathRandom = (_pureRef(MathCls, "random"));
521
+ var _uniqueInstanceId = (getLazy(function () {
488
522
  var value = (utcNow().toString(36).slice(2));
489
523
  while (value.length < 16) {
490
524
  value += mathRandom().toString(36).slice(2);
@@ -586,16 +620,16 @@
586
620
  }
587
621
  return NULL_VALUE;
588
622
  }
589
- var getDocument = ( _getGlobalInstFn(getInst, ["document"]));
623
+ var getDocument = (_getGlobalInstFn(getInst, ["document"]));
590
624
  function hasWindow() {
591
- return !!( getWindow());
625
+ return !!getWindow();
592
626
  }
593
- var getWindow = ( _getGlobalInstFn(getInst, [WINDOW]));
594
- var getNavigator = ( _getGlobalInstFn(getInst, ["navigator"]));
627
+ var getWindow = (_getGlobalInstFn(getInst, [WINDOW]));
628
+ var getNavigator = (_getGlobalInstFn(getInst, ["navigator"]));
595
629
  var _symbol;
596
630
  var _symbolFor;
597
631
  function _initSymbol() {
598
- _symbol = ( createCachedValue(safe((getInst), [SYMBOL]).v));
632
+ _symbol = (createCachedValue(safe((getInst), [SYMBOL]).v));
599
633
  return _symbol;
600
634
  }
601
635
  function _getSymbolKey(key) {
@@ -615,7 +649,7 @@
615
649
  }
616
650
  function symbolFor(key) {
617
651
  !_globalLazyTestHooks && _initTestHooks();
618
- _symbolFor = ((!_globalLazyTestHooks.lzy ? _symbolFor : 0) || ( createCachedValue(safe((_getSymbolKey), ["for"]).v)));
652
+ _symbolFor = ((!_globalLazyTestHooks.lzy ? _symbolFor : 0) || (createCachedValue(safe((_getSymbolKey), ["for"]).v)));
619
653
  return (_symbolFor.v || polySymbolFor)(key);
620
654
  }
621
655
  function isIterator(value) {
@@ -637,7 +671,7 @@
637
671
  try {
638
672
  var count = 0;
639
673
  while (!(iterResult = iter.next()).done) {
640
- if (callbackfn[CALL](thisArg || iter, iterResult.value, count, iter) === -1) {
674
+ if (callbackfn[CALL](isStrictNullOrUndefined(thisArg) ? iter : thisArg, iterResult.value, count, iter) === -1) {
641
675
  break;
642
676
  }
643
677
  count++;
@@ -681,11 +715,25 @@
681
715
  }
682
716
  return target;
683
717
  }
684
- _unwrapFunction("every", ArrProto);
685
- _unwrapFunction("filter", ArrProto);
686
- var arrIndexOf = ( _unwrapFunction("indexOf", ArrProto));
687
- ( _unwrapFunction("lastIndexOf", ArrProto));
688
- var arrMap = ( _unwrapFunction("map", ArrProto));
718
+ (_unwrapFunction("concat", ArrProto));
719
+ _unwrapFunctionWithPoly("at", ArrProto, polyArrAt);
720
+ function polyArrAt(theArray, index) {
721
+ var result;
722
+ if (isArrayLike(theArray)) {
723
+ var len = theArray.length;
724
+ var idx = index;
725
+ if (idx < 0) {
726
+ idx = len + idx;
727
+ }
728
+ if (idx >= 0 && idx < len) {
729
+ result = theArray[idx];
730
+ }
731
+ }
732
+ return result;
733
+ }
734
+ var arrIndexOf = (_unwrapFunction("indexOf", ArrProto));
735
+ (_unwrapFunction("lastIndexOf", ArrProto));
736
+ var arrMap = (_unwrapFunction("map", ArrProto));
689
737
  function arrSlice(theArray, start, end) {
690
738
  return ((theArray ? theArray["slice"] : NULL_VALUE) || ArrSlice).apply(theArray, ArrSlice[CALL](arguments, 1));
691
739
  }
@@ -700,7 +748,7 @@
700
748
  function polyArrFindIndex(theArray, callbackFn, thisArg) {
701
749
  var result = -1;
702
750
  arrForEach(theArray, function (value, index) {
703
- if (callbackFn[CALL](thisArg | theArray, value, index, theArray)) {
751
+ if (callbackFn[CALL](isStrictNullOrUndefined(thisArg) ? theArray : thisArg, value, index, theArray)) {
704
752
  result = index;
705
753
  return -1;
706
754
  }
@@ -716,7 +764,7 @@
716
764
  var result = -1;
717
765
  var len = theArray[LENGTH] >>> 0;
718
766
  for (var idx = len - 1; idx >= 0; idx--) {
719
- if (idx in theArray && callbackFn[CALL](thisArg | theArray, theArray[idx], idx, theArray)) {
767
+ if (idx in theArray && callbackFn[CALL](isStrictNullOrUndefined(thisArg) ? theArray : thisArg, theArray[idx], idx, theArray)) {
720
768
  result = idx;
721
769
  break;
722
770
  }
@@ -734,16 +782,167 @@
734
782
  });
735
783
  return result;
736
784
  }
785
+ (_unwrapFunctionWithPoly("includes", ArrProto, polyArrIncludes));
786
+ _unwrapFunction("every", ArrProto);
787
+ _unwrapFunction("filter", ArrProto);
788
+ var getLength = (_unwrapProp(LENGTH));
789
+ _unwrapFunctionWithPoly("fill", ArrProto, polyArrFill);
790
+ function polyArrFill(theArray, value, start, end) {
791
+ if (isArrayLike(theArray)) {
792
+ var len = getLength(theArray);
793
+ var startIdx = start === UNDEF_VALUE ? 0 : start;
794
+ var endIdx = end === UNDEF_VALUE ? len : end;
795
+ if (startIdx < 0) {
796
+ startIdx = mathMax(len + startIdx, 0);
797
+ }
798
+ else {
799
+ startIdx = mathMin(startIdx, len);
800
+ }
801
+ if (endIdx < 0) {
802
+ endIdx = mathMax(len + endIdx, 0);
803
+ }
804
+ else {
805
+ endIdx = mathMin(endIdx, len);
806
+ }
807
+ for (var i = startIdx; i < endIdx; i++) {
808
+ theArray[i] = value;
809
+ }
810
+ }
811
+ return theArray;
812
+ }
737
813
  _unwrapFunctionWithPoly("find", ArrProto, polyArrFind);
738
814
  _unwrapFunctionWithPoly("findIndex", ArrProto, polyArrFindIndex);
739
815
  _unwrapFunctionWithPoly("findLast", ArrProto, polyArrFindLast);
740
816
  _unwrapFunctionWithPoly("findLastIndex", ArrProto, polyArrFindLastIndex);
741
- ( _pureAssign(( _pureRef(ArrCls, "from")), polyArrFrom));
742
- ( _unwrapFunctionWithPoly("includes", ArrProto, polyArrIncludes));
743
- ( _unwrapFunction("reduce", ArrProto));
744
- ( _unwrapFunction("some", ArrProto));
817
+ _unwrapFunctionWithPoly("flatMap", ArrProto, polyArrFlatMap);
818
+ function polyArrFlatMap(theArray, callbackFn, thisArg) {
819
+ _throwIfNullOrUndefined(theArray);
820
+ if (!isFunction(callbackFn)) {
821
+ throwTypeError("callbackFn must be a function");
822
+ }
823
+ var result = [];
824
+ var callbackThis = arguments.length > 2 ? thisArg : undefined;
825
+ arrForEach(theArray, function (theValue, index) {
826
+ var value = fnCall(callbackFn, callbackThis, theValue, index, theArray);
827
+ if (isArray(value)) {
828
+ arrForEach(value, function (mappedValue) {
829
+ result.push(mappedValue);
830
+ });
831
+ }
832
+ else {
833
+ result.push(value);
834
+ }
835
+ });
836
+ return result;
837
+ }
838
+ (_pureAssign((_pureRef(ArrCls, "from")), polyArrFrom));
839
+ var mathFloor = (_pureRef(MathCls, "floor"));
840
+ var mathCeil = (_pureRef(MathCls, "ceil"));
841
+ var mathTrunc = (_pureAssign((_pureRef(MathCls, "trunc")), polyMathTrunc));
842
+ function polyMathTrunc(value) {
843
+ var theValue = +value;
844
+ return (theValue > 0 ? mathFloor : mathCeil)(theValue);
845
+ }
846
+ function mathToInt(value, throwInfinity) {
847
+ var result = +value;
848
+ if (throwInfinity && (result === Infinity || result == Infinity)) {
849
+ throwRangeError("invalid value [" + dumpObj(value) + "]");
850
+ }
851
+ return result !== result || result === 0 ? 0 : mathTrunc(result);
852
+ }
853
+ function createIterableIterator(ctx) {
854
+ var iterator = createIterator(ctx);
855
+ var itSymbol = getKnownSymbol(3 );
856
+ function _createIterator() {
857
+ return iterator;
858
+ }
859
+ iterator[itSymbol] = _createIterator;
860
+ return iterator;
861
+ }
862
+ function createIterator(ctx) {
863
+ var isDone = false;
864
+ function _value() {
865
+ return ctx.v;
866
+ }
867
+ function _next() {
868
+ if (!isDone) {
869
+ isDone = (ctx.n ? ctx.n(arguments) : true);
870
+ }
871
+ var result = {
872
+ done: isDone
873
+ };
874
+ if (!isDone) {
875
+ objDefine(result, "value", { g: _value });
876
+ }
877
+ return result;
878
+ }
879
+ function _return(value) {
880
+ isDone = true;
881
+ return {
882
+ done: true,
883
+ value: ctx.r && ctx.r(value)
884
+ };
885
+ }
886
+ function _throw(e) {
887
+ isDone = true;
888
+ return {
889
+ done: true,
890
+ value: ctx.t && ctx.t(e)
891
+ };
892
+ }
893
+ var theIterator = {
894
+ next: _next
895
+ };
896
+ if (ctx.r) {
897
+ theIterator.return = _return;
898
+ }
899
+ if (ctx.t) {
900
+ theIterator.throw = _throw;
901
+ }
902
+ return theIterator;
903
+ }
904
+ _unwrapFunctionWithPoly("keys", ArrProto, polyArrKeys);
905
+ function polyArrKeys(value) {
906
+ _throwIfNullOrUndefined(value);
907
+ var idx = -1;
908
+ var len = mathToInt(value.length);
909
+ if (len < 0) {
910
+ len = 0;
911
+ }
912
+ return createIterableIterator({
913
+ n: function () {
914
+ idx++;
915
+ var isDone = idx >= len;
916
+ if (!isDone) {
917
+ this.v = idx;
918
+ }
919
+ return isDone;
920
+ }
921
+ });
922
+ }
923
+ (_unwrapFunction("reduce", ArrProto));
924
+ (_unwrapFunction("reverse", ArrProto));
925
+ (_unwrapFunction("some", ArrProto));
926
+ _unwrapFunctionWithPoly("with", ArrProto, polyArrWith);
927
+ function polyArrWith(theArray, index, value) {
928
+ var result;
929
+ if (!isArrayLike(theArray)) {
930
+ throwRangeError("Invalid array");
931
+ }
932
+ var len = getLength(theArray);
933
+ var idx = index;
934
+ if (idx < 0) {
935
+ idx = len + idx;
936
+ }
937
+ if (idx < 0 || idx >= len) {
938
+ throwRangeError("Index out of bounds");
939
+ }
940
+ result = arrSlice(theArray);
941
+ result[idx] = value;
942
+ return result;
943
+ }
745
944
  var _isProtoArray;
746
- var objSetPrototypeOf = ( _pureAssign(( _pureRef(ObjClass, "setPrototypeOf")), _polyObjSetPrototypeOf));
945
+ var objSetPrototypeOf = (_pureAssign((_pureRef(ObjClass, "setPrototypeOf")), _polyObjSetPrototypeOf));
747
946
  function _polyObjSetPrototypeOf(obj, proto) {
748
947
  var _a;
749
948
  !_isProtoArray && (_isProtoArray = createCachedValue((_a = {}, _a[__PROTO__] = [], _a) instanceof Array));
@@ -788,38 +987,26 @@
788
987
  }
789
988
  }, theBaseClass);
790
989
  }
990
+ var strReplace = (_unwrapFunction("replace", StrProto));
791
991
  function _createTrimFn(exp) {
792
992
  return function _doTrim(value) {
793
993
  _throwIfNullOrUndefined(value);
794
- if (value && value.replace) {
795
- value = value.replace(exp, EMPTY);
994
+ value = asString(value);
995
+ if (value) {
996
+ value = strReplace(value, exp, EMPTY);
796
997
  }
797
998
  return value;
798
999
  };
799
1000
  }
800
- var polyStrTrim = ( _createTrimFn(/^\s+|(?=\s)\s+$/g));
801
- var polyStrTrimStart = ( _createTrimFn(/^\s+/g));
802
- var polyStrTrimEnd = ( _createTrimFn(/(?=\s)\s+$/g));
803
- var strTrim = ( _unwrapFunctionWithPoly("trim", StrProto, polyStrTrim));
804
- ( _unwrapFunctionWithPoly("trimStart", StrProto, polyStrTrimStart));
805
- ( _unwrapFunctionWithPoly("trimEnd", StrProto, polyStrTrimEnd));
806
- ( _unwrapFunction("toUpperCase", StrProto));
807
- ( _unwrapFunction("toLowerCase", StrProto));
808
- var mathFloor = ( _pureRef(MathCls, "floor"));
809
- var mathCeil = ( _pureRef(MathCls, "ceil"));
810
- var mathTrunc = ( _pureAssign(( _pureRef(MathCls, "trunc")), polyMathTrunc));
811
- function polyMathTrunc(value) {
812
- var theValue = +value;
813
- return (theValue > 0 ? mathFloor : mathCeil)(theValue);
814
- }
815
- function mathToInt(value, throwInfinity) {
816
- var result = +value;
817
- if (throwInfinity && (result === Infinity || result == Infinity)) {
818
- throwRangeError("invalid value [" + dumpObj(value) + "]");
819
- }
820
- return result !== result || result === 0 ? 0 : mathTrunc(result);
821
- }
822
- var strRepeat = ( _unwrapFunctionWithPoly("repeat", StrProto, polyStrRepeat));
1001
+ var polyStrTrim = (_createTrimFn(/^\s+|(?=\s)\s+$/g));
1002
+ var polyStrTrimStart = (_createTrimFn(/^\s+/g));
1003
+ var polyStrTrimEnd = (_createTrimFn(/(?=\s)\s+$/g));
1004
+ var strTrim = (_unwrapFunctionWithPoly("trim", StrProto, polyStrTrim));
1005
+ (_unwrapFunctionWithPoly("trimStart", StrProto, polyStrTrimStart));
1006
+ (_unwrapFunctionWithPoly("trimEnd", StrProto, polyStrTrimEnd));
1007
+ (_unwrapFunction("toUpperCase", StrProto));
1008
+ (_unwrapFunction("toLowerCase", StrProto));
1009
+ var strRepeat = (_unwrapFunctionWithPoly("repeat", StrProto, polyStrRepeat));
823
1010
  function polyStrRepeat(value, count) {
824
1011
  _throwIfNullOrUndefined(value);
825
1012
  count = mathToInt(count, true);
@@ -852,74 +1039,18 @@
852
1039
  }
853
1040
  return result;
854
1041
  }
855
- ( _unwrapFunctionWithPoly("padStart", StrProto, polyStrPadStart));
856
- ( _unwrapFunctionWithPoly("padEnd", StrProto, polyStrPadEnd));
1042
+ (_unwrapFunctionWithPoly("padStart", StrProto, polyStrPadStart));
1043
+ (_unwrapFunctionWithPoly("padEnd", StrProto, polyStrPadEnd));
857
1044
  function polyStrPadStart(value, targetLength, padString) {
858
1045
  return _padValue(value, targetLength, padString) + value;
859
1046
  }
860
1047
  function polyStrPadEnd(value, targetLength, padString) {
861
1048
  return value + _padValue(value, targetLength, padString);
862
1049
  }
863
- var _fnToString;
864
- var _objCtrFnString;
865
- var _gblWindow;
866
- function isPlainObject(value) {
867
- if (!value || typeof value !== OBJECT) {
868
- return false;
869
- }
870
- if (!_gblWindow) {
871
- _gblWindow = hasWindow() ? getWindow() : true;
872
- }
873
- var result = false;
874
- if (value !== _gblWindow) {
875
- if (!_objCtrFnString) {
876
- _fnToString = Function[PROTOTYPE][TO_STRING];
877
- _objCtrFnString = _fnToString[CALL](ObjClass);
878
- }
879
- try {
880
- var proto = objGetPrototypeOf(value);
881
- result = !proto;
882
- if (!result) {
883
- if (objHasOwnProperty(proto, CONSTRUCTOR)) {
884
- proto = proto[CONSTRUCTOR];
885
- }
886
- result = !!(proto && typeof proto === FUNCTION && _fnToString[CALL](proto) === _objCtrFnString);
887
- }
888
- }
889
- catch (ex) {
890
- }
891
- }
892
- return result;
893
- }
894
- function polyStrSymSplit(value, splitter, limit) {
895
- var splitFn = splitter ? splitter[getKnownSymbol(9 )] : UNDEF_VALUE;
896
- return splitFn ? splitFn(value, limit) : [value];
897
- }
898
- ( _unwrapFunction("split", StrProto));
899
- ( _unwrapFunctionWithPoly("split", StrProto, polyStrSymSplit));
900
- ( _pureAssign(( _pureRef(NumberCls, "isInteger")), _polyNumberIsInteger));
901
- function _polyNumberIsInteger(value) {
902
- return isNumber(value) && !isNaN(value) &&
903
- isFinite(value) &&
904
- mathFloor(value) === value;
905
- }
906
- ( _pureRef(MathCls, "abs"));
907
- ( _pureRef(MathCls, "exp"));
908
- ( _pureRef(MathCls, "log"));
909
- ( _pureRef(MathCls, "asin"));
910
- ( _pureRef(MathCls, "acos"));
911
- ( _pureRef(MathCls, "atan"));
912
- ( _pureRef(MathCls, "atan2"));
913
- ( _pureRef(MathCls, "pow"));
914
- ( _pureRef(MathCls, "sqrt"));
915
- ( _pureRef(MathCls, "round"));
916
- ( _pureRef(MathCls, "sin"));
917
- ( _pureRef(MathCls, "cos"));
918
- ( _pureRef(MathCls, "tan"));
919
1050
  var _recursionCheckOwnDescriptors;
920
1051
  var _recursionCheckOwnSymbols;
921
- var _objGetOwnPropertyNames = ( _pureAssign(( _pureRef(ObjClass, GET_OWN_PROPERTY_NAMES)), _returnEmptyArray));
922
- var _objGetOwnPropertyDescriptor = ( _pureAssign(( _pureRef(ObjClass, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
1052
+ var _objGetOwnPropertyNames = (_pureAssign((_pureRef(ObjClass, GET_OWN_PROPERTY_NAMES)), _returnEmptyArray));
1053
+ var _objGetOwnPropertyDescriptor = (_pureAssign((_pureRef(ObjClass, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
923
1054
  function polyObjGetOwnPropertyDescriptors(obj) {
924
1055
  var result = {};
925
1056
  _throwIfNullOrUndefined(obj);
@@ -966,15 +1097,87 @@
966
1097
  }
967
1098
  return result;
968
1099
  }
969
- var objGetOwnPropertyDescriptor = ( _pureAssign(( _pureRef(ObjClass, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
970
- ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyDescriptors")), polyObjGetOwnPropertyDescriptors));
971
- ( _pureAssign(( _pureRef(ObjClass, GET_OWN_PROPERTY_NAMES)), _returnEmptyArray));
972
- ( _pureAssign(( _pureRef(ObjClass, GET_OWN_PROPERTY_SYMBOLS)), _returnEmptyArray));
1100
+ var objGetOwnPropertyDescriptor = (_pureAssign((_pureRef(ObjClass, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
1101
+ (_pureAssign((_pureRef(ObjClass, "getOwnPropertyDescriptors")), polyObjGetOwnPropertyDescriptors));
1102
+ (_pureAssign((_pureRef(ObjClass, GET_OWN_PROPERTY_NAMES)), _returnEmptyArray));
1103
+ (_pureAssign((_pureRef(ObjClass, GET_OWN_PROPERTY_SYMBOLS)), _returnEmptyArray));
1104
+ var _fnToString;
1105
+ var _objCtrFnString;
1106
+ var _gblWindow;
1107
+ function isPlainObject(value) {
1108
+ if (!value || typeof value !== OBJECT) {
1109
+ return false;
1110
+ }
1111
+ if (!_gblWindow) {
1112
+ _gblWindow = hasWindow() ? getWindow() : true;
1113
+ }
1114
+ var result = false;
1115
+ if (value !== _gblWindow) {
1116
+ if (!_objCtrFnString) {
1117
+ _fnToString = Function[PROTOTYPE][TO_STRING];
1118
+ _objCtrFnString = _fnToString[CALL](ObjClass);
1119
+ }
1120
+ try {
1121
+ var proto = objGetPrototypeOf(value);
1122
+ result = !proto;
1123
+ if (!result) {
1124
+ if (objHasOwnProperty(proto, CONSTRUCTOR)) {
1125
+ proto = proto[CONSTRUCTOR];
1126
+ }
1127
+ result = !!(proto && typeof proto === FUNCTION && _fnToString[CALL](proto) === _objCtrFnString);
1128
+ }
1129
+ }
1130
+ catch (ex) {
1131
+ }
1132
+ }
1133
+ return result;
1134
+ }
1135
+ function polyStrSymSplit(value, splitter, limit) {
1136
+ var splitFn = splitter ? splitter[getKnownSymbol(9 )] : UNDEF_VALUE;
1137
+ return splitFn ? splitFn(value, limit) : [value];
1138
+ }
1139
+ (_unwrapFunction("split", StrProto));
1140
+ (_unwrapFunctionWithPoly("split", StrProto, polyStrSymSplit));
1141
+ (_pureAssign((_pureRef(NumberCls, "isInteger")), _polyNumberIsInteger));
1142
+ function _polyNumberIsInteger(value) {
1143
+ return isNumber(value) && !isNaN(value) &&
1144
+ isFinite(value) &&
1145
+ mathFloor(value) === value;
1146
+ }
1147
+ function createLiteralRegex(matcher) {
1148
+ return new RegExp(strReplace(asString(matcher), /[.*+?^${}()|[\]\\]/g, "\\$&") || "(?:)", "g");
1149
+ }
1150
+ (_pureRef(MathCls, "abs"));
1151
+ (_pureRef(MathCls, "exp"));
1152
+ (_pureRef(MathCls, "log"));
1153
+ (_pureRef(MathCls, "asin"));
1154
+ (_pureRef(MathCls, "acos"));
1155
+ (_pureRef(MathCls, "atan"));
1156
+ (_pureRef(MathCls, "atan2"));
1157
+ (_pureRef(MathCls, "pow"));
1158
+ (_pureRef(MathCls, "sqrt"));
1159
+ (_pureRef(MathCls, "round"));
1160
+ (_pureRef(MathCls, "sin"));
1161
+ (_pureRef(MathCls, "cos"));
1162
+ (_pureRef(MathCls, "tan"));
973
1163
  function polyObjFromEntries(entries) {
974
1164
  var result = {};
1165
+ function _defineProtoValue(value) {
1166
+ Object.defineProperty(result, __PROTO__, {
1167
+ value: value,
1168
+ enumerable: true,
1169
+ configurable: true,
1170
+ writable: true
1171
+ });
1172
+ }
975
1173
  function addEntry(entry) {
976
1174
  if (isArray(entry) && entry.length >= 2) {
977
- result[entry[0]] = entry[1];
1175
+ if (entry[0] === __PROTO__) {
1176
+ _defineProtoValue(entry[1]);
1177
+ }
1178
+ else {
1179
+ result[entry[0]] = entry[1];
1180
+ }
978
1181
  }
979
1182
  }
980
1183
  if (isArray(entries)) {
@@ -985,26 +1188,125 @@
985
1188
  }
986
1189
  return result;
987
1190
  }
988
- ( _pureAssign(( _pureRef(ObjClass, "fromEntries")), polyObjFromEntries));
989
- ( _pureAssign(( _pureRef(ObjClass, "preventExtensions")), _doNothing));
990
- ( _pureAssign(( _pureRef(ObjClass, "isExtensible")), _returnFalse));
991
- var strEndsWith = ( _unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith));
1191
+ (_pureAssign((_pureRef(ObjClass, "fromEntries")), polyObjFromEntries));
1192
+ (_pureAssign((_pureRef(ObjClass, "preventExtensions")), _doNothing));
1193
+ (_pureAssign((_pureRef(ObjClass, "isExtensible")), _returnFalse));
1194
+ var strIndexOf = (_unwrapFunction("indexOf", StrProto));
1195
+ (_unwrapFunction("lastIndexOf", StrProto));
1196
+ (_unwrapFunctionWithPoly("at", StrProto, polyStrAt));
1197
+ function polyStrAt(value, index) {
1198
+ _throwIfNullOrUndefined(value);
1199
+ return polyArrAt(asString(value), mathToInt(index));
1200
+ }
1201
+ var strEndsWith = (_unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith));
992
1202
  function polyStrEndsWith(value, searchString, length) {
993
1203
  _throwIfNotString(value);
994
1204
  var searchValue = isString(searchString) ? searchString : asString(searchString);
995
1205
  var end = (!isUndefined(length) && length < value[LENGTH]) ? length : value[LENGTH];
996
1206
  return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
997
1207
  }
998
- var strIndexOf = ( _unwrapFunction("indexOf", StrProto));
999
- ( _unwrapFunction("lastIndexOf", StrProto));
1000
- ( _unwrapFunctionWithPoly("includes", StrProto, polyStrIncludes));
1208
+ (_unwrapFunctionWithPoly("includes", StrProto, polyStrIncludes));
1001
1209
  function polyStrIncludes(value, searchString, position) {
1002
1210
  if (isRegExp(searchString)) {
1003
1211
  throwTypeError("'searchString' must not be a regular expression" + dumpObj(searchString));
1004
1212
  }
1005
1213
  return strIndexOf(value, asString(searchString), position) !== -1;
1006
1214
  }
1007
- ( _unwrapFunctionWithPoly("startsWith", StrProto, polyStrStartsWith));
1215
+ (_unwrapFunctionWithPoly("matchAll", StrProto, polyStrMatchAll));
1216
+ function _cloneRegExp(theRegex) {
1217
+ var flags = theRegex.flags;
1218
+ if (flags === undefined) {
1219
+ flags = EMPTY;
1220
+ theRegex.global && (flags += "g");
1221
+ theRegex.ignoreCase && (flags += "i");
1222
+ theRegex.multiline && (flags += "m");
1223
+ theRegex.dotAll && (flags += "s");
1224
+ theRegex.unicode && (flags += "u");
1225
+ theRegex.sticky && (flags += "y");
1226
+ }
1227
+ var result = new RegExp(theRegex.source, flags);
1228
+ result.lastIndex = mathMax(0, theRegex.lastIndex);
1229
+ return result;
1230
+ }
1231
+ function _advanceStringIndex(value, index, unicode) {
1232
+ var newIndex = index + 1;
1233
+ if (unicode) {
1234
+ if (index < value.length) {
1235
+ var first = value.charCodeAt(index);
1236
+ if (first >= 0xD800 && first <= 0xDBFF) {
1237
+ var second = value.charCodeAt(index + 1);
1238
+ if (second >= 0xDC00 && second <= 0xDFFF) {
1239
+ newIndex++;
1240
+ }
1241
+ }
1242
+ }
1243
+ }
1244
+ return newIndex;
1245
+ }
1246
+ function polyStrMatchAll(value, matcher) {
1247
+ _throwIfNullOrUndefined(value);
1248
+ var result;
1249
+ var matchSym = getKnownSymbol(4 );
1250
+ var isMatcherRegExp = isRegExp(matcher)
1251
+ && (!matcher || isStrictNullOrUndefined(matcher[matchSym]) || matcher[matchSym] !== false);
1252
+ if (isMatcherRegExp && !matcher.global) {
1253
+ throwTypeError("matcher must be a global regular expression");
1254
+ }
1255
+ var theValue = asString(value);
1256
+ var matchAllFn = matcher && matcher[getKnownSymbol(5 )];
1257
+ if (isFunction(matchAllFn)) {
1258
+ result = matchAllFn.call(matcher, theValue);
1259
+ }
1260
+ else {
1261
+ var theRegex_1 = isMatcherRegExp ? _cloneRegExp(matcher) : new RegExp(matcher, "g");
1262
+ var ctx_1 = {
1263
+ n: function () {
1264
+ var match = theRegex_1.exec(theValue);
1265
+ if (!match) {
1266
+ return true;
1267
+ }
1268
+ if (match[0] === EMPTY) {
1269
+ theRegex_1.lastIndex = _advanceStringIndex(theValue, theRegex_1.lastIndex, !!theRegex_1.unicode);
1270
+ }
1271
+ ctx_1.v = match;
1272
+ return false;
1273
+ },
1274
+ v: undefined
1275
+ };
1276
+ result = createIterableIterator(ctx_1);
1277
+ }
1278
+ return result;
1279
+ }
1280
+ (_unwrapFunctionWithPoly("replaceAll", StrProto, polyStrReplaceAll));
1281
+ function polyStrReplaceAll(value, searchValue, replaceValue) {
1282
+ _throwIfNullOrUndefined(value);
1283
+ var matchSymbol = getKnownSymbol(4 );
1284
+ var replaceSymbol = getKnownSymbol(6 );
1285
+ var replaceFn;
1286
+ var matcher;
1287
+ var isRegex = isRegExp(searchValue);
1288
+ var theValue = isString(value) ? value : asString(value);
1289
+ var isSearchNotNull = searchValue || !isStrictNullOrUndefined(searchValue);
1290
+ if (isRegex && isSearchNotNull) {
1291
+ isRegex = searchValue[matchSymbol] !== false;
1292
+ }
1293
+ if (isRegex) {
1294
+ if (!searchValue.global) {
1295
+ throwTypeError("searchValue must be a global regular expression");
1296
+ }
1297
+ matcher = searchValue;
1298
+ }
1299
+ else {
1300
+ replaceFn = isSearchNotNull ? searchValue[replaceSymbol] : null;
1301
+ if (isFunction(replaceFn)) {
1302
+ return replaceFn.call(searchValue, theValue, replaceValue);
1303
+ }
1304
+ var search = isString(searchValue) ? searchValue : asString(searchValue);
1305
+ matcher = createLiteralRegex(search);
1306
+ }
1307
+ return strReplace(theValue, matcher, replaceValue);
1308
+ }
1309
+ (_unwrapFunctionWithPoly("startsWith", StrProto, polyStrStartsWith));
1008
1310
  function polyStrStartsWith(value, searchString, position) {
1009
1311
  _throwIfNotString(value);
1010
1312
  var searchValue = isString(searchString) ? searchString : asString(searchString);
@@ -1163,9 +1465,11 @@
1163
1465
  var DynInstFuncTable = '_dynInstFuncs';
1164
1466
  var DynProxyTag = '_isDynProxy';
1165
1467
  var DynClassName = '_dynClass';
1468
+ var DynBaseProtoFuncs = '_dynBaseFuncs';
1166
1469
  var DynClassNamePrefix = '_dynCls$';
1167
1470
  var DynInstChkTag = '_dynInstChk';
1168
1471
  var DynAllowInstChkTag = DynInstChkTag;
1472
+ var DynResolvedCachePrefix = '_dyn_r$';
1169
1473
  var DynProtoDefaultOptions = '_dfOpts';
1170
1474
  var UnknownValue = '_unknown_';
1171
1475
  var str__Proto = "__proto__";
@@ -1248,6 +1552,25 @@
1248
1552
  }
1249
1553
  return false;
1250
1554
  }
1555
+ function _getBaseProtoFuncs(classProto) {
1556
+ if (objHasOwnProperty(classProto, DynBaseProtoFuncs)) {
1557
+ return classProto[DynBaseProtoFuncs];
1558
+ }
1559
+ var baseFuncSources = objCreate(null);
1560
+ var baseProto = _getObjProto(classProto);
1561
+ var visited = [];
1562
+ while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
1563
+ _forEachProp(baseProto, function (name) {
1564
+ if (!baseFuncSources[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {
1565
+ baseFuncSources[name] = baseProto;
1566
+ }
1567
+ });
1568
+ visited.push(baseProto);
1569
+ baseProto = _getObjProto(baseProto);
1570
+ }
1571
+ classProto[DynBaseProtoFuncs] = baseFuncSources;
1572
+ return baseFuncSources;
1573
+ }
1251
1574
  function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
1252
1575
  function _instFuncProxy(target, funcHost, funcName) {
1253
1576
  var theFunc = funcHost[funcName];
@@ -1265,16 +1588,11 @@
1265
1588
  _forEachProp(instFuncs, function (name) {
1266
1589
  baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
1267
1590
  });
1268
- var baseProto = _getObjProto(classProto);
1269
- var visited = [];
1270
- while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
1271
- _forEachProp(baseProto, function (name) {
1272
- if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {
1273
- baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
1274
- }
1275
- });
1276
- visited.push(baseProto);
1277
- baseProto = _getObjProto(baseProto);
1591
+ var baseFuncSources = _getBaseProtoFuncs(classProto);
1592
+ for (var name_2 in baseFuncSources) {
1593
+ if (!baseFuncs[name_2]) {
1594
+ baseFuncs[name_2] = _instFuncProxy(thisTarget, baseFuncSources[name_2], name_2);
1595
+ }
1278
1596
  }
1279
1597
  return baseFuncs;
1280
1598
  }
@@ -1288,16 +1606,18 @@
1288
1606
  }
1289
1607
  if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
1290
1608
  var canAddInst = !objHasOwnProperty(target, funcName);
1291
- var objProto = _getObjProto(target);
1292
- var visited = [];
1293
- while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
1294
- var protoFunc = objProto[funcName];
1295
- if (protoFunc) {
1296
- canAddInst = (protoFunc === currentDynProtoProxy);
1297
- break;
1609
+ if (canAddInst) {
1610
+ var objProto = _getObjProto(target);
1611
+ var visited = [];
1612
+ while (objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
1613
+ var protoFunc = objProto[funcName];
1614
+ if (protoFunc) {
1615
+ canAddInst = (protoFunc === currentDynProtoProxy);
1616
+ break;
1617
+ }
1618
+ visited.push(objProto);
1619
+ objProto = _getObjProto(objProto);
1298
1620
  }
1299
- visited.push(objProto);
1300
- objProto = _getObjProto(objProto);
1301
1621
  }
1302
1622
  try {
1303
1623
  if (canAddInst) {
@@ -1324,25 +1644,34 @@
1324
1644
  }
1325
1645
  function _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {
1326
1646
  function _createDynamicPrototype(proto, funcName) {
1647
+ var cacheKey = DynResolvedCachePrefix + className + "." + funcName;
1327
1648
  var dynProtoProxy = function () {
1328
- var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
1649
+ var instFuncTable = this[DynInstFuncTable];
1650
+ var instFunc = instFuncTable ? instFuncTable[cacheKey] : undefined;
1651
+ if (!instFunc) {
1652
+ instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
1653
+ if (instFuncTable) {
1654
+ instFuncTable[cacheKey] = instFunc;
1655
+ }
1656
+ }
1329
1657
  return instFunc.apply(this, arguments);
1330
1658
  };
1331
1659
  dynProtoProxy[DynProxyTag] = 1;
1332
1660
  return dynProtoProxy;
1333
1661
  }
1334
1662
  if (!_isObjectOrArrayPrototype(proto)) {
1335
- var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || objCreate(null);
1336
- if (!_isObjectOrArrayPrototype(instFuncTable)) {
1337
- var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || objCreate(null));
1338
- if (instFuncTable[DynAllowInstChkTag] !== false) {
1339
- instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
1663
+ var instFuncTable_1 = target[DynInstFuncTable] = target[DynInstFuncTable] || objCreate(null);
1664
+ if (!_isObjectOrArrayPrototype(instFuncTable_1)) {
1665
+ var instFuncs_1 = instFuncTable_1[className] = (instFuncTable_1[className] || objCreate(null));
1666
+ if (instFuncTable_1[DynAllowInstChkTag] !== false) {
1667
+ instFuncTable_1[DynAllowInstChkTag] = !!setInstanceFunc;
1340
1668
  }
1341
1669
  if (!_isObjectOrArrayPrototype(instFuncs_1)) {
1342
1670
  _forEachProp(target, function (name) {
1343
1671
  if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
1344
1672
  instFuncs_1[name] = target[name];
1345
1673
  delete target[name];
1674
+ delete instFuncTable_1[DynResolvedCachePrefix + className + "." + name];
1346
1675
  if (!objHasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
1347
1676
  proto[name] = _createDynamicPrototype(proto, name);
1348
1677
  }
@@ -1695,7 +2024,7 @@
1695
2024
  return result;
1696
2025
  }
1697
2026
 
1698
- var version = '3.4.2-nightly3.2605-01';
2027
+ var version = "3.4.2";
1699
2028
  var instanceName = "." + newId(6);
1700
2029
  var _dataUid = 0;
1701
2030
  function _canAcceptData(target) {
@@ -3608,7 +3937,7 @@
3608
3937
  return BaseTelemetryPlugin;
3609
3938
  }());
3610
3939
 
3611
- var SeverityLevel = ( createEnumStyle({
3940
+ var SeverityLevel = (createEnumStyle({
3612
3941
  Verbose: 0 ,
3613
3942
  Information: 1 ,
3614
3943
  Warning: 2 ,