rxjs-rails 2.3.14 → 2.3.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rxjs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/rx.aggregates.js +325 -370
  4. data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
  5. data/vendor/assets/javascripts/rx.all.compat.js +1115 -930
  6. data/vendor/assets/javascripts/rx.all.compat.min.js +4 -3
  7. data/vendor/assets/javascripts/rx.all.js +1113 -928
  8. data/vendor/assets/javascripts/rx.all.min.js +3 -3
  9. data/vendor/assets/javascripts/rx.async.compat.js +16 -20
  10. data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
  11. data/vendor/assets/javascripts/rx.async.js +14 -18
  12. data/vendor/assets/javascripts/rx.async.min.js +1 -1
  13. data/vendor/assets/javascripts/rx.backpressure.js +26 -10
  14. data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
  15. data/vendor/assets/javascripts/rx.binding.js +2 -14
  16. data/vendor/assets/javascripts/rx.binding.min.js +1 -1
  17. data/vendor/assets/javascripts/rx.coincidence.js +13 -13
  18. data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
  19. data/vendor/assets/javascripts/rx.compat.js +586 -378
  20. data/vendor/assets/javascripts/rx.compat.min.js +2 -2
  21. data/vendor/assets/javascripts/rx.experimental.js +37 -29
  22. data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
  23. data/vendor/assets/javascripts/rx.js +586 -378
  24. data/vendor/assets/javascripts/rx.lite.compat.js +632 -394
  25. data/vendor/assets/javascripts/rx.lite.compat.min.js +2 -2
  26. data/vendor/assets/javascripts/rx.lite.extras.js +29 -25
  27. data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
  28. data/vendor/assets/javascripts/rx.lite.js +630 -392
  29. data/vendor/assets/javascripts/rx.lite.min.js +2 -2
  30. data/vendor/assets/javascripts/rx.min.js +2 -2
  31. data/vendor/assets/javascripts/rx.sorting.js +72 -0
  32. data/vendor/assets/javascripts/rx.sorting.min.js +3 -0
  33. data/vendor/assets/javascripts/rx.testing.js +116 -83
  34. data/vendor/assets/javascripts/rx.testing.min.js +1 -1
  35. data/vendor/assets/javascripts/rx.time.js +127 -101
  36. data/vendor/assets/javascripts/rx.time.min.js +1 -1
  37. metadata +4 -2
@@ -41,7 +41,7 @@
41
41
  AnonymousObservable = Rx.AnonymousObservable,
42
42
  AsyncSubject = Rx.AsyncSubject,
43
43
  disposableCreate = Rx.Disposable.create,
44
- CompositeDisposable= Rx.CompositeDisposable,
44
+ CompositeDisposable = Rx.CompositeDisposable,
45
45
  immediateScheduler = Rx.Scheduler.immediate,
46
46
  timeoutScheduler = Rx.Scheduler.timeout,
47
47
  isScheduler = Rx.helpers.isScheduler,
@@ -90,7 +90,7 @@
90
90
  return --pending || done(null, results);
91
91
  }
92
92
 
