Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"format register";
System.register("rxjs/util/noop", [], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
function noop() {}
exports.noop = noop;
global.define = __define;
return module.exports;
});
System.register("rxjs/util/throwError", [], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
function throwError(e) {
throw e;
}
exports.throwError = throwError;
global.define = __define;
return module.exports;
});
System.register("rxjs/util/tryOrOnError", [], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
function tryOrOnError(target) {
function tryCatcher() {
try {
tryCatcher.target.apply(this, arguments);
} catch (e) {
this.error(e);
}
}
tryCatcher.target = target;
return tryCatcher;
}
exports.tryOrOnError = tryOrOnError;
global.define = __define;
return module.exports;
});
System.register("rxjs/Subscription", ["rxjs/util/noop"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var noop_1 = require("rxjs/util/noop");
var Subscription = (function() {
function Subscription(_unsubscribe) {
this.isUnsubscribed = false;
if (_unsubscribe) {
this._unsubscribe = _unsubscribe;
}
}
Subscription.prototype._unsubscribe = function() {
noop_1.noop();
};
Subscription.prototype.unsubscribe = function() {
if (this.isUnsubscribed) {
return ;
}
this.isUnsubscribed = true;
var unsubscribe = this._unsubscribe;
var subscriptions = this._subscriptions;
this._subscriptions = void 0;
if (unsubscribe) {
unsubscribe.call(this);
}
if (subscriptions != null) {
var index = -1;
var len = subscriptions.length;
while (++index < len) {
subscriptions[index].unsubscribe();
}
}
};
Subscription.prototype.add = function(subscription) {
if (!subscription || (subscription === this) || (subscription === Subscription.EMPTY)) {
return ;
}
var sub = subscription;
switch (typeof subscription) {
case 'function':
sub = new Subscription(subscription);
case 'object':
if (sub.isUnsubscribed || typeof sub.unsubscribe !== 'function') {
break;
} else if (this.isUnsubscribed) {
sub.unsubscribe();
} else {
var subscriptions = this._subscriptions || (this._subscriptions = []);
subscriptions.push(sub);
}
break;
default:
throw new Error('Unrecognized subscription ' + subscription + ' added to Subscription.');
}
};
Subscription.prototype.remove = function(subscription) {
if (subscription == null || (subscription === this) || (subscription === Subscription.EMPTY)) {
return ;
}
var subscriptions = this._subscriptions;
if (subscriptions) {
var subscriptionIndex = subscriptions.indexOf(subscription);
if (subscriptionIndex !== -1) {
subscriptions.splice(subscriptionIndex, 1);
}
}
};
Subscription.EMPTY = (function(empty) {
empty.isUnsubscribed = true;
return empty;
}(new Subscription()));
return Subscription;
})();
exports.Subscription = Subscription;
global.define = __define;
return module.exports;
});
System.register("rxjs/util/root", [], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var objectTypes = {
'boolean': false,
'function': true,
'object': true,
'number': false,
'string': false,
'undefined': false
};
exports.root = (objectTypes[typeof self] && self) || (objectTypes[typeof window] && window);
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
var freeGlobal = objectTypes[typeof global] && global;
if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
exports.root = freeGlobal;
}
global.define = __define;
return module.exports;
});
System.register("rxjs/subject/SubjectSubscription", ["rxjs/Subscription", "rxjs/Subscriber"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscription_1 = require("rxjs/Subscription");
var Subscriber_1 = require("rxjs/Subscriber");
var SubjectSubscription = (function(_super) {
__extends(SubjectSubscription, _super);
function SubjectSubscription(subject, observer) {
_super.call(this);
this.subject = subject;
this.observer = observer;
this.isUnsubscribed = false;
}
SubjectSubscription.prototype.unsubscribe = function() {
if (this.isUnsubscribed) {
return ;
}
this.isUnsubscribed = true;
var subject = this.subject;
var observers = subject.observers;
this.subject = void 0;
if (!observers || observers.length === 0 || subject.isUnsubscribed) {
return ;
}
if (this.observer instanceof Subscriber_1.Subscriber) {
this.observer.unsubscribe();
}
var subscriberIndex = observers.indexOf(this.observer);
if (subscriberIndex !== -1) {
observers.splice(subscriberIndex, 1);
}
};
return SubjectSubscription;
})(Subscription_1.Subscription);
exports.SubjectSubscription = SubjectSubscription;
global.define = __define;
return module.exports;
});
System.register("rxjs/util/errorObject", [], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
exports.errorObject = {e: {}};
global.define = __define;
return module.exports;
});
System.register("rxjs/observable/throw", ["rxjs/Observable"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Observable_1 = require("rxjs/Observable");
var ErrorObservable = (function(_super) {
__extends(ErrorObservable, _super);
function ErrorObservable(error, scheduler) {
_super.call(this);
this.error = error;
this.scheduler = scheduler;
}
ErrorObservable.create = function(error, scheduler) {
return new ErrorObservable(error, scheduler);
};
ErrorObservable.dispatch = function(_a) {
var error = _a.error,
subscriber = _a.subscriber;
subscriber.error(error);
};
ErrorObservable.prototype._subscribe = function(subscriber) {
var error = this.error;
var scheduler = this.scheduler;
if (scheduler) {
subscriber.add(scheduler.schedule(ErrorObservable.dispatch, 0, {
error: error,
subscriber: subscriber
}));
} else {
subscriber.error(error);
}
};
return ErrorObservable;
})(Observable_1.Observable);
exports.ErrorObservable = ErrorObservable;
global.define = __define;
return module.exports;
});
System.register("rxjs/observable/empty", ["rxjs/Observable"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Observable_1 = require("rxjs/Observable");
var EmptyObservable = (function(_super) {
__extends(EmptyObservable, _super);
function EmptyObservable(scheduler) {
_super.call(this);
this.scheduler = scheduler;
}
EmptyObservable.create = function(scheduler) {
return new EmptyObservable(scheduler);
};
EmptyObservable.dispatch = function(_a) {
var subscriber = _a.subscriber;
subscriber.complete();
};
EmptyObservable.prototype._subscribe = function(subscriber) {
var scheduler = this.scheduler;
if (scheduler) {
subscriber.add(scheduler.schedule(EmptyObservable.dispatch, 0, {subscriber: subscriber}));
} else {
subscriber.complete();
}
};
return EmptyObservable;
})(Observable_1.Observable);
exports.EmptyObservable = EmptyObservable;
global.define = __define;
return module.exports;
});
System.register("rxjs/util/isScheduler", [], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
function isScheduler(value) {
return value && typeof value.schedule === 'function';
}
exports.isScheduler = isScheduler;
global.define = __define;
return module.exports;
});
System.register("rxjs/OuterSubscriber", ["rxjs/Subscriber"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var OuterSubscriber = (function(_super) {
__extends(OuterSubscriber, _super);
function OuterSubscriber() {
_super.apply(this, arguments);
}
OuterSubscriber.prototype.notifyComplete = function(inner) {
this.destination.complete();
};
OuterSubscriber.prototype.notifyNext = function(outerValue, innerValue, outerIndex, innerIndex) {
this.destination.next(innerValue);
};
OuterSubscriber.prototype.notifyError = function(error, inner) {
this.destination.error(error);
};
return OuterSubscriber;
})(Subscriber_1.Subscriber);
exports.OuterSubscriber = OuterSubscriber;
global.define = __define;
return module.exports;
});
System.register("rxjs/InnerSubscriber", ["rxjs/Subscriber"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var InnerSubscriber = (function(_super) {
__extends(InnerSubscriber, _super);
function InnerSubscriber(parent, outerValue, outerIndex) {
_super.call(this);
this.parent = parent;
this.outerValue = outerValue;
this.outerIndex = outerIndex;
this.index = 0;
}
InnerSubscriber.prototype._next = function(value) {
var index = this.index++;
this.parent.notifyNext(this.outerValue, value, this.outerIndex, index);
};
InnerSubscriber.prototype._error = function(error) {
this.parent.notifyError(error, this);
};
InnerSubscriber.prototype._complete = function() {
this.parent.notifyComplete(this);
};
return InnerSubscriber;
})(Subscriber_1.Subscriber);
exports.InnerSubscriber = InnerSubscriber;
global.define = __define;
return module.exports;
});
System.register("rxjs/util/isArray", [], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
exports.isArray = Array.isArray || (function(x) {
return x && typeof x.length === 'number';
});
global.define = __define;
return module.exports;
});
System.register("rxjs/scheduler/QueueAction", ["rxjs/Subscription"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscription_1 = require("rxjs/Subscription");
var QueueAction = (function(_super) {
__extends(QueueAction, _super);
function QueueAction(scheduler, work) {
_super.call(this);
this.scheduler = scheduler;
this.work = work;
}
QueueAction.prototype.schedule = function(state) {
if (this.isUnsubscribed) {
return this;
}
this.state = state;
var scheduler = this.scheduler;
scheduler.actions.push(this);
scheduler.flush();
return this;
};
QueueAction.prototype.execute = function() {
if (this.isUnsubscribed) {
throw new Error('How did did we execute a canceled Action?');
}
this.work(this.state);
};
QueueAction.prototype.unsubscribe = function() {
var scheduler = this.scheduler;
var actions = scheduler.actions;
var index = actions.indexOf(this);
this.work = void 0;
this.state = void 0;
this.scheduler = void 0;
if (index !== -1) {
actions.splice(index, 1);
}
_super.prototype.unsubscribe.call(this);
};
return QueueAction;
})(Subscription_1.Subscription);
exports.QueueAction = QueueAction;
global.define = __define;
return module.exports;
});
System.register("rxjs/scheduler/FutureAction", ["rxjs/scheduler/QueueAction"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var QueueAction_1 = require("rxjs/scheduler/QueueAction");
var FutureAction = (function(_super) {
__extends(FutureAction, _super);
function FutureAction(scheduler, work) {
_super.call(this, scheduler, work);
this.scheduler = scheduler;
this.work = work;
}
FutureAction.prototype.schedule = function(state, delay) {
var _this = this;
if (delay === void 0) {
delay = 0;
}
if (this.isUnsubscribed) {
return this;
}
this.delay = delay;
this.state = state;
var id = this.id;
if (id != null) {
this.id = undefined;
clearTimeout(id);
}
var scheduler = this.scheduler;
this.id = setTimeout(function() {
_this.id = void 0;
scheduler.actions.push(_this);
scheduler.flush();
}, this.delay);
return this;
};
FutureAction.prototype.unsubscribe = function() {
var id = this.id;
if (id != null) {
this.id = void 0;
clearTimeout(id);
}
_super.prototype.unsubscribe.call(this);
};
return FutureAction;
})(QueueAction_1.QueueAction);
exports.FutureAction = FutureAction;
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/mergeAll-support", ["rxjs/OuterSubscriber", "rxjs/util/subscribeToResult"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var OuterSubscriber_1 = require("rxjs/OuterSubscriber");
var subscribeToResult_1 = require("rxjs/util/subscribeToResult");
var MergeAllOperator = (function() {
function MergeAllOperator(concurrent) {
this.concurrent = concurrent;
}
MergeAllOperator.prototype.call = function(observer) {
return new MergeAllSubscriber(observer, this.concurrent);
};
return MergeAllOperator;
})();
exports.MergeAllOperator = MergeAllOperator;
var MergeAllSubscriber = (function(_super) {
__extends(MergeAllSubscriber, _super);
function MergeAllSubscriber(destination, concurrent) {
_super.call(this, destination);
this.concurrent = concurrent;
this.hasCompleted = false;
this.buffer = [];
this.active = 0;
}
MergeAllSubscriber.prototype._next = function(observable) {
if (this.active < this.concurrent) {
if (observable._isScalar) {
this.destination.next(observable.value);
} else {
this.active++;
this.add(subscribeToResult_1.subscribeToResult(this, observable));
}
} else {
this.buffer.push(observable);
}
};
MergeAllSubscriber.prototype._complete = function() {
this.hasCompleted = true;
if (this.active === 0 && this.buffer.length === 0) {
this.destination.complete();
}
};
MergeAllSubscriber.prototype.notifyComplete = function(innerSub) {
var buffer = this.buffer;
this.remove(innerSub);
this.active--;
if (buffer.length > 0) {
this._next(buffer.shift());
} else if (this.active === 0 && this.hasCompleted) {
this.destination.complete();
}
};
return MergeAllSubscriber;
})(OuterSubscriber_1.OuterSubscriber);
exports.MergeAllSubscriber = MergeAllSubscriber;
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/merge-static", ["rxjs/observable/fromArray", "rxjs/operator/mergeAll-support", "rxjs/scheduler/queue", "rxjs/util/isScheduler"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var fromArray_1 = require("rxjs/observable/fromArray");
var mergeAll_support_1 = require("rxjs/operator/mergeAll-support");
var queue_1 = require("rxjs/scheduler/queue");
var isScheduler_1 = require("rxjs/util/isScheduler");
function merge() {
var observables = [];
for (var _i = 0; _i < arguments.length; _i++) {
observables[_i - 0] = arguments[_i];
}
var concurrent = Number.POSITIVE_INFINITY;
var scheduler = queue_1.queue;
var last = observables[observables.length - 1];
if (isScheduler_1.isScheduler(last)) {
scheduler = observables.pop();
if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
concurrent = observables.pop();
}
} else if (typeof last === 'number') {
concurrent = observables.pop();
}
if (observables.length === 1) {
return observables[0];
}
return new fromArray_1.ArrayObservable(observables, scheduler).lift(new mergeAll_support_1.MergeAllOperator(concurrent));
}
exports.merge = merge;
global.define = __define;
return module.exports;
});
System.register("rxjs/subject/AsyncSubject", ["rxjs/Subject"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subject_1 = require("rxjs/Subject");
var AsyncSubject = (function(_super) {
__extends(AsyncSubject, _super);
function AsyncSubject() {
_super.call(this);
this._value = void 0;
this._hasNext = false;
this._isScalar = false;
}
AsyncSubject.prototype._subscribe = function(subscriber) {
if (this.completeSignal && this._hasNext) {
subscriber.next(this._value);
}
return _super.prototype._subscribe.call(this, subscriber);
};
AsyncSubject.prototype._next = function(value) {
this._value = value;
this._hasNext = true;
};
AsyncSubject.prototype._complete = function() {
var index = -1;
var observers = this.observers;
var len = observers.length;
this.observers = void 0;
this.isUnsubscribed = true;
if (this._hasNext) {
while (++index < len) {
var o = observers[index];
o.next(this._value);
o.complete();
}
} else {
while (++index < len) {
observers[index].complete();
}
}
this.isUnsubscribed = false;
};
return AsyncSubject;
})(Subject_1.Subject);
exports.AsyncSubject = AsyncSubject;
global.define = __define;
return module.exports;
});
System.register("rxjs/observable/defer", ["rxjs/Observable", "rxjs/util/tryCatch", "rxjs/util/errorObject"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Observable_1 = require("rxjs/Observable");
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
var DeferObservable = (function(_super) {
__extends(DeferObservable, _super);
function DeferObservable(observableFactory) {
_super.call(this);
this.observableFactory = observableFactory;
}
DeferObservable.create = function(observableFactory) {
return new DeferObservable(observableFactory);
};
DeferObservable.prototype._subscribe = function(subscriber) {
var result = tryCatch_1.tryCatch(this.observableFactory)();
if (result === errorObject_1.errorObject) {
subscriber.error(errorObject_1.errorObject.e);
} else {
result.subscribe(subscriber);
}
};
return DeferObservable;
})(Observable_1.Observable);
exports.DeferObservable = DeferObservable;
global.define = __define;
return module.exports;
});
System.register("rxjs/add/observable/empty", ["rxjs/Observable", "rxjs/observable/empty"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var Observable_1 = require("rxjs/Observable");
var empty_1 = require("rxjs/observable/empty");
Observable_1.Observable.empty = empty_1.EmptyObservable.create;
global.define = __define;
return module.exports;
});
System.register("rxjs/observable/fromPromise", ["rxjs/Observable", "rxjs/Subscription", "rxjs/scheduler/queue"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Observable_1 = require("rxjs/Observable");
var Subscription_1 = require("rxjs/Subscription");
var queue_1 = require("rxjs/scheduler/queue");
var PromiseObservable = (function(_super) {
__extends(PromiseObservable, _super);
function PromiseObservable(promise, scheduler) {
if (scheduler === void 0) {
scheduler = queue_1.queue;
}
_super.call(this);
this.promise = promise;
this.scheduler = scheduler;
this._isScalar = false;
}
PromiseObservable.create = function(promise, scheduler) {
if (scheduler === void 0) {
scheduler = queue_1.queue;
}
return new PromiseObservable(promise, scheduler);
};
PromiseObservable.prototype._subscribe = function(subscriber) {
var _this = this;
var scheduler = this.scheduler;
var promise = this.promise;
if (scheduler === queue_1.queue) {
if (this._isScalar) {
subscriber.next(this.value);
subscriber.complete();
} else {
promise.then(function(value) {
_this._isScalar = true;
_this.value = value;
subscriber.next(value);
subscriber.complete();
}, function(err) {
return subscriber.error(err);
}).then(null, function(err) {
setTimeout(function() {
throw err;
});
});
}
} else {
var subscription = new Subscription_1.Subscription();
if (this._isScalar) {
var value = this.value;
subscription.add(scheduler.schedule(dispatchNext, 0, {
value: value,
subscriber: subscriber
}));
} else {
promise.then(function(value) {
_this._isScalar = true;
_this.value = value;
subscription.add(scheduler.schedule(dispatchNext, 0, {
value: value,
subscriber: subscriber
}));
}, function(err) {
return subscription.add(scheduler.schedule(dispatchError, 0, {
err: err,
subscriber: subscriber
}));
}).then(null, function(err) {
scheduler.schedule(function() {
throw err;
});
});
}
return subscription;
}
};
return PromiseObservable;
})(Observable_1.Observable);
exports.PromiseObservable = PromiseObservable;
function dispatchNext(_a) {
var value = _a.value,
subscriber = _a.subscriber;
subscriber.next(value);
subscriber.complete();
}
function dispatchError(_a) {
var err = _a.err,
subscriber = _a.subscriber;
subscriber.error(err);
}
global.define = __define;
return module.exports;
});
System.register("rxjs/util/isPromise", [], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
function isPromise(value) {
return value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
}
exports.isPromise = isPromise;
global.define = __define;
return module.exports;
});
System.register("rxjs/observable/IteratorObservable", ["rxjs/Observable", "rxjs/util/root", "rxjs/util/SymbolShim", "rxjs/util/tryCatch", "rxjs/util/errorObject"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Observable_1 = require("rxjs/Observable");
var root_1 = require("rxjs/util/root");
var SymbolShim_1 = require("rxjs/util/SymbolShim");
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
var IteratorObservable = (function(_super) {
__extends(IteratorObservable, _super);
function IteratorObservable(iterator, project, thisArg, scheduler) {
_super.call(this);
this.project = project;
this.thisArg = thisArg;
this.scheduler = scheduler;
if (iterator == null) {
throw new Error('iterator cannot be null.');
}
if (project && typeof project !== 'function') {
throw new Error('When provided, `project` must be a function.');
}
this.iterator = getIterator(iterator);
}
IteratorObservable.create = function(iterator, project, thisArg, scheduler) {
return new IteratorObservable(iterator, project, thisArg, scheduler);
};
IteratorObservable.dispatch = function(state) {
var index = state.index,
hasError = state.hasError,
thisArg = state.thisArg,
project = state.project,
iterator = state.iterator,
subscriber = state.subscriber;
if (hasError) {
subscriber.error(state.error);
return ;
}
var result = iterator.next();
if (result.done) {
subscriber.complete();
return ;
}
if (project) {
result = tryCatch_1.tryCatch(project).call(thisArg, result.value, index);
if (result === errorObject_1.errorObject) {
state.error = errorObject_1.errorObject.e;
state.hasError = true;
} else {
subscriber.next(result);
state.index = index + 1;
}
} else {
subscriber.next(result.value);
state.index = index + 1;
}
if (subscriber.isUnsubscribed) {
return ;
}
this.schedule(state);
};
IteratorObservable.prototype._subscribe = function(subscriber) {
var index = 0;
var _a = this,
iterator = _a.iterator,
project = _a.project,
thisArg = _a.thisArg,
scheduler = _a.scheduler;
if (scheduler) {
subscriber.add(scheduler.schedule(IteratorObservable.dispatch, 0, {
index: index,
thisArg: thisArg,
project: project,
iterator: iterator,
subscriber: subscriber
}));
} else {
do {
var result = iterator.next();
if (result.done) {
subscriber.complete();
break;
} else if (project) {
result = tryCatch_1.tryCatch(project).call(thisArg, result.value, index++);
if (result === errorObject_1.errorObject) {
subscriber.error(errorObject_1.errorObject.e);
break;
}
subscriber.next(result);
} else {
subscriber.next(result.value);
}
if (subscriber.isUnsubscribed) {
break;
}
} while (true);
}
};
return IteratorObservable;
})(Observable_1.Observable);
exports.IteratorObservable = IteratorObservable;
var StringIterator = (function() {
function StringIterator(str, idx, len) {
if (idx === void 0) {
idx = 0;
}
if (len === void 0) {
len = str.length;
}
this.str = str;
this.idx = idx;
this.len = len;
}
StringIterator.prototype[SymbolShim_1.SymbolShim.iterator] = function() {
return (this);
};
StringIterator.prototype.next = function() {
return this.idx < this.len ? {
done: false,
value: this.str.charAt(this.idx++)
} : {
done: true,
value: undefined
};
};
return StringIterator;
})();
var ArrayIterator = (function() {
function ArrayIterator(arr, idx, len) {
if (idx === void 0) {
idx = 0;
}
if (len === void 0) {
len = toLength(arr);
}
this.arr = arr;
this.idx = idx;
this.len = len;
}
ArrayIterator.prototype[SymbolShim_1.SymbolShim.iterator] = function() {
return this;
};
ArrayIterator.prototype.next = function() {
return this.idx < this.len ? {
done: false,
value: this.arr[this.idx++]
} : {
done: true,
value: undefined
};
};
return ArrayIterator;
})();
function getIterator(obj) {
var i = obj[SymbolShim_1.SymbolShim.iterator];
if (!i && typeof obj === 'string') {
return new StringIterator(obj);
}
if (!i && obj.length !== undefined) {
return new ArrayIterator(obj);
}
if (!i) {
throw new TypeError('Object is not iterable');
}
return obj[SymbolShim_1.SymbolShim.iterator]();
}
var maxSafeInteger = Math.pow(2, 53) - 1;
function toLength(o) {
var len = +o.length;
if (isNaN(len)) {
return 0;
}
if (len === 0 || !numberIsFinite(len)) {
return len;
}
len = sign(len) * Math.floor(Math.abs(len));
if (len <= 0) {
return 0;
}
if (len > maxSafeInteger) {
return maxSafeInteger;
}
return len;
}
function numberIsFinite(value) {
return typeof value === 'number' && root_1.root.isFinite(value);
}
function sign(value) {
var valueAsNumber = +value;
if (valueAsNumber === 0) {
return valueAsNumber;
}
if (isNaN(valueAsNumber)) {
return valueAsNumber;
}
return valueAsNumber < 0 ? -1 : 1;
}
global.define = __define;
return module.exports;
});
System.register("rxjs/Notification", ["rxjs/Observable"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var Observable_1 = require("rxjs/Observable");
var Notification = (function() {
function Notification(kind, value, exception) {
this.kind = kind;
this.value = value;
this.exception = exception;
this.hasValue = kind === 'N';
}
Notification.prototype.observe = function(observer) {
switch (this.kind) {
case 'N':
return observer.next(this.value);
case 'E':
return observer.error(this.exception);
case 'C':
return observer.complete();
}
};
Notification.prototype.do = function(next, error, complete) {
var kind = this.kind;
switch (kind) {
case 'N':
return next(this.value);
case 'E':
return error(this.exception);
case 'C':
return complete();
}
};
Notification.prototype.accept = function(nextOrObserver, error, complete) {
if (nextOrObserver && typeof nextOrObserver.next === 'function') {
return this.observe(nextOrObserver);
} else {
return this.do(nextOrObserver, error, complete);
}
};
Notification.prototype.toObservable = function() {
var kind = this.kind;
switch (kind) {
case 'N':
return Observable_1.Observable.of(this.value);
case 'E':
return Observable_1.Observable.throw(this.exception);
case 'C':
return Observable_1.Observable.empty();
}
};
Notification.createNext = function(value) {
if (typeof value !== 'undefined') {
return new Notification('N', value);
}
return this.undefinedValueNotification;
};
Notification.createError = function(err) {
return new Notification('E', undefined, err);
};
Notification.createComplete = function() {
return this.completeNotification;
};
Notification.completeNotification = new Notification('C');
Notification.undefinedValueNotification = new Notification('N', undefined);
return Notification;
})();
exports.Notification = Notification;
global.define = __define;
return module.exports;
});
System.register("rxjs/add/observable/fromArray", ["rxjs/Observable", "rxjs/observable/fromArray"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var Observable_1 = require("rxjs/Observable");
var fromArray_1 = require("rxjs/observable/fromArray");
Observable_1.Observable.fromArray = fromArray_1.ArrayObservable.create;
Observable_1.Observable.of = fromArray_1.ArrayObservable.of;
global.define = __define;
return module.exports;
});
System.register("rxjs/observable/fromEvent", ["rxjs/Observable", "rxjs/util/tryCatch", "rxjs/util/errorObject", "rxjs/Subscription"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Observable_1 = require("rxjs/Observable");
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
var Subscription_1 = require("rxjs/Subscription");
var FromEventObservable = (function(_super) {
__extends(FromEventObservable, _super);
function FromEventObservable(sourceObj, eventName, selector) {
_super.call(this);
this.sourceObj = sourceObj;
this.eventName = eventName;
this.selector = selector;
}
FromEventObservable.create = function(sourceObj, eventName, selector) {
return new FromEventObservable(sourceObj, eventName, selector);
};
FromEventObservable.setupSubscription = function(sourceObj, eventName, handler, subscriber) {
var unsubscribe;
var tag = sourceObj.toString();
if (tag === '[object NodeList]' || tag === '[object HTMLCollection]') {
for (var i = 0,
len = sourceObj.length; i < len; i++) {
FromEventObservable.setupSubscription(sourceObj[i], eventName, handler, subscriber);
}
} else if (typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function') {
sourceObj.addEventListener(eventName, handler);
unsubscribe = function() {
return sourceObj.removeEventListener(eventName, handler);
};
} else if (typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function') {
sourceObj.on(eventName, handler);
unsubscribe = function() {
return sourceObj.off(eventName, handler);
};
} else if (typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function') {
sourceObj.addListener(eventName, handler);
unsubscribe = function() {
return sourceObj.removeListener(eventName, handler);
};
}
subscriber.add(new Subscription_1.Subscription(unsubscribe));
};
FromEventObservable.prototype._subscribe = function(subscriber) {
var sourceObj = this.sourceObj;
var eventName = this.eventName;
var selector = this.selector;
var handler = selector ? function(e) {
var result = tryCatch_1.tryCatch(selector)(e);
if (result === errorObject_1.errorObject) {
subscriber.error(result.e);
} else {
subscriber.next(result);
}
} : function(e) {
return subscriber.next(e);
};
FromEventObservable.setupSubscription(sourceObj, eventName, handler, subscriber);
};
return FromEventObservable;
})(Observable_1.Observable);
exports.FromEventObservable = FromEventObservable;
global.define = __define;
return module.exports;
});
System.register("rxjs/observable/fromEventPattern", ["rxjs/Observable", "rxjs/Subscription", "rxjs/util/tryCatch", "rxjs/util/errorObject"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Observable_1 = require("rxjs/Observable");
var Subscription_1 = require("rxjs/Subscription");
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
var FromEventPatternObservable = (function(_super) {
__extends(FromEventPatternObservable, _super);
function FromEventPatternObservable(addHandler, removeHandler, selector) {
_super.call(this);
this.addHandler = addHandler;
this.removeHandler = removeHandler;
this.selector = selector;
}
FromEventPatternObservable.create = function(addHandler, removeHandler, selector) {
return new FromEventPatternObservable(addHandler, removeHandler, selector);
};
FromEventPatternObservable.prototype._subscribe = function(subscriber) {
var addHandler = this.addHandler;
var removeHandler = this.removeHandler;
var selector = this.selector;
var handler = selector ? function(e) {
var result = tryCatch_1.tryCatch(selector).apply(null, arguments);
if (result === errorObject_1.errorObject) {
subscriber.error(result.e);
} else {
subscriber.next(result);
}
} : function(e) {
subscriber.next(e);
};
var result = tryCatch_1.tryCatch(addHandler)(handler);
if (result === errorObject_1.errorObject) {
subscriber.error(result.e);
}
subscriber.add(new Subscription_1.Subscription(function() {
removeHandler(handler);
}));
};
return FromEventPatternObservable;
})(Observable_1.Observable);
exports.FromEventPatternObservable = FromEventPatternObservable;
global.define = __define;
return module.exports;
});
System.register("rxjs/add/observable/fromPromise", ["rxjs/Observable", "rxjs/observable/fromPromise"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var Observable_1 = require("rxjs/Observable");
var fromPromise_1 = require("rxjs/observable/fromPromise");
Observable_1.Observable.fromPromise = fromPromise_1.PromiseObservable.create;
global.define = __define;
return module.exports;
});
System.register("rxjs/util/isNumeric", [], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var is_array = Array.isArray;
function isNumeric(val) {
return !is_array(val) && (val - parseFloat(val) + 1) >= 0;
}
exports.isNumeric = isNumeric;
;
global.define = __define;
return module.exports;
});
System.register("rxjs/util/Immediate", ["rxjs/util/root"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var root_1 = require("rxjs/util/root");
var ImmediateDefinition = (function() {
function ImmediateDefinition(root) {
this.root = root;
if (root.setImmediate) {
this.setImmediate = root.setImmediate;
this.clearImmediate = root.clearImmediate;
} else {
this.nextHandle = 1;
this.tasksByHandle = {};
this.currentlyRunningATask = false;
if (this.canUseProcessNextTick()) {
this.setImmediate = this.createProcessNextTickSetImmediate();
} else if (this.canUsePostMessage()) {
this.setImmediate = this.createPostMessageSetImmediate();
} else if (this.canUseMessageChannel()) {
this.setImmediate = this.createMessageChannelSetImmediate();
} else if (this.canUseReadyStateChange()) {
this.setImmediate = this.createReadyStateChangeSetImmediate();
} else {
this.setImmediate = this.createSetTimeoutSetImmediate();
}
var ci = function clearImmediate(handle) {
delete clearImmediate.instance.tasksByHandle[handle];
};
ci.instance = this;
this.clearImmediate = ci;
}
}
ImmediateDefinition.prototype.identify = function(o) {
return this.root.Object.prototype.toString.call(o);
};
ImmediateDefinition.prototype.canUseProcessNextTick = function() {
return this.identify(this.root.process) === '[object process]';
};
ImmediateDefinition.prototype.canUseMessageChannel = function() {
return Boolean(this.root.MessageChannel);
};
ImmediateDefinition.prototype.canUseReadyStateChange = function() {
var document = this.root.document;
return Boolean(document && 'onreadystatechange' in document.createElement('script'));
};
ImmediateDefinition.prototype.canUsePostMessage = function() {
var root = this.root;
if (root.postMessage && !root.importScripts) {
var postMessageIsAsynchronous = true;
var oldOnMessage = root.onmessage;
root.onmessage = function() {
postMessageIsAsynchronous = false;
};
root.postMessage('', '*');
root.onmessage = oldOnMessage;
return postMessageIsAsynchronous;
}
return false;
};
ImmediateDefinition.prototype.partiallyApplied = function(handler) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var fn = function result() {
var _a = result,
handler = _a.handler,
args = _a.args;
if (typeof handler === 'function') {
handler.apply(undefined, args);
} else {
(new Function('' + handler))();
}
};
fn.handler = handler;
fn.args = args;
return fn;
};
ImmediateDefinition.prototype.addFromSetImmediateArguments = function(args) {
this.tasksByHandle[this.nextHandle] = this.partiallyApplied.apply(undefined, args);
return this.nextHandle++;
};
ImmediateDefinition.prototype.createProcessNextTickSetImmediate = function() {
var fn = function setImmediate() {
var instance = setImmediate.instance;
var handle = instance.addFromSetImmediateArguments(arguments);
instance.root.process.nextTick(instance.partiallyApplied(instance.runIfPresent, handle));
return handle;
};
fn.instance = this;
return fn;
};
ImmediateDefinition.prototype.createPostMessageSetImmediate = function() {
var root = this.root;
var messagePrefix = 'setImmediate$' + root.Math.random() + '$';
var onGlobalMessage = function globalMessageHandler(event) {
var instance = globalMessageHandler.instance;
if (event.source === root && typeof event.data === 'string' && event.data.indexOf(messagePrefix) === 0) {
instance.runIfPresent(+event.data.slice(messagePrefix.length));
}
};
onGlobalMessage.instance = this;
root.addEventListener('message', onGlobalMessage, false);
var fn = function setImmediate() {
var _a = setImmediate,
messagePrefix = _a.messagePrefix,
instance = _a.instance;
var handle = instance.addFromSetImmediateArguments(arguments);
instance.root.postMessage(messagePrefix + handle, '*');
return handle;
};
fn.instance = this;
fn.messagePrefix = messagePrefix;
return fn;
};
ImmediateDefinition.prototype.runIfPresent = function(handle) {
if (this.currentlyRunningATask) {
this.root.setTimeout(this.partiallyApplied(this.runIfPresent, handle), 0);
} else {
var task = this.tasksByHandle[handle];
if (task) {
this.currentlyRunningATask = true;
try {
task();
} finally {
this.clearImmediate(handle);
this.currentlyRunningATask = false;
}
}
}
};
ImmediateDefinition.prototype.createMessageChannelSetImmediate = function() {
var _this = this;
var channel = new this.root.MessageChannel();
channel.port1.onmessage = function(event) {
var handle = event.data;
_this.runIfPresent(handle);
};
var fn = function setImmediate() {
var _a = setImmediate,
channel = _a.channel,
instance = _a.instance;
var handle = instance.addFromSetImmediateArguments(arguments);
channel.port2.postMessage(handle);
return handle;
};
fn.channel = channel;
fn.instance = this;
return fn;
};
ImmediateDefinition.prototype.createReadyStateChangeSetImmediate = function() {
var fn = function setImmediate() {
var instance = setImmediate.instance;
var root = instance.root;
var doc = root.document;
var html = doc.documentElement;
var handle = instance.addFromSetImmediateArguments(arguments);
var script = doc.createElement('script');
script.onreadystatechange = function() {
instance.runIfPresent(handle);
script.onreadystatechange = null;
html.removeChild(script);
script = null;
};
html.appendChild(script);
return handle;
};
fn.instance = this;
return fn;
};
ImmediateDefinition.prototype.createSetTimeoutSetImmediate = function() {
var fn = function setImmediate() {
var instance = setImmediate.instance;
var handle = instance.addFromSetImmediateArguments(arguments);
instance.root.setTimeout(instance.partiallyApplied(instance.runIfPresent, handle), 0);
return handle;
};
fn.instance = this;
return fn;
};
return ImmediateDefinition;
})();
exports.ImmediateDefinition = ImmediateDefinition;
exports.Immediate = new ImmediateDefinition(root_1.root);
global.define = __define;
return module.exports;
});
System.register("rxjs/observable/never", ["rxjs/Observable", "rxjs/util/noop"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Observable_1 = require("rxjs/Observable");
var noop_1 = require("rxjs/util/noop");
var InfiniteObservable = (function(_super) {
__extends(InfiniteObservable, _super);
function InfiniteObservable() {
_super.call(this);
}
InfiniteObservable.create = function() {
return new InfiniteObservable();
};
InfiniteObservable.prototype._subscribe = function(subscriber) {
noop_1.noop();
};
return InfiniteObservable;
})(Observable_1.Observable);
exports.InfiniteObservable = InfiniteObservable;
global.define = __define;
return module.exports;
});
System.register("rxjs/observable/range", ["rxjs/Observable"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Observable_1 = require("rxjs/Observable");
var RangeObservable = (function(_super) {
__extends(RangeObservable, _super);
function RangeObservable(start, end, scheduler) {
_super.call(this);
this.start = start;
this.end = end;
this.scheduler = scheduler;
}
RangeObservable.create = function(start, end, scheduler) {
if (start === void 0) {
start = 0;
}
if (end === void 0) {
end = 0;
}
return new RangeObservable(start, end, scheduler);
};
RangeObservable.dispatch = function(state) {
var start = state.start,
index = state.index,
end = state.end,
subscriber = state.subscriber;
if (index >= end) {
subscriber.complete();
return ;
}
subscriber.next(start);
if (subscriber.isUnsubscribed) {
return ;
}
state.index = index + 1;
state.start = start + 1;
this.schedule(state);
};
RangeObservable.prototype._subscribe = function(subscriber) {
var index = 0;
var start = this.start;
var end = this.end;
var scheduler = this.scheduler;
if (scheduler) {
subscriber.add(scheduler.schedule(RangeObservable.dispatch, 0, {
index: index,
end: end,
start: start,
subscriber: subscriber
}));
} else {
do {
if (index++ >= end) {
subscriber.complete();
break;
}
subscriber.next(start++);
if (subscriber.isUnsubscribed) {
break;
}
} while (true);
}
};
return RangeObservable;
})(Observable_1.Observable);
exports.RangeObservable = RangeObservable;
global.define = __define;
return module.exports;
});
System.register("rxjs/add/observable/throw", ["rxjs/Observable", "rxjs/observable/throw"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var Observable_1 = require("rxjs/Observable");
var throw_1 = require("rxjs/observable/throw");
Observable_1.Observable.throw = throw_1.ErrorObservable.create;
global.define = __define;
return module.exports;
});
System.register("rxjs/util/isDate", [], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
function isDate(value) {
return value instanceof Date && !isNaN(+value);
}
exports.isDate = isDate;
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/zip-support", ["rxjs/Subscriber", "rxjs/util/tryCatch", "rxjs/util/errorObject", "rxjs/OuterSubscriber", "rxjs/util/subscribeToResult", "rxjs/util/SymbolShim"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
var OuterSubscriber_1 = require("rxjs/OuterSubscriber");
var subscribeToResult_1 = require("rxjs/util/subscribeToResult");
var SymbolShim_1 = require("rxjs/util/SymbolShim");
var isArray = Array.isArray;
var ZipOperator = (function() {
function ZipOperator(project) {
this.project = project;
}
ZipOperator.prototype.call = function(subscriber) {
return new ZipSubscriber(subscriber, this.project);
};
return ZipOperator;
})();
exports.ZipOperator = ZipOperator;
var ZipSubscriber = (function(_super) {
__extends(ZipSubscriber, _super);
function ZipSubscriber(destination, project, values) {
if (values === void 0) {
values = Object.create(null);
}
_super.call(this, destination);
this.index = 0;
this.iterators = [];
this.active = 0;
this.project = (typeof project === 'function') ? project : null;
this.values = values;
}
ZipSubscriber.prototype._next = function(value) {
var iterators = this.iterators;
var index = this.index++;
if (isArray(value)) {
iterators.push(new StaticArrayIterator(value));
} else if (typeof value[SymbolShim_1.SymbolShim.iterator] === 'function') {
iterators.push(new StaticIterator(value[SymbolShim_1.SymbolShim.iterator]()));
} else {
iterators.push(new ZipBufferIterator(this.destination, this, value, index));
}
};
ZipSubscriber.prototype._complete = function() {
var iterators = this.iterators;
var len = iterators.length;
this.active = len;
for (var i = 0; i < len; i++) {
var iterator = iterators[i];
if (iterator.stillUnsubscribed) {
iterator.subscribe(iterator, i);
} else {
this.active--;
}
}
};
ZipSubscriber.prototype.notifyInactive = function() {
this.active--;
if (this.active === 0) {
this.destination.complete();
}
};
ZipSubscriber.prototype.checkIterators = function() {
var iterators = this.iterators;
var len = iterators.length;
var destination = this.destination;
for (var i = 0; i < len; i++) {
var iterator = iterators[i];
if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
return ;
}
}
var shouldComplete = false;
var args = [];
for (var i = 0; i < len; i++) {
var iterator = iterators[i];
var result = iterator.next();
if (iterator.hasCompleted()) {
shouldComplete = true;
}
if (result.done) {
destination.complete();
return ;
}
args.push(result.value);
}
var project = this.project;
if (project) {
var result = tryCatch_1.tryCatch(project).apply(this, args);
if (result === errorObject_1.errorObject) {
destination.error(errorObject_1.errorObject.e);
} else {
destination.next(result);
}
} else {
destination.next(args);
}
if (shouldComplete) {
destination.complete();
}
};
return ZipSubscriber;
})(Subscriber_1.Subscriber);
exports.ZipSubscriber = ZipSubscriber;
var StaticIterator = (function() {
function StaticIterator(iterator) {
this.iterator = iterator;
this.nextResult = iterator.next();
}
StaticIterator.prototype.hasValue = function() {
return true;
};
StaticIterator.prototype.next = function() {
var result = this.nextResult;
this.nextResult = this.iterator.next();
return result;
};
StaticIterator.prototype.hasCompleted = function() {
var nextResult = this.nextResult;
return nextResult && nextResult.done;
};
return StaticIterator;
})();
var StaticArrayIterator = (function() {
function StaticArrayIterator(array) {
this.array = array;
this.index = 0;
this.length = 0;
this.length = array.length;
}
StaticArrayIterator.prototype[SymbolShim_1.SymbolShim.iterator] = function() {
return this;
};
StaticArrayIterator.prototype.next = function(value) {
var i = this.index++;
var array = this.array;
return i < this.length ? {
value: array[i],
done: false
} : {done: true};
};
StaticArrayIterator.prototype.hasValue = function() {
return this.array.length > this.index;
};
StaticArrayIterator.prototype.hasCompleted = function() {
return this.array.length === this.index;
};
return StaticArrayIterator;
})();
var ZipBufferIterator = (function(_super) {
__extends(ZipBufferIterator, _super);
function ZipBufferIterator(destination, parent, observable, index) {
_super.call(this, destination);
this.parent = parent;
this.observable = observable;
this.index = index;
this.stillUnsubscribed = true;
this.buffer = [];
this.isComplete = false;
}
ZipBufferIterator.prototype[SymbolShim_1.SymbolShim.iterator] = function() {
return this;
};
ZipBufferIterator.prototype.next = function() {
var buffer = this.buffer;
if (buffer.length === 0 && this.isComplete) {
return {done: true};
} else {
return {
value: buffer.shift(),
done: false
};
}
};
ZipBufferIterator.prototype.hasValue = function() {
return this.buffer.length > 0;
};
ZipBufferIterator.prototype.hasCompleted = function() {
return this.buffer.length === 0 && this.isComplete;
};
ZipBufferIterator.prototype.notifyComplete = function() {
if (this.buffer.length > 0) {
this.isComplete = true;
this.parent.notifyInactive();
} else {
this.destination.complete();
}
};
ZipBufferIterator.prototype.notifyNext = function(outerValue, innerValue, outerIndex, innerIndex) {
this.buffer.push(innerValue);
this.parent.checkIterators();
};
ZipBufferIterator.prototype.subscribe = function(value, index) {
this.add(subscribeToResult_1.subscribeToResult(this, this.observable, this, index));
};
return ZipBufferIterator;
})(OuterSubscriber_1.OuterSubscriber);
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/buffer", ["rxjs/Subscriber"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
function buffer(closingNotifier) {
return this.lift(new BufferOperator(closingNotifier));
}
exports.buffer = buffer;
var BufferOperator = (function() {
function BufferOperator(closingNotifier) {
this.closingNotifier = closingNotifier;
}
BufferOperator.prototype.call = function(subscriber) {
return new BufferSubscriber(subscriber, this.closingNotifier);
};
return BufferOperator;
})();
var BufferSubscriber = (function(_super) {
__extends(BufferSubscriber, _super);
function BufferSubscriber(destination, closingNotifier) {
_super.call(this, destination);
this.buffer = [];
this.notifierSubscriber = null;
this.notifierSubscriber = new BufferClosingNotifierSubscriber(this);
this.add(closingNotifier._subscribe(this.notifierSubscriber));
}
BufferSubscriber.prototype._next = function(value) {
this.buffer.push(value);
};
BufferSubscriber.prototype._error = function(err) {
this.destination.error(err);
};
BufferSubscriber.prototype._complete = function() {
this.destination.complete();
};
BufferSubscriber.prototype.flushBuffer = function() {
var buffer = this.buffer;
this.buffer = [];
this.destination.next(buffer);
if (this.isUnsubscribed) {
this.notifierSubscriber.unsubscribe();
}
};
return BufferSubscriber;
})(Subscriber_1.Subscriber);
var BufferClosingNotifierSubscriber = (function(_super) {
__extends(BufferClosingNotifierSubscriber, _super);
function BufferClosingNotifierSubscriber(parent) {
_super.call(this, null);
this.parent = parent;
}
BufferClosingNotifierSubscriber.prototype._next = function(value) {
this.parent.flushBuffer();
};
BufferClosingNotifierSubscriber.prototype._error = function(err) {
this.parent.error(err);
};
BufferClosingNotifierSubscriber.prototype._complete = function() {
this.parent.complete();
};
return BufferClosingNotifierSubscriber;
})(Subscriber_1.Subscriber);
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/bufferCount", ["rxjs/Subscriber"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
function bufferCount(bufferSize, startBufferEvery) {
if (startBufferEvery === void 0) {
startBufferEvery = null;
}
return this.lift(new BufferCountOperator(bufferSize, startBufferEvery));
}
exports.bufferCount = bufferCount;
var BufferCountOperator = (function() {
function BufferCountOperator(bufferSize, startBufferEvery) {
this.bufferSize = bufferSize;
this.startBufferEvery = startBufferEvery;
}
BufferCountOperator.prototype.call = function(subscriber) {
return new BufferCountSubscriber(subscriber, this.bufferSize, this.startBufferEvery);
};
return BufferCountOperator;
})();
var BufferCountSubscriber = (function(_super) {
__extends(BufferCountSubscriber, _super);
function BufferCountSubscriber(destination, bufferSize, startBufferEvery) {
_super.call(this, destination);
this.bufferSize = bufferSize;
this.startBufferEvery = startBufferEvery;
this.buffers = [[]];
this.count = 0;
}
BufferCountSubscriber.prototype._next = function(value) {
var count = (this.count += 1);
var destination = this.destination;
var bufferSize = this.bufferSize;
var startBufferEvery = (this.startBufferEvery == null) ? bufferSize : this.startBufferEvery;
var buffers = this.buffers;
var len = buffers.length;
var remove = -1;
if (count % startBufferEvery === 0) {
buffers.push([]);
}
for (var i = 0; i < len; i++) {
var buffer = buffers[i];
buffer.push(value);
if (buffer.length === bufferSize) {
remove = i;
destination.next(buffer);
}
}
if (remove !== -1) {
buffers.splice(remove, 1);
}
};
BufferCountSubscriber.prototype._error = function(err) {
this.destination.error(err);
};
BufferCountSubscriber.prototype._complete = function() {
var destination = this.destination;
var buffers = this.buffers;
while (buffers.length > 0) {
var buffer = buffers.shift();
if (buffer.length > 0) {
destination.next(buffer);
}
}
destination.complete();
};
return BufferCountSubscriber;
})(Subscriber_1.Subscriber);
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/bufferTime", ["rxjs/Subscriber", "rxjs/scheduler/asap"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var asap_1 = require("rxjs/scheduler/asap");
function bufferTime(bufferTimeSpan, bufferCreationInterval, scheduler) {
if (bufferCreationInterval === void 0) {
bufferCreationInterval = null;
}
if (scheduler === void 0) {
scheduler = asap_1.asap;
}
return this.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, scheduler));
}
exports.bufferTime = bufferTime;
var BufferTimeOperator = (function() {
function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, scheduler) {
this.bufferTimeSpan = bufferTimeSpan;
this.bufferCreationInterval = bufferCreationInterval;
this.scheduler = scheduler;
}
BufferTimeOperator.prototype.call = function(subscriber) {
return new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.scheduler);
};
return BufferTimeOperator;
})();
var BufferTimeSubscriber = (function(_super) {
__extends(BufferTimeSubscriber, _super);
function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, scheduler) {
_super.call(this, destination);
this.bufferTimeSpan = bufferTimeSpan;
this.bufferCreationInterval = bufferCreationInterval;
this.scheduler = scheduler;
this.buffers = [];
var buffer = this.openBuffer();
if (bufferCreationInterval !== null && bufferCreationInterval >= 0) {
var closeState = {
subscriber: this,
buffer: buffer
};
var creationState = {
bufferTimeSpan: bufferTimeSpan,
bufferCreationInterval: bufferCreationInterval,
subscriber: this,
scheduler: scheduler
};
this.add(scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
} else {
var timeSpanOnlyState = {
subscriber: this,
buffer: buffer,
bufferTimeSpan: bufferTimeSpan
};
this.add(scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
}
}
BufferTimeSubscriber.prototype._next = function(value) {
var buffers = this.buffers;
var len = buffers.length;
for (var i = 0; i < len; i++) {
buffers[i].push(value);
}
};
BufferTimeSubscriber.prototype._error = function(err) {
this.buffers.length = 0;
this.destination.error(err);
};
BufferTimeSubscriber.prototype._complete = function() {
var buffers = this.buffers;
while (buffers.length > 0) {
this.destination.next(buffers.shift());
}
this.destination.complete();
};
BufferTimeSubscriber.prototype.openBuffer = function() {
var buffer = [];
this.buffers.push(buffer);
return buffer;
};
BufferTimeSubscriber.prototype.closeBuffer = function(buffer) {
this.destination.next(buffer);
var buffers = this.buffers;
buffers.splice(buffers.indexOf(buffer), 1);
};
return BufferTimeSubscriber;
})(Subscriber_1.Subscriber);
function dispatchBufferTimeSpanOnly(state) {
var subscriber = state.subscriber;
var prevBuffer = state.buffer;
if (prevBuffer) {
subscriber.closeBuffer(prevBuffer);
}
state.buffer = subscriber.openBuffer();
if (!subscriber.isUnsubscribed) {
this.schedule(state, state.bufferTimeSpan);
}
}
function dispatchBufferCreation(state) {
var bufferCreationInterval = state.bufferCreationInterval,
bufferTimeSpan = state.bufferTimeSpan,
subscriber = state.subscriber,
scheduler = state.scheduler;
var buffer = subscriber.openBuffer();
var action = this;
if (!subscriber.isUnsubscribed) {
action.add(scheduler.schedule(dispatchBufferClose, bufferTimeSpan, {
subscriber: subscriber,
buffer: buffer
}));
action.schedule(state, bufferCreationInterval);
}
}
function dispatchBufferClose(_a) {
var subscriber = _a.subscriber,
buffer = _a.buffer;
subscriber.closeBuffer(buffer);
}
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/bufferToggle", ["rxjs/Subscriber", "rxjs/Subscription", "rxjs/util/tryCatch", "rxjs/util/errorObject"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var Subscription_1 = require("rxjs/Subscription");
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
function bufferToggle(openings, closingSelector) {
return this.lift(new BufferToggleOperator(openings, closingSelector));
}
exports.bufferToggle = bufferToggle;
var BufferToggleOperator = (function() {
function BufferToggleOperator(openings, closingSelector) {
this.openings = openings;
this.closingSelector = closingSelector;
}
BufferToggleOperator.prototype.call = function(subscriber) {
return new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector);
};
return BufferToggleOperator;
})();
var BufferToggleSubscriber = (function(_super) {
__extends(BufferToggleSubscriber, _super);
function BufferToggleSubscriber(destination, openings, closingSelector) {
_super.call(this, destination);
this.openings = openings;
this.closingSelector = closingSelector;
this.contexts = [];
this.add(this.openings._subscribe(new BufferToggleOpeningsSubscriber(this)));
}
BufferToggleSubscriber.prototype._next = function(value) {
var contexts = this.contexts;
var len = contexts.length;
for (var i = 0; i < len; i++) {
contexts[i].buffer.push(value);
}
};
BufferToggleSubscriber.prototype._error = function(err) {
var contexts = this.contexts;
while (contexts.length > 0) {
var context = contexts.shift();
context.subscription.unsubscribe();
context.buffer = null;
context.subscription = null;
}
this.contexts = null;
this.destination.error(err);
};
BufferToggleSubscriber.prototype._complete = function() {
var contexts = this.contexts;
while (contexts.length > 0) {
var context = contexts.shift();
this.destination.next(context.buffer);
context.subscription.unsubscribe();
context.buffer = null;
context.subscription = null;
}
this.contexts = null;
this.destination.complete();
};
BufferToggleSubscriber.prototype.openBuffer = function(value) {
var closingSelector = this.closingSelector;
var contexts = this.contexts;
var closingNotifier = tryCatch_1.tryCatch(closingSelector)(value);
if (closingNotifier === errorObject_1.errorObject) {
this._error(closingNotifier.e);
} else {
var context = {
buffer: [],
subscription: new Subscription_1.Subscription()
};
contexts.push(context);
var subscriber = new BufferToggleClosingsSubscriber(this, context);
var subscription = closingNotifier._subscribe(subscriber);
context.subscription.add(subscription);
this.add(subscription);
}
};
BufferToggleSubscriber.prototype.closeBuffer = function(context) {
var contexts = this.contexts;
if (contexts === null) {
return ;
}
var buffer = context.buffer,
subscription = context.subscription;
this.destination.next(buffer);
contexts.splice(contexts.indexOf(context), 1);
this.remove(subscription);
subscription.unsubscribe();
};
return BufferToggleSubscriber;
})(Subscriber_1.Subscriber);
var BufferToggleOpeningsSubscriber = (function(_super) {
__extends(BufferToggleOpeningsSubscriber, _super);
function BufferToggleOpeningsSubscriber(parent) {
_super.call(this, null);
this.parent = parent;
}
BufferToggleOpeningsSubscriber.prototype._next = function(value) {
this.parent.openBuffer(value);
};
BufferToggleOpeningsSubscriber.prototype._error = function(err) {
this.parent.error(err);
};
BufferToggleOpeningsSubscriber.prototype._complete = function() {};
return BufferToggleOpeningsSubscriber;
})(Subscriber_1.Subscriber);
var BufferToggleClosingsSubscriber = (function(_super) {
__extends(BufferToggleClosingsSubscriber, _super);
function BufferToggleClosingsSubscriber(parent, context) {
_super.call(this, null);
this.parent = parent;
this.context = context;
}
BufferToggleClosingsSubscriber.prototype._next = function() {
this.parent.closeBuffer(this.context);
};
BufferToggleClosingsSubscriber.prototype._error = function(err) {
this.parent.error(err);
};
BufferToggleClosingsSubscriber.prototype._complete = function() {
this.parent.closeBuffer(this.context);
};
return BufferToggleClosingsSubscriber;
})(Subscriber_1.Subscriber);
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/bufferWhen", ["rxjs/Subscriber", "rxjs/util/tryCatch", "rxjs/util/errorObject"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
function bufferWhen(closingSelector) {
return this.lift(new BufferWhenOperator(closingSelector));
}
exports.bufferWhen = bufferWhen;
var BufferWhenOperator = (function() {
function BufferWhenOperator(closingSelector) {
this.closingSelector = closingSelector;
}
BufferWhenOperator.prototype.call = function(subscriber) {
return new BufferWhenSubscriber(subscriber, this.closingSelector);
};
return BufferWhenOperator;
})();
var BufferWhenSubscriber = (function(_super) {
__extends(BufferWhenSubscriber, _super);
function BufferWhenSubscriber(destination, closingSelector) {
_super.call(this, destination);
this.closingSelector = closingSelector;
this.openBuffer();
}
BufferWhenSubscriber.prototype._next = function(value) {
this.buffer.push(value);
};
BufferWhenSubscriber.prototype._error = function(err) {
this.buffer = null;
this.destination.error(err);
};
BufferWhenSubscriber.prototype._complete = function() {
var buffer = this.buffer;
this.destination.next(buffer);
this.buffer = null;
this.destination.complete();
};
BufferWhenSubscriber.prototype.openBuffer = function() {
var prevClosingNotification = this.closingNotification;
if (prevClosingNotification) {
this.remove(prevClosingNotification);
prevClosingNotification.unsubscribe();
}
var buffer = this.buffer;
if (buffer) {
this.destination.next(buffer);
}
this.buffer = [];
var closingNotifier = tryCatch_1.tryCatch(this.closingSelector)();
if (closingNotifier === errorObject_1.errorObject) {
var err = closingNotifier.e;
this.buffer = null;
this.destination.error(err);
} else {
this.add(this.closingNotification = closingNotifier._subscribe(new BufferClosingNotifierSubscriber(this)));
}
};
return BufferWhenSubscriber;
})(Subscriber_1.Subscriber);
var BufferClosingNotifierSubscriber = (function(_super) {
__extends(BufferClosingNotifierSubscriber, _super);
function BufferClosingNotifierSubscriber(parent) {
_super.call(this, null);
this.parent = parent;
}
BufferClosingNotifierSubscriber.prototype._next = function() {
this.parent.openBuffer();
};
BufferClosingNotifierSubscriber.prototype._error = function(err) {
this.parent.error(err);
};
BufferClosingNotifierSubscriber.prototype._complete = function() {
this.parent.openBuffer();
};
return BufferClosingNotifierSubscriber;
})(Subscriber_1.Subscriber);
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/catch", ["rxjs/Subscriber", "rxjs/util/tryCatch", "rxjs/util/errorObject"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
function _catch(selector) {
var catchOperator = new CatchOperator(selector);
var caught = this.lift(catchOperator);
catchOperator.caught = caught;
return caught;
}
exports._catch = _catch;
var CatchOperator = (function() {
function CatchOperator(selector) {
this.selector = selector;
}
CatchOperator.prototype.call = function(subscriber) {
return new CatchSubscriber(subscriber, this.selector, this.caught);
};
return CatchOperator;
})();
var CatchSubscriber = (function(_super) {
__extends(CatchSubscriber, _super);
function CatchSubscriber(destination, selector, caught) {
_super.call(this, null);
this.destination = destination;
this.selector = selector;
this.caught = caught;
this.lastSubscription = this;
this.destination.add(this);
}
CatchSubscriber.prototype._next = function(value) {
this.destination.next(value);
};
CatchSubscriber.prototype._error = function(err) {
var result = tryCatch_1.tryCatch(this.selector)(err, this.caught);
if (result === errorObject_1.errorObject) {
this.destination.error(errorObject_1.errorObject.e);
} else {
this.lastSubscription.unsubscribe();
this.lastSubscription = result.subscribe(this.destination);
}
};
CatchSubscriber.prototype._complete = function() {
this.lastSubscription.unsubscribe();
this.destination.complete();
};
CatchSubscriber.prototype._unsubscribe = function() {
this.lastSubscription.unsubscribe();
};
return CatchSubscriber;
})(Subscriber_1.Subscriber);
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/combineAll", ["rxjs/operator/combineLatest-support"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var combineLatest_support_1 = require("rxjs/operator/combineLatest-support");
function combineAll(project) {
return this.lift(new combineLatest_support_1.CombineLatestOperator(project));
}
exports.combineAll = combineAll;
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/combineLatest", ["rxjs/observable/fromArray", "rxjs/operator/combineLatest-support", "rxjs/util/isArray"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var fromArray_1 = require("rxjs/observable/fromArray");
var combineLatest_support_1 = require("rxjs/operator/combineLatest-support");
var isArray_1 = require("rxjs/util/isArray");
function combineLatest() {
var observables = [];
for (var _i = 0; _i < arguments.length; _i++) {
observables[_i - 0] = arguments[_i];
}
var project = null;
if (typeof observables[observables.length - 1] === 'function') {
project = observables.pop();
}
if (observables.length === 1 && isArray_1.isArray(observables[0])) {
observables = observables[0];
}
observables.unshift(this);
return new fromArray_1.ArrayObservable(observables).lift(new combineLatest_support_1.CombineLatestOperator(project));
}
exports.combineLatest = combineLatest;
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/concat", ["rxjs/util/isScheduler", "rxjs/observable/fromArray", "rxjs/operator/mergeAll-support"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var isScheduler_1 = require("rxjs/util/isScheduler");
var fromArray_1 = require("rxjs/observable/fromArray");
var mergeAll_support_1 = require("rxjs/operator/mergeAll-support");
function concat() {
var observables = [];
for (var _i = 0; _i < arguments.length; _i++) {
observables[_i - 0] = arguments[_i];
}
var args = observables;
args.unshift(this);
var scheduler = null;
if (isScheduler_1.isScheduler(args[args.length - 1])) {
scheduler = args.pop();
}
return new fromArray_1.ArrayObservable(args, scheduler).lift(new mergeAll_support_1.MergeAllOperator(1));
}
exports.concat = concat;
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/concatAll", ["rxjs/operator/mergeAll-support"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var mergeAll_support_1 = require("rxjs/operator/mergeAll-support");
function concatAll() {
return this.lift(new mergeAll_support_1.MergeAllOperator(1));
}
exports.concatAll = concatAll;
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/mergeMap-support", ["rxjs/util/tryCatch", "rxjs/util/errorObject", "rxjs/util/subscribeToResult", "rxjs/OuterSubscriber"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
var subscribeToResult_1 = require("rxjs/util/subscribeToResult");
var OuterSubscriber_1 = require("rxjs/OuterSubscriber");
var MergeMapOperator = (function() {
function MergeMapOperator(project, resultSelector, concurrent) {
if (concurrent === void 0) {
concurrent = Number.POSITIVE_INFINITY;
}
this.project = project;
this.resultSelector = resultSelector;
this.concurrent = concurrent;
}
MergeMapOperator.prototype.call = function(observer) {
return new MergeMapSubscriber(observer, this.project, this.resultSelector, this.concurrent);
};
return MergeMapOperator;
})();
exports.MergeMapOperator = MergeMapOperator;
var MergeMapSubscriber = (function(_super) {
__extends(MergeMapSubscriber, _super);
function MergeMapSubscriber(destination, project, resultSelector, concurrent) {
if (concurrent === void 0) {
concurrent = Number.POSITIVE_INFINITY;
}
_super.call(this, destination);
this.project = project;
this.resultSelector = resultSelector;
this.concurrent = concurrent;
this.hasCompleted = false;
this.buffer = [];
this.active = 0;
this.index = 0;
}
MergeMapSubscriber.prototype._next = function(value) {
if (this.active < this.concurrent) {
var index = this.index++;
var ish = tryCatch_1.tryCatch(this.project)(value, index);
var destination = this.destination;
if (ish === errorObject_1.errorObject) {
destination.error(ish.e);
} else {
this.active++;
this._innerSub(ish, value, index);
}
} else {
this.buffer.push(value);
}
};
MergeMapSubscriber.prototype._innerSub = function(ish, value, index) {
this.add(subscribeToResult_1.subscribeToResult(this, ish, value, index));
};
MergeMapSubscriber.prototype._complete = function() {
this.hasCompleted = true;
if (this.active === 0 && this.buffer.length === 0) {
this.destination.complete();
}
};
MergeMapSubscriber.prototype.notifyNext = function(outerValue, innerValue, outerIndex, innerIndex) {
var _a = this,
destination = _a.destination,
resultSelector = _a.resultSelector;
if (resultSelector) {
var result = tryCatch_1.tryCatch(resultSelector)(outerValue, innerValue, outerIndex, innerIndex);
if (result === errorObject_1.errorObject) {
destination.error(errorObject_1.errorObject.e);
} else {
destination.next(result);
}
} else {
destination.next(innerValue);
}
};
MergeMapSubscriber.prototype.notifyComplete = function(innerSub) {
var buffer = this.buffer;
this.remove(innerSub);
this.active--;
if (buffer.length > 0) {
this._next(buffer.shift());
} else if (this.active === 0 && this.hasCompleted) {
this.destination.complete();
}
};
return MergeMapSubscriber;
})(OuterSubscriber_1.OuterSubscriber);
exports.MergeMapSubscriber = MergeMapSubscriber;
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/mergeMapTo-support", ["rxjs/util/tryCatch", "rxjs/util/errorObject", "rxjs/OuterSubscriber", "rxjs/util/subscribeToResult"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
var OuterSubscriber_1 = require("rxjs/OuterSubscriber");
var subscribeToResult_1 = require("rxjs/util/subscribeToResult");
var MergeMapToOperator = (function() {
function MergeMapToOperator(ish, resultSelector, concurrent) {
if (concurrent === void 0) {
concurrent = Number.POSITIVE_INFINITY;
}
this.ish = ish;
this.resultSelector = resultSelector;
this.concurrent = concurrent;
}
MergeMapToOperator.prototype.call = function(observer) {
return new MergeMapToSubscriber(observer, this.ish, this.resultSelector, this.concurrent);
};
return MergeMapToOperator;
})();
exports.MergeMapToOperator = MergeMapToOperator;
var MergeMapToSubscriber = (function(_super) {
__extends(MergeMapToSubscriber, _super);
function MergeMapToSubscriber(destination, ish, resultSelector, concurrent) {
if (concurrent === void 0) {
concurrent = Number.POSITIVE_INFINITY;
}
_super.call(this, destination);
this.ish = ish;
this.resultSelector = resultSelector;
this.concurrent = concurrent;
this.hasCompleted = false;
this.buffer = [];
this.active = 0;
this.index = 0;
}
MergeMapToSubscriber.prototype._next = function(value) {
if (this.active < this.concurrent) {
var resultSelector = this.resultSelector;
var index = this.index++;
var ish = this.ish;
var destination = this.destination;
this.active++;
this._innerSub(ish, destination, resultSelector, value, index);
} else {
this.buffer.push(value);
}
};
MergeMapToSubscriber.prototype._innerSub = function(ish, destination, resultSelector, value, index) {
this.add(subscribeToResult_1.subscribeToResult(this, ish, value, index));
};
MergeMapToSubscriber.prototype._complete = function() {
this.hasCompleted = true;
if (this.active === 0 && this.buffer.length === 0) {
this.destination.complete();
}
};
MergeMapToSubscriber.prototype.notifyNext = function(outerValue, innerValue, outerIndex, innerIndex) {
var _a = this,
resultSelector = _a.resultSelector,
destination = _a.destination;
if (resultSelector) {
var result = tryCatch_1.tryCatch(resultSelector)(outerValue, innerValue, outerIndex, innerIndex);
if (result === errorObject_1.errorObject) {
destination.error(errorObject_1.errorObject.e);
} else {
destination.next(result);
}
} else {
destination.next(innerValue);
}
};
MergeMapToSubscriber.prototype.notifyError = function(err) {
this.destination.error(err);
};
MergeMapToSubscriber.prototype.notifyComplete = function(innerSub) {
var buffer = this.buffer;
this.remove(innerSub);
this.active--;
if (buffer.length > 0) {
this._next(buffer.shift());
} else if (this.active === 0 && this.hasCompleted) {
this.destination.complete();
}
};
return MergeMapToSubscriber;
})(OuterSubscriber_1.OuterSubscriber);
exports.MergeMapToSubscriber = MergeMapToSubscriber;
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/count", ["rxjs/Subscriber", "rxjs/util/tryCatch", "rxjs/util/errorObject"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
function count(predicate) {
return this.lift(new CountOperator(predicate, this));
}
exports.count = count;
var CountOperator = (function() {
function CountOperator(predicate, source) {
this.predicate = predicate;
this.source = source;
}
CountOperator.prototype.call = function(subscriber) {
return new CountSubscriber(subscriber, this.predicate, this.source);
};
return CountOperator;
})();
var CountSubscriber = (function(_super) {
__extends(CountSubscriber, _super);
function CountSubscriber(destination, predicate, source) {
_super.call(this, destination);
this.predicate = predicate;
this.source = source;
this.count = 0;
this.index = 0;
}
CountSubscriber.prototype._next = function(value) {
var predicate = this.predicate;
var passed = true;
if (predicate) {
passed = tryCatch_1.tryCatch(predicate)(value, this.index++, this.source);
if (passed === errorObject_1.errorObject) {
this.destination.error(passed.e);
return ;
}
}
if (passed) {
this.count += 1;
}
};
CountSubscriber.prototype._complete = function() {
this.destination.next(this.count);
this.destination.complete();
};
return CountSubscriber;
})(Subscriber_1.Subscriber);
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/dematerialize", ["rxjs/Subscriber"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
function dematerialize() {
return this.lift(new DeMaterializeOperator());
}
exports.dematerialize = dematerialize;
var DeMaterializeOperator = (function() {
function DeMaterializeOperator() {}
DeMaterializeOperator.prototype.call = function(subscriber) {
return new DeMaterializeSubscriber(subscriber);
};
return DeMaterializeOperator;
})();
var DeMaterializeSubscriber = (function(_super) {
__extends(DeMaterializeSubscriber, _super);
function DeMaterializeSubscriber(destination) {
_super.call(this, destination);
}
DeMaterializeSubscriber.prototype._next = function(value) {
value.observe(this.destination);
};
return DeMaterializeSubscriber;
})(Subscriber_1.Subscriber);
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/debounce", ["rxjs/observable/fromPromise", "rxjs/Subscriber", "rxjs/util/tryCatch", "rxjs/util/isPromise", "rxjs/util/errorObject"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var fromPromise_1 = require("rxjs/observable/fromPromise");
var Subscriber_1 = require("rxjs/Subscriber");
var tryCatch_1 = require("rxjs/util/tryCatch");
var isPromise_1 = require("rxjs/util/isPromise");
var errorObject_1 = require("rxjs/util/errorObject");
function debounce(durationSelector) {
return this.lift(new DebounceOperator(durationSelector));
}
exports.debounce = debounce;
var DebounceOperator = (function() {
function DebounceOperator(durationSelector) {
this.durationSelector = durationSelector;
}
DebounceOperator.prototype.call = function(observer) {
return new DebounceSubscriber(observer, this.durationSelector);
};
return DebounceOperator;
})();
var DebounceSubscriber = (function(_super) {
__extends(DebounceSubscriber, _super);
function DebounceSubscriber(destination, durationSelector) {
_super.call(this, destination);
this.durationSelector = durationSelector;
this.debouncedSubscription = null;
this.lastValue = null;
this._index = 0;
}
Object.defineProperty(DebounceSubscriber.prototype, "index", {
get: function() {
return this._index;
},
enumerable: true,
configurable: true
});
DebounceSubscriber.prototype._next = function(value) {
var destination = this.destination;
var currentIndex = ++this._index;
var debounce = tryCatch_1.tryCatch(this.durationSelector)(value);
if (debounce === errorObject_1.errorObject) {
destination.error(errorObject_1.errorObject.e);
} else {
if (isPromise_1.isPromise(debounce)) {
debounce = fromPromise_1.PromiseObservable.create(debounce);
}
this.lastValue = value;
this.clearDebounce();
this.add(this.debouncedSubscription = debounce._subscribe(new DurationSelectorSubscriber(this, currentIndex)));
}
};
DebounceSubscriber.prototype._complete = function() {
this.debouncedNext();
this.destination.complete();
};
DebounceSubscriber.prototype.debouncedNext = function() {
this.clearDebounce();
if (this.lastValue != null) {
this.destination.next(this.lastValue);
this.lastValue = null;
}
};
DebounceSubscriber.prototype.clearDebounce = function() {
var debouncedSubscription = this.debouncedSubscription;
if (debouncedSubscription) {
debouncedSubscription.unsubscribe();
this.remove(debouncedSubscription);
this.debouncedSubscription = null;
}
};
return DebounceSubscriber;
})(Subscriber_1.Subscriber);
var DurationSelectorSubscriber = (function(_super) {
__extends(DurationSelectorSubscriber, _super);
function DurationSelectorSubscriber(parent, currentIndex) {
_super.call(this, null);
this.parent = parent;
this.currentIndex = currentIndex;
}
DurationSelectorSubscriber.prototype.debounceNext = function() {
var parent = this.parent;
if (this.currentIndex === parent.index) {
parent.debouncedNext();
if (!this.isUnsubscribed) {
this.unsubscribe();
}
}
};
DurationSelectorSubscriber.prototype._next = function(unused) {
this.debounceNext();
};
DurationSelectorSubscriber.prototype._error = function(err) {
this.parent.error(err);
};
DurationSelectorSubscriber.prototype._complete = function() {
this.debounceNext();
};
return DurationSelectorSubscriber;
})(Subscriber_1.Subscriber);
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/debounceTime", ["rxjs/Subscriber", "rxjs/scheduler/asap"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var asap_1 = require("rxjs/scheduler/asap");
function debounceTime(dueTime, scheduler) {
if (scheduler === void 0) {
scheduler = asap_1.asap;
}
return this.lift(new DebounceTimeOperator(dueTime, scheduler));
}
exports.debounceTime = debounceTime;
var DebounceTimeOperator = (function() {
function DebounceTimeOperator(dueTime, scheduler) {
this.dueTime = dueTime;
this.scheduler = scheduler;
}
DebounceTimeOperator.prototype.call = function(subscriber) {
return new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler);
};
return DebounceTimeOperator;
})();
var DebounceTimeSubscriber = (function(_super) {
__extends(DebounceTimeSubscriber, _super);
function DebounceTimeSubscriber(destination, dueTime, scheduler) {
_super.call(this, destination);
this.dueTime = dueTime;
this.scheduler = scheduler;
this.debouncedSubscription = null;
this.lastValue = null;
}
DebounceTimeSubscriber.prototype._next = function(value) {
this.clearDebounce();
this.lastValue = value;
this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
};
DebounceTimeSubscriber.prototype._complete = function() {
this.debouncedNext();
this.destination.complete();
};
DebounceTimeSubscriber.prototype.debouncedNext = function() {
this.clearDebounce();
if (this.lastValue != null) {
this.destination.next(this.lastValue);
this.lastValue = null;
}
};
DebounceTimeSubscriber.prototype.clearDebounce = function() {
var debouncedSubscription = this.debouncedSubscription;
if (debouncedSubscription !== null) {
this.remove(debouncedSubscription);
debouncedSubscription.unsubscribe();
this.debouncedSubscription = null;
}
};
return DebounceTimeSubscriber;
})(Subscriber_1.Subscriber);
function dispatchNext(subscriber) {
subscriber.debouncedNext();
}
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/defaultIfEmpty", ["rxjs/Subscriber"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
function defaultIfEmpty(defaultValue) {
if (defaultValue === void 0) {
defaultValue = null;
}
return this.lift(new DefaultIfEmptyOperator(defaultValue));
}
exports.defaultIfEmpty = defaultIfEmpty;
var DefaultIfEmptyOperator = (function() {
function DefaultIfEmptyOperator(defaultValue) {
this.defaultValue = defaultValue;
}
DefaultIfEmptyOperator.prototype.call = function(subscriber) {
return new DefaultIfEmptySubscriber(subscriber, this.defaultValue);
};
return DefaultIfEmptyOperator;
})();
var DefaultIfEmptySubscriber = (function(_super) {
__extends(DefaultIfEmptySubscriber, _super);
function DefaultIfEmptySubscriber(destination, defaultValue) {
_super.call(this, destination);
this.defaultValue = defaultValue;
this.isEmpty = true;
}
DefaultIfEmptySubscriber.prototype._next = function(value) {
this.isEmpty = false;
this.destination.next(value);
};
DefaultIfEmptySubscriber.prototype._complete = function() {
if (this.isEmpty) {
this.destination.next(this.defaultValue);
}
this.destination.complete();
};
return DefaultIfEmptySubscriber;
})(Subscriber_1.Subscriber);
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/delay", ["rxjs/Subscriber", "rxjs/Notification", "rxjs/scheduler/queue", "rxjs/util/isDate"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var Notification_1 = require("rxjs/Notification");
var queue_1 = require("rxjs/scheduler/queue");
var isDate_1 = require("rxjs/util/isDate");
function delay(delay, scheduler) {
if (scheduler === void 0) {
scheduler = queue_1.queue;
}
var absoluteDelay = isDate_1.isDate(delay);
var delayFor = absoluteDelay ? (+delay - scheduler.now()) : delay;
return this.lift(new DelayOperator(delayFor, scheduler));
}
exports.delay = delay;
var DelayOperator = (function() {
function DelayOperator(delay, scheduler) {
this.delay = delay;
this.scheduler = scheduler;
}
DelayOperator.prototype.call = function(subscriber) {
return new DelaySubscriber(subscriber, this.delay, this.scheduler);
};
return DelayOperator;
})();
var DelaySubscriber = (function(_super) {
__extends(DelaySubscriber, _super);
function DelaySubscriber(destination, delay, scheduler) {
_super.call(this, destination);
this.delay = delay;
this.scheduler = scheduler;
this.queue = [];
this.active = false;
this.errored = false;
}
DelaySubscriber.dispatch = function(state) {
var source = state.source;
var queue = source.queue;
var scheduler = state.scheduler;
var destination = state.destination;
while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
queue.shift().notification.observe(destination);
}
if (queue.length > 0) {
var delay_1 = Math.max(0, queue[0].time - scheduler.now());
this.schedule(state, delay_1);
} else {
source.active = false;
}
};
DelaySubscriber.prototype._schedule = function(scheduler) {
this.active = true;
this.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
source: this,
destination: this.destination,
scheduler: scheduler
}));
};
DelaySubscriber.prototype.scheduleNotification = function(notification) {
if (this.errored === true) {
return ;
}
var scheduler = this.scheduler;
var message = new DelayMessage(scheduler.now() + this.delay, notification);
this.queue.push(message);
if (this.active === false) {
this._schedule(scheduler);
}
};
DelaySubscriber.prototype._next = function(value) {
this.scheduleNotification(Notification_1.Notification.createNext(value));
};
DelaySubscriber.prototype._error = function(err) {
this.errored = true;
this.queue = [];
this.destination.error(err);
};
DelaySubscriber.prototype._complete = function() {
this.scheduleNotification(Notification_1.Notification.createComplete());
};
return DelaySubscriber;
})(Subscriber_1.Subscriber);
var DelayMessage = (function() {
function DelayMessage(time, notification) {
this.time = time;
this.notification = notification;
}
return DelayMessage;
})();
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/distinctUntilChanged", ["rxjs/Subscriber", "rxjs/util/tryCatch", "rxjs/util/errorObject"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
function distinctUntilChanged(compare) {
return this.lift(new DistinctUntilChangedOperator(compare));
}
exports.distinctUntilChanged = distinctUntilChanged;
var DistinctUntilChangedOperator = (function() {
function DistinctUntilChangedOperator(compare) {
this.compare = compare;
}
DistinctUntilChangedOperator.prototype.call = function(subscriber) {
return new DistinctUntilChangedSubscriber(subscriber, this.compare);
};
return DistinctUntilChangedOperator;
})();
var DistinctUntilChangedSubscriber = (function(_super) {
__extends(DistinctUntilChangedSubscriber, _super);
function DistinctUntilChangedSubscriber(destination, compare) {
_super.call(this, destination);
this.hasValue = false;
if (typeof compare === 'function') {
this.compare = compare;
}
}
DistinctUntilChangedSubscriber.prototype.compare = function(x, y) {
return x === y;
};
DistinctUntilChangedSubscriber.prototype._next = function(value) {
var result = false;
if (this.hasValue) {
result = tryCatch_1.tryCatch(this.compare)(this.value, value);
if (result === errorObject_1.errorObject) {
this.destination.error(errorObject_1.errorObject.e);
return ;
}
} else {
this.hasValue = true;
}
if (Boolean(result) === false) {
this.value = value;
this.destination.next(value);
}
};
return DistinctUntilChangedSubscriber;
})(Subscriber_1.Subscriber);
global.define = __define;
return module.exports;
});
System.register("rxjs/operator/do", ["rxjs/Subscriber", "rxjs/util/noop", "rxjs/util/tryCatch", "rxjs/util/errorObject"], true, function(require, exports, module) {
var global = System.global,
__define = global.define;
global.define = undefined;
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require("rxjs/Subscriber");
var noop_1 = require("rxjs/util/noop");
var tryCatch_1 = require("rxjs/util/tryCatch");
var errorObject_1 = require("rxjs/util/errorObject");
function _do(nextOrObserver, error, complete) {
var next;
if (nextOrObserver && typeof nextOrObserver === 'object') {
next = nextOrObserver.next;
error = nextOrObserver.error;