From 787b9954f9323737d39fdf0ce97b0aebb9c1c7db Mon Sep 17 00:00:00 2001 From: Matthew Podwysocki Date: Sat, 15 Nov 2014 10:16:49 -0500 Subject: [PATCH] Version bump --- bower.json | 2 +- dist/rx.all.compat.js | 2 +- dist/rx.all.compat.map | 2 +- dist/rx.all.compat.min.js | 4 ++-- dist/rx.all.js | 2 +- dist/rx.all.map | 2 +- dist/rx.all.min.js | 4 ++-- dist/rx.compat.js | 2 +- dist/rx.compat.map | 2 +- dist/rx.compat.min.js | 2 +- dist/rx.js | 2 +- dist/rx.lite.compat.js | 2 +- dist/rx.lite.compat.map | 2 +- dist/rx.lite.compat.min.js | 2 +- dist/rx.lite.js | 2 +- dist/rx.lite.map | 2 +- dist/rx.lite.min.js | 2 +- dist/rx.map | 2 +- dist/rx.min.js | 4 ++-- package.json | 2 +- src/core/linq/observable/fromarray.js | 2 +- 21 files changed, 24 insertions(+), 24 deletions(-) diff --git a/bower.json b/bower.json index 709ede7a5..a48ddf34a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "rxjs", - "version": "2.3.17", + "version": "2.3.18", "main": [ "dist/rx.all.js", "dist/rx.all.map", diff --git a/dist/rx.all.compat.js b/dist/rx.all.compat.js index 1c9fc7810..71b9b076f 100644 --- a/dist/rx.all.compat.js +++ b/dist/rx.all.compat.js @@ -2445,7 +2445,7 @@ if (!Array.prototype.forEach) { * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence. */ var observableFromArray = Observable.fromArray = function (array, scheduler) { - //deprecate('fromArray', 'from'); + deprecate('fromArray', 'from'); isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new AnonymousObservable(function (observer) { var count = 0, len = array.length; diff --git a/dist/rx.all.compat.map b/dist/rx.all.compat.map index 11856a4b7..5bf117526 100644 --- a/dist/rx.all.compat.map +++ b/dist/rx.all.compat.map @@ -1 +1 @@ -{"version":3,"file":"rx.all.compat.min.js","sources":["rx.all.compat.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","flatMap","mergeAll","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","sequenceContainsNoElements","elementAtOrDefault","hasDefault","defaultValue","argumentOutOfRange","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","predicate","yieldIndex","shouldRun","toThunk","obj","ctx","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","observable","v","promise","then","name","next","throwString","val","error","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","relatedTarget","fromElement","toElement","c","charCode","keyChar","fromCharCode","createListener","element","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","add","combineLatestSource","subject","values","hasValueAll","every","identity","apply","isDone","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","win","observableWindowWithBounaries","windowBoundaries","Subject","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","windowClose","m1","m","take","noop","enumerableWhile","condition","Enumerable","Enumerator","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","newValue","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","not","asArray","arguments","isFn","Symbol","iterator","Set","doneEnumerator","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","prop","xs","getDisposable","Function","that","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","fun","split","thisp","filter","t","arg","indexOf","searchElement","n","Number","Infinity","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","_next","_iterator","currentItem","currentValue","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","isStopped","completed","fail","_onNext","_onError","_onCompleted","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","Observable","_subscribe","subscribeOnNext","subscribeOnError","subscribeOnCompleted","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","arr","createWithDisposable","defer","observableFactory","observableThrow","pow","charAt","from","iterable","mapFn","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","observableNever","never","range","observableReturn","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","handleError","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","select","selectorFn","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","finalValue","aggregate","reduce","some","any","isEmpty","all","contains","fromIndex","sum","prev","curr","minBy","min","maxBy","average","cur","sequenceEqual","donel","doner","ql","qr","subscription1","equal","subscription2","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","toSet","toMap","spawn","isGenFun","exit","ret","gen","called","hasCallback","denodify","cb","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasObservers","os","createRemovableDisposable","so","_trim","hasError","windowSize","MAX_VALUE","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","isPrime","candidate","num1","sqrt","num2","getPrime","num","primes","stringHashFn","str","hash","character","charCodeAt","numberHashFn","c2","newEntry","hashCode","_initialize","freeCount","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","dictionaryProto","prime","buckets","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","clear","_findEntry","containskey","join","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","published","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","subscriber","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","chain","ChainObservable","g","head","tail","_keys","_values","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","observableTimer","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","throttleLatest","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","debounceWithSelector","currentid","throttleWithSelector","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","throttleFirst","windowDuration","lastOnNext","exclusive","hasCurrent","exclusiveMap","transduce","transducer","transformForObserver","init","step","obs","input","xform","VirtualTimeScheduler","notImplemented","localNow","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,IAsFlE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ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","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","flatMap","mergeAll","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","sequenceContainsNoElements","elementAtOrDefault","hasDefault","defaultValue","argumentOutOfRange","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","predicate","yieldIndex","shouldRun","toThunk","obj","ctx","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","observable","v","promise","then","name","next","throwString","val","error","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","relatedTarget","fromElement","toElement","c","charCode","keyChar","fromCharCode","createListener","element","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","add","combineLatestSource","subject","values","hasValueAll","every","identity","apply","isDone","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","win","observableWindowWithBounaries","windowBoundaries","Subject","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","windowClose","m1","m","take","noop","enumerableWhile","condition","Enumerable","Enumerator","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","newValue","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","not","asArray","arguments","isFn","Symbol","iterator","Set","doneEnumerator","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","prop","xs","getDisposable","Function","that","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","fun","split","thisp","filter","t","arg","indexOf","searchElement","n","Number","Infinity","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","_next","_iterator","currentItem","currentValue","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","isStopped","completed","fail","_onNext","_onError","_onCompleted","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","Observable","_subscribe","subscribeOnNext","subscribeOnError","subscribeOnCompleted","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","arr","createWithDisposable","defer","observableFactory","observableThrow","pow","charAt","from","iterable","mapFn","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","observableNever","never","range","observableReturn","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","handleError","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","select","selectorFn","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","finalValue","aggregate","reduce","some","any","isEmpty","all","contains","fromIndex","sum","prev","curr","minBy","min","maxBy","average","cur","sequenceEqual","donel","doner","ql","qr","subscription1","equal","subscription2","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","toSet","toMap","spawn","isGenFun","exit","ret","gen","called","hasCallback","denodify","cb","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasObservers","os","createRemovableDisposable","so","_trim","hasError","windowSize","MAX_VALUE","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","isPrime","candidate","num1","sqrt","num2","getPrime","num","primes","stringHashFn","str","hash","character","charCodeAt","numberHashFn","c2","newEntry","hashCode","_initialize","freeCount","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","dictionaryProto","prime","buckets","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","clear","_findEntry","containskey","join","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","published","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","subscriber","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","chain","ChainObservable","g","head","tail","_keys","_values","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","observableTimer","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","throttleLatest","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","debounceWithSelector","currentid","throttleWithSelector","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","throttleFirst","windowDuration","lastOnNext","exclusive","hasCurrent","exclusiveMap","transduce","transducer","transformForObserver","init","step","obs","input","xform","VirtualTimeScheduler","notImplemented","localNow","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,IAsFlE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB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b/dist/rx.all.compat.min.js index 9356ebbe1..6a106397a 100644 --- a/dist/rx.all.compat.min.js +++ b/dist/rx.all.compat.min.js @@ -1,5 +1,5 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){function b(){if(this.isDisposed)throw new Error(Db)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;bc.nonEnumArgs&&a.length&&h(a)&&(a=dc.call(a));var d=bc.enumPrototypes&&"function"==typeof a,e=bc.enumErrorProps&&(a===Xb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(bc.nonEnumShadows&&a!==Yb){var g=a.constructor,i=-1,j=_b.length;if(a===(g&&g.prototype))var k=a===stringProto?Tb:a===Xb?Ob:Ub.call(a),l=ac[k];for(;++i-1:void 0});return c.pop(),d.pop(),r}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:dc.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function n(){this._s=s}function o(){this._s=s,this._l=s.length,this._i=0}function p(a){this._a=a}function q(a){this._a=a,this._l=v(a),this._i=0}function r(a){return"number"==typeof a&&lb.isFinite(a)}function t(b){var c,d=b[Eb];if(!d&&"string"==typeof b)return c=new n(b),c[Eb]();if(!d&&b.length!==a)return c=new p(b),c[Eb]();if(!d)throw new TypeError("Object is not iterable");return b[Eb]()}function u(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function v(a){var b=+a.length;return isNaN(b)?0:0!==b&&r(b)?(b=u(b)*Math.floor(Math.abs(b)),0>=b?0:b>$c?$c:b):b}function w(a,b){return sb(a)||(a=zc),new Gd(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function x(a,b){return new Gd(function(c){var d=new qc,e=new rc;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}yb(f)&&(f=Xc(f)),d=new qc,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function y(a,b){var c=this;return new Gd(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function z(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return yb(f)&&(f=Xc(f)),(Hb(f)||Gb(f))&&(f=_c(f)),f}).concatAll()}function A(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function B(a){this.comparer=a,this.set=[]}function C(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return yb(f)&&(f=Xc(f)),(Hb(f)||Gb(f))&&(f=_c(f)),f}).mergeAll()}function D(a,b,c){return new Gd(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},d.onError.bind(d),function(){d.onNext(g),d.onCompleted()})})}function E(a){if(0===a.length)throw new Error(Bb);return a[0]}function F(a,b,c,d){if(0>b)throw new Error(Cb);return new Gd(function(e){var f=b;return a.subscribe(function(a){0===f&&(e.onNext(a),e.onCompleted()),f--},e.onError.bind(e),function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(Cb))})})}function G(a,b,c){return new Gd(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Bb))})})}function H(a,b,c){return new Gd(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},d.onError.bind(d),function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(Bb))})})}function I(a,b,c){return new Gd(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Bb))})})}function J(b,c,d,e){return new Gd(function(f){var g=0;return b.subscribe(function(a){var h;try{h=c.call(d,a,g,b)}catch(i){return void f.onError(i)}h?(f.onNext(e?g:a),f.onCompleted()):g++},f.onError.bind(f),function(){f.onNext(e?-1:a),f.onCompleted()})})}function K(a,b){return Array.isArray(a)?L.call(b,a):P(a)?ld(a.call(b)):Q(a)?ld(a):O(a)?M(a):yb(a)?N(a):typeof a===jd?a:c(a)||Array.isArray(a)?L.call(b,a):a}function L(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=K(a,b),typeof a!==jd)return h[d]=a,--g||c(null,h);a.call(b,function(a,b){if(!e){if(a)return e=!0,c(a);h[d]=b,--g||c(null,h)}})}catch(f){e=!0,c(f)}}var e,f=Object.keys(a),g=f.length,h=new a.constructor;if(!g)return void Ec.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function M(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function N(a){return function(b){a.then(function(a){b(null,a)},b)}}function O(a){return a&&typeof a.subscribe===jd}function P(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function Q(a){return a&&typeof a.next===jd&&typeof a[kd]===jd}function c(a){return a&&a.constructor===Object}function R(a){a&&Ec.schedule(function(){throw a})}function S(a){var b=function(){this.cancelBubble=!0},c=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(a||(a=lb.event),!a.target)switch(a.target=a.target||a.srcElement,"mouseover"==a.type&&(a.relatedTarget=a.fromElement),"mouseout"==a.type&&(a.relatedTarget=a.toElement),a.stopPropagation||(a.stopPropagation=b,a.preventDefault=c),a.type){case"keypress":var d="charCode"in a?a.charCode:a.keyCode;10==d?(d=0,a.keyCode=13):13==d||27==d?d=0:3==d&&(d=99),a.charCode=d,a.keyChar=a.charCode?String.fromCharCode(a.charCode):""}return a}function T(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),oc(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(S(a))};return a.attachEvent("on"+b,d),oc(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,oc(function(){a["on"+b]=null})}function U(a,b,c){var d=new lc;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(U(a.item(e),b,c));else a&&d.add(T(a,b,c));return d}function V(a,b,c){return new Gd(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(tb))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new lc(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d),function(){i=!0,e(!0,1)}))})}function W(a,b){return a.groupJoin(this,b,Zc,function(a,b){return b})}function X(a){var b=this;return new Gd(function(c){var d=new Jd,e=new lc,f=new sc(e);return c.onNext(gc(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),yb(a)&&(a=Xc(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new Jd,c.onNext(gc(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f})}function Y(a){var b=this;return new Gd(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}yb(b)&&(b=Xc(b));var i=new qc;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(rb,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new Jd,c.onNext(gc(h,g)),d()}))}var e=new rc,f=new lc(e),g=new sc(f),h=new Jd;return c.onNext(gc(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g})}function Z(b,c){return new Lc(function(){return new Kc(function(){return b()?{done:!1,value:c}:{done:!0,value:a}})})}function $(a){this.patterns=a}function _(a,b){this.expression=a,this.selector=b}function ab(a,b,c){var d=a.get(b);if(!d){var e=new Dd(b,c);return a.set(b,e),e}return d}function bb(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new Cd;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function db(a,b){return new Gd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function eb(a,b,c){return new Gd(function(d){var e=0,f=a,g=vc(b);return c.scheduleRecursiveWithAbsolute(f,function(a){if(g>0){var b=c.now();f+=g,b>=f&&(f=b+g)}d.onNext(e++),a(f)})})}function fb(a,b){return new Gd(function(c){return b.scheduleWithRelative(vc(a),function(){c.onNext(0),c.onCompleted()})})}function gb(a,b,c){return a===b?new Gd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Yc(function(){return eb(c.now()+a,b,c)})}function hb(a,b,c){return new Gd(function(d){var e,f=!1,g=new rc,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new qc,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new lc(e,g)})}function ib(a,b,c){return Yc(function(){return hb(a,b-c.now(),c)})}function jb(a,b){return new Gd(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new lc(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))})}var kb={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},lb=kb[typeof window]&&window||this,mb=kb[typeof exports]&&exports&&!exports.nodeType&&exports,nb=kb[typeof module]&&module&&!module.nodeType&&module,ob=nb&&nb.exports===mb&&mb,pb=kb[typeof global]&&global;!pb||pb.global!==pb&&pb.window!==pb||(lb=pb);var qb={internals:{},config:{Promise:lb.Promise},helpers:{}},rb=qb.helpers.noop=function(){},sb=(qb.helpers.notDefined=function(a){return"undefined"==typeof a},qb.helpers.isScheduler=function(a){return a instanceof qb.Scheduler}),tb=qb.helpers.identity=function(a){return a},ub=(qb.helpers.pluck=function(a){return function(b){return b[a]}},qb.helpers.just=function(a){return function(){return a}},qb.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),vb=qb.helpers.defaultComparer=function(a,b){return cc(a,b)},wb=qb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},xb=(qb.helpers.defaultKeySerializer=function(a){return a.toString()},qb.helpers.defaultError=function(a){throw a}),yb=qb.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},zb=(qb.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},qb.helpers.not=function(a){return!a}),Ab=qb.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Ub.call(a)}),a}(),Bb="Sequence contains no elements.",Cb="Argument out of range",Db="Object has been disposed",Eb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";lb.Set&&"function"==typeof(new lb.Set)["@@iterator"]&&(Eb="@@iterator");var Fb=qb.doneEnumerator={done:!0,value:a},Gb=qb.helpers.isIterable=function(b){return b[Eb]!==a},Hb=qb.helpers.isArrayLike=function(b){return b&&b.length!==a};qb.helpers.iterator=Eb;var Ib,Jb=qb.helpers.deprecate=function(){},Kb="[object Arguments]",Lb="[object Array]",Mb="[object Boolean]",Nb="[object Date]",Ob="[object Error]",Pb="[object Function]",Qb="[object Number]",Rb="[object Object]",Sb="[object RegExp]",Tb="[object String]",Ub=Object.prototype.toString,Vb=Object.prototype.hasOwnProperty,Wb=Ub.call(arguments)==Kb,Xb=Error.prototype,Yb=Object.prototype,Zb=Yb.propertyIsEnumerable;try{Ib=!(Ub.call(document)==Rb&&!({toString:0}+""))}catch($b){Ib=!0}var _b=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ac={};ac[Lb]=ac[Nb]=ac[Qb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},ac[Mb]=ac[Tb]={constructor:!0,toString:!0,valueOf:!0},ac[Ob]=ac[Pb]=ac[Sb]={constructor:!0,toString:!0},ac[Rb]={constructor:!0};var bc={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);bc.enumErrorProps=Zb.call(Xb,"message")||Zb.call(Xb,"name"),bc.enumPrototypes=Zb.call(a,"prototype"),bc.nonEnumArgs=0!=c,bc.nonEnumShadows=!/valueOf/.test(b)}(1),Wb||(h=function(a){return a&&"object"==typeof a?Vb.call(a,"callee"):!1});var cc=qb.internals.isEqual=function(a,b){return i(a,b,[],[])},dc=Array.prototype.slice,ec=({}.hasOwnProperty,this.inherits=qb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),fc=qb.internals.addProperties=function(a){for(var b=dc.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},gc=qb.internals.addRef=function(a,b){return new Gd(function(c){return new lc(b.getDisposable(),a.subscribe(c))})};Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=dc.call(arguments,1),d=function(){function e(){}if(this instanceof d){e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(dc.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(dc.call(arguments)))};return d}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}});var hc=Object("a"),ic="a"!=hc[0]||!(0 in hc);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=ic&&{}.toString.call(this)==Tb?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=Pb)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=ic&&{}.toString.call(this)==Tb?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=Pb)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return{}.toString.call(a)==Lb}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var jc=qb.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},kc=jc.prototype;kc.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},kc.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},kc.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},mc.toArray=function(){return this.disposables.slice(0)};var nc=qb.Disposable=function(a){this.isDisposed=!1,this.action=a||rb};nc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var oc=nc.create=function(a){return new nc(a)},pc=nc.empty={dispose:rb},qc=qb.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),rc=qb.SerialDisposable=qc,sc=qb.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?pc:new a(this)},b}();m.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var tc=qb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||wb,this.disposable=new qc};tc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},tc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},tc.prototype.isCancelled=function(){return this.disposable.isDisposed},tc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var uc=qb.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),pc}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=ub,a.normalize=function(a){return 0>a&&(a=0),a},a}(),vc=uc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new lc,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),pc});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new lc,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),pc});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(uc.prototype),function(){uc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},uc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof lb.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=lb.setInterval(function(){d=c(d)},b);return oc(function(){lb.clearInterval(e)})}}(uc.prototype),function(a){a.catchError=a["catch"]=function(a){return new Fc(this,a)}}(uc.prototype);var wc,xc=qb.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new qc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),yc=uc.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=vc(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new uc(ub,a,b,c)}(),zc=uc.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-uc.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+uc.normalize(c),g=new tc(this,b,d,f);if(e)e.enqueue(g);else{e=new jc(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new uc(ub,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Ac=rb,Bc=function(){var a,b=rb;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!lb.setTimeout)throw new Error("No concurrency detected!");a=lb.setTimeout,b=lb.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Cc=Bc.setTimeout,Dc=Bc.clearTimeout;!function(){function a(){if(!lb.postMessage||lb.importScripts)return!1;var a=!1,b=lb.onmessage;return lb.onmessage=function(){a=!0},lb.postMessage("","*"),lb.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(Ub).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=pb&&ob&&pb.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=pb&&ob&&pb.clearImmediate)&&!c.test(e)&&e;if("function"==typeof d)wc=d,Ac=e;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))wc=process.nextTick;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;lb.addEventListener?lb.addEventListener("message",b,!1):lb.attachEvent("onmessage",b,!1),wc=function(a){var b=h++;g[b]=a,lb.postMessage(f+b,"*")}}else if(lb.MessageChannel){var i=new lb.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},wc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in lb&&"onreadystatechange"in lb.document.createElement("script")?wc=function(a){var b=lb.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},lb.document.documentElement.appendChild(b)}:(wc=function(a){return Cc(a,0)},Ac=Dc)}();var Ec=uc.timeout=function(){function a(a,b){var c=this,d=new qc,e=wc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new lc(d,oc(function(){Ac(e)}))}function b(a,b,c){var d=this,e=uc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new qc,g=Cc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new lc(f,oc(function(){Dc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new uc(ub,a,b,c)}(),Fc=function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return ec(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return pc}}},e.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new qc;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(uc),Gc=qb.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return sb(a)||(a=yc),new Gd(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Hc=Gc.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Gc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Ic=Gc.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Gc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Jc=Gc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Gc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Kc=qb.internals.Enumerator=function(a){this._next=a};Kc.prototype.next=function(){return this._next()},Kc.prototype[Eb]=function(){return this};var Lc=qb.internals.Enumerable=function(a){this._iterator=a};Lc.prototype[Eb]=function(){return this._iterator()},Lc.prototype.concat=function(){var a=this;return new Gd(function(b){var c;try{c=a[Eb]()}catch(d){return void b.onError()}var e,f=new rc,g=yc.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;yb(h)&&(h=Xc(h));var i=new qc;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new lc(f,g,oc(function(){e=!0}))})},Lc.prototype.catchError=function(){var a=this;return new Gd(function(b){var c;try{c=a[Eb]()}catch(d){return void b.onError()}var e,f,g=new rc,h=yc.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;yb(i)&&(i=Xc(i));var j=new qc;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new lc(g,h,oc(function(){e=!0}))})};var Mc=Lc.repeat=function(a,b){return null==b&&(b=-1),new Lc(function(){var c=b;return new Kc(function(){return 0===c?Fb:(c>0&&c--,{done:!1,value:a})})})},Nc=Lc.of=function(a,b,c){return b||(b=tb),new Lc(function(){var d=-1;return new Kc(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Rc),Vc=function(a){function b(){a.apply(this,arguments)}return ec(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(Uc),Wc=qb.Observable=function(){function a(a){this._subscribe=a}return Qc=a.prototype,Qc.subscribe=Qc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Pc(a,b,c))},Qc.subscribeOnNext=function(a,b){return this._subscribe(Pc(2===arguments.length?function(c){a.call(b,c)}:a))},Qc.subscribeOnError=function(a,b){return this._subscribe(Pc(null,2===arguments.length?function(c){a.call(b,c)}:a))},Qc.subscribeOnCompleted=function(a,b){return this._subscribe(Pc(null,null,2===arguments.length?function(){a.call(b)}:a))},a}();Qc.observeOn=function(a){var b=this;return new Gd(function(c){return b.subscribe(new Vc(a,c))})},Qc.subscribeOn=function(a){var b=this;return new Gd(function(c){var d=new qc,e=new rc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var Xc=Wc.fromPromise=function(a){return Yc(function(){var b=new qb.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};Qc.toPromise=function(a){if(a||(a=qb.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Qc.toArray=function(){var a=this;return new Gd(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},Wc.create=Wc.createWithDisposable=function(a){return new Gd(a)};var Yc=Wc.defer=function(a){return new Gd(function(b){var c;try{c=a()}catch(d){return dd(d).subscribe(b)}return yb(c)&&(c=Xc(c)),c.subscribe(b)})},Zc=Wc.empty=function(a){return sb(a)||(a=yc),new Gd(function(b){return a.schedule(function(){b.onCompleted()})})},$c=Math.pow(2,53)-1;n.prototype[Eb]=function(){return new o(this._s)},o.prototype[Eb]=function(){return this},o.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};Wc.generate=function(a,b,c,d,e){return sb(e)||(e=zc),new Gd(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})},Wc.of=function(){return w(null,arguments)},Wc.ofWithScheduler=function(a){return w(a,dc.call(arguments,1))};var bd=Wc.never=function(){return new Gd(function(){return pc})};Wc.range=function(a,b,c){return sb(c)||(c=zc),new Gd(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},Wc.repeat=function(a,b,c){return sb(c)||(c=zc),cd(a,c).repeat(null==b?-1:b)};var cd=Wc["return"]=Wc.just=function(a,b){return sb(b)||(b=yc),new Gd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Wc.returnValue=function(){return Jb("returnValue","return or just"),cd.apply(null,arguments)};var dd=Wc["throw"]=Wc.throwException=Wc.throwError=function(a,b){return sb(b)||(b=yc),new Gd(function(c){return b.schedule(function(){c.onError(a)})})};Wc.using=function(a,b){return new Gd(function(c){var d,e,f=pc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new lc(dd(g).subscribe(c),f)}return new lc(e.subscribe(c),f)})},Qc.amb=function(a){var b=this;return new Gd(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new qc,j=new qc;return yb(a)&&(a=Xc(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new lc(i,j)})},Wc.amb=function(){function a(a,b){return a.amb(b)}for(var b=bd(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},Qc["catch"]=Qc.catchError=function(a){return"function"==typeof a?x(this,a):ed([this,a])},Qc.catchException=function(a){return Jb("catchException","catch or catchError"),this.catchError(a)};var ed=Wc.catchError=Wc["catch"]=function(){return Nc(j(arguments,0)).catchError()};Wc.catchException=function(){return Jb("catchException","catch or catchError"),ed.apply(null,arguments)},Qc.combineLatest=function(){var a=dc.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),fd.apply(this,a)};var fd=Wc.combineLatest=function(){var a=dc.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Gd(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(tb))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(tb)&&c.onCompleted()}function e(a){j[a]=!0,j.every(tb)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new qc;yb(f)&&(f=Xc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new lc(m)})};Qc.concat=function(){var a=dc.call(arguments,0);return a.unshift(this),gd.apply(this,a)};var gd=Wc.concat=function(){return Nc(j(arguments,0)).concat()};Qc.concatAll=function(){return this.merge(1)},Qc.concatObservable=function(){return Jb("concatObservable","concatAll"),this.merge(1)},Qc.merge=function(a){if("number"!=typeof a)return hd(this,a);var b=this;return new Gd(function(c){function d(a){var b=new qc;f.add(b),yb(a)&&(a=Xc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new lc,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var hd=Wc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=dc.call(arguments,1)):(a=yc,b=dc.call(arguments,0)):(a=yc,b=dc.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),w(a,b).mergeAll()};Qc.mergeAll=function(){var a=this;return new Gd(function(b){var c=new lc,d=!1,e=new qc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new qc;c.add(e),yb(a)&&(a=Xc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},Qc.mergeObservable=function(){return Jb("mergeObservable","mergeAll"),this.mergeAll.apply(this,arguments)},Qc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return id([this,a])};var id=Wc.onErrorResumeNext=function(){var a=j(arguments,0);return new Gd(function(b){var c=0,d=new rc,e=yc.scheduleRecursive(function(e){var f,g;c0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(tb)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new qc;yb(c)&&(c=Xc(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new lc(j)})},Wc.zip=function(){var a=dc.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},Wc.zipArray=function(){var a=j(arguments,0);return new Gd(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(tb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(tb)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new qc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new lc(h);return j.add(oc(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},Qc.asObservable=function(){return new Gd(this.subscribe.bind(this))},Qc.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},Qc.dematerialize=function(){var a=this;return new Gd(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},Qc.distinctUntilChanged=function(a,b){var c=this;return a||(a=tb),b||(b=vb),new Gd(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},Qc["do"]=Qc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new Gd(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b)try{b(c)}catch(d){a.onError(d)}a.onError(c)},function(){if(c)try{c()}catch(b){a.onError(b)}a.onCompleted()})})},Qc.doAction=function(){return Jb("doAction","do or tap"),this.tap.apply(this,arguments)},Qc.doOnNext=Qc.tapOnNext=function(a,b){return this.tap(2===arguments.length?function(c){a.call(b,c)}:a)},Qc.doOnError=Qc.tapOnError=function(a,b){return this.tap(rb,2===arguments.length?function(c){a.call(b,c)}:a)},Qc.doOnCompleted=Qc.tapOnCompleted=function(a,b){return this.tap(rb,null,2===arguments.length?function(){a.call(b)}:a)},Qc["finally"]=Qc.ensure=function(a){var b=this;return new Gd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return oc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},Qc.finallyAction=function(a){return Jb("finallyAction","finally or ensure"),this.ensure(a)},Qc.ignoreElements=function(){var a=this;return new Gd(function(b){return a.subscribe(rb,b.onError.bind(b),b.onCompleted.bind(b))})},Qc.materialize=function(){var a=this;return new Gd(function(b){return a.subscribe(function(a){b.onNext(Hc(a))},function(a){b.onNext(Ic(a)),b.onCompleted()},function(){b.onNext(Jc()),b.onCompleted()})})},Qc.repeat=function(a){return Mc(this,a).concat()},Qc.retry=function(a){return Mc(this,a).catchError()},Qc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new Gd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},Qc.skipLast=function(a){var b=this;return new Gd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},Qc.startWith=function(){var a,b,c=0;return arguments.length&&sb(arguments[0])?(b=arguments[0],c=1):b=yc,a=dc.call(arguments,c),Nc([ad(a,b),this]).concat()},Qc.takeLast=function(a){var b=this;return new Gd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},Qc.takeLastBuffer=function(a){var b=this;return new Gd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},Qc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(Cb);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(Cb);return new Gd(function(d){function e(){var a=new Jd;i.push(a),d.onNext(gc(a,g))}var f=new qc,g=new sc(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g})},Qc.selectConcat=Qc.concatMap=function(a,b,c){return Ab(a)&&Ab(b)?this.concatMap(function(c,d){var e=a(c,d);return yb(e)&&(e=Xc(e)),(Hb(e)||Gb(e))&&(e=_c(e)),e.map(function(a,e){return b(c,a,d,e)})}):Ab(a)?z(this,a,c):z(this,function(){return a})},Qc.concatMapObserver=Qc.selectConcatObserver=function(a,b,c,d){var e=this;return new Gd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}yb(c)&&(c=Xc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}yb(c)&&(c=Xc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}yb(a)&&(a=Xc(a)),f.onNext(a),f.onCompleted()})}).concatAll()},Qc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Gd(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},B.prototype.push=function(a){var b=-1===A(this.set,a,this.comparer);return b&&this.set.push(a),b},Qc.distinct=function(a,b){var c=this;return b||(b=vb),new Gd(function(d){var e=new B(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},Qc.groupBy=function(a,b,c){return this.groupByUntil(a,b,bd,c)},Qc.groupByUntil=function(a,b,c,d){var e=this;return b||(b=tb),d||(d=vb),new Gd(function(f){function g(a){return function(b){b.onError(a)}}var h=new zd(0,d),i=new lc,j=new sc(i);return i.add(e.subscribe(function(d){var e;try{e=a(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}var l=!1,m=h.tryGetValue(e);if(m||(m=new Jd,h.set(e,m),l=!0),l){var n=new Id(e,m,j),o=new Id(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new qc;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(rb,function(a){h.getValues().forEach(g(a)),f.onError(a)},q))}var r;try{r=b(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}m.onNext(r)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),j})},Qc.select=Qc.map=function(a,b){var c=Ab(a)?a:function(){return a},d=this;return new Gd(function(a){var e=0;return d.subscribe(function(f){var g;try{g=c.call(b,f,e++,d)}catch(h){return void a.onError(h)}a.onNext(g)},a.onError.bind(a),a.onCompleted.bind(a))})},Qc.pluck=function(a){return this.map(function(b){return b[a]})},Qc.selectMany=Qc.flatMap=function(a,b,c){return Ab(a)&&Ab(b)?this.flatMap(function(c,d){var e=a(c,d);return yb(e)&&(e=Xc(e)),(Hb(e)||Gb(e))&&(e=_c(e)),e.map(function(a,e){return b(c,a,d,e)})},c):Ab(a)?C(this,a,c):C(this,function(){return a})},Qc.flatMapObserver=Qc.selectManyObserver=function(a,b,c,d){var e=this;return new Gd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}yb(c)&&(c=Xc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}yb(c)&&(c=Xc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}yb(a)&&(a=Xc(a)),f.onNext(a),f.onCompleted()})}).mergeAll()},Qc.selectSwitch=Qc.flatMapLatest=Qc.switchMap=function(a,b){return this.select(a,b).switchLatest()},Qc.skip=function(a){if(0>a)throw new Error(Cb);var b=this;return new Gd(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},Qc.skipWhile=function(a,b){var c=this;return new Gd(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Qc.take=function(a,b){if(0>a)throw new RangeError(Cb);if(0===a)return Zc(b);var c=this;return new Gd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},Qc.takeWhile=function(a,b){var c=this;return new Gd(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},Qc.where=Qc.filter=function(a,b){var c=this;return new Gd(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},Qc.finalValue=function(){var a=this;return new Gd(function(b){var c,d=!1;return a.subscribe(function(a){d=!0,c=a},b.onError.bind(b),function(){d?(b.onNext(c),b.onCompleted()):b.onError(new Error(Bb))})})},Qc.aggregate=function(){Jb("aggregate","reduce");var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},Qc.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},Qc.some=function(a,b){var c=this;return a?c.filter(a,b).some():new Gd(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},Qc.any=function(){return Jb("any","some"),this.some.apply(this,arguments)},Qc.isEmpty=function(){return this.any().map(zb)},Qc.every=function(a,b){return this.filter(function(b){return!a(b)},b).some().map(zb)},Qc.all=function(){return Jb("all","every"),this.every.apply(this,arguments)},Qc.contains=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new Gd(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),pc):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},e.onError.bind(e),function(){e.onNext(!1),e.onCompleted()})})},Qc.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},Qc.indexOf=function(a,b){var c=this;return new Gd(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),pc):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},d.onError.bind(d),function(){d.onNext(-1),d.onCompleted()})})},Qc.sum=function(a,b){return a&&Ab(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},Qc.minBy=function(a,b){return b||(b=wb),D(this,a,function(a,c){return-1*b(a,c)})},Qc.min=function(a){return this.minBy(tb,a).map(function(a){return E(a)})},Qc.maxBy=function(a,b){return b||(b=wb),D(this,a,b)},Qc.max=function(a){return this.maxBy(tb,a).map(function(a){return E(a)})},Qc.average=function(a,b){return a&&Ab(a)?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().map(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},Qc.sequenceEqual=function(a,b){var c=this;return b||(b=vb),new Gd(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(Hb(a)||Gb(a))&&(a=_c(a)),yb(a)&&(a=Xc(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new lc(i,j)})},Qc.elementAt=function(a){return F(this,a,!1)},Qc.elementAtOrDefault=function(a,b){return F(this,a,!0,b)},Qc.single=function(a,b){return a&&Ab(a)?this.where(a,b).single():G(this,!1)},Qc.singleOrDefault=function(a,b,c){return a&&Ab(a)?this.where(a,c).singleOrDefault(null,b):G(this,!0,b)},Qc.first=function(a,b){return a?this.where(a,b).first():H(this,!1)},Qc.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):H(this,!0,b)},Qc.last=function(a,b){return a?this.where(a,b).last():I(this,!1)},Qc.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):I(this,!0,b)},Qc.find=function(a,b){return J(this,a,b,!1)},Qc.findIndex=function(a,b){return J(this,a,b,!0)},lb.Set&&(Qc.toSet=function(){var a=this;return new Gd(function(b){var c=new lb.Set;return a.subscribe(c.add.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})}),lb.Map&&(Qc.toMap=function(a,b){var c=this;return new Gd(function(d){var e=new lb.Map;return c.subscribe(function(c){var f;try{f=a(c)}catch(g){return void d.onError(g)}var h=c;if(b)try{h=b(c)}catch(g){return void d.onError(g)}e.set(f,h)},d.onError.bind(d),function(){d.onNext(e),d.onCompleted()})})});var jd="function",kd="throw",ld=qb.spawn=function(a){var b=P(a);return function(c){function d(a,b){Ec.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2&&(b=dc.call(arguments,1)),a)try{c=g[kd](a)}catch(h){return d(h)}if(!a)try{c=g.next(b)}catch(h){return d(h)}if(c.done)return d(null,c.value);if(c.value=K(c.value,f),typeof c.value!==jd)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var i=!1;try{c.value.call(f,function(){i||(i=!0,e.apply(f,arguments))})}catch(h){Ec.schedule(function(){i||(i=!0,e.call(f,h))})}}}var f=this,g=a;if(b){var h=dc.call(arguments),i=h.length,j=i&&typeof h[i-1]===jd;c=j?h.pop():R,g=a.apply(this,h)}else c=c||R;e()}};qb.denodify=function(a){return function(){var b,c,d,e=dc.call(arguments);return e.push(function(){b=arguments,d&&!c&&(c=!0,cb.apply(this,b))}),a.apply(this,e),function(a){d=a,b&&!c&&(c=!0,a.apply(this,b))}}},Wc.start=function(a,b,c){return md(a,b,c)()};var md=Wc.toAsync=function(a,b,c){return sb(c)||(c=Ec),function(){var d=arguments,e=new Kd;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};Wc.fromCallback=function(a,b,c){return function(){var d=dc.call(arguments,0);return new Gd(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Wc.fromNodeCallback=function(a,b,c){return function(){var d=dc.call(arguments,0);return new Gd(function(e){function f(a){if(a)return void e.onError(a);var b=dc.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},qb.config.useNativeEvents=!1;var nd=lb.angular&&angular.element?angular.element:lb.jQuery?lb.jQuery:lb.Zepto?lb.Zepto:null,od=!!lb.Ember&&"function"==typeof lb.Ember.addListener,pd=!!lb.Backbone&&!!lb.Backbone.Marionette;Wc.fromEvent=function(a,b,c){if(a.addListener)return qd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!qb.config.useNativeEvents){if(pd)return qd(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(od)return qd(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c);if(nd){var d=nd(a);return qd(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}}return new Gd(function(d){return U(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var qd=Wc.fromEventPattern=function(a,b,c){return new Gd(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return oc(function(){b&&b(e,f)})}).publish().refCount()};Wc.startAsync=function(a){var b;try{b=a()}catch(c){return dd(c)}return Xc(b)};var rd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=pc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=pc)});return new lc(c,d,e)}function c(c,d){this.source=c,this.controller=new Jd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return ec(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Wc);Qc.pausable=function(a){return new rd(this,a)};var sd=function(b){function c(b){var c,d=[],e=V(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new Jd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c)}return ec(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Wc);Qc.pausableBuffered=function(a){return new sd(this,a)},Qc.controlled=function(a){return null==a&&(a=!0),new td(this,a)};var td=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new ud(d),this.source=c.multicast(this.subject).refCount()}return ec(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Wc),ud=qb.ControlledSubject=function(a){function c(a){return this.subject.subscribe(a)}function d(b){null==b&&(b=!0),a.call(this,c),this.subject=new Jd,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=pc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=pc}return ec(d,a),fc(d.prototype,Oc,{onCompleted:function(){b.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){b.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){b.call(this);var c=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),c=!0),c&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=pc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=pc),{numberOfItems:a,returnValue:!1}},request:function(a){b.call(this),this.disposeCurrentRequest();var c=this,d=this._processRequest(a);return a=d.numberOfItems,d.returnValue?pc:(this.requestedCount=a,this.requestedDisposable=oc(function(){c.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=pc},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),d}(Wc);Qc.multicast=function(a,b){var c=this;return"function"==typeof a?new Gd(function(d){var e=c.multicast(a());return new lc(b(e).subscribe(d),e.connect())}):new yd(c,a)},Qc.publish=function(a){return a&&Ab(a)?this.multicast(function(){return new Jd},a):this.multicast(new Jd)},Qc.share=function(){return this.publish().refCount()},Qc.publishLast=function(a){return a&&Ab(a)?this.multicast(function(){return new Kd},a):this.multicast(new Kd)},Qc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new wd(b)},a):this.multicast(new wd(a))},Qc.shareValue=function(a){return this.publishValue(a).refCount()},Qc.replay=function(a,b,c,d){return a&&Ab(a)?this.multicast(function(){return new xd(b,c,d)},a):this.multicast(new xd(b,c,d))},Qc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var vd=function(a,b){this.subject=a,this.observer=b};vd.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var wd=qb.BehaviorSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new vd(this,a);var c=this.exception;return c?a.onError(c):a.onCompleted(),pc}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return ec(d,a),fc(d.prototype,Oc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=this.observers.slice(0),d=c.length;d>a;a++)c[a].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.exception=a; -for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped){this.value=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Wc),xd=qb.ReplaySubject=function(a){function c(a,b){return oc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var d=new Uc(this.scheduler,a),e=c(this,d);b.call(this),this._trim(this.scheduler.now()),this.observers.push(d);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)d.onNext(this.q[g].value);return this.hasError?(f++,d.onError(this.error)):this.isStopped&&(f++,d.onCompleted()),d.ensureActive(f),e}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||zc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return ec(e,a),fc(e.prototype,Oc,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++){var f=c[d];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Wc),yd=qb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new lc(f.subscribe(c),oc(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return ec(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Gd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Wc),zd=function(){function b(a){if(a&!1)return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function c(a){var c,d,e;for(c=0;c=a)return d;for(e=1|a;ec;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||vb,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return d(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return d(b.toString());if("function"==typeof b.valueOf){var c=b.valueOf();if("number"==typeof c)return e(c);if("string"==typeof b)return d(c)}if(b.getHashCode)return b.getHashCode();var f=17*a++;return b.getHashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var b,d=c(a);for(this.buckets=new Array(d),this.entries=new Array(d),b=0;d>b;b++)this.buckets[b]=-1,this.entries[b]=f();this.freeList=-1},l.add=function(a,b){return this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=c(2*this.size),b=new Array(a);for(e=0;ee;++e)d[e]=f();for(var g=0;g=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(b){var c=this._findEntry(b);return c>=0?this.entries[c].value:a},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();Qc.join=function(a,b,c,d){var e=this;return new Gd(function(f){var g=new lc,h=!1,i=!1,j=0,k=0,l=new zd,m=new zd;return g.add(e.subscribe(function(a){var c=j++,e=new qc;l.add(c,a),g.add(e);var i,k=function(){l.remove(c)&&0===l.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(n){return void f.onError(n)}e.setDisposable(i.take(1).subscribe(rb,f.onError.bind(f),k)),m.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(i||0===l.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=k++,e=new qc;m.add(b,a),g.add(e);var h,j=function(){m.remove(b)&&0===m.count()&&i&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(n){return void f.onError(n)}e.setDisposable(h.take(1).subscribe(rb,f.onError.bind(f),j)),l.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){i=!0,(h||0===m.count())&&f.onCompleted()})),g})},Qc.groupJoin=function(a,b,c,d){var e=this;return new Gd(function(f){function g(a){return function(b){b.onError(a)}}var h=new lc,i=new sc(h),j=new zd,k=new zd,l=0,m=0;return h.add(e.subscribe(function(a){var c=new Jd,e=l++;j.add(e,c);var m;try{m=d(a,gc(c,i))}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}f.onNext(m),k.getValues().forEach(function(a){c.onNext(a)});var o=new qc;h.add(o);var p,q=function(){j.remove(e)&&c.onCompleted(),h.remove(o)};try{p=b(a)}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}o.setDisposable(p.take(1).subscribe(rb,function(a){j.getValues().forEach(g(a)),f.onError(a)},q))},function(a){j.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=m++;k.add(b,a);var d=new qc;h.add(d);var e,i=function(){k.remove(b),h.remove(d)};try{e=c(a)}catch(l){return j.getValues().forEach(g(l)),void f.onError(l)}d.setDisposable(e.take(1).subscribe(rb,function(a){j.getValues().forEach(g(a)),f.onError(a)},i)),j.getValues().forEach(function(b){b.onNext(a)})},function(a){j.getValues().forEach(g(a)),f.onError(a)})),i})},Qc.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},Qc.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?X.call(this,a):"function"==typeof a?Y.call(this,a):W.call(this,a,b)},Qc.pairwise=function(){var a=this;return new Gd(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))})},Qc.partition=function(a,b){var c=this.publish().refCount();return[c.filter(a,b),c.filter(function(c,d,e){return!a.call(b,c,d,e)})]},Qc.letBind=Qc.let=function(a){return a(this)},Wc["if"]=Wc.ifThen=function(a,b,c){return Yc(function(){return c||(c=Zc()),yb(b)&&(b=Xc(b)),yb(c)&&(c=Xc(c)),"function"==typeof c.now&&(c=Zc(c)),a()?b:c})},Wc["for"]=Wc.forIn=function(a,b,c){return Nc(a,b,c).concat()};var Ad=Wc["while"]=Wc.whileDo=function(a,b){return yb(b)&&(b=Xc(b)),Z(a,b).concat()};Qc.doWhile=function(a){return gd([this,Ad(a,this)])},Wc["case"]=Wc.switchCase=function(a,b,c){return Yc(function(){yb(c)&&(c=Xc(c)),c||(c=Zc()),"function"==typeof c.now&&(c=Zc(c));var d=b[a()];return yb(d)&&(d=Xc(d)),d||c})},Qc.expand=function(a,b){sb(b)||(b=yc);var c=this;return new Gd(function(d){var e=[],f=new rc,g=new lc(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new qc;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g})},Wc.forkJoin=function(){var a=j(arguments,0);return new Gd(function(b){var c=a.length;if(0===c)return b.onCompleted(),pc;for(var d=new lc,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];yb(j)&&(j=Xc(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},Qc.forkJoin=function(a,b){var c=this;return new Gd(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new qc,l=new qc;return yb(a)&&(a=Xc(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new lc(k,l)})},Qc.manySelect=function(a,b){sb(b)||(b=yc);var c=this;return Yc(function(){var d;return c.map(function(a){var b=new Bd(a);return d&&d.onNext(a),d=b,b}).tap(rb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)})};var Bd=function(a){function b(a){var b=this,c=new lc;return c.add(zc.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeAll().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new Kd}return ec(c,a),fc(c.prototype,Oc,{onCompleted:function(){this.onNext(Wc.empty())},onError:function(a){this.onNext(Wc.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(Wc),Cd=lb.Map||function(){function b(){this._keys=[],this._values=[]}return b.prototype.get=function(b){var c=this._keys.indexOf(b);return-1!==c?this._values[c]:a},b.prototype.set=function(a,b){var c=this._keys.indexOf(a);-1!==c&&(this._values[c]=b),this._values[this._keys.push(a)-1]=b},b.prototype.forEach=function(a,b){for(var c=0,d=this._keys.length;d>c;c++)a.call(b,this._values[c],this._keys[c])},b}();$.prototype.and=function(a){return new $(this.patterns.concat(a))},$.prototype.thenDo=function(a){return new _(this,a)},_.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(ab(a,this.expression.patterns[f],b.onError.bind(b)));var h=new bb(e,function(){var a;try{a=d.selector.apply(d,arguments)}catch(c){return void b.onError(c)}b.onNext(a)},function(){for(var a=0,b=e.length;b>a;a++)e[a].removeActivePlan(h);c(h)});for(f=0,g=e.length;g>f;f++)e[f].addActivePlan(h);return h},bb.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},bb.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;ac;c++)b[c].match()}},c.error=rb,c.completed=rb,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(Rc);Qc.and=function(a){return new $([this,a])},Qc.thenDo=function(a){return new $([this]).thenDo(a)},Wc.when=function(){var a=j(arguments,0);return new Gd(function(b){var c=[],d=new Cd,e=Pc(b.onNext.bind(b),function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},b.onCompleted.bind(b));try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){dd(h).subscribe(b)}var i=new lc;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var Ed=Wc.interval=function(a,b){return gb(a,a,sb(b)?b:Ec)},Fd=Wc.timer=function(b,c,d){var e;return sb(d)||(d=Ec),c!==a&&"number"==typeof c?e=c:sb(c)&&(d=c),b instanceof Date&&e===a?db(b.getTime(),d):b instanceof Date&&e!==a?(e=c,eb(b.getTime(),e,d)):e===a?fb(b,d):gb(b,e,d)};Qc.delay=function(a,b){return sb(b)||(b=Ec),a instanceof Date?ib(this,a.getTime(),b):hb(this,a,b)},Qc.debounce=Qc.throttleWithTimeout=function(a,b){sb(b)||(b=Ec);var c=this;return new Gd(function(d){var e,f=new rc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new qc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new lc(i,f)})},Qc.throttle=function(a,b){return Jb("throttle","debounce or throttleWithTimeout"),this.debounce(a,b)},Qc.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),sb(c)||(c=Ec),"number"==typeof b?d=b:sb(b)&&(d=a,c=b),new Gd(function(b){function f(){var a=new qc,e=!1,g=!1;l.setDisposable(a),j===i?(e=!0,g=!0):i>j?e=!0:g=!0;var n=e?j:i,o=n-m;m=n,e&&(j+=d),g&&(i+=d),a.setDisposable(c.scheduleWithRelative(o,function(){if(g){var a=new Jd;k.push(a),b.onNext(gc(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new rc,m=0;return g=new lc(l),h=new sc(g),k.push(new Jd),b.onNext(gc(k[0],h)),f(),g.add(e.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h})},Qc.windowWithTimeOrCount=function(a,b,c){var d=this;return sb(c)||(c=Ec),new Gd(function(e){function f(b){var d=new qc;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new Jd,e.onNext(gc(l,i)),f(a)}}))}var g=new rc,h=new lc(g),i=new sc(h),j=0,k=0,l=new Jd;return e.onNext(gc(l,i)),f(0),h.add(d.subscribe(function(a){var c=0,d=!1;l.onNext(a),++j===b&&(d=!0,j=0,c=++k,l.onCompleted(),l=new Jd,e.onNext(gc(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i})},Qc.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},Qc.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},Qc.timeInterval=function(a){var b=this;return sb(a)||(a=Ec),Yc(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},Qc.timestamp=function(a){return sb(a)||(a=Ec),this.map(function(b){return{value:b,timestamp:a.now()}})},Qc.sample=Qc.throttleLatest=function(a,b){return sb(b)||(b=Ec),"number"==typeof a?jb(this,Ed(a,b)):jb(this,a)},Qc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=dd(new Error(b||"Timeout"))),sb(c)||(c=Ec);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Gd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(yb(b)&&(b=Xc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new qc,j=new rc,k=!1,l=new rc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new lc(j,l)})},Wc.generateWithAbsoluteTime=function(a,b,c,d,e,f){return sb(f)||(f=Ec),new Gd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithAbsolute(f.now(),function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Wc.generateWithRelativeTime=function(a,b,c,d,e,f){return sb(f)||(f=Ec),new Gd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithRelative(0,function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Qc.delaySubscription=function(a,b){return this.delayWithSelector(Fd(a,sb(b)?b:Ec),Zc)},Qc.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new Gd(function(a){var b=new lc,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new rc,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new qc;b.add(h),h.setDisposable(e.subscribe(function(){a.onNext(c),b.remove(h),g()},a.onError.bind(a),function(){a.onNext(c),b.remove(h),g()}))},a.onError.bind(a),function(){f=!0,h.dispose(),g()}))};return c?h.setDisposable(c.subscribe(function(){i()},a.onError.bind(a),function(){i()})):i(),new lc(h,b)})},Qc.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=bd()),c||(c=dd(new Error("Timeout")));var d=this;return new Gd(function(e){function f(a){function b(){return k===d}var d=k,f=new qc;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new rc,i=new rc,j=new qc;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(yb(c)?Xc(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new lc(h,i)})},Qc.debounceWithSelector=function(a){var b=this;return new Gd(function(c){var d,e=!1,f=new rc,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}yb(h)&&(h=Xc(h)),e=!0,d=b,g++;var j=g,k=new qc;f.setDisposable(k),k.setDisposable(h.subscribe(function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()},c.onError.bind(c),function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new lc(h,f)})},Qc.throttleWithSelector=function(){return Jb("throttleWithSelector","debounceWithSelector"),this.debounceWithSelector.apply(this,arguments)},Qc.skipLastWithTime=function(a,b){sb(b)||(b=Ec);var c=this;return new Gd(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},d.onError.bind(d),function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})})},Qc.takeLastWithTime=function(a,b){var c=this;return sb(b)||(b=Ec),new Gd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})})},Qc.takeLastBufferWithTime=function(a,b){var c=this;return sb(b)||(b=Ec),new Gd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})})},Qc.takeWithTime=function(a,b){var c=this;return sb(b)||(b=Ec),new Gd(function(d){return new lc(b.scheduleWithRelative(a,d.onCompleted.bind(d)),c.subscribe(d))})},Qc.skipWithTime=function(a,b){var c=this;return sb(b)||(b=Ec),new Gd(function(d){var e=!1;return new lc(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))})},Qc.skipUntilWithTime=function(a,b){sb(b)||(b=Ec);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Gd(function(e){var f=!1;return new lc(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},e.onError.bind(e),e.onCompleted.bind(e)))})},Qc.takeUntilWithTime=function(a,b){sb(b)||(b=Ec);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Gd(function(e){return new lc(b[d](a,e.onCompleted.bind(e)),c.subscribe(e))})},Qc.throttleFirst=function(a,b){sb(b)||(b=Ec);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Gd(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},a.onError.bind(a),a.onCompleted.bind(a))})},Qc.exclusive=function(){var a=this;return new Gd(function(b){var c=!1,d=!1,e=new qc,f=new lc;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,yb(a)&&(a=Xc(a));var e=new qc;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f})},Qc.exclusiveMap=function(a,b){var c=this;return new Gd(function(d){var e=0,f=!1,g=!0,h=new qc,i=new lc;return i.add(h),h.setDisposable(c.subscribe(function(c){f||(f=!0,innerSubscription=new qc,i.add(innerSubscription),yb(c)&&(c=Xc(c)),innerSubscription.setDisposable(c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),function(){i.remove(innerSubscription),f=!1,g&&1===i.length&&d.onCompleted()})))},d.onError.bind(d),function(){g=!0,1!==i.length||f||d.onCompleted()})),i})},Qc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new Gd(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})})},qb.VirtualTimeScheduler=function(a){function b(){throw new Error("Not implemented")}function c(){return this.toDateTimeOffset(this.clock)}function d(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function e(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function f(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function g(a,b){return b(),pc}function h(b,g){this.clock=b,this.comparer=g,this.isEnabled=!1,this.queue=new jc(1024),a.call(this,c,d,e,f)}ec(h,a);var i=h.prototype;return i.add=b,i.toDateTimeOffset=b,i.toRelative=b,i.schedulePeriodicWithState=function(a,b,c){var d=new xc(this,a,b,c);return d.start()},i.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},i.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,g)},i.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},i.stop=function(){this.isEnabled=!1},i.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Error(Cb);if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},i.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Error(Cb);0!==c&&this.advanceTo(b)},i.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Error(Cb);this.clock=b},i.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},i.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,g)},i.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new tc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},h}(uc),qb.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||wb;a.call(this,d,e)}ec(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(qb.VirtualTimeScheduler);var Gd=qb.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?oc(a):pc}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new Hd(a);return zc.scheduleRequired()?zc.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return ec(c,a),c}(Wc),Hd=function(a){function b(b){a.call(this),this.observer=b,this.m=new qc}ec(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Rc),Id=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new Gd(function(a){return new lc(e.getDisposable(),d.subscribe(a))}):d}return ec(c,a),c}(Wc),Jd=qb.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),pc):(a.onCompleted(),pc):(this.observers.push(a),new vd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return ec(d,a),fc(d.prototype,Oc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Ld(a,b)},d}(Wc),Kd=qb.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new vd(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),pc}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return ec(d,a),fc(d.prototype,Oc,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Wc),Ld=qb.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return ec(b,a),fc(b.prototype,Oc,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(Wc);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(lb.Rx=qb,define(function(){return qb})):mb&&nb?ob?(nb.exports=qb).Rx=qb:mb.Rx=qb:lb.Rx=qb}).call(this); +this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Rc),Vc=function(a){function b(){a.apply(this,arguments)}return ec(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(Uc),Wc=qb.Observable=function(){function a(a){this._subscribe=a}return Qc=a.prototype,Qc.subscribe=Qc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Pc(a,b,c))},Qc.subscribeOnNext=function(a,b){return this._subscribe(Pc(2===arguments.length?function(c){a.call(b,c)}:a))},Qc.subscribeOnError=function(a,b){return this._subscribe(Pc(null,2===arguments.length?function(c){a.call(b,c)}:a))},Qc.subscribeOnCompleted=function(a,b){return this._subscribe(Pc(null,null,2===arguments.length?function(){a.call(b)}:a))},a}();Qc.observeOn=function(a){var b=this;return new Gd(function(c){return b.subscribe(new Vc(a,c))})},Qc.subscribeOn=function(a){var b=this;return new Gd(function(c){var d=new qc,e=new rc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var Xc=Wc.fromPromise=function(a){return Yc(function(){var b=new qb.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};Qc.toPromise=function(a){if(a||(a=qb.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Qc.toArray=function(){var a=this;return new Gd(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},Wc.create=Wc.createWithDisposable=function(a){return new Gd(a)};var Yc=Wc.defer=function(a){return new Gd(function(b){var c;try{c=a()}catch(d){return dd(d).subscribe(b)}return yb(c)&&(c=Xc(c)),c.subscribe(b)})},Zc=Wc.empty=function(a){return sb(a)||(a=yc),new Gd(function(b){return a.schedule(function(){b.onCompleted()})})},$c=Math.pow(2,53)-1;n.prototype[Eb]=function(){return new o(this._s)},o.prototype[Eb]=function(){return this},o.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};Wc.generate=function(a,b,c,d,e){return sb(e)||(e=zc),new Gd(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})},Wc.of=function(){return w(null,arguments)},Wc.ofWithScheduler=function(a){return w(a,dc.call(arguments,1))};var bd=Wc.never=function(){return new Gd(function(){return pc})};Wc.range=function(a,b,c){return sb(c)||(c=zc),new Gd(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},Wc.repeat=function(a,b,c){return sb(c)||(c=zc),cd(a,c).repeat(null==b?-1:b)};var cd=Wc["return"]=Wc.just=function(a,b){return sb(b)||(b=yc),new Gd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Wc.returnValue=function(){return Jb("returnValue","return or just"),cd.apply(null,arguments)};var dd=Wc["throw"]=Wc.throwException=Wc.throwError=function(a,b){return sb(b)||(b=yc),new Gd(function(c){return b.schedule(function(){c.onError(a)})})};Wc.using=function(a,b){return new Gd(function(c){var d,e,f=pc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new lc(dd(g).subscribe(c),f)}return new lc(e.subscribe(c),f)})},Qc.amb=function(a){var b=this;return new Gd(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new qc,j=new qc;return yb(a)&&(a=Xc(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new lc(i,j)})},Wc.amb=function(){function a(a,b){return a.amb(b)}for(var b=bd(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},Qc["catch"]=Qc.catchError=function(a){return"function"==typeof a?x(this,a):ed([this,a])},Qc.catchException=function(a){return Jb("catchException","catch or catchError"),this.catchError(a)};var ed=Wc.catchError=Wc["catch"]=function(){return Nc(j(arguments,0)).catchError()};Wc.catchException=function(){return Jb("catchException","catch or catchError"),ed.apply(null,arguments)},Qc.combineLatest=function(){var a=dc.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),fd.apply(this,a)};var fd=Wc.combineLatest=function(){var a=dc.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Gd(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(tb))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(tb)&&c.onCompleted()}function e(a){j[a]=!0,j.every(tb)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new qc;yb(f)&&(f=Xc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new lc(m)})};Qc.concat=function(){var a=dc.call(arguments,0);return a.unshift(this),gd.apply(this,a)};var gd=Wc.concat=function(){return Nc(j(arguments,0)).concat()};Qc.concatAll=function(){return this.merge(1)},Qc.concatObservable=function(){return Jb("concatObservable","concatAll"),this.merge(1)},Qc.merge=function(a){if("number"!=typeof a)return hd(this,a);var b=this;return new Gd(function(c){function d(a){var b=new qc;f.add(b),yb(a)&&(a=Xc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new lc,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var hd=Wc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=dc.call(arguments,1)):(a=yc,b=dc.call(arguments,0)):(a=yc,b=dc.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),w(a,b).mergeAll()};Qc.mergeAll=function(){var a=this;return new Gd(function(b){var c=new lc,d=!1,e=new qc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new qc;c.add(e),yb(a)&&(a=Xc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},Qc.mergeObservable=function(){return Jb("mergeObservable","mergeAll"),this.mergeAll.apply(this,arguments)},Qc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return id([this,a])};var id=Wc.onErrorResumeNext=function(){var a=j(arguments,0);return new Gd(function(b){var c=0,d=new rc,e=yc.scheduleRecursive(function(e){var f,g;c0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(tb)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new qc;yb(c)&&(c=Xc(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new lc(j)})},Wc.zip=function(){var a=dc.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},Wc.zipArray=function(){var a=j(arguments,0);return new Gd(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(tb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(tb)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new qc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new lc(h);return j.add(oc(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},Qc.asObservable=function(){return new Gd(this.subscribe.bind(this))},Qc.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},Qc.dematerialize=function(){var a=this;return new Gd(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},Qc.distinctUntilChanged=function(a,b){var c=this;return a||(a=tb),b||(b=vb),new Gd(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},Qc["do"]=Qc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new Gd(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b)try{b(c)}catch(d){a.onError(d)}a.onError(c)},function(){if(c)try{c()}catch(b){a.onError(b)}a.onCompleted()})})},Qc.doAction=function(){return Jb("doAction","do or tap"),this.tap.apply(this,arguments)},Qc.doOnNext=Qc.tapOnNext=function(a,b){return this.tap(2===arguments.length?function(c){a.call(b,c)}:a)},Qc.doOnError=Qc.tapOnError=function(a,b){return this.tap(rb,2===arguments.length?function(c){a.call(b,c)}:a)},Qc.doOnCompleted=Qc.tapOnCompleted=function(a,b){return this.tap(rb,null,2===arguments.length?function(){a.call(b)}:a)},Qc["finally"]=Qc.ensure=function(a){var b=this;return new Gd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return oc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},Qc.finallyAction=function(a){return Jb("finallyAction","finally or ensure"),this.ensure(a)},Qc.ignoreElements=function(){var a=this;return new Gd(function(b){return a.subscribe(rb,b.onError.bind(b),b.onCompleted.bind(b))})},Qc.materialize=function(){var a=this;return new Gd(function(b){return a.subscribe(function(a){b.onNext(Hc(a))},function(a){b.onNext(Ic(a)),b.onCompleted()},function(){b.onNext(Jc()),b.onCompleted()})})},Qc.repeat=function(a){return Mc(this,a).concat()},Qc.retry=function(a){return Mc(this,a).catchError()},Qc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new Gd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},Qc.skipLast=function(a){var b=this;return new Gd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},Qc.startWith=function(){var a,b,c=0;return arguments.length&&sb(arguments[0])?(b=arguments[0],c=1):b=yc,a=dc.call(arguments,c),Nc([ad(a,b),this]).concat()},Qc.takeLast=function(a){var b=this;return new Gd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},Qc.takeLastBuffer=function(a){var b=this;return new Gd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},Qc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(Cb);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(Cb);return new Gd(function(d){function e(){var a=new Jd;i.push(a),d.onNext(gc(a,g))}var f=new qc,g=new sc(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g})},Qc.selectConcat=Qc.concatMap=function(a,b,c){return Ab(a)&&Ab(b)?this.concatMap(function(c,d){var e=a(c,d);return yb(e)&&(e=Xc(e)),(Hb(e)||Gb(e))&&(e=_c(e)),e.map(function(a,e){return b(c,a,d,e)})}):Ab(a)?z(this,a,c):z(this,function(){return a})},Qc.concatMapObserver=Qc.selectConcatObserver=function(a,b,c,d){var e=this;return new Gd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}yb(c)&&(c=Xc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}yb(c)&&(c=Xc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}yb(a)&&(a=Xc(a)),f.onNext(a),f.onCompleted()})}).concatAll()},Qc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Gd(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},B.prototype.push=function(a){var b=-1===A(this.set,a,this.comparer);return b&&this.set.push(a),b},Qc.distinct=function(a,b){var c=this;return b||(b=vb),new Gd(function(d){var e=new B(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},Qc.groupBy=function(a,b,c){return this.groupByUntil(a,b,bd,c)},Qc.groupByUntil=function(a,b,c,d){var e=this;return b||(b=tb),d||(d=vb),new Gd(function(f){function g(a){return function(b){b.onError(a)}}var h=new zd(0,d),i=new lc,j=new sc(i);return i.add(e.subscribe(function(d){var e;try{e=a(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}var l=!1,m=h.tryGetValue(e);if(m||(m=new Jd,h.set(e,m),l=!0),l){var n=new Id(e,m,j),o=new Id(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new qc;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(rb,function(a){h.getValues().forEach(g(a)),f.onError(a)},q))}var r;try{r=b(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}m.onNext(r)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),j})},Qc.select=Qc.map=function(a,b){var c=Ab(a)?a:function(){return a},d=this;return new Gd(function(a){var e=0;return d.subscribe(function(f){var g;try{g=c.call(b,f,e++,d)}catch(h){return void a.onError(h)}a.onNext(g)},a.onError.bind(a),a.onCompleted.bind(a))})},Qc.pluck=function(a){return this.map(function(b){return b[a]})},Qc.selectMany=Qc.flatMap=function(a,b,c){return Ab(a)&&Ab(b)?this.flatMap(function(c,d){var e=a(c,d);return yb(e)&&(e=Xc(e)),(Hb(e)||Gb(e))&&(e=_c(e)),e.map(function(a,e){return b(c,a,d,e)})},c):Ab(a)?C(this,a,c):C(this,function(){return a})},Qc.flatMapObserver=Qc.selectManyObserver=function(a,b,c,d){var e=this;return new Gd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}yb(c)&&(c=Xc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}yb(c)&&(c=Xc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}yb(a)&&(a=Xc(a)),f.onNext(a),f.onCompleted()})}).mergeAll()},Qc.selectSwitch=Qc.flatMapLatest=Qc.switchMap=function(a,b){return this.select(a,b).switchLatest()},Qc.skip=function(a){if(0>a)throw new Error(Cb);var b=this;return new Gd(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},Qc.skipWhile=function(a,b){var c=this;return new Gd(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Qc.take=function(a,b){if(0>a)throw new RangeError(Cb);if(0===a)return Zc(b);var c=this;return new Gd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},Qc.takeWhile=function(a,b){var c=this;return new Gd(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},Qc.where=Qc.filter=function(a,b){var c=this;return new Gd(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},Qc.finalValue=function(){var a=this;return new Gd(function(b){var c,d=!1;return a.subscribe(function(a){d=!0,c=a},b.onError.bind(b),function(){d?(b.onNext(c),b.onCompleted()):b.onError(new Error(Bb))})})},Qc.aggregate=function(){Jb("aggregate","reduce");var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},Qc.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},Qc.some=function(a,b){var c=this;return a?c.filter(a,b).some():new Gd(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},Qc.any=function(){return Jb("any","some"),this.some.apply(this,arguments)},Qc.isEmpty=function(){return this.any().map(zb)},Qc.every=function(a,b){return this.filter(function(b){return!a(b)},b).some().map(zb)},Qc.all=function(){return Jb("all","every"),this.every.apply(this,arguments)},Qc.contains=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new Gd(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),pc):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},e.onError.bind(e),function(){e.onNext(!1),e.onCompleted()})})},Qc.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},Qc.indexOf=function(a,b){var c=this;return new Gd(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),pc):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},d.onError.bind(d),function(){d.onNext(-1),d.onCompleted()})})},Qc.sum=function(a,b){return a&&Ab(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},Qc.minBy=function(a,b){return b||(b=wb),D(this,a,function(a,c){return-1*b(a,c)})},Qc.min=function(a){return this.minBy(tb,a).map(function(a){return E(a)})},Qc.maxBy=function(a,b){return b||(b=wb),D(this,a,b)},Qc.max=function(a){return this.maxBy(tb,a).map(function(a){return E(a)})},Qc.average=function(a,b){return a&&Ab(a)?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().map(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},Qc.sequenceEqual=function(a,b){var c=this;return b||(b=vb),new Gd(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(Hb(a)||Gb(a))&&(a=_c(a)),yb(a)&&(a=Xc(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new lc(i,j)})},Qc.elementAt=function(a){return F(this,a,!1)},Qc.elementAtOrDefault=function(a,b){return F(this,a,!0,b)},Qc.single=function(a,b){return a&&Ab(a)?this.where(a,b).single():G(this,!1)},Qc.singleOrDefault=function(a,b,c){return a&&Ab(a)?this.where(a,c).singleOrDefault(null,b):G(this,!0,b)},Qc.first=function(a,b){return a?this.where(a,b).first():H(this,!1)},Qc.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):H(this,!0,b)},Qc.last=function(a,b){return a?this.where(a,b).last():I(this,!1)},Qc.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):I(this,!0,b)},Qc.find=function(a,b){return J(this,a,b,!1)},Qc.findIndex=function(a,b){return J(this,a,b,!0)},lb.Set&&(Qc.toSet=function(){var a=this;return new Gd(function(b){var c=new lb.Set;return a.subscribe(c.add.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})}),lb.Map&&(Qc.toMap=function(a,b){var c=this;return new Gd(function(d){var e=new lb.Map;return c.subscribe(function(c){var f;try{f=a(c)}catch(g){return void d.onError(g)}var h=c;if(b)try{h=b(c)}catch(g){return void d.onError(g)}e.set(f,h)},d.onError.bind(d),function(){d.onNext(e),d.onCompleted()})})});var jd="function",kd="throw",ld=qb.spawn=function(a){var b=P(a);return function(c){function d(a,b){Ec.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2&&(b=dc.call(arguments,1)),a)try{c=g[kd](a)}catch(h){return d(h)}if(!a)try{c=g.next(b)}catch(h){return d(h)}if(c.done)return d(null,c.value);if(c.value=K(c.value,f),typeof c.value!==jd)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var i=!1;try{c.value.call(f,function(){i||(i=!0,e.apply(f,arguments))})}catch(h){Ec.schedule(function(){i||(i=!0,e.call(f,h))})}}}var f=this,g=a;if(b){var h=dc.call(arguments),i=h.length,j=i&&typeof h[i-1]===jd;c=j?h.pop():R,g=a.apply(this,h)}else c=c||R;e()}};qb.denodify=function(a){return function(){var b,c,d,e=dc.call(arguments);return e.push(function(){b=arguments,d&&!c&&(c=!0,cb.apply(this,b))}),a.apply(this,e),function(a){d=a,b&&!c&&(c=!0,a.apply(this,b))}}},Wc.start=function(a,b,c){return md(a,b,c)()};var md=Wc.toAsync=function(a,b,c){return sb(c)||(c=Ec),function(){var d=arguments,e=new Kd;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};Wc.fromCallback=function(a,b,c){return function(){var d=dc.call(arguments,0);return new Gd(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Wc.fromNodeCallback=function(a,b,c){return function(){var d=dc.call(arguments,0);return new Gd(function(e){function f(a){if(a)return void e.onError(a);var b=dc.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},qb.config.useNativeEvents=!1;var nd=lb.angular&&angular.element?angular.element:lb.jQuery?lb.jQuery:lb.Zepto?lb.Zepto:null,od=!!lb.Ember&&"function"==typeof lb.Ember.addListener,pd=!!lb.Backbone&&!!lb.Backbone.Marionette;Wc.fromEvent=function(a,b,c){if(a.addListener)return qd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!qb.config.useNativeEvents){if(pd)return qd(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(od)return qd(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c);if(nd){var d=nd(a);return qd(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}}return new Gd(function(d){return U(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var qd=Wc.fromEventPattern=function(a,b,c){return new Gd(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return oc(function(){b&&b(e,f)})}).publish().refCount()};Wc.startAsync=function(a){var b;try{b=a()}catch(c){return dd(c)}return Xc(b)};var rd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=pc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=pc)});return new lc(c,d,e)}function c(c,d){this.source=c,this.controller=new Jd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return ec(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Wc);Qc.pausable=function(a){return new rd(this,a)};var sd=function(b){function c(b){var c,d=[],e=V(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new Jd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c)}return ec(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Wc);Qc.pausableBuffered=function(a){return new sd(this,a)},Qc.controlled=function(a){return null==a&&(a=!0),new td(this,a)};var td=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new ud(d),this.source=c.multicast(this.subject).refCount()}return ec(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Wc),ud=qb.ControlledSubject=function(a){function c(a){return this.subject.subscribe(a)}function d(b){null==b&&(b=!0),a.call(this,c),this.subject=new Jd,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=pc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=pc}return ec(d,a),fc(d.prototype,Oc,{onCompleted:function(){b.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){b.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){b.call(this);var c=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),c=!0),c&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=pc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=pc),{numberOfItems:a,returnValue:!1}},request:function(a){b.call(this),this.disposeCurrentRequest();var c=this,d=this._processRequest(a);return a=d.numberOfItems,d.returnValue?pc:(this.requestedCount=a,this.requestedDisposable=oc(function(){c.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=pc},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),d}(Wc);Qc.multicast=function(a,b){var c=this;return"function"==typeof a?new Gd(function(d){var e=c.multicast(a());return new lc(b(e).subscribe(d),e.connect())}):new yd(c,a)},Qc.publish=function(a){return a&&Ab(a)?this.multicast(function(){return new Jd},a):this.multicast(new Jd)},Qc.share=function(){return this.publish().refCount()},Qc.publishLast=function(a){return a&&Ab(a)?this.multicast(function(){return new Kd},a):this.multicast(new Kd)},Qc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new wd(b)},a):this.multicast(new wd(a))},Qc.shareValue=function(a){return this.publishValue(a).refCount()},Qc.replay=function(a,b,c,d){return a&&Ab(a)?this.multicast(function(){return new xd(b,c,d)},a):this.multicast(new xd(b,c,d))},Qc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var vd=function(a,b){this.subject=a,this.observer=b};vd.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var wd=qb.BehaviorSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new vd(this,a);var c=this.exception;return c?a.onError(c):a.onCompleted(),pc}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return ec(d,a),fc(d.prototype,Oc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=this.observers.slice(0),d=c.length;d>a;a++)c[a].onCompleted();this.observers=[] +}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped){this.value=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Wc),xd=qb.ReplaySubject=function(a){function c(a,b){return oc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var d=new Uc(this.scheduler,a),e=c(this,d);b.call(this),this._trim(this.scheduler.now()),this.observers.push(d);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)d.onNext(this.q[g].value);return this.hasError?(f++,d.onError(this.error)):this.isStopped&&(f++,d.onCompleted()),d.ensureActive(f),e}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||zc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return ec(e,a),fc(e.prototype,Oc,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++){var f=c[d];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Wc),yd=qb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new lc(f.subscribe(c),oc(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return ec(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Gd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Wc),zd=function(){function b(a){if(a&!1)return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function c(a){var c,d,e;for(c=0;c=a)return d;for(e=1|a;ec;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||vb,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return d(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return d(b.toString());if("function"==typeof b.valueOf){var c=b.valueOf();if("number"==typeof c)return e(c);if("string"==typeof b)return d(c)}if(b.getHashCode)return b.getHashCode();var f=17*a++;return b.getHashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var b,d=c(a);for(this.buckets=new Array(d),this.entries=new Array(d),b=0;d>b;b++)this.buckets[b]=-1,this.entries[b]=f();this.freeList=-1},l.add=function(a,b){return this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=c(2*this.size),b=new Array(a);for(e=0;ee;++e)d[e]=f();for(var g=0;g=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(b){var c=this._findEntry(b);return c>=0?this.entries[c].value:a},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();Qc.join=function(a,b,c,d){var e=this;return new Gd(function(f){var g=new lc,h=!1,i=!1,j=0,k=0,l=new zd,m=new zd;return g.add(e.subscribe(function(a){var c=j++,e=new qc;l.add(c,a),g.add(e);var i,k=function(){l.remove(c)&&0===l.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(n){return void f.onError(n)}e.setDisposable(i.take(1).subscribe(rb,f.onError.bind(f),k)),m.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(i||0===l.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=k++,e=new qc;m.add(b,a),g.add(e);var h,j=function(){m.remove(b)&&0===m.count()&&i&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(n){return void f.onError(n)}e.setDisposable(h.take(1).subscribe(rb,f.onError.bind(f),j)),l.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){i=!0,(h||0===m.count())&&f.onCompleted()})),g})},Qc.groupJoin=function(a,b,c,d){var e=this;return new Gd(function(f){function g(a){return function(b){b.onError(a)}}var h=new lc,i=new sc(h),j=new zd,k=new zd,l=0,m=0;return h.add(e.subscribe(function(a){var c=new Jd,e=l++;j.add(e,c);var m;try{m=d(a,gc(c,i))}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}f.onNext(m),k.getValues().forEach(function(a){c.onNext(a)});var o=new qc;h.add(o);var p,q=function(){j.remove(e)&&c.onCompleted(),h.remove(o)};try{p=b(a)}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}o.setDisposable(p.take(1).subscribe(rb,function(a){j.getValues().forEach(g(a)),f.onError(a)},q))},function(a){j.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=m++;k.add(b,a);var d=new qc;h.add(d);var e,i=function(){k.remove(b),h.remove(d)};try{e=c(a)}catch(l){return j.getValues().forEach(g(l)),void f.onError(l)}d.setDisposable(e.take(1).subscribe(rb,function(a){j.getValues().forEach(g(a)),f.onError(a)},i)),j.getValues().forEach(function(b){b.onNext(a)})},function(a){j.getValues().forEach(g(a)),f.onError(a)})),i})},Qc.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},Qc.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?X.call(this,a):"function"==typeof a?Y.call(this,a):W.call(this,a,b)},Qc.pairwise=function(){var a=this;return new Gd(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))})},Qc.partition=function(a,b){var c=this.publish().refCount();return[c.filter(a,b),c.filter(function(c,d,e){return!a.call(b,c,d,e)})]},Qc.letBind=Qc.let=function(a){return a(this)},Wc["if"]=Wc.ifThen=function(a,b,c){return Yc(function(){return c||(c=Zc()),yb(b)&&(b=Xc(b)),yb(c)&&(c=Xc(c)),"function"==typeof c.now&&(c=Zc(c)),a()?b:c})},Wc["for"]=Wc.forIn=function(a,b,c){return Nc(a,b,c).concat()};var Ad=Wc["while"]=Wc.whileDo=function(a,b){return yb(b)&&(b=Xc(b)),Z(a,b).concat()};Qc.doWhile=function(a){return gd([this,Ad(a,this)])},Wc["case"]=Wc.switchCase=function(a,b,c){return Yc(function(){yb(c)&&(c=Xc(c)),c||(c=Zc()),"function"==typeof c.now&&(c=Zc(c));var d=b[a()];return yb(d)&&(d=Xc(d)),d||c})},Qc.expand=function(a,b){sb(b)||(b=yc);var c=this;return new Gd(function(d){var e=[],f=new rc,g=new lc(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new qc;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g})},Wc.forkJoin=function(){var a=j(arguments,0);return new Gd(function(b){var c=a.length;if(0===c)return b.onCompleted(),pc;for(var d=new lc,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];yb(j)&&(j=Xc(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},Qc.forkJoin=function(a,b){var c=this;return new Gd(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new qc,l=new qc;return yb(a)&&(a=Xc(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new lc(k,l)})},Qc.manySelect=function(a,b){sb(b)||(b=yc);var c=this;return Yc(function(){var d;return c.map(function(a){var b=new Bd(a);return d&&d.onNext(a),d=b,b}).tap(rb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)})};var Bd=function(a){function b(a){var b=this,c=new lc;return c.add(zc.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeAll().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new Kd}return ec(c,a),fc(c.prototype,Oc,{onCompleted:function(){this.onNext(Wc.empty())},onError:function(a){this.onNext(Wc.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(Wc),Cd=lb.Map||function(){function b(){this._keys=[],this._values=[]}return b.prototype.get=function(b){var c=this._keys.indexOf(b);return-1!==c?this._values[c]:a},b.prototype.set=function(a,b){var c=this._keys.indexOf(a);-1!==c&&(this._values[c]=b),this._values[this._keys.push(a)-1]=b},b.prototype.forEach=function(a,b){for(var c=0,d=this._keys.length;d>c;c++)a.call(b,this._values[c],this._keys[c])},b}();$.prototype.and=function(a){return new $(this.patterns.concat(a))},$.prototype.thenDo=function(a){return new _(this,a)},_.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(ab(a,this.expression.patterns[f],b.onError.bind(b)));var h=new bb(e,function(){var a;try{a=d.selector.apply(d,arguments)}catch(c){return void b.onError(c)}b.onNext(a)},function(){for(var a=0,b=e.length;b>a;a++)e[a].removeActivePlan(h);c(h)});for(f=0,g=e.length;g>f;f++)e[f].addActivePlan(h);return h},bb.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},bb.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;ac;c++)b[c].match()}},c.error=rb,c.completed=rb,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(Rc);Qc.and=function(a){return new $([this,a])},Qc.thenDo=function(a){return new $([this]).thenDo(a)},Wc.when=function(){var a=j(arguments,0);return new Gd(function(b){var c=[],d=new Cd,e=Pc(b.onNext.bind(b),function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},b.onCompleted.bind(b));try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){dd(h).subscribe(b)}var i=new lc;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var Ed=Wc.interval=function(a,b){return gb(a,a,sb(b)?b:Ec)},Fd=Wc.timer=function(b,c,d){var e;return sb(d)||(d=Ec),c!==a&&"number"==typeof c?e=c:sb(c)&&(d=c),b instanceof Date&&e===a?db(b.getTime(),d):b instanceof Date&&e!==a?(e=c,eb(b.getTime(),e,d)):e===a?fb(b,d):gb(b,e,d)};Qc.delay=function(a,b){return sb(b)||(b=Ec),a instanceof Date?ib(this,a.getTime(),b):hb(this,a,b)},Qc.debounce=Qc.throttleWithTimeout=function(a,b){sb(b)||(b=Ec);var c=this;return new Gd(function(d){var e,f=new rc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new qc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new lc(i,f)})},Qc.throttle=function(a,b){return Jb("throttle","debounce or throttleWithTimeout"),this.debounce(a,b)},Qc.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),sb(c)||(c=Ec),"number"==typeof b?d=b:sb(b)&&(d=a,c=b),new Gd(function(b){function f(){var a=new qc,e=!1,g=!1;l.setDisposable(a),j===i?(e=!0,g=!0):i>j?e=!0:g=!0;var n=e?j:i,o=n-m;m=n,e&&(j+=d),g&&(i+=d),a.setDisposable(c.scheduleWithRelative(o,function(){if(g){var a=new Jd;k.push(a),b.onNext(gc(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new rc,m=0;return g=new lc(l),h=new sc(g),k.push(new Jd),b.onNext(gc(k[0],h)),f(),g.add(e.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h})},Qc.windowWithTimeOrCount=function(a,b,c){var d=this;return sb(c)||(c=Ec),new Gd(function(e){function f(b){var d=new qc;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new Jd,e.onNext(gc(l,i)),f(a)}}))}var g=new rc,h=new lc(g),i=new sc(h),j=0,k=0,l=new Jd;return e.onNext(gc(l,i)),f(0),h.add(d.subscribe(function(a){var c=0,d=!1;l.onNext(a),++j===b&&(d=!0,j=0,c=++k,l.onCompleted(),l=new Jd,e.onNext(gc(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i})},Qc.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},Qc.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},Qc.timeInterval=function(a){var b=this;return sb(a)||(a=Ec),Yc(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},Qc.timestamp=function(a){return sb(a)||(a=Ec),this.map(function(b){return{value:b,timestamp:a.now()}})},Qc.sample=Qc.throttleLatest=function(a,b){return sb(b)||(b=Ec),"number"==typeof a?jb(this,Ed(a,b)):jb(this,a)},Qc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=dd(new Error(b||"Timeout"))),sb(c)||(c=Ec);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Gd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(yb(b)&&(b=Xc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new qc,j=new rc,k=!1,l=new rc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new lc(j,l)})},Wc.generateWithAbsoluteTime=function(a,b,c,d,e,f){return sb(f)||(f=Ec),new Gd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithAbsolute(f.now(),function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Wc.generateWithRelativeTime=function(a,b,c,d,e,f){return sb(f)||(f=Ec),new Gd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithRelative(0,function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Qc.delaySubscription=function(a,b){return this.delayWithSelector(Fd(a,sb(b)?b:Ec),Zc)},Qc.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new Gd(function(a){var b=new lc,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new rc,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new qc;b.add(h),h.setDisposable(e.subscribe(function(){a.onNext(c),b.remove(h),g()},a.onError.bind(a),function(){a.onNext(c),b.remove(h),g()}))},a.onError.bind(a),function(){f=!0,h.dispose(),g()}))};return c?h.setDisposable(c.subscribe(function(){i()},a.onError.bind(a),function(){i()})):i(),new lc(h,b)})},Qc.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=bd()),c||(c=dd(new Error("Timeout")));var d=this;return new Gd(function(e){function f(a){function b(){return k===d}var d=k,f=new qc;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new rc,i=new rc,j=new qc;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(yb(c)?Xc(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new lc(h,i)})},Qc.debounceWithSelector=function(a){var b=this;return new Gd(function(c){var d,e=!1,f=new rc,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}yb(h)&&(h=Xc(h)),e=!0,d=b,g++;var j=g,k=new qc;f.setDisposable(k),k.setDisposable(h.subscribe(function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()},c.onError.bind(c),function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new lc(h,f)})},Qc.throttleWithSelector=function(){return Jb("throttleWithSelector","debounceWithSelector"),this.debounceWithSelector.apply(this,arguments)},Qc.skipLastWithTime=function(a,b){sb(b)||(b=Ec);var c=this;return new Gd(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},d.onError.bind(d),function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})})},Qc.takeLastWithTime=function(a,b){var c=this;return sb(b)||(b=Ec),new Gd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})})},Qc.takeLastBufferWithTime=function(a,b){var c=this;return sb(b)||(b=Ec),new Gd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})})},Qc.takeWithTime=function(a,b){var c=this;return sb(b)||(b=Ec),new Gd(function(d){return new lc(b.scheduleWithRelative(a,d.onCompleted.bind(d)),c.subscribe(d))})},Qc.skipWithTime=function(a,b){var c=this;return sb(b)||(b=Ec),new Gd(function(d){var e=!1;return new lc(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))})},Qc.skipUntilWithTime=function(a,b){sb(b)||(b=Ec);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Gd(function(e){var f=!1;return new lc(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},e.onError.bind(e),e.onCompleted.bind(e)))})},Qc.takeUntilWithTime=function(a,b){sb(b)||(b=Ec);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Gd(function(e){return new lc(b[d](a,e.onCompleted.bind(e)),c.subscribe(e))})},Qc.throttleFirst=function(a,b){sb(b)||(b=Ec);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Gd(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},a.onError.bind(a),a.onCompleted.bind(a))})},Qc.exclusive=function(){var a=this;return new Gd(function(b){var c=!1,d=!1,e=new qc,f=new lc;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,yb(a)&&(a=Xc(a));var e=new qc;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f})},Qc.exclusiveMap=function(a,b){var c=this;return new Gd(function(d){var e=0,f=!1,g=!0,h=new qc,i=new lc;return i.add(h),h.setDisposable(c.subscribe(function(c){f||(f=!0,innerSubscription=new qc,i.add(innerSubscription),yb(c)&&(c=Xc(c)),innerSubscription.setDisposable(c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),function(){i.remove(innerSubscription),f=!1,g&&1===i.length&&d.onCompleted()})))},d.onError.bind(d),function(){g=!0,1!==i.length||f||d.onCompleted()})),i})},Qc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new Gd(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})})},qb.VirtualTimeScheduler=function(a){function b(){throw new Error("Not implemented")}function c(){return this.toDateTimeOffset(this.clock)}function d(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function e(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function f(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function g(a,b){return b(),pc}function h(b,g){this.clock=b,this.comparer=g,this.isEnabled=!1,this.queue=new jc(1024),a.call(this,c,d,e,f)}ec(h,a);var i=h.prototype;return i.add=b,i.toDateTimeOffset=b,i.toRelative=b,i.schedulePeriodicWithState=function(a,b,c){var d=new xc(this,a,b,c);return d.start()},i.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},i.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,g)},i.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},i.stop=function(){this.isEnabled=!1},i.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Error(Cb);if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},i.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Error(Cb);0!==c&&this.advanceTo(b)},i.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Error(Cb);this.clock=b},i.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},i.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,g)},i.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new tc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},h}(uc),qb.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||wb;a.call(this,d,e)}ec(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(qb.VirtualTimeScheduler);var Gd=qb.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?oc(a):pc}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new Hd(a);return zc.scheduleRequired()?zc.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return ec(c,a),c}(Wc),Hd=function(a){function b(b){a.call(this),this.observer=b,this.m=new qc}ec(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Rc),Id=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new Gd(function(a){return new lc(e.getDisposable(),d.subscribe(a))}):d}return ec(c,a),c}(Wc),Jd=qb.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),pc):(a.onCompleted(),pc):(this.observers.push(a),new vd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return ec(d,a),fc(d.prototype,Oc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Ld(a,b)},d}(Wc),Kd=qb.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new vd(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),pc}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return ec(d,a),fc(d.prototype,Oc,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Wc),Ld=qb.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return ec(b,a),fc(b.prototype,Oc,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(Wc);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(lb.Rx=qb,define(function(){return qb})):mb&&nb?ob?(nb.exports=qb).Rx=qb:mb.Rx=qb:lb.Rx=qb}).call(this); //# sourceMappingURL=rx.all.compat.map \ No newline at end of file diff --git a/dist/rx.all.js b/dist/rx.all.js index 5aa9906a3..5c819346d 100644 --- a/dist/rx.all.js +++ b/dist/rx.all.js @@ -2294,7 +2294,7 @@ * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence. */ var observableFromArray = Observable.fromArray = function (array, scheduler) { - //deprecate('fromArray', 'from'); + deprecate('fromArray', 'from'); isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new AnonymousObservable(function (observer) { var count = 0, len = array.length; diff --git a/dist/rx.all.map b/dist/rx.all.map index 025079abf..0d95979e1 100644 --- a/dist/rx.all.map +++ b/dist/rx.all.map @@ -1 +1 @@ -{"version":3,"file":"rx.all.min.js","sources":["rx.all.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","flatMap","mergeAll","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","sequenceContainsNoElements","elementAtOrDefault","hasDefault","defaultValue","argumentOutOfRange","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","predicate","yieldIndex","shouldRun","toThunk","obj","ctx","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","observable","v","promise","then","name","next","throwString","val","error","createListener","element","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","combineLatestSource","subject","values","hasValueAll","every","identity","apply","isDone","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","win","observableWindowWithBounaries","windowBoundaries","Subject","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","windowClose","m1","m","take","noop","enumerableWhile","condition","Enumerable","Enumerator","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","newValue","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","not","asArray","arguments","isFn","Symbol","iterator","Set","doneEnumerator","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","prop","xs","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","_next","_iterator","concat","currentItem","currentValue","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","isStopped","completed","fail","_onNext","_onError","_onCompleted","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","Observable","_subscribe","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","arr","createWithDisposable","defer","observableFactory","observableThrow","pow","charAt","from","iterable","mapFn","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","observableNever","never","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","filter","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","handleError","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","select","selectorFn","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","finalValue","aggregate","reduce","some","any","isEmpty","all","contains","searchElement","fromIndex","sum","prev","curr","minBy","min","maxBy","average","cur","sequenceEqual","donel","doner","ql","qr","subscription1","equal","subscription2","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","toSet","toMap","spawn","isGenFun","exit","ret","gen","called","hasCallback","denodify","cb","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","innerHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasObservers","os","createRemovableDisposable","so","_trim","hasError","windowSize","Number","MAX_VALUE","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","isPrime","candidate","num1","sqrt","num2","getPrime","num","primes","stringHashFn","str","hash","character","charCodeAt","numberHashFn","c2","newEntry","hashCode","_initialize","freeCount","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","dictionaryProto","prime","buckets","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","clear","_findEntry","containskey","join","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","published","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","subscriber","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","chain","ChainObservable","g","head","tail","_keys","_values","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","observableTimer","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","throttleLatest","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","debounceWithSelector","currentid","throttleWithSelector","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","throttleFirst","windowDuration","lastOnNext","transduce","transducer","transformForObserver","init","step","obs","input","xform","exclusive","hasCurrent","exclusiveMap","VirtualTimeScheduler","notImplemented","localNow","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","hv","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gB,KAAKf,OACdA,KAAKkiB,UAAW,CACnB,GAAI0S,GAAK50B,KAAK00B,UAAU5zB,MAAM,EAC9Bd,MAAKkiB,WAAY,EACjBliB,KAAKgI,UAAYgF,CAEjB,KAAK,GAAIpI,GAAI,EAAG2B,EAAMquB,EAAGh0B,OAAY2F,EAAJ3B,EAASA,IACxCgwB,EAAGhwB,GAAGuD,QAAQ6E,EAGhBhN,MAAK00B,eAOTttB,OAAQ,SAAU/G,GAChBN,EAAcgB,KAAKf,MACfA,KAAKkiB,YACTliB,KAAKK,MAAQA,EACbL,KAAK+J,UAAW,IAKlBwN,QAAS,WACPvX,KAAKC,YAAa,EAClBD,KAAK00B,UAAY,KACjB10B,KAAKgI,UAAY,KACjBhI,KAAKK,MAAQ,QAIVsjB,GACPT,IAEEwf,GAAmBhvB,GAAGgvB,iBAAoB,SAAUrjB,GAGtD,QAASqjB,GAAiBz7B,EAAUuF,GAClCxM,KAAKiH,SAAWA,EAChBjH,KAAKwM,WAAaA,EAClB6S,EAAUte,KAAKf,KAAMA,KAAKwM,WAAW1E,UAAUC,KAAK/H,KAAKwM,aAe3D,MApBAqJ,IAAS6sB,EAAkBrjB,GAQ3BpJ,GAAcysB,EAAiB7gC,UAAWwf,IACxCha,YAAa,WACXrH,KAAKiH,SAASI,eAEhBc,QAAS,SAAUH,GACjBhI,KAAKiH,SAASkB,QAAQH,IAExBZ,OAAQ,SAAU/G,GAChBL,KAAKiH,SAASG,OAAO/G,MAIlBqiC,GACPxf,GAEqB,mBAAV0f,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvEh9B,GAAK6N,GAAKA,GAEVkvB,OAAO,WACH,MAAOlvB,OAEJR,IAAeG,GAElBE,IACCF,GAAWF,QAAUO,IAAIA,GAAKA,GAEjCR,GAAYQ,GAAKA,GAInB7N,GAAK6N,GAAKA,KAGhB3S,KAAKf"} \ No newline at end of file +{"version":3,"file":"rx.all.min.js","sources":["rx.all.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","flatMap","mergeAll","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","sequenceContainsNoElements","elementAtOrDefault","hasDefault","defaultValue","argumentOutOfRange","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","predicate","yieldIndex","shouldRun","toThunk","obj","ctx","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","observable","v","promise","then","name","next","throwString","val","error","createListener","element","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","combineLatestSource","subject","values","hasValueAll","every","identity","apply","isDone","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","win","observableWindowWithBounaries","windowBoundaries","Subject","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","windowClose","m1","m","take","noop","enumerableWhile","condition","Enumerable","Enumerator","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","newValue","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","not","asArray","arguments","isFn","Symbol","iterator","Set","doneEnumerator","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","prop","xs","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","_next","_iterator","concat","currentItem","currentValue","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","isStopped","completed","fail","_onNext","_onError","_onCompleted","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","Observable","_subscribe","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","arr","createWithDisposable","defer","observableFactory","observableThrow","pow","charAt","from","iterable","mapFn","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","observableNever","never","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","filter","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","handleError","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","select","selectorFn","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","finalValue","aggregate","reduce","some","any","isEmpty","all","contains","searchElement","fromIndex","sum","prev","curr","minBy","min","maxBy","average","cur","sequenceEqual","donel","doner","ql","qr","subscription1","equal","subscription2","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","toSet","toMap","spawn","isGenFun","exit","ret","gen","called","hasCallback","denodify","cb","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","innerHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasObservers","os","createRemovableDisposable","so","_trim","hasError","windowSize","Number","MAX_VALUE","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","isPrime","candidate","num1","sqrt","num2","getPrime","num","primes","stringHashFn","str","hash","character","charCodeAt","numberHashFn","c2","newEntry","hashCode","_initialize","freeCount","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","dictionaryProto","prime","buckets","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","clear","_findEntry","containskey","join","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","published","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","subscriber","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","chain","ChainObservable","g","head","tail","_keys","_values","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","observableTimer","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","throttleLatest","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","debounceWithSelector","currentid","throttleWithSelector","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","throttleFirst","windowDuration","lastOnNext","transduce","transducer","transformForObserver","init","step","obs","input","xform","exclusive","hasCurrent","exclusiveMap","VirtualTimeScheduler","notImplemented","localNow","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,IAsFlE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,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AEEwf,GAAmBhvB,GAAGgvB,iBAAoB,SAAUrjB,GAGtD,QAASqjB,GAAiBz7B,EAAUuF,GAClCxM,KAAKiH,SAAWA,EAChBjH,KAAKwM,WAAaA,EAClB6S,EAAUte,KAAKf,KAAMA,KAAKwM,WAAW1E,UAAUC,KAAK/H,KAAKwM,aAe3D,MApBAqJ,IAAS6sB,EAAkBrjB,GAQ3BpJ,GAAcysB,EAAiB7gC,UAAWwf,IACxCha,YAAa,WACXrH,KAAKiH,SAASI,eAEhBc,QAAS,SAAUH,GACjBhI,KAAKiH,SAASkB,QAAQH,IAExBZ,OAAQ,SAAU/G,GAChBL,KAAKiH,SAASG,OAAO/G,MAIlBqiC,GACPxf,GAEqB,mBAAV0f,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvEh9B,GAAK6N,GAAKA,GAEVkvB,OAAO,WACH,MAAOlvB,OAEJR,IAAeG,GAElBE,IACCF,GAAWF,QAAUO,IAAIA,GAAKA,GAEjCR,GAAYQ,GAAKA,GAInB7N,GAAK6N,GAAKA,KAGhB3S,KAAKf"} \ No newline at end of file diff --git a/dist/rx.all.min.js b/dist/rx.all.min.js index 581a33d5d..3e80ab1f0 100644 --- a/dist/rx.all.min.js +++ b/dist/rx.all.min.js @@ -1,5 +1,5 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){function b(){if(this.isDisposed)throw new Error(Cb)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;ac.nonEnumArgs&&a.length&&h(a)&&(a=cc.call(a));var d=ac.enumPrototypes&&"function"==typeof a,e=ac.enumErrorProps&&(a===Wb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(ac.nonEnumShadows&&a!==Xb){var g=a.constructor,i=-1,j=$b.length;if(a===(g&&g.prototype))var k=a===stringProto?Sb:a===Wb?Nb:Tb.call(a),l=_b[k];for(;++i-1:void 0});return c.pop(),d.pop(),r}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:cc.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function n(){this._s=s}function o(){this._s=s,this._l=s.length,this._i=0}function p(a){this._a=a}function q(a){this._a=a,this._l=v(a),this._i=0}function r(a){return"number"==typeof a&&kb.isFinite(a)}function t(b){var c,d=b[Db];if(!d&&"string"==typeof b)return c=new n(b),c[Db]();if(!d&&b.length!==a)return c=new p(b),c[Db]();if(!d)throw new TypeError("Object is not iterable");return b[Db]()}function u(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function v(a){var b=+a.length;return isNaN(b)?0:0!==b&&r(b)?(b=u(b)*Math.floor(Math.abs(b)),0>=b?0:b>Xc?Xc:b):b}function w(a,b){return rb(a)||(a=wc),new Dd(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function x(a,b){return new Dd(function(c){var d=new nc,e=new oc;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}xb(f)&&(f=Uc(f)),d=new nc,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function y(a,b){var c=this;return new Dd(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function z(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return xb(f)&&(f=Uc(f)),(Gb(f)||Fb(f))&&(f=Yc(f)),f}).concatAll()}function A(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function B(a){this.comparer=a,this.set=[]}function C(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return xb(f)&&(f=Uc(f)),(Gb(f)||Fb(f))&&(f=Yc(f)),f}).mergeAll()}function D(a,b,c){return new Dd(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},d.onError.bind(d),function(){d.onNext(g),d.onCompleted()})})}function E(a){if(0===a.length)throw new Error(Ab);return a[0]}function F(a,b,c,d){if(0>b)throw new Error(Bb);return new Dd(function(e){var f=b;return a.subscribe(function(a){0===f&&(e.onNext(a),e.onCompleted()),f--},e.onError.bind(e),function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(Bb))})})}function G(a,b,c){return new Dd(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Ab))})})}function H(a,b,c){return new Dd(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},d.onError.bind(d),function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(Ab))})})}function I(a,b,c){return new Dd(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Ab))})})}function J(b,c,d,e){return new Dd(function(f){var g=0;return b.subscribe(function(a){var h;try{h=c.call(d,a,g,b)}catch(i){return void f.onError(i)}h?(f.onNext(e?g:a),f.onCompleted()):g++},f.onError.bind(f),function(){f.onNext(e?-1:a),f.onCompleted()})})}function K(a,b){return Array.isArray(a)?L.call(b,a):P(a)?id(a.call(b)):Q(a)?id(a):O(a)?M(a):xb(a)?N(a):typeof a===gd?a:c(a)||Array.isArray(a)?L.call(b,a):a}function L(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=K(a,b),typeof a!==gd)return h[d]=a,--g||c(null,h);a.call(b,function(a,b){if(!e){if(a)return e=!0,c(a);h[d]=b,--g||c(null,h)}})}catch(f){e=!0,c(f)}}var e,f=Object.keys(a),g=f.length,h=new a.constructor;if(!g)return void Bc.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function M(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function N(a){return function(b){a.then(function(a){b(null,a)},b)}}function O(a){return a&&typeof a.subscribe===gd}function P(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function Q(a){return a&&typeof a.next===gd&&typeof a[hd]===gd}function c(a){return a&&a.constructor===Object}function R(a){a&&Bc.schedule(function(){throw a})}function S(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),lc(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function T(a,b,c){var d=new ic;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(T(a.item(e),b,c));else a&&d.add(S(a,b,c));return d}function U(a,b,c){return new Dd(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(sb))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new ic(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d),function(){i=!0,e(!0,1)}))})}function V(a,b){return a.groupJoin(this,b,Wc,function(a,b){return b})}function W(a){var b=this;return new Dd(function(c){var d=new Gd,e=new ic,f=new pc(e);return c.onNext(fc(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),xb(a)&&(a=Uc(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new Gd,c.onNext(fc(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f})}function X(a){var b=this;return new Dd(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}xb(b)&&(b=Uc(b));var i=new nc;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(qb,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new Gd,c.onNext(fc(h,g)),d()}))}var e=new oc,f=new ic(e),g=new pc(f),h=new Gd;return c.onNext(fc(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g})}function Y(b,c){return new Ic(function(){return new Hc(function(){return b()?{done:!1,value:c}:{done:!0,value:a}})})}function Z(a){this.patterns=a}function $(a,b){this.expression=a,this.selector=b}function _(a,b,c){var d=a.get(b);if(!d){var e=new Ad(b,c);return a.set(b,e),e}return d}function ab(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new zd;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function bb(a,b){return new Dd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function db(a,b,c){return new Dd(function(d){var e=0,f=a,g=sc(b);return c.scheduleRecursiveWithAbsolute(f,function(a){if(g>0){var b=c.now();f+=g,b>=f&&(f=b+g)}d.onNext(e++),a(f)})})}function eb(a,b){return new Dd(function(c){return b.scheduleWithRelative(sc(a),function(){c.onNext(0),c.onCompleted()})})}function fb(a,b,c){return a===b?new Dd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Vc(function(){return db(c.now()+a,b,c)})}function gb(a,b,c){return new Dd(function(d){var e,f=!1,g=new oc,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new nc,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new ic(e,g)})}function hb(a,b,c){return Vc(function(){return gb(a,b-c.now(),c)})}function ib(a,b){return new Dd(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new ic(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))})}var jb={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},kb=jb[typeof window]&&window||this,lb=jb[typeof exports]&&exports&&!exports.nodeType&&exports,mb=jb[typeof module]&&module&&!module.nodeType&&module,nb=mb&&mb.exports===lb&&lb,ob=jb[typeof global]&&global;!ob||ob.global!==ob&&ob.window!==ob||(kb=ob);var pb={internals:{},config:{Promise:kb.Promise},helpers:{}},qb=pb.helpers.noop=function(){},rb=(pb.helpers.notDefined=function(a){return"undefined"==typeof a},pb.helpers.isScheduler=function(a){return a instanceof pb.Scheduler}),sb=pb.helpers.identity=function(a){return a},tb=(pb.helpers.pluck=function(a){return function(b){return b[a]}},pb.helpers.just=function(a){return function(){return a}},pb.helpers.defaultNow=Date.now),ub=pb.helpers.defaultComparer=function(a,b){return bc(a,b)},vb=pb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},wb=(pb.helpers.defaultKeySerializer=function(a){return a.toString()},pb.helpers.defaultError=function(a){throw a}),xb=pb.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},yb=(pb.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},pb.helpers.not=function(a){return!a}),zb=pb.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Tb.call(a)}),a}(),Ab="Sequence contains no elements.",Bb="Argument out of range",Cb="Object has been disposed",Db="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";kb.Set&&"function"==typeof(new kb.Set)["@@iterator"]&&(Db="@@iterator");var Eb=pb.doneEnumerator={done:!0,value:a},Fb=pb.helpers.isIterable=function(b){return b[Db]!==a},Gb=pb.helpers.isArrayLike=function(b){return b&&b.length!==a};pb.helpers.iterator=Db;var Hb,Ib=pb.helpers.deprecate=function(){},Jb="[object Arguments]",Kb="[object Array]",Lb="[object Boolean]",Mb="[object Date]",Nb="[object Error]",Ob="[object Function]",Pb="[object Number]",Qb="[object Object]",Rb="[object RegExp]",Sb="[object String]",Tb=Object.prototype.toString,Ub=Object.prototype.hasOwnProperty,Vb=Tb.call(arguments)==Jb,Wb=Error.prototype,Xb=Object.prototype,Yb=Xb.propertyIsEnumerable;try{Hb=!(Tb.call(document)==Qb&&!({toString:0}+""))}catch(Zb){Hb=!0}var $b=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_b={};_b[Kb]=_b[Mb]=_b[Pb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},_b[Lb]=_b[Sb]={constructor:!0,toString:!0,valueOf:!0},_b[Nb]=_b[Ob]=_b[Rb]={constructor:!0,toString:!0},_b[Qb]={constructor:!0};var ac={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);ac.enumErrorProps=Yb.call(Wb,"message")||Yb.call(Wb,"name"),ac.enumPrototypes=Yb.call(a,"prototype"),ac.nonEnumArgs=0!=c,ac.nonEnumShadows=!/valueOf/.test(b)}(1),Vb||(h=function(a){return a&&"object"==typeof a?Ub.call(a,"callee"):!1});var bc=pb.internals.isEqual=function(a,b){return i(a,b,[],[])},cc=Array.prototype.slice,dc=({}.hasOwnProperty,this.inherits=pb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),ec=pb.internals.addProperties=function(a){for(var b=cc.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},fc=pb.internals.addRef=function(a,b){return new Dd(function(c){return new ic(b.getDisposable(),a.subscribe(c))})};l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var gc=pb.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},hc=gc.prototype;hc.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},hc.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},hc.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},jc.toArray=function(){return this.disposables.slice(0)};var kc=pb.Disposable=function(a){this.isDisposed=!1,this.action=a||qb};kc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var lc=kc.create=function(a){return new kc(a)},mc=kc.empty={dispose:qb},nc=pb.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),oc=pb.SerialDisposable=nc,pc=pb.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?mc:new a(this)},b}();m.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var qc=pb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||vb,this.disposable=new nc};qc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},qc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},qc.prototype.isCancelled=function(){return this.disposable.isDisposed},qc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var rc=pb.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),mc}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=tb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),sc=rc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new ic,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),mc});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new ic,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),mc});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(rc.prototype),function(){rc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},rc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof kb.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=kb.setInterval(function(){d=c(d)},b);return lc(function(){kb.clearInterval(e)})}}(rc.prototype),function(a){a.catchError=a["catch"]=function(a){return new Cc(this,a)}}(rc.prototype);var tc,uc=pb.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new nc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),vc=rc.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=sc(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new rc(tb,a,b,c)}(),wc=rc.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-rc.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+rc.normalize(c),g=new qc(this,b,d,f);if(e)e.enqueue(g);else{e=new gc(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new rc(tb,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),xc=qb,yc=function(){var a,b=qb;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!kb.setTimeout)throw new Error("No concurrency detected!");a=kb.setTimeout,b=kb.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),zc=yc.setTimeout,Ac=yc.clearTimeout;!function(){function a(){if(!kb.postMessage||kb.importScripts)return!1;var a=!1,b=kb.onmessage;return kb.onmessage=function(){a=!0},kb.postMessage("","*"),kb.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(Tb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=ob&&nb&&ob.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=ob&&nb&&ob.clearImmediate)&&!c.test(e)&&e;if("function"==typeof d)tc=d,xc=e;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))tc=process.nextTick;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;kb.addEventListener?kb.addEventListener("message",b,!1):kb.attachEvent("onmessage",b,!1),tc=function(a){var b=h++;g[b]=a,kb.postMessage(f+b,"*")}}else if(kb.MessageChannel){var i=new kb.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},tc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in kb&&"onreadystatechange"in kb.document.createElement("script")?tc=function(a){var b=kb.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},kb.document.documentElement.appendChild(b)}:(tc=function(a){return zc(a,0)},xc=Ac)}();var Bc=rc.timeout=function(){function a(a,b){var c=this,d=new nc,e=tc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new ic(d,lc(function(){xc(e)}))}function b(a,b,c){var d=this,e=rc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new nc,g=zc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new ic(f,lc(function(){Ac(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new rc(tb,a,b,c)}(),Cc=function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return dc(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return mc}}},e.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new nc;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(rc),Dc=pb.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return rb(a)||(a=vc),new Dd(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Ec=Dc.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Dc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Fc=Dc.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Dc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Gc=Dc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Dc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Hc=pb.internals.Enumerator=function(a){this._next=a};Hc.prototype.next=function(){return this._next()},Hc.prototype[Db]=function(){return this};var Ic=pb.internals.Enumerable=function(a){this._iterator=a};Ic.prototype[Db]=function(){return this._iterator()},Ic.prototype.concat=function(){var a=this;return new Dd(function(b){var c;try{c=a[Db]()}catch(d){return void b.onError()}var e,f=new oc,g=vc.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;xb(h)&&(h=Uc(h));var i=new nc;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new ic(f,g,lc(function(){e=!0}))})},Ic.prototype.catchError=function(){var a=this;return new Dd(function(b){var c;try{c=a[Db]()}catch(d){return void b.onError()}var e,f,g=new oc,h=vc.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;xb(i)&&(i=Uc(i));var j=new nc;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new ic(g,h,lc(function(){e=!0}))})};var Jc=Ic.repeat=function(a,b){return null==b&&(b=-1),new Ic(function(){var c=b;return new Hc(function(){return 0===c?Eb:(c>0&&c--,{done:!1,value:a})})})},Kc=Ic.of=function(a,b,c){return b||(b=sb),new Ic(function(){var d=-1;return new Hc(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Oc),Sc=function(a){function b(){a.apply(this,arguments)}return dc(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(Rc),Tc=pb.Observable=function(){function a(a){this._subscribe=a}return Nc=a.prototype,Nc.subscribe=Nc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Mc(a,b,c))},Nc.subscribeOnNext=function(a,b){return this._subscribe(Mc(2===arguments.length?function(c){a.call(b,c)}:a))},Nc.subscribeOnError=function(a,b){return this._subscribe(Mc(null,2===arguments.length?function(c){a.call(b,c)}:a))},Nc.subscribeOnCompleted=function(a,b){return this._subscribe(Mc(null,null,2===arguments.length?function(){a.call(b)}:a))},a}();Nc.observeOn=function(a){var b=this;return new Dd(function(c){return b.subscribe(new Sc(a,c))})},Nc.subscribeOn=function(a){var b=this;return new Dd(function(c){var d=new nc,e=new oc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var Uc=Tc.fromPromise=function(a){return Vc(function(){var b=new pb.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};Nc.toPromise=function(a){if(a||(a=pb.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Nc.toArray=function(){var a=this;return new Dd(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},Tc.create=Tc.createWithDisposable=function(a){return new Dd(a)};var Vc=Tc.defer=function(a){return new Dd(function(b){var c;try{c=a()}catch(d){return ad(d).subscribe(b)}return xb(c)&&(c=Uc(c)),c.subscribe(b)})},Wc=Tc.empty=function(a){return rb(a)||(a=vc),new Dd(function(b){return a.schedule(function(){b.onCompleted() -})})},Xc=Math.pow(2,53)-1;n.prototype[Db]=function(){return new o(this._s)},o.prototype[Db]=function(){return this},o.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};Tc.generate=function(a,b,c,d,e){return rb(e)||(e=wc),new Dd(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})},Tc.of=function(){return w(null,arguments)},Tc.ofWithScheduler=function(a){return w(a,cc.call(arguments,1))};var $c=Tc.never=function(){return new Dd(function(){return mc})};Tc.range=function(a,b,c){return rb(c)||(c=wc),new Dd(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},Tc.repeat=function(a,b,c){return rb(c)||(c=wc),_c(a,c).repeat(null==b?-1:b)};var _c=Tc["return"]=Tc.just=function(a,b){return rb(b)||(b=vc),new Dd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Tc.returnValue=function(){return Ib("returnValue","return or just"),_c.apply(null,arguments)};var ad=Tc["throw"]=Tc.throwException=Tc.throwError=function(a,b){return rb(b)||(b=vc),new Dd(function(c){return b.schedule(function(){c.onError(a)})})};Tc.using=function(a,b){return new Dd(function(c){var d,e,f=mc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new ic(ad(g).subscribe(c),f)}return new ic(e.subscribe(c),f)})},Nc.amb=function(a){var b=this;return new Dd(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new nc,j=new nc;return xb(a)&&(a=Uc(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new ic(i,j)})},Tc.amb=function(){function a(a,b){return a.amb(b)}for(var b=$c(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},Nc["catch"]=Nc.catchError=function(a){return"function"==typeof a?x(this,a):bd([this,a])},Nc.catchException=function(a){return Ib("catchException","catch or catchError"),this.catchError(a)};var bd=Tc.catchError=Tc["catch"]=function(){return Kc(j(arguments,0)).catchError()};Tc.catchException=function(){return Ib("catchException","catch or catchError"),bd.apply(null,arguments)},Nc.combineLatest=function(){var a=cc.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),cd.apply(this,a)};var cd=Tc.combineLatest=function(){var a=cc.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Dd(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(sb))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(sb)&&c.onCompleted()}function e(a){j[a]=!0,j.every(sb)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new nc;xb(f)&&(f=Uc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new ic(m)})};Nc.concat=function(){var a=cc.call(arguments,0);return a.unshift(this),dd.apply(this,a)};var dd=Tc.concat=function(){return Kc(j(arguments,0)).concat()};Nc.concatAll=function(){return this.merge(1)},Nc.concatObservable=function(){return Ib("concatObservable","concatAll"),this.merge(1)},Nc.merge=function(a){if("number"!=typeof a)return ed(this,a);var b=this;return new Dd(function(c){function d(a){var b=new nc;f.add(b),xb(a)&&(a=Uc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new ic,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var ed=Tc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=cc.call(arguments,1)):(a=vc,b=cc.call(arguments,0)):(a=vc,b=cc.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),w(a,b).mergeAll()};Nc.mergeAll=function(){var a=this;return new Dd(function(b){var c=new ic,d=!1,e=new nc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new nc;c.add(e),xb(a)&&(a=Uc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},Nc.mergeObservable=function(){return Ib("mergeObservable","mergeAll"),this.mergeAll.apply(this,arguments)},Nc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return fd([this,a])};var fd=Tc.onErrorResumeNext=function(){var a=j(arguments,0);return new Dd(function(b){var c=0,d=new oc,e=vc.scheduleRecursive(function(e){var f,g;c0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(sb)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new nc;xb(c)&&(c=Uc(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new ic(j)})},Tc.zip=function(){var a=cc.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},Tc.zipArray=function(){var a=j(arguments,0);return new Dd(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(sb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(sb)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new nc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new ic(h);return j.add(lc(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},Nc.asObservable=function(){return new Dd(this.subscribe.bind(this))},Nc.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},Nc.dematerialize=function(){var a=this;return new Dd(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},Nc.distinctUntilChanged=function(a,b){var c=this;return a||(a=sb),b||(b=ub),new Dd(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},Nc["do"]=Nc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new Dd(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b)try{b(c)}catch(d){a.onError(d)}a.onError(c)},function(){if(c)try{c()}catch(b){a.onError(b)}a.onCompleted()})})},Nc.doAction=function(){return Ib("doAction","do or tap"),this.tap.apply(this,arguments)},Nc.doOnNext=Nc.tapOnNext=function(a,b){return this.tap(2===arguments.length?function(c){a.call(b,c)}:a)},Nc.doOnError=Nc.tapOnError=function(a,b){return this.tap(qb,2===arguments.length?function(c){a.call(b,c)}:a)},Nc.doOnCompleted=Nc.tapOnCompleted=function(a,b){return this.tap(qb,null,2===arguments.length?function(){a.call(b)}:a)},Nc["finally"]=Nc.ensure=function(a){var b=this;return new Dd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return lc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},Nc.finallyAction=function(a){return Ib("finallyAction","finally or ensure"),this.ensure(a)},Nc.ignoreElements=function(){var a=this;return new Dd(function(b){return a.subscribe(qb,b.onError.bind(b),b.onCompleted.bind(b))})},Nc.materialize=function(){var a=this;return new Dd(function(b){return a.subscribe(function(a){b.onNext(Ec(a))},function(a){b.onNext(Fc(a)),b.onCompleted()},function(){b.onNext(Gc()),b.onCompleted()})})},Nc.repeat=function(a){return Jc(this,a).concat()},Nc.retry=function(a){return Jc(this,a).catchError()},Nc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new Dd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},Nc.skipLast=function(a){var b=this;return new Dd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},Nc.startWith=function(){var a,b,c=0;return arguments.length&&rb(arguments[0])?(b=arguments[0],c=1):b=vc,a=cc.call(arguments,c),Kc([Zc(a,b),this]).concat()},Nc.takeLast=function(a){var b=this;return new Dd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},Nc.takeLastBuffer=function(a){var b=this;return new Dd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},Nc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(Bb);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(Bb);return new Dd(function(d){function e(){var a=new Gd;i.push(a),d.onNext(fc(a,g))}var f=new nc,g=new pc(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g})},Nc.selectConcat=Nc.concatMap=function(a,b,c){return zb(a)&&zb(b)?this.concatMap(function(c,d){var e=a(c,d);return xb(e)&&(e=Uc(e)),(Gb(e)||Fb(e))&&(e=Yc(e)),e.map(function(a,e){return b(c,a,d,e)})}):zb(a)?z(this,a,c):z(this,function(){return a})},Nc.concatMapObserver=Nc.selectConcatObserver=function(a,b,c,d){var e=this;return new Dd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}xb(c)&&(c=Uc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}xb(c)&&(c=Uc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}xb(a)&&(a=Uc(a)),f.onNext(a),f.onCompleted()})}).concatAll()},Nc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Dd(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},B.prototype.push=function(a){var b=-1===A(this.set,a,this.comparer);return b&&this.set.push(a),b},Nc.distinct=function(a,b){var c=this;return b||(b=ub),new Dd(function(d){var e=new B(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},Nc.groupBy=function(a,b,c){return this.groupByUntil(a,b,$c,c)},Nc.groupByUntil=function(a,b,c,d){var e=this;return b||(b=sb),d||(d=ub),new Dd(function(f){function g(a){return function(b){b.onError(a)}}var h=new wd(0,d),i=new ic,j=new pc(i);return i.add(e.subscribe(function(d){var e;try{e=a(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}var l=!1,m=h.tryGetValue(e);if(m||(m=new Gd,h.set(e,m),l=!0),l){var n=new Fd(e,m,j),o=new Fd(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new nc;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(qb,function(a){h.getValues().forEach(g(a)),f.onError(a)},q))}var r;try{r=b(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}m.onNext(r)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),j})},Nc.select=Nc.map=function(a,b){var c=zb(a)?a:function(){return a},d=this;return new Dd(function(a){var e=0;return d.subscribe(function(f){var g;try{g=c.call(b,f,e++,d)}catch(h){return void a.onError(h)}a.onNext(g)},a.onError.bind(a),a.onCompleted.bind(a))})},Nc.pluck=function(a){return this.map(function(b){return b[a]})},Nc.selectMany=Nc.flatMap=function(a,b,c){return zb(a)&&zb(b)?this.flatMap(function(c,d){var e=a(c,d);return xb(e)&&(e=Uc(e)),(Gb(e)||Fb(e))&&(e=Yc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):zb(a)?C(this,a,c):C(this,function(){return a})},Nc.flatMapObserver=Nc.selectManyObserver=function(a,b,c,d){var e=this;return new Dd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}xb(c)&&(c=Uc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}xb(c)&&(c=Uc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}xb(a)&&(a=Uc(a)),f.onNext(a),f.onCompleted()})}).mergeAll()},Nc.selectSwitch=Nc.flatMapLatest=Nc.switchMap=function(a,b){return this.select(a,b).switchLatest()},Nc.skip=function(a){if(0>a)throw new Error(Bb);var b=this;return new Dd(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},Nc.skipWhile=function(a,b){var c=this;return new Dd(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Nc.take=function(a,b){if(0>a)throw new RangeError(Bb);if(0===a)return Wc(b);var c=this;return new Dd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},Nc.takeWhile=function(a,b){var c=this;return new Dd(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},Nc.where=Nc.filter=function(a,b){var c=this;return new Dd(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},Nc.finalValue=function(){var a=this;return new Dd(function(b){var c,d=!1;return a.subscribe(function(a){d=!0,c=a},b.onError.bind(b),function(){d?(b.onNext(c),b.onCompleted()):b.onError(new Error(Ab))})})},Nc.aggregate=function(){Ib("aggregate","reduce");var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},Nc.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},Nc.some=function(a,b){var c=this;return a?c.filter(a,b).some():new Dd(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},Nc.any=function(){return Ib("any","some"),this.some.apply(this,arguments)},Nc.isEmpty=function(){return this.any().map(yb)},Nc.every=function(a,b){return this.filter(function(b){return!a(b)},b).some().map(yb)},Nc.all=function(){return Ib("all","every"),this.every.apply(this,arguments)},Nc.contains=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new Dd(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),mc):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},e.onError.bind(e),function(){e.onNext(!1),e.onCompleted()})})},Nc.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},Nc.indexOf=function(a,b){var c=this;return new Dd(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),mc):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},d.onError.bind(d),function(){d.onNext(-1),d.onCompleted()})})},Nc.sum=function(a,b){return a&&zb(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},Nc.minBy=function(a,b){return b||(b=vb),D(this,a,function(a,c){return-1*b(a,c)})},Nc.min=function(a){return this.minBy(sb,a).map(function(a){return E(a)})},Nc.maxBy=function(a,b){return b||(b=vb),D(this,a,b)},Nc.max=function(a){return this.maxBy(sb,a).map(function(a){return E(a)})},Nc.average=function(a,b){return a&&zb(a)?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().map(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},Nc.sequenceEqual=function(a,b){var c=this;return b||(b=ub),new Dd(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(Gb(a)||Fb(a))&&(a=Yc(a)),xb(a)&&(a=Uc(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new ic(i,j)})},Nc.elementAt=function(a){return F(this,a,!1)},Nc.elementAtOrDefault=function(a,b){return F(this,a,!0,b)},Nc.single=function(a,b){return a&&zb(a)?this.where(a,b).single():G(this,!1)},Nc.singleOrDefault=function(a,b,c){return a&&zb(a)?this.where(a,c).singleOrDefault(null,b):G(this,!0,b)},Nc.first=function(a,b){return a?this.where(a,b).first():H(this,!1)},Nc.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):H(this,!0,b)},Nc.last=function(a,b){return a?this.where(a,b).last():I(this,!1)},Nc.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):I(this,!0,b)},Nc.find=function(a,b){return J(this,a,b,!1)},Nc.findIndex=function(a,b){return J(this,a,b,!0)},kb.Set&&(Nc.toSet=function(){var a=this;return new Dd(function(b){var c=new kb.Set;return a.subscribe(c.add.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})}),kb.Map&&(Nc.toMap=function(a,b){var c=this;return new Dd(function(d){var e=new kb.Map;return c.subscribe(function(c){var f;try{f=a(c)}catch(g){return void d.onError(g)}var h=c;if(b)try{h=b(c)}catch(g){return void d.onError(g)}e.set(f,h)},d.onError.bind(d),function(){d.onNext(e),d.onCompleted()})})});var gd="function",hd="throw",id=pb.spawn=function(a){var b=P(a);return function(c){function d(a,b){Bc.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2&&(b=cc.call(arguments,1)),a)try{c=g[hd](a)}catch(h){return d(h)}if(!a)try{c=g.next(b)}catch(h){return d(h)}if(c.done)return d(null,c.value);if(c.value=K(c.value,f),typeof c.value!==gd)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var i=!1;try{c.value.call(f,function(){i||(i=!0,e.apply(f,arguments))})}catch(h){Bc.schedule(function(){i||(i=!0,e.call(f,h))})}}}var f=this,g=a;if(b){var h=cc.call(arguments),i=h.length,j=i&&typeof h[i-1]===gd;c=j?h.pop():R,g=a.apply(this,h)}else c=c||R;e()}};pb.denodify=function(a){return function(){var b,c,d,e=cc.call(arguments);return e.push(function(){b=arguments,d&&!c&&(c=!0,cb.apply(this,b))}),a.apply(this,e),function(a){d=a,b&&!c&&(c=!0,a.apply(this,b))}}},Tc.start=function(a,b,c){return jd(a,b,c)()};var jd=Tc.toAsync=function(a,b,c){return rb(c)||(c=Bc),function(){var d=arguments,e=new Hd;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};Tc.fromCallback=function(a,b,c){return function(){var d=cc.call(arguments,0);return new Dd(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Tc.fromNodeCallback=function(a,b,c){return function(){var d=cc.call(arguments,0);return new Dd(function(e){function f(a){if(a)return void e.onError(a);var b=cc.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},pb.config.useNativeEvents=!1;var kd=kb.angular&&angular.element?angular.element:kb.jQuery?kb.jQuery:kb.Zepto?kb.Zepto:null,ld=!!kb.Ember&&"function"==typeof kb.Ember.addListener,md=!!kb.Backbone&&!!kb.Backbone.Marionette;Tc.fromEvent=function(a,b,c){if(a.addListener)return nd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!pb.config.useNativeEvents){if(md)return nd(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(ld)return nd(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c);if(kd){var d=kd(a);return nd(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}}return new Dd(function(d){return T(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var nd=Tc.fromEventPattern=function(a,b,c){return new Dd(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return lc(function(){b&&b(e,f)})}).publish().refCount()};Tc.startAsync=function(a){var b;try{b=a()}catch(c){return ad(c)}return Uc(b)};var od=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=mc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=mc)});return new ic(c,d,e)}function c(c,d){this.source=c,this.controller=new Gd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return dc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Tc);Nc.pausable=function(a){return new od(this,a)};var pd=function(b){function c(b){var c,d=[],e=U(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new Gd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c)}return dc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Tc);Nc.pausableBuffered=function(a){return new pd(this,a)},Nc.controlled=function(a){return null==a&&(a=!0),new qd(this,a)};var qd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new rd(d),this.source=c.multicast(this.subject).refCount()}return dc(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Tc),rd=pb.ControlledSubject=function(a){function c(a){return this.subject.subscribe(a)}function d(b){null==b&&(b=!0),a.call(this,c),this.subject=new Gd,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=mc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=mc}return dc(d,a),ec(d.prototype,Lc,{onCompleted:function(){b.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){b.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){b.call(this);var c=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),c=!0),c&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=mc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=mc),{numberOfItems:a,returnValue:!1}},request:function(a){b.call(this),this.disposeCurrentRequest();var c=this,d=this._processRequest(a);return a=d.numberOfItems,d.returnValue?mc:(this.requestedCount=a,this.requestedDisposable=lc(function(){c.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=mc},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),d}(Tc);Nc.multicast=function(a,b){var c=this;return"function"==typeof a?new Dd(function(d){var e=c.multicast(a());return new ic(b(e).subscribe(d),e.connect())}):new vd(c,a)},Nc.publish=function(a){return a&&zb(a)?this.multicast(function(){return new Gd},a):this.multicast(new Gd)},Nc.share=function(){return this.publish().refCount()},Nc.publishLast=function(a){return a&&zb(a)?this.multicast(function(){return new Hd},a):this.multicast(new Hd)},Nc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new td(b)},a):this.multicast(new td(a))},Nc.shareValue=function(a){return this.publishValue(a).refCount()},Nc.replay=function(a,b,c,d){return a&&zb(a)?this.multicast(function(){return new ud(b,c,d)},a):this.multicast(new ud(b,c,d))},Nc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var sd=function(a,b){this.subject=a,this.observer=b};sd.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var td=pb.BehaviorSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new sd(this,a);var c=this.exception;return c?a.onError(c):a.onCompleted(),mc}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return dc(d,a),ec(d.prototype,Lc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=this.observers.slice(0),d=c.length;d>a;a++)c[a].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped){this.value=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Tc),ud=pb.ReplaySubject=function(a){function c(a,b){return lc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var d=new Rc(this.scheduler,a),e=c(this,d);b.call(this),this._trim(this.scheduler.now()),this.observers.push(d);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)d.onNext(this.q[g].value);return this.hasError?(f++,d.onError(this.error)):this.isStopped&&(f++,d.onCompleted()),d.ensureActive(f),e}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||wc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return dc(e,a),ec(e.prototype,Lc,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++){var f=c[d];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Tc),vd=pb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new ic(f.subscribe(c),lc(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return dc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Dd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Tc),wd=function(){function b(a){if(a&!1)return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function c(a){var c,d,e;for(c=0;c=a)return d;for(e=1|a;ec;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||ub,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return d(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return d(b.toString());if("function"==typeof b.valueOf){var c=b.valueOf();if("number"==typeof c)return e(c);if("string"==typeof b)return d(c)}if(b.getHashCode)return b.getHashCode();var f=17*a++;return b.getHashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var b,d=c(a);for(this.buckets=new Array(d),this.entries=new Array(d),b=0;d>b;b++)this.buckets[b]=-1,this.entries[b]=f();this.freeList=-1},l.add=function(a,b){return this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=c(2*this.size),b=new Array(a);for(e=0;ee;++e)d[e]=f();for(var g=0;g=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(b){var c=this._findEntry(b);return c>=0?this.entries[c].value:a},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();Nc.join=function(a,b,c,d){var e=this;return new Dd(function(f){var g=new ic,h=!1,i=!1,j=0,k=0,l=new wd,m=new wd;return g.add(e.subscribe(function(a){var c=j++,e=new nc;l.add(c,a),g.add(e);var i,k=function(){l.remove(c)&&0===l.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(n){return void f.onError(n)}e.setDisposable(i.take(1).subscribe(qb,f.onError.bind(f),k)),m.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(i||0===l.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=k++,e=new nc;m.add(b,a),g.add(e);var h,j=function(){m.remove(b)&&0===m.count()&&i&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(n){return void f.onError(n)}e.setDisposable(h.take(1).subscribe(qb,f.onError.bind(f),j)),l.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){i=!0,(h||0===m.count())&&f.onCompleted()})),g})},Nc.groupJoin=function(a,b,c,d){var e=this;return new Dd(function(f){function g(a){return function(b){b.onError(a)}}var h=new ic,i=new pc(h),j=new wd,k=new wd,l=0,m=0;return h.add(e.subscribe(function(a){var c=new Gd,e=l++;j.add(e,c);var m;try{m=d(a,fc(c,i))}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}f.onNext(m),k.getValues().forEach(function(a){c.onNext(a)});var o=new nc;h.add(o);var p,q=function(){j.remove(e)&&c.onCompleted(),h.remove(o)};try{p=b(a)}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}o.setDisposable(p.take(1).subscribe(qb,function(a){j.getValues().forEach(g(a)),f.onError(a)},q))},function(a){j.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=m++;k.add(b,a);var d=new nc;h.add(d);var e,i=function(){k.remove(b),h.remove(d)};try{e=c(a)}catch(l){return j.getValues().forEach(g(l)),void f.onError(l)}d.setDisposable(e.take(1).subscribe(qb,function(a){j.getValues().forEach(g(a)),f.onError(a)},i)),j.getValues().forEach(function(b){b.onNext(a)})},function(a){j.getValues().forEach(g(a)),f.onError(a)})),i})},Nc.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},Nc.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?W.call(this,a):"function"==typeof a?X.call(this,a):V.call(this,a,b)},Nc.pairwise=function(){var a=this;return new Dd(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))})},Nc.partition=function(a,b){var c=this.publish().refCount();return[c.filter(a,b),c.filter(function(c,d,e){return!a.call(b,c,d,e)})]},Nc.letBind=Nc.let=function(a){return a(this)},Tc["if"]=Tc.ifThen=function(a,b,c){return Vc(function(){return c||(c=Wc()),xb(b)&&(b=Uc(b)),xb(c)&&(c=Uc(c)),"function"==typeof c.now&&(c=Wc(c)),a()?b:c})},Tc["for"]=Tc.forIn=function(a,b,c){return Kc(a,b,c).concat()};var xd=Tc["while"]=Tc.whileDo=function(a,b){return xb(b)&&(b=Uc(b)),Y(a,b).concat()};Nc.doWhile=function(a){return dd([this,xd(a,this)])},Tc["case"]=Tc.switchCase=function(a,b,c){return Vc(function(){xb(c)&&(c=Uc(c)),c||(c=Wc()),"function"==typeof c.now&&(c=Wc(c));var d=b[a()];return xb(d)&&(d=Uc(d)),d||c})},Nc.expand=function(a,b){rb(b)||(b=vc);var c=this;return new Dd(function(d){var e=[],f=new oc,g=new ic(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new nc;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g})},Tc.forkJoin=function(){var a=j(arguments,0);return new Dd(function(b){var c=a.length;if(0===c)return b.onCompleted(),mc;for(var d=new ic,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];xb(j)&&(j=Uc(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},Nc.forkJoin=function(a,b){var c=this;return new Dd(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new nc,l=new nc;return xb(a)&&(a=Uc(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new ic(k,l)})},Nc.manySelect=function(a,b){rb(b)||(b=vc);var c=this;return Vc(function(){var d;return c.map(function(a){var b=new yd(a);return d&&d.onNext(a),d=b,b}).tap(qb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)})};var yd=function(a){function b(a){var b=this,c=new ic;return c.add(wc.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeAll().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new Hd}return dc(c,a),ec(c.prototype,Lc,{onCompleted:function(){this.onNext(Tc.empty())},onError:function(a){this.onNext(Tc.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(Tc),zd=kb.Map||function(){function b(){this._keys=[],this._values=[]}return b.prototype.get=function(b){var c=this._keys.indexOf(b);return-1!==c?this._values[c]:a},b.prototype.set=function(a,b){var c=this._keys.indexOf(a);-1!==c&&(this._values[c]=b),this._values[this._keys.push(a)-1]=b},b.prototype.forEach=function(a,b){for(var c=0,d=this._keys.length;d>c;c++)a.call(b,this._values[c],this._keys[c])},b}();Z.prototype.and=function(a){return new Z(this.patterns.concat(a))},Z.prototype.thenDo=function(a){return new $(this,a)},$.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(_(a,this.expression.patterns[f],b.onError.bind(b)));var h=new ab(e,function(){var a;try{a=d.selector.apply(d,arguments)}catch(c){return void b.onError(c)}b.onNext(a)},function(){for(var a=0,b=e.length;b>a;a++)e[a].removeActivePlan(h);c(h)});for(f=0,g=e.length;g>f;f++)e[f].addActivePlan(h);return h},ab.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},ab.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;ac;c++)b[c].match()}},c.error=qb,c.completed=qb,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(Oc);Nc.and=function(a){return new Z([this,a])},Nc.thenDo=function(a){return new Z([this]).thenDo(a)},Tc.when=function(){var a=j(arguments,0);return new Dd(function(b){var c=[],d=new zd,e=Mc(b.onNext.bind(b),function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},b.onCompleted.bind(b));try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){ad(h).subscribe(b)}var i=new ic;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var Bd=Tc.interval=function(a,b){return fb(a,a,rb(b)?b:Bc)},Cd=Tc.timer=function(b,c,d){var e;return rb(d)||(d=Bc),c!==a&&"number"==typeof c?e=c:rb(c)&&(d=c),b instanceof Date&&e===a?bb(b.getTime(),d):b instanceof Date&&e!==a?(e=c,db(b.getTime(),e,d)):e===a?eb(b,d):fb(b,e,d)};Nc.delay=function(a,b){return rb(b)||(b=Bc),a instanceof Date?hb(this,a.getTime(),b):gb(this,a,b)},Nc.debounce=Nc.throttleWithTimeout=function(a,b){rb(b)||(b=Bc);var c=this;return new Dd(function(d){var e,f=new oc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new nc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new ic(i,f)})},Nc.throttle=function(a,b){return Ib("throttle","debounce or throttleWithTimeout"),this.debounce(a,b)},Nc.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),rb(c)||(c=Bc),"number"==typeof b?d=b:rb(b)&&(d=a,c=b),new Dd(function(b){function f(){var a=new nc,e=!1,g=!1;l.setDisposable(a),j===i?(e=!0,g=!0):i>j?e=!0:g=!0;var n=e?j:i,o=n-m;m=n,e&&(j+=d),g&&(i+=d),a.setDisposable(c.scheduleWithRelative(o,function(){if(g){var a=new Gd;k.push(a),b.onNext(fc(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new oc,m=0;return g=new ic(l),h=new pc(g),k.push(new Gd),b.onNext(fc(k[0],h)),f(),g.add(e.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h})},Nc.windowWithTimeOrCount=function(a,b,c){var d=this;return rb(c)||(c=Bc),new Dd(function(e){function f(b){var d=new nc;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new Gd,e.onNext(fc(l,i)),f(a)}}))}var g=new oc,h=new ic(g),i=new pc(h),j=0,k=0,l=new Gd;return e.onNext(fc(l,i)),f(0),h.add(d.subscribe(function(a){var c=0,d=!1;l.onNext(a),++j===b&&(d=!0,j=0,c=++k,l.onCompleted(),l=new Gd,e.onNext(fc(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i})},Nc.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},Nc.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},Nc.timeInterval=function(a){var b=this;return rb(a)||(a=Bc),Vc(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},Nc.timestamp=function(a){return rb(a)||(a=Bc),this.map(function(b){return{value:b,timestamp:a.now()}})},Nc.sample=Nc.throttleLatest=function(a,b){return rb(b)||(b=Bc),"number"==typeof a?ib(this,Bd(a,b)):ib(this,a)},Nc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=ad(new Error(b||"Timeout"))),rb(c)||(c=Bc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Dd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(xb(b)&&(b=Uc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new nc,j=new oc,k=!1,l=new oc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new ic(j,l)})},Tc.generateWithAbsoluteTime=function(a,b,c,d,e,f){return rb(f)||(f=Bc),new Dd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithAbsolute(f.now(),function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Tc.generateWithRelativeTime=function(a,b,c,d,e,f){return rb(f)||(f=Bc),new Dd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithRelative(0,function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Nc.delaySubscription=function(a,b){return this.delayWithSelector(Cd(a,rb(b)?b:Bc),Wc)},Nc.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new Dd(function(a){var b=new ic,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new oc,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new nc;b.add(h),h.setDisposable(e.subscribe(function(){a.onNext(c),b.remove(h),g()},a.onError.bind(a),function(){a.onNext(c),b.remove(h),g()}))},a.onError.bind(a),function(){f=!0,h.dispose(),g()}))};return c?h.setDisposable(c.subscribe(function(){i()},a.onError.bind(a),function(){i()})):i(),new ic(h,b)})},Nc.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=$c()),c||(c=ad(new Error("Timeout")));var d=this;return new Dd(function(e){function f(a){function b(){return k===d}var d=k,f=new nc;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new oc,i=new oc,j=new nc;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(xb(c)?Uc(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new ic(h,i)})},Nc.debounceWithSelector=function(a){var b=this;return new Dd(function(c){var d,e=!1,f=new oc,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}xb(h)&&(h=Uc(h)),e=!0,d=b,g++;var j=g,k=new nc;f.setDisposable(k),k.setDisposable(h.subscribe(function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()},c.onError.bind(c),function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new ic(h,f)})},Nc.throttleWithSelector=function(){return Ib("throttleWithSelector","debounceWithSelector"),this.debounceWithSelector.apply(this,arguments)},Nc.skipLastWithTime=function(a,b){rb(b)||(b=Bc);var c=this;return new Dd(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},d.onError.bind(d),function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})})},Nc.takeLastWithTime=function(a,b){var c=this;return rb(b)||(b=Bc),new Dd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})})},Nc.takeLastBufferWithTime=function(a,b){var c=this;return rb(b)||(b=Bc),new Dd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})})},Nc.takeWithTime=function(a,b){var c=this;return rb(b)||(b=Bc),new Dd(function(d){return new ic(b.scheduleWithRelative(a,d.onCompleted.bind(d)),c.subscribe(d))})},Nc.skipWithTime=function(a,b){var c=this;return rb(b)||(b=Bc),new Dd(function(d){var e=!1;return new ic(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))})},Nc.skipUntilWithTime=function(a,b){rb(b)||(b=Bc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Dd(function(e){var f=!1;return new ic(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},e.onError.bind(e),e.onCompleted.bind(e)))})},Nc.takeUntilWithTime=function(a,b){rb(b)||(b=Bc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Dd(function(e){return new ic(b[d](a,e.onCompleted.bind(e)),c.subscribe(e))})},Nc.throttleFirst=function(a,b){rb(b)||(b=Bc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Dd(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},a.onError.bind(a),a.onCompleted.bind(a))})},Nc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new Dd(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})})},Nc.exclusive=function(){var a=this;return new Dd(function(b){var c=!1,d=!1,e=new nc,f=new ic;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,xb(a)&&(a=Uc(a));var e=new nc;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f})},Nc.exclusiveMap=function(a,b){var c=this;return new Dd(function(d){var e=0,f=!1,g=!0,h=new nc,i=new ic;return i.add(h),h.setDisposable(c.subscribe(function(c){f||(f=!0,innerSubscription=new nc,i.add(innerSubscription),xb(c)&&(c=Uc(c)),innerSubscription.setDisposable(c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),function(){i.remove(innerSubscription),f=!1,g&&1===i.length&&d.onCompleted()})))},d.onError.bind(d),function(){g=!0,1!==i.length||f||d.onCompleted()})),i})},pb.VirtualTimeScheduler=function(a){function b(){throw new Error("Not implemented")}function c(){return this.toDateTimeOffset(this.clock)}function d(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function e(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function f(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function g(a,b){return b(),mc}function h(b,g){this.clock=b,this.comparer=g,this.isEnabled=!1,this.queue=new gc(1024),a.call(this,c,d,e,f)}dc(h,a);var i=h.prototype;return i.add=b,i.toDateTimeOffset=b,i.toRelative=b,i.schedulePeriodicWithState=function(a,b,c){var d=new uc(this,a,b,c);return d.start()},i.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},i.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,g)},i.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},i.stop=function(){this.isEnabled=!1},i.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Error(Bb);if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},i.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Error(Bb);0!==c&&this.advanceTo(b)},i.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Error(Bb);this.clock=b},i.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},i.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,g)},i.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new qc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},h}(rc),pb.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||vb;a.call(this,d,e)}dc(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(pb.VirtualTimeScheduler);var Dd=pb.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?lc(a):mc}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new Ed(a);return wc.scheduleRequired()?wc.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return dc(c,a),c}(Tc),Ed=function(a){function b(b){a.call(this),this.observer=b,this.m=new nc}dc(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Oc),Fd=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new Dd(function(a){return new ic(e.getDisposable(),d.subscribe(a))}):d}return dc(c,a),c}(Tc),Gd=pb.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),mc):(a.onCompleted(),mc):(this.observers.push(a),new sd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return dc(d,a),ec(d.prototype,Lc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Id(a,b)},d}(Tc),Hd=pb.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new sd(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),mc}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return dc(d,a),ec(d.prototype,Lc,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Tc),Id=pb.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return dc(b,a),ec(b.prototype,Lc,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(Tc);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(kb.Rx=pb,define(function(){return pb})):lb&&mb?nb?(mb.exports=pb).Rx=pb:lb.Rx=pb:kb.Rx=pb}).call(this); +})})},Xc=Math.pow(2,53)-1;n.prototype[Db]=function(){return new o(this._s)},o.prototype[Db]=function(){return this},o.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};Tc.generate=function(a,b,c,d,e){return rb(e)||(e=wc),new Dd(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})},Tc.of=function(){return w(null,arguments)},Tc.ofWithScheduler=function(a){return w(a,cc.call(arguments,1))};var $c=Tc.never=function(){return new Dd(function(){return mc})};Tc.range=function(a,b,c){return rb(c)||(c=wc),new Dd(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},Tc.repeat=function(a,b,c){return rb(c)||(c=wc),_c(a,c).repeat(null==b?-1:b)};var _c=Tc["return"]=Tc.just=function(a,b){return rb(b)||(b=vc),new Dd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Tc.returnValue=function(){return Ib("returnValue","return or just"),_c.apply(null,arguments)};var ad=Tc["throw"]=Tc.throwException=Tc.throwError=function(a,b){return rb(b)||(b=vc),new Dd(function(c){return b.schedule(function(){c.onError(a)})})};Tc.using=function(a,b){return new Dd(function(c){var d,e,f=mc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new ic(ad(g).subscribe(c),f)}return new ic(e.subscribe(c),f)})},Nc.amb=function(a){var b=this;return new Dd(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new nc,j=new nc;return xb(a)&&(a=Uc(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new ic(i,j)})},Tc.amb=function(){function a(a,b){return a.amb(b)}for(var b=$c(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},Nc["catch"]=Nc.catchError=function(a){return"function"==typeof a?x(this,a):bd([this,a])},Nc.catchException=function(a){return Ib("catchException","catch or catchError"),this.catchError(a)};var bd=Tc.catchError=Tc["catch"]=function(){return Kc(j(arguments,0)).catchError()};Tc.catchException=function(){return Ib("catchException","catch or catchError"),bd.apply(null,arguments)},Nc.combineLatest=function(){var a=cc.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),cd.apply(this,a)};var cd=Tc.combineLatest=function(){var a=cc.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Dd(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(sb))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(sb)&&c.onCompleted()}function e(a){j[a]=!0,j.every(sb)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new nc;xb(f)&&(f=Uc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new ic(m)})};Nc.concat=function(){var a=cc.call(arguments,0);return a.unshift(this),dd.apply(this,a)};var dd=Tc.concat=function(){return Kc(j(arguments,0)).concat()};Nc.concatAll=function(){return this.merge(1)},Nc.concatObservable=function(){return Ib("concatObservable","concatAll"),this.merge(1)},Nc.merge=function(a){if("number"!=typeof a)return ed(this,a);var b=this;return new Dd(function(c){function d(a){var b=new nc;f.add(b),xb(a)&&(a=Uc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new ic,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var ed=Tc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=cc.call(arguments,1)):(a=vc,b=cc.call(arguments,0)):(a=vc,b=cc.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),w(a,b).mergeAll()};Nc.mergeAll=function(){var a=this;return new Dd(function(b){var c=new ic,d=!1,e=new nc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new nc;c.add(e),xb(a)&&(a=Uc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},Nc.mergeObservable=function(){return Ib("mergeObservable","mergeAll"),this.mergeAll.apply(this,arguments)},Nc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return fd([this,a])};var fd=Tc.onErrorResumeNext=function(){var a=j(arguments,0);return new Dd(function(b){var c=0,d=new oc,e=vc.scheduleRecursive(function(e){var f,g;c0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(sb)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new nc;xb(c)&&(c=Uc(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new ic(j)})},Tc.zip=function(){var a=cc.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},Tc.zipArray=function(){var a=j(arguments,0);return new Dd(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(sb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(sb)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new nc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new ic(h);return j.add(lc(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},Nc.asObservable=function(){return new Dd(this.subscribe.bind(this))},Nc.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},Nc.dematerialize=function(){var a=this;return new Dd(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},Nc.distinctUntilChanged=function(a,b){var c=this;return a||(a=sb),b||(b=ub),new Dd(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},Nc["do"]=Nc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new Dd(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b)try{b(c)}catch(d){a.onError(d)}a.onError(c)},function(){if(c)try{c()}catch(b){a.onError(b)}a.onCompleted()})})},Nc.doAction=function(){return Ib("doAction","do or tap"),this.tap.apply(this,arguments)},Nc.doOnNext=Nc.tapOnNext=function(a,b){return this.tap(2===arguments.length?function(c){a.call(b,c)}:a)},Nc.doOnError=Nc.tapOnError=function(a,b){return this.tap(qb,2===arguments.length?function(c){a.call(b,c)}:a)},Nc.doOnCompleted=Nc.tapOnCompleted=function(a,b){return this.tap(qb,null,2===arguments.length?function(){a.call(b)}:a)},Nc["finally"]=Nc.ensure=function(a){var b=this;return new Dd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return lc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},Nc.finallyAction=function(a){return Ib("finallyAction","finally or ensure"),this.ensure(a)},Nc.ignoreElements=function(){var a=this;return new Dd(function(b){return a.subscribe(qb,b.onError.bind(b),b.onCompleted.bind(b))})},Nc.materialize=function(){var a=this;return new Dd(function(b){return a.subscribe(function(a){b.onNext(Ec(a))},function(a){b.onNext(Fc(a)),b.onCompleted()},function(){b.onNext(Gc()),b.onCompleted()})})},Nc.repeat=function(a){return Jc(this,a).concat()},Nc.retry=function(a){return Jc(this,a).catchError()},Nc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new Dd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},Nc.skipLast=function(a){var b=this;return new Dd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},Nc.startWith=function(){var a,b,c=0;return arguments.length&&rb(arguments[0])?(b=arguments[0],c=1):b=vc,a=cc.call(arguments,c),Kc([Zc(a,b),this]).concat()},Nc.takeLast=function(a){var b=this;return new Dd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},Nc.takeLastBuffer=function(a){var b=this;return new Dd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},Nc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(Bb);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(Bb);return new Dd(function(d){function e(){var a=new Gd;i.push(a),d.onNext(fc(a,g))}var f=new nc,g=new pc(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g})},Nc.selectConcat=Nc.concatMap=function(a,b,c){return zb(a)&&zb(b)?this.concatMap(function(c,d){var e=a(c,d);return xb(e)&&(e=Uc(e)),(Gb(e)||Fb(e))&&(e=Yc(e)),e.map(function(a,e){return b(c,a,d,e)})}):zb(a)?z(this,a,c):z(this,function(){return a})},Nc.concatMapObserver=Nc.selectConcatObserver=function(a,b,c,d){var e=this;return new Dd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}xb(c)&&(c=Uc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}xb(c)&&(c=Uc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}xb(a)&&(a=Uc(a)),f.onNext(a),f.onCompleted()})}).concatAll()},Nc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Dd(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},B.prototype.push=function(a){var b=-1===A(this.set,a,this.comparer);return b&&this.set.push(a),b},Nc.distinct=function(a,b){var c=this;return b||(b=ub),new Dd(function(d){var e=new B(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},Nc.groupBy=function(a,b,c){return this.groupByUntil(a,b,$c,c)},Nc.groupByUntil=function(a,b,c,d){var e=this;return b||(b=sb),d||(d=ub),new Dd(function(f){function g(a){return function(b){b.onError(a)}}var h=new wd(0,d),i=new ic,j=new pc(i);return i.add(e.subscribe(function(d){var e;try{e=a(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}var l=!1,m=h.tryGetValue(e);if(m||(m=new Gd,h.set(e,m),l=!0),l){var n=new Fd(e,m,j),o=new Fd(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new nc;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(qb,function(a){h.getValues().forEach(g(a)),f.onError(a)},q))}var r;try{r=b(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}m.onNext(r)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),j})},Nc.select=Nc.map=function(a,b){var c=zb(a)?a:function(){return a},d=this;return new Dd(function(a){var e=0;return d.subscribe(function(f){var g;try{g=c.call(b,f,e++,d)}catch(h){return void a.onError(h)}a.onNext(g)},a.onError.bind(a),a.onCompleted.bind(a))})},Nc.pluck=function(a){return this.map(function(b){return b[a]})},Nc.selectMany=Nc.flatMap=function(a,b,c){return zb(a)&&zb(b)?this.flatMap(function(c,d){var e=a(c,d);return xb(e)&&(e=Uc(e)),(Gb(e)||Fb(e))&&(e=Yc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):zb(a)?C(this,a,c):C(this,function(){return a})},Nc.flatMapObserver=Nc.selectManyObserver=function(a,b,c,d){var e=this;return new Dd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}xb(c)&&(c=Uc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}xb(c)&&(c=Uc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}xb(a)&&(a=Uc(a)),f.onNext(a),f.onCompleted()})}).mergeAll()},Nc.selectSwitch=Nc.flatMapLatest=Nc.switchMap=function(a,b){return this.select(a,b).switchLatest()},Nc.skip=function(a){if(0>a)throw new Error(Bb);var b=this;return new Dd(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},Nc.skipWhile=function(a,b){var c=this;return new Dd(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Nc.take=function(a,b){if(0>a)throw new RangeError(Bb);if(0===a)return Wc(b);var c=this;return new Dd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},Nc.takeWhile=function(a,b){var c=this;return new Dd(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},Nc.where=Nc.filter=function(a,b){var c=this;return new Dd(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},Nc.finalValue=function(){var a=this;return new Dd(function(b){var c,d=!1;return a.subscribe(function(a){d=!0,c=a},b.onError.bind(b),function(){d?(b.onNext(c),b.onCompleted()):b.onError(new Error(Ab))})})},Nc.aggregate=function(){Ib("aggregate","reduce");var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},Nc.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},Nc.some=function(a,b){var c=this;return a?c.filter(a,b).some():new Dd(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},Nc.any=function(){return Ib("any","some"),this.some.apply(this,arguments)},Nc.isEmpty=function(){return this.any().map(yb)},Nc.every=function(a,b){return this.filter(function(b){return!a(b)},b).some().map(yb)},Nc.all=function(){return Ib("all","every"),this.every.apply(this,arguments)},Nc.contains=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new Dd(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),mc):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},e.onError.bind(e),function(){e.onNext(!1),e.onCompleted()})})},Nc.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},Nc.indexOf=function(a,b){var c=this;return new Dd(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),mc):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},d.onError.bind(d),function(){d.onNext(-1),d.onCompleted()})})},Nc.sum=function(a,b){return a&&zb(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},Nc.minBy=function(a,b){return b||(b=vb),D(this,a,function(a,c){return-1*b(a,c)})},Nc.min=function(a){return this.minBy(sb,a).map(function(a){return E(a)})},Nc.maxBy=function(a,b){return b||(b=vb),D(this,a,b)},Nc.max=function(a){return this.maxBy(sb,a).map(function(a){return E(a)})},Nc.average=function(a,b){return a&&zb(a)?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().map(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},Nc.sequenceEqual=function(a,b){var c=this;return b||(b=ub),new Dd(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(Gb(a)||Fb(a))&&(a=Yc(a)),xb(a)&&(a=Uc(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new ic(i,j)})},Nc.elementAt=function(a){return F(this,a,!1)},Nc.elementAtOrDefault=function(a,b){return F(this,a,!0,b)},Nc.single=function(a,b){return a&&zb(a)?this.where(a,b).single():G(this,!1)},Nc.singleOrDefault=function(a,b,c){return a&&zb(a)?this.where(a,c).singleOrDefault(null,b):G(this,!0,b)},Nc.first=function(a,b){return a?this.where(a,b).first():H(this,!1)},Nc.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):H(this,!0,b)},Nc.last=function(a,b){return a?this.where(a,b).last():I(this,!1)},Nc.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):I(this,!0,b)},Nc.find=function(a,b){return J(this,a,b,!1)},Nc.findIndex=function(a,b){return J(this,a,b,!0)},kb.Set&&(Nc.toSet=function(){var a=this;return new Dd(function(b){var c=new kb.Set;return a.subscribe(c.add.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})}),kb.Map&&(Nc.toMap=function(a,b){var c=this;return new Dd(function(d){var e=new kb.Map;return c.subscribe(function(c){var f;try{f=a(c)}catch(g){return void d.onError(g)}var h=c;if(b)try{h=b(c)}catch(g){return void d.onError(g)}e.set(f,h)},d.onError.bind(d),function(){d.onNext(e),d.onCompleted()})})});var gd="function",hd="throw",id=pb.spawn=function(a){var b=P(a);return function(c){function d(a,b){Bc.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2&&(b=cc.call(arguments,1)),a)try{c=g[hd](a)}catch(h){return d(h)}if(!a)try{c=g.next(b)}catch(h){return d(h)}if(c.done)return d(null,c.value);if(c.value=K(c.value,f),typeof c.value!==gd)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var i=!1;try{c.value.call(f,function(){i||(i=!0,e.apply(f,arguments))})}catch(h){Bc.schedule(function(){i||(i=!0,e.call(f,h))})}}}var f=this,g=a;if(b){var h=cc.call(arguments),i=h.length,j=i&&typeof h[i-1]===gd;c=j?h.pop():R,g=a.apply(this,h)}else c=c||R;e()}};pb.denodify=function(a){return function(){var b,c,d,e=cc.call(arguments);return e.push(function(){b=arguments,d&&!c&&(c=!0,cb.apply(this,b))}),a.apply(this,e),function(a){d=a,b&&!c&&(c=!0,a.apply(this,b))}}},Tc.start=function(a,b,c){return jd(a,b,c)()};var jd=Tc.toAsync=function(a,b,c){return rb(c)||(c=Bc),function(){var d=arguments,e=new Hd;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};Tc.fromCallback=function(a,b,c){return function(){var d=cc.call(arguments,0);return new Dd(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Tc.fromNodeCallback=function(a,b,c){return function(){var d=cc.call(arguments,0);return new Dd(function(e){function f(a){if(a)return void e.onError(a);var b=cc.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},pb.config.useNativeEvents=!1;var kd=kb.angular&&angular.element?angular.element:kb.jQuery?kb.jQuery:kb.Zepto?kb.Zepto:null,ld=!!kb.Ember&&"function"==typeof kb.Ember.addListener,md=!!kb.Backbone&&!!kb.Backbone.Marionette;Tc.fromEvent=function(a,b,c){if(a.addListener)return nd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!pb.config.useNativeEvents){if(md)return nd(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(ld)return nd(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c);if(kd){var d=kd(a);return nd(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}}return new Dd(function(d){return T(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var nd=Tc.fromEventPattern=function(a,b,c){return new Dd(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return lc(function(){b&&b(e,f)})}).publish().refCount()};Tc.startAsync=function(a){var b;try{b=a()}catch(c){return ad(c)}return Uc(b)};var od=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=mc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=mc)});return new ic(c,d,e)}function c(c,d){this.source=c,this.controller=new Gd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return dc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Tc);Nc.pausable=function(a){return new od(this,a)};var pd=function(b){function c(b){var c,d=[],e=U(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new Gd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c)}return dc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Tc);Nc.pausableBuffered=function(a){return new pd(this,a)},Nc.controlled=function(a){return null==a&&(a=!0),new qd(this,a)};var qd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new rd(d),this.source=c.multicast(this.subject).refCount()}return dc(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Tc),rd=pb.ControlledSubject=function(a){function c(a){return this.subject.subscribe(a)}function d(b){null==b&&(b=!0),a.call(this,c),this.subject=new Gd,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=mc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=mc}return dc(d,a),ec(d.prototype,Lc,{onCompleted:function(){b.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){b.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){b.call(this);var c=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),c=!0),c&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=mc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=mc),{numberOfItems:a,returnValue:!1}},request:function(a){b.call(this),this.disposeCurrentRequest();var c=this,d=this._processRequest(a);return a=d.numberOfItems,d.returnValue?mc:(this.requestedCount=a,this.requestedDisposable=lc(function(){c.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=mc},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),d}(Tc);Nc.multicast=function(a,b){var c=this;return"function"==typeof a?new Dd(function(d){var e=c.multicast(a());return new ic(b(e).subscribe(d),e.connect())}):new vd(c,a)},Nc.publish=function(a){return a&&zb(a)?this.multicast(function(){return new Gd},a):this.multicast(new Gd)},Nc.share=function(){return this.publish().refCount()},Nc.publishLast=function(a){return a&&zb(a)?this.multicast(function(){return new Hd},a):this.multicast(new Hd)},Nc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new td(b)},a):this.multicast(new td(a))},Nc.shareValue=function(a){return this.publishValue(a).refCount()},Nc.replay=function(a,b,c,d){return a&&zb(a)?this.multicast(function(){return new ud(b,c,d)},a):this.multicast(new ud(b,c,d))},Nc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var sd=function(a,b){this.subject=a,this.observer=b};sd.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var td=pb.BehaviorSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new sd(this,a);var c=this.exception;return c?a.onError(c):a.onCompleted(),mc}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return dc(d,a),ec(d.prototype,Lc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=this.observers.slice(0),d=c.length;d>a;a++)c[a].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped){this.value=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Tc),ud=pb.ReplaySubject=function(a){function c(a,b){return lc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var d=new Rc(this.scheduler,a),e=c(this,d);b.call(this),this._trim(this.scheduler.now()),this.observers.push(d);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)d.onNext(this.q[g].value);return this.hasError?(f++,d.onError(this.error)):this.isStopped&&(f++,d.onCompleted()),d.ensureActive(f),e}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||wc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return dc(e,a),ec(e.prototype,Lc,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++){var f=c[d];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Tc),vd=pb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new ic(f.subscribe(c),lc(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return dc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Dd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Tc),wd=function(){function b(a){if(a&!1)return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function c(a){var c,d,e;for(c=0;c=a)return d; +for(e=1|a;ec;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||ub,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return d(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return d(b.toString());if("function"==typeof b.valueOf){var c=b.valueOf();if("number"==typeof c)return e(c);if("string"==typeof b)return d(c)}if(b.getHashCode)return b.getHashCode();var f=17*a++;return b.getHashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var b,d=c(a);for(this.buckets=new Array(d),this.entries=new Array(d),b=0;d>b;b++)this.buckets[b]=-1,this.entries[b]=f();this.freeList=-1},l.add=function(a,b){return this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=c(2*this.size),b=new Array(a);for(e=0;ee;++e)d[e]=f();for(var g=0;g=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(b){var c=this._findEntry(b);return c>=0?this.entries[c].value:a},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();Nc.join=function(a,b,c,d){var e=this;return new Dd(function(f){var g=new ic,h=!1,i=!1,j=0,k=0,l=new wd,m=new wd;return g.add(e.subscribe(function(a){var c=j++,e=new nc;l.add(c,a),g.add(e);var i,k=function(){l.remove(c)&&0===l.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(n){return void f.onError(n)}e.setDisposable(i.take(1).subscribe(qb,f.onError.bind(f),k)),m.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(i||0===l.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=k++,e=new nc;m.add(b,a),g.add(e);var h,j=function(){m.remove(b)&&0===m.count()&&i&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(n){return void f.onError(n)}e.setDisposable(h.take(1).subscribe(qb,f.onError.bind(f),j)),l.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){i=!0,(h||0===m.count())&&f.onCompleted()})),g})},Nc.groupJoin=function(a,b,c,d){var e=this;return new Dd(function(f){function g(a){return function(b){b.onError(a)}}var h=new ic,i=new pc(h),j=new wd,k=new wd,l=0,m=0;return h.add(e.subscribe(function(a){var c=new Gd,e=l++;j.add(e,c);var m;try{m=d(a,fc(c,i))}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}f.onNext(m),k.getValues().forEach(function(a){c.onNext(a)});var o=new nc;h.add(o);var p,q=function(){j.remove(e)&&c.onCompleted(),h.remove(o)};try{p=b(a)}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}o.setDisposable(p.take(1).subscribe(qb,function(a){j.getValues().forEach(g(a)),f.onError(a)},q))},function(a){j.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=m++;k.add(b,a);var d=new nc;h.add(d);var e,i=function(){k.remove(b),h.remove(d)};try{e=c(a)}catch(l){return j.getValues().forEach(g(l)),void f.onError(l)}d.setDisposable(e.take(1).subscribe(qb,function(a){j.getValues().forEach(g(a)),f.onError(a)},i)),j.getValues().forEach(function(b){b.onNext(a)})},function(a){j.getValues().forEach(g(a)),f.onError(a)})),i})},Nc.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},Nc.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?W.call(this,a):"function"==typeof a?X.call(this,a):V.call(this,a,b)},Nc.pairwise=function(){var a=this;return new Dd(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))})},Nc.partition=function(a,b){var c=this.publish().refCount();return[c.filter(a,b),c.filter(function(c,d,e){return!a.call(b,c,d,e)})]},Nc.letBind=Nc.let=function(a){return a(this)},Tc["if"]=Tc.ifThen=function(a,b,c){return Vc(function(){return c||(c=Wc()),xb(b)&&(b=Uc(b)),xb(c)&&(c=Uc(c)),"function"==typeof c.now&&(c=Wc(c)),a()?b:c})},Tc["for"]=Tc.forIn=function(a,b,c){return Kc(a,b,c).concat()};var xd=Tc["while"]=Tc.whileDo=function(a,b){return xb(b)&&(b=Uc(b)),Y(a,b).concat()};Nc.doWhile=function(a){return dd([this,xd(a,this)])},Tc["case"]=Tc.switchCase=function(a,b,c){return Vc(function(){xb(c)&&(c=Uc(c)),c||(c=Wc()),"function"==typeof c.now&&(c=Wc(c));var d=b[a()];return xb(d)&&(d=Uc(d)),d||c})},Nc.expand=function(a,b){rb(b)||(b=vc);var c=this;return new Dd(function(d){var e=[],f=new oc,g=new ic(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new nc;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g})},Tc.forkJoin=function(){var a=j(arguments,0);return new Dd(function(b){var c=a.length;if(0===c)return b.onCompleted(),mc;for(var d=new ic,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];xb(j)&&(j=Uc(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},Nc.forkJoin=function(a,b){var c=this;return new Dd(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new nc,l=new nc;return xb(a)&&(a=Uc(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new ic(k,l)})},Nc.manySelect=function(a,b){rb(b)||(b=vc);var c=this;return Vc(function(){var d;return c.map(function(a){var b=new yd(a);return d&&d.onNext(a),d=b,b}).tap(qb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)})};var yd=function(a){function b(a){var b=this,c=new ic;return c.add(wc.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeAll().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new Hd}return dc(c,a),ec(c.prototype,Lc,{onCompleted:function(){this.onNext(Tc.empty())},onError:function(a){this.onNext(Tc.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(Tc),zd=kb.Map||function(){function b(){this._keys=[],this._values=[]}return b.prototype.get=function(b){var c=this._keys.indexOf(b);return-1!==c?this._values[c]:a},b.prototype.set=function(a,b){var c=this._keys.indexOf(a);-1!==c&&(this._values[c]=b),this._values[this._keys.push(a)-1]=b},b.prototype.forEach=function(a,b){for(var c=0,d=this._keys.length;d>c;c++)a.call(b,this._values[c],this._keys[c])},b}();Z.prototype.and=function(a){return new Z(this.patterns.concat(a))},Z.prototype.thenDo=function(a){return new $(this,a)},$.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(_(a,this.expression.patterns[f],b.onError.bind(b)));var h=new ab(e,function(){var a;try{a=d.selector.apply(d,arguments)}catch(c){return void b.onError(c)}b.onNext(a)},function(){for(var a=0,b=e.length;b>a;a++)e[a].removeActivePlan(h);c(h)});for(f=0,g=e.length;g>f;f++)e[f].addActivePlan(h);return h},ab.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},ab.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;ac;c++)b[c].match()}},c.error=qb,c.completed=qb,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(Oc);Nc.and=function(a){return new Z([this,a])},Nc.thenDo=function(a){return new Z([this]).thenDo(a)},Tc.when=function(){var a=j(arguments,0);return new Dd(function(b){var c=[],d=new zd,e=Mc(b.onNext.bind(b),function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},b.onCompleted.bind(b));try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){ad(h).subscribe(b)}var i=new ic;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var Bd=Tc.interval=function(a,b){return fb(a,a,rb(b)?b:Bc)},Cd=Tc.timer=function(b,c,d){var e;return rb(d)||(d=Bc),c!==a&&"number"==typeof c?e=c:rb(c)&&(d=c),b instanceof Date&&e===a?bb(b.getTime(),d):b instanceof Date&&e!==a?(e=c,db(b.getTime(),e,d)):e===a?eb(b,d):fb(b,e,d)};Nc.delay=function(a,b){return rb(b)||(b=Bc),a instanceof Date?hb(this,a.getTime(),b):gb(this,a,b)},Nc.debounce=Nc.throttleWithTimeout=function(a,b){rb(b)||(b=Bc);var c=this;return new Dd(function(d){var e,f=new oc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new nc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new ic(i,f)})},Nc.throttle=function(a,b){return Ib("throttle","debounce or throttleWithTimeout"),this.debounce(a,b)},Nc.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),rb(c)||(c=Bc),"number"==typeof b?d=b:rb(b)&&(d=a,c=b),new Dd(function(b){function f(){var a=new nc,e=!1,g=!1;l.setDisposable(a),j===i?(e=!0,g=!0):i>j?e=!0:g=!0;var n=e?j:i,o=n-m;m=n,e&&(j+=d),g&&(i+=d),a.setDisposable(c.scheduleWithRelative(o,function(){if(g){var a=new Gd;k.push(a),b.onNext(fc(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new oc,m=0;return g=new ic(l),h=new pc(g),k.push(new Gd),b.onNext(fc(k[0],h)),f(),g.add(e.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h})},Nc.windowWithTimeOrCount=function(a,b,c){var d=this;return rb(c)||(c=Bc),new Dd(function(e){function f(b){var d=new nc;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new Gd,e.onNext(fc(l,i)),f(a)}}))}var g=new oc,h=new ic(g),i=new pc(h),j=0,k=0,l=new Gd;return e.onNext(fc(l,i)),f(0),h.add(d.subscribe(function(a){var c=0,d=!1;l.onNext(a),++j===b&&(d=!0,j=0,c=++k,l.onCompleted(),l=new Gd,e.onNext(fc(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i})},Nc.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},Nc.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},Nc.timeInterval=function(a){var b=this;return rb(a)||(a=Bc),Vc(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},Nc.timestamp=function(a){return rb(a)||(a=Bc),this.map(function(b){return{value:b,timestamp:a.now()}})},Nc.sample=Nc.throttleLatest=function(a,b){return rb(b)||(b=Bc),"number"==typeof a?ib(this,Bd(a,b)):ib(this,a)},Nc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=ad(new Error(b||"Timeout"))),rb(c)||(c=Bc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Dd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(xb(b)&&(b=Uc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new nc,j=new oc,k=!1,l=new oc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new ic(j,l)})},Tc.generateWithAbsoluteTime=function(a,b,c,d,e,f){return rb(f)||(f=Bc),new Dd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithAbsolute(f.now(),function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Tc.generateWithRelativeTime=function(a,b,c,d,e,f){return rb(f)||(f=Bc),new Dd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithRelative(0,function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Nc.delaySubscription=function(a,b){return this.delayWithSelector(Cd(a,rb(b)?b:Bc),Wc)},Nc.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new Dd(function(a){var b=new ic,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new oc,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new nc;b.add(h),h.setDisposable(e.subscribe(function(){a.onNext(c),b.remove(h),g()},a.onError.bind(a),function(){a.onNext(c),b.remove(h),g()}))},a.onError.bind(a),function(){f=!0,h.dispose(),g()}))};return c?h.setDisposable(c.subscribe(function(){i()},a.onError.bind(a),function(){i()})):i(),new ic(h,b)})},Nc.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=$c()),c||(c=ad(new Error("Timeout")));var d=this;return new Dd(function(e){function f(a){function b(){return k===d}var d=k,f=new nc;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new oc,i=new oc,j=new nc;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(xb(c)?Uc(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new ic(h,i)})},Nc.debounceWithSelector=function(a){var b=this;return new Dd(function(c){var d,e=!1,f=new oc,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}xb(h)&&(h=Uc(h)),e=!0,d=b,g++;var j=g,k=new nc;f.setDisposable(k),k.setDisposable(h.subscribe(function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()},c.onError.bind(c),function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new ic(h,f)})},Nc.throttleWithSelector=function(){return Ib("throttleWithSelector","debounceWithSelector"),this.debounceWithSelector.apply(this,arguments)},Nc.skipLastWithTime=function(a,b){rb(b)||(b=Bc);var c=this;return new Dd(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},d.onError.bind(d),function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})})},Nc.takeLastWithTime=function(a,b){var c=this;return rb(b)||(b=Bc),new Dd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})})},Nc.takeLastBufferWithTime=function(a,b){var c=this;return rb(b)||(b=Bc),new Dd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})})},Nc.takeWithTime=function(a,b){var c=this;return rb(b)||(b=Bc),new Dd(function(d){return new ic(b.scheduleWithRelative(a,d.onCompleted.bind(d)),c.subscribe(d))})},Nc.skipWithTime=function(a,b){var c=this;return rb(b)||(b=Bc),new Dd(function(d){var e=!1;return new ic(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))})},Nc.skipUntilWithTime=function(a,b){rb(b)||(b=Bc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Dd(function(e){var f=!1;return new ic(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},e.onError.bind(e),e.onCompleted.bind(e)))})},Nc.takeUntilWithTime=function(a,b){rb(b)||(b=Bc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Dd(function(e){return new ic(b[d](a,e.onCompleted.bind(e)),c.subscribe(e))})},Nc.throttleFirst=function(a,b){rb(b)||(b=Bc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Dd(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},a.onError.bind(a),a.onCompleted.bind(a))})},Nc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new Dd(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})})},Nc.exclusive=function(){var a=this;return new Dd(function(b){var c=!1,d=!1,e=new nc,f=new ic;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,xb(a)&&(a=Uc(a));var e=new nc;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f})},Nc.exclusiveMap=function(a,b){var c=this;return new Dd(function(d){var e=0,f=!1,g=!0,h=new nc,i=new ic;return i.add(h),h.setDisposable(c.subscribe(function(c){f||(f=!0,innerSubscription=new nc,i.add(innerSubscription),xb(c)&&(c=Uc(c)),innerSubscription.setDisposable(c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),function(){i.remove(innerSubscription),f=!1,g&&1===i.length&&d.onCompleted()})))},d.onError.bind(d),function(){g=!0,1!==i.length||f||d.onCompleted()})),i})},pb.VirtualTimeScheduler=function(a){function b(){throw new Error("Not implemented")}function c(){return this.toDateTimeOffset(this.clock)}function d(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function e(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function f(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function g(a,b){return b(),mc}function h(b,g){this.clock=b,this.comparer=g,this.isEnabled=!1,this.queue=new gc(1024),a.call(this,c,d,e,f)}dc(h,a);var i=h.prototype;return i.add=b,i.toDateTimeOffset=b,i.toRelative=b,i.schedulePeriodicWithState=function(a,b,c){var d=new uc(this,a,b,c);return d.start()},i.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},i.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,g)},i.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},i.stop=function(){this.isEnabled=!1},i.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Error(Bb);if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},i.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Error(Bb);0!==c&&this.advanceTo(b)},i.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Error(Bb);this.clock=b},i.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},i.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,g)},i.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new qc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},h}(rc),pb.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||vb;a.call(this,d,e)}dc(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(pb.VirtualTimeScheduler);var Dd=pb.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?lc(a):mc}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new Ed(a);return wc.scheduleRequired()?wc.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return dc(c,a),c}(Tc),Ed=function(a){function b(b){a.call(this),this.observer=b,this.m=new nc}dc(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Oc),Fd=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new Dd(function(a){return new ic(e.getDisposable(),d.subscribe(a))}):d}return dc(c,a),c}(Tc),Gd=pb.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),mc):(a.onCompleted(),mc):(this.observers.push(a),new sd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return dc(d,a),ec(d.prototype,Lc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Id(a,b)},d}(Tc),Hd=pb.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new sd(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),mc}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return dc(d,a),ec(d.prototype,Lc,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Tc),Id=pb.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return dc(b,a),ec(b.prototype,Lc,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(Tc);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(kb.Rx=pb,define(function(){return pb})):lb&&mb?nb?(mb.exports=pb).Rx=pb:lb.Rx=pb:kb.Rx=pb}).call(this); //# sourceMappingURL=rx.all.map \ No newline at end of file diff --git a/dist/rx.compat.js b/dist/rx.compat.js index 8d0ec28a8..316ea4a4a 100644 --- a/dist/rx.compat.js +++ b/dist/rx.compat.js @@ -2445,7 +2445,7 @@ if (!Array.prototype.forEach) { * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence. */ var observableFromArray = Observable.fromArray = function (array, scheduler) { - //deprecate('fromArray', 'from'); + deprecate('fromArray', 'from'); isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new AnonymousObservable(function (observer) { var count = 0, len = array.length; diff --git a/dist/rx.compat.map b/dist/rx.compat.map index 804e66993..c019cc35d 100644 --- a/dist/rx.compat.map +++ b/dist/rx.compat.map @@ -1 +1 @@ -{"version":3,"file":"rx.compat.min.js","sources":["rx.compat.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","flatMap","mergeAll","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","notDefined","Scheduler","identity","defaultNow","pluck","property","just","Date","now","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","p","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","CompositeDisposable","getDisposable","Function","that","target","bound","F","apply","concat","forEach","T","k","O","kValue","boxedString","splitString","every","fun","split","thisp","filter","predicate","results","t","arg","indexOf","searchElement","n","Number","Infinity","max","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","disposables","CompositeDisposablePrototype","add","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","schedule","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelative","scheduleWithRelativeAndState","scheduleWithAbsolute","scheduleWithAbsoluteAndState","normalize","timeSpan","normalizeTime","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","isDone","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelative","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","period","schedulePeriodicWithState","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","immediateScheduler","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediate","scheduleNow","currentThread","runTrampoline","q","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","addEventListener","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","kind","hasValue","accept","observerOrOnNext","_acceptObservable","_accept","toObservable","notification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","next","_next","Enumerable","_iterator","cancelable","currentItem","currentValue","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","Observable","_subscribe","subscribeOnNext","subscribeOnError","subscribeOnCompleted","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","list","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","res","hasValueAll","values","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","materialize","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","createWindow","Subject","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","select","selectorFn","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","running","take","RangeError","observable","takeWhile","shouldRun","transduce","transducer","transformForObserver","init","step","obs","input","xform","fixSubscriber","subscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAsFlE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAW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ItY,GAAI,EAAG2B,EAAMgjB,EAAG3oB,OAAY2F,EAAJ3B,EAASA,IACxC2kB,EAAG3kB,GAAGuD,QAAQ+U,EAGhBld,MAAKqpB,eAOTjiB,OAAQ,SAAU/G,GAChBN,EAAcgB,KAAKf,MACfA,KAAKid,YACTjd,KAAKK,MAAQA,EACbL,KAAKya,UAAW,IAKlBvJ,QAAS,WACPlR,KAAKC,YAAa,EAClBD,KAAKqpB,UAAY,KACjBrpB,KAAKgI,UAAY,KACjBhI,KAAKK,MAAQ,QAIV0e,GACPZ,IAEqBzT,EAAG8e,iBAAoB,SAAU1P,GAGtD,QAAS0P,GAAiBviB,EAAUkhB,GAClCnoB,KAAKiH,SAAWA,EAChBjH,KAAKmoB,WAAaA,EAClBrO,EAAU/Y,KAAKf,KAAMA,KAAKmoB,WAAWrgB,UAAUC,KAAK/H,KAAKmoB,aAe3D,MApBA9a,IAASmc,EAAkB1P,GAQ3BrM,GAAc+b,EAAiB3nB,UAAWwa,IACxChV,YAAa,WACXrH,KAAKiH,SAASI,eAEhBc,QAAS,SAAUH,GACjBhI,KAAKiH,SAASkB,QAAQH,IAExBZ,OAAQ,SAAU/G,GAChBL,KAAKiH,SAASG,OAAO/G,MAIlBmpB,GACPrL,IAEqB,mBAAVuL,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvE9jB,EAAK6E,GAAKA,EAEVgf,OAAO,WACH,MAAOhf,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInB7E,EAAK6E,GAAKA,IAGhB3J,KAAKf"} \ No newline at end of file +{"version":3,"file":"rx.compat.min.js","sources":["rx.compat.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","flatMap","mergeAll","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","notDefined","Scheduler","identity","defaultNow","pluck","property","just","Date","now","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","p","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","CompositeDisposable","getDisposable","Function","that","target","bound","F","apply","concat","forEach","T","k","O","kValue","boxedString","splitString","every","fun","split","thisp","filter","predicate","results","t","arg","indexOf","searchElement","n","Number","Infinity","max","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","disposables","CompositeDisposablePrototype","add","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","schedule","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelative","scheduleWithRelativeAndState","scheduleWithAbsolute","scheduleWithAbsoluteAndState","normalize","timeSpan","normalizeTime","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","isDone","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelative","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","period","schedulePeriodicWithState","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","immediateScheduler","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediate","scheduleNow","currentThread","runTrampoline","q","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","addEventListener","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","kind","hasValue","accept","observerOrOnNext","_acceptObservable","_accept","toObservable","notification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","next","_next","Enumerable","_iterator","cancelable","currentItem","currentValue","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","Observable","_subscribe","subscribeOnNext","subscribeOnError","subscribeOnCompleted","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","list","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","res","hasValueAll","values","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","materialize","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","createWindow","Subject","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","select","selectorFn","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","running","take","RangeError","observable","takeWhile","shouldRun","transduce","transducer","transformForObserver","init","step","obs","input","xform","fixSubscriber","subscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAsFlE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,IAAIJ,KAAYiB,GAAQA,EAAKI,WAC3B,GAAIC,GAAYtB,IAAWuB,YAAcC,GAAcxB,IAAWY,GAAaa,GAAaC,GAASnB,KAAKP,GACtG2B,EAAUC,GAAaN,EAE7B,QAASH,EAAQf,GACfS,EAAMO,GAAcD,GACdQ,GAAWA,EAAQd,KAASgB,GAAetB,KAAKP,EAAQa,IAC5DZ,EAAOa,KAAKD,GAIlB,MAAOZ,GAGT,QAAS6B,GAAY9B,EAAQ+B,EAAUC,GAKrC,IAJA,GAAIb,GAAQ,GACVc,EAAQD,EAAShC,GACj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B,KAAKiH,SAAWA,EAChBjH,KAAKmoB,WAAaA,EAClBrO,EAAU/Y,KAAKf,KAAMA,KAAKmoB,WAAWrgB,UAAUC,KAAK/H,KAAKmoB,aAe3D,MApBA9a,IAASmc,EAAkB1P,GAQ3BrM,GAAc+b,EAAiB3nB,UAAWwa,IACxChV,YAAa,WACXrH,KAAKiH,SAASI,eAEhBc,QAAS,SAAUH,GACjBhI,KAAKiH,SAASkB,QAAQH,IAExBZ,OAAQ,SAAU/G,GAChBL,KAAKiH,SAASG,OAAO/G,MAIlBmpB,GACPrL,IAEqB,mBAAVuL,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvE9jB,EAAK6E,GAAKA,EAEVgf,OAAO,WACH,MAAOhf,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInB7E,EAAK6E,GAAKA,IAGhB3J,KAAKf"} \ No newline at end of file diff --git a/dist/rx.compat.min.js b/dist/rx.compat.min.js index 978714fcd..1f1215c5e 100644 --- a/dist/rx.compat.min.js +++ b/dist/rx.compat.min.js @@ -1,4 +1,4 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ -(function(a){function b(){if(this.isDisposed)throw new Error(U)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;sb.nonEnumArgs&&a.length&&h(a)&&(a=ub.call(a));var d=sb.enumPrototypes&&"function"==typeof a,e=sb.enumErrorProps&&(a===mb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(sb.nonEnumShadows&&a!==nb){var g=a.constructor,i=-1,j=qb.length;if(a===(g&&g.prototype))var k=a===stringProto?ib:a===mb?db:jb.call(a),l=rb[k];for(;++i-1:void 0});return c.pop(),d.pop(),r}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:ub.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function n(){this._s=s}function o(){this._s=s,this._l=s.length,this._i=0}function p(a){this._a=a}function q(a){this._a=a,this._l=v(a),this._i=0}function r(a){return"number"==typeof a&&E.isFinite(a)}function t(b){var c,d=b[V];if(!d&&"string"==typeof b)return c=new n(b),c[V]();if(!d&&b.length!==a)return c=new p(b),c[V]();if(!d)throw new TypeError("Object is not iterable");return b[V]()}function u(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function v(a){var b=+a.length;return isNaN(b)?0:0!==b&&r(b)?(b=u(b)*Math.floor(Math.abs(b)),0>=b?0:b>nc?nc:b):b}function w(a,b){return L(a)||(a=Pb),new yc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function x(a,b){return new yc(function(c){var d=new Hb,e=new Ib;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}R(f)&&(f=kc(f)),d=new Hb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function y(a,b){var c=this;return new yc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function z(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return R(f)&&(f=kc(f)),(Y(f)||X(f))&&(f=oc(f)),f}).concatAll()}function A(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function B(a){this.comparer=a,this.set=[]}function C(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return R(f)&&(f=kc(f)),(Y(f)||X(f))&&(f=oc(f)),f}).mergeAll()}var D={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},E=D[typeof window]&&window||this,F=D[typeof exports]&&exports&&!exports.nodeType&&exports,G=D[typeof module]&&module&&!module.nodeType&&module,H=G&&G.exports===F&&F,I=D[typeof global]&&global;!I||I.global!==I&&I.window!==I||(E=I);var J={internals:{},config:{Promise:E.Promise},helpers:{}},K=J.helpers.noop=function(){},L=(J.helpers.notDefined=function(a){return"undefined"==typeof a},J.helpers.isScheduler=function(a){return a instanceof J.Scheduler}),M=J.helpers.identity=function(a){return a},N=(J.helpers.pluck=function(a){return function(b){return b[a]}},J.helpers.just=function(a){return function(){return a}},J.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),O=J.helpers.defaultComparer=function(a,b){return tb(a,b)},P=J.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Q=(J.helpers.defaultKeySerializer=function(a){return a.toString()},J.helpers.defaultError=function(a){throw a}),R=J.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},S=(J.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},J.helpers.not=function(a){return!a},J.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==jb.call(a)}),a}()),T="Argument out of range",U="Object has been disposed",V="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";E.Set&&"function"==typeof(new E.Set)["@@iterator"]&&(V="@@iterator");var W=J.doneEnumerator={done:!0,value:a},X=J.helpers.isIterable=function(b){return b[V]!==a},Y=J.helpers.isArrayLike=function(b){return b&&b.length!==a};J.helpers.iterator=V;var Z,$=J.helpers.deprecate=function(){},_="[object Arguments]",ab="[object Array]",bb="[object Boolean]",cb="[object Date]",db="[object Error]",eb="[object Function]",fb="[object Number]",gb="[object Object]",hb="[object RegExp]",ib="[object String]",jb=Object.prototype.toString,kb=Object.prototype.hasOwnProperty,lb=jb.call(arguments)==_,mb=Error.prototype,nb=Object.prototype,ob=nb.propertyIsEnumerable;try{Z=!(jb.call(document)==gb&&!({toString:0}+""))}catch(pb){Z=!0}var qb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],rb={};rb[ab]=rb[cb]=rb[fb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},rb[bb]=rb[ib]={constructor:!0,toString:!0,valueOf:!0},rb[db]=rb[eb]=rb[hb]={constructor:!0,toString:!0},rb[gb]={constructor:!0};var sb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);sb.enumErrorProps=ob.call(mb,"message")||ob.call(mb,"name"),sb.enumPrototypes=ob.call(a,"prototype"),sb.nonEnumArgs=0!=c,sb.nonEnumShadows=!/valueOf/.test(b)}(1),lb||(h=function(a){return a&&"object"==typeof a?kb.call(a,"callee"):!1});var tb=J.internals.isEqual=function(a,b){return i(a,b,[],[])},ub=Array.prototype.slice,vb=({}.hasOwnProperty,this.inherits=J.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),wb=J.internals.addProperties=function(a){for(var b=ub.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},xb=J.internals.addRef=function(a,b){return new yc(function(c){return new Cb(b.getDisposable(),a.subscribe(c))})};Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=ub.call(arguments,1),d=function(){function e(){}if(this instanceof d){e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(ub.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(ub.call(arguments)))};return d}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}});var yb=Object("a"),zb="a"!=yb[0]||!(0 in yb);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=zb&&{}.toString.call(this)==ib?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=eb)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=zb&&{}.toString.call(this)==ib?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=eb)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return{}.toString.call(a)==ab}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Ab=J.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Bb=Ab.prototype;Bb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Bb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Bb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},Db.toArray=function(){return this.disposables.slice(0)};var Eb=J.Disposable=function(a){this.isDisposed=!1,this.action=a||K};Eb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Fb=Eb.create=function(a){return new Eb(a)},Gb=Eb.empty={dispose:K},Hb=J.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),Ib=J.SerialDisposable=Hb,Jb=J.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Gb:new a(this)},b}();m.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var Kb=J.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||P,this.disposable=new Hb};Kb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Kb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Kb.prototype.isCancelled=function(){return this.disposable.isDisposed},Kb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Lb=J.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Gb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=N,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Mb=Lb.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Cb,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),Gb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Cb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Gb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Lb.prototype),function(){Lb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Lb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof E.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=E.setInterval(function(){d=c(d)},b);return Fb(function(){E.clearInterval(e)})}}(Lb.prototype),function(a){a.catchError=a["catch"]=function(a){return new Ub(this,a)}}(Lb.prototype);var Nb,Ob=(J.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Hb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Lb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Mb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Lb(N,a,b,c)}()),Pb=Lb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Lb.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Lb.normalize(c),g=new Kb(this,b,d,f);if(e)e.enqueue(g);else{e=new Ab(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Lb(N,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Qb=K,Rb=function(){var a,b=K;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!E.setTimeout)throw new Error("No concurrency detected!");a=E.setTimeout,b=E.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Sb=Rb.setTimeout,Tb=Rb.clearTimeout;!function(){function a(){if(!E.postMessage||E.importScripts)return!1;var a=!1,b=E.onmessage;return E.onmessage=function(){a=!0},E.postMessage("","*"),E.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(jb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=I&&H&&I.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=I&&H&&I.clearImmediate)&&!c.test(e)&&e;if("function"==typeof d)Nb=d,Qb=e;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Nb=process.nextTick;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;E.addEventListener?E.addEventListener("message",b,!1):E.attachEvent("onmessage",b,!1),Nb=function(a){var b=h++;g[b]=a,E.postMessage(f+b,"*")}}else if(E.MessageChannel){var i=new E.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Nb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in E&&"onreadystatechange"in E.document.createElement("script")?Nb=function(a){var b=E.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},E.document.documentElement.appendChild(b)}:(Nb=function(a){return Sb(a,0)},Qb=Tb)}();var Ub=(Lb.timeout=function(){function a(a,b){var c=this,d=new Hb,e=Nb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Cb(d,Fb(function(){Qb(e)}))}function b(a,b,c){var d=this,e=Lb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Hb,g=Sb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Cb(f,Fb(function(){Tb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Lb(N,a,b,c)}(),function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return vb(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return Gb}}},e.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new Hb;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(Lb)),Vb=J.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return L(a)||(a=Ob),new yc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Wb=Vb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Vb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Xb=Vb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Vb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Yb=Vb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Vb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Zb=J.internals.Enumerator=function(a){this._next=a};Zb.prototype.next=function(){return this._next()},Zb.prototype[V]=function(){return this};var $b=J.internals.Enumerable=function(a){this._iterator=a};$b.prototype[V]=function(){return this._iterator()},$b.prototype.concat=function(){var a=this;return new yc(function(b){var c;try{c=a[V]()}catch(d){return void b.onError()}var e,f=new Ib,g=Ob.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;R(h)&&(h=kc(h));var i=new Hb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new Cb(f,g,Fb(function(){e=!0}))})},$b.prototype.catchError=function(){var a=this;return new yc(function(b){var c;try{c=a[V]()}catch(d){return void b.onError()}var e,f,g=new Ib,h=Ob.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;R(i)&&(i=kc(i));var j=new Hb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new Cb(g,h,Fb(function(){e=!0}))})};var _b=$b.repeat=function(a,b){return null==b&&(b=-1),new $b(function(){var c=b;return new Zb(function(){return 0===c?W:(c>0&&c--,{done:!1,value:a})})})},ac=$b.of=function(a,b,c){return b||(b=M),new $b(function(){var d=-1;return new Zb(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(ec),ic=function(a){function b(){a.apply(this,arguments)}return vb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(hc),jc=J.Observable=function(){function a(a){this._subscribe=a}return dc=a.prototype,dc.subscribe=dc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:cc(a,b,c))},dc.subscribeOnNext=function(a,b){return this._subscribe(cc(2===arguments.length?function(c){a.call(b,c)}:a))},dc.subscribeOnError=function(a,b){return this._subscribe(cc(null,2===arguments.length?function(c){a.call(b,c)}:a))},dc.subscribeOnCompleted=function(a,b){return this._subscribe(cc(null,null,2===arguments.length?function(){a.call(b)}:a))},a}();dc.observeOn=function(a){var b=this;return new yc(function(c){return b.subscribe(new ic(a,c))})},dc.subscribeOn=function(a){var b=this;return new yc(function(c){var d=new Hb,e=new Ib;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var kc=jc.fromPromise=function(a){return lc(function(){var b=new J.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};dc.toPromise=function(a){if(a||(a=J.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},dc.toArray=function(){var a=this;return new yc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},jc.create=jc.createWithDisposable=function(a){return new yc(a)};var lc=jc.defer=function(a){return new yc(function(b){var c;try{c=a()}catch(d){return sc(d).subscribe(b)}return R(c)&&(c=kc(c)),c.subscribe(b)})},mc=jc.empty=function(a){return L(a)||(a=Ob),new yc(function(b){return a.schedule(function(){b.onCompleted()})})},nc=Math.pow(2,53)-1;n.prototype[V]=function(){return new o(this._s)},o.prototype[V]=function(){return this},o.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};jc.generate=function(a,b,c,d,e){return L(e)||(e=Pb),new yc(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})};var qc=jc.never=function(){return new yc(function(){return Gb})};jc.of=function(){return w(null,arguments)},jc.ofWithScheduler=function(a){return w(a,ub.call(arguments,1))},jc.range=function(a,b,c){return L(c)||(c=Pb),new yc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},jc.repeat=function(a,b,c){return L(c)||(c=Pb),rc(a,c).repeat(null==b?-1:b)};var rc=jc["return"]=jc.just=function(a,b){return L(b)||(b=Ob),new yc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};jc.returnValue=function(){return $("returnValue","return or just"),rc.apply(null,arguments)};var sc=jc["throw"]=jc.throwException=jc.throwError=function(a,b){return L(b)||(b=Ob),new yc(function(c){return b.schedule(function(){c.onError(a)})})};jc.using=function(a,b){return new yc(function(c){var d,e,f=Gb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Cb(sc(g).subscribe(c),f)}return new Cb(e.subscribe(c),f)})},dc.amb=function(a){var b=this;return new yc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Hb,j=new Hb;return R(a)&&(a=kc(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new Cb(i,j)})},jc.amb=function(){function a(a,b){return a.amb(b)}for(var b=qc(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},dc["catch"]=dc.catchError=function(a){return"function"==typeof a?x(this,a):tc([this,a])},dc.catchException=function(a){return $("catchException","catch or catchError"),this.catchError(a)};var tc=jc.catchError=jc["catch"]=function(){return ac(j(arguments,0)).catchError()};jc.catchException=function(){return $("catchException","catch or catchError"),tc.apply(null,arguments)},dc.combineLatest=function(){var a=ub.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),uc.apply(this,a)};var uc=jc.combineLatest=function(){var a=ub.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new yc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(M))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(M)&&c.onCompleted()}function e(a){j[a]=!0,j.every(M)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new Hb;R(f)&&(f=kc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new Cb(m)})};dc.concat=function(){var a=ub.call(arguments,0);return a.unshift(this),vc.apply(this,a)};var vc=jc.concat=function(){return ac(j(arguments,0)).concat()};dc.concatAll=function(){return this.merge(1)},dc.concatObservable=function(){return $("concatObservable","concatAll"),this.merge(1)},dc.merge=function(a){if("number"!=typeof a)return wc(this,a);var b=this;return new yc(function(c){function d(a){var b=new Hb;f.add(b),R(a)&&(a=kc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted()) +(function(a){function b(){if(this.isDisposed)throw new Error(U)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;sb.nonEnumArgs&&a.length&&h(a)&&(a=ub.call(a));var d=sb.enumPrototypes&&"function"==typeof a,e=sb.enumErrorProps&&(a===mb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(sb.nonEnumShadows&&a!==nb){var g=a.constructor,i=-1,j=qb.length;if(a===(g&&g.prototype))var k=a===stringProto?ib:a===mb?db:jb.call(a),l=rb[k];for(;++i-1:void 0});return c.pop(),d.pop(),r}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:ub.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function n(){this._s=s}function o(){this._s=s,this._l=s.length,this._i=0}function p(a){this._a=a}function q(a){this._a=a,this._l=v(a),this._i=0}function r(a){return"number"==typeof a&&E.isFinite(a)}function t(b){var c,d=b[V];if(!d&&"string"==typeof b)return c=new n(b),c[V]();if(!d&&b.length!==a)return c=new p(b),c[V]();if(!d)throw new TypeError("Object is not iterable");return b[V]()}function u(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function v(a){var b=+a.length;return isNaN(b)?0:0!==b&&r(b)?(b=u(b)*Math.floor(Math.abs(b)),0>=b?0:b>nc?nc:b):b}function w(a,b){return L(a)||(a=Pb),new yc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function x(a,b){return new yc(function(c){var d=new Hb,e=new Ib;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}R(f)&&(f=kc(f)),d=new Hb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function y(a,b){var c=this;return new yc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function z(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return R(f)&&(f=kc(f)),(Y(f)||X(f))&&(f=oc(f)),f}).concatAll()}function A(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function B(a){this.comparer=a,this.set=[]}function C(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return R(f)&&(f=kc(f)),(Y(f)||X(f))&&(f=oc(f)),f}).mergeAll()}var D={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},E=D[typeof window]&&window||this,F=D[typeof exports]&&exports&&!exports.nodeType&&exports,G=D[typeof module]&&module&&!module.nodeType&&module,H=G&&G.exports===F&&F,I=D[typeof global]&&global;!I||I.global!==I&&I.window!==I||(E=I);var J={internals:{},config:{Promise:E.Promise},helpers:{}},K=J.helpers.noop=function(){},L=(J.helpers.notDefined=function(a){return"undefined"==typeof a},J.helpers.isScheduler=function(a){return a instanceof J.Scheduler}),M=J.helpers.identity=function(a){return a},N=(J.helpers.pluck=function(a){return function(b){return b[a]}},J.helpers.just=function(a){return function(){return a}},J.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),O=J.helpers.defaultComparer=function(a,b){return tb(a,b)},P=J.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Q=(J.helpers.defaultKeySerializer=function(a){return a.toString()},J.helpers.defaultError=function(a){throw a}),R=J.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},S=(J.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},J.helpers.not=function(a){return!a},J.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==jb.call(a)}),a}()),T="Argument out of range",U="Object has been disposed",V="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";E.Set&&"function"==typeof(new E.Set)["@@iterator"]&&(V="@@iterator");var W=J.doneEnumerator={done:!0,value:a},X=J.helpers.isIterable=function(b){return b[V]!==a},Y=J.helpers.isArrayLike=function(b){return b&&b.length!==a};J.helpers.iterator=V;var Z,$=J.helpers.deprecate=function(){},_="[object Arguments]",ab="[object Array]",bb="[object Boolean]",cb="[object Date]",db="[object Error]",eb="[object Function]",fb="[object Number]",gb="[object Object]",hb="[object RegExp]",ib="[object String]",jb=Object.prototype.toString,kb=Object.prototype.hasOwnProperty,lb=jb.call(arguments)==_,mb=Error.prototype,nb=Object.prototype,ob=nb.propertyIsEnumerable;try{Z=!(jb.call(document)==gb&&!({toString:0}+""))}catch(pb){Z=!0}var qb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],rb={};rb[ab]=rb[cb]=rb[fb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},rb[bb]=rb[ib]={constructor:!0,toString:!0,valueOf:!0},rb[db]=rb[eb]=rb[hb]={constructor:!0,toString:!0},rb[gb]={constructor:!0};var sb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);sb.enumErrorProps=ob.call(mb,"message")||ob.call(mb,"name"),sb.enumPrototypes=ob.call(a,"prototype"),sb.nonEnumArgs=0!=c,sb.nonEnumShadows=!/valueOf/.test(b)}(1),lb||(h=function(a){return a&&"object"==typeof a?kb.call(a,"callee"):!1});var tb=J.internals.isEqual=function(a,b){return i(a,b,[],[])},ub=Array.prototype.slice,vb=({}.hasOwnProperty,this.inherits=J.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),wb=J.internals.addProperties=function(a){for(var b=ub.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},xb=J.internals.addRef=function(a,b){return new yc(function(c){return new Cb(b.getDisposable(),a.subscribe(c))})};Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=ub.call(arguments,1),d=function(){function e(){}if(this instanceof d){e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(ub.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(ub.call(arguments)))};return d}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}});var yb=Object("a"),zb="a"!=yb[0]||!(0 in yb);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=zb&&{}.toString.call(this)==ib?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=eb)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=zb&&{}.toString.call(this)==ib?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=eb)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return{}.toString.call(a)==ab}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Ab=J.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Bb=Ab.prototype;Bb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Bb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Bb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},Db.toArray=function(){return this.disposables.slice(0)};var Eb=J.Disposable=function(a){this.isDisposed=!1,this.action=a||K};Eb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Fb=Eb.create=function(a){return new Eb(a)},Gb=Eb.empty={dispose:K},Hb=J.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),Ib=J.SerialDisposable=Hb,Jb=J.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Gb:new a(this)},b}();m.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var Kb=J.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||P,this.disposable=new Hb};Kb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Kb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Kb.prototype.isCancelled=function(){return this.disposable.isDisposed},Kb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Lb=J.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Gb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=N,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Mb=Lb.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Cb,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),Gb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Cb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Gb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Lb.prototype),function(){Lb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Lb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof E.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=E.setInterval(function(){d=c(d)},b);return Fb(function(){E.clearInterval(e)})}}(Lb.prototype),function(a){a.catchError=a["catch"]=function(a){return new Ub(this,a)}}(Lb.prototype);var Nb,Ob=(J.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Hb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Lb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Mb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Lb(N,a,b,c)}()),Pb=Lb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Lb.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Lb.normalize(c),g=new Kb(this,b,d,f);if(e)e.enqueue(g);else{e=new Ab(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Lb(N,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Qb=K,Rb=function(){var a,b=K;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!E.setTimeout)throw new Error("No concurrency detected!");a=E.setTimeout,b=E.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Sb=Rb.setTimeout,Tb=Rb.clearTimeout;!function(){function a(){if(!E.postMessage||E.importScripts)return!1;var a=!1,b=E.onmessage;return E.onmessage=function(){a=!0},E.postMessage("","*"),E.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(jb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=I&&H&&I.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=I&&H&&I.clearImmediate)&&!c.test(e)&&e;if("function"==typeof d)Nb=d,Qb=e;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Nb=process.nextTick;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;E.addEventListener?E.addEventListener("message",b,!1):E.attachEvent("onmessage",b,!1),Nb=function(a){var b=h++;g[b]=a,E.postMessage(f+b,"*")}}else if(E.MessageChannel){var i=new E.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Nb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in E&&"onreadystatechange"in E.document.createElement("script")?Nb=function(a){var b=E.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},E.document.documentElement.appendChild(b)}:(Nb=function(a){return Sb(a,0)},Qb=Tb)}();var Ub=(Lb.timeout=function(){function a(a,b){var c=this,d=new Hb,e=Nb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Cb(d,Fb(function(){Qb(e)}))}function b(a,b,c){var d=this,e=Lb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Hb,g=Sb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Cb(f,Fb(function(){Tb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Lb(N,a,b,c)}(),function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return vb(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return Gb}}},e.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new Hb;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(Lb)),Vb=J.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return L(a)||(a=Ob),new yc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Wb=Vb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Vb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Xb=Vb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Vb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Yb=Vb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Vb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Zb=J.internals.Enumerator=function(a){this._next=a};Zb.prototype.next=function(){return this._next()},Zb.prototype[V]=function(){return this};var $b=J.internals.Enumerable=function(a){this._iterator=a};$b.prototype[V]=function(){return this._iterator()},$b.prototype.concat=function(){var a=this;return new yc(function(b){var c;try{c=a[V]()}catch(d){return void b.onError()}var e,f=new Ib,g=Ob.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;R(h)&&(h=kc(h));var i=new Hb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new Cb(f,g,Fb(function(){e=!0}))})},$b.prototype.catchError=function(){var a=this;return new yc(function(b){var c;try{c=a[V]()}catch(d){return void b.onError()}var e,f,g=new Ib,h=Ob.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;R(i)&&(i=kc(i));var j=new Hb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new Cb(g,h,Fb(function(){e=!0}))})};var _b=$b.repeat=function(a,b){return null==b&&(b=-1),new $b(function(){var c=b;return new Zb(function(){return 0===c?W:(c>0&&c--,{done:!1,value:a})})})},ac=$b.of=function(a,b,c){return b||(b=M),new $b(function(){var d=-1;return new Zb(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(ec),ic=function(a){function b(){a.apply(this,arguments)}return vb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(hc),jc=J.Observable=function(){function a(a){this._subscribe=a}return dc=a.prototype,dc.subscribe=dc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:cc(a,b,c))},dc.subscribeOnNext=function(a,b){return this._subscribe(cc(2===arguments.length?function(c){a.call(b,c)}:a))},dc.subscribeOnError=function(a,b){return this._subscribe(cc(null,2===arguments.length?function(c){a.call(b,c)}:a))},dc.subscribeOnCompleted=function(a,b){return this._subscribe(cc(null,null,2===arguments.length?function(){a.call(b)}:a))},a}();dc.observeOn=function(a){var b=this;return new yc(function(c){return b.subscribe(new ic(a,c))})},dc.subscribeOn=function(a){var b=this;return new yc(function(c){var d=new Hb,e=new Ib;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var kc=jc.fromPromise=function(a){return lc(function(){var b=new J.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};dc.toPromise=function(a){if(a||(a=J.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},dc.toArray=function(){var a=this;return new yc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},jc.create=jc.createWithDisposable=function(a){return new yc(a)};var lc=jc.defer=function(a){return new yc(function(b){var c;try{c=a()}catch(d){return sc(d).subscribe(b)}return R(c)&&(c=kc(c)),c.subscribe(b)})},mc=jc.empty=function(a){return L(a)||(a=Ob),new yc(function(b){return a.schedule(function(){b.onCompleted()})})},nc=Math.pow(2,53)-1;n.prototype[V]=function(){return new o(this._s)},o.prototype[V]=function(){return this},o.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};jc.generate=function(a,b,c,d,e){return L(e)||(e=Pb),new yc(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})};var qc=jc.never=function(){return new yc(function(){return Gb})};jc.of=function(){return w(null,arguments)},jc.ofWithScheduler=function(a){return w(a,ub.call(arguments,1))},jc.range=function(a,b,c){return L(c)||(c=Pb),new yc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},jc.repeat=function(a,b,c){return L(c)||(c=Pb),rc(a,c).repeat(null==b?-1:b)};var rc=jc["return"]=jc.just=function(a,b){return L(b)||(b=Ob),new yc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};jc.returnValue=function(){return $("returnValue","return or just"),rc.apply(null,arguments)};var sc=jc["throw"]=jc.throwException=jc.throwError=function(a,b){return L(b)||(b=Ob),new yc(function(c){return b.schedule(function(){c.onError(a)})})};jc.using=function(a,b){return new yc(function(c){var d,e,f=Gb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Cb(sc(g).subscribe(c),f)}return new Cb(e.subscribe(c),f)})},dc.amb=function(a){var b=this;return new yc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Hb,j=new Hb;return R(a)&&(a=kc(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new Cb(i,j)})},jc.amb=function(){function a(a,b){return a.amb(b)}for(var b=qc(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},dc["catch"]=dc.catchError=function(a){return"function"==typeof a?x(this,a):tc([this,a])},dc.catchException=function(a){return $("catchException","catch or catchError"),this.catchError(a)};var tc=jc.catchError=jc["catch"]=function(){return ac(j(arguments,0)).catchError()};jc.catchException=function(){return $("catchException","catch or catchError"),tc.apply(null,arguments)},dc.combineLatest=function(){var a=ub.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),uc.apply(this,a)};var uc=jc.combineLatest=function(){var a=ub.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new yc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(M))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(M)&&c.onCompleted()}function e(a){j[a]=!0,j.every(M)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new Hb;R(f)&&(f=kc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new Cb(m)})};dc.concat=function(){var a=ub.call(arguments,0);return a.unshift(this),vc.apply(this,a)};var vc=jc.concat=function(){return ac(j(arguments,0)).concat()};dc.concatAll=function(){return this.merge(1)},dc.concatObservable=function(){return $("concatObservable","concatAll"),this.merge(1)},dc.merge=function(a){if("number"!=typeof a)return wc(this,a);var b=this;return new yc(function(c){function d(a){var b=new Hb;f.add(b),R(a)&&(a=kc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted()) }))}var e=0,f=new Cb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var wc=jc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=ub.call(arguments,1)):(a=Ob,b=ub.call(arguments,0)):(a=Ob,b=ub.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),w(a,b).mergeAll()};dc.mergeAll=function(){var a=this;return new yc(function(b){var c=new Cb,d=!1,e=new Hb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Hb;c.add(e),R(a)&&(a=kc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},dc.mergeObservable=function(){return $("mergeObservable","mergeAll"),this.mergeAll.apply(this,arguments)},dc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return xc([this,a])};var xc=jc.onErrorResumeNext=function(){var a=j(arguments,0);return new yc(function(b){var c=0,d=new Ib,e=Ob.scheduleRecursive(function(e){var f,g;c0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(M)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new Hb;R(c)&&(c=kc(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new Cb(j)})},jc.zip=function(){var a=ub.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},jc.zipArray=function(){var a=j(arguments,0);return new yc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(M))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(M)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Hb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new Cb(h);return j.add(Fb(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},dc.asObservable=function(){return new yc(this.subscribe.bind(this))},dc.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},dc.dematerialize=function(){var a=this;return new yc(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},dc.distinctUntilChanged=function(a,b){var c=this;return a||(a=M),b||(b=O),new yc(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},dc["do"]=dc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new yc(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b)try{b(c)}catch(d){a.onError(d)}a.onError(c)},function(){if(c)try{c()}catch(b){a.onError(b)}a.onCompleted()})})},dc.doAction=function(){return $("doAction","do or tap"),this.tap.apply(this,arguments)},dc.doOnNext=dc.tapOnNext=function(a,b){return this.tap(2===arguments.length?function(c){a.call(b,c)}:a)},dc.doOnError=dc.tapOnError=function(a,b){return this.tap(K,2===arguments.length?function(c){a.call(b,c)}:a)},dc.doOnCompleted=dc.tapOnCompleted=function(a,b){return this.tap(K,null,2===arguments.length?function(){a.call(b)}:a)},dc["finally"]=dc.ensure=function(a){var b=this;return new yc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Fb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},dc.finallyAction=function(a){return $("finallyAction","finally or ensure"),this.ensure(a)},dc.ignoreElements=function(){var a=this;return new yc(function(b){return a.subscribe(K,b.onError.bind(b),b.onCompleted.bind(b))})},dc.materialize=function(){var a=this;return new yc(function(b){return a.subscribe(function(a){b.onNext(Wb(a))},function(a){b.onNext(Xb(a)),b.onCompleted()},function(){b.onNext(Yb()),b.onCompleted()})})},dc.repeat=function(a){return _b(this,a).concat()},dc.retry=function(a){return _b(this,a).catchError()},dc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new yc(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},dc.skipLast=function(a){var b=this;return new yc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},dc.startWith=function(){var a,b,c=0;return arguments.length&&L(arguments[0])?(b=arguments[0],c=1):b=Ob,a=ub.call(arguments,c),ac([pc(a,b),this]).concat()},dc.takeLast=function(a){var b=this;return new yc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},dc.takeLastBuffer=function(a){var b=this;return new yc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},dc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(T);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(T);return new yc(function(d){function e(){var a=new Bc;i.push(a),d.onNext(xb(a,g))}var f=new Hb,g=new Jb(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g})},dc.selectConcat=dc.concatMap=function(a,b,c){return S(a)&&S(b)?this.concatMap(function(c,d){var e=a(c,d);return R(e)&&(e=kc(e)),(Y(e)||X(e))&&(e=oc(e)),e.map(function(a,e){return b(c,a,d,e)})}):S(a)?z(this,a,c):z(this,function(){return a})},dc.concatMapObserver=dc.selectConcatObserver=function(a,b,c,d){var e=this;return new yc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}R(c)&&(c=kc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}R(c)&&(c=kc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}R(a)&&(a=kc(a)),f.onNext(a),f.onCompleted()})}).concatAll()},dc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new yc(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},B.prototype.push=function(a){var b=-1===A(this.set,a,this.comparer);return b&&this.set.push(a),b},dc.distinct=function(a,b){var c=this;return b||(b=O),new yc(function(d){var e=new B(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},dc.select=dc.map=function(a,b){var c=S(a)?a:function(){return a},d=this;return new yc(function(a){var e=0;return d.subscribe(function(f){var g;try{g=c.call(b,f,e++,d)}catch(h){return void a.onError(h)}a.onNext(g)},a.onError.bind(a),a.onCompleted.bind(a))})},dc.pluck=function(a){return this.map(function(b){return b[a]})},dc.selectMany=dc.flatMap=function(a,b,c){return S(a)&&S(b)?this.flatMap(function(c,d){var e=a(c,d);return R(e)&&(e=kc(e)),(Y(e)||X(e))&&(e=oc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):S(a)?C(this,a,c):C(this,function(){return a})},dc.flatMapObserver=dc.selectManyObserver=function(a,b,c,d){var e=this;return new yc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}R(c)&&(c=kc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}R(c)&&(c=kc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}R(a)&&(a=kc(a)),f.onNext(a),f.onCompleted()})}).mergeAll()},dc.selectSwitch=dc.flatMapLatest=dc.switchMap=function(a,b){return this.select(a,b).switchLatest()},dc.skip=function(a){if(0>a)throw new Error(T);var b=this;return new yc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},dc.skipWhile=function(a,b){var c=this;return new yc(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},dc.take=function(a,b){if(0>a)throw new RangeError(T);if(0===a)return mc(b);var c=this;return new yc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},dc.takeWhile=function(a,b){var c=this;return new yc(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},dc.where=dc.filter=function(a,b){var c=this;return new yc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},dc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new yc(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})})};var yc=J.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Fb(a):Gb}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new zc(a);return Pb.scheduleRequired()?Pb.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return vb(c,a),c}(jc),zc=function(a){function b(b){a.call(this),this.observer=b,this.m=new Hb}vb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(ec),Ac=function(a,b){this.subject=a,this.observer=b};Ac.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var Bc=J.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),Gb):(a.onCompleted(),Gb):(this.observers.push(a),new Ac(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return vb(d,a),wb(d.prototype,bc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Cc(a,b)},d}(jc),Cc=(J.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new Ac(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),Gb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return vb(d,a),wb(d.prototype,bc,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(jc),J.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return vb(b,a),wb(b.prototype,bc,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(jc));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(E.Rx=J,define(function(){return J})):F&&G?H?(G.exports=J).Rx=J:F.Rx=J:E.Rx=J}).call(this); //# sourceMappingURL=rx.compat.map \ No newline at end of file diff --git a/dist/rx.js b/dist/rx.js index d726d0b6c..34d8f783b 100644 --- a/dist/rx.js +++ b/dist/rx.js @@ -2294,7 +2294,7 @@ * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence. */ var observableFromArray = Observable.fromArray = function (array, scheduler) { - //deprecate('fromArray', 'from'); + deprecate('fromArray', 'from'); isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new AnonymousObservable(function (observer) { var count = 0, len = array.length; diff --git a/dist/rx.lite.compat.js b/dist/rx.lite.compat.js index dcf408e5c..d6dcb4219 100644 --- a/dist/rx.lite.compat.js +++ b/dist/rx.lite.compat.js @@ -2162,7 +2162,7 @@ if (!Array.prototype.forEach) { * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence. */ var observableFromArray = Observable.fromArray = function (array, scheduler) { - //deprecate('fromArray', 'from'); + deprecate('fromArray', 'from'); isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new AnonymousObservable(function (observer) { var count = 0, len = array.length; diff --git a/dist/rx.lite.compat.map b/dist/rx.lite.compat.map index 71e737d65..8a5031d96 100644 --- a/dist/rx.lite.compat.map +++ b/dist/rx.lite.compat.map @@ -1 +1 @@ -{"version":3,"file":"rx.lite.compat.min.js","sources":["rx.lite.compat.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","scheduler","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","flatMap","mergeAll","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","relatedTarget","fromElement","toElement","c","charCode","keyChar","fromCharCode","createListener","element","name","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","combineLatestSource","subject","next","values","res","hasValueAll","every","identity","err","apply","isDone","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","getDisposable","Function","that","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","fun","split","thisp","filter","predicate","results","t","arg","indexOf","searchElement","n","Number","Infinity","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","ScheduledItem","RefCountDisposable","InnerDisposable","disposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","scheduleMethod","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","_next","Enumerable","_iterator","currentItem","currentValue","catchError","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","observerCreate","fromNotifier","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","Observable","_subscribe","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","list","observableFromArray","fromArray","never","ofWithScheduler","range","observableReturn","throwException","throwError","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","m","innerSubscription","mergeObservable","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","i2","select","selectorFn","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","take","RangeError","observable","takeWhile","where","fromCallback","func","context","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","Subject","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","sample","throttleLatest","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","throttleFirst","windowDuration","duration","lastOnNext","PausableObservable","_super","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","transduce","transducer","transformForObserver","init","step","obs","input","xform","fixSubscriber","subscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","createRemovableDisposable","so","_trim","hasError","windowSize","MAX_VALUE","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,IAsFlE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,IAAIJ,KAAYiB,GAAQA,EAAKI,WAC3B,GAAIC,GAAYtB,IAAWuB,YAAcC,GAAcxB,IAAWY,GAAaa,GAAaC,GAASnB,KAAKP,GACtG2B,EAAUC,GAAaN,EAE7B,QAASH,EAAQf,GACfS,EAAMO,GAAcD,GACdQ,GAAWA,EAAQd,KAASgB,GAAetB,KAAKP,EAAQa,IAC5DZ,EAAOa,KAAKD,GAIlB,MAAOZ,GAGT,QAAS6B,GAAY9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AI,EAAGwB,EAAMP,EAAEjF,OAAYwF,EAAJxB,EAASA,IAAK,CAC5C,GAAImC,GAAWlB,EAAEjB,EACjBmC,GAASI,cACTJ,EAASoZ,eAEXngB,KAAKmuB,eAKPhZ,QAAS,WACPnV,KAAKC,YAAa,EAClBD,KAAKmuB,UAAY,QAIdtE,GACPlK,GAEqB,mBAAVmP,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvErpB,EAAK6J,GAAKA,EAEVuf,OAAO,WACH,MAAOvf,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInB7J,EAAK6J,GAAKA,IAGhBxO,KAAKf"} \ No newline at end of file +{"version":3,"file":"rx.lite.compat.min.js","sources":["rx.lite.compat.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","scheduler","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","flatMap","mergeAll","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","relatedTarget","fromElement","toElement","c","charCode","keyChar","fromCharCode","createListener","element","name","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","combineLatestSource","subject","next","values","res","hasValueAll","every","identity","err","apply","isDone","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","getDisposable","Function","that","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","fun","split","thisp","filter","predicate","results","t","arg","indexOf","searchElement","n","Number","Infinity","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","ScheduledItem","RefCountDisposable","InnerDisposable","disposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","scheduleMethod","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","_next","Enumerable","_iterator","currentItem","currentValue","catchError","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","observerCreate","fromNotifier","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","Observable","_subscribe","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","list","observableFromArray","fromArray","never","ofWithScheduler","range","observableReturn","throwException","throwError","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","m","innerSubscription","mergeObservable","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","i2","select","selectorFn","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","take","RangeError","observable","takeWhile","where","fromCallback","func","context","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","Subject","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","sample","throttleLatest","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","throttleFirst","windowDuration","duration","lastOnNext","PausableObservable","_super","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","transduce","transducer","transformForObserver","init","step","obs","input","xform","fixSubscriber","subscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","createRemovableDisposable","so","_trim","hasError","windowSize","MAX_VALUE","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,IAsFlE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,IAAIJ,KAAYiB,GAAQA,EAAKI,WAC3B,GAAIC,GAAYtB,IAAWuB,YAAcC,GAAcxB,IAAWY,GAAaa,GAAaC,GAASnB,KAAKP,GACtG2B,EAAUC,GAAaN,EAE7B,QAASH,EAAQf,GACfS,EAAMO,GAAcD,GACdQ,GAAWA,EAAQd,KAASgB,GAAetB,KAAKP,EAAQa,IAC5DZ,EAAOa,KAAKD,GAIlB,MAAOZ,GAGT,QAAS6B,GAAY9B,EAAQ+B,EAAUC,GAKrC,IAJA,GAAIb,GAAQ,G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F,OAAYwF,EAAJxB,EAASA,IAAK,CAC5C,GAAImC,GAAWlB,EAAEjB,EACjBmC,GAASI,cACTJ,EAASoZ,eAEXngB,KAAKmuB,eAKPhZ,QAAS,WACPnV,KAAKC,YAAa,EAClBD,KAAKmuB,UAAY,QAIdtE,GACPlK,GAEqB,mBAAVmP,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvErpB,EAAK6J,GAAKA,EAEVuf,OAAO,WACH,MAAOvf,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInB7J,EAAK6J,GAAKA,IAGhBxO,KAAKf"} \ No newline at end of file diff --git a/dist/rx.lite.compat.min.js b/dist/rx.lite.compat.min.js index a4009b2da..fc7a6f552 100644 --- a/dist/rx.lite.compat.min.js +++ b/dist/rx.lite.compat.min.js @@ -1,4 +1,4 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ -(function(a){function b(){if(this.isDisposed)throw new Error(ab)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;Ab.nonEnumArgs&&a.length&&h(a)&&(a=Cb.call(a));var d=Ab.enumPrototypes&&"function"==typeof a,e=Ab.enumErrorProps&&(a===ub||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(Ab.nonEnumShadows&&a!==vb){var g=a.constructor,i=-1,j=yb.length;if(a===(g&&g.prototype))var k=a===stringProto?qb:a===ub?lb:rb.call(a),l=zb[k];for(;++i-1:void 0});return c.pop(),d.pop(),r}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:Cb.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(){this._s=s}function n(){this._s=s,this._l=s.length,this._i=0}function o(a){this._a=a}function p(a){this._a=a,this._l=u(a),this._i=0}function q(a){return"number"==typeof a&&M.isFinite(a)}function r(b){var c,d=b[bb];if(!d&&"string"==typeof b)return c=new m(b),c[bb]();if(!d&&b.length!==a)return c=new o(b),c[bb]();if(!d)throw new TypeError("Object is not iterable");return b[bb]()}function t(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function u(a){var b=+a.length;return isNaN(b)?0:0!==b&&q(b)?(b=t(b)*Math.floor(Math.abs(b)),0>=b?0:b>qc?qc:b):b}function v(a,b){return T(a)||(a=Vb),new Kc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function w(a,b){return new Kc(function(c){var d=new Ob,e=new Pb;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}Z(f)&&(f=Dc(f)),d=new Ob,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function x(a,b){var c=this;return new Kc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function y(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return Z(f)&&(f=Dc(f)),(eb(f)||db(f))&&(f=rc(f)),f}).concatAll()}function z(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return Z(f)&&(f=Dc(f)),(eb(f)||db(f))&&(f=rc(f)),f}).mergeAll()}function A(a){var b=function(){this.cancelBubble=!0},c=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(a||(a=M.event),!a.target)switch(a.target=a.target||a.srcElement,"mouseover"==a.type&&(a.relatedTarget=a.fromElement),"mouseout"==a.type&&(a.relatedTarget=a.toElement),a.stopPropagation||(a.stopPropagation=b,a.preventDefault=c),a.type){case"keypress":var d="charCode"in a?a.charCode:a.keyCode;10==d?(d=0,a.keyCode=13):13==d||27==d?d=0:3==d&&(d=99),a.charCode=d,a.keyChar=a.charCode?String.fromCharCode(a.charCode):""}return a}function B(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Mb(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(A(a))};return a.attachEvent("on"+b,d),Mb(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,Mb(function(){a["on"+b]=null})}function C(a,b,c){var d=new Jb;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(C(a.item(e),b,c));else a&&d.add(B(a,b,c));return d}function D(a,b){return new Kc(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function E(a,b,c){return new Kc(function(d){var e=0,f=a,g=Sb(b);return c.scheduleRecursiveWithAbsolute(f,function(a){if(g>0){var b=c.now();f+=g,b>=f&&(f=b+g)}d.onNext(e++),a(f)})})}function F(a,b){return new Kc(function(c){return b.scheduleWithRelative(Sb(a),function(){c.onNext(0),c.onCompleted()})})}function G(a,b,c){return a===b?new Kc(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):oc(function(){return E(c.now()+a,b,c)})}function H(a,b,c){return new Kc(function(d){var e,f=!1,g=new Pb,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Ob,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new Jb(e,g)})}function I(a,b,c){return oc(function(){return H(a,b-c.now(),c)})}function J(a,b){return new Kc(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Jb(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))})}function K(a,b,c){return new Kc(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(U))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new Jb(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d),function(){i=!0,e(!0,1)}))})}var L={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},M=L[typeof window]&&window||this,N=L[typeof exports]&&exports&&!exports.nodeType&&exports,O=L[typeof module]&&module&&!module.nodeType&&module,P=O&&O.exports===N&&N,Q=L[typeof global]&&global;!Q||Q.global!==Q&&Q.window!==Q||(M=Q);var R={internals:{},config:{Promise:M.Promise},helpers:{}},S=R.helpers.noop=function(){},T=(R.helpers.notDefined=function(a){return"undefined"==typeof a},R.helpers.isScheduler=function(a){return a instanceof R.Scheduler}),U=R.helpers.identity=function(a){return a},V=(R.helpers.pluck=function(a){return function(b){return b[a]}},R.helpers.just=function(a){return function(){return a}},R.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),W=R.helpers.defaultComparer=function(a,b){return Bb(a,b)},X=R.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Y=(R.helpers.defaultKeySerializer=function(a){return a.toString()},R.helpers.defaultError=function(a){throw a}),Z=R.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},$=(R.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},R.helpers.not=function(a){return!a},R.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==rb.call(a)}),a}()),_="Argument out of range",ab="Object has been disposed",bb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";M.Set&&"function"==typeof(new M.Set)["@@iterator"]&&(bb="@@iterator");var cb=R.doneEnumerator={done:!0,value:a},db=R.helpers.isIterable=function(b){return b[bb]!==a},eb=R.helpers.isArrayLike=function(b){return b&&b.length!==a};R.helpers.iterator=bb;var fb,gb=R.helpers.deprecate=function(){},hb="[object Arguments]",ib="[object Array]",jb="[object Boolean]",kb="[object Date]",lb="[object Error]",mb="[object Function]",nb="[object Number]",ob="[object Object]",pb="[object RegExp]",qb="[object String]",rb=Object.prototype.toString,sb=Object.prototype.hasOwnProperty,tb=rb.call(arguments)==hb,ub=Error.prototype,vb=Object.prototype,wb=vb.propertyIsEnumerable;try{fb=!(rb.call(document)==ob&&!({toString:0}+""))}catch(xb){fb=!0}var yb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],zb={};zb[ib]=zb[kb]=zb[nb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},zb[jb]=zb[qb]={constructor:!0,toString:!0,valueOf:!0},zb[lb]=zb[mb]=zb[pb]={constructor:!0,toString:!0},zb[ob]={constructor:!0};var Ab={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Ab.enumErrorProps=wb.call(ub,"message")||wb.call(ub,"name"),Ab.enumPrototypes=wb.call(a,"prototype"),Ab.nonEnumArgs=0!=c,Ab.nonEnumShadows=!/valueOf/.test(b)}(1),tb||(h=function(a){return a&&"object"==typeof a?sb.call(a,"callee"):!1});{var Bb=R.internals.isEqual=function(a,b){return i(a,b,[],[])},Cb=Array.prototype.slice,Db=({}.hasOwnProperty,this.inherits=R.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),Eb=R.internals.addProperties=function(a){for(var b=Cb.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}};R.internals.addRef=function(a,b){return new Kc(function(c){return new Jb(b.getDisposable(),a.subscribe(c))})}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Cb.call(arguments,1),d=function(){function e(){}if(this instanceof d){e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(Cb.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(Cb.call(arguments)))};return d}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}});var Fb=Object("a"),Gb="a"!=Fb[0]||!(0 in Fb);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=Gb&&{}.toString.call(this)==qb?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=mb)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=Gb&&{}.toString.call(this)==qb?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=mb)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return{}.toString.call(a)==ib}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Hb=R.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Ib=Hb.prototype;Ib.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Ib.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Ib.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},Kb.toArray=function(){return this.disposables.slice(0)};var Lb=R.Disposable=function(a){this.isDisposed=!1,this.action=a||S};Lb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Mb=Lb.create=function(a){return new Lb(a)},Nb=Lb.empty={dispose:S},Ob=R.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),Pb=R.SerialDisposable=Ob,Qb=(R.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Nb:new a(this)},b}(),R.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||X,this.disposable=new Ob});Qb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Qb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Qb.prototype.isCancelled=function(){return this.disposable.isDisposed},Qb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Rb=R.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Nb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=V,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Sb=Rb.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Jb,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),Nb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Jb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Nb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Rb.prototype),function(){Rb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Rb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof M.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=M.setInterval(function(){d=c(d)},b);return Mb(function(){M.clearInterval(e)})}}(Rb.prototype);var Tb,Ub=Rb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Sb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Rb(V,a,b,c)}(),Vb=Rb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Rb.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Rb.normalize(c),g=new Qb(this,b,d,f);if(e)e.enqueue(g);else{e=new Hb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Rb(V,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Wb=(R.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Ob;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),S),Xb=function(){var a,b=S;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!M.setTimeout)throw new Error("No concurrency detected!");a=M.setTimeout,b=M.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Yb=Xb.setTimeout,Zb=Xb.clearTimeout;!function(){function a(){if(!M.postMessage||M.importScripts)return!1;var a=!1,b=M.onmessage;return M.onmessage=function(){a=!0},M.postMessage("","*"),M.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(rb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=Q&&P&&Q.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=Q&&P&&Q.clearImmediate)&&!c.test(e)&&e;if("function"==typeof d)Tb=d,Wb=e;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Tb=process.nextTick;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;M.addEventListener?M.addEventListener("message",b,!1):M.attachEvent("onmessage",b,!1),Tb=function(a){var b=h++;g[b]=a,M.postMessage(f+b,"*")}}else if(M.MessageChannel){var i=new M.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Tb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in M&&"onreadystatechange"in M.document.createElement("script")?Tb=function(a){var b=M.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},M.document.documentElement.appendChild(b)}:(Tb=function(a){return Yb(a,0)},Wb=Zb)}();var $b=Rb.timeout=function(){function a(a,b){var c=this,d=new Ob,e=Tb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Jb(d,Mb(function(){Wb(e)}))}function b(a,b,c){var d=this,e=Rb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Ob,g=Yb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Jb(f,Mb(function(){Zb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Rb(V,a,b,c)}(),_b=R.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return T(a)||(a=Ub),new Kc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),ac=_b.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new _b("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),bc=_b.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new _b("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),cc=_b.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new _b("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),dc=R.internals.Enumerator=function(a){this._next=a};dc.prototype.next=function(){return this._next()},dc.prototype[bb]=function(){return this};var ec=R.internals.Enumerable=function(a){this._iterator=a};ec.prototype[bb]=function(){return this._iterator()},ec.prototype.concat=function(){var a=this;return new Kc(function(b){var c;try{c=a[bb]()}catch(d){return void b.onError()}var e,f=new Pb,g=Ub.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;Z(h)&&(h=Dc(h));var i=new Ob;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new Jb(f,g,Mb(function(){e=!0}))})},ec.prototype.catchError=function(){var a=this;return new Kc(function(b){var c;try{c=a[bb]()}catch(d){return void b.onError()}var e,f,g=new Pb,h=Ub.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;Z(i)&&(i=Dc(i));var j=new Ob;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new Jb(g,h,Mb(function(){e=!0}))})};var fc=ec.repeat=function(a,b){return null==b&&(b=-1),new ec(function(){var c=b;return new dc(function(){return 0===c?cb:(c>0&&c--,{done:!1,value:a})})})},gc=ec.of=function(a,b,c){return b||(b=U),new ec(function(){var d=-1;return new dc(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(kc);jc.toArray=function(){var a=this;return new Kc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},mc.create=mc.createWithDisposable=function(a){return new Kc(a)};var oc=mc.defer=function(a){return new Kc(function(b){var c;try{c=a()}catch(d){return uc(d).subscribe(b)}return Z(c)&&(c=Dc(c)),c.subscribe(b)})},pc=mc.empty=function(a){return T(a)||(a=Ub),new Kc(function(b){return a.schedule(function(){b.onCompleted()})})},qc=Math.pow(2,53)-1;m.prototype[bb]=function(){return new n(this._s)},n.prototype[bb]=function(){return this},n.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};mc.never=function(){return new Kc(function(){return Nb})}}mc.of=function(){return v(null,arguments)},mc.ofWithScheduler=function(a){return v(a,Cb.call(arguments,1))},mc.range=function(a,b,c){return T(c)||(c=Vb),new Kc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},mc.repeat=function(a,b,c){return T(c)||(c=Vb),tc(a,c).repeat(null==b?-1:b)};var tc=mc["return"]=mc.just=function(a,b){return T(b)||(b=Ub),new Kc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};mc.returnValue=function(){return gb("returnValue","return or just"),tc.apply(null,arguments)};var uc=mc["throw"]=mc.throwException=mc.throwError=function(a,b){return T(b)||(b=Ub),new Kc(function(c){return b.schedule(function(){c.onError(a)})})};jc["catch"]=jc.catchError=function(a){return"function"==typeof a?w(this,a):vc([this,a])},jc.catchException=function(a){return gb("catchException","catch or catchError"),this.catchError(a)};var vc=mc.catchError=mc["catch"]=function(){return gc(j(arguments,0)).catchError()};mc.catchException=function(){return gb("catchException","catch or catchError"),vc.apply(null,arguments)},jc.combineLatest=function(){var a=Cb.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),wc.apply(this,a)};var wc=mc.combineLatest=function(){var a=Cb.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Kc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(U))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(U)&&c.onCompleted()}function e(a){j[a]=!0,j.every(U)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new Ob;Z(f)&&(f=Dc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new Jb(m)})};jc.concat=function(){var a=Cb.call(arguments,0);return a.unshift(this),xc.apply(this,a)};var xc=mc.concat=function(){return gc(j(arguments,0)).concat()};jc.concatAll=function(){return this.merge(1)},jc.concatObservable=function(){return gb("concatObservable","concatAll"),this.merge(1)},jc.merge=function(a){if("number"!=typeof a)return yc(this,a);var b=this;return new Kc(function(c){function d(a){var b=new Ob;f.add(b),Z(a)&&(a=Dc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Jb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var yc=mc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=Cb.call(arguments,1)):(a=Ub,b=Cb.call(arguments,0)):(a=Ub,b=Cb.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),v(a,b).mergeAll()};jc.mergeAll=function(){var a=this;return new Kc(function(b){var c=new Jb,d=!1,e=new Ob;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Ob;c.add(e),Z(a)&&(a=Dc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},jc.mergeObservable=function(){return gb("mergeObservable","mergeAll"),this.mergeAll.apply(this,arguments)},jc.skipUntil=function(a){var b=this;return new Kc(function(c){var d=!1,e=new Jb(b.subscribe(function(a){d&&c.onNext(a)},c.onError.bind(c),function(){d&&c.onCompleted()}));Z(a)&&(a=Dc(a));var f=new Ob;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},c.onError.bind(c),function(){f.dispose() +(function(a){function b(){if(this.isDisposed)throw new Error(ab)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;Ab.nonEnumArgs&&a.length&&h(a)&&(a=Cb.call(a));var d=Ab.enumPrototypes&&"function"==typeof a,e=Ab.enumErrorProps&&(a===ub||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(Ab.nonEnumShadows&&a!==vb){var g=a.constructor,i=-1,j=yb.length;if(a===(g&&g.prototype))var k=a===stringProto?qb:a===ub?lb:rb.call(a),l=zb[k];for(;++i-1:void 0});return c.pop(),d.pop(),r}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:Cb.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(){this._s=s}function n(){this._s=s,this._l=s.length,this._i=0}function o(a){this._a=a}function p(a){this._a=a,this._l=u(a),this._i=0}function q(a){return"number"==typeof a&&M.isFinite(a)}function r(b){var c,d=b[bb];if(!d&&"string"==typeof b)return c=new m(b),c[bb]();if(!d&&b.length!==a)return c=new o(b),c[bb]();if(!d)throw new TypeError("Object is not iterable");return b[bb]()}function t(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function u(a){var b=+a.length;return isNaN(b)?0:0!==b&&q(b)?(b=t(b)*Math.floor(Math.abs(b)),0>=b?0:b>qc?qc:b):b}function v(a,b){return T(a)||(a=Vb),new Kc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function w(a,b){return new Kc(function(c){var d=new Ob,e=new Pb;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}Z(f)&&(f=Dc(f)),d=new Ob,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function x(a,b){var c=this;return new Kc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function y(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return Z(f)&&(f=Dc(f)),(eb(f)||db(f))&&(f=rc(f)),f}).concatAll()}function z(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return Z(f)&&(f=Dc(f)),(eb(f)||db(f))&&(f=rc(f)),f}).mergeAll()}function A(a){var b=function(){this.cancelBubble=!0},c=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(a||(a=M.event),!a.target)switch(a.target=a.target||a.srcElement,"mouseover"==a.type&&(a.relatedTarget=a.fromElement),"mouseout"==a.type&&(a.relatedTarget=a.toElement),a.stopPropagation||(a.stopPropagation=b,a.preventDefault=c),a.type){case"keypress":var d="charCode"in a?a.charCode:a.keyCode;10==d?(d=0,a.keyCode=13):13==d||27==d?d=0:3==d&&(d=99),a.charCode=d,a.keyChar=a.charCode?String.fromCharCode(a.charCode):""}return a}function B(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Mb(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(A(a))};return a.attachEvent("on"+b,d),Mb(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,Mb(function(){a["on"+b]=null})}function C(a,b,c){var d=new Jb;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(C(a.item(e),b,c));else a&&d.add(B(a,b,c));return d}function D(a,b){return new Kc(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function E(a,b,c){return new Kc(function(d){var e=0,f=a,g=Sb(b);return c.scheduleRecursiveWithAbsolute(f,function(a){if(g>0){var b=c.now();f+=g,b>=f&&(f=b+g)}d.onNext(e++),a(f)})})}function F(a,b){return new Kc(function(c){return b.scheduleWithRelative(Sb(a),function(){c.onNext(0),c.onCompleted()})})}function G(a,b,c){return a===b?new Kc(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):oc(function(){return E(c.now()+a,b,c)})}function H(a,b,c){return new Kc(function(d){var e,f=!1,g=new Pb,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Ob,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new Jb(e,g)})}function I(a,b,c){return oc(function(){return H(a,b-c.now(),c)})}function J(a,b){return new Kc(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Jb(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))})}function K(a,b,c){return new Kc(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(U))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new Jb(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d),function(){i=!0,e(!0,1)}))})}var L={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},M=L[typeof window]&&window||this,N=L[typeof exports]&&exports&&!exports.nodeType&&exports,O=L[typeof module]&&module&&!module.nodeType&&module,P=O&&O.exports===N&&N,Q=L[typeof global]&&global;!Q||Q.global!==Q&&Q.window!==Q||(M=Q);var R={internals:{},config:{Promise:M.Promise},helpers:{}},S=R.helpers.noop=function(){},T=(R.helpers.notDefined=function(a){return"undefined"==typeof a},R.helpers.isScheduler=function(a){return a instanceof R.Scheduler}),U=R.helpers.identity=function(a){return a},V=(R.helpers.pluck=function(a){return function(b){return b[a]}},R.helpers.just=function(a){return function(){return a}},R.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),W=R.helpers.defaultComparer=function(a,b){return Bb(a,b)},X=R.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Y=(R.helpers.defaultKeySerializer=function(a){return a.toString()},R.helpers.defaultError=function(a){throw a}),Z=R.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},$=(R.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},R.helpers.not=function(a){return!a},R.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==rb.call(a)}),a}()),_="Argument out of range",ab="Object has been disposed",bb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";M.Set&&"function"==typeof(new M.Set)["@@iterator"]&&(bb="@@iterator");var cb=R.doneEnumerator={done:!0,value:a},db=R.helpers.isIterable=function(b){return b[bb]!==a},eb=R.helpers.isArrayLike=function(b){return b&&b.length!==a};R.helpers.iterator=bb;var fb,gb=R.helpers.deprecate=function(){},hb="[object Arguments]",ib="[object Array]",jb="[object Boolean]",kb="[object Date]",lb="[object Error]",mb="[object Function]",nb="[object Number]",ob="[object Object]",pb="[object RegExp]",qb="[object String]",rb=Object.prototype.toString,sb=Object.prototype.hasOwnProperty,tb=rb.call(arguments)==hb,ub=Error.prototype,vb=Object.prototype,wb=vb.propertyIsEnumerable;try{fb=!(rb.call(document)==ob&&!({toString:0}+""))}catch(xb){fb=!0}var yb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],zb={};zb[ib]=zb[kb]=zb[nb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},zb[jb]=zb[qb]={constructor:!0,toString:!0,valueOf:!0},zb[lb]=zb[mb]=zb[pb]={constructor:!0,toString:!0},zb[ob]={constructor:!0};var Ab={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Ab.enumErrorProps=wb.call(ub,"message")||wb.call(ub,"name"),Ab.enumPrototypes=wb.call(a,"prototype"),Ab.nonEnumArgs=0!=c,Ab.nonEnumShadows=!/valueOf/.test(b)}(1),tb||(h=function(a){return a&&"object"==typeof a?sb.call(a,"callee"):!1});{var Bb=R.internals.isEqual=function(a,b){return i(a,b,[],[])},Cb=Array.prototype.slice,Db=({}.hasOwnProperty,this.inherits=R.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),Eb=R.internals.addProperties=function(a){for(var b=Cb.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}};R.internals.addRef=function(a,b){return new Kc(function(c){return new Jb(b.getDisposable(),a.subscribe(c))})}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Cb.call(arguments,1),d=function(){function e(){}if(this instanceof d){e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(Cb.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(Cb.call(arguments)))};return d}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}});var Fb=Object("a"),Gb="a"!=Fb[0]||!(0 in Fb);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=Gb&&{}.toString.call(this)==qb?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=mb)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=Gb&&{}.toString.call(this)==qb?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=mb)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return{}.toString.call(a)==ib}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Hb=R.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Ib=Hb.prototype;Ib.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Ib.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Ib.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},Kb.toArray=function(){return this.disposables.slice(0)};var Lb=R.Disposable=function(a){this.isDisposed=!1,this.action=a||S};Lb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Mb=Lb.create=function(a){return new Lb(a)},Nb=Lb.empty={dispose:S},Ob=R.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),Pb=R.SerialDisposable=Ob,Qb=(R.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Nb:new a(this)},b}(),R.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||X,this.disposable=new Ob});Qb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Qb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Qb.prototype.isCancelled=function(){return this.disposable.isDisposed},Qb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Rb=R.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Nb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=V,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Sb=Rb.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Jb,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),Nb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Jb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Nb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Rb.prototype),function(){Rb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Rb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof M.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=M.setInterval(function(){d=c(d)},b);return Mb(function(){M.clearInterval(e)})}}(Rb.prototype);var Tb,Ub=Rb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Sb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Rb(V,a,b,c)}(),Vb=Rb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Rb.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Rb.normalize(c),g=new Qb(this,b,d,f);if(e)e.enqueue(g);else{e=new Hb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Rb(V,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Wb=(R.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Ob;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),S),Xb=function(){var a,b=S;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!M.setTimeout)throw new Error("No concurrency detected!");a=M.setTimeout,b=M.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Yb=Xb.setTimeout,Zb=Xb.clearTimeout;!function(){function a(){if(!M.postMessage||M.importScripts)return!1;var a=!1,b=M.onmessage;return M.onmessage=function(){a=!0},M.postMessage("","*"),M.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(rb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=Q&&P&&Q.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=Q&&P&&Q.clearImmediate)&&!c.test(e)&&e;if("function"==typeof d)Tb=d,Wb=e;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Tb=process.nextTick;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;M.addEventListener?M.addEventListener("message",b,!1):M.attachEvent("onmessage",b,!1),Tb=function(a){var b=h++;g[b]=a,M.postMessage(f+b,"*")}}else if(M.MessageChannel){var i=new M.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Tb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in M&&"onreadystatechange"in M.document.createElement("script")?Tb=function(a){var b=M.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},M.document.documentElement.appendChild(b)}:(Tb=function(a){return Yb(a,0)},Wb=Zb)}();var $b=Rb.timeout=function(){function a(a,b){var c=this,d=new Ob,e=Tb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Jb(d,Mb(function(){Wb(e)}))}function b(a,b,c){var d=this,e=Rb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Ob,g=Yb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Jb(f,Mb(function(){Zb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Rb(V,a,b,c)}(),_b=R.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return T(a)||(a=Ub),new Kc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),ac=_b.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new _b("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),bc=_b.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new _b("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),cc=_b.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new _b("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),dc=R.internals.Enumerator=function(a){this._next=a};dc.prototype.next=function(){return this._next()},dc.prototype[bb]=function(){return this};var ec=R.internals.Enumerable=function(a){this._iterator=a};ec.prototype[bb]=function(){return this._iterator()},ec.prototype.concat=function(){var a=this;return new Kc(function(b){var c;try{c=a[bb]()}catch(d){return void b.onError()}var e,f=new Pb,g=Ub.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;Z(h)&&(h=Dc(h));var i=new Ob;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new Jb(f,g,Mb(function(){e=!0}))})},ec.prototype.catchError=function(){var a=this;return new Kc(function(b){var c;try{c=a[bb]()}catch(d){return void b.onError()}var e,f,g=new Pb,h=Ub.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;Z(i)&&(i=Dc(i));var j=new Ob;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new Jb(g,h,Mb(function(){e=!0}))})};var fc=ec.repeat=function(a,b){return null==b&&(b=-1),new ec(function(){var c=b;return new dc(function(){return 0===c?cb:(c>0&&c--,{done:!1,value:a})})})},gc=ec.of=function(a,b,c){return b||(b=U),new ec(function(){var d=-1;return new dc(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(kc);jc.toArray=function(){var a=this;return new Kc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},mc.create=mc.createWithDisposable=function(a){return new Kc(a)};var oc=mc.defer=function(a){return new Kc(function(b){var c;try{c=a()}catch(d){return uc(d).subscribe(b)}return Z(c)&&(c=Dc(c)),c.subscribe(b)})},pc=mc.empty=function(a){return T(a)||(a=Ub),new Kc(function(b){return a.schedule(function(){b.onCompleted()})})},qc=Math.pow(2,53)-1;m.prototype[bb]=function(){return new n(this._s)},n.prototype[bb]=function(){return this},n.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};mc.never=function(){return new Kc(function(){return Nb})}}mc.of=function(){return v(null,arguments)},mc.ofWithScheduler=function(a){return v(a,Cb.call(arguments,1))},mc.range=function(a,b,c){return T(c)||(c=Vb),new Kc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},mc.repeat=function(a,b,c){return T(c)||(c=Vb),tc(a,c).repeat(null==b?-1:b)};var tc=mc["return"]=mc.just=function(a,b){return T(b)||(b=Ub),new Kc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};mc.returnValue=function(){return gb("returnValue","return or just"),tc.apply(null,arguments)};var uc=mc["throw"]=mc.throwException=mc.throwError=function(a,b){return T(b)||(b=Ub),new Kc(function(c){return b.schedule(function(){c.onError(a)})})};jc["catch"]=jc.catchError=function(a){return"function"==typeof a?w(this,a):vc([this,a])},jc.catchException=function(a){return gb("catchException","catch or catchError"),this.catchError(a)};var vc=mc.catchError=mc["catch"]=function(){return gc(j(arguments,0)).catchError()};mc.catchException=function(){return gb("catchException","catch or catchError"),vc.apply(null,arguments)},jc.combineLatest=function(){var a=Cb.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),wc.apply(this,a)};var wc=mc.combineLatest=function(){var a=Cb.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Kc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(U))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(U)&&c.onCompleted()}function e(a){j[a]=!0,j.every(U)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new Ob;Z(f)&&(f=Dc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new Jb(m)})};jc.concat=function(){var a=Cb.call(arguments,0);return a.unshift(this),xc.apply(this,a)};var xc=mc.concat=function(){return gc(j(arguments,0)).concat()};jc.concatAll=function(){return this.merge(1)},jc.concatObservable=function(){return gb("concatObservable","concatAll"),this.merge(1)},jc.merge=function(a){if("number"!=typeof a)return yc(this,a);var b=this;return new Kc(function(c){function d(a){var b=new Ob;f.add(b),Z(a)&&(a=Dc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Jb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var yc=mc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=Cb.call(arguments,1)):(a=Ub,b=Cb.call(arguments,0)):(a=Ub,b=Cb.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),v(a,b).mergeAll()};jc.mergeAll=function(){var a=this;return new Kc(function(b){var c=new Jb,d=!1,e=new Ob;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Ob;c.add(e),Z(a)&&(a=Dc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},jc.mergeObservable=function(){return gb("mergeObservable","mergeAll"),this.mergeAll.apply(this,arguments)},jc.skipUntil=function(a){var b=this;return new Kc(function(c){var d=!1,e=new Jb(b.subscribe(function(a){d&&c.onNext(a)},c.onError.bind(c),function(){d&&c.onCompleted()}));Z(a)&&(a=Dc(a));var f=new Ob;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},c.onError.bind(c),function(){f.dispose() })),e})},jc["switch"]=jc.switchLatest=function(){var a=this;return new Kc(function(b){var c=!1,d=new Pb,e=!1,f=0,g=a.subscribe(function(a){var g=new Ob,h=++f;c=!0,d.setDisposable(g),Z(a)&&(a=Dc(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},b.onError.bind(b),function(){e=!0,!c&&b.onCompleted()});return new Jb(g,d)})},jc.takeUntil=function(a){var b=this;return new Kc(function(c){return Z(a)&&(a=Dc(a)),new Jb(b.subscribe(c),a.subscribe(c.onCompleted.bind(c),c.onError.bind(c),S))})},jc.zip=function(){if(Array.isArray(arguments[0]))return x.apply(this,arguments);var a=this,b=Cb.call(arguments),c=b.pop();return b.unshift(a),new Kc(function(d){function e(b){var e,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(U)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new Ob;Z(c)&&(c=Dc(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new Jb(j)})},mc.zip=function(){var a=Cb.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},mc.zipArray=function(){var a=j(arguments,0);return new Kc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(U))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(U)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Ob,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new Jb(h);return j.add(Mb(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},jc.asObservable=function(){return new Kc(this.subscribe.bind(this))},jc.dematerialize=function(){var a=this;return new Kc(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},jc.distinctUntilChanged=function(a,b){var c=this;return a||(a=U),b||(b=W),new Kc(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},jc["do"]=jc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new Kc(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b)try{b(c)}catch(d){a.onError(d)}a.onError(c)},function(){if(c)try{c()}catch(b){a.onError(b)}a.onCompleted()})})},jc.doAction=function(){return gb("doAction","do or tap"),this.tap.apply(this,arguments)},jc.doOnNext=jc.tapOnNext=function(a,b){return this.tap(2===arguments.length?function(c){a.call(b,c)}:a)},jc.doOnError=jc.tapOnError=function(a,b){return this.tap(S,2===arguments.length?function(c){a.call(b,c)}:a)},jc.doOnCompleted=jc.tapOnCompleted=function(a,b){return this.tap(S,null,2===arguments.length?function(){a.call(b)}:a)},jc["finally"]=jc.ensure=function(a){var b=this;return new Kc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Mb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},jc.finallyAction=function(a){return gb("finallyAction","finally or ensure"),this.ensure(a)},jc.ignoreElements=function(){var a=this;return new Kc(function(b){return a.subscribe(S,b.onError.bind(b),b.onCompleted.bind(b))})},jc.materialize=function(){var a=this;return new Kc(function(b){return a.subscribe(function(a){b.onNext(ac(a))},function(a){b.onNext(bc(a)),b.onCompleted()},function(){b.onNext(cc()),b.onCompleted()})})},jc.repeat=function(a){return fc(this,a).concat()},jc.retry=function(a){return fc(this,a).catchError()},jc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new Kc(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},jc.skipLast=function(a){var b=this;return new Kc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},jc.startWith=function(){var a,b,c=0;return arguments.length&&T(arguments[0])?(b=arguments[0],c=1):b=Ub,a=Cb.call(arguments,c),gc([sc(a,b),this]).concat()},jc.takeLast=function(a){var b=this;return new Kc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},jc.selectConcat=jc.concatMap=function(a,b,c){return $(a)&&$(b)?this.concatMap(function(c,d){var e=a(c,d);return Z(e)&&(e=Dc(e)),(eb(e)||db(e))&&(e=rc(e)),e.map(function(a,e){return b(c,a,d,e)})}):$(a)?y(this,a,c):y(this,function(){return a})},jc.select=jc.map=function(a,b){var c=$(a)?a:function(){return a},d=this;return new Kc(function(a){var e=0;return d.subscribe(function(f){var g;try{g=c.call(b,f,e++,d)}catch(h){return void a.onError(h)}a.onNext(g)},a.onError.bind(a),a.onCompleted.bind(a))})},jc.pluck=function(a){return this.map(function(b){return b[a]})},jc.selectMany=jc.flatMap=function(a,b,c){return $(a)&&$(b)?this.flatMap(function(c,d){var e=a(c,d);return Z(e)&&(e=Dc(e)),(eb(e)||db(e))&&(e=rc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):$(a)?z(this,a,c):z(this,function(){return a})},jc.selectSwitch=jc.flatMapLatest=jc.switchMap=function(a,b){return this.select(a,b).switchLatest()},jc.skip=function(a){if(0>a)throw new Error(_);var b=this;return new Kc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},jc.skipWhile=function(a,b){var c=this;return new Kc(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},jc.take=function(a,b){if(0>a)throw new RangeError(_);if(0===a)return pc(b);var c=this;return new Kc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},jc.takeWhile=function(a,b){var c=this;return new Kc(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},jc.where=jc.filter=function(a,b){var c=this;return new Kc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},mc.fromCallback=function(a,b,c){return function(){var d=Cb.call(arguments,0);return new Kc(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},mc.fromNodeCallback=function(a,b,c){return function(){var d=Cb.call(arguments,0);return new Kc(function(e){function f(a){if(a)return void e.onError(a);var b=Cb.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},R.config.useNativeEvents=!1;var zc=M.angular&&angular.element?angular.element:M.jQuery?M.jQuery:M.Zepto?M.Zepto:null,Ac=!!M.Ember&&"function"==typeof M.Ember.addListener,Bc=!!M.Backbone&&!!M.Backbone.Marionette;mc.fromEvent=function(a,b,c){if(a.addListener)return Cc(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!R.config.useNativeEvents){if(Bc)return Cc(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(Ac)return Cc(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c);if(zc){var d=zc(a);return Cc(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}}return new Kc(function(d){return C(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var Cc=mc.fromEventPattern=function(a,b,c){return new Kc(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return Mb(function(){b&&b(e,f)})}).publish().refCount()},Dc=mc.fromPromise=function(a){return oc(function(){var b=new R.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};jc.toPromise=function(a){if(a||(a=R.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},mc.startAsync=function(a){var b;try{b=a()}catch(c){return uc(c)}return Dc(b)},jc.multicast=function(a,b){var c=this;return"function"==typeof a?new Kc(function(d){var e=c.multicast(a());return new Jb(b(e).subscribe(d),e.connect())}):new Ec(c,a)},jc.publish=function(a){return a&&$(a)?this.multicast(function(){return new Nc},a):this.multicast(new Nc)},jc.share=function(){return this.publish().refCount()},jc.publishLast=function(a){return a&&$(a)?this.multicast(function(){return new Oc},a):this.multicast(new Oc)},jc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Qc(b)},a):this.multicast(new Qc(a))},jc.shareValue=function(a){return this.publishValue(a).refCount()},jc.replay=function(a,b,c,d){return a&&$(a)?this.multicast(function(){return new Rc(b,c,d)},a):this.multicast(new Rc(b,c,d))},jc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var Ec=R.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Jb(f.subscribe(c),Mb(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return Db(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Kc(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(mc),Fc=mc.interval=function(a,b){return G(a,a,T(b)?b:$b)};mc.timer=function(b,c,d){var e;return T(d)||(d=$b),c!==a&&"number"==typeof c?e=c:T(c)&&(d=c),b instanceof Date&&e===a?D(b.getTime(),d):b instanceof Date&&e!==a?(e=c,E(b.getTime(),e,d)):e===a?F(b,d):G(b,e,d)}}jc.delay=function(a,b){return T(b)||(b=$b),a instanceof Date?I(this,a.getTime(),b):H(this,a,b)},jc.debounce=jc.throttleWithTimeout=function(a,b){T(b)||(b=$b);var c=this;return new Kc(function(d){var e,f=new Pb,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Ob;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new Jb(i,f)})},jc.throttle=function(a,b){return gb("throttle","debounce or throttleWithTimeout"),this.debounce(a,b)},jc.timestamp=function(a){return T(a)||(a=$b),this.map(function(b){return{value:b,timestamp:a.now()}})},jc.sample=jc.throttleLatest=function(a,b){return T(b)||(b=$b),"number"==typeof a?J(this,Fc(a,b)):J(this,a)},jc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=uc(new Error(b||"Timeout"))),T(c)||(c=$b);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Kc(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(Z(b)&&(b=Dc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Ob,j=new Pb,k=!1,l=new Pb;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new Jb(j,l)})},jc.throttleFirst=function(a,b){T(b)||(b=$b);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Kc(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},a.onError.bind(a),a.onCompleted.bind(a))})};var Gc=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Nb,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Nb)});return new Jb(c,d,e)}function c(c,d){this.source=c,this.controller=new Nc,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return Db(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(mc);jc.pausable=function(a){return new Gc(this,a)};var Hc=function(b){function c(b){var c,d=[],e=K(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new Nc,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c)}return Db(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(mc);jc.pausableBuffered=function(a){return new Hc(this,a)},jc.controlled=function(a){return null==a&&(a=!0),new Ic(this,a)};var Ic=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new Jc(d),this.source=c.multicast(this.subject).refCount()}return Db(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(mc),Jc=R.ControlledSubject=function(a){function c(a){return this.subject.subscribe(a)}function d(b){null==b&&(b=!0),a.call(this,c),this.subject=new Nc,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=Nb,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=Nb}return Db(d,a),Eb(d.prototype,hc,{onCompleted:function(){b.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){b.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){b.call(this);var c=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),c=!0),c&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=Nb):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=Nb),{numberOfItems:a,returnValue:!1}},request:function(a){b.call(this),this.disposeCurrentRequest();var c=this,d=this._processRequest(a);return a=d.numberOfItems,d.returnValue?Nb:(this.requestedCount=a,this.requestedDisposable=Mb(function(){c.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Nb},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),d}(mc);jc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new Kc(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})})};var Kc=R.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Mb(a):Nb}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new Lc(a);return Vb.scheduleRequired()?Vb.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return Db(c,a),c}(mc),Lc=function(a){function b(b){a.call(this),this.observer=b,this.m=new Ob}Db(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(kc),Mc=function(a,b){this.subject=a,this.observer=b};Mc.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var Nc=R.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),Nb):(a.onCompleted(),Nb):(this.observers.push(a),new Mc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return Db(d,a),Eb(d.prototype,hc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Pc(a,b)},d}(mc),Oc=R.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new Mc(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),Nb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return Db(d,a),Eb(d.prototype,hc,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(mc),Pc=R.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return Db(b,a),Eb(b.prototype,hc,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(mc),Qc=R.BehaviorSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new Mc(this,a);var c=this.exception;return c?a.onError(c):a.onCompleted(),Nb}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return Db(d,a),Eb(d.prototype,hc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=this.observers.slice(0),d=c.length;d>a;a++)c[a].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped){this.value=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(mc),Rc=R.ReplaySubject=function(a){function c(a,b){return Mb(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var d=new nc(this.scheduler,a),e=c(this,d);b.call(this),this._trim(this.scheduler.now()),this.observers.push(d);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)d.onNext(this.q[g].value);return this.hasError?(f++,d.onError(this.error)):this.isStopped&&(f++,d.onCompleted()),d.ensureActive(f),e}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||Vb,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return Db(e,a),Eb(e.prototype,hc,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++){var f=c[d];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(mc);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(M.Rx=R,define(function(){return R})):N&&O?P?(O.exports=R).Rx=R:N.Rx=R:M.Rx=R}).call(this); //# sourceMappingURL=rx.lite.compat.map \ No newline at end of file diff --git a/dist/rx.lite.js b/dist/rx.lite.js index 95d55a8a7..e76eb5194 100644 --- a/dist/rx.lite.js +++ b/dist/rx.lite.js @@ -2011,7 +2011,7 @@ * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence. */ var observableFromArray = Observable.fromArray = function (array, scheduler) { - //deprecate('fromArray', 'from'); + deprecate('fromArray', 'from'); isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new AnonymousObservable(function (observer) { var count = 0, len = array.length; diff --git a/dist/rx.lite.map b/dist/rx.lite.map index d2fdf243f..e6c6157c0 100644 --- a/dist/rx.lite.map +++ b/dist/rx.lite.map @@ -1 +1 @@ -{"version":3,"file":"rx.lite.min.js","sources":["rx.lite.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","scheduler","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","flatMap","mergeAll","createListener","element","name","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","combineLatestSource","subject","next","values","res","hasValueAll","every","identity","err","apply","isDone","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","ScheduledItem","RefCountDisposable","InnerDisposable","disposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","scheduleMethod","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","_next","Enumerable","_iterator","concat","currentItem","currentValue","catchError","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","n","asObserver","AnonymousObserver","observerCreate","fromNotifier","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","Observable","_subscribe","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","list","observableFromArray","fromArray","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","filter","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","m","innerSubscription","mergeObservable","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","i2","select","selectorFn","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","predicate","take","RangeError","observable","takeWhile","where","fromCallback","func","context","results","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","innerHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","Subject","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","sample","throttleLatest","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","throttleFirst","windowDuration","duration","lastOnNext","PausableObservable","_super","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","transduce","transducer","transformForObserver","init","step","obs","input","xform","fixSubscriber","subscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","createRemovableDisposable","so","_trim","hasError","windowSize","Number","MAX_VALUE","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAsFlE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,i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WAEX,GADApH,EAAcgB,KAAKf,OACfA,KAAK0c,UAAT,CACA1c,KAAK0c,WAAY,CACjB,IAAI/R,GAAM3K,KAAK0G,UAAUiE,KACzB3K,MAAKssB,MAAM3hB,EAEX,KAAK,GADD9E,GAAI7F,KAAK+rB,UAAUjrB,MAAM,GACpB8D,EAAI,EAAGwB,EAAMP,EAAEjF,OAAYwF,EAAJxB,EAASA,IAAK,CAC5C,GAAImC,GAAWlB,EAAEjB,EACjBmC,GAASI,cACTJ,EAAS2W,eAEX1d,KAAK+rB,eAKP3Z,QAAS,WACPpS,KAAKC,YAAa,EAClBD,KAAK+rB,UAAY,QAIdtE,GACPxK,GAEqB,mBAAV0P,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvElnB,EAAKsI,GAAKA,EAEV2e,OAAO,WACH,MAAO3e,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInBtI,EAAKsI,GAAKA,IAGhBjN,KAAKf"} \ No newline at end of file +{"version":3,"file":"rx.lite.min.js","sources":["rx.lite.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","scheduler","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","flatMap","mergeAll","createListener","element","name","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","combineLatestSource","subject","next","values","res","hasValueAll","every","identity","err","apply","isDone","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","ScheduledItem","RefCountDisposable","InnerDisposable","disposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","scheduleMethod","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","_next","Enumerable","_iterator","concat","currentItem","currentValue","catchError","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","n","asObserver","AnonymousObserver","observerCreate","fromNotifier","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","Observable","_subscribe","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","list","observableFromArray","fromArray","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","filter","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","m","innerSubscription","mergeObservable","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","i2","select","selectorFn","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","predicate","take","RangeError","observable","takeWhile","where","fromCallback","func","context","results","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","innerHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","Subject","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","sample","throttleLatest","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","throttleFirst","windowDuration","duration","lastOnNext","PausableObservable","_super","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","transduce","transducer","transformForObserver","init","step","obs","input","xform","fixSubscriber","subscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","createRemovableDisposable","so","_trim","hasError","windowSize","Number","MAX_VALUE","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAsFlE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,IAAIJ,KAAYiB,GAAQA,EAAKI,WAC3B,GAAIC,GAAYtB,IAAWuB,YAAcC,GAAcxB,IAAWY,GAAaa,GAAaC,GAASnB,KAAKP,GACtG2B,EAAUC,GAAaN,EAE7B,QAASH,EAAQf,GACfS,EAAMO,GAAcD,GACdQ,GAAWA,EAAQd,KAASgB,GAAetB,KAAKP,EAAQa,IAC5DZ,EAAOa,KAAKD,GAIlB,MAAOZ,GAGT,QAAS6B,GAAY9B,EAAQ+B,EAAUC,GAKrC,IAJA,GAAIb,GAAQ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,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInBtI,EAAKsI,GAAKA,IAGhBjN,KAAKf"} \ No newline at end of file diff --git a/dist/rx.lite.min.js b/dist/rx.lite.min.js index 1c9c1305e..23b4ccffe 100644 --- a/dist/rx.lite.min.js +++ b/dist/rx.lite.min.js @@ -1,4 +1,4 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ -(function(a){function b(){if(this.isDisposed)throw new Error(_)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;zb.nonEnumArgs&&a.length&&h(a)&&(a=Bb.call(a));var d=zb.enumPrototypes&&"function"==typeof a,e=zb.enumErrorProps&&(a===tb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(zb.nonEnumShadows&&a!==ub){var g=a.constructor,i=-1,j=xb.length;if(a===(g&&g.prototype))var k=a===stringProto?pb:a===tb?kb:qb.call(a),l=yb[k];for(;++i-1:void 0});return c.pop(),d.pop(),r}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:Bb.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(){this._s=s}function n(){this._s=s,this._l=s.length,this._i=0}function o(a){this._a=a}function p(a){this._a=a,this._l=u(a),this._i=0}function q(a){return"number"==typeof a&&L.isFinite(a)}function r(b){var c,d=b[ab];if(!d&&"string"==typeof b)return c=new m(b),c[ab]();if(!d&&b.length!==a)return c=new o(b),c[ab]();if(!d)throw new TypeError("Object is not iterable");return b[ab]()}function t(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function u(a){var b=+a.length;return isNaN(b)?0:0!==b&&q(b)?(b=t(b)*Math.floor(Math.abs(b)),0>=b?0:b>nc?nc:b):b}function v(a,b){return S(a)||(a=Sb),new Hc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function w(a,b){return new Hc(function(c){var d=new Lb,e=new Mb;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}Y(f)&&(f=Ac(f)),d=new Lb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function x(a,b){var c=this;return new Hc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function y(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return Y(f)&&(f=Ac(f)),(db(f)||cb(f))&&(f=oc(f)),f}).concatAll()}function z(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return Y(f)&&(f=Ac(f)),(db(f)||cb(f))&&(f=oc(f)),f}).mergeAll()}function A(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Jb(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function B(a,b,c){var d=new Gb;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(B(a.item(e),b,c));else a&&d.add(A(a,b,c));return d}function C(a,b){return new Hc(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function D(a,b,c){return new Hc(function(d){var e=0,f=a,g=Pb(b);return c.scheduleRecursiveWithAbsolute(f,function(a){if(g>0){var b=c.now();f+=g,b>=f&&(f=b+g)}d.onNext(e++),a(f)})})}function E(a,b){return new Hc(function(c){return b.scheduleWithRelative(Pb(a),function(){c.onNext(0),c.onCompleted()})})}function F(a,b,c){return a===b?new Hc(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):lc(function(){return D(c.now()+a,b,c)})}function G(a,b,c){return new Hc(function(d){var e,f=!1,g=new Mb,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Lb,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new Gb(e,g)})}function H(a,b,c){return lc(function(){return G(a,b-c.now(),c)})}function I(a,b){return new Hc(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Gb(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))})}function J(a,b,c){return new Hc(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(T))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new Gb(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d),function(){i=!0,e(!0,1)}))})}var K={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},L=K[typeof window]&&window||this,M=K[typeof exports]&&exports&&!exports.nodeType&&exports,N=K[typeof module]&&module&&!module.nodeType&&module,O=N&&N.exports===M&&M,P=K[typeof global]&&global;!P||P.global!==P&&P.window!==P||(L=P);var Q={internals:{},config:{Promise:L.Promise},helpers:{}},R=Q.helpers.noop=function(){},S=(Q.helpers.notDefined=function(a){return"undefined"==typeof a},Q.helpers.isScheduler=function(a){return a instanceof Q.Scheduler}),T=Q.helpers.identity=function(a){return a},U=(Q.helpers.pluck=function(a){return function(b){return b[a]}},Q.helpers.just=function(a){return function(){return a}},Q.helpers.defaultNow=Date.now),V=Q.helpers.defaultComparer=function(a,b){return Ab(a,b)},W=Q.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},X=(Q.helpers.defaultKeySerializer=function(a){return a.toString()},Q.helpers.defaultError=function(a){throw a}),Y=Q.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},Z=(Q.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},Q.helpers.not=function(a){return!a},Q.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==qb.call(a)}),a}()),$="Argument out of range",_="Object has been disposed",ab="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";L.Set&&"function"==typeof(new L.Set)["@@iterator"]&&(ab="@@iterator");var bb=Q.doneEnumerator={done:!0,value:a},cb=Q.helpers.isIterable=function(b){return b[ab]!==a},db=Q.helpers.isArrayLike=function(b){return b&&b.length!==a};Q.helpers.iterator=ab;var eb,fb=Q.helpers.deprecate=function(){},gb="[object Arguments]",hb="[object Array]",ib="[object Boolean]",jb="[object Date]",kb="[object Error]",lb="[object Function]",mb="[object Number]",nb="[object Object]",ob="[object RegExp]",pb="[object String]",qb=Object.prototype.toString,rb=Object.prototype.hasOwnProperty,sb=qb.call(arguments)==gb,tb=Error.prototype,ub=Object.prototype,vb=ub.propertyIsEnumerable;try{eb=!(qb.call(document)==nb&&!({toString:0}+""))}catch(wb){eb=!0}var xb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yb={};yb[hb]=yb[jb]=yb[mb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},yb[ib]=yb[pb]={constructor:!0,toString:!0,valueOf:!0},yb[kb]=yb[lb]=yb[ob]={constructor:!0,toString:!0},yb[nb]={constructor:!0};var zb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);zb.enumErrorProps=vb.call(tb,"message")||vb.call(tb,"name"),zb.enumPrototypes=vb.call(a,"prototype"),zb.nonEnumArgs=0!=c,zb.nonEnumShadows=!/valueOf/.test(b)}(1),sb||(h=function(a){return a&&"object"==typeof a?rb.call(a,"callee"):!1});{var Ab=Q.internals.isEqual=function(a,b){return i(a,b,[],[])},Bb=Array.prototype.slice,Cb=({}.hasOwnProperty,this.inherits=Q.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),Db=Q.internals.addProperties=function(a){for(var b=Bb.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}};Q.internals.addRef=function(a,b){return new Hc(function(c){return new Gb(b.getDisposable(),a.subscribe(c))})}}l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Eb=Q.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Fb=Eb.prototype;Fb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Fb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Fb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},Hb.toArray=function(){return this.disposables.slice(0)};var Ib=Q.Disposable=function(a){this.isDisposed=!1,this.action=a||R};Ib.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Jb=Ib.create=function(a){return new Ib(a)},Kb=Ib.empty={dispose:R},Lb=Q.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),Mb=Q.SerialDisposable=Lb,Nb=(Q.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Kb:new a(this)},b}(),Q.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||W,this.disposable=new Lb});Nb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Nb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Nb.prototype.isCancelled=function(){return this.disposable.isDisposed},Nb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Ob=Q.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Kb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=U,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Pb=Ob.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Gb,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),Kb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Gb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Kb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Ob.prototype),function(){Ob.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Ob.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof L.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=L.setInterval(function(){d=c(d)},b);return Jb(function(){L.clearInterval(e)})}}(Ob.prototype);var Qb,Rb=Ob.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Pb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Ob(U,a,b,c)}(),Sb=Ob.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Ob.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Ob.normalize(c),g=new Nb(this,b,d,f);if(e)e.enqueue(g);else{e=new Eb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Ob(U,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Tb=(Q.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Lb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),R),Ub=function(){var a,b=R;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!L.setTimeout)throw new Error("No concurrency detected!");a=L.setTimeout,b=L.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Vb=Ub.setTimeout,Wb=Ub.clearTimeout;!function(){function a(){if(!L.postMessage||L.importScripts)return!1;var a=!1,b=L.onmessage;return L.onmessage=function(){a=!0},L.postMessage("","*"),L.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(qb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=P&&O&&P.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=P&&O&&P.clearImmediate)&&!c.test(e)&&e;if("function"==typeof d)Qb=d,Tb=e;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Qb=process.nextTick;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;L.addEventListener?L.addEventListener("message",b,!1):L.attachEvent("onmessage",b,!1),Qb=function(a){var b=h++;g[b]=a,L.postMessage(f+b,"*")}}else if(L.MessageChannel){var i=new L.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Qb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in L&&"onreadystatechange"in L.document.createElement("script")?Qb=function(a){var b=L.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},L.document.documentElement.appendChild(b)}:(Qb=function(a){return Vb(a,0)},Tb=Wb)}();var Xb=Ob.timeout=function(){function a(a,b){var c=this,d=new Lb,e=Qb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Gb(d,Jb(function(){Tb(e)}))}function b(a,b,c){var d=this,e=Ob.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Lb,g=Vb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Gb(f,Jb(function(){Wb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Ob(U,a,b,c)}(),Yb=Q.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return S(a)||(a=Rb),new Hc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Zb=Yb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Yb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),$b=Yb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Yb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),_b=Yb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Yb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),ac=Q.internals.Enumerator=function(a){this._next=a};ac.prototype.next=function(){return this._next()},ac.prototype[ab]=function(){return this};var bc=Q.internals.Enumerable=function(a){this._iterator=a};bc.prototype[ab]=function(){return this._iterator()},bc.prototype.concat=function(){var a=this;return new Hc(function(b){var c;try{c=a[ab]()}catch(d){return void b.onError()}var e,f=new Mb,g=Rb.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;Y(h)&&(h=Ac(h));var i=new Lb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new Gb(f,g,Jb(function(){e=!0}))})},bc.prototype.catchError=function(){var a=this;return new Hc(function(b){var c;try{c=a[ab]()}catch(d){return void b.onError()}var e,f,g=new Mb,h=Rb.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;Y(i)&&(i=Ac(i));var j=new Lb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new Gb(g,h,Jb(function(){e=!0}))})};var cc=bc.repeat=function(a,b){return null==b&&(b=-1),new bc(function(){var c=b;return new ac(function(){return 0===c?bb:(c>0&&c--,{done:!1,value:a})})})},dc=bc.of=function(a,b,c){return b||(b=T),new bc(function(){var d=-1;return new ac(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(hc);gc.toArray=function(){var a=this;return new Hc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},jc.create=jc.createWithDisposable=function(a){return new Hc(a)};var lc=jc.defer=function(a){return new Hc(function(b){var c;try{c=a()}catch(d){return rc(d).subscribe(b)}return Y(c)&&(c=Ac(c)),c.subscribe(b)})},mc=jc.empty=function(a){return S(a)||(a=Rb),new Hc(function(b){return a.schedule(function(){b.onCompleted()})})},nc=Math.pow(2,53)-1;m.prototype[ab]=function(){return new n(this._s)},n.prototype[ab]=function(){return this},n.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};jc.never=function(){return new Hc(function(){return Kb})}}jc.of=function(){return v(null,arguments)},jc.ofWithScheduler=function(a){return v(a,Bb.call(arguments,1))},jc.range=function(a,b,c){return S(c)||(c=Sb),new Hc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},jc.repeat=function(a,b,c){return S(c)||(c=Sb),qc(a,c).repeat(null==b?-1:b)};var qc=jc["return"]=jc.just=function(a,b){return S(b)||(b=Rb),new Hc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};jc.returnValue=function(){return fb("returnValue","return or just"),qc.apply(null,arguments)};var rc=jc["throw"]=jc.throwException=jc.throwError=function(a,b){return S(b)||(b=Rb),new Hc(function(c){return b.schedule(function(){c.onError(a)})})};gc["catch"]=gc.catchError=function(a){return"function"==typeof a?w(this,a):sc([this,a])},gc.catchException=function(a){return fb("catchException","catch or catchError"),this.catchError(a)};var sc=jc.catchError=jc["catch"]=function(){return dc(j(arguments,0)).catchError()};jc.catchException=function(){return fb("catchException","catch or catchError"),sc.apply(null,arguments)},gc.combineLatest=function(){var a=Bb.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),tc.apply(this,a)};var tc=jc.combineLatest=function(){var a=Bb.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Hc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(T))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(T)&&c.onCompleted()}function e(a){j[a]=!0,j.every(T)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new Lb;Y(f)&&(f=Ac(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new Gb(m)})};gc.concat=function(){var a=Bb.call(arguments,0);return a.unshift(this),uc.apply(this,a)};var uc=jc.concat=function(){return dc(j(arguments,0)).concat()};gc.concatAll=function(){return this.merge(1)},gc.concatObservable=function(){return fb("concatObservable","concatAll"),this.merge(1)},gc.merge=function(a){if("number"!=typeof a)return vc(this,a);var b=this;return new Hc(function(c){function d(a){var b=new Lb;f.add(b),Y(a)&&(a=Ac(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Gb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var vc=jc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=Bb.call(arguments,1)):(a=Rb,b=Bb.call(arguments,0)):(a=Rb,b=Bb.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),v(a,b).mergeAll()};gc.mergeAll=function(){var a=this;return new Hc(function(b){var c=new Gb,d=!1,e=new Lb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Lb;c.add(e),Y(a)&&(a=Ac(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},gc.mergeObservable=function(){return fb("mergeObservable","mergeAll"),this.mergeAll.apply(this,arguments)},gc.skipUntil=function(a){var b=this;return new Hc(function(c){var d=!1,e=new Gb(b.subscribe(function(a){d&&c.onNext(a)},c.onError.bind(c),function(){d&&c.onCompleted()}));Y(a)&&(a=Ac(a));var f=new Lb;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},c.onError.bind(c),function(){f.dispose()})),e})},gc["switch"]=gc.switchLatest=function(){var a=this;return new Hc(function(b){var c=!1,d=new Mb,e=!1,f=0,g=a.subscribe(function(a){var g=new Lb,h=++f;c=!0,d.setDisposable(g),Y(a)&&(a=Ac(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},b.onError.bind(b),function(){e=!0,!c&&b.onCompleted()});return new Gb(g,d)})},gc.takeUntil=function(a){var b=this;return new Hc(function(c){return Y(a)&&(a=Ac(a)),new Gb(b.subscribe(c),a.subscribe(c.onCompleted.bind(c),c.onError.bind(c),R))})},gc.zip=function(){if(Array.isArray(arguments[0]))return x.apply(this,arguments);var a=this,b=Bb.call(arguments),c=b.pop();return b.unshift(a),new Hc(function(d){function e(b){var e,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(T)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new Lb;Y(c)&&(c=Ac(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new Gb(j)})},jc.zip=function(){var a=Bb.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},jc.zipArray=function(){var a=j(arguments,0);return new Hc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(T))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(T)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Lb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new Gb(h);return j.add(Jb(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},gc.asObservable=function(){return new Hc(this.subscribe.bind(this))},gc.dematerialize=function(){var a=this;return new Hc(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},gc.distinctUntilChanged=function(a,b){var c=this;return a||(a=T),b||(b=V),new Hc(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},gc["do"]=gc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new Hc(function(a){return e.subscribe(function(b){try{d(b) +(function(a){function b(){if(this.isDisposed)throw new Error(_)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;zb.nonEnumArgs&&a.length&&h(a)&&(a=Bb.call(a));var d=zb.enumPrototypes&&"function"==typeof a,e=zb.enumErrorProps&&(a===tb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(zb.nonEnumShadows&&a!==ub){var g=a.constructor,i=-1,j=xb.length;if(a===(g&&g.prototype))var k=a===stringProto?pb:a===tb?kb:qb.call(a),l=yb[k];for(;++i-1:void 0});return c.pop(),d.pop(),r}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:Bb.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(){this._s=s}function n(){this._s=s,this._l=s.length,this._i=0}function o(a){this._a=a}function p(a){this._a=a,this._l=u(a),this._i=0}function q(a){return"number"==typeof a&&L.isFinite(a)}function r(b){var c,d=b[ab];if(!d&&"string"==typeof b)return c=new m(b),c[ab]();if(!d&&b.length!==a)return c=new o(b),c[ab]();if(!d)throw new TypeError("Object is not iterable");return b[ab]()}function t(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function u(a){var b=+a.length;return isNaN(b)?0:0!==b&&q(b)?(b=t(b)*Math.floor(Math.abs(b)),0>=b?0:b>nc?nc:b):b}function v(a,b){return S(a)||(a=Sb),new Hc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function w(a,b){return new Hc(function(c){var d=new Lb,e=new Mb;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}Y(f)&&(f=Ac(f)),d=new Lb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function x(a,b){var c=this;return new Hc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function y(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return Y(f)&&(f=Ac(f)),(db(f)||cb(f))&&(f=oc(f)),f}).concatAll()}function z(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return Y(f)&&(f=Ac(f)),(db(f)||cb(f))&&(f=oc(f)),f}).mergeAll()}function A(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Jb(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function B(a,b,c){var d=new Gb;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(B(a.item(e),b,c));else a&&d.add(A(a,b,c));return d}function C(a,b){return new Hc(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function D(a,b,c){return new Hc(function(d){var e=0,f=a,g=Pb(b);return c.scheduleRecursiveWithAbsolute(f,function(a){if(g>0){var b=c.now();f+=g,b>=f&&(f=b+g)}d.onNext(e++),a(f)})})}function E(a,b){return new Hc(function(c){return b.scheduleWithRelative(Pb(a),function(){c.onNext(0),c.onCompleted()})})}function F(a,b,c){return a===b?new Hc(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):lc(function(){return D(c.now()+a,b,c)})}function G(a,b,c){return new Hc(function(d){var e,f=!1,g=new Mb,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Lb,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new Gb(e,g)})}function H(a,b,c){return lc(function(){return G(a,b-c.now(),c)})}function I(a,b){return new Hc(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Gb(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))})}function J(a,b,c){return new Hc(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(T))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new Gb(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d),function(){i=!0,e(!0,1)}))})}var K={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},L=K[typeof window]&&window||this,M=K[typeof exports]&&exports&&!exports.nodeType&&exports,N=K[typeof module]&&module&&!module.nodeType&&module,O=N&&N.exports===M&&M,P=K[typeof global]&&global;!P||P.global!==P&&P.window!==P||(L=P);var Q={internals:{},config:{Promise:L.Promise},helpers:{}},R=Q.helpers.noop=function(){},S=(Q.helpers.notDefined=function(a){return"undefined"==typeof a},Q.helpers.isScheduler=function(a){return a instanceof Q.Scheduler}),T=Q.helpers.identity=function(a){return a},U=(Q.helpers.pluck=function(a){return function(b){return b[a]}},Q.helpers.just=function(a){return function(){return a}},Q.helpers.defaultNow=Date.now),V=Q.helpers.defaultComparer=function(a,b){return Ab(a,b)},W=Q.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},X=(Q.helpers.defaultKeySerializer=function(a){return a.toString()},Q.helpers.defaultError=function(a){throw a}),Y=Q.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},Z=(Q.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},Q.helpers.not=function(a){return!a},Q.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==qb.call(a)}),a}()),$="Argument out of range",_="Object has been disposed",ab="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";L.Set&&"function"==typeof(new L.Set)["@@iterator"]&&(ab="@@iterator");var bb=Q.doneEnumerator={done:!0,value:a},cb=Q.helpers.isIterable=function(b){return b[ab]!==a},db=Q.helpers.isArrayLike=function(b){return b&&b.length!==a};Q.helpers.iterator=ab;var eb,fb=Q.helpers.deprecate=function(){},gb="[object Arguments]",hb="[object Array]",ib="[object Boolean]",jb="[object Date]",kb="[object Error]",lb="[object Function]",mb="[object Number]",nb="[object Object]",ob="[object RegExp]",pb="[object String]",qb=Object.prototype.toString,rb=Object.prototype.hasOwnProperty,sb=qb.call(arguments)==gb,tb=Error.prototype,ub=Object.prototype,vb=ub.propertyIsEnumerable;try{eb=!(qb.call(document)==nb&&!({toString:0}+""))}catch(wb){eb=!0}var xb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yb={};yb[hb]=yb[jb]=yb[mb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},yb[ib]=yb[pb]={constructor:!0,toString:!0,valueOf:!0},yb[kb]=yb[lb]=yb[ob]={constructor:!0,toString:!0},yb[nb]={constructor:!0};var zb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);zb.enumErrorProps=vb.call(tb,"message")||vb.call(tb,"name"),zb.enumPrototypes=vb.call(a,"prototype"),zb.nonEnumArgs=0!=c,zb.nonEnumShadows=!/valueOf/.test(b)}(1),sb||(h=function(a){return a&&"object"==typeof a?rb.call(a,"callee"):!1});{var Ab=Q.internals.isEqual=function(a,b){return i(a,b,[],[])},Bb=Array.prototype.slice,Cb=({}.hasOwnProperty,this.inherits=Q.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),Db=Q.internals.addProperties=function(a){for(var b=Bb.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}};Q.internals.addRef=function(a,b){return new Hc(function(c){return new Gb(b.getDisposable(),a.subscribe(c))})}}l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Eb=Q.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Fb=Eb.prototype;Fb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Fb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Fb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},Hb.toArray=function(){return this.disposables.slice(0)};var Ib=Q.Disposable=function(a){this.isDisposed=!1,this.action=a||R};Ib.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Jb=Ib.create=function(a){return new Ib(a)},Kb=Ib.empty={dispose:R},Lb=Q.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),Mb=Q.SerialDisposable=Lb,Nb=(Q.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Kb:new a(this)},b}(),Q.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||W,this.disposable=new Lb});Nb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Nb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Nb.prototype.isCancelled=function(){return this.disposable.isDisposed},Nb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Ob=Q.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Kb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=U,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Pb=Ob.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Gb,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),Kb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Gb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Kb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Ob.prototype),function(){Ob.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Ob.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof L.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=L.setInterval(function(){d=c(d)},b);return Jb(function(){L.clearInterval(e)})}}(Ob.prototype);var Qb,Rb=Ob.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Pb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Ob(U,a,b,c)}(),Sb=Ob.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Ob.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Ob.normalize(c),g=new Nb(this,b,d,f);if(e)e.enqueue(g);else{e=new Eb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Ob(U,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Tb=(Q.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Lb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),R),Ub=function(){var a,b=R;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!L.setTimeout)throw new Error("No concurrency detected!");a=L.setTimeout,b=L.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Vb=Ub.setTimeout,Wb=Ub.clearTimeout;!function(){function a(){if(!L.postMessage||L.importScripts)return!1;var a=!1,b=L.onmessage;return L.onmessage=function(){a=!0},L.postMessage("","*"),L.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(qb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=P&&O&&P.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=P&&O&&P.clearImmediate)&&!c.test(e)&&e;if("function"==typeof d)Qb=d,Tb=e;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Qb=process.nextTick;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;L.addEventListener?L.addEventListener("message",b,!1):L.attachEvent("onmessage",b,!1),Qb=function(a){var b=h++;g[b]=a,L.postMessage(f+b,"*")}}else if(L.MessageChannel){var i=new L.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Qb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in L&&"onreadystatechange"in L.document.createElement("script")?Qb=function(a){var b=L.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},L.document.documentElement.appendChild(b)}:(Qb=function(a){return Vb(a,0)},Tb=Wb)}();var Xb=Ob.timeout=function(){function a(a,b){var c=this,d=new Lb,e=Qb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Gb(d,Jb(function(){Tb(e)}))}function b(a,b,c){var d=this,e=Ob.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Lb,g=Vb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Gb(f,Jb(function(){Wb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Ob(U,a,b,c)}(),Yb=Q.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return S(a)||(a=Rb),new Hc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Zb=Yb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Yb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),$b=Yb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Yb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),_b=Yb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Yb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),ac=Q.internals.Enumerator=function(a){this._next=a};ac.prototype.next=function(){return this._next()},ac.prototype[ab]=function(){return this};var bc=Q.internals.Enumerable=function(a){this._iterator=a};bc.prototype[ab]=function(){return this._iterator()},bc.prototype.concat=function(){var a=this;return new Hc(function(b){var c;try{c=a[ab]()}catch(d){return void b.onError()}var e,f=new Mb,g=Rb.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;Y(h)&&(h=Ac(h));var i=new Lb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new Gb(f,g,Jb(function(){e=!0}))})},bc.prototype.catchError=function(){var a=this;return new Hc(function(b){var c;try{c=a[ab]()}catch(d){return void b.onError()}var e,f,g=new Mb,h=Rb.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;Y(i)&&(i=Ac(i));var j=new Lb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new Gb(g,h,Jb(function(){e=!0}))})};var cc=bc.repeat=function(a,b){return null==b&&(b=-1),new bc(function(){var c=b;return new ac(function(){return 0===c?bb:(c>0&&c--,{done:!1,value:a})})})},dc=bc.of=function(a,b,c){return b||(b=T),new bc(function(){var d=-1;return new ac(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(hc);gc.toArray=function(){var a=this;return new Hc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},jc.create=jc.createWithDisposable=function(a){return new Hc(a)};var lc=jc.defer=function(a){return new Hc(function(b){var c;try{c=a()}catch(d){return rc(d).subscribe(b)}return Y(c)&&(c=Ac(c)),c.subscribe(b)})},mc=jc.empty=function(a){return S(a)||(a=Rb),new Hc(function(b){return a.schedule(function(){b.onCompleted()})})},nc=Math.pow(2,53)-1;m.prototype[ab]=function(){return new n(this._s)},n.prototype[ab]=function(){return this},n.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};jc.never=function(){return new Hc(function(){return Kb})}}jc.of=function(){return v(null,arguments)},jc.ofWithScheduler=function(a){return v(a,Bb.call(arguments,1))},jc.range=function(a,b,c){return S(c)||(c=Sb),new Hc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},jc.repeat=function(a,b,c){return S(c)||(c=Sb),qc(a,c).repeat(null==b?-1:b)};var qc=jc["return"]=jc.just=function(a,b){return S(b)||(b=Rb),new Hc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};jc.returnValue=function(){return fb("returnValue","return or just"),qc.apply(null,arguments)};var rc=jc["throw"]=jc.throwException=jc.throwError=function(a,b){return S(b)||(b=Rb),new Hc(function(c){return b.schedule(function(){c.onError(a)})})};gc["catch"]=gc.catchError=function(a){return"function"==typeof a?w(this,a):sc([this,a])},gc.catchException=function(a){return fb("catchException","catch or catchError"),this.catchError(a)};var sc=jc.catchError=jc["catch"]=function(){return dc(j(arguments,0)).catchError()};jc.catchException=function(){return fb("catchException","catch or catchError"),sc.apply(null,arguments)},gc.combineLatest=function(){var a=Bb.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),tc.apply(this,a)};var tc=jc.combineLatest=function(){var a=Bb.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Hc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(T))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(T)&&c.onCompleted()}function e(a){j[a]=!0,j.every(T)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new Lb;Y(f)&&(f=Ac(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new Gb(m)})};gc.concat=function(){var a=Bb.call(arguments,0);return a.unshift(this),uc.apply(this,a)};var uc=jc.concat=function(){return dc(j(arguments,0)).concat()};gc.concatAll=function(){return this.merge(1)},gc.concatObservable=function(){return fb("concatObservable","concatAll"),this.merge(1)},gc.merge=function(a){if("number"!=typeof a)return vc(this,a);var b=this;return new Hc(function(c){function d(a){var b=new Lb;f.add(b),Y(a)&&(a=Ac(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Gb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var vc=jc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=Bb.call(arguments,1)):(a=Rb,b=Bb.call(arguments,0)):(a=Rb,b=Bb.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),v(a,b).mergeAll()};gc.mergeAll=function(){var a=this;return new Hc(function(b){var c=new Gb,d=!1,e=new Lb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Lb;c.add(e),Y(a)&&(a=Ac(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},gc.mergeObservable=function(){return fb("mergeObservable","mergeAll"),this.mergeAll.apply(this,arguments)},gc.skipUntil=function(a){var b=this;return new Hc(function(c){var d=!1,e=new Gb(b.subscribe(function(a){d&&c.onNext(a)},c.onError.bind(c),function(){d&&c.onCompleted()}));Y(a)&&(a=Ac(a));var f=new Lb;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},c.onError.bind(c),function(){f.dispose()})),e})},gc["switch"]=gc.switchLatest=function(){var a=this;return new Hc(function(b){var c=!1,d=new Mb,e=!1,f=0,g=a.subscribe(function(a){var g=new Lb,h=++f;c=!0,d.setDisposable(g),Y(a)&&(a=Ac(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},b.onError.bind(b),function(){e=!0,!c&&b.onCompleted()});return new Gb(g,d)})},gc.takeUntil=function(a){var b=this;return new Hc(function(c){return Y(a)&&(a=Ac(a)),new Gb(b.subscribe(c),a.subscribe(c.onCompleted.bind(c),c.onError.bind(c),R))})},gc.zip=function(){if(Array.isArray(arguments[0]))return x.apply(this,arguments);var a=this,b=Bb.call(arguments),c=b.pop();return b.unshift(a),new Hc(function(d){function e(b){var e,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(T)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new Lb;Y(c)&&(c=Ac(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new Gb(j)})},jc.zip=function(){var a=Bb.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},jc.zipArray=function(){var a=j(arguments,0);return new Hc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(T))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(T)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Lb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new Gb(h);return j.add(Jb(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},gc.asObservable=function(){return new Hc(this.subscribe.bind(this))},gc.dematerialize=function(){var a=this;return new Hc(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},gc.distinctUntilChanged=function(a,b){var c=this;return a||(a=T),b||(b=V),new Hc(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},gc["do"]=gc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new Hc(function(a){return e.subscribe(function(b){try{d(b) }catch(c){a.onError(c)}a.onNext(b)},function(c){if(b)try{b(c)}catch(d){a.onError(d)}a.onError(c)},function(){if(c)try{c()}catch(b){a.onError(b)}a.onCompleted()})})},gc.doAction=function(){return fb("doAction","do or tap"),this.tap.apply(this,arguments)},gc.doOnNext=gc.tapOnNext=function(a,b){return this.tap(2===arguments.length?function(c){a.call(b,c)}:a)},gc.doOnError=gc.tapOnError=function(a,b){return this.tap(R,2===arguments.length?function(c){a.call(b,c)}:a)},gc.doOnCompleted=gc.tapOnCompleted=function(a,b){return this.tap(R,null,2===arguments.length?function(){a.call(b)}:a)},gc["finally"]=gc.ensure=function(a){var b=this;return new Hc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Jb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},gc.finallyAction=function(a){return fb("finallyAction","finally or ensure"),this.ensure(a)},gc.ignoreElements=function(){var a=this;return new Hc(function(b){return a.subscribe(R,b.onError.bind(b),b.onCompleted.bind(b))})},gc.materialize=function(){var a=this;return new Hc(function(b){return a.subscribe(function(a){b.onNext(Zb(a))},function(a){b.onNext($b(a)),b.onCompleted()},function(){b.onNext(_b()),b.onCompleted()})})},gc.repeat=function(a){return cc(this,a).concat()},gc.retry=function(a){return cc(this,a).catchError()},gc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new Hc(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},gc.skipLast=function(a){var b=this;return new Hc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},gc.startWith=function(){var a,b,c=0;return arguments.length&&S(arguments[0])?(b=arguments[0],c=1):b=Rb,a=Bb.call(arguments,c),dc([pc(a,b),this]).concat()},gc.takeLast=function(a){var b=this;return new Hc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},gc.selectConcat=gc.concatMap=function(a,b,c){return Z(a)&&Z(b)?this.concatMap(function(c,d){var e=a(c,d);return Y(e)&&(e=Ac(e)),(db(e)||cb(e))&&(e=oc(e)),e.map(function(a,e){return b(c,a,d,e)})}):Z(a)?y(this,a,c):y(this,function(){return a})},gc.select=gc.map=function(a,b){var c=Z(a)?a:function(){return a},d=this;return new Hc(function(a){var e=0;return d.subscribe(function(f){var g;try{g=c.call(b,f,e++,d)}catch(h){return void a.onError(h)}a.onNext(g)},a.onError.bind(a),a.onCompleted.bind(a))})},gc.pluck=function(a){return this.map(function(b){return b[a]})},gc.selectMany=gc.flatMap=function(a,b,c){return Z(a)&&Z(b)?this.flatMap(function(c,d){var e=a(c,d);return Y(e)&&(e=Ac(e)),(db(e)||cb(e))&&(e=oc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):Z(a)?z(this,a,c):z(this,function(){return a})},gc.selectSwitch=gc.flatMapLatest=gc.switchMap=function(a,b){return this.select(a,b).switchLatest()},gc.skip=function(a){if(0>a)throw new Error($);var b=this;return new Hc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},gc.skipWhile=function(a,b){var c=this;return new Hc(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},gc.take=function(a,b){if(0>a)throw new RangeError($);if(0===a)return mc(b);var c=this;return new Hc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},gc.takeWhile=function(a,b){var c=this;return new Hc(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},gc.where=gc.filter=function(a,b){var c=this;return new Hc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},jc.fromCallback=function(a,b,c){return function(){var d=Bb.call(arguments,0);return new Hc(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},jc.fromNodeCallback=function(a,b,c){return function(){var d=Bb.call(arguments,0);return new Hc(function(e){function f(a){if(a)return void e.onError(a);var b=Bb.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Q.config.useNativeEvents=!1;var wc=L.angular&&angular.element?angular.element:L.jQuery?L.jQuery:L.Zepto?L.Zepto:null,xc=!!L.Ember&&"function"==typeof L.Ember.addListener,yc=!!L.Backbone&&!!L.Backbone.Marionette;jc.fromEvent=function(a,b,c){if(a.addListener)return zc(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!Q.config.useNativeEvents){if(yc)return zc(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(xc)return zc(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c);if(wc){var d=wc(a);return zc(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}}return new Hc(function(d){return B(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var zc=jc.fromEventPattern=function(a,b,c){return new Hc(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return Jb(function(){b&&b(e,f)})}).publish().refCount()},Ac=jc.fromPromise=function(a){return lc(function(){var b=new Q.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};gc.toPromise=function(a){if(a||(a=Q.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},jc.startAsync=function(a){var b;try{b=a()}catch(c){return rc(c)}return Ac(b)},gc.multicast=function(a,b){var c=this;return"function"==typeof a?new Hc(function(d){var e=c.multicast(a());return new Gb(b(e).subscribe(d),e.connect())}):new Bc(c,a)},gc.publish=function(a){return a&&Z(a)?this.multicast(function(){return new Kc},a):this.multicast(new Kc)},gc.share=function(){return this.publish().refCount()},gc.publishLast=function(a){return a&&Z(a)?this.multicast(function(){return new Lc},a):this.multicast(new Lc)},gc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Nc(b)},a):this.multicast(new Nc(a))},gc.shareValue=function(a){return this.publishValue(a).refCount()},gc.replay=function(a,b,c,d){return a&&Z(a)?this.multicast(function(){return new Oc(b,c,d)},a):this.multicast(new Oc(b,c,d))},gc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var Bc=Q.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Gb(f.subscribe(c),Jb(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return Cb(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Hc(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(jc),Cc=jc.interval=function(a,b){return F(a,a,S(b)?b:Xb)};jc.timer=function(b,c,d){var e;return S(d)||(d=Xb),c!==a&&"number"==typeof c?e=c:S(c)&&(d=c),b instanceof Date&&e===a?C(b.getTime(),d):b instanceof Date&&e!==a?(e=c,D(b.getTime(),e,d)):e===a?E(b,d):F(b,e,d)}}gc.delay=function(a,b){return S(b)||(b=Xb),a instanceof Date?H(this,a.getTime(),b):G(this,a,b)},gc.debounce=gc.throttleWithTimeout=function(a,b){S(b)||(b=Xb);var c=this;return new Hc(function(d){var e,f=new Mb,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Lb;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new Gb(i,f)})},gc.throttle=function(a,b){return fb("throttle","debounce or throttleWithTimeout"),this.debounce(a,b)},gc.timestamp=function(a){return S(a)||(a=Xb),this.map(function(b){return{value:b,timestamp:a.now()}})},gc.sample=gc.throttleLatest=function(a,b){return S(b)||(b=Xb),"number"==typeof a?I(this,Cc(a,b)):I(this,a)},gc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=rc(new Error(b||"Timeout"))),S(c)||(c=Xb);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Hc(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(Y(b)&&(b=Ac(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Lb,j=new Mb,k=!1,l=new Mb;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new Gb(j,l)})},gc.throttleFirst=function(a,b){S(b)||(b=Xb);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Hc(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},a.onError.bind(a),a.onCompleted.bind(a))})};var Dc=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Kb,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Kb)});return new Gb(c,d,e)}function c(c,d){this.source=c,this.controller=new Kc,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return Cb(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(jc);gc.pausable=function(a){return new Dc(this,a)};var Ec=function(b){function c(b){var c,d=[],e=J(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new Kc,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c)}return Cb(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(jc);gc.pausableBuffered=function(a){return new Ec(this,a)},gc.controlled=function(a){return null==a&&(a=!0),new Fc(this,a)};var Fc=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new Gc(d),this.source=c.multicast(this.subject).refCount()}return Cb(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(jc),Gc=Q.ControlledSubject=function(a){function c(a){return this.subject.subscribe(a)}function d(b){null==b&&(b=!0),a.call(this,c),this.subject=new Kc,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=Kb,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=Kb}return Cb(d,a),Db(d.prototype,ec,{onCompleted:function(){b.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){b.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){b.call(this);var c=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),c=!0),c&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=Kb):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=Kb),{numberOfItems:a,returnValue:!1}},request:function(a){b.call(this),this.disposeCurrentRequest();var c=this,d=this._processRequest(a);return a=d.numberOfItems,d.returnValue?Kb:(this.requestedCount=a,this.requestedDisposable=Jb(function(){c.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Kb},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),d}(jc);gc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new Hc(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})})};var Hc=Q.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Jb(a):Kb}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new Ic(a);return Sb.scheduleRequired()?Sb.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return Cb(c,a),c}(jc),Ic=function(a){function b(b){a.call(this),this.observer=b,this.m=new Lb}Cb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(hc),Jc=function(a,b){this.subject=a,this.observer=b};Jc.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var Kc=Q.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),Kb):(a.onCompleted(),Kb):(this.observers.push(a),new Jc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return Cb(d,a),Db(d.prototype,ec,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Mc(a,b)},d}(jc),Lc=Q.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new Jc(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),Kb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return Cb(d,a),Db(d.prototype,ec,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(jc),Mc=Q.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return Cb(b,a),Db(b.prototype,ec,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(jc),Nc=Q.BehaviorSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new Jc(this,a);var c=this.exception;return c?a.onError(c):a.onCompleted(),Kb}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return Cb(d,a),Db(d.prototype,ec,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=this.observers.slice(0),d=c.length;d>a;a++)c[a].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped){this.value=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(jc),Oc=Q.ReplaySubject=function(a){function c(a,b){return Jb(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var d=new kc(this.scheduler,a),e=c(this,d);b.call(this),this._trim(this.scheduler.now()),this.observers.push(d);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)d.onNext(this.q[g].value);return this.hasError?(f++,d.onError(this.error)):this.isStopped&&(f++,d.onCompleted()),d.ensureActive(f),e}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||Sb,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return Cb(e,a),Db(e.prototype,ec,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++){var f=c[d];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(jc);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(L.Rx=Q,define(function(){return Q})):M&&N?O?(N.exports=Q).Rx=Q:M.Rx=Q:L.Rx=Q}).call(this); //# sourceMappingURL=rx.lite.map \ No newline at end of file diff --git a/dist/rx.map b/dist/rx.map index d0e93d2eb..676410d73 100644 --- a/dist/rx.map +++ b/dist/rx.map @@ -1 +1 @@ -{"version":3,"file":"rx.min.js","sources":["rx.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","flatMap","mergeAll","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","notDefined","Scheduler","identity","defaultNow","pluck","property","just","Date","now","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","p","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","CompositeDisposable","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","disposables","CompositeDisposablePrototype","add","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","schedule","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelative","scheduleWithRelativeAndState","scheduleWithAbsolute","scheduleWithAbsoluteAndState","normalize","timeSpan","normalizeTime","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","isDone","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelative","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","period","schedulePeriodicWithState","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","immediateScheduler","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediate","scheduleNow","currentThread","runTrampoline","q","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","addEventListener","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","kind","hasValue","accept","observerOrOnNext","_acceptObservable","_accept","toObservable","notification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","next","_next","Enumerable","_iterator","concat","cancelable","currentItem","currentValue","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","apply","Observable","_subscribe","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","list","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","res","hasValueAll","every","values","filter","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","materialize","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","Subject","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","select","selectorFn","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","predicate","running","take","RangeError","observable","takeWhile","shouldRun","transduce","transducer","transformForObserver","init","step","obs","input","xform","fixSubscriber","subscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAsFlE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,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BzK,GAAc2a,EAAiBvmB,UAAW6Y,IACxCrT,YAAa,WACXrH,KAAKiH,SAASI,eAEhBc,QAAS,SAAUH,GACjBhI,KAAKiH,SAASkB,QAAQH,IAExBZ,OAAQ,SAAU/G,GAChBL,KAAKiH,SAASG,OAAO/G,MAIlB+nB,GACP1L,IAEqB,mBAAV4L,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvE1iB,EAAK6E,GAAKA,EAEV4d,OAAO,WACH,MAAO5d,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInB7E,EAAK6E,GAAKA,IAGhB3J,KAAKf"} \ No newline at end of file +{"version":3,"file":"rx.min.js","sources":["rx.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","o","it","$iterator$","TypeError","sign","number","isNaN","len","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","self","onNext","onCompleted","observableCatchHandler","source","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","flatMap","mergeAll","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","notDefined","Scheduler","identity","defaultNow","pluck","property","just","Date","now","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","p","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","deprecate","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","CompositeDisposable","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","disposables","CompositeDisposablePrototype","add","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","schedule","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelative","scheduleWithRelativeAndState","scheduleWithAbsolute","scheduleWithAbsoluteAndState","normalize","timeSpan","normalizeTime","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","isDone","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelative","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","period","schedulePeriodicWithState","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","immediateScheduler","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediate","scheduleNow","currentThread","runTrampoline","q","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","addEventListener","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","kind","hasValue","accept","observerOrOnNext","_acceptObservable","_accept","toObservable","notification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","next","_next","Enumerable","_iterator","concat","cancelable","currentItem","currentValue","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","apply","Observable","_subscribe","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","list","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","unshift","res","hasValueAll","every","values","filter","j","falseFactory","subscriptions","sad","observableConcat","merge","concatObservable","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","onNextFunc","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","materialize","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","Subject","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","select","selectorFn","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","predicate","running","take","RangeError","observable","takeWhile","shouldRun","transduce","transducer","transformForObserver","init","step","obs","input","xform","fixSubscriber","subscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAsFlE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE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GACPb,IAEqBhS,EAAG0d,iBAAoB,SAAUlQ,GAGtD,QAASkQ,GAAiBnhB,EAAU8f,GAClC/mB,KAAKiH,SAAWA,EAChBjH,KAAK+mB,WAAaA,EAClB7O,EAAUnX,KAAKf,KAAMA,KAAK+mB,WAAWjf,UAAUC,KAAK/H,KAAK+mB,aAe3D,MApBA1Z,IAAS+a,EAAkBlQ,GAQ3BzK,GAAc2a,EAAiBvmB,UAAW6Y,IACxCrT,YAAa,WACXrH,KAAKiH,SAASI,eAEhBc,QAAS,SAAUH,GACjBhI,KAAKiH,SAASkB,QAAQH,IAExBZ,OAAQ,SAAU/G,GAChBL,KAAKiH,SAASG,OAAO/G,MAIlB+nB,GACP1L,IAEqB,mBAAV4L,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvE1iB,EAAK6E,GAAKA,EAEV4d,OAAO,WACH,MAAO5d,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInB7E,EAAK6E,GAAKA,IAGhB3J,KAAKf"} \ No newline at end of file diff --git a/dist/rx.min.js b/dist/rx.min.js index 40da78e52..a2bc9f633 100644 --- a/dist/rx.min.js +++ b/dist/rx.min.js @@ -1,4 +1,4 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ -(function(a){function b(){if(this.isDisposed)throw new Error(U)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;sb.nonEnumArgs&&a.length&&h(a)&&(a=ub.call(a));var d=sb.enumPrototypes&&"function"==typeof a,e=sb.enumErrorProps&&(a===mb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(sb.nonEnumShadows&&a!==nb){var g=a.constructor,i=-1,j=qb.length;if(a===(g&&g.prototype))var k=a===stringProto?ib:a===mb?db:jb.call(a),l=rb[k];for(;++i-1:void 0});return c.pop(),d.pop(),r}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:ub.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function n(){this._s=s}function o(){this._s=s,this._l=s.length,this._i=0}function p(a){this._a=a}function q(a){this._a=a,this._l=v(a),this._i=0}function r(a){return"number"==typeof a&&E.isFinite(a)}function t(b){var c,d=b[V];if(!d&&"string"==typeof b)return c=new n(b),c[V]();if(!d&&b.length!==a)return c=new p(b),c[V]();if(!d)throw new TypeError("Object is not iterable");return b[V]()}function u(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function v(a){var b=+a.length;return isNaN(b)?0:0!==b&&r(b)?(b=u(b)*Math.floor(Math.abs(b)),0>=b?0:b>lc?lc:b):b}function w(a,b){return L(a)||(a=Nb),new wc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function x(a,b){return new wc(function(c){var d=new Fb,e=new Gb;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}R(f)&&(f=ic(f)),d=new Fb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function y(a,b){var c=this;return new wc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function z(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return R(f)&&(f=ic(f)),(Y(f)||X(f))&&(f=mc(f)),f}).concatAll()}function A(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function B(a){this.comparer=a,this.set=[]}function C(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return R(f)&&(f=ic(f)),(Y(f)||X(f))&&(f=mc(f)),f}).mergeAll()}var D={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},E=D[typeof window]&&window||this,F=D[typeof exports]&&exports&&!exports.nodeType&&exports,G=D[typeof module]&&module&&!module.nodeType&&module,H=G&&G.exports===F&&F,I=D[typeof global]&&global;!I||I.global!==I&&I.window!==I||(E=I);var J={internals:{},config:{Promise:E.Promise},helpers:{}},K=J.helpers.noop=function(){},L=(J.helpers.notDefined=function(a){return"undefined"==typeof a},J.helpers.isScheduler=function(a){return a instanceof J.Scheduler}),M=J.helpers.identity=function(a){return a},N=(J.helpers.pluck=function(a){return function(b){return b[a]}},J.helpers.just=function(a){return function(){return a}},J.helpers.defaultNow=Date.now),O=J.helpers.defaultComparer=function(a,b){return tb(a,b)},P=J.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Q=(J.helpers.defaultKeySerializer=function(a){return a.toString()},J.helpers.defaultError=function(a){throw a}),R=J.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},S=(J.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},J.helpers.not=function(a){return!a},J.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==jb.call(a)}),a}()),T="Argument out of range",U="Object has been disposed",V="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";E.Set&&"function"==typeof(new E.Set)["@@iterator"]&&(V="@@iterator");var W=J.doneEnumerator={done:!0,value:a},X=J.helpers.isIterable=function(b){return b[V]!==a},Y=J.helpers.isArrayLike=function(b){return b&&b.length!==a};J.helpers.iterator=V;var Z,$=J.helpers.deprecate=function(){},_="[object Arguments]",ab="[object Array]",bb="[object Boolean]",cb="[object Date]",db="[object Error]",eb="[object Function]",fb="[object Number]",gb="[object Object]",hb="[object RegExp]",ib="[object String]",jb=Object.prototype.toString,kb=Object.prototype.hasOwnProperty,lb=jb.call(arguments)==_,mb=Error.prototype,nb=Object.prototype,ob=nb.propertyIsEnumerable;try{Z=!(jb.call(document)==gb&&!({toString:0}+""))}catch(pb){Z=!0}var qb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],rb={};rb[ab]=rb[cb]=rb[fb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},rb[bb]=rb[ib]={constructor:!0,toString:!0,valueOf:!0},rb[db]=rb[eb]=rb[hb]={constructor:!0,toString:!0},rb[gb]={constructor:!0};var sb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);sb.enumErrorProps=ob.call(mb,"message")||ob.call(mb,"name"),sb.enumPrototypes=ob.call(a,"prototype"),sb.nonEnumArgs=0!=c,sb.nonEnumShadows=!/valueOf/.test(b)}(1),lb||(h=function(a){return a&&"object"==typeof a?kb.call(a,"callee"):!1});var tb=J.internals.isEqual=function(a,b){return i(a,b,[],[])},ub=Array.prototype.slice,vb=({}.hasOwnProperty,this.inherits=J.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),wb=J.internals.addProperties=function(a){for(var b=ub.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},xb=J.internals.addRef=function(a,b){return new wc(function(c){return new Ab(b.getDisposable(),a.subscribe(c))})};l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var yb=J.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},zb=yb.prototype;zb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},zb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},zb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},Bb.toArray=function(){return this.disposables.slice(0)};var Cb=J.Disposable=function(a){this.isDisposed=!1,this.action=a||K};Cb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Db=Cb.create=function(a){return new Cb(a)},Eb=Cb.empty={dispose:K},Fb=J.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),Gb=J.SerialDisposable=Fb,Hb=J.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Eb:new a(this)},b}();m.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var Ib=J.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||P,this.disposable=new Fb};Ib.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Ib.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Ib.prototype.isCancelled=function(){return this.disposable.isDisposed},Ib.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Jb=J.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Eb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=N,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Kb=Jb.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Ab,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),Eb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Ab,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Eb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Jb.prototype),function(){Jb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Jb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof E.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=E.setInterval(function(){d=c(d)},b);return Db(function(){E.clearInterval(e)})}}(Jb.prototype),function(a){a.catchError=a["catch"]=function(a){return new Sb(this,a)}}(Jb.prototype);var Lb,Mb=(J.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Fb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Jb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Kb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Jb(N,a,b,c)}()),Nb=Jb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Jb.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Jb.normalize(c),g=new Ib(this,b,d,f);if(e)e.enqueue(g);else{e=new yb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Jb(N,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Ob=K,Pb=function(){var a,b=K;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!E.setTimeout)throw new Error("No concurrency detected!");a=E.setTimeout,b=E.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Qb=Pb.setTimeout,Rb=Pb.clearTimeout;!function(){function a(){if(!E.postMessage||E.importScripts)return!1;var a=!1,b=E.onmessage;return E.onmessage=function(){a=!0},E.postMessage("","*"),E.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(jb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=I&&H&&I.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=I&&H&&I.clearImmediate)&&!c.test(e)&&e;if("function"==typeof d)Lb=d,Ob=e;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Lb=process.nextTick;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;E.addEventListener?E.addEventListener("message",b,!1):E.attachEvent("onmessage",b,!1),Lb=function(a){var b=h++;g[b]=a,E.postMessage(f+b,"*")}}else if(E.MessageChannel){var i=new E.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Lb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in E&&"onreadystatechange"in E.document.createElement("script")?Lb=function(a){var b=E.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},E.document.documentElement.appendChild(b)}:(Lb=function(a){return Qb(a,0)},Ob=Rb)}();var Sb=(Jb.timeout=function(){function a(a,b){var c=this,d=new Fb,e=Lb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Ab(d,Db(function(){Ob(e)}))}function b(a,b,c){var d=this,e=Jb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Fb,g=Qb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Ab(f,Db(function(){Rb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Jb(N,a,b,c)}(),function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return vb(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return Eb}}},e.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new Fb;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(Jb)),Tb=J.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return L(a)||(a=Mb),new wc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Ub=Tb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Tb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Vb=Tb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Tb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Wb=Tb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Tb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Xb=J.internals.Enumerator=function(a){this._next=a};Xb.prototype.next=function(){return this._next()},Xb.prototype[V]=function(){return this};var Yb=J.internals.Enumerable=function(a){this._iterator=a};Yb.prototype[V]=function(){return this._iterator()},Yb.prototype.concat=function(){var a=this;return new wc(function(b){var c;try{c=a[V]()}catch(d){return void b.onError()}var e,f=new Gb,g=Mb.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;R(h)&&(h=ic(h));var i=new Fb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new Ab(f,g,Db(function(){e=!0}))})},Yb.prototype.catchError=function(){var a=this;return new wc(function(b){var c;try{c=a[V]()}catch(d){return void b.onError()}var e,f,g=new Gb,h=Mb.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;R(i)&&(i=ic(i));var j=new Fb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new Ab(g,h,Db(function(){e=!0}))})};var Zb=Yb.repeat=function(a,b){return null==b&&(b=-1),new Yb(function(){var c=b;return new Xb(function(){return 0===c?W:(c>0&&c--,{done:!1,value:a})})})},$b=Yb.of=function(a,b,c){return b||(b=M),new Yb(function(){var d=-1;return new Xb(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(cc),gc=function(a){function b(){a.apply(this,arguments)}return vb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(fc),hc=J.Observable=function(){function a(a){this._subscribe=a}return bc=a.prototype,bc.subscribe=bc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:ac(a,b,c))},bc.subscribeOnNext=function(a,b){return this._subscribe(ac(2===arguments.length?function(c){a.call(b,c)}:a))},bc.subscribeOnError=function(a,b){return this._subscribe(ac(null,2===arguments.length?function(c){a.call(b,c)}:a))},bc.subscribeOnCompleted=function(a,b){return this._subscribe(ac(null,null,2===arguments.length?function(){a.call(b)}:a))},a}();bc.observeOn=function(a){var b=this;return new wc(function(c){return b.subscribe(new gc(a,c))})},bc.subscribeOn=function(a){var b=this;return new wc(function(c){var d=new Fb,e=new Gb;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var ic=hc.fromPromise=function(a){return jc(function(){var b=new J.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};bc.toPromise=function(a){if(a||(a=J.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},bc.toArray=function(){var a=this;return new wc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},hc.create=hc.createWithDisposable=function(a){return new wc(a)};var jc=hc.defer=function(a){return new wc(function(b){var c;try{c=a()}catch(d){return qc(d).subscribe(b)}return R(c)&&(c=ic(c)),c.subscribe(b)})},kc=hc.empty=function(a){return L(a)||(a=Mb),new wc(function(b){return a.schedule(function(){b.onCompleted()})})},lc=Math.pow(2,53)-1;n.prototype[V]=function(){return new o(this._s)},o.prototype[V]=function(){return this},o.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};hc.generate=function(a,b,c,d,e){return L(e)||(e=Nb),new wc(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})};var oc=hc.never=function(){return new wc(function(){return Eb})};hc.of=function(){return w(null,arguments)},hc.ofWithScheduler=function(a){return w(a,ub.call(arguments,1))},hc.range=function(a,b,c){return L(c)||(c=Nb),new wc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},hc.repeat=function(a,b,c){return L(c)||(c=Nb),pc(a,c).repeat(null==b?-1:b)};var pc=hc["return"]=hc.just=function(a,b){return L(b)||(b=Mb),new wc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};hc.returnValue=function(){return $("returnValue","return or just"),pc.apply(null,arguments)};var qc=hc["throw"]=hc.throwException=hc.throwError=function(a,b){return L(b)||(b=Mb),new wc(function(c){return b.schedule(function(){c.onError(a)})})};hc.using=function(a,b){return new wc(function(c){var d,e,f=Eb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Ab(qc(g).subscribe(c),f)}return new Ab(e.subscribe(c),f)})},bc.amb=function(a){var b=this;return new wc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Fb,j=new Fb;return R(a)&&(a=ic(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new Ab(i,j)})},hc.amb=function(){function a(a,b){return a.amb(b)}for(var b=oc(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},bc["catch"]=bc.catchError=function(a){return"function"==typeof a?x(this,a):rc([this,a])},bc.catchException=function(a){return $("catchException","catch or catchError"),this.catchError(a)};var rc=hc.catchError=hc["catch"]=function(){return $b(j(arguments,0)).catchError()};hc.catchException=function(){return $("catchException","catch or catchError"),rc.apply(null,arguments)},bc.combineLatest=function(){var a=ub.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),sc.apply(this,a)};var sc=hc.combineLatest=function(){var a=ub.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new wc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(M))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(M)&&c.onCompleted()}function e(a){j[a]=!0,j.every(M)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new Fb;R(f)&&(f=ic(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new Ab(m)})};bc.concat=function(){var a=ub.call(arguments,0);return a.unshift(this),tc.apply(this,a)};var tc=hc.concat=function(){return $b(j(arguments,0)).concat()};bc.concatAll=function(){return this.merge(1)},bc.concatObservable=function(){return $("concatObservable","concatAll"),this.merge(1)},bc.merge=function(a){if("number"!=typeof a)return uc(this,a);var b=this;return new wc(function(c){function d(a){var b=new Fb;f.add(b),R(a)&&(a=ic(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Ab,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var uc=hc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=ub.call(arguments,1)):(a=Mb,b=ub.call(arguments,0)):(a=Mb,b=ub.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),w(a,b).mergeAll()};bc.mergeAll=function(){var a=this;return new wc(function(b){var c=new Ab,d=!1,e=new Fb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Fb;c.add(e),R(a)&&(a=ic(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},bc.mergeObservable=function(){return $("mergeObservable","mergeAll"),this.mergeAll.apply(this,arguments)},bc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return vc([this,a])};var vc=hc.onErrorResumeNext=function(){var a=j(arguments,0);return new wc(function(b){var c=0,d=new Gb,e=Mb.scheduleRecursive(function(e){var f,g;c0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(M)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new Fb;R(c)&&(c=ic(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new Ab(j)})},hc.zip=function(){var a=ub.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},hc.zipArray=function(){var a=j(arguments,0);return new wc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(M))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(M)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Fb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new Ab(h);return j.add(Db(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},bc.asObservable=function(){return new wc(this.subscribe.bind(this))},bc.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},bc.dematerialize=function(){var a=this;return new wc(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},bc.distinctUntilChanged=function(a,b){var c=this;return a||(a=M),b||(b=O),new wc(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},bc["do"]=bc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new wc(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b)try{b(c)}catch(d){a.onError(d)}a.onError(c)},function(){if(c)try{c()}catch(b){a.onError(b)}a.onCompleted()})})},bc.doAction=function(){return $("doAction","do or tap"),this.tap.apply(this,arguments)},bc.doOnNext=bc.tapOnNext=function(a,b){return this.tap(2===arguments.length?function(c){a.call(b,c)}:a)},bc.doOnError=bc.tapOnError=function(a,b){return this.tap(K,2===arguments.length?function(c){a.call(b,c)}:a)},bc.doOnCompleted=bc.tapOnCompleted=function(a,b){return this.tap(K,null,2===arguments.length?function(){a.call(b)}:a)},bc["finally"]=bc.ensure=function(a){var b=this;return new wc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Db(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},bc.finallyAction=function(a){return $("finallyAction","finally or ensure"),this.ensure(a)},bc.ignoreElements=function(){var a=this;return new wc(function(b){return a.subscribe(K,b.onError.bind(b),b.onCompleted.bind(b))})},bc.materialize=function(){var a=this;return new wc(function(b){return a.subscribe(function(a){b.onNext(Ub(a))},function(a){b.onNext(Vb(a)),b.onCompleted()},function(){b.onNext(Wb()),b.onCompleted()})})},bc.repeat=function(a){return Zb(this,a).concat()},bc.retry=function(a){return Zb(this,a).catchError()},bc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new wc(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},bc.skipLast=function(a){var b=this;return new wc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},bc.startWith=function(){var a,b,c=0;return arguments.length&&L(arguments[0])?(b=arguments[0],c=1):b=Mb,a=ub.call(arguments,c),$b([nc(a,b),this]).concat()},bc.takeLast=function(a){var b=this;return new wc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},bc.takeLastBuffer=function(a){var b=this;return new wc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},bc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(T);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(T);return new wc(function(d){function e(){var a=new zc;i.push(a),d.onNext(xb(a,g))}var f=new Fb,g=new Hb(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g})},bc.selectConcat=bc.concatMap=function(a,b,c){return S(a)&&S(b)?this.concatMap(function(c,d){var e=a(c,d);return R(e)&&(e=ic(e)),(Y(e)||X(e))&&(e=mc(e)),e.map(function(a,e){return b(c,a,d,e)})}):S(a)?z(this,a,c):z(this,function(){return a})},bc.concatMapObserver=bc.selectConcatObserver=function(a,b,c,d){var e=this;return new wc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}R(c)&&(c=ic(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}R(c)&&(c=ic(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}R(a)&&(a=ic(a)),f.onNext(a),f.onCompleted()})}).concatAll()},bc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new wc(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},B.prototype.push=function(a){var b=-1===A(this.set,a,this.comparer);return b&&this.set.push(a),b},bc.distinct=function(a,b){var c=this;return b||(b=O),new wc(function(d){var e=new B(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},bc.select=bc.map=function(a,b){var c=S(a)?a:function(){return a},d=this;return new wc(function(a){var e=0;return d.subscribe(function(f){var g;try{g=c.call(b,f,e++,d)}catch(h){return void a.onError(h)}a.onNext(g)},a.onError.bind(a),a.onCompleted.bind(a))})},bc.pluck=function(a){return this.map(function(b){return b[a]})},bc.flatMapObserver=bc.selectManyObserver=function(a,b,c,d){var e=this;return new wc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}R(c)&&(c=ic(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}R(c)&&(c=ic(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}R(a)&&(a=ic(a)),f.onNext(a),f.onCompleted()})}).mergeAll()},bc.selectMany=bc.flatMap=function(a,b,c){return S(a)&&S(b)?this.flatMap(function(c,d){var e=a(c,d);return R(e)&&(e=ic(e)),(Y(e)||X(e))&&(e=mc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):S(a)?C(this,a,c):C(this,function(){return a})},bc.selectSwitch=bc.flatMapLatest=bc.switchMap=function(a,b){return this.select(a,b).switchLatest()},bc.skip=function(a){if(0>a)throw new Error(T);var b=this;return new wc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},bc.skipWhile=function(a,b){var c=this;return new wc(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},bc.take=function(a,b){if(0>a)throw new RangeError(T);if(0===a)return kc(b);var c=this;return new wc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},bc.takeWhile=function(a,b){var c=this;return new wc(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},bc.where=bc.filter=function(a,b){var c=this;return new wc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},bc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new wc(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})})};var wc=J.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Db(a):Eb}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new xc(a);return Nb.scheduleRequired()?Nb.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return vb(c,a),c}(hc),xc=function(a){function b(b){a.call(this),this.observer=b,this.m=new Fb}vb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(cc),yc=function(a,b){this.subject=a,this.observer=b};yc.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var zc=J.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),Eb):(a.onCompleted(),Eb):(this.observers.push(a),new yc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return vb(d,a),wb(d.prototype,_b,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Ac(a,b)},d}(hc),Ac=(J.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new yc(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),Eb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return vb(d,a),wb(d.prototype,_b,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(hc),J.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return vb(b,a),wb(b.prototype,_b,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(hc));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(E.Rx=J,define(function(){return J})):F&&G?H?(G.exports=J).Rx=J:F.Rx=J:E.Rx=J}).call(this); +(function(a){function b(){if(this.isDisposed)throw new Error(U)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;sb.nonEnumArgs&&a.length&&h(a)&&(a=ub.call(a));var d=sb.enumPrototypes&&"function"==typeof a,e=sb.enumErrorProps&&(a===mb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(sb.nonEnumShadows&&a!==nb){var g=a.constructor,i=-1,j=qb.length;if(a===(g&&g.prototype))var k=a===stringProto?ib:a===mb?db:jb.call(a),l=rb[k];for(;++i-1:void 0});return c.pop(),d.pop(),r}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:ub.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function n(){this._s=s}function o(){this._s=s,this._l=s.length,this._i=0}function p(a){this._a=a}function q(a){this._a=a,this._l=v(a),this._i=0}function r(a){return"number"==typeof a&&E.isFinite(a)}function t(b){var c,d=b[V];if(!d&&"string"==typeof b)return c=new n(b),c[V]();if(!d&&b.length!==a)return c=new p(b),c[V]();if(!d)throw new TypeError("Object is not iterable");return b[V]()}function u(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function v(a){var b=+a.length;return isNaN(b)?0:0!==b&&r(b)?(b=u(b)*Math.floor(Math.abs(b)),0>=b?0:b>lc?lc:b):b}function w(a,b){return L(a)||(a=Nb),new wc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function x(a,b){return new wc(function(c){var d=new Fb,e=new Gb;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}R(f)&&(f=ic(f)),d=new Fb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function y(a,b){var c=this;return new wc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function z(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return R(f)&&(f=ic(f)),(Y(f)||X(f))&&(f=mc(f)),f}).concatAll()}function A(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function B(a){this.comparer=a,this.set=[]}function C(a,b,c){return a.map(function(d,e){var f=b.call(c,d,e,a);return R(f)&&(f=ic(f)),(Y(f)||X(f))&&(f=mc(f)),f}).mergeAll()}var D={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},E=D[typeof window]&&window||this,F=D[typeof exports]&&exports&&!exports.nodeType&&exports,G=D[typeof module]&&module&&!module.nodeType&&module,H=G&&G.exports===F&&F,I=D[typeof global]&&global;!I||I.global!==I&&I.window!==I||(E=I);var J={internals:{},config:{Promise:E.Promise},helpers:{}},K=J.helpers.noop=function(){},L=(J.helpers.notDefined=function(a){return"undefined"==typeof a},J.helpers.isScheduler=function(a){return a instanceof J.Scheduler}),M=J.helpers.identity=function(a){return a},N=(J.helpers.pluck=function(a){return function(b){return b[a]}},J.helpers.just=function(a){return function(){return a}},J.helpers.defaultNow=Date.now),O=J.helpers.defaultComparer=function(a,b){return tb(a,b)},P=J.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Q=(J.helpers.defaultKeySerializer=function(a){return a.toString()},J.helpers.defaultError=function(a){throw a}),R=J.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},S=(J.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},J.helpers.not=function(a){return!a},J.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==jb.call(a)}),a}()),T="Argument out of range",U="Object has been disposed",V="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";E.Set&&"function"==typeof(new E.Set)["@@iterator"]&&(V="@@iterator");var W=J.doneEnumerator={done:!0,value:a},X=J.helpers.isIterable=function(b){return b[V]!==a},Y=J.helpers.isArrayLike=function(b){return b&&b.length!==a};J.helpers.iterator=V;var Z,$=J.helpers.deprecate=function(){},_="[object Arguments]",ab="[object Array]",bb="[object Boolean]",cb="[object Date]",db="[object Error]",eb="[object Function]",fb="[object Number]",gb="[object Object]",hb="[object RegExp]",ib="[object String]",jb=Object.prototype.toString,kb=Object.prototype.hasOwnProperty,lb=jb.call(arguments)==_,mb=Error.prototype,nb=Object.prototype,ob=nb.propertyIsEnumerable;try{Z=!(jb.call(document)==gb&&!({toString:0}+""))}catch(pb){Z=!0}var qb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],rb={};rb[ab]=rb[cb]=rb[fb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},rb[bb]=rb[ib]={constructor:!0,toString:!0,valueOf:!0},rb[db]=rb[eb]=rb[hb]={constructor:!0,toString:!0},rb[gb]={constructor:!0};var sb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);sb.enumErrorProps=ob.call(mb,"message")||ob.call(mb,"name"),sb.enumPrototypes=ob.call(a,"prototype"),sb.nonEnumArgs=0!=c,sb.nonEnumShadows=!/valueOf/.test(b)}(1),lb||(h=function(a){return a&&"object"==typeof a?kb.call(a,"callee"):!1});var tb=J.internals.isEqual=function(a,b){return i(a,b,[],[])},ub=Array.prototype.slice,vb=({}.hasOwnProperty,this.inherits=J.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),wb=J.internals.addProperties=function(a){for(var b=ub.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},xb=J.internals.addRef=function(a,b){return new wc(function(c){return new Ab(b.getDisposable(),a.subscribe(c))})};l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var yb=J.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},zb=yb.prototype;zb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},zb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},zb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},Bb.toArray=function(){return this.disposables.slice(0)};var Cb=J.Disposable=function(a){this.isDisposed=!1,this.action=a||K};Cb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Db=Cb.create=function(a){return new Cb(a)},Eb=Cb.empty={dispose:K},Fb=J.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),Gb=J.SerialDisposable=Fb,Hb=J.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Eb:new a(this)},b}();m.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var Ib=J.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||P,this.disposable=new Fb};Ib.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Ib.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Ib.prototype.isCancelled=function(){return this.disposable.isDisposed},Ib.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Jb=J.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Eb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=N,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Kb=Jb.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Ab,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),Eb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Ab,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Eb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Jb.prototype),function(){Jb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Jb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof E.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=E.setInterval(function(){d=c(d)},b);return Db(function(){E.clearInterval(e)})}}(Jb.prototype),function(a){a.catchError=a["catch"]=function(a){return new Sb(this,a)}}(Jb.prototype);var Lb,Mb=(J.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Fb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Jb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Kb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Jb(N,a,b,c)}()),Nb=Jb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Jb.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Jb.normalize(c),g=new Ib(this,b,d,f);if(e)e.enqueue(g);else{e=new yb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Jb(N,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Ob=K,Pb=function(){var a,b=K;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!E.setTimeout)throw new Error("No concurrency detected!");a=E.setTimeout,b=E.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Qb=Pb.setTimeout,Rb=Pb.clearTimeout;!function(){function a(){if(!E.postMessage||E.importScripts)return!1;var a=!1,b=E.onmessage;return E.onmessage=function(){a=!0},E.postMessage("","*"),E.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(jb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=I&&H&&I.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=I&&H&&I.clearImmediate)&&!c.test(e)&&e;if("function"==typeof d)Lb=d,Ob=e;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Lb=process.nextTick;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;E.addEventListener?E.addEventListener("message",b,!1):E.attachEvent("onmessage",b,!1),Lb=function(a){var b=h++;g[b]=a,E.postMessage(f+b,"*")}}else if(E.MessageChannel){var i=new E.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Lb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in E&&"onreadystatechange"in E.document.createElement("script")?Lb=function(a){var b=E.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},E.document.documentElement.appendChild(b)}:(Lb=function(a){return Qb(a,0)},Ob=Rb)}();var Sb=(Jb.timeout=function(){function a(a,b){var c=this,d=new Fb,e=Lb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Ab(d,Db(function(){Ob(e)}))}function b(a,b,c){var d=this,e=Jb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Fb,g=Qb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Ab(f,Db(function(){Rb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Jb(N,a,b,c)}(),function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return vb(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return Eb}}},e.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new Fb;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(Jb)),Tb=J.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return L(a)||(a=Mb),new wc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Ub=Tb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Tb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Vb=Tb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Tb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Wb=Tb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Tb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Xb=J.internals.Enumerator=function(a){this._next=a};Xb.prototype.next=function(){return this._next()},Xb.prototype[V]=function(){return this};var Yb=J.internals.Enumerable=function(a){this._iterator=a};Yb.prototype[V]=function(){return this._iterator()},Yb.prototype.concat=function(){var a=this;return new wc(function(b){var c;try{c=a[V]()}catch(d){return void b.onError()}var e,f=new Gb,g=Mb.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;R(h)&&(h=ic(h));var i=new Fb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new Ab(f,g,Db(function(){e=!0}))})},Yb.prototype.catchError=function(){var a=this;return new wc(function(b){var c;try{c=a[V]()}catch(d){return void b.onError()}var e,f,g=new Gb,h=Mb.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;R(i)&&(i=ic(i));var j=new Fb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new Ab(g,h,Db(function(){e=!0}))})};var Zb=Yb.repeat=function(a,b){return null==b&&(b=-1),new Yb(function(){var c=b;return new Xb(function(){return 0===c?W:(c>0&&c--,{done:!1,value:a})})})},$b=Yb.of=function(a,b,c){return b||(b=M),new Yb(function(){var d=-1;return new Xb(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(cc),gc=function(a){function b(){a.apply(this,arguments)}return vb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(fc),hc=J.Observable=function(){function a(a){this._subscribe=a}return bc=a.prototype,bc.subscribe=bc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:ac(a,b,c))},bc.subscribeOnNext=function(a,b){return this._subscribe(ac(2===arguments.length?function(c){a.call(b,c)}:a))},bc.subscribeOnError=function(a,b){return this._subscribe(ac(null,2===arguments.length?function(c){a.call(b,c)}:a))},bc.subscribeOnCompleted=function(a,b){return this._subscribe(ac(null,null,2===arguments.length?function(){a.call(b)}:a))},a}();bc.observeOn=function(a){var b=this;return new wc(function(c){return b.subscribe(new gc(a,c))})},bc.subscribeOn=function(a){var b=this;return new wc(function(c){var d=new Fb,e=new Gb;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var ic=hc.fromPromise=function(a){return jc(function(){var b=new J.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};bc.toPromise=function(a){if(a||(a=J.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},bc.toArray=function(){var a=this;return new wc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},hc.create=hc.createWithDisposable=function(a){return new wc(a)};var jc=hc.defer=function(a){return new wc(function(b){var c;try{c=a()}catch(d){return qc(d).subscribe(b)}return R(c)&&(c=ic(c)),c.subscribe(b)})},kc=hc.empty=function(a){return L(a)||(a=Mb),new wc(function(b){return a.schedule(function(){b.onCompleted()})})},lc=Math.pow(2,53)-1;n.prototype[V]=function(){return new o(this._s)},o.prototype[V]=function(){return this},o.prototype.next=function(){if(this._id?(c.onNext(a[d++]),b()):c.onCompleted()})})};hc.generate=function(a,b,c,d,e){return L(e)||(e=Nb),new wc(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})};var oc=hc.never=function(){return new wc(function(){return Eb})};hc.of=function(){return w(null,arguments)},hc.ofWithScheduler=function(a){return w(a,ub.call(arguments,1))},hc.range=function(a,b,c){return L(c)||(c=Nb),new wc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},hc.repeat=function(a,b,c){return L(c)||(c=Nb),pc(a,c).repeat(null==b?-1:b)};var pc=hc["return"]=hc.just=function(a,b){return L(b)||(b=Mb),new wc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};hc.returnValue=function(){return $("returnValue","return or just"),pc.apply(null,arguments)};var qc=hc["throw"]=hc.throwException=hc.throwError=function(a,b){return L(b)||(b=Mb),new wc(function(c){return b.schedule(function(){c.onError(a)})})};hc.using=function(a,b){return new wc(function(c){var d,e,f=Eb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Ab(qc(g).subscribe(c),f)}return new Ab(e.subscribe(c),f)})},bc.amb=function(a){var b=this;return new wc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Fb,j=new Fb;return R(a)&&(a=ic(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new Ab(i,j)})},hc.amb=function(){function a(a,b){return a.amb(b)}for(var b=oc(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},bc["catch"]=bc.catchError=function(a){return"function"==typeof a?x(this,a):rc([this,a])},bc.catchException=function(a){return $("catchException","catch or catchError"),this.catchError(a)};var rc=hc.catchError=hc["catch"]=function(){return $b(j(arguments,0)).catchError()};hc.catchException=function(){return $("catchException","catch or catchError"),rc.apply(null,arguments)},bc.combineLatest=function(){var a=ub.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),sc.apply(this,a)};var sc=hc.combineLatest=function(){var a=ub.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new wc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(M))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(M)&&c.onCompleted()}function e(a){j[a]=!0,j.every(M)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new Fb;R(f)&&(f=ic(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new Ab(m)})};bc.concat=function(){var a=ub.call(arguments,0);return a.unshift(this),tc.apply(this,a)};var tc=hc.concat=function(){return $b(j(arguments,0)).concat()};bc.concatAll=function(){return this.merge(1)},bc.concatObservable=function(){return $("concatObservable","concatAll"),this.merge(1)},bc.merge=function(a){if("number"!=typeof a)return uc(this,a);var b=this;return new wc(function(c){function d(a){var b=new Fb;f.add(b),R(a)&&(a=ic(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Ab,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var uc=hc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=ub.call(arguments,1)):(a=Mb,b=ub.call(arguments,0)):(a=Mb,b=ub.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),w(a,b).mergeAll()};bc.mergeAll=function(){var a=this;return new wc(function(b){var c=new Ab,d=!1,e=new Fb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Fb;c.add(e),R(a)&&(a=ic(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},bc.mergeObservable=function(){return $("mergeObservable","mergeAll"),this.mergeAll.apply(this,arguments)},bc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return vc([this,a])};var vc=hc.onErrorResumeNext=function(){var a=j(arguments,0);return new wc(function(b){var c=0,d=new Gb,e=Mb.scheduleRecursive(function(e){var f,g;c0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(M)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new Fb;R(c)&&(c=ic(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new Ab(j)})},hc.zip=function(){var a=ub.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},hc.zipArray=function(){var a=j(arguments,0);return new wc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(M))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(M)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Fb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new Ab(h);return j.add(Db(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},bc.asObservable=function(){return new wc(this.subscribe.bind(this))},bc.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},bc.dematerialize=function(){var a=this;return new wc(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},bc.distinctUntilChanged=function(a,b){var c=this;return a||(a=M),b||(b=O),new wc(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},bc["do"]=bc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new wc(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b)try{b(c)}catch(d){a.onError(d)}a.onError(c)},function(){if(c)try{c()}catch(b){a.onError(b)}a.onCompleted()})})},bc.doAction=function(){return $("doAction","do or tap"),this.tap.apply(this,arguments)},bc.doOnNext=bc.tapOnNext=function(a,b){return this.tap(2===arguments.length?function(c){a.call(b,c)}:a)},bc.doOnError=bc.tapOnError=function(a,b){return this.tap(K,2===arguments.length?function(c){a.call(b,c)}:a)},bc.doOnCompleted=bc.tapOnCompleted=function(a,b){return this.tap(K,null,2===arguments.length?function(){a.call(b)}:a)},bc["finally"]=bc.ensure=function(a){var b=this;return new wc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Db(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},bc.finallyAction=function(a){return $("finallyAction","finally or ensure"),this.ensure(a)},bc.ignoreElements=function(){var a=this;return new wc(function(b){return a.subscribe(K,b.onError.bind(b),b.onCompleted.bind(b))})},bc.materialize=function(){var a=this;return new wc(function(b){return a.subscribe(function(a){b.onNext(Ub(a))},function(a){b.onNext(Vb(a)),b.onCompleted()},function(){b.onNext(Wb()),b.onCompleted()})})},bc.repeat=function(a){return Zb(this,a).concat()},bc.retry=function(a){return Zb(this,a).catchError()},bc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new wc(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},bc.skipLast=function(a){var b=this;return new wc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},bc.startWith=function(){var a,b,c=0;return arguments.length&&L(arguments[0])?(b=arguments[0],c=1):b=Mb,a=ub.call(arguments,c),$b([nc(a,b),this]).concat()},bc.takeLast=function(a){var b=this;return new wc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},bc.takeLastBuffer=function(a){var b=this;return new wc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},bc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(T);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(T);return new wc(function(d){function e(){var a=new zc;i.push(a),d.onNext(xb(a,g))}var f=new Fb,g=new Hb(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g})},bc.selectConcat=bc.concatMap=function(a,b,c){return S(a)&&S(b)?this.concatMap(function(c,d){var e=a(c,d);return R(e)&&(e=ic(e)),(Y(e)||X(e))&&(e=mc(e)),e.map(function(a,e){return b(c,a,d,e)})}):S(a)?z(this,a,c):z(this,function(){return a})},bc.concatMapObserver=bc.selectConcatObserver=function(a,b,c,d){var e=this;return new wc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}R(c)&&(c=ic(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}R(c)&&(c=ic(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}R(a)&&(a=ic(a)),f.onNext(a),f.onCompleted()})}).concatAll()},bc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new wc(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},B.prototype.push=function(a){var b=-1===A(this.set,a,this.comparer);return b&&this.set.push(a),b},bc.distinct=function(a,b){var c=this;return b||(b=O),new wc(function(d){var e=new B(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},bc.select=bc.map=function(a,b){var c=S(a)?a:function(){return a},d=this;return new wc(function(a){var e=0;return d.subscribe(function(f){var g;try{g=c.call(b,f,e++,d)}catch(h){return void a.onError(h)}a.onNext(g)},a.onError.bind(a),a.onCompleted.bind(a))})},bc.pluck=function(a){return this.map(function(b){return b[a]})},bc.flatMapObserver=bc.selectManyObserver=function(a,b,c,d){var e=this;return new wc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}R(c)&&(c=ic(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}R(c)&&(c=ic(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}R(a)&&(a=ic(a)),f.onNext(a),f.onCompleted()})}).mergeAll()},bc.selectMany=bc.flatMap=function(a,b,c){return S(a)&&S(b)?this.flatMap(function(c,d){var e=a(c,d);return R(e)&&(e=ic(e)),(Y(e)||X(e))&&(e=mc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):S(a)?C(this,a,c):C(this,function(){return a})},bc.selectSwitch=bc.flatMapLatest=bc.switchMap=function(a,b){return this.select(a,b).switchLatest()},bc.skip=function(a){if(0>a)throw new Error(T);var b=this;return new wc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},bc.skipWhile=function(a,b){var c=this;return new wc(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},bc.take=function(a,b){if(0>a)throw new RangeError(T);if(0===a)return kc(b);var c=this;return new wc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},bc.takeWhile=function(a,b){var c=this;return new wc(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},bc.where=bc.filter=function(a,b){var c=this;return new wc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},bc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new wc(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})})};var wc=J.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Db(a):Eb}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new xc(a);return Nb.scheduleRequired()?Nb.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return vb(c,a),c}(hc),xc=function(a){function b(b){a.call(this),this.observer=b,this.m=new Fb}vb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(cc),yc=function(a,b){this.subject=a,this.observer=b};yc.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var zc=J.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),Eb):(a.onCompleted(),Eb):(this.observers.push(a),new yc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return vb(d,a),wb(d.prototype,_b,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Ac(a,b)},d}(hc),Ac=(J.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new yc(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),Eb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return vb(d,a),wb(d.prototype,_b,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(hc),J.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return vb(b,a),wb(b.prototype,_b,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(hc));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(E.Rx=J,define(function(){return J})):F&&G?H?(G.exports=J).Rx=J:F.Rx=J:E.Rx=J}).call(this); //# sourceMappingURL=rx.map \ No newline at end of file diff --git a/package.json b/package.json index 68c93fd30..725bf7f37 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "rx", "title": "Reactive Extensions for JavaScript (RxJS)", "description": "Library for composing asynchronous and event-based operations in JavaScript", - "version": "2.3.17", + "version": "2.3.18", "homepage": "https://github.com/Reactive-Extensions/RxJS", "author": { "name": "Cloud Programmability Team", diff --git a/src/core/linq/observable/fromarray.js b/src/core/linq/observable/fromarray.js index f3f141fea..fc0d4be4a 100644 --- a/src/core/linq/observable/fromarray.js +++ b/src/core/linq/observable/fromarray.js @@ -5,7 +5,7 @@ * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence. */ var observableFromArray = Observable.fromArray = function (array, scheduler) { - //deprecate('fromArray', 'from'); + deprecate('fromArray', 'from'); isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new AnonymousObservable(function (observer) { var count = 0, len = array.length;