rxjs-rails 2.2.19 → 2.2.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca12b7cac3d584e7ae7333c48c6a9f0eb4c8365c
4
- data.tar.gz: 1417d47add82b99aa3d7795e0fd01a9e05c3e4de
3
+ metadata.gz: 8f8d85b2bb56fd175d2af4adeeb56d6fa53d5091
4
+ data.tar.gz: 0ecbe84af1353feb456f624ee8b7a21cea3ee354
5
5
  SHA512:
6
- metadata.gz: 706f784ad10ceef8cad344b47f33050008c81e6da1f7e4e02b90d3aa0a92b9d31f7663094772b2c4ad107c9faefaba18a57023aa32383aaad541aa03af9790fd
7
- data.tar.gz: f55b4c6143f62d22e2a8f0e684ac0f95a319dc16a47330c89a596ec50ac973b80d97adb9f7be004ca430cdf50830ab2aa59913221cbe4e74ea985849718976b7
6
+ metadata.gz: cda8783d1f7e832b56fc5e665317ad252fdc51966094b36542ef34a2971c07c1d693cf337cc9dc9287ebc3a2830976ddef9872bfc26ebd6b1f01005a94c2400e
7
+ data.tar.gz: 101bc97daf0e0558c9fbd026534fde7214a3ddf1422e0cc080566c5538a57e2a429ccb7d4ff58d655fa83c6a993b3ad4bdeb3ca3db3830b53b79d1061c337a21
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ task :sync_rxjs_repo do
6
6
  `cd tmp/RxJS && git pull`
7
7
  end
8
8
 
9
- desc 'update asset files to RxJS version'
9
+ desc 'update asset files to RxJS version (vX.X.X)'
10
10
  task(:update, [:version] => :sync_rxjs_repo) do |t,args|
11
11
 
12
12
  `cd tmp/RxJS && git co -b #{args[:version]}`
@@ -14,6 +14,6 @@ task(:update, [:version] => :sync_rxjs_repo) do |t,args|
14
14
  `cd tmp/RxJS && grunt`
15
15
  `rm -f vendor/assets/javascipts/*.js`
16
16
  `cp tmp/RxJS/rx*js vendor/assets/javascripts/`
17
-
17
+ `m4 -D version=#{args[:version].gsub(/^v/i, '')} version.rb.m4 > lib/rxjs/rails/version.rb`
18
18
  end
19
19
 
@@ -1,6 +1,6 @@
1
1
  module Rxjs
2
2
  module Rails
3
- VERSION = "2.2.19"
3
+ VERSION = "2.2.20"
4
4
  end
5
5
  end
6
6
 
@@ -33,20 +33,23 @@
33
33
  }
