rxjs-rails 2.3.0 → 2.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rxjs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/rx.aggregates.js +115 -27
  4. data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
  5. data/vendor/assets/javascripts/rx.all.compat.js +2751 -2702
  6. data/vendor/assets/javascripts/rx.all.compat.min.js +3 -3
  7. data/vendor/assets/javascripts/rx.all.js +2605 -2589
  8. data/vendor/assets/javascripts/rx.all.min.js +3 -3
  9. data/vendor/assets/javascripts/rx.async.compat.js +41 -22
  10. data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
  11. data/vendor/assets/javascripts/rx.async.js +41 -22
  12. data/vendor/assets/javascripts/rx.async.min.js +1 -1
  13. data/vendor/assets/javascripts/rx.backpressure.js +41 -45
  14. data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
  15. data/vendor/assets/javascripts/rx.binding.js +81 -111
  16. data/vendor/assets/javascripts/rx.binding.min.js +1 -1
  17. data/vendor/assets/javascripts/rx.coincidence.js +567 -486
  18. data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
  19. data/vendor/assets/javascripts/rx.compat.js +1430 -1532
  20. data/vendor/assets/javascripts/rx.compat.min.js +2 -2
  21. data/vendor/assets/javascripts/rx.core.compat.js +76 -127
  22. data/vendor/assets/javascripts/rx.core.compat.min.js +1 -1
  23. data/vendor/assets/javascripts/rx.core.js +76 -127
  24. data/vendor/assets/javascripts/rx.core.min.js +1 -1
  25. data/vendor/assets/javascripts/rx.experimental.js +36 -36
  26. data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
  27. data/vendor/assets/javascripts/rx.joinpatterns.js +281 -281
  28. data/vendor/assets/javascripts/rx.js +1286 -1421
  29. data/vendor/assets/javascripts/rx.lite.compat.js +1443 -1749
  30. data/vendor/assets/javascripts/rx.lite.compat.min.js +2 -2
  31. data/vendor/assets/javascripts/rx.lite.extras.js +133 -205
  32. data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
  33. data/vendor/assets/javascripts/rx.lite.js +1319 -1658
  34. data/vendor/assets/javascripts/rx.lite.min.js +2 -2
  35. data/vendor/assets/javascripts/rx.min.js +2 -2
  36. data/vendor/assets/javascripts/rx.testing.js +302 -322
  37. data/vendor/assets/javascripts/rx.testing.min.js +1 -1
  38. data/vendor/assets/javascripts/rx.time.js +90 -75
  39. data/vendor/assets/javascripts/rx.time.min.js +1 -1
  40. data/vendor/assets/javascripts/rx.virtualtime.js +264 -279
  41. data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
  42. metadata +10 -11
@@ -1,4 +1,4 @@
1
- // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
1
+ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
2
 
