UNPKG

fluorine-lib

Version:

Reactive state and side effect management for React using a single stream of actions

2 lines 73.6 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.fluorine=e(require("react")):t.fluorine=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,e,r){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=92)}([function(t,e,r){"use strict";var n=r(2),o=r(87),i=r(16),s=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,i=o.toSubscriber(t,e,r);if(n?n.call(i,this.source):i.add(this._trySubscribe(i)),i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.syncErrorThrown=!0,t.syncErrorValue=e,t.error(e)}},t.prototype.forEach=function(t,e){var r=this;if(e||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?e=n.root.Rx.config.Promise:n.root.Promise&&(e=n.root.Promise)),!e)throw Error("no Promise impl found");return new e(function(e,n){var o=r.subscribe(function(e){if(o)try{t(e)}catch(t){n(t),o.unsubscribe()}else t(e)},n,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[i.$$observable]=function(){return this},t.create=function(e){return new t(e)},t}();e.Observable=s},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(33),i=r(3),s=r(23),c=r(17),u=function(t){function e(r,n,o){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.empty;break;case 1:if(!r){this.destination=s.empty;break}if("object"==typeof r){r instanceof e?(this.destination=r,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new a(this,r));break}default:this.syncErrorThrowable=!0,this.destination=new a(this,r,n,o)}}return n(e,t),e.prototype[c.$$rxSubscriber]=function(){return this},e.create=function(t,r,n){var o=new e(t,r,n);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this,e=t._parent,r=t._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=e,this._parents=r,this},e}(i.Subscription);e.Subscriber=u;var a=function(t){function e(e,r,n,i){t.call(this),this._parentSubscriber=e;var s,c=this;o.isFunction(r)?s=r:r&&(c=r,s=r.next,n=r.error,i=r.complete,o.isFunction(c.unsubscribe)&&this.add(c.unsubscribe.bind(c)),c.unsubscribe=this.unsubscribe.bind(this)),this._context=c,this._next=s,this._error=n,this._complete=i}return n(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){if(!this.isStopped){var t=this._parentSubscriber;this._complete?t.syncErrorThrowable?(this.__tryOrSetError(t,this._complete),this.unsubscribe()):(this.__tryOrUnsub(this._complete),this.unsubscribe()):this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,r){try{e.call(this._context,r)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(u)},function(t,e,r){"use strict";(function(t){if(e.root="object"==typeof window&&window.window===window&&window||"object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t,!e.root)throw Error("RxJS could not find any global context (window, self, global)")}).call(e,r(37))},function(t,e,r){"use strict";function n(t){return t.reduce(function(t,e){return t.concat(e instanceof a.UnsubscriptionError?e.errors:e)},[])}var o=r(8),i=r(34),s=r(33),c=r(36),u=r(19),a=r(85),l=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var r=this,l=r._parent,h=r._parents,p=r._unsubscribe,f=r._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var b=-1,d=h?h.length:0;l;)l.remove(this),l=++b<d&&h[b]||null;if(s.isFunction(p)){var y=c.tryCatch(p).call(this);y===u.errorObject&&(e=!0,t=t||(u.errorObject.e instanceof a.UnsubscriptionError?n(u.errorObject.e.errors):[u.errorObject.e]))}if(o.isArray(f))for(b=-1,d=f.length;++b<d;){var v=f[b];if(i.isObject(v)){var y=c.tryCatch(v.unsubscribe).call(v);if(y===u.errorObject){e=!0,t=t||[];var m=u.errorObject.e;m instanceof a.UnsubscriptionError?t=t.concat(n(m.errors)):t.push(m)}}}if(e)throw new a.UnsubscriptionError(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var r=e;switch(typeof e){case"function":r=new t(e);case"object":if(r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if("function"!=typeof r._addParent){var n=r;r=new t,r._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=this._subscriptions||(this._subscriptions=[]);return o.push(r),r._addParent(this),r},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);r!==-1&&e.splice(r,1)}},t.prototype._addParent=function(t){var e=this,r=e._parent,n=e._parents;r&&r!==t?n?n.indexOf(t)===-1&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();e.Subscription=l},function(t,e,r){"use strict";function n(t,e){if(!t)throw Error(e)}e.a=n},function(t,e,r){"use strict";function n(t){return t&&"function"==typeof t.subscribe&&"function"==typeof t[i.a]}var o=r(88),i=r.n(o);e.a=n},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(0),i=r(1),s=r(3),c=r(18),u=r(24),a=r(17),l=function(t){function e(e){t.call(this,e),this.destination=e}return n(e,t),e}(i.Subscriber);e.SubjectSubscriber=l;var h=function(t){function e(){t.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return n(e,t),e.prototype[a.$$rxSubscriber]=function(){return new l(this)},e.prototype.lift=function(t){var e=new p(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,r=e.length,n=e.slice(),o=0;r>o;o++)n[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,r=e.length,n=e.slice(),o=0;r>o;o++)n[o].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new c.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,e=t.length,r=t.slice(),n=0;e>n;n++)r[n].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new c.ObjectUnsubscribedError;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(t.complete(),s.Subscription.EMPTY):(this.observers.push(t),new u.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new o.Observable;return t.source=this,t},e.create=function(t,e){return new p(t,e)},e}(o.Observable);e.Subject=h;var p=function(t){function e(e,r){t.call(this),this.destination=e,this.source=r}return n(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){var e=this.source;return e?this.source.subscribe(t):s.Subscription.EMPTY},e}(h);e.AnonymousSubject=p},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(0),i=r(26),s=r(25),c=r(20),u=function(t){function e(e,r){t.call(this),this.array=e,this.scheduler=r,r||1!==e.length||(this._isScalar=!0,this.value=e[0])}return n(e,t),e.create=function(t,r){return new e(t,r)},e.of=function(){for(var t=[],r=0;arguments.length>r;r++)t[r-0]=arguments[r];var n=t[t.length-1];c.isScheduler(n)?t.pop():n=null;var o=t.length;return o>1?new e(t,n):1===o?new i.ScalarObservable(t[0],n):new s.EmptyObservable(n)},e.dispatch=function(t){var e=t.array,r=t.index,n=t.count,o=t.subscriber;return n>r?(o.next(e[r]),void(o.closed||(t.index=r+1,this.schedule(t)))):void o.complete()},e.prototype._subscribe=function(t){var r=0,n=this.array,o=n.length,i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{array:n,index:r,count:o,subscriber:t});for(var s=0;o>s&&!t.closed;s++)t.next(n[s]);t.complete()},e}(o.Observable);e.ArrayObservable=u},function(t,e){"use strict";e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},function(t,e,r){"use strict";function n(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r.i(o.a)("object"===(void 0===t?"undefined":i(t))&&"function"==typeof t.next,"Expected observer to be an object containing at least a next method.");var s=function(e){return function(){return t.next(e.apply(void 0,arguments))}},c=function t(e){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if("function"==typeof e)return s(e);if(Array.isArray(e))return e.map(function(e,u){return n?t(e,c.concat(u)):(r.i(o.a)("function"==typeof e,"wrapActions: Expected a `function`"+(c.length?" in "+c:"")+" but got `"+(void 0===e?"undefined":i(e))+"`."),s(e))});if("object"===(void 0===e?"undefined":i(e)))return Object.keys(e).reduce(function(u,a){if(e.hasOwnProperty(a)){var l=e[a];n?u[a]=t(l,c.concat(a)):(r.i(o.a)("function"==typeof l,"wrapActions: Expected a `function`"+(c.length?" in "+c:"")+" but got `"+(void 0===l?"undefined":i(l))+"`."),u[a]=s(l))}return u},{});throw Error("wrapActions: Expected a `function`"+(c.length?" in "+c:"")+" but got `"+("undefined"==typeof x?"undefined":i(x))+"`.")};return c(e)}var o=r(4);e.a=n;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1),i=function(t){function e(){t.apply(this,arguments)}return n(e,t),e.prototype.notifyNext=function(t,e,r,n,o){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(o.Subscriber);e.OuterSubscriber=i},function(t,e,r){"use strict";function n(t,e,r,n){var p=new l.InnerSubscriber(t,r,n);if(p.closed)return null;if(e instanceof u.Observable)return e._isScalar?(p.next(e.value),p.complete(),null):e.subscribe(p);if(i.isArrayLike(e)){for(var f=0,b=e.length;b>f&&!p.closed;f++)p.next(e[f]);p.closed||p.complete()}else{if(s.isPromise(e))return e.then(function(t){p.closed||(p.next(t),p.complete())},function(t){return p.error(t)}).then(null,function(t){o.root.setTimeout(function(){throw t})}),p;if(e&&"function"==typeof e[a.$$iterator])for(var d=e[a.$$iterator]();;){var y=d.next();if(y.done){p.complete();break}if(p.next(y.value),p.closed)break}else if(e&&"function"==typeof e[h.$$observable]){var v=e[h.$$observable]();if("function"==typeof v.subscribe)return v.subscribe(new l.InnerSubscriber(t,r,n));p.error(new TypeError("Provided object does not correctly implement Symbol.observable"))}else{var m=c.isObject(e)?"an invalid object":"'"+e+"'",w="You provided "+m+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";p.error(new TypeError(w))}}return null}var o=r(2),i=r(32),s=r(35),c=r(34),u=r(0),a=r(15),l=r(50),h=r(16);e.subscribeToResult=n},function(t,e,r){(function(t,n){function o(t,e){this._id=t,this._clearFn=e}var i=r(48).nextTick,s=Function.prototype.apply,c=Array.prototype.slice,u={},a=0;e.setTimeout=function(){return new o(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new o(s.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;0>e||(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var r=a++,n=arguments.length>=2&&c.call(arguments,1);return u[r]=!0,i(function(){u[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete u[t]}}).call(e,r(12).setImmediate,r(12).clearImmediate)},function(e,r){e.exports=t},function(t,e,r){"use strict";function n(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];i.Subject.call(this),this.keyCache=[],this.valCache=[],this.middlewares=[].concat(n).map(function(e){return e(t)}),this.logging=r.i(w.a)(e.logging),this.logging.agendas&&r.i(w.b)(this),this.reduce=this.reduce.bind(this),this.rawNext=this.rawNext.bind(this),this.next=this.next.bind(this)}function o(t,e){return new n(t,e)}var i=r(6),s=(r.n(i),r(0)),c=(r.n(s),r(49)),u=(r.n(c),r(27)),a=(r.n(u),r(64)),l=(r.n(a),r(69)),h=(r.n(l),r(71)),p=(r.n(h),r(65)),f=(r.n(p),r(72)),b=(r.n(f),r(75)),d=(r.n(b),r(74)),y=(r.n(d),r(67)),v=(r.n(y),r(62)),m=(r.n(v),r(46)),w=r(45),_=(r(4),r(9),r(47)),g=r(5);e.a=n,e.b=o;var O={type:"_INIT_"};n.prototype=Object.create(i.Subject.prototype),n.prototype.constructor=n,n.prototype.reduce=function(t,e){var n,o=this.keyCache,i=this.valCache,s=this.logging,c=o.indexOf(t);if(c>-1)return i[c].store;var b=r.i(m.a)(t,t(e,O)),d=(n=(n=(n=r.i(u.of)(b.state),a.concat).call(n,h.mergeMap.call(this,function(e){var n,o=b,i=[],a=s.stores?r.i(w.c)(t.name||c,e):null;return(n=(n=l.map.call(e,function(t){return b=b.doNext(t),i.push(t),a&&a.change(t,b.state),b.state}),v._catch).call(n,function(t){a||console.error(t);var e=b.state;return r.i(m.b)(o,function(t){return i.indexOf(t)===-1}),a&&a.revert([e,b.state],t,i),r.i(u.of)(b.state)}),p.distinctUntilChanged).call(n)})),p.distinctUntilChanged).call(n),f.publishReplay).call(n,1),y=d.connect(),_=o.length;return o.push(t),i[_]={store:d,subscription:y},d},n.prototype.rawNext=n.prototype.next,n.prototype.next=function(t){for(var e,n=this.middlewares,o=(e=r.i(_.a)(t),d.share).call(e),i=0;n.length>i;i++){var s=n[i];if(o=s(o),!r.i(g.a)(o))return}return this.rawNext((e=(e=o,y.filter).call(e,Boolean),f.publishReplay).call(e).refCount())}},function(t,e,r){"use strict";function n(t){var e=t.Symbol;if("function"==typeof e)return e.iterator||(e.iterator=e("iterator polyfill")),e.iterator;var r=t.Set;if(r&&"function"==typeof(new r)["@@iterator"])return"@@iterator";var n=t.Map;if(n)for(var o=Object.getOwnPropertyNames(n.prototype),i=0;o.length>i;++i){var s=o[i];if("entries"!==s&&"size"!==s&&n.prototype[s]===n.prototype.entries)return s}return"@@iterator"}var o=r(2);e.symbolIteratorPonyfill=n,e.$$iterator=n(o.root)},function(t,e,r){"use strict";function n(t){var e,r=t.Symbol;return"function"==typeof r?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}var o=r(2);e.getSymbolObservable=n,e.$$observable=n(o.root)},function(t,e,r){"use strict";var n=r(2),o=n.root.Symbol;e.$$rxSubscriber="function"==typeof o&&"function"==typeof o.for?o.for("rxSubscriber"):"@@rxSubscriber"},function(t,e){"use strict";var r=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},n=function(t){function e(){var e=t.call(this,"object unsubscribed");this.name=e.name="ObjectUnsubscribedError",this.stack=e.stack,this.message=e.message}return r(e,t),e}(Error);e.ObjectUnsubscribedError=n},function(t,e){"use strict";e.errorObject={e:{}}},function(t,e){"use strict";function r(t){return t&&"function"==typeof t.schedule}e.isScheduler=r},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data",s=2>=arguments.length||void 0===arguments[2]||arguments[2];return r.i(a.a)("function"==typeof t||r.i(l.a)(t),"Expected selector to be either a function or an observable."),function(r){var a,l;return l=a=function(c){function a(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,a);var i=o(this,c.call(this,e,r));i.subscribe=function(){i.sub=i.store.subscribe(function(t){i.setState({data:t})},function(t){throw t})};var s=r.observable;return i.store="function"==typeof t?t(s,e):t,i.state={},i}return i(a,c),a.prototype.componentWillMount=function(){this.subscribe()},a.prototype.shouldComponentUpdate=function(t,e){if(!s||e.data!==this.state.data)return!0;for(var r in t)if(t.hasOwnProperty(r)&&t[r]!==this.props[r])return!0;return!1},a.prototype.componentWillReceiveProps=function(e){if("function"==typeof t){var r=t(this.context.observable,e);this.store!==r&&(this.store=r,this.sub.unsubscribe(),this.subscribe())}},a.prototype.componentWillUnmount=function(){this.sub.unsubscribe()},a.prototype.render=function(){var t,n=this.context.observer,o=this.state.data;return"production"!==production&&void 0===o&&console.error("Rendering `undefined` causes undefined behaviour in most cases! This message will only show up in development."),u.a.createElement(r,h({},this.props,(t={},t[e]=o,t.observer=n,t)))},a}(c.Component),a.contextTypes={observable:u.a.PropTypes.object,observer:u.a.PropTypes.object},l}}var c=r(13),u=r.n(c),a=r(4),l=r(5);r(22);e.a=s;var h=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}},function(t,e,r){"use strict";function n(t){return o.a.prototype.isPrototypeOf(t)}var o=r(14);e.a=n},function(t,e){"use strict";e.empty={closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}}},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(3),i=function(t){function e(e,r){t.call(this),this.subject=e,this.subscriber=r,this.closed=!1}return n(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var r=e.indexOf(this.subscriber);r!==-1&&e.splice(r,1)}}},e}(o.Subscription);e.SubjectSubscription=i},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(0),i=function(t){function e(e){t.call(this),this.scheduler=e}return n(e,t),e.create=function(t){return new e(t)},e.dispatch=function(t){var e=t.subscriber;e.complete()},e.prototype._subscribe=function(t){var r=this.scheduler;return r?r.schedule(e.dispatch,0,{subscriber:t}):void t.complete()},e}(o.Observable);e.EmptyObservable=i},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(0),i=function(t){function e(e,r){t.call(this),this.value=e,this.scheduler=r,this._isScalar=!0,r&&(this._isScalar=!1)}return n(e,t),e.create=function(t,r){return new e(t,r)},e.dispatch=function(t){var e=t.done,r=t.value,n=t.subscriber;return e?void n.complete():(n.next(r),void(n.closed||(t.done=!0,this.schedule(t))))},e.prototype._subscribe=function(t){var r=this.value,n=this.scheduler;return n?n.schedule(e.dispatch,0,{done:!1,value:r,subscriber:t}):(t.next(r),void(t.closed||t.complete()))},e}(o.Observable);e.ScalarObservable=i},function(t,e,r){"use strict";var n=r(7);e.of=n.ArrayObservable.of},function(t,e,r){"use strict";function n(t,e){var r;if(r="function"==typeof t?t:function(){return t},"function"==typeof e)return this.lift(new i(r,e));var n=Object.create(this,o.connectableObservableDescriptor);return n.source=this,n.subjectFactory=r,n}var o=r(55);e.multicast=n;var i=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var r=this.selector,n=this.subjectFactory(),o=r(n).subscribe(t);return o.add(e.subscribe(n)),o},t}();e.MulticastOperator=i},function(t,e,r){"use strict";function n(t,e){return void 0===e&&(e=0),this.lift(new c(t,e))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(1),s=r(51);e.observeOn=n;var c=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}();e.ObserveOnOperator=c;var u=function(t){function e(e,r,n){void 0===n&&(n=0),t.call(this,e),this.scheduler=r,this.delay=n}return o(e,t),e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new a(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(s.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(s.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(s.Notification.createComplete())},e}(i.Subscriber);e.ObserveOnSubscriber=u;var a=function(){function t(t,e){this.notification=t,this.destination=e}return t}();e.ObserveOnMessage=a},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(2),i=r(76),s=function(t){function e(e,r){t.call(this,e,r),this.scheduler=e,this.work=r,this.pending=!1}return n(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t,this.pending=!0;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,e)),this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),o.root.setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){return void 0===r&&(r=0),null!==r&&this.delay===r?e:o.root.clearInterval(e)&&void 0||void 0},e.prototype.execute=function(t,e){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);return r?r:void(this.pending===!1&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null)))},e.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(t){r=!0,n=!!t&&t||Error(t)}if(r)return this.unsubscribe(),n},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.delay=null,this.state=null,this.pending=!1,this.scheduler=null,n!==-1&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null))},e}(i.Action);e.AsyncAction=s},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(53),i=function(t){function e(){t.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return n(e,t),e.prototype.flush=function(t){var e=this.actions;if(this.active)return void e.push(t);var r;this.active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=e.shift());if(this.active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}},e}(o.Scheduler);e.AsyncScheduler=i},function(t,e){"use strict";e.isArrayLike=function(t){return t&&"number"==typeof t.length}},function(t,e){"use strict";function r(t){return"function"==typeof t}e.isFunction=r},function(t,e){"use strict";function r(t){return null!=t&&"object"==typeof t}e.isObject=r},function(t,e){"use strict";function r(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}e.isPromise=r},function(t,e,r){"use strict";function n(){try{return i.apply(this,arguments)}catch(t){return s.errorObject.e=t,s.errorObject}}function o(t){return i=t,n}var i,s=r(19);e.tryCatch=o},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";function n(t){var e=Object.keys(t);return function(n){return o.combineLatest.apply(void 0,e.map(function(e){var o=t[e];return r.i(i.a)(o)?o:n(o)}).concat([function(){for(var t=arguments.length,r=Array(t),n=0;t>n;n++)r[n]=arguments[n];return r.reduce(function(t,r,n){return t[e[n]]=r,t},{})}]))}}var o=r(60),i=(r.n(o),r(5));e.a=n},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=r(13),c=r.n(s),u=r(4),a=r(5),l=r(22),h=r(14);r.d(e,"a",function(){return b});var p,f,b=(f=p=function(t){function e(i){n(this,e);var s=o(this,t.call(this,i)),c=i.dispatcher,p=i.observable;return c?r.i(u.a)(r.i(l.a)(c),"Expected prop dispatcher to be a Dispatcher."):c=r.i(h.b)(),s.observer={next:c.next,error:c.error,complete:c.complete},s.observable=p&&"function"==typeof p?p(c):r.i(a.a)(p)?p:c,r.i(u.a)(r.i(a.a)(s.observable),"Expected provided observable to be an Observable."),s}return i(e,t),e.prototype.getChildContext=function(){var t=this.observer,e=this.observable;return{observer:t,observable:e}},e.prototype.render=function(){return this.props.children},e}(s.Component),p.propTypes={dispatcher:s.PropTypes.object,observable:s.PropTypes.oneOfType([s.PropTypes.func,s.PropTypes.object])},p.childContextTypes={observer:c.a.PropTypes.object,observable:c.a.PropTypes.object},f)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"actions",s=2>=arguments.length||void 0===arguments[2]||arguments[2];return function(h){var p,f;return f=p=function(c){function p(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,p);var u=o(this,c.call(this,e,i)),l=i.observer;return u.actions=r.i(a.a)(l,t,s),u}return i(p,c),p.prototype.render=function(){var t,r=this.context.observer;return u.a.createElement(h,l({},this.props,(t={},t[e]=this.actions,t.observer=r,t)))},p}(c.Component),p.contextTypes={observer:u.a.PropTypes.object},f}}var c=r(13),u=r.n(c),a=r(9);e.a=s;var l=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"actions",h=3>=arguments.length||void 0===arguments[3]||arguments[3];return function(p){return function(c){function f(){return n(this,f),o(this,c.apply(this,arguments))}return i(f,c),f.prototype.render=function(){var n;return u.a.createElement(p,l({},this.props,(n={},n[s]=r.i(a.a)(t,e,h),n)))},f}(c.Component)}}var c=r(13),u=r.n(c),a=r(9);e.a=s;var l=Object.assign||function(t){for(var e=1;arguments.length>e;e++){ var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}},function(t,e,r){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data",n=2>=arguments.length||void 0===arguments[2]||arguments[2];return"function"==typeof t?r.i(o.a)(function(e,r){return t(r)},e,n):r.i(o.a)(t,e,n)}var o=r(21);e.a=n},function(t,e,r){"use strict";function n(t){var e=this,n=t.reduce(function(t,e){return t&&"string"==typeof e},!0);return r.i(i.a)(Array.isArray(t),"Expected `keys` to be an array."),r.i(i.a)(n,"Expected `keys` to contain only keys."),o.Observable.create(function(r){var n=void 0;return e.subscribe(function(e){if(void 0!==e&&null!==e&&n!==e){for(var o=!1,i={},s=t,c=Array.isArray(s),u=0,s=c?s:s[Symbol.iterator]();;){var a;if(c){if(u>=s.length)break;a=s[u++]}else{if(u=s.next(),u.done)break;a=u.value}var l=a;i[l]=e[l],o&&n&&i[l]===n[l]||(o=!0)}o&&r.next(i),n=e}},function(t){return r.error(t)},function(){return r.complete()})})}var o=r(0),i=(r.n(o),r(4));e.a=n},function(t,e,r){"use strict";function n(t){return"object"===(void 0===t?"undefined":o(t))&&"function"==typeof t.then}e.a=n;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}},function(t,e,r){"use strict";function n(t){return t.toLocaleTimeString("en-GB")+"."+t.getMilliseconds()}function o(t){var e={agendas:!1,stores:!1};return"object"===(void 0===t?"undefined":a(t))?(e.agendas=t.agendas,e.stores=t.stores):t&&(e.agendas=!0,e.stores=!0),e}function i(t){t.subscribe(function(t){var e,r=l(t,new Date),n=void 0;(e=(e=s.scan.call(t,function(t,e){return t.concat([e])},[]),c._do).call(e,function(t){n=t}),u.last).call(e).subscribe(function(t){r(),t.forEach(function(t){console.log("%c action","color: #03a9f4; font-weight: bold;",t)}),console.groupEnd&&console.groupCollapsed&&console.groupEnd()},function(t){r("Error "),console.log("%c error","color: #f20404; font-weight: bold;",t),console.log("%c dispatched actions","color: #03a9f4; font-weight: bold;",n),console.groupEnd&&console.groupCollapsed&&console.groupEnd()})})}var s=r(73),c=(r.n(s),r(66)),u=(r.n(c),r(68));r.n(u);e.a=o,e.b=i,r.d(e,"c",function(){return h});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=function(t,e){return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=new Date,i="Agenda "+t.constructor.name+" @ "+n(e)+" (in "+(o-e)+"ms)";console.groupCollapsed&&console.groupCollapsed("%c "+(r+i),"color: #111111;"),console.log("%c agenda","color: #9e9e9e; font-weight: bold;",t)}},h=function(t,e){return{change:function(r,o){var i=new Date,s="Store "+t+" @ "+n(i);console.groupCollapsed&&console.groupCollapsed("%c "+s,"color: #111111;"),console.log("%c agenda","color: #9e9e9e; font-weight: bold;",e),console.log("%c action","color: #03a9f4; font-weight: bold;",r),console.log("%c change","color: #4caf50; font-weight: bold;",o),console.groupCollapsed&&console.groupEnd&&console.groupEnd()},revert:function(r,o,i){var s=new Date,c="Revert "+t+" @ "+n(s),u=r[0],a=r[1];console.groupCollapsed&&console.groupCollapsed("%c "+c,"color: #f20404;"),console.log("%c agenda","color: #9e9e9e; font-weight: bold;",e),console.log("%c previous","color: #4caf50; font-weight: bold;",u),console.log("%c state","color: #4caf50; font-weight: bold;",a),console.log("%c error","color: #f20404; font-weight: bold;",o),console.log("%c bucket","color: #03a9f4; font-weight: bold;",i),console.groupCollapsed&&console.groupEnd&&console.groupEnd()}}}},function(t,e,r){"use strict";function n(t,e){return Object.assign(Object.create(i),{reducer:t,state:e})}function o(t,e){for(var r=t.reducer,n=t;n.next;)e(n.next.action)?n.next.state=r(n.state,n.next.action):(n.next.state=n.state,n.next.action={}),n=n.next}e.a=n,e.b=o;var i={doNext:function(t){var e=this.reducer,r=e(this.state,t);return r===this.state?this:this.next=Object.assign(Object.create(i),{state:r,action:t,reducer:e})}}},function(t,e,r){"use strict";function n(t){return r.i(c.a)(t)||r.i(s.a)(t)?r.i(i.from)(t):r.i(o.of)(t)}var o=r(27),i=(r.n(o),r(61)),s=(r.n(i),r(44)),c=r(5);e.a=n},function(t,e){function r(){throw Error("setTimeout has not been defined")}function n(){throw Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function i(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){d&&f&&(d=!1,f.length?b=f.concat(b):y=-1,b.length&&c())}function c(){if(!d){var t=o(s);d=!0;for(var e=b.length;e;){for(f=b,b=[];++y<e;)f&&f[y].run();y=-1,e=b.length}f=null,d=!1,i(t)}}function u(t,e){this.fun=t,this.array=e}function a(){}var l,h,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(t){l=r}try{h="function"==typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var f,b=[],d=!1,y=-1;p.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var r=1;arguments.length>r;r++)e[r-1]=arguments[r];b.push(new u(t,e)),1!==b.length||d||o(c)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=a,p.addListener=a,p.once=a,p.off=a,p.removeListener=a,p.removeAllListeners=a,p.emit=a,p.binding=function(t){throw Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(6),i=r(18),s=function(t){function e(e){t.call(this),this._value=e}return n(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return r&&!r.closed&&e.next(this._value),r},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new i.ObjectUnsubscribedError;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(o.Subject);e.BehaviorSubject=s},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1),i=function(t){function e(e,r,n){t.call(this),this.parent=e,this.outerValue=r,this.outerIndex=n,this.index=0}return n(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(o.Subscriber);e.InnerSubscriber=i},function(t,e,r){"use strict";var n=r(0),o=function(){function t(t,e,r){this.kind=t,this.value=e,this.error=r,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,r){var n=this.kind;switch(n){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return r&&r()}},t.prototype.accept=function(t,e,r){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,r)},t.prototype.toObservable=function(){var t=this.kind;switch(t){case"N":return n.Observable.of(this.value);case"E":return n.Observable.throw(this.error);case"C":return n.Observable.empty()}throw Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):this.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return this.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();e.Notification=o},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(6),i=r(82),s=r(3),c=r(29),u=r(18),a=r(24),l=function(t){function e(e,r,n){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY),t.call(this),this.scheduler=n,this._events=[],this._bufferSize=1>e?1:e,this._windowTime=1>r?1:r}return n(e,t),e.prototype.next=function(e){var r=this._getNow();this._events.push(new h(r,e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,r=this._trimBufferThenGetEvents(),n=this.scheduler;if(this.closed)throw new u.ObjectUnsubscribedError;this.hasError?e=s.Subscription.EMPTY:this.isStopped?e=s.Subscription.EMPTY:(this.observers.push(t),e=new a.SubjectSubscription(this,t)),n&&t.add(t=new c.ObserveOnSubscriber(t,n));for(var o=r.length,i=0;o>i&&!t.closed;i++)t.next(r[i].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||i.queue).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;o>i&&t-n[i].time>=r;)i++;return o>e&&(i=Math.max(i,o-e)),i>0&&n.splice(0,i),n},e}(o.Subject);e.ReplaySubject=l;var h=function(){function t(t,e){this.time=t,this.value=e}return t}()},function(t,e){"use strict";var r=function(){function t(e,r){void 0===r&&(r=t.now),this.SchedulerAction=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(r,e)},t.now=Date.now?Date.now:function(){return+new Date},t}();e.Scheduler=r},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(0),i=r(26),s=r(25),c=function(t){function e(e,r){t.call(this),this.arrayLike=e,this.scheduler=r,r||1!==e.length||(this._isScalar=!0,this.value=e[0])}return n(e,t),e.create=function(t,r){var n=t.length;return 0===n?new s.EmptyObservable:1===n?new i.ScalarObservable(t[0],r):new e(t,r)},e.dispatch=function(t){var e=t.arrayLike,r=t.index,n=t.length,o=t.subscriber;if(!o.closed){if(r>=n)return void o.complete();o.next(e[r]),t.index=r+1,this.schedule(t)}},e.prototype._subscribe=function(t){var r=0,n=this,o=n.arrayLike,i=n.scheduler,s=o.length;if(i)return i.schedule(e.dispatch,0,{arrayLike:o,index:r,length:s,subscriber:t});for(var c=0;s>c&&!t.closed;c++)t.next(o[c]);t.complete()},e}(o.Observable);e.ArrayLikeObservable=c},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(6),i=r(0),s=r(1),c=r(3),u=function(t){function e(e,r){t.call(this),this.source=e,this.subjectFactory=r,this._refCount=0}return n(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(t=this._connection=new c.Subscription,t.add(this.source.subscribe(new a(this.getSubject(),this))),t.closed?(this._connection=null,t=c.Subscription.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return this.lift(new l(this))},e}(i.Observable);e.ConnectableObservable=u,e.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subscribe:{value:u.prototype._subscribe},getSubject:{value:u.prototype.getSubject},connect:{value:u.prototype.connect},refCount:{value:u.prototype.refCount}};var a=function(t){function e(e,r){t.call(this,e),this.connectable=r}return n(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(o.SubjectSubscriber),l=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var r=this.connectable;r._refCount++;var n=new h(t,r),o=e.subscribe(n);return n.closed||(n.connection=r.connect()),o},t}(),h=function(t){function e(e,r){t.call(this,e),this.connectable=r}return n(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(!t)return void(this.connection=null);this.connectable=null;var e=t._refCount;if(0>=e)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);var r=this.connection,n=t._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()},e}(s.Subscriber)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(8),i=r(32),s=r(35),c=r(58),u=r(57),a=r(7),l=r(54),h=r(15),p=r(0),f=r(29),b=r(16),d=function(t){function e(e,r){t.call(this,null),this.ish=e,this.scheduler=r}return n(e,t),e.create=function(t,r){if(null!=t){if("function"==typeof t[b.$$observable])return t instanceof p.Observable&&!r?t:new e(t,r);if(o.isArray(t))return new a.ArrayObservable(t,r);if(s.isPromise(t))return new c.PromiseObservable(t,r);if("function"==typeof t[h.$$iterator]||"string"==typeof t)return new u.IteratorObservable(t,r);if(i.isArrayLike(t))return new l.ArrayLikeObservable(t,r)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")},e.prototype._subscribe=function(t){var e=this.ish,r=this.scheduler;return null==r?e[b.$$observable]().subscribe(t):e[b.$$observable]().subscribe(new f.ObserveOnSubscriber(t,r,0))},e}(p.Observable);e.FromObservable=d},function(t,e,r){"use strict";function n(t){var e=t[l.$$iterator];if(!e&&"string"==typeof t)return new p(t);if(!e&&void 0!==t.length)return new f(t);if(!e)throw new TypeError("object is not iterable");return t[l.$$iterator]()}function o(t){var e=+t.length;return isNaN(e)?0:0!==e&&i(e)?(e=s(e)*Math.floor(Math.abs(e)),e>0?e>b?b:e:0):e}function i(t){return"number"==typeof t&&u.root.isFinite(t)}function s(t){var e=+t;return 0===e?e:isNaN(e)?e:0>e?-1:1}var c=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},u=r(2),a=r(0),l=r(15),h=function(t){function e(e,r){if(t.call(this),this.scheduler=r,null==e)throw Error("iterator cannot be null.");this.iterator=n(e)}return c(e,t),e.create=function(t,r){return new e(t,r)},e.dispatch=function(t){var e=t.index,r=t.hasError,n=t.iterator,o=t.subscriber;if(r)return void o.error(t.error);var i=n.next();return i.done?void o.complete():(o.next(i.value),t.index=e+1,o.closed?void("function"==typeof n.return&&n.return()):void this.schedule(t))},e.prototype._subscribe=function(t){var r=0,n=this,o=n.iterator,i=n.scheduler;if(i)return i.schedule(e.dispatch,0,{index:r,iterator:o,subscriber:t});for(;;){var s=o.next();if(s.done){t.complete();break}if(t.next(s.value),t.closed){"function"==typeof o.return&&o.return();break}}},e}(a.Observable);e.IteratorObservable=h;var p=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=t.length),this.str=t,this.idx=e,this.len=r}return t.prototype[l.$$iterator]=function(){return this},t.prototype.next=function(){return this.len>this.idx?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}},t}(),f=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=o(t)),this.arr=t,this.idx=e,this.len=r}return t.prototype[l.$$iterator]=function(){return this},t.prototype.next=function(){return this.len>this.idx?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}},t}(),b=Math.pow(2,53)-1},function(t,e,r){"use strict";function n(t){var e=t.value,r=t.subscriber;r.closed||(r.next(e),r.complete())}function o(t){var e=t.err,r=t.subscriber;r.closed||r.error(e)}var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},s=r(2),c=r(0),u=function(t){function e(e,r){t.call(this),this.promise=e,this.scheduler=r}return i(e,t),e.create=function(t,r){return new e(t,r)},e.prototype._subscribe=function(t){var e=this,r=this.promise,i=this.scheduler;if(null==i)this._isScalar?t.closed||(t.next(this.value),t.complete()):r.then(function(r){e.value=r,e._isScalar=!0,t.closed||(t.next(r),t.complete())},function(e){t.closed||t.error(e)}).then(null,function(t){s.root.setTimeout(function(){throw t})});else if(this._isScalar){if(!t.closed)return i.schedule(n,0,{value:this.value,subscriber:t})}else r.then(function(r){e.value=r,e._isScalar=!0,t.closed||t.add(i.schedule(n,0,{value:r,subscriber:t}))},function(e){t.closed||t.add(i.schedule(o,0,{err:e,subscriber:t}))}).then(null,function(t){s.root.setTimeout(function(){throw t})})},e}(c.Observable);e.PromiseObservable=u},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null