34
34
  }.call(this, function (root, exp, Rx, undefined) {
35
35
 
36
- // References
37
- var Observable = Rx.Observable,
38
- observableProto = Observable.prototype,
39
- CompositeDisposable = Rx.CompositeDisposable,
40
- AnonymousObservable = Rx.AnonymousObservable,
41
- isEqual = Rx.internals.isEqual,
42
- defaultComparer = Rx.helpers.defaultComparer,
43
- identity = Rx.helpers.identity,
44
- subComparer = Rx.helpers.defaultSubComparer;
36
+ // References
37
+ var Observable = Rx.Observable,
38
+ observableProto = Observable.prototype,
39
+ CompositeDisposable = Rx.CompositeDisposable,
40
+ AnonymousObservable = Rx.AnonymousObservable,
41
+ isEqual = Rx.internals.isEqual,
42
+ helpers = Rx.helpers,
43
+ defaultComparer = helpers.defaultComparer,
44
+ identity = helpers.identity,
45
+ subComparer = helpers.defaultSubComparer,
46
+ isPromise = helpers.isPromise,
47
+ observableFromPromise = Observable.fromPromise;
45
48
 
46
- // Defaults
47
- var argumentOutOfRange = 'Argument out of range';
48
- var sequenceContainsNoElements = "Sequence contains no elements.";
49
-
49
+ // Defaults
50
+ var argumentOutOfRange = 'Argument out of range',
51
+ sequenceContainsNoElements = "Sequence contains no elements.";
52
+
50
53
  function extremaBy(source, keySelector, comparer) {
51
54
  return new AnonymousObservable(function (observer) {
52
55
  var hasValue = false, lastKey = null, list = [];
@@ -318,117 +321,119 @@
318
321
  });
319
322
  };
320
323
 
321
- function sequenceEqualArray(first, second, comparer) {
322
- return new AnonymousObservable(function (observer) {
323
- var count = 0, len = second.length;
324
- return first.subscribe(function (value) {
325
- var equal = false;
326
- try {
327
- if (count < len) {
328
- equal = comparer(value, second[count++]);
329
- }
330
- } catch (e) {
331
- observer.onError(e);
332
- return;
333
- }
334
- if (!equal) {
335
- observer.onNext(false);
336
- observer.onCompleted();
337
- }
338
- }, observer.onError.bind(observer), function () {
339
- observer.onNext(count === len);
340
- observer.onCompleted();
341
- });
324
+ function sequenceEqualArray(first, second, comparer) {
325
+ return new AnonymousObservable(function (observer) {
326
+ var count = 0, len = second.length;
327
+ return first.subscribe(function (value) {
328
+ var equal = false;
329
+ try {
330
+ if (count < len) {
331
+ equal = comparer(value, second[count++]);
332
+ }
333
+ } catch (e) {
334
+ observer.onError(e);
335
+ return;
336
+ }
337
+ if (!equal) {
338
+ observer.onNext(false);
339
+ observer.onCompleted();
340
+ }
341
+ }, observer.onError.bind(observer), function () {
342
+ observer.onNext(count === len);
343
+ observer.onCompleted();
342
344
  });
345
+ });
346
+ }
347
+
348
+ /**
349
+ * Determines whether two sequences are equal by comparing the elements pairwise using a specified equality comparer.
350
+ *
351
+ * @example
352
+ * var res = res = source.sequenceEqual([1,2,3]);
353
+ * var res = res = source.sequenceEqual([{ value: 42 }], function (x, y) { return x.value === y.value; });
354
+ * 3 - res = source.sequenceEqual(Rx.Observable.returnValue(42));
355
+ * 4 - res = source.sequenceEqual(Rx.Observable.returnValue({ value: 42 }), function (x, y) { return x.value === y.value; });
356
+ * @param {Observable} second Second observable sequence or array to compare.
357
+ * @param {Function} [comparer] Comparer used to compare elements of both sequences.
358
+ * @returns {Observable} An observable sequence that contains a single element which indicates whether both sequences are of equal length and their corresponding elements are equal according to the specified equality comparer.
359
+ */
360
+ observableProto.sequenceEqual = function (second, comparer) {
361
+ var first = this;
362
+ comparer || (comparer = defaultComparer);
363
+ if (Array.isArray(second)) {
364
+ return sequenceEqualArray(first, second, comparer);
343
365
  }
344
-
345
- /**
346
- * Determines whether two sequences are equal by comparing the elements pairwise using a specified equality comparer.
347
- *
348
- * @example
349
- * var res = res = source.sequenceEqual([1,2,3]);
350
- * var res = res = source.sequenceEqual([{ value: 42 }], function (x, y) { return x.value === y.value; });
351
- * 3 - res = source.sequenceEqual(Rx.Observable.returnValue(42));
352
- * 4 - res = source.sequenceEqual(Rx.Observable.returnValue({ value: 42 }), function (x, y) { return x.value === y.value; });
353
- * @param {Observable} second Second observable sequence or array to compare.
354
- * @param {Function} [comparer] Comparer used to compare elements of both sequences.
355
- * @returns {Observable} An observable sequence that contains a single element which indicates whether both sequences are of equal length and their corresponding elements are equal according to the specified equality comparer.
356
- */
357
- observableProto.sequenceEqual = function (second, comparer) {
358
- var first = this;
359
- comparer || (comparer = defaultComparer);
360
- if (Array.isArray(second)) {
361
- return sequenceEqualArray(first, second, comparer);
366
+ return new AnonymousObservable(function (observer) {
367
+ var donel = false, doner = false, ql = [], qr = [];
368
+ var subscription1 = first.subscribe(function (x) {
369
+ var equal, v;
370
+ if (qr.length > 0) {
371
+ v = qr.shift();
372
+ try {
373
+ equal = comparer(v, x);
374
+ } catch (e) {
375
+ observer.onError(e);
376
+ return;
377
+ }
378
+ if (!equal) {
379
+ observer.onNext(false);
380
+ observer.onCompleted();
381
+ }
382
+ } else if (doner) {
383
+ observer.onNext(false);
384
+ observer.onCompleted();
385
+ } else {
386
+ ql.push(x);
362
387
  }
363
- return new AnonymousObservable(function (observer) {
364
- var donel = false, doner = false, ql = [], qr = [];
365
- var subscription1 = first.subscribe(function (x) {
366
- var equal, v;
367
- if (qr.length > 0) {
368
- v = qr.shift();
369
- try {
370
- equal = comparer(v, x);
371
- } catch (e) {
372
- observer.onError(e);
373
- return;
374
- }
375
- if (!equal) {
376
- observer.onNext(false);
377
- observer.onCompleted();
378
- }
379
- } else if (doner) {
380
- observer.onNext(false);
381
- observer.onCompleted();
382
- } else {
383
- ql.push(x);
384
- }
385
- }, observer.onError.bind(observer), function () {
386
- donel = true;
387
- if (ql.length === 0) {
388
- if (qr.length > 0) {
389
- observer.onNext(false);
390
- observer.onCompleted();
391
- } else if (doner) {
392
- observer.onNext(true);
393
- observer.onCompleted();
394
- }
395
- }
396
- });
397
- var subscription2 = second.subscribe(function (x) {
398
- var equal, v;
399
- if (ql.length > 0) {
400
- v = ql.shift();
401
- try {
402
- equal = comparer(v, x);
403
- } catch (exception) {
404
- observer.onError(exception);
405
- return;
406
- }
407
- if (!equal) {
408
- observer.onNext(false);
409
- observer.onCompleted();
410
- }
411
- } else if (donel) {
412
- observer.onNext(false);
413
- observer.onCompleted();
414
- } else {
415
- qr.push(x);
416
- }
417
- }, observer.onError.bind(observer), function () {
418
- doner = true;
419
- if (qr.length === 0) {
420
- if (ql.length > 0) {
421
- observer.onNext(false);
422
- observer.onCompleted();
423
- } else if (donel) {
424
- observer.onNext(true);
425
- observer.onCompleted();
426
- }
427
- }
428
- });
429
- return new CompositeDisposable(subscription1, subscription2);
430
- });
431
- };
388
+ }, observer.onError.bind(observer), function () {
389
+ donel = true;
390
+ if (ql.length === 0) {
391
+ if (qr.length > 0) {
392
+ observer.onNext(false);
393
+ observer.onCompleted();
394
+ } else if (doner) {
395
+ observer.onNext(true);
396
+ observer.onCompleted();
397
+ }
398
+ }
399
+ });
400
+
401
+ isPromise(second) && (second = observableFromPromise(second));
402
+ var subscription2 = second.subscribe(function (x) {
403
+ var equal, v;
404
+ if (ql.length > 0) {
405
+ v = ql.shift();
406
+ try {
407
+ equal = comparer(v, x);
408
+ } catch (exception) {
409
+ observer.onError(exception);
410
+ return;
411
+ }
412
+ if (!equal) {
413
+ observer.onNext(false);
414
+ observer.onCompleted();
415
+ }
416
+ } else if (donel) {
417
+ observer.onNext(false);
418
+ observer.onCompleted();
419
+ } else {
420
+ qr.push(x);
421
+ }
422
+ }, observer.onError.bind(observer), function () {
423
+ doner = true;
424
+ if (qr.length === 0) {
425
+ if (ql.length > 0) {
426
+ observer.onNext(false);
427
+ observer.onCompleted();
428
+ } else if (donel) {
429
+ observer.onNext(true);
430
+ observer.onCompleted();
431
+ }
432
+ }
433
+ });
434
+ return new CompositeDisposable(subscription1, subscription2);
435
+ });
436
+ };
432
437
 
433
438
  function elementAtOrDefault(source, index, hasDefault, defaultValue) {
434
439
  if (index < 0) {
@@ -1 +1 @@
1
- (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","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,d){function e(a,b,c){return new p(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)},d.onError.bind(d),function(){d.onNext(g),d.onCompleted()})})}function f(a){if(0===a.length)throw new Error(u);return a[0]}function g(a,b,c){return new p(function(d){var e=0,f=b.length;return a.subscribe(function(a){var g=!1;try{f>e&&(g=c(a,b[e++]))}catch(h){return void d.onError(h)}g||(d.onNext(!1),d.onCompleted())},d.onError.bind(d),function(){d.onNext(e===f),d.onCompleted()})})}function h(a,b,c,d){if(0>b)throw new Error(t);return new p(function(e){var f=b;return a.subscribe(function(a){0===f&&(e.onNext(a),e.onCompleted()),f--},e.onError.bind(e),function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(t))})})}function i(a,b,c){return new p(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(u))})})}function j(a,b,c){return new p(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},d.onError.bind(d),function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(u))})})}function k(a,b,c){return new p(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(u))})})}function l(a,b,c,e){return new p(function(f){var g=0;return a.subscribe(function(d){var h;try{h=b.call(c,d,g,a)}catch(i){return void f.onError(i)}h?(f.onNext(e?g:d),f.onCompleted()):g++},f.onError.bind(f),function(){f.onNext(e?-1:d),f.onCompleted()})})}var m=c.Observable,n=m.prototype,o=c.CompositeDisposable,p=c.AnonymousObservable,q=(c.internals.isEqual,c.helpers.defaultComparer),r=c.helpers.identity,s=c.helpers.defaultSubComparer,t="Argument out of range",u="Sequence contains no elements.";return n.aggregate=function(){var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},n.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},n.some=n.any=function(a,b){var c=this;return a?c.where(a,b).any():new p(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},n.isEmpty=function(){return this.any().select(function(a){return!a})},n.every=n.all=function(a,b){return this.where(function(b){return!a(b)},b).any().select(function(a){return!a})},n.contains=function(a,b){return b||(b=q),this.where(function(c){return b(c,a)}).any()},n.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},n.sum=function(a,b){return a?this.select(a,b).sum():this.aggregate(0,function(a,b){return a+b})},n.minBy=function(a,b){return b||(b=s),e(this,a,function(a,c){return-1*b(a,c)})},n.min=function(a){return this.minBy(r,a).select(function(a){return f(a)})},n.maxBy=function(a,b){return b||(b=s),e(this,a,b)},n.max=function(a){return this.maxBy(r,a).select(function(a){return f(a)})},n.average=function(a,b){return a?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().select(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},n.sequenceEqual=function(a,b){var c=this;return b||(b=q),Array.isArray(a)?g(c,a,b):new p(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)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))}),j=a.subscribe(function(a){var c,f;if(g.length>0){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)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new o(i,j)})},n.elementAt=function(a){return h(this,a,!1)},n.elementAtOrDefault=function(a,b){return h(this,a,!0,b)},n.single=function(a,b){return a?this.where(a,b).single():i(this,!1)},n.singleOrDefault=function(a,b,c){return a?this.where(a,c).singleOrDefault(null,b):i(this,!0,b)},n.first=function(a,b){return a?this.where(a,b).first():j(this,!1)},n.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):j(this,!0,b)},n.last=function(a,b){return a?this.where(a,b).last():k(this,!1)},n.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):k(this,!0,b)},n.find=function(a,b){return l(this,a,b,!1)},n.findIndex=function(a,b){return l(this,a,b,!0)},c});
1
+ (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","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,d){function e(a,b,c){return new p(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)},d.onError.bind(d),function(){d.onNext(g),d.onCompleted()})})}function f(a){if(0===a.length)throw new Error(x);return a[0]}function g(a,b,c){return new p(function(d){var e=0,f=b.length;return a.subscribe(function(a){var g=!1;try{f>e&&(g=c(a,b[e++]))}catch(h){return void d.onError(h)}g||(d.onNext(!1),d.onCompleted())},d.onError.bind(d),function(){d.onNext(e===f),d.onCompleted()})})}function h(a,b,c,d){if(0>b)throw new Error(w);return new p(function(e){var f=b;return a.subscribe(function(a){0===f&&(e.onNext(a),e.onCompleted()),f--},e.onError.bind(e),function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(w))})})}function i(a,b,c){return new p(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(x))})})}function j(a,b,c){return new p(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},d.onError.bind(d),function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(x))})})}function k(a,b,c){return new p(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(x))})})}function l(a,b,c,e){return new p(function(f){var g=0;return a.subscribe(function(d){var h;try{h=b.call(c,d,g,a)}catch(i){return void f.onError(i)}h?(f.onNext(e?g:d),f.onCompleted()):g++},f.onError.bind(f),function(){f.onNext(e?-1:d),f.onCompleted()})})}var m=c.Observable,n=m.prototype,o=c.CompositeDisposable,p=c.AnonymousObservable,q=(c.internals.isEqual,c.helpers),r=q.defaultComparer,s=q.identity,t=q.defaultSubComparer,u=q.isPromise,v=m.fromPromise,w="Argument out of range",x="Sequence contains no elements.";return n.aggregate=function(){var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},n.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},n.some=n.any=function(a,b){var c=this;return a?c.where(a,b).any():new p(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},n.isEmpty=function(){return this.any().select(function(a){return!a})},n.every=n.all=function(a,b){return this.where(function(b){return!a(b)},b).any().select(function(a){return!a})},n.contains=function(a,b){return b||(b=r),this.where(function(c){return b(c,a)}).any()},n.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},n.sum=function(a,b){return a?this.select(a,b).sum():this.aggregate(0,function(a,b){return a+b})},n.minBy=function(a,b){return b||(b=t),e(this,a,function(a,c){return-1*b(a,c)})},n.min=function(a){return this.minBy(s,a).select(function(a){return f(a)})},n.maxBy=function(a,b){return b||(b=t),e(this,a,b)},n.max=function(a){return this.maxBy(s,a).select(function(a){return f(a)})},n.average=function(a,b){return a?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().select(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},n.sequenceEqual=function(a,b){var c=this;return b||(b=r),Array.isArray(a)?g(c,a,b):new p(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)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});u(a)&&(a=v(a));var j=a.subscribe(function(a){var c,f;if(g.length>0){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)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new o(i,j)})},n.elementAt=function(a){return h(this,a,!1)},n.elementAtOrDefault=function(a,b){return h(this,a,!0,b)},n.single=function(a,b){return a?this.where(a,b).single():i(this,!1)},n.singleOrDefault=function(a,b,c){return a?this.where(a,c).singleOrDefault(null,b):i(this,!0,b)},n.first=function(a,b){return a?this.where(a,b).first():j(this,!1)},n.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):j(this,!0,b)},n.last=function(a,b){return a?this.where(a,b).last():k(this,!1)},n.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):k(this,!0,b)},n.find=function(a,b){return l(this,a,b,!1)},n.findIndex=function(a,b){return l(this,a,b,!0)},c});
@@ -43,6 +43,7 @@
43
43
  disposableCreate = Rx.Disposable.create,
