!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Reflux=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;ge;e++)h[e]=d[e].fn;return h},e.prototype.emit=function(a,b,c,d,e,g){var h=f?f+a:a;if(!this._events||!this._events[h])return!1;var i,j,k=this._events[h],l=arguments.length;if("function"==typeof k.fn){switch(k.once&&this.removeListener(a,k.fn,void 0,!0),l){case 1:return k.fn.call(k.context),!0;case 2:return k.fn.call(k.context,b),!0;case 3:return k.fn.call(k.context,b,c),!0;case 4:return k.fn.call(k.context,b,c,d),!0;case 5:return k.fn.call(k.context,b,c,d,e),!0;case 6:return k.fn.call(k.context,b,c,d,e,g),!0}for(j=1,i=new Array(l-1);l>j;j++)i[j-1]=arguments[j];k.fn.apply(k.context,i)}else{var m,n=k.length;for(j=0;n>j;j++)switch(k[j].once&&this.removeListener(a,k[j].fn,void 0,!0),l){case 1:k[j].fn.call(k[j].context);break;case 2:k[j].fn.call(k[j].context,b);break;case 3:k[j].fn.call(k[j].context,b,c);break;default:if(!i)for(m=1,i=new Array(l-1);l>m;m++)i[m-1]=arguments[m];k[j].fn.apply(k[j].context,i)}}return!0},e.prototype.on=function(a,b,c){var e=new d(b,c||this),g=f?f+a:a;return this._events||(this._events=f?{}:Object.create(null)),this._events[g]?this._events[g].fn?this._events[g]=[this._events[g],e]:this._events[g].push(e):this._events[g]=e,this},e.prototype.once=function(a,b,c){var e=new d(b,c||this,!0),g=f?f+a:a;return this._events||(this._events=f?{}:Object.create(null)),this._events[g]?this._events[g].fn?this._events[g]=[this._events[g],e]:this._events[g].push(e):this._events[g]=e,this},e.prototype.removeListener=function(a,b,c,d){var e=f?f+a:a;if(!this._events||!this._events[e])return this;var g=this._events[e],h=[];if(b)if(g.fn)(g.fn!==b||d&&!g.once||c&&g.context!==c)&&h.push(g);else for(var i=0,j=g.length;j>i;i++)(g[i].fn!==b||d&&!g[i].once||c&&g[i].context!==c)&&h.push(g[i]);return h.length?this._events[e]=1===h.length?h[0]:h:delete this._events[e],this},e.prototype.removeAllListeners=function(a){return this._events?(a?delete this._events[f?f+a:a]:this._events=f?{}:Object.create(null),this):this},e.prototype.off=e.prototype.removeListener,e.prototype.addListener=e.prototype.on,e.prototype.setMaxListeners=function(){return this},e.prefixed=f,"undefined"!=typeof b&&(b.exports=e)},{}],2:[function(a,b,c){b.exports={}},{}],3:[function(a,b,c){c.createdStores=[],c.createdActions=[],c.reset=function(){for(;c.createdStores.length;)c.createdStores.pop();for(;c.createdActions.length;)c.createdActions.pop()}},{}],4:[function(a,b,c){var d=a("./utils"),e=a("./joins").instanceJoinCreator,f=function(a){for(var b,c=0,d={};c<(a.children||[]).length;++c)b=a.children[c],a[b]&&(d[b]=a[b]);return d},g=function(a){var b={};for(var c in a){var e=a[c],h=f(e),i=g(h);b[c]=e;for(var j in i){var k=i[j];b[c+d.capitalize(j)]=k}}return b};b.exports={hasListener:function(a){for(var b,c,d,e=0;e<(this.subscriptions||[]).length;++e)for(d=[].concat(this.subscriptions[e].listenable),b=0;b=0&&this.children.indexOf("failed")>=0;if(!c)throw new Error('Publisher must have "completed" and "failed" child publishers');a.then(function(a){return b.completed(a)},function(a){return b.failed(a)})},listenAndPromise:function(a,b){var c=this;b=b||this,this.willCallPromise=(this.willCallPromise||0)+1;var d=this.listen(function(){if(!a)throw new Error("Expected a function returning a promise but got "+a);var d=arguments,e=a.apply(b,d);return c.promise.call(c,e)},b);return function(){c.willCallPromise--,d.call(c)}},trigger:function(){var a=arguments,b=this.preEmit.apply(this,a);a=void 0===b?a:d.isArguments(b)?b:[].concat(b),this.shouldEmit.apply(this,a)&&this.emitter.emit(this.eventLabel,a)},triggerAsync:function(){var a=arguments,b=this;d.nextTick(function(){b.trigger.apply(b,a)})},triggerPromise:function(){var a=this,b=arguments,c=this.children.indexOf("completed")>=0&&this.children.indexOf("failed")>=0,e=d.createPromise(function(e,f){if(a.willCallPromise)return void d.nextTick(function(){var c=a.promise;a.promise=function(b){return b.then(e,f),a.promise=c,a.promise.apply(a,arguments)},a.trigger.apply(a,b)});if(c)var g=a.completed.listen(function(a){g(),h(),e(a)}),h=a.failed.listen(function(a){g(),h(),f(a)});a.triggerAsync.apply(a,b),c||e()});return e}}},{"./utils":18}],7:[function(a,b,c){b.exports={}},{}],8:[function(a,b,c){b.exports=function(a,b){for(var c in b)if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var d=Object.getOwnPropertyDescriptor(b,c);if(!d.value||"function"!=typeof d.value||!b.hasOwnProperty(c))continue;a[c]=b[c].bind(a)}else{var e=b[c];if("function"!=typeof e||!b.hasOwnProperty(c))continue;a[c]=e.bind(a)}return a}},{}],9:[function(a,b,c){var d=a("./ListenerMethods"),e=a("./ListenerMixin"),f=a("./utils");b.exports=function(a,b){return{getInitialState:function(){return f.isFunction(a.getInitialState)?void 0===b?a.getInitialState():f.object([b],[a.getInitialState()]):{}},componentDidMount:function(){f.extend(this,d);var c=this,e=void 0===b?this.setState:function(a){("undefined"==typeof c.isMounted||c.isMounted()===!0)&&c.setState(f.object([b],[a]))};this.listenTo(a,e)},componentWillUnmount:e.componentWillUnmount}}},{"./ListenerMethods":4,"./ListenerMixin":5,"./utils":18}],10:[function(a,b,c){var d=a("./ListenerMethods"),e=a("./ListenerMixin"),f=a("./utils");b.exports=function(a,b,c){return c=f.isFunction(b)?b:c,{getInitialState:function(){if(f.isFunction(a.getInitialState)){if(f.isFunction(b))return c.call(this,a.getInitialState());var d=c.call(this,a.getInitialState());return"undefined"!=typeof d?f.object([b],[d]):{}}return{}},componentDidMount:function(){f.extend(this,d);var e=this,g=function(a){if(f.isFunction(b))e.setState(c.call(e,a));else{var d=c.call(e,a);e.setState(f.object([b],[d]))}};this.listenTo(a,g)},componentWillUnmount:e.componentWillUnmount}}},{"./ListenerMethods":4,"./ListenerMixin":5,"./utils":18}],11:[function(a,b,c){var d=a("./utils"),e=a("./ActionMethods"),f=a("./PublisherMethods"),g=a("./Keep"),h={preEmit:1,shouldEmit:1},i=function(a){a=a||{},d.isObject(a)||(a={actionName:a});for(var b in e)if(!h[b]&&f[b])throw new Error("Cannot override API method "+b+" in Reflux.ActionMethods. Use another method name or override it on Reflux.PublisherMethods instead.");for(var c in a)if(!h[c]&&f[c])throw new Error("Cannot override API method "+c+" in action creation. Use another method name or override it on Reflux.PublisherMethods instead.");a.children=a.children||[],a.asyncResult&&(a.children=a.children.concat(["completed","failed"]));for(var j=0,k={};jb;b++)i.throwIf(this.validateListening(g[b]));for(b=0;k>b;b++)m.push(g[b].listen(f(b,l),this));return e(l),c={listenable:g},c.stop=d(c,m,this),this.subscriptions=(this.subscriptions||[]).concat(c),c}}},{"./createStore":12,"./utils":18}],15:[function(a,b,c){var d=a("./ListenerMethods");b.exports=function(a,b,c){return{componentDidMount:function(){for(var e in d)if(this[e]!==d[e]){if(this[e])throw"Can't have other property '"+e+"' when using Reflux.listenTo!";this[e]=d[e]}this.listenTo(a,b,c)},componentWillUnmount:d.stopListeningToAll}}},{"./ListenerMethods":4}],16:[function(a,b,c){var d=a("./ListenerMethods");b.exports=function(a){return{componentDidMount:function(){for(var b in d)if(this[b]!==d[b]){if(this[b])throw"Can't have other property '"+b+"' when using Reflux.listenToMany!";this[b]=d[b]}this.listenToMany(a)},componentWillUnmount:d.stopListeningToAll}}},{"./ListenerMethods":4}],17:[function(a,b,c){var d=a("./utils");b.exports=function(a){var b={init:[],preEmit:[],shouldEmit:[]},c=function e(a){var c={};return a.mixins&&a.mixins.forEach(function(a){d.extend(c,e(a))}),d.extend(c,a),Object.keys(b).forEach(function(c){a.hasOwnProperty(c)&&b[c].push(a[c])}),c}(a);return b.init.length>1&&(c.init=function(){var a=arguments;b.init.forEach(function(b){b.apply(this,a)},this)}),b.preEmit.length>1&&(c.preEmit=function(){return b.preEmit.reduce(function(a,b){var c=b.apply(this,a);return void 0===c?a:[c]}.bind(this),arguments)}),b.shouldEmit.length>1&&(c.shouldEmit=function(){var a=arguments;return!b.shouldEmit.some(function(b){return!b.apply(this,a)},this)}),Object.keys(b).forEach(function(a){1===b[a].length&&(c[a]=b[a][0])}),c}},{"./utils":18}],18:[function(a,b,c){c.environment={};var d=c.isObject=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a};c.extend=function(a){if(!d(a))return a;for(var b,c,e=1,f=arguments.length;f>e;e++){b=arguments[e];for(c in b)if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var g=Object.getOwnPropertyDescriptor(b,c);Object.defineProperty(a,c,g)}else a[c]=b[c]}return a},c.isFunction=function(a){return"function"==typeof a},c.EventEmitter=a("eventemitter3"),c.nextTick=function(a){setTimeout(a,0)},c.capitalize=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},c.callbackName=function(a){return"on"+c.capitalize(a)},c.object=function(a,b){for(var c={},d=0;d