Socket
Socket
Sign inDemoInstall

rx

Package Overview
Dependencies
0
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.1 to 3.1.2

src/core/linq/observable/throttle.js

20

dist/rx.aggregates.js

@@ -57,15 +57,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -72,0 +72,0 @@ function thrower(e) {

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(){try{return j.apply(this,arguments)}catch(a){return F.e=a,F}}function f(a){if(!u(a))throw new TypeError("fn must be a function");return j=a,e}function g(a,b,c){return new n(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},function(a){d.onError(a)},function(){d.onNext(g),d.onCompleted()})},a)}function h(a){if(0===a.length)throw new C;return a[0]}function i(a,b,c,e){var f=B(b,c,3);return new n(function(b){var c=0;return a.subscribe(function(d){var g;try{g=f(d,c,a)}catch(h){return void b.onError(h)}g?(b.onNext(e?c:d),b.onCompleted()):c++},function(a){b.onError(a)},function(){b.onNext(e?-1:d),b.onCompleted()})},a)}var j,k=c.Observable,l=k.prototype,m=c.CompositeDisposable,n=c.AnonymousObservable,o=c.internals.AbstractObserver,p=c.Disposable.empty,q=(c.internals.isEqual,c.helpers),r=(q.not,q.defaultComparer),s=q.identity,t=q.defaultSubComparer,u=q.isFunction,v=q.isPromise,w=q.isArrayLike,x=q.isIterable,y=c.internals.inherits,z=k.fromPromise,A=k.from,B=c.internals.bindCallback,C=c.EmptyError,D=c.ObservableBase,E=c.ArgumentOutOfRangeError,F={e:{}},G=function(a){function b(b,c,d,e){this.source=b,this.acc=c,this.hasSeed=d,this.seed=e,a.call(this)}function c(a,b){this.o=a,this.acc=b.acc,this.hasSeed=b.hasSeed,this.seed=b.seed,this.hasAccumulation=!1,this.result=null,this.hasValue=!1,this.isStopped=!1}return y(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},c.prototype.onNext=function(a){this.isStopped||(!this.hasValue&&(this.hasValue=!0),this.hasAccumulation?this.result=f(this.acc)(this.result,a):(this.result=this.hasSeed?f(this.acc)(this.seed,a):a,this.hasAccumulation=!0),this.result===F&&this.o.onError(this.result.e))},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.hasValue&&this.o.onNext(this.result),!this.hasValue&&this.hasSeed&&this.o.onNext(this.seed),!this.hasValue&&!this.hasSeed&&this.o.onError(new C),this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(D);l.reduce=function(a){var b=!1;if(2===arguments.length){b=!0;var c=arguments[1]}return new G(this,a,b,c)};var H=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return y(b,a),b.prototype.next=function(a){var b=f(this._fn)(a,this._i++,this._s);return b===F?this._o.onError(b.e):void(Boolean(b)&&(this._o.onNext(!0),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!1),this._o.onCompleted()},b}(o);l.some=function(a,b){var c=this,d=B(a,b,3);return new n(function(a){return c.subscribe(new H(a,d,c))})};var I=function(a){function b(b){this._o=b,a.call(this)}return y(b,a),b.prototype.next=function(){this._o.onNext(!1),this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(o);l.isEmpty=function(){var a=this;return new n(function(b){return a.subscribe(new I(b))},a)};var J=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return y(b,a),b.prototype.next=function(a){var b=f(this._fn)(a,this._i++,this._s);return b===F?this._o.onError(b.e):void(Boolean(b)||(this._o.onNext(!1),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(o);l.every=function(a,b){var c=this,d=B(a,b,3);return new n(function(a){return c.subscribe(new J(a,d,c))},this)},l.includes=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new n(function(e){var f=0,g=+b||0;return Math.abs(g)===1/0&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),p):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},function(a){e.onError(a)},function(){e.onNext(!1),e.onCompleted()})},this)},l.contains=function(a,b){l.includes(a,b)},l.count=function(a,b){return a?this.filter(a,b).count():this.reduce(function(a){return a+1},0)},l.indexOf=function(a,b){var c=this;return new n(function(d){var e=0,f=+b||0;return Math.abs(f)===1/0&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),p):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},function(a){d.onError(a)},function(){d.onNext(-1),d.onCompleted()})},c)},l.sum=function(a,b){return a&&u(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},l.minBy=function(a,b){return b||(b=t),g(this,a,function(a,c){return-1*b(a,c)})},l.min=function(a){return this.minBy(s,a).map(function(a){return h(a)})},l.maxBy=function(a,b){return b||(b=t),g(this,a,b)},l.max=function(a){return this.maxBy(s,a).map(function(a){return h(a)})};var K=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._c=0,this._t=0,a.call(this)}return y(b,a),b.prototype.next=function(a){if(this._fn){var b=f(this._fn)(a,this._c++,this._s);if(b===F)return this._o.onError(b.e);this._t+=b}else this._c++,this._t+=a},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){return 0===this._c?this._o.onError(new C):(this._o.onNext(this._t/this._c),void this._o.onCompleted())},b}(o);l.average=function(a,b){var c,d=this;return u(a)&&(c=B(a,b,3)),new n(function(a){return d.subscribe(new K(a,c,d))},d)},l.sequenceEqual=function(a,b){var c=this;return b||(b=r),new n(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(w(a)||x(a))&&(a=A(a)),v(a)&&(a=z(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new m(i,j)},c)},l.elementAt=function(a,b){if(0>a)throw new E;var c=this;return new n(function(e){var f=a;return c.subscribe(function(a){0===f--&&(e.onNext(a),e.onCompleted())},function(a){e.onError(a)},function(){b===d?e.onError(new E):(e.onNext(b),e.onCompleted())})},c)},l.single=function(a,b){if(u(a))return this.filter(a,b).single();var c=this;return new n(function(a){var b,d=!1;return c.subscribe(function(c){d?a.onError(new Error("Sequence contains more than one element")):(b=c,d=!0)},function(b){a.onError(b)},function(){a.onNext(b),a.onCompleted()})},c)};var L=function(a){function b(b,c,d){this._o=b,this._obj=c,this._s=d,this._i=0,a.call(this)}return y(b,a),b.prototype.next=function(a){if(this._obj.predicate){var b=f(this._obj.predicate)(a,this._i++,this._s);if(b===F)return this._o.onError(b.e);Boolean(b)&&(this._o.onNext(a),this._o.onCompleted())}else this._obj.predicate||(this._o.onNext(a),this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._obj.defaultValue===d?this._o.onError(new C):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},b}(o);return l.first=function(){var a={},b=this;if(a="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},u(a.predicate)){var c=a.predicate;a.predicate=B(c,a.thisArg,3)}return new n(function(c){return b.subscribe(new L(c,a,b))},b)},l.last=function(){var a={},b=this;if(a="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},u(a.predicate)){var c=a.predicate;a.predicate=B(c,a.thisArg,3)}return new n(function(c){var e,g=!1,h=0;return b.subscribe(function(d){if(a.predicate){var i=f(a.predicate)(d,h++,b);if(i===F)return c.onError(i.e);i&&(g=!0,e=d)}else a.predicate||(g=!0,e=d)},function(a){c.onError(a)},function(){g?(c.onNext(e),c.onCompleted()):a.defaultValue===d?c.onError(new C):(c.onNext(a.defaultValue),c.onCompleted())})},b)},l.find=function(a,b){return i(this,a,b,!1)},l.findIndex=function(a,b){return i(this,a,b,!0)},l.toSet=function(){if("undefined"==typeof a.Set)throw new TypeError;var b=this;return new n(function(c){var d=new a.Set;return b.subscribe(function(a){d.add(a)},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},l.toMap=function(b,c){if("undefined"==typeof a.Map)throw new TypeError;var d=this;return new n(function(e){var f=new a.Map;return d.subscribe(function(a){var d;try{d=b(a)}catch(g){return void e.onError(g)}var h=a;if(c)try{h=c(a)}catch(g){return void e.onError(g)}f.set(d,h)},function(a){e.onError(a)},function(){e.onNext(f),e.onCompleted()})},d)},c});
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return D.e=b,D}}}function f(a,b,c){return new l(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},function(a){d.onError(a)},function(){d.onNext(g),d.onCompleted()})},a)}function g(a){if(0===a.length)throw new A;return a[0]}function h(a,b,c,e){var f=z(b,c,3);return new l(function(b){var c=0;return a.subscribe(function(d){var g;try{g=f(d,c,a)}catch(h){return void b.onError(h)}g?(b.onNext(e?c:d),b.onCompleted()):c++},function(a){b.onError(a)},function(){b.onNext(e?-1:d),b.onCompleted()})},a)}var i=c.Observable,j=i.prototype,k=c.CompositeDisposable,l=c.AnonymousObservable,m=c.internals.AbstractObserver,n=c.Disposable.empty,o=(c.internals.isEqual,c.helpers),p=(o.not,o.defaultComparer),q=o.identity,r=o.defaultSubComparer,s=o.isFunction,t=o.isPromise,u=o.isArrayLike,v=o.isIterable,w=c.internals.inherits,x=i.fromPromise,y=i.from,z=c.internals.bindCallback,A=c.EmptyError,B=c.ObservableBase,C=c.ArgumentOutOfRangeError,D={e:{}},E=c.internals.tryCatch=function(a){if(!s(a))throw new TypeError("fn must be a function");return e(a)},F=function(a){function b(b,c,d,e){this.source=b,this.acc=c,this.hasSeed=d,this.seed=e,a.call(this)}function c(a,b){this.o=a,this.acc=b.acc,this.hasSeed=b.hasSeed,this.seed=b.seed,this.hasAccumulation=!1,this.result=null,this.hasValue=!1,this.isStopped=!1}return w(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},c.prototype.onNext=function(a){this.isStopped||(!this.hasValue&&(this.hasValue=!0),this.hasAccumulation?this.result=E(this.acc)(this.result,a):(this.result=this.hasSeed?E(this.acc)(this.seed,a):a,this.hasAccumulation=!0),this.result===D&&this.o.onError(this.result.e))},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.hasValue&&this.o.onNext(this.result),!this.hasValue&&this.hasSeed&&this.o.onNext(this.seed),!this.hasValue&&!this.hasSeed&&this.o.onError(new A),this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(B);j.reduce=function(a){var b=!1;if(2===arguments.length){b=!0;var c=arguments[1]}return new F(this,a,b,c)};var G=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return w(b,a),b.prototype.next=function(a){var b=E(this._fn)(a,this._i++,this._s);return b===D?this._o.onError(b.e):void(Boolean(b)&&(this._o.onNext(!0),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!1),this._o.onCompleted()},b}(m);j.some=function(a,b){var c=this,d=z(a,b,3);return new l(function(a){return c.subscribe(new G(a,d,c))})};var H=function(a){function b(b){this._o=b,a.call(this)}return w(b,a),b.prototype.next=function(){this._o.onNext(!1),this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(m);j.isEmpty=function(){var a=this;return new l(function(b){return a.subscribe(new H(b))},a)};var I=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return w(b,a),b.prototype.next=function(a){var b=E(this._fn)(a,this._i++,this._s);return b===D?this._o.onError(b.e):void(Boolean(b)||(this._o.onNext(!1),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(m);j.every=function(a,b){var c=this,d=z(a,b,3);return new l(function(a){return c.subscribe(new I(a,d,c))},this)},j.includes=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new l(function(e){var f=0,g=+b||0;return Math.abs(g)===1/0&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),n):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},function(a){e.onError(a)},function(){e.onNext(!1),e.onCompleted()})},this)},j.contains=function(a,b){j.includes(a,b)},j.count=function(a,b){return a?this.filter(a,b).count():this.reduce(function(a){return a+1},0)},j.indexOf=function(a,b){var c=this;return new l(function(d){var e=0,f=+b||0;return Math.abs(f)===1/0&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),n):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},function(a){d.onError(a)},function(){d.onNext(-1),d.onCompleted()})},c)},j.sum=function(a,b){return a&&s(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},j.minBy=function(a,b){return b||(b=r),f(this,a,function(a,c){return-1*b(a,c)})},j.min=function(a){return this.minBy(q,a).map(function(a){return g(a)})},j.maxBy=function(a,b){return b||(b=r),f(this,a,b)},j.max=function(a){return this.maxBy(q,a).map(function(a){return g(a)})};var J=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._c=0,this._t=0,a.call(this)}return w(b,a),b.prototype.next=function(a){if(this._fn){var b=E(this._fn)(a,this._c++,this._s);if(b===D)return this._o.onError(b.e);this._t+=b}else this._c++,this._t+=a},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){return 0===this._c?this._o.onError(new A):(this._o.onNext(this._t/this._c),void this._o.onCompleted())},b}(m);j.average=function(a,b){var c,d=this;return s(a)&&(c=z(a,b,3)),new l(function(a){return d.subscribe(new J(a,c,d))},d)},j.sequenceEqual=function(a,b){var c=this;return b||(b=p),new l(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(u(a)||v(a))&&(a=y(a)),t(a)&&(a=x(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new k(i,j)},c)},j.elementAt=function(a,b){if(0>a)throw new C;var c=this;return new l(function(e){var f=a;return c.subscribe(function(a){0===f--&&(e.onNext(a),e.onCompleted())},function(a){e.onError(a)},function(){b===d?e.onError(new C):(e.onNext(b),e.onCompleted())})},c)},j.single=function(a,b){if(s(a))return this.filter(a,b).single();var c=this;return new l(function(a){var b,d=!1;return c.subscribe(function(c){d?a.onError(new Error("Sequence contains more than one element")):(b=c,d=!0)},function(b){a.onError(b)},function(){a.onNext(b),a.onCompleted()})},c)};var K=function(a){function b(b,c,d){this._o=b,this._obj=c,this._s=d,this._i=0,a.call(this)}return w(b,a),b.prototype.next=function(a){if(this._obj.predicate){var b=E(this._obj.predicate)(a,this._i++,this._s);if(b===D)return this._o.onError(b.e);Boolean(b)&&(this._o.onNext(a),this._o.onCompleted())}else this._obj.predicate||(this._o.onNext(a),this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._obj.defaultValue===d?this._o.onError(new A):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},b}(m);return j.first=function(){var a={},b=this;if(a="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},s(a.predicate)){var c=a.predicate;a.predicate=z(c,a.thisArg,3)}return new l(function(c){return b.subscribe(new K(c,a,b))},b)},j.last=function(){var a={},b=this;if(a="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},s(a.predicate)){var c=a.predicate;a.predicate=z(c,a.thisArg,3)}return new l(function(c){var e,f=!1,g=0;return b.subscribe(function(d){if(a.predicate){var h=E(a.predicate)(d,g++,b);if(h===D)return c.onError(h.e);h&&(f=!0,e=d)}else a.predicate||(f=!0,e=d)},function(a){c.onError(a)},function(){f?(c.onNext(e),c.onCompleted()):a.defaultValue===d?c.onError(new A):(c.onNext(a.defaultValue),c.onCompleted())})},b)},j.find=function(a,b){return h(this,a,b,!1)},j.findIndex=function(a,b){return h(this,a,b,!0)},j.toSet=function(){if("undefined"==typeof a.Set)throw new TypeError;var b=this;return new l(function(c){var d=new a.Set;return b.subscribe(function(a){d.add(a)},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},j.toMap=function(b,c){if("undefined"==typeof a.Map)throw new TypeError;var d=this;return new l(function(e){var f=new a.Map;return d.subscribe(function(a){var d;try{d=b(a)}catch(g){return void e.onError(g)}var h=a;if(c)try{h=c(a)}catch(g){return void e.onError(g)}f.set(d,h)},function(a){e.onError(a)},function(){e.onNext(f),e.onCompleted()})},d)},c});
//# sourceMappingURL=rx.aggregates.map

@@ -48,15 +48,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -63,0 +63,0 @@ function thrower(e) {

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.binding","exports"],function(b,c){return h.Rx=a(h,c,b),h.Rx}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(){try{return x.apply(this,arguments)}catch(a){return K.e=a,K}}function f(a){if(!J(a))throw new TypeError("fn must be a function");return x=a,e}function g(a){return a?y.isObservable(a)?a:I(a)?y.fromPromise(a):l(a)||k(a)?L.call(this,a):J(a)?j.call(this,a):isArrayLike(a)||isIterable(a)?h.call(this,a):isObject(a)?i.call(this,a):a:a}function h(a){return y.from(a).flatMap(g).toArray()}function i(a){function b(a,b){c[b]=d,f.push(a.map(function(a){c[b]=a}))}for(var c=new a.constructor,e=Object.keys(a),f=[],h=0,i=e.length;i>h;h++){var j=e[h],k=g.call(this,a[j]);k&&y.isObservable(k)?b(k,j):c[j]=a[j]}return y.forkJoin.apply(y,f).map(function(){return c})}function j(a){var b=this;return new B(function(c){a.call(b,function(){var a=arguments[0],b=arguments[1];if(a)return c.onError(a);if(arguments.length>2){for(var d=[],e=1,f=arguments.length;f>e;e++)d.push(arguments[e]);b=d}c.onNext(b),c.onCompleted()})})}function k(a){return J(a.next)&&J(a["throw"])}function l(a){var b=a.constructor;return b?"GeneratorFunction"===b.name||"GeneratorFunction"===b.displayName?!0:k(b.prototype):!1}function m(a,b,c,d){var e=new C;return d.push(n(e,b,c)),a.apply(b,d),e.asObservable()}function n(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),g=0;d>g;g++)e[g]=arguments[g];if(J(c)){if(e=f(c).apply(b,e),e===K)return a.onError(e.e);a.onNext(e)}else e.length<=1?a.onNext(e[0]):a.onNext(e);a.onCompleted()}}function o(a,b,c,d){var e=new C;return d.push(p(e,b,c)),a.apply(b,d),e.asObservable()}function p(a,b,c){return function(){var d=arguments[0];if(d)return a.onError(d);for(var e=arguments.length,g=[],h=1;e>h;h++)g[h-1]=arguments[h];if(J(c)){var g=f(c).apply(b,g);if(g===K)return a.onError(g.e);a.onNext(g)}else g.length<=1?a.onNext(g[0]):a.onNext(g);a.onCompleted()}}function q(a){return window.StaticNodeList?a instanceof window.StaticNodeList||a instanceof window.NodeList:"[object NodeList]"==Object.prototype.toString.call(a)}function r(b){var c=function(){this.cancelBubble=!0},d=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(b||(b=a.event),!b.target)switch(b.target=b.target||b.srcElement,"mouseover"==b.type&&(b.relatedTarget=b.fromElement),"mouseout"==b.type&&(b.relatedTarget=b.toElement),b.stopPropagation||(b.stopPropagation=c,b.preventDefault=d),b.type){case"keypress":var e="charCode"in b?b.charCode:b.keyCode;10==e?(e=0,b.keyCode=13):13==e||27==e?e=0:3==e&&(e=99),b.charCode=e,b.keyChar=b.charCode?String.fromCharCode(b.charCode):""}return b}function s(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function t(a,b,c){this._e=a,this._n="on"+b,this._fn=function(a){c(r(a))},this._e.attachEvent(this._n,this._fn),this.isDisposed=!1}function u(a,b,c){this._e=a,this._n="on"+b,this._e[this._n]=c,this.isDisposed=!1}function v(a,b,c){return a.addEventListener?new s(a,b,c):a.attachEvent?new t(a,b,c):u(a,b,c)}function w(a,b,c){var d=new E;if(q(a)||"[object HTMLCollection]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(w(a.item(e),b,c));else a&&d.add(v(a,b,c));return d}var x,y=c.Observable,z=(y.prototype,y.fromPromise),A=y.throwError,B=c.AnonymousObservable,C=c.AsyncSubject,D=c.Disposable.create,E=c.CompositeDisposable,F=c.Scheduler.immediate,G=c.Scheduler["default"],H=c.Scheduler.isScheduler,I=c.helpers.isPromise,J=c.helpers.isFunction,K={e:{}};y.wrap=function(a){function b(){return y.spawn.call(this,a.apply(this,arguments))}return b.__generatorFunction__=a,b};var L=y.spawn=function(){for(var a=arguments[0],b=this,c=[],d=1,e=arguments.length;e>d;d++)c.push(arguments[d]);return new B(function(d){function e(b){var c=f(a.next).call(a,b);return c===K?d.onError(c.e):void i(c)}function h(b){var c=f(a.next).call(a,b);return c===K?d.onError(c.e):void i(c)}function i(a){if(a.done)return d.onNext(a.value),void d.onCompleted();var c=g.call(b,a.value);y.isObservable(c)?j.add(c.subscribe(e,h)):h(new TypeError("type not supported"))}var j=new E;return J(a)&&(a=a.apply(b,c)),a&&J(a.next)?(e(),j):(d.onNext(a),d.onCompleted())})};y.start=function(a,b,c){return M(a,b,c)()};var M=y.toAsync=function(a,b,c){return H(c)||(c=G),function(){var d=arguments,e=new C;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};y.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return m(a,b,c,e)}},y.fromNodeCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return o(a,b,c,e)}},s.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},t.prototype.dispose=function(){this.isDisposed||(this._e.detachEvent(this._n,this._fn),this.isDisposed=!0)},u.prototype.dispose=function(){this.isDisposed||(this._e[this._n]=null,this.isDisposed=!0)},c.config.useNativeEvents=!1,y.fromEvent=function(a,b,d){return a.addListener?N(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d):c.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new B(function(c){return w(a,b,function(){var a=arguments[0];return J(d)&&(a=f(d).apply(null,arguments),a===K)?c.onError(a.e):void c.onNext(a)})}).publish().refCount():N(function(c){a.on(b,c)},function(c){a.off(b,c)},d)};var N=y.fromEventPattern=function(a,b,c,d){return H(d)||(d=F),new B(function(d){function e(){var a=arguments[0];return J(c)&&(a=f(c).apply(null,arguments),a===K)?d.onError(a.e):void d.onNext(a)}var g=a(e);return D(function(){J(b)&&b(e,g)})}).publish().refCount()};return y.startAsync=function(a){var b;try{b=a()}catch(c){return A(c)}return z(b)},c});
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.binding","exports"],function(b,c){return h.Rx=a(h,c,b),h.Rx}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return I.e=b,I}}}function f(a){return a?w.isObservable(a)?a:G(a)?w.fromPromise(a):k(a)||j(a)?K.call(this,a):H(a)?i.call(this,a):isArrayLike(a)||isIterable(a)?g.call(this,a):isObject(a)?h.call(this,a):a:a}function g(a){return w.from(a).flatMap(f).toArray()}function h(a){function b(a,b){c[b]=d,g.push(a.map(function(a){c[b]=a}))}for(var c=new a.constructor,e=Object.keys(a),g=[],h=0,i=e.length;i>h;h++){var j=e[h],k=f.call(this,a[j]);k&&w.isObservable(k)?b(k,j):c[j]=a[j]}return w.forkJoin.apply(w,g).map(function(){return c})}function i(a){var b=this;return new z(function(c){a.call(b,function(){var a=arguments[0],b=arguments[1];if(a)return c.onError(a);if(arguments.length>2){for(var d=[],e=1,f=arguments.length;f>e;e++)d.push(arguments[e]);b=d}c.onNext(b),c.onCompleted()})})}function j(a){return H(a.next)&&H(a["throw"])}function k(a){var b=a.constructor;return b?"GeneratorFunction"===b.name||"GeneratorFunction"===b.displayName?!0:j(b.prototype):!1}function l(a,b,c,d){var e=new A;return d.push(m(e,b,c)),a.apply(b,d),e.asObservable()}function m(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];if(H(c)){if(e=J(c).apply(b,e),e===I)return a.onError(e.e);a.onNext(e)}else e.length<=1?a.onNext(e[0]):a.onNext(e);a.onCompleted()}}function n(a,b,c,d){var e=new A;return d.push(o(e,b,c)),a.apply(b,d),e.asObservable()}function o(a,b,c){return function(){var d=arguments[0];if(d)return a.onError(d);for(var e=arguments.length,f=[],g=1;e>g;g++)f[g-1]=arguments[g];if(H(c)){var f=J(c).apply(b,f);if(f===I)return a.onError(f.e);a.onNext(f)}else f.length<=1?a.onNext(f[0]):a.onNext(f);a.onCompleted()}}function p(a){return window.StaticNodeList?a instanceof window.StaticNodeList||a instanceof window.NodeList:"[object NodeList]"==Object.prototype.toString.call(a)}function q(b){var c=function(){this.cancelBubble=!0},d=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(b||(b=a.event),!b.target)switch(b.target=b.target||b.srcElement,"mouseover"==b.type&&(b.relatedTarget=b.fromElement),"mouseout"==b.type&&(b.relatedTarget=b.toElement),b.stopPropagation||(b.stopPropagation=c,b.preventDefault=d),b.type){case"keypress":var e="charCode"in b?b.charCode:b.keyCode;10==e?(e=0,b.keyCode=13):13==e||27==e?e=0:3==e&&(e=99),b.charCode=e,b.keyChar=b.charCode?String.fromCharCode(b.charCode):""}return b}function r(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function s(a,b,c){this._e=a,this._n="on"+b,this._fn=function(a){c(q(a))},this._e.attachEvent(this._n,this._fn),this.isDisposed=!1}function t(a,b,c){this._e=a,this._n="on"+b,this._e[this._n]=c,this.isDisposed=!1}function u(a,b,c){return a.addEventListener?new r(a,b,c):a.attachEvent?new s(a,b,c):t(a,b,c)}function v(a,b,c){var d=new C;if(p(a)||"[object HTMLCollection]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(v(a.item(e),b,c));else a&&d.add(u(a,b,c));return d}var w=c.Observable,x=(w.prototype,w.fromPromise),y=w.throwError,z=c.AnonymousObservable,A=c.AsyncSubject,B=c.Disposable.create,C=c.CompositeDisposable,D=c.Scheduler.immediate,E=c.Scheduler["default"],F=c.Scheduler.isScheduler,G=c.helpers.isPromise,H=c.helpers.isFunction,I={e:{}},J=c.internals.tryCatch=function(a){if(!H(a))throw new TypeError("fn must be a function");return e(a)};w.wrap=function(a){function b(){return w.spawn.call(this,a.apply(this,arguments))}return b.__generatorFunction__=a,b};var K=w.spawn=function(){for(var a=arguments[0],b=this,c=[],d=1,e=arguments.length;e>d;d++)c.push(arguments[d]);return new z(function(d){function e(b){var c=J(a.next).call(a,b);return c===I?d.onError(c.e):void h(c)}function g(b){var c=J(a.next).call(a,b);return c===I?d.onError(c.e):void h(c)}function h(a){if(a.done)return d.onNext(a.value),void d.onCompleted();var c=f.call(b,a.value);w.isObservable(c)?i.add(c.subscribe(e,g)):g(new TypeError("type not supported"))}var i=new C;return H(a)&&(a=a.apply(b,c)),a&&H(a.next)?(e(),i):(d.onNext(a),d.onCompleted())})};w.start=function(a,b,c){return L(a,b,c)()};var L=w.toAsync=function(a,b,c){return F(c)||(c=E),function(){var d=arguments,e=new A;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};w.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return l(a,b,c,e)}},w.fromNodeCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return n(a,b,c,e)}},r.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},s.prototype.dispose=function(){this.isDisposed||(this._e.detachEvent(this._n,this._fn),this.isDisposed=!0)},t.prototype.dispose=function(){this.isDisposed||(this._e[this._n]=null,this.isDisposed=!0)},c.config.useNativeEvents=!1,w.fromEvent=function(a,b,d){return a.addListener?M(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d):c.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new z(function(c){return v(a,b,function(){var a=arguments[0];return H(d)&&(a=J(d).apply(null,arguments),a===I)?c.onError(a.e):void c.onNext(a)})}).publish().refCount():M(function(c){a.on(b,c)},function(c){a.off(b,c)},d)};var M=w.fromEventPattern=function(a,b,c,d){return F(d)||(d=D),new z(function(d){function e(){var a=arguments[0];return H(c)&&(a=J(c).apply(null,arguments),a===I)?d.onError(a.e):void d.onNext(a)}var f=a(e);return B(function(){H(b)&&b(e,f)})}).publish().refCount()};return w.startAsync=function(a){var b;try{b=a()}catch(c){return y(c)}return x(b)},c});
//# sourceMappingURL=rx.async.compat.map

