diff --git a/dist/redoc.js b/dist/redoc.js index 8aa14fb0..b72d6e4c 100644 --- a/dist/redoc.js +++ b/dist/redoc.js @@ -61,17 +61,18 @@ catch(e){window.attachEvent('onload', $buo_f);} var define_property_1 = __webpack_require__(4); var register_element_1 = __webpack_require__(5); var property_descriptor_1 = __webpack_require__(6); + var timers_1 = __webpack_require__(8); var utils_1 = __webpack_require__(3); var set = 'set'; var clear = 'clear'; var blockingMethods = ['alert', 'prompt', 'confirm']; var _global = typeof window == 'undefined' ? global : window; - patchTimer(_global, set, clear, 'Timeout'); - patchTimer(_global, set, clear, 'Interval'); - patchTimer(_global, set, clear, 'Immediate'); - patchTimer(_global, 'request', 'cancelMacroTask', 'AnimationFrame'); - patchTimer(_global, 'mozRequest', 'mozCancel', 'AnimationFrame'); - patchTimer(_global, 'webkitRequest', 'webkitCancel', 'AnimationFrame'); + timers_1.patchTimer(_global, set, clear, 'Timeout'); + timers_1.patchTimer(_global, set, clear, 'Interval'); + timers_1.patchTimer(_global, set, clear, 'Immediate'); + timers_1.patchTimer(_global, 'request', 'cancelMacroTask', 'AnimationFrame'); + timers_1.patchTimer(_global, 'mozRequest', 'mozCancel', 'AnimationFrame'); + timers_1.patchTimer(_global, 'webkitRequest', 'webkitCancel', 'AnimationFrame'); for (var i = 0; i < blockingMethods.length; i++) { var name = blockingMethods[i]; utils_1.patchMethod(_global, name, function (delegate, symbol, name) { @@ -87,6 +88,62 @@ catch(e){window.attachEvent('onload', $buo_f);} utils_1.patchClass('FileReader'); define_property_1.propertyPatch(); register_element_1.registerElementPatch(_global); + // Treat XMLHTTPRequest as a macrotask. + patchXHR(_global); + var XHR_TASK = utils_1.zoneSymbol('xhrTask'); + function patchXHR(window) { + function findPendingTask(target) { + var pendingTask = target[XHR_TASK]; + return pendingTask; + } + function scheduleTask(task) { + var data = task.data; + data.target.addEventListener('readystatechange', function () { + if (data.target.readyState === XMLHttpRequest.DONE) { + if (!data.aborted) { + task.invoke(); + } + } + }); + var storedTask = data.target[XHR_TASK]; + if (!storedTask) { + data.target[XHR_TASK] = task; + } + setNative.apply(data.target, data.args); + return task; + } + function placeholderCallback() { + } + function clearTask(task) { + var data = task.data; + // Note - ideally, we would call data.target.removeEventListener here, but it's too late + // to prevent it from firing. So instead, we store info for the event listener. + data.aborted = true; + return clearNative.apply(data.target, data.args); + } + var setNative = utils_1.patchMethod(window.XMLHttpRequest.prototype, 'send', function () { return function (self, args) { + var zone = Zone.current; + var options = { + target: self, + isPeriodic: false, + delay: null, + args: args, + aborted: false + }; + return zone.scheduleMacroTask('XMLHttpRequest.send', placeholderCallback, options, scheduleTask, clearTask); + }; }); + var clearNative = utils_1.patchMethod(window.XMLHttpRequest.prototype, 'abort', function (delegate) { return function (self, args) { + var task = findPendingTask(self); + if (task && typeof task.type == 'string') { + // If the XHR has already completed, do nothing. + if (task.cancelFn == null) { + return; + } + task.zone.cancelTask(task); + } + // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no task to cancel. Do nothing. + }; }); + } /// GEO_LOCATION if (_global['navigator'] && _global['navigator'].geolocation) { utils_1.patchPrototype(_global['navigator'].geolocation, [ @@ -94,48 +151,6 @@ catch(e){window.attachEvent('onload', $buo_f);} 'watchPosition' ]); } - function patchTimer(window, setName, cancelName, nameSuffix) { - setName += nameSuffix; - cancelName += nameSuffix; - function scheduleTask(task) { - var data = task.data; - data.args[0] = task.invoke; - data.handleId = setNative.apply(window, data.args); - return task; - } - function clearTask(task) { - return clearNative(task.data.handleId); - } - var setNative = utils_1.patchMethod(window, setName, function (delegate) { return function (self, args) { - if (typeof args[0] === 'function') { - var zone = Zone.current; - var options = { - handleId: null, - isPeriodic: nameSuffix == 'Interval', - delay: (nameSuffix == 'Timeout' || nameSuffix == 'Interval') ? args[1] || 0 : null, - args: args - }; - return zone.scheduleMacroTask(setName, args[0], options, scheduleTask, clearTask); - } - else { - // cause an error by calling it directly. - return delegate.apply(window, args); - } - }; }); - var clearNative = utils_1.patchMethod(window, cancelName, function (delegate) { return function (self, args) { - var task = args[0]; - if (task && typeof task.type == 'string') { - if (task.cancelFn) { - // Do not cancel already canceled functions - task.zone.cancelTask(task); - } - } - else { - // cause an error by calling it directly. - delegate.apply(window, args); - } - }; }); - } /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) @@ -193,13 +208,13 @@ catch(e){window.attachEvent('onload', $buo_f);} return this._zoneDelegate.fork(this, zoneSpec); }; Zone.prototype.wrap = function (callback, source) { - if (typeof callback != 'function') { + if (typeof callback !== 'function') { throw new Error('Expecting function got: ' + callback); } - var callback = this._zoneDelegate.intercept(this, callback, source); + var _callback = this._zoneDelegate.intercept(this, callback, source); var zone = this; return function () { - return zone.runGuarded(callback, this, arguments, source); + return zone.runGuarded(_callback, this, arguments, source); }; }; Zone.prototype.run = function (callback, applyThis, applyArgs, source) { @@ -236,6 +251,7 @@ catch(e){window.attachEvent('onload', $buo_f);} } }; Zone.prototype.runTask = function (task, applyThis, applyArgs) { + task.runCount++; if (task.zone != this) throw new Error('A task can only be run in the zone which created it! (Creation: ' + task.zone.name + '; Execution: ' + this.name + ')'); @@ -244,6 +260,9 @@ catch(e){window.attachEvent('onload', $buo_f);} var oldZone = _currentZone; _currentZone = this; try { + if (task.type == 'macroTask' && task.data && !task.data.isPeriodic) { + task.cancelFn = null; + } try { return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs); } @@ -254,9 +273,6 @@ catch(e){window.attachEvent('onload', $buo_f);} } } finally { - if (task.type == 'macroTask' && task.data && !task.data.isPeriodic) { - task.cancelFn = null; - } _currentZone = oldZone; _currentTask = previousTask; } @@ -272,6 +288,7 @@ catch(e){window.attachEvent('onload', $buo_f);} }; Zone.prototype.cancelTask = function (task) { var value = this._zoneDelegate.cancelTask(this, task); + task.runCount = -1; task.cancelFn = null; return value; }; @@ -403,6 +420,7 @@ catch(e){window.attachEvent('onload', $buo_f);} }()); var ZoneTask = (function () { function ZoneTask(type, zone, source, callback, options, scheduleFn, cancelFn) { + this.runCount = 0; this.type = type; this.zone = zone; this.source = source; @@ -474,7 +492,7 @@ catch(e){window.attachEvent('onload', $buo_f);} while (_uncaughtPromiseErrors.length) { var uncaughtPromiseErrors = _uncaughtPromiseErrors; _uncaughtPromiseErrors = []; - for (var i = 0; i < uncaughtPromiseErrors.length; i++) { + var _loop_1 = function(i) { var uncaughtPromiseError = uncaughtPromiseErrors[i]; try { uncaughtPromiseError.zone.runGuarded(function () { throw uncaughtPromiseError; }); @@ -482,6 +500,9 @@ catch(e){window.attachEvent('onload', $buo_f);} catch (e) { consoleError(e); } + }; + for (var i = 0; i < uncaughtPromiseErrors.length; i++) { + _loop_1(i); } } _isDrainingMicrotaskQueue = false; @@ -602,8 +623,8 @@ catch(e){window.attachEvent('onload', $buo_f);} var resolve; var reject; var promise = new this(function (res, rej) { resolve = res; reject = rej; }); - var resolvedValues = []; var count = 0; + var resolvedValues = []; function onReject(error) { promise && reject(error); promise = null; } for (var _i = 0, values_2 = values; _i < values_2.length; _i++) { var value = values_2[_i]; @@ -644,17 +665,17 @@ catch(e){window.attachEvent('onload', $buo_f);} global.Promise = ZoneAwarePromise; if (NativePromise) { var NativePromiseProtototype = NativePromise.prototype; - var NativePromiseThen = NativePromiseProtototype[__symbol__('then')] + var NativePromiseThen_1 = NativePromiseProtototype[__symbol__('then')] = NativePromiseProtototype.then; NativePromiseProtototype.then = function (onResolve, onReject) { var nativePromise = this; return new ZoneAwarePromise(function (resolve, reject) { - NativePromiseThen.call(nativePromise, resolve, reject); + NativePromiseThen_1.call(nativePromise, resolve, reject); }).then(onResolve, onReject); }; } return global.Zone = Zone; - })(typeof window == 'undefined' ? global : window); + })(typeof window === 'undefined' ? global : window); /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) @@ -714,23 +735,26 @@ catch(e){window.attachEvent('onload', $buo_f);} ; function patchPrototype(prototype, fnNames) { var source = prototype.constructor['name']; - for (var i = 0; i < fnNames.length; i++) { - var name = fnNames[i]; - var delegate = prototype[name]; + var _loop_1 = function(i) { + var name_1 = fnNames[i]; + var delegate = prototype[name_1]; if (delegate) { - prototype[name] = (function (delegate) { + prototype[name_1] = (function (delegate) { return function () { - return delegate.apply(this, bindArguments(arguments, source + '.' + name)); + return delegate.apply(this, bindArguments(arguments, source + '.' + name_1)); }; })(delegate); } + }; + for (var i = 0; i < fnNames.length; i++) { + _loop_1(i); } } exports.patchPrototype = patchPrototype; ; exports.isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope); exports.isNode = (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'); - exports.isBrowser = !exports.isNode && !exports.isWebWorker && !!(window && window['HTMLElement']); + exports.isBrowser = !exports.isNode && !exports.isWebWorker && !!(typeof window !== 'undefined' && window['HTMLElement']); function patchProperty(obj, prop) { var desc = Object.getOwnPropertyDescriptor(obj, prop) || { enumerable: true, @@ -844,8 +868,19 @@ catch(e){window.attachEvent('onload', $buo_f);} else if (handler && handler.handleEvent) { delegate = function (event) { return handler.handleEvent(event); }; } + var validZoneHandler = false; + try { + // In cross site contexts (such as WebDriver frameworks like Selenium), + // accessing the handler object here will cause an exception to be thrown which + // will fail tests prematurely. + validZoneHandler = handler && handler.toString() === "[object FunctionWrapper]"; + } + catch (e) { + // Returning nothing here is fine, because objects in a cross-site context are unusable + return; + } // Ignore special listeners of IE11 & Edge dev tools, see https://github.com/angular/zone.js/issues/150 - if (!delegate || handler && handler.toString() === "[object FunctionWrapper]") { + if (!delegate || validZoneHandler) { return target[SYMBOL_ADD_EVENT_LISTENER](eventName, handler, useCapturing); } var eventTask = findExistingRegisteredTask(target, handler, eventName, useCapturing, false); @@ -992,8 +1027,10 @@ catch(e){window.attachEvent('onload', $buo_f);} "use strict"; var utils_1 = __webpack_require__(3); - // might need similar for object.freeze - // i regret nothing + /* + * This is necessary for Chrome and Chrome mobile, to enable + * things like redefining `createdCallback` on an element. + */ var _defineProperty = Object.defineProperty; var _getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var _create = Object.create; @@ -1162,12 +1199,17 @@ catch(e){window.attachEvent('onload', $buo_f);} // for `onwhatever` properties and replace them with zone-bound functions // - Chrome (for now) function patchViaCapturingAllTheEvents() { - for (var i = 0; i < eventNames.length; i++) { + var _loop_1 = function(i) { var property = eventNames[i]; var onproperty = 'on' + property; document.addEventListener(property, function (event) { - var elt = event.target, bound; - var source = elt.constructor['name'] + '.' + onproperty; + var elt = event.target, bound, source; + if (elt) { + source = elt.constructor['name'] + '.' + onproperty; + } + else { + source = 'unknown.' + onproperty; + } while (elt) { if (elt[onproperty] && !elt[onproperty][unboundKey]) { bound = Zone.current.wrap(elt[onproperty], source); @@ -1177,6 +1219,9 @@ catch(e){window.attachEvent('onload', $buo_f);} elt = elt.parentElement; } }, true); + }; + for (var i = 0; i < eventNames.length; i++) { + _loop_1(i); } ; } @@ -1187,7 +1232,7 @@ catch(e){window.attachEvent('onload', $buo_f);} /* 7 */ /***/ function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(global) {"use strict"; + "use strict"; var utils_1 = __webpack_require__(3); // we have to patch the instance since the proto is non-configurable function apply(_global) { @@ -1217,11 +1262,65 @@ catch(e){window.attachEvent('onload', $buo_f);} utils_1.patchOnProperties(proxySocket, ['close', 'error', 'message', 'open']); return proxySocket; }; - global.WebSocket.prototype = Object.create(WS.prototype, { constructor: { value: WebSocket } }); + for (var prop in WS) { + _global.WebSocket[prop] = WS[prop]; + } } exports.apply = apply; - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + var utils_1 = __webpack_require__(3); + function patchTimer(window, setName, cancelName, nameSuffix) { + var setNative = null; + var clearNative = null; + setName += nameSuffix; + cancelName += nameSuffix; + function scheduleTask(task) { + var data = task.data; + data.args[0] = task.invoke; + data.handleId = setNative.apply(window, data.args); + return task; + } + function clearTask(task) { + return clearNative(task.data.handleId); + } + setNative = utils_1.patchMethod(window, setName, function (delegate) { return function (self, args) { + if (typeof args[0] === 'function') { + var zone = Zone.current; + var options = { + handleId: null, + isPeriodic: nameSuffix === 'Interval', + delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 : null, + args: args + }; + return zone.scheduleMacroTask(setName, args[0], options, scheduleTask, clearTask); + } + else { + // cause an error by calling it directly. + return delegate.apply(window, args); + } + }; }); + clearNative = utils_1.patchMethod(window, cancelName, function (delegate) { return function (self, args) { + var task = args[0]; + if (task && typeof task.type === 'string') { + if (task.cancelFn && task.data.isPeriodic || task.runCount === 0) { + // Do not cancel already canceled functions + task.zone.cancelTask(task); + } + } + else { + // cause an error by calling it directly. + delegate.apply(window, args); + } + }; }); + } + exports.patchTimer = patchTimer; + /***/ } /******/ ]); @@ -2189,52 +2288,88 @@ var Reflect; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 2 ? $$[2] : undefined + , end = arguments.length > 2 ? arguments[2] : undefined , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) , inc = 1; if(from < to && to < from + count){ @@ -2249,29 +2384,37 @@ module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, from += inc; } return O; }; -},{"77":77,"80":80,"81":81}],7:[function(_dereq_,module,exports){ +},{"104":104,"107":107,"108":108}],10:[function(_dereq_,module,exports){ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; -var toObject = _dereq_(81) - , toIndex = _dereq_(77) - , toLength = _dereq_(80); -module.exports = [].fill || function fill(value /*, start = 0, end = @length */){ +var toObject = _dereq_(108) + , toIndex = _dereq_(104) + , toLength = _dereq_(107); +module.exports = function fill(value /*, start = 0, end = @length */){ var O = toObject(this) , length = toLength(O.length) - , $$ = arguments - , $$len = $$.length - , index = toIndex($$len > 1 ? $$[1] : undefined, length) - , end = $$len > 2 ? $$[2] : undefined + , aLen = arguments.length + , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) + , end = aLen > 2 ? arguments[2] : undefined , endPos = end === undefined ? length : toIndex(end, length); while(endPos > index)O[index++] = value; return O; }; -},{"77":77,"80":80,"81":81}],8:[function(_dereq_,module,exports){ +},{"104":104,"107":107,"108":108}],11:[function(_dereq_,module,exports){ +var forOf = _dereq_(36); + +module.exports = function(iter, ITERATOR){ + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; + +},{"36":36}],12:[function(_dereq_,module,exports){ // false -> Array#indexOf // true -> Array#includes -var toIObject = _dereq_(79) - , toLength = _dereq_(80) - , toIndex = _dereq_(77); +var toIObject = _dereq_(106) + , toLength = _dereq_(107) + , toIndex = _dereq_(104); module.exports = function(IS_INCLUDES){ return function($this, el, fromIndex){ var O = toIObject($this) @@ -2288,7 +2431,7 @@ module.exports = function(IS_INCLUDES){ } return !IS_INCLUDES && -1; }; }; -},{"77":77,"79":79,"80":80}],9:[function(_dereq_,module,exports){ +},{"104":104,"106":106,"107":107}],13:[function(_dereq_,module,exports){ // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter @@ -2296,25 +2439,26 @@ module.exports = function(IS_INCLUDES){ // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex -var ctx = _dereq_(18) - , IObject = _dereq_(35) - , toObject = _dereq_(81) - , toLength = _dereq_(80) - , asc = _dereq_(10); -module.exports = function(TYPE){ +var ctx = _dereq_(24) + , IObject = _dereq_(44) + , toObject = _dereq_(108) + , toLength = _dereq_(107) + , asc = _dereq_(15); +module.exports = function(TYPE, $create){ var IS_MAP = TYPE == 1 , IS_FILTER = TYPE == 2 , IS_SOME = TYPE == 3 , IS_EVERY = TYPE == 4 , IS_FIND_INDEX = TYPE == 6 - , NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + , NO_HOLES = TYPE == 5 || IS_FIND_INDEX + , create = $create || asc; return function($this, callbackfn, that){ var O = toObject($this) , self = IObject(O) , f = ctx(callbackfn, that, 3) , length = toLength(self.length) , index = 0 - , result = IS_MAP ? asc($this, length) : IS_FILTER ? asc($this, 0) : undefined + , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined , val, res; for(;length > index; index++)if(NO_HOLES || index in self){ val = self[index]; @@ -2332,11 +2476,40 @@ module.exports = function(TYPE){ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; -},{"10":10,"18":18,"35":35,"80":80,"81":81}],10:[function(_dereq_,module,exports){ +},{"107":107,"108":108,"15":15,"24":24,"44":44}],14:[function(_dereq_,module,exports){ +var aFunction = _dereq_(4) + , toObject = _dereq_(108) + , IObject = _dereq_(44) + , toLength = _dereq_(107); + +module.exports = function(that, callbackfn, aLen, memo, isRight){ + aFunction(callbackfn); + var O = toObject(that) + , self = IObject(O) + , length = toLength(O.length) + , index = isRight ? length - 1 : 0 + , i = isRight ? -1 : 1; + if(aLen < 2)for(;;){ + if(index in self){ + memo = self[index]; + index += i; + break; + } + index += i; + if(isRight ? index < 0 : length <= index){ + throw TypeError('Reduce of empty array with no initial value'); + } + } + for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; +},{"107":107,"108":108,"4":4,"44":44}],15:[function(_dereq_,module,exports){ // 9.4.2.3 ArraySpeciesCreate(originalArray, length) -var isObject = _dereq_(39) - , isArray = _dereq_(37) - , SPECIES = _dereq_(84)('species'); +var isObject = _dereq_(48) + , isArray = _dereq_(46) + , SPECIES = _dereq_(114)('species'); module.exports = function(original, length){ var C; if(isArray(original)){ @@ -2349,62 +2522,77 @@ module.exports = function(original, length){ } } return new (C === undefined ? Array : C)(length); }; -},{"37":37,"39":39,"84":84}],11:[function(_dereq_,module,exports){ +},{"114":114,"46":46,"48":48}],16:[function(_dereq_,module,exports){ +'use strict'; +var aFunction = _dereq_(4) + , isObject = _dereq_(48) + , invoke = _dereq_(43) + , arraySlice = [].slice + , factories = {}; + +var construct = function(F, len, args){ + if(!(len in factories)){ + for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /*, args... */){ + var fn = aFunction(this) + , partArgs = arraySlice.call(arguments, 1); + var bound = function(/* args... */){ + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if(isObject(fn.prototype))bound.prototype = fn.prototype; + return bound; +}; +},{"4":4,"43":43,"48":48}],17:[function(_dereq_,module,exports){ // getting tag from 19.1.3.6 Object.prototype.toString() -var cof = _dereq_(12) - , TAG = _dereq_(84)('toStringTag') +var cof = _dereq_(18) + , TAG = _dereq_(114)('toStringTag') // ES3 wrong here , ARG = cof(function(){ return arguments; }()) == 'Arguments'; +// fallback for IE11 Script Access Denied error +var tryGet = function(it, key){ + try { + return it[key]; + } catch(e){ /* empty */ } +}; + module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case - : typeof (T = (O = Object(it))[TAG]) == 'string' ? T + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; -},{"12":12,"84":84}],12:[function(_dereq_,module,exports){ +},{"114":114,"18":18}],18:[function(_dereq_,module,exports){ var toString = {}.toString; module.exports = function(it){ return toString.call(it).slice(8, -1); }; -},{}],13:[function(_dereq_,module,exports){ +},{}],19:[function(_dereq_,module,exports){ 'use strict'; -var $ = _dereq_(47) - , hide = _dereq_(32) - , redefineAll = _dereq_(61) - , ctx = _dereq_(18) - , strictNew = _dereq_(70) - , defined = _dereq_(19) - , forOf = _dereq_(28) - , $iterDefine = _dereq_(43) - , step = _dereq_(45) - , ID = _dereq_(83)('id') - , $has = _dereq_(31) - , isObject = _dereq_(39) - , setSpecies = _dereq_(66) - , DESCRIPTORS = _dereq_(20) - , isExtensible = Object.isExtensible || isObject - , SIZE = DESCRIPTORS ? '_s' : 'size' - , id = 0; - -var fastKey = function(it, create){ - // return primitive with prefix - if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if(!$has(it, ID)){ - // can't set id to frozen object - if(!isExtensible(it))return 'F'; - // not necessary to add id - if(!create)return 'E'; - // add missing object id - hide(it, ID, ++id); - // return object id with prefix - } return 'O' + it[ID]; -}; +var dP = _dereq_(66).f + , create = _dereq_(65) + , hide = _dereq_(39) + , redefineAll = _dereq_(85) + , ctx = _dereq_(24) + , anInstance = _dereq_(7) + , defined = _dereq_(26) + , forOf = _dereq_(36) + , $iterDefine = _dereq_(52) + , step = _dereq_(54) + , setSpecies = _dereq_(90) + , DESCRIPTORS = _dereq_(27) + , fastKey = _dereq_(61).fastKey + , SIZE = DESCRIPTORS ? '_s' : 'size'; var getEntry = function(that, key){ // fast case @@ -2419,11 +2607,11 @@ var getEntry = function(that, key){ module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ - strictNew(that, C, NAME); - that._i = $.create(null); // index - that._f = undefined; // first entry - that._l = undefined; // last entry - that[SIZE] = 0; // size + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { @@ -2458,6 +2646,7 @@ module.exports = { // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /*, that = undefined */){ + anInstance(this, C, 'forEach'); var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) , entry; while(entry = entry ? entry.n : this._f){ @@ -2472,7 +2661,7 @@ module.exports = { return !!getEntry(this, key); } }); - if(DESCRIPTORS)$.setDesc(C.prototype, 'size', { + if(DESCRIPTORS)dP(C.prototype, 'size', { get: function(){ return defined(this[SIZE]); } @@ -2532,56 +2721,52 @@ module.exports = { setSpecies(NAME); } }; -},{"18":18,"19":19,"20":20,"28":28,"31":31,"32":32,"39":39,"43":43,"45":45,"47":47,"61":61,"66":66,"70":70,"83":83}],14:[function(_dereq_,module,exports){ +},{"24":24,"26":26,"27":27,"36":36,"39":39,"52":52,"54":54,"61":61,"65":65,"66":66,"7":7,"85":85,"90":90}],20:[function(_dereq_,module,exports){ // https://github.com/DavidBruant/Map-Set.prototype.toJSON -var forOf = _dereq_(28) - , classof = _dereq_(11); +var classof = _dereq_(17) + , from = _dereq_(11); module.exports = function(NAME){ return function toJSON(){ if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); - var arr = []; - forOf(this, false, arr.push, arr); - return arr; + return from(this); }; }; -},{"11":11,"28":28}],15:[function(_dereq_,module,exports){ +},{"11":11,"17":17}],21:[function(_dereq_,module,exports){ 'use strict'; -var hide = _dereq_(32) - , redefineAll = _dereq_(61) - , anObject = _dereq_(5) - , isObject = _dereq_(39) - , strictNew = _dereq_(70) - , forOf = _dereq_(28) - , createArrayMethod = _dereq_(9) - , $has = _dereq_(31) - , WEAK = _dereq_(83)('weak') - , isExtensible = Object.isExtensible || isObject +var redefineAll = _dereq_(85) + , getWeak = _dereq_(61).getWeak + , anObject = _dereq_(8) + , isObject = _dereq_(48) + , anInstance = _dereq_(7) + , forOf = _dereq_(36) + , createArrayMethod = _dereq_(13) + , $has = _dereq_(38) , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , id = 0; -// fallback for frozen keys -var frozenStore = function(that){ - return that._l || (that._l = new FrozenStore); +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function(that){ + return that._l || (that._l = new UncaughtFrozenStore); }; -var FrozenStore = function(){ +var UncaughtFrozenStore = function(){ this.a = []; }; -var findFrozen = function(store, key){ +var findUncaughtFrozen = function(store, key){ return arrayFind(store.a, function(it){ return it[0] === key; }); }; -FrozenStore.prototype = { +UncaughtFrozenStore.prototype = { get: function(key){ - var entry = findFrozen(this, key); + var entry = findUncaughtFrozen(this, key); if(entry)return entry[1]; }, has: function(key){ - return !!findFrozen(this, key); + return !!findUncaughtFrozen(this, key); }, set: function(key, value){ - var entry = findFrozen(this, key); + var entry = findUncaughtFrozen(this, key); if(entry)entry[1] = value; else this.a.push([key, value]); }, @@ -2597,9 +2782,9 @@ FrozenStore.prototype = { module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ - strictNew(that, C, NAME); + anInstance(that, C, NAME, '_i'); that._i = id++; // collection id - that._l = undefined; // leak store for frozen objects + that._l = undefined; // leak store for uncaught frozen objects if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { @@ -2607,42 +2792,43 @@ module.exports = { // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function(key){ if(!isObject(key))return false; - if(!isExtensible(key))return frozenStore(this)['delete'](key); - return $has(key, WEAK) && $has(key[WEAK], this._i) && delete key[WEAK][this._i]; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this)['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key){ if(!isObject(key))return false; - if(!isExtensible(key))return frozenStore(this).has(key); - return $has(key, WEAK) && $has(key[WEAK], this._i); + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).has(key); + return data && $has(data, this._i); } }); return C; }, def: function(that, key, value){ - if(!isExtensible(anObject(key))){ - frozenStore(that).set(key, value); - } else { - $has(key, WEAK) || hide(key, WEAK, {}); - key[WEAK][that._i] = value; - } return that; + var data = getWeak(anObject(key), true); + if(data === true)uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; }, - frozenStore: frozenStore, - WEAK: WEAK + ufstore: uncaughtFrozenStore }; -},{"28":28,"31":31,"32":32,"39":39,"5":5,"61":61,"70":70,"83":83,"9":9}],16:[function(_dereq_,module,exports){ +},{"13":13,"36":36,"38":38,"48":48,"61":61,"7":7,"8":8,"85":85}],22:[function(_dereq_,module,exports){ 'use strict'; -var global = _dereq_(30) - , $export = _dereq_(23) - , redefine = _dereq_(62) - , redefineAll = _dereq_(61) - , forOf = _dereq_(28) - , strictNew = _dereq_(70) - , isObject = _dereq_(39) - , fails = _dereq_(25) - , $iterDetect = _dereq_(44) - , setToStringTag = _dereq_(67); +var global = _dereq_(37) + , $export = _dereq_(31) + , redefine = _dereq_(86) + , redefineAll = _dereq_(85) + , meta = _dereq_(61) + , forOf = _dereq_(36) + , anInstance = _dereq_(7) + , isObject = _dereq_(48) + , fails = _dereq_(33) + , $iterDetect = _dereq_(53) + , setToStringTag = _dereq_(91) + , inheritIfRequired = _dereq_(42); module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ var Base = global[NAME] @@ -2669,6 +2855,7 @@ module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); + meta.NEED = true; } else { var instance = new C // early implementations not supports chaining @@ -2678,20 +2865,23 @@ module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ // most early implementations doesn't supports iterables, most modern - not close it correctly , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new // for early implementations -0 and +0 not the same - , BUGGY_ZERO; + , BUGGY_ZERO = !IS_WEAK && fails(function(){ + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C() + , index = 5; + while(index--)$instance[ADDER](index, index); + return !$instance.has(-0); + }); if(!ACCEPT_ITERABLES){ C = wrapper(function(target, iterable){ - strictNew(target, C, NAME); - var that = new Base; + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base, target, C); if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); return that; }); C.prototype = proto; proto.constructor = C; } - IS_WEAK || instance.forEach(function(val, key){ - BUGGY_ZERO = 1 / key === -Infinity; - }); if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){ fixMethod('delete'); fixMethod('has'); @@ -2711,12 +2901,12 @@ module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ return C; }; -},{"23":23,"25":25,"28":28,"30":30,"39":39,"44":44,"61":61,"62":62,"67":67,"70":70}],17:[function(_dereq_,module,exports){ -var core = module.exports = {version: '1.2.6'}; +},{"31":31,"33":33,"36":36,"37":37,"42":42,"48":48,"53":53,"61":61,"7":7,"85":85,"86":86,"91":91}],23:[function(_dereq_,module,exports){ +var core = module.exports = {version: '2.2.1'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef -},{}],18:[function(_dereq_,module,exports){ +},{}],24:[function(_dereq_,module,exports){ // optional / simple context binding -var aFunction = _dereq_(3); +var aFunction = _dereq_(4); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; @@ -2735,46 +2925,62 @@ module.exports = function(fn, that, length){ return fn.apply(that, arguments); }; }; -},{"3":3}],19:[function(_dereq_,module,exports){ +},{"4":4}],25:[function(_dereq_,module,exports){ +'use strict'; +var anObject = _dereq_(8) + , toPrimitive = _dereq_(109) + , NUMBER = 'number'; + +module.exports = function(hint){ + if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; +},{"109":109,"8":8}],26:[function(_dereq_,module,exports){ // 7.2.1 RequireObjectCoercible(argument) module.exports = function(it){ if(it == undefined)throw TypeError("Can't call method on " + it); return it; }; -},{}],20:[function(_dereq_,module,exports){ +},{}],27:[function(_dereq_,module,exports){ // Thank's IE8 for his funny defineProperty -module.exports = !_dereq_(25)(function(){ +module.exports = !_dereq_(33)(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; }); -},{"25":25}],21:[function(_dereq_,module,exports){ -var isObject = _dereq_(39) - , document = _dereq_(30).document +},{"33":33}],28:[function(_dereq_,module,exports){ +var isObject = _dereq_(48) + , document = _dereq_(37).document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function(it){ return is ? document.createElement(it) : {}; }; -},{"30":30,"39":39}],22:[function(_dereq_,module,exports){ +},{"37":37,"48":48}],29:[function(_dereq_,module,exports){ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); +},{}],30:[function(_dereq_,module,exports){ // all enumerable object keys, includes symbols -var $ = _dereq_(47); +var getKeys = _dereq_(75) + , gOPS = _dereq_(72) + , pIE = _dereq_(76); module.exports = function(it){ - var keys = $.getKeys(it) - , getSymbols = $.getSymbols; + var result = getKeys(it) + , getSymbols = gOPS.f; if(getSymbols){ var symbols = getSymbols(it) - , isEnum = $.isEnum + , isEnum = pIE.f , i = 0 , key; - while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key); - } - return keys; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; }; -},{"47":47}],23:[function(_dereq_,module,exports){ -var global = _dereq_(30) - , core = _dereq_(17) - , hide = _dereq_(32) - , redefine = _dereq_(62) - , ctx = _dereq_(18) +},{"72":72,"75":75,"76":76}],31:[function(_dereq_,module,exports){ +var global = _dereq_(37) + , core = _dereq_(23) + , hide = _dereq_(39) + , redefine = _dereq_(86) + , ctx = _dereq_(24) , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ @@ -2790,13 +2996,13 @@ var $export = function(type, name, source){ if(IS_GLOBAL)source = name; for(key in source){ // contains in native - own = !IS_FORCED && target && key in target; + own = !IS_FORCED && target && target[key] !== undefined; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // extend global - if(target && !own)redefine(target, key, out); + if(target)redefine(target, key, out, type & $export.U); // export if(exports[key] != out)hide(exports, key, exp); if(IS_PROTO && expProto[key] != out)expProto[key] = out; @@ -2804,15 +3010,17 @@ var $export = function(type, name, source){ }; global.core = core; // type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` module.exports = $export; -},{"17":17,"18":18,"30":30,"32":32,"62":62}],24:[function(_dereq_,module,exports){ -var MATCH = _dereq_(84)('match'); +},{"23":23,"24":24,"37":37,"39":39,"86":86}],32:[function(_dereq_,module,exports){ +var MATCH = _dereq_(114)('match'); module.exports = function(KEY){ var re = /./; try { @@ -2824,7 +3032,7 @@ module.exports = function(KEY){ } catch(f){ /* empty */ } } return true; }; -},{"84":84}],25:[function(_dereq_,module,exports){ +},{"114":114}],33:[function(_dereq_,module,exports){ module.exports = function(exec){ try { return !!exec(); @@ -2832,37 +3040,39 @@ module.exports = function(exec){ return true; } }; -},{}],26:[function(_dereq_,module,exports){ +},{}],34:[function(_dereq_,module,exports){ 'use strict'; -var hide = _dereq_(32) - , redefine = _dereq_(62) - , fails = _dereq_(25) - , defined = _dereq_(19) - , wks = _dereq_(84); +var hide = _dereq_(39) + , redefine = _dereq_(86) + , fails = _dereq_(33) + , defined = _dereq_(26) + , wks = _dereq_(114); module.exports = function(KEY, length, exec){ var SYMBOL = wks(KEY) - , original = ''[KEY]; + , fns = exec(defined, SYMBOL, ''[KEY]) + , strfn = fns[0] + , rxfn = fns[1]; if(fails(function(){ var O = {}; O[SYMBOL] = function(){ return 7; }; return ''[KEY](O) != 7; })){ - redefine(String.prototype, KEY, exec(defined, SYMBOL, original)); + redefine(String.prototype, KEY, strfn); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) - ? function(string, arg){ return original.call(string, this, arg); } + ? function(string, arg){ return rxfn.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) - : function(string){ return original.call(string, this); } + : function(string){ return rxfn.call(string, this); } ); } }; -},{"19":19,"25":25,"32":32,"62":62,"84":84}],27:[function(_dereq_,module,exports){ +},{"114":114,"26":26,"33":33,"39":39,"86":86}],35:[function(_dereq_,module,exports){ 'use strict'; // 21.2.5.3 get RegExp.prototype.flags -var anObject = _dereq_(5); +var anObject = _dereq_(8); module.exports = function(){ var that = anObject(this) , result = ''; @@ -2873,15 +3083,15 @@ module.exports = function(){ if(that.sticky) result += 'y'; return result; }; -},{"5":5}],28:[function(_dereq_,module,exports){ -var ctx = _dereq_(18) - , call = _dereq_(41) - , isArrayIter = _dereq_(36) - , anObject = _dereq_(5) - , toLength = _dereq_(80) - , getIterFn = _dereq_(85); -module.exports = function(iterable, entries, fn, that){ - var iterFn = getIterFn(iterable) +},{"8":8}],36:[function(_dereq_,module,exports){ +var ctx = _dereq_(24) + , call = _dereq_(50) + , isArrayIter = _dereq_(45) + , anObject = _dereq_(8) + , toLength = _dereq_(107) + , getIterFn = _dereq_(115); +module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) , f = ctx(fn, that, entries ? 2 : 1) , index = 0 , length, step, iterator; @@ -2893,49 +3103,41 @@ module.exports = function(iterable, entries, fn, that){ call(iterator, f, step.value, entries); } }; -},{"18":18,"36":36,"41":41,"5":5,"80":80,"85":85}],29:[function(_dereq_,module,exports){ -// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window -var toIObject = _dereq_(79) - , getNames = _dereq_(47).getNames - , toString = {}.toString; - -var windowNames = typeof window == 'object' && Object.getOwnPropertyNames - ? Object.getOwnPropertyNames(window) : []; - -var getWindowNames = function(it){ - try { - return getNames(it); - } catch(e){ - return windowNames.slice(); - } -}; - -module.exports.get = function getOwnPropertyNames(it){ - if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it); - return getNames(toIObject(it)); -}; -},{"47":47,"79":79}],30:[function(_dereq_,module,exports){ +},{"107":107,"115":115,"24":24,"45":45,"50":50,"8":8}],37:[function(_dereq_,module,exports){ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef -},{}],31:[function(_dereq_,module,exports){ +},{}],38:[function(_dereq_,module,exports){ var hasOwnProperty = {}.hasOwnProperty; module.exports = function(it, key){ return hasOwnProperty.call(it, key); }; -},{}],32:[function(_dereq_,module,exports){ -var $ = _dereq_(47) - , createDesc = _dereq_(60); -module.exports = _dereq_(20) ? function(object, key, value){ - return $.setDesc(object, key, createDesc(1, value)); +},{}],39:[function(_dereq_,module,exports){ +var dP = _dereq_(66) + , createDesc = _dereq_(84); +module.exports = _dereq_(27) ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ object[key] = value; return object; }; -},{"20":20,"47":47,"60":60}],33:[function(_dereq_,module,exports){ -module.exports = _dereq_(30).document && document.documentElement; -},{"30":30}],34:[function(_dereq_,module,exports){ +},{"27":27,"66":66,"84":84}],40:[function(_dereq_,module,exports){ +module.exports = _dereq_(37).document && document.documentElement; +},{"37":37}],41:[function(_dereq_,module,exports){ +module.exports = !_dereq_(27) && !_dereq_(33)(function(){ + return Object.defineProperty(_dereq_(28)('div'), 'a', {get: function(){ return 7; }}).a != 7; +}); +},{"27":27,"28":28,"33":33}],42:[function(_dereq_,module,exports){ +var isObject = _dereq_(48) + , setPrototypeOf = _dereq_(89).set; +module.exports = function(that, target, C){ + var P, S = target.constructor; + if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){ + setPrototypeOf(that, P); + } return that; +}; +},{"48":48,"89":89}],43:[function(_dereq_,module,exports){ // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function(fn, args, that){ var un = that === undefined; @@ -2952,50 +3154,50 @@ module.exports = function(fn, args, that){ : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); }; -},{}],35:[function(_dereq_,module,exports){ +},{}],44:[function(_dereq_,module,exports){ // fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = _dereq_(12); +var cof = _dereq_(18); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; -},{"12":12}],36:[function(_dereq_,module,exports){ +},{"18":18}],45:[function(_dereq_,module,exports){ // check on default Array iterator -var Iterators = _dereq_(46) - , ITERATOR = _dereq_(84)('iterator') +var Iterators = _dereq_(55) + , ITERATOR = _dereq_(114)('iterator') , ArrayProto = Array.prototype; module.exports = function(it){ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; -},{"46":46,"84":84}],37:[function(_dereq_,module,exports){ +},{"114":114,"55":55}],46:[function(_dereq_,module,exports){ // 7.2.2 IsArray(argument) -var cof = _dereq_(12); -module.exports = Array.isArray || function(arg){ +var cof = _dereq_(18); +module.exports = Array.isArray || function isArray(arg){ return cof(arg) == 'Array'; }; -},{"12":12}],38:[function(_dereq_,module,exports){ +},{"18":18}],47:[function(_dereq_,module,exports){ // 20.1.2.3 Number.isInteger(number) -var isObject = _dereq_(39) +var isObject = _dereq_(48) , floor = Math.floor; module.exports = function isInteger(it){ return !isObject(it) && isFinite(it) && floor(it) === it; }; -},{"39":39}],39:[function(_dereq_,module,exports){ +},{"48":48}],48:[function(_dereq_,module,exports){ module.exports = function(it){ return typeof it === 'object' ? it !== null : typeof it === 'function'; }; -},{}],40:[function(_dereq_,module,exports){ +},{}],49:[function(_dereq_,module,exports){ // 7.2.8 IsRegExp(argument) -var isObject = _dereq_(39) - , cof = _dereq_(12) - , MATCH = _dereq_(84)('match'); +var isObject = _dereq_(48) + , cof = _dereq_(18) + , MATCH = _dereq_(114)('match'); module.exports = function(it){ var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; -},{"12":12,"39":39,"84":84}],41:[function(_dereq_,module,exports){ +},{"114":114,"18":18,"48":48}],50:[function(_dereq_,module,exports){ // call something on iterator step with safe closing on error -var anObject = _dereq_(5); +var anObject = _dereq_(8); module.exports = function(iterator, fn, value, entries){ try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); @@ -3006,32 +3208,32 @@ module.exports = function(iterator, fn, value, entries){ throw e; } }; -},{"5":5}],42:[function(_dereq_,module,exports){ +},{"8":8}],51:[function(_dereq_,module,exports){ 'use strict'; -var $ = _dereq_(47) - , descriptor = _dereq_(60) - , setToStringTag = _dereq_(67) +var create = _dereq_(65) + , descriptor = _dereq_(84) + , setToStringTag = _dereq_(91) , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -_dereq_(32)(IteratorPrototype, _dereq_(84)('iterator'), function(){ return this; }); +_dereq_(39)(IteratorPrototype, _dereq_(114)('iterator'), function(){ return this; }); module.exports = function(Constructor, NAME, next){ - Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)}); + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); setToStringTag(Constructor, NAME + ' Iterator'); }; -},{"32":32,"47":47,"60":60,"67":67,"84":84}],43:[function(_dereq_,module,exports){ +},{"114":114,"39":39,"65":65,"84":84,"91":91}],52:[function(_dereq_,module,exports){ 'use strict'; -var LIBRARY = _dereq_(49) - , $export = _dereq_(23) - , redefine = _dereq_(62) - , hide = _dereq_(32) - , has = _dereq_(31) - , Iterators = _dereq_(46) - , $iterCreate = _dereq_(42) - , setToStringTag = _dereq_(67) - , getProto = _dereq_(47).getProto - , ITERATOR = _dereq_(84)('iterator') +var LIBRARY = _dereq_(57) + , $export = _dereq_(31) + , redefine = _dereq_(86) + , hide = _dereq_(39) + , has = _dereq_(38) + , Iterators = _dereq_(55) + , $iterCreate = _dereq_(51) + , setToStringTag = _dereq_(91) + , getPrototypeOf = _dereq_(73) + , ITERATOR = _dereq_(114)('iterator') , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` , FF_ITERATOR = '@@iterator' , KEYS = 'keys' @@ -3054,20 +3256,24 @@ module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED , proto = Base.prototype , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] , $default = $native || getMethod(DEFAULT) - , methods, key; + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; // Fix native - if($native){ - var IteratorPrototype = getProto($default.call(new Base)); - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // FF fix - if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); - // fix Array#{values, @@iterator}.name in V8 / FF - if(DEF_VALUES && $native.name !== VALUES){ - VALUES_BUG = true; - $default = function values(){ return $native.call(this); }; + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); } } + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } // Define iterator if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ hide(proto, ITERATOR, $default); @@ -3077,9 +3283,9 @@ module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED Iterators[TAG] = returnThis; if(DEFAULT){ methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: !DEF_VALUES ? $default : getMethod('entries') + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries }; if(FORCED)for(key in methods){ if(!(key in proto))redefine(proto, key, methods[key]); @@ -3087,8 +3293,8 @@ module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED } return methods; }; -},{"23":23,"31":31,"32":32,"42":42,"46":46,"47":47,"49":49,"62":62,"67":67,"84":84}],44:[function(_dereq_,module,exports){ -var ITERATOR = _dereq_(84)('iterator') +},{"114":114,"31":31,"38":38,"39":39,"51":51,"55":55,"57":57,"73":73,"86":86,"91":91}],53:[function(_dereq_,module,exports){ +var ITERATOR = _dereq_(114)('iterator') , SAFE_CLOSING = false; try { @@ -3109,75 +3315,161 @@ module.exports = function(exec, skipClosing){ } catch(e){ /* empty */ } return safe; }; -},{"84":84}],45:[function(_dereq_,module,exports){ +},{"114":114}],54:[function(_dereq_,module,exports){ module.exports = function(done, value){ return {value: value, done: !!done}; }; -},{}],46:[function(_dereq_,module,exports){ +},{}],55:[function(_dereq_,module,exports){ module.exports = {}; -},{}],47:[function(_dereq_,module,exports){ -var $Object = Object; -module.exports = { - create: $Object.create, - getProto: $Object.getPrototypeOf, - isEnum: {}.propertyIsEnumerable, - getDesc: $Object.getOwnPropertyDescriptor, - setDesc: $Object.defineProperty, - setDescs: $Object.defineProperties, - getKeys: $Object.keys, - getNames: $Object.getOwnPropertyNames, - getSymbols: $Object.getOwnPropertySymbols, - each: [].forEach -}; -},{}],48:[function(_dereq_,module,exports){ -var $ = _dereq_(47) - , toIObject = _dereq_(79); +},{}],56:[function(_dereq_,module,exports){ +var getKeys = _dereq_(75) + , toIObject = _dereq_(106); module.exports = function(object, el){ var O = toIObject(object) - , keys = $.getKeys(O) + , keys = getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; }; -},{"47":47,"79":79}],49:[function(_dereq_,module,exports){ +},{"106":106,"75":75}],57:[function(_dereq_,module,exports){ module.exports = false; -},{}],50:[function(_dereq_,module,exports){ +},{}],58:[function(_dereq_,module,exports){ // 20.2.2.14 Math.expm1(x) module.exports = Math.expm1 || function expm1(x){ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; }; -},{}],51:[function(_dereq_,module,exports){ +},{}],59:[function(_dereq_,module,exports){ // 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x){ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); }; -},{}],52:[function(_dereq_,module,exports){ +},{}],60:[function(_dereq_,module,exports){ // 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x){ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; -},{}],53:[function(_dereq_,module,exports){ -var global = _dereq_(30) - , macrotask = _dereq_(76).set +},{}],61:[function(_dereq_,module,exports){ +var META = _dereq_(113)('meta') + , isObject = _dereq_(48) + , has = _dereq_(38) + , setDesc = _dereq_(66).f + , id = 0; +var isExtensible = Object.isExtensible || function(){ + return true; +}; +var FREEZE = !_dereq_(33)(function(){ + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); +}; +var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; +},{"113":113,"33":33,"38":38,"48":48,"66":66}],62:[function(_dereq_,module,exports){ +var Map = _dereq_(147) + , $export = _dereq_(31) + , shared = _dereq_(93)('metadata') + , store = shared.store || (shared.store = new (_dereq_(253))); + +var getOrCreateMetadataMap = function(target, targetKey, create){ + var targetMetadata = store.get(target); + if(!targetMetadata){ + if(!create)return undefined; + store.set(target, targetMetadata = new Map); + } + var keyMetadata = targetMetadata.get(targetKey); + if(!keyMetadata){ + if(!create)return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map); + } return keyMetadata; +}; +var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); +}; +var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); +}; +var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); +}; +var ordinaryOwnMetadataKeys = function(target, targetKey){ + var metadataMap = getOrCreateMetadataMap(target, targetKey, false) + , keys = []; + if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); + return keys; +}; +var toMetaKey = function(it){ + return it === undefined || typeof it == 'symbol' ? it : String(it); +}; +var exp = function(O){ + $export($export.S, 'Reflect', O); +}; + +module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp +}; +},{"147":147,"253":253,"31":31,"93":93}],63:[function(_dereq_,module,exports){ +var global = _dereq_(37) + , macrotask = _dereq_(103).set , Observer = global.MutationObserver || global.WebKitMutationObserver , process = global.process , Promise = global.Promise - , isNode = _dereq_(12)(process) == 'process' + , isNode = _dereq_(18)(process) == 'process' , head, last, notify; var flush = function(){ - var parent, domain, fn; - if(isNode && (parent = process.domain)){ - process.domain = null; - parent.exit(); - } + var parent, fn; + if(isNode && (parent = process.domain))parent.exit(); while(head){ - domain = head.domain; - fn = head.fn; - if(domain)domain.enter(); + fn = head.fn; fn(); // <- currently we use it only for Promise - try / catch not required - if(domain)domain.exit(); head = head.next; } last = undefined; if(parent)parent.enter(); @@ -3190,11 +3482,11 @@ if(isNode){ }; // browsers with MutationObserver } else if(Observer){ - var toggle = 1 + var toggle = true , node = document.createTextNode(''); new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new notify = function(){ - node.data = toggle = -toggle; + node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if(Promise && Promise.resolve){ @@ -3214,67 +3506,237 @@ if(isNode){ }; } -module.exports = function asap(fn){ - var task = {fn: fn, next: undefined, domain: isNode && process.domain}; +module.exports = function(fn){ + var task = {fn: fn, next: undefined}; if(last)last.next = task; if(!head){ head = task; notify(); } last = task; }; -},{"12":12,"30":30,"76":76}],54:[function(_dereq_,module,exports){ +},{"103":103,"18":18,"37":37}],64:[function(_dereq_,module,exports){ +'use strict'; // 19.1.2.1 Object.assign(target, source, ...) -var $ = _dereq_(47) - , toObject = _dereq_(81) - , IObject = _dereq_(35); +var getKeys = _dereq_(75) + , gOPS = _dereq_(72) + , pIE = _dereq_(76) + , toObject = _dereq_(108) + , IObject = _dereq_(44) + , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) -module.exports = _dereq_(25)(function(){ - var a = Object.assign - , A = {} +module.exports = !$assign || _dereq_(33)(function(){ + var A = {} , B = {} , S = Symbol() , K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function(k){ B[k] = k; }); - return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K; + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source){ // eslint-disable-line no-unused-vars var T = toObject(target) - , $$ = arguments - , $$len = $$.length + , aLen = arguments.length , index = 1 - , getKeys = $.getKeys - , getSymbols = $.getSymbols - , isEnum = $.isEnum; - while($$len > index){ - var S = IObject($$[index++]) + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) , length = keys.length , j = 0 , key; while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; +} : $assign; +},{"108":108,"33":33,"44":44,"72":72,"75":75,"76":76}],65:[function(_dereq_,module,exports){ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = _dereq_(8) + , dPs = _dereq_(67) + , enumBugKeys = _dereq_(29) + , IE_PROTO = _dereq_(92)('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = _dereq_(28)('iframe') + , i = enumBugKeys.length + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + _dereq_(40).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write('