diff --git a/bower.json b/bower.json index 159bb0c..82f68a4 100644 --- a/bower.json +++ b/bower.json @@ -6,7 +6,7 @@ "William Buchwalter (http://github.com/wbuchwalter)" ], "description": "Redux bindings for Angular.js", - "main": "./dist/ng-redux.js", + "main": "./dist/ng-redux.min.js", "moduleType": [], "keywords": [ "angular", diff --git a/dist/ng-redux.js b/dist/ng-redux.js index 9efa860..a3f22ae 100644 --- a/dist/ng-redux.js +++ b/dist/ng-redux.js @@ -1 +1,2883 @@ -!function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var o=e(1),u=r(o);n["default"]=angular.module("ngRedux",[]).provider("$ngRedux",u["default"]).name},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){var t=void 0,n=void 0,e=void 0,r=void 0;this.createStoreWith=function(o,i,c,a){(0,f["default"])((0,g["default"])(o),"The reducer parameter passed to createStoreWith must be a Function. Instead received %s.","undefined"==typeof o?"undefined":u(o)),(0,f["default"])(!c||(0,h["default"])(c),"The storeEnhancers parameter passed to createStoreWith must be an Array. Instead received %s.","undefined"==typeof c?"undefined":u(c)),t=o,e=c,n=i||[],r=a},this.$get=function(o){for(var u=void 0,i=[],a=n,f=Array.isArray(a),s=0,a=f?a:a[Symbol.iterator]();;){var p;if(f){if(s>=a.length)break;p=a[s++]}else{if(s=a.next(),s.done)break;p=s.value}var v=p;"string"==typeof v?i.push(o.get(v)):i.push(v)}var h=e?l.compose.apply(void 0,e)(l.createStore):l.createStore;return i.push((0,d["default"])(o.get("$rootScope"))),u=r?l.applyMiddleware.apply(void 0,i)(h)(t,r):l.applyMiddleware.apply(void 0,i)(h)(t),(0,y["default"])({},u,{connect:(0,c["default"])(u)})},this.$get.$inject=["$injector"]}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};n.__esModule=!0,n["default"]=o;var i=e(2),c=r(i),a=e(15),f=r(a),l=e(5),s=e(33),d=r(s),p=e(23),y=r(p),v=e(20),h=r(v),b=e(21),g=r(b)},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return function(n,e){var r=n||w,o=(0,y["default"])(e)?(0,l["default"])(e):e||x;(0,d["default"])((0,h["default"])(r),"mapStateToTarget must be a Function. Instead received $s.",r),(0,d["default"])((0,y["default"])(o)||(0,h["default"])(o),"mapDispatchToTarget must be a plain Object or a Function. Instead received $s.",o);var c=i(t.getState(),r),f=o(t.dispatch);return function(n){(0,d["default"])((0,h["default"])(n)||(0,g["default"])(n),"The target parameter passed to connect must be a Function or a object."),u(n,c,f);var e=t.subscribe(function(){var e=i(t.getState(),r);(0,a["default"])(c,e)||(c=e,u(n,c,f))});return e}}}function u(t,n,e){(0,h["default"])(t)?t(n,e):(0,j["default"])(t,n,e)}function i(t,n){var e=n(t);return(0,d["default"])((0,y["default"])(e),"`mapStateToScope` must return an object. Instead received %s.",e),e}n.__esModule=!0,n["default"]=o;var c=e(3),a=r(c),f=e(4),l=r(f),s=e(15),d=r(s),p=e(16),y=r(p),v=e(21),h=r(v),b=e(22),g=r(b),m=e(23),j=r(m),w=function(){return{}},x=function(t){return{dispatch:t}}},function(t,n){"use strict";function e(t,n){if(t===n)return!0;var e=Object.keys(t).filter(function(t){return"$$hashKey"!==t}),r=Object.keys(n).filter(function(t){return"$$hashKey"!==t});if(e.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,u=0;u0?"Unexpected "+(u.length>1?"keys":"key")+" "+('"'+u.join('", "')+'" found in '+o+". ")+"Expected to find one of the known reducer keys instead: "+('"'+r.join('", "')+'". Unexpected keys will be ignored.'):void 0}function c(t){Object.keys(t).forEach(function(n){var e=t[n],r=e(void 0,{type:f.ActionTypes.INIT});if("undefined"==typeof r)throw new Error('Reducer "'+n+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof e(void 0,{type:o}))throw new Error('Reducer "'+n+'" returned undefined when probed with a random type. '+("Don't try to handle "+f.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function a(t){var n,e=v["default"](t,function(t){return"function"==typeof t});try{c(e)}catch(o){n=o}var a=p["default"](e,function(){});return function(t,o){if(void 0===t&&(t=a),n)throw n;var c=!1,f=p["default"](e,function(n,e){var r=t[e],i=n(r,o);if("undefined"==typeof i){var a=u(e,o);throw new Error(a)}return c=c||i!==r,i});if("production"!==r.env.NODE_ENV){var l=i(t,f,o);l&&console.error(l)}return c?f:t}}n.__esModule=!0,n["default"]=a;var f=e(6),l=e(7),s=o(l),d=e(10),p=o(d),y=e(11),v=o(y);t.exports=n["default"]}).call(n,e(9))},function(t,n){function e(){f=!1,i.length?a=i.concat(a):l=-1,a.length&&r()}function r(){if(!f){var t=setTimeout(e);f=!0;for(var n=a.length;n;){for(i=a,a=[];++l1)for(var e=1;ee;e++)n[e]=arguments[e];return function(t){return function(e,r){var o=t(e,r),i=o.dispatch,a=[],f={getState:o.getState,dispatch:function(t){return i(t)}};return a=n.map(function(t){return t(f)}),i=c["default"].apply(void 0,a)(o.dispatch),u({},o,{dispatch:i})}}}n.__esModule=!0;var u=Object.assign||function(t){for(var n=1;ne;e++)n[e]=arguments[e];return function(t){return n.reduceRight(function(t,n){return n(t)},t)}}n.__esModule=!0,n["default"]=e,t.exports=n["default"]},function(t,n,e){(function(n){"use strict";var e=function(t,e,r,o,u,i,c,a){if("production"!==n.env.NODE_ENV&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var f;if(void 0===e)f=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,o,u,i,c,a],s=0;f=new Error(e.replace(/%s/g,function(){return l[s++]})),f.name="Invariant Violation"}throw f.framesToPop=1,f}};t.exports=e}).call(n,e(9))},function(t,n,e){function r(t){return!!t&&"object"==typeof t}function o(t,n){return i(t,n,a)}function u(t){var n;if(!r(t)||d.call(t)!=f||c(t)||!s.call(t,"constructor")&&(n=t.constructor,"function"==typeof n&&!(n instanceof n)))return!1;var e;return o(t,function(t,n){e=n}),void 0===e||s.call(t,e)}var i=e(17),c=e(18),a=e(19),f="[object Object]",l=Object.prototype,s=l.hasOwnProperty,d=l.toString;t.exports=u},function(t,n){function e(t){return function(n,e,r){for(var o=-1,u=Object(n),i=r(n),c=i.length;c--;){var a=i[t?c:++o];if(e(u[a],a,u)===!1)break}return n}}var r=e();t.exports=r},function(t,n){(function(n){function e(t){return function(n){return null==n?void 0:n[t]}}function r(t){return u(t)&&v.call(t,"callee")&&(!b.call(t,"callee")||h.call(t)==s)}function o(t){return null!=t&&!("function"==typeof t&&i(t))&&c(g(t))}function u(t){return f(t)&&o(t)}function i(t){var n=a(t)?h.call(t):"";return n==d||n==p}function c(t){return"number"==typeof t&&t>-1&&t%1==0&&l>=t}function a(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function f(t){return!!t&&"object"==typeof t}var l=9007199254740991,s="[object Arguments]",d="[object Function]",p="[object GeneratorFunction]",y=n.Object.prototype,v=y.hasOwnProperty,h=y.toString,b=y.propertyIsEnumerable,g=e("length");t.exports=r}).call(n,function(){return this}())},function(t,n,e){function r(t,n){return t="number"==typeof t||f.test(t)?+t:-1,n=null==n?d:n,t>-1&&t%1==0&&n>t}function o(t){return"number"==typeof t&&t>-1&&t%1==0&&d>=t}function u(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function i(t){if(null==t)return[];u(t)||(t=Object(t));var n=t.length;n=n&&o(n)&&(a(t)||c(t))&&n||0;for(var e=t.constructor,i=-1,f="function"==typeof e&&e.prototype===t,l=Array(n),d=n>0;++i-1&&t%1==0&&b>=t}function u(t){return i(t)&&y.call(t)==f}function i(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function c(t){return null==t?!1:u(t)?v.test(d.call(t)):e(t)&&l.test(t)}var a="[object Array]",f="[object Function]",l=/^\[object .+?Constructor\]$/,s=Object.prototype,d=Function.prototype.toString,p=s.hasOwnProperty,y=s.toString,v=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),h=r(Array,"isArray"),b=9007199254740991,g=h||function(t){return e(t)&&o(t.length)&&y.call(t)==a};t.exports=g},function(t,n){(function(n){function e(t){var n=r(t)?c.call(t):"";return n==o||n==u}function r(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}var o="[object Function]",u="[object GeneratorFunction]",i=n.Object.prototype,c=i.toString;t.exports=e}).call(n,function(){return this}())},function(t,n){function e(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}t.exports=e},function(t,n,e){function r(t,n,e){for(var r=-1,o=i(n),u=o.length;++r-1&&t%1==0&&n>t}function i(t){return"number"==typeof t&&t>-1&&t%1==0&&b>=t}function c(t){for(var n=f(t),e=n.length,r=e&&t.length,o=!!r&&i(r)&&(d(t)||s(t)),c=-1,a=[];++c0;++r-1&&t%1==0&&l>=t}function a(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function f(t){return!!t&&"object"==typeof t}var l=9007199254740991,s="[object Arguments]",d="[object Function]",p="[object GeneratorFunction]",y=n.Object.prototype,v=y.hasOwnProperty,h=y.toString,b=y.propertyIsEnumerable,g=e("length");t.exports=r}).call(n,function(){return this}())},function(t,n,e){function r(t){return i(function(n,e){var r=-1,i=null==n?0:e.length,c=i>2?e[i-2]:void 0,a=i>2?e[2]:void 0,f=i>1?e[i-1]:void 0;for("function"==typeof c?(c=o(c,f,5),i-=2):(c="function"==typeof f?f:void 0,i-=c?1:0),a&&u(e[0],e[1],a)&&(c=3>i?void 0:c,i=1);++r-1&&t%1==0&&n>t}function u(t,n,e){if(!c(e))return!1;var u=typeof n;if("number"==u?r(e)&&o(n,e.length):"string"==u&&n in e){var i=e[n];return t===t?t===i:i!==i}return!1}function i(t){return"number"==typeof t&&t>-1&&t%1==0&&f>=t}function c(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}var a=/^\d+$/,f=9007199254740991,l=e("length");t.exports=u},function(t,n){function e(t,n){if("function"!=typeof t)throw new TypeError(r);return n=o(void 0===n?t.length-1:+n||0,0),function(){for(var e=arguments,r=-1,u=o(e.length-n,0),i=Array(u);++r= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var middleware = _ref; + + if (typeof middleware === 'string') { + resolvedMiddleware.push($injector.get(middleware)); + } else { + resolvedMiddleware.push(middleware); + } + } + + var finalCreateStore = _storeEnhancers ? _redux.compose.apply(undefined, _storeEnhancers)(_redux.createStore) : _redux.createStore; + + //digestMiddleware needs to be the last one. + resolvedMiddleware.push((0, _digestMiddleware2.default)($injector.get('$rootScope'))); + + store = _initialState ? _redux.applyMiddleware.apply(undefined, resolvedMiddleware)(finalCreateStore)(_reducer, _initialState) : _redux.applyMiddleware.apply(undefined, resolvedMiddleware)(finalCreateStore)(_reducer); + + return (0, _lodash2.default)({}, store, { connect: (0, _connector2.default)(store) }); + }; + + this.$get.$inject = ['$injector']; + } + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports.default = Connector; + + var _shallowEqual = __webpack_require__(3); + + var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + + var _wrapActionCreators = __webpack_require__(4); + + var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators); + + var _invariant = __webpack_require__(16); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _lodash = __webpack_require__(17); + + var _lodash2 = _interopRequireDefault(_lodash); + + var _lodash3 = __webpack_require__(22); + + var _lodash4 = _interopRequireDefault(_lodash3); + + var _lodash5 = __webpack_require__(23); + + var _lodash6 = _interopRequireDefault(_lodash5); + + var _lodash7 = __webpack_require__(24); + + var _lodash8 = _interopRequireDefault(_lodash7); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var defaultMapStateToTarget = function defaultMapStateToTarget() { + return {}; + }; + var defaultMapDispatchToTarget = function defaultMapDispatchToTarget(dispatch) { + return { dispatch: dispatch }; + }; + + function Connector(store) { + return function (mapStateToTarget, mapDispatchToTarget) { + + var finalMapStateToTarget = mapStateToTarget || defaultMapStateToTarget; + + var finalMapDispatchToTarget = (0, _lodash2.default)(mapDispatchToTarget) ? (0, _wrapActionCreators2.default)(mapDispatchToTarget) : mapDispatchToTarget || defaultMapDispatchToTarget; + + (0, _invariant2.default)((0, _lodash4.default)(finalMapStateToTarget), 'mapStateToTarget must be a Function. Instead received %s.', finalMapStateToTarget); + + (0, _invariant2.default)((0, _lodash2.default)(finalMapDispatchToTarget) || (0, _lodash4.default)(finalMapDispatchToTarget), 'mapDispatchToTarget must be a plain Object or a Function. Instead received %s.', finalMapDispatchToTarget); + + var slice = getStateSlice(store.getState(), finalMapStateToTarget); + + var boundActionCreators = finalMapDispatchToTarget(store.dispatch); + + return function (target) { + + (0, _invariant2.default)((0, _lodash4.default)(target) || (0, _lodash6.default)(target), 'The target parameter passed to connect must be a Function or a object.'); + + //Initial update + updateTarget(target, slice, boundActionCreators); + + var unsubscribe = store.subscribe(function () { + var nextSlice = getStateSlice(store.getState(), finalMapStateToTarget); + if (!(0, _shallowEqual2.default)(slice, nextSlice)) { + slice = nextSlice; + updateTarget(target, slice, boundActionCreators); + } + }); + return unsubscribe; + }; + }; + } + + function updateTarget(target, StateSlice, dispatch) { + if ((0, _lodash4.default)(target)) { + target(StateSlice, dispatch); + } else { + (0, _lodash8.default)(target, StateSlice, dispatch); + } + } + + function getStateSlice(state, mapStateToScope) { + var slice = mapStateToScope(state); + + (0, _invariant2.default)((0, _lodash2.default)(slice), '`mapStateToScope` must return an object. Instead received %s.', slice); + + return slice; + } + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports.default = shallowEqual; + function shallowEqual(objA, objB) { + if (objA === objB) { + return true; + } + + /* $$hashKey is added by angular when using ng-repeat, we ignore that*/ + var keysA = Object.keys(objA).filter(function (k) { + return k !== '$$hashKey'; + }); + var keysB = Object.keys(objB).filter(function (k) { + return k !== '$$hashKey'; + }); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + var hasOwn = Object.prototype.hasOwnProperty; + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { + return false; + } + } + + return true; + } + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports.default = wrapActionCreators; + + var _redux = __webpack_require__(5); + + function wrapActionCreators(actionCreators) { + return function (dispatch) { + return (0, _redux.bindActionCreators)(actionCreators, dispatch); + }; + } + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _createStore = __webpack_require__(7); + + var _createStore2 = _interopRequireDefault(_createStore); + + var _combineReducers = __webpack_require__(9); + + var _combineReducers2 = _interopRequireDefault(_combineReducers); + + var _bindActionCreators = __webpack_require__(13); + + var _bindActionCreators2 = _interopRequireDefault(_bindActionCreators); + + var _applyMiddleware = __webpack_require__(14); + + var _applyMiddleware2 = _interopRequireDefault(_applyMiddleware); + + var _compose = __webpack_require__(15); + + var _compose2 = _interopRequireDefault(_compose); + + var _utilsWarning = __webpack_require__(12); + + var _utilsWarning2 = _interopRequireDefault(_utilsWarning); + + /* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ + function isCrushed() {} + + if (process.env.NODE_ENV !== 'production' && setInterval.name === 'setInterval' && isCrushed.name !== 'isCrushed') { + _utilsWarning2['default']('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); + } + + exports.createStore = _createStore2['default']; + exports.combineReducers = _combineReducers2['default']; + exports.bindActionCreators = _bindActionCreators2['default']; + exports.applyMiddleware = _applyMiddleware2['default']; + exports.compose = _compose2['default']; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + // shim for using process in browser + + var process = module.exports = {}; + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; + + function cleanUpNextTick() { + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } + } + + function drainQueue() { + if (draining) { + return; + } + var timeout = setTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + clearTimeout(timeout); + } + + process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + setTimeout(drainQueue, 0); + } + }; + + // v8 likes predictible objects + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + Item.prototype.run = function () { + this.fun.apply(null, this.array); + }; + process.title = 'browser'; + process.browser = true; + process.env = {}; + process.argv = []; + process.version = ''; // empty string to avoid regexp issues + process.versions = {}; + + function noop() {} + + process.on = noop; + process.addListener = noop; + process.once = noop; + process.off = noop; + process.removeListener = noop; + process.removeAllListeners = noop; + process.emit = noop; + + process.binding = function (name) { + throw new Error('process.binding is not supported'); + }; + + process.cwd = function () { return '/' }; + process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); + }; + process.umask = function() { return 0; }; + + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = createStore; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _utilsIsPlainObject = __webpack_require__(8); + + var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject); + + /** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ + var ActionTypes = { + INIT: '@@redux/INIT' + }; + + exports.ActionTypes = ActionTypes; + /** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [initialState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} enhancer The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ + + function createStore(reducer, initialState, enhancer) { + if (typeof initialState === 'function' && typeof enhancer === 'undefined') { + enhancer = initialState; + initialState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error('Expected the enhancer to be a function.'); + } + + return enhancer(createStore)(reducer, initialState); + } + + if (typeof reducer !== 'function') { + throw new Error('Expected the reducer to be a function.'); + } + + var currentReducer = reducer; + var currentState = initialState; + var listeners = []; + var isDispatching = false; + + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + function getState() { + return currentState; + } + + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * Note, the listener should not expect to see all states changes, as the + * state might have been updated multiple times before the listener is + * notified. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + function subscribe(listener) { + listeners.push(listener); + var isSubscribed = true; + + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + isSubscribed = false; + var index = listeners.indexOf(listener); + listeners.splice(index, 1); + }; + } + + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + function dispatch(action) { + if (!_utilsIsPlainObject2['default'](action)) { + throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); + } + + if (typeof action.type === 'undefined') { + throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?'); + } + + if (isDispatching) { + throw new Error('Reducers may not dispatch actions.'); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + listeners.slice().forEach(function (listener) { + return listener(); + }); + return action; + } + + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + function replaceReducer(nextReducer) { + currentReducer = nextReducer; + dispatch({ type: ActionTypes.INIT }); + } + + // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + dispatch({ type: ActionTypes.INIT }); + + return { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer + }; + } + +/***/ }, +/* 8 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = isPlainObject; + var fnToString = function fnToString(fn) { + return Function.prototype.toString.call(fn); + }; + var objStringValue = fnToString(Object); + + /** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ + + function isPlainObject(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + + var proto = typeof obj.constructor === 'function' ? Object.getPrototypeOf(obj) : Object.prototype; + + if (proto === null) { + return true; + } + + var constructor = proto.constructor; + + return typeof constructor === 'function' && constructor instanceof constructor && fnToString(constructor) === objStringValue; + } + + module.exports = exports['default']; + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {'use strict'; + + exports.__esModule = true; + exports['default'] = combineReducers; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _createStore = __webpack_require__(7); + + var _utilsIsPlainObject = __webpack_require__(8); + + var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject); + + var _utilsMapValues = __webpack_require__(10); + + var _utilsMapValues2 = _interopRequireDefault(_utilsMapValues); + + var _utilsPick = __webpack_require__(11); + + var _utilsPick2 = _interopRequireDefault(_utilsPick); + + var _utilsWarning = __webpack_require__(12); + + var _utilsWarning2 = _interopRequireDefault(_utilsWarning); + + function getUndefinedStateErrorMessage(key, action) { + var actionType = action && action.type; + var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; + + return 'Reducer "' + key + '" returned undefined handling ' + actionName + '. ' + 'To ignore an action, you must explicitly return the previous state.'; + } + + function getUnexpectedStateShapeWarningMessage(inputState, reducers, action) { + var reducerKeys = Object.keys(reducers); + var argumentName = action && action.type === _createStore.ActionTypes.INIT ? 'initialState argument passed to createStore' : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; + } + + if (!_utilsIsPlainObject2['default'](inputState)) { + return 'The ' + argumentName + ' has unexpected type of "' + ({}).toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key); + }); + + if (unexpectedKeys.length > 0) { + return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.'); + } + } + + function assertReducerSanity(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { type: _createStore.ActionTypes.INIT }); + + if (typeof initialState === 'undefined') { + throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.'); + } + + var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); + if (typeof reducer(undefined, { type: type }) === 'undefined') { + throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore.ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.'); + } + }); + } + + /** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ + + function combineReducers(reducers) { + var finalReducers = _utilsPick2['default'](reducers, function (val) { + return typeof val === 'function'; + }); + var sanityError; + + try { + assertReducerSanity(finalReducers); + } catch (e) { + sanityError = e; + } + + return function combination(state, action) { + if (state === undefined) state = {}; + + if (sanityError) { + throw sanityError; + } + + if (process.env.NODE_ENV !== 'production') { + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action); + if (warningMessage) { + _utilsWarning2['default'](warningMessage); + } + } + + var hasChanged = false; + var finalState = _utilsMapValues2['default'](finalReducers, function (reducer, key) { + var previousStateForKey = state[key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === 'undefined') { + var errorMessage = getUndefinedStateErrorMessage(key, action); + throw new Error(errorMessage); + } + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + return nextStateForKey; + }); + + return hasChanged ? finalState : state; + }; + } + + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) + +/***/ }, +/* 10 */ +/***/ function(module, exports) { + + /** + * Applies a function to every key-value pair inside an object. + * + * @param {Object} obj The source object. + * @param {Function} fn The mapper function that receives the value and the key. + * @returns {Object} A new object that contains the mapped values for the keys. + */ + "use strict"; + + exports.__esModule = true; + exports["default"] = mapValues; + + function mapValues(obj, fn) { + return Object.keys(obj).reduce(function (result, key) { + result[key] = fn(obj[key], key); + return result; + }, {}); + } + + module.exports = exports["default"]; + +/***/ }, +/* 11 */ +/***/ function(module, exports) { + + /** + * Picks key-value pairs from an object where values satisfy a predicate. + * + * @param {Object} obj The object to pick from. + * @param {Function} fn The predicate the values must satisfy to be copied. + * @returns {Object} The object with the values that satisfied the predicate. + */ + "use strict"; + + exports.__esModule = true; + exports["default"] = pick; + + function pick(obj, fn) { + return Object.keys(obj).reduce(function (result, key) { + if (fn(obj[key])) { + result[key] = obj[key]; + } + return result; + }, {}); + } + + module.exports = exports["default"]; + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + 'use strict'; + + exports.__esModule = true; + exports['default'] = warning; + + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + module.exports = exports['default']; + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = bindActionCreators; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _utilsMapValues = __webpack_require__(10); + + var _utilsMapValues2 = _interopRequireDefault(_utilsMapValues); + + function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(undefined, arguments)); + }; + } + + /** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass a single function as the first argument, + * and get a function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ + + function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null || actionCreators === undefined) { + throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?'); + } + + return _utilsMapValues2['default'](actionCreators, function (actionCreator) { + return bindActionCreator(actionCreator, dispatch); + }); + } + + module.exports = exports['default']; + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + exports['default'] = applyMiddleware; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _compose = __webpack_require__(15); + + var _compose2 = _interopRequireDefault(_compose); + + /** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ + + function applyMiddleware() { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function (reducer, initialState, enhancer) { + var store = createStore(reducer, initialState, enhancer); + var _dispatch = store.dispatch; + var chain = []; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch(action) { + return _dispatch(action); + } + }; + chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = _compose2['default'].apply(undefined, chain)(store.dispatch); + + return _extends({}, store, { + dispatch: _dispatch + }); + }; + }; + } + + module.exports = exports['default']; + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + + /** + * Composes single-argument functions from right to left. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing functions from right to + * left. For example, compose(f, g, h) is identical to arg => f(g(h(arg))). + */ + "use strict"; + + exports.__esModule = true; + exports["default"] = compose; + + function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + return function () { + if (funcs.length === 0) { + return arguments[0]; + } + + var last = funcs[funcs.length - 1]; + var rest = funcs.slice(0, -1); + + return rest.reduceRight(function (composed, f) { + return f(composed); + }, last.apply(undefined, arguments)); + }; + } + + module.exports = exports["default"]; + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + 'use strict'; + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var invariant = function(condition, format, a, b, c, d, e, f) { + if (process.env.NODE_ENV !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + }; + + module.exports = invariant; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.2.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var baseFor = __webpack_require__(18), + isArguments = __webpack_require__(19), + keysIn = __webpack_require__(20); + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * **Note:** This method assumes objects created by the `Object` constructor + * have no inherited enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + var Ctor; + + // Exit early for non `Object` objects. + if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) || + (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + var result; + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + baseForIn(value, function(subValue, key) { + result = key; + }); + return result === undefined || hasOwnProperty.call(value, result); + } + + module.exports = isPlainObject; + + +/***/ }, +/* 18 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.3 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * Creates a base function for methods like `_.forIn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + module.exports = baseFor; + + +/***/ }, +/* 19 */ +/***/ function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {/** + * lodash 3.0.5 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + + /** Used for built-in method references. */ + var objectProto = global.Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && + !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8 which returns 'object' for typed array constructors, and + // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + module.exports = isArguments; + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 20 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.0.8 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var isArguments = __webpack_require__(19), + isArray = __webpack_require__(21); + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + module.exports = keysIn; + + +/***/ }, +/* 21 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** `Object#toString` result references. */ + var arrayTag = '[object Array]', + funcTag = '[object Function]'; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeIsArray = getNative(Array, 'isArray'); + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + module.exports = isArray; + + +/***/ }, +/* 22 */ +/***/ function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {/** + * lodash 3.0.7 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** `Object#toString` result references. */ + var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + + /** Used for built-in method references. */ + var objectProto = global.Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8 which returns 'object' for typed array constructors, and + // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = isFunction; + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 23 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = isObject; + + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.2.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var baseAssign = __webpack_require__(25), + createAssigner = __webpack_require__(29), + keys = __webpack_require__(27); + + /** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ + function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; + } + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it is invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ + var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); + }); + + module.exports = assign; + + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.2.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var baseCopy = __webpack_require__(26), + keys = __webpack_require__(27); + + /** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); + } + + module.exports = baseAssign; + + +/***/ }, +/* 26 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ + function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; + } + + module.exports = baseCopy; + + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.1.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var getNative = __webpack_require__(28), + isArguments = __webpack_require__(19), + isArray = __webpack_require__(21); + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeKeys = getNative(Object, 'keys'); + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; + }; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + module.exports = keys; + + +/***/ }, +/* 28 */ +/***/ function(module, exports) { + + /** + * lodash 3.9.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** `Object#toString` result references. */ + var funcTag = '[object Function]'; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + module.exports = getNative; + + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.1.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var bindCallback = __webpack_require__(30), + isIterateeCall = __webpack_require__(31), + restParam = __webpack_require__(32); + + /** + * Creates a function that assigns properties of source object(s) to a given + * destination object. + * + * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); + } + + module.exports = createAssigner; + + +/***/ }, +/* 30 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; + } + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + module.exports = bindCallback; + + +/***/ }, +/* 31 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.9 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** + * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = isIterateeCall; + + +/***/ }, +/* 32 */ +/***/ function(module, exports) { + + /** + * lodash 3.6.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; + } + + module.exports = restParam; + + +/***/ }, +/* 33 */ +/***/ function(module, exports) { + + "use strict"; + + exports.__esModule = true; + exports.default = digestMiddleware; + function digestMiddleware($rootScope) { + return function (store) { + return function (next) { + return function (action) { + $rootScope.$evalAsync(next(action)); + }; + }; + }; + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/dist/ng-redux.min.js b/dist/ng-redux.min.js new file mode 100644 index 0000000..aae4aa4 --- /dev/null +++ b/dist/ng-redux.min.js @@ -0,0 +1 @@ +!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(1),u=r(o);e["default"]=angular.module("ngRedux",[]).provider("$ngRedux",u["default"]).name},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){var t=void 0,e=void 0,n=void 0,r=void 0;this.createStoreWith=function(o,i,c,a){(0,f["default"])((0,g["default"])(o),"The reducer parameter passed to createStoreWith must be a Function. Instead received %s.","undefined"==typeof o?"undefined":u(o)),(0,f["default"])(!c||(0,h["default"])(c),"The storeEnhancers parameter passed to createStoreWith must be an Array. Instead received %s.","undefined"==typeof c?"undefined":u(c)),t=o,n=c,e=i||[],r=a},this.$get=function(o){for(var u=void 0,i=[],a=e,f=Array.isArray(a),l=0,a=f?a:a[Symbol.iterator]();;){var p;if(f){if(l>=a.length)break;p=a[l++]}else{if(l=a.next(),l.done)break;p=l.value}var v=p;"string"==typeof v?i.push(o.get(v)):i.push(v)}var h=n?s.compose.apply(void 0,n)(s.createStore):s.createStore;return i.push((0,d["default"])(o.get("$rootScope"))),u=r?s.applyMiddleware.apply(void 0,i)(h)(t,r):s.applyMiddleware.apply(void 0,i)(h)(t),(0,y["default"])({},u,{connect:(0,c["default"])(u)})},this.$get.$inject=["$injector"]}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.__esModule=!0,e["default"]=o;var i=n(2),c=r(i),a=n(16),f=r(a),s=n(5),l=n(33),d=r(l),p=n(24),y=r(p),v=n(21),h=r(v),b=n(22),g=r(b)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return function(e,n){var r=e||j,o=(0,y["default"])(n)?(0,s["default"])(n):n||x;(0,d["default"])((0,h["default"])(r),"mapStateToTarget must be a Function. Instead received %s.",r),(0,d["default"])((0,y["default"])(o)||(0,h["default"])(o),"mapDispatchToTarget must be a plain Object or a Function. Instead received %s.",o);var c=i(t.getState(),r),f=o(t.dispatch);return function(e){(0,d["default"])((0,h["default"])(e)||(0,g["default"])(e),"The target parameter passed to connect must be a Function or a object."),u(e,c,f);var n=t.subscribe(function(){var n=i(t.getState(),r);(0,a["default"])(c,n)||(c=n,u(e,c,f))});return n}}}function u(t,e,n){(0,h["default"])(t)?t(e,n):(0,w["default"])(t,e,n)}function i(t,e){var n=e(t);return(0,d["default"])((0,y["default"])(n),"`mapStateToScope` must return an object. Instead received %s.",n),n}e.__esModule=!0,e["default"]=o;var c=n(3),a=r(c),f=n(4),s=r(f),l=n(16),d=r(l),p=n(17),y=r(p),v=n(22),h=r(v),b=n(23),g=r(b),m=n(24),w=r(m),j=function(){return{}},x=function(t){return{dispatch:t}}},function(t,e){"use strict";function n(t,e){if(t===e)return!0;var n=Object.keys(t).filter(function(t){return"$$hashKey"!==t}),r=Object.keys(e).filter(function(t){return"$$hashKey"!==t});if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,u=0;u1)for(var n=1;n0?"Unexpected "+(u.length>1?"keys":"key")+" "+('"'+u.join('", "')+'" found in '+o+". ")+"Expected to find one of the known reducer keys instead: "+('"'+r.join('", "')+'". Unexpected keys will be ignored.'):void 0}function c(t){Object.keys(t).forEach(function(e){var n=t[e],r=n(void 0,{type:f.ActionTypes.INIT});if("undefined"==typeof r)throw new Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:o}))throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+f.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function a(t){var e,n=v["default"](t,function(t){return"function"==typeof t});try{c(n)}catch(o){e=o}return function(t,o){if(void 0===t&&(t={}),e)throw e;if("production"!==r.env.NODE_ENV){var c=i(t,n,o);c&&b["default"](c)}var a=!1,f=p["default"](n,function(e,n){var r=t[n],i=e(r,o);if("undefined"==typeof i){var c=u(n,o);throw new Error(c)}return a=a||i!==r,i});return a?f:t}}e.__esModule=!0,e["default"]=a;var f=n(7),s=n(8),l=o(s),d=n(10),p=o(d),y=n(11),v=o(y),h=n(12),b=o(h);t.exports=e["default"]}).call(e,n(6))},function(t,e){"use strict";function n(t,e){return Object.keys(t).reduce(function(n,r){return n[r]=e(t[r],r),n},{})}e.__esModule=!0,e["default"]=n,t.exports=e["default"]},function(t,e){"use strict";function n(t,e){return Object.keys(t).reduce(function(n,r){return e(t[r])&&(n[r]=t[r]),n},{})}e.__esModule=!0,e["default"]=n,t.exports=e["default"]},function(t,e){"use strict";function n(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t);try{throw new Error(t)}catch(e){}}e.__esModule=!0,e["default"]=n,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return function(){return e(t.apply(void 0,arguments))}}function u(t,e){if("function"==typeof t)return o(t,e);if("object"!=typeof t||null===t||void 0===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');return c["default"](t,function(t){return o(t,e)})}e.__esModule=!0,e["default"]=u;var i=n(10),c=r(i);t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return function(t){return function(n,r,o){var i=t(n,r,o),a=i.dispatch,f=[],s={getState:i.getState,dispatch:function(t){return a(t)}};return f=e.map(function(t){return t(s)}),a=c["default"].apply(void 0,f)(i.dispatch),u({},i,{dispatch:a})}}}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;en;n++)e[n]=arguments[n];return function(){if(0===e.length)return arguments[0];var t=e[e.length-1],n=e.slice(0,-1);return n.reduceRight(function(t,e){return e(t)},t.apply(void 0,arguments))}}e.__esModule=!0,e["default"]=n,t.exports=e["default"]},function(t,e,n){(function(e){"use strict";var n=function(t,n,r,o,u,i,c,a){if("production"!==e.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!t){var f;if(void 0===n)f=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,o,u,i,c,a],l=0;f=new Error(n.replace(/%s/g,function(){return s[l++]})),f.name="Invariant Violation"}throw f.framesToPop=1,f}};t.exports=n}).call(e,n(6))},function(t,e,n){function r(t){return!!t&&"object"==typeof t}function o(t,e){return i(t,e,a)}function u(t){var e;if(!r(t)||d.call(t)!=f||c(t)||!l.call(t,"constructor")&&(e=t.constructor,"function"==typeof e&&!(e instanceof e)))return!1;var n;return o(t,function(t,e){n=e}),void 0===n||l.call(t,n)}var i=n(18),c=n(19),a=n(20),f="[object Object]",s=Object.prototype,l=s.hasOwnProperty,d=s.toString;t.exports=u},function(t,e){function n(t){return function(e,n,r){for(var o=-1,u=Object(e),i=r(e),c=i.length;c--;){var a=i[t?c:++o];if(n(u[a],a,u)===!1)break}return e}}var r=n();t.exports=r},function(t,e){(function(e){function n(t){return function(e){return null==e?void 0:e[t]}}function r(t){return u(t)&&v.call(t,"callee")&&(!b.call(t,"callee")||h.call(t)==l)}function o(t){return null!=t&&!("function"==typeof t&&i(t))&&c(g(t))}function u(t){return f(t)&&o(t)}function i(t){var e=a(t)?h.call(t):"";return e==d||e==p}function c(t){return"number"==typeof t&&t>-1&&t%1==0&&s>=t}function a(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function f(t){return!!t&&"object"==typeof t}var s=9007199254740991,l="[object Arguments]",d="[object Function]",p="[object GeneratorFunction]",y=e.Object.prototype,v=y.hasOwnProperty,h=y.toString,b=y.propertyIsEnumerable,g=n("length");t.exports=r}).call(e,function(){return this}())},function(t,e,n){function r(t,e){return t="number"==typeof t||f.test(t)?+t:-1,e=null==e?d:e,t>-1&&t%1==0&&e>t}function o(t){return"number"==typeof t&&t>-1&&t%1==0&&d>=t}function u(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function i(t){if(null==t)return[];u(t)||(t=Object(t));var e=t.length;e=e&&o(e)&&(a(t)||c(t))&&e||0;for(var n=t.constructor,i=-1,f="function"==typeof n&&n.prototype===t,s=Array(e),d=e>0;++i-1&&t%1==0&&b>=t}function u(t){return i(t)&&y.call(t)==f}function i(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function c(t){return null==t?!1:u(t)?v.test(d.call(t)):n(t)&&s.test(t)}var a="[object Array]",f="[object Function]",s=/^\[object .+?Constructor\]$/,l=Object.prototype,d=Function.prototype.toString,p=l.hasOwnProperty,y=l.toString,v=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),h=r(Array,"isArray"),b=9007199254740991,g=h||function(t){return n(t)&&o(t.length)&&y.call(t)==a};t.exports=g},function(t,e){(function(e){function n(t){var e=r(t)?c.call(t):"";return e==o||e==u}function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var o="[object Function]",u="[object GeneratorFunction]",i=e.Object.prototype,c=i.toString;t.exports=n}).call(e,function(){return this}())},function(t,e){function n(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function r(t,e,n){for(var r=-1,o=i(e),u=o.length;++r-1&&t%1==0&&e>t}function i(t){return"number"==typeof t&&t>-1&&t%1==0&&b>=t}function c(t){for(var e=f(t),n=e.length,r=n&&t.length,o=!!r&&i(r)&&(d(t)||l(t)),c=-1,a=[];++c0;++r2?n[i-2]:void 0,a=i>2?n[2]:void 0,f=i>1?n[i-1]:void 0;for("function"==typeof c?(c=o(c,f,5),i-=2):(c="function"==typeof f?f:void 0,i-=c?1:0),a&&u(n[0],n[1],a)&&(c=3>i?void 0:c,i=1);++r-1&&t%1==0&&e>t}function u(t,e,n){if(!c(n))return!1;var u=typeof e;if("number"==u?r(n)&&o(e,n.length):"string"==u&&e in n){var i=n[e];return t===t?t===i:i!==i}return!1}function i(t){return"number"==typeof t&&t>-1&&t%1==0&&f>=t}function c(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var a=/^\d+$/,f=9007199254740991,s=n("length");t.exports=u},function(t,e){function n(t,e){if("function"!=typeof t)throw new TypeError(r);return e=o(void 0===e?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,u=o(n.length-e,0),i=Array(u);++r