44
44
  CompositeDisposable= Rx.CompositeDisposable,
45
45
  immediateScheduler = Rx.Scheduler.immediate,
46
+ timeoutScheduler = Rx.Scheduler.timeout,
46
47
  slice = Array.prototype.slice;
47
48
 
48
49
  /**
@@ -319,7 +320,7 @@
319
320
  selector);
320
321
  }
321
322
  if (jq) {
322
- var $elem = jq(elem);
323
+ var $elem = jq(element);
323
324
  return fromEventPattern(
324
325
  function (h) { $elem.on(eventName, h); },
325
326
  function (h) { $elem.off(eventName, h); },
@@ -1 +1 @@
1
- (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(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 e(a,b,c){if(a.addListener)return a.addListener(b,c),l(function(){a.removeListener(b,c)});if(a.addEventListener)return a.addEventListener(b,c,!1),l(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var e=function(a){c(d(a))};return a.attachEvent("on"+b,e),l(function(){a.detachEvent("on"+b,e)})}return a["on"+b]=c,l(function(){a["on"+b]=null})}function f(a,b,c){var d=new m;if("function"==typeof a.item&&"number"==typeof a.length)for(var g=0,h=a.length;h>g;g++)d.add(f(a.item(g),b,c));else a&&d.add(e(a,b,c));return d}var g=c.Observable,h=(g.prototype,g.fromPromise),i=g.throwException,j=c.AnonymousObservable,k=c.AsyncSubject,l=c.Disposable.create,m=c.CompositeDisposable,n=c.Scheduler.immediate,o=Array.prototype.slice;g.start=function(a,b,c){return p(a,b,c)()};var p=g.toAsync=function(a,b,c){return b||(b=timeoutScheduler),function(){var d=arguments,e=new k;return b.schedule(function(){var b;try{b=a.apply(c,d)}catch(f){return void e.onError(f)}e.onNext(b),e.onCompleted()}),e.asObservable()}};g.fromCallback=function(a,b,c,d){return b||(b=n),function(){var e=o.call(arguments,0);return new j(function(f){return b.schedule(function(){function b(a){var b=a;if(d)try{b=d(arguments)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},g.fromNodeCallback=function(a,b,c,d){return b||(b=n),function(){var e=o.call(arguments,0);return new j(function(f){return b.schedule(function(){function b(a){if(a)return void f.onError(a);var b=o.call(arguments,1);if(d)try{b=d(b)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}};var q=a.angular&&angular.element?angular.element:a.jQuery?a.jQuery:a.Zepto?a.Zepto:null,r=!!a.Ember&&"function"==typeof a.Ember.addListener;g.fromEvent=function(a,b,c){if(r)return s(function(){Ember.addListener(a,b)},function(){Ember.removeListener(a,b)},c);if(q){var d=q(elem);return s(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}return new j(function(d){return f(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var s=g.fromEventPattern=function(a,b,c){return new j(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 l(function(){b&&b(e,f)})}).publish().refCount()};return g.startAsync=function(a){var b;try{b=a()}catch(c){return i(c)}return h(b)},c});
1
+ (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(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 e(a,b,c){if(a.addListener)return a.addListener(b,c),l(function(){a.removeListener(b,c)});if(a.addEventListener)return a.addEventListener(b,c,!1),l(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var e=function(a){c(d(a))};return a.attachEvent("on"+b,e),l(function(){a.detachEvent("on"+b,e)})}return a["on"+b]=c,l(function(){a["on"+b]=null})}function f(a,b,c){var d=new m;if("function"==typeof a.item&&"number"==typeof a.length)for(var g=0,h=a.length;h>g;g++)d.add(f(a.item(g),b,c));else a&&d.add(e(a,b,c));return d}var g=c.Observable,h=(g.prototype,g.fromPromise),i=g.throwException,j=c.AnonymousObservable,k=c.AsyncSubject,l=c.Disposable.create,m=c.CompositeDisposable,n=c.Scheduler.immediate,o=c.Scheduler.timeout,p=Array.prototype.slice;g.start=function(a,b,c){return q(a,b,c)()};var q=g.toAsync=function(a,b,c){return b||(b=o),function(){var d=arguments,e=new k;return b.schedule(function(){var b;try{b=a.apply(c,d)}catch(f){return void e.onError(f)}e.onNext(b),e.onCompleted()}),e.asObservable()}};g.fromCallback=function(a,b,c,d){return b||(b=n),function(){var e=p.call(arguments,0);return new j(function(f){return b.schedule(function(){function b(a){var b=a;if(d)try{b=d(arguments)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},g.fromNodeCallback=function(a,b,c,d){return b||(b=n),function(){var e=p.call(arguments,0);return new j(function(f){return b.schedule(function(){function b(a){if(a)return void f.onError(a);var b=p.call(arguments,1);if(d)try{b=d(b)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}};var r=a.angular&&angular.element?angular.element:a.jQuery?a.jQuery:a.Zepto?a.Zepto:null,s=!!a.Ember&&"function"==typeof a.Ember.addListener;g.fromEvent=function(a,b,c){if(s)return t(function(){Ember.addListener(a,b)},function(){Ember.removeListener(a,b)},c);if(r){var d=r(a);return t(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}return new j(function(d){return f(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var t=g.fromEventPattern=function(a,b,c){return new j(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 l(function(){b&&b(e,f)})}).publish().refCount()};return g.startAsync=function(a){var b;try{b=a()}catch(c){return i(c)}return h(b)},c});
@@ -43,6 +43,7 @@
43
43
  disposableCreate = Rx.Disposable.create,
44
44
  CompositeDisposable= Rx.CompositeDisposable,
45
45
  immediateScheduler = Rx.Scheduler.immediate,
46
+ timeoutScheduler = Rx.Scheduler.timeout,
46
47
  slice = Array.prototype.slice;
47
48
 
48
49
  /**
@@ -251,7 +252,7 @@
251
252
  selector);
252
253
  }
253
254
  if (jq) {
254
- var $elem = jq(elem);
255
+ var $elem = jq(element);
255
256
  return fromEventPattern(
256
257
  function (h) { $elem.on(eventName, h); },
257
258
  function (h) { $elem.off(eventName, h); },
@@ -1 +1 @@
1
- (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,c){if(a.addListener)return a.addListener(b,c),k(function(){a.removeListener(b,c)});if(a.addEventListener)return a.addEventListener(b,c,!1),k(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function e(a,b,c){var f=new l;if("function"==typeof a.item&&"number"==typeof a.length)for(var g=0,h=a.length;h>g;g++)f.add(e(a.item(g),b,c));else a&&f.add(d(a,b,c));return f}var f=c.Observable,g=(f.prototype,f.fromPromise),h=f.throwException,i=c.AnonymousObservable,j=c.AsyncSubject,k=c.Disposable.create,l=c.CompositeDisposable,m=c.Scheduler.immediate,n=Array.prototype.slice;f.start=function(a,b,c){return o(a,b,c)()};var o=f.toAsync=function(a,b,c){return b||(b=timeoutScheduler),function(){var d=arguments,e=new j;return b.schedule(function(){var b;try{b=a.apply(c,d)}catch(f){return void e.onError(f)}e.onNext(b),e.onCompleted()}),e.asObservable()}};f.fromCallback=function(a,b,c,d){return b||(b=m),function(){var e=n.call(arguments,0);return new i(function(f){return b.schedule(function(){function b(a){var b=a;if(d)try{b=d(arguments)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},f.fromNodeCallback=function(a,b,c,d){return b||(b=m),function(){var e=n.call(arguments,0);return new i(function(f){return b.schedule(function(){function b(a){if(a)return void f.onError(a);var b=n.call(arguments,1);if(d)try{b=d(b)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}};var p=a.angular&&angular.element?angular.element:a.jQuery?a.jQuery:a.Zepto?a.Zepto:null,q=!!a.Ember&&"function"==typeof a.Ember.addListener;f.fromEvent=function(a,b,c){if(q)return r(function(){Ember.addListener(a,b)},function(){Ember.removeListener(a,b)},c);if(p){var d=p(elem);return r(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}return new i(function(d){return e(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var r=f.fromEventPattern=function(a,b,c){return new i(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 k(function(){b&&b(e,f)})}).publish().refCount()};return f.startAsync=function(a){var b;try{b=a()}catch(c){return h(c)}return g(b)},c});
1
+ (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,c){if(a.addListener)return a.addListener(b,c),k(function(){a.removeListener(b,c)});if(a.addEventListener)return a.addEventListener(b,c,!1),k(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function e(a,b,c){var f=new l;if("function"==typeof a.item&&"number"==typeof a.length)for(var g=0,h=a.length;h>g;g++)f.add(e(a.item(g),b,c));else a&&f.add(d(a,b,c));return f}var f=c.Observable,g=(f.prototype,f.fromPromise),h=f.throwException,i=c.AnonymousObservable,j=c.AsyncSubject,k=c.Disposable.create,l=c.CompositeDisposable,m=c.Scheduler.immediate,n=c.Scheduler.timeout,o=Array.prototype.slice;f.start=function(a,b,c){return p(a,b,c)()};var p=f.toAsync=function(a,b,c){return b||(b=n),function(){var d=arguments,e=new j;return b.schedule(function(){var b;try{b=a.apply(c,d)}catch(f){return void e.onError(f)}e.onNext(b),e.onCompleted()}),e.asObservable()}};f.fromCallback=function(a,b,c,d){return b||(b=m),function(){var e=o.call(arguments,0);return new i(function(f){return b.schedule(function(){function b(a){var b=a;if(d)try{b=d(arguments)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},f.fromNodeCallback=function(a,b,c,d){return b||(b=m),function(){var e=o.call(arguments,0);return new i(function(f){return b.schedule(function(){function b(a){if(a)return void f.onError(a);var b=o.call(arguments,1);if(d)try{b=d(b)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}};var q=a.angular&&angular.element?angular.element:a.jQuery?a.jQuery:a.Zepto?a.Zepto:null,r=!!a.Ember&&"function"==typeof a.Ember.addListener;f.fromEvent=function(a,b,c){if(r)return s(function(){Ember.addListener(a,b)},function(){Ember.removeListener(a,b)},c);if(q){var d=q(a);return s(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}return new i(function(d){return e(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var s=f.fromEventPattern=function(a,b,c){return new i(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 k(function(){b&&b(e,f)})}).publish().refCount()};return f.startAsync=function(a){var b;try{b=a()}catch(c){return h(c)}return g(b)},c});