3
3
  ;(function (factory) {
4
4
  var objectTypes = {
@@ -33,335 +33,315 @@
33
33
  }
34
34
  }.call(this, function (root, exp, Rx, undefined) {
35
35
 
36
- // Defaults
37
- var Observer = Rx.Observer,
38
- Observable = Rx.Observable,
39
- Notification = Rx.Notification,
40
- VirtualTimeScheduler = Rx.VirtualTimeScheduler,
41
- Disposable = Rx.Disposable,
42
- disposableEmpty = Disposable.empty,
43
- disposableCreate = Disposable.create,
44
- CompositeDisposable = Rx.CompositeDisposable,
45
- SingleAssignmentDisposable = Rx.SingleAssignmentDisposable,
46
- slice = Array.prototype.slice,
47
- inherits = Rx.internals.inherits,
48
- defaultComparer = Rx.internals.isEqual;
49
-
50
- function argsOrArray(args, idx) {
51
- return args.length === 1 && Array.isArray(args[idx]) ?
52
- args[idx] :
53
- slice.call(args);
54
- }
55
-
56
- /**
57
- * @private
58
- * @constructor
59
- */
60
- function OnNextPredicate(predicate) {
61
- this.predicate = predicate;
62
- };
63
-
64
- /**
65
- * @private
66
- * @memberOf OnNextPredicate#
67
- */
68
- OnNextPredicate.prototype.equals = function (other) {
69
- if (other === this) { return true; }
70
- if (other == null) { return false; }
71
- if (other.kind !== 'N') { return false; }
72
- return this.predicate(other.value);
73
- };
74
-
75
- /**
76
- * @private
77
- * @constructor
78
- */
79
- function OnErrorPredicate(predicate) {
80
- this.predicate = predicate;
81
- };
82
-
83
- /**
84
- * @private
85
- * @memberOf OnErrorPredicate#
86
- */
87
- OnErrorPredicate.prototype.equals = function (other) {
88
- if (other === this) { return true; }
89
- if (other == null) { return false; }
90
- if (other.kind !== 'E') { return false; }
91
- return this.predicate(other.exception);
92
- };
93
-
94
- /**
95
- * @static
96
- * type Object
97
- */
98
- var ReactiveTest = Rx.ReactiveTest = {
99
- /** Default virtual time used for creation of observable sequences in unit tests. */
100
- created: 100,
101
- /** Default virtual time used to subscribe to observable sequences in unit tests. */
102
- subscribed: 200,
103
- /** Default virtual time used to dispose subscriptions in unit tests. */
104
- disposed: 1000,
105
-
106
- /**
107
- * Factory method for an OnNext notification record at a given time with a given value or a predicate function.
108
- *
109
- * 1 - ReactiveTest.onNext(200, 42);
110
- * 2 - ReactiveTest.onNext(200, function (x) { return x.length == 2; });
111
- *
112
- * @param ticks Recorded virtual time the OnNext notification occurs.
113
- * @param value Recorded value stored in the OnNext notification or a predicate.
114
- * @return Recorded OnNext notification.
115
- */
116
- onNext: function (ticks, value) {
117
- if (typeof value === 'function') {
118
- return new Recorded(ticks, new OnNextPredicate(value));
119
- }
120
- return new Recorded(ticks, Notification.createOnNext(value));
121
- },
122
- /**
123
- * Factory method for an OnError notification record at a given time with a given error.
124
- *
125
- * 1 - ReactiveTest.onNext(200, new Error('error'));
126
- * 2 - ReactiveTest.onNext(200, function (e) { return e.message === 'error'; });
127
- *
128
- * @param ticks Recorded virtual time the OnError notification occurs.
129
- * @param exception Recorded exception stored in the OnError notification.
130
- * @return Recorded OnError notification.
131
- */
132
- onError: function (ticks, exception) {
133
- if (typeof exception === 'function') {
134
- return new Recorded(ticks, new OnErrorPredicate(exception));
135
- }
136
- return new Recorded(ticks, Notification.createOnError(exception));
137
- },
138
- /**
139
- * Factory method for an OnCompleted notification record at a given time.
140
- *
141
- * @param ticks Recorded virtual time the OnCompleted notification occurs.
142
- * @return Recorded OnCompleted notification.
143
- */
144
- onCompleted: function (ticks) {
145
- return new Recorded(ticks, Notification.createOnCompleted());
146
- },
147
- /**
148
- * Factory method for a subscription record based on a given subscription and disposal time.
149
- *
150
- * @param start Virtual time indicating when the subscription was created.
151
- * @param end Virtual time indicating when the subscription was disposed.
152
- * @return Subscription object.
153
- */
154
- subscribe: function (start, end) {
155
- return new Subscription(start, end);
156
- }
157
- };
36
+ // Defaults
37
+ var Observer = Rx.Observer,
38
+ Observable = Rx.Observable,
39
+ Notification = Rx.Notification,
40
+ VirtualTimeScheduler = Rx.VirtualTimeScheduler,
41
+ Disposable = Rx.Disposable,
42
+ disposableEmpty = Disposable.empty,
43
+ disposableCreate = Disposable.create,
44
+ CompositeDisposable = Rx.CompositeDisposable,
45
+ SingleAssignmentDisposable = Rx.SingleAssignmentDisposable,
46
+ slice = Array.prototype.slice,
47
+ inherits = Rx.internals.inherits,
48
+ defaultComparer = Rx.internals.isEqual;
49
+
50
+ function argsOrArray(args, idx) {
51
+ return args.length === 1 && Array.isArray(args[idx]) ?
52
+ args[idx] :
53
+ slice.call(args);
54
+ }
55
+
56
+ function OnNextPredicate(predicate) {
57
+ this.predicate = predicate;
58
+ };
59
+
60
+ OnNextPredicate.prototype.equals = function (other) {
61
+ if (other === this) { return true; }
62
+ if (other == null) { return false; }
63
+ if (other.kind !== 'N') { return false; }
64
+ return this.predicate(other.value);
65
+ };
66
+
67
+ function OnErrorPredicate(predicate) {
68
+ this.predicate = predicate;
69
+ };
70
+
71
+ OnErrorPredicate.prototype.equals = function (other) {
72
+ if (other === this) { return true; }
73
+ if (other == null) { return false; }
74
+ if (other.kind !== 'E') { return false; }
75
+ return this.predicate(other.exception);
76
+ };
77
+
78
+ var ReactiveTest = Rx.ReactiveTest = {
79
+ /** Default virtual time used for creation of observable sequences in unit tests. */
80
+ created: 100,
81
+ /** Default virtual time used to subscribe to observable sequences in unit tests. */
82
+ subscribed: 200,
83
+ /** Default virtual time used to dispose subscriptions in unit tests. */
84
+ disposed: 1000,
158
85
 
159
86
  /**
160
- * Creates a new object recording the production of the specified value at the given virtual time.
161
- *
162
- * @constructor
163
- * @param {Number} time Virtual time the value was produced on.
164
- * @param {Mixed} value Value that was produced.
165
- * @param {Function} comparer An optional comparer.
87
+ * Factory method for an OnNext notification record at a given time with a given value or a predicate function.
88
+ *
89
+ * 1 - ReactiveTest.onNext(200, 42);
90
+ * 2 - ReactiveTest.onNext(200, function (x) { return x.length == 2; });
91
+ *
92
+ * @param ticks Recorded virtual time the OnNext notification occurs.
93
+ * @param value Recorded value stored in the OnNext notification or a predicate.
94
+ * @return Recorded OnNext notification.
166
95
  */
167
- var Recorded = Rx.Recorded = function (time, value, comparer) {
168
- this.time = time;
169
- this.value = value;
170
- this.comparer = comparer || defaultComparer;
171
- };
172
-
173
- /**
174
- * Checks whether the given recorded object is equal to the current instance.
175
- *
176
- * @param {Recorded} other Recorded object to check for equality.
177
- * @returns {Boolean} true if both objects are equal; false otherwise.
178
- */
179
- Recorded.prototype.equals = function (other) {
180
- return this.time === other.time && this.comparer(this.value, other.value);
181
- };
182
-
96
+ onNext: function (ticks, value) {
97
+ if (typeof value === 'function') {
98
+ return new Recorded(ticks, new OnNextPredicate(value));
99
+ }
100
+ return new Recorded(ticks, Notification.createOnNext(value));
101
+ },
183
102
  /**
184
- * Returns a string representation of the current Recorded value.
185
- *
186
- * @returns {String} String representation of the current Recorded value.
187
- */
188
- Recorded.prototype.toString = function () {
189
- return this.value.toString() + '@' + this.time;
190
- };
191
-
103
+ * Factory method for an OnError notification record at a given time with a given error.
104
+ *
105
+ * 1 - ReactiveTest.onNext(200, new Error('error'));
106
+ * 2 - ReactiveTest.onNext(200, function (e) { return e.message === 'error'; });
107
+ *
108
+ * @param ticks Recorded virtual time the OnError notification occurs.
109
+ * @param exception Recorded exception stored in the OnError notification.
110
+ * @return Recorded OnError notification.
111
+ */
112
+ onError: function (ticks, exception) {
113
+ if (typeof exception === 'function') {
114
+ return new Recorded(ticks, new OnErrorPredicate(exception));
115
+ }
116
+ return new Recorded(ticks, Notification.createOnError(exception));
117
+ },
192
118
  /**
193
- * Creates a new subscription object with the given virtual subscription and unsubscription time.
119
+ * Factory method for an OnCompleted notification record at a given time.
194
120
  *
195
- * @constructor
196
- * @param {Number} subscribe Virtual time at which the subscription occurred.
197
- * @param {Number} unsubscribe Virtual time at which the unsubscription occurred.
121
+ * @param ticks Recorded virtual time the OnCompleted notification occurs.
122
+ * @return Recorded OnCompleted notification.
198
123
  */
199
- var Subscription = Rx.Subscription = function (start, end) {
200
- this.subscribe = start;
201
- this.unsubscribe = end || Number.MAX_VALUE;
202
- };
203
-
124
+ onCompleted: function (ticks) {
125
+ return new Recorded(ticks, Notification.createOnCompleted());
126
+ },
204
127
  /**
205
- * Checks whether the given subscription is equal to the current instance.
206
- * @param other Subscription object to check for equality.
207
- * @returns {Boolean} true if both objects are equal; false otherwise.
208
- */
209
- Subscription.prototype.equals = function (other) {
210
- return this.subscribe === other.subscribe && this.unsubscribe === other.unsubscribe;
211
- };
212
-
213
- /**
214
- * Returns a string representation of the current Subscription value.
215
- * @returns {String} String representation of the current Subscription value.
216
- */
217
- Subscription.prototype.toString = function () {
218
- return '(' + this.subscribe + ', ' + this.unsubscribe === Number.MAX_VALUE ? 'Infinite' : this.unsubscribe + ')';
219
- };
220
-
221
- /** @private */
222
- var MockDisposable = Rx.MockDisposable = function (scheduler) {
223
- this.scheduler = scheduler;
224
- this.disposes = [];
225
- this.disposes.push(this.scheduler.clock);
226
- };
227
-
228
- /*
229
- * @memberOf MockDisposable#
230
- * @prviate
128
+ * Factory method for a subscription record based on a given subscription and disposal time.
129
+ *
130
+ * @param start Virtual time indicating when the subscription was created.
131
+ * @param end Virtual time indicating when the subscription was disposed.
132
+ * @return Subscription object.
231
133
  */
232
- MockDisposable.prototype.dispose = function () {
233
- this.disposes.push(this.scheduler.clock);
234
- };
235
-
236
- /** @private */
237
- var MockObserver = (function (_super) {
238
- inherits(MockObserver, _super);
239
-
240
- /*
241
- * @constructor
242
- * @prviate
243
- */
244
- function MockObserver(scheduler) {
245
- _super.call(this);
246
- this.scheduler = scheduler;
247
- this.messages = [];
248
- }
249
-
250
- var MockObserverPrototype = MockObserver.prototype;
251
-
252
- /*
253
- * @memberOf MockObserverPrototype#
254
- * @prviate
255
- */
256
- MockObserverPrototype.onNext = function (value) {
257
- this.messages.push(new Recorded(this.scheduler.clock, Notification.createOnNext(value)));
258
- };
259
-
260
- /*
261
- * @memberOf MockObserverPrototype#
262
- * @prviate
263
- */
264
- MockObserverPrototype.onError = function (exception) {
265
- this.messages.push(new Recorded(this.scheduler.clock, Notification.createOnError(exception)));
266
- };
267
-
268
- /*
269
- * @memberOf MockObserverPrototype#
270
- * @prviate
271
- */
272
- MockObserverPrototype.onCompleted = function () {
273
- this.messages.push(new Recorded(this.scheduler.clock, Notification.createOnCompleted()));
274
- };
275
-
276
- return MockObserver;
277
- })(Observer);
278
-
279
- /** @private */
280
- var HotObservable = (function (_super) {
281
-
282
- function subscribe(observer) {
283
- var observable = this;
284
- this.observers.push(observer);
285
- this.subscriptions.push(new Subscription(this.scheduler.clock));
286
- var index = this.subscriptions.length - 1;
287
- return disposableCreate(function () {
288
- var idx = observable.observers.indexOf(observer);
289
- observable.observers.splice(idx, 1);
290
- observable.subscriptions[index] = new Subscription(observable.subscriptions[index].subscribe, observable.scheduler.clock);
291
- });
292
- }
293
-
294
- inherits(HotObservable, _super);
295
-
296
- /**
297
- * @private
298
- * @constructor
299
- */
300
- function HotObservable(scheduler, messages) {
301
- _super.call(this, subscribe);
302
- var message, notification, observable = this;
303
- this.scheduler = scheduler;
304
- this.messages = messages;
305
- this.subscriptions = [];
306
- this.observers = [];
307
- for (var i = 0, len = this.messages.length; i < len; i++) {
308
- message = this.messages[i];
309
- notification = message.value;
310
- (function (innerNotification) {
311
- scheduler.scheduleAbsoluteWithState(null, message.time, function () {
312
- var obs = observable.observers.slice(0);
313
-
314
- for (var j = 0, jLen = obs.length; j < jLen; j++) {
315
- innerNotification.accept(obs[j]);
316
- }
317
- return disposableEmpty;
318
- });
319
- })(notification);
320
- }
321
- }
322
-
323
- return HotObservable;
324
- })(Observable);
325
-
326
- /** @private */
327
- var ColdObservable = (function (_super) {
328
-
329
- function subscribe(observer) {
330
- var message, notification, observable = this;
331
- this.subscriptions.push(new Subscription(this.scheduler.clock));
332
- var index = this.subscriptions.length - 1;
333
- var d = new CompositeDisposable();
334
- for (var i = 0, len = this.messages.length; i < len; i++) {
335
- message = this.messages[i];
336
- notification = message.value;
337
- (function (innerNotification) {
338
- d.add(observable.scheduler.scheduleRelativeWithState(null, message.time, function () {
339
- innerNotification.accept(observer);
340
- return disposableEmpty;
341
- }));
342
- })(notification);
343
- }
344
- return disposableCreate(function () {
345
- observable.subscriptions[index] = new Subscription(observable.subscriptions[index].subscribe, observable.scheduler.clock);
346
- d.dispose();
347
- });
348
- }
349
-
350
- inherits(ColdObservable, _super);
351
-
352
- /**
353
- * @private
354
- * @constructor
355
- */
356
- function ColdObservable(scheduler, messages) {
357
- _super.call(this, subscribe);
358
- this.scheduler = scheduler;
359
- this.messages = messages;
360
- this.subscriptions = [];
361
- }
362
-
363
- return ColdObservable;
364
- })(Observable);
134
+ subscribe: function (start, end) {
135
+ return new Subscription(start, end);
136
+ }
137
+ };
138
+
139
+ /**
140
+ * Creates a new object recording the production of the specified value at the given virtual time.
141
+ *
142
+ * @constructor
143
+ * @param {Number} time Virtual time the value was produced on.
144
+ * @param {Mixed} value Value that was produced.
145
+ * @param {Function} comparer An optional comparer.
146
+ */
147
+ var Recorded = Rx.Recorded = function (time, value, comparer) {
148
+ this.time = time;
149
+ this.value = value;
150
+ this.comparer = comparer || defaultComparer;
151
+ };
152
+
153
+ /**
154
+ * Checks whether the given recorded object is equal to the current instance.
155
+ *
156
+ * @param {Recorded} other Recorded object to check for equality.
157
+ * @returns {Boolean} true if both objects are equal; false otherwise.
158
+ */
159
+ Recorded.prototype.equals = function (other) {
160
+ return this.time === other.time && this.comparer(this.value, other.value);
161
+ };
162
+
163
+ /**
164
+ * Returns a string representation of the current Recorded value.
165
+ *
166
+ * @returns {String} String representation of the current Recorded value.
167
+ */
168
+ Recorded.prototype.toString = function () {
169
+ return this.value.toString() + '@' + this.time;
170
+ };
171
+
172
+ /**
173
+ * Creates a new subscription object with the given virtual subscription and unsubscription time.
174
+ *
175
+ * @constructor
176
+ * @param {Number} subscribe Virtual time at which the subscription occurred.
177
+ * @param {Number} unsubscribe Virtual time at which the unsubscription occurred.
178
+ */
179
+ var Subscription = Rx.Subscription = function (start, end) {
180
+ this.subscribe = start;
181
+ this.unsubscribe = end || Number.MAX_VALUE;
182
+ };
183
+
184
+ /**
185
+ * Checks whether the given subscription is equal to the current instance.
186
+ * @param other Subscription object to check for equality.
187
+ * @returns {Boolean} true if both objects are equal; false otherwise.
188
+ */
189
+ Subscription.prototype.equals = function (other) {
190
+ return this.subscribe === other.subscribe && this.unsubscribe === other.unsubscribe;
191
+ };
192
+
193
+ /**
194
+ * Returns a string representation of the current Subscription value.
195
+ * @returns {String} String representation of the current Subscription value.
196
+ */
197
+ Subscription.prototype.toString = function () {
198
+ return '(' + this.subscribe + ', ' + (this.unsubscribe === Number.MAX_VALUE ? 'Infinite' : this.unsubscribe) + ')';
199
+ };
200
+
201
+ /** @private */
202
+ var MockDisposable = Rx.MockDisposable = function (scheduler) {
203
+ this.scheduler = scheduler;
204
+ this.disposes = [];
205
+ this.disposes.push(this.scheduler.clock);
206
+ };
207
+
208
+ /*
209
+ * @memberOf MockDisposable#
210
+ * @prviate
211
+ */
212
+ MockDisposable.prototype.dispose = function () {
213
+ this.disposes.push(this.scheduler.clock);
214
+ };
215
+
216
+ /** @private */
217
+ var MockObserver = (function (_super) {
218
+ inherits(MockObserver, _super);
219
+
220
+ /*
221
+ * @constructor
222
+ * @prviate
223
+ */
224
+ function MockObserver(scheduler) {
225
+ _super.call(this);
226
+ this.scheduler = scheduler;
227
+ this.messages = [];
228
+ }
229
+
230
+ var MockObserverPrototype = MockObserver.prototype;
231
+
232
+ /*
233
+ * @memberOf MockObserverPrototype#
234
+ * @prviate
235
+ */
236
+ MockObserverPrototype.onNext = function (value) {
237
+ this.messages.push(new Recorded(this.scheduler.clock, Notification.createOnNext(value)));
238
+ };
239
+
240
+ /*
241
+ * @memberOf MockObserverPrototype#
242
+ * @prviate
243
+ */
244
+ MockObserverPrototype.onError = function (exception) {
245
+ this.messages.push(new Recorded(this.scheduler.clock, Notification.createOnError(exception)));
246
+ };
247
+
248
+ /*
249
+ * @memberOf MockObserverPrototype#
250
+ * @prviate
251
+ */
252
+ MockObserverPrototype.onCompleted = function () {
253
+ this.messages.push(new Recorded(this.scheduler.clock, Notification.createOnCompleted()));
254
+ };
255
+
256
+ return MockObserver;
257
+ })(Observer);
258
+
259
+ /** @private */
260
+ var HotObservable = (function (_super) {
261
+
262
+ function subscribe(observer) {
263
+ var observable = this;
264
+ this.observers.push(observer);
265
+ this.subscriptions.push(new Subscription(this.scheduler.clock));
266
+ var index = this.subscriptions.length - 1;
267
+ return disposableCreate(function () {
268
+ var idx = observable.observers.indexOf(observer);
269
+ observable.observers.splice(idx, 1);
270
+ observable.subscriptions[index] = new Subscription(observable.subscriptions[index].subscribe, observable.scheduler.clock);
271
+ });
272
+ }
273
+
274
+ inherits(HotObservable, _super);
275
+
276
+ /**
277
+ * @private
278
+ * @constructor
279
+ */
280
+ function HotObservable(scheduler, messages) {
281
+ _super.call(this, subscribe);
282
+ var message, notification, observable = this;
283
+ this.scheduler = scheduler;
284
+ this.messages = messages;
285
+ this.subscriptions = [];
286
+ this.observers = [];
287
+ for (var i = 0, len = this.messages.length; i < len; i++) {
288
+ message = this.messages[i];
289
+ notification = message.value;
290
+ (function (innerNotification) {
291
+ scheduler.scheduleAbsoluteWithState(null, message.time, function () {
292
+ var obs = observable.observers.slice(0);
293
+
294
+ for (var j = 0, jLen = obs.length; j < jLen; j++) {
295
+ innerNotification.accept(obs[j]);
296
+ }
297
+ return disposableEmpty;
298
+ });
299
+ })(notification);
300
+ }
301
+ }
302
+
303
+ return HotObservable;
304
+ })(Observable);
305
+
306
+ /** @private */
307
+ var ColdObservable = (function (_super) {
308
+
309
+ function subscribe(observer) {
310
+ var message, notification, observable = this;
311
+ this.subscriptions.push(new Subscription(this.scheduler.clock));
312
+ var index = this.subscriptions.length - 1;
313
+ var d = new CompositeDisposable();
314
+ for (var i = 0, len = this.messages.length; i < len; i++) {
315
+ message = this.messages[i];
316
+ notification = message.value;
317
+ (function (innerNotification) {
318
+ d.add(observable.scheduler.scheduleRelativeWithState(null, message.time, function () {
319
+ innerNotification.accept(observer);
320
+ return disposableEmpty;
321
+ }));
322
+ })(notification);
323
+ }
324
+ return disposableCreate(function () {
325
+ observable.subscriptions[index] = new Subscription(observable.subscriptions[index].subscribe, observable.scheduler.clock);
326
+ d.dispose();
327
+ });
328
+ }
329
+
330
+ inherits(ColdObservable, _super);
331
+
332
+ /**
333
+ * @private
334
+ * @constructor
335
+ */
336
+ function ColdObservable(scheduler, messages) {
337
+ _super.call(this, subscribe);
338
+ this.scheduler = scheduler;
339
+ this.messages = messages;
340
+ this.subscriptions = [];
341
+ }
342
+
343
+ return ColdObservable;
344
+ })(Observable);
365
345
 
366
346
  /** Virtual time scheduler used for testing applications and libraries built using Reactive Extensions. */
367
347
  Rx.TestScheduler = (function (_super) {
@@ -496,5 +476,5 @@
496
476
  return TestScheduler;
497
477
  })(VirtualTimeScheduler);
498
478
 
499
- return Rx;
479
+ return Rx;
500
480
  }));