babel-source 5.1.11 → 5.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/babel.js +386 -217
- data/lib/babel/external-helpers.js +37 -6
- data/lib/babel/polyfill.js +488 -334
- data/lib/babel/source.rb +2 -2
- metadata +2 -2
@@ -73,7 +73,10 @@
|
|
73
73
|
}
|
74
74
|
}
|
75
75
|
|
76
|
-
if (
|
76
|
+
if (descriptor.initializer) {
|
77
|
+
initializers[key] = descriptor;
|
78
|
+
continue;
|
79
|
+
}
|
77
80
|
}
|
78
81
|
|
79
82
|
Object.defineProperty(target, key, descriptor);
|
@@ -98,7 +101,7 @@
|
|
98
101
|
delete descriptor.decorators;
|
99
102
|
descriptor.enumerable = true;
|
100
103
|
descriptor.configurable = true;
|
101
|
-
|
104
|
+
descriptor.writable = true;
|
102
105
|
|
103
106
|
if (decorators) {
|
104
107
|
for (var f = 0; f < decorators.length; f++) {
|
@@ -112,12 +115,23 @@
|
|
112
115
|
}
|
113
116
|
}
|
114
117
|
|
118
|
+
descriptor.value = descriptor.initializer();
|
115
119
|
Object.defineProperty(target, key, descriptor);
|
116
120
|
}
|
117
121
|
|
118
122
|
return target;
|
119
123
|
};
|
120
124
|
|
125
|
+
babelHelpers.defineDecoratedPropertyDescriptor = function (target, key, descriptors) {
|
126
|
+
var _descriptor = descriptors[key];
|
127
|
+
var descriptor = {};
|
128
|
+
|
129
|
+
for (var _key in _descriptor) descriptor[_key] = _descriptor[_key];
|
130
|
+
|
131
|
+
descriptor.value = descriptor.initializer();
|
132
|
+
Object.defineProperty(target, key, descriptor);
|
133
|
+
};
|
134
|
+
|
121
135
|
babelHelpers.taggedTemplateLiteral = function (strings, raw) {
|
122
136
|
return Object.freeze(Object.defineProperties(strings, {
|
123
137
|
raw: {
|
@@ -131,10 +145,6 @@
|
|
131
145
|
return strings;
|
132
146
|
};
|
133
147
|
|
134
|
-
babelHelpers.interopRequire = function (obj) {
|
135
|
-
return obj && obj.__esModule ? obj["default"] : obj;
|
136
|
-
};
|
137
|
-
|
138
148
|
babelHelpers.toArray = function (arr) {
|
139
149
|
return Array.isArray(arr) ? arr : Array.from(arr);
|
140
150
|
};
|
@@ -253,6 +263,23 @@
|
|
253
263
|
};
|
254
264
|
|
255
265
|
babelHelpers.interopRequireWildcard = function (obj) {
|
266
|
+
if (obj && obj.__esModule) {
|
267
|
+
return obj;
|
268
|
+
} else {
|
269
|
+
var newObj = {};
|
270
|
+
|
271
|
+
if (typeof obj === "object" && obj !== null) {
|
272
|
+
for (var key in obj) {
|
273
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
|
274
|
+
}
|
275
|
+
}
|
276
|
+
|
277
|
+
newObj["default"] = obj;
|
278
|
+
return newObj;
|
279
|
+
}
|
280
|
+
};
|
281
|
+
|
282
|
+
babelHelpers.interopRequireDefault = function (obj) {
|
256
283
|
return obj && obj.__esModule ? obj : {
|
257
284
|
"default": obj
|
258
285
|
};
|
@@ -355,4 +382,8 @@
|
|
355
382
|
|
356
383
|
return props;
|
357
384
|
};
|
385
|
+
|
386
|
+
babelHelpers.interopRequire = function (obj) {
|
387
|
+
return obj && obj.__esModule ? obj["default"] : obj;
|
388
|
+
};
|
358
389
|
})(typeof global === "undefined" ? self : global);
|
data/lib/babel/polyfill.js
CHANGED
@@ -11,7 +11,18 @@ require("core-js/shim");
|
|
11
11
|
|
12
12
|
require("regenerator/runtime");
|
13
13
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
14
|
-
},{"core-js/shim":
|
14
|
+
},{"core-js/shim":81,"regenerator/runtime":82}],2:[function(require,module,exports){
|
15
|
+
module.exports = function(KEY, TYPE){
|
16
|
+
var $def = require('./$.def')
|
17
|
+
, $export = {}
|
18
|
+
, forced = true;
|
19
|
+
// Shouldn't skip holes
|
20
|
+
if(KEY in [])Array(1)[KEY](function(){ forced = false; });
|
21
|
+
$export[KEY] = require('./$.array-methods')(TYPE);
|
22
|
+
$def($def.P + $def.F * forced, 'Array', $export);
|
23
|
+
require('./$.unscope')(KEY);
|
24
|
+
};
|
25
|
+
},{"./$.array-methods":4,"./$.def":13,"./$.unscope":34}],3:[function(require,module,exports){
|
15
26
|
'use strict';
|
16
27
|
// false -> Array#indexOf
|
17
28
|
// true -> Array#includes
|
@@ -30,7 +41,7 @@ module.exports = function(IS_INCLUDES){
|
|
30
41
|
} return !IS_INCLUDES && -1;
|
31
42
|
};
|
32
43
|
};
|
33
|
-
},{"./$":
|
44
|
+
},{"./$":23}],4:[function(require,module,exports){
|
34
45
|
'use strict';
|
35
46
|
// 0 -> Array#forEach
|
36
47
|
// 1 -> Array#map
|
@@ -72,7 +83,7 @@ module.exports = function(TYPE){
|
|
72
83
|
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
|
73
84
|
};
|
74
85
|
};
|
75
|
-
},{"./$":
|
86
|
+
},{"./$":23,"./$.ctx":12}],5:[function(require,module,exports){
|
76
87
|
var $ = require('./$');
|
77
88
|
function assert(condition, msg1, msg2){
|
78
89
|
if(!condition)throw TypeError(msg2 ? msg1 + msg2 : msg1);
|
@@ -91,18 +102,19 @@ assert.inst = function(it, Constructor, name){
|
|
91
102
|
return it;
|
92
103
|
};
|
93
104
|
module.exports = assert;
|
94
|
-
},{"./$":
|
95
|
-
var $
|
105
|
+
},{"./$":23}],6:[function(require,module,exports){
|
106
|
+
var $ = require('./$')
|
107
|
+
, enumKeys = require('./$.enum-keys');
|
96
108
|
// 19.1.2.1 Object.assign(target, source, ...)
|
97
|
-
/*eslint-disable no-unused-vars */
|
109
|
+
/* eslint-disable no-unused-vars */
|
98
110
|
module.exports = Object.assign || function assign(target, source){
|
99
|
-
/*eslint-enable no-unused-vars */
|
111
|
+
/* eslint-enable no-unused-vars */
|
100
112
|
var T = Object($.assertDefined(target))
|
101
113
|
, l = arguments.length
|
102
114
|
, i = 1;
|
103
115
|
while(l > i){
|
104
116
|
var S = $.ES5Object(arguments[i++])
|
105
|
-
, keys =
|
117
|
+
, keys = enumKeys(S)
|
106
118
|
, length = keys.length
|
107
119
|
, j = 0
|
108
120
|
, key;
|
@@ -110,7 +122,7 @@ module.exports = Object.assign || function assign(target, source){
|
|
110
122
|
}
|
111
123
|
return T;
|
112
124
|
};
|
113
|
-
},{"./$":
|
125
|
+
},{"./$":23,"./$.enum-keys":15}],7:[function(require,module,exports){
|
114
126
|
var $ = require('./$')
|
115
127
|
, TAG = require('./$.wks')('toStringTag')
|
116
128
|
, toString = {}.toString;
|
@@ -126,18 +138,18 @@ cof.set = function(it, tag, stat){
|
|
126
138
|
if(it && !$.has(it = stat ? it : it.prototype, TAG))$.hide(it, TAG, tag);
|
127
139
|
};
|
128
140
|
module.exports = cof;
|
129
|
-
},{"./$":
|
141
|
+
},{"./$":23,"./$.wks":35}],8:[function(require,module,exports){
|
130
142
|
'use strict';
|
131
143
|
var $ = require('./$')
|
132
144
|
, ctx = require('./$.ctx')
|
133
145
|
, safe = require('./$.uid').safe
|
134
146
|
, assert = require('./$.assert')
|
135
|
-
,
|
147
|
+
, forOf = require('./$.for-of')
|
148
|
+
, step = require('./$.iter').step
|
136
149
|
, has = $.has
|
137
150
|
, set = $.set
|
138
151
|
, isObject = $.isObject
|
139
152
|
, hide = $.hide
|
140
|
-
, step = $iter.step
|
141
153
|
, isFrozen = Object.isFrozen || $.core.Object.isFrozen
|
142
154
|
, ID = safe('id')
|
143
155
|
, O1 = safe('O1')
|
@@ -173,13 +185,14 @@ function getEntry(that, key){
|
|
173
185
|
|
174
186
|
module.exports = {
|
175
187
|
getConstructor: function(NAME, IS_MAP, ADDER){
|
176
|
-
function C(
|
177
|
-
var that
|
188
|
+
function C(){
|
189
|
+
var that = assert.inst(this, C, NAME)
|
190
|
+
, iterable = arguments[0];
|
178
191
|
set(that, O1, $.create(null));
|
179
192
|
set(that, SIZE, 0);
|
180
193
|
set(that, LAST, undefined);
|
181
194
|
set(that, FIRST, undefined);
|
182
|
-
if(iterable != undefined)
|
195
|
+
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
|
183
196
|
}
|
184
197
|
$.mix(C.prototype, {
|
185
198
|
// 23.1.3.1 Map.prototype.clear()
|
@@ -258,35 +271,49 @@ module.exports = {
|
|
258
271
|
} return that;
|
259
272
|
},
|
260
273
|
getEntry: getEntry,
|
261
|
-
|
262
|
-
|
274
|
+
// add .keys, .values, .entries, [@@iterator]
|
275
|
+
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
|
276
|
+
setIter: function(C, NAME, IS_MAP){
|
277
|
+
require('./$.iter-define')(C, NAME, function(iterated, kind){
|
263
278
|
set(this, ITER, {o: iterated, k: kind});
|
264
|
-
}
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
return step
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
return step(0, [entry.k, entry.v]);
|
279
|
+
}, function(){
|
280
|
+
var iter = this[ITER]
|
281
|
+
, kind = iter.k
|
282
|
+
, entry = iter.l;
|
283
|
+
// revert to the last existing entry
|
284
|
+
while(entry && entry.r)entry = entry.p;
|
285
|
+
// get next entry
|
286
|
+
if(!iter.o || !(iter.l = entry = entry ? entry.n : iter.o[FIRST])){
|
287
|
+
// or finish the iteration
|
288
|
+
iter.o = undefined;
|
289
|
+
return step(1);
|
290
|
+
}
|
291
|
+
// return step by kind
|
292
|
+
if(kind == 'keys' )return step(0, entry.k);
|
293
|
+
if(kind == 'values')return step(0, entry.v);
|
294
|
+
return step(0, [entry.k, entry.v]);
|
295
|
+
}, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);
|
282
296
|
}
|
283
297
|
};
|
284
|
-
},{"./$":
|
298
|
+
},{"./$":23,"./$.assert":5,"./$.ctx":12,"./$.for-of":16,"./$.iter":22,"./$.iter-define":20,"./$.uid":33}],9:[function(require,module,exports){
|
299
|
+
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
|
300
|
+
var $def = require('./$.def')
|
301
|
+
, forOf = require('./$.for-of');
|
302
|
+
module.exports = function(NAME){
|
303
|
+
$def($def.P, NAME, {
|
304
|
+
toJSON: function toJSON(){
|
305
|
+
var arr = [];
|
306
|
+
forOf(this, false, arr.push, arr);
|
307
|
+
return arr;
|
308
|
+
}
|
309
|
+
});
|
310
|
+
};
|
311
|
+
},{"./$.def":13,"./$.for-of":16}],10:[function(require,module,exports){
|
285
312
|
'use strict';
|
286
313
|
var $ = require('./$')
|
287
314
|
, safe = require('./$.uid').safe
|
288
315
|
, assert = require('./$.assert')
|
289
|
-
, forOf = require('./$.
|
316
|
+
, forOf = require('./$.for-of')
|
290
317
|
, _has = $.has
|
291
318
|
, isObject = $.isObject
|
292
319
|
, hide = $.hide
|
@@ -331,8 +358,9 @@ function leakStore(that){
|
|
331
358
|
|
332
359
|
module.exports = {
|
333
360
|
getConstructor: function(NAME, IS_MAP, ADDER){
|
334
|
-
function C(
|
361
|
+
function C(){
|
335
362
|
$.set(assert.inst(this, C, NAME), ID, id++);
|
363
|
+
var iterable = arguments[0];
|
336
364
|
if(iterable != undefined)forOf(iterable, IS_MAP, this[ADDER], this);
|
337
365
|
}
|
338
366
|
$.mix(C.prototype, {
|
@@ -365,14 +393,16 @@ module.exports = {
|
|
365
393
|
WEAK: WEAK,
|
366
394
|
ID: ID
|
367
395
|
};
|
368
|
-
},{"./$":
|
396
|
+
},{"./$":23,"./$.array-methods":4,"./$.assert":5,"./$.for-of":16,"./$.uid":33}],11:[function(require,module,exports){
|
369
397
|
'use strict';
|
370
398
|
var $ = require('./$')
|
371
399
|
, $def = require('./$.def')
|
372
|
-
,
|
400
|
+
, BUGGY = require('./$.iter').BUGGY
|
401
|
+
, forOf = require('./$.for-of')
|
402
|
+
, species = require('./$.species')
|
373
403
|
, assertInstance = require('./$.assert').inst;
|
374
404
|
|
375
|
-
module.exports = function(NAME, methods, common, IS_MAP,
|
405
|
+
module.exports = function(NAME, methods, common, IS_MAP, IS_WEAK){
|
376
406
|
var Base = $.g[NAME]
|
377
407
|
, C = Base
|
378
408
|
, ADDER = IS_MAP ? 'set' : 'add'
|
@@ -385,26 +415,27 @@ module.exports = function(NAME, methods, common, IS_MAP, isWeak){
|
|
385
415
|
return CHAIN ? this : result;
|
386
416
|
};
|
387
417
|
}
|
388
|
-
if(!$.isFunction(C) || !(
|
418
|
+
if(!$.isFunction(C) || !(IS_WEAK || !BUGGY && proto.forEach && proto.entries)){
|
389
419
|
// create collection constructor
|
390
420
|
C = common.getConstructor(NAME, IS_MAP, ADDER);
|
391
421
|
$.mix(C.prototype, methods);
|
392
422
|
} else {
|
393
423
|
var inst = new C
|
394
|
-
, chain = inst[ADDER](
|
424
|
+
, chain = inst[ADDER](IS_WEAK ? {} : -0, 1)
|
395
425
|
, buggyZero;
|
396
426
|
// wrap for init collections from iterable
|
397
427
|
if(!require('./$.iter-detect')(function(iter){ new C(iter); })){ // eslint-disable-line no-new
|
398
|
-
C = function(
|
428
|
+
C = function(){
|
399
429
|
assertInstance(this, C, NAME);
|
400
|
-
var that
|
401
|
-
|
430
|
+
var that = new Base
|
431
|
+
, iterable = arguments[0];
|
432
|
+
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
|
402
433
|
return that;
|
403
434
|
};
|
404
435
|
C.prototype = proto;
|
405
436
|
if($.FW)proto.constructor = C;
|
406
437
|
}
|
407
|
-
|
438
|
+
IS_WEAK || inst.forEach(function(val, key){
|
408
439
|
buggyZero = 1 / key === -Infinity;
|
409
440
|
});
|
410
441
|
// fix converting -0 key to +0
|
@@ -418,22 +449,17 @@ module.exports = function(NAME, methods, common, IS_MAP, isWeak){
|
|
418
449
|
}
|
419
450
|
|
420
451
|
require('./$.cof').set(C, NAME);
|
421
|
-
require('./$.species')(C);
|
422
452
|
|
423
453
|
O[NAME] = C;
|
424
454
|
$def($def.G + $def.W + $def.F * (C != Base), O);
|
455
|
+
species(C);
|
456
|
+
species($.core[NAME]); // for wrapper
|
425
457
|
|
426
|
-
|
427
|
-
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
|
428
|
-
if(!isWeak)$iter.std(
|
429
|
-
C, NAME,
|
430
|
-
common.getIterConstructor(), common.next,
|
431
|
-
IS_MAP ? 'key+value' : 'value' , !IS_MAP, true
|
432
|
-
);
|
458
|
+
if(!IS_WEAK)common.setIter(C, NAME, IS_MAP);
|
433
459
|
|
434
460
|
return C;
|
435
461
|
};
|
436
|
-
},{"./$":
|
462
|
+
},{"./$":23,"./$.assert":5,"./$.cof":7,"./$.def":13,"./$.for-of":16,"./$.iter":22,"./$.iter-detect":21,"./$.species":29}],12:[function(require,module,exports){
|
437
463
|
// Optional / simple context binding
|
438
464
|
var assertFunction = require('./$.assert').fn;
|
439
465
|
module.exports = function(fn, that, length){
|
@@ -453,7 +479,7 @@ module.exports = function(fn, that, length){
|
|
453
479
|
return fn.apply(that, arguments);
|
454
480
|
};
|
455
481
|
};
|
456
|
-
},{"./$.assert":
|
482
|
+
},{"./$.assert":5}],13:[function(require,module,exports){
|
457
483
|
var $ = require('./$')
|
458
484
|
, global = $.g
|
459
485
|
, core = $.core
|
@@ -496,13 +522,47 @@ function $def(type, name, source){
|
|
496
522
|
}
|
497
523
|
}
|
498
524
|
module.exports = $def;
|
499
|
-
},{"./$":
|
525
|
+
},{"./$":23}],14:[function(require,module,exports){
|
526
|
+
var $ = require('./$')
|
527
|
+
, document = $.g.document
|
528
|
+
, isObject = $.isObject
|
529
|
+
// in old IE typeof document.createElement is 'object'
|
530
|
+
, is = isObject(document) && isObject(document.createElement);
|
531
|
+
module.exports = function(it){
|
532
|
+
return is ? document.createElement(it) : {};
|
533
|
+
};
|
534
|
+
},{"./$":23}],15:[function(require,module,exports){
|
535
|
+
var $ = require('./$');
|
536
|
+
module.exports = function(it){
|
537
|
+
var keys = $.getKeys(it)
|
538
|
+
, getDesc = $.getDesc
|
539
|
+
, getSymbols = $.getSymbols;
|
540
|
+
if(getSymbols)$.each.call(getSymbols(it), function(key){
|
541
|
+
if(getDesc(it, key).enumerable)keys.push(key);
|
542
|
+
});
|
543
|
+
return keys;
|
544
|
+
};
|
545
|
+
},{"./$":23}],16:[function(require,module,exports){
|
546
|
+
var ctx = require('./$.ctx')
|
547
|
+
, get = require('./$.iter').get
|
548
|
+
, call = require('./$.iter-call');
|
549
|
+
module.exports = function(iterable, entries, fn, that){
|
550
|
+
var iterator = get(iterable)
|
551
|
+
, f = ctx(fn, that, entries ? 2 : 1)
|
552
|
+
, step;
|
553
|
+
while(!(step = iterator.next()).done){
|
554
|
+
if(call(iterator, f, step.value, entries) === false){
|
555
|
+
return call.close(iterator);
|
556
|
+
}
|
557
|
+
}
|
558
|
+
};
|
559
|
+
},{"./$.ctx":12,"./$.iter":22,"./$.iter-call":19}],17:[function(require,module,exports){
|
500
560
|
module.exports = function($){
|
501
561
|
$.FW = true;
|
502
562
|
$.path = $.g;
|
503
563
|
return $;
|
504
564
|
};
|
505
|
-
},{}],
|
565
|
+
},{}],18:[function(require,module,exports){
|
506
566
|
// Fast apply
|
507
567
|
// http://jsperf.lnkit.com/fast-apply/5
|
508
568
|
module.exports = function(fn, args, that){
|
@@ -522,7 +582,68 @@ module.exports = function(fn, args, that){
|
|
522
582
|
: fn.call(that, args[0], args[1], args[2], args[3], args[4]);
|
523
583
|
} return fn.apply(that, args);
|
524
584
|
};
|
525
|
-
},{}],
|
585
|
+
},{}],19:[function(require,module,exports){
|
586
|
+
var assertObject = require('./$.assert').obj;
|
587
|
+
function close(iterator){
|
588
|
+
var ret = iterator['return'];
|
589
|
+
if(ret !== undefined)assertObject(ret.call(iterator));
|
590
|
+
}
|
591
|
+
function call(iterator, fn, value, entries){
|
592
|
+
try {
|
593
|
+
return entries ? fn(assertObject(value)[0], value[1]) : fn(value);
|
594
|
+
} catch(e){
|
595
|
+
close(iterator);
|
596
|
+
throw e;
|
597
|
+
}
|
598
|
+
}
|
599
|
+
call.close = close;
|
600
|
+
module.exports = call;
|
601
|
+
},{"./$.assert":5}],20:[function(require,module,exports){
|
602
|
+
var $def = require('./$.def')
|
603
|
+
, $ = require('./$')
|
604
|
+
, cof = require('./$.cof')
|
605
|
+
, $iter = require('./$.iter')
|
606
|
+
, SYMBOL_ITERATOR = require('./$.wks')('iterator')
|
607
|
+
, FF_ITERATOR = '@@iterator'
|
608
|
+
, VALUES = 'values'
|
609
|
+
, Iterators = $iter.Iterators;
|
610
|
+
module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){
|
611
|
+
$iter.create(Constructor, NAME, next);
|
612
|
+
function createMethod(kind){
|
613
|
+
return function(){
|
614
|
+
return new Constructor(this, kind);
|
615
|
+
};
|
616
|
+
}
|
617
|
+
var TAG = NAME + ' Iterator'
|
618
|
+
, proto = Base.prototype
|
619
|
+
, _native = proto[SYMBOL_ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
|
620
|
+
, _default = _native || createMethod(DEFAULT)
|
621
|
+
, methods, key;
|
622
|
+
// Fix native
|
623
|
+
if(_native){
|
624
|
+
var IteratorPrototype = $.getProto(_default.call(new Base));
|
625
|
+
// Set @@toStringTag to native iterators
|
626
|
+
cof.set(IteratorPrototype, TAG, true);
|
627
|
+
// FF fix
|
628
|
+
if($.FW && $.has(proto, FF_ITERATOR))$iter.set(IteratorPrototype, $.that);
|
629
|
+
}
|
630
|
+
// Define iterator
|
631
|
+
if($.FW)$iter.set(proto, _default);
|
632
|
+
// Plug for library
|
633
|
+
Iterators[NAME] = _default;
|
634
|
+
Iterators[TAG] = $.that;
|
635
|
+
if(DEFAULT){
|
636
|
+
methods = {
|
637
|
+
keys: IS_SET ? _default : createMethod('keys'),
|
638
|
+
values: DEFAULT == VALUES ? _default : createMethod(VALUES),
|
639
|
+
entries: DEFAULT != VALUES ? _default : createMethod('entries')
|
640
|
+
};
|
641
|
+
if(FORCE)for(key in methods){
|
642
|
+
if(!(key in proto))$.hide(proto, key, methods[key]);
|
643
|
+
} else $def($def.P + $def.F * $iter.BUGGY, NAME, methods);
|
644
|
+
}
|
645
|
+
};
|
646
|
+
},{"./$":23,"./$.cof":7,"./$.def":13,"./$.iter":22,"./$.wks":35}],21:[function(require,module,exports){
|
526
647
|
var SYMBOL_ITERATOR = require('./$.wks')('iterator')
|
527
648
|
, SAFE_CLOSING = false;
|
528
649
|
try {
|
@@ -542,19 +663,15 @@ module.exports = function(exec){
|
|
542
663
|
} catch(e){ /* empty */ }
|
543
664
|
return safe;
|
544
665
|
};
|
545
|
-
},{"./$.wks":
|
666
|
+
},{"./$.wks":35}],22:[function(require,module,exports){
|
546
667
|
'use strict';
|
547
668
|
var $ = require('./$')
|
548
|
-
, ctx = require('./$.ctx')
|
549
669
|
, cof = require('./$.cof')
|
550
|
-
, $def = require('./$.def')
|
551
670
|
, assertObject = require('./$.assert').obj
|
552
671
|
, SYMBOL_ITERATOR = require('./$.wks')('iterator')
|
553
672
|
, FF_ITERATOR = '@@iterator'
|
554
673
|
, Iterators = {}
|
555
674
|
, IteratorPrototype = {};
|
556
|
-
// Safari has byggy iterators w/o `next`
|
557
|
-
var BUGGY = 'keys' in [] && !('next' in [].keys());
|
558
675
|
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
559
676
|
setIterator(IteratorPrototype, $.that);
|
560
677
|
function setIterator(O, value){
|
@@ -562,101 +679,33 @@ function setIterator(O, value){
|
|
562
679
|
// Add iterator for FF iterator protocol
|
563
680
|
if(FF_ITERATOR in [])$.hide(O, FF_ITERATOR, value);
|
564
681
|
}
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
if($.FW)setIterator(proto, iter);
|
570
|
-
if(iter !== value){
|
571
|
-
var iterProto = $.getProto(iter.call(new Constructor));
|
572
|
-
// Set @@toStringTag to native iterators
|
573
|
-
cof.set(iterProto, NAME + ' Iterator', true);
|
574
|
-
// FF fix
|
575
|
-
if($.FW)$.has(proto, FF_ITERATOR) && setIterator(iterProto, $.that);
|
576
|
-
}
|
577
|
-
// Plug for library
|
578
|
-
Iterators[NAME] = iter;
|
579
|
-
// FF & v8 fix
|
580
|
-
Iterators[NAME + ' Iterator'] = $.that;
|
581
|
-
return iter;
|
582
|
-
}
|
583
|
-
function getIterator(it){
|
584
|
-
var Symbol = $.g.Symbol
|
585
|
-
, ext = it[Symbol && Symbol.iterator || FF_ITERATOR]
|
586
|
-
, getIter = ext || it[SYMBOL_ITERATOR] || Iterators[cof.classof(it)];
|
587
|
-
return assertObject(getIter.call(it));
|
588
|
-
}
|
589
|
-
function closeIterator(iterator){
|
590
|
-
var ret = iterator['return'];
|
591
|
-
if(ret !== undefined)assertObject(ret.call(iterator));
|
592
|
-
}
|
593
|
-
function stepCall(iterator, fn, value, entries){
|
594
|
-
try {
|
595
|
-
return entries ? fn(assertObject(value)[0], value[1]) : fn(value);
|
596
|
-
} catch(e){
|
597
|
-
closeIterator(iterator);
|
598
|
-
throw e;
|
599
|
-
}
|
600
|
-
}
|
601
|
-
var $iter = module.exports = {
|
602
|
-
BUGGY: BUGGY,
|
682
|
+
|
683
|
+
module.exports = {
|
684
|
+
// Safari has buggy iterators w/o `next`
|
685
|
+
BUGGY: 'keys' in [] && !('next' in [].keys()),
|
603
686
|
Iterators: Iterators,
|
604
|
-
prototype: IteratorPrototype,
|
605
687
|
step: function(done, value){
|
606
688
|
return {value: value, done: !!done};
|
607
689
|
},
|
608
|
-
stepCall: stepCall,
|
609
|
-
close: closeIterator,
|
610
690
|
is: function(it){
|
611
691
|
var O = Object(it)
|
612
692
|
, Symbol = $.g.Symbol
|
613
693
|
, SYM = Symbol && Symbol.iterator || FF_ITERATOR;
|
614
694
|
return SYM in O || SYMBOL_ITERATOR in O || $.has(Iterators, cof.classof(O));
|
615
695
|
},
|
616
|
-
get:
|
696
|
+
get: function(it){
|
697
|
+
var Symbol = $.g.Symbol
|
698
|
+
, ext = it[Symbol && Symbol.iterator || FF_ITERATOR]
|
699
|
+
, getIter = ext || it[SYMBOL_ITERATOR] || Iterators[cof.classof(it)];
|
700
|
+
return assertObject(getIter.call(it));
|
701
|
+
},
|
617
702
|
set: setIterator,
|
618
703
|
create: function(Constructor, NAME, next, proto){
|
619
|
-
Constructor.prototype = $.create(proto ||
|
704
|
+
Constructor.prototype = $.create(proto || IteratorPrototype, {next: $.desc(1, next)});
|
620
705
|
cof.set(Constructor, NAME + ' Iterator');
|
621
|
-
},
|
622
|
-
define: defineIterator,
|
623
|
-
std: function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){
|
624
|
-
function createIter(kind){
|
625
|
-
return function(){
|
626
|
-
return new Constructor(this, kind);
|
627
|
-
};
|
628
|
-
}
|
629
|
-
$iter.create(Constructor, NAME, next);
|
630
|
-
var entries = createIter('key+value')
|
631
|
-
, values = createIter('value')
|
632
|
-
, proto = Base.prototype
|
633
|
-
, methods, key;
|
634
|
-
if(DEFAULT == 'value')values = defineIterator(Base, NAME, values, 'values');
|
635
|
-
else entries = defineIterator(Base, NAME, entries, 'entries');
|
636
|
-
if(DEFAULT){
|
637
|
-
methods = {
|
638
|
-
entries: entries,
|
639
|
-
keys: IS_SET ? values : createIter('key'),
|
640
|
-
values: values
|
641
|
-
};
|
642
|
-
$def($def.P + $def.F * BUGGY, NAME, methods);
|
643
|
-
if(FORCE)for(key in methods){
|
644
|
-
if(!(key in proto))$.hide(proto, key, methods[key]);
|
645
|
-
}
|
646
|
-
}
|
647
|
-
},
|
648
|
-
forOf: function(iterable, entries, fn, that){
|
649
|
-
var iterator = getIterator(iterable)
|
650
|
-
, f = ctx(fn, that, entries ? 2 : 1)
|
651
|
-
, step;
|
652
|
-
while(!(step = iterator.next()).done){
|
653
|
-
if(stepCall(iterator, f, step.value, entries) === false){
|
654
|
-
return closeIterator(iterator);
|
655
|
-
}
|
656
|
-
}
|
657
706
|
}
|
658
707
|
};
|
659
|
-
},{"./$":
|
708
|
+
},{"./$":23,"./$.assert":5,"./$.cof":7,"./$.wks":35}],23:[function(require,module,exports){
|
660
709
|
'use strict';
|
661
710
|
var global = typeof self != 'undefined' ? self : Function('return this')()
|
662
711
|
, core = {}
|
@@ -691,7 +740,7 @@ function simpleSet(object, key, value){
|
|
691
740
|
}
|
692
741
|
function createDefiner(bitmap){
|
693
742
|
return DESC ? function(object, key, value){
|
694
|
-
return $.setDesc(object, key, desc(bitmap, value));
|
743
|
+
return $.setDesc(object, key, desc(bitmap, value));
|
695
744
|
} : simpleSet;
|
696
745
|
}
|
697
746
|
|
@@ -738,11 +787,12 @@ var $ = module.exports = require('./$.fw')({
|
|
738
787
|
desc: desc,
|
739
788
|
getDesc: Object.getOwnPropertyDescriptor,
|
740
789
|
setDesc: defineProperty,
|
790
|
+
setDescs: Object.defineProperties,
|
741
791
|
getKeys: Object.keys,
|
742
792
|
getNames: Object.getOwnPropertyNames,
|
743
793
|
getSymbols: Object.getOwnPropertySymbols,
|
744
|
-
// Dummy, fix for not array-like ES3 string in es5 module
|
745
794
|
assertDefined: assertDefined,
|
795
|
+
// Dummy, fix for not array-like ES3 string in es5 module
|
746
796
|
ES5Object: Object,
|
747
797
|
toObject: function(it){
|
748
798
|
return $.ES5Object(assertDefined(it));
|
@@ -756,9 +806,10 @@ var $ = module.exports = require('./$.fw')({
|
|
756
806
|
},
|
757
807
|
each: [].forEach
|
758
808
|
});
|
809
|
+
/* eslint-disable no-undef */
|
759
810
|
if(typeof __e != 'undefined')__e = core;
|
760
811
|
if(typeof __g != 'undefined')__g = global;
|
761
|
-
},{"./$.fw":
|
812
|
+
},{"./$.fw":17}],24:[function(require,module,exports){
|
762
813
|
var $ = require('./$');
|
763
814
|
module.exports = function(object, el){
|
764
815
|
var O = $.toObject(object)
|
@@ -768,14 +819,16 @@ module.exports = function(object, el){
|
|
768
819
|
, key;
|
769
820
|
while(length > index)if(O[key = keys[index++]] === el)return key;
|
770
821
|
};
|
771
|
-
},{"./$":
|
822
|
+
},{"./$":23}],25:[function(require,module,exports){
|
772
823
|
var $ = require('./$')
|
773
824
|
, assertObject = require('./$.assert').obj;
|
774
825
|
module.exports = function ownKeys(it){
|
775
826
|
assertObject(it);
|
776
|
-
|
827
|
+
var keys = $.getNames(it)
|
828
|
+
, getSymbols = $.getSymbols;
|
829
|
+
return getSymbols ? keys.concat(getSymbols(it)) : keys;
|
777
830
|
};
|
778
|
-
},{"./$":
|
831
|
+
},{"./$":23,"./$.assert":5}],26:[function(require,module,exports){
|
779
832
|
'use strict';
|
780
833
|
var $ = require('./$')
|
781
834
|
, invoke = require('./$.invoke')
|
@@ -799,7 +852,7 @@ module.exports = function(/* ...pargs */){
|
|
799
852
|
return invoke(fn, args, that);
|
800
853
|
};
|
801
854
|
};
|
802
|
-
},{"./$":
|
855
|
+
},{"./$":23,"./$.assert":5,"./$.invoke":18}],27:[function(require,module,exports){
|
803
856
|
'use strict';
|
804
857
|
module.exports = function(regExp, replace, isStatic){
|
805
858
|
var replacer = replace === Object(replace) ? function(part){
|
@@ -809,9 +862,9 @@ module.exports = function(regExp, replace, isStatic){
|
|
809
862
|
return String(isStatic ? it : this).replace(regExp, replacer);
|
810
863
|
};
|
811
864
|
};
|
812
|
-
},{}],
|
865
|
+
},{}],28:[function(require,module,exports){
|
813
866
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
814
|
-
/*eslint-disable no-proto */
|
867
|
+
/* eslint-disable no-proto */
|
815
868
|
var $ = require('./$')
|
816
869
|
, assert = require('./$.assert');
|
817
870
|
function check(O, proto){
|
@@ -835,15 +888,16 @@ module.exports = {
|
|
835
888
|
: undefined),
|
836
889
|
check: check
|
837
890
|
};
|
838
|
-
},{"./$":
|
839
|
-
var $
|
891
|
+
},{"./$":23,"./$.assert":5,"./$.ctx":12}],29:[function(require,module,exports){
|
892
|
+
var $ = require('./$')
|
893
|
+
, SPECIES = require('./$.wks')('species');
|
840
894
|
module.exports = function(C){
|
841
|
-
if($.DESC &&
|
895
|
+
if($.DESC && !(SPECIES in C))$.setDesc(C, SPECIES, {
|
842
896
|
configurable: true,
|
843
897
|
get: $.that
|
844
898
|
});
|
845
899
|
};
|
846
|
-
},{"./$":
|
900
|
+
},{"./$":23,"./$.wks":35}],30:[function(require,module,exports){
|
847
901
|
'use strict';
|
848
902
|
// true -> String#at
|
849
903
|
// false -> String#codePointAt
|
@@ -862,16 +916,16 @@ module.exports = function(TO_STRING){
|
|
862
916
|
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
863
917
|
};
|
864
918
|
};
|
865
|
-
},{"./$":
|
919
|
+
},{"./$":23}],31:[function(require,module,exports){
|
866
920
|
'use strict';
|
867
921
|
var $ = require('./$')
|
868
922
|
, ctx = require('./$.ctx')
|
869
923
|
, cof = require('./$.cof')
|
870
924
|
, invoke = require('./$.invoke')
|
925
|
+
, cel = require('./$.dom-create')
|
871
926
|
, global = $.g
|
872
927
|
, isFunction = $.isFunction
|
873
928
|
, html = $.html
|
874
|
-
, document = global.document
|
875
929
|
, process = global.process
|
876
930
|
, setTask = global.setImmediate
|
877
931
|
, clearTask = global.clearImmediate
|
@@ -926,9 +980,9 @@ if(!isFunction(setTask) || !isFunction(clearTask)){
|
|
926
980
|
channel.port1.onmessage = listner;
|
927
981
|
defer = ctx(port.postMessage, port, 1);
|
928
982
|
// IE8-
|
929
|
-
} else if(
|
983
|
+
} else if(ONREADYSTATECHANGE in cel('script')){
|
930
984
|
defer = function(id){
|
931
|
-
html.appendChild(
|
985
|
+
html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
|
932
986
|
html.removeChild(this);
|
933
987
|
run.call(id);
|
934
988
|
};
|
@@ -944,14 +998,23 @@ module.exports = {
|
|
944
998
|
set: setTask,
|
945
999
|
clear: clearTask
|
946
1000
|
};
|
947
|
-
},{"./$":
|
1001
|
+
},{"./$":23,"./$.cof":7,"./$.ctx":12,"./$.dom-create":14,"./$.invoke":18}],32:[function(require,module,exports){
|
1002
|
+
module.exports = function(exec){
|
1003
|
+
try {
|
1004
|
+
exec();
|
1005
|
+
return false;
|
1006
|
+
} catch(e){
|
1007
|
+
return true;
|
1008
|
+
}
|
1009
|
+
};
|
1010
|
+
},{}],33:[function(require,module,exports){
|
948
1011
|
var sid = 0;
|
949
1012
|
function uid(key){
|
950
1013
|
return 'Symbol(' + key + ')_' + (++sid + Math.random()).toString(36);
|
951
1014
|
}
|
952
1015
|
uid.safe = require('./$').g.Symbol || uid;
|
953
1016
|
module.exports = uid;
|
954
|
-
},{"./$":
|
1017
|
+
},{"./$":23}],34:[function(require,module,exports){
|
955
1018
|
// 22.1.3.31 Array.prototype[@@unscopables]
|
956
1019
|
var $ = require('./$')
|
957
1020
|
, UNSCOPABLES = require('./$.wks')('unscopables');
|
@@ -959,15 +1022,16 @@ if($.FW && !(UNSCOPABLES in []))$.hide(Array.prototype, UNSCOPABLES, {});
|
|
959
1022
|
module.exports = function(key){
|
960
1023
|
if($.FW)[][UNSCOPABLES][key] = true;
|
961
1024
|
};
|
962
|
-
},{"./$":
|
1025
|
+
},{"./$":23,"./$.wks":35}],35:[function(require,module,exports){
|
963
1026
|
var global = require('./$').g
|
964
1027
|
, store = {};
|
965
1028
|
module.exports = function(name){
|
966
1029
|
return store[name] || (store[name] =
|
967
1030
|
global.Symbol && global.Symbol[name] || require('./$.uid').safe('Symbol.' + name));
|
968
1031
|
};
|
969
|
-
},{"./$":
|
1032
|
+
},{"./$":23,"./$.uid":33}],36:[function(require,module,exports){
|
970
1033
|
var $ = require('./$')
|
1034
|
+
, cel = require('./$.dom-create')
|
971
1035
|
, cof = require('./$.cof')
|
972
1036
|
, $def = require('./$.def')
|
973
1037
|
, invoke = require('./$.invoke')
|
@@ -980,10 +1044,10 @@ var $ = require('./$')
|
|
980
1044
|
, slice = A.slice
|
981
1045
|
, indexOf = A.indexOf
|
982
1046
|
, classof = cof.classof
|
983
|
-
, defineProperties = Object.defineProperties
|
984
1047
|
, has = $.has
|
985
1048
|
, defineProperty = $.setDesc
|
986
1049
|
, getOwnDescriptor = $.getDesc
|
1050
|
+
, defineProperties = $.setDescs
|
987
1051
|
, isFunction = $.isFunction
|
988
1052
|
, toObject = $.toObject
|
989
1053
|
, toLength = $.toLength
|
@@ -991,7 +1055,7 @@ var $ = require('./$')
|
|
991
1055
|
|
992
1056
|
if(!$.DESC){
|
993
1057
|
try {
|
994
|
-
IE8_DOM_DEFINE = defineProperty(
|
1058
|
+
IE8_DOM_DEFINE = defineProperty(cel('div'), 'x',
|
995
1059
|
{get: function(){ return 8; }}
|
996
1060
|
).x == 8;
|
997
1061
|
} catch(e){ /* empty */ }
|
@@ -1009,7 +1073,7 @@ if(!$.DESC){
|
|
1009
1073
|
} catch(e){ /* empty */ }
|
1010
1074
|
if(has(O, P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]);
|
1011
1075
|
};
|
1012
|
-
defineProperties = function(O, Properties){
|
1076
|
+
$.setDescs = defineProperties = function(O, Properties){
|
1013
1077
|
assertObject(O);
|
1014
1078
|
var keys = $.getKeys(Properties)
|
1015
1079
|
, length = keys.length
|
@@ -1038,7 +1102,7 @@ var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' +
|
|
1038
1102
|
// Create object with `null` prototype: use iframe Object with cleared prototype
|
1039
1103
|
var createDict = function(){
|
1040
1104
|
// Thrash, waste and sodomy: IE GC bug
|
1041
|
-
var iframe =
|
1105
|
+
var iframe = cel('iframe')
|
1042
1106
|
, i = keysLen1
|
1043
1107
|
, gt = '>'
|
1044
1108
|
, iframeDocument;
|
@@ -1208,8 +1272,12 @@ $def($def.S, 'Date', {now: function(){
|
|
1208
1272
|
function lz(num){
|
1209
1273
|
return num > 9 ? num : '0' + num;
|
1210
1274
|
}
|
1275
|
+
|
1211
1276
|
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
|
1212
|
-
|
1277
|
+
// PhantomJS and old webkit had a broken Date implementation.
|
1278
|
+
var date = new Date(-5e13 - 1)
|
1279
|
+
, brokenDate = !(date.toISOString && date.toISOString() == '0385-07-25T07:06:39.999Z');
|
1280
|
+
$def($def.P + $def.F * brokenDate, 'Date', {toISOString: function(){
|
1213
1281
|
if(!isFinite(this))throw RangeError('Invalid time value');
|
1214
1282
|
var d = this
|
1215
1283
|
, y = d.getUTCFullYear()
|
@@ -1225,7 +1293,7 @@ if(classof(function(){ return arguments; }()) == 'Object')cof.classof = function
|
|
1225
1293
|
var tag = classof(it);
|
1226
1294
|
return tag == 'Object' && isFunction(it.callee) ? 'Arguments' : tag;
|
1227
1295
|
};
|
1228
|
-
},{"./$":
|
1296
|
+
},{"./$":23,"./$.array-includes":3,"./$.array-methods":4,"./$.assert":5,"./$.cof":7,"./$.def":13,"./$.dom-create":14,"./$.invoke":18,"./$.replacer":27,"./$.uid":33}],37:[function(require,module,exports){
|
1229
1297
|
'use strict';
|
1230
1298
|
var $ = require('./$')
|
1231
1299
|
, $def = require('./$.def')
|
@@ -1255,7 +1323,7 @@ $def($def.P, 'Array', {
|
|
1255
1323
|
}
|
1256
1324
|
});
|
1257
1325
|
require('./$.unscope')('copyWithin');
|
1258
|
-
},{"./$":
|
1326
|
+
},{"./$":23,"./$.def":13,"./$.unscope":34}],38:[function(require,module,exports){
|
1259
1327
|
'use strict';
|
1260
1328
|
var $ = require('./$')
|
1261
1329
|
, $def = require('./$.def')
|
@@ -1273,26 +1341,18 @@ $def($def.P, 'Array', {
|
|
1273
1341
|
}
|
1274
1342
|
});
|
1275
1343
|
require('./$.unscope')('fill');
|
1276
|
-
},{"./$":
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
},{"./$.array-methods":3,"./$.def":11,"./$.unscope":26}],32:[function(require,module,exports){
|
1284
|
-
var $def = require('./$.def');
|
1285
|
-
$def($def.P, 'Array', {
|
1286
|
-
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
|
1287
|
-
find: require('./$.array-methods')(5)
|
1288
|
-
});
|
1289
|
-
require('./$.unscope')('find');
|
1290
|
-
},{"./$.array-methods":3,"./$.def":11,"./$.unscope":26}],33:[function(require,module,exports){
|
1344
|
+
},{"./$":23,"./$.def":13,"./$.unscope":34}],39:[function(require,module,exports){
|
1345
|
+
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
|
1346
|
+
require('./$.array-find')('findIndex', 6);
|
1347
|
+
},{"./$.array-find":2}],40:[function(require,module,exports){
|
1348
|
+
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
|
1349
|
+
require('./$.array-find')('find', 5);
|
1350
|
+
},{"./$.array-find":2}],41:[function(require,module,exports){
|
1291
1351
|
var $ = require('./$')
|
1292
1352
|
, ctx = require('./$.ctx')
|
1293
1353
|
, $def = require('./$.def')
|
1294
1354
|
, $iter = require('./$.iter')
|
1295
|
-
,
|
1355
|
+
, call = require('./$.iter-call');
|
1296
1356
|
$def($def.S + $def.F * !require('./$.iter-detect')(function(iter){ Array.from(iter); }), 'Array', {
|
1297
1357
|
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
|
1298
1358
|
from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
|
@@ -1307,7 +1367,7 @@ $def($def.S + $def.F * !require('./$.iter-detect')(function(iter){ Array.from(it
|
|
1307
1367
|
// strange IE quirks mode bug -> use typeof instead of isFunction
|
1308
1368
|
result = new (typeof this == 'function' ? this : Array);
|
1309
1369
|
for(; !(step = iterator.next()).done; index++){
|
1310
|
-
result[index] = mapping ?
|
1370
|
+
result[index] = mapping ? call(iterator, f, [step.value, index], true) : step.value;
|
1311
1371
|
}
|
1312
1372
|
} else {
|
1313
1373
|
// strange IE quirks mode bug -> use typeof instead of isFunction
|
@@ -1320,7 +1380,7 @@ $def($def.S + $def.F * !require('./$.iter-detect')(function(iter){ Array.from(it
|
|
1320
1380
|
return result;
|
1321
1381
|
}
|
1322
1382
|
});
|
1323
|
-
},{"./$":
|
1383
|
+
},{"./$":23,"./$.ctx":12,"./$.def":13,"./$.iter":22,"./$.iter-call":19,"./$.iter-detect":21}],42:[function(require,module,exports){
|
1324
1384
|
var $ = require('./$')
|
1325
1385
|
, setUnscope = require('./$.unscope')
|
1326
1386
|
, ITER = require('./$.uid').safe('iter')
|
@@ -1332,7 +1392,7 @@ var $ = require('./$')
|
|
1332
1392
|
// 22.1.3.13 Array.prototype.keys()
|
1333
1393
|
// 22.1.3.29 Array.prototype.values()
|
1334
1394
|
// 22.1.3.30 Array.prototype[@@iterator]()
|
1335
|
-
|
1395
|
+
require('./$.iter-define')(Array, 'Array', function(iterated, kind){
|
1336
1396
|
$.set(this, ITER, {o: $.toObject(iterated), i: 0, k: kind});
|
1337
1397
|
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
|
1338
1398
|
}, function(){
|
@@ -1344,10 +1404,10 @@ $iter.std(Array, 'Array', function(iterated, kind){
|
|
1344
1404
|
iter.o = undefined;
|
1345
1405
|
return step(1);
|
1346
1406
|
}
|
1347
|
-
if(kind == '
|
1348
|
-
if(kind == '
|
1407
|
+
if(kind == 'keys' )return step(0, index);
|
1408
|
+
if(kind == 'values')return step(0, O[index]);
|
1349
1409
|
return step(0, [index, O[index]]);
|
1350
|
-
}, '
|
1410
|
+
}, 'values');
|
1351
1411
|
|
1352
1412
|
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
|
1353
1413
|
Iterators.Arguments = Iterators.Array;
|
@@ -1355,7 +1415,7 @@ Iterators.Arguments = Iterators.Array;
|
|
1355
1415
|
setUnscope('keys');
|
1356
1416
|
setUnscope('values');
|
1357
1417
|
setUnscope('entries');
|
1358
|
-
},{"./$":
|
1418
|
+
},{"./$":23,"./$.iter":22,"./$.iter-define":20,"./$.uid":33,"./$.unscope":34}],43:[function(require,module,exports){
|
1359
1419
|
var $def = require('./$.def');
|
1360
1420
|
$def($def.S, 'Array', {
|
1361
1421
|
// 22.1.2.3 Array.of( ...items)
|
@@ -1369,9 +1429,9 @@ $def($def.S, 'Array', {
|
|
1369
1429
|
return result;
|
1370
1430
|
}
|
1371
1431
|
});
|
1372
|
-
},{"./$.def":
|
1432
|
+
},{"./$.def":13}],44:[function(require,module,exports){
|
1373
1433
|
require('./$.species')(Array);
|
1374
|
-
},{"./$.species":
|
1434
|
+
},{"./$.species":29}],45:[function(require,module,exports){
|
1375
1435
|
'use strict';
|
1376
1436
|
var $ = require('./$')
|
1377
1437
|
, NAME = 'name'
|
@@ -1390,7 +1450,7 @@ NAME in FunctionProto || $.FW && $.DESC && setDesc(FunctionProto, NAME, {
|
|
1390
1450
|
$.has(this, NAME) || setDesc(this, NAME, $.desc(0, value));
|
1391
1451
|
}
|
1392
1452
|
});
|
1393
|
-
},{"./$":
|
1453
|
+
},{"./$":23}],46:[function(require,module,exports){
|
1394
1454
|
'use strict';
|
1395
1455
|
var strong = require('./$.collection-strong');
|
1396
1456
|
|
@@ -1406,7 +1466,7 @@ require('./$.collection')('Map', {
|
|
1406
1466
|
return strong.def(this, key === 0 ? 0 : key, value);
|
1407
1467
|
}
|
1408
1468
|
}, strong, true);
|
1409
|
-
},{"./$.collection":
|
1469
|
+
},{"./$.collection":11,"./$.collection-strong":8}],47:[function(require,module,exports){
|
1410
1470
|
var Infinity = 1 / 0
|
1411
1471
|
, $def = require('./$.def')
|
1412
1472
|
, E = Math.E
|
@@ -1529,7 +1589,7 @@ $def($def.S, 'Math', {
|
|
1529
1589
|
return (it > 0 ? floor : ceil)(it);
|
1530
1590
|
}
|
1531
1591
|
});
|
1532
|
-
},{"./$.def":
|
1592
|
+
},{"./$.def":13}],48:[function(require,module,exports){
|
1533
1593
|
'use strict';
|
1534
1594
|
var $ = require('./$')
|
1535
1595
|
, isObject = $.isObject
|
@@ -1574,7 +1634,7 @@ if($.FW && !(Number('0o1') && Number('0b1'))){
|
|
1574
1634
|
proto.constructor = Number;
|
1575
1635
|
$.hide($.g, NUMBER, Number);
|
1576
1636
|
}
|
1577
|
-
},{"./$":
|
1637
|
+
},{"./$":23}],49:[function(require,module,exports){
|
1578
1638
|
var $ = require('./$')
|
1579
1639
|
, $def = require('./$.def')
|
1580
1640
|
, abs = Math.abs
|
@@ -1610,11 +1670,11 @@ $def($def.S, 'Number', {
|
|
1610
1670
|
// 20.1.2.13 Number.parseInt(string, radix)
|
1611
1671
|
parseInt: parseInt
|
1612
1672
|
});
|
1613
|
-
},{"./$":
|
1673
|
+
},{"./$":23,"./$.def":13}],50:[function(require,module,exports){
|
1614
1674
|
// 19.1.3.1 Object.assign(target, source)
|
1615
1675
|
var $def = require('./$.def');
|
1616
1676
|
$def($def.S, 'Object', {assign: require('./$.assign')});
|
1617
|
-
},{"./$.assign":
|
1677
|
+
},{"./$.assign":6,"./$.def":13}],51:[function(require,module,exports){
|
1618
1678
|
// 19.1.3.10 Object.is(value1, value2)
|
1619
1679
|
var $def = require('./$.def');
|
1620
1680
|
$def($def.S, 'Object', {
|
@@ -1622,11 +1682,11 @@ $def($def.S, 'Object', {
|
|
1622
1682
|
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
|
1623
1683
|
}
|
1624
1684
|
});
|
1625
|
-
},{"./$.def":
|
1685
|
+
},{"./$.def":13}],52:[function(require,module,exports){
|
1626
1686
|
// 19.1.3.19 Object.setPrototypeOf(O, proto)
|
1627
1687
|
var $def = require('./$.def');
|
1628
1688
|
$def($def.S, 'Object', {setPrototypeOf: require('./$.set-proto').set});
|
1629
|
-
},{"./$.def":
|
1689
|
+
},{"./$.def":13,"./$.set-proto":28}],53:[function(require,module,exports){
|
1630
1690
|
var $ = require('./$')
|
1631
1691
|
, $def = require('./$.def')
|
1632
1692
|
, isObject = $.isObject
|
@@ -1665,7 +1725,7 @@ wrapObjectMethod('getOwnPropertyDescriptor', 4);
|
|
1665
1725
|
wrapObjectMethod('getPrototypeOf', 5);
|
1666
1726
|
wrapObjectMethod('keys');
|
1667
1727
|
wrapObjectMethod('getOwnPropertyNames');
|
1668
|
-
},{"./$":
|
1728
|
+
},{"./$":23,"./$.def":13}],54:[function(require,module,exports){
|
1669
1729
|
'use strict';
|
1670
1730
|
// 19.1.3.6 Object.prototype.toString()
|
1671
1731
|
var $ = require('./$')
|
@@ -1675,28 +1735,46 @@ tmp[require('./$.wks')('toStringTag')] = 'z';
|
|
1675
1735
|
if($.FW && cof(tmp) != 'z')$.hide(Object.prototype, 'toString', function toString(){
|
1676
1736
|
return '[object ' + cof.classof(this) + ']';
|
1677
1737
|
});
|
1678
|
-
},{"./$":
|
1738
|
+
},{"./$":23,"./$.cof":7,"./$.wks":35}],55:[function(require,module,exports){
|
1679
1739
|
'use strict';
|
1680
|
-
var $
|
1681
|
-
, ctx
|
1682
|
-
, cof
|
1683
|
-
, $def
|
1684
|
-
, assert
|
1685
|
-
,
|
1686
|
-
,
|
1687
|
-
,
|
1688
|
-
,
|
1689
|
-
,
|
1690
|
-
,
|
1691
|
-
,
|
1692
|
-
,
|
1693
|
-
,
|
1694
|
-
,
|
1740
|
+
var $ = require('./$')
|
1741
|
+
, ctx = require('./$.ctx')
|
1742
|
+
, cof = require('./$.cof')
|
1743
|
+
, $def = require('./$.def')
|
1744
|
+
, assert = require('./$.assert')
|
1745
|
+
, forOf = require('./$.for-of')
|
1746
|
+
, setProto = require('./$.set-proto').set
|
1747
|
+
, species = require('./$.species')
|
1748
|
+
, SPECIES = require('./$.wks')('species')
|
1749
|
+
, RECORD = require('./$.uid').safe('record')
|
1750
|
+
, PROMISE = 'Promise'
|
1751
|
+
, global = $.g
|
1752
|
+
, process = global.process
|
1753
|
+
, asap = process && process.nextTick || require('./$.task').set
|
1754
|
+
, P = global[PROMISE]
|
1695
1755
|
, isFunction = $.isFunction
|
1696
1756
|
, isObject = $.isObject
|
1697
1757
|
, assertFunction = assert.fn
|
1698
|
-
, assertObject = assert.obj
|
1699
|
-
|
1758
|
+
, assertObject = assert.obj;
|
1759
|
+
|
1760
|
+
var useNative = function(){
|
1761
|
+
var test, works = false;
|
1762
|
+
function P2(x){
|
1763
|
+
var self = new P(x);
|
1764
|
+
setProto(self, P2.prototype);
|
1765
|
+
return self;
|
1766
|
+
}
|
1767
|
+
try {
|
1768
|
+
works = isFunction(P) && isFunction(P.resolve) && P.resolve(test = new P(function(){})) == test;
|
1769
|
+
setProto(P2, P);
|
1770
|
+
P2.prototype = $.create(P.prototype, {constructor: {value: P2}});
|
1771
|
+
// actual Firefox has broken subclass support, test that
|
1772
|
+
if(!(P2.resolve(5).then(function(){}) instanceof P2)){
|
1773
|
+
works = false;
|
1774
|
+
}
|
1775
|
+
} catch(e){ works = false; }
|
1776
|
+
return works;
|
1777
|
+
}();
|
1700
1778
|
|
1701
1779
|
// helpers
|
1702
1780
|
function getConstructor(C){
|
@@ -1708,35 +1786,13 @@ function isThenable(it){
|
|
1708
1786
|
if(isObject(it))then = it.then;
|
1709
1787
|
return isFunction(then) ? then : false;
|
1710
1788
|
}
|
1711
|
-
function
|
1712
|
-
var record = promise[RECORD]
|
1713
|
-
, chain = record.c
|
1714
|
-
, i = 0
|
1715
|
-
, react;
|
1716
|
-
if(record.h)return false;
|
1717
|
-
while(chain.length > i){
|
1718
|
-
react = chain[i++];
|
1719
|
-
if(react.fail || !isUnhandled(react.P))return false;
|
1720
|
-
} return true;
|
1721
|
-
}
|
1722
|
-
function notify(record, isReject){
|
1789
|
+
function notify(record){
|
1723
1790
|
var chain = record.c;
|
1724
|
-
if(
|
1725
|
-
var
|
1726
|
-
,
|
1727
|
-
,
|
1728
|
-
|
1729
|
-
if(isReject && isUnhandled(promise)){
|
1730
|
-
setTimeout(function(){
|
1731
|
-
if(isUnhandled(promise)){
|
1732
|
-
if(cof(process) == 'process'){
|
1733
|
-
process.emit('unhandledRejection', value, promise);
|
1734
|
-
} else if(global.console && isFunction(console.error)){
|
1735
|
-
console.error('Unhandled promise rejection', value);
|
1736
|
-
}
|
1737
|
-
}
|
1738
|
-
}, 1e3);
|
1739
|
-
} else while(chain.length > i)!function(react){
|
1791
|
+
if(chain.length)asap(function(){
|
1792
|
+
var value = record.v
|
1793
|
+
, ok = record.s == 1
|
1794
|
+
, i = 0;
|
1795
|
+
function run(react){
|
1740
1796
|
var cb = ok ? react.ok : react.fail
|
1741
1797
|
, ret, then;
|
1742
1798
|
try {
|
@@ -1744,7 +1800,7 @@ function notify(record, isReject){
|
|
1744
1800
|
if(!ok)record.h = true;
|
1745
1801
|
ret = cb === true ? value : cb(value);
|
1746
1802
|
if(ret === react.P){
|
1747
|
-
react.rej(TypeError(
|
1803
|
+
react.rej(TypeError('Promise-chain cycle'));
|
1748
1804
|
} else if(then = isThenable(ret)){
|
1749
1805
|
then.call(ret, react.res, react.rej);
|
1750
1806
|
} else react.res(ret);
|
@@ -1752,18 +1808,44 @@ function notify(record, isReject){
|
|
1752
1808
|
} catch(err){
|
1753
1809
|
react.rej(err);
|
1754
1810
|
}
|
1755
|
-
}
|
1811
|
+
}
|
1812
|
+
while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
|
1756
1813
|
chain.length = 0;
|
1757
1814
|
});
|
1758
1815
|
}
|
1816
|
+
function isUnhandled(promise){
|
1817
|
+
var record = promise[RECORD]
|
1818
|
+
, chain = record.a || record.c
|
1819
|
+
, i = 0
|
1820
|
+
, react;
|
1821
|
+
if(record.h)return false;
|
1822
|
+
while(chain.length > i){
|
1823
|
+
react = chain[i++];
|
1824
|
+
if(react.fail || !isUnhandled(react.P))return false;
|
1825
|
+
} return true;
|
1826
|
+
}
|
1759
1827
|
function $reject(value){
|
1760
|
-
var record = this
|
1828
|
+
var record = this
|
1829
|
+
, promise;
|
1761
1830
|
if(record.d)return;
|
1762
1831
|
record.d = true;
|
1763
1832
|
record = record.r || record; // unwrap
|
1764
1833
|
record.v = value;
|
1765
1834
|
record.s = 2;
|
1766
|
-
|
1835
|
+
record.a = record.c.slice();
|
1836
|
+
setTimeout(function(){
|
1837
|
+
asap(function(){
|
1838
|
+
if(isUnhandled(promise = record.p)){
|
1839
|
+
if(cof(process) == 'process'){
|
1840
|
+
process.emit('unhandledRejection', value, promise);
|
1841
|
+
} else if(global.console && isFunction(console.error)){
|
1842
|
+
console.error('Unhandled promise rejection', value);
|
1843
|
+
}
|
1844
|
+
}
|
1845
|
+
record.a = undefined;
|
1846
|
+
});
|
1847
|
+
}, 1);
|
1848
|
+
notify(record);
|
1767
1849
|
}
|
1768
1850
|
function $resolve(value){
|
1769
1851
|
var record = this
|
@@ -1786,13 +1868,14 @@ function $resolve(value){
|
|
1786
1868
|
}
|
1787
1869
|
|
1788
1870
|
// constructor polyfill
|
1789
|
-
if(!
|
1871
|
+
if(!useNative){
|
1790
1872
|
// 25.4.3.1 Promise(executor)
|
1791
1873
|
P = function Promise(executor){
|
1792
1874
|
assertFunction(executor);
|
1793
1875
|
var record = {
|
1794
1876
|
p: assert.inst(this, P, PROMISE), // <- promise
|
1795
|
-
c: [], // <-
|
1877
|
+
c: [], // <- awaiting reactions
|
1878
|
+
a: undefined, // <- checked in isUnhandled reactions
|
1796
1879
|
s: 0, // <- state
|
1797
1880
|
d: false, // <- done
|
1798
1881
|
v: undefined, // <- value
|
@@ -1819,6 +1902,7 @@ if(!(isFunction(P) && isFunction(P.resolve) && P.resolve(test = new P(function()
|
|
1819
1902
|
});
|
1820
1903
|
var record = this[RECORD];
|
1821
1904
|
record.c.push(react);
|
1905
|
+
if(record.a)record.a.push(react);
|
1822
1906
|
record.s && notify(record);
|
1823
1907
|
return promise;
|
1824
1908
|
},
|
@@ -1830,12 +1914,13 @@ if(!(isFunction(P) && isFunction(P.resolve) && P.resolve(test = new P(function()
|
|
1830
1914
|
}
|
1831
1915
|
|
1832
1916
|
// export
|
1833
|
-
$def($def.G + $def.W + $def.F *
|
1917
|
+
$def($def.G + $def.W + $def.F * !useNative, {Promise: P});
|
1834
1918
|
cof.set(P, PROMISE);
|
1835
|
-
|
1919
|
+
species(P);
|
1920
|
+
species($.core[PROMISE]); // for wrapper
|
1836
1921
|
|
1837
1922
|
// statics
|
1838
|
-
$def($def.S, PROMISE, {
|
1923
|
+
$def($def.S + $def.F * !useNative, PROMISE, {
|
1839
1924
|
// 25.4.4.5 Promise.reject(r)
|
1840
1925
|
reject: function reject(r){
|
1841
1926
|
return new (getConstructor(this))(function(res, rej){
|
@@ -1850,9 +1935,9 @@ $def($def.S, PROMISE, {
|
|
1850
1935
|
});
|
1851
1936
|
}
|
1852
1937
|
});
|
1853
|
-
$def($def.S + $def.F * !require('./$.iter-detect')(function(iter){
|
1938
|
+
$def($def.S + $def.F * !(useNative && require('./$.iter-detect')(function(iter){
|
1854
1939
|
P.all(iter)['catch'](function(){});
|
1855
|
-
}), PROMISE, {
|
1940
|
+
})), PROMISE, {
|
1856
1941
|
// 25.4.4.1 Promise.all(iterable)
|
1857
1942
|
all: function all(iterable){
|
1858
1943
|
var C = getConstructor(this)
|
@@ -1880,7 +1965,7 @@ $def($def.S + $def.F * !require('./$.iter-detect')(function(iter){
|
|
1880
1965
|
});
|
1881
1966
|
}
|
1882
1967
|
});
|
1883
|
-
},{"./$":
|
1968
|
+
},{"./$":23,"./$.assert":5,"./$.cof":7,"./$.ctx":12,"./$.def":13,"./$.for-of":16,"./$.iter-detect":21,"./$.set-proto":28,"./$.species":29,"./$.task":31,"./$.uid":33,"./$.wks":35}],56:[function(require,module,exports){
|
1884
1969
|
var $ = require('./$')
|
1885
1970
|
, $def = require('./$.def')
|
1886
1971
|
, setProto = require('./$.set-proto')
|
@@ -1896,14 +1981,16 @@ var $ = require('./$')
|
|
1896
1981
|
, assertObject = assert.obj
|
1897
1982
|
, _isExtensible = Object.isExtensible || $.it;
|
1898
1983
|
function Enumerate(iterated){
|
1899
|
-
|
1900
|
-
for(key in iterated)keys.push(key);
|
1901
|
-
$.set(this, ITER, {o: iterated, a: keys, i: 0});
|
1984
|
+
$.set(this, ITER, {o: iterated, k: undefined, i: 0});
|
1902
1985
|
}
|
1903
1986
|
$iter.create(Enumerate, 'Object', function(){
|
1904
1987
|
var iter = this[ITER]
|
1905
|
-
, keys = iter.
|
1988
|
+
, keys = iter.k
|
1906
1989
|
, key;
|
1990
|
+
if(keys == undefined){
|
1991
|
+
iter.k = keys = [];
|
1992
|
+
for(key in iter.o)keys.push(key);
|
1993
|
+
}
|
1907
1994
|
do {
|
1908
1995
|
if(iter.i >= keys.length)return step(1);
|
1909
1996
|
} while(!((key = keys[iter.i++]) in iter.o));
|
@@ -2013,18 +2100,28 @@ if(setProto)reflect.setPrototypeOf = function setPrototypeOf(target, proto){
|
|
2013
2100
|
|
2014
2101
|
$def($def.G, {Reflect: {}});
|
2015
2102
|
$def($def.S, 'Reflect', reflect);
|
2016
|
-
},{"./$":
|
2103
|
+
},{"./$":23,"./$.assert":5,"./$.ctx":12,"./$.def":13,"./$.iter":22,"./$.own-keys":25,"./$.set-proto":28,"./$.uid":33}],57:[function(require,module,exports){
|
2017
2104
|
var $ = require('./$')
|
2018
2105
|
, cof = require('./$.cof')
|
2019
2106
|
, RegExp = $.g.RegExp
|
2020
2107
|
, Base = RegExp
|
2021
2108
|
, proto = RegExp.prototype;
|
2109
|
+
function regExpBroken() {
|
2110
|
+
try {
|
2111
|
+
var a = /a/g;
|
2112
|
+
// "new" creates a new object
|
2113
|
+
if (a === new RegExp(a)) { return true; }
|
2114
|
+
// RegExp allows a regex with flags as the pattern
|
2115
|
+
return RegExp(/a/g, 'i') != '/a/i';
|
2116
|
+
} catch(e) {
|
2117
|
+
return true;
|
2118
|
+
}
|
2119
|
+
}
|
2022
2120
|
if($.FW && $.DESC){
|
2023
|
-
|
2024
|
-
if(!function(){try{ return RegExp(/a/g, 'i') == '/a/i'; }catch(e){ /* empty */ }}()){
|
2121
|
+
if(regExpBroken()) {
|
2025
2122
|
RegExp = function RegExp(pattern, flags){
|
2026
|
-
return new Base(cof(pattern) == 'RegExp'
|
2027
|
-
? pattern.
|
2123
|
+
return new Base(cof(pattern) == 'RegExp' ? pattern.source : pattern,
|
2124
|
+
flags === undefined ? pattern.flags : flags);
|
2028
2125
|
};
|
2029
2126
|
$.each.call($.getNames(Base), function(key){
|
2030
2127
|
key in RegExp || $.setDesc(RegExp, key, {
|
@@ -2044,7 +2141,7 @@ if($.FW && $.DESC){
|
|
2044
2141
|
});
|
2045
2142
|
}
|
2046
2143
|
require('./$.species')(RegExp);
|
2047
|
-
},{"./$":
|
2144
|
+
},{"./$":23,"./$.cof":7,"./$.replacer":27,"./$.species":29}],58:[function(require,module,exports){
|
2048
2145
|
'use strict';
|
2049
2146
|
var strong = require('./$.collection-strong');
|
2050
2147
|
|
@@ -2055,20 +2152,21 @@ require('./$.collection')('Set', {
|
|
2055
2152
|
return strong.def(this, value = value === 0 ? 0 : value, value);
|
2056
2153
|
}
|
2057
2154
|
}, strong);
|
2058
|
-
},{"./$.collection":
|
2155
|
+
},{"./$.collection":11,"./$.collection-strong":8}],59:[function(require,module,exports){
|
2059
2156
|
var $def = require('./$.def');
|
2060
2157
|
$def($def.P, 'String', {
|
2061
2158
|
// 21.1.3.3 String.prototype.codePointAt(pos)
|
2062
2159
|
codePointAt: require('./$.string-at')(false)
|
2063
2160
|
});
|
2064
|
-
},{"./$.def":
|
2161
|
+
},{"./$.def":13,"./$.string-at":30}],60:[function(require,module,exports){
|
2065
2162
|
'use strict';
|
2066
2163
|
var $ = require('./$')
|
2067
2164
|
, cof = require('./$.cof')
|
2068
2165
|
, $def = require('./$.def')
|
2069
2166
|
, toLength = $.toLength;
|
2070
2167
|
|
2071
|
-
|
2168
|
+
// should throw error on regex
|
2169
|
+
$def($def.P + $def.F * !require('./$.throws')(function(){ 'q'.endsWith(/./); }), 'String', {
|
2072
2170
|
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
|
2073
2171
|
endsWith: function endsWith(searchString /*, endPosition = @length */){
|
2074
2172
|
if(cof(searchString) == 'RegExp')throw TypeError();
|
@@ -2080,7 +2178,7 @@ $def($def.P, 'String', {
|
|
2080
2178
|
return that.slice(end - searchString.length, end) === searchString;
|
2081
2179
|
}
|
2082
2180
|
});
|
2083
|
-
},{"./$":
|
2181
|
+
},{"./$":23,"./$.cof":7,"./$.def":13,"./$.throws":32}],61:[function(require,module,exports){
|
2084
2182
|
var $def = require('./$.def')
|
2085
2183
|
, toIndex = require('./$').toIndex
|
2086
2184
|
, fromCharCode = String.fromCharCode;
|
@@ -2102,7 +2200,7 @@ $def($def.S, 'String', {
|
|
2102
2200
|
} return res.join('');
|
2103
2201
|
}
|
2104
2202
|
});
|
2105
|
-
},{"./$":
|
2203
|
+
},{"./$":23,"./$.def":13}],62:[function(require,module,exports){
|
2106
2204
|
'use strict';
|
2107
2205
|
var $ = require('./$')
|
2108
2206
|
, cof = require('./$.cof')
|
@@ -2115,7 +2213,7 @@ $def($def.P, 'String', {
|
|
2115
2213
|
return !!~String($.assertDefined(this)).indexOf(searchString, arguments[1]);
|
2116
2214
|
}
|
2117
2215
|
});
|
2118
|
-
},{"./$":
|
2216
|
+
},{"./$":23,"./$.cof":7,"./$.def":13}],63:[function(require,module,exports){
|
2119
2217
|
var set = require('./$').set
|
2120
2218
|
, at = require('./$.string-at')(true)
|
2121
2219
|
, ITER = require('./$.uid').safe('iter')
|
@@ -2123,7 +2221,7 @@ var set = require('./$').set
|
|
2123
2221
|
, step = $iter.step;
|
2124
2222
|
|
2125
2223
|
// 21.1.3.27 String.prototype[@@iterator]()
|
2126
|
-
|
2224
|
+
require('./$.iter-define')(String, 'String', function(iterated){
|
2127
2225
|
set(this, ITER, {o: String(iterated), i: 0});
|
2128
2226
|
// 21.1.5.2.1 %StringIteratorPrototype%.next()
|
2129
2227
|
}, function(){
|
@@ -2136,7 +2234,7 @@ $iter.std(String, 'String', function(iterated){
|
|
2136
2234
|
iter.i += point.length;
|
2137
2235
|
return step(0, point);
|
2138
2236
|
});
|
2139
|
-
},{"./$":
|
2237
|
+
},{"./$":23,"./$.iter":22,"./$.iter-define":20,"./$.string-at":30,"./$.uid":33}],64:[function(require,module,exports){
|
2140
2238
|
var $ = require('./$')
|
2141
2239
|
, $def = require('./$.def');
|
2142
2240
|
|
@@ -2154,7 +2252,7 @@ $def($def.S, 'String', {
|
|
2154
2252
|
} return res.join('');
|
2155
2253
|
}
|
2156
2254
|
});
|
2157
|
-
},{"./$":
|
2255
|
+
},{"./$":23,"./$.def":13}],65:[function(require,module,exports){
|
2158
2256
|
'use strict';
|
2159
2257
|
var $ = require('./$')
|
2160
2258
|
, $def = require('./$.def');
|
@@ -2170,13 +2268,14 @@ $def($def.P, 'String', {
|
|
2170
2268
|
return res;
|
2171
2269
|
}
|
2172
2270
|
});
|
2173
|
-
},{"./$":
|
2271
|
+
},{"./$":23,"./$.def":13}],66:[function(require,module,exports){
|
2174
2272
|
'use strict';
|
2175
2273
|
var $ = require('./$')
|
2176
2274
|
, cof = require('./$.cof')
|
2177
2275
|
, $def = require('./$.def');
|
2178
2276
|
|
2179
|
-
|
2277
|
+
// should throw error on regex
|
2278
|
+
$def($def.P + $def.F * !require('./$.throws')(function(){ 'q'.startsWith(/./); }), 'String', {
|
2180
2279
|
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
|
2181
2280
|
startsWith: function startsWith(searchString /*, position = 0 */){
|
2182
2281
|
if(cof(searchString) == 'RegExp')throw TypeError();
|
@@ -2186,7 +2285,7 @@ $def($def.P, 'String', {
|
|
2186
2285
|
return that.slice(index, index + searchString.length) === searchString;
|
2187
2286
|
}
|
2188
2287
|
});
|
2189
|
-
},{"./$":
|
2288
|
+
},{"./$":23,"./$.cof":7,"./$.def":13,"./$.throws":32}],67:[function(require,module,exports){
|
2190
2289
|
'use strict';
|
2191
2290
|
// ECMAScript 6 symbols shim
|
2192
2291
|
var $ = require('./$')
|
@@ -2194,39 +2293,97 @@ var $ = require('./$')
|
|
2194
2293
|
, uid = require('./$.uid')
|
2195
2294
|
, $def = require('./$.def')
|
2196
2295
|
, keyOf = require('./$.keyof')
|
2296
|
+
, enumKeys = require('./$.enum-keys')
|
2297
|
+
, assertObject = require('./$.assert').obj
|
2197
2298
|
, has = $.has
|
2198
|
-
,
|
2299
|
+
, $create = $.create
|
2300
|
+
, getDesc = $.getDesc
|
2301
|
+
, setDesc = $.setDesc
|
2302
|
+
, desc = $.desc
|
2199
2303
|
, getNames = $.getNames
|
2200
2304
|
, toObject = $.toObject
|
2201
2305
|
, Symbol = $.g.Symbol
|
2202
|
-
, Base = Symbol
|
2203
2306
|
, setter = false
|
2204
|
-
, TAG = uid
|
2307
|
+
, TAG = uid('tag')
|
2308
|
+
, HIDDEN = uid('hidden')
|
2205
2309
|
, SymbolRegistry = {}
|
2206
|
-
, AllSymbols
|
2310
|
+
, AllSymbols = {}
|
2311
|
+
, useNative = $.isFunction(Symbol);
|
2207
2312
|
|
2208
2313
|
function wrap(tag){
|
2209
|
-
var sym = AllSymbols[tag] = $.set(
|
2210
|
-
$.DESC && setter &&
|
2314
|
+
var sym = AllSymbols[tag] = $.set($create(Symbol.prototype), TAG, tag);
|
2315
|
+
$.DESC && setter && setDesc(Object.prototype, tag, {
|
2211
2316
|
configurable: true,
|
2212
2317
|
set: function(value){
|
2213
|
-
|
2318
|
+
if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
|
2319
|
+
setDesc(this, tag, desc(1, value));
|
2214
2320
|
}
|
2215
2321
|
});
|
2216
2322
|
return sym;
|
2217
2323
|
}
|
2218
2324
|
|
2325
|
+
function defineProperty(it, key, D){
|
2326
|
+
if(D && has(AllSymbols, key)){
|
2327
|
+
if(!D.enumerable){
|
2328
|
+
if(!has(it, HIDDEN))setDesc(it, HIDDEN, desc(1, {}));
|
2329
|
+
it[HIDDEN][key] = true;
|
2330
|
+
} else {
|
2331
|
+
if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
|
2332
|
+
D.enumerable = false;
|
2333
|
+
}
|
2334
|
+
} return setDesc(it, key, D);
|
2335
|
+
}
|
2336
|
+
function defineProperties(it, P){
|
2337
|
+
assertObject(it);
|
2338
|
+
var keys = enumKeys(P = toObject(P))
|
2339
|
+
, i = 0
|
2340
|
+
, l = keys.length
|
2341
|
+
, key;
|
2342
|
+
while(l > i)defineProperty(it, key = keys[i++], P[key]);
|
2343
|
+
return it;
|
2344
|
+
}
|
2345
|
+
function create(it, P){
|
2346
|
+
return P === undefined ? $create(it) : defineProperties($create(it), P);
|
2347
|
+
}
|
2348
|
+
function getOwnPropertyDescriptor(it, key){
|
2349
|
+
var D = getDesc(it = toObject(it), key);
|
2350
|
+
if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
|
2351
|
+
return D;
|
2352
|
+
}
|
2353
|
+
function getOwnPropertyNames(it){
|
2354
|
+
var names = getNames(toObject(it))
|
2355
|
+
, result = []
|
2356
|
+
, i = 0
|
2357
|
+
, key;
|
2358
|
+
while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
|
2359
|
+
return result;
|
2360
|
+
}
|
2361
|
+
function getOwnPropertySymbols(it){
|
2362
|
+
var names = getNames(toObject(it))
|
2363
|
+
, result = []
|
2364
|
+
, i = 0
|
2365
|
+
, key;
|
2366
|
+
while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
|
2367
|
+
return result;
|
2368
|
+
}
|
2369
|
+
|
2219
2370
|
// 19.4.1.1 Symbol([description])
|
2220
|
-
if(
|
2371
|
+
if(!useNative){
|
2221
2372
|
Symbol = function Symbol(description){
|
2222
2373
|
if(this instanceof Symbol)throw TypeError('Symbol is not a constructor');
|
2223
2374
|
return wrap(uid(description));
|
2224
2375
|
};
|
2225
|
-
hide(Symbol.prototype, 'toString', function(){
|
2376
|
+
$.hide(Symbol.prototype, 'toString', function(){
|
2226
2377
|
return this[TAG];
|
2227
2378
|
});
|
2379
|
+
|
2380
|
+
$.create = create;
|
2381
|
+
$.setDesc = defineProperty;
|
2382
|
+
$.getDesc = getOwnPropertyDescriptor;
|
2383
|
+
$.setDescs = defineProperties;
|
2384
|
+
$.getNames = getOwnPropertyNames;
|
2385
|
+
$.getSymbols = getOwnPropertySymbols;
|
2228
2386
|
}
|
2229
|
-
$def($def.G + $def.W, {Symbol: Symbol});
|
2230
2387
|
|
2231
2388
|
var symbolStatics = {
|
2232
2389
|
// 19.4.2.1 Symbol.for(key)
|
@@ -2239,8 +2396,6 @@ var symbolStatics = {
|
|
2239
2396
|
keyFor: function keyFor(key){
|
2240
2397
|
return keyOf(SymbolRegistry, key);
|
2241
2398
|
},
|
2242
|
-
pure: uid.safe,
|
2243
|
-
set: $.set,
|
2244
2399
|
useSetter: function(){ setter = true; },
|
2245
2400
|
useSimple: function(){ setter = false; }
|
2246
2401
|
};
|
@@ -2260,35 +2415,38 @@ $.each.call((
|
|
2260
2415
|
'species,split,toPrimitive,toStringTag,unscopables'
|
2261
2416
|
).split(','), function(it){
|
2262
2417
|
var sym = require('./$.wks')(it);
|
2263
|
-
symbolStatics[it] =
|
2418
|
+
symbolStatics[it] = useNative ? sym : wrap(sym);
|
2264
2419
|
}
|
2265
2420
|
);
|
2266
2421
|
|
2267
2422
|
setter = true;
|
2268
2423
|
|
2424
|
+
$def($def.G + $def.W, {Symbol: Symbol});
|
2425
|
+
|
2269
2426
|
$def($def.S, 'Symbol', symbolStatics);
|
2270
2427
|
|
2271
|
-
$def($def.S + $def.F *
|
2428
|
+
$def($def.S + $def.F * !useNative, 'Object', {
|
2429
|
+
// 19.1.2.2 Object.create(O [, Properties])
|
2430
|
+
create: create,
|
2431
|
+
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
|
2432
|
+
defineProperty: defineProperty,
|
2433
|
+
// 19.1.2.3 Object.defineProperties(O, Properties)
|
2434
|
+
defineProperties: defineProperties,
|
2435
|
+
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
|
2436
|
+
getOwnPropertyDescriptor: getOwnPropertyDescriptor,
|
2272
2437
|
// 19.1.2.7 Object.getOwnPropertyNames(O)
|
2273
|
-
getOwnPropertyNames:
|
2274
|
-
var names = getNames(toObject(it)), result = [], key, i = 0;
|
2275
|
-
while(names.length > i)has(AllSymbols, key = names[i++]) || result.push(key);
|
2276
|
-
return result;
|
2277
|
-
},
|
2438
|
+
getOwnPropertyNames: getOwnPropertyNames,
|
2278
2439
|
// 19.1.2.8 Object.getOwnPropertySymbols(O)
|
2279
|
-
getOwnPropertySymbols:
|
2280
|
-
var names = getNames(toObject(it)), result = [], key, i = 0;
|
2281
|
-
while(names.length > i)has(AllSymbols, key = names[i++]) && result.push(AllSymbols[key]);
|
2282
|
-
return result;
|
2283
|
-
}
|
2440
|
+
getOwnPropertySymbols: getOwnPropertySymbols
|
2284
2441
|
});
|
2285
2442
|
|
2443
|
+
// 19.4.3.5 Symbol.prototype[@@toStringTag]
|
2286
2444
|
setTag(Symbol, 'Symbol');
|
2287
2445
|
// 20.2.1.9 Math[@@toStringTag]
|
2288
2446
|
setTag(Math, 'Math', true);
|
2289
2447
|
// 24.3.3 JSON[@@toStringTag]
|
2290
2448
|
setTag($.g.JSON, 'JSON', true);
|
2291
|
-
},{"./$":
|
2449
|
+
},{"./$":23,"./$.assert":5,"./$.cof":7,"./$.def":13,"./$.enum-keys":15,"./$.keyof":24,"./$.uid":33,"./$.wks":35}],68:[function(require,module,exports){
|
2292
2450
|
'use strict';
|
2293
2451
|
var $ = require('./$')
|
2294
2452
|
, weak = require('./$.collection-weak')
|
@@ -2329,7 +2487,7 @@ if($.FW && new WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
|
|
2329
2487
|
};
|
2330
2488
|
});
|
2331
2489
|
}
|
2332
|
-
},{"./$":
|
2490
|
+
},{"./$":23,"./$.collection":11,"./$.collection-weak":10}],69:[function(require,module,exports){
|
2333
2491
|
'use strict';
|
2334
2492
|
var weak = require('./$.collection-weak');
|
2335
2493
|
|
@@ -2340,14 +2498,17 @@ require('./$.collection')('WeakSet', {
|
|
2340
2498
|
return weak.def(this, value, true);
|
2341
2499
|
}
|
2342
2500
|
}, weak, false, true);
|
2343
|
-
},{"./$.collection":
|
2501
|
+
},{"./$.collection":11,"./$.collection-weak":10}],70:[function(require,module,exports){
|
2344
2502
|
// https://github.com/domenic/Array.prototype.includes
|
2345
2503
|
var $def = require('./$.def');
|
2346
2504
|
$def($def.P, 'Array', {
|
2347
2505
|
includes: require('./$.array-includes')(true)
|
2348
2506
|
});
|
2349
2507
|
require('./$.unscope')('includes');
|
2350
|
-
},{"./$.array-includes":
|
2508
|
+
},{"./$.array-includes":3,"./$.def":13,"./$.unscope":34}],71:[function(require,module,exports){
|
2509
|
+
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
|
2510
|
+
require('./$.collection-to-json')('Map');
|
2511
|
+
},{"./$.collection-to-json":9}],72:[function(require,module,exports){
|
2351
2512
|
// https://gist.github.com/WebReflection/9353781
|
2352
2513
|
var $ = require('./$')
|
2353
2514
|
, $def = require('./$.def')
|
@@ -2363,7 +2524,7 @@ $def($def.S, 'Object', {
|
|
2363
2524
|
return result;
|
2364
2525
|
}
|
2365
2526
|
});
|
2366
|
-
},{"./$":
|
2527
|
+
},{"./$":23,"./$.def":13,"./$.own-keys":25}],73:[function(require,module,exports){
|
2367
2528
|
// http://goo.gl/XkBrjD
|
2368
2529
|
var $ = require('./$')
|
2369
2530
|
, $def = require('./$.def');
|
@@ -2384,30 +2545,22 @@ $def($def.S, 'Object', {
|
|
2384
2545
|
values: createObjectToArray(false),
|
2385
2546
|
entries: createObjectToArray(true)
|
2386
2547
|
});
|
2387
|
-
},{"./$":
|
2548
|
+
},{"./$":23,"./$.def":13}],74:[function(require,module,exports){
|
2388
2549
|
// https://gist.github.com/kangax/9698100
|
2389
2550
|
var $def = require('./$.def');
|
2390
2551
|
$def($def.S, 'RegExp', {
|
2391
2552
|
escape: require('./$.replacer')(/([\\\-[\]{}()*+?.,^$|])/g, '\\$1', true)
|
2392
2553
|
});
|
2393
|
-
},{"./$.def":
|
2554
|
+
},{"./$.def":13,"./$.replacer":27}],75:[function(require,module,exports){
|
2394
2555
|
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
|
2395
|
-
|
2396
|
-
|
2397
|
-
$def($def.P, 'Set', {
|
2398
|
-
toJSON: function(){
|
2399
|
-
var arr = [];
|
2400
|
-
forOf(this, false, arr.push, arr);
|
2401
|
-
return arr;
|
2402
|
-
}
|
2403
|
-
});
|
2404
|
-
},{"./$.def":11,"./$.iter":15}],67:[function(require,module,exports){
|
2556
|
+
require('./$.collection-to-json')('Set');
|
2557
|
+
},{"./$.collection-to-json":9}],76:[function(require,module,exports){
|
2405
2558
|
// https://github.com/mathiasbynens/String.prototype.at
|
2406
2559
|
var $def = require('./$.def');
|
2407
2560
|
$def($def.P, 'String', {
|
2408
2561
|
at: require('./$.string-at')(true)
|
2409
2562
|
});
|
2410
|
-
},{"./$.def":
|
2563
|
+
},{"./$.def":13,"./$.string-at":30}],77:[function(require,module,exports){
|
2411
2564
|
// JavaScript 1.6 / Strawman array statics shim
|
2412
2565
|
var $ = require('./$')
|
2413
2566
|
, $def = require('./$.def')
|
@@ -2424,7 +2577,7 @@ setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3);
|
|
2424
2577
|
setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' +
|
2425
2578
|
'reduce,reduceRight,copyWithin,fill,turn');
|
2426
2579
|
$def($def.S, 'Array', statics);
|
2427
|
-
},{"./$":
|
2580
|
+
},{"./$":23,"./$.ctx":12,"./$.def":13}],78:[function(require,module,exports){
|
2428
2581
|
require('./es6.array.iterator');
|
2429
2582
|
var $ = require('./$')
|
2430
2583
|
, Iterators = require('./$.iter').Iterators
|
@@ -2435,14 +2588,14 @@ if($.FW && NodeList && !(ITERATOR in NodeList.prototype)){
|
|
2435
2588
|
$.hide(NodeList.prototype, ITERATOR, ArrayValues);
|
2436
2589
|
}
|
2437
2590
|
Iterators.NodeList = ArrayValues;
|
2438
|
-
},{"./$":
|
2591
|
+
},{"./$":23,"./$.iter":22,"./$.wks":35,"./es6.array.iterator":42}],79:[function(require,module,exports){
|
2439
2592
|
var $def = require('./$.def')
|
2440
2593
|
, $task = require('./$.task');
|
2441
2594
|
$def($def.G + $def.B, {
|
2442
2595
|
setImmediate: $task.set,
|
2443
2596
|
clearImmediate: $task.clear
|
2444
2597
|
});
|
2445
|
-
},{"./$.def":
|
2598
|
+
},{"./$.def":13,"./$.task":31}],80:[function(require,module,exports){
|
2446
2599
|
// ie9- setTimeout & setInterval additional parameters fix
|
2447
2600
|
var $ = require('./$')
|
2448
2601
|
, $def = require('./$.def')
|
@@ -2463,7 +2616,7 @@ $def($def.G + $def.B + $def.F * MSIE, {
|
|
2463
2616
|
setTimeout: wrap($.g.setTimeout),
|
2464
2617
|
setInterval: wrap($.g.setInterval)
|
2465
2618
|
});
|
2466
|
-
},{"./$":
|
2619
|
+
},{"./$":23,"./$.def":13,"./$.invoke":18,"./$.partial":26}],81:[function(require,module,exports){
|
2467
2620
|
require('./modules/es5');
|
2468
2621
|
require('./modules/es6.symbol');
|
2469
2622
|
require('./modules/es6.object.assign');
|
@@ -2503,13 +2656,14 @@ require('./modules/es7.string.at');
|
|
2503
2656
|
require('./modules/es7.regexp.escape');
|
2504
2657
|
require('./modules/es7.object.get-own-property-descriptors');
|
2505
2658
|
require('./modules/es7.object.to-array');
|
2659
|
+
require('./modules/es7.map.to-json');
|
2506
2660
|
require('./modules/es7.set.to-json');
|
2507
2661
|
require('./modules/js.array.statics');
|
2508
2662
|
require('./modules/web.timers');
|
2509
2663
|
require('./modules/web.immediate');
|
2510
2664
|
require('./modules/web.dom.iterable');
|
2511
2665
|
module.exports = require('./modules/$').core;
|
2512
|
-
},{"./modules/$":
|
2666
|
+
},{"./modules/$":23,"./modules/es5":36,"./modules/es6.array.copy-within":37,"./modules/es6.array.fill":38,"./modules/es6.array.find":40,"./modules/es6.array.find-index":39,"./modules/es6.array.from":41,"./modules/es6.array.iterator":42,"./modules/es6.array.of":43,"./modules/es6.array.species":44,"./modules/es6.function.name":45,"./modules/es6.map":46,"./modules/es6.math":47,"./modules/es6.number.constructor":48,"./modules/es6.number.statics":49,"./modules/es6.object.assign":50,"./modules/es6.object.is":51,"./modules/es6.object.set-prototype-of":52,"./modules/es6.object.statics-accept-primitives":53,"./modules/es6.object.to-string":54,"./modules/es6.promise":55,"./modules/es6.reflect":56,"./modules/es6.regexp":57,"./modules/es6.set":58,"./modules/es6.string.code-point-at":59,"./modules/es6.string.ends-with":60,"./modules/es6.string.from-code-point":61,"./modules/es6.string.includes":62,"./modules/es6.string.iterator":63,"./modules/es6.string.raw":64,"./modules/es6.string.repeat":65,"./modules/es6.string.starts-with":66,"./modules/es6.symbol":67,"./modules/es6.weak-map":68,"./modules/es6.weak-set":69,"./modules/es7.array.includes":70,"./modules/es7.map.to-json":71,"./modules/es7.object.get-own-property-descriptors":72,"./modules/es7.object.to-array":73,"./modules/es7.regexp.escape":74,"./modules/es7.set.to-json":75,"./modules/es7.string.at":76,"./modules/js.array.statics":77,"./modules/web.dom.iterable":78,"./modules/web.immediate":79,"./modules/web.timers":80}],82:[function(require,module,exports){
|
2513
2667
|
(function (global){
|
2514
2668
|
/**
|
2515
2669
|
* Copyright (c) 2014, Facebook, Inc.
|