@@ -48,15 +48,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -63,0 +63,0 @@ function thrower(e) {

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.binding","exports"],function(b,c){return h.Rx=a(h,c,b),h.Rx}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(){try{return t.apply(this,arguments)}catch(a){return G.e=a,G}}function f(a){if(!F(a))throw new TypeError("fn must be a function");return t=a,e}function g(a){return a?u.isObservable(a)?a:E(a)?u.fromPromise(a):l(a)||k(a)?H.call(this,a):F(a)?j.call(this,a):isArrayLike(a)||isIterable(a)?h.call(this,a):isObject(a)?i.call(this,a):a:a}function h(a){return u.from(a).flatMap(g).toArray()}function i(a){function b(a,b){c[b]=d,f.push(a.map(function(a){c[b]=a}))}for(var c=new a.constructor,e=Object.keys(a),f=[],h=0,i=e.length;i>h;h++){var j=e[h],k=g.call(this,a[j]);k&&u.isObservable(k)?b(k,j):c[j]=a[j]}return u.forkJoin.apply(u,f).map(function(){return c})}function j(a){var b=this;return new x(function(c){a.call(b,function(){var a=arguments[0],b=arguments[1];if(a)return c.onError(a);if(arguments.length>2){for(var d=[],e=1,f=arguments.length;f>e;e++)d.push(arguments[e]);b=d}c.onNext(b),c.onCompleted()})})}function k(a){return F(a.next)&&F(a["throw"])}function l(a){var b=a.constructor;return b?"GeneratorFunction"===b.name||"GeneratorFunction"===b.displayName?!0:k(b.prototype):!1}function m(a,b,c,d){var e=new y;return d.push(n(e,b,c)),a.apply(b,d),e.asObservable()}function n(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),g=0;d>g;g++)e[g]=arguments[g];if(F(c)){if(e=f(c).apply(b,e),e===G)return a.onError(e.e);a.onNext(e)}else e.length<=1?a.onNext(e[0]):a.onNext(e);a.onCompleted()}}function o(a,b,c,d){var e=new y;return d.push(p(e,b,c)),a.apply(b,d),e.asObservable()}function p(a,b,c){return function(){var d=arguments[0];if(d)return a.onError(d);for(var e=arguments.length,g=[],h=1;e>h;h++)g[h-1]=arguments[h];if(F(c)){var g=f(c).apply(b,g);if(g===G)return a.onError(g.e);a.onNext(g)}else g.length<=1?a.onNext(g[0]):a.onNext(g);a.onCompleted()}}function q(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function r(a,b,c){var d=new A,e=Object.prototype.toString.call(a);if("[object NodeList]"===e||"[object HTMLCollection]"===e)for(var f=0,g=a.length;g>f;f++)d.add(r(a.item(f),b,c));else a&&d.add(new q(a,b,c));return d}function s(a,b){return function(){var c=arguments[0];return F(b)&&(c=f(b).apply(null,arguments),c===G)?a.onError(c.e):void a.onNext(c)}}var t,u=c.Observable,v=(u.prototype,u.fromPromise),w=u.throwError,x=c.AnonymousObservable,y=c.AsyncSubject,z=c.Disposable.create,A=c.CompositeDisposable,B=c.Scheduler.immediate,C=c.Scheduler["default"],D=c.Scheduler.isScheduler,E=c.helpers.isPromise,F=c.helpers.isFunction,G={e:{}};u.wrap=function(a){function b(){return u.spawn.call(this,a.apply(this,arguments))}return b.__generatorFunction__=a,b};var H=u.spawn=function(){for(var a=arguments[0],b=this,c=[],d=1,e=arguments.length;e>d;d++)c.push(arguments[d]);return new x(function(d){function e(b){var c=f(a.next).call(a,b);return c===G?d.onError(c.e):void i(c)}function h(b){var c=f(a.next).call(a,b);return c===G?d.onError(c.e):void i(c)}function i(a){if(a.done)return d.onNext(a.value),void d.onCompleted();var c=g.call(b,a.value);u.isObservable(c)?j.add(c.subscribe(e,h)):h(new TypeError("type not supported"))}var j=new A;return F(a)&&(a=a.apply(b,c)),a&&F(a.next)?(e(),j):(d.onNext(a),d.onCompleted())})};u.start=function(a,b,c){return I(a,b,c)()};var I=u.toAsync=function(a,b,c){return D(c)||(c=C),function(){var d=arguments,e=new y;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};u.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return m(a,b,c,e)}},u.fromNodeCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return o(a,b,c,e)}},q.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},c.config.useNativeEvents=!1,u.fromEvent=function(a,b,d){return a.addListener?J(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d):c.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new x(function(c){return r(a,b,s(c,d))}).publish().refCount():J(function(c){a.on(b,c)},function(c){a.off(b,c)},d)};var J=u.fromEventPattern=function(a,b,c,d){return D(d)||(d=B),new x(function(d){function e(){var a=arguments[0];return F(c)&&(a=f(c).apply(null,arguments),a===G)?d.onError(a.e):void d.onNext(a)}var g=a(e);return z(function(){F(b)&&b(e,g)})}).publish().refCount()};return u.startAsync=function(a){var b;try{b=a()}catch(c){return w(c)}return v(b)},c});
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.binding","exports"],function(b,c){return h.Rx=a(h,c,b),h.Rx}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return E.e=b,E}}}function f(a){return a?s.isObservable(a)?a:C(a)?s.fromPromise(a):k(a)||j(a)?G.call(this,a):D(a)?i.call(this,a):isArrayLike(a)||isIterable(a)?g.call(this,a):isObject(a)?h.call(this,a):a:a}function g(a){return s.from(a).flatMap(f).toArray()}function h(a){function b(a,b){c[b]=d,g.push(a.map(function(a){c[b]=a}))}for(var c=new a.constructor,e=Object.keys(a),g=[],h=0,i=e.length;i>h;h++){var j=e[h],k=f.call(this,a[j]);k&&s.isObservable(k)?b(k,j):c[j]=a[j]}return s.forkJoin.apply(s,g).map(function(){return c})}function i(a){var b=this;return new v(function(c){a.call(b,function(){var a=arguments[0],b=arguments[1];if(a)return c.onError(a);if(arguments.length>2){for(var d=[],e=1,f=arguments.length;f>e;e++)d.push(arguments[e]);b=d}c.onNext(b),c.onCompleted()})})}function j(a){return D(a.next)&&D(a["throw"])}function k(a){var b=a.constructor;return b?"GeneratorFunction"===b.name||"GeneratorFunction"===b.displayName?!0:j(b.prototype):!1}function l(a,b,c,d){var e=new w;return d.push(m(e,b,c)),a.apply(b,d),e.asObservable()}function m(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];if(D(c)){if(e=F(c).apply(b,e),e===E)return a.onError(e.e);a.onNext(e)}else e.length<=1?a.onNext(e[0]):a.onNext(e);a.onCompleted()}}function n(a,b,c,d){var e=new w;return d.push(o(e,b,c)),a.apply(b,d),e.asObservable()}function o(a,b,c){return function(){var d=arguments[0];if(d)return a.onError(d);for(var e=arguments.length,f=[],g=1;e>g;g++)f[g-1]=arguments[g];if(D(c)){var f=F(c).apply(b,f);if(f===E)return a.onError(f.e);a.onNext(f)}else f.length<=1?a.onNext(f[0]):a.onNext(f);a.onCompleted()}}function p(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function q(a,b,c){var d=new y,e=Object.prototype.toString.call(a);if("[object NodeList]"===e||"[object HTMLCollection]"===e)for(var f=0,g=a.length;g>f;f++)d.add(q(a.item(f),b,c));else a&&d.add(new p(a,b,c));return d}function r(a,b){return function(){var c=arguments[0];return D(b)&&(c=F(b).apply(null,arguments),c===E)?a.onError(c.e):void a.onNext(c)}}var s=c.Observable,t=(s.prototype,s.fromPromise),u=s.throwError,v=c.AnonymousObservable,w=c.AsyncSubject,x=c.Disposable.create,y=c.CompositeDisposable,z=c.Scheduler.immediate,A=c.Scheduler["default"],B=c.Scheduler.isScheduler,C=c.helpers.isPromise,D=c.helpers.isFunction,E={e:{}},F=c.internals.tryCatch=function(a){if(!D(a))throw new TypeError("fn must be a function");return e(a)};s.wrap=function(a){function b(){return s.spawn.call(this,a.apply(this,arguments))}return b.__generatorFunction__=a,b};var G=s.spawn=function(){for(var a=arguments[0],b=this,c=[],d=1,e=arguments.length;e>d;d++)c.push(arguments[d]);return new v(function(d){function e(b){var c=F(a.next).call(a,b);return c===E?d.onError(c.e):void h(c)}function g(b){var c=F(a.next).call(a,b);return c===E?d.onError(c.e):void h(c)}function h(a){if(a.done)return d.onNext(a.value),void d.onCompleted();var c=f.call(b,a.value);s.isObservable(c)?i.add(c.subscribe(e,g)):g(new TypeError("type not supported"))}var i=new y;return D(a)&&(a=a.apply(b,c)),a&&D(a.next)?(e(),i):(d.onNext(a),d.onCompleted())})};s.start=function(a,b,c){return H(a,b,c)()};var H=s.toAsync=function(a,b,c){return B(c)||(c=A),function(){var d=arguments,e=new w;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};s.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return l(a,b,c,e)}},s.fromNodeCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return n(a,b,c,e)}},p.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},c.config.useNativeEvents=!1,s.fromEvent=function(a,b,d){return a.addListener?I(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d):c.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new v(function(c){return q(a,b,r(c,d))}).publish().refCount():I(function(c){a.on(b,c)},function(c){a.off(b,c)},d)};var I=s.fromEventPattern=function(a,b,c,d){return B(d)||(d=z),new v(function(d){function e(){var a=arguments[0];return D(c)&&(a=F(c).apply(null,arguments),a===E)?d.onError(a.e):void d.onNext(a)}var f=a(e);return x(function(){D(b)&&b(e,f)})}).publish().refCount()};return s.startAsync=function(a){var b;try{b=a()}catch(c){return u(c)}return t(b)},c});
//# sourceMappingURL=rx.async.map

@@ -52,15 +52,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -67,0 +67,0 @@ function thrower(e) {

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(){try{return h.apply(this,arguments)}catch(a){return z.e=a,z}}function f(a){if(!y(a))throw new TypeError("fn must be a function");return h=a,e}function g(a,b,c){return new k(function(d){function e(a,b){if(k[b]=a,h[b]=!0,i||(i=h.every(w))){if(g)return d.onError(g);var e=f(c).apply(null,k);if(e===z)return d.onError(e.e);d.onNext(e)}j&&k[1]&&d.onCompleted()}var g,h=[!1,!1],i=!1,j=!1,k=new Array(2);return new m(a.subscribe(function(a){e(a,0)},function(a){k[1]?d.onError(a):g=a},function(){j=!0,k[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){j=!0,e(!0,1)}))},a)}var h,i=c.Observable,j=i.prototype,k=c.AnonymousObservable,l=c.internals.AbstractObserver,m=c.CompositeDisposable,n=c.Notification,o=c.Subject,p=c.Observer,q=c.Disposable.empty,r=c.Disposable.create,s=c.internals.inherits,t=c.internals.addProperties,u=c.Scheduler.timeout,v=c.Scheduler.currentThread,w=c.helpers.identity,x=c.Scheduler.isScheduler,y=c.helpers.isFunction,z=(c.Disposable.checkDisposed,{e:{}});c.Pauser=function(a){function b(){a.call(this)}return s(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(o);var A=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=q,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=q)});return new m(c,d,e)}function c(c,d){this.source=c,this.controller=new o,d&&d.subscribe?this.pauser=this.controller.merge(d):this.pauser=this.controller,a.call(this,b,c)}return s(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(i);j.pausable=function(a){return new A(this,a)};var B=function(a){function b(a){function b(){for(;e.length>0;)a.onNext(e.shift())}var c,e=[],f=g(this.source,this.pauser.startWith(!1).distinctUntilChanged(),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(f){c!==d&&f.shouldFire!=c?(c=f.shouldFire,f.shouldFire&&b()):(c=f.shouldFire,f.shouldFire?a.onNext(f.data):e.push(f.data))},function(c){b(),a.onError(c)},function(){b(),a.onCompleted()});return f}function c(c,d){this.source=c,this.controller=new o,d&&d.subscribe?this.pauser=this.controller.merge(d):this.pauser=this.controller,a.call(this,b,c)}return s(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(i);j.pausableBuffered=function(a){return new B(this,a)};var C=function(a){function b(a){return this.source.subscribe(a)}function c(c,d,e){a.call(this,b,c),this.subject=new D(d,e),this.source=c.multicast(this.subject).refCount()}return s(c,a),c.prototype.request=function(a){return this.subject.request(null==a?-1:a)},c}(i),D=function(a){function b(a){return this.subject.subscribe(a)}function c(c,d){null==c&&(c=!0),a.call(this,b),this.subject=new o,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=null,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=d||v}return s(c,a),t(c.prototype,p,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(n.createOnCompleted()):(this.subject.onCompleted(),this.disposeCurrentRequest())},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(n.createOnError(a)):(this.subject.onError(a),this.disposeCurrentRequest())},onNext:function(a){this.requestedCount<=0?this.enableQueue&&this.queue.push(n.createOnNext(a)):(0===this.requestedCount--&&this.disposeCurrentRequest(),this.subject.onNext(a))},_processRequest:function(a){if(this.enableQueue)for(;this.queue.length>0&&(a>0||"N"!==this.queue[0].kind);){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return a},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.scheduleWithState(a,function(a,c){var d=b._processRequest(c),e=b.hasCompleted||b.hasFailed;return!e&&d>0?(b.requestedCount=d,r(function(){b.requestedCount=0})):void 0}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable&&(this.requestedDisposable.dispose(),this.requestedDisposable=null)}}),c}(i);j.controlled=function(a,b){return a&&x(a)&&(b=a,a=!0),null==a&&(a=!0),new C(this,a,b)};var E=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return u.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}s(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}s(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;u.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(l);return c}(i);C.prototype.stopAndWait=function(){return new E(this)};var F=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return u.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}s(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}s(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;u.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(l);return c}(i);return C.prototype.windowed=function(a){return new F(this,a)},j.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a},c});
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return x.e=b,x}}}function f(a,b,c){return new i(function(d){function e(a,b){if(j[b]=a,g[b]=!0,h||(h=g.every(u))){if(f)return d.onError(f);var e=y(c).apply(null,j);if(e===x)return d.onError(e.e);d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new k(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var g=c.Observable,h=g.prototype,i=c.AnonymousObservable,j=c.internals.AbstractObserver,k=c.CompositeDisposable,l=c.Notification,m=c.Subject,n=c.Observer,o=c.Disposable.empty,p=c.Disposable.create,q=c.internals.inherits,r=c.internals.addProperties,s=c.Scheduler.timeout,t=c.Scheduler.currentThread,u=c.helpers.identity,v=c.Scheduler.isScheduler,w=c.helpers.isFunction,x=(c.Disposable.checkDisposed,{e:{}}),y=c.internals.tryCatch=function(a){if(!w(a))throw new TypeError("fn must be a function");return e(a)};c.Pauser=function(a){function b(){a.call(this)}return q(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(m);var z=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=o,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=o)});return new k(c,d,e)}function c(c,d){this.source=c,this.controller=new m,d&&d.subscribe?this.pauser=this.controller.merge(d):this.pauser=this.controller,a.call(this,b,c)}return q(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(g);h.pausable=function(a){return new z(this,a)};var A=function(a){function b(a){function b(){for(;e.length>0;)a.onNext(e.shift())}var c,e=[],g=f(this.source,this.pauser.startWith(!1).distinctUntilChanged(),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(f){c!==d&&f.shouldFire!=c?(c=f.shouldFire,f.shouldFire&&b()):(c=f.shouldFire,f.shouldFire?a.onNext(f.data):e.push(f.data))},function(c){b(),a.onError(c)},function(){b(),a.onCompleted()});return g}function c(c,d){this.source=c,this.controller=new m,d&&d.subscribe?this.pauser=this.controller.merge(d):this.pauser=this.controller,a.call(this,b,c)}return q(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(g);h.pausableBuffered=function(a){return new A(this,a)};var B=function(a){function b(a){return this.source.subscribe(a)}function c(c,d,e){a.call(this,b,c),this.subject=new C(d,e),this.source=c.multicast(this.subject).refCount()}return q(c,a),c.prototype.request=function(a){return this.subject.request(null==a?-1:a)},c}(g),C=function(a){function b(a){return this.subject.subscribe(a)}function c(c,d){null==c&&(c=!0),a.call(this,b),this.subject=new m,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=null,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=d||t}return q(c,a),r(c.prototype,n,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(l.createOnCompleted()):(this.subject.onCompleted(),this.disposeCurrentRequest())},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(l.createOnError(a)):(this.subject.onError(a),this.disposeCurrentRequest())},onNext:function(a){this.requestedCount<=0?this.enableQueue&&this.queue.push(l.createOnNext(a)):(0===this.requestedCount--&&this.disposeCurrentRequest(),this.subject.onNext(a))},_processRequest:function(a){if(this.enableQueue)for(;this.queue.length>0&&(a>0||"N"!==this.queue[0].kind);){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return a},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.scheduleWithState(a,function(a,c){var d=b._processRequest(c),e=b.hasCompleted||b.hasFailed;return!e&&d>0?(b.requestedCount=d,p(function(){b.requestedCount=0})):void 0}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable&&(this.requestedDisposable.dispose(),this.requestedDisposable=null)}}),c}(g);h.controlled=function(a,b){return a&&v(a)&&(b=a,a=!0),null==a&&(a=!0),new B(this,a,b)};var D=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return s.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}q(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}q(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;s.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(j);return c}(g);B.prototype.stopAndWait=function(){return new D(this)};var E=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return s.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}q(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}q(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;s.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(j);return c}(g);return B.prototype.windowed=function(a){return new E(this,a)},h.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a},c});
//# sourceMappingURL=rx.backpressure.map

@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