93
- fn.call(ctx, function(err, res){
93
+ fn.call(ctx, function(err, res) {
94
94
  if (finished) { return; }
95
95
 
96
96
  if (err) {
@@ -125,7 +125,7 @@
125
125
  }
126
126
 
127
127
  function promiseToThunk(promise) {
128
- return function(fn){
128
+ return function(fn) {
129
129
  promise.then(function(res) {
130
130
  fn(null, res);
131
131
  }, fn);
@@ -181,7 +181,9 @@
181
181
  var ret;
182
182
 
183
183
  // multiple args
184
- if (arguments.length > 2) res = slice.call(arguments, 1);
184
+ if (arguments.length > 2) {
185
+ res = slice.call(arguments, 1);
186
+ }
185
187
 
186
188
  if (err) {
187
189
  try {
@@ -208,7 +210,7 @@
208
210
  if (typeof ret.value === fnString) {
209
211
  var called = false;
210
212
  try {
211
- ret.value.call(ctx, function(){
213
+ ret.value.call(ctx, function() {
212
214
  if (called) {
213
215
  return;
214
216
  }
@@ -241,13 +243,13 @@
241
243
  * @returns {Function} A function, when executed will continue the state machine.
242
244
  */
243
245
  Rx.denodify = function (fn) {
244
- return function (){
246
+ return function () {
245
247
  var args = slice.call(arguments),
246
248
  results,
247
249
  called,
248
250
  callback;
249
251
 
250
- args.push(function(){
252
+ args.push(function() {
251
253
  results = arguments;
252
254
 
253
255
  if (callback && !called) {
@@ -258,7 +260,7 @@
258
260
 
259
261
  fn.apply(this, args);
260
262
 
261
- return function (fn){
263
+ return function (fn) {
262
264
  callback = fn;
263
265
 
264
266
  if (results && !called) {
@@ -271,7 +273,7 @@
271
273
 
272
274
  function error(err) {
273
275
  if (!err) { return; }
274
- timeoutScheduler.schedule(function(){
276
+ timeoutScheduler.schedule(function() {
275
277
  throw err;
276
278
  });
277
279
  }
@@ -299,12 +301,6 @@
299
301
 
300
302
  /**
301
303
  * Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
302
- *
303
- * @example
304
- * var res = Rx.Observable.toAsync(function (x, y) { return x + y; })(4, 3);
305
- * var res = Rx.Observable.toAsync(function (x, y) { return x + y; }, Rx.Scheduler.timeout)(4, 3);
306
- * var res = Rx.Observable.toAsync(function (x) { this.log(x); }, Rx.Scheduler.timeout, console)('hello');
307
- *
308
304
  * @param {Function} function Function to convert to an asynchronous function.
309
305
  * @param {Scheduler} [scheduler] Scheduler to run the function on. If not specified, defaults to Scheduler.timeout.
310
306
  * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined.
@@ -344,12 +340,12 @@
344
340
  var args = slice.call(arguments, 0);
345
341
 
346
342
  return new AnonymousObservable(function (observer) {
347
- function handler(e) {
348
- var results = e;
343
+ function handler() {
344
+ var results = arguments;
349
345
 
350
346
  if (selector) {
351
347
  try {
352
- results = selector(arguments);
348
+ results = selector(results);
353
349
  } catch (err) {
354
350
  observer.onError(err);
355
351
  return;
@@ -1,3 +1,3 @@
1
1
  /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
2
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(a,b){return Array.isArray(a)?e.call(b,a):i(a)?A(a.call(b)):j(a)?A(a):h(a)?f(a):isPromise(a)?g(a):typeof a===y?a:k(a)||Array.isArray(a)?e.call(b,a):a}function e(a){var b=this;return function(c){function e(a,e){if(!f)try{if(a=d(a,b),typeof a!==y)return i[e]=a,--h||c(null,i);a.call(b,function(a,b){if(!f){if(a)return f=!0,c(a);i[e]=b,--h||c(null,i)}})}catch(g){f=!0,c(g)}}var f,g=Object.keys(a),h=g.length,i=new a.constructor;if(!h)return void v.schedule(function(){c(null,i)});for(var j=0,k=g.length;k>j;j++)e(a[g[j]],g[j])}}function f(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function g(a){return function(b){a.then(function(a){b(null,a)},b)}}function h(a){return a&&typeof a.subscribe===y}function i(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function j(a){return a&&typeof a.next===y&&typeof a[z]===y}function k(a){return a&&a.constructor===Object}function l(a){a&&v.schedule(function(){throw a})}function m(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),t(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function n(a,b,c){var d=new u;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(n(a.item(e),b,c));else a&&d.add(m(a,b,c));return d}var o=c.Observable,p=(o.prototype,o.fromPromise),q=o.throwException,r=c.AnonymousObservable,s=c.AsyncSubject,t=c.Disposable.create,u=c.CompositeDisposable,v=(c.Scheduler.immediate,c.Scheduler.timeout),w=c.helpers.isScheduler,x=Array.prototype.slice,y="function",z="throw",A=c.spawn=function(a){var b=i(a);return function(c){function e(a,b){v.schedule(c.bind(g,a,b))}function f(a,b){var c;if(arguments.length>2&&(b=x.call(arguments,1)),a)try{c=h[z](a)}catch(i){return e(i)}if(!a)try{c=h.next(b)}catch(i){return e(i)}if(c.done)return e(null,c.value);if(c.value=d(c.value,g),typeof c.value!==y)f(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var j=!1;try{c.value.call(g,function(){j||(j=!0,f.apply(g,arguments))})}catch(i){v.schedule(function(){j||(j=!0,f.call(g,i))})}}}var g=this,h=a;if(b){var i=x.call(arguments),j=i.length,k=j&&typeof i[j-1]===y;c=k?i.pop():l,h=a.apply(this,i)}else c=c||l;f()}};c.denodify=function(a){return function(){var b,c,d,e=x.call(arguments);return e.push(function(){b=arguments,d&&!c&&(c=!0,cb.apply(this,b))}),a.apply(this,e),function(a){d=a,b&&!c&&(c=!0,a.apply(this,b))}}},o.start=function(a,b,c){return B(a,b,c)()};var B=o.toAsync=function(a,b,c){return w(c)||(c=v),function(){var d=arguments,e=new s;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()}};o.fromCallback=function(a,b,c){return function(){var d=x.call(arguments,0);return new r(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},o.fromNodeCallback=function(a,b,c){return function(){var d=x.call(arguments,0);return new r(function(e){function f(a){if(a)return void e.onError(a);var b=x.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},c.config.useNativeEvents=!1;var C=a.angular&&angular.element?angular.element:a.jQuery?a.jQuery:a.Zepto?a.Zepto:null,D=!!a.Ember&&"function"==typeof a.Ember.addListener,E=!!a.Backbone&&!!a.Backbone.Marionette;o.fromEvent=function(a,b,d){if(a.addListener)return F(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d);if(!c.config.useNativeEvents){if(E)return F(function(c){a.on(b,c)},function(c){a.off(b,c)},d);if(D)return F(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},d);if(C){var e=C(a);return F(function(a){e.on(b,a)},function(a){e.off(b,a)},d)}}return new r(function(c){return n(a,b,function(a){var b=a;if(d)try{b=d(arguments)}catch(e){return void c.onError(e)}c.onNext(b)})}).publish().refCount()};var F=o.fromEventPattern=function(a,b,c){return new r(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return t(function(){b&&b(e,f)})}).publish().refCount()};return o.startAsync=function(a){var b;try{b=a()}catch(c){return q(c)}return p(b)},c});
2
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(a,b){return Array.isArray(a)?e.call(b,a):i(a)?A(a.call(b)):j(a)?A(a):h(a)?f(a):isPromise(a)?g(a):typeof a===y?a:k(a)||Array.isArray(a)?e.call(b,a):a}function e(a){var b=this;return function(c){function e(a,e){if(!f)try{if(a=d(a,b),typeof a!==y)return i[e]=a,--h||c(null,i);a.call(b,function(a,b){if(!f){if(a)return f=!0,c(a);i[e]=b,--h||c(null,i)}})}catch(g){f=!0,c(g)}}var f,g=Object.keys(a),h=g.length,i=new a.constructor;if(!h)return void v.schedule(function(){c(null,i)});for(var j=0,k=g.length;k>j;j++)e(a[g[j]],g[j])}}function f(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function g(a){return function(b){a.then(function(a){b(null,a)},b)}}function h(a){return a&&typeof a.subscribe===y}function i(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function j(a){return a&&typeof a.next===y&&typeof a[z]===y}function k(a){return a&&a.constructor===Object}function l(a){a&&v.schedule(function(){throw a})}function m(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),t(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function n(a,b,c){var d=new u;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(n(a.item(e),b,c));else a&&d.add(m(a,b,c));return d}var o=c.Observable,p=(o.prototype,o.fromPromise),q=o.throwException,r=c.AnonymousObservable,s=c.AsyncSubject,t=c.Disposable.create,u=c.CompositeDisposable,v=(c.Scheduler.immediate,c.Scheduler.timeout),w=c.helpers.isScheduler,x=Array.prototype.slice,y="function",z="throw",A=c.spawn=function(a){var b=i(a);return function(c){function e(a,b){v.schedule(c.bind(g,a,b))}function f(a,b){var c;if(arguments.length>2&&(b=x.call(arguments,1)),a)try{c=h[z](a)}catch(i){return e(i)}if(!a)try{c=h.next(b)}catch(i){return e(i)}if(c.done)return e(null,c.value);if(c.value=d(c.value,g),typeof c.value!==y)f(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var j=!1;try{c.value.call(g,function(){j||(j=!0,f.apply(g,arguments))})}catch(i){v.schedule(function(){j||(j=!0,f.call(g,i))})}}}var g=this,h=a;if(b){var i=x.call(arguments),j=i.length,k=j&&typeof i[j-1]===y;c=k?i.pop():l,h=a.apply(this,i)}else c=c||l;f()}};c.denodify=function(a){return function(){var b,c,d,e=x.call(arguments);return e.push(function(){b=arguments,d&&!c&&(c=!0,cb.apply(this,b))}),a.apply(this,e),function(a){d=a,b&&!c&&(c=!0,a.apply(this,b))}}},o.start=function(a,b,c){return B(a,b,c)()};var B=o.toAsync=function(a,b,c){return w(c)||(c=v),function(){var d=arguments,e=new s;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()}};o.fromCallback=function(a,b,c){return function(){var d=x.call(arguments,0);return new r(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return void e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},o.fromNodeCallback=function(a,b,c){return function(){var d=x.call(arguments,0);return new r(function(e){function f(a){if(a)return void e.onError(a);var b=x.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},c.config.useNativeEvents=!1;var C=a.angular&&angular.element?angular.element:a.jQuery?a.jQuery:a.Zepto?a.Zepto:null,D=!!a.Ember&&"function"==typeof a.Ember.addListener,E=!!a.Backbone&&!!a.Backbone.Marionette;o.fromEvent=function(a,b,d){if(a.addListener)return F(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d);if(!c.config.useNativeEvents){if(E)return F(function(c){a.on(b,c)},function(c){a.off(b,c)},d);if(D)return F(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},d);if(C){var e=C(a);return F(function(a){e.on(b,a)},function(a){e.off(b,a)},d)}}return new r(function(c){return n(a,b,function(a){var b=a;if(d)try{b=d(arguments)}catch(e){return void c.onError(e)}c.onNext(b)})}).publish().refCount()};var F=o.fromEventPattern=function(a,b,c){return new r(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return t(function(){b&&b(e,f)})}).publish().refCount()};return o.startAsync=function(a){var b;try{b=a()}catch(c){return q(c)}return p(b)},c});
3
3
  //# sourceMappingURL=rx.async.map
@@ -109,17 +109,22 @@
109
109
 
110
110
  function combineLatestSource(source, subject, resultSelector) {
111
111
  return new AnonymousObservable(function (observer) {
112
- var n = 2,
113
- hasValue = [false, false],
112
+ var hasValue = [false, false],
114
113
  hasValueAll = false,
115
114
  isDone = false,
116
- values = new Array(n);
115
+ values = new Array(2),
116
+ err;
117
117
 
118
118
  function next(x, i) {
119
119
  values[i] = x
120
120
  var res;
121
121
  hasValue[i] = true;
122
122
  if (hasValueAll || (hasValueAll = hasValue.every(identity))) {
123
+ if (err) {
124
+ observer.onError(err);
125
+ return;
126
+ }
127
+
123
128
  try {
124
129
  res = resultSelector.apply(null, values);
125
130
  } catch (ex) {
@@ -127,7 +132,8 @@
127
132
  return;
128
133
  }
129
134
  observer.onNext(res);
130
- } else if (isDone) {
135
+ }
136
+ if (isDone && values[1]) {
131
137
  observer.onCompleted();
132
138
  }
133
139
  }
@@ -137,23 +143,33 @@
137
143
  function (x) {
138
144
  next(x, 0);
139
145
  },
140
- observer.onError.bind(observer),
146
+ function (e) {
147
+ if (values[1]) {
148
+ observer.onError(e);
149
+ } else {
150
+ err = e;
151
+ }
152
+ },
141
153
  function () {
142
154
  isDone = true;
143
- observer.onCompleted();
155
+ values[1] && observer.onCompleted();
144
156
  }),
145
157
  subject.subscribe(
146
158
  function (x) {
147
159
  next(x, 1);
148
160
  },
149
- observer.onError.bind(observer))
161
+ observer.onError.bind(observer),
162
+ function () {
163
+ isDone = true;
164
+ next(true, 1);
165
+ })
150
166
  );
151
167
  });
152
168
  }
153
169
 
154
- var PausableBufferedObservable = (function (_super) {
170
+ var PausableBufferedObservable = (function (__super__) {
155
171
 
156
- inherits(PausableBufferedObservable, _super);
172
+ inherits(PausableBufferedObservable, __super__);
157
173
 
158
174
  function subscribe(observer) {
159
175
  var q = [], previousShouldFire;
@@ -213,7 +229,7 @@
213
229
  this.pauser = this.controller;
214
230
  }
215
231
 
216
- _super.call(this, subscribe);
232
+ __super__.call(this, subscribe);
217
233
  }
218
234
 
219
235
  PausableBufferedObservable.prototype.pause = function () {
@@ -1,3 +1,3 @@
1
1
  /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
2
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(){if(this.isDisposed)throw new Error(r)}function f(a,b,c){return new i(function(d){function e(a,b){k[b]=a;var e;if(g[b]=!0,h||(h=g.every(q))){try{e=c.apply(null,k)}catch(f){return void d.onError(f)}d.onNext(e)}else i&&d.onCompleted()}var f=2,g=[!1,!1],h=!1,i=!1,k=new Array(f);return new j(a.subscribe(function(a){e(a,0)},d.onError.bind(d),function(){i=!0,d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d)))})}var g=c.Observable,h=g.prototype,i=c.AnonymousObservable,j=c.CompositeDisposable,k=c.Subject,l=c.Observer,m=c.Disposable.empty,n=c.Disposable.create,o=c.internals.inherits,p=c.internals.addProperties,q=(c.Scheduler.timeout,c.helpers.identity),r="Object has been disposed",s=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=m,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=m)});return new j(c,d,e)}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return o(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 s(this,a)};var t=function(a){function b(a){var b,c=[],e=f(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(b!==d&&e.shouldFire!=b){if(b=e.shouldFire,e.shouldFire)for(;c.length>0;)a.onNext(c.shift())}else b=e.shouldFire,e.shouldFire?a.onNext(e.data):c.push(e.data)},function(b){for(;c.length>0;)a.onNext(c.shift());a.onError(b)},function(){for(;c.length>0;)a.onNext(c.shift());a.onCompleted()});return e}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return o(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 t(this,a)},h.controlled=function(a){return null==a&&(a=!0),new u(this,a)};var u=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new v(d),this.source=c.multicast(this.subject).refCount()}return o(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(g),v=c.ControlledSubject=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new k,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=m,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=m}return o(c,a),p(c.prototype,l,{onCompleted:function(){e.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){e.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){e.call(this);var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=m):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=m),{numberOfItems:a,returnValue:!1}},request:function(a){e.call(this),this.disposeCurrentRequest();var b=this,c=this._processRequest(a);return a=c.numberOfItems,c.returnValue?m:(this.requestedCount=a,this.requestedDisposable=n(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=m},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),c}(g);return c});
2
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(){if(this.isDisposed)throw new Error(r)}function f(a,b,c){return new i(function(d){function e(a,b){k[b]=a;var e;if(g[b]=!0,h||(h=g.every(q))){if(f)return void d.onError(f);try{e=c.apply(null,k)}catch(j){return void d.onError(j)}d.onNext(e)}i&&k[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,k=new Array(2);return new j(a.subscribe(function(a){e(a,0)},function(a){k[1]?d.onError(a):f=a},function(){i=!0,k[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d),function(){i=!0,e(!0,1)}))})}var g=c.Observable,h=g.prototype,i=c.AnonymousObservable,j=c.CompositeDisposable,k=c.Subject,l=c.Observer,m=c.Disposable.empty,n=c.Disposable.create,o=c.internals.inherits,p=c.internals.addProperties,q=(c.Scheduler.timeout,c.helpers.identity),r="Object has been disposed",s=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=m,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=m)});return new j(c,d,e)}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return o(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 s(this,a)};var t=function(a){function b(a){var b,c=[],e=f(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(b!==d&&e.shouldFire!=b){if(b=e.shouldFire,e.shouldFire)for(;c.length>0;)a.onNext(c.shift())}else b=e.shouldFire,e.shouldFire?a.onNext(e.data):c.push(e.data)},function(b){for(;c.length>0;)a.onNext(c.shift());a.onError(b)},function(){for(;c.length>0;)a.onNext(c.shift());a.onCompleted()});return e}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return o(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 t(this,a)},h.controlled=function(a){return null==a&&(a=!0),new u(this,a)};var u=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new v(d),this.source=c.multicast(this.subject).refCount()}return o(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(g),v=c.ControlledSubject=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new k,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=m,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=m}return o(c,a),p(c.prototype,l,{onCompleted:function(){e.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){e.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){e.call(this);var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=m):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=m),{numberOfItems:a,returnValue:!1}},request:function(a){e.call(this),this.disposeCurrentRequest();var b=this,c=this._processRequest(a);return a=c.numberOfItems,c.returnValue?m:(this.requestedCount=a,this.requestedDisposable=n(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=m},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),c}(g);return c});
3
3
  //# sourceMappingURL=rx.backpressure.map
@@ -76,7 +76,7 @@
76
76
  new AnonymousObservable(function (observer) {
77
77
  var connectable = source.multicast(subjectOrSubjectSelector());
78
78
  return new CompositeDisposable(selector(connectable).subscribe(observer), connectable.connect());
79
- }) :
79
+ }, source) :
80
80
  new ConnectableObservable(source, subjectOrSubjectSelector);
81
81
  };
82
82
 
@@ -100,10 +100,6 @@
100
100
  /**
101
101
  * Returns an observable sequence that shares a single subscription to the underlying sequence.
102
102
  * This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
103
- *
104
- * @example
105
- * var res = source.share();
106
- *
107
103
  * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
108
104
  */
109
105
  observableProto.share = function () {
@@ -150,10 +146,6 @@
150
146
  /**
151
147
  * Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue.
152
148
  * This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
153
- *
154
- * @example
155
- * var res = source.shareValue(42);
156
- *
157
149
  * @param {Mixed} initialValue Initial value received by observers upon subscription.
158
150
  * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
159
151
  */
@@ -340,21 +332,17 @@
340
332
  this._trim(this.scheduler.now());
341
333
  this.observers.push(so);
342
334
 
343
- var n = this.q.length;
344
-
345
335
  for (var i = 0, len = this.q.length; i < len; i++) {
346
336
  so.onNext(this.q[i].value);
347
337
  }
348
338
 
349
339
  if (this.hasError) {
350
- n++;
351
340
  so.onError(this.error);
352
341
  } else if (this.isStopped) {
353
- n++;
354
342
  so.onCompleted();
355
343
  }
356
344
 
357
- so.ensureActive(n);
345
+ so.ensureActive();
358
346
  return subscription;
359
347
  }
360
348
 
@@ -1,3 +1,3 @@
1
1
  /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
2
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(){if(this.isDisposed)throw new Error(s)}var e=c.Observable,f=e.prototype,g=c.AnonymousObservable,h=c.Subject,i=c.AsyncSubject,j=c.Observer,k=c.internals.ScheduledObserver,l=c.Disposable.create,m=c.Disposable.empty,n=c.CompositeDisposable,o=c.Scheduler.currentThread,p=c.helpers.isFunction,q=c.internals.inherits,r=c.internals.addProperties,s="Object has been disposed";f.multicast=function(a,b){var c=this;return"function"==typeof a?new g(function(d){var e=c.multicast(a());return new n(b(e).subscribe(d),e.connect())}):new w(c,a)},f.publish=function(a){return a&&p(a)?this.multicast(function(){return new h},a):this.multicast(new h)},f.share=function(){return this.publish().refCount()},f.publishLast=function(a){return a&&p(a)?this.multicast(function(){return new i},a):this.multicast(new i)},f.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new u(b)},a):this.multicast(new u(a))},f.shareValue=function(a){return this.publishValue(a).refCount()},f.replay=function(a,b,c,d){return a&&p(a)?this.multicast(function(){return new v(b,c,d)},a):this.multicast(new v(b,c,d))},f.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var t=function(a,b){this.subject=a,this.observer=b};t.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 u=c.BehaviorSubject=function(a){function b(a){if(d.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new t(this,a);var b=this.exception;return b?a.onError(b):a.onCompleted(),m}function c(c){a.call(this,b),this.value=c,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return q(c,a),r(c.prototype,j,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(d.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=this.observers.slice(0),c=b.length;c>a;a++)b[a].onCompleted();this.observers=[]}},onError:function(a){if(d.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var b=0,c=this.observers.slice(0),e=c.length;e>b;b++)c[b].onError(a);this.observers=[]}},onNext:function(a){if(d.call(this),!this.isStopped){this.value=a;for(var b=0,c=this.observers.slice(0),e=c.length;e>b;b++)c[b].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),c}(e),v=c.ReplaySubject=function(a){function b(a,b){return l(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function c(a){var c=new k(this.scheduler,a),e=b(this,c);d.call(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)c.onNext(this.q[g].value);return this.hasError?(f++,c.onError(this.error)):this.isStopped&&(f++,c.onCompleted()),c.ensureActive(f),e}function e(b,d,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==d?Number.MAX_VALUE:d,this.scheduler=e||o,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,c)}return q(e,a),r(e.prototype,j,{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(d.call(this),!this.isStopped){var b=this.scheduler.now();this.q.push({interval:b,value:a}),this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++){var g=c[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(d.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var b=this.scheduler.now();this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++){var g=c[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(d.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var b=this.observers.slice(0),c=0,e=b.length;e>c;c++){var f=b[c];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(e),w=c.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new n(f.subscribe(c),l(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return q(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new g(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(e);return c});
2
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(){if(this.isDisposed)throw new Error(s)}var e=c.Observable,f=e.prototype,g=c.AnonymousObservable,h=c.Subject,i=c.AsyncSubject,j=c.Observer,k=c.internals.ScheduledObserver,l=c.Disposable.create,m=c.Disposable.empty,n=c.CompositeDisposable,o=c.Scheduler.currentThread,p=c.helpers.isFunction,q=c.internals.inherits,r=c.internals.addProperties,s="Object has been disposed";f.multicast=function(a,b){var c=this;return"function"==typeof a?new g(function(d){var e=c.multicast(a());return new n(b(e).subscribe(d),e.connect())},c):new w(c,a)},f.publish=function(a){return a&&p(a)?this.multicast(function(){return new h},a):this.multicast(new h)},f.share=function(){return this.publish().refCount()},f.publishLast=function(a){return a&&p(a)?this.multicast(function(){return new i},a):this.multicast(new i)},f.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new u(b)},a):this.multicast(new u(a))},f.shareValue=function(a){return this.publishValue(a).refCount()},f.replay=function(a,b,c,d){return a&&p(a)?this.multicast(function(){return new v(b,c,d)},a):this.multicast(new v(b,c,d))},f.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var t=function(a,b){this.subject=a,this.observer=b};t.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 u=c.BehaviorSubject=function(a){function b(a){if(d.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new t(this,a);var b=this.exception;return b?a.onError(b):a.onCompleted(),m}function c(c){a.call(this,b),this.value=c,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return q(c,a),r(c.prototype,j,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(d.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=this.observers.slice(0),c=b.length;c>a;a++)b[a].onCompleted();this.observers=[]}},onError:function(a){if(d.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var b=0,c=this.observers.slice(0),e=c.length;e>b;b++)c[b].onError(a);this.observers=[]}},onNext:function(a){if(d.call(this),!this.isStopped){this.value=a;for(var b=0,c=this.observers.slice(0),e=c.length;e>b;b++)c[b].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),c}(e),v=c.ReplaySubject=function(a){function b(a,b){return l(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function c(a){var c=new k(this.scheduler,a),e=b(this,c);d.call(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function e(b,d,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==d?Number.MAX_VALUE:d,this.scheduler=e||o,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,c)}return q(e,a),r(e.prototype,j,{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(d.call(this),!this.isStopped){var b=this.scheduler.now();this.q.push({interval:b,value:a}),this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++){var g=c[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(d.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var b=this.scheduler.now();this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++){var g=c[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(d.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var b=this.observers.slice(0),c=0,e=b.length;e>c;c++){var f=b[c];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(e),w=c.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new n(f.subscribe(c),l(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return q(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new g(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(e);return c});
3
3
  //# sourceMappingURL=rx.binding.map
@@ -57,7 +57,7 @@
57
57
  duplicatekey = "duplicate key";
58
58
 
59
59
  function isPrime(candidate) {
60
- if (candidate & 1 === 0) { return candidate === 2; }
60
+ if ((candidate & 1) === 0) { return candidate === 2; }
61
61
  var num1 = Math.sqrt(candidate),
62
62
  num2 = 3;
63
63
  while (num2 <= num1) {
@@ -86,7 +86,7 @@
86
86
  if (!str.length) { return hash; }
87
87
  for (var i = 0, len = str.length; i < len; i++) {
88
88
  var character = str.charCodeAt(i);
89
- hash = ((hash<<5)-hash)+character;
89
+ hash = ((hash << 5) - hash) + character;
90
90
  hash = hash & hash;
91
91
  }
92
92
  return hash;
@@ -120,10 +120,10 @@
120
120
  if (typeof valueOf === 'number') { return numberHashFn(valueOf); }
121
121
  if (typeof obj === 'string') { return stringHashFn(valueOf); }
122
122
  }
123
- if (obj.getHashCode) { return obj.getHashCode(); }
123
+ if (obj.hashCode) { return obj.hashCode(); }
124
124
 
125
125
  var id = 17 * uniqueIdCounter++;
126
- obj.getHashCode = function () { return id; };
126
+ obj.hashCode = function () { return id; };
127
127
  return id;
128
128
  };
129
129
  }());
@@ -156,7 +156,7 @@
156
156
  };
157
157
 
158
158
  dictionaryProto.add = function (key, value) {
159
- return this._insert(key, value, true);
159
+ this._insert(key, value, true);
160
160
  };
161
161
 
162
162
  dictionaryProto._insert = function (key, value, add) {
@@ -384,7 +384,7 @@
384
384
  var result;
385
385
  try {
386
386
  result = resultSelector(v, value);
387
- } catch(exn) {
387
+ } catch (exn) {
388
388
  observer.onError(exn);
389
389
  return;
390
390
  }
@@ -399,7 +399,7 @@
399
399
  })
400
400
  );
401
401
  return group;
402
- });
402
+ }, left);
403
403
  };
404
404
 
405
405
  /**
@@ -511,7 +511,7 @@
511
511
  );
512
512
 
513
513
  return r;
514
- });
514
+ }, left);
515
515
  };
516
516
 
517
517
  /**
@@ -581,7 +581,7 @@
581
581
  }));
582
582
 
583
583
  return r;
584
- });
584
+ }, source);
585
585
  }
586
586
 
587
587
  function observableWindowWithClosingSelector(windowClosingSelector) {
@@ -601,7 +601,7 @@
601
601
  win.onCompleted();
602
602
  observer.onCompleted();
603
603
  }));
604
-
604
+
605
605
  function createWindowClose () {
606
606
  var windowClose;
607
607
  try {
@@ -628,7 +628,7 @@
628
628
 
629
629
  createWindowClose();
630
630
  return r;
631
- });
631
+ }, source);
632
632
  }
633
633
 
634
634
  /**
@@ -652,7 +652,7 @@
652
652
  },
653
653
  observer.onError.bind(observer),
654
654
  observer.onCompleted.bind(observer));
655
- });
655
+ }, source);
656
656
  };
657
657
 
658
658
  /**
@@ -787,7 +787,7 @@
787
787
  }));
788
788
 
789
789
  return refCountDisposable;
790
- });
790
+ }, source);
791
791
  };
792
792
 
793
793
  var GroupedObservable = (function (__super__) {
@@ -1,3 +1,3 @@
1
1
  /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
2
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b){return a.groupJoin(this,b,o,function(a,b){return b})}function f(a){var b=this;return new q(function(c){var d=new m,e=new i,f=new j(e);return c.onNext(r(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),v(a)&&(a=w(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new m,c.onNext(r(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f})}function g(a){var b=this;return new q(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}v(b)&&(b=w(b));var i=new k;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(t,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new m,c.onNext(r(h,g)),d()}))}var e=new l,f=new i(e),g=new j(f),h=new m;return c.onNext(r(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})}var h=c.Observable,i=c.CompositeDisposable,j=c.RefCountDisposable,k=c.SingleAssignmentDisposable,l=c.SerialDisposable,m=c.Subject,n=h.prototype,o=h.empty,p=h.never,q=c.AnonymousObservable,r=(c.Observer.create,c.internals.addRef),s=c.internals.isEqual,t=c.helpers.noop,u=c.helpers.identity,v=c.helpers.isPromise,w=h.fromPromise,x=function(){function a(a){if(a&!1)return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function b(b){var c,d,e;for(c=0;c<h.length;++c)if(d=h[c],d>=b)return d;for(e=1|b;e<h[h.length-1];){if(a(e))return e;e+=2}return b}function c(a){var b=757602046;if(!a.length)return b;for(var c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||s,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return c(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return c(b.toString());if("function"==typeof b.valueOf){var d=b.valueOf();if("number"==typeof d)return e(d);if("string"==typeof b)return c(d)}if(b.getHashCode)return b.getHashCode();var f=17*a++;return b.getHashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var c,d=b(a);for(this.buckets=new Array(d),this.entries=new Array(d),c=0;d>c;c++)this.buckets[c]=-1,this.entries[c]=f();this.freeList=-1},l.add=function(a,b){return this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=b(2*this.size),c=new Array(a);for(e=0;e<c.length;++e)c[e]=-1;var d=new Array(a);for(e=0;e<this.size;++e)d[e]=this.entries[e];for(var e=this.size;a>e;++e)d[e]=f();for(var g=0;g<this.size;++g){var h=d[g].hashCode%a;d[g].next=c[h],c[h]=g}this.buckets=c,this.entries=d},l.remove=function(a){if(this.buckets)for(var b=2147483647&k(a),c=b%this.buckets.length,d=-1,e=this.buckets[c];e>=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a<this.size;++a)this.entries[a]=f();this.freeList=-1,this.size=0}},l._findEntry=function(a){if(this.buckets)for(var b=2147483647&k(a),c=this.buckets[b%this.buckets.length];c>=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(a){var b=this._findEntry(a);return b>=0?this.entries[b].value:d},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c<this.size;c++)this.entries[c].hashCode>=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();n.join=function(a,b,c,d){var e=this;return new q(function(f){var g=new i,h=!1,j=!1,l=0,m=0,n=new x,o=new x;return g.add(e.subscribe(function(a){var c=l++,e=new k;n.add(c,a),g.add(e);var i,j=function(){n.remove(c)&&0===n.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(m){return void f.onError(m)}e.setDisposable(i.take(1).subscribe(t,f.onError.bind(f),j)),o.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(j||0===n.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=m++,e=new k;o.add(b,a),g.add(e);var h,i=function(){o.remove(b)&&0===o.count()&&j&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(l){return void f.onError(l)}e.setDisposable(h.take(1).subscribe(t,f.onError.bind(f),i)),n.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){j=!0,(h||0===o.count())&&f.onCompleted()})),g})},n.groupJoin=function(a,b,c,d){var e=this;return new q(function(f){function g(a){return function(b){b.onError(a)}}var h=new i,l=new j(h),n=new x,o=new x,p=0,q=0;return h.add(e.subscribe(function(a){var c=new m,e=p++;n.add(e,c);var i;try{i=d(a,r(c,l))}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}f.onNext(i),o.getValues().forEach(function(a){c.onNext(a)});var q=new k;h.add(q);var s,u=function(){n.remove(e)&&c.onCompleted(),h.remove(q)};try{s=b(a)}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}q.setDisposable(s.take(1).subscribe(t,function(a){n.getValues().forEach(g(a)),f.onError(a)},u))},function(a){n.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=q++;o.add(b,a);var d=new k;h.add(d);var e,i=function(){o.remove(b),h.remove(d)};try{e=c(a)}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}d.setDisposable(e.take(1).subscribe(t,function(a){n.getValues().forEach(g(a)),f.onError(a)},i)),n.getValues().forEach(function(b){b.onNext(a)})},function(a){n.getValues().forEach(g(a)),f.onError(a)})),l})},n.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},n.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?f.call(this,a):"function"==typeof a?g.call(this,a):e.call(this,a,b)},n.pairwise=function(){var a=this;return new q(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))})},n.partition=function(a,b){var c=this.publish().refCount();return[c.filter(a,b),c.filter(function(c,d,e){return!a.call(b,c,d,e)})]},n.groupBy=function(a,b,c){return this.groupByUntil(a,b,p,c)},n.groupByUntil=function(a,b,c,d){var e=this;return b||(b=u),d||(d=s),new q(function(f){function g(a){return function(b){b.onError(a)}}var h=new x(0,d),l=new i,n=new j(l);return l.add(e.subscribe(function(d){var e;try{e=a(d)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}var j=!1,o=h.tryGetValue(e);if(o||(o=new m,h.set(e,o),j=!0),j){var p=new y(e,o,n),q=new y(e,o);try{duration=c(q)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}f.onNext(p);var r=new k;l.add(r);var s=function(){h.remove(e)&&o.onCompleted(),l.remove(r)};r.setDisposable(duration.take(1).subscribe(t,function(a){h.getValues().forEach(g(a)),f.onError(a)},s))}var u;try{u=b(d)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}o.onNext(u)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),n})};var y=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 q(function(a){return new i(e.getDisposable(),d.subscribe(a))}):d}return inherits(c,a),c}(h);return c});
2
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b){return a.groupJoin(this,b,o,function(a,b){return b})}function f(a){var b=this;return new q(function(c){var d=new m,e=new i,f=new j(e);return c.onNext(r(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),v(a)&&(a=w(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new m,c.onNext(r(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function g(a){var b=this;return new q(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}v(b)&&(b=w(b));var i=new k;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(t,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new m,c.onNext(r(h,g)),d()}))}var e=new l,f=new i(e),g=new j(f),h=new m;return c.onNext(r(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 h=c.Observable,i=c.CompositeDisposable,j=c.RefCountDisposable,k=c.SingleAssignmentDisposable,l=c.SerialDisposable,m=c.Subject,n=h.prototype,o=h.empty,p=h.never,q=c.AnonymousObservable,r=(c.Observer.create,c.internals.addRef),s=c.internals.isEqual,t=c.helpers.noop,u=c.helpers.identity,v=c.helpers.isPromise,w=h.fromPromise,x=function(){function a(a){if(0===(1&a))return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function b(b){var c,d,e;for(c=0;c<h.length;++c)if(d=h[c],d>=b)return d;for(e=1|b;e<h[h.length-1];){if(a(e))return e;e+=2}return b}function c(a){var b=757602046;if(!a.length)return b;for(var c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||s,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return c(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return c(b.toString());if("function"==typeof b.valueOf){var d=b.valueOf();if("number"==typeof d)return e(d);if("string"==typeof b)return c(d)}if(b.hashCode)return b.hashCode();var f=17*a++;return b.hashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var c,d=b(a);for(this.buckets=new Array(d),this.entries=new Array(d),c=0;d>c;c++)this.buckets[c]=-1,this.entries[c]=f();this.freeList=-1},l.add=function(a,b){this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=b(2*this.size),c=new Array(a);for(e=0;e<c.length;++e)c[e]=-1;var d=new Array(a);for(e=0;e<this.size;++e)d[e]=this.entries[e];for(var e=this.size;a>e;++e)d[e]=f();for(var g=0;g<this.size;++g){var h=d[g].hashCode%a;d[g].next=c[h],c[h]=g}this.buckets=c,this.entries=d},l.remove=function(a){if(this.buckets)for(var b=2147483647&k(a),c=b%this.buckets.length,d=-1,e=this.buckets[c];e>=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a<this.size;++a)this.entries[a]=f();this.freeList=-1,this.size=0}},l._findEntry=function(a){if(this.buckets)for(var b=2147483647&k(a),c=this.buckets[b%this.buckets.length];c>=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(a){var b=this._findEntry(a);return b>=0?this.entries[b].value:d},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c<this.size;c++)this.entries[c].hashCode>=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();n.join=function(a,b,c,d){var e=this;return new q(function(f){var g=new i,h=!1,j=!1,l=0,m=0,n=new x,o=new x;return g.add(e.subscribe(function(a){var c=l++,e=new k;n.add(c,a),g.add(e);var i,j=function(){n.remove(c)&&0===n.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(m){return void f.onError(m)}e.setDisposable(i.take(1).subscribe(t,f.onError.bind(f),j)),o.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(j||0===n.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=m++,e=new k;o.add(b,a),g.add(e);var h,i=function(){o.remove(b)&&0===o.count()&&j&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(l){return void f.onError(l)}e.setDisposable(h.take(1).subscribe(t,f.onError.bind(f),i)),n.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){j=!0,(h||0===o.count())&&f.onCompleted()})),g},e)},n.groupJoin=function(a,b,c,d){var e=this;return new q(function(f){function g(a){return function(b){b.onError(a)}}var h=new i,l=new j(h),n=new x,o=new x,p=0,q=0;return h.add(e.subscribe(function(a){var c=new m,e=p++;n.add(e,c);var i;try{i=d(a,r(c,l))}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}f.onNext(i),o.getValues().forEach(function(a){c.onNext(a)});var q=new k;h.add(q);var s,u=function(){n.remove(e)&&c.onCompleted(),h.remove(q)};try{s=b(a)}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}q.setDisposable(s.take(1).subscribe(t,function(a){n.getValues().forEach(g(a)),f.onError(a)},u))},function(a){n.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=q++;o.add(b,a);var d=new k;h.add(d);var e,i=function(){o.remove(b),h.remove(d)};try{e=c(a)}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}d.setDisposable(e.take(1).subscribe(t,function(a){n.getValues().forEach(g(a)),f.onError(a)},i)),n.getValues().forEach(function(b){b.onNext(a)})},function(a){n.getValues().forEach(g(a)),f.onError(a)})),l},e)},n.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},n.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?f.call(this,a):"function"==typeof a?g.call(this,a):e.call(this,a,b)},n.pairwise=function(){var a=this;return new q(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)},n.partition=function(a,b){var c=this.publish().refCount();return[c.filter(a,b),c.filter(function(c,d,e){return!a.call(b,c,d,e)})]},n.groupBy=function(a,b,c){return this.groupByUntil(a,b,p,c)},n.groupByUntil=function(a,b,c,d){var e=this;return b||(b=u),d||(d=s),new q(function(f){function g(a){return function(b){b.onError(a)}}var h=new x(0,d),l=new i,n=new j(l);return l.add(e.subscribe(function(d){var e;try{e=a(d)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}var j=!1,o=h.tryGetValue(e);if(o||(o=new m,h.set(e,o),j=!0),j){var p=new y(e,o,n),q=new y(e,o);try{duration=c(q)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}f.onNext(p);var r=new k;l.add(r);var s=function(){h.remove(e)&&o.onCompleted(),l.remove(r)};r.setDisposable(duration.take(1).subscribe(t,function(a){h.getValues().forEach(g(a)),f.onError(a)},s))}var u;try{u=b(d)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}o.onNext(u)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),n},e)};var y=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 q(function(a){return new i(e.getDisposable(),d.subscribe(a))}):d}return inherits(c,a),c}(h);return c});
3
3
  //# sourceMappingURL=rx.coincidence.map