@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
6 lines • 217 kB
JavaScript
/**
@license
Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt
**/
"format register";System.register("rxjs/util/root",[],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};e.root=i[typeof self]&&self||i[typeof window]&&window;var o=(i[typeof e]&&e&&!e.nodeType&&e,i[typeof t]&&t&&!t.nodeType&&t,i[typeof r]&&r);return!o||o.global!==o&&o.window!==o||(e.root=o),r.define=s,t.exports}),System.register("rxjs/symbol/observable",["rxjs/util/root"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=require("rxjs/util/root"),o=i.root.Symbol;return"function"==typeof o?o.observable?e.$$observable=o.observable:("function"==typeof o["for"]?e.$$observable=o["for"]("observable"):e.$$observable=o("observable"),o.observable=e.$$observable):e.$$observable="@@observable",r.define=s,t.exports}),System.register("rxjs/util/isFunction",[],!0,function(require,e,t){function r(e){return"function"==typeof e}var s=System.global,i=s.define;return s.define=void 0,e.isFunction=r,s.define=i,t.exports}),System.register("rxjs/util/isArray",[],!0,function(require,e,t){var r=System.global,s=r.define;return r.define=void 0,e.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length},r.define=s,t.exports}),System.register("rxjs/util/isObject",[],!0,function(require,e,t){function r(e){return null!=e&&"object"==typeof e}var s=System.global,i=s.define;return s.define=void 0,e.isObject=r,s.define=i,t.exports}),System.register("rxjs/util/errorObject",[],!0,function(require,e,t){var r=System.global,s=r.define;return r.define=void 0,e.errorObject={e:{}},r.define=s,t.exports}),System.register("rxjs/util/UnsubscriptionError",[],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=function(e){function t(t){e.call(this),this.errors=t,this.name="UnsubscriptionError",this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n"):""}return i(t,e),t}(Error);return e.UnsubscriptionError=o,r.define=s,t.exports}),System.register("rxjs/symbol/rxSubscriber",["rxjs/util/root"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=require("rxjs/util/root"),o=i.root.Symbol;return e.$$rxSubscriber="function"==typeof o&&"function"==typeof o["for"]?o["for"]("rxSubscriber"):"@@rxSubscriber",r.define=s,t.exports}),System.register("rxjs/Observer",[],!0,function(require,e,t){var r=System.global,s=r.define;return r.define=void 0,e.empty={isUnsubscribed:!0,next:function(e){},error:function(e){throw e},complete:function(){}},r.define=s,t.exports}),System.register("rxjs/SubjectSubscription",["rxjs/Subscription"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Subscription"),n=function(e){function t(t,r){e.call(this),this.subject=t,this.observer=r,this.isUnsubscribed=!1}return i(t,e),t.prototype.unsubscribe=function(){if(!this.isUnsubscribed){this.isUnsubscribed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isUnsubscribed){var r=t.indexOf(this.observer);-1!==r&&t.splice(r,1)}}},t}(o.Subscription);return e.SubjectSubscription=n,r.define=s,t.exports}),System.register("rxjs/util/throwError",[],!0,function(require,e,t){function r(e){throw e}var s=System.global,i=s.define;return s.define=void 0,e.throwError=r,s.define=i,t.exports}),System.register("rxjs/util/ObjectUnsubscribedError",[],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=function(e){function t(){e.call(this,"object unsubscribed"),this.name="ObjectUnsubscribedError"}return i(t,e),t}(Error);return e.ObjectUnsubscribedError=o,r.define=s,t.exports}),System.register("rxjs/AsyncSubject",["rxjs/Subject"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Subject"),n=function(e){function t(){e.apply(this,arguments),this.value=null,this.hasNext=!1}return i(t,e),t.prototype._subscribe=function(t){return this.hasCompleted&&this.hasNext&&t.next(this.value),e.prototype._subscribe.call(this,t)},t.prototype._next=function(e){this.value=e,this.hasNext=!0},t.prototype._complete=function(){var e=-1,t=this.observers,r=t.length;if(this.isUnsubscribed=!0,this.hasNext)for(;++e<r;){var s=t[e];s.next(this.value),s.complete()}else for(;++e<r;)t[e].complete();this.isUnsubscribed=!1,this.unsubscribe()},t}(o.Subject);return e.AsyncSubject=n,r.define=s,t.exports}),System.register("rxjs/observable/BoundNodeCallbackObservable",["rxjs/Observable","rxjs/util/tryCatch","rxjs/util/errorObject","rxjs/AsyncSubject"],!0,function(require,e,t){function r(e){var t=this,r=e.source,o=e.subscriber,n=r.callbackFunc,a=r.args,u=r.scheduler,p=r.subject;if(!p){p=r.subject=new b.AsyncSubject;var h=function d(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];var o=d.source,n=o.selector,a=o.subject,b=e.shift();if(b)a.error(b);else if(n){var p=c.tryCatch(n).apply(this,e);p===l.errorObject?t.add(u.schedule(i,0,{err:l.errorObject.e,subject:a})):t.add(u.schedule(s,0,{value:p,subject:a}))}else{var h=1===e.length?e[0]:e;t.add(u.schedule(s,0,{value:h,subject:a}))}};h.source=r;var f=c.tryCatch(n).apply(this,a.concat(h));f===l.errorObject&&p.error(l.errorObject.e)}t.add(p.subscribe(o))}function s(e){var t=e.value,r=e.subject;r.next(t),r.complete()}function i(e){var t=e.err,r=e.subject;r.error(t)}var o=System.global,n=o.define;o.define=void 0;var a=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},u=require("rxjs/Observable"),c=require("rxjs/util/tryCatch"),l=require("rxjs/util/errorObject"),b=require("rxjs/AsyncSubject"),p=function(e){function t(t,r,s,i){e.call(this),this.callbackFunc=t,this.selector=r,this.args=s,this.scheduler=i}return a(t,e),t.create=function(e,r,s){return void 0===r&&(r=void 0),function(){for(var i=[],o=0;o<arguments.length;o++)i[o-0]=arguments[o];return new t(e,r,i,s)}},t.prototype._subscribe=function(e){var t=this.callbackFunc,s=this.args,i=this.scheduler,o=this.subject;if(i)return i.schedule(r,0,{source:this,subscriber:e});if(!o){o=this.subject=new b.AsyncSubject;var n=function u(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var r=u.source,s=r.selector,i=r.subject,o=e.shift();if(o)i.error(o);else if(s){var n=c.tryCatch(s).apply(this,e);n===l.errorObject?i.error(l.errorObject.e):(i.next(n),i.complete())}else i.next(1===e.length?e[0]:e),i.complete()};n.source=this;var a=c.tryCatch(t).apply(this,s.concat(n));a===l.errorObject&&o.error(l.errorObject.e)}return o.subscribe(e)},t}(u.Observable);return e.BoundNodeCallbackObservable=p,o.define=n,t.exports}),System.register("rxjs/observable/ScalarObservable",["rxjs/Observable"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Observable"),n=function(e){function t(t,r){e.call(this),this.value=t,this.scheduler=r,this._isScalar=!0}return i(t,e),t.create=function(e,r){return new t(e,r)},t.dispatch=function(e){var t=e.done,r=e.value,s=e.subscriber;return t?void s.complete():(s.next(r),void(s.isUnsubscribed||(e.done=!0,this.schedule(e))))},t.prototype._subscribe=function(e){var r=this.value,s=this.scheduler;return s?s.schedule(t.dispatch,0,{done:!1,value:r,subscriber:e}):(e.next(r),void(e.isUnsubscribed||e.complete()))},t}(o.Observable);return e.ScalarObservable=n,r.define=s,t.exports}),System.register("rxjs/observable/EmptyObservable",["rxjs/Observable"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Observable"),n=function(e){function t(t){e.call(this),this.scheduler=t}return i(t,e),t.create=function(e){return new t(e)},t.dispatch=function(e){var t=e.subscriber;t.complete()},t.prototype._subscribe=function(e){var r=this.scheduler;return r?r.schedule(t.dispatch,0,{subscriber:e}):void e.complete()},t}(o.Observable);return e.EmptyObservable=n,r.define=s,t.exports}),System.register("rxjs/util/isScheduler",[],!0,function(require,e,t){function r(e){return e&&"function"==typeof e.schedule}var s=System.global,i=s.define;return s.define=void 0,e.isScheduler=r,s.define=i,t.exports}),System.register("rxjs/OuterSubscriber",["rxjs/Subscriber"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Subscriber"),n=function(e){function t(){e.apply(this,arguments)}return i(t,e),t.prototype.notifyNext=function(e,t,r,s,i){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(o.Subscriber);return e.OuterSubscriber=n,r.define=s,t.exports}),System.register("rxjs/util/isPromise",[],!0,function(require,e,t){function r(e){return e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var s=System.global,i=s.define;return s.define=void 0,e.isPromise=r,s.define=i,t.exports}),System.register("rxjs/symbol/iterator",["rxjs/util/root"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=require("rxjs/util/root"),o=i.root.Symbol;if("function"==typeof o)o.iterator?e.$$iterator=o.iterator:"function"==typeof o["for"]&&(e.$$iterator=o["for"]("iterator"));else if(i.root.Set&&"function"==typeof(new i.root.Set)["@@iterator"])e.$$iterator="@@iterator";else if(i.root.Map)for(var n=Object.getOwnPropertyNames(i.root.Map.prototype),a=0;a<n.length;++a){var u=n[a];if("entries"!==u&&"size"!==u&&i.root.Map.prototype[u]===i.root.Map.prototype.entries){e.$$iterator=u;break}}else e.$$iterator="@@iterator";return r.define=s,t.exports}),System.register("rxjs/InnerSubscriber",["rxjs/Subscriber"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Subscriber"),n=function(e){function t(t,r,s){e.call(this),this.parent=t,this.outerValue=r,this.outerIndex=s,this.index=0}return i(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(o.Subscriber);return e.InnerSubscriber=n,r.define=s,t.exports}),System.register("rxjs/operator/mergeAll",["rxjs/OuterSubscriber","rxjs/util/subscribeToResult"],!0,function(require,e,t){function r(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),this.lift(new u(e))}var s=System.global,i=s.define;s.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},n=require("rxjs/OuterSubscriber"),a=require("rxjs/util/subscribeToResult");e.mergeAll=r;var u=function(){function e(e){this.concurrent=e}return e.prototype.call=function(e,t){return t._subscribe(new c(e,this.concurrent))},e}();e.MergeAllOperator=u;var c=function(e){function t(t,r){e.call(this,t),this.concurrent=r,this.hasCompleted=!1,this.buffer=[],this.active=0}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?(this.active++,this.add(a.subscribeToResult(this,e))):this.buffer.push(e)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(n.OuterSubscriber);return e.MergeAllSubscriber=c,s.define=i,t.exports}),System.register("rxjs/observable/DeferObservable",["rxjs/Observable","rxjs/util/subscribeToResult","rxjs/OuterSubscriber"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Observable"),n=require("rxjs/util/subscribeToResult"),a=require("rxjs/OuterSubscriber"),u=function(e){function t(t){e.call(this),this.observableFactory=t}return i(t,e),t.create=function(e){return new t(e)},t.prototype._subscribe=function(e){return new c(e,this.observableFactory)},t}(o.Observable);e.DeferObservable=u;var c=function(e){function t(t,r){e.call(this,t),this.factory=r,this.tryDefer()}return i(t,e),t.prototype.tryDefer=function(){try{this._callFactory()}catch(e){this._error(e)}},t.prototype._callFactory=function(){var e=this.factory();e&&this.add(n.subscribeToResult(this,e))},t}(a.OuterSubscriber);return r.define=s,t.exports}),System.register("rxjs/observable/empty",["rxjs/observable/EmptyObservable"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=require("rxjs/observable/EmptyObservable");return e.empty=i.EmptyObservable.create,r.define=s,t.exports}),System.register("rxjs/observable/ForkJoinObservable",["rxjs/Observable","rxjs/observable/EmptyObservable","rxjs/util/isArray","rxjs/util/subscribeToResult","rxjs/OuterSubscriber"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Observable"),n=require("rxjs/observable/EmptyObservable"),a=require("rxjs/util/isArray"),u=require("rxjs/util/subscribeToResult"),c=require("rxjs/OuterSubscriber"),l=function(e){function t(t,r){e.call(this),this.sources=t,this.resultSelector=r}return i(t,e),t.create=function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];if(null===e||0===arguments.length)return new n.EmptyObservable;var s=null;return"function"==typeof e[e.length-1]&&(s=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),0===e.length?new n.EmptyObservable:new t(e,s)},t.prototype._subscribe=function(e){return new b(e,this.sources,this.resultSelector)},t}(o.Observable);e.ForkJoinObservable=l;var b=function(e){function t(t,r,s){e.call(this,t),this.sources=r,this.resultSelector=s,this.completed=0,this.haveValues=0;var i=r.length;this.total=i,this.values=new Array(i);for(var o=0;i>o;o++){var n=r[o],a=u.subscribeToResult(this,n,null,o);a&&(a.outerIndex=o,this.add(a))}}return i(t,e),t.prototype.notifyNext=function(e,t,r,s,i){this.values[r]=t,i._hasValue||(i._hasValue=!0,this.haveValues++)},t.prototype.notifyComplete=function(e){var t=this.destination,r=this,s=r.haveValues,i=r.resultSelector,o=r.values,n=o.length;if(!e._hasValue)return void t.complete();if(this.completed++,this.completed===n){if(s===n){var a=i?i.apply(this,o):o;t.next(a)}t.complete()}},t}(c.OuterSubscriber);return r.define=s,t.exports}),System.register("rxjs/observable/PromiseObservable",["rxjs/util/root","rxjs/Observable"],!0,function(require,e,t){function r(e){var t=e.value,r=e.subscriber;r.isUnsubscribed||(r.next(t),r.complete())}function s(e){var t=e.err,r=e.subscriber;r.isUnsubscribed||r.error(t)}var i=System.global,o=i.define;i.define=void 0;var n=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=require("rxjs/util/root"),u=require("rxjs/Observable"),c=function(e){function t(t,r){void 0===r&&(r=null),e.call(this),this.promise=t,this.scheduler=r}return n(t,e),t.create=function(e,r){return void 0===r&&(r=null),new t(e,r)},t.prototype._subscribe=function(e){var t=this,i=this.promise,o=this.scheduler;if(null==o)this._isScalar?e.isUnsubscribed||(e.next(this.value),e.complete()):i.then(function(r){t.value=r,t._isScalar=!0,e.isUnsubscribed||(e.next(r),e.complete())},function(t){e.isUnsubscribed||e.error(t)}).then(null,function(e){a.root.setTimeout(function(){throw e})});else if(this._isScalar){if(!e.isUnsubscribed)return o.schedule(r,0,{value:this.value,subscriber:e})}else i.then(function(s){t.value=s,t._isScalar=!0,e.isUnsubscribed||e.add(o.schedule(r,0,{value:s,subscriber:e}))},function(t){e.isUnsubscribed||e.add(o.schedule(s,0,{err:t,subscriber:e}))}).then(null,function(e){a.root.setTimeout(function(){throw e})})},t}(u.Observable);return e.PromiseObservable=c,i.define=o,t.exports}),System.register("rxjs/observable/IteratorObservable",["rxjs/util/root","rxjs/util/isObject","rxjs/util/tryCatch","rxjs/Observable","rxjs/util/isFunction","rxjs/symbol/iterator","rxjs/util/errorObject"],!0,function(require,e,t){function r(e){var t=e[f.$$iterator];if(!t&&"string"==typeof e)return new x(e);if(!t&&void 0!==e.length)return new y(e);if(!t)throw new TypeError("Object is not iterable");return e[f.$$iterator]()}function s(e){var t=+e.length;return isNaN(t)?0:0!==t&&i(t)?(t=o(t)*Math.floor(Math.abs(t)),0>=t?0:t>j?j:t):t}function i(e){return"number"==typeof e&&c.root.isFinite(e)}function o(e){var t=+e;return 0===t?t:isNaN(t)?t:0>t?-1:1}var n=System.global,a=n.define;n.define=void 0;var u=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},c=require("rxjs/util/root"),l=require("rxjs/util/isObject"),b=require("rxjs/util/tryCatch"),p=require("rxjs/Observable"),h=require("rxjs/util/isFunction"),f=require("rxjs/symbol/iterator"),d=require("rxjs/util/errorObject"),v=function(e){function t(t,s,i,o){if(e.call(this),null==t)throw new Error("iterator cannot be null.");if(l.isObject(s))this.thisArg=s,this.scheduler=i;else if(h.isFunction(s))this.project=s,this.thisArg=i,this.scheduler=o;else if(null!=s)throw new Error("When provided, `project` must be a function.");this.iterator=r(t)}return u(t,e),t.create=function(e,r,s,i){return new t(e,r,s,i)},t.dispatch=function(e){var t=e.index,r=e.hasError,s=e.thisArg,i=e.project,o=e.iterator,n=e.subscriber;if(r)return void n.error(e.error);var a=o.next();return a.done?void n.complete():(i?(a=b.tryCatch(i).call(s,a.value,t),a===d.errorObject?(e.error=d.errorObject.e,e.hasError=!0):(n.next(a),e.index=t+1)):(n.next(a.value),e.index=t+1),void(n.isUnsubscribed||this.schedule(e)))},t.prototype._subscribe=function(e){var r=0,s=this,i=s.iterator,o=s.project,n=s.thisArg,a=s.scheduler;if(a)return a.schedule(t.dispatch,0,{index:r,thisArg:n,project:o,iterator:i,subscriber:e});for(;;){var u=i.next();if(u.done){e.complete();break}if(o){if(u=b.tryCatch(o).call(n,u.value,r++),u===d.errorObject){e.error(d.errorObject.e);break}e.next(u)}else e.next(u.value);if(e.isUnsubscribed)break}},t}(p.Observable);e.IteratorObservable=v;var x=function(){function e(e,t,r){void 0===t&&(t=0),void 0===r&&(r=e.length),this.str=e,this.idx=t,this.len=r}return e.prototype[f.$$iterator]=function(){return this},e.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}},e}(),y=function(){function e(e,t,r){void 0===t&&(t=0),void 0===r&&(r=s(e)),this.arr=e,this.idx=t,this.len=r}return e.prototype[f.$$iterator]=function(){return this},e.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}},e}(),j=Math.pow(2,53)-1;return n.define=a,t.exports}),System.register("rxjs/observable/ArrayLikeObservable",["rxjs/Observable","rxjs/observable/ScalarObservable","rxjs/observable/EmptyObservable"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Observable"),n=require("rxjs/observable/ScalarObservable"),a=require("rxjs/observable/EmptyObservable"),u=function(e){function t(t,r,s,i){e.call(this),this.arrayLike=t,this.scheduler=i,r||i||1!==t.length||(this._isScalar=!0,this.value=t[0]),r&&(this.mapFn=r.bind(s))}return i(t,e),t.create=function(e,r,s,i){var o=e.length;return 0===o?new a.EmptyObservable:1!==o||r?new t(e,r,s,i):new n.ScalarObservable(e[0],i)},t.dispatch=function(e){var t=e.arrayLike,r=e.index,s=e.length,i=e.mapFn,o=e.subscriber;if(!o.isUnsubscribed){if(r>=s)return void o.complete();var n=i?i(t[r],r):t[r];o.next(n),e.index=r+1,this.schedule(e)}},t.prototype._subscribe=function(e){var r=0,s=this,i=s.arrayLike,o=s.mapFn,n=s.scheduler,a=i.length;if(n)return n.schedule(t.dispatch,0,{arrayLike:i,index:r,length:a,mapFn:o,subscriber:e});for(var u=0;a>u&&!e.isUnsubscribed;u++){var c=o?o(i[u],u):i[u];e.next(c)}e.complete()},t}(o.Observable);return e.ArrayLikeObservable=u,r.define=s,t.exports}),System.register("rxjs/Notification",["rxjs/Observable"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=require("rxjs/Observable"),o=function(){function e(e,t,r){this.kind=e,this.value=t,this.exception=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.exception);case"C":return e.complete&&e.complete()}},e.prototype["do"]=function(e,t,r){var s=this.kind;switch(s){case"N":return e&&e(this.value);case"E":return t&&t(this.exception);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this["do"](e,t,r)},e.prototype.toObservable=function(){var e=this.kind;switch(e){case"N":return i.Observable.of(this.value);case"E":return i.Observable["throw"](this.exception);case"C":return i.Observable.empty()}},e.createNext=function(t){return"undefined"!=typeof t?new e("N",t):this.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return this.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}();return e.Notification=o,r.define=s,t.exports}),System.register("rxjs/observable/FromEventObservable",["rxjs/Observable","rxjs/util/tryCatch","rxjs/util/errorObject","rxjs/Subscription"],!0,function(require,e,t){function r(e){return!!e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}function s(e){return!!e&&"function"==typeof e.on&&"function"==typeof e.off}function i(e){return!!e&&"[object NodeList]"===e.toString()}function o(e){return!!e&&"[object HTMLCollection]"===e.toString()}function n(e){return!!e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}var a=System.global,u=a.define;a.define=void 0;var c=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},l=require("rxjs/Observable"),b=require("rxjs/util/tryCatch"),p=require("rxjs/util/errorObject"),h=require("rxjs/Subscription"),f=function(e){function t(t,r,s){e.call(this),this.sourceObj=t,this.eventName=r,this.selector=s}return c(t,e),t.create=function(e,r,s){return new t(e,r,s)},t.setupSubscription=function(e,a,u,c){var l;if(i(e)||o(e))for(var b=0,p=e.length;p>b;b++)t.setupSubscription(e[b],a,u,c);else n(e)?(e.addEventListener(a,u),l=function(){return e.removeEventListener(a,u)}):s(e)?(e.on(a,u),l=function(){return e.off(a,u)}):r(e)&&(e.addListener(a,u),l=function(){return e.removeListener(a,u)});c.add(new h.Subscription(l))},t.prototype._subscribe=function(e){var r=this.sourceObj,s=this.eventName,i=this.selector,o=i?function(){for(var t=[],r=0;r<arguments.length;r++)t[r-0]=arguments[r];var s=b.tryCatch(i).apply(void 0,t);s===p.errorObject?e.error(p.errorObject.e):e.next(s)}:function(t){return e.next(t)};t.setupSubscription(r,s,o,e)},t}(l.Observable);return e.FromEventObservable=f,a.define=u,t.exports}),System.register("rxjs/observable/FromEventPatternObservable",["rxjs/Observable","rxjs/Subscription","rxjs/util/tryCatch","rxjs/util/errorObject"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Observable"),n=require("rxjs/Subscription"),a=require("rxjs/util/tryCatch"),u=require("rxjs/util/errorObject"),c=function(e){function t(t,r,s){e.call(this),this.addHandler=t,this.removeHandler=r,this.selector=s}return i(t,e),t.create=function(e,r,s){return new t(e,r,s)},t.prototype._subscribe=function(e){var t=this.addHandler,r=this.removeHandler,s=this.selector,i=s?function(t){var r=a.tryCatch(s).apply(null,arguments);r===u.errorObject?e.error(r.e):e.next(r)}:function(t){e.next(t)},o=a.tryCatch(t)(i);o===u.errorObject&&e.error(o.e),e.add(new n.Subscription(function(){r(i)}))},t}(o.Observable);return e.FromEventPatternObservable=c,r.define=s,t.exports}),System.register("rxjs/observable/fromPromise",["rxjs/observable/PromiseObservable"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=require("rxjs/observable/PromiseObservable");return e.fromPromise=i.PromiseObservable.create,r.define=s,t.exports}),System.register("rxjs/util/isNumeric",["rxjs/util/isArray"],!0,function(require,e,t){function r(e){return!o.isArray(e)&&e-parseFloat(e)+1>=0}var s=System.global,i=s.define;s.define=void 0;var o=require("rxjs/util/isArray");return e.isNumeric=r,s.define=i,t.exports}),System.register("rxjs/scheduler/FutureAction",["rxjs/util/root","rxjs/Subscription"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/util/root"),n=require("rxjs/Subscription"),a=function(e){function t(t,r){e.call(this),this.scheduler=t,this.work=r,this.pending=!1}return i(t,e),t.prototype.execute=function(){if(this.isUnsubscribed)this.error=new Error("executing a cancelled action");else try{this.work(this.state)}catch(e){this.unsubscribe(),this.error=e}},t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this.isUnsubscribed?this:this._schedule(e,t)},t.prototype._schedule=function(e,t){var r=this;void 0===t&&(t=0),this.state=e,this.pending=!0;var s=this.id;return null!=s&&this.delay===t?this:(this.delay=t,null!=s&&(this.id=null,o.root.clearInterval(s)),this.id=o.root.setInterval(function(){r.pending=!1;var e=r,t=e.id,s=e.scheduler;s.actions.push(r),s.flush(),r.pending===!1&&null!=t&&(r.id=null,o.root.clearInterval(t))},t),this)},t.prototype._unsubscribe=function(){this.pending=!1;var e=this,t=e.id,r=e.scheduler,s=r.actions,i=s.indexOf(this);null!=t&&(this.id=null,o.root.clearInterval(t)),-1!==i&&s.splice(i,1),this.work=null,this.state=null,this.scheduler=null},t}(n.Subscription);return e.FutureAction=a,r.define=s,t.exports}),System.register("rxjs/scheduler/QueueAction",["rxjs/scheduler/FutureAction"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/scheduler/FutureAction"),n=function(e){function t(){e.apply(this,arguments)}return i(t,e),t.prototype._schedule=function(t,r){if(void 0===r&&(r=0),r>0)return e.prototype._schedule.call(this,t,r);this.delay=r,this.state=t;var s=this.scheduler;return s.actions.push(this),s.flush(),this},t}(o.FutureAction);return e.QueueAction=n,r.define=s,t.exports}),System.register("rxjs/operator/merge",["rxjs/observable/ArrayObservable","rxjs/operator/mergeAll","rxjs/util/isScheduler"],!0,function(require,e,t){function r(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e.unshift(this),s.apply(this,e)}function s(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var r=Number.POSITIVE_INFINITY,s=null,i=e[e.length-1];return u.isScheduler(i)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof i&&(r=e.pop()),1===e.length?e[0]:new n.ArrayObservable(e,s).lift(new a.MergeAllOperator(r))}var i=System.global,o=i.define;i.define=void 0;var n=require("rxjs/observable/ArrayObservable"),a=require("rxjs/operator/mergeAll"),u=require("rxjs/util/isScheduler");return e.merge=r,e.mergeStatic=s,i.define=o,t.exports}),System.register("rxjs/operator/race",["rxjs/util/isArray","rxjs/observable/ArrayObservable","rxjs/OuterSubscriber","rxjs/util/subscribeToResult"],!0,function(require,e,t){function r(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return 1===e.length&&a.isArray(e[0])&&(e=e[0]),e.unshift(this),s.apply(this,e)}function s(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(1===e.length){if(!a.isArray(e[0]))return e[0];e=e[0]}return new u.ArrayObservable(e).lift(new b)}var i=System.global,o=i.define;i.define=void 0;var n=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=require("rxjs/util/isArray"),u=require("rxjs/observable/ArrayObservable"),c=require("rxjs/OuterSubscriber"),l=require("rxjs/util/subscribeToResult");e.race=r,e.raceStatic=s;var b=function(){function e(){}return e.prototype.call=function(e,t){return t._subscribe(new p(e))},e}();e.RaceOperator=b;var p=function(e){function t(t){e.call(this,t),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}return n(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;t>r;r++){var s=e[r],i=l.subscribeToResult(this,s,s,r);this.subscriptions.push(i),this.add(i)}this.observables=null}},t.prototype.notifyNext=function(e,t,r,s,i){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==r){var n=this.subscriptions[o];n.unsubscribe(),this.remove(n)}this.subscriptions=null}this.destination.next(t)},t}(c.OuterSubscriber);return e.RaceSubscriber=p,i.define=o,t.exports}),System.register("rxjs/util/noop",[],!0,function(require,e,t){function r(){}var s=System.global,i=s.define;return s.define=void 0,e.noop=r,s.define=i,t.exports}),System.register("rxjs/observable/of",["rxjs/observable/ArrayObservable"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=require("rxjs/observable/ArrayObservable");return e.of=i.ArrayObservable.of,r.define=s,t.exports}),System.register("rxjs/observable/RangeObservable",["rxjs/Observable"],!0,function(require,e,t){
var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Observable"),n=function(e){function t(t,r,s){e.call(this),this.start=t,this._count=r,this.scheduler=s}return i(t,e),t.create=function(e,r,s){return void 0===e&&(e=0),void 0===r&&(r=0),new t(e,r,s)},t.dispatch=function(e){var t=e.start,r=e.index,s=e.count,i=e.subscriber;return r>=s?void i.complete():(i.next(t),void(i.isUnsubscribed||(e.index=r+1,e.start=t+1,this.schedule(e))))},t.prototype._subscribe=function(e){var r=0,s=this.start,i=this._count,o=this.scheduler;if(o)return o.schedule(t.dispatch,0,{index:r,count:i,start:s,subscriber:e});for(;;){if(r++>=i){e.complete();break}if(e.next(s++),e.isUnsubscribed)break}},t}(o.Observable);return e.RangeObservable=n,r.define=s,t.exports}),System.register("rxjs/observable/ErrorObservable",["rxjs/Observable"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Observable"),n=function(e){function t(t,r){e.call(this),this.error=t,this.scheduler=r}return i(t,e),t.create=function(e,r){return new t(e,r)},t.dispatch=function(e){var t=e.error,r=e.subscriber;r.error(t)},t.prototype._subscribe=function(e){var r=this.error,s=this.scheduler;return s?s.schedule(t.dispatch,0,{error:r,subscriber:e}):void e.error(r)},t}(o.Observable);return e.ErrorObservable=n,r.define=s,t.exports}),System.register("rxjs/util/isDate",[],!0,function(require,e,t){function r(e){return e instanceof Date&&!isNaN(+e)}var s=System.global,i=s.define;return s.define=void 0,e.isDate=r,s.define=i,t.exports}),System.register("rxjs/operator/zip",["rxjs/observable/ArrayObservable","rxjs/util/isArray","rxjs/Subscriber","rxjs/OuterSubscriber","rxjs/util/subscribeToResult","rxjs/symbol/iterator"],!0,function(require,e,t){function r(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e.unshift(this),s.apply(this,e)}function s(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var r=e[e.length-1];return"function"==typeof r&&e.pop(),new a.ArrayObservable(e).lift(new h(r))}var i=System.global,o=i.define;i.define=void 0;var n=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=require("rxjs/observable/ArrayObservable"),u=require("rxjs/util/isArray"),c=require("rxjs/Subscriber"),l=require("rxjs/OuterSubscriber"),b=require("rxjs/util/subscribeToResult"),p=require("rxjs/symbol/iterator");e.zipProto=r,e.zipStatic=s;var h=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t._subscribe(new f(e,this.project))},e}();e.ZipOperator=h;var f=function(e){function t(t,r,s){void 0===s&&(s=Object.create(null)),e.call(this,t),this.index=0,this.iterators=[],this.active=0,this.project="function"==typeof r?r:null,this.values=s}return n(t,e),t.prototype._next=function(e){var t=this.iterators,r=this.index++;u.isArray(e)?t.push(new v(e)):"function"==typeof e[p.$$iterator]?t.push(new d(e[p.$$iterator]())):t.push(new x(this.destination,this,e,r))},t.prototype._complete=function(){var e=this.iterators,t=e.length;this.active=t;for(var r=0;t>r;r++){var s=e[r];s.stillUnsubscribed?this.add(s.subscribe(s,r)):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,s=0;t>s;s++){var i=e[s];if("function"==typeof i.hasValue&&!i.hasValue())return}for(var o=!1,n=[],s=0;t>s;s++){var i=e[s],a=i.next();if(i.hasCompleted()&&(o=!0),a.done)return void r.complete();n.push(a.value)}this.project?this._tryProject(n):r.next(n),o&&r.complete()},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(r){return void this.destination.error(r)}this.destination.next(t)},t}(c.Subscriber);e.ZipSubscriber=f;var d=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return e&&e.done},e}(),v=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[p.$$iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),x=function(e){function t(t,r,s,i){e.call(this,t),this.parent=r,this.observable=s,this.index=i,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}return n(t,e),t.prototype[p.$$iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e,t,r,s,i){this.buffer.push(t),this.parent.checkIterators()},t.prototype.subscribe=function(e,t){return b.subscribeToResult(this,this.observable,this,t)},t}(l.OuterSubscriber);return i.define=o,t.exports}),System.register("rxjs/operator/buffer",["rxjs/OuterSubscriber","rxjs/util/subscribeToResult"],!0,function(require,e,t){function r(e){return this.lift(new u(e))}var s=System.global,i=s.define;s.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},n=require("rxjs/OuterSubscriber"),a=require("rxjs/util/subscribeToResult");e.buffer=r;var u=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t._subscribe(new c(e,this.closingNotifier))},e}(),c=function(e){function t(t,r){e.call(this,t),this.buffer=[],this.add(a.subscribeToResult(this,r))}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(e,t,r,s,i){var o=this.buffer;this.buffer=[],this.destination.next(o)},t}(n.OuterSubscriber);return s.define=i,t.exports}),System.register("rxjs/operator/bufferCount",["rxjs/Subscriber"],!0,function(require,e,t){function r(e,t){return void 0===t&&(t=null),this.lift(new a(e,t))}var s=System.global,i=s.define;s.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},n=require("rxjs/Subscriber");e.bufferCount=r;var a=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t}return e.prototype.call=function(e,t){return t._subscribe(new u(e,this.bufferSize,this.startBufferEvery))},e}(),u=function(e){function t(t,r,s){e.call(this,t),this.bufferSize=r,this.startBufferEvery=s,this.buffers=[[]],this.count=0}return o(t,e),t.prototype._next=function(e){var t=this.count+=1,r=this.destination,s=this.bufferSize,i=null==this.startBufferEvery?s:this.startBufferEvery,o=this.buffers,n=o.length,a=-1;t%i===0&&o.push([]);for(var u=0;n>u;u++){var c=o[u];c.push(e),c.length===s&&(a=u,r.next(c))}-1!==a&&o.splice(a,1)},t.prototype._complete=function(){for(var t=this.destination,r=this.buffers;r.length>0;){var s=r.shift();s.length>0&&t.next(s)}e.prototype._complete.call(this)},t}(n.Subscriber);return s.define=i,t.exports}),System.register("rxjs/operator/bufferTime",["rxjs/Subscriber","rxjs/scheduler/async"],!0,function(require,e,t){function r(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=l.async),this.lift(new b(e,t,r))}function s(e){var t=e.subscriber,r=e.buffer;r&&t.closeBuffer(r),e.buffer=t.openBuffer(),t.isUnsubscribed||this.schedule(e,e.bufferTimeSpan)}function i(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,s=e.subscriber,i=e.scheduler,n=s.openBuffer(),a=this;s.isUnsubscribed||(a.add(i.schedule(o,r,{subscriber:s,buffer:n})),a.schedule(e,t))}function o(e){var t=e.subscriber,r=e.buffer;t.closeBuffer(r)}var n=System.global,a=n.define;n.define=void 0;var u=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},c=require("rxjs/Subscriber"),l=require("rxjs/scheduler/async");e.bufferTime=r;var b=function(){function e(e,t,r){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.scheduler=r}return e.prototype.call=function(e,t){return t._subscribe(new p(e,this.bufferTimeSpan,this.bufferCreationInterval,this.scheduler))},e}(),p=function(e){function t(t,r,n,a){e.call(this,t),this.bufferTimeSpan=r,this.bufferCreationInterval=n,this.scheduler=a,this.buffers=[];var u=this.openBuffer();if(null!==n&&n>=0){var c={subscriber:this,buffer:u},l={bufferTimeSpan:r,bufferCreationInterval:n,subscriber:this,scheduler:a};this.add(a.schedule(o,r,c)),this.add(a.schedule(i,n,l))}else{var b={subscriber:this,buffer:u,bufferTimeSpan:r};this.add(a.schedule(s,r,b))}}return u(t,e),t.prototype._next=function(e){for(var t=this.buffers,r=t.length,s=0;r>s;s++)t[s].push(e)},t.prototype._error=function(t){this.buffers.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this,r=t.buffers,s=t.destination;r.length>0;)s.next(r.shift());e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffers=null},t.prototype.openBuffer=function(){var e=[];return this.buffers.push(e),e},t.prototype.closeBuffer=function(e){this.destination.next(e);var t=this.buffers;t.splice(t.indexOf(e),1)},t}(c.Subscriber);return n.define=a,t.exports}),System.register("rxjs/operator/bufferToggle",["rxjs/Subscription","rxjs/util/subscribeToResult","rxjs/OuterSubscriber"],!0,function(require,e,t){function r(e,t){return this.lift(new c(e,t))}var s=System.global,i=s.define;s.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},n=require("rxjs/Subscription"),a=require("rxjs/util/subscribeToResult"),u=require("rxjs/OuterSubscriber");e.bufferToggle=r;var c=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t._subscribe(new l(e,this.openings,this.closingSelector))},e}(),l=function(e){function t(t,r,s){e.call(this,t),this.openings=r,this.closingSelector=s,this.contexts=[],this.add(a.subscribeToResult(this,r))}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,s=0;r>s;s++)t[s].buffer.push(e)},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var s=r.shift();s.subscription.unsubscribe(),s.buffer=null,s.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t,r,s,i){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector,r=t.call(this,e);r&&this.trySubscribe(r)}catch(s){this._error(s)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,s=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(s),s.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=[],s=new n.Subscription,i={buffer:r,subscription:s};t.push(i);var o=a.subscribeToResult(this,e,i);!o||o.isUnsubscribed?this.closeBuffer(i):(o.context=i,this.add(o),s.add(o))},t}(u.OuterSubscriber);return s.define=i,t.exports}),System.register("rxjs/operator/bufferWhen",["rxjs/Subscription","rxjs/util/tryCatch","rxjs/util/errorObject","rxjs/OuterSubscriber","rxjs/util/subscribeToResult"],!0,function(require,e,t){function r(e){return this.lift(new b(e))}var s=System.global,i=s.define;s.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},n=require("rxjs/Subscription"),a=require("rxjs/util/tryCatch"),u=require("rxjs/util/errorObject"),c=require("rxjs/OuterSubscriber"),l=require("rxjs/util/subscribeToResult");e.bufferWhen=r;var b=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t._subscribe(new p(e,this.closingSelector))},e}(),p=function(e){function t(t,r){e.call(this,t),this.closingSelector=r,this.subscribing=!1,this.openBuffer()}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},t.prototype.notifyNext=function(e,t,r,s,i){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e=this.closingSubscription;e&&(this.remove(e),e.unsubscribe());var t=this.buffer;this.buffer&&this.destination.next(t),this.buffer=[];var r=a.tryCatch(this.closingSelector)();r===u.errorObject?this.error(u.errorObject.e):(e=new n.Subscription,this.closingSubscription=e,this.add(e),this.subscribing=!0,e.add(l.subscribeToResult(this,r)),this.subscribing=!1)},t}(c.OuterSubscriber);return s.define=i,t.exports}),System.register("rxjs/scheduler/queue",["rxjs/scheduler/QueueScheduler"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=require("rxjs/scheduler/QueueScheduler");return e.queue=new i.QueueScheduler,r.define=s,t.exports}),System.register("rxjs/observable/ConnectableObservable",["rxjs/Observable","rxjs/Subscriber","rxjs/Subscription"],!0,function(require,e,t){var r=System.global,s=r.define;r.define=void 0;var i=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=require("rxjs/Observable"),n=require("rxjs/Subscriber"),a=require("rxjs/Subscription"),u=function(e){function t(t,r){e.call(this),this.source=t,this.subjectFactory=r}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this.subject;return e&&!e.isUnsubscribed?e:this.subject=this.subjectFactory()},t.prototype.connect=function(){var e=this.source,t=this.subscription;return t&&!t.isUnsubscribed?t:(t=e.subscribe(this.getSubject()),t.add(new c(this)),this.subscription=t)},t.prototype.refCount=function(){return new l(this)},t.prototype._closeSubscription=function(){this.subject=null,this.subscription=null},t}(o.Observable);e.ConnectableObservable=u;var c=function(e){function t(t){e.call(this),this.connectable=t}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;e._closeSubscription(),this.connectable=null},t}(a.Subscription),l=function(e){function t(t,r){void 0===r&&(r=0),e.call(this),this.connectable=t,this.refCount=r}return i(t,e),t.prototype._subscribe=function(e){var t=this.connectable,r=new b(e,this),s=t.subscribe(r);return s.isUnsubscribed||1!==++this.refCount||(r.connection=this.connection=t.connect()),s},t}(o.Observable),b=function(e){function t(t,r){e.call(this,null),this.destination=t,this.refCountObservable=r,this.connection=r.connection,t.add(this)}return i(t,e),t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this._resetConnectable(),this.destination.error(e)},t.prototype._complete=function(){this._resetConnectable(),this.destination.complete()},t.prototype._resetConnectable=function(){var e=this.refCountObservable,t=e.connection,r=this.connection;r&&r===t&&(e.refCount=0,t.unsubscribe(),e.connection=null,this.unsubscribe())},t.prototype._unsubscribe=function(){var e=this.refCountObservable;if(0!==e.refCount&&0===--e.refCount){var t=e.connection,r=this.connection;r&&r===t&&(t.unsubscribe(),e.connection=null)}},t}(n.Subscriber);return r.define=s,t.exports}),System.register("rxjs/operator/catch",["rxjs/Subscriber"],!0,function(require,e,t){function r(e){var t=new a(e),r=this.lift(t);return t.caught=r}var s=System.global,i=s.define;s.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},n=require("rxjs/Subscriber");e._catch=r;var a=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t._subscribe(new u(e,this.selector,this.caught))},e}(),u=function(e){function t(t,r,s){e.call(this,t),this.selector=r,this.caught=s}return o(t,e),t.prototype.error=function(e){if(!this.isStopped){var t=void 0;try{t=this.selector(e,this.caught)}catch(e){return void this.destination.error(e)}this._innerSub(t)}},t.prototype._innerSub=function(e){this.unsubscribe(),this.destination.remove(this),e.subscribe(this.destination)},t}(n.Subscriber);return s.define=i,t.exports}),System.register(