@@ -54,15 +54,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -69,0 +69,0 @@ function thrower(e) {

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(){try{return k.apply(this,arguments)}catch(a){return B.e=a,B}}function f(a){if(!z(a))throw new TypeError("fn must be a function");return k=a,e}function g(a){return a.toArray()}function h(a,b){return a.groupJoin(this,b,s,function(a,b){return b})}function i(a){var b=this;return new u(function(c){var d=new q,e=new m,f=new n(e);return c.onNext(v(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),y(a)&&(a=A(a)),e.add(a.subscribe(function(a){d.onCompleted(),d=new q,c.onNext(v(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function j(a){var b=this;return new u(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}y(b)&&(b=A(b));var i=new o;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(x,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new q,c.onNext(v(h,g)),d()}))}var e=new p,f=new m(e),g=new n(f),h=new q;return c.onNext(v(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}var k,l=c.Observable,m=c.CompositeDisposable,n=c.RefCountDisposable,o=c.SingleAssignmentDisposable,p=c.SerialDisposable,q=c.Subject,r=l.prototype,s=l.empty,t=l.never,u=c.AnonymousObservable,v=(c.Observer.create,c.internals.addRef),w=(c.internals.isEqual,c.internals.inherits),x=c.helpers.noop,y=(c.helpers.identity,c.helpers.isPromise),z=c.helpers.isFunction,A=(c.internals.bindCallback,l.fromPromise),B=(c.ArgumentOutOfRangeError,{e:{}}),C=a.Map||function(){function a(){this.size=0,this._values=[],this._keys=[]}return a.prototype["delete"]=function(a){var b=this._keys.indexOf(a);return-1===b?!1:(this._values.splice(b,1),this._keys.splice(b,1),this.size--,!0)},a.prototype.get=function(a){var b=this._keys.indexOf(a);return-1===b?d:this._values[b]},a.prototype.set=function(a,b){var c=this._keys.indexOf(a);return-1===c?(this._keys.push(a),this._values.push(b),this.size++):this._values[c]=b,this},a.prototype.forEach=function(a,b){for(var c=0;c<this.size;c++)a.call(b,this._values[c],this._keys[c])},a}();r.join=function(a,b,c,d){var e=this;return new u(function(g){var h=new m,i=!1,j=!1,k=0,l=0,n=new C,p=new C,q=function(a){g.onError(a)};return h.add(e.subscribe(function(a){var c=k++,e=new o;n.set(c,a),h.add(e);var j=f(b)(a);return j===B?g.onError(j.e):(e.setDisposable(j.take(1).subscribe(x,q,function(){n["delete"](c)&&0===n.size&&i&&g.onCompleted(),h.remove(e)})),void p.forEach(function(b){var c=f(d)(a,b);return c===B?g.onError(c.e):void g.onNext(c)}))},q,function(){i=!0,(j||0===n.size)&&g.onCompleted()})),h.add(a.subscribe(function(a){var b=l++,e=new o;p.set(b,a),h.add(e);var i=f(c)(a);return i===B?g.onError(i.e):(e.setDisposable(i.take(1).subscribe(x,q,function(){p["delete"](b)&&0===p.size&&j&&g.onCompleted(),h.remove(e)})),void n.forEach(function(b){var c=f(d)(b,a);return c===B?g.onError(c.e):void g.onNext(c)}))},q,function(){j=!0,(i||0===p.size)&&g.onCompleted()})),h},e)},r.groupJoin=function(a,b,c,d){var e=this;return new u(function(g){function h(a){}var i=new m,j=new n(i),k=new C,l=new C,p=0,r=0,h=function(a){return function(b){b.onError(a)}};return i.add(e.subscribe(function(a){var c=new q,e=p++;k.set(e,c);var m=f(d)(a,v(c,j));if(m===B)return k.forEach(h(m.e)),g.onError(m.e);g.onNext(m),l.forEach(function(a){c.onNext(a)});var n=new o;i.add(n);var r=f(b)(a);return r===B?(k.forEach(h(r.e)),g.onError(r.e)):void n.setDisposable(r.take(1).subscribe(x,function(a){k.forEach(h(a)),g.onError(a)},function(){k["delete"](e)&&c.onCompleted(),i.remove(n)}))},function(a){k.forEach(h(a)),g.onError(a)},function(){g.onCompleted()})),i.add(a.subscribe(function(a){var b=r++;l.set(b,a);var d=new o;i.add(d);var e=f(c)(a);return e===B?(k.forEach(h(e.e)),g.onError(e.e)):(d.setDisposable(e.take(1).subscribe(x,function(a){k.forEach(h(a)),g.onError(a)},function(){l["delete"](b),i.remove(d)})),void k.forEach(function(b){b.onNext(a)}))},function(a){k.forEach(h(a)),g.onError(a)})),j},e)},r.buffer=function(){return this.window.apply(this,arguments).flatMap(g)},r.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?i.call(this,a):"function"==typeof a?j.call(this,a):h.call(this,a,b)},r.pairwise=function(){var a=this;return new u(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))},a)},r.partition=function(a,b){return[this.filter(a,b),this.filter(function(c,d,e){return!a.call(b,c,d,e)})]},r.groupBy=function(a,b){return this.groupByUntil(a,b,t)},r.groupByUntil=function(a,b,c){var e=this;return new u(function(g){var h=new C,i=new m,j=new n(i),k=function(a){return function(b){b.onError(a)}};return i.add(e.subscribe(function(e){var l=f(a)(e);if(l===B)return h.forEach(k(l.e)),g.onError(l.e);var m=!1,n=h.get(l);if(n===d&&(n=new q,h.set(l,n),m=!0),m){var p=new D(l,n,j),r=new D(l,n),s=f(c)(r);if(s===B)return h.forEach(k(s.e)),g.onError(s.e);g.onNext(p);var t=new o;i.add(t),t.setDisposable(s.take(1).subscribe(x,function(a){h.forEach(k(a)),g.onError(a)},function(){h["delete"](l)&&n.onCompleted(),i.remove(t)}))}var u=e;return z(b)&&(u=f(b)(e),u===B)?(h.forEach(k(u.e)),g.onError(u.e)):void n.onNext(u)},function(a){h.forEach(k(a)),g.onError(a)},function(){h.forEach(function(a){a.onCompleted()}),g.onCompleted()})),j},e)};var D=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new u(function(a){return new m(e.getDisposable(),d.subscribe(a))}):d}return w(c,a),c}(l);return c});
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return z.e=b,z}}}function f(a){return a.toArray()}function g(a,b){return a.groupJoin(this,b,q,function(a,b){return b})}function h(a){var b=this;return new s(function(c){var d=new o,e=new k,f=new l(e);return c.onNext(t(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),w(a)&&(a=y(a)),e.add(a.subscribe(function(a){d.onCompleted(),d=new o,c.onNext(t(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function i(a){var b=this;return new s(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}w(b)&&(b=y(b));var i=new m;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(v,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new o,c.onNext(t(h,g)),d()}))}var e=new n,f=new k(e),g=new l(f),h=new o;return c.onNext(t(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}var j=c.Observable,k=c.CompositeDisposable,l=c.RefCountDisposable,m=c.SingleAssignmentDisposable,n=c.SerialDisposable,o=c.Subject,p=j.prototype,q=j.empty,r=j.never,s=c.AnonymousObservable,t=(c.Observer.create,c.internals.addRef),u=(c.internals.isEqual,c.internals.inherits),v=c.helpers.noop,w=(c.helpers.identity,c.helpers.isPromise),x=c.helpers.isFunction,y=(c.internals.bindCallback,j.fromPromise),z=(c.ArgumentOutOfRangeError,{e:{}}),A=c.internals.tryCatch=function(a){if(!x(a))throw new TypeError("fn must be a function");return e(a)},B=a.Map||function(){function a(){this.size=0,this._values=[],this._keys=[]}return a.prototype["delete"]=function(a){var b=this._keys.indexOf(a);return-1===b?!1:(this._values.splice(b,1),this._keys.splice(b,1),this.size--,!0)},a.prototype.get=function(a){var b=this._keys.indexOf(a);return-1===b?d:this._values[b]},a.prototype.set=function(a,b){var c=this._keys.indexOf(a);return-1===c?(this._keys.push(a),this._values.push(b),this.size++):this._values[c]=b,this},a.prototype.forEach=function(a,b){for(var c=0;c<this.size;c++)a.call(b,this._values[c],this._keys[c])},a}();p.join=function(a,b,c,d){var e=this;return new s(function(f){var g=new k,h=!1,i=!1,j=0,l=0,n=new B,o=new B,p=function(a){f.onError(a)};return g.add(e.subscribe(function(a){var c=j++,e=new m;n.set(c,a),g.add(e);var i=A(b)(a);return i===z?f.onError(i.e):(e.setDisposable(i.take(1).subscribe(v,p,function(){n["delete"](c)&&0===n.size&&h&&f.onCompleted(),g.remove(e)})),void o.forEach(function(b){var c=A(d)(a,b);return c===z?f.onError(c.e):void f.onNext(c)}))},p,function(){h=!0,(i||0===n.size)&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=l++,e=new m;o.set(b,a),g.add(e);var h=A(c)(a);return h===z?f.onError(h.e):(e.setDisposable(h.take(1).subscribe(v,p,function(){o["delete"](b)&&0===o.size&&i&&f.onCompleted(),g.remove(e)})),void n.forEach(function(b){var c=A(d)(b,a);return c===z?f.onError(c.e):void f.onNext(c)}))},p,function(){i=!0,(h||0===o.size)&&f.onCompleted()})),g},e)},p.groupJoin=function(a,b,c,d){var e=this;return new s(function(f){function g(a){}var h=new k,i=new l(h),j=new B,n=new B,p=0,q=0,g=function(a){return function(b){b.onError(a)}};return h.add(e.subscribe(function(a){var c=new o,e=p++;j.set(e,c);var k=A(d)(a,t(c,i));if(k===z)return j.forEach(g(k.e)),f.onError(k.e);f.onNext(k),n.forEach(function(a){c.onNext(a)});var l=new m;h.add(l);var q=A(b)(a);return q===z?(j.forEach(g(q.e)),f.onError(q.e)):void l.setDisposable(q.take(1).subscribe(v,function(a){j.forEach(g(a)),f.onError(a)},function(){j["delete"](e)&&c.onCompleted(),h.remove(l)}))},function(a){j.forEach(g(a)),f.onError(a)},function(){f.onCompleted()})),h.add(a.subscribe(function(a){var b=q++;n.set(b,a);var d=new m;h.add(d);var e=A(c)(a);return e===z?(j.forEach(g(e.e)),f.onError(e.e)):(d.setDisposable(e.take(1).subscribe(v,function(a){j.forEach(g(a)),f.onError(a)},function(){n["delete"](b),h.remove(d)})),void j.forEach(function(b){b.onNext(a)}))},function(a){j.forEach(g(a)),f.onError(a)})),i},e)},p.buffer=function(){return this.window.apply(this,arguments).flatMap(f)},p.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?h.call(this,a):"function"==typeof a?i.call(this,a):g.call(this,a,b)},p.pairwise=function(){var a=this;return new s(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))},a)},p.partition=function(a,b){return[this.filter(a,b),this.filter(function(c,d,e){return!a.call(b,c,d,e)})]},p.groupBy=function(a,b){return this.groupByUntil(a,b,r)},p.groupByUntil=function(a,b,c){var e=this;return new s(function(f){var g=new B,h=new k,i=new l(h),j=function(a){return function(b){b.onError(a)}};return h.add(e.subscribe(function(e){var k=A(a)(e);if(k===z)return g.forEach(j(k.e)),f.onError(k.e);var l=!1,n=g.get(k);if(n===d&&(n=new o,g.set(k,n),l=!0),l){var p=new C(k,n,i),q=new C(k,n),r=A(c)(q);if(r===z)return g.forEach(j(r.e)),f.onError(r.e);f.onNext(p);var s=new m;h.add(s),s.setDisposable(r.take(1).subscribe(v,function(a){g.forEach(j(a)),f.onError(a)},function(){g["delete"](k)&&n.onCompleted(),h.remove(s)}))}var t=e;return x(b)&&(t=A(b)(e),t===z)?(g.forEach(j(t.e)),f.onError(t.e)):void n.onNext(t)},function(a){g.forEach(j(a)),f.onError(a)},function(){g.forEach(function(a){a.onCompleted()}),f.onCompleted()})),i},e)};var C=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new s(function(a){return new k(e.getDisposable(),d.subscribe(a))}):d}return u(c,a),c}(j);return c});
//# sourceMappingURL=rx.coincidence.map

@@ -54,15 +54,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -69,0 +69,0 @@ function thrower(e) {

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.core"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx.core")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function f(){try{return i.apply(this,arguments)}catch(a){return x.e=a,x}}function g(a){if(!t(a))throw new TypeError("fn must be a function");return i=a,f}function h(a){throw a}var i,j=c.Observable,k=j.prototype,l=c.AnonymousObservable,m=c.Observer,n=c.internals.AbstractObserver,o=c.Disposable.create,p=c.Disposable.empty,q=c.CompositeDisposable,r=c.SerialDisposable,s=c.Scheduler.currentThread,t=c.helpers.isFunction,u=c.internals.inherits,v=c.internals.addProperties,w=c.Disposable.checkDisposed,x={e:{}};k.multicast=function(a,b){var c=this;return"function"==typeof a?new l(function(d){var e=c.multicast(a());return new q(b(e).subscribe(d),e.connect())},c):new F(c,a)},k.publish=function(a){return a&&t(a)?this.multicast(function(){return new A},a):this.multicast(new A)},k.share=function(){return this.publish().refCount()},k.publishLast=function(a){return a&&t(a)?this.multicast(function(){return new C},a):this.multicast(new C)},k.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new D(b)},a):this.multicast(new D(a))},k.shareValue=function(a){return this.publishValue(a).refCount()},k.replay=function(a,b,c,d){return a&&t(a)?this.multicast(function(){return new E(b,c,d)},a):this.multicast(new E(b,c,d))},k.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var y=c.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new r}return u(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursiveWithState(this,function(a,b){var c;if(!(a.queue.length>0))return void(a.isAcquired=!1);c=a.queue.shift();var d=g(c)();return d===x?(a.queue=[],a.hasFaulted=!0,h(d.e)):void b(a)}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(n),z=function(a,b){this.subject=a,this.observer=b};z.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var A=c.Subject=function(a){function b(a){return w(this),this.isStopped?this.hasError?(a.onError(this.error),p):(a.onCompleted(),p):(this.observers.push(a),new z(this,a))}function c(){a.call(this,b),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return u(c,a),v(c.prototype,m.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(w(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=e(this.observers),c=b.length;c>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(w(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var b=0,c=e(this.observers),d=c.length;d>b;b++)c[b].onError(a);this.observers.length=0}},onNext:function(a){if(w(this),!this.isStopped)for(var b=0,c=e(this.observers),d=c.length;d>b;b++)c[b].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),c.create=function(a,b){return new B(a,b)},c}(j),B=c.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return u(c,a),v(c.prototype,m.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(j),C=c.AsyncSubject=function(a){function b(a){return w(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),p):(this.observers.push(a),new z(this,a))}function c(){a.call(this,b),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return u(c,a),v(c.prototype,m,{hasObservers:function(){return w(this),this.observers.length>0},onCompleted:function(){var a,b;if(w(this),!this.isStopped){this.isStopped=!0;var c=e(this.observers),b=c.length;if(this.hasValue)for(a=0;b>a;a++){var d=c[a];d.onNext(this.value),d.onCompleted()}else for(a=0;b>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(w(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var b=0,c=e(this.observers),d=c.length;d>b;b++)c[b].onError(a);this.observers.length=0}},onNext:function(a){w(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),c}(j),D=c.BehaviorSubject=function(a){function b(a){return w(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),p):(this.observers.push(a),a.onNext(this.value),new z(this,a))}function c(c){a.call(this,b),this.value=c,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return u(c,a),v(c.prototype,m,{getValue:function(){if(w(this),this.hasError)throw this.error;return this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(w(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=e(this.observers),c=b.length;c>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(w(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var b=0,c=e(this.observers),d=c.length;d>b;b++)c[b].onError(a);this.observers.length=0}},onNext:function(a){if(w(this),!this.isStopped){this.value=a;for(var b=0,c=e(this.observers),d=c.length;d>b;b++)c[b].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),c}(j),E=c.ReplaySubject=function(a){function b(a,b){return o(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function c(a){var c=new y(this.scheduler,a),d=b(this,c);w(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var e=0,f=this.q.length;f>e;e++)c.onNext(this.q[e].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),d}function d(b,d,e){this.bufferSize=null==b?f:b,this.windowSize=null==d?f:d,this.scheduler=e||s,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,c)}var f=Math.pow(2,53)-1;return u(d,a),v(d.prototype,m.prototype,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(w(this),!this.isStopped){var b=this.scheduler.now();this.q.push({interval:b,value:a}),this._trim(b);for(var c=0,d=e(this.observers),f=d.length;f>c;c++){var g=d[c];g.onNext(a),g.ensureActive()}}},onError:function(a){if(w(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var b=this.scheduler.now();this._trim(b);for(var c=0,d=e(this.observers),f=d.length;f>c;c++){var g=d[c];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(w(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var b=0,c=e(this.observers),d=c.length;d>b;b++){var f=c[b];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),d}(j),F=c.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new q(f.subscribe(c),o(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return u(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new l(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(j);return c});
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.core"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx.core")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function f(a){return function(){try{return a.apply(this,arguments)}catch(b){return v.e=b,v}}}function g(a){throw a}var h=c.Observable,i=h.prototype,j=c.AnonymousObservable,k=c.Observer,l=c.internals.AbstractObserver,m=c.Disposable.create,n=c.Disposable.empty,o=c.CompositeDisposable,p=c.SerialDisposable,q=c.Scheduler.currentThread,r=c.helpers.isFunction,s=c.internals.inherits,t=c.internals.addProperties,u=c.Disposable.checkDisposed,v={e:{}},w=c.internals.tryCatch=function(a){if(!r(a))throw new TypeError("fn must be a function");return f(a)};i.multicast=function(a,b){var c=this;return"function"==typeof a?new j(function(d){var e=c.multicast(a());return new o(b(e).subscribe(d),e.connect())},c):new E(c,a)},i.publish=function(a){return a&&r(a)?this.multicast(function(){return new z},a):this.multicast(new z)},i.share=function(){return this.publish().refCount()},i.publishLast=function(a){return a&&r(a)?this.multicast(function(){return new B},a):this.multicast(new B)},i.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new C(b)},a):this.multicast(new C(a))},i.shareValue=function(a){return this.publishValue(a).refCount()},i.replay=function(a,b,c,d){return a&&r(a)?this.multicast(function(){return new D(b,c,d)},a):this.multicast(new D(b,c,d))},i.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var x=c.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new p}return s(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursiveWithState(this,function(a,b){var c;if(!(a.queue.length>0))return void(a.isAcquired=!1);c=a.queue.shift();var d=w(c)();return d===v?(a.queue=[],a.hasFaulted=!0,g(d.e)):void b(a)}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(l),y=function(a,b){this.subject=a,this.observer=b};y.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var z=c.Subject=function(a){function b(a){return u(this),this.isStopped?this.hasError?(a.onError(this.error),n):(a.onCompleted(),n):(this.observers.push(a),new y(this,a))}function c(){a.call(this,b),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return s(c,a),t(c.prototype,k.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(u(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=e(this.observers),c=b.length;c>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(u(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var b=0,c=e(this.observers),d=c.length;d>b;b++)c[b].onError(a);this.observers.length=0}},onNext:function(a){if(u(this),!this.isStopped)for(var b=0,c=e(this.observers),d=c.length;d>b;b++)c[b].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),c.create=function(a,b){return new A(a,b)},c}(h),A=c.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return s(c,a),t(c.prototype,k.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(h),B=c.AsyncSubject=function(a){function b(a){return u(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),n):(this.observers.push(a),new y(this,a))}function c(){a.call(this,b),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return s(c,a),t(c.prototype,k,{hasObservers:function(){return u(this),this.observers.length>0},onCompleted:function(){var a,b;if(u(this),!this.isStopped){this.isStopped=!0;var c=e(this.observers),b=c.length;if(this.hasValue)for(a=0;b>a;a++){var d=c[a];d.onNext(this.value),d.onCompleted()}else for(a=0;b>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(u(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var b=0,c=e(this.observers),d=c.length;d>b;b++)c[b].onError(a);this.observers.length=0}},onNext:function(a){u(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),c}(h),C=c.BehaviorSubject=function(a){function b(a){return u(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),n):(this.observers.push(a),a.onNext(this.value),new y(this,a))}function c(c){a.call(this,b),this.value=c,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return s(c,a),t(c.prototype,k,{getValue:function(){if(u(this),this.hasError)throw this.error;return this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(u(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=e(this.observers),c=b.length;c>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(u(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var b=0,c=e(this.observers),d=c.length;d>b;b++)c[b].onError(a);this.observers.length=0}},onNext:function(a){if(u(this),!this.isStopped){this.value=a;for(var b=0,c=e(this.observers),d=c.length;d>b;b++)c[b].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),c}(h),D=c.ReplaySubject=function(a){function b(a,b){return m(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function c(a){var c=new x(this.scheduler,a),d=b(this,c);u(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var e=0,f=this.q.length;f>e;e++)c.onNext(this.q[e].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),d}function d(b,d,e){this.bufferSize=null==b?f:b,this.windowSize=null==d?f:d,this.scheduler=e||q,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,c)}var f=Math.pow(2,53)-1;return s(d,a),t(d.prototype,k.prototype,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(u(this),!this.isStopped){var b=this.scheduler.now();this.q.push({interval:b,value:a}),this._trim(b);for(var c=0,d=e(this.observers),f=d.length;f>c;c++){var g=d[c];g.onNext(a),g.ensureActive()}}},onError:function(a){if(u(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var b=this.scheduler.now();this._trim(b);for(var c=0,d=e(this.observers),f=d.length;f>c;c++){var g=d[c];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(u(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var b=0,c=e(this.observers),d=c.length;d>b;b++){var f=c[b];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),d}(h),E=c.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new o(f.subscribe(c),m(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return s(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new j(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(h);return c});
//# sourceMappingURL=rx.core.binding.map

@@ -70,15 +70,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -85,0 +85,0 @@ function thrower(e) {

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){function b(){try{return z.apply(this,arguments)}catch(a){return C.e=a,C}}function c(a){if(!isFunction(a))throw new TypeError("fn must be a function");return z=a,b}function d(a){throw a}function e(a,b){if(D&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(H)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var e=c.join("\n"+H+"\n");a.stack=f(e)}}function f(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var f=b[d];g(f)||h(f)||!f||c.push(f)}return c.join("\n")}function g(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===F&&d>=G&&ga>=d}function h(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function i(){if(D)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return F=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}var k={"function":!0,object:!0},l=k[typeof exports]&&exports&&!exports.nodeType&&exports,m=k[typeof self]&&self.Object&&self,n=k[typeof window]&&window&&window.Object&&window,o=k[typeof module]&&module&&!module.nodeType&&module,p=o&&o.exports===l&&l,q=l&&o&&"object"==typeof global&&global&&global.Object&&global,r=r=q||n!==(this&&this.window)&&n||m||this,s={internals:{},config:{Promise:r.Promise},helpers:{}},t=s.helpers.noop=function(){},u=s.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}(),v=s.helpers.defaultError=function(a){throw a},w=(s.helpers.isPromise=function(a){return!!a&&!isFunction(a.subscribe)&&isFunction(a.then)},s.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0});isFunction=s.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==toString.call(a)}),a}();var x=s.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};x.prototype=Error.prototype;var y=s.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};y.prototype=Error.prototype;var z,A=s.helpers.notImplemented=function(){throw new x},B=s.helpers.notSupported=function(){throw new y},C={e:{}};s.config.longStackSupport=!1;var D=!1,E=c(function(){throw new Error})();D=!!E.e&&!!E.e.stack;var F,G=i(),H="From previous event:",I=({}.hasOwnProperty,Array.prototype.slice,s.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),J=(s.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},s.internals.addRef=function(a,b){return new ea(function(c){return new J(b.getDisposable(),a.subscribe(c))})},s.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!O(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length}),K=J.prototype;K.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},K.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},K.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var L=s.Disposable=function(a){this.isDisposed=!1,this.action=a||t};L.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var M=L.create=function(a){return new L(a)},N=L.empty={dispose:t},O=L.isDisposable=function(a){return a&&isFunction(a.dispose)},P=(L.checkDisposed=function(a){if(a.isDisposed)throw new ObjectDisposedError},s.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null});P.prototype.getDisposable=function(){return this.current},P.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},P.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Q=s.SerialDisposable=function(){this.isDisposed=!1,this.current=null};Q.prototype.getDisposable=function(){return this.current},Q.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},Q.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var R=s.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||w,this.disposable=new P};R.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},R.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},R.prototype.isCancelled=function(){return this.disposable.isDisposed},R.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var S=s.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),N}a.isScheduler=function(b){return b instanceof a};var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=u,a.normalize=function(a){return 0>a&&(a=0),a},a}(),T=S.normalize;S.isScheduler;!function(a){function b(a,b){function c(b){function d(a,b){return g?f.remove(i):h=!0,e(b,c),N}var g=!1,h=!1,i=a.scheduleWithState(b,d);h||(f.add(i),g=!0)}var d=b[0],e=b[1],f=new J;return e(d,c),f}function c(a,b,c){function d(b,e){function h(a,b){return i?g.remove(k):j=!0,f(b,d),N}var i=!1,j=!1,k=a[c](b,e,h);j||(g.add(k),i=!0)}var e=b[0],f=b[1],g=new J;return f(e,d),g}function d(a,b){return c(a,b,"scheduleWithRelativeAndState")}function e(a,b){return c(a,b,"scheduleWithAbsoluteAndState")}function f(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,f)},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState([a,c],b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,f)},a.scheduleRecursiveWithRelativeAndState=function(a,b,c){return this._scheduleRelative([a,c],b,d)},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,f)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute([a,c],b,e)}}(S.prototype),function(a){S.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},S.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof r.setInterval)throw new y;b=T(b);var d=a,e=r.setInterval(function(){d=c(d)},b);return M(function(){r.clearInterval(e)})}}(S.prototype);var U,V,W=(s.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new P;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),S.immediate=function(){function a(a,b){return b(this,a)}return new S(u,a,B,B)}(),S.currentThread=function(){function a(){for(;e.length>0;){var a=e.shift();!a.isCancelled()&&a.invoke()}}function b(b,f){var g=new R(this,b,f,this.now());if(e)e.push(g);else{e=[g];var h=c(a)();if(e=null,h===C)return d(h.e)}return g.disposable}var e,f=new S(u,b,B,B);return f.scheduleRequired=function(){return!e},f}()),X=function(){var a,b=t;if(r.setTimeout)a=r.setTimeout,b=r.clearTimeout;else{if(!r.WScript)throw new y;a=function(a,b){r.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}(),Y=X.setTimeout,Z=X.clearTimeout;!function(){function a(b){if(h)Y(function(){a(b)},0);else{var e=g[b];if(e){h=!0;var f=c(e)();if(V(b),h=!1,f===C)return d(f.e)}}}function b(){if(!r.postMessage||r.importScripts)return!1;var a=!1,b=r.onmessage;return r.onmessage=function(){a=!0},r.postMessage("","*"),r.onmessage=b,a}function e(b){"string"==typeof b.data&&b.data.substring(0,k.length)===k&&a(b.data.substring(k.length))}var f=1,g={},h=!1;V=function(a){delete g[a]};var i=RegExp("^"+String(toString).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),j="function"==typeof(j=q&&p&&q.setImmediate)&&!i.test(j)&&j;if(isFunction(j))U=function(b){var c=f++;return g[c]=b,j(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))U=function(b){var c=f++;return g[c]=b,process.nextTick(function(){a(c)}),c};else if(b()){var k="ms.rx.schedule"+Math.random();r.addEventListener?r.addEventListener("message",e,!1):r.attachEvent?r.attachEvent("onmessage",e):r.onmessage=e,U=function(a){var b=f++;return g[b]=a,r.postMessage(k+currentId,"*"),b}}else if(r.MessageChannel){var l=new r.MessageChannel;l.port1.onmessage=function(b){a(b.data)},U=function(a){var b=f++;return g[b]=a,l.port2.postMessage(b),b}}else U="document"in r&&"onreadystatechange"in r.document.createElement("script")?function(b){var c=r.document.createElement("script"),d=f++;return g[d]=b,c.onreadystatechange=function(){a(d),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},r.document.documentElement.appendChild(c),d}:function(b){var c=f++;return g[c]=b,Y(function(){a(c)},0),c}}();var $,_=(S.timeout=S["default"]=function(){function a(a,b){var c=this,d=new P,e=U(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new J(d,M(function(){V(e)}))}function b(a,b,c){var d=this,e=S.normalize(b),f=new P;if(0===e)return d.scheduleWithState(a,c);var g=Y(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new J(f,M(function(){Z(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new S(u,a,b,c)}(),s.Observer=function(){}),aa=_.create=function(a,b,c){return a||(a=t),b||(b=v),c||(c=t),new ca(a,b,c)},ba=s.internals.AbstractObserver=function(a){function b(){this.isStopped=!1}return I(b,a),b.prototype.next=A,b.prototype.error=A,b.prototype.completed=A,b.prototype.onNext=function(a){!this.isStopped&&this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(_),ca=s.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return I(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(ba),da=s.Observable=function(){function a(a,b){return function(c){var d=c.onError;return c.onError=function(b){e(b,a),d.call(c,b)},b.call(a,c)}}function b(b){if(s.config.longStackSupport&&D){var e=c(d)(new Error).e;this.stack=e.stack.substring(e.stack.indexOf("\n")+1),this._subscribe=a(this,b)}else this._subscribe=b}return $=b.prototype,b.isObservable=function(a){return a&&isFunction(a.subscribe)},$.subscribe=$.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:aa(a,b,c))},$.subscribeOnNext=function(a,b){return this._subscribe(aa("undefined"!=typeof b?function(c){a.call(b,c)}:a))},$.subscribeOnError=function(a,b){return this._subscribe(aa(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},$.subscribeOnCompleted=function(a,b){return this._subscribe(aa(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},b}(),ea=s.AnonymousObservable=function(a){function b(a){return a&&isFunction(a.dispose)?a:isFunction(a)?M(a):N}function e(a,e){var f=e[0],g=e[1],h=c(g.__subscribe).call(g,f);return h!==C||f.fail(C.e)?void f.setDisposable(b(h)):d(C.e)}function f(a){var b=new fa(a),c=[b,this];return W.scheduleRequired()?W.scheduleWithState(c,e):e(null,c),b}function g(b,c){this.source=c,this.__subscribe=b,a.call(this,f)}return I(g,a),g}(da),fa=(s.ObservableBase=function(a){function b(a){return a&&isFunction(a.dispose)?a:isFunction(a)?M(a):N}function e(a,e){var f=e[0],g=e[1],h=c(g.subscribeCore).call(g,f);return h!==C||f.fail(C.e)?void f.setDisposable(b(h)):d(C.e)}function f(a){var b=new fa(a),c=[b,this];return W.scheduleRequired()?W.scheduleWithState(c,e):e(null,c),b}function g(){a.call(this,f)}return I(g,a),g.prototype.subscribeCore=A,g}(da),function(a){function b(b){a.call(this),this.observer=b,this.m=new P}I(b,a);var e=b.prototype;return e.next=function(a){var b=c(this.observer.onNext).call(this.observer,a);b===C&&(this.dispose(),d(b.e))},e.error=function(a){var b=c(this.observer.onError).call(this.observer,a);this.dispose(),b===C&&d(b.e)},e.completed=function(){var a=c(this.observer.onCompleted).call(this.observer);this.dispose(),a===C&&d(a.e)},e.setDisposable=function(a){this.m.setDisposable(a)},e.getDisposable=function(){return this.m.getDisposable()},e.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(ba));da.create=function(a,b){return new ea(a,b)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?(r.Rx=s,define(function(){return s})):l&&o?p?(o.exports=s).Rx=s:l.Rx=s:r.Rx=s;var ga=i()}).call(this);
(function(a){function b(a){return function(){try{return a.apply(this,arguments)}catch(b){return A.e=b,A}}}function c(a){throw a}function d(a,b){if(C&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(G)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+G+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=i(a);if(!b)return!1;var c=b[0],d=b[1];return c===E&&d>=F&&fa>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(C)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=i(c);if(!d)return;return E=d[0],d[1]}}function i(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}var j={"function":!0,object:!0},k=j[typeof exports]&&exports&&!exports.nodeType&&exports,l=j[typeof self]&&self.Object&&self,m=j[typeof window]&&window&&window.Object&&window,n=j[typeof module]&&module&&!module.nodeType&&module,o=n&&n.exports===k&&k,p=k&&n&&"object"==typeof global&&global&&global.Object&&global,q=q=p||m!==(this&&this.window)&&m||l||this,r={internals:{},config:{Promise:q.Promise},helpers:{}},s=r.helpers.noop=function(){},t=r.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}(),u=r.helpers.defaultError=function(a){throw a},v=(r.helpers.isPromise=function(a){return!!a&&!isFunction(a.subscribe)&&isFunction(a.then)},r.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0});isFunction=r.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==toString.call(a)}),a}();var w=r.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};w.prototype=Error.prototype;var x=r.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};x.prototype=Error.prototype;var y=r.helpers.notImplemented=function(){throw new w},z=r.helpers.notSupported=function(){throw new x},A={e:{}},B=r.internals.tryCatch=function(a){if(!isFunction(a))throw new TypeError("fn must be a function");return b(a)};r.config.longStackSupport=!1;var C=!1,D=B(function(){throw new Error})();C=!!D.e&&!!D.e.stack;var E,F=h(),G="From previous event:",H=({}.hasOwnProperty,Array.prototype.slice,r.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),I=(r.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},r.internals.addRef=function(a,b){return new da(function(c){return new I(b.getDisposable(),a.subscribe(c))})},r.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!N(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length}),J=I.prototype;J.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},J.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},J.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var K=r.Disposable=function(a){this.isDisposed=!1,this.action=a||s};K.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var L=K.create=function(a){return new K(a)},M=K.empty={dispose:s},N=K.isDisposable=function(a){return a&&isFunction(a.dispose)},O=(K.checkDisposed=function(a){if(a.isDisposed)throw new ObjectDisposedError},r.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null});O.prototype.getDisposable=function(){return this.current},O.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},O.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var P=r.SerialDisposable=function(){this.isDisposed=!1,this.current=null};P.prototype.getDisposable=function(){return this.current},P.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},P.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Q=r.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||v,this.disposable=new O};Q.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Q.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Q.prototype.isCancelled=function(){return this.disposable.isDisposed},Q.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var R=r.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),M}a.isScheduler=function(b){return b instanceof a};var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=t,a.normalize=function(a){return 0>a&&(a=0),a},a}(),S=R.normalize;R.isScheduler;!function(a){function b(a,b){function c(b){function d(a,b){return g?f.remove(i):h=!0,e(b,c),M}var g=!1,h=!1,i=a.scheduleWithState(b,d);h||(f.add(i),g=!0)}var d=b[0],e=b[1],f=new I;return e(d,c),f}function c(a,b,c){function d(b,e){function h(a,b){return i?g.remove(k):j=!0,f(b,d),M}var i=!1,j=!1,k=a[c](b,e,h);j||(g.add(k),i=!0)}var e=b[0],f=b[1],g=new I;return f(e,d),g}function d(a,b){return c(a,b,"scheduleWithRelativeAndState")}function e(a,b){return c(a,b,"scheduleWithAbsoluteAndState")}function f(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,f)},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState([a,c],b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,f)},a.scheduleRecursiveWithRelativeAndState=function(a,b,c){return this._scheduleRelative([a,c],b,d)},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,f)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute([a,c],b,e)}}(R.prototype),function(a){R.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},R.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof q.setInterval)throw new x;b=S(b);var d=a,e=q.setInterval(function(){d=c(d)},b);return L(function(){q.clearInterval(e)})}}(R.prototype);var T,U,V=(r.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new O;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),R.immediate=function(){function a(a,b){return b(this,a)}return new R(t,a,z,z)}(),R.currentThread=function(){function a(){for(;d.length>0;){var a=d.shift();!a.isCancelled()&&a.invoke()}}function b(b,e){var f=new Q(this,b,e,this.now());if(d)d.push(f);else{d=[f];var g=B(a)();if(d=null,g===A)return c(g.e)}return f.disposable}var d,e=new R(t,b,z,z);return e.scheduleRequired=function(){return!d},e}()),W=function(){var a,b=s;if(q.setTimeout)a=q.setTimeout,b=q.clearTimeout;else{if(!q.WScript)throw new x;a=function(a,b){q.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}(),X=W.setTimeout,Y=W.clearTimeout;!function(){function a(b){if(g)X(function(){a(b)},0);else{var d=f[b];if(d){g=!0;var e=B(d)();if(U(b),g=!1,e===A)return c(e.e)}}}function b(){if(!q.postMessage||q.importScripts)return!1;var a=!1,b=q.onmessage;return q.onmessage=function(){a=!0},q.postMessage("","*"),q.onmessage=b,a}function d(b){"string"==typeof b.data&&b.data.substring(0,j.length)===j&&a(b.data.substring(j.length))}var e=1,f={},g=!1;U=function(a){delete f[a]};var h=RegExp("^"+String(toString).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),i="function"==typeof(i=p&&o&&p.setImmediate)&&!h.test(i)&&i;if(isFunction(i))T=function(b){var c=e++;return f[c]=b,i(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))T=function(b){var c=e++;return f[c]=b,process.nextTick(function(){a(c)}),c};else if(b()){var j="ms.rx.schedule"+Math.random();q.addEventListener?q.addEventListener("message",d,!1):q.attachEvent?q.attachEvent("onmessage",d):q.onmessage=d,T=function(a){var b=e++;return f[b]=a,q.postMessage(j+currentId,"*"),b}}else if(q.MessageChannel){var k=new q.MessageChannel;k.port1.onmessage=function(b){a(b.data)},T=function(a){var b=e++;return f[b]=a,k.port2.postMessage(b),b}}else T="document"in q&&"onreadystatechange"in q.document.createElement("script")?function(b){var c=q.document.createElement("script"),d=e++;return f[d]=b,c.onreadystatechange=function(){a(d),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},q.document.documentElement.appendChild(c),d}:function(b){var c=e++;return f[c]=b,X(function(){a(c)},0),c}}();var Z,$=(R.timeout=R["default"]=function(){function a(a,b){var c=this,d=new O,e=T(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new I(d,L(function(){U(e)}))}function b(a,b,c){var d=this,e=R.normalize(b),f=new O;if(0===e)return d.scheduleWithState(a,c);var g=X(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new I(f,L(function(){Y(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new R(t,a,b,c)}(),r.Observer=function(){}),_=$.create=function(a,b,c){return a||(a=s),b||(b=u),c||(c=s),new ba(a,b,c)},aa=r.internals.AbstractObserver=function(a){function b(){this.isStopped=!1}return H(b,a),b.prototype.next=y,b.prototype.error=y,b.prototype.completed=y,b.prototype.onNext=function(a){!this.isStopped&&this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}($),ba=r.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return H(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(aa),ca=r.Observable=function(){function a(a,b){return function(c){var e=c.onError;return c.onError=function(b){d(b,a),e.call(c,b)},b.call(a,c)}}function b(b){if(r.config.longStackSupport&&C){var d=B(c)(new Error).e;this.stack=d.stack.substring(d.stack.indexOf("\n")+1),this._subscribe=a(this,b)}else this._subscribe=b}return Z=b.prototype,b.isObservable=function(a){return a&&isFunction(a.subscribe)},Z.subscribe=Z.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:_(a,b,c))},Z.subscribeOnNext=function(a,b){return this._subscribe(_("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Z.subscribeOnError=function(a,b){return this._subscribe(_(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Z.subscribeOnCompleted=function(a,b){return this._subscribe(_(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},b}(),da=r.AnonymousObservable=function(a){function b(a){return a&&isFunction(a.dispose)?a:isFunction(a)?L(a):M}function d(a,d){var e=d[0],f=d[1],g=B(f.__subscribe).call(f,e);return g!==A||e.fail(A.e)?void e.setDisposable(b(g)):c(A.e)}function e(a){var b=new ea(a),c=[b,this];return V.scheduleRequired()?V.scheduleWithState(c,d):d(null,c),b}function f(b,c){this.source=c,this.__subscribe=b,a.call(this,e)}return H(f,a),f}(ca),ea=(r.ObservableBase=function(a){function b(a){return a&&isFunction(a.dispose)?a:isFunction(a)?L(a):M}function d(a,d){var e=d[0],f=d[1],g=B(f.subscribeCore).call(f,e);return g!==A||e.fail(A.e)?void e.setDisposable(b(g)):c(A.e)}function e(a){var b=new ea(a),c=[b,this];return V.scheduleRequired()?V.scheduleWithState(c,d):d(null,c),b}function f(){a.call(this,e)}return H(f,a),f.prototype.subscribeCore=y,f}(ca),function(a){function b(b){a.call(this),this.observer=b,this.m=new O}H(b,a);var d=b.prototype;return d.next=function(a){var b=B(this.observer.onNext).call(this.observer,a);b===A&&(this.dispose(),c(b.e))},d.error=function(a){var b=B(this.observer.onError).call(this.observer,a);this.dispose(),b===A&&c(b.e)},d.completed=function(){var a=B(this.observer.onCompleted).call(this.observer);this.dispose(),a===A&&c(a.e)},d.setDisposable=function(a){this.m.setDisposable(a)},d.getDisposable=function(){return this.m.getDisposable()},d.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(aa));ca.create=function(a,b){return new da(a,b)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?(q.Rx=r,define(function(){return r})):k&&n?o?(n.exports=r).Rx=r:k.Rx=r:q.Rx=r;var fa=h()}).call(this);
//# sourceMappingURL=rx.core.map

@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

@@ -61,15 +61,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -76,0 +76,0 @@ function thrower(e) {

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a,b){return new D(a,b)}var f=c.Observable,g=f.prototype,h=c.AnonymousObservable,i=f.concat,j=f.defer,k=f.empty,l=c.Disposable.empty,m=c.CompositeDisposable,n=c.SerialDisposable,o=c.SingleAssignmentDisposable,p=(c.internals.Enumerator,c.internals.Enumerable),q=p.of,r=c.Scheduler.immediate,s=c.Scheduler.currentThread,t=(Array.prototype.slice,c.AsyncSubject),u=c.Observer,v=c.internals.inherits,w=(c.internals.bindCallback,c.internals.addProperties),x=c.helpers,y=x.noop,z=x.isPromise,A=(x.isFunction,c.Scheduler.isScheduler),B=f.fromPromise,C="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";a.Set&&"function"==typeof(new a.Set)["@@iterator"]&&(C="@@iterator");c.doneEnumerator={done:!0,value:d},c.helpers.isIterable=function(a){return a[C]!==d},c.helpers.isArrayLike=function(a){return a&&a.length!==d};c.helpers.iterator=C;var D=function(a){function b(a,b){this.c=a,this.s=b}return v(b,a),b.prototype[C]=function(){var a=this;return{next:function(){return a.c()?{done:!1,value:a.s}:{done:!0,value:void 0}}}},b}(p);g.letBind=g.let=function(a){return a(this)},f["if"]=function(a,b,c){return j(function(){return c||(c=k()),z(b)&&(b=B(b)),z(c)&&(c=B(c)),"function"==typeof c.now&&(c=k(c)),a()?b:c})},f["for"]=f.forIn=function(a,b,c){return q(a,b,c).concat()};var E=f["while"]=f.whileDo=function(a,b){return z(b)&&(b=B(b)),e(a,b).concat()};g.doWhile=function(a){return i([this,E(a,this)])},f["case"]=function(a,b,c){return j(function(){z(c)&&(c=B(c)),c||(c=k()),A(c)&&(c=k(c));var d=b[a()];return z(d)&&(d=B(d)),d||c})},g.expand=function(a,b){A(b)||(b=r);var c=this;return new h(function(d){var e=[],f=new n,g=new m(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new o;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g},this)},f.forkJoin=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new h(function(b){var c=a.length;if(0===c)return b.onCompleted(),l;for(var d=new m,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];z(j)&&(j=B(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},g.forkJoin=function(a,b){var c=this;return new h(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new o,l=new o;return z(a)&&(a=B(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new m(k,l)},c)},g.manySelect=g.extend=function(a,b){A(b)||(b=r);var c=this;return j(function(){var d;return c.map(function(a){var b=new F(a);return d&&d.onNext(a),d=b,b}).tap(y,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var F=function(a){function b(a){var b=this,c=new m;return c.add(s.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeAll().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new t}return v(c,a),w(c.prototype,u,{onCompleted:function(){this.onNext(f.empty())},onError:function(a){this.onNext(f["throw"](a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(f);return g.switchFirst=function(){var a=this;return new h(function(b){var c=!1,d=!1,e=new o,f=new m;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,z(a)&&(a=B(a));var e=new o;f.add(e),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},function(a){b.onError(a)},function(){d=!0,!c&&1===f.length&&b.onCompleted()})),f},this)},g.flatMapFirst=g.selectManyFirst=function(a,b,c){return new FlatMapObservable(this,a,b,c).switchFirst()},c.Observable.prototype.flatMapWithMaxConcurrent=function(a,b,c,d){return new FlatMapObservable(this,b,c,d).merge(a)},c});
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return E.e=b,E}}}function f(a,b){return new G(a,b)}var g=c.Observable,h=g.prototype,i=c.AnonymousObservable,j=g.concat,k=g.defer,l=g.empty,m=c.Disposable.empty,n=c.CompositeDisposable,o=c.SerialDisposable,p=c.SingleAssignmentDisposable,q=(c.internals.Enumerator,c.internals.Enumerable),r=q.of,s=c.Scheduler.immediate,t=c.Scheduler.currentThread,u=(Array.prototype.slice,c.AsyncSubject),v=c.Observer,w=c.internals.inherits,x=(c.internals.bindCallback,c.internals.addProperties),y=c.helpers,z=y.noop,A=y.isPromise,B=y.isFunction,C=c.Scheduler.isScheduler,D=g.fromPromise,E={e:{}},F=(c.internals.tryCatch=function(a){if(!B(a))throw new TypeError("fn must be a function");return e(a)},"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_");a.Set&&"function"==typeof(new a.Set)["@@iterator"]&&(F="@@iterator");c.doneEnumerator={done:!0,value:d},c.helpers.isIterable=function(a){return a[F]!==d},c.helpers.isArrayLike=function(a){return a&&a.length!==d};c.helpers.iterator=F;var G=function(a){function b(a,b){this.c=a,this.s=b}return w(b,a),b.prototype[F]=function(){var a=this;return{next:function(){return a.c()?{done:!1,value:a.s}:{done:!0,value:void 0}}}},b}(q);h.letBind=h.let=function(a){return a(this)},g["if"]=function(a,b,c){return k(function(){return c||(c=l()),A(b)&&(b=D(b)),A(c)&&(c=D(c)),"function"==typeof c.now&&(c=l(c)),a()?b:c})},g["for"]=g.forIn=function(a,b,c){return r(a,b,c).concat()};var H=g["while"]=g.whileDo=function(a,b){return A(b)&&(b=D(b)),f(a,b).concat()};h.doWhile=function(a){return j([this,H(a,this)])},g["case"]=function(a,b,c){return k(function(){A(c)&&(c=D(c)),c||(c=l()),C(c)&&(c=l(c));var d=b[a()];return A(d)&&(d=D(d)),d||c})},h.expand=function(a,b){C(b)||(b=s);var c=this;return new i(function(d){var e=[],f=new o,g=new n(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new p;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g},this)},g.forkJoin=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new i(function(b){var c=a.length;if(0===c)return b.onCompleted(),m;for(var d=new n,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];A(j)&&(j=D(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},h.forkJoin=function(a,b){var c=this;return new i(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new p,l=new p;return A(a)&&(a=D(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new n(k,l)},c)},h.manySelect=h.extend=function(a,b){C(b)||(b=s);var c=this;return k(function(){var d;return c.map(function(a){var b=new I(a);return d&&d.onNext(a),d=b,b}).tap(z,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var I=function(a){function b(a){var b=this,c=new n;return c.add(t.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeAll().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new u}return w(c,a),x(c.prototype,v,{onCompleted:function(){this.onNext(g.empty())},onError:function(a){this.onNext(g["throw"](a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(g);return h.switchFirst=function(){var a=this;return new i(function(b){var c=!1,d=!1,e=new p,f=new n;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,A(a)&&(a=D(a));var e=new p;f.add(e),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},function(a){b.onError(a)},function(){d=!0,!c&&1===f.length&&b.onCompleted()})),f},this)},h.flatMapFirst=h.selectManyFirst=function(a,b,c){return new FlatMapObservable(this,a,b,c).switchFirst()},c.Observable.prototype.flatMapWithMaxConcurrent=function(a,b,c,d){return new FlatMapObservable(this,b,c,d).merge(a)},c});
//# sourceMappingURL=rx.experimental.map

@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

@@ -66,15 +66,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -81,0 +81,0 @@ function thrower(e) {

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.lite.compat"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("rx-lite-compat")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(){try{return o.apply(this,arguments)}catch(a){return S.e=a,S}}function f(a){if(!M(a))throw new TypeError("fn must be a function");return o=a,e}function g(a){throw a}function h(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function i(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function j(a,b){return a.amb(b)}function k(a){return a.toArray()}function l(a){return a.length>0}function m(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function n(a){this.comparer=a,this.set=[]}var o,p=c.Observable,q=p.prototype,r=p.never,s=p["throw"],t=c.AnonymousObservable,u=c.AnonymousObserver,v=c.Notification.createOnNext,w=c.Notification.createOnError,x=c.Notification.createOnCompleted,y=c.Observer,z=y.create,A=c.Subject,B=c.internals,C=c.helpers,D=B.ScheduledObserver,E=c.SerialDisposable,F=c.SingleAssignmentDisposable,G=c.CompositeDisposable,H=c.RefCountDisposable,I=c.Disposable.empty,J=c.Scheduler.immediate,K=(C.defaultKeySerializer,c.internals.addRef),L=(C.identity,C.isPromise),M=C.isFunction,N=B.inherits,O=B.bindCallback,P=(C.noop,c.Scheduler.isScheduler),Q=p.fromPromise,R=c.ArgumentOutOfRangeError,S={e:{}};h.prototype.dispose=function(){this.scheduler.scheduleWithState(this,i)};var T=function(a){function b(b){a.call(this),this._observer=b,this._state=0}N(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=f(this._observer.onNext).call(this._observer,a);this._state=0,b===S&&g(b.e)},c.onError=function(a){this.checkAccess();var b=f(this._observer.onError).call(this._observer,a);this._state=2,b===S&&g(b.e)},c.onCompleted=function(){this.checkAccess();var a=f(this._observer.onCompleted).call(this._observer);this._state=2,a===S&&g(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(y),U=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return N(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(D);y.prototype.checked=function(){return new T(this)},y.notifyOn=function(a){return new U(a,this)},y.fromNotifier=function(a,b){var c=O(a,b,1);return new u(function(a){return c(v(a))},function(a){return c(w(a))},function(){return c(x())})},y.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},y.prototype.asObserver=function(){var a=this;return new u(function(b){a.onNext(b)},function(b){a.onError(b)},function(){a.onCompleted()})},q.observeOn=function(a){var b=this;return new t(function(c){return b.subscribe(new U(a,c))},b)},q.subscribeOn=function(a){var b=this;return new t(function(c){var d=new F,e=new E;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new h(a,b.subscribe(c)))})),e},b)},p.generate=function(a,b,c,d,e){return P(e)||(e=currentThreadScheduler),new t(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})},p.using=function(a,b){return new t(function(c){var d=I,e=f(a)();if(e===S)return new G(s(e.e).subscribe(c),d);e&&(d=e);var g=f(b)(e);return g===S?new G(s(g.e).subscribe(c),d):new G(g.subscribe(c),d)})},q.amb=function(a){var b=this;return new t(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new F,j=new F;L(a)&&(a=Q(a));var k=z(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()}),l=z(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()});return i.setDisposable(b.subscribe(k)),j.setDisposable(a.subscribe(l)),new G(i,j)})},p.amb=function(){var a,b=r();if(Array.isArray(arguments[0]))a=arguments[0];else{var c=arguments.length;a=new Array(a);for(var d=0;c>d;d++)a[d]=arguments[d]}for(var d=0,c=a.length;c>d;d++)b=j(b,a[d]);return b},q.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return V([this,a])};var V=p.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new t(function(b){var c=0,d=new E,e=J.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],L(f)&&(f=Q(f)),g=new F,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new G(d,e)})};return q.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).flatMap(k).filter(l)},q.windowWithCount=function(a,b){var c=this;if(+a||(a=0),Math.abs(a)===1/0&&(a=0),0>=a)throw new R;if(null==b&&(b=a),+b||(b=0),Math.abs(b)===1/0&&(b=0),0>=b)throw new R;return new t(function(d){function e(){var a=new A;i.push(a),d.onNext(K(a,g))}var f=new F,g=new H(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},q.takeLastBuffer=function(a){var b=this;return new t(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},q.defaultIfEmpty=function(a){var b=this;return a===d&&(a=null),new t(function(c){var d=!1;return b.subscribe(function(a){d=!0,c.onNext(a)},function(a){c.onError(a)},function(){!d&&c.onNext(a),c.onCompleted()})},b)},n.prototype.push=function(a){var b=-1===m(this.set,a,this.comparer);return b&&this.set.push(a),b},q.distinct=function(a,b){var c=this;return b||(b=defaultComparer),new t(function(d){var e=new n(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},q.singleInstance=function(){function a(){return d||(d=!0,b=c["finally"](function(){d=!1}).publish().refCount()),b}var b,c=this,d=!1;return new t(function(b){return a().subscribe(b)})},c});
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.lite.compat"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("rx-lite-compat")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return Q.e=b,Q}}}function f(a){throw a}function g(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function h(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function i(a,b){return a.amb(b)}function j(a){return a.toArray()}function k(a){return a.length>0}function l(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function m(a){this.comparer=a,this.set=[]}var n=c.Observable,o=n.prototype,p=n.never,q=n["throw"],r=c.AnonymousObservable,s=c.AnonymousObserver,t=c.Notification.createOnNext,u=c.Notification.createOnError,v=c.Notification.createOnCompleted,w=c.Observer,x=w.create,y=c.Subject,z=c.internals,A=c.helpers,B=z.ScheduledObserver,C=c.SerialDisposable,D=c.SingleAssignmentDisposable,E=c.CompositeDisposable,F=c.RefCountDisposable,G=c.Disposable.empty,H=c.Scheduler.immediate,I=(A.defaultKeySerializer,c.internals.addRef),J=(A.identity,A.isPromise),K=A.isFunction,L=z.inherits,M=z.bindCallback,N=(A.noop,c.Scheduler.isScheduler),O=n.fromPromise,P=c.ArgumentOutOfRangeError,Q={e:{}},R=c.internals.tryCatch=function(a){if(!K(a))throw new TypeError("fn must be a function");return e(a)};g.prototype.dispose=function(){this.scheduler.scheduleWithState(this,h)};var S=function(a){function b(b){a.call(this),this._observer=b,this._state=0}L(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=R(this._observer.onNext).call(this._observer,a);this._state=0,b===Q&&f(b.e)},c.onError=function(a){this.checkAccess();var b=R(this._observer.onError).call(this._observer,a);this._state=2,b===Q&&f(b.e)},c.onCompleted=function(){this.checkAccess();var a=R(this._observer.onCompleted).call(this._observer);this._state=2,a===Q&&f(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(w),T=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return L(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(B);w.prototype.checked=function(){return new S(this)},w.notifyOn=function(a){return new T(a,this)},w.fromNotifier=function(a,b){var c=M(a,b,1);return new s(function(a){return c(t(a))},function(a){return c(u(a))},function(){return c(v())})},w.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},w.prototype.asObserver=function(){var a=this;return new s(function(b){a.onNext(b)},function(b){a.onError(b)},function(){a.onCompleted()})},o.observeOn=function(a){var b=this;return new r(function(c){return b.subscribe(new T(a,c))},b)},o.subscribeOn=function(a){var b=this;return new r(function(c){var d=new D,e=new C;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new g(a,b.subscribe(c)))})),e},b)},n.generate=function(a,b,c,d,e){return N(e)||(e=currentThreadScheduler),new r(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})},n.using=function(a,b){return new r(function(c){var d=G,e=R(a)();if(e===Q)return new E(q(e.e).subscribe(c),d);e&&(d=e);var f=R(b)(e);return f===Q?new E(q(f.e).subscribe(c),d):new E(f.subscribe(c),d)})},o.amb=function(a){var b=this;return new r(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new D,j=new D;J(a)&&(a=O(a));var k=x(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()}),l=x(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()});return i.setDisposable(b.subscribe(k)),j.setDisposable(a.subscribe(l)),new E(i,j)})},n.amb=function(){var a,b=p();if(Array.isArray(arguments[0]))a=arguments[0];else{var c=arguments.length;a=new Array(a);for(var d=0;c>d;d++)a[d]=arguments[d]}for(var d=0,c=a.length;c>d;d++)b=i(b,a[d]);return b},o.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return U([this,a])};var U=n.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new r(function(b){var c=0,d=new C,e=H.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],J(f)&&(f=O(f)),g=new D,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new E(d,e)})};return o.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).flatMap(j).filter(k)},o.windowWithCount=function(a,b){var c=this;if(+a||(a=0),Math.abs(a)===1/0&&(a=0),0>=a)throw new P;if(null==b&&(b=a),+b||(b=0),Math.abs(b)===1/0&&(b=0),0>=b)throw new P;return new r(function(d){function e(){var a=new y;i.push(a),d.onNext(I(a,g))}var f=new D,g=new F(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},o.takeLastBuffer=function(a){var b=this;return new r(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},o.defaultIfEmpty=function(a){var b=this;return a===d&&(a=null),new r(function(c){var d=!1;return b.subscribe(function(a){d=!0,c.onNext(a)},function(a){c.onError(a)},function(){!d&&c.onNext(a),c.onCompleted()})},b)},m.prototype.push=function(a){var b=-1===l(this.set,a,this.comparer);return b&&this.set.push(a),b},o.distinct=function(a,b){var c=this;return b||(b=defaultComparer),new r(function(d){var e=new m(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},o.singleInstance=function(){function a(){return d||(d=!0,b=c["finally"](function(){d=!1}).publish().refCount()),b}var b,c=this,d=!1;return new r(function(b){return a().subscribe(b)})},c});
//# sourceMappingURL=rx.lite.extras.compat.map

@@ -66,15 +66,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -81,0 +81,0 @@ function thrower(e) {

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.lite"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("rx-lite")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(){try{return o.apply(this,arguments)}catch(a){return S.e=a,S}}function f(a){if(!M(a))throw new TypeError("fn must be a function");return o=a,e}function g(a){throw a}function h(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function i(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function j(a,b){return a.amb(b)}function k(a){return a.toArray()}function l(a){return a.length>0}function m(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function n(a){this.comparer=a,this.set=[]}var o,p=c.Observable,q=p.prototype,r=p.never,s=p["throw"],t=c.AnonymousObservable,u=c.AnonymousObserver,v=c.Notification.createOnNext,w=c.Notification.createOnError,x=c.Notification.createOnCompleted,y=c.Observer,z=y.create,A=c.Subject,B=c.internals,C=c.helpers,D=B.ScheduledObserver,E=c.SerialDisposable,F=c.SingleAssignmentDisposable,G=c.CompositeDisposable,H=c.RefCountDisposable,I=c.Disposable.empty,J=c.Scheduler.immediate,K=(C.defaultKeySerializer,c.internals.addRef),L=(C.identity,C.isPromise),M=C.isFunction,N=B.inherits,O=B.bindCallback,P=(C.noop,c.Scheduler.isScheduler),Q=p.fromPromise,R=c.ArgumentOutOfRangeError,S={e:{}};h.prototype.dispose=function(){this.scheduler.scheduleWithState(this,i)};var T=function(a){function b(b){a.call(this),this._observer=b,this._state=0}N(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=f(this._observer.onNext).call(this._observer,a);this._state=0,b===S&&g(b.e)},c.onError=function(a){this.checkAccess();var b=f(this._observer.onError).call(this._observer,a);this._state=2,b===S&&g(b.e)},c.onCompleted=function(){this.checkAccess();var a=f(this._observer.onCompleted).call(this._observer);this._state=2,a===S&&g(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(y),U=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return N(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(D);y.prototype.checked=function(){return new T(this)},y.notifyOn=function(a){return new U(a,this)},y.fromNotifier=function(a,b){var c=O(a,b,1);return new u(function(a){return c(v(a))},function(a){return c(w(a))},function(){return c(x())})},y.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},y.prototype.asObserver=function(){var a=this;return new u(function(b){a.onNext(b)},function(b){a.onError(b)},function(){a.onCompleted()})},q.observeOn=function(a){var b=this;return new t(function(c){return b.subscribe(new U(a,c))},b)},q.subscribeOn=function(a){var b=this;return new t(function(c){var d=new F,e=new E;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new h(a,b.subscribe(c)))})),e},b)},p.generate=function(a,b,c,d,e){return P(e)||(e=currentThreadScheduler),new t(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})},p.using=function(a,b){return new t(function(c){var d=I,e=f(a)();if(e===S)return new G(s(e.e).subscribe(c),d);e&&(d=e);var g=f(b)(e);return g===S?new G(s(g.e).subscribe(c),d):new G(g.subscribe(c),d)})},q.amb=function(a){var b=this;return new t(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new F,j=new F;L(a)&&(a=Q(a));var k=z(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()}),l=z(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()});return i.setDisposable(b.subscribe(k)),j.setDisposable(a.subscribe(l)),new G(i,j)})},p.amb=function(){var a,b=r();if(Array.isArray(arguments[0]))a=arguments[0];else{var c=arguments.length;a=new Array(a);for(var d=0;c>d;d++)a[d]=arguments[d]}for(var d=0,c=a.length;c>d;d++)b=j(b,a[d]);return b},q.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return V([this,a])};var V=p.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new t(function(b){var c=0,d=new E,e=J.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],L(f)&&(f=Q(f)),g=new F,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new G(d,e)})};return q.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).flatMap(k).filter(l)},q.windowWithCount=function(a,b){var c=this;if(+a||(a=0),Math.abs(a)===1/0&&(a=0),0>=a)throw new R;if(null==b&&(b=a),+b||(b=0),Math.abs(b)===1/0&&(b=0),0>=b)throw new R;return new t(function(d){function e(){var a=new A;i.push(a),d.onNext(K(a,g))}var f=new F,g=new H(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},q.takeLastBuffer=function(a){var b=this;return new t(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},q.defaultIfEmpty=function(a){var b=this;return a===d&&(a=null),new t(function(c){var d=!1;return b.subscribe(function(a){d=!0,c.onNext(a)},function(a){c.onError(a)},function(){!d&&c.onNext(a),c.onCompleted()})},b)},n.prototype.push=function(a){var b=-1===m(this.set,a,this.comparer);return b&&this.set.push(a),b},q.distinct=function(a,b){var c=this;return b||(b=defaultComparer),new t(function(d){var e=new n(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},q.singleInstance=function(){function a(){return d||(d=!0,b=c["finally"](function(){d=!1}).publish().refCount()),b}var b,c=this,d=!1;return new t(function(b){return a().subscribe(b)})},c});
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.lite"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("rx-lite")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return Q.e=b,Q}}}function f(a){throw a}function g(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function h(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function i(a,b){return a.amb(b)}function j(a){return a.toArray()}function k(a){return a.length>0}function l(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function m(a){this.comparer=a,this.set=[]}var n=c.Observable,o=n.prototype,p=n.never,q=n["throw"],r=c.AnonymousObservable,s=c.AnonymousObserver,t=c.Notification.createOnNext,u=c.Notification.createOnError,v=c.Notification.createOnCompleted,w=c.Observer,x=w.create,y=c.Subject,z=c.internals,A=c.helpers,B=z.ScheduledObserver,C=c.SerialDisposable,D=c.SingleAssignmentDisposable,E=c.CompositeDisposable,F=c.RefCountDisposable,G=c.Disposable.empty,H=c.Scheduler.immediate,I=(A.defaultKeySerializer,c.internals.addRef),J=(A.identity,A.isPromise),K=A.isFunction,L=z.inherits,M=z.bindCallback,N=(A.noop,c.Scheduler.isScheduler),O=n.fromPromise,P=c.ArgumentOutOfRangeError,Q={e:{}},R=c.internals.tryCatch=function(a){if(!K(a))throw new TypeError("fn must be a function");return e(a)};g.prototype.dispose=function(){this.scheduler.scheduleWithState(this,h)};var S=function(a){function b(b){a.call(this),this._observer=b,this._state=0}L(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=R(this._observer.onNext).call(this._observer,a);this._state=0,b===Q&&f(b.e)},c.onError=function(a){this.checkAccess();var b=R(this._observer.onError).call(this._observer,a);this._state=2,b===Q&&f(b.e)},c.onCompleted=function(){this.checkAccess();var a=R(this._observer.onCompleted).call(this._observer);this._state=2,a===Q&&f(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(w),T=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return L(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(B);w.prototype.checked=function(){return new S(this)},w.notifyOn=function(a){return new T(a,this)},w.fromNotifier=function(a,b){var c=M(a,b,1);return new s(function(a){return c(t(a))},function(a){return c(u(a))},function(){return c(v())})},w.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},w.prototype.asObserver=function(){var a=this;return new s(function(b){a.onNext(b)},function(b){a.onError(b)},function(){a.onCompleted()})},o.observeOn=function(a){var b=this;return new r(function(c){return b.subscribe(new T(a,c))},b)},o.subscribeOn=function(a){var b=this;return new r(function(c){var d=new D,e=new C;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new g(a,b.subscribe(c)))})),e},b)},n.generate=function(a,b,c,d,e){return N(e)||(e=currentThreadScheduler),new r(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})},n.using=function(a,b){return new r(function(c){var d=G,e=R(a)();if(e===Q)return new E(q(e.e).subscribe(c),d);e&&(d=e);var f=R(b)(e);return f===Q?new E(q(f.e).subscribe(c),d):new E(f.subscribe(c),d)})},o.amb=function(a){var b=this;return new r(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new D,j=new D;J(a)&&(a=O(a));var k=x(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()}),l=x(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()});return i.setDisposable(b.subscribe(k)),j.setDisposable(a.subscribe(l)),new E(i,j)})},n.amb=function(){var a,b=p();if(Array.isArray(arguments[0]))a=arguments[0];else{var c=arguments.length;a=new Array(a);for(var d=0;c>d;d++)a[d]=arguments[d]}for(var d=0,c=a.length;c>d;d++)b=i(b,a[d]);return b},o.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return U([this,a])};var U=n.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new r(function(b){var c=0,d=new C,e=H.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],J(f)&&(f=O(f)),g=new D,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new E(d,e)})};return o.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).flatMap(j).filter(k)},o.windowWithCount=function(a,b){var c=this;if(+a||(a=0),Math.abs(a)===1/0&&(a=0),0>=a)throw new P;if(null==b&&(b=a),+b||(b=0),Math.abs(b)===1/0&&(b=0),0>=b)throw new P;return new r(function(d){function e(){var a=new y;i.push(a),d.onNext(I(a,g))}var f=new D,g=new F(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},o.takeLastBuffer=function(a){var b=this;return new r(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},o.defaultIfEmpty=function(a){var b=this;return a===d&&(a=null),new r(function(c){var d=!1;return b.subscribe(function(a){d=!0,c.onNext(a)},function(a){c.onError(a)},function(){!d&&c.onNext(a),c.onCompleted()})},b)},m.prototype.push=function(a){var b=-1===l(this.set,a,this.comparer);return b&&this.set.push(a),b},o.distinct=function(a,b){var c=this;return b||(b=defaultComparer),new r(function(d){var e=new m(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},o.singleInstance=function(){function a(){return d||(d=!0,b=c["finally"](function(){d=!1}).publish().refCount()),b}var b,c=this,d=!1;return new r(function(b){return a().subscribe(b)})},c});
//# sourceMappingURL=rx.lite.extras.map

@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

@@ -55,15 +55,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -161,4 +161,4 @@ function thrower(e) {

function observableDelayTimeSpan(source, dueTime, scheduler) {
return new AnonymousObservable(function (observer) {
function observableDelayRelative(source, dueTime, scheduler) {
return new AnonymousObservable(function (o) {
var active = false,

@@ -184,3 +184,3 @@ cancelable = new SerialDisposable(),

if (exception !== null) {
observer.onError(exception);
o.onError(exception);
} else {

@@ -201,3 +201,3 @@ d = new SingleAssignmentDisposable();

if (result !== null) {
result.accept(observer);
result.accept(o);
}

@@ -216,3 +216,3 @@ } while (result !== null);

if (e !== null) {
observer.onError(e);
o.onError(e);
} else if (shouldRecurse) {

@@ -229,18 +229,67 @@ self(recurseDueTime);

function observableDelayDate(source, dueTime, scheduler) {
function observableDelayAbsolute(source, dueTime, scheduler) {
return observableDefer(function () {
return observableDelayTimeSpan(source, dueTime - scheduler.now(), scheduler);
return observableDelayRelative(source, dueTime - scheduler.now(), scheduler);
});
}
function delayWithSelector(source, subscriptionDelay, delayDurationSelector) {
var subDelay, selector;
if (isFunction(subscriptionDelay)) {
selector = subscriptionDelay;
} else {
subDelay = subscriptionDelay;
selector = delayDurationSelector;
}
return new AnonymousObservable(function (o) {
var delays = new CompositeDisposable(), atEnd = false, subscription = new SerialDisposable();
function start() {
subscription.setDisposable(source.subscribe(
function (x) {
var delay = tryCatch(selector)(x);
if (delay === errorObj) { return o.onError(delay.e); }
var d = new SingleAssignmentDisposable();
delays.add(d);
d.setDisposable(delay.subscribe(
function () {
o.onNext(x);
delays.remove(d);
done();
},
function (e) { o.onError(e); },
function () {
o.onNext(x);
delays.remove(d);
done();
}
));
},
function (e) { o.onError(e); },
function () {
atEnd = true;
subscription.dispose();
done();
}
));
}
function done () {
atEnd && delays.length === 0 && o.onCompleted();
}
if (!subDelay) {
start();
} else {
subscription.setDisposable(subDelay.subscribe(start, function (e) { o.onError(e); }, start));
}
return new CompositeDisposable(subscription, delays);
}, this);
}
/**
* Time shifts the observable sequence by dueTime. The relative time intervals between the values are preserved.
* Time shifts the observable sequence by dueTime.
* The relative time intervals between the values are preserved.
*
* @example
* 1 - res = Rx.Observable.delay(new Date());
* 2 - res = Rx.Observable.delay(new Date(), Rx.Scheduler.timeout);
*
* 3 - res = Rx.Observable.delay(5000);
* 4 - res = Rx.Observable.delay(5000, 1000, Rx.Scheduler.timeout);
* @memberOf Observable#
* @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) by which to shift the observable sequence.

@@ -250,18 +299,18 @@ * @param {Scheduler} [scheduler] Scheduler to run the delay timers on. If not specified, the timeout scheduler is used.

*/
observableProto.delay = function (dueTime, scheduler) {
isScheduler(scheduler) || (scheduler = timeoutScheduler);
return dueTime instanceof Date ?
observableDelayDate(this, dueTime.getTime(), scheduler) :
observableDelayTimeSpan(this, dueTime, scheduler);
observableProto.delay = function () {
if (typeof arguments[0] === 'number' || arguments[0] instanceof Date) {
var dueTime = arguments[0], scheduler = arguments[1];
isScheduler(scheduler) || (scheduler = timeoutScheduler);
return dueTime instanceof Date ?
observableDelayAbsolute(this, dueTime, scheduler) :
observableDelayRelative(this, dueTime, scheduler);
} else if (isFunction(arguments[0])) {
return delayWithSelector(this, arguments[0], arguments[1]);
} else {
throw new Error('Invalid arguments');
}
};
/**
* Ignores values from an observable sequence which are followed by another value before dueTime.
* @param {Number} dueTime Duration of the debounce period for each value (specified as an integer denoting milliseconds).
* @param {Scheduler} [scheduler] Scheduler to run the debounce timers on. If not specified, the timeout scheduler is used.
* @returns {Observable} The debounced sequence.
*/
observableProto.debounce = function (dueTime, scheduler) {
function debounce(source, dueTime, scheduler) {
isScheduler(scheduler) || (scheduler = timeoutScheduler);
var source = this;
return new AnonymousObservable(function (observer) {

@@ -297,10 +346,59 @@ var cancelable = new SerialDisposable(), hasvalue = false, value, id = 0;

}, this);
};
}
/**
* @deprecated use #debounce or #throttleWithTimeout instead.
*/
observableProto.throttle = function(dueTime, scheduler) {
//deprecate('throttle', 'debounce or throttleWithTimeout');
return this.debounce(dueTime, scheduler);
function debounceWithSelector(source, durationSelector) {
return new AnonymousObservable(function (o) {
var value, hasValue = false, cancelable = new SerialDisposable(), id = 0;
var subscription = source.subscribe(
function (x) {
var throttle = tryCatch(durationSelector)(x);
if (throttle === errorObj) { return o.onError(throttle.e); }
isPromise(throttle) && (throttle = observableFromPromise(throttle));
hasValue = true;
value = x;
id++;
var currentid = id, d = new SingleAssignmentDisposable();
cancelable.setDisposable(d);
d.setDisposable(throttle.subscribe(
function () {
hasValue && id === currentid && o.onNext(value);
hasValue = false;
d.dispose();
},
function (e) { o.onError(e); },
function () {
hasValue && id === currentid && o.onNext(value);
hasValue = false;
d.dispose();
}
));
},
function (e) {
cancelable.dispose();
o.onError(e);
hasValue = false;
id++;
},
function () {
cancelable.dispose();
hasValue && o.onNext(value);
o.onCompleted();
hasValue = false;
id++;
}
);
return new CompositeDisposable(subscription, cancelable);
}, source);
}
observableProto.debounce = function () {
if (isFunction (arguments[0])) {
return debounceWithSelector(this, arguments[0]);
} else if (typeof arguments[0] === 'number') {
return debounce(this, arguments[0], arguments[1]);
} else {
throw new Error('Invalid arguments');
}
};

@@ -566,18 +664,74 @@

/**
* Returns the source observable sequence or the other observable sequence if dueTime elapses.
* @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) when a timeout occurs.
* @param {Observable} [other] Sequence to return in case of a timeout. If not specified, a timeout error throwing sequence will be used.
* @param {Scheduler} [scheduler] Scheduler to run the timeout timers on. If not specified, the timeout scheduler is used.
* @returns {Observable} The source sequence switching to the other sequence in case of a timeout.
*/
observableProto.timeout = function (dueTime, other, scheduler) {
(other == null || typeof other === 'string') && (other = observableThrow(new Error(other || 'Timeout')));
var TimeoutError = Rx.TimeoutError = function(message) {
this.message = message || 'Timeout has occurred';
this.name = 'TimeoutError';
Error.call(this);
};
TimeoutError.prototype = Object.create(Error.prototype);
function timeoutWithSelector(source, firstTimeout, timeoutDurationSelector, other) {
if (isFunction(firstTimeout)) {
other = timeoutDurationSelector;
timeoutDurationSelector = firstTimeout;
firstTimeout = observableNever();
}
other || (other = observableThrow(new TimeoutError()));
return new AnonymousObservable(function (o) {
var subscription = new SerialDisposable(), timer = new SerialDisposable(), original = new SingleAssignmentDisposable();
subscription.setDisposable(original);
var id = 0, switched = false;
function setTimer(timeout) {
var myId = id, d = new SingleAssignmentDisposable();
timer.setDisposable(d);
d.setDisposable(timeout.subscribe(function () {
id === myId && subscription.setDisposable(other.subscribe(o));
d.dispose();
}, function (e) {
id === myId && o.onError(e);
}, function () {
id === myId && subscription.setDisposable(other.subscribe(o));
}));
};
setTimer(firstTimeout);
function oWins() {
var res = !switched;
if (res) { id++; }
return res;
}
original.setDisposable(source.subscribe(function (x) {
if (oWins()) {
o.onNext(x);
var timeout = tryCatch(timeoutDurationSelector)(x);
if (timeout === errorObj) { return o.onError(timeout.e); }
setTimer(isPromise(timeout) ? observableFromPromise(timeout) : timeout);
}
}, function (e) {
oWins() && o.onError(e);
}, function () {
oWins() && o.onCompleted();
}));
return new CompositeDisposable(subscription, timer);
}, source);
}
function timeout(source, dueTime, other, scheduler) {
if (other == null) { throw new Error('other or scheduler must be specified'); }
if (isScheduler(other)) {
scheduler = other;
other = observableThrow(new TimeoutError());
}
if (other instanceof Error) { other = observableThrow(other); }
isScheduler(scheduler) || (scheduler = timeoutScheduler);
var source = this, schedulerMethod = dueTime instanceof Date ?
var schedulerMethod = dueTime instanceof Date ?
'scheduleWithAbsolute' :
'scheduleWithRelative';
return new AnonymousObservable(function (observer) {
return new AnonymousObservable(function (o) {
var id = 0,

@@ -596,3 +750,3 @@ original = new SingleAssignmentDisposable(),

isPromise(other) && (other = observableFromPromise(other));
subscription.setDisposable(other.subscribe(observer));
subscription.setDisposable(other.subscribe(o));
}

@@ -607,3 +761,3 @@ }));

id++;
observer.onNext(x);
o.onNext(x);
createTimer();

@@ -614,3 +768,3 @@ }

id++;
observer.onError(e);
o.onError(e);
}

@@ -620,3 +774,3 @@ }, function () {

id++;
observer.onCompleted();
o.onCompleted();
}

@@ -626,2 +780,13 @@ }));

}, source);
}
observableProto.timeout = function () {
var firstArg = arguments[0];
if (firstArg instanceof Date || typeof firstArg === 'number') {
return timeout(this, firstArg, arguments[1], arguments[2]);
} else if (Observable.isObservable(firstArg) || isFunction(firstArg)) {
return timeoutWithSelector(this, firstArg, arguments[1], arguments[2]);
} else {
throw new Error('Invalid arguments');
}
};

@@ -758,190 +923,2 @@

/**
* Time shifts the observable sequence based on a subscription delay and a delay selector function for each element.
*
* @example
* 1 - res = source.delayWithSelector(function (x) { return Rx.Scheduler.timer(5000); }); // with selector only
* 1 - res = source.delayWithSelector(Rx.Observable.timer(2000), function (x) { return Rx.Observable.timer(x); }); // with delay and selector
*
* @param {Observable} [subscriptionDelay] Sequence indicating the delay for the subscription to the source.
* @param {Function} delayDurationSelector Selector function to retrieve a sequence indicating the delay for each given element.
* @returns {Observable} Time-shifted sequence.
*/
observableProto.delayWithSelector = function (subscriptionDelay, delayDurationSelector) {
var source = this, subDelay, selector;
if (isFunction(subscriptionDelay)) {
selector = subscriptionDelay;
} else {
subDelay = subscriptionDelay;
selector = delayDurationSelector;
}
return new AnonymousObservable(function (observer) {
var delays = new CompositeDisposable(), atEnd = false, subscription = new SerialDisposable();
function start() {
subscription.setDisposable(source.subscribe(
function (x) {
var delay = tryCatch(selector)(x);
if (delay === errorObj) { return observer.onError(delay.e); }
var d = new SingleAssignmentDisposable();
delays.add(d);
d.setDisposable(delay.subscribe(
function () {
observer.onNext(x);
delays.remove(d);
done();
},
function (e) { observer.onError(e); },
function () {
observer.onNext(x);
delays.remove(d);
done();
}
))
},
function (e) { observer.onError(e); },
function () {
atEnd = true;
subscription.dispose();
done();
}
))
}
function done () {
atEnd && delays.length === 0 && observer.onCompleted();
}
if (!subDelay) {
start();
} else {
subscription.setDisposable(subDelay.subscribe(start, function (e) { observer.onError(e); }, start));
}
return new CompositeDisposable(subscription, delays);
}, this);
};
/**
* Returns the source observable sequence, switching to the other observable sequence if a timeout is signaled.
* @param {Observable} [firstTimeout] Observable sequence that represents the timeout for the first element. If not provided, this defaults to Observable.never().
* @param {Function} timeoutDurationSelector Selector to retrieve an observable sequence that represents the timeout between the current element and the next element.
* @param {Observable} [other] Sequence to return in case of a timeout. If not provided, this is set to Observable.throwException().
* @returns {Observable} The source sequence switching to the other sequence in case of a timeout.
*/
observableProto.timeoutWithSelector = function (firstTimeout, timeoutdurationSelector, other) {
if (arguments.length === 1) {
timeoutdurationSelector = firstTimeout;
firstTimeout = observableNever();
}
other || (other = observableThrow(new Error('Timeout')));
var source = this;
return new AnonymousObservable(function (observer) {
var subscription = new SerialDisposable(), timer = new SerialDisposable(), original = new SingleAssignmentDisposable();
subscription.setDisposable(original);
var id = 0, switched = false;
function setTimer(timeout) {
var myId = id;
function timerWins () {
return id === myId;
}
var d = new SingleAssignmentDisposable();
timer.setDisposable(d);
d.setDisposable(timeout.subscribe(function () {
timerWins() && subscription.setDisposable(other.subscribe(observer));
d.dispose();
}, function (e) {
timerWins() && observer.onError(e);
}, function () {
timerWins() && subscription.setDisposable(other.subscribe(observer));
}));
};
setTimer(firstTimeout);
function observerWins() {
var res = !switched;
if (res) { id++; }
return res;
}
original.setDisposable(source.subscribe(function (x) {
if (observerWins()) {
observer.onNext(x);
var timeout;
try {
timeout = timeoutdurationSelector(x);
} catch (e) {
observer.onError(e);
return;
}
setTimer(isPromise(timeout) ? observableFromPromise(timeout) : timeout);
}
}, function (e) {
observerWins() && observer.onError(e);
}, function () {
observerWins() && observer.onCompleted();
}));
return new CompositeDisposable(subscription, timer);
}, source);
};
/**
* Ignores values from an observable sequence which are followed by another value within a computed throttle duration.
* @param {Function} durationSelector Selector function to retrieve a sequence indicating the throttle duration for each given element.
* @returns {Observable} The debounced sequence.
*/
observableProto.debounceWithSelector = function (durationSelector) {
var source = this;
return new AnonymousObservable(function (o) {
var value, hasValue = false, cancelable = new SerialDisposable(), id = 0;
var subscription = source.subscribe(
function (x) {
var throttle = tryCatch(durationSelector)(x);
if (throttle === errorObj) { return o.onError(throttle.e); }
isPromise(throttle) && (throttle = observableFromPromise(throttle));
hasValue = true;
value = x;
id++;
var currentid = id, d = new SingleAssignmentDisposable();
cancelable.setDisposable(d);
d.setDisposable(throttle.subscribe(
function () {
hasValue && id === currentid && o.onNext(value);
hasValue = false;
d.dispose();
},
function (e) { o.onError(e); },
function () {
hasValue && id === currentid && o.onNext(value);
hasValue = false;
d.dispose();
}
));
},
function (e) {
cancelable.dispose();
o.onError(e);
hasValue = false;
id++;
},
function () {
cancelable.dispose();
hasValue && o.onNext(value);
o.onCompleted();
hasValue = false;
id++;
}
);
return new CompositeDisposable(subscription, cancelable);
}, source);
};
/**
* Skips elements for the specified duration from the end of the observable source sequence, using the specified scheduler to run timers.

@@ -1145,3 +1122,3 @@ *

*/
observableProto.throttleFirst = function (windowDuration, scheduler) {
observableProto.throttle = function (windowDuration, scheduler) {
isScheduler(scheduler) || (scheduler = timeoutScheduler);

@@ -1148,0 +1125,0 @@ var duration = +windowDuration || 0;

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(){try{return o.apply(this,arguments)}catch(a){return I.e=a,I}}function f(a){if(!F(a))throw new TypeError("fn must be a function");return o=a,e}function g(a,b){return new r(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function h(a,b,c){return new r(function(d){var e=a,f=C(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function i(a,b){return new r(function(c){return b.scheduleWithRelative(C(a),function(){c.onNext(0),c.onCompleted()})})}function j(a,b,c){return a===b?new r(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):s(function(){return h(c.now()+a,b,c)})}function k(a,b,c){return new r(function(d){var e,f=!1,g=new x,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new w,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new y(e,g)},a)}function l(a,b,c){return s(function(){return k(a,b-c.now(),c)})}function m(a){return a.toArray()}function m(a){return a.toArray()}function n(a,b){return new r(function(c){function d(){g&&(g=!1,c.onNext(e)),f&&c.onCompleted()}var e,f=!1,g=!1,h=new w;return h.setDisposable(a.subscribe(function(a){g=!0,e=a},function(a){c.onError(a)},function(){f=!0,h.dispose()})),new y(h,b.subscribe(d,function(a){c.onError(a)},d))},a)}var o,p=c.Observable,q=p.prototype,r=c.AnonymousObservable,s=p.defer,t=(p.empty,p.never),u=p["throw"],v=(p.fromArray,c.Scheduler["default"]),w=c.SingleAssignmentDisposable,x=c.SerialDisposable,y=c.CompositeDisposable,z=c.RefCountDisposable,A=c.Subject,B=c.internals.addRef,C=c.Scheduler.normalize,D=c.helpers,E=D.isPromise,F=D.isFunction,G=c.Scheduler.isScheduler,H=p.fromPromise,I={e:{}},J=p.interval=function(a,b){return j(a,a,G(b)?b:v)};p.timer=function(a,b,c){var e;return G(c)||(c=v),null!=b&&"number"==typeof b?e=b:G(b)&&(c=b),a instanceof Date&&e===d?g(a.getTime(),c):a instanceof Date&&e!==d?h(a.getTime(),b,c):e===d?i(a,c):j(a,e,c)};return q.delay=function(a,b){return G(b)||(b=v),a instanceof Date?l(this,a.getTime(),b):k(this,a,b)},q.debounce=function(a,b){G(b)||(b=v);var c=this;return new r(function(d){var e,f=new x,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new w;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new y(i,f)},this)},q.throttle=function(a,b){return this.debounce(a,b)},q.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),G(c)||(c=v),"number"==typeof b?d=b:G(b)&&(d=a,c=b),new r(function(b){function f(){var a=new w,e=!1,g=!1;l.setDisposable(a),j===i?(e=!0,g=!0):i>j?e=!0:g=!0;var n=e?j:i,o=n-m;m=n,e&&(j+=d),g&&(i+=d),a.setDisposable(c.scheduleWithRelative(o,function(){if(g){var a=new A;k.push(a),b.onNext(B(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new x,m=0;return g=new y(l),h=new z(g),k.push(new A),b.onNext(B(k[0],h)),f(),g.add(e.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h},e)},q.windowWithTimeOrCount=function(a,b,c){var d=this;return G(c)||(c=v),new r(function(e){function f(b){var d=new w;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new A,e.onNext(B(l,i)),f(a)}}))}var g=new x,h=new y(g),i=new z(h),j=0,k=0,l=new A;return e.onNext(B(l,i)),f(0),h.add(d.subscribe(function(a){var c=0,d=!1;l.onNext(a),++j===b&&(d=!0,j=0,c=++k,l.onCompleted(),l=new A,e.onNext(B(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},q.bufferWithTime=function(a,b,c){return this.windowWithTime(a,b,c).flatMap(m)},q.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).flatMap(m)},q.timeInterval=function(a){var b=this;return G(a)||(a=v),s(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},q.timestamp=function(a){return G(a)||(a=v),this.map(function(b){return{value:b,timestamp:a.now()}})},q.sample=q.throttleLatest=function(a,b){return G(b)||(b=v),"number"==typeof a?n(this,J(a,b)):n(this,a)},q.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=u(new Error(b||"Timeout"))),G(c)||(c=v);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new r(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(E(b)&&(b=H(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new w,j=new x,k=!1,l=new x;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new y(j,l)},d)},p.generateWithAbsoluteTime=function(a,b,c,d,e,f){return G(f)||(f=v),new r(function(g){var h=!0,i=!1;return f.scheduleRecursiveWithAbsoluteAndState(a,f.now(),function(a,f){i&&g.onNext(a);try{if(h?h=!1:a=c(a),i=b(a))var j=d(a),k=e(a)}catch(l){return void g.onError(l)}i?f(j,k):g.onCompleted()})})},p.generateWithRelativeTime=function(a,b,c,d,e,f){return G(f)||(f=v),new r(function(g){var h=!0,i=!1;return f.scheduleRecursiveWithRelativeAndState(a,0,function(a,f){i&&g.onNext(a);try{if(h?h=!1:a=c(a),i=b(a))var j=d(a),k=e(a)}catch(l){return void g.onError(l)}i?f(j,k):g.onCompleted()})})},q.delaySubscription=function(a,b){var c=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative",d=this;return G(b)||(b=v),new r(function(e){var f=new x;return f.setDisposable(b[c](a,function(){f.setDisposable(d.subscribe(e))})),f},this)},q.delayWithSelector=function(a,b){var c,d,e=this;return F(a)?d=a:(c=a,d=b),new r(function(a){function b(){j.setDisposable(e.subscribe(function(b){var c=f(d)(b);if(c===I)return a.onError(c.e);var e=new w;h.add(e),e.setDisposable(c.subscribe(function(){a.onNext(b),h.remove(e),g()},function(b){a.onError(b)},function(){a.onNext(b),h.remove(e),g()}))},function(b){a.onError(b)},function(){i=!0,j.dispose(),g()}))}function g(){i&&0===h.length&&a.onCompleted()}var h=new y,i=!1,j=new x;return c?j.setDisposable(c.subscribe(b,function(b){a.onError(b)},b)):b(),new y(j,h)},this)},q.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=t()),c||(c=u(new Error("Timeout")));var d=this;return new r(function(e){function f(a){function b(){return k===d}var d=k,f=new w;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new x,i=new x,j=new w;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(E(c)?H(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new y(h,i)},d)},q.debounceWithSelector=function(a){var b=this;return new r(function(c){var d,e=!1,g=new x,h=0,i=b.subscribe(function(b){var i=f(a)(b);if(i===I)return c.onError(i.e);E(i)&&(i=H(i)),e=!0,d=b,h++;var j=h,k=new w;g.setDisposable(k),k.setDisposable(i.subscribe(function(){e&&h===j&&c.onNext(d),e=!1,k.dispose()},function(a){c.onError(a)},function(){e&&h===j&&c.onNext(d),e=!1,k.dispose()}))},function(a){g.dispose(),c.onError(a),e=!1,h++},function(){g.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,h++});return new y(i,g)},b)},q.skipLastWithTime=function(a,b){G(b)||(b=v);var c=this;return new r(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})},c)},q.takeLastWithTime=function(a,b){var c=this;return G(b)||(b=v),new r(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})},c)},q.takeLastBufferWithTime=function(a,b){var c=this;return G(b)||(b=v),new r(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})},c)},q.takeWithTime=function(a,b){var c=this;return G(b)||(b=v),new r(function(d){return new y(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},q.skipWithTime=function(a,b){var c=this;return G(b)||(b=v),new r(function(d){var e=!1;return new y(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))},c)},q.skipUntilWithTime=function(a,b){G(b)||(b=v);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new r(function(e){var f=!1;return new y(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},q.takeUntilWithTime=function(a,b){G(b)||(b=v);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new r(function(e){return new y(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},q.throttleFirst=function(a,b){G(b)||(b=v);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new r(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)},c});
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return L.e=b,L}}}function f(a,b){return new u(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function g(a,b,c){return new u(function(d){var e=a,f=F(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function h(a,b){return new u(function(c){return b.scheduleWithRelative(F(a),function(){c.onNext(0),c.onCompleted()})})}function i(a,b,c){return a===b?new u(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):v(function(){return g(c.now()+a,b,c)})}function j(a,b,c){return new u(function(d){var e,f=!1,g=new A,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new z,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new B(e,g)},a)}function k(a,b,c){return v(function(){return j(a,b-c.now(),c)})}function l(a,b,c){var d,e;return I(b)?e=b:(d=b,e=c),new u(function(b){function c(){i.setDisposable(a.subscribe(function(a){var c=M(e)(a);if(c===L)return b.onError(c.e);var d=new z;g.add(d),d.setDisposable(c.subscribe(function(){b.onNext(a),g.remove(d),f()},function(a){b.onError(a)},function(){b.onNext(a),g.remove(d),f()}))},function(a){b.onError(a)},function(){h=!0,i.dispose(),f()}))}function f(){h&&0===g.length&&b.onCompleted()}var g=new B,h=!1,i=new A;return d?i.setDisposable(d.subscribe(c,function(a){b.onError(a)},c)):c(),new B(i,g)},this)}function m(a,b,c){return J(c)||(c=y),new u(function(d){var e,f=new A,g=!1,h=0,i=a.subscribe(function(a){g=!0,e=a,h++;var i=h,j=new z;f.setDisposable(j),j.setDisposable(c.scheduleWithRelative(b,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new B(i,f)},this)}function n(a,b){return new u(function(c){var d,e=!1,f=new A,g=0,h=a.subscribe(function(a){var h=M(b)(a);if(h===L)return c.onError(h.e);H(h)&&(h=K(h)),e=!0,d=a,g++;var i=g,j=new z;f.setDisposable(j),j.setDisposable(h.subscribe(function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()},function(a){c.onError(a)},function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new B(h,f)},a)}function o(a){return a.toArray()}function o(a){return a.toArray()}function p(a,b){return new u(function(c){function d(){g&&(g=!1,c.onNext(e)),f&&c.onCompleted()}var e,f=!1,g=!1,h=new z;return h.setDisposable(a.subscribe(function(a){g=!0,e=a},function(a){c.onError(a)},function(){f=!0,h.dispose()})),new B(h,b.subscribe(d,function(a){c.onError(a)},d))},a)}function q(a,b,c,d){return I(b)&&(d=c,c=b,b=w()),d||(d=x(new O)),new u(function(e){function f(a){var b=k,c=new z;i.setDisposable(c),c.setDisposable(a.subscribe(function(){k===b&&h.setDisposable(d.subscribe(e)),c.dispose()},function(a){k===b&&e.onError(a)},function(){k===b&&h.setDisposable(d.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new A,i=new A,j=new z;h.setDisposable(j);var k=0,l=!1;return f(b),j.setDisposable(a.subscribe(function(a){if(g()){e.onNext(a);var b=M(c)(a);if(b===L)return e.onError(b.e);f(H(b)?K(b):b)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new B(h,i)},a)}function r(a,b,c,d){if(null==c)throw new Error("other or scheduler must be specified");J(c)&&(d=c,c=x(new O)),c instanceof Error&&(c=x(c)),J(d)||(d=y);var e=b instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new u(function(f){function g(){var a=h;l.setDisposable(d[e](b,function(){h===a&&(H(c)&&(c=K(c)),j.setDisposable(c.subscribe(f)))}))}var h=0,i=new z,j=new A,k=!1,l=new A;return j.setDisposable(i),g(),i.setDisposable(a.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new B(j,l)},a)}var s=c.Observable,t=s.prototype,u=c.AnonymousObservable,v=s.defer,w=(s.empty,s.never),x=s["throw"],y=(s.fromArray,c.Scheduler["default"]),z=c.SingleAssignmentDisposable,A=c.SerialDisposable,B=c.CompositeDisposable,C=c.RefCountDisposable,D=c.Subject,E=c.internals.addRef,F=c.Scheduler.normalize,G=c.helpers,H=G.isPromise,I=G.isFunction,J=c.Scheduler.isScheduler,K=s.fromPromise,L={e:{}},M=c.internals.tryCatch=function(a){if(!I(a))throw new TypeError("fn must be a function");return e(a)},N=s.interval=function(a,b){return i(a,a,J(b)?b:y)};s.timer=function(a,b,c){var e;return J(c)||(c=y),null!=b&&"number"==typeof b?e=b:J(b)&&(c=b),a instanceof Date&&e===d?f(a.getTime(),c):a instanceof Date&&e!==d?g(a.getTime(),b,c):e===d?h(a,c):i(a,e,c)};t.delay=function(){if("number"==typeof arguments[0]||arguments[0]instanceof Date){var a=arguments[0],b=arguments[1];return J(b)||(b=y),a instanceof Date?k(this,a,b):j(this,a,b)}if(I(arguments[0]))return l(this,arguments[0],arguments[1]);throw new Error("Invalid arguments")},t.debounce=function(){if(I(arguments[0]))return n(this,arguments[0]);if("number"==typeof arguments[0])return m(this,arguments[0],arguments[1]);throw new Error("Invalid arguments")},t.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),J(c)||(c=y),"number"==typeof b?d=b:J(b)&&(d=a,c=b),new u(function(b){function f(){var a=new z,e=!1,g=!1;l.setDisposable(a),j===i?(e=!0,g=!0):i>j?e=!0:g=!0;var n=e?j:i,o=n-m;m=n,e&&(j+=d),g&&(i+=d),a.setDisposable(c.scheduleWithRelative(o,function(){if(g){var a=new D;k.push(a),b.onNext(E(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new A,m=0;return g=new B(l),h=new C(g),k.push(new D),b.onNext(E(k[0],h)),f(),g.add(e.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h},e)},t.windowWithTimeOrCount=function(a,b,c){var d=this;return J(c)||(c=y),new u(function(e){function f(b){var d=new z;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new D,e.onNext(E(l,i)),f(a)}}))}var g=new A,h=new B(g),i=new C(h),j=0,k=0,l=new D;return e.onNext(E(l,i)),f(0),h.add(d.subscribe(function(a){var c=0,d=!1;l.onNext(a),++j===b&&(d=!0,j=0,c=++k,l.onCompleted(),l=new D,e.onNext(E(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},t.bufferWithTime=function(a,b,c){return this.windowWithTime(a,b,c).flatMap(o)},t.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).flatMap(o)},t.timeInterval=function(a){var b=this;return J(a)||(a=y),v(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},t.timestamp=function(a){return J(a)||(a=y),this.map(function(b){return{value:b,timestamp:a.now()}})},t.sample=t.throttleLatest=function(a,b){return J(b)||(b=y),"number"==typeof a?p(this,N(a,b)):p(this,a)};var O=c.TimeoutError=function(a){this.message=a||"Timeout has occurred",this.name="TimeoutError",Error.call(this)};return O.prototype=Object.create(Error.prototype),t.timeout=function(){var a=arguments[0];if(a instanceof Date||"number"==typeof a)return r(this,a,arguments[1],arguments[2]);if(s.isObservable(a)||I(a))return q(this,a,arguments[1],arguments[2]);throw new Error("Invalid arguments")},s.generateWithAbsoluteTime=function(a,b,c,d,e,f){return J(f)||(f=y),new u(function(g){var h=!0,i=!1;return f.scheduleRecursiveWithAbsoluteAndState(a,f.now(),function(a,f){i&&g.onNext(a);try{if(h?h=!1:a=c(a),i=b(a))var j=d(a),k=e(a)}catch(l){return void g.onError(l)}i?f(j,k):g.onCompleted()})})},s.generateWithRelativeTime=function(a,b,c,d,e,f){return J(f)||(f=y),new u(function(g){var h=!0,i=!1;return f.scheduleRecursiveWithRelativeAndState(a,0,function(a,f){i&&g.onNext(a);try{if(h?h=!1:a=c(a),i=b(a))var j=d(a),k=e(a)}catch(l){return void g.onError(l)}i?f(j,k):g.onCompleted()})})},t.delaySubscription=function(a,b){var c=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative",d=this;return J(b)||(b=y),new u(function(e){var f=new A;return f.setDisposable(b[c](a,function(){f.setDisposable(d.subscribe(e))})),f},this)},t.skipLastWithTime=function(a,b){J(b)||(b=y);var c=this;return new u(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})},c)},t.takeLastWithTime=function(a,b){var c=this;return J(b)||(b=y),new u(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})},c)},t.takeLastBufferWithTime=function(a,b){var c=this;return J(b)||(b=y),new u(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})},c)},t.takeWithTime=function(a,b){var c=this;return J(b)||(b=y),new u(function(d){return new B(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},t.skipWithTime=function(a,b){var c=this;return J(b)||(b=y),new u(function(d){var e=!1;return new B(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))},c)},t.skipUntilWithTime=function(a,b){J(b)||(b=y);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new u(function(e){var f=!1;return new B(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},t.takeUntilWithTime=function(a,b){J(b)||(b=y);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new u(function(e){return new B(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},t.throttle=function(a,b){J(b)||(b=y);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new u(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)},c});
//# sourceMappingURL=rx.time.map

@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

@@ -5,3 +5,3 @@ {

"description": "Library for composing asynchronous and event-based operations in JavaScript",
"version": "3.1.1",
"version": "3.1.2",
"homepage": "https://github.com/Reactive-Extensions/RxJS",

@@ -8,0 +8,0 @@ "author": {

@@ -59,3 +59,3 @@ [![Build Status](https://travis-ci.org/Reactive-Extensions/RxJS.png)](https://travis-ci.org/Reactive-Extensions/RxJS)

Now what if this data were to come as some sort of event, for example a stream, such as as a WebSocket, then we could pretty much write the same query to iterate our data, with very little change.
Now what if this data were to come as some sort of event, for example a stream, such as a WebSocket, then we could pretty much write the same query to iterate our data, with very little change.

@@ -62,0 +62,0 @@ ```js

@@ -6,3 +6,3 @@ var EmptyError = Rx.EmptyError = function() {

};
EmptyError.prototype = Error.prototype;
EmptyError.prototype = Object.create(Error.prototype);

@@ -14,3 +14,3 @@ var ObjectDisposedError = Rx.ObjectDisposedError = function() {

};
ObjectDisposedError.prototype = Error.prototype;
ObjectDisposedError.prototype = Object.create(Error.prototype);

@@ -22,3 +22,3 @@ var ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError = function () {

};
ArgumentOutOfRangeError.prototype = Error.prototype;
ArgumentOutOfRangeError.prototype = Object.create(Error.prototype);

@@ -30,3 +30,3 @@ var NotSupportedError = Rx.NotSupportedError = function (message) {

};
NotSupportedError.prototype = Error.prototype;
NotSupportedError.prototype = Object.create(Error.prototype);

@@ -38,3 +38,3 @@ var NotImplementedError = Rx.NotImplementedError = function (message) {

};
NotImplementedError.prototype = Error.prototype;
NotImplementedError.prototype = Object.create(Error.prototype);

@@ -41,0 +41,0 @@ var notImplemented = Rx.helpers.notImplemented = function () {

// Utilities
var slice = Array.prototype.slice,
toString = Object.prototype.toString;
if (!Function.prototype.bind) {

@@ -30,3 +33,3 @@ Function.prototype.bind = function (that) {

if (this == null) {
throw new TypeError(" this is null or not defined");
throw new TypeError(' this is null or not defined');
}

@@ -37,4 +40,4 @@

if (typeof callback !== "function") {
throw new TypeError(callback + " is not a function");
if (typeof callback !== 'function') {
throw new TypeError(callback + ' is not a function');
}

@@ -58,9 +61,9 @@

var boxedString = Object("a"),
splitString = boxedString[0] != "a" || !(0 in boxedString);
var boxedString = Object('a'),
splitString = boxedString[0] !== 'a' || !(0 in boxedString);
if (!Array.prototype.every) {
Array.prototype.every = function every(fun /*, thisp */) {
var object = Object(this),
self = splitString && {}.toString.call(this) == stringClass ?
this.split("") :
self = splitString && toString.call(this) === stringClass ?
this.split('') :
object,

@@ -70,4 +73,4 @@ length = self.length >>> 0,

if ({}.toString.call(fun) != funcClass) {
throw new TypeError(fun + " is not a function");
if (toString.call(fun) !== funcClass) {
throw new TypeError(fun + ' is not a function');
}

@@ -87,11 +90,11 @@

var object = Object(this),
self = splitString && {}.toString.call(this) == stringClass ?
this.split("") :
self = splitString && toString.call(this) === stringClass ?
this.split('') :
object,
length = self.length >>> 0,
result = Array(length),
result = new Array(length),
thisp = arguments[1];
if ({}.toString.call(fun) != funcClass) {
throw new TypeError(fun + " is not a function");
if (toString.call(fun) !== funcClass) {
throw new TypeError(fun + ' is not a function');
}

@@ -123,3 +126,3 @@

Array.isArray = function (arg) {
return {}.toString.call(arg) == arrayClass;
return toString.call(arg) === arrayClass;
};

@@ -140,3 +143,3 @@ }

n = 0;
} else if (n !== 0 && n != Infinity && n !== -Infinity) {
} else if (n !== 0 && n !== Infinity && n !== -Infinity) {
n = (n > 0 || -1) * Math.floor(Math.abs(n));

@@ -196,1 +199,34 @@ }

}
if (typeof Object.create !== 'function') {
// Production steps of ECMA-262, Edition 5, 15.2.3.5
// Reference: http://es5.github.io/#x15.2.3.5
Object.create = (function() {
function Temp() {}
var hasOwn = Object.prototype.hasOwnProperty;
return function (O) {
if (typeof O !== 'object') {
throw new TypeError('Object prototype may only be an Object or null');
}
Temp.prototype = O;
var obj = new Temp();
Temp.prototype = null;
if (arguments.length > 1) {
// Object.defineProperties does ToObject on its first argument.
var Properties = Object(arguments[1]);
for (var prop in Properties) {
if (hasOwn.call(Properties, prop)) {
obj[prop] = Properties[prop];
}
}
}
// 5. Return obj
return obj;
};
})();
}
var errorObj = {e: {}};
var tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
function tryCatch(fn) {
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
tryCatchTarget = fn;
return tryCatcher;
return tryCatcherGen(fn);
}

@@ -16,0 +16,0 @@ function thrower(e) {

@@ -1,10 +0,3 @@

/**
* Ignores values from an observable sequence which are followed by another value before dueTime.
* @param {Number} dueTime Duration of the debounce period for each value (specified as an integer denoting milliseconds).
* @param {Scheduler} [scheduler] Scheduler to run the debounce timers on. If not specified, the timeout scheduler is used.
* @returns {Observable} The debounced sequence.
*/
observableProto.debounce = function (dueTime, scheduler) {
function debounce(source, dueTime, scheduler) {
isScheduler(scheduler) || (scheduler = timeoutScheduler);
var source = this;
return new AnonymousObservable(function (observer) {

@@ -40,10 +33,59 @@ var cancelable = new SerialDisposable(), hasvalue = false, value, id = 0;

}, this);
};
}
/**
* @deprecated use #debounce or #throttleWithTimeout instead.
*/
observableProto.throttle = function(dueTime, scheduler) {
//deprecate('throttle', 'debounce or throttleWithTimeout');
return this.debounce(dueTime, scheduler);
function debounceWithSelector(source, durationSelector) {
return new AnonymousObservable(function (o) {
var value, hasValue = false, cancelable = new SerialDisposable(), id = 0;
var subscription = source.subscribe(
function (x) {
var throttle = tryCatch(durationSelector)(x);
if (throttle === errorObj) { return o.onError(throttle.e); }
isPromise(throttle) && (throttle = observableFromPromise(throttle));
hasValue = true;
value = x;
id++;
var currentid = id, d = new SingleAssignmentDisposable();
cancelable.setDisposable(d);
d.setDisposable(throttle.subscribe(
function () {
hasValue && id === currentid && o.onNext(value);
hasValue = false;
d.dispose();
},
function (e) { o.onError(e); },
function () {
hasValue && id === currentid && o.onNext(value);
hasValue = false;
d.dispose();
}
));
},
function (e) {
cancelable.dispose();
o.onError(e);
hasValue = false;
id++;
},
function () {
cancelable.dispose();
hasValue && o.onNext(value);
o.onCompleted();
hasValue = false;
id++;
}
);
return new CompositeDisposable(subscription, cancelable);
}, source);
}
observableProto.debounce = function () {
if (isFunction (arguments[0])) {
return debounceWithSelector(this, arguments[0]);
} else if (typeof arguments[0] === 'number') {
return debounce(this, arguments[0], arguments[1]);
} else {
throw new Error('Invalid arguments');
}
};

@@ -1,3 +0,3 @@

function observableDelayTimeSpan(source, dueTime, scheduler) {
return new AnonymousObservable(function (observer) {
function observableDelayRelative(source, dueTime, scheduler) {
return new AnonymousObservable(function (o) {
var active = false,

@@ -23,3 +23,3 @@ cancelable = new SerialDisposable(),

if (exception !== null) {
observer.onError(exception);
o.onError(exception);
} else {

@@ -40,3 +40,3 @@ d = new SingleAssignmentDisposable();

if (result !== null) {
result.accept(observer);
result.accept(o);
}

@@ -55,3 +55,3 @@ } while (result !== null);

if (e !== null) {
observer.onError(e);
o.onError(e);
} else if (shouldRecurse) {

@@ -68,18 +68,67 @@ self(recurseDueTime);

function observableDelayDate(source, dueTime, scheduler) {
function observableDelayAbsolute(source, dueTime, scheduler) {
return observableDefer(function () {
return observableDelayTimeSpan(source, dueTime - scheduler.now(), scheduler);
return observableDelayRelative(source, dueTime - scheduler.now(), scheduler);
});
}
function delayWithSelector(source, subscriptionDelay, delayDurationSelector) {
var subDelay, selector;
if (isFunction(subscriptionDelay)) {
selector = subscriptionDelay;
} else {
subDelay = subscriptionDelay;
selector = delayDurationSelector;
}
return new AnonymousObservable(function (o) {
var delays = new CompositeDisposable(), atEnd = false, subscription = new SerialDisposable();
function start() {
subscription.setDisposable(source.subscribe(
function (x) {
var delay = tryCatch(selector)(x);
if (delay === errorObj) { return o.onError(delay.e); }
var d = new SingleAssignmentDisposable();
delays.add(d);
d.setDisposable(delay.subscribe(
function () {
o.onNext(x);
delays.remove(d);
done();
},
function (e) { o.onError(e); },
function () {
o.onNext(x);
delays.remove(d);
done();
}
));
},
function (e) { o.onError(e); },
function () {
atEnd = true;
subscription.dispose();
done();
}
));
}
function done () {
atEnd && delays.length === 0 && o.onCompleted();
}
if (!subDelay) {
start();
} else {
subscription.setDisposable(subDelay.subscribe(start, function (e) { o.onError(e); }, start));
}
return new CompositeDisposable(subscription, delays);
}, this);
}
/**
* Time shifts the observable sequence by dueTime. The relative time intervals between the values are preserved.
* Time shifts the observable sequence by dueTime.
* The relative time intervals between the values are preserved.
*
* @example
* 1 - res = Rx.Observable.delay(new Date());
* 2 - res = Rx.Observable.delay(new Date(), Rx.Scheduler.timeout);
*
* 3 - res = Rx.Observable.delay(5000);
* 4 - res = Rx.Observable.delay(5000, 1000, Rx.Scheduler.timeout);
* @memberOf Observable#
* @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) by which to shift the observable sequence.

@@ -89,7 +138,14 @@ * @param {Scheduler} [scheduler] Scheduler to run the delay timers on. If not specified, the timeout scheduler is used.

*/
observableProto.delay = function (dueTime, scheduler) {
isScheduler(scheduler) || (scheduler = timeoutScheduler);
return dueTime instanceof Date ?
observableDelayDate(this, dueTime.getTime(), scheduler) :
observableDelayTimeSpan(this, dueTime, scheduler);
observableProto.delay = function () {
if (typeof arguments[0] === 'number' || arguments[0] instanceof Date) {
var dueTime = arguments[0], scheduler = arguments[1];
isScheduler(scheduler) || (scheduler = timeoutScheduler);
return dueTime instanceof Date ?
observableDelayAbsolute(this, dueTime, scheduler) :
observableDelayRelative(this, dueTime, scheduler);
} else if (isFunction(arguments[0])) {
return delayWithSelector(this, arguments[0], arguments[1]);
} else {
throw new Error('Invalid arguments');
}
};

@@ -1,17 +0,73 @@

/**
* Returns the source observable sequence or the other observable sequence if dueTime elapses.
* @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) when a timeout occurs.
* @param {Observable} [other] Sequence to return in case of a timeout. If not specified, a timeout error throwing sequence will be used.
* @param {Scheduler} [scheduler] Scheduler to run the timeout timers on. If not specified, the timeout scheduler is used.
* @returns {Observable} The source sequence switching to the other sequence in case of a timeout.
*/
observableProto.timeout = function (dueTime, other, scheduler) {
(other == null || typeof other === 'string') && (other = observableThrow(new Error(other || 'Timeout')));
var TimeoutError = Rx.TimeoutError = function(message) {
this.message = message || 'Timeout has occurred';
this.name = 'TimeoutError';
Error.call(this);
};
TimeoutError.prototype = Object.create(Error.prototype);
function timeoutWithSelector(source, firstTimeout, timeoutDurationSelector, other) {
if (isFunction(firstTimeout)) {
other = timeoutDurationSelector;
timeoutDurationSelector = firstTimeout;
firstTimeout = observableNever();
}
other || (other = observableThrow(new TimeoutError()));
return new AnonymousObservable(function (o) {
var subscription = new SerialDisposable(), timer = new SerialDisposable(), original = new SingleAssignmentDisposable();
subscription.setDisposable(original);
var id = 0, switched = false;
function setTimer(timeout) {
var myId = id, d = new SingleAssignmentDisposable();
timer.setDisposable(d);
d.setDisposable(timeout.subscribe(function () {
id === myId && subscription.setDisposable(other.subscribe(o));
d.dispose();
}, function (e) {
id === myId && o.onError(e);
}, function () {
id === myId && subscription.setDisposable(other.subscribe(o));
}));
};
setTimer(firstTimeout);
function oWins() {
var res = !switched;
if (res) { id++; }
return res;
}
original.setDisposable(source.subscribe(function (x) {
if (oWins()) {
o.onNext(x);
var timeout = tryCatch(timeoutDurationSelector)(x);
if (timeout === errorObj) { return o.onError(timeout.e); }
setTimer(isPromise(timeout) ? observableFromPromise(timeout) : timeout);
}
}, function (e) {
oWins() && o.onError(e);
}, function () {
oWins() && o.onCompleted();
}));
return new CompositeDisposable(subscription, timer);
}, source);
}
function timeout(source, dueTime, other, scheduler) {
if (other == null) { throw new Error('other or scheduler must be specified'); }
if (isScheduler(other)) {
scheduler = other;
other = observableThrow(new TimeoutError());
}
if (other instanceof Error) { other = observableThrow(other); }
isScheduler(scheduler) || (scheduler = timeoutScheduler);
var source = this, schedulerMethod = dueTime instanceof Date ?
var schedulerMethod = dueTime instanceof Date ?
'scheduleWithAbsolute' :
'scheduleWithRelative';
return new AnonymousObservable(function (observer) {
return new AnonymousObservable(function (o) {
var id = 0,

@@ -30,3 +86,3 @@ original = new SingleAssignmentDisposable(),

isPromise(other) && (other = observableFromPromise(other));
subscription.setDisposable(other.subscribe(observer));
subscription.setDisposable(other.subscribe(o));
}

@@ -41,3 +97,3 @@ }));

id++;
observer.onNext(x);
o.onNext(x);
createTimer();

@@ -48,3 +104,3 @@ }

id++;
observer.onError(e);
o.onError(e);
}

@@ -54,3 +110,3 @@ }, function () {

id++;
observer.onCompleted();
o.onCompleted();
}

@@ -60,2 +116,13 @@ }));

}, source);
}
observableProto.timeout = function () {
var firstArg = arguments[0];
if (firstArg instanceof Date || typeof firstArg === 'number') {
return timeout(this, firstArg, arguments[1], arguments[2]);
} else if (Observable.isObservable(firstArg) || isFunction(firstArg)) {
return timeoutWithSelector(this, firstArg, arguments[1], arguments[2]);
} else {
throw new Error('Invalid arguments');
}
};

@@ -12,2 +12,9 @@ /// <reference path="../../observable.ts" />

debounce(dueTime: number, scheduler?: IScheduler): Observable<T>;
/**
* Ignores values from an observable sequence which are followed by another value within a computed throttle duration.
* @param {Function} durationSelector Selector function to retrieve a sequence indicating the throttle duration for each given element.
* @returns {Observable} The debounced sequence.
*/
debounce(debounceDurationSelector: (item: T) => ObservableOrPromise<number>): Observable<T>;
}

@@ -20,2 +27,3 @@ }

o.debounce(100, Rx.Scheduler.timeout);
o.debounce(x => Rx.Observable.just(x.length));
});

@@ -35,2 +35,28 @@ /// <reference path="../../observable.ts" />

delay(dueTime: number, scheduler?: IScheduler): Observable<T>;
/**
* Time shifts the observable sequence based on a subscription delay and a delay selector function for each element.
*
* @example
* 1 - res = source.delayWithSelector(function (x) { return Rx.Scheduler.timer(5000); }); // with selector only
* 1 - res = source.delayWithSelector(Rx.Observable.timer(2000), function (x) { return Rx.Observable.timer(x); }); // with delay and selector
*
* @param {Observable} [subscriptionDelay] Sequence indicating the delay for the subscription to the source.
* @param {Function} delayDurationSelector Selector function to retrieve a sequence indicating the delay for each given element.
* @returns {Observable} Time-shifted sequence.
*/
delay(delayDurationSelector: (item: T) => ObservableOrPromise<number>): Observable<T>;
/**
* Time shifts the observable sequence based on a subscription delay and a delay selector function for each element.
*
* @example
* 1 - res = source.delayWithSelector(function (x) { return Rx.Scheduler.timer(5000); }); // with selector only
* 1 - res = source.delayWithSelector(Rx.Observable.timer(2000), function (x) { return Rx.Observable.timer(x); }); // with delay and selector
*
* @param {Observable} [subscriptionDelay] Sequence indicating the delay for the subscription to the source.
* @param {Function} delayDurationSelector Selector function to retrieve a sequence indicating the delay for each given element.
* @returns {Observable} Time-shifted sequence.
*/
delay(subscriptionDelay: Observable<number>, delayDurationSelector: (item: T) => ObservableOrPromise<number>): Observable<T>;
}

@@ -45,2 +71,6 @@ }

o.delay(new Date(), Rx.Scheduler.timeout);
o.delay(x => Rx.Observable.timer(x.length));
o.delay(Rx.Observable.timer(1000), x => Rx.Observable.timer(x.length));
o.delay(x => Rx.Observable.timer(x.length).toPromise());
});

@@ -8,2 +8,10 @@ /// <reference path="../../observable.ts"/>

* @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) when a timeout occurs.
* @param {Scheduler} [scheduler] Scheduler to run the timeout timers on. If not specified, the timeout scheduler is used.
* @returns {Observable} The source sequence switching to the other sequence in case of a timeout.
*/
timeout(dueTime: Date, scheduler?: IScheduler): Observable<T>;
/**
* Returns the source observable sequence or the other observable sequence if dueTime elapses.
* @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) when a timeout occurs.
* @param {Observable} [other] Sequence to return in case of a timeout. If not specified, a timeout error throwing sequence will be used.

@@ -21,3 +29,35 @@ * @param {Scheduler} [scheduler] Scheduler to run the timeout timers on. If not specified, the timeout scheduler is used.

*/
timeout(dueTime: number, scheduler?: IScheduler): Observable<T>;
/**
* Returns the source observable sequence or the other observable sequence if dueTime elapses.
* @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) when a timeout occurs.
* @param {Observable} [other] Sequence to return in case of a timeout. If not specified, a timeout error throwing sequence will be used.
* @param {Scheduler} [scheduler] Scheduler to run the timeout timers on. If not specified, the timeout scheduler is used.
* @returns {Observable} The source sequence switching to the other sequence in case of a timeout.
*/
timeout(dueTime: number, other?: Observable<T>, scheduler?: IScheduler): Observable<T>;
/**
* Returns the source observable sequence, switching to the other observable sequence if a timeout is signaled.
* @param {Function} timeoutDurationSelector Selector to retrieve an observable sequence that represents the timeout between the current element and the next element.
* @returns {Observable} The source sequence switching to the other sequence in case of a timeout.
*/
timeout<TTimeout>(timeoutdurationSelector: (item: T) => Observable<TTimeout>): Observable<T>;
/**
* Returns the source observable sequence, switching to the other observable sequence if a timeout is signaled.
* @param {Function} timeoutDurationSelector Selector to retrieve an observable sequence that represents the timeout between the current element and the next element.
* @param {Observable} other Sequence to return in case of a timeout. If not provided, this is set to Observable.throwException().
* @returns {Observable} The source sequence switching to the other sequence in case of a timeout.
*/
timeout<TTimeout>(timeoutdurationSelector: (item: T) => Observable<TTimeout>, other: Observable<T>): Observable<T>;
/**
* Returns the source observable sequence, switching to the other observable sequence if a timeout is signaled.
* @param {Observable} [firstTimeout] Observable sequence that represents the timeout for the first element. If not provided, this defaults to Observable.never().
* @param {Function} timeoutDurationSelector Selector to retrieve an observable sequence that represents the timeout between the current element and the next element.
* @param {Observable} [other] Sequence to return in case of a timeout. If not provided, this is set to Observable.throwException().
* @returns {Observable} The source sequence switching to the other sequence in case of a timeout.
*/
timeout<TTimeout>(firstTimeout: Observable<TTimeout>, timeoutdurationSelector: (item: T) => Observable<TTimeout>, other?: Observable<T>): Observable<T>;
}

@@ -30,3 +70,5 @@ }

o.timeout(100);
o.timeout(100, Rx.Scheduler.default);
o.timeout(new Date());
o.timeout(new Date(), Rx.Scheduler.default);
o.timeout(100, o);

@@ -36,2 +78,7 @@ o.timeout(new Date(), o);

o.timeout(new Date(), o, Rx.Scheduler.timeout);
o.timeout(x => Rx.Observable.interval(1000));
o.timeout(x => Rx.Observable.interval(1000), Rx.Observable.just('100'));
o.timeout(Rx.Observable.interval(1000), x => Rx.Observable.interval(1000));
o.timeout(Rx.Observable.interval(1000), x => Rx.Observable.interval(1000), Rx.Observable.just('100'));
});

@@ -10,3 +10,3 @@ /// <reference path="../../observable.ts"/>

*/
zip<T1, T2, TResult>(sources: ObservableOrPromise<T2>[], resultSelector: (item1: T1, ...right: T2[]) => TResult): Observable<TResult>;
zip<T1, T2, TResult>(sources: ObservableOrPromise<T2>[], resultSelector?: (item1: T1, ...right: T2[]) => TResult): Observable<TResult>;
/**

@@ -18,3 +18,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.

*/
zip<T1, T2, TResult>(source1: ObservableOrPromise<T1>, ObservableOrPromise: Observable<T2>, resultSelector: (item1: T1, item2: T2) => TResult): Observable<TResult>;
zip<T1, T2, TResult>(source1: ObservableOrPromise<T1>, ObservableOrPromise: Observable<T2>, resultSelector?: (item1: T1, item2: T2) => TResult): Observable<TResult>;
/**

@@ -26,3 +26,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.

*/
zip<T1, T2, T3, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, resultSelector: (item1: T1, item2: T2, item3: T3) => TResult): Observable<TResult>;
zip<T1, T2, T3, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, resultSelector?: (item1: T1, item2: T2, item3: T3) => TResult): Observable<TResult>;
/**

@@ -34,3 +34,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.

*/
zip<T1, T2, T3, T4, TResult>(source1: Observable<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable<TResult>;
zip<T1, T2, T3, T4, TResult>(source1: Observable<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, resultSelector?: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable<TResult>;
/**

@@ -42,3 +42,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.

*/
zip<T1, T2, T3, T4, T5, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, source5: ObservableOrPromise<T5>, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5) => TResult): Observable<TResult>;
zip<T1, T2, T3, T4, T5, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, source5: ObservableOrPromise<T5>, resultSelector?: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5) => TResult): Observable<TResult>;
/**

@@ -50,3 +50,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.

*/
zip<T1, T2, T3, T4, T5, T6, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, source5: ObservableOrPromise<T5>, source6: ObservableOrPromise<T6>, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6) => TResult): Observable<TResult>;
zip<T1, T2, T3, T4, T5, T6, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, source5: ObservableOrPromise<T5>, source6: ObservableOrPromise<T6>, resultSelector?: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6) => TResult): Observable<TResult>;
/**

@@ -58,3 +58,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.

*/
zip<T1, T2, T3, T4, T5, T6, T7, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, source5: ObservableOrPromise<T5>, source6: ObservableOrPromise<T6>, source7: ObservableOrPromise<T7>, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7) => TResult): Observable<TResult>;
zip<T1, T2, T3, T4, T5, T6, T7, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, source5: ObservableOrPromise<T5>, source6: ObservableOrPromise<T6>, source7: ObservableOrPromise<T7>, resultSelector?: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7) => TResult): Observable<TResult>;
/**

@@ -66,3 +66,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.

*/
zip<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, source5: ObservableOrPromise<T5>, source6: ObservableOrPromise<T6>, source7: ObservableOrPromise<T7>, source8: ObservableOrPromise<T8>, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7, item8: T8) => TResult): Observable<TResult>;
zip<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, source5: ObservableOrPromise<T5>, source6: ObservableOrPromise<T6>, source7: ObservableOrPromise<T7>, source8: ObservableOrPromise<T8>, resultSelector?: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7, item8: T8) => TResult): Observable<TResult>;
/**

@@ -74,4 +74,4 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.

*/
zip<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, source5: ObservableOrPromise<T5>, source6: ObservableOrPromise<T6>, source7: ObservableOrPromise<T7>, source8: ObservableOrPromise<T8>, source9: ObservableOrPromise<T9>, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7, item8: T8, item9: T9) => TResult): Observable<TResult>;
zip<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(source1: ObservableOrPromise<T1>, source2: ObservableOrPromise<T2>, source3: ObservableOrPromise<T3>, source4: ObservableOrPromise<T4>, source5: ObservableOrPromise<T5>, source6: ObservableOrPromise<T6>, source7: ObservableOrPromise<T7>, source8: ObservableOrPromise<T8>, source9: ObservableOrPromise<T9>, resultSelector?: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7, item8: T8, item9: T9) => TResult): Observable<TResult>;
}
}

@@ -9,3 +9,3 @@ /// <reference path="../../observable.ts"/>

*/
zip<T2, TResult>(second: ObservableOrPromise<T2>, resultSelector: (v1: T, v2: T2) => TResult): Observable<TResult>;
zip<T2, TResult>(second: ObservableOrPromise<T2>, resultSelector?: (v1: T, v2: T2) => TResult): Observable<TResult>;
/**

@@ -16,3 +16,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.

*/
zip<T2, T3, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
zip<T2, T3, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, resultSelector?: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
/**

@@ -23,3 +23,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.

*/
zip<T2, T3, T4, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
zip<T2, T3, T4, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, resultSelector?: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
/**

@@ -30,3 +30,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.

*/
zip<T2, T3, T4, T5, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, fifth: ObservableOrPromise<T5>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable<TResult>;
zip<T2, T3, T4, T5, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, fifth: ObservableOrPromise<T5>, resultSelector?: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable<TResult>;
/**

@@ -37,3 +37,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.

*/
zip<T2, T3, T4, T5, T6, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, fifth: ObservableOrPromise<T5>, sixth: ObservableOrPromise<T6>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => TResult): Observable<TResult>;
zip<T2, T3, T4, T5, T6, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, fifth: ObservableOrPromise<T5>, sixth: ObservableOrPromise<T6>, resultSelector?: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => TResult): Observable<TResult>;
/**

@@ -44,3 +44,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.

*/
zip<T2, T3, T4, T5, T6, T7, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, fifth: ObservableOrPromise<T5>, sixth: ObservableOrPromise<T6>, seventh: ObservableOrPromise<T7>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, v7: T7) => TResult): Observable<TResult>;
zip<T2, T3, T4, T5, T6, T7, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, fifth: ObservableOrPromise<T5>, sixth: ObservableOrPromise<T6>, seventh: ObservableOrPromise<T7>, resultSelector?: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, v7: T7) => TResult): Observable<TResult>;
/**

@@ -51,3 +51,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.

*/
zip<T2, T3, T4, T5, T6, T7, T8, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, fifth: ObservableOrPromise<T5>, sixth: ObservableOrPromise<T6>, seventh: ObservableOrPromise<T7>, eighth: ObservableOrPromise<T8>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, v7: T7, v8: T8) => TResult): Observable<TResult>;
zip<T2, T3, T4, T5, T6, T7, T8, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, fifth: ObservableOrPromise<T5>, sixth: ObservableOrPromise<T6>, seventh: ObservableOrPromise<T7>, eighth: ObservableOrPromise<T8>, resultSelector?: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, v7: T7, v8: T8) => TResult): Observable<TResult>;
/**

@@ -58,3 +58,3 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.

*/
zip<T2, T3, T4, T5, T6, T7, T8, T9, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, fifth: ObservableOrPromise<T5>, sixth: ObservableOrPromise<T6>, seventh: ObservableOrPromise<T7>, eighth: ObservableOrPromise<T8>, ninth: ObservableOrPromise<T9>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, v7: T7, v8: T8, v9: T9) => TResult): Observable<TResult>;
zip<T2, T3, T4, T5, T6, T7, T8, T9, TResult>(second: ObservableOrPromise<T2>, third: ObservableOrPromise<T3>, fourth: ObservableOrPromise<T4>, fifth: ObservableOrPromise<T5>, sixth: ObservableOrPromise<T6>, seventh: ObservableOrPromise<T7>, eighth: ObservableOrPromise<T8>, ninth: ObservableOrPromise<T9>, resultSelector?: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, v7: T7, v8: T8, v9: T9) => TResult): Observable<TResult>;
/**

@@ -65,4 +65,4 @@ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.

*/
zip<TOther, TResult>(souces: ObservableOrPromise<TOther>[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable<TResult>;
zip<TOther, TResult>(souces: ObservableOrPromise<TOther>[], resultSelector?: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable<TResult>;
}
}

@@ -11,3 +11,3 @@ declare module Rx {

*/
reduce<TAcc>(accumulator: ((acc: T, value: T) => TAcc), seed?: TAcc): Observable<TAcc>;
reduce<TAcc>(accumulator: ((acc: TAcc, value: T) => TAcc), seed?: TAcc): Observable<TAcc>;
/**

@@ -14,0 +14,0 @@ * Applies an accumulator function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value.

@@ -11,3 +11,3 @@ declare module Rx {

*/
reduce<TAcc>(accumulator: ((acc: T, value: T) => TAcc), seed?: TAcc): Observable<TAcc>;
reduce<TAcc>(accumulator: ((acc: TAcc, value: T) => TAcc), seed?: TAcc): Observable<TAcc>;
/**

@@ -14,0 +14,0 @@ * Applies an accumulator function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value.

@@ -46,3 +46,14 @@ declare module Rx {

* var res = observable.groupByUntil(function (x) { return x.id; }, null, function () { return Rx.Observable.never(); });
* 2 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }, function () { return Rx.Observable.never();
* 2 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }, function () { return Rx.Observable.never(); });
* 3 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }, function () { return Rx.Observable.never(); }, function (x) { return x.toString(); });
* @param {Function} keySelector A function to extract the key for each element.
* @param {Function} durationSelector A function to signal the expiration of a group.
* @returns {Observable}
* A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.
* If a group's lifetime expires, a new group with the same key value can be created once an element with such a key value is encoutered.
*
*/
groupByUntil<TKey, TElement, TDuration>(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, durationSelector: (group: GroupedObservable<TKey, TElement>) => Observable<TDuration>, keySerializer?: (key: TKey) => string): Observable<GroupedObservable<TKey, TElement>>;
}
export interface Observable<T> {

@@ -161,3 +172,11 @@ /**

* var res = observable.groupBy(function (x) { return x.id; });
* 2 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name;
* 2 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; });
* 3 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }, function (x) { return x.toString(); });
* @param {Function} keySelector A function to extract the key for each element.
* @param {Function} [elementSelector] A function to map each source element to an element in an observable group.
* @returns {Observable} A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.
*/
groupBy<TKey, TElement>(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, keySerializer?: (key: TKey) => string): Observable<GroupedObservable<TKey, TElement>>;
}
export interface GroupedObservable<TKey, TElement> extends Observable<TElement> {

@@ -164,0 +183,0 @@ key: TKey;

@@ -46,3 +46,14 @@ declare module Rx {

* var res = observable.groupByUntil(function (x) { return x.id; }, null, function () { return Rx.Observable.never(); });
* 2 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }, function () { return Rx.Observable.never();
* 2 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }, function () { return Rx.Observable.never(); });
* 3 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }, function () { return Rx.Observable.never(); }, function (x) { return x.toString(); });
* @param {Function} keySelector A function to extract the key for each element.
* @param {Function} durationSelector A function to signal the expiration of a group.
* @returns {Observable}
* A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.
* If a group's lifetime expires, a new group with the same key value can be created once an element with such a key value is encoutered.
*
*/
groupByUntil<TKey, TElement, TDuration>(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, durationSelector: (group: GroupedObservable<TKey, TElement>) => Observable<TDuration>, keySerializer?: (key: TKey) => string): Observable<GroupedObservable<TKey, TElement>>;
}
export interface Observable<T> {

@@ -161,3 +172,11 @@ /**

* var res = observable.groupBy(function (x) { return x.id; });
* 2 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name;
* 2 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; });
* 3 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }, function (x) { return x.toString(); });
* @param {Function} keySelector A function to extract the key for each element.
* @param {Function} [elementSelector] A function to map each source element to an element in an observable group.
* @returns {Observable} A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.
*/
groupBy<TKey, TElement>(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, keySerializer?: (key: TKey) => string): Observable<GroupedObservable<TKey, TElement>>;
}
export interface GroupedObservable<TKey, TElement> extends Observable<TElement> {

@@ -164,0 +183,0 @@ key: TKey;

@@ -157,50 +157,2 @@ declare module Rx {

/**
* Time shifts the observable sequence based on a subscription delay and a delay selector function for each element.
*
* @example
* 1 - res = source.delayWithSelector(function (x) { return Rx.Scheduler.timer(5000); }); // with selector only
* 1 - res = source.delayWithSelector(Rx.Observable.timer(2000), function (x) { return Rx.Observable.timer(x); }); // with delay and selector
*
* @param {Observable} [subscriptionDelay] Sequence indicating the delay for the subscription to the source.
* @param {Function} delayDurationSelector Selector function to retrieve a sequence indicating the delay for each given element.
* @returns {Observable} Time-shifted sequence.
*/
delayWithSelector(delayDurationSelector: (item: T) => (IObservable<number> | Observable<number> | Promise<number>)): Observable<T>;
/**
* Time shifts the observable sequence based on a subscription delay and a delay selector function for each element.
*
* @example
* 1 - res = source.delayWithSelector(function (x) { return Rx.Scheduler.timer(5000); }); // with selector only
* 1 - res = source.delayWithSelector(Rx.Observable.timer(2000), function (x) { return Rx.Observable.timer(x); }); // with delay and selector
*
* @param {Observable} [subscriptionDelay] Sequence indicating the delay for the subscription to the source.
* @param {Function} delayDurationSelector Selector function to retrieve a sequence indicating the delay for each given element.
* @returns {Observable} Time-shifted sequence.
*/
delayWithSelector(subscriptionDelay: Observable<number>, delayDurationSelector: (item: T) => (IObservable<number> | Observable<number> | Promise<number>)): Observable<T>;
}
export interface Observable<T> {
/**
* Returns the source observable sequence, switching to the other observable sequence if a timeout is signaled.
* @param {Observable} [firstTimeout] Observable sequence that represents the timeout for the first element. If not provided, this defaults to Observable.never().
* @param {Function} timeoutDurationSelector Selector to retrieve an observable sequence that represents the timeout between the current element and the next element.
* @param {Observable} [other] Sequence to return in case of a timeout. If not provided, this is set to Observable.throwException().
* @returns {Observable} The source sequence switching to the other sequence in case of a timeout.
*/
timeoutWithSelector<TTimeout>(firstTimeout: Observable<TTimeout>, timeoutdurationSelector?: (item: T) => Observable<TTimeout>, other?: Observable<T>): Observable<T>;
}
export interface Observable<T> {
/**
* Ignores values from an observable sequence which are followed by another value within a computed throttle duration.
* @param {Function} durationSelector Selector function to retrieve a sequence indicating the throttle duration for each given element.
* @returns {Observable} The debounced sequence.
*/
debounceWithSelector(debounceDurationSelector: (item: T) => (IObservable<number> | Observable<number> | Promise<number>)): Observable<T>;
}
export interface Observable<T> {
/**
* Skips elements for the specified duration from the end of the observable source sequence, using the specified scheduler to run timers.

@@ -207,0 +159,0 @@ *

@@ -157,50 +157,2 @@ declare module Rx {

/**
* Time shifts the observable sequence based on a subscription delay and a delay selector function for each element.
*
* @example
* 1 - res = source.delayWithSelector(function (x) { return Rx.Scheduler.timer(5000); }); // with selector only
* 1 - res = source.delayWithSelector(Rx.Observable.timer(2000), function (x) { return Rx.Observable.timer(x); }); // with delay and selector
*
* @param {Observable} [subscriptionDelay] Sequence indicating the delay for the subscription to the source.
* @param {Function} delayDurationSelector Selector function to retrieve a sequence indicating the delay for each given element.
* @returns {Observable} Time-shifted sequence.
*/
delayWithSelector(delayDurationSelector: (item: T) => (IObservable<number> | Observable<number> | Promise<number>)): Observable<T>;
/**
* Time shifts the observable sequence based on a subscription delay and a delay selector function for each element.
*
* @example
* 1 - res = source.delayWithSelector(function (x) { return Rx.Scheduler.timer(5000); }); // with selector only
* 1 - res = source.delayWithSelector(Rx.Observable.timer(2000), function (x) { return Rx.Observable.timer(x); }); // with delay and selector
*
* @param {Observable} [subscriptionDelay] Sequence indicating the delay for the subscription to the source.
* @param {Function} delayDurationSelector Selector function to retrieve a sequence indicating the delay for each given element.
* @returns {Observable} Time-shifted sequence.
*/
delayWithSelector(subscriptionDelay: Observable<number>, delayDurationSelector: (item: T) => (IObservable<number> | Observable<number> | Promise<number>)): Observable<T>;
}
export interface Observable<T> {
/**
* Returns the source observable sequence, switching to the other observable sequence if a timeout is signaled.
* @param {Observable} [firstTimeout] Observable sequence that represents the timeout for the first element. If not provided, this defaults to Observable.never().
* @param {Function} timeoutDurationSelector Selector to retrieve an observable sequence that represents the timeout between the current element and the next element.
* @param {Observable} [other] Sequence to return in case of a timeout. If not provided, this is set to Observable.throwException().
* @returns {Observable} The source sequence switching to the other sequence in case of a timeout.
*/
timeoutWithSelector<TTimeout>(firstTimeout: Observable<TTimeout>, timeoutdurationSelector?: (item: T) => Observable<TTimeout>, other?: Observable<T>): Observable<T>;
}
export interface Observable<T> {
/**
* Ignores values from an observable sequence which are followed by another value within a computed throttle duration.
* @param {Function} durationSelector Selector function to retrieve a sequence indicating the throttle duration for each given element.
* @returns {Observable} The debounced sequence.
*/
debounceWithSelector(debounceDurationSelector: (item: T) => (IObservable<number> | Observable<number> | Promise<number>)): Observable<T>;
}
export interface Observable<T> {
/**
* Skips elements for the specified duration from the end of the observable source sequence, using the specified scheduler to run timers.

@@ -207,0 +159,0 @@ *

@@ -80,3 +80,2 @@ {

"./core/linq/observable/debounce.ts",
"./core/linq/observable/debouncewithselector.ts",
"./core/linq/observable/defaultifempty.ts",

@@ -86,3 +85,2 @@ "./core/linq/observable/defer.ts",

"./core/linq/observable/delaysubscription.ts",
"./core/linq/observable/delaywithselector.ts",
"./core/linq/observable/dematerialize.ts",

@@ -203,7 +201,6 @@ "./core/linq/observable/distinct.ts",

"./core/linq/observable/thendo.ts",
"./core/linq/observable/throttlefirst.ts",
"./core/linq/observable/throttle.ts",
"./core/linq/observable/throw.ts",
"./core/linq/observable/timeinterval.ts",
"./core/linq/observable/timeout.ts",
"./core/linq/observable/timeoutwithselector.ts",
"./core/linq/observable/timer.ts",

@@ -210,0 +207,0 @@ "./core/linq/observable/timestamp.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc