From 55702b2e86043677a435d89249d37479c2884153 Mon Sep 17 00:00:00 2001 From: Matthew Podwysocki Date: Thu, 5 Feb 2015 16:56:30 -0800 Subject: [PATCH] Closing Issue #541 --- Gruntfile.js | 2 + dist/rx.all.compat.js | 134 +++++++++------- dist/rx.all.compat.map | 2 +- dist/rx.all.compat.min.js | 8 +- dist/rx.all.js | 180 +++++++++++++++------- dist/rx.all.map | 2 +- dist/rx.all.min.js | 8 +- dist/rx.compat.js | 134 +++++++++------- dist/rx.compat.map | 2 +- dist/rx.compat.min.js | 4 +- dist/rx.js | 134 +++++++++------- dist/rx.lite.compat.js | 134 +++++++++------- dist/rx.lite.compat.map | 2 +- dist/rx.lite.compat.min.js | 4 +- dist/rx.lite.js | 134 +++++++++------- dist/rx.lite.map | 2 +- dist/rx.lite.min.js | 4 +- dist/rx.map | 2 +- dist/rx.min.js | 4 +- doc/api/core/operators/ofarraychanges.md | 51 ++++++ doc/api/core/operators/ofobjectchanges.md | 51 ++++++ doc/libraries/rx.complete.md | 2 + src/core/linq/observable/pluck.js | 10 +- src/core/perf/observablebase.js | 4 + src/core/perf/operators/combinelatest.js | 33 ++-- src/core/perf/operators/filter.js | 53 ++++--- src/core/perf/operators/map.js | 55 +++---- tests/observable/ofarraychanges.js | 26 ++++ tests/observable/ofobjectchanges.js | 26 ++++ tests/rx.all.html | 2 + 30 files changed, 797 insertions(+), 412 deletions(-) create mode 100644 doc/api/core/operators/ofarraychanges.md create mode 100644 doc/api/core/operators/ofobjectchanges.md create mode 100644 tests/observable/ofarraychanges.js create mode 100644 tests/observable/ofobjectchanges.js diff --git a/Gruntfile.js b/Gruntfile.js index 4f3321957..a2a641e09 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -103,6 +103,8 @@ var browsers = [{ 'src/core/perf/operators/fromarray.js', 'src/core/linq/observable/generate.js', 'src/core/linq/observable/of.js', + 'src/core/linq/observable/ofarraychanges.js', + 'src/core/linq/observable/ofobjectchanges.js', 'src/core/linq/observable/never.js', 'src/core/linq/observable/pairs.js', 'src/core/linq/observable/range.js', diff --git a/dist/rx.all.compat.js b/dist/rx.all.compat.js index 67bb27e45..548803fb9 100644 --- a/dist/rx.all.compat.js +++ b/dist/rx.all.compat.js @@ -2386,6 +2386,10 @@ __super__.call(this, subscribe); } + ObservableBase.prototype.subscribeCore = function(observer) { + throw new Error('Not implemeneted'); + } + return ObservableBase; }(Observable)); @@ -4431,36 +4435,39 @@ }(ObservableBase)); - var MapObserver = (function (__super__) { - inherits(MapObserver, __super__); + function MapObserver(observer, selector, source) { + this.observer = observer; + this.selector = selector; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function MapObserver(observer, selector, source) { - this.observer = observer; - this.selector = selector; - this.source = source; - this.index = 0; - __super__.call(this); + MapObserver.prototype.onNext = function(x) { + if (this.isStopped) { return; } + try { + var result = this.selector(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } - - MapObserver.prototype.next = function(x) { - try { - var result = this.selector(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - this.observer.onNext(result); - }; - - MapObserver.prototype.error = function (e) { + this.observer.onNext(result); + }; + MapObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + MapObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + MapObserver.prototype.dispose = function() { this.isStopped = true; }; + MapObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; - - MapObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; + return true; + } - return MapObserver; - }(AbstractObserver)); + return false; + }; /** * Projects each element of an observable sequence into a new form by incorporating the element's index. @@ -4476,12 +4483,26 @@ }; /** - * Retrieves the value of a specified property from all elements in the Observable sequence. - * @param {String} prop The property to pluck. + * Retrieves the value of a specified nested property from all elements in + * the Observable sequence. + * @param {Arguments} arguments The nested properties to pluck. * @returns {Observable} Returns a new Observable sequence of property values. */ - observableProto.pluck = function (prop) { - return this.map(function (x) { return x[prop]; }); + observableProto.pluck = function () { + var args = arguments, len = arguments.length; + if (len === 0) { throw new Error('List of properties cannot be empty.'); } + return this.map(function (x) { + var currentProp = x; + for (var i = 0; i < len; i++) { + var p = currentProp[args[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } else { + return undefined; + } + } + return currentProp; + }); }; function flatMap(source, selector, thisArg) { @@ -4719,36 +4740,41 @@ }(ObservableBase)); - var FilterObserver = (function (__super__) { - inherits(FilterObserver, __super__); + function FilterObserver(observer, predicate, source) { + this.observer = observer; + this.predicate = predicate; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function FilterObserver(observer, predicate, source) { - this.observer = observer; - this.predicate = predicate; - this.source = source; - this.index = 0; - __super__.call(this); + FilterObserver.prototype.onNext = function(x) { + try { + var shouldYield = this.predicate(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } + shouldYield && this.observer.onNext(x); + }; - FilterObserver.prototype.next = function(x) { - try { - var shouldYield = this.predicate(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - shouldYield && this.observer.onNext(x); - }; - - FilterObserver.prototype.error = function (e) { + FilterObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + FilterObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + FilterObserver.prototype.dispose = function() { this.isStopped = true; }; + FilterObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; + return true; + } + + return false; + }; - FilterObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; - return FilterObserver; - }(AbstractObserver)); /** * Filters the elements of an observable sequence based on a predicate by incorporating the element's index. diff --git a/dist/rx.all.compat.map b/dist/rx.all.compat.map index d31bdc8f5..5600d69d4 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","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","ScheduledDisposable","scheduler","disposable","scheduleItem","s","dispose","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","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","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","v","promise","then","name","next","throwString","handleError","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","observableWindowWithBoundaries","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","scheduleRecursiveWithAbsoluteAndState","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","idx","ln","prop","xs","getDisposable","Function","that","args","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","fun","thisp","filter","t","searchElement","n","Infinity","hasDontEnumBug","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","notifier","handled","notificationDisposable","outer","inner","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","isStopped","completed","fail","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","cancel","Observable","_subscribe","oldOnError","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","createWithDisposable","defer","observableFactory","observableThrow","pow","val","charAt","from","iterable","mapFn","mapper","FromArrayObservable","sink","FromArraySink","loopRecursive","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","observableNever","never","pairs","range","observableReturn","throwError","throwException","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","MapObservable","internalMap","MapObserver","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","FilterObservable","FilterObserver","internalFilter","shouldYield","aggregate","reduce","some","any","isEmpty","all","includes","fromIndex","contains","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","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","Ember","publish","addHandler","removeHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","controlled","StopAndWaitObservable","StopAndWaitObserver","__sub__","stopAndWaitObserverProto","stopAndWait","WindowedObservable","WindowedObserver","windowSize","received","windowedObserverPrototype","windowed","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasError","hasObservers","os","createRemovableDisposable","so","_trim","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","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","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","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAMC,IACtE,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAAQC,EAAI,EAAGC,EAAMH,EAAII,OAAYD,EAAJD,EAASA,IAAOD,EAAEI,KAAKL,EAAIE,GAAO,OAAOD,GAe7G,QAASK,GAAmBC,EAAOC,GAG/B,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ,EAAOK,KAAK,KAAON,GAAuB,KAC/DL,GAAMG,MAAQS,EAAkBF,IAItC,QAASE,GAAkBC,GAGzB,IAAK,GAFDC,GAAQD,EAAYE,MAAM,MAC1BC,KACKrB,EAAI,EAAGC,EAAMkB,EAAMjB,OAAYD,EAAJD,EAASA,IAAK,CAChD,GAAIsB,GAAOH,EAAMnB,EAEZuB,GAAgBD,IAAUE,EAAYF,KAASA,GAClDD,EAAalB,KAAKmB,GAGtB,MAAOD,GAAaL,KAAK,MAG3B,QAASO,GAAgBE,GACvB,GAAIC,GAAwBC,EAAyBF,EACrD,KAAKC,EACH,OAAO,CAET,IAAIE,GAAWF,EAAsB,GAAIG,EAAaH,EAAsB,EAE5E,OAAOE,KAAaE,IAClBD,GAAcE,IACAC,I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ACjDqF,YAAa,WACXtC,KAAKmC,SAASG,eAEhBa,QAAS,SAAU3J,GACjBwG,KAAKmC,SAASgB,QAAQ3J,IAExB6I,OAAQ,SAAUpE,GAChB+B,KAAKmC,SAASE,OAAOpE,MAIlBsjC,GACP5f,GAKFxR,IAAGqxB,OAAU,SAAUpkB,GAGrB,QAASokB,KACPpkB,EAAUhhB,KAAK4D,MAajB,MAhBA0S,IAAS8uB,EAAQpkB,GASjBokB,EAAOvkC,UAAUg0B,MAAQ,WAAcjxB,KAAKqC,QAAO,IAKnDm/B,EAAOvkC,UAAUi0B,OAAS,WAAclxB,KAAKqC,QAAO,IAE7Cm/B,GACPl2B,IAEmB,kBAAVm2B,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzEzgC,GAAKkP,GAAKA,GAEVsxB,OAAO,WACL,MAAOtxB,OAEAR,IAAeG,GAEpBE,IACDF,GAAWF,QAAUO,IAAIA,GAAKA,GAE/BR,GAAYQ,GAAKA,GAInBlP,GAAKkP,GAAKA,EAIZ,IAAIhV,IAAcC,MAElBgB,KAAK4D"} \ No newline at end of file +{"version":3,"file":"rx.all.compat.min.js","sources":["rx.all.compat.js"],"names":["undefined","checkDisposed","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","ScheduledDisposable","scheduler","disposable","scheduleItem","s","dispose","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","MapObserver","isStopped","flatMap","mergeAll","FilterObserver","predicate","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","sequenceContainsNoElements","elementAtOrDefault","hasDefault","defaultValue","argumentOutOfRange","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","yieldIndex","shouldRun","toThunk","obj","ctx","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","v","promise","then","name","next","throwString","handleError","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","observableWindowWithBoundaries","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","scheduleRecursiveWithAbsoluteAndState","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","idx","ln","prop","xs","getDisposable","Function","that","args","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","fun","thisp","filter","t","searchElement","n","Infinity","hasDontEnumBug","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","notifier","handled","notificationDisposable","outer","inner","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","completed","fail","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","cancel","Observable","_subscribe","oldOnError","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","createWithDisposable","defer","observableFactory","observableThrow","pow","val","charAt","from","iterable","mapFn","mapper","FromArrayObservable","sink","FromArraySink","loopRecursive","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","observableNever","never","pairs","range","observableReturn","throwError","throwException","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","MapObservable","internalMap","select","currentProp","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","FilterObservable","internalFilter","shouldYield","aggregate","reduce","some","any","isEmpty","all","includes","fromIndex","contains","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","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","Ember","publish","addHandler","removeHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","controlled","StopAndWaitObservable","StopAndWaitObserver","__sub__","stopAndWaitObserverProto","stopAndWait","WindowedObservable","WindowedObserver","windowSize","received","windowedObserverPrototype","windowed","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasError","hasObservers","os","createRemovableDisposable","so","_trim","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","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","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","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAMC,IACtE,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAAQC,EAAI,EAAGC,EAAMH,EAAII,OAAYD,EAAJD,EAASA,IAAOD,EAAEI,KAAKL,EAAIE,GAAO,OAAOD,GAe7G,QAASK,GAAmBC,EAAOC,GAG/B,GAAIC,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WA,EAChBnC,KAAKvG,WAAaA,EAClB8jB,EAAUnhB,KAAK4D,KAAM8C,GAevB,MAxBA+P,IAAS2uB,EAAkBjkB,GAY3BtK,GAAcuuB,EAAiBvkC,UAAW8iB,GAAS9iB,WACjDqF,YAAa,WACXtC,KAAKmC,SAASG,eAEhBa,QAAS,SAAU3J,GACjBwG,KAAKmC,SAASgB,QAAQ3J,IAExB6I,OAAQ,SAAUpE,GAChB+B,KAAKmC,SAASE,OAAOpE,MAIlBujC,GACP3f,GAKFvR,IAAGmxB,OAAU,SAAUlkB,GAGrB,QAASkkB,KACPlkB,EAAUnhB,KAAK4D,MAajB,MAhBA6S,IAAS4uB,EAAQlkB,GASjBkkB,EAAOxkC,UAAUi0B,MAAQ,WAAclxB,KAAKqC,QAAO,IAKnDo/B,EAAOxkC,UAAUk0B,OAAS,WAAcnxB,KAAKqC,QAAO,IAE7Co/B,GACPh2B,IAEmB,kBAAVi2B,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzE1gC,GAAKqP,GAAKA,GAEVoxB,OAAO,WACL,MAAOpxB,OAEAR,IAAeG,GAEpBE,IACDF,GAAWF,QAAUO,IAAIA,GAAKA,GAE/BR,GAAYQ,GAAKA,GAInBrP,GAAKqP,GAAKA,EAIZ,IAAInV,IAAcC,MAElBgB,KAAK4D"} \ No newline at end of file diff --git a/dist/rx.all.compat.min.js b/dist/rx.all.compat.min.js index 4e4634a38..e3ea6be5d 100644 --- a/dist/rx.all.compat.min.js +++ b/dist/rx.all.compat.min.js @@ -1,6 +1,6 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ -(function(a){function b(a){if(a.isDisposed)throw new Error(Kb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(Lb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Pb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+Pb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===Nb&&d>=Ob&&fe>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(Lb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return Nb=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!pc(a))return b;oc.nonEnumArgs&&a.length&&qc(a)&&(a=sc.call(a));var c=oc.enumPrototypes&&"function"==typeof a,d=oc.enumErrorProps&&(a===jc||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(oc.nonEnumShadows&&a!==kc){var f=a.constructor,g=-1,h=Xb;if(a===(f&&f.prototype))var i=a===lc?fc:a===jc?ac:gc.call(a),j=nc[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function t(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function u(){this._s=s}function v(){this._s=s,this._l=s.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&sb.isFinite(a)}function z(b){var c,d=b[Qb];if(!d&&"string"==typeof b)return c=new u(b),c[Qb]();if(!d&&b.length!==a)return c=new w(b),c[Qb]();if(!d)throw new TypeError("Object is not iterable");return b[Qb]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>od?od:b):b}function C(a,b){return zb(a)||(a=Oc),new _d(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function D(a,b){return new _d(function(c){var d=new Fc,e=new Gc;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)}Fb(f)&&(f=ld(f)),d=new Fc,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function E(a,b){var c=this;return new _d(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function F(){return!1}function G(){return[]}function H(a,b,c){var d=Vb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Fb(e)&&(e=ld(e)),(Tb(e)||Sb(e))&&(e=pd(e)),e}).concatAll()}function I(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function J(a){this.comparer=a,this.set=[]}function K(a,b,c){var d=Vb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Fb(e)&&(e=ld(e)),(Tb(e)||Sb(e))&&(e=pd(e)),e}).mergeAll()}function L(a,b,c){return new _d(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)},function(a){d.onError(a)},function(){d.onNext(g),d.onCompleted()})},a)}function M(a){if(0===a.length)throw new Error(Ib);return a[0]}function N(a,b,c,d){if(0>b)throw new Error(Jb);return new _d(function(e){var f=b;return a.subscribe(function(a){0===f--&&(e.onNext(a),e.onCompleted())},function(a){e.onError(a)},function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(Jb))})},a)}function O(a,b,c){return new _d(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)},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Ib))})},a)}function P(a,b,c){return new _d(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},function(a){d.onError(a)},function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(Ib))})},a)}function Q(a,b,c){return new _d(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Ib))})},a)}function R(b,c,d,e){var f=Vb(c,d,3);return new _d(function(c){var d=0;return b.subscribe(function(a){var g;try{g=f(a,d,b)}catch(h){return void c.onError(h)}g?(c.onNext(e?d:a),c.onCompleted()):d++},function(a){c.onError(a)},function(){c.onNext(e?-1:a),c.onCompleted()})},b)}function S(a,b){return Array.isArray(a)?T.call(b,a):X(a)?Hd(a.call(b)):Y(a)?Hd(a):W(a)?U(a):Fb(a)?V(a):typeof a===Fd?a:pc(a)||Array.isArray(a)?T.call(b,a):a}function T(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=S(a,b),typeof a!==Fd)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 Tc.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function U(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function V(a){return function(b){a.then(function(a){b(null,a)},b)}}function W(a){return a&&typeof a.subscribe===Fd}function X(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function Y(a){return a&&typeof a.next===Fd&&typeof a[Gd]===Fd}function Z(a){a&&Tc.schedule(function(){throw a})}function $(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=sb.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 _(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Dc(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c($(a))};return a.attachEvent("on"+b,d),Dc(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,Dc(function(){a["on"+b]=null})}function ab(a,b,c){var d=new Ac;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(ab(a.item(e),b,c));else a&&d.add(_(a,b,c));return d}function bb(a,b,c){return new _d(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(Ab))){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 Ac(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)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}function cb(a,b){return a.groupJoin(this,b,nd,function(a,b){return b})}function db(a){var b=this;return new _d(function(c){var d=new ce,e=new Ac,f=new Hc(e);return c.onNext(vc(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),Fb(a)&&(a=ld(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new ce,c.onNext(vc(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function eb(a){var b=this;return new _d(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}Fb(b)&&(b=ld(b));var i=new Fc;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(yb,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new ce,c.onNext(vc(h,g)),d()}))}var e=new Gc,f=new Ac(e),g=new Hc(f),h=new ce;return c.onNext(vc(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}function fb(b,c){return new $c(function(){return new Zc(function(){return b()?{done:!1,value:c}:{done:!0,value:a}})})}function gb(a){this.patterns=a}function hb(a,b){this.expression=a,this.selector=b}function ib(a,b,c){var d=a.get(b);if(!d){var e=new Yd(b,c);return a.set(b,e),e}return d}function jb(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new Xd;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function kb(a,b){return new _d(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function lb(a,b,c){return new _d(function(d){var e=a,f=Kc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function mb(a,b){return new _d(function(c){return b.scheduleWithRelative(Kc(a),function(){c.onNext(0),c.onCompleted()})})}function nb(a,b,c){return a===b?new _d(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):md(function(){return lb(c.now()+a,b,c)})}function ob(a,b,c){return new _d(function(d){var e,f=!1,g=new Gc,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 Fc,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 Ac(e,g)},a)}function pb(a,b,c){return md(function(){return ob(a,b-c.now(),c)})}function qb(a,b){return new _d(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Ac(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}var rb={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},sb=rb[typeof window]&&window||this,tb=rb[typeof exports]&&exports&&!exports.nodeType&&exports,ub=rb[typeof module]&&module&&!module.nodeType&&module,vb=ub&&ub.exports===tb&&tb,wb=rb[typeof global]&&global;!wb||wb.global!==wb&&wb.window!==wb||(sb=wb);var xb={internals:{},config:{Promise:sb.Promise},helpers:{}},yb=xb.helpers.noop=function(){},zb=(xb.helpers.notDefined=function(a){return"undefined"==typeof a},xb.helpers.isScheduler=function(a){return a instanceof xb.Scheduler}),Ab=xb.helpers.identity=function(a){return a},Bb=(xb.helpers.pluck=function(a){return function(b){return b[a]}},xb.helpers.just=function(a){return function(){return a}},xb.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),Cb=xb.helpers.defaultComparer=function(a,b){return rc(a,b)},Db=xb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Eb=(xb.helpers.defaultKeySerializer=function(a){return a.toString()},xb.helpers.defaultError=function(a){throw a}),Fb=xb.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},Gb=(xb.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},xb.helpers.not=function(a){return!a}),Hb=xb.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==gc.call(a)}),a}(),Ib="Sequence contains no elements.",Jb="Argument out of range",Kb="Object has been disposed";xb.config.longStackSupport=!1;var Lb=!1;try{throw new Error}catch(Mb){Lb=!!Mb.stack}var Nb,Ob=h(),Pb="From previous event:",Qb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";sb.Set&&"function"==typeof(new sb.Set)["@@iterator"]&&(Qb="@@iterator");var Rb=xb.doneEnumerator={done:!0,value:a},Sb=xb.helpers.isIterable=function(b){return b[Qb]!==a},Tb=xb.helpers.isArrayLike=function(b){return b&&b.length!==a};xb.helpers.iterator=Qb;var Ub,Vb=xb.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Wb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Xb=Wb.length,Yb="[object Arguments]",Zb="[object Array]",$b="[object Boolean]",_b="[object Date]",ac="[object Error]",bc="[object Function]",cc="[object Number]",dc="[object Object]",ec="[object RegExp]",fc="[object String]",gc=Object.prototype.toString,hc=Object.prototype.hasOwnProperty,ic=gc.call(arguments)==Yb,jc=Error.prototype,kc=Object.prototype,lc=String.prototype,mc=kc.propertyIsEnumerable;try{Ub=!(gc.call(document)==dc&&!({toString:0}+""))}catch(Mb){Ub=!0}var nc={};nc[Zb]=nc[_b]=nc[cc]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},nc[$b]=nc[fc]={constructor:!0,toString:!0,valueOf:!0},nc[ac]=nc[bc]=nc[ec]={constructor:!0,toString:!0},nc[dc]={constructor:!0};var oc={};!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);oc.enumErrorProps=mc.call(jc,"message")||mc.call(jc,"name"),oc.enumPrototypes=mc.call(a,"prototype"),oc.nonEnumArgs=0!=c,oc.nonEnumShadows=!/valueOf/.test(b)}(1);var pc=xb.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},qc=function(a){return a&&"object"==typeof a?gc.call(a)==Yb:!1};ic||(qc=function(a){return a&&"object"==typeof a?hc.call(a,"callee"):!1});var rc=xb.internals.isEqual=function(a,b){return o(a,b,[],[])},sc=({}.hasOwnProperty,Array.prototype.slice),tc=this.inherits=xb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},uc=xb.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},vc=xb.internals.addRef=function(a,b){return new _d(function(c){return new Ac(b.getDisposable(),a.subscribe(c))})};Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=sc.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(sc.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(sc.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 wc=Object("a"),xc="a"!=wc[0]||!(0 in wc);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=xc&&{}.toString.call(this)==fc?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=bc)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=xc&&{}.toString.call(this)==fc?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=bc)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)==Zb}),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}),Object.prototype.propertyIsEnumerable||(Object.prototype.propertyIsEnumerable=function(a){for(var b in this)if(b===a)return!0;return!1}),Object.keys||(Object.keys=function(){"use strict";var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString");return function(c){if("object"!=typeof c&&("function"!=typeof c||null===c))throw new TypeError("Object.keys called on non-object");var d,e,f=[];for(d in c)a.call(c,d)&&f.push(d);if(b)for(e=0;Xb>e;e++)a.call(c,Wb[e])&&f.push(Wb[e]);return f}}()),q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var yc=xb.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},zc=yc.prototype;zc.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},zc.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)}}},zc.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},Bc=Ac.prototype;Bc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Bc.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Bc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},Bc.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var Cc=xb.Disposable=function(a){this.isDisposed=!1,this.action=a||yb};Cc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Dc=Cc.create=function(a){return new Cc(a)},Ec=Cc.empty={dispose:yb},Fc=xb.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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),Gc=xb.SerialDisposable=Fc,Hc=xb.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?Ec:new a(this)},b}();r.prototype.dispose=function(){this.scheduler.scheduleWithState(this,t)};var Ic=xb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||Db,this.disposable=new Fc};Ic.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Ic.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Ic.prototype.isCancelled=function(){return this.disposable.isDisposed},Ic.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Jc=xb.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(),Ec}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=Bb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Kc=Jc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Ac,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),Ec});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Ac,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Ec});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")})}}(Jc.prototype),function(){Jc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Jc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof sb.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=sb.setInterval(function(){d=c(d)},b);return Dc(function(){sb.clearInterval(e)})}}(Jc.prototype),function(a){a.catchError=a["catch"]=function(a){return new Uc(this,a)}}(Jc.prototype);var Lc,Mc=xb.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 Fc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Nc=Jc.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+Kc(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Jc(Bb,a,b,c)}(),Oc=Jc.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-Jc.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()+Jc.normalize(c),g=new Ic(this,b,d,f);if(e)e.enqueue(g);else{e=new yc(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 Jc(Bb,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Pc=yb,Qc=function(){var a,b=yb;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!sb.setTimeout)throw new Error("No concurrency detected!");a=sb.setTimeout,b=sb.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Rc=Qc.setTimeout,Sc=Qc.clearTimeout;!function(){function a(){if(!sb.postMessage||sb.importScripts)return!1;var a=!1,b=sb.onmessage;return sb.onmessage=function(){a=!0},sb.postMessage("","*"),sb.onmessage=b,a}var b=RegExp("^"+String(gc).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=wb&&vb&&wb.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=wb&&vb&&wb.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)Lc=c,Pc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Lc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};sb.addEventListener?sb.addEventListener("message",h,!1):sb.attachEvent("onmessage",h,!1),Lc=function(a){var b=g++;f[b]=a,sb.postMessage(e+b,"*")}}else if(sb.MessageChannel){var i=new sb.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Lc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in sb&&"onreadystatechange"in sb.document.createElement("script")?Lc=function(a){var b=sb.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},sb.document.documentElement.appendChild(b)}:(Lc=function(a){return Rc(a,0)},Pc=Sc)}();var Tc=Jc.timeout=function(){function a(a,b){var c=this,d=new Fc,e=Lc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Ac(d,Dc(function(){Pc(e)}))}function b(a,b,c){var d=this,e=Jc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Fc,g=Rc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Ac(f,Dc(function(){Sc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Jc(Bb,a,b,c)}(),Uc=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 tc(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 Ec}}},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 Fc;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}(Jc),Vc=xb.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 zb(a)||(a=Nc),new _d(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Wc=Vc.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 Vc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Xc=Vc.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 Vc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Yc=Vc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Vc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Zc=xb.internals.Enumerator=function(a){this._next=a};Zc.prototype.next=function(){return this._next()},Zc.prototype[Qb]=function(){return this};var $c=xb.internals.Enumerable=function(a){this._iterator=a};$c.prototype[Qb]=function(){return this._iterator()},$c.prototype.concat=function(){var a=this;return new _d(function(b){var c,d=a[Qb](),e=new Gc,f=Nc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;Fb(h)&&(h=ld(h));var i=new Fc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Ac(e,f,Dc(function(){c=!0}))})},$c.prototype.catchError=function(){var a=this;return new _d(function(b){var c,d=a[Qb](),e=new Gc,f=Nc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;Fb(i)&&(i=ld(i));var j=new Fc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Ac(e,f,Dc(function(){c=!0}))})},$c.prototype.catchErrorWhen=function(a){var b=this;return new _d(function(c){var d,e,f=new ce,g=new ce,h=a(f),i=h.subscribe(g),j=b[Qb](),k=new Gc,l=Nc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;Fb(i)&&(i=ld(i)); -var l=new Fc,m=new Fc;k.setDisposable(new Ac(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Ac(i,k,l,Dc(function(){d=!0}))})};var _c=$c.repeat=function(a,b){return null==b&&(b=-1),new $c(function(){var c=b;return new Zc(function(){return 0===c?Rb:(c>0&&c--,{done:!1,value:a})})})},ad=$c.of=function(a,b,c){if(b)var d=Vb(b,c,3);return new $c(function(){var c=-1;return new Zc(function(){return++c0&&(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}(ed),id=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return tc(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.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(hd),jd=xb.Observable=function(){function a(a){if(xb.config.longStackSupport&&Lb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){d(a,c),e(a)},a.call(c,b)}}else this._subscribe=a}return dd=a.prototype,dd.subscribe=dd.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:cd(a,b,c))},dd.subscribeOnNext=function(a,b){return this._subscribe(cd("undefined"!=typeof b?function(c){a.call(b,c)}:a))},dd.subscribeOnError=function(a,b){return this._subscribe(cd(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},dd.subscribeOnCompleted=function(a,b){return this._subscribe(cd(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),kd=xb.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Dc(a):Ec}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new ae(a),d=[b,this];return Oc.scheduleRequired()?Oc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return tc(e,a),e}(jd);dd.observeOn=function(a){var b=this;return new _d(function(c){return b.subscribe(new id(a,c))},b)},dd.subscribeOn=function(a){var b=this;return new _d(function(c){var d=new Fc,e=new Gc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new r(a,b.subscribe(c)))})),e},b)};var ld=jd.fromPromise=function(a){return md(function(){var b=new xb.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};dd.toPromise=function(a){if(a||(a=xb.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)})})},dd.toArray=function(){var a=this;return new _d(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},jd.create=jd.createWithDisposable=function(a,b){return new _d(a,b)};var md=jd.defer=function(a){return new _d(function(b){var c;try{c=a()}catch(d){return vd(d).subscribe(b)}return Fb(c)&&(c=ld(c)),c.subscribe(b)})},nd=jd.empty=function(a){return zb(a)||(a=Nc),new _d(function(b){return a.schedule(function(){b.onCompleted()})})},od=Math.pow(2,53)-1;u.prototype[Qb]=function(){return new v(this._s)},v.prototype[Qb]=function(){return this},v.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return C(null,a)},jd.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);return C(a,b)};var td=jd.never=function(){return new _d(function(){return Ec})};jd.pairs=function(a,b){return b||(b=xb.Scheduler.currentThread),new _d(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},jd.range=function(a,b,c){return zb(c)||(c=Oc),new _d(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},jd.repeat=function(a,b,c){return zb(c)||(c=Oc),ud(a,c).repeat(null==b?-1:b)};var ud=jd["return"]=jd.just=function(a,b){return zb(b)||(b=Nc),new _d(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};jd.returnValue=function(){return ud.apply(null,arguments)};var vd=jd["throw"]=jd.throwError=function(a,b){return zb(b)||(b=Nc),new _d(function(c){return b.schedule(function(){c.onError(a)})})};jd.throwException=function(){return jd.throwError.apply(null,arguments)},jd.using=function(a,b){return new _d(function(c){var d,e,f=Ec;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Ac(vd(g).subscribe(c),f)}return new Ac(e.subscribe(c),f)})},dd.amb=function(a){var b=this;return new _d(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Fc,j=new Fc;return Fb(a)&&(a=ld(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 Ac(i,j)})},jd.amb=function(){function a(a,b){return a.amb(b)}var b=td(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},dd["catch"]=dd.catchError=function(a){return"function"==typeof a?D(this,a):wd([this,a])},dd.catchException=function(a){return this.catchError(a)};var wd=jd.catchError=jd["catch"]=jd.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return ad(a).catchError()};dd.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),xd.apply(this,a)};var xd=jd.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new _d(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every(Ab))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every(Ab)&&b.onCompleted()}function e(a){j[a]=!0,j.every(Ab)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new Fc;Fb(f)&&(f=ld(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new Ac(l)},this)};dd.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),yd.apply(null,a)};var yd=jd.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return ad(a).concat()};dd.concatAll=dd.concatObservable=function(){return this.merge(1)},dd.merge=function(a){if("number"!=typeof a)return zd(this,a);var b=this;return new _d(function(c){function d(a){var b=new Fc;f.add(b),Fb(a)&&(a=ld(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Ac,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var zd=jd.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(zb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Nc,b=0;d>b;b++)c.push(arguments[b]);else for(a=Nc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),C(a,c).mergeAll()};dd.mergeAll=function(){var a=this;return new _d(function(b){var c=new Ac,d=!1,e=new Fc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Fc;c.add(e),Fb(a)&&(a=ld(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},dd.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},dd.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return Ad([this,a])};var Ad=jd.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new _d(function(b){var c=0,d=new Gc,e=Nc.scheduleRecursive(function(e){var f,g;cb;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new _d(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new Fc;Fb(d)&&(d=ld(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(Ab)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new Fc;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new Ac(j)},this)},dd.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return E.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new _d(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every(Ab)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,G),i=p(g,F),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new Fc;Fb(e)&&(e=ld(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new Ac(j)},d)},jd.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},jd.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new _d(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(Ab))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(Ab)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Fc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Ac(h)})},dd.asObservable=function(){var a=this;return new _d(function(b){return a.subscribe(b)},this)},dd.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})},dd.dematerialize=function(){var a=this;return new _d(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},dd.distinctUntilChanged=function(a,b){var c=this;return b||(b=Cb),new _d(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},dd["do"]=dd.tap=dd.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?cd(a||yb,b||yb,c||yb):a;return new _d(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},dd.doOnNext=dd.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},dd.doOnError=dd.tapOnError=function(a,b){return this.tap(yb,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},dd.doOnCompleted=dd.tapOnCompleted=function(a,b){return this.tap(yb,null,"undefined"!=typeof b?function(){a.call(b)}:a)},dd["finally"]=dd.ensure=function(a){var b=this;return new _d(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Dc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},dd.finallyAction=function(a){return this.ensure(a)},dd.ignoreElements=function(){var a=this;return new _d(function(b){return a.subscribe(yb,function(a){b.onError(a)},function(){b.onCompleted()})},a)},dd.materialize=function(){var a=this;return new _d(function(b){return a.subscribe(function(a){b.onNext(Wc(a))},function(a){b.onNext(Xc(a)),b.onCompleted()},function(){b.onNext(Yc()),b.onCompleted()})},a)},dd.repeat=function(a){return _c(this,a).concat()},dd.retry=function(a){return _c(this,a).catchError()},dd.retryWhen=function(a){return _c(this).catchErrorWhen(a)},dd.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 _d(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},dd.skipLast=function(a){var b=this;return new _d(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},dd.startWith=function(){var a,b=0;arguments.length&&zb(arguments[0])?(a=arguments[0],b=1):a=Nc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return ad([sd(c,a),this]).concat()},dd.takeLast=function(a){var b=this;return new _d(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},dd.takeLastBuffer=function(a){var b=this;return new _d(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},dd.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(Jb);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(Jb);return new _d(function(d){function e(){var a=new ce;i.push(a),d.onNext(vc(a,g))}var f=new Fc,g=new Hc(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},c)},dd.selectConcat=dd.concatMap=function(a,b,c){return Hb(a)&&Hb(b)?this.concatMap(function(c,d){var e=a(c,d);return Fb(e)&&(e=ld(e)),(Tb(e)||Sb(e))&&(e=pd(e)),e.map(function(a,e){return b(c,a,d,e)})}):Hb(a)?H(this,a,c):H(this,function(){return a})},dd.concatMapObserver=dd.selectConcatObserver=function(a,b,c,d){var e=this,f=Vb(a,d,2),g=Vb(b,d,1),h=Vb(c,d,0);return new _d(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}Fb(d)&&(d=ld(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}Fb(c)&&(c=ld(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}Fb(b)&&(b=ld(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},dd.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new _d(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},J.prototype.push=function(a){var b=-1===I(this.set,a,this.comparer);return b&&this.set.push(a),b},dd.distinct=function(a,b){var c=this;return b||(b=Cb),new _d(function(d){var e=new J(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)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},dd.groupBy=function(a,b,c){return this.groupByUntil(a,b,td,c)},dd.groupByUntil=function(a,b,c,d){var e=this;return b||(b=Ab),d||(d=Cb),new _d(function(f){function g(a){return function(b){b.onError(a)}}var h=new Ud(0,d),i=new Ac,j=new Hc(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 ce,h.set(e,m),l=!0),l){var n=new be(e,m,j),o=new be(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new Fc;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(yb,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},e)};var Bd=function(a){function b(b,c,d){this.source=b,this.selector=Vb(c,d,3),a.call(this)}return tc(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new Cd(a,this.selector,this))},b}(kd),Cd=function(a){function b(b,c,d){this.observer=b,this.selector=c,this.source=d,this.index=0,a.call(this)}return tc(b,a),b.prototype.next=function(a){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(ed);dd.map=dd.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Bd?this.internalMap(a,b):new Bd(this,c,b)},dd.pluck=function(a){return this.map(function(b){return b[a]})},dd.selectMany=dd.flatMap=function(a,b,c){return Hb(a)&&Hb(b)?this.flatMap(function(c,d){var e=a(c,d);return Fb(e)&&(e=ld(e)),(Tb(e)||Sb(e))&&(e=pd(e)),e.map(function(a,e){return b(c,a,d,e)})},c):Hb(a)?K(this,a,c):K(this,function(){return a})},dd.flatMapObserver=dd.selectManyObserver=function(a,b,c,d){var e=this;return new _d(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)}Fb(c)&&(c=ld(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}Fb(c)&&(c=ld(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}Fb(a)&&(a=ld(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},dd.selectSwitch=dd.flatMapLatest=dd.switchMap=function(a,b){return this.select(a,b).switchLatest()},dd.skip=function(a){if(0>a)throw new Error(Jb);var b=this;return new _d(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},dd.skipWhile=function(a,b){var c=this,d=Vb(a,b,3);return new _d(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},dd.take=function(a,b){if(0>a)throw new RangeError(Jb);if(0===a)return nd(b);var c=this;return new _d(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},dd.takeWhile=function(a,b){var c=this,d=Vb(a,b,3);return new _d(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Dd=function(a){function b(b,c,d){this.source=b,this.predicate=Vb(c,d,3),a.call(this)}return tc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ed(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(kd),Ed=function(a){function b(b,c,d){this.observer=b,this.predicate=c,this.source=d,this.index=0,a.call(this)}return tc(b,a),b.prototype.next=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(ed);dd.filter=dd.where=function(a,b){return this instanceof Dd?this.internalFilter(a,b):new Dd(this,a,b)},dd.aggregate=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,b=arguments[0],a=arguments[1]):a=arguments[0],new _d(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return void e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Error(Ib)),e.onCompleted()})},d)},dd.reduce=function(a){var b,c=!1,d=this;return 2===arguments.length&&(c=!0,b=arguments[1]),new _d(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return void e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Error(Ib)),e.onCompleted()})},d)},dd.some=function(a,b){var c=this;return a?c.filter(a,b).some():new _d(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},function(b){a.onError(b)},function(){a.onNext(!1),a.onCompleted()})},c)},dd.any=function(){return this.some.apply(this,arguments)},dd.isEmpty=function(){return this.any().map(Gb)},dd.every=function(a,b){return this.filter(function(b){return!a(b)},b).some().map(Gb)},dd.all=function(){return this.every.apply(this,arguments)},dd.includes=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new _d(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),Ec):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},function(a){e.onError(a)},function(){e.onNext(!1),e.onCompleted()})},this)},dd.contains=function(a,b){dd.includes(a,b)},dd.count=function(a,b){return a?this.filter(a,b).count():this.reduce(function(a){return a+1},0)},dd.indexOf=function(a,b){var c=this;return new _d(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),Ec):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},function(a){d.onError(a)},function(){d.onNext(-1),d.onCompleted()})},c)},dd.sum=function(a,b){return a&&Hb(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},dd.minBy=function(a,b){return b||(b=Db),L(this,a,function(a,c){return-1*b(a,c)})},dd.min=function(a){return this.minBy(Ab,a).map(function(a){return M(a)})},dd.maxBy=function(a,b){return b||(b=Db),L(this,a,b)},dd.max=function(a){return this.maxBy(Ab,a).map(function(a){return M(a)})},dd.average=function(a,b){return a&&Hb(a)?this.map(a,b).average():this.reduce(function(a,b){return{sum:a.sum+b,count:a.count+1}},{sum:0,count:0}).map(function(a){if(0===a.count)throw new Error(Ib);return a.sum/a.count})},dd.sequenceEqual=function(a,b){var c=this;return b||(b=Cb),new _d(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)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(Tb(a)||Sb(a))&&(a=pd(a)),Fb(a)&&(a=ld(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)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new Ac(i,j)},c)},dd.elementAt=function(a){return N(this,a,!1)},dd.elementAtOrDefault=function(a,b){return N(this,a,!0,b)},dd.single=function(a,b){return a&&Hb(a)?this.where(a,b).single():O(this,!1)},dd.singleOrDefault=function(a,b,c){return a&&Hb(a)?this.filter(a,c).singleOrDefault(null,b):O(this,!0,b)},dd.first=function(a,b){return a?this.where(a,b).first():P(this,!1)},dd.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):P(this,!0,b)},dd.last=function(a,b){return a?this.where(a,b).last():Q(this,!1)},dd.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):Q(this,!0,b)},dd.find=function(a,b){return R(this,a,b,!1)},dd.findIndex=function(a,b){return R(this,a,b,!0)},dd.toSet=function(){if("undefined"==typeof sb.Set)throw new TypeError;var a=this;return new _d(function(b){var c=new sb.Set;return a.subscribe(function(a){c.add(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},dd.toMap=function(a,b){if("undefined"==typeof sb.Map)throw new TypeError;var c=this;return new _d(function(d){var e=new sb.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)},function(a){d.onError(a)},function(){d.onNext(e),d.onCompleted()})},c)};var Fd="function",Gd="throw",pc=xb.internals.isObject,Hd=xb.spawn=function(a){var b=X(a);return function(c){function d(a,b){Tc.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2)for(var b=[],h=1,i=arguments.length;i>h;h++)b.push(arguments[h]);if(a)try{c=g[Gd](a)}catch(j){return d(j)}if(!a)try{c=g.next(b)}catch(j){return d(j)}if(c.done)return d(null,c.value);if(c.value=S(c.value,f),typeof c.value!==Fd)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array.")); -else{var k=!1;try{c.value.call(f,function(){k||(k=!0,e.apply(f,arguments))})}catch(j){Tc.schedule(function(){k||(k=!0,e.call(f,j))})}}}var f=this,g=a;if(b){for(var h=[],i=0,j=arguments.length;j>i;i++)h.push(arguments[i]);var j=h.length,k=j&&typeof h[j-1]===Fd;c=k?h.pop():Z,g=a.apply(this,h)}else c=c||Z;e()}};jd.start=function(a,b,c){return Id(a,b,c)()};var Id=jd.toAsync=function(a,b,c){return zb(c)||(c=Tc),function(){var d=arguments,e=new de;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()}};jd.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new _d(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},jd.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new _d(function(e){function f(a){if(a)return void e.onError(a);for(var b=[],d=1,f=arguments.length;f>d;d++)b.push(arguments[d]);if(c){try{b=c(b)}catch(g){return e.onError(g)}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()}},xb.config.useNativeEvents=!1,jd.fromEvent=function(a,b,c){if(a.addListener)return Jd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!xb.config.useNativeEvents){if("function"==typeof a.on&&"function"==typeof a.off)return Jd(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(sb.Ember&&"function"==typeof sb.Ember.addListener)return Jd(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c)}return new _d(function(d){return ab(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 Jd=jd.fromEventPattern=function(a,b,c){return new _d(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 Dc(function(){b&&b(e,f)})}).publish().refCount()};jd.startAsync=function(a){var b;try{b=a()}catch(c){return vd(c)}return ld(b)};var Kd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Ec,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Ec)});return new Ac(c,d,e)}function c(c,d){this.source=c,this.controller=new ce,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return tc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(jd);dd.pausable=function(a){return new Kd(this,a)};var Ld=function(b){function c(b){var c,d=[],e=bb(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 ce,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return tc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(jd);dd.pausableBuffered=function(a){return new Ld(this,a)};var Md=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new Nd(d),this.source=c.multicast(this.subject).refCount()}return tc(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(jd),Nd=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new ce,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=Ec,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=Ec}return tc(c,a),uc(c.prototype,bd,{onCompleted:function(){this.hasCompleted=!0,(!this.enableQueue||0===this.queue.length)&&this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,(!this.enableQueue||0===this.queue.length)&&this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=Ec):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=Ec),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?Ec:(this.requestedCount=a,this.requestedDisposable=Dc(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Ec}}),c}(jd);dd.controlled=function(a){return null==a&&(a=!0),new Md(this,a)};var Od=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return Tc.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}tc(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}tc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;Tc.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(ed);return c}(jd);Md.prototype.stopAndWait=function(){return new Od(this)};var Pd=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return Tc.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}tc(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}tc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;Tc.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(ed);return c}(jd);Md.prototype.windowed=function(a){return new Pd(this,a)},dd.multicast=function(a,b){var c=this;return"function"==typeof a?new _d(function(d){var e=c.multicast(a());return new Ac(b(e).subscribe(d),e.connect())},c):new Td(c,a)},dd.publish=function(a){return a&&Hb(a)?this.multicast(function(){return new ce},a):this.multicast(new ce)},dd.share=function(){return this.publish().refCount()},dd.publishLast=function(a){return a&&Hb(a)?this.multicast(function(){return new de},a):this.multicast(new de)},dd.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Rd(b)},a):this.multicast(new Rd(a))},dd.shareValue=function(a){return this.publishValue(a).refCount()},dd.replay=function(a,b,c,d){return a&&Hb(a)?this.multicast(function(){return new Sd(b,c,d)},a):this.multicast(new Sd(b,c,d))},dd.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var Qd=function(a,b){this.subject=a,this.observer=b};Qd.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 Rd=xb.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),Ec):(this.observers.push(a),a.onNext(this.value),new Qd(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return tc(e,a),uc(e.prototype,bd,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped){this.value=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),e}(jd),Sd=xb.ReplaySubject=function(a){function d(a,b){return Dc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new hd(this.scheduler,a),e=d(this,c);b(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function f(b,c,d){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=d||Oc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return tc(f,a),uc(f.prototype,bd.prototype,{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(this),!this.isStopped){var d=this.scheduler.now();this.q.push({interval:d,value:a}),this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onNext(a),h.ensureActive()}}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var d=this.scheduler.now();this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onError(a),h.ensureActive()}this.observers.length=0}},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onCompleted(),g.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),f}(jd),Td=xb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Ac(f.subscribe(c),Dc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return tc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new _d(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(jd),Ud=function(){function b(a){if(0===(1&a))return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function 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||Cb,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 c)return d(c)}if(b.hashCode)return b.hashCode();var f=17*a++;return b.hashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var 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){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}();dd.join=function(a,b,c,d){var e=this;return new _d(function(f){var g=new Ac,h=!1,i=!1,j=0,k=0,l=new Ud,m=new Ud;return g.add(e.subscribe(function(a){var c=j++,e=new Fc;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(yb,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 Fc;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(yb,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},e)},dd.groupJoin=function(a,b,c,d){var e=this;return new _d(function(f){function g(a){return function(b){b.onError(a)}}var h=new Ac,i=new Hc(h),j=new Ud,k=new Ud,l=0,m=0;return h.add(e.subscribe(function(a){var c=new ce,e=l++;j.add(e,c);var m;try{m=d(a,vc(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 Fc;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(yb,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 Fc;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(yb,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},e)},dd.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},dd.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?db.call(this,a):"function"==typeof a?eb.call(this,a):cb.call(this,a,b)},dd.pairwise=function(){var a=this;return new _d(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))},a)},dd.partition=function(a,b){return[this.filter(a,b),this.filter(function(c,d,e){return!a.call(b,c,d,e)})]},dd.letBind=dd.let=function(a){return a(this)},jd["if"]=jd.ifThen=function(a,b,c){return md(function(){return c||(c=nd()),Fb(b)&&(b=ld(b)),Fb(c)&&(c=ld(c)),"function"==typeof c.now&&(c=nd(c)),a()?b:c})},jd["for"]=jd.forIn=function(a,b,c){return ad(a,b,c).concat()};var Vd=jd["while"]=jd.whileDo=function(a,b){return Fb(b)&&(b=ld(b)),fb(a,b).concat()};dd.doWhile=function(a){return yd([this,Vd(a,this)])},jd["case"]=jd.switchCase=function(a,b,c){return md(function(){Fb(c)&&(c=ld(c)),c||(c=nd()),"function"==typeof c.now&&(c=nd(c));var d=b[a()];return Fb(d)&&(d=ld(d)),d||c})},dd.expand=function(a,b){zb(b)||(b=Nc);var c=this;return new _d(function(d){var e=[],f=new Gc,g=new Ac(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 Fc;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},this)},jd.forkJoin=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new _d(function(b){var c=a.length;if(0===c)return b.onCompleted(),Ec;for(var d=new Ac,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];Fb(j)&&(j=ld(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})},dd.forkJoin=function(a,b){var c=this;return new _d(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new Fc,l=new Fc;return Fb(a)&&(a=ld(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 Ac(k,l)},c)},dd.manySelect=function(a,b){zb(b)||(b=Nc);var c=this;return md(function(){var d;return c.map(function(a){var b=new Wd(a);return d&&d.onNext(a),d=b,b}).tap(yb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var Wd=function(a){function b(a){var b=this,c=new Ac;return c.add(Oc.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 de}return tc(c,a),uc(c.prototype,bd,{onCompleted:function(){this.onNext(jd.empty())},onError:function(a){this.onNext(jd.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(jd),Xd=sb.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}();gb.prototype.and=function(a){return new gb(this.patterns.concat(a))},gb.prototype.thenDo=function(a){return new hb(this,a)},hb.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(ib(a,this.expression.patterns[f],b.onError.bind(b)));var h=new jb(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},jb.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},jb.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=yb,c.completed=yb,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}(ed);dd.and=function(a){return new gb([this,a])},dd.thenDo=function(a){return new gb([this]).thenDo(a)},jd.when=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new _d(function(b){var c=[],d=new Xd,e=cd(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){vd(h).subscribe(b)}var i=new Ac;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var Zd=jd.interval=function(a,b){return nb(a,a,zb(b)?b:Tc)},$d=jd.timer=function(b,c,d){var e;return zb(d)||(d=Tc),c!==a&&"number"==typeof c?e=c:zb(c)&&(d=c),b instanceof Date&&e===a?kb(b.getTime(),d):b instanceof Date&&e!==a?(e=c,lb(b.getTime(),e,d)):e===a?mb(b,d):nb(b,e,d)};dd.delay=function(a,b){return zb(b)||(b=Tc),a instanceof Date?pb(this,a.getTime(),b):ob(this,a,b)},dd.debounce=dd.throttleWithTimeout=function(a,b){zb(b)||(b=Tc);var c=this;return new _d(function(d){var e,f=new Gc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Fc;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 Ac(i,f)},this)},dd.throttle=function(a,b){return this.debounce(a,b)},dd.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),zb(c)||(c=Tc),"number"==typeof b?d=b:zb(b)&&(d=a,c=b),new _d(function(b){function f(){var a=new Fc,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 ce;k.push(a),b.onNext(vc(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new Gc,m=0;return g=new Ac(l),h=new Hc(g),k.push(new ce),b.onNext(vc(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},e)},dd.windowWithTimeOrCount=function(a,b,c){var d=this;return zb(c)||(c=Tc),new _d(function(e){function f(b){var d=new Fc;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new ce,e.onNext(vc(l,i)),f(a)}}))}var g=new Gc,h=new Ac(g),i=new Hc(h),j=0,k=0,l=new ce;return e.onNext(vc(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 ce,e.onNext(vc(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},dd.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},dd.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},dd.timeInterval=function(a){var b=this;return zb(a)||(a=Tc),md(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},dd.timestamp=function(a){return zb(a)||(a=Tc),this.map(function(b){return{value:b,timestamp:a.now()}})},dd.sample=dd.throttleLatest=function(a,b){return zb(b)||(b=Tc),"number"==typeof a?qb(this,Zd(a,b)):qb(this,a)},dd.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=vd(new Error(b||"Timeout"))),zb(c)||(c=Tc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new _d(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(Fb(b)&&(b=ld(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Fc,j=new Gc,k=!1,l=new Gc;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 Ac(j,l)},d)},jd.generateWithAbsoluteTime=function(a,b,c,d,e,f){return zb(f)||(f=Tc),new _d(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()})})},jd.generateWithRelativeTime=function(a,b,c,d,e,f){return zb(f)||(f=Tc),new _d(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()})})},dd.delaySubscription=function(a,b){return this.delayWithSelector($d(a,zb(b)?b:Tc),nd)},dd.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new _d(function(a){var b=new Ac,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new Gc,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new Fc;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(i,a.onError.bind(a),i)):i(),new Ac(h,b)},this)},dd.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=td()),c||(c=vd(new Error("Timeout")));var d=this;return new _d(function(e){function f(a){function b(){return k===d}var d=k,f=new Fc;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 Gc,i=new Gc,j=new Fc;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(Fb(c)?ld(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new Ac(h,i)},d)},dd.debounceWithSelector=function(a){var b=this;return new _d(function(c){var d,e=!1,f=new Gc,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}Fb(h)&&(h=ld(h)),e=!0,d=b,g++;var j=g,k=new Fc;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 Ac(h,f)},b)},dd.throttleWithSelector=function(){return this.debounceWithSelector.apply(this,arguments)},dd.skipLastWithTime=function(a,b){zb(b)||(b=Tc);var c=this;return new _d(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)},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})},c)},dd.takeLastWithTime=function(a,b){var c=this;return zb(b)||(b=Tc),new _d(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()},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})},c)},dd.takeLastBufferWithTime=function(a,b){var c=this;return zb(b)||(b=Tc),new _d(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()},function(a){d.onError(a)},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()})},c)},dd.takeWithTime=function(a,b){var c=this;return zb(b)||(b=Tc),new _d(function(d){return new Ac(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},dd.skipWithTime=function(a,b){var c=this;return zb(b)||(b=Tc),new _d(function(d){var e=!1;return new Ac(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))},c)},dd.skipUntilWithTime=function(a,b){zb(b)||(b=Tc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new _d(function(e){var f=!1;return new Ac(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},dd.takeUntilWithTime=function(a,b){zb(b)||(b=Tc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new _d(function(e){return new Ac(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},dd.throttleFirst=function(a,b){zb(b)||(b=Tc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new _d(function(a){var e=0; -return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)},dd.exclusive=function(){var a=this;return new _d(function(b){var c=!1,d=!1,e=new Fc,f=new Ac;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,Fb(a)&&(a=ld(a));var e=new Fc;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},this)},dd.exclusiveMap=function(a,b){var c=this,d=Vb(a,b,3);return new _d(function(a){var b=0,e=!1,f=!0,g=new Fc,h=new Ac;return h.add(g),g.setDisposable(c.subscribe(function(c){e||(e=!0,innerSubscription=new Fc,h.add(innerSubscription),Fb(c)&&(c=ld(c)),innerSubscription.setDisposable(c.subscribe(function(e){var f;try{f=d(e,b++,c)}catch(g){return void a.onError(g)}a.onNext(f)},function(b){a.onError(b)},function(){h.remove(innerSubscription),e=!1,f&&1===h.length&&a.onCompleted()})))},function(b){a.onError(b)},function(){f=!0,1!==h.length||e||a.onCompleted()})),h},this)},dd.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 _d(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)})},c)},xb.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(),Ec}function h(b,g){this.clock=b,this.comparer=g,this.isEnabled=!1,this.queue=new yc(1024),a.call(this,c,d,e,f)}tc(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 Mc(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(Jb);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(Jb);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(Jb);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 Ic(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},h}(Jc),xb.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||Db;a.call(this,d,e)}tc(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}(xb.VirtualTimeScheduler);var _d=xb.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Dc(a):Ec}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new ae(a),e=[d,b];return Oc.scheduleRequired()?Oc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return tc(d,a),d}(jd),ae=function(a){function b(b){a.call(this),this.observer=b,this.m=new Fc}tc(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(ed),be=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 _d(function(a){return new Ac(e.getDisposable(),d.subscribe(a))}):d}return tc(c,a),c}(jd),ce=xb.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),Ec):(a.onCompleted(),Ec):(this.observers.push(a),new Qd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return tc(e,a),uc(e.prototype,bd.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new ee(a,b)},e}(jd),de=xb.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Ec):(this.observers.push(a),new Qd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return tc(e,a),uc(e.prototype,bd,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(jd),ee=xb.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return tc(c,a),uc(c.prototype,bd.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(jd);xb.Pauser=function(a){function b(){a.call(this)}return tc(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(ce),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(sb.Rx=xb,define(function(){return xb})):tb&&ub?vb?(ub.exports=xb).Rx=xb:tb.Rx=xb:sb.Rx=xb;var fe=h()}).call(this); +(function(a){function b(a){if(a.isDisposed)throw new Error(Mb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(Nb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Rb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+Rb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===Pb&&d>=Qb&&fe>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(Nb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return Pb=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!rc(a))return b;qc.nonEnumArgs&&a.length&&sc(a)&&(a=uc.call(a));var c=qc.enumPrototypes&&"function"==typeof a,d=qc.enumErrorProps&&(a===lc||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(qc.nonEnumShadows&&a!==mc){var f=a.constructor,g=-1,h=Zb;if(a===(f&&f.prototype))var i=a===nc?hc:a===lc?cc:ic.call(a),j=pc[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function t(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function u(){this._s=s}function v(){this._s=s,this._l=s.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&ub.isFinite(a)}function z(b){var c,d=b[Sb];if(!d&&"string"==typeof b)return c=new u(b),c[Sb]();if(!d&&b.length!==a)return c=new w(b),c[Sb]();if(!d)throw new TypeError("Object is not iterable");return b[Sb]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>qd?qd:b):b}function C(a,b){return Bb(a)||(a=Qc),new _d(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function D(a,b){return new _d(function(c){var d=new Hc,e=new Ic;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)}Hb(f)&&(f=nd(f)),d=new Hc,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function E(a,b){var c=this;return new _d(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function F(){return!1}function G(){return[]}function H(a,b,c){var d=Xb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Hb(e)&&(e=nd(e)),(Vb(e)||Ub(e))&&(e=rd(e)),e}).concatAll()}function I(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function J(a){this.comparer=a,this.set=[]}function K(a,b,c){this.observer=a,this.selector=b,this.source=c,this.index=0,this.isStopped=!1}function L(a,b,c){var d=Xb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Hb(e)&&(e=nd(e)),(Vb(e)||Ub(e))&&(e=rd(e)),e}).mergeAll()}function M(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.index=0,this.isStopped=!1}function N(a,b,c){return new _d(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)},function(a){d.onError(a)},function(){d.onNext(g),d.onCompleted()})},a)}function O(a){if(0===a.length)throw new Error(Kb);return a[0]}function P(a,b,c,d){if(0>b)throw new Error(Lb);return new _d(function(e){var f=b;return a.subscribe(function(a){0===f--&&(e.onNext(a),e.onCompleted())},function(a){e.onError(a)},function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(Lb))})},a)}function Q(a,b,c){return new _d(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)},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Kb))})},a)}function R(a,b,c){return new _d(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},function(a){d.onError(a)},function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(Kb))})},a)}function S(a,b,c){return new _d(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Kb))})},a)}function T(b,c,d,e){var f=Xb(c,d,3);return new _d(function(c){var d=0;return b.subscribe(function(a){var g;try{g=f(a,d,b)}catch(h){return void c.onError(h)}g?(c.onNext(e?d:a),c.onCompleted()):d++},function(a){c.onError(a)},function(){c.onNext(e?-1:a),c.onCompleted()})},b)}function U(a,b){return Array.isArray(a)?V.call(b,a):Z(a)?Hd(a.call(b)):$(a)?Hd(a):Y(a)?W(a):Hb(a)?X(a):typeof a===Fd?a:rc(a)||Array.isArray(a)?V.call(b,a):a}function V(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=U(a,b),typeof a!==Fd)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 Vc.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function W(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function X(a){return function(b){a.then(function(a){b(null,a)},b)}}function Y(a){return a&&typeof a.subscribe===Fd}function Z(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function $(a){return a&&typeof a.next===Fd&&typeof a[Gd]===Fd}function _(a){a&&Vc.schedule(function(){throw a})}function ab(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=ub.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 bb(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Fc(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(ab(a))};return a.attachEvent("on"+b,d),Fc(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,Fc(function(){a["on"+b]=null})}function cb(a,b,c){var d=new Cc;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(cb(a.item(e),b,c));else a&&d.add(bb(a,b,c));return d}function db(a,b,c){return new _d(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(Cb))){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 Cc(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)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}function eb(a,b){return a.groupJoin(this,b,pd,function(a,b){return b})}function fb(a){var b=this;return new _d(function(c){var d=new ce,e=new Cc,f=new Jc(e);return c.onNext(xc(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),Hb(a)&&(a=nd(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new ce,c.onNext(xc(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function gb(a){var b=this;return new _d(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}Hb(b)&&(b=nd(b));var i=new Hc;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(Ab,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new ce,c.onNext(xc(h,g)),d()}))}var e=new Ic,f=new Cc(e),g=new Jc(f),h=new ce;return c.onNext(xc(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}function hb(b,c){return new ad(function(){return new _c(function(){return b()?{done:!1,value:c}:{done:!0,value:a}})})}function ib(a){this.patterns=a}function jb(a,b){this.expression=a,this.selector=b}function kb(a,b,c){var d=a.get(b);if(!d){var e=new Yd(b,c);return a.set(b,e),e}return d}function lb(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new Xd;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function mb(a,b){return new _d(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function nb(a,b,c){return new _d(function(d){var e=a,f=Mc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function ob(a,b){return new _d(function(c){return b.scheduleWithRelative(Mc(a),function(){c.onNext(0),c.onCompleted()})})}function pb(a,b,c){return a===b?new _d(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):od(function(){return nb(c.now()+a,b,c)})}function qb(a,b,c){return new _d(function(d){var e,f=!1,g=new Ic,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 Hc,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 Cc(e,g)},a)}function rb(a,b,c){return od(function(){return qb(a,b-c.now(),c)})}function sb(a,b){return new _d(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Cc(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}var tb={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},ub=tb[typeof window]&&window||this,vb=tb[typeof exports]&&exports&&!exports.nodeType&&exports,wb=tb[typeof module]&&module&&!module.nodeType&&module,xb=wb&&wb.exports===vb&&vb,yb=tb[typeof global]&&global;!yb||yb.global!==yb&&yb.window!==yb||(ub=yb);var zb={internals:{},config:{Promise:ub.Promise},helpers:{}},Ab=zb.helpers.noop=function(){},Bb=(zb.helpers.notDefined=function(a){return"undefined"==typeof a},zb.helpers.isScheduler=function(a){return a instanceof zb.Scheduler}),Cb=zb.helpers.identity=function(a){return a},Db=(zb.helpers.pluck=function(a){return function(b){return b[a]}},zb.helpers.just=function(a){return function(){return a}},zb.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),Eb=zb.helpers.defaultComparer=function(a,b){return tc(a,b)},Fb=zb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Gb=(zb.helpers.defaultKeySerializer=function(a){return a.toString()},zb.helpers.defaultError=function(a){throw a}),Hb=zb.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},Ib=(zb.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},zb.helpers.not=function(a){return!a}),Jb=zb.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==ic.call(a)}),a}(),Kb="Sequence contains no elements.",Lb="Argument out of range",Mb="Object has been disposed";zb.config.longStackSupport=!1;var Nb=!1;try{throw new Error}catch(Ob){Nb=!!Ob.stack}var Pb,Qb=h(),Rb="From previous event:",Sb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";ub.Set&&"function"==typeof(new ub.Set)["@@iterator"]&&(Sb="@@iterator");var Tb=zb.doneEnumerator={done:!0,value:a},Ub=zb.helpers.isIterable=function(b){return b[Sb]!==a},Vb=zb.helpers.isArrayLike=function(b){return b&&b.length!==a};zb.helpers.iterator=Sb;var Wb,Xb=zb.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Yb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Zb=Yb.length,$b="[object Arguments]",_b="[object Array]",ac="[object Boolean]",bc="[object Date]",cc="[object Error]",dc="[object Function]",ec="[object Number]",fc="[object Object]",gc="[object RegExp]",hc="[object String]",ic=Object.prototype.toString,jc=Object.prototype.hasOwnProperty,kc=ic.call(arguments)==$b,lc=Error.prototype,mc=Object.prototype,nc=String.prototype,oc=mc.propertyIsEnumerable;try{Wb=!(ic.call(document)==fc&&!({toString:0}+""))}catch(Ob){Wb=!0}var pc={};pc[_b]=pc[bc]=pc[ec]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},pc[ac]=pc[hc]={constructor:!0,toString:!0,valueOf:!0},pc[cc]=pc[dc]=pc[gc]={constructor:!0,toString:!0},pc[fc]={constructor:!0};var qc={};!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);qc.enumErrorProps=oc.call(lc,"message")||oc.call(lc,"name"),qc.enumPrototypes=oc.call(a,"prototype"),qc.nonEnumArgs=0!=c,qc.nonEnumShadows=!/valueOf/.test(b)}(1);var rc=zb.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},sc=function(a){return a&&"object"==typeof a?ic.call(a)==$b:!1};kc||(sc=function(a){return a&&"object"==typeof a?jc.call(a,"callee"):!1});var tc=zb.internals.isEqual=function(a,b){return o(a,b,[],[])},uc=({}.hasOwnProperty,Array.prototype.slice),vc=this.inherits=zb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},wc=zb.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},xc=zb.internals.addRef=function(a,b){return new _d(function(c){return new Cc(b.getDisposable(),a.subscribe(c))})};Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=uc.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(uc.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(uc.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 yc=Object("a"),zc="a"!=yc[0]||!(0 in yc);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=zc&&{}.toString.call(this)==hc?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=dc)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=zc&&{}.toString.call(this)==hc?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=dc)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)==_b}),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}),Object.prototype.propertyIsEnumerable||(Object.prototype.propertyIsEnumerable=function(a){for(var b in this)if(b===a)return!0;return!1}),Object.keys||(Object.keys=function(){"use strict";var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString");return function(c){if("object"!=typeof c&&("function"!=typeof c||null===c))throw new TypeError("Object.keys called on non-object");var d,e,f=[];for(d in c)a.call(c,d)&&f.push(d);if(b)for(e=0;Zb>e;e++)a.call(c,Yb[e])&&f.push(Yb[e]);return f}}()),q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Ac=zb.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Bc=Ac.prototype;Bc.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Bc.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)}}},Bc.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},Dc=Cc.prototype;Dc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Dc.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Dc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},Dc.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var Ec=zb.Disposable=function(a){this.isDisposed=!1,this.action=a||Ab};Ec.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Fc=Ec.create=function(a){return new Ec(a)},Gc=Ec.empty={dispose:Ab},Hc=zb.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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),Ic=zb.SerialDisposable=Hc,Jc=zb.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?Gc:new a(this)},b}();r.prototype.dispose=function(){this.scheduler.scheduleWithState(this,t)};var Kc=zb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||Fb,this.disposable=new Hc};Kc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Kc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Kc.prototype.isCancelled=function(){return this.disposable.isDisposed},Kc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Lc=zb.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(),Gc}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=Db,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Mc=Lc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Cc,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),Gc});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Cc,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Gc});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")})}}(Lc.prototype),function(){Lc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Lc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof ub.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=ub.setInterval(function(){d=c(d)},b);return Fc(function(){ub.clearInterval(e)})}}(Lc.prototype),function(a){a.catchError=a["catch"]=function(a){return new Wc(this,a)}}(Lc.prototype);var Nc,Oc=zb.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 Hc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Pc=Lc.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+Mc(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Lc(Db,a,b,c)}(),Qc=Lc.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-Lc.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()+Lc.normalize(c),g=new Kc(this,b,d,f);if(e)e.enqueue(g);else{e=new Ac(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 Lc(Db,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Rc=Ab,Sc=function(){var a,b=Ab;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!ub.setTimeout)throw new Error("No concurrency detected!");a=ub.setTimeout,b=ub.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Tc=Sc.setTimeout,Uc=Sc.clearTimeout;!function(){function a(){if(!ub.postMessage||ub.importScripts)return!1;var a=!1,b=ub.onmessage;return ub.onmessage=function(){a=!0},ub.postMessage("","*"),ub.onmessage=b,a}var b=RegExp("^"+String(ic).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=yb&&xb&&yb.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=yb&&xb&&yb.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)Nc=c,Rc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Nc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};ub.addEventListener?ub.addEventListener("message",h,!1):ub.attachEvent("onmessage",h,!1),Nc=function(a){var b=g++;f[b]=a,ub.postMessage(e+b,"*")}}else if(ub.MessageChannel){var i=new ub.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Nc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in ub&&"onreadystatechange"in ub.document.createElement("script")?Nc=function(a){var b=ub.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},ub.document.documentElement.appendChild(b)}:(Nc=function(a){return Tc(a,0)},Rc=Uc)}();var Vc=Lc.timeout=function(){function a(a,b){var c=this,d=new Hc,e=Nc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Cc(d,Fc(function(){Rc(e)}))}function b(a,b,c){var d=this,e=Lc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Hc,g=Tc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Cc(f,Fc(function(){Uc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Lc(Db,a,b,c)}(),Wc=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 vc(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 Gc}}},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 Hc;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}(Lc),Xc=zb.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 Bb(a)||(a=Pc),new _d(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Yc=Xc.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 Xc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Zc=Xc.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 Xc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),$c=Xc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Xc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),_c=zb.internals.Enumerator=function(a){this._next=a};_c.prototype.next=function(){return this._next()},_c.prototype[Sb]=function(){return this};var ad=zb.internals.Enumerable=function(a){this._iterator=a};ad.prototype[Sb]=function(){return this._iterator()},ad.prototype.concat=function(){var a=this;return new _d(function(b){var c,d=a[Sb](),e=new Ic,f=Pc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;Hb(h)&&(h=nd(h));var i=new Hc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Cc(e,f,Fc(function(){c=!0}))})},ad.prototype.catchError=function(){var a=this;return new _d(function(b){var c,d=a[Sb](),e=new Ic,f=Pc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;Hb(i)&&(i=nd(i));var j=new Hc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Cc(e,f,Fc(function(){c=!0}))})},ad.prototype.catchErrorWhen=function(a){var b=this;return new _d(function(c){var d,e,f=new ce,g=new ce,h=a(f),i=h.subscribe(g),j=b[Sb](),k=new Ic,l=Pc.scheduleRecursive(function(a){if(!d){try{var b=j.next() +}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;Hb(i)&&(i=nd(i));var l=new Hc,m=new Hc;k.setDisposable(new Cc(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Cc(i,k,l,Fc(function(){d=!0}))})};var bd=ad.repeat=function(a,b){return null==b&&(b=-1),new ad(function(){var c=b;return new _c(function(){return 0===c?Tb:(c>0&&c--,{done:!1,value:a})})})},cd=ad.of=function(a,b,c){if(b)var d=Xb(b,c,3);return new ad(function(){var c=-1;return new _c(function(){return++c0&&(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}(gd),kd=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return vc(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.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(jd),ld=zb.Observable=function(){function a(a){if(zb.config.longStackSupport&&Nb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){d(a,c),e(a)},a.call(c,b)}}else this._subscribe=a}return fd=a.prototype,fd.subscribe=fd.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:ed(a,b,c))},fd.subscribeOnNext=function(a,b){return this._subscribe(ed("undefined"!=typeof b?function(c){a.call(b,c)}:a))},fd.subscribeOnError=function(a,b){return this._subscribe(ed(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},fd.subscribeOnCompleted=function(a,b){return this._subscribe(ed(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),md=zb.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Fc(a):Gc}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new ae(a),d=[b,this];return Qc.scheduleRequired()?Qc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return vc(e,a),e.prototype.subscribeCore=function(){throw new Error("Not implemeneted")},e}(ld);fd.observeOn=function(a){var b=this;return new _d(function(c){return b.subscribe(new kd(a,c))},b)},fd.subscribeOn=function(a){var b=this;return new _d(function(c){var d=new Hc,e=new Ic;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new r(a,b.subscribe(c)))})),e},b)};var nd=ld.fromPromise=function(a){return od(function(){var b=new zb.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};fd.toPromise=function(a){if(a||(a=zb.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)})})},fd.toArray=function(){var a=this;return new _d(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},ld.create=ld.createWithDisposable=function(a,b){return new _d(a,b)};var od=ld.defer=function(a){return new _d(function(b){var c;try{c=a()}catch(d){return xd(d).subscribe(b)}return Hb(c)&&(c=nd(c)),c.subscribe(b)})},pd=ld.empty=function(a){return Bb(a)||(a=Pc),new _d(function(b){return a.schedule(function(){b.onCompleted()})})},qd=Math.pow(2,53)-1;u.prototype[Sb]=function(){return new v(this._s)},v.prototype[Sb]=function(){return this},v.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return C(null,a)},ld.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);return C(a,b)};var vd=ld.never=function(){return new _d(function(){return Gc})};ld.pairs=function(a,b){return b||(b=zb.Scheduler.currentThread),new _d(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},ld.range=function(a,b,c){return Bb(c)||(c=Qc),new _d(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},ld.repeat=function(a,b,c){return Bb(c)||(c=Qc),wd(a,c).repeat(null==b?-1:b)};var wd=ld["return"]=ld.just=function(a,b){return Bb(b)||(b=Pc),new _d(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};ld.returnValue=function(){return wd.apply(null,arguments)};var xd=ld["throw"]=ld.throwError=function(a,b){return Bb(b)||(b=Pc),new _d(function(c){return b.schedule(function(){c.onError(a)})})};ld.throwException=function(){return ld.throwError.apply(null,arguments)},ld.using=function(a,b){return new _d(function(c){var d,e,f=Gc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Cc(xd(g).subscribe(c),f)}return new Cc(e.subscribe(c),f)})},fd.amb=function(a){var b=this;return new _d(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Hc,j=new Hc;return Hb(a)&&(a=nd(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 Cc(i,j)})},ld.amb=function(){function a(a,b){return a.amb(b)}var b=vd(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},fd["catch"]=fd.catchError=function(a){return"function"==typeof a?D(this,a):yd([this,a])},fd.catchException=function(a){return this.catchError(a)};var yd=ld.catchError=ld["catch"]=ld.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return cd(a).catchError()};fd.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),zd.apply(this,a)};var zd=ld.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new _d(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every(Cb))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every(Cb)&&b.onCompleted()}function e(a){j[a]=!0,j.every(Cb)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new Hc;Hb(f)&&(f=nd(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new Cc(l)},this)};fd.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Ad.apply(null,a)};var Ad=ld.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return cd(a).concat()};fd.concatAll=fd.concatObservable=function(){return this.merge(1)},fd.merge=function(a){if("number"!=typeof a)return Bd(this,a);var b=this;return new _d(function(c){function d(a){var b=new Hc;f.add(b),Hb(a)&&(a=nd(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Cc,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Bd=ld.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Bb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Pc,b=0;d>b;b++)c.push(arguments[b]);else for(a=Pc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),C(a,c).mergeAll()};fd.mergeAll=function(){var a=this;return new _d(function(b){var c=new Cc,d=!1,e=new Hc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Hc;c.add(e),Hb(a)&&(a=nd(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},fd.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},fd.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return Cd([this,a])};var Cd=ld.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new _d(function(b){var c=0,d=new Ic,e=Pc.scheduleRecursive(function(e){var f,g;cb;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new _d(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new Hc;Hb(d)&&(d=nd(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(Cb)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new Hc;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new Cc(j)},this)},fd.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return E.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new _d(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every(Cb)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,G),i=p(g,F),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new Hc;Hb(e)&&(e=nd(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new Cc(j)},d)},ld.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},ld.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new _d(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(Cb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(Cb)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Hc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Cc(h)})},fd.asObservable=function(){var a=this;return new _d(function(b){return a.subscribe(b)},this)},fd.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})},fd.dematerialize=function(){var a=this;return new _d(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},fd.distinctUntilChanged=function(a,b){var c=this;return b||(b=Eb),new _d(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},fd["do"]=fd.tap=fd.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?ed(a||Ab,b||Ab,c||Ab):a;return new _d(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},fd.doOnNext=fd.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},fd.doOnError=fd.tapOnError=function(a,b){return this.tap(Ab,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},fd.doOnCompleted=fd.tapOnCompleted=function(a,b){return this.tap(Ab,null,"undefined"!=typeof b?function(){a.call(b)}:a)},fd["finally"]=fd.ensure=function(a){var b=this;return new _d(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Fc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},fd.finallyAction=function(a){return this.ensure(a)},fd.ignoreElements=function(){var a=this;return new _d(function(b){return a.subscribe(Ab,function(a){b.onError(a)},function(){b.onCompleted()})},a)},fd.materialize=function(){var a=this;return new _d(function(b){return a.subscribe(function(a){b.onNext(Yc(a))},function(a){b.onNext(Zc(a)),b.onCompleted()},function(){b.onNext($c()),b.onCompleted()})},a)},fd.repeat=function(a){return bd(this,a).concat()},fd.retry=function(a){return bd(this,a).catchError()},fd.retryWhen=function(a){return bd(this).catchErrorWhen(a)},fd.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 _d(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},fd.skipLast=function(a){var b=this;return new _d(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},fd.startWith=function(){var a,b=0;arguments.length&&Bb(arguments[0])?(a=arguments[0],b=1):a=Pc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return cd([ud(c,a),this]).concat()},fd.takeLast=function(a){var b=this;return new _d(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},fd.takeLastBuffer=function(a){var b=this;return new _d(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},fd.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(Lb);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(Lb);return new _d(function(d){function e(){var a=new ce;i.push(a),d.onNext(xc(a,g))}var f=new Hc,g=new Jc(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},c)},fd.selectConcat=fd.concatMap=function(a,b,c){return Jb(a)&&Jb(b)?this.concatMap(function(c,d){var e=a(c,d);return Hb(e)&&(e=nd(e)),(Vb(e)||Ub(e))&&(e=rd(e)),e.map(function(a,e){return b(c,a,d,e)})}):Jb(a)?H(this,a,c):H(this,function(){return a})},fd.concatMapObserver=fd.selectConcatObserver=function(a,b,c,d){var e=this,f=Xb(a,d,2),g=Xb(b,d,1),h=Xb(c,d,0);return new _d(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}Hb(d)&&(d=nd(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}Hb(c)&&(c=nd(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}Hb(b)&&(b=nd(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},fd.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new _d(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},J.prototype.push=function(a){var b=-1===I(this.set,a,this.comparer);return b&&this.set.push(a),b},fd.distinct=function(a,b){var c=this;return b||(b=Eb),new _d(function(d){var e=new J(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)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},fd.groupBy=function(a,b,c){return this.groupByUntil(a,b,vd,c)},fd.groupByUntil=function(a,b,c,d){var e=this;return b||(b=Cb),d||(d=Eb),new _d(function(f){function g(a){return function(b){b.onError(a)}}var h=new Ud(0,d),i=new Cc,j=new Jc(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 ce,h.set(e,m),l=!0),l){var n=new be(e,m,j),o=new be(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new Hc;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(Ab,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},e)};var Dd=function(a){function b(b,c,d){this.source=b,this.selector=Xb(c,d,3),a.call(this)}return vc(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new K(a,this.selector,this))},b}(md);K.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)}},K.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},K.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},K.prototype.dispose=function(){this.isStopped=!0},K.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},fd.map=fd.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Dd?this.internalMap(a,b):new Dd(this,c,b)},fd.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},fd.selectMany=fd.flatMap=function(a,b,c){return Jb(a)&&Jb(b)?this.flatMap(function(c,d){var e=a(c,d);return Hb(e)&&(e=nd(e)),(Vb(e)||Ub(e))&&(e=rd(e)),e.map(function(a,e){return b(c,a,d,e)})},c):Jb(a)?L(this,a,c):L(this,function(){return a})},fd.flatMapObserver=fd.selectManyObserver=function(a,b,c,d){var e=this;return new _d(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)}Hb(c)&&(c=nd(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}Hb(c)&&(c=nd(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}Hb(a)&&(a=nd(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},fd.selectSwitch=fd.flatMapLatest=fd.switchMap=function(a,b){return this.select(a,b).switchLatest()},fd.skip=function(a){if(0>a)throw new Error(Lb);var b=this;return new _d(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},fd.skipWhile=function(a,b){var c=this,d=Xb(a,b,3);return new _d(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},fd.take=function(a,b){if(0>a)throw new RangeError(Lb);if(0===a)return pd(b);var c=this;return new _d(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},fd.takeWhile=function(a,b){var c=this,d=Xb(a,b,3);return new _d(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Ed=function(a){function b(b,c,d){this.source=b,this.predicate=Xb(c,d,3),a.call(this)}return vc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new M(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(md);M.prototype.onNext=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},M.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},M.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},M.prototype.dispose=function(){this.isStopped=!0},M.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},fd.filter=fd.where=function(a,b){return this instanceof Ed?this.internalFilter(a,b):new Ed(this,a,b)},fd.aggregate=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,b=arguments[0],a=arguments[1]):a=arguments[0],new _d(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return void e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Error(Kb)),e.onCompleted()})},d)},fd.reduce=function(a){var b,c=!1,d=this;return 2===arguments.length&&(c=!0,b=arguments[1]),new _d(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return void e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Error(Kb)),e.onCompleted()})},d)},fd.some=function(a,b){var c=this;return a?c.filter(a,b).some():new _d(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},function(b){a.onError(b)},function(){a.onNext(!1),a.onCompleted()})},c)},fd.any=function(){return this.some.apply(this,arguments)},fd.isEmpty=function(){return this.any().map(Ib)},fd.every=function(a,b){return this.filter(function(b){return!a(b)},b).some().map(Ib)},fd.all=function(){return this.every.apply(this,arguments)},fd.includes=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new _d(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),Gc):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},function(a){e.onError(a)},function(){e.onNext(!1),e.onCompleted()})},this)},fd.contains=function(a,b){fd.includes(a,b)},fd.count=function(a,b){return a?this.filter(a,b).count():this.reduce(function(a){return a+1},0)},fd.indexOf=function(a,b){var c=this;return new _d(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),Gc):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},function(a){d.onError(a)},function(){d.onNext(-1),d.onCompleted()})},c)},fd.sum=function(a,b){return a&&Jb(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},fd.minBy=function(a,b){return b||(b=Fb),N(this,a,function(a,c){return-1*b(a,c)})},fd.min=function(a){return this.minBy(Cb,a).map(function(a){return O(a)})},fd.maxBy=function(a,b){return b||(b=Fb),N(this,a,b)},fd.max=function(a){return this.maxBy(Cb,a).map(function(a){return O(a)})},fd.average=function(a,b){return a&&Jb(a)?this.map(a,b).average():this.reduce(function(a,b){return{sum:a.sum+b,count:a.count+1}},{sum:0,count:0}).map(function(a){if(0===a.count)throw new Error(Kb);return a.sum/a.count})},fd.sequenceEqual=function(a,b){var c=this;return b||(b=Eb),new _d(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)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(Vb(a)||Ub(a))&&(a=rd(a)),Hb(a)&&(a=nd(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)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new Cc(i,j)},c)},fd.elementAt=function(a){return P(this,a,!1)},fd.elementAtOrDefault=function(a,b){return P(this,a,!0,b)},fd.single=function(a,b){return a&&Jb(a)?this.where(a,b).single():Q(this,!1)},fd.singleOrDefault=function(a,b,c){return a&&Jb(a)?this.filter(a,c).singleOrDefault(null,b):Q(this,!0,b)},fd.first=function(a,b){return a?this.where(a,b).first():R(this,!1)},fd.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):R(this,!0,b)},fd.last=function(a,b){return a?this.where(a,b).last():S(this,!1)},fd.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):S(this,!0,b)},fd.find=function(a,b){return T(this,a,b,!1)},fd.findIndex=function(a,b){return T(this,a,b,!0)},fd.toSet=function(){if("undefined"==typeof ub.Set)throw new TypeError;var a=this;return new _d(function(b){var c=new ub.Set;return a.subscribe(function(a){c.add(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},fd.toMap=function(a,b){if("undefined"==typeof ub.Map)throw new TypeError;var c=this;return new _d(function(d){var e=new ub.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)},function(a){d.onError(a)},function(){d.onNext(e),d.onCompleted()})},c)};var Fd="function",Gd="throw",rc=zb.internals.isObject,Hd=zb.spawn=function(a){var b=Z(a);return function(c){function d(a,b){Vc.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2)for(var b=[],h=1,i=arguments.length;i>h;h++)b.push(arguments[h]);if(a)try{c=g[Gd](a)}catch(j){return d(j)}if(!a)try{c=g.next(b)}catch(j){return d(j)}if(c.done)return d(null,c.value);if(c.value=U(c.value,f),typeof c.value!==Fd)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var k=!1;try{c.value.call(f,function(){k||(k=!0,e.apply(f,arguments))})}catch(j){Vc.schedule(function(){k||(k=!0,e.call(f,j))})}}}var f=this,g=a;if(b){for(var h=[],i=0,j=arguments.length;j>i;i++)h.push(arguments[i]);var j=h.length,k=j&&typeof h[j-1]===Fd;c=k?h.pop():_,g=a.apply(this,h)}else c=c||_;e()}};ld.start=function(a,b,c){return Id(a,b,c)()};var Id=ld.toAsync=function(a,b,c){return Bb(c)||(c=Vc),function(){var d=arguments,e=new de;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()}};ld.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new _d(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},ld.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new _d(function(e){function f(a){if(a)return void e.onError(a);for(var b=[],d=1,f=arguments.length;f>d;d++)b.push(arguments[d]);if(c){try{b=c(b)}catch(g){return e.onError(g)}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()}},zb.config.useNativeEvents=!1,ld.fromEvent=function(a,b,c){if(a.addListener)return Jd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!zb.config.useNativeEvents){if("function"==typeof a.on&&"function"==typeof a.off)return Jd(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(ub.Ember&&"function"==typeof ub.Ember.addListener)return Jd(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c)}return new _d(function(d){return cb(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 Jd=ld.fromEventPattern=function(a,b,c){return new _d(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 Fc(function(){b&&b(e,f)})}).publish().refCount()};ld.startAsync=function(a){var b;try{b=a()}catch(c){return xd(c)}return nd(b)};var Kd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Gc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Gc)});return new Cc(c,d,e)}function c(c,d){this.source=c,this.controller=new ce,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return vc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(ld);fd.pausable=function(a){return new Kd(this,a)};var Ld=function(b){function c(b){var c,d=[],e=db(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 ce,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return vc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(ld);fd.pausableBuffered=function(a){return new Ld(this,a)};var Md=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new Nd(d),this.source=c.multicast(this.subject).refCount()}return vc(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(ld),Nd=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new ce,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=Gc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=Gc}return vc(c,a),wc(c.prototype,dd,{onCompleted:function(){this.hasCompleted=!0,(!this.enableQueue||0===this.queue.length)&&this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,(!this.enableQueue||0===this.queue.length)&&this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=Gc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=Gc),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?Gc:(this.requestedCount=a,this.requestedDisposable=Fc(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Gc}}),c}(ld);fd.controlled=function(a){return null==a&&(a=!0),new Md(this,a)};var Od=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return Vc.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}vc(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}vc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;Vc.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(gd);return c}(ld);Md.prototype.stopAndWait=function(){return new Od(this)};var Pd=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return Vc.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}vc(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}vc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;Vc.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(gd);return c}(ld);Md.prototype.windowed=function(a){return new Pd(this,a)},fd.multicast=function(a,b){var c=this;return"function"==typeof a?new _d(function(d){var e=c.multicast(a());return new Cc(b(e).subscribe(d),e.connect())},c):new Td(c,a)},fd.publish=function(a){return a&&Jb(a)?this.multicast(function(){return new ce},a):this.multicast(new ce)},fd.share=function(){return this.publish().refCount()},fd.publishLast=function(a){return a&&Jb(a)?this.multicast(function(){return new de},a):this.multicast(new de)},fd.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Rd(b)},a):this.multicast(new Rd(a))},fd.shareValue=function(a){return this.publishValue(a).refCount()},fd.replay=function(a,b,c,d){return a&&Jb(a)?this.multicast(function(){return new Sd(b,c,d)},a):this.multicast(new Sd(b,c,d))},fd.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var Qd=function(a,b){this.subject=a,this.observer=b};Qd.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 Rd=zb.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),Gc):(this.observers.push(a),a.onNext(this.value),new Qd(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return vc(e,a),wc(e.prototype,dd,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped){this.value=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),e}(ld),Sd=zb.ReplaySubject=function(a){function d(a,b){return Fc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new jd(this.scheduler,a),e=d(this,c);b(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function f(b,c,d){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=d||Qc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return vc(f,a),wc(f.prototype,dd.prototype,{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(this),!this.isStopped){var d=this.scheduler.now();this.q.push({interval:d,value:a}),this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onNext(a),h.ensureActive()}}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var d=this.scheduler.now();this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onError(a),h.ensureActive()}this.observers.length=0}},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onCompleted(),g.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),f}(ld),Td=zb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Cc(f.subscribe(c),Fc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return vc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new _d(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(ld),Ud=function(){function b(a){if(0===(1&a))return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function 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||Eb,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 c)return d(c)}if(b.hashCode)return b.hashCode();var f=17*a++;return b.hashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var 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){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}();fd.join=function(a,b,c,d){var e=this;return new _d(function(f){var g=new Cc,h=!1,i=!1,j=0,k=0,l=new Ud,m=new Ud;return g.add(e.subscribe(function(a){var c=j++,e=new Hc;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(Ab,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 Hc;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(Ab,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},e)},fd.groupJoin=function(a,b,c,d){var e=this;return new _d(function(f){function g(a){return function(b){b.onError(a)}}var h=new Cc,i=new Jc(h),j=new Ud,k=new Ud,l=0,m=0;return h.add(e.subscribe(function(a){var c=new ce,e=l++;j.add(e,c);var m;try{m=d(a,xc(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 Hc;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(Ab,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 Hc;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(Ab,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},e)},fd.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},fd.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?fb.call(this,a):"function"==typeof a?gb.call(this,a):eb.call(this,a,b)},fd.pairwise=function(){var a=this;return new _d(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))},a)},fd.partition=function(a,b){return[this.filter(a,b),this.filter(function(c,d,e){return!a.call(b,c,d,e)})]},fd.letBind=fd.let=function(a){return a(this)},ld["if"]=ld.ifThen=function(a,b,c){return od(function(){return c||(c=pd()),Hb(b)&&(b=nd(b)),Hb(c)&&(c=nd(c)),"function"==typeof c.now&&(c=pd(c)),a()?b:c})},ld["for"]=ld.forIn=function(a,b,c){return cd(a,b,c).concat()};var Vd=ld["while"]=ld.whileDo=function(a,b){return Hb(b)&&(b=nd(b)),hb(a,b).concat()};fd.doWhile=function(a){return Ad([this,Vd(a,this)])},ld["case"]=ld.switchCase=function(a,b,c){return od(function(){Hb(c)&&(c=nd(c)),c||(c=pd()),"function"==typeof c.now&&(c=pd(c));var d=b[a()];return Hb(d)&&(d=nd(d)),d||c})},fd.expand=function(a,b){Bb(b)||(b=Pc);var c=this;return new _d(function(d){var e=[],f=new Ic,g=new Cc(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 Hc;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},this)},ld.forkJoin=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new _d(function(b){var c=a.length;if(0===c)return b.onCompleted(),Gc;for(var d=new Cc,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];Hb(j)&&(j=nd(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})},fd.forkJoin=function(a,b){var c=this;return new _d(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new Hc,l=new Hc;return Hb(a)&&(a=nd(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 Cc(k,l)},c)},fd.manySelect=function(a,b){Bb(b)||(b=Pc);var c=this;return od(function(){var d;return c.map(function(a){var b=new Wd(a);return d&&d.onNext(a),d=b,b}).tap(Ab,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var Wd=function(a){function b(a){var b=this,c=new Cc;return c.add(Qc.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 de}return vc(c,a),wc(c.prototype,dd,{onCompleted:function(){this.onNext(ld.empty())},onError:function(a){this.onNext(ld.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(ld),Xd=ub.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}();ib.prototype.and=function(a){return new ib(this.patterns.concat(a))},ib.prototype.thenDo=function(a){return new jb(this,a)},jb.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(kb(a,this.expression.patterns[f],b.onError.bind(b)));var h=new lb(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},lb.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},lb.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=Ab,c.completed=Ab,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}(gd);fd.and=function(a){return new ib([this,a])},fd.thenDo=function(a){return new ib([this]).thenDo(a)},ld.when=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new _d(function(b){var c=[],d=new Xd,e=ed(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){xd(h).subscribe(b)}var i=new Cc;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var Zd=ld.interval=function(a,b){return pb(a,a,Bb(b)?b:Vc)},$d=ld.timer=function(b,c,d){var e;return Bb(d)||(d=Vc),c!==a&&"number"==typeof c?e=c:Bb(c)&&(d=c),b instanceof Date&&e===a?mb(b.getTime(),d):b instanceof Date&&e!==a?(e=c,nb(b.getTime(),e,d)):e===a?ob(b,d):pb(b,e,d)};fd.delay=function(a,b){return Bb(b)||(b=Vc),a instanceof Date?rb(this,a.getTime(),b):qb(this,a,b)},fd.debounce=fd.throttleWithTimeout=function(a,b){Bb(b)||(b=Vc);var c=this;return new _d(function(d){var e,f=new Ic,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Hc;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 Cc(i,f)},this)},fd.throttle=function(a,b){return this.debounce(a,b)},fd.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),Bb(c)||(c=Vc),"number"==typeof b?d=b:Bb(b)&&(d=a,c=b),new _d(function(b){function f(){var a=new Hc,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 ce;k.push(a),b.onNext(xc(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new Ic,m=0;return g=new Cc(l),h=new Jc(g),k.push(new ce),b.onNext(xc(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},e)},fd.windowWithTimeOrCount=function(a,b,c){var d=this;return Bb(c)||(c=Vc),new _d(function(e){function f(b){var d=new Hc;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new ce,e.onNext(xc(l,i)),f(a)}}))}var g=new Ic,h=new Cc(g),i=new Jc(h),j=0,k=0,l=new ce;return e.onNext(xc(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 ce,e.onNext(xc(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},fd.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},fd.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},fd.timeInterval=function(a){var b=this;return Bb(a)||(a=Vc),od(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},fd.timestamp=function(a){return Bb(a)||(a=Vc),this.map(function(b){return{value:b,timestamp:a.now()}})},fd.sample=fd.throttleLatest=function(a,b){return Bb(b)||(b=Vc),"number"==typeof a?sb(this,Zd(a,b)):sb(this,a)},fd.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=xd(new Error(b||"Timeout"))),Bb(c)||(c=Vc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new _d(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(Hb(b)&&(b=nd(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Hc,j=new Ic,k=!1,l=new Ic;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 Cc(j,l)},d)},ld.generateWithAbsoluteTime=function(a,b,c,d,e,f){return Bb(f)||(f=Vc),new _d(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()})})},ld.generateWithRelativeTime=function(a,b,c,d,e,f){return Bb(f)||(f=Vc),new _d(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()})})},fd.delaySubscription=function(a,b){return this.delayWithSelector($d(a,Bb(b)?b:Vc),pd)},fd.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new _d(function(a){var b=new Cc,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new Ic,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new Hc;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(i,a.onError.bind(a),i)):i(),new Cc(h,b)},this)},fd.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=vd()),c||(c=xd(new Error("Timeout")));var d=this;return new _d(function(e){function f(a){function b(){return k===d}var d=k,f=new Hc;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 Ic,i=new Ic,j=new Hc;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(Hb(c)?nd(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new Cc(h,i)},d)},fd.debounceWithSelector=function(a){var b=this;return new _d(function(c){var d,e=!1,f=new Ic,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}Hb(h)&&(h=nd(h)),e=!0,d=b,g++;var j=g,k=new Hc;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 Cc(h,f)},b)},fd.throttleWithSelector=function(){return this.debounceWithSelector.apply(this,arguments)},fd.skipLastWithTime=function(a,b){Bb(b)||(b=Vc);var c=this;return new _d(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)},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})},c)},fd.takeLastWithTime=function(a,b){var c=this;return Bb(b)||(b=Vc),new _d(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()},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})},c)},fd.takeLastBufferWithTime=function(a,b){var c=this;return Bb(b)||(b=Vc),new _d(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()},function(a){d.onError(a)},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()})},c)},fd.takeWithTime=function(a,b){var c=this;return Bb(b)||(b=Vc),new _d(function(d){return new Cc(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},fd.skipWithTime=function(a,b){var c=this;return Bb(b)||(b=Vc),new _d(function(d){var e=!1;return new Cc(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d))) +},c)},fd.skipUntilWithTime=function(a,b){Bb(b)||(b=Vc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new _d(function(e){var f=!1;return new Cc(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},fd.takeUntilWithTime=function(a,b){Bb(b)||(b=Vc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new _d(function(e){return new Cc(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},fd.throttleFirst=function(a,b){Bb(b)||(b=Vc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new _d(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)},fd.exclusive=function(){var a=this;return new _d(function(b){var c=!1,d=!1,e=new Hc,f=new Cc;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,Hb(a)&&(a=nd(a));var e=new Hc;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},this)},fd.exclusiveMap=function(a,b){var c=this,d=Xb(a,b,3);return new _d(function(a){var b=0,e=!1,f=!0,g=new Hc,h=new Cc;return h.add(g),g.setDisposable(c.subscribe(function(c){e||(e=!0,innerSubscription=new Hc,h.add(innerSubscription),Hb(c)&&(c=nd(c)),innerSubscription.setDisposable(c.subscribe(function(e){var f;try{f=d(e,b++,c)}catch(g){return void a.onError(g)}a.onNext(f)},function(b){a.onError(b)},function(){h.remove(innerSubscription),e=!1,f&&1===h.length&&a.onCompleted()})))},function(b){a.onError(b)},function(){f=!0,1!==h.length||e||a.onCompleted()})),h},this)},fd.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 _d(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)})},c)},zb.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(),Gc}function h(b,g){this.clock=b,this.comparer=g,this.isEnabled=!1,this.queue=new Ac(1024),a.call(this,c,d,e,f)}vc(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 Oc(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(Lb);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(Lb);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(Lb);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 Kc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},h}(Lc),zb.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||Fb;a.call(this,d,e)}vc(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}(zb.VirtualTimeScheduler);var _d=zb.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Fc(a):Gc}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new ae(a),e=[d,b];return Qc.scheduleRequired()?Qc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return vc(d,a),d}(ld),ae=function(a){function b(b){a.call(this),this.observer=b,this.m=new Hc}vc(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(gd),be=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 _d(function(a){return new Cc(e.getDisposable(),d.subscribe(a))}):d}return vc(c,a),c}(ld),ce=zb.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),Gc):(a.onCompleted(),Gc):(this.observers.push(a),new Qd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return vc(e,a),wc(e.prototype,dd.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new ee(a,b)},e}(ld),de=zb.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Gc):(this.observers.push(a),new Qd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return vc(e,a),wc(e.prototype,dd,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(ld),ee=zb.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return vc(c,a),wc(c.prototype,dd.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(ld);zb.Pauser=function(a){function b(){a.call(this)}return vc(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(ce),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ub.Rx=zb,define(function(){return zb})):vb&&wb?xb?(wb.exports=zb).Rx=zb:vb.Rx=zb:ub.Rx=zb;var fe=h()}).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 4a5c75083..cfcfebc11 100644 --- a/dist/rx.all.js +++ b/dist/rx.all.js @@ -2197,6 +2197,10 @@ __super__.call(this, subscribe); } + ObservableBase.prototype.subscribeCore = function(observer) { + throw new Error('Not implemeneted'); + } + return ObservableBase; }(Observable)); @@ -2627,6 +2631,52 @@ return observableOf(scheduler, args); }; + /** + * Creates an Observable sequence from changes to an array using Array.observe. + * @param {Array} array An array to observe changes. + * @returns {Observable} An observable sequence containing changes to an array from Array.observe. + */ + Observable.ofArrayChanges = function(array) { + if (!Array.isArray(array)) { throw new TypeError('Array.observe only accepts arrays.'); } + if (typeof Array.observe !== 'function' && typeof Array.unobserve !== 'function') { throw new TypeError('Array.observe is not supported on your platform') } + return new AnonymousObservable(function(observer) { + function observerFn(changes) { + for(var i = 0, len = changes.length; i < len; i++) { + observer.onNext(changes[i]); + } + } + + Array.observe(array, observerFn); + + return function () { + Array.unobserve(array, observerFn); + }; + }); + }; + + /** + * Creates an Observable sequence from changes to an object using Object.observe. + * @param {Object} obj An object to observe changes. + * @returns {Observable} An observable sequence containing changes to an object from Object.observe. + */ + Observable.ofObjectChanges = function(obj) { + if (obj == null) { throw new TypeError('object must not be null or undefined.'); } + if (typeof Object.observe !== 'function' && typeof Object.unobserve !== 'function') { throw new TypeError('Array.observe is not supported on your platform') } + return new AnonymousObservable(function(observer) { + function observerFn(changes) { + for(var i = 0, len = changes.length; i < len; i++) { + observer.onNext(changes[i]); + } + } + + Object.observe(obj, observerFn); + + return function () { + Object.unobserve(obj, observerFn); + }; + }); + }; + /** * Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins). * @returns {Observable} An observable sequence whose observers will never get called. @@ -4242,36 +4292,39 @@ }(ObservableBase)); - var MapObserver = (function (__super__) { - inherits(MapObserver, __super__); + function MapObserver(observer, selector, source) { + this.observer = observer; + this.selector = selector; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function MapObserver(observer, selector, source) { - this.observer = observer; - this.selector = selector; - this.source = source; - this.index = 0; - __super__.call(this); + MapObserver.prototype.onNext = function(x) { + if (this.isStopped) { return; } + try { + var result = this.selector(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } - - MapObserver.prototype.next = function(x) { - try { - var result = this.selector(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - this.observer.onNext(result); - }; - - MapObserver.prototype.error = function (e) { + this.observer.onNext(result); + }; + MapObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + MapObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + MapObserver.prototype.dispose = function() { this.isStopped = true; }; + MapObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; - - MapObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; + return true; + } - return MapObserver; - }(AbstractObserver)); + return false; + }; /** * Projects each element of an observable sequence into a new form by incorporating the element's index. @@ -4287,12 +4340,26 @@ }; /** - * Retrieves the value of a specified property from all elements in the Observable sequence. - * @param {String} prop The property to pluck. + * Retrieves the value of a specified nested property from all elements in + * the Observable sequence. + * @param {Arguments} arguments The nested properties to pluck. * @returns {Observable} Returns a new Observable sequence of property values. */ - observableProto.pluck = function (prop) { - return this.map(function (x) { return x[prop]; }); + observableProto.pluck = function () { + var args = arguments, len = arguments.length; + if (len === 0) { throw new Error('List of properties cannot be empty.'); } + return this.map(function (x) { + var currentProp = x; + for (var i = 0; i < len; i++) { + var p = currentProp[args[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } else { + return undefined; + } + } + return currentProp; + }); }; function flatMap(source, selector, thisArg) { @@ -4530,36 +4597,41 @@ }(ObservableBase)); - var FilterObserver = (function (__super__) { - inherits(FilterObserver, __super__); + function FilterObserver(observer, predicate, source) { + this.observer = observer; + this.predicate = predicate; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function FilterObserver(observer, predicate, source) { - this.observer = observer; - this.predicate = predicate; - this.source = source; - this.index = 0; - __super__.call(this); + FilterObserver.prototype.onNext = function(x) { + try { + var shouldYield = this.predicate(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } + shouldYield && this.observer.onNext(x); + }; - FilterObserver.prototype.next = function(x) { - try { - var shouldYield = this.predicate(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - shouldYield && this.observer.onNext(x); - }; - - FilterObserver.prototype.error = function (e) { + FilterObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + FilterObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + FilterObserver.prototype.dispose = function() { this.isStopped = true; }; + FilterObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; + return true; + } + + return false; + }; - FilterObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; - return FilterObserver; - }(AbstractObserver)); /** * Filters the elements of an observable sequence based on a predicate by incorporating the element's index. diff --git a/dist/rx.all.map b/dist/rx.all.map index 4216800de..a4253bb19 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","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","ScheduledDisposable","scheduler","disposable","scheduleItem","s","dispose","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","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","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","v","promise","then","name","next","throwString","handleError","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","observableWindowWithBoundaries","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","scheduleRecursiveWithAbsoluteAndState","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","idx","ln","prop","xs","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","CompositeDisposablePrototype","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","event","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","notifier","handled","notificationDisposable","outer","inner","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","isStopped","completed","fail","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","cancel","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","createWithDisposable","defer","observableFactory","observableThrow","pow","val","charAt","from","iterable","mapFn","mapper","FromArrayObservable","sink","FromArraySink","loopRecursive","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","observableNever","never","pairs","range","observableReturn","returnValue","throwError","throwException","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","filter","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","MapObservable","internalMap","MapObserver","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","FilterObservable","FilterObserver","internalFilter","shouldYield","aggregate","reduce","some","any","isEmpty","all","includes","searchElement","fromIndex","contains","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","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","Ember","publish","addHandler","removeHandler","innerHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","controlled","StopAndWaitObservable","StopAndWaitObserver","__sub__","stopAndWaitObserverProto","stopAndWait","WindowedObservable","WindowedObserver","windowSize","received","windowedObserverPrototype","windowed","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasError","hasObservers","os","createRemovableDisposable","so","_trim","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","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","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","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAMC,IACtE,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAAQC,EAAI,EAAGC,EAAMH,EAAII,OAAYD,EAAJD,EAASA,IAAOD,EAAEI,KAAKL,EAAIE,GAAO,OAAOD,GAe7G,QAASK,GAAmBC,EAAOC,GAG/B,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ,EAAOK,KAAK,KAAON,GAAuB,KAC/DL,GAAMG,MAAQS,EAAkBF,IAItC,QAASE,GAAkBC,GAGzB,IAAK,GAFDC,GAAQD,EAAYE,MAAM,MAC1BC,KACKrB,EAAI,EAAGC,EAAMkB,EAAMjB,OAAYD,EAAJD,EAASA,IAAK,CAChD,GAAIsB,GAAOH,EAAMnB,EAEZuB,GAAgBD,IAAUE,EAAYF,KAASA,GAClDD,EAAalB,KAAKmB,GAGtB,MAAOD,GAAaL,KAAK,MAG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B,EAAiBtiC,UAAWogB,GAASpgB,WACjDqF,YAAa,WACXtC,KAAKmC,SAASG,eAEhBa,QAAS,SAAU3J,GACjBwG,KAAKmC,SAASgB,QAAQ3J,IAExB6I,OAAQ,SAAUpE,GAChB+B,KAAKmC,SAASE,OAAOpE,MAIlBshC,GACPlgB,GAKFzQ,IAAG4wB,OAAU,SAAU5kB,GAGrB,QAAS4kB,KACP5kB,EAAUxe,KAAK4D,MAajB,MAhBAmR,IAASquB,EAAQ5kB,GASjB4kB,EAAOviC,UAAUgyB,MAAQ,WAAcjvB,KAAKqC,QAAO,IAKnDm9B,EAAOviC,UAAUiyB,OAAS,WAAclvB,KAAKqC,QAAO,IAE7Cm9B,GACPz1B,IAEmB,kBAAV01B,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzEz+B,GAAK2N,GAAKA,GAEV6wB,OAAO,WACL,MAAO7wB,OAEAR,IAAeG,GAEpBE,IACDF,GAAWF,QAAUO,IAAIA,GAAKA,GAE/BR,GAAYQ,GAAKA,GAInB3N,GAAK2N,GAAKA,EAIZ,IAAIzT,IAAcC,MAElBgB,KAAK4D"} \ No newline at end of file +{"version":3,"file":"rx.all.min.js","sources":["rx.all.js"],"names":["undefined","checkDisposed","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","ScheduledDisposable","scheduler","disposable","scheduleItem","s","dispose","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","MapObserver","isStopped","flatMap","mergeAll","FilterObserver","predicate","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","sequenceContainsNoElements","elementAtOrDefault","hasDefault","defaultValue","argumentOutOfRange","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","yieldIndex","shouldRun","toThunk","obj","ctx","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","v","promise","then","name","next","throwString","handleError","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","observableWindowWithBoundaries","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","scheduleRecursiveWithAbsoluteAndState","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","idx","ln","prop","xs","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","CompositeDisposablePrototype","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","event","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","notifier","handled","notificationDisposable","outer","inner","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","completed","fail","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","cancel","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","createWithDisposable","defer","observableFactory","observableThrow","pow","val","charAt","from","iterable","mapFn","mapper","FromArrayObservable","sink","FromArraySink","loopRecursive","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","ofArrayChanges","observe","unobserve","observerFn","changes","ofObjectChanges","observableNever","never","pairs","range","observableReturn","returnValue","throwError","throwException","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","filter","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","MapObservable","internalMap","select","currentProp","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","FilterObservable","internalFilter","shouldYield","aggregate","reduce","some","any","isEmpty","all","includes","searchElement","fromIndex","contains","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","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","Ember","publish","addHandler","removeHandler","innerHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","controlled","StopAndWaitObservable","StopAndWaitObserver","__sub__","stopAndWaitObserverProto","stopAndWait","WindowedObservable","WindowedObserver","windowSize","received","windowedObserverPrototype","windowed","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasError","hasObservers","os","createRemovableDisposable","so","_trim","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","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","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","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAMC,IACtE,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAAQC,EAAI,EAAGC,EAAMH,EAAII,OAAYD,EAAJD,EAASA,IAAOD,EAAEI,KAAKL,EAAIE,GAAO,OAAOD,GAe7G,QAASK,GAAmBC,EAAOC,GAG/B,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,E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AE7C09B,GACP71B,IAEmB,kBAAV81B,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzEh/B,GAAK8N,GAAKA,GAEVixB,OAAO,WACL,MAAOjxB,OAEAR,IAAeG,GAEpBE,IACDF,GAAWF,QAAUO,IAAIA,GAAKA,GAE/BR,GAAYQ,GAAKA,GAInB9N,GAAK8N,GAAKA,EAIZ,IAAI5T,IAAcC,MAElBgB,KAAK4D"} \ No newline at end of file diff --git a/dist/rx.all.min.js b/dist/rx.all.min.js index a97d41ff5..651d04bfa 100644 --- a/dist/rx.all.min.js +++ b/dist/rx.all.min.js @@ -1,6 +1,6 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ -(function(a){function b(a){if(a.isDisposed)throw new Error(Jb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(Kb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Ob)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+Ob+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===Mb&&d>=Nb&&ce>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(Kb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return Mb=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!oc(a))return b;nc.nonEnumArgs&&a.length&&pc(a)&&(a=rc.call(a));var c=nc.enumPrototypes&&"function"==typeof a,d=nc.enumErrorProps&&(a===ic||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(nc.nonEnumShadows&&a!==jc){var f=a.constructor,g=-1,h=Wb;if(a===(f&&f.prototype))var i=a===kc?ec:a===ic?_b:fc.call(a),j=mc[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function t(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function u(){this._s=s}function v(){this._s=s,this._l=s.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&rb.isFinite(a)}function z(b){var c,d=b[Pb];if(!d&&"string"==typeof b)return c=new u(b),c[Pb]();if(!d&&b.length!==a)return c=new w(b),c[Pb]();if(!d)throw new TypeError("Object is not iterable");return b[Pb]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>ld?ld:b):b}function C(a,b){return yb(a)||(a=Lc),new Yd(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function D(a,b){return new Yd(function(c){var d=new Cc,e=new Dc;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)}Eb(f)&&(f=id(f)),d=new Cc,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function E(a,b){var c=this;return new Yd(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function F(){return!1}function G(){return[]}function H(a,b,c){var d=Ub(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Eb(e)&&(e=id(e)),(Sb(e)||Rb(e))&&(e=md(e)),e}).concatAll()}function I(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function J(a){this.comparer=a,this.set=[]}function K(a,b,c){var d=Ub(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Eb(e)&&(e=id(e)),(Sb(e)||Rb(e))&&(e=md(e)),e}).mergeAll()}function L(a,b,c){return new Yd(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)},function(a){d.onError(a)},function(){d.onNext(g),d.onCompleted()})},a)}function M(a){if(0===a.length)throw new Error(Hb);return a[0]}function N(a,b,c,d){if(0>b)throw new Error(Ib);return new Yd(function(e){var f=b;return a.subscribe(function(a){0===f--&&(e.onNext(a),e.onCompleted())},function(a){e.onError(a)},function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(Ib))})},a)}function O(a,b,c){return new Yd(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)},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Hb))})},a)}function P(a,b,c){return new Yd(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},function(a){d.onError(a)},function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(Hb))})},a)}function Q(a,b,c){return new Yd(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Hb))})},a)}function R(b,c,d,e){var f=Ub(c,d,3);return new Yd(function(c){var d=0;return b.subscribe(function(a){var g;try{g=f(a,d,b)}catch(h){return void c.onError(h)}g?(c.onNext(e?d:a),c.onCompleted()):d++},function(a){c.onError(a)},function(){c.onNext(e?-1:a),c.onCompleted()})},b)}function S(a,b){return Array.isArray(a)?T.call(b,a):X(a)?Ed(a.call(b)):Y(a)?Ed(a):W(a)?U(a):Eb(a)?V(a):typeof a===Cd?a:oc(a)||Array.isArray(a)?T.call(b,a):a}function T(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=S(a,b),typeof a!==Cd)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 Qc.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function U(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function V(a){return function(b){a.then(function(a){b(null,a)},b)}}function W(a){return a&&typeof a.subscribe===Cd}function X(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function Y(a){return a&&typeof a.next===Cd&&typeof a[Dd]===Cd}function Z(a){a&&Qc.schedule(function(){throw a})}function $(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Ac(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function _(a,b,c){var d=new xc;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(_(a.item(e),b,c));else a&&d.add($(a,b,c));return d}function ab(a,b,c){return new Yd(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(zb))){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 xc(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)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}function bb(a,b){return a.groupJoin(this,b,kd,function(a,b){return b})}function cb(a){var b=this;return new Yd(function(c){var d=new _d,e=new xc,f=new Ec(e);return c.onNext(uc(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),Eb(a)&&(a=id(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new _d,c.onNext(uc(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function db(a){var b=this;return new Yd(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}Eb(b)&&(b=id(b));var i=new Cc;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(xb,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new _d,c.onNext(uc(h,g)),d()}))}var e=new Dc,f=new xc(e),g=new Ec(f),h=new _d;return c.onNext(uc(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}function eb(b,c){return new Xc(function(){return new Wc(function(){return b()?{done:!1,value:c}:{done:!0,value:a}})})}function fb(a){this.patterns=a}function gb(a,b){this.expression=a,this.selector=b}function hb(a,b,c){var d=a.get(b);if(!d){var e=new Vd(b,c);return a.set(b,e),e}return d}function ib(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new Ud;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function jb(a,b){return new Yd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function kb(a,b,c){return new Yd(function(d){var e=a,f=Hc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function lb(a,b){return new Yd(function(c){return b.scheduleWithRelative(Hc(a),function(){c.onNext(0),c.onCompleted()})})}function mb(a,b,c){return a===b?new Yd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):jd(function(){return kb(c.now()+a,b,c)})}function nb(a,b,c){return new Yd(function(d){var e,f=!1,g=new Dc,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 Cc,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 xc(e,g)},a)}function ob(a,b,c){return jd(function(){return nb(a,b-c.now(),c)})}function pb(a,b){return new Yd(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new xc(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}var qb={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},rb=qb[typeof window]&&window||this,sb=qb[typeof exports]&&exports&&!exports.nodeType&&exports,tb=qb[typeof module]&&module&&!module.nodeType&&module,ub=tb&&tb.exports===sb&&sb,vb=qb[typeof global]&&global;!vb||vb.global!==vb&&vb.window!==vb||(rb=vb);var wb={internals:{},config:{Promise:rb.Promise},helpers:{}},xb=wb.helpers.noop=function(){},yb=(wb.helpers.notDefined=function(a){return"undefined"==typeof a},wb.helpers.isScheduler=function(a){return a instanceof wb.Scheduler}),zb=wb.helpers.identity=function(a){return a},Ab=(wb.helpers.pluck=function(a){return function(b){return b[a]}},wb.helpers.just=function(a){return function(){return a}},wb.helpers.defaultNow=Date.now),Bb=wb.helpers.defaultComparer=function(a,b){return qc(a,b)},Cb=wb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Db=(wb.helpers.defaultKeySerializer=function(a){return a.toString()},wb.helpers.defaultError=function(a){throw a}),Eb=wb.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},Fb=(wb.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},wb.helpers.not=function(a){return!a}),Gb=wb.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==fc.call(a)}),a}(),Hb="Sequence contains no elements.",Ib="Argument out of range",Jb="Object has been disposed";wb.config.longStackSupport=!1;var Kb=!1;try{throw new Error}catch(Lb){Kb=!!Lb.stack}var Mb,Nb=h(),Ob="From previous event:",Pb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";rb.Set&&"function"==typeof(new rb.Set)["@@iterator"]&&(Pb="@@iterator");var Qb=wb.doneEnumerator={done:!0,value:a},Rb=wb.helpers.isIterable=function(b){return b[Pb]!==a},Sb=wb.helpers.isArrayLike=function(b){return b&&b.length!==a};wb.helpers.iterator=Pb;var Tb,Ub=wb.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Vb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Wb=Vb.length,Xb="[object Arguments]",Yb="[object Array]",Zb="[object Boolean]",$b="[object Date]",_b="[object Error]",ac="[object Function]",bc="[object Number]",cc="[object Object]",dc="[object RegExp]",ec="[object String]",fc=Object.prototype.toString,gc=Object.prototype.hasOwnProperty,hc=fc.call(arguments)==Xb,ic=Error.prototype,jc=Object.prototype,kc=String.prototype,lc=jc.propertyIsEnumerable;try{Tb=!(fc.call(document)==cc&&!({toString:0}+""))}catch(Lb){Tb=!0}var mc={};mc[Yb]=mc[$b]=mc[bc]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},mc[Zb]=mc[ec]={constructor:!0,toString:!0,valueOf:!0},mc[_b]=mc[ac]=mc[dc]={constructor:!0,toString:!0},mc[cc]={constructor:!0};var nc={};!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);nc.enumErrorProps=lc.call(ic,"message")||lc.call(ic,"name"),nc.enumPrototypes=lc.call(a,"prototype"),nc.nonEnumArgs=0!=c,nc.nonEnumShadows=!/valueOf/.test(b)}(1);var oc=wb.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},pc=function(a){return a&&"object"==typeof a?fc.call(a)==Xb:!1};hc||(pc=function(a){return a&&"object"==typeof a?gc.call(a,"callee"):!1});var qc=wb.internals.isEqual=function(a,b){return o(a,b,[],[])},rc=({}.hasOwnProperty,Array.prototype.slice),sc=this.inherits=wb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},tc=wb.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},uc=wb.internals.addRef=function(a,b){return new Yd(function(c){return new xc(b.getDisposable(),a.subscribe(c))})};q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var vc=wb.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},wc=vc.prototype;wc.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},wc.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)}}},wc.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},yc=xc.prototype;yc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},yc.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},yc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},yc.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var zc=wb.Disposable=function(a){this.isDisposed=!1,this.action=a||xb};zc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Ac=zc.create=function(a){return new zc(a)},Bc=zc.empty={dispose:xb},Cc=wb.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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),Dc=wb.SerialDisposable=Cc,Ec=wb.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?Bc:new a(this)},b}();r.prototype.dispose=function(){this.scheduler.scheduleWithState(this,t)};var Fc=wb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||Cb,this.disposable=new Cc};Fc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Fc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Fc.prototype.isCancelled=function(){return this.disposable.isDisposed},Fc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Gc=wb.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(),Bc}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=Ab,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Hc=Gc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new xc,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),Bc});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new xc,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Bc});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")})}}(Gc.prototype),function(){Gc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Gc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof rb.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=rb.setInterval(function(){d=c(d)},b);return Ac(function(){rb.clearInterval(e)})}}(Gc.prototype),function(a){a.catchError=a["catch"]=function(a){return new Rc(this,a)}}(Gc.prototype);var Ic,Jc=wb.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 Cc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Kc=Gc.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+Hc(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Gc(Ab,a,b,c)}(),Lc=Gc.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-Gc.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()+Gc.normalize(c),g=new Fc(this,b,d,f);if(e)e.enqueue(g);else{e=new vc(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 Gc(Ab,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Mc=xb,Nc=function(){var a,b=xb;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!rb.setTimeout)throw new Error("No concurrency detected!");a=rb.setTimeout,b=rb.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Oc=Nc.setTimeout,Pc=Nc.clearTimeout;!function(){function a(){if(!rb.postMessage||rb.importScripts)return!1;var a=!1,b=rb.onmessage;return rb.onmessage=function(){a=!0},rb.postMessage("","*"),rb.onmessage=b,a}var b=RegExp("^"+String(fc).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=vb&&ub&&vb.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=vb&&ub&&vb.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)Ic=c,Mc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Ic=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};rb.addEventListener?rb.addEventListener("message",h,!1):rb.attachEvent("onmessage",h,!1),Ic=function(a){var b=g++;f[b]=a,rb.postMessage(e+b,"*")}}else if(rb.MessageChannel){var i=new rb.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Ic=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in rb&&"onreadystatechange"in rb.document.createElement("script")?Ic=function(a){var b=rb.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},rb.document.documentElement.appendChild(b)}:(Ic=function(a){return Oc(a,0)},Mc=Pc)}();var Qc=Gc.timeout=function(){function a(a,b){var c=this,d=new Cc,e=Ic(function(){d.isDisposed||d.setDisposable(b(c,a))});return new xc(d,Ac(function(){Mc(e)}))}function b(a,b,c){var d=this,e=Gc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Cc,g=Oc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new xc(f,Ac(function(){Pc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Gc(Ab,a,b,c)}(),Rc=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 sc(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 Bc}}},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 Cc;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}(Gc),Sc=wb.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 yb(a)||(a=Kc),new Yd(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Tc=Sc.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 Sc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Uc=Sc.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 Sc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Vc=Sc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Sc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Wc=wb.internals.Enumerator=function(a){this._next=a};Wc.prototype.next=function(){return this._next()},Wc.prototype[Pb]=function(){return this};var Xc=wb.internals.Enumerable=function(a){this._iterator=a};Xc.prototype[Pb]=function(){return this._iterator()},Xc.prototype.concat=function(){var a=this;return new Yd(function(b){var c,d=a[Pb](),e=new Dc,f=Kc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;Eb(h)&&(h=id(h));var i=new Cc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new xc(e,f,Ac(function(){c=!0}))})},Xc.prototype.catchError=function(){var a=this;return new Yd(function(b){var c,d=a[Pb](),e=new Dc,f=Kc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;Eb(i)&&(i=id(i));var j=new Cc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new xc(e,f,Ac(function(){c=!0}))})},Xc.prototype.catchErrorWhen=function(a){var b=this;return new Yd(function(c){var d,e,f=new _d,g=new _d,h=a(f),i=h.subscribe(g),j=b[Pb](),k=new Dc,l=Kc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;Eb(i)&&(i=id(i));var l=new Cc,m=new Cc;k.setDisposable(new xc(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new xc(i,k,l,Ac(function(){d=!0}))})};var Yc=Xc.repeat=function(a,b){return null==b&&(b=-1),new Xc(function(){var c=b;return new Wc(function(){return 0===c?Qb:(c>0&&c--,{done:!1,value:a})})})},Zc=Xc.of=function(a,b,c){if(b)var d=Ub(b,c,3);return new Xc(function(){var c=-1;return new Wc(function(){return++c0&&(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}(bd),fd=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return sc(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.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(ed),gd=wb.Observable=function(){function a(a){if(wb.config.longStackSupport&&Kb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){d(a,c),e(a)},a.call(c,b)}}else this._subscribe=a}return ad=a.prototype,ad.subscribe=ad.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:_c(a,b,c))},ad.subscribeOnNext=function(a,b){return this._subscribe(_c("undefined"!=typeof b?function(c){a.call(b,c)}:a))},ad.subscribeOnError=function(a,b){return this._subscribe(_c(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},ad.subscribeOnCompleted=function(a,b){return this._subscribe(_c(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),hd=wb.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Ac(a):Bc}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new Zd(a),d=[b,this];return Lc.scheduleRequired()?Lc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return sc(e,a),e}(gd);ad.observeOn=function(a){var b=this;return new Yd(function(c){return b.subscribe(new fd(a,c))},b)},ad.subscribeOn=function(a){var b=this;return new Yd(function(c){var d=new Cc,e=new Dc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new r(a,b.subscribe(c)))})),e},b)};var id=gd.fromPromise=function(a){return jd(function(){var b=new wb.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};ad.toPromise=function(a){if(a||(a=wb.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)})})},ad.toArray=function(){var a=this;return new Yd(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},gd.create=gd.createWithDisposable=function(a,b){return new Yd(a,b)};var jd=gd.defer=function(a){return new Yd(function(b){var c;try{c=a()}catch(d){return sd(d).subscribe(b)}return Eb(c)&&(c=id(c)),c.subscribe(b)})},kd=gd.empty=function(a){return yb(a)||(a=Kc),new Yd(function(b){return a.schedule(function(){b.onCompleted()})})},ld=Math.pow(2,53)-1;u.prototype[Pb]=function(){return new v(this._s)},v.prototype[Pb]=function(){return this},v.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return C(null,a)},gd.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);return C(a,b)};var qd=gd.never=function(){return new Yd(function(){return Bc})};gd.pairs=function(a,b){return b||(b=wb.Scheduler.currentThread),new Yd(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},gd.range=function(a,b,c){return yb(c)||(c=Lc),new Yd(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},gd.repeat=function(a,b,c){return yb(c)||(c=Lc),rd(a,c).repeat(null==b?-1:b)};var rd=gd["return"]=gd.just=function(a,b){return yb(b)||(b=Kc),new Yd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};gd.returnValue=function(){return rd.apply(null,arguments)};var sd=gd["throw"]=gd.throwError=function(a,b){return yb(b)||(b=Kc),new Yd(function(c){return b.schedule(function(){c.onError(a)})})};gd.throwException=function(){return gd.throwError.apply(null,arguments)},gd.using=function(a,b){return new Yd(function(c){var d,e,f=Bc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new xc(sd(g).subscribe(c),f)}return new xc(e.subscribe(c),f)})},ad.amb=function(a){var b=this;return new Yd(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Cc,j=new Cc;return Eb(a)&&(a=id(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 xc(i,j)})},gd.amb=function(){function a(a,b){return a.amb(b)}var b=qd(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},ad["catch"]=ad.catchError=function(a){return"function"==typeof a?D(this,a):td([this,a])},ad.catchException=function(a){return this.catchError(a)};var td=gd.catchError=gd["catch"]=gd.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Zc(a).catchError()};ad.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),ud.apply(this,a)};var ud=gd.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Yd(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every(zb))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every(zb)&&b.onCompleted()}function e(a){j[a]=!0,j.every(zb)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new Cc;Eb(f)&&(f=id(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new xc(l)},this)};ad.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),vd.apply(null,a)};var vd=gd.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Zc(a).concat()};ad.concatAll=ad.concatObservable=function(){return this.merge(1)},ad.merge=function(a){if("number"!=typeof a)return wd(this,a);var b=this;return new Yd(function(c){function d(a){var b=new Cc;f.add(b),Eb(a)&&(a=id(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new xc,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var wd=gd.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(yb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Kc,b=0;d>b;b++)c.push(arguments[b]);else for(a=Kc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),C(a,c).mergeAll()};ad.mergeAll=function(){var a=this;return new Yd(function(b){var c=new xc,d=!1,e=new Cc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Cc;c.add(e),Eb(a)&&(a=id(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},ad.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},ad.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return xd([this,a])};var xd=gd.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Yd(function(b){var c=0,d=new Dc,e=Kc.scheduleRecursive(function(e){var f,g;cb;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new Yd(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new Cc;Eb(d)&&(d=id(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(zb)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new Cc;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new xc(j)},this)},ad.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return E.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new Yd(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every(zb)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,G),i=p(g,F),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new Cc;Eb(e)&&(e=id(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new xc(j)},d)},gd.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},gd.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Yd(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(zb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(zb)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Cc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new xc(h)})},ad.asObservable=function(){var a=this;return new Yd(function(b){return a.subscribe(b)},this)},ad.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})},ad.dematerialize=function(){var a=this;return new Yd(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},ad.distinctUntilChanged=function(a,b){var c=this;return b||(b=Bb),new Yd(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},ad["do"]=ad.tap=ad.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?_c(a||xb,b||xb,c||xb):a;return new Yd(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},ad.doOnNext=ad.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},ad.doOnError=ad.tapOnError=function(a,b){return this.tap(xb,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},ad.doOnCompleted=ad.tapOnCompleted=function(a,b){return this.tap(xb,null,"undefined"!=typeof b?function(){a.call(b)}:a)},ad["finally"]=ad.ensure=function(a){var b=this;return new Yd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Ac(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},ad.finallyAction=function(a){return this.ensure(a)},ad.ignoreElements=function(){var a=this;return new Yd(function(b){return a.subscribe(xb,function(a){b.onError(a)},function(){b.onCompleted()})},a)},ad.materialize=function(){var a=this;return new Yd(function(b){return a.subscribe(function(a){b.onNext(Tc(a))},function(a){b.onNext(Uc(a)),b.onCompleted()},function(){b.onNext(Vc()),b.onCompleted()})},a)},ad.repeat=function(a){return Yc(this,a).concat()},ad.retry=function(a){return Yc(this,a).catchError()},ad.retryWhen=function(a){return Yc(this).catchErrorWhen(a)},ad.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 Yd(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},ad.skipLast=function(a){var b=this;return new Yd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},ad.startWith=function(){var a,b=0;arguments.length&&yb(arguments[0])?(a=arguments[0],b=1):a=Kc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Zc([pd(c,a),this]).concat()},ad.takeLast=function(a){var b=this;return new Yd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},ad.takeLastBuffer=function(a){var b=this;return new Yd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},ad.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(Ib);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(Ib);return new Yd(function(d){function e(){var a=new _d;i.push(a),d.onNext(uc(a,g))}var f=new Cc,g=new Ec(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},c)},ad.selectConcat=ad.concatMap=function(a,b,c){return Gb(a)&&Gb(b)?this.concatMap(function(c,d){var e=a(c,d);return Eb(e)&&(e=id(e)),(Sb(e)||Rb(e))&&(e=md(e)),e.map(function(a,e){return b(c,a,d,e)})}):Gb(a)?H(this,a,c):H(this,function(){return a})},ad.concatMapObserver=ad.selectConcatObserver=function(a,b,c,d){var e=this,f=Ub(a,d,2),g=Ub(b,d,1),h=Ub(c,d,0);return new Yd(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}Eb(d)&&(d=id(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}Eb(c)&&(c=id(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}Eb(b)&&(b=id(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},ad.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Yd(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},J.prototype.push=function(a){var b=-1===I(this.set,a,this.comparer);return b&&this.set.push(a),b},ad.distinct=function(a,b){var c=this;return b||(b=Bb),new Yd(function(d){var e=new J(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)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},ad.groupBy=function(a,b,c){return this.groupByUntil(a,b,qd,c)},ad.groupByUntil=function(a,b,c,d){var e=this;return b||(b=zb),d||(d=Bb),new Yd(function(f){function g(a){return function(b){b.onError(a)}}var h=new Rd(0,d),i=new xc,j=new Ec(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 _d,h.set(e,m),l=!0),l){var n=new $d(e,m,j),o=new $d(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new Cc;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(xb,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},e)};var yd=function(a){function b(b,c,d){this.source=b,this.selector=Ub(c,d,3),a.call(this)}return sc(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new zd(a,this.selector,this))},b}(hd),zd=function(a){function b(b,c,d){this.observer=b,this.selector=c,this.source=d,this.index=0,a.call(this)}return sc(b,a),b.prototype.next=function(a){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(bd);ad.map=ad.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof yd?this.internalMap(a,b):new yd(this,c,b)},ad.pluck=function(a){return this.map(function(b){return b[a]})},ad.selectMany=ad.flatMap=function(a,b,c){return Gb(a)&&Gb(b)?this.flatMap(function(c,d){var e=a(c,d);return Eb(e)&&(e=id(e)),(Sb(e)||Rb(e))&&(e=md(e)),e.map(function(a,e){return b(c,a,d,e)})},c):Gb(a)?K(this,a,c):K(this,function(){return a})},ad.flatMapObserver=ad.selectManyObserver=function(a,b,c,d){var e=this;return new Yd(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)}Eb(c)&&(c=id(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}Eb(c)&&(c=id(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}Eb(a)&&(a=id(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},ad.selectSwitch=ad.flatMapLatest=ad.switchMap=function(a,b){return this.select(a,b).switchLatest()},ad.skip=function(a){if(0>a)throw new Error(Ib);var b=this;return new Yd(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},ad.skipWhile=function(a,b){var c=this,d=Ub(a,b,3);return new Yd(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},ad.take=function(a,b){if(0>a)throw new RangeError(Ib);if(0===a)return kd(b);var c=this;return new Yd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},ad.takeWhile=function(a,b){var c=this,d=Ub(a,b,3);return new Yd(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Ad=function(a){function b(b,c,d){this.source=b,this.predicate=Ub(c,d,3),a.call(this)}return sc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Bd(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(hd),Bd=function(a){function b(b,c,d){this.observer=b,this.predicate=c,this.source=d,this.index=0,a.call(this)}return sc(b,a),b.prototype.next=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(bd);ad.filter=ad.where=function(a,b){return this instanceof Ad?this.internalFilter(a,b):new Ad(this,a,b)},ad.aggregate=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,b=arguments[0],a=arguments[1]):a=arguments[0],new Yd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return void e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Error(Hb)),e.onCompleted()})},d)},ad.reduce=function(a){var b,c=!1,d=this;return 2===arguments.length&&(c=!0,b=arguments[1]),new Yd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return void e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Error(Hb)),e.onCompleted()})},d)},ad.some=function(a,b){var c=this;return a?c.filter(a,b).some():new Yd(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},function(b){a.onError(b)},function(){a.onNext(!1),a.onCompleted()})},c)},ad.any=function(){return this.some.apply(this,arguments)},ad.isEmpty=function(){return this.any().map(Fb)},ad.every=function(a,b){return this.filter(function(b){return!a(b)},b).some().map(Fb)},ad.all=function(){return this.every.apply(this,arguments)},ad.includes=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new Yd(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),Bc):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},function(a){e.onError(a)},function(){e.onNext(!1),e.onCompleted()})},this)},ad.contains=function(a,b){ad.includes(a,b)},ad.count=function(a,b){return a?this.filter(a,b).count():this.reduce(function(a){return a+1},0)},ad.indexOf=function(a,b){var c=this;return new Yd(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),Bc):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},function(a){d.onError(a)},function(){d.onNext(-1),d.onCompleted()})},c)},ad.sum=function(a,b){return a&&Gb(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},ad.minBy=function(a,b){return b||(b=Cb),L(this,a,function(a,c){return-1*b(a,c)})},ad.min=function(a){return this.minBy(zb,a).map(function(a){return M(a)})},ad.maxBy=function(a,b){return b||(b=Cb),L(this,a,b)},ad.max=function(a){return this.maxBy(zb,a).map(function(a){return M(a)})},ad.average=function(a,b){return a&&Gb(a)?this.map(a,b).average():this.reduce(function(a,b){return{sum:a.sum+b,count:a.count+1}},{sum:0,count:0}).map(function(a){if(0===a.count)throw new Error(Hb);return a.sum/a.count})},ad.sequenceEqual=function(a,b){var c=this;return b||(b=Bb),new Yd(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)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(Sb(a)||Rb(a))&&(a=md(a)),Eb(a)&&(a=id(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)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new xc(i,j)},c)},ad.elementAt=function(a){return N(this,a,!1)},ad.elementAtOrDefault=function(a,b){return N(this,a,!0,b)},ad.single=function(a,b){return a&&Gb(a)?this.where(a,b).single():O(this,!1)},ad.singleOrDefault=function(a,b,c){return a&&Gb(a)?this.filter(a,c).singleOrDefault(null,b):O(this,!0,b)},ad.first=function(a,b){return a?this.where(a,b).first():P(this,!1)},ad.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):P(this,!0,b)},ad.last=function(a,b){return a?this.where(a,b).last():Q(this,!1)},ad.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):Q(this,!0,b)},ad.find=function(a,b){return R(this,a,b,!1)},ad.findIndex=function(a,b){return R(this,a,b,!0)},ad.toSet=function(){if("undefined"==typeof rb.Set)throw new TypeError;var a=this;return new Yd(function(b){var c=new rb.Set;return a.subscribe(function(a){c.add(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},ad.toMap=function(a,b){if("undefined"==typeof rb.Map)throw new TypeError;var c=this;return new Yd(function(d){var e=new rb.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)},function(a){d.onError(a)},function(){d.onNext(e),d.onCompleted()})},c)};var Cd="function",Dd="throw",oc=wb.internals.isObject,Ed=wb.spawn=function(a){var b=X(a);return function(c){function d(a,b){Qc.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2)for(var b=[],h=1,i=arguments.length;i>h;h++)b.push(arguments[h]);if(a)try{c=g[Dd](a)}catch(j){return d(j)}if(!a)try{c=g.next(b)}catch(j){return d(j)}if(c.done)return d(null,c.value);if(c.value=S(c.value,f),typeof c.value!==Cd)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var k=!1;try{c.value.call(f,function(){k||(k=!0,e.apply(f,arguments))})}catch(j){Qc.schedule(function(){k||(k=!0,e.call(f,j))})}}}var f=this,g=a;if(b){for(var h=[],i=0,j=arguments.length;j>i;i++)h.push(arguments[i]);var j=h.length,k=j&&typeof h[j-1]===Cd;c=k?h.pop():Z,g=a.apply(this,h)}else c=c||Z;e()}};gd.start=function(a,b,c){return Fd(a,b,c)()};var Fd=gd.toAsync=function(a,b,c){return yb(c)||(c=Qc),function(){var d=arguments,e=new ae;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()}};gd.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new Yd(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},gd.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new Yd(function(e){function f(a){if(a)return void e.onError(a);for(var b=[],d=1,f=arguments.length;f>d;d++)b.push(arguments[d]);if(c){try{b=c(b)}catch(g){return e.onError(g)}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()}},wb.config.useNativeEvents=!1,gd.fromEvent=function(a,b,c){if(a.addListener)return Gd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!wb.config.useNativeEvents){if("function"==typeof a.on&&"function"==typeof a.off)return Gd(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(rb.Ember&&"function"==typeof rb.Ember.addListener)return Gd(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c)}return new Yd(function(d){return _(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 Gd=gd.fromEventPattern=function(a,b,c){return new Yd(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 Ac(function(){b&&b(e,f)})}).publish().refCount()};gd.startAsync=function(a){var b;try{b=a()}catch(c){return sd(c)}return id(b)};var Hd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Bc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Bc)});return new xc(c,d,e)}function c(c,d){this.source=c,this.controller=new _d,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return sc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(gd);ad.pausable=function(a){return new Hd(this,a)};var Id=function(b){function c(b){var c,d=[],e=ab(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 _d,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return sc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(gd);ad.pausableBuffered=function(a){return new Id(this,a)};var Jd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new Kd(d),this.source=c.multicast(this.subject).refCount()}return sc(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(gd),Kd=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new _d,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=Bc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=Bc}return sc(c,a),tc(c.prototype,$c,{onCompleted:function(){this.hasCompleted=!0,(!this.enableQueue||0===this.queue.length)&&this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,(!this.enableQueue||0===this.queue.length)&&this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=Bc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=Bc),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?Bc:(this.requestedCount=a,this.requestedDisposable=Ac(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Bc}}),c}(gd);ad.controlled=function(a){return null==a&&(a=!0),new Jd(this,a)};var Ld=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return Qc.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}sc(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}sc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;Qc.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(bd);return c}(gd);Jd.prototype.stopAndWait=function(){return new Ld(this)};var Md=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return Qc.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}sc(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}sc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;Qc.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(bd);return c}(gd);Jd.prototype.windowed=function(a){return new Md(this,a)},ad.multicast=function(a,b){var c=this;return"function"==typeof a?new Yd(function(d){var e=c.multicast(a());return new xc(b(e).subscribe(d),e.connect())},c):new Qd(c,a)},ad.publish=function(a){return a&&Gb(a)?this.multicast(function(){return new _d},a):this.multicast(new _d)},ad.share=function(){return this.publish().refCount()},ad.publishLast=function(a){return a&&Gb(a)?this.multicast(function(){return new ae},a):this.multicast(new ae)},ad.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Od(b)},a):this.multicast(new Od(a))},ad.shareValue=function(a){return this.publishValue(a).refCount()},ad.replay=function(a,b,c,d){return a&&Gb(a)?this.multicast(function(){return new Pd(b,c,d)},a):this.multicast(new Pd(b,c,d))},ad.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var Nd=function(a,b){this.subject=a,this.observer=b};Nd.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 Od=wb.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),Bc):(this.observers.push(a),a.onNext(this.value),new Nd(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return sc(e,a),tc(e.prototype,$c,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped){this.value=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),e}(gd),Pd=wb.ReplaySubject=function(a){function d(a,b){return Ac(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new ed(this.scheduler,a),e=d(this,c);b(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function f(b,c,d){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=d||Lc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return sc(f,a),tc(f.prototype,$c.prototype,{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(this),!this.isStopped){var d=this.scheduler.now();this.q.push({interval:d,value:a}),this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onNext(a),h.ensureActive()}}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var d=this.scheduler.now();this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onError(a),h.ensureActive()}this.observers.length=0}},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onCompleted(),g.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),f}(gd),Qd=wb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new xc(f.subscribe(c),Ac(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return sc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Yd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(gd),Rd=function(){function b(a){if(0===(1&a))return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function 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||Bb,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 c)return d(c)}if(b.hashCode)return b.hashCode();var f=17*a++;return b.hashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var 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){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}();ad.join=function(a,b,c,d){var e=this;return new Yd(function(f){var g=new xc,h=!1,i=!1,j=0,k=0,l=new Rd,m=new Rd;return g.add(e.subscribe(function(a){var c=j++,e=new Cc;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(xb,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 Cc;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(xb,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},e)},ad.groupJoin=function(a,b,c,d){var e=this;return new Yd(function(f){function g(a){return function(b){b.onError(a)}}var h=new xc,i=new Ec(h),j=new Rd,k=new Rd,l=0,m=0;return h.add(e.subscribe(function(a){var c=new _d,e=l++;j.add(e,c);var m;try{m=d(a,uc(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 Cc;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(xb,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 Cc;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(xb,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},e)},ad.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},ad.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?cb.call(this,a):"function"==typeof a?db.call(this,a):bb.call(this,a,b)},ad.pairwise=function(){var a=this;return new Yd(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))},a)},ad.partition=function(a,b){return[this.filter(a,b),this.filter(function(c,d,e){return!a.call(b,c,d,e)})]},ad.letBind=ad.let=function(a){return a(this)},gd["if"]=gd.ifThen=function(a,b,c){return jd(function(){return c||(c=kd()),Eb(b)&&(b=id(b)),Eb(c)&&(c=id(c)),"function"==typeof c.now&&(c=kd(c)),a()?b:c})},gd["for"]=gd.forIn=function(a,b,c){return Zc(a,b,c).concat()};var Sd=gd["while"]=gd.whileDo=function(a,b){return Eb(b)&&(b=id(b)),eb(a,b).concat()};ad.doWhile=function(a){return vd([this,Sd(a,this)])},gd["case"]=gd.switchCase=function(a,b,c){return jd(function(){Eb(c)&&(c=id(c)),c||(c=kd()),"function"==typeof c.now&&(c=kd(c));var d=b[a()];return Eb(d)&&(d=id(d)),d||c})},ad.expand=function(a,b){yb(b)||(b=Kc);var c=this;return new Yd(function(d){var e=[],f=new Dc,g=new xc(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 Cc;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},this)},gd.forkJoin=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Yd(function(b){var c=a.length;if(0===c)return b.onCompleted(),Bc;for(var d=new xc,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];Eb(j)&&(j=id(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})},ad.forkJoin=function(a,b){var c=this;return new Yd(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new Cc,l=new Cc;return Eb(a)&&(a=id(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 xc(k,l)},c)},ad.manySelect=function(a,b){yb(b)||(b=Kc);var c=this;return jd(function(){var d;return c.map(function(a){var b=new Td(a);return d&&d.onNext(a),d=b,b}).tap(xb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var Td=function(a){function b(a){var b=this,c=new xc;return c.add(Lc.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 ae}return sc(c,a),tc(c.prototype,$c,{onCompleted:function(){this.onNext(gd.empty())},onError:function(a){this.onNext(gd.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(gd),Ud=rb.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}();fb.prototype.and=function(a){return new fb(this.patterns.concat(a))},fb.prototype.thenDo=function(a){return new gb(this,a)},gb.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(hb(a,this.expression.patterns[f],b.onError.bind(b)));var h=new ib(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},ib.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},ib.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=xb,c.completed=xb,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}(bd);ad.and=function(a){return new fb([this,a])},ad.thenDo=function(a){return new fb([this]).thenDo(a)},gd.when=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Yd(function(b){var c=[],d=new Ud,e=_c(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){sd(h).subscribe(b)}var i=new xc;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var Wd=gd.interval=function(a,b){return mb(a,a,yb(b)?b:Qc)},Xd=gd.timer=function(b,c,d){var e;return yb(d)||(d=Qc),c!==a&&"number"==typeof c?e=c:yb(c)&&(d=c),b instanceof Date&&e===a?jb(b.getTime(),d):b instanceof Date&&e!==a?(e=c,kb(b.getTime(),e,d)):e===a?lb(b,d):mb(b,e,d)};ad.delay=function(a,b){return yb(b)||(b=Qc),a instanceof Date?ob(this,a.getTime(),b):nb(this,a,b)},ad.debounce=ad.throttleWithTimeout=function(a,b){yb(b)||(b=Qc);var c=this;return new Yd(function(d){var e,f=new Dc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Cc;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 xc(i,f)},this)},ad.throttle=function(a,b){return this.debounce(a,b)},ad.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),yb(c)||(c=Qc),"number"==typeof b?d=b:yb(b)&&(d=a,c=b),new Yd(function(b){function f(){var a=new Cc,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 _d;k.push(a),b.onNext(uc(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new Dc,m=0;return g=new xc(l),h=new Ec(g),k.push(new _d),b.onNext(uc(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},e)},ad.windowWithTimeOrCount=function(a,b,c){var d=this;return yb(c)||(c=Qc),new Yd(function(e){function f(b){var d=new Cc;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new _d,e.onNext(uc(l,i)),f(a)}}))}var g=new Dc,h=new xc(g),i=new Ec(h),j=0,k=0,l=new _d;return e.onNext(uc(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 _d,e.onNext(uc(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},ad.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},ad.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},ad.timeInterval=function(a){var b=this;return yb(a)||(a=Qc),jd(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},ad.timestamp=function(a){return yb(a)||(a=Qc),this.map(function(b){return{value:b,timestamp:a.now()}})},ad.sample=ad.throttleLatest=function(a,b){return yb(b)||(b=Qc),"number"==typeof a?pb(this,Wd(a,b)):pb(this,a)},ad.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=sd(new Error(b||"Timeout"))),yb(c)||(c=Qc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Yd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(Eb(b)&&(b=id(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Cc,j=new Dc,k=!1,l=new Dc;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 xc(j,l)},d)},gd.generateWithAbsoluteTime=function(a,b,c,d,e,f){return yb(f)||(f=Qc),new Yd(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()})})},gd.generateWithRelativeTime=function(a,b,c,d,e,f){return yb(f)||(f=Qc),new Yd(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()})})},ad.delaySubscription=function(a,b){return this.delayWithSelector(Xd(a,yb(b)?b:Qc),kd)},ad.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new Yd(function(a){var b=new xc,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new Dc,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new Cc;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(i,a.onError.bind(a),i)):i(),new xc(h,b)},this)},ad.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=qd()),c||(c=sd(new Error("Timeout")));var d=this;return new Yd(function(e){function f(a){function b(){return k===d}var d=k,f=new Cc;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 Dc,i=new Dc,j=new Cc;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(Eb(c)?id(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new xc(h,i)},d)},ad.debounceWithSelector=function(a){var b=this;return new Yd(function(c){var d,e=!1,f=new Dc,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}Eb(h)&&(h=id(h)),e=!0,d=b,g++;var j=g,k=new Cc;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 xc(h,f)},b)},ad.throttleWithSelector=function(){return this.debounceWithSelector.apply(this,arguments)},ad.skipLastWithTime=function(a,b){yb(b)||(b=Qc);var c=this;return new Yd(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)},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})},c)},ad.takeLastWithTime=function(a,b){var c=this;return yb(b)||(b=Qc),new Yd(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()},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})},c)},ad.takeLastBufferWithTime=function(a,b){var c=this;return yb(b)||(b=Qc),new Yd(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()},function(a){d.onError(a)},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()})},c)},ad.takeWithTime=function(a,b){var c=this;return yb(b)||(b=Qc),new Yd(function(d){return new xc(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},ad.skipWithTime=function(a,b){var c=this;return yb(b)||(b=Qc),new Yd(function(d){var e=!1;return new xc(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))},c)},ad.skipUntilWithTime=function(a,b){yb(b)||(b=Qc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Yd(function(e){var f=!1;return new xc(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},ad.takeUntilWithTime=function(a,b){yb(b)||(b=Qc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Yd(function(e){return new xc(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},ad.throttleFirst=function(a,b){yb(b)||(b=Qc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Yd(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)},ad.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 Yd(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)})},c)},ad.exclusive=function(){var a=this;return new Yd(function(b){var c=!1,d=!1,e=new Cc,f=new xc;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,Eb(a)&&(a=id(a));var e=new Cc;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},this)},ad.exclusiveMap=function(a,b){var c=this,d=Ub(a,b,3);return new Yd(function(a){var b=0,e=!1,f=!0,g=new Cc,h=new xc;return h.add(g),g.setDisposable(c.subscribe(function(c){e||(e=!0,innerSubscription=new Cc,h.add(innerSubscription),Eb(c)&&(c=id(c)),innerSubscription.setDisposable(c.subscribe(function(e){var f;try{f=d(e,b++,c)}catch(g){return void a.onError(g)}a.onNext(f)},function(b){a.onError(b)},function(){h.remove(innerSubscription),e=!1,f&&1===h.length&&a.onCompleted()})))},function(b){a.onError(b)},function(){f=!0,1!==h.length||e||a.onCompleted()})),h},this)},wb.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(),Bc}function h(b,g){this.clock=b,this.comparer=g,this.isEnabled=!1,this.queue=new vc(1024),a.call(this,c,d,e,f)}sc(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 Jc(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(Ib);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(Ib);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(Ib); -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 Fc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},h}(Gc),wb.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||Cb;a.call(this,d,e)}sc(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}(wb.VirtualTimeScheduler);var Yd=wb.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Ac(a):Bc}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new Zd(a),e=[d,b];return Lc.scheduleRequired()?Lc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return sc(d,a),d}(gd),Zd=function(a){function b(b){a.call(this),this.observer=b,this.m=new Cc}sc(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(bd),$d=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 Yd(function(a){return new xc(e.getDisposable(),d.subscribe(a))}):d}return sc(c,a),c}(gd),_d=wb.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),Bc):(a.onCompleted(),Bc):(this.observers.push(a),new Nd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return sc(e,a),tc(e.prototype,$c.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new be(a,b)},e}(gd),ae=wb.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Bc):(this.observers.push(a),new Nd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return sc(e,a),tc(e.prototype,$c,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(gd),be=wb.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return sc(c,a),tc(c.prototype,$c.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(gd);wb.Pauser=function(a){function b(){a.call(this)}return sc(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(_d),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(rb.Rx=wb,define(function(){return wb})):sb&&tb?ub?(tb.exports=wb).Rx=wb:sb.Rx=wb:rb.Rx=wb;var ce=h()}).call(this); +(function(a){function b(a){if(a.isDisposed)throw new Error(Lb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(Mb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Qb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+Qb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===Ob&&d>=Pb&&ce>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(Mb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return Ob=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!qc(a))return b;pc.nonEnumArgs&&a.length&&rc(a)&&(a=tc.call(a));var c=pc.enumPrototypes&&"function"==typeof a,d=pc.enumErrorProps&&(a===kc||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(pc.nonEnumShadows&&a!==lc){var f=a.constructor,g=-1,h=Yb;if(a===(f&&f.prototype))var i=a===mc?gc:a===kc?bc:hc.call(a),j=oc[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function t(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function u(){this._s=s}function v(){this._s=s,this._l=s.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&tb.isFinite(a)}function z(b){var c,d=b[Rb];if(!d&&"string"==typeof b)return c=new u(b),c[Rb]();if(!d&&b.length!==a)return c=new w(b),c[Rb]();if(!d)throw new TypeError("Object is not iterable");return b[Rb]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>nd?nd:b):b}function C(a,b){return Ab(a)||(a=Nc),new Yd(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function D(a,b){return new Yd(function(c){var d=new Ec,e=new Fc;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)}Gb(f)&&(f=kd(f)),d=new Ec,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function E(a,b){var c=this;return new Yd(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function F(){return!1}function G(){return[]}function H(a,b,c){var d=Wb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Gb(e)&&(e=kd(e)),(Ub(e)||Tb(e))&&(e=od(e)),e}).concatAll()}function I(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function J(a){this.comparer=a,this.set=[]}function K(a,b,c){this.observer=a,this.selector=b,this.source=c,this.index=0,this.isStopped=!1}function L(a,b,c){var d=Wb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Gb(e)&&(e=kd(e)),(Ub(e)||Tb(e))&&(e=od(e)),e}).mergeAll()}function M(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.index=0,this.isStopped=!1}function N(a,b,c){return new Yd(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)},function(a){d.onError(a)},function(){d.onNext(g),d.onCompleted()})},a)}function O(a){if(0===a.length)throw new Error(Jb);return a[0]}function P(a,b,c,d){if(0>b)throw new Error(Kb);return new Yd(function(e){var f=b;return a.subscribe(function(a){0===f--&&(e.onNext(a),e.onCompleted())},function(a){e.onError(a)},function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(Kb))})},a)}function Q(a,b,c){return new Yd(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)},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Jb))})},a)}function R(a,b,c){return new Yd(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},function(a){d.onError(a)},function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(Jb))})},a)}function S(a,b,c){return new Yd(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Jb))})},a)}function T(b,c,d,e){var f=Wb(c,d,3);return new Yd(function(c){var d=0;return b.subscribe(function(a){var g;try{g=f(a,d,b)}catch(h){return void c.onError(h)}g?(c.onNext(e?d:a),c.onCompleted()):d++},function(a){c.onError(a)},function(){c.onNext(e?-1:a),c.onCompleted()})},b)}function U(a,b){return Array.isArray(a)?V.call(b,a):Z(a)?Ed(a.call(b)):$(a)?Ed(a):Y(a)?W(a):Gb(a)?X(a):typeof a===Cd?a:qc(a)||Array.isArray(a)?V.call(b,a):a}function V(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=U(a,b),typeof a!==Cd)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 Sc.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function W(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function X(a){return function(b){a.then(function(a){b(null,a)},b)}}function Y(a){return a&&typeof a.subscribe===Cd}function Z(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function $(a){return a&&typeof a.next===Cd&&typeof a[Dd]===Cd}function _(a){a&&Sc.schedule(function(){throw a})}function ab(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Cc(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function bb(a,b,c){var d=new zc;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(bb(a.item(e),b,c));else a&&d.add(ab(a,b,c));return d}function cb(a,b,c){return new Yd(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(Bb))){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 zc(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)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}function db(a,b){return a.groupJoin(this,b,md,function(a,b){return b})}function eb(a){var b=this;return new Yd(function(c){var d=new _d,e=new zc,f=new Gc(e);return c.onNext(wc(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),Gb(a)&&(a=kd(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new _d,c.onNext(wc(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function fb(a){var b=this;return new Yd(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}Gb(b)&&(b=kd(b));var i=new Ec;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(zb,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new _d,c.onNext(wc(h,g)),d()}))}var e=new Fc,f=new zc(e),g=new Gc(f),h=new _d;return c.onNext(wc(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}function gb(b,c){return new Zc(function(){return new Yc(function(){return b()?{done:!1,value:c}:{done:!0,value:a}})})}function hb(a){this.patterns=a}function ib(a,b){this.expression=a,this.selector=b}function jb(a,b,c){var d=a.get(b);if(!d){var e=new Vd(b,c);return a.set(b,e),e}return d}function kb(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new Ud;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function lb(a,b){return new Yd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function mb(a,b,c){return new Yd(function(d){var e=a,f=Jc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function nb(a,b){return new Yd(function(c){return b.scheduleWithRelative(Jc(a),function(){c.onNext(0),c.onCompleted()})})}function ob(a,b,c){return a===b?new Yd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):ld(function(){return mb(c.now()+a,b,c)})}function pb(a,b,c){return new Yd(function(d){var e,f=!1,g=new Fc,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 Ec,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 zc(e,g)},a)}function qb(a,b,c){return ld(function(){return pb(a,b-c.now(),c)})}function rb(a,b){return new Yd(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new zc(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}var sb={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},tb=sb[typeof window]&&window||this,ub=sb[typeof exports]&&exports&&!exports.nodeType&&exports,vb=sb[typeof module]&&module&&!module.nodeType&&module,wb=vb&&vb.exports===ub&&ub,xb=sb[typeof global]&&global;!xb||xb.global!==xb&&xb.window!==xb||(tb=xb);var yb={internals:{},config:{Promise:tb.Promise},helpers:{}},zb=yb.helpers.noop=function(){},Ab=(yb.helpers.notDefined=function(a){return"undefined"==typeof a},yb.helpers.isScheduler=function(a){return a instanceof yb.Scheduler}),Bb=yb.helpers.identity=function(a){return a},Cb=(yb.helpers.pluck=function(a){return function(b){return b[a]}},yb.helpers.just=function(a){return function(){return a}},yb.helpers.defaultNow=Date.now),Db=yb.helpers.defaultComparer=function(a,b){return sc(a,b)},Eb=yb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Fb=(yb.helpers.defaultKeySerializer=function(a){return a.toString()},yb.helpers.defaultError=function(a){throw a}),Gb=yb.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},Hb=(yb.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},yb.helpers.not=function(a){return!a}),Ib=yb.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==hc.call(a)}),a}(),Jb="Sequence contains no elements.",Kb="Argument out of range",Lb="Object has been disposed";yb.config.longStackSupport=!1;var Mb=!1;try{throw new Error}catch(Nb){Mb=!!Nb.stack}var Ob,Pb=h(),Qb="From previous event:",Rb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";tb.Set&&"function"==typeof(new tb.Set)["@@iterator"]&&(Rb="@@iterator");var Sb=yb.doneEnumerator={done:!0,value:a},Tb=yb.helpers.isIterable=function(b){return b[Rb]!==a},Ub=yb.helpers.isArrayLike=function(b){return b&&b.length!==a};yb.helpers.iterator=Rb;var Vb,Wb=yb.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Xb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Yb=Xb.length,Zb="[object Arguments]",$b="[object Array]",_b="[object Boolean]",ac="[object Date]",bc="[object Error]",cc="[object Function]",dc="[object Number]",ec="[object Object]",fc="[object RegExp]",gc="[object String]",hc=Object.prototype.toString,ic=Object.prototype.hasOwnProperty,jc=hc.call(arguments)==Zb,kc=Error.prototype,lc=Object.prototype,mc=String.prototype,nc=lc.propertyIsEnumerable;try{Vb=!(hc.call(document)==ec&&!({toString:0}+""))}catch(Nb){Vb=!0}var oc={};oc[$b]=oc[ac]=oc[dc]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},oc[_b]=oc[gc]={constructor:!0,toString:!0,valueOf:!0},oc[bc]=oc[cc]=oc[fc]={constructor:!0,toString:!0},oc[ec]={constructor:!0};var pc={};!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);pc.enumErrorProps=nc.call(kc,"message")||nc.call(kc,"name"),pc.enumPrototypes=nc.call(a,"prototype"),pc.nonEnumArgs=0!=c,pc.nonEnumShadows=!/valueOf/.test(b)}(1);var qc=yb.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},rc=function(a){return a&&"object"==typeof a?hc.call(a)==Zb:!1};jc||(rc=function(a){return a&&"object"==typeof a?ic.call(a,"callee"):!1});var sc=yb.internals.isEqual=function(a,b){return o(a,b,[],[])},tc=({}.hasOwnProperty,Array.prototype.slice),uc=this.inherits=yb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},vc=yb.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},wc=yb.internals.addRef=function(a,b){return new Yd(function(c){return new zc(b.getDisposable(),a.subscribe(c))})};q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var xc=yb.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},yc=xc.prototype;yc.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},yc.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)}}},yc.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},Ac=zc.prototype;Ac.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Ac.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Ac.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},Ac.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var Bc=yb.Disposable=function(a){this.isDisposed=!1,this.action=a||zb};Bc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Cc=Bc.create=function(a){return new Bc(a)},Dc=Bc.empty={dispose:zb},Ec=yb.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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),Fc=yb.SerialDisposable=Ec,Gc=yb.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?Dc:new a(this)},b}();r.prototype.dispose=function(){this.scheduler.scheduleWithState(this,t)};var Hc=yb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||Eb,this.disposable=new Ec};Hc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Hc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Hc.prototype.isCancelled=function(){return this.disposable.isDisposed},Hc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Ic=yb.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(),Dc}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=Cb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Jc=Ic.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new zc,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),Dc});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new zc,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Dc});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")})}}(Ic.prototype),function(){Ic.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Ic.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof tb.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=tb.setInterval(function(){d=c(d)},b);return Cc(function(){tb.clearInterval(e)})}}(Ic.prototype),function(a){a.catchError=a["catch"]=function(a){return new Tc(this,a)}}(Ic.prototype);var Kc,Lc=yb.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 Ec;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Mc=Ic.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+Jc(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Ic(Cb,a,b,c)}(),Nc=Ic.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-Ic.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()+Ic.normalize(c),g=new Hc(this,b,d,f);if(e)e.enqueue(g);else{e=new xc(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 Ic(Cb,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Oc=zb,Pc=function(){var a,b=zb;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!tb.setTimeout)throw new Error("No concurrency detected!");a=tb.setTimeout,b=tb.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Qc=Pc.setTimeout,Rc=Pc.clearTimeout;!function(){function a(){if(!tb.postMessage||tb.importScripts)return!1;var a=!1,b=tb.onmessage;return tb.onmessage=function(){a=!0},tb.postMessage("","*"),tb.onmessage=b,a}var b=RegExp("^"+String(hc).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=xb&&wb&&xb.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=xb&&wb&&xb.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)Kc=c,Oc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Kc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};tb.addEventListener?tb.addEventListener("message",h,!1):tb.attachEvent("onmessage",h,!1),Kc=function(a){var b=g++;f[b]=a,tb.postMessage(e+b,"*")}}else if(tb.MessageChannel){var i=new tb.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Kc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in tb&&"onreadystatechange"in tb.document.createElement("script")?Kc=function(a){var b=tb.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},tb.document.documentElement.appendChild(b)}:(Kc=function(a){return Qc(a,0)},Oc=Rc)}();var Sc=Ic.timeout=function(){function a(a,b){var c=this,d=new Ec,e=Kc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new zc(d,Cc(function(){Oc(e)}))}function b(a,b,c){var d=this,e=Ic.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Ec,g=Qc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new zc(f,Cc(function(){Rc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Ic(Cb,a,b,c)}(),Tc=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 uc(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 Dc}}},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 Ec;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}(Ic),Uc=yb.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 Ab(a)||(a=Mc),new Yd(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Vc=Uc.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 Uc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Wc=Uc.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 Uc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Xc=Uc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Uc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Yc=yb.internals.Enumerator=function(a){this._next=a};Yc.prototype.next=function(){return this._next()},Yc.prototype[Rb]=function(){return this};var Zc=yb.internals.Enumerable=function(a){this._iterator=a};Zc.prototype[Rb]=function(){return this._iterator()},Zc.prototype.concat=function(){var a=this;return new Yd(function(b){var c,d=a[Rb](),e=new Fc,f=Mc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;Gb(h)&&(h=kd(h));var i=new Ec;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new zc(e,f,Cc(function(){c=!0}))})},Zc.prototype.catchError=function(){var a=this;return new Yd(function(b){var c,d=a[Rb](),e=new Fc,f=Mc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;Gb(i)&&(i=kd(i));var j=new Ec;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new zc(e,f,Cc(function(){c=!0}))})},Zc.prototype.catchErrorWhen=function(a){var b=this;return new Yd(function(c){var d,e,f=new _d,g=new _d,h=a(f),i=h.subscribe(g),j=b[Rb](),k=new Fc,l=Mc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;Gb(i)&&(i=kd(i));var l=new Ec,m=new Ec;k.setDisposable(new zc(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new zc(i,k,l,Cc(function(){d=!0}))})};var $c=Zc.repeat=function(a,b){return null==b&&(b=-1),new Zc(function(){var c=b;return new Yc(function(){return 0===c?Sb:(c>0&&c--,{done:!1,value:a})})})},_c=Zc.of=function(a,b,c){if(b)var d=Wb(b,c,3);return new Zc(function(){var c=-1;return new Yc(function(){return++c0&&(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}(dd),hd=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return uc(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.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(gd),id=yb.Observable=function(){function a(a){if(yb.config.longStackSupport&&Mb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){d(a,c),e(a)},a.call(c,b)}}else this._subscribe=a}return cd=a.prototype,cd.subscribe=cd.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:bd(a,b,c))},cd.subscribeOnNext=function(a,b){return this._subscribe(bd("undefined"!=typeof b?function(c){a.call(b,c)}:a))},cd.subscribeOnError=function(a,b){return this._subscribe(bd(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},cd.subscribeOnCompleted=function(a,b){return this._subscribe(bd(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),jd=yb.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Cc(a):Dc}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new Zd(a),d=[b,this];return Nc.scheduleRequired()?Nc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return uc(e,a),e.prototype.subscribeCore=function(){throw new Error("Not implemeneted")},e}(id);cd.observeOn=function(a){var b=this;return new Yd(function(c){return b.subscribe(new hd(a,c))},b)},cd.subscribeOn=function(a){var b=this;return new Yd(function(c){var d=new Ec,e=new Fc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new r(a,b.subscribe(c)))})),e},b)};var kd=id.fromPromise=function(a){return ld(function(){var b=new yb.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};cd.toPromise=function(a){if(a||(a=yb.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)})})},cd.toArray=function(){var a=this;return new Yd(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},id.create=id.createWithDisposable=function(a,b){return new Yd(a,b)};var ld=id.defer=function(a){return new Yd(function(b){var c;try{c=a()}catch(d){return ud(d).subscribe(b)}return Gb(c)&&(c=kd(c)),c.subscribe(b)})},md=id.empty=function(a){return Ab(a)||(a=Mc),new Yd(function(b){return a.schedule(function(){b.onCompleted()})})},nd=Math.pow(2,53)-1;u.prototype[Rb]=function(){return new v(this._s)},v.prototype[Rb]=function(){return this},v.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return C(null,a)},id.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);return C(a,b)},id.ofArrayChanges=function(a){if(!Array.isArray(a))throw new TypeError("Array.observe only accepts arrays.");if("function"!=typeof Array.observe&&"function"!=typeof Array.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new Yd(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Array.observe(a,c),function(){Array.unobserve(a,c)}})},id.ofObjectChanges=function(a){if(null==a)throw new TypeError("object must not be null or undefined.");if("function"!=typeof Object.observe&&"function"!=typeof Object.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new Yd(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Object.observe(a,c),function(){Object.unobserve(a,c)}})};var sd=id.never=function(){return new Yd(function(){return Dc})};id.pairs=function(a,b){return b||(b=yb.Scheduler.currentThread),new Yd(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},id.range=function(a,b,c){return Ab(c)||(c=Nc),new Yd(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},id.repeat=function(a,b,c){return Ab(c)||(c=Nc),td(a,c).repeat(null==b?-1:b)};var td=id["return"]=id.just=function(a,b){return Ab(b)||(b=Mc),new Yd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};id.returnValue=function(){return td.apply(null,arguments)};var ud=id["throw"]=id.throwError=function(a,b){return Ab(b)||(b=Mc),new Yd(function(c){return b.schedule(function(){c.onError(a)})})};id.throwException=function(){return id.throwError.apply(null,arguments)},id.using=function(a,b){return new Yd(function(c){var d,e,f=Dc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new zc(ud(g).subscribe(c),f)}return new zc(e.subscribe(c),f)})},cd.amb=function(a){var b=this;return new Yd(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Ec,j=new Ec;return Gb(a)&&(a=kd(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 zc(i,j)})},id.amb=function(){function a(a,b){return a.amb(b)}var b=sd(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},cd["catch"]=cd.catchError=function(a){return"function"==typeof a?D(this,a):vd([this,a])},cd.catchException=function(a){return this.catchError(a)};var vd=id.catchError=id["catch"]=id.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return _c(a).catchError()};cd.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),wd.apply(this,a)};var wd=id.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Yd(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every(Bb))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every(Bb)&&b.onCompleted()}function e(a){j[a]=!0,j.every(Bb)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new Ec;Gb(f)&&(f=kd(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new zc(l)},this)};cd.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),xd.apply(null,a)};var xd=id.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return _c(a).concat()};cd.concatAll=cd.concatObservable=function(){return this.merge(1)},cd.merge=function(a){if("number"!=typeof a)return yd(this,a);var b=this;return new Yd(function(c){function d(a){var b=new Ec;f.add(b),Gb(a)&&(a=kd(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new zc,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var yd=id.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Ab(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Mc,b=0;d>b;b++)c.push(arguments[b]);else for(a=Mc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),C(a,c).mergeAll()};cd.mergeAll=function(){var a=this;return new Yd(function(b){var c=new zc,d=!1,e=new Ec;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Ec;c.add(e),Gb(a)&&(a=kd(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},cd.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},cd.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return zd([this,a])};var zd=id.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Yd(function(b){var c=0,d=new Fc,e=Mc.scheduleRecursive(function(e){var f,g;cb;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new Yd(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new Ec;Gb(d)&&(d=kd(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(Bb)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new Ec;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new zc(j)},this)},cd.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return E.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new Yd(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every(Bb)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,G),i=p(g,F),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new Ec;Gb(e)&&(e=kd(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new zc(j)},d)},id.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},id.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Yd(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(Bb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(Bb)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Ec,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new zc(h)})},cd.asObservable=function(){var a=this;return new Yd(function(b){return a.subscribe(b)},this)},cd.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})},cd.dematerialize=function(){var a=this;return new Yd(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},cd.distinctUntilChanged=function(a,b){var c=this;return b||(b=Db),new Yd(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},cd["do"]=cd.tap=cd.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?bd(a||zb,b||zb,c||zb):a;return new Yd(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},cd.doOnNext=cd.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},cd.doOnError=cd.tapOnError=function(a,b){return this.tap(zb,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},cd.doOnCompleted=cd.tapOnCompleted=function(a,b){return this.tap(zb,null,"undefined"!=typeof b?function(){a.call(b)}:a)},cd["finally"]=cd.ensure=function(a){var b=this;return new Yd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Cc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},cd.finallyAction=function(a){return this.ensure(a)},cd.ignoreElements=function(){var a=this;return new Yd(function(b){return a.subscribe(zb,function(a){b.onError(a)},function(){b.onCompleted()})},a)},cd.materialize=function(){var a=this;return new Yd(function(b){return a.subscribe(function(a){b.onNext(Vc(a))},function(a){b.onNext(Wc(a)),b.onCompleted()},function(){b.onNext(Xc()),b.onCompleted()})},a)},cd.repeat=function(a){return $c(this,a).concat()},cd.retry=function(a){return $c(this,a).catchError()},cd.retryWhen=function(a){return $c(this).catchErrorWhen(a)},cd.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 Yd(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},cd.skipLast=function(a){var b=this;return new Yd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},cd.startWith=function(){var a,b=0;arguments.length&&Ab(arguments[0])?(a=arguments[0],b=1):a=Mc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return _c([rd(c,a),this]).concat()},cd.takeLast=function(a){var b=this;return new Yd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},cd.takeLastBuffer=function(a){var b=this;return new Yd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},cd.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(Kb);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(Kb);return new Yd(function(d){function e(){var a=new _d;i.push(a),d.onNext(wc(a,g))}var f=new Ec,g=new Gc(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},c)},cd.selectConcat=cd.concatMap=function(a,b,c){return Ib(a)&&Ib(b)?this.concatMap(function(c,d){var e=a(c,d);return Gb(e)&&(e=kd(e)),(Ub(e)||Tb(e))&&(e=od(e)),e.map(function(a,e){return b(c,a,d,e)})}):Ib(a)?H(this,a,c):H(this,function(){return a})},cd.concatMapObserver=cd.selectConcatObserver=function(a,b,c,d){var e=this,f=Wb(a,d,2),g=Wb(b,d,1),h=Wb(c,d,0);return new Yd(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}Gb(d)&&(d=kd(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}Gb(c)&&(c=kd(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}Gb(b)&&(b=kd(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},cd.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Yd(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},J.prototype.push=function(a){var b=-1===I(this.set,a,this.comparer);return b&&this.set.push(a),b},cd.distinct=function(a,b){var c=this;return b||(b=Db),new Yd(function(d){var e=new J(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)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},cd.groupBy=function(a,b,c){return this.groupByUntil(a,b,sd,c)},cd.groupByUntil=function(a,b,c,d){var e=this;return b||(b=Bb),d||(d=Db),new Yd(function(f){function g(a){return function(b){b.onError(a)}}var h=new Rd(0,d),i=new zc,j=new Gc(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 _d,h.set(e,m),l=!0),l){var n=new $d(e,m,j),o=new $d(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new Ec;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(zb,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},e)};var Ad=function(a){function b(b,c,d){this.source=b,this.selector=Wb(c,d,3),a.call(this)}return uc(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new K(a,this.selector,this))},b}(jd);K.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)}},K.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},K.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},K.prototype.dispose=function(){this.isStopped=!0},K.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},cd.map=cd.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Ad?this.internalMap(a,b):new Ad(this,c,b)},cd.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},cd.selectMany=cd.flatMap=function(a,b,c){return Ib(a)&&Ib(b)?this.flatMap(function(c,d){var e=a(c,d);return Gb(e)&&(e=kd(e)),(Ub(e)||Tb(e))&&(e=od(e)),e.map(function(a,e){return b(c,a,d,e)})},c):Ib(a)?L(this,a,c):L(this,function(){return a})},cd.flatMapObserver=cd.selectManyObserver=function(a,b,c,d){var e=this;return new Yd(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)}Gb(c)&&(c=kd(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}Gb(c)&&(c=kd(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}Gb(a)&&(a=kd(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},cd.selectSwitch=cd.flatMapLatest=cd.switchMap=function(a,b){return this.select(a,b).switchLatest()},cd.skip=function(a){if(0>a)throw new Error(Kb);var b=this;return new Yd(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},cd.skipWhile=function(a,b){var c=this,d=Wb(a,b,3);return new Yd(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},cd.take=function(a,b){if(0>a)throw new RangeError(Kb);if(0===a)return md(b);var c=this;return new Yd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},cd.takeWhile=function(a,b){var c=this,d=Wb(a,b,3);return new Yd(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Bd=function(a){function b(b,c,d){this.source=b,this.predicate=Wb(c,d,3),a.call(this)}return uc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new M(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(jd);M.prototype.onNext=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},M.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},M.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},M.prototype.dispose=function(){this.isStopped=!0},M.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},cd.filter=cd.where=function(a,b){return this instanceof Bd?this.internalFilter(a,b):new Bd(this,a,b)},cd.aggregate=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,b=arguments[0],a=arguments[1]):a=arguments[0],new Yd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return void e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Error(Jb)),e.onCompleted()})},d)},cd.reduce=function(a){var b,c=!1,d=this;return 2===arguments.length&&(c=!0,b=arguments[1]),new Yd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return void e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Error(Jb)),e.onCompleted()})},d)},cd.some=function(a,b){var c=this;return a?c.filter(a,b).some():new Yd(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},function(b){a.onError(b)},function(){a.onNext(!1),a.onCompleted()})},c)},cd.any=function(){return this.some.apply(this,arguments)},cd.isEmpty=function(){return this.any().map(Hb)},cd.every=function(a,b){return this.filter(function(b){return!a(b)},b).some().map(Hb)},cd.all=function(){return this.every.apply(this,arguments)},cd.includes=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new Yd(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),Dc):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},function(a){e.onError(a)},function(){e.onNext(!1),e.onCompleted()})},this)},cd.contains=function(a,b){cd.includes(a,b)},cd.count=function(a,b){return a?this.filter(a,b).count():this.reduce(function(a){return a+1},0)},cd.indexOf=function(a,b){var c=this;return new Yd(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),Dc):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},function(a){d.onError(a)},function(){d.onNext(-1),d.onCompleted()})},c)},cd.sum=function(a,b){return a&&Ib(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},cd.minBy=function(a,b){return b||(b=Eb),N(this,a,function(a,c){return-1*b(a,c)})},cd.min=function(a){return this.minBy(Bb,a).map(function(a){return O(a)})},cd.maxBy=function(a,b){return b||(b=Eb),N(this,a,b)},cd.max=function(a){return this.maxBy(Bb,a).map(function(a){return O(a)})},cd.average=function(a,b){return a&&Ib(a)?this.map(a,b).average():this.reduce(function(a,b){return{sum:a.sum+b,count:a.count+1}},{sum:0,count:0}).map(function(a){if(0===a.count)throw new Error(Jb);return a.sum/a.count})},cd.sequenceEqual=function(a,b){var c=this;return b||(b=Db),new Yd(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)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(Ub(a)||Tb(a))&&(a=od(a)),Gb(a)&&(a=kd(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)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new zc(i,j)},c)},cd.elementAt=function(a){return P(this,a,!1)},cd.elementAtOrDefault=function(a,b){return P(this,a,!0,b)},cd.single=function(a,b){return a&&Ib(a)?this.where(a,b).single():Q(this,!1)},cd.singleOrDefault=function(a,b,c){return a&&Ib(a)?this.filter(a,c).singleOrDefault(null,b):Q(this,!0,b)},cd.first=function(a,b){return a?this.where(a,b).first():R(this,!1)},cd.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):R(this,!0,b)},cd.last=function(a,b){return a?this.where(a,b).last():S(this,!1)},cd.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):S(this,!0,b)},cd.find=function(a,b){return T(this,a,b,!1)},cd.findIndex=function(a,b){return T(this,a,b,!0)},cd.toSet=function(){if("undefined"==typeof tb.Set)throw new TypeError;var a=this;return new Yd(function(b){var c=new tb.Set;return a.subscribe(function(a){c.add(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},cd.toMap=function(a,b){if("undefined"==typeof tb.Map)throw new TypeError;var c=this;return new Yd(function(d){var e=new tb.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)},function(a){d.onError(a)},function(){d.onNext(e),d.onCompleted()})},c)};var Cd="function",Dd="throw",qc=yb.internals.isObject,Ed=yb.spawn=function(a){var b=Z(a);return function(c){function d(a,b){Sc.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2)for(var b=[],h=1,i=arguments.length;i>h;h++)b.push(arguments[h]);if(a)try{c=g[Dd](a)}catch(j){return d(j)}if(!a)try{c=g.next(b)}catch(j){return d(j)}if(c.done)return d(null,c.value);if(c.value=U(c.value,f),typeof c.value!==Cd)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var k=!1;try{c.value.call(f,function(){k||(k=!0,e.apply(f,arguments))})}catch(j){Sc.schedule(function(){k||(k=!0,e.call(f,j))})}}}var f=this,g=a;if(b){for(var h=[],i=0,j=arguments.length;j>i;i++)h.push(arguments[i]);var j=h.length,k=j&&typeof h[j-1]===Cd;c=k?h.pop():_,g=a.apply(this,h)}else c=c||_;e()}};id.start=function(a,b,c){return Fd(a,b,c)()};var Fd=id.toAsync=function(a,b,c){return Ab(c)||(c=Sc),function(){var d=arguments,e=new ae;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()}};id.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new Yd(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},id.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new Yd(function(e){function f(a){if(a)return void e.onError(a);for(var b=[],d=1,f=arguments.length;f>d;d++)b.push(arguments[d]);if(c){try{b=c(b)}catch(g){return e.onError(g)}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()}},yb.config.useNativeEvents=!1,id.fromEvent=function(a,b,c){if(a.addListener)return Gd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!yb.config.useNativeEvents){if("function"==typeof a.on&&"function"==typeof a.off)return Gd(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(tb.Ember&&"function"==typeof tb.Ember.addListener)return Gd(function(c){Ember.addListener(a,b,c) +},function(c){Ember.removeListener(a,b,c)},c)}return new Yd(function(d){return bb(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 Gd=id.fromEventPattern=function(a,b,c){return new Yd(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 Cc(function(){b&&b(e,f)})}).publish().refCount()};id.startAsync=function(a){var b;try{b=a()}catch(c){return ud(c)}return kd(b)};var Hd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Dc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Dc)});return new zc(c,d,e)}function c(c,d){this.source=c,this.controller=new _d,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return uc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(id);cd.pausable=function(a){return new Hd(this,a)};var Id=function(b){function c(b){var c,d=[],e=cb(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 _d,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return uc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(id);cd.pausableBuffered=function(a){return new Id(this,a)};var Jd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new Kd(d),this.source=c.multicast(this.subject).refCount()}return uc(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(id),Kd=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new _d,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=Dc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=Dc}return uc(c,a),vc(c.prototype,ad,{onCompleted:function(){this.hasCompleted=!0,(!this.enableQueue||0===this.queue.length)&&this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,(!this.enableQueue||0===this.queue.length)&&this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=Dc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=Dc),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?Dc:(this.requestedCount=a,this.requestedDisposable=Cc(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Dc}}),c}(id);cd.controlled=function(a){return null==a&&(a=!0),new Jd(this,a)};var Ld=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return Sc.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}uc(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}uc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;Sc.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(dd);return c}(id);Jd.prototype.stopAndWait=function(){return new Ld(this)};var Md=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return Sc.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}uc(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}uc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;Sc.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(dd);return c}(id);Jd.prototype.windowed=function(a){return new Md(this,a)},cd.multicast=function(a,b){var c=this;return"function"==typeof a?new Yd(function(d){var e=c.multicast(a());return new zc(b(e).subscribe(d),e.connect())},c):new Qd(c,a)},cd.publish=function(a){return a&&Ib(a)?this.multicast(function(){return new _d},a):this.multicast(new _d)},cd.share=function(){return this.publish().refCount()},cd.publishLast=function(a){return a&&Ib(a)?this.multicast(function(){return new ae},a):this.multicast(new ae)},cd.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Od(b)},a):this.multicast(new Od(a))},cd.shareValue=function(a){return this.publishValue(a).refCount()},cd.replay=function(a,b,c,d){return a&&Ib(a)?this.multicast(function(){return new Pd(b,c,d)},a):this.multicast(new Pd(b,c,d))},cd.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var Nd=function(a,b){this.subject=a,this.observer=b};Nd.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 Od=yb.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),Dc):(this.observers.push(a),a.onNext(this.value),new Nd(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return uc(e,a),vc(e.prototype,ad,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped){this.value=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),e}(id),Pd=yb.ReplaySubject=function(a){function d(a,b){return Cc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new gd(this.scheduler,a),e=d(this,c);b(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function f(b,c,d){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=d||Nc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return uc(f,a),vc(f.prototype,ad.prototype,{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(this),!this.isStopped){var d=this.scheduler.now();this.q.push({interval:d,value:a}),this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onNext(a),h.ensureActive()}}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var d=this.scheduler.now();this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onError(a),h.ensureActive()}this.observers.length=0}},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onCompleted(),g.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),f}(id),Qd=yb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new zc(f.subscribe(c),Cc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return uc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Yd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(id),Rd=function(){function b(a){if(0===(1&a))return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function 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||Db,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 c)return d(c)}if(b.hashCode)return b.hashCode();var f=17*a++;return b.hashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var 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){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}();cd.join=function(a,b,c,d){var e=this;return new Yd(function(f){var g=new zc,h=!1,i=!1,j=0,k=0,l=new Rd,m=new Rd;return g.add(e.subscribe(function(a){var c=j++,e=new Ec;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(zb,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 Ec;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(zb,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},e)},cd.groupJoin=function(a,b,c,d){var e=this;return new Yd(function(f){function g(a){return function(b){b.onError(a)}}var h=new zc,i=new Gc(h),j=new Rd,k=new Rd,l=0,m=0;return h.add(e.subscribe(function(a){var c=new _d,e=l++;j.add(e,c);var m;try{m=d(a,wc(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 Ec;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(zb,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 Ec;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(zb,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},e)},cd.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},cd.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?eb.call(this,a):"function"==typeof a?fb.call(this,a):db.call(this,a,b)},cd.pairwise=function(){var a=this;return new Yd(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))},a)},cd.partition=function(a,b){return[this.filter(a,b),this.filter(function(c,d,e){return!a.call(b,c,d,e)})]},cd.letBind=cd.let=function(a){return a(this)},id["if"]=id.ifThen=function(a,b,c){return ld(function(){return c||(c=md()),Gb(b)&&(b=kd(b)),Gb(c)&&(c=kd(c)),"function"==typeof c.now&&(c=md(c)),a()?b:c})},id["for"]=id.forIn=function(a,b,c){return _c(a,b,c).concat()};var Sd=id["while"]=id.whileDo=function(a,b){return Gb(b)&&(b=kd(b)),gb(a,b).concat()};cd.doWhile=function(a){return xd([this,Sd(a,this)])},id["case"]=id.switchCase=function(a,b,c){return ld(function(){Gb(c)&&(c=kd(c)),c||(c=md()),"function"==typeof c.now&&(c=md(c));var d=b[a()];return Gb(d)&&(d=kd(d)),d||c})},cd.expand=function(a,b){Ab(b)||(b=Mc);var c=this;return new Yd(function(d){var e=[],f=new Fc,g=new zc(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 Ec;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},this)},id.forkJoin=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Yd(function(b){var c=a.length;if(0===c)return b.onCompleted(),Dc;for(var d=new zc,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];Gb(j)&&(j=kd(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})},cd.forkJoin=function(a,b){var c=this;return new Yd(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new Ec,l=new Ec;return Gb(a)&&(a=kd(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 zc(k,l)},c)},cd.manySelect=function(a,b){Ab(b)||(b=Mc);var c=this;return ld(function(){var d;return c.map(function(a){var b=new Td(a);return d&&d.onNext(a),d=b,b}).tap(zb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var Td=function(a){function b(a){var b=this,c=new zc;return c.add(Nc.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 ae}return uc(c,a),vc(c.prototype,ad,{onCompleted:function(){this.onNext(id.empty())},onError:function(a){this.onNext(id.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(id),Ud=tb.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}();hb.prototype.and=function(a){return new hb(this.patterns.concat(a))},hb.prototype.thenDo=function(a){return new ib(this,a)},ib.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(jb(a,this.expression.patterns[f],b.onError.bind(b)));var h=new kb(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},kb.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},kb.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=zb,c.completed=zb,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}(dd);cd.and=function(a){return new hb([this,a])},cd.thenDo=function(a){return new hb([this]).thenDo(a)},id.when=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Yd(function(b){var c=[],d=new Ud,e=bd(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){ud(h).subscribe(b)}var i=new zc;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var Wd=id.interval=function(a,b){return ob(a,a,Ab(b)?b:Sc)},Xd=id.timer=function(b,c,d){var e;return Ab(d)||(d=Sc),c!==a&&"number"==typeof c?e=c:Ab(c)&&(d=c),b instanceof Date&&e===a?lb(b.getTime(),d):b instanceof Date&&e!==a?(e=c,mb(b.getTime(),e,d)):e===a?nb(b,d):ob(b,e,d)};cd.delay=function(a,b){return Ab(b)||(b=Sc),a instanceof Date?qb(this,a.getTime(),b):pb(this,a,b)},cd.debounce=cd.throttleWithTimeout=function(a,b){Ab(b)||(b=Sc);var c=this;return new Yd(function(d){var e,f=new Fc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Ec;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 zc(i,f)},this)},cd.throttle=function(a,b){return this.debounce(a,b)},cd.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),Ab(c)||(c=Sc),"number"==typeof b?d=b:Ab(b)&&(d=a,c=b),new Yd(function(b){function f(){var a=new Ec,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 _d;k.push(a),b.onNext(wc(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new Fc,m=0;return g=new zc(l),h=new Gc(g),k.push(new _d),b.onNext(wc(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},e)},cd.windowWithTimeOrCount=function(a,b,c){var d=this;return Ab(c)||(c=Sc),new Yd(function(e){function f(b){var d=new Ec;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new _d,e.onNext(wc(l,i)),f(a)}}))}var g=new Fc,h=new zc(g),i=new Gc(h),j=0,k=0,l=new _d;return e.onNext(wc(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 _d,e.onNext(wc(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},cd.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},cd.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},cd.timeInterval=function(a){var b=this;return Ab(a)||(a=Sc),ld(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},cd.timestamp=function(a){return Ab(a)||(a=Sc),this.map(function(b){return{value:b,timestamp:a.now()}})},cd.sample=cd.throttleLatest=function(a,b){return Ab(b)||(b=Sc),"number"==typeof a?rb(this,Wd(a,b)):rb(this,a)},cd.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=ud(new Error(b||"Timeout"))),Ab(c)||(c=Sc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Yd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(Gb(b)&&(b=kd(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Ec,j=new Fc,k=!1,l=new Fc;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 zc(j,l)},d)},id.generateWithAbsoluteTime=function(a,b,c,d,e,f){return Ab(f)||(f=Sc),new Yd(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()})})},id.generateWithRelativeTime=function(a,b,c,d,e,f){return Ab(f)||(f=Sc),new Yd(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()})})},cd.delaySubscription=function(a,b){return this.delayWithSelector(Xd(a,Ab(b)?b:Sc),md)},cd.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new Yd(function(a){var b=new zc,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new Fc,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new Ec;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(i,a.onError.bind(a),i)):i(),new zc(h,b)},this)},cd.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=sd()),c||(c=ud(new Error("Timeout")));var d=this;return new Yd(function(e){function f(a){function b(){return k===d}var d=k,f=new Ec;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 Fc,i=new Fc,j=new Ec;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(Gb(c)?kd(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new zc(h,i)},d)},cd.debounceWithSelector=function(a){var b=this;return new Yd(function(c){var d,e=!1,f=new Fc,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}Gb(h)&&(h=kd(h)),e=!0,d=b,g++;var j=g,k=new Ec;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 zc(h,f)},b)},cd.throttleWithSelector=function(){return this.debounceWithSelector.apply(this,arguments)},cd.skipLastWithTime=function(a,b){Ab(b)||(b=Sc);var c=this;return new Yd(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)},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})},c)},cd.takeLastWithTime=function(a,b){var c=this;return Ab(b)||(b=Sc),new Yd(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()},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})},c)},cd.takeLastBufferWithTime=function(a,b){var c=this;return Ab(b)||(b=Sc),new Yd(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()},function(a){d.onError(a)},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()})},c)},cd.takeWithTime=function(a,b){var c=this;return Ab(b)||(b=Sc),new Yd(function(d){return new zc(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},cd.skipWithTime=function(a,b){var c=this;return Ab(b)||(b=Sc),new Yd(function(d){var e=!1;return new zc(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))},c)},cd.skipUntilWithTime=function(a,b){Ab(b)||(b=Sc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Yd(function(e){var f=!1;return new zc(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},cd.takeUntilWithTime=function(a,b){Ab(b)||(b=Sc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Yd(function(e){return new zc(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},cd.throttleFirst=function(a,b){Ab(b)||(b=Sc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Yd(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)},cd.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 Yd(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)})},c)},cd.exclusive=function(){var a=this;return new Yd(function(b){var c=!1,d=!1,e=new Ec,f=new zc;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,Gb(a)&&(a=kd(a));var e=new Ec;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},this)},cd.exclusiveMap=function(a,b){var c=this,d=Wb(a,b,3);return new Yd(function(a){var b=0,e=!1,f=!0,g=new Ec,h=new zc;return h.add(g),g.setDisposable(c.subscribe(function(c){e||(e=!0,innerSubscription=new Ec,h.add(innerSubscription),Gb(c)&&(c=kd(c)),innerSubscription.setDisposable(c.subscribe(function(e){var f;try{f=d(e,b++,c)}catch(g){return void a.onError(g)}a.onNext(f)},function(b){a.onError(b)},function(){h.remove(innerSubscription),e=!1,f&&1===h.length&&a.onCompleted()})))},function(b){a.onError(b)},function(){f=!0,1!==h.length||e||a.onCompleted()})),h},this)},yb.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(),Dc}function h(b,g){this.clock=b,this.comparer=g,this.isEnabled=!1,this.queue=new xc(1024),a.call(this,c,d,e,f)}uc(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 Lc(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(Kb);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(Kb);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(Kb);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 Hc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},h}(Ic),yb.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||Eb;a.call(this,d,e)}uc(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}(yb.VirtualTimeScheduler);var Yd=yb.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Cc(a):Dc}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new Zd(a),e=[d,b];return Nc.scheduleRequired()?Nc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return uc(d,a),d}(id),Zd=function(a){function b(b){a.call(this),this.observer=b,this.m=new Ec}uc(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(dd),$d=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 Yd(function(a){return new zc(e.getDisposable(),d.subscribe(a))}):d}return uc(c,a),c}(id),_d=yb.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),Dc):(a.onCompleted(),Dc):(this.observers.push(a),new Nd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return uc(e,a),vc(e.prototype,ad.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new be(a,b)},e}(id),ae=yb.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Dc):(this.observers.push(a),new Nd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return uc(e,a),vc(e.prototype,ad,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(id),be=yb.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return uc(c,a),vc(c.prototype,ad.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(id);yb.Pauser=function(a){function b(){a.call(this)}return uc(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(_d),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(tb.Rx=yb,define(function(){return yb})):ub&&vb?wb?(vb.exports=yb).Rx=yb:ub.Rx=yb:tb.Rx=yb;var ce=h()}).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 b86b11d50..7ef5a1bc6 100644 --- a/dist/rx.compat.js +++ b/dist/rx.compat.js @@ -2386,6 +2386,10 @@ __super__.call(this, subscribe); } + ObservableBase.prototype.subscribeCore = function(observer) { + throw new Error('Not implemeneted'); + } + return ObservableBase; }(Observable)); @@ -4317,36 +4321,39 @@ }(ObservableBase)); - var MapObserver = (function (__super__) { - inherits(MapObserver, __super__); + function MapObserver(observer, selector, source) { + this.observer = observer; + this.selector = selector; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function MapObserver(observer, selector, source) { - this.observer = observer; - this.selector = selector; - this.source = source; - this.index = 0; - __super__.call(this); + MapObserver.prototype.onNext = function(x) { + if (this.isStopped) { return; } + try { + var result = this.selector(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } - - MapObserver.prototype.next = function(x) { - try { - var result = this.selector(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - this.observer.onNext(result); - }; - - MapObserver.prototype.error = function (e) { + this.observer.onNext(result); + }; + MapObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + MapObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + MapObserver.prototype.dispose = function() { this.isStopped = true; }; + MapObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; - - MapObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; + return true; + } - return MapObserver; - }(AbstractObserver)); + return false; + }; /** * Projects each element of an observable sequence into a new form by incorporating the element's index. @@ -4362,12 +4369,26 @@ }; /** - * Retrieves the value of a specified property from all elements in the Observable sequence. - * @param {String} prop The property to pluck. + * Retrieves the value of a specified nested property from all elements in + * the Observable sequence. + * @param {Arguments} arguments The nested properties to pluck. * @returns {Observable} Returns a new Observable sequence of property values. */ - observableProto.pluck = function (prop) { - return this.map(function (x) { return x[prop]; }); + observableProto.pluck = function () { + var args = arguments, len = arguments.length; + if (len === 0) { throw new Error('List of properties cannot be empty.'); } + return this.map(function (x) { + var currentProp = x; + for (var i = 0; i < len; i++) { + var p = currentProp[args[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } else { + return undefined; + } + } + return currentProp; + }); }; function flatMap(source, selector, thisArg) { @@ -4605,36 +4626,41 @@ }(ObservableBase)); - var FilterObserver = (function (__super__) { - inherits(FilterObserver, __super__); + function FilterObserver(observer, predicate, source) { + this.observer = observer; + this.predicate = predicate; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function FilterObserver(observer, predicate, source) { - this.observer = observer; - this.predicate = predicate; - this.source = source; - this.index = 0; - __super__.call(this); + FilterObserver.prototype.onNext = function(x) { + try { + var shouldYield = this.predicate(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } + shouldYield && this.observer.onNext(x); + }; - FilterObserver.prototype.next = function(x) { - try { - var shouldYield = this.predicate(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - shouldYield && this.observer.onNext(x); - }; - - FilterObserver.prototype.error = function (e) { + FilterObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + FilterObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + FilterObserver.prototype.dispose = function() { this.isStopped = true; }; + FilterObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; + return true; + } + + return false; + }; - FilterObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; - return FilterObserver; - }(AbstractObserver)); /** * Filters the elements of an observable sequence based on a predicate by incorporating the element's index. diff --git a/dist/rx.compat.map b/dist/rx.compat.map index 1111cf584..16c594400 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","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","ScheduledDisposable","scheduler","disposable","scheduleItem","s","dispose","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","apply","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","CompositeDisposable","getDisposable","Function","that","target","args","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","every","fun","thisp","filter","predicate","results","t","isArray","searchElement","n","Infinity","max","keys","hasDontEnumBug","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","disposables","CompositeDisposablePrototype","add","shouldDispose","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","event","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","isStopped","completed","fail","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","cancel","Observable","_subscribe","oldOnError","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","mapper","list","FromArrayObservable","sink","FromArraySink","run","loopRecursive","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","pairs","range","observableReturn","returnValue","throwError","throwException","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","res","hasValueAll","values","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","materialize","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","MapObservable","internalMap","MapObserver","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","running","take","RangeError","takeWhile","FilterObservable","FilterObserver","internalFilter","shouldYield","transduce","transducer","transformForObserver","init","step","obs","input","xform","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAMC,IACtE,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAA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IACzEqtB,EAAGrtB,GAAGgK,QAAQ3J,EAGhBwG,MAAKqmB,UAAUhtB,OAAS,IAO5BgJ,OAAQ,SAAUpE,GAChBtF,EAAcqH,MACVA,KAAKwZ,YACTxZ,KAAK/B,MAAQA,EACb+B,KAAKiW,UAAW,IAKlB3V,QAAS,WACPN,KAAKnH,YAAa,EAClBmH,KAAKqmB,UAAY,KACjBrmB,KAAKgD,UAAY,KACjBhD,KAAK/B,MAAQ,QAIVyd,GACPnB,IAEqB1U,EAAG4gB,iBAAoB,SAAUnR,GAGtD,QAASxS,GAAUX,GACjB,MAAOnC,MAAKvG,WAAWqJ,UAAUX,GAGnC,QAASskB,GAAiBtkB,EAAU1I,GAClCuG,KAAKmC,SAAWA,EAChBnC,KAAKvG,WAAaA,EAClB6b,EAAUlZ,KAAK4D,KAAM8C,GAevB,MAxBA+F,IAAS4d,EAAkBnR,GAY3BrM,GAAcwd,EAAiBxpB,UAAWsb,GAAStb,WACjDqF,YAAa,WACXtC,KAAKmC,SAASG,eAEhBa,QAAS,SAAU3J,GACjBwG,KAAKmC,SAASgB,QAAQ3J,IAExB6I,OAAQ,SAAUpE,GAChB+B,KAAKmC,SAASE,OAAOpE,MAIlBwoB,GACPlM,IAEmB,mBAAVmM,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzE1lB,EAAK4E,GAAKA,EAEV6gB,OAAO,WACL,MAAO7gB,MAEAR,GAAeG,EAEpBE,GACDF,EAAWF,QAAUO,GAAIA,GAAKA,EAE/BR,EAAYQ,GAAKA,EAInB5E,EAAK4E,GAAKA,CAIZ,IAAI1K,IAAcC,MAElBgB,KAAK4D"} \ No newline at end of file +{"version":3,"file":"rx.compat.min.js","sources":["rx.compat.js"],"names":["undefined","checkDisposed","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","ScheduledDisposable","scheduler","disposable","scheduleItem","s","dispose","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","MapObserver","isStopped","flatMap","mergeAll","FilterObserver","predicate","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","apply","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","CompositeDisposable","getDisposable","Function","that","target","args","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","every","fun","thisp","filter","results","t","isArray","searchElement","n","Infinity","max","keys","hasDontEnumBug","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","disposables","CompositeDisposablePrototype","add","shouldDispose","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","event","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","completed","fail","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","cancel","Observable","_subscribe","oldOnError","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","mapper","list","FromArrayObservable","sink","FromArraySink","run","loopRecursive","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","pairs","range","observableReturn","returnValue","throwError","throwException","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","res","hasValueAll","values","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","materialize","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","MapObservable","internalMap","select","currentProp","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","running","take","RangeError","takeWhile","FilterObservable","internalFilter","shouldYield","transduce","transducer","transformForObserver","init","step","obs","input","xform","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAMC,IACtE,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAAQC,EAAI,EAAGC,EAAMH,EAAII,OAAYD,EAAJD,EAASA,IAAOD,EAAEI,KAAKL,EAAIE,GAAO,OAAOD,GAe7G,QAASK,GAAmBC,EAAOC,GAG/B,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,GAA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,KAAK4D"} \ No newline at end of file diff --git a/dist/rx.compat.min.js b/dist/rx.compat.min.js index 018ca8578..564e39b57 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(a){if(a.isDisposed)throw new Error(ab)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(bb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(fb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+fb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===db&&d>=eb&&$c>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(bb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return db=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!Hb(a))return b;Gb.nonEnumArgs&&a.length&&Ib(a)&&(a=Kb.call(a));var c=Gb.enumPrototypes&&"function"==typeof a,d=Gb.enumErrorProps&&(a===Bb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Gb.nonEnumShadows&&a!==Cb){var f=a.constructor,g=-1,h=nb;if(a===(f&&f.prototype))var i=a===Db?xb:a===Bb?sb:yb.call(a),j=Fb[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function t(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function u(){this._s=s}function v(){this._s=s,this._l=s.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&M.isFinite(a)}function z(b){var c,d=b[gb];if(!d&&"string"==typeof b)return c=new u(b),c[gb]();if(!d&&b.length!==a)return c=new w(b),c[gb]();if(!d)throw new TypeError("Object is not iterable");return b[gb]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>Ec?Ec:b):b}function C(a,b){return T(a)||(a=dc),new Vc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function D(a,b){return new Vc(function(c){var d=new Xb,e=new Yb;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=Bc(f)),d=new Xb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function E(a,b){var c=this;return new Vc(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function F(){return!1}function G(){return[]}function H(a,b,c){var d=lb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Z(e)&&(e=Bc(e)),(jb(e)||ib(e))&&(e=Fc(e)),e}).concatAll()}function I(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function J(a){this.comparer=a,this.set=[]}function K(a,b,c){var d=lb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Z(e)&&(e=Bc(e)),(jb(e)||ib(e))&&(e=Fc(e)),e}).mergeAll()}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 Jb(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]"==yb.call(a)}),a}()),_="Argument out of range",ab="Object has been disposed";R.config.longStackSupport=!1;var bb=!1;try{throw new Error}catch(cb){bb=!!cb.stack}var db,eb=h(),fb="From previous event:",gb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";M.Set&&"function"==typeof(new M.Set)["@@iterator"]&&(gb="@@iterator");var hb=R.doneEnumerator={done:!0,value:a},ib=R.helpers.isIterable=function(b){return b[gb]!==a},jb=R.helpers.isArrayLike=function(b){return b&&b.length!==a};R.helpers.iterator=gb;var kb,lb=R.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},mb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],nb=mb.length,ob="[object Arguments]",pb="[object Array]",qb="[object Boolean]",rb="[object Date]",sb="[object Error]",tb="[object Function]",ub="[object Number]",vb="[object Object]",wb="[object RegExp]",xb="[object String]",yb=Object.prototype.toString,zb=Object.prototype.hasOwnProperty,Ab=yb.call(arguments)==ob,Bb=Error.prototype,Cb=Object.prototype,Db=String.prototype,Eb=Cb.propertyIsEnumerable;try{kb=!(yb.call(document)==vb&&!({toString:0}+""))}catch(cb){kb=!0}var Fb={};Fb[pb]=Fb[rb]=Fb[ub]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Fb[qb]=Fb[xb]={constructor:!0,toString:!0,valueOf:!0},Fb[sb]=Fb[tb]=Fb[wb]={constructor:!0,toString:!0},Fb[vb]={constructor:!0};var Gb={};!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);Gb.enumErrorProps=Eb.call(Bb,"message")||Eb.call(Bb,"name"),Gb.enumPrototypes=Eb.call(a,"prototype"),Gb.nonEnumArgs=0!=c,Gb.nonEnumShadows=!/valueOf/.test(b)}(1);var Hb=R.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Ib=function(a){return a&&"object"==typeof a?yb.call(a)==ob:!1};Ab||(Ib=function(a){return a&&"object"==typeof a?zb.call(a,"callee"):!1});var Jb=R.internals.isEqual=function(a,b){return o(a,b,[],[])},Kb=({}.hasOwnProperty,Array.prototype.slice),Lb=this.inherits=R.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Mb=R.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},Nb=R.internals.addRef=function(a,b){return new Vc(function(c){return new Sb(b.getDisposable(),a.subscribe(c))})};Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Kb.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(Kb.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(Kb.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 Ob=Object("a"),Pb="a"!=Ob[0]||!(0 in Ob);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=Pb&&{}.toString.call(this)==xb?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=tb)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=Pb&&{}.toString.call(this)==xb?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=tb)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)==pb}),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}),Object.prototype.propertyIsEnumerable||(Object.prototype.propertyIsEnumerable=function(a){for(var b in this)if(b===a)return!0;return!1}),Object.keys||(Object.keys=function(){"use strict";var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString");return function(c){if("object"!=typeof c&&("function"!=typeof c||null===c))throw new TypeError("Object.keys called on non-object");var d,e,f=[];for(d in c)a.call(c,d)&&f.push(d);if(b)for(e=0;nb>e;e++)a.call(c,mb[e])&&f.push(mb[e]);return f}}()),q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Qb=R.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Rb=Qb.prototype;Rb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Rb.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)}}},Rb.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},Tb=Sb.prototype;Tb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Tb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Tb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},Tb.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var Ub=R.Disposable=function(a){this.isDisposed=!1,this.action=a||S};Ub.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Vb=Ub.create=function(a){return new Ub(a)},Wb=Ub.empty={dispose:S},Xb=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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),Yb=R.SerialDisposable=Xb,Zb=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?Wb:new a(this)},b}();r.prototype.dispose=function(){this.scheduler.scheduleWithState(this,t)};var $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 Xb};$b.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},$b.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},$b.prototype.isCancelled=function(){return this.disposable.isDisposed},$b.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var _b=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(),Wb}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}(),ac=_b.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Sb,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),Wb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Sb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Wb});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")})}}(_b.prototype),function(){_b.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},_b.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 Vb(function(){M.clearInterval(e)})}}(_b.prototype),function(a){a.catchError=a["catch"]=function(a){return new ic(this,a)}}(_b.prototype);var bc,cc=(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 Xb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),_b.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+ac(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new _b(V,a,b,c)}()),dc=_b.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-_b.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()+_b.normalize(c),g=new $b(this,b,d,f);if(e)e.enqueue(g);else{e=new Qb(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 _b(V,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),ec=S,fc=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}}(),gc=fc.setTimeout,hc=fc.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}var b=RegExp("^"+String(yb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=Q&&P&&Q.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=Q&&P&&Q.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)bc=c,ec=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))bc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};M.addEventListener?M.addEventListener("message",h,!1):M.attachEvent("onmessage",h,!1),bc=function(a){var b=g++;f[b]=a,M.postMessage(e+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]},bc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in M&&"onreadystatechange"in M.document.createElement("script")?bc=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)}:(bc=function(a){return gc(a,0)},ec=hc)}();var ic=(_b.timeout=function(){function a(a,b){var c=this,d=new Xb,e=bc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Sb(d,Vb(function(){ec(e)}))}function b(a,b,c){var d=this,e=_b.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Xb,g=gc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Sb(f,Vb(function(){hc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new _b(V,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 Lb(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 Wb}}},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 Xb;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}(_b)),jc=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=cc),new Vc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),kc=jc.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 jc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),lc=jc.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 jc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),mc=jc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new jc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),nc=R.internals.Enumerator=function(a){this._next=a};nc.prototype.next=function(){return this._next()},nc.prototype[gb]=function(){return this};var oc=R.internals.Enumerable=function(a){this._iterator=a};oc.prototype[gb]=function(){return this._iterator()},oc.prototype.concat=function(){var a=this;return new Vc(function(b){var c,d=a[gb](),e=new Yb,f=cc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;Z(h)&&(h=Bc(h));var i=new Xb;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Sb(e,f,Vb(function(){c=!0}))})},oc.prototype.catchError=function(){var a=this;return new Vc(function(b){var c,d=a[gb](),e=new Yb,f=cc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;Z(i)&&(i=Bc(i));var j=new Xb;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Sb(e,f,Vb(function(){c=!0}))})},oc.prototype.catchErrorWhen=function(a){var b=this;return new Vc(function(c){var d,e,f=new Yc,g=new Yc,h=a(f),i=h.subscribe(g),j=b[gb](),k=new Yb,l=cc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;Z(i)&&(i=Bc(i));var l=new Xb,m=new Xb;k.setDisposable(new Sb(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Sb(i,k,l,Vb(function(){d=!0}))})};var pc=oc.repeat=function(a,b){return null==b&&(b=-1),new oc(function(){var c=b;return new nc(function(){return 0===c?hb:(c>0&&c--,{done:!1,value:a})})})},qc=oc.of=function(a,b,c){if(b)var d=lb(b,c,3);return new oc(function(){var c=-1;return new nc(function(){return++c0&&(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}(uc),yc=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Lb(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.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(xc),zc=R.Observable=function(){function a(a){if(R.config.longStackSupport&&bb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){d(a,c),e(a)},a.call(c,b)}}else this._subscribe=a}return tc=a.prototype,tc.subscribe=tc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:sc(a,b,c))},tc.subscribeOnNext=function(a,b){return this._subscribe(sc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},tc.subscribeOnError=function(a,b){return this._subscribe(sc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},tc.subscribeOnCompleted=function(a,b){return this._subscribe(sc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Ac=R.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Vb(a):Wb}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new Wc(a),d=[b,this];return dc.scheduleRequired()?dc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Lb(e,a),e}(zc);tc.observeOn=function(a){var b=this;return new Vc(function(c){return b.subscribe(new yc(a,c))},b)},tc.subscribeOn=function(a){var b=this;return new Vc(function(c){var d=new Xb,e=new Yb;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new r(a,b.subscribe(c)))})),e},b)};var Bc=zc.fromPromise=function(a){return Cc(function(){var b=new R.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};tc.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)})})},tc.toArray=function(){var a=this;return new Vc(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},zc.create=zc.createWithDisposable=function(a,b){return new Vc(a,b)};var Cc=zc.defer=function(a){return new Vc(function(b){var c;try{c=a()}catch(d){return Lc(d).subscribe(b)}return Z(c)&&(c=Bc(c)),c.subscribe(b)})},Dc=zc.empty=function(a){return T(a)||(a=cc),new Vc(function(b){return a.schedule(function(){b.onCompleted()})})},Ec=Math.pow(2,53)-1;u.prototype[gb]=function(){return new v(this._s)},v.prototype[gb]=function(){return this},v.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return C(null,a)},zc.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);return C(a,b)},zc.pairs=function(a,b){return b||(b=R.Scheduler.currentThread),new Vc(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},zc.range=function(a,b,c){return T(c)||(c=dc),new Vc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},zc.repeat=function(a,b,c){return T(c)||(c=dc),Kc(a,c).repeat(null==b?-1:b)};var Kc=zc["return"]=zc.just=function(a,b){return T(b)||(b=cc),new Vc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};zc.returnValue=function(){return Kc.apply(null,arguments)};var Lc=zc["throw"]=zc.throwError=function(a,b){return T(b)||(b=cc),new Vc(function(c){return b.schedule(function(){c.onError(a)})})};zc.throwException=function(){return zc.throwError.apply(null,arguments)},zc.using=function(a,b){return new Vc(function(c){var d,e,f=Wb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Sb(Lc(g).subscribe(c),f)}return new Sb(e.subscribe(c),f)})},tc.amb=function(a){var b=this;return new Vc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Xb,j=new Xb;return Z(a)&&(a=Bc(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 Sb(i,j)})},zc.amb=function(){function a(a,b){return a.amb(b)}var b=Jc(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},tc["catch"]=tc.catchError=function(a){return"function"==typeof a?D(this,a):Mc([this,a])},tc.catchException=function(a){return this.catchError(a)};var Mc=zc.catchError=zc["catch"]=zc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return qc(a).catchError()};tc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Nc.apply(this,a)};var Nc=zc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Vc(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every(U))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every(U)&&b.onCompleted()}function e(a){j[a]=!0,j.every(U)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new Xb;Z(f)&&(f=Bc(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new Sb(l)},this)};tc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Oc.apply(null,a)};var Oc=zc.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return qc(a).concat()};tc.concatAll=tc.concatObservable=function(){return this.merge(1)},tc.merge=function(a){if("number"!=typeof a)return Pc(this,a);var b=this;return new Vc(function(c){function d(a){var b=new Xb;f.add(b),Z(a)&&(a=Bc(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Sb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Pc=zc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(T(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=cc,b=0;d>b;b++)c.push(arguments[b]);else for(a=cc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),C(a,c).mergeAll()};tc.mergeAll=function(){var a=this;return new Vc(function(b){var c=new Sb,d=!1,e=new Xb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Xb;c.add(e),Z(a)&&(a=Bc(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},tc.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},tc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return Qc([this,a])};var Qc=zc.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Vc(function(b){var c=0,d=new Yb,e=cc.scheduleRecursive(function(e){var f,g;cb;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new Vc(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new Xb;Z(d)&&(d=Bc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(U)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new Xb;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new Sb(j)},this)},tc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return E.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new Vc(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every(U)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,G),i=p(g,F),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new Xb;Z(e)&&(e=Bc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new Sb(j)},d)},zc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},zc.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Vc(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=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Xb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Sb(h)})},tc.asObservable=function(){var a=this;return new Vc(function(b){return a.subscribe(b)},this)},tc.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})},tc.dematerialize=function(){var a=this;return new Vc(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},tc.distinctUntilChanged=function(a,b){var c=this;return b||(b=W),new Vc(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},tc["do"]=tc.tap=tc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?sc(a||S,b||S,c||S):a;return new Vc(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},tc.doOnNext=tc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},tc.doOnError=tc.tapOnError=function(a,b){return this.tap(S,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},tc.doOnCompleted=tc.tapOnCompleted=function(a,b){return this.tap(S,null,"undefined"!=typeof b?function(){a.call(b)}:a)},tc["finally"]=tc.ensure=function(a){var b=this;return new Vc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Vb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},tc.finallyAction=function(a){return this.ensure(a)},tc.ignoreElements=function(){var a=this;return new Vc(function(b){return a.subscribe(S,function(a){b.onError(a)},function(){b.onCompleted()})},a)},tc.materialize=function(){var a=this;return new Vc(function(b){return a.subscribe(function(a){b.onNext(kc(a))},function(a){b.onNext(lc(a)),b.onCompleted()},function(){b.onNext(mc()),b.onCompleted()})},a)},tc.repeat=function(a){return pc(this,a).concat()},tc.retry=function(a){return pc(this,a).catchError()},tc.retryWhen=function(a){return pc(this).catchErrorWhen(a)},tc.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 Vc(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},tc.skipLast=function(a){var b=this;return new Vc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},tc.startWith=function(){var a,b=0;arguments.length&&T(arguments[0])?(a=arguments[0],b=1):a=cc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return qc([Ic(c,a),this]).concat()},tc.takeLast=function(a){var b=this;return new Vc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},tc.takeLastBuffer=function(a){var b=this;return new Vc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},tc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(_);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(_);return new Vc(function(d){function e(){var a=new Yc;i.push(a),d.onNext(Nb(a,g))}var f=new Xb,g=new Zb(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},c)},tc.selectConcat=tc.concatMap=function(a,b,c){return $(a)&&$(b)?this.concatMap(function(c,d){var e=a(c,d);return Z(e)&&(e=Bc(e)),(jb(e)||ib(e))&&(e=Fc(e)),e.map(function(a,e){return b(c,a,d,e)})}):$(a)?H(this,a,c):H(this,function(){return a})},tc.concatMapObserver=tc.selectConcatObserver=function(a,b,c,d){var e=this,f=lb(a,d,2),g=lb(b,d,1),h=lb(c,d,0);return new Vc(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}Z(d)&&(d=Bc(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}Z(c)&&(c=Bc(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}Z(b)&&(b=Bc(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},tc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Vc(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},J.prototype.push=function(a){var b=-1===I(this.set,a,this.comparer);return b&&this.set.push(a),b},tc.distinct=function(a,b){var c=this;return b||(b=W),new Vc(function(d){var e=new J(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)},function(a){d.onError(a)},function(){d.onCompleted()})},this)};var Rc=function(a){function b(b,c,d){this.source=b,this.selector=lb(c,d,3),a.call(this)}return Lb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new Sc(a,this.selector,this))},b}(Ac),Sc=function(a){function b(b,c,d){this.observer=b,this.selector=c,this.source=d,this.index=0,a.call(this)}return Lb(b,a),b.prototype.next=function(a){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(uc);tc.map=tc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Rc?this.internalMap(a,b):new Rc(this,c,b)},tc.pluck=function(a){return this.map(function(b){return b[a]})},tc.selectMany=tc.flatMap=function(a,b,c){return $(a)&&$(b)?this.flatMap(function(c,d){var e=a(c,d);return Z(e)&&(e=Bc(e)),(jb(e)||ib(e))&&(e=Fc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):$(a)?K(this,a,c):K(this,function(){return a})},tc.flatMapObserver=tc.selectManyObserver=function(a,b,c,d){var e=this;return new Vc(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)}Z(c)&&(c=Bc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}Z(c)&&(c=Bc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}Z(a)&&(a=Bc(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},tc.selectSwitch=tc.flatMapLatest=tc.switchMap=function(a,b){return this.select(a,b).switchLatest()},tc.skip=function(a){if(0>a)throw new Error(_);var b=this;return new Vc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},tc.skipWhile=function(a,b){var c=this,d=lb(a,b,3);return new Vc(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},tc.take=function(a,b){if(0>a)throw new RangeError(_);if(0===a)return Dc(b);var c=this;return new Vc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},tc.takeWhile=function(a,b){var c=this,d=lb(a,b,3);return new Vc(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Tc=function(a){function b(b,c,d){this.source=b,this.predicate=lb(c,d,3),a.call(this)}return Lb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Uc(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Ac),Uc=function(a){function b(b,c,d){this.observer=b,this.predicate=c,this.source=d,this.index=0,a.call(this)}return Lb(b,a),b.prototype.next=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(uc);tc.filter=tc.where=function(a,b){return this instanceof Tc?this.internalFilter(a,b):new Tc(this,a,b)},tc.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 Vc(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)})},c)};var Vc=R.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Vb(a):Wb}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new Wc(a),e=[d,b];return dc.scheduleRequired()?dc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Lb(d,a),d}(zc),Wc=function(a){function b(b){a.call(this),this.observer=b,this.m=new Xb}Lb(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(uc),Xc=function(a,b){this.subject=a,this.observer=b};Xc.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 Yc=R.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),Wb):(a.onCompleted(),Wb):(this.observers.push(a),new Xc(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Lb(e,a),Mb(e.prototype,rc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new Zc(a,b)},e}(zc),Zc=(R.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Wb):(this.observers.push(a),new Xc(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Lb(e,a),Mb(e.prototype,rc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(zc),R.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Lb(c,a),Mb(c.prototype,rc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(zc));"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;var $c=h()}).call(this); +(function(a){function b(a){if(a.isDisposed)throw new Error(cb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(db&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(hb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+hb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===fb&&d>=gb&&$c>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(db)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return fb=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!Jb(a))return b;Ib.nonEnumArgs&&a.length&&Kb(a)&&(a=Mb.call(a));var c=Ib.enumPrototypes&&"function"==typeof a,d=Ib.enumErrorProps&&(a===Db||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Ib.nonEnumShadows&&a!==Eb){var f=a.constructor,g=-1,h=pb;if(a===(f&&f.prototype))var i=a===Fb?zb:a===Db?ub:Ab.call(a),j=Hb[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function t(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function u(){this._s=s}function v(){this._s=s,this._l=s.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&O.isFinite(a)}function z(b){var c,d=b[ib];if(!d&&"string"==typeof b)return c=new u(b),c[ib]();if(!d&&b.length!==a)return c=new w(b),c[ib]();if(!d)throw new TypeError("Object is not iterable");return b[ib]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>Gc?Gc:b):b}function C(a,b){return V(a)||(a=fc),new Vc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function D(a,b){return new Vc(function(c){var d=new Zb,e=new $b;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)}_(f)&&(f=Dc(f)),d=new Zb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function E(a,b){var c=this;return new Vc(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function F(){return!1}function G(){return[]}function H(a,b,c){var d=nb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return _(e)&&(e=Dc(e)),(lb(e)||kb(e))&&(e=Hc(e)),e}).concatAll()}function I(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function J(a){this.comparer=a,this.set=[]}function K(a,b,c){this.observer=a,this.selector=b,this.source=c,this.index=0,this.isStopped=!1}function L(a,b,c){var d=nb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return _(e)&&(e=Dc(e)),(lb(e)||kb(e))&&(e=Hc(e)),e}).mergeAll()}function M(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.index=0,this.isStopped=!1}var N={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},O=N[typeof window]&&window||this,P=N[typeof exports]&&exports&&!exports.nodeType&&exports,Q=N[typeof module]&&module&&!module.nodeType&&module,R=Q&&Q.exports===P&&P,S=N[typeof global]&&global;!S||S.global!==S&&S.window!==S||(O=S);var T={internals:{},config:{Promise:O.Promise},helpers:{}},U=T.helpers.noop=function(){},V=(T.helpers.notDefined=function(a){return"undefined"==typeof a},T.helpers.isScheduler=function(a){return a instanceof T.Scheduler}),W=T.helpers.identity=function(a){return a},X=(T.helpers.pluck=function(a){return function(b){return b[a]}},T.helpers.just=function(a){return function(){return a}},T.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),Y=T.helpers.defaultComparer=function(a,b){return Lb(a,b)},Z=T.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},$=(T.helpers.defaultKeySerializer=function(a){return a.toString()},T.helpers.defaultError=function(a){throw a}),_=T.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},ab=(T.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},T.helpers.not=function(a){return!a},T.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Ab.call(a)}),a}()),bb="Argument out of range",cb="Object has been disposed";T.config.longStackSupport=!1;var db=!1;try{throw new Error}catch(eb){db=!!eb.stack}var fb,gb=h(),hb="From previous event:",ib="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";O.Set&&"function"==typeof(new O.Set)["@@iterator"]&&(ib="@@iterator");var jb=T.doneEnumerator={done:!0,value:a},kb=T.helpers.isIterable=function(b){return b[ib]!==a},lb=T.helpers.isArrayLike=function(b){return b&&b.length!==a};T.helpers.iterator=ib;var mb,nb=T.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},ob=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],pb=ob.length,qb="[object Arguments]",rb="[object Array]",sb="[object Boolean]",tb="[object Date]",ub="[object Error]",vb="[object Function]",wb="[object Number]",xb="[object Object]",yb="[object RegExp]",zb="[object String]",Ab=Object.prototype.toString,Bb=Object.prototype.hasOwnProperty,Cb=Ab.call(arguments)==qb,Db=Error.prototype,Eb=Object.prototype,Fb=String.prototype,Gb=Eb.propertyIsEnumerable;try{mb=!(Ab.call(document)==xb&&!({toString:0}+""))}catch(eb){mb=!0}var Hb={};Hb[rb]=Hb[tb]=Hb[wb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Hb[sb]=Hb[zb]={constructor:!0,toString:!0,valueOf:!0},Hb[ub]=Hb[vb]=Hb[yb]={constructor:!0,toString:!0},Hb[xb]={constructor:!0};var Ib={};!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);Ib.enumErrorProps=Gb.call(Db,"message")||Gb.call(Db,"name"),Ib.enumPrototypes=Gb.call(a,"prototype"),Ib.nonEnumArgs=0!=c,Ib.nonEnumShadows=!/valueOf/.test(b)}(1);var Jb=T.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Kb=function(a){return a&&"object"==typeof a?Ab.call(a)==qb:!1};Cb||(Kb=function(a){return a&&"object"==typeof a?Bb.call(a,"callee"):!1});var Lb=T.internals.isEqual=function(a,b){return o(a,b,[],[])},Mb=({}.hasOwnProperty,Array.prototype.slice),Nb=this.inherits=T.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Ob=T.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},Pb=T.internals.addRef=function(a,b){return new Vc(function(c){return new Ub(b.getDisposable(),a.subscribe(c))})};Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Mb.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(Mb.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(Mb.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 Qb=Object("a"),Rb="a"!=Qb[0]||!(0 in Qb);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=Rb&&{}.toString.call(this)==zb?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=vb)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=Rb&&{}.toString.call(this)==zb?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=vb)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)==rb}),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}),Object.prototype.propertyIsEnumerable||(Object.prototype.propertyIsEnumerable=function(a){for(var b in this)if(b===a)return!0;return!1}),Object.keys||(Object.keys=function(){"use strict";var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString");return function(c){if("object"!=typeof c&&("function"!=typeof c||null===c))throw new TypeError("Object.keys called on non-object");var d,e,f=[];for(d in c)a.call(c,d)&&f.push(d);if(b)for(e=0;pb>e;e++)a.call(c,ob[e])&&f.push(ob[e]);return f}}()),q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Sb=T.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Tb=Sb.prototype;Tb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Tb.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)}}},Tb.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},Vb=Ub.prototype;Vb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Vb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Vb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},Vb.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var Wb=T.Disposable=function(a){this.isDisposed=!1,this.action=a||U};Wb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Xb=Wb.create=function(a){return new Wb(a)},Yb=Wb.empty={dispose:U},Zb=T.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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),$b=T.SerialDisposable=Zb,_b=T.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?Yb:new a(this)},b}();r.prototype.dispose=function(){this.scheduler.scheduleWithState(this,t)};var ac=T.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||Z,this.disposable=new Zb};ac.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},ac.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},ac.prototype.isCancelled=function(){return this.disposable.isDisposed},ac.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var bc=T.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(),Yb}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=X,a.normalize=function(a){return 0>a&&(a=0),a},a}(),cc=bc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Ub,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),Yb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Ub,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Yb});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")})}}(bc.prototype),function(){bc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},bc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof O.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=O.setInterval(function(){d=c(d)},b);return Xb(function(){O.clearInterval(e)})}}(bc.prototype),function(a){a.catchError=a["catch"]=function(a){return new kc(this,a)}}(bc.prototype);var dc,ec=(T.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 Zb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),bc.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+cc(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new bc(X,a,b,c)}()),fc=bc.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-bc.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()+bc.normalize(c),g=new ac(this,b,d,f);if(e)e.enqueue(g);else{e=new Sb(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 bc(X,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),gc=U,hc=function(){var a,b=U;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!O.setTimeout)throw new Error("No concurrency detected!");a=O.setTimeout,b=O.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),ic=hc.setTimeout,jc=hc.clearTimeout;!function(){function a(){if(!O.postMessage||O.importScripts)return!1;var a=!1,b=O.onmessage;return O.onmessage=function(){a=!0},O.postMessage("","*"),O.onmessage=b,a}var b=RegExp("^"+String(Ab).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=S&&R&&S.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=S&&R&&S.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)dc=c,gc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))dc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};O.addEventListener?O.addEventListener("message",h,!1):O.attachEvent("onmessage",h,!1),dc=function(a){var b=g++;f[b]=a,O.postMessage(e+b,"*")}}else if(O.MessageChannel){var i=new O.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},dc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in O&&"onreadystatechange"in O.document.createElement("script")?dc=function(a){var b=O.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},O.document.documentElement.appendChild(b)}:(dc=function(a){return ic(a,0)},gc=jc)}();var kc=(bc.timeout=function(){function a(a,b){var c=this,d=new Zb,e=dc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Ub(d,Xb(function(){gc(e)}))}function b(a,b,c){var d=this,e=bc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Zb,g=ic(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Ub(f,Xb(function(){jc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new bc(X,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 Nb(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 Yb}}},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 Zb;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}(bc)),lc=T.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 V(a)||(a=ec),new Vc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),mc=lc.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 lc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),nc=lc.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 lc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),oc=lc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new lc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),pc=T.internals.Enumerator=function(a){this._next=a};pc.prototype.next=function(){return this._next()},pc.prototype[ib]=function(){return this};var qc=T.internals.Enumerable=function(a){this._iterator=a};qc.prototype[ib]=function(){return this._iterator()},qc.prototype.concat=function(){var a=this;return new Vc(function(b){var c,d=a[ib](),e=new $b,f=ec.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;_(h)&&(h=Dc(h));var i=new Zb;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Ub(e,f,Xb(function(){c=!0}))})},qc.prototype.catchError=function(){var a=this;return new Vc(function(b){var c,d=a[ib](),e=new $b,f=ec.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;_(i)&&(i=Dc(i));var j=new Zb;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Ub(e,f,Xb(function(){c=!0}))})},qc.prototype.catchErrorWhen=function(a){var b=this;return new Vc(function(c){var d,e,f=new Yc,g=new Yc,h=a(f),i=h.subscribe(g),j=b[ib](),k=new $b,l=ec.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;_(i)&&(i=Dc(i));var l=new Zb,m=new Zb;k.setDisposable(new Ub(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Ub(i,k,l,Xb(function(){d=!0}))})};var rc=qc.repeat=function(a,b){return null==b&&(b=-1),new qc(function(){var c=b;return new pc(function(){return 0===c?jb:(c>0&&c--,{done:!1,value:a})})})},sc=qc.of=function(a,b,c){if(b)var d=nb(b,c,3);return new qc(function(){var c=-1;return new pc(function(){return++c0&&(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}(wc),Ac=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Nb(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.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(zc),Bc=T.Observable=function(){function a(a){if(T.config.longStackSupport&&db){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){d(a,c),e(a)},a.call(c,b)}}else this._subscribe=a}return vc=a.prototype,vc.subscribe=vc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:uc(a,b,c))},vc.subscribeOnNext=function(a,b){return this._subscribe(uc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},vc.subscribeOnError=function(a,b){return this._subscribe(uc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},vc.subscribeOnCompleted=function(a,b){return this._subscribe(uc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Cc=T.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Xb(a):Yb}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new Wc(a),d=[b,this];return fc.scheduleRequired()?fc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Nb(e,a),e.prototype.subscribeCore=function(){throw new Error("Not implemeneted")},e}(Bc);vc.observeOn=function(a){var b=this;return new Vc(function(c){return b.subscribe(new Ac(a,c))},b)},vc.subscribeOn=function(a){var b=this;return new Vc(function(c){var d=new Zb,e=new $b;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new r(a,b.subscribe(c)))})),e},b)};var Dc=Bc.fromPromise=function(a){return Ec(function(){var b=new T.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};vc.toPromise=function(a){if(a||(a=T.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)})})},vc.toArray=function(){var a=this;return new Vc(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},Bc.create=Bc.createWithDisposable=function(a,b){return new Vc(a,b)};var Ec=Bc.defer=function(a){return new Vc(function(b){var c;try{c=a()}catch(d){return Nc(d).subscribe(b)}return _(c)&&(c=Dc(c)),c.subscribe(b)})},Fc=Bc.empty=function(a){return V(a)||(a=ec),new Vc(function(b){return a.schedule(function(){b.onCompleted()})})},Gc=Math.pow(2,53)-1;u.prototype[ib]=function(){return new v(this._s)},v.prototype[ib]=function(){return this},v.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return C(null,a)},Bc.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);return C(a,b)},Bc.pairs=function(a,b){return b||(b=T.Scheduler.currentThread),new Vc(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},Bc.range=function(a,b,c){return V(c)||(c=fc),new Vc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},Bc.repeat=function(a,b,c){return V(c)||(c=fc),Mc(a,c).repeat(null==b?-1:b)};var Mc=Bc["return"]=Bc.just=function(a,b){return V(b)||(b=ec),new Vc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Bc.returnValue=function(){return Mc.apply(null,arguments)};var Nc=Bc["throw"]=Bc.throwError=function(a,b){return V(b)||(b=ec),new Vc(function(c){return b.schedule(function(){c.onError(a)})})};Bc.throwException=function(){return Bc.throwError.apply(null,arguments)},Bc.using=function(a,b){return new Vc(function(c){var d,e,f=Yb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Ub(Nc(g).subscribe(c),f)}return new Ub(e.subscribe(c),f)})},vc.amb=function(a){var b=this;return new Vc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Zb,j=new Zb;return _(a)&&(a=Dc(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 Ub(i,j)})},Bc.amb=function(){function a(a,b){return a.amb(b)}var b=Lc(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},vc["catch"]=vc.catchError=function(a){return"function"==typeof a?D(this,a):Oc([this,a])},vc.catchException=function(a){return this.catchError(a)};var Oc=Bc.catchError=Bc["catch"]=Bc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return sc(a).catchError()};vc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Pc.apply(this,a)};var Pc=Bc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Vc(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every(W))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every(W)&&b.onCompleted()}function e(a){j[a]=!0,j.every(W)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new Zb;_(f)&&(f=Dc(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new Ub(l)},this)};vc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Qc.apply(null,a)};var Qc=Bc.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return sc(a).concat()};vc.concatAll=vc.concatObservable=function(){return this.merge(1)},vc.merge=function(a){if("number"!=typeof a)return Rc(this,a);var b=this;return new Vc(function(c){function d(a){var b=new Zb;f.add(b),_(a)&&(a=Dc(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Ub,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Rc=Bc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(V(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=ec,b=0;d>b;b++)c.push(arguments[b]);else for(a=ec,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),C(a,c).mergeAll()};vc.mergeAll=function(){var a=this;return new Vc(function(b){var c=new Ub,d=!1,e=new Zb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Zb;c.add(e),_(a)&&(a=Dc(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},vc.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},vc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return Sc([this,a])};var Sc=Bc.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Vc(function(b){var c=0,d=new $b,e=ec.scheduleRecursive(function(e){var f,g;cb;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new Vc(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new Zb;_(d)&&(d=Dc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(W)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new Zb;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new Ub(j)},this)},vc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return E.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new Vc(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every(W)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,G),i=p(g,F),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new Zb;_(e)&&(e=Dc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new Ub(j)},d)},Bc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},Bc.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Vc(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(W))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(W)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Zb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Ub(h)})},vc.asObservable=function(){var a=this;return new Vc(function(b){return a.subscribe(b)},this)},vc.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})},vc.dematerialize=function(){var a=this;return new Vc(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},vc.distinctUntilChanged=function(a,b){var c=this;return b||(b=Y),new Vc(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},vc["do"]=vc.tap=vc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?uc(a||U,b||U,c||U):a;return new Vc(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},vc.doOnNext=vc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},vc.doOnError=vc.tapOnError=function(a,b){return this.tap(U,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},vc.doOnCompleted=vc.tapOnCompleted=function(a,b){return this.tap(U,null,"undefined"!=typeof b?function(){a.call(b)}:a)},vc["finally"]=vc.ensure=function(a){var b=this;return new Vc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Xb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},vc.finallyAction=function(a){return this.ensure(a)},vc.ignoreElements=function(){var a=this;return new Vc(function(b){return a.subscribe(U,function(a){b.onError(a)},function(){b.onCompleted()})},a)},vc.materialize=function(){var a=this;return new Vc(function(b){return a.subscribe(function(a){b.onNext(mc(a))},function(a){b.onNext(nc(a)),b.onCompleted()},function(){b.onNext(oc()),b.onCompleted()})},a)},vc.repeat=function(a){return rc(this,a).concat()},vc.retry=function(a){return rc(this,a).catchError()},vc.retryWhen=function(a){return rc(this).catchErrorWhen(a)},vc.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 Vc(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},vc.skipLast=function(a){var b=this;return new Vc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},vc.startWith=function(){var a,b=0;arguments.length&&V(arguments[0])?(a=arguments[0],b=1):a=ec;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return sc([Kc(c,a),this]).concat()},vc.takeLast=function(a){var b=this;return new Vc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},vc.takeLastBuffer=function(a){var b=this;return new Vc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},vc.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 Vc(function(d){function e(){var a=new Yc;i.push(a),d.onNext(Pb(a,g))}var f=new Zb,g=new _b(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},c)},vc.selectConcat=vc.concatMap=function(a,b,c){return ab(a)&&ab(b)?this.concatMap(function(c,d){var e=a(c,d);return _(e)&&(e=Dc(e)),(lb(e)||kb(e))&&(e=Hc(e)),e.map(function(a,e){return b(c,a,d,e)})}):ab(a)?H(this,a,c):H(this,function(){return a})},vc.concatMapObserver=vc.selectConcatObserver=function(a,b,c,d){var e=this,f=nb(a,d,2),g=nb(b,d,1),h=nb(c,d,0);return new Vc(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}_(d)&&(d=Dc(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}_(c)&&(c=Dc(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}_(b)&&(b=Dc(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},vc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Vc(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},J.prototype.push=function(a){var b=-1===I(this.set,a,this.comparer);return b&&this.set.push(a),b},vc.distinct=function(a,b){var c=this;return b||(b=Y),new Vc(function(d){var e=new J(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)},function(a){d.onError(a)},function(){d.onCompleted()})},this)};var Tc=function(a){function b(b,c,d){this.source=b,this.selector=nb(c,d,3),a.call(this)}return Nb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new K(a,this.selector,this))},b}(Cc);K.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)}},K.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},K.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},K.prototype.dispose=function(){this.isStopped=!0},K.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},vc.map=vc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Tc?this.internalMap(a,b):new Tc(this,c,b)},vc.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},vc.selectMany=vc.flatMap=function(a,b,c){return ab(a)&&ab(b)?this.flatMap(function(c,d){var e=a(c,d);return _(e)&&(e=Dc(e)),(lb(e)||kb(e))&&(e=Hc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):ab(a)?L(this,a,c):L(this,function(){return a})},vc.flatMapObserver=vc.selectManyObserver=function(a,b,c,d){var e=this;return new Vc(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)}_(c)&&(c=Dc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}_(c)&&(c=Dc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}_(a)&&(a=Dc(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},vc.selectSwitch=vc.flatMapLatest=vc.switchMap=function(a,b){return this.select(a,b).switchLatest()},vc.skip=function(a){if(0>a)throw new Error(bb);var b=this;return new Vc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},vc.skipWhile=function(a,b){var c=this,d=nb(a,b,3);return new Vc(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},vc.take=function(a,b){if(0>a)throw new RangeError(bb);if(0===a)return Fc(b);var c=this;return new Vc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},vc.takeWhile=function(a,b){var c=this,d=nb(a,b,3);return new Vc(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Uc=function(a){function b(b,c,d){this.source=b,this.predicate=nb(c,d,3),a.call(this)}return Nb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new M(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Cc);M.prototype.onNext=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},M.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},M.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},M.prototype.dispose=function(){this.isStopped=!0},M.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},vc.filter=vc.where=function(a,b){return this instanceof Uc?this.internalFilter(a,b):new Uc(this,a,b)},vc.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 Vc(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)})},c)};var Vc=T.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Xb(a):Yb}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new Wc(a),e=[d,b];return fc.scheduleRequired()?fc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Nb(d,a),d}(Bc),Wc=function(a){function b(b){a.call(this),this.observer=b,this.m=new Zb}Nb(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(wc),Xc=function(a,b){this.subject=a,this.observer=b};Xc.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 Yc=T.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),Yb):(a.onCompleted(),Yb):(this.observers.push(a),new Xc(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Nb(e,a),Ob(e.prototype,tc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new Zc(a,b)},e}(Bc),Zc=(T.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Yb):(this.observers.push(a),new Xc(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Nb(e,a),Ob(e.prototype,tc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(Bc),T.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Nb(c,a),Ob(c.prototype,tc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Bc));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(O.Rx=T,define(function(){return T})):P&&Q?R?(Q.exports=T).Rx=T:P.Rx=T:O.Rx=T;var $c=h()}).call(this); //# sourceMappingURL=rx.compat.map \ No newline at end of file diff --git a/dist/rx.js b/dist/rx.js index cc6aa23df..86e4ec5b9 100644 --- a/dist/rx.js +++ b/dist/rx.js @@ -2197,6 +2197,10 @@ __super__.call(this, subscribe); } + ObservableBase.prototype.subscribeCore = function(observer) { + throw new Error('Not implemeneted'); + } + return ObservableBase; }(Observable)); @@ -4128,36 +4132,39 @@ }(ObservableBase)); - var MapObserver = (function (__super__) { - inherits(MapObserver, __super__); + function MapObserver(observer, selector, source) { + this.observer = observer; + this.selector = selector; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function MapObserver(observer, selector, source) { - this.observer = observer; - this.selector = selector; - this.source = source; - this.index = 0; - __super__.call(this); + MapObserver.prototype.onNext = function(x) { + if (this.isStopped) { return; } + try { + var result = this.selector(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } - - MapObserver.prototype.next = function(x) { - try { - var result = this.selector(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - this.observer.onNext(result); - }; - - MapObserver.prototype.error = function (e) { + this.observer.onNext(result); + }; + MapObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + MapObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + MapObserver.prototype.dispose = function() { this.isStopped = true; }; + MapObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; - - MapObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; + return true; + } - return MapObserver; - }(AbstractObserver)); + return false; + }; /** * Projects each element of an observable sequence into a new form by incorporating the element's index. @@ -4173,12 +4180,26 @@ }; /** - * Retrieves the value of a specified property from all elements in the Observable sequence. - * @param {String} prop The property to pluck. + * Retrieves the value of a specified nested property from all elements in + * the Observable sequence. + * @param {Arguments} arguments The nested properties to pluck. * @returns {Observable} Returns a new Observable sequence of property values. */ - observableProto.pluck = function (prop) { - return this.map(function (x) { return x[prop]; }); + observableProto.pluck = function () { + var args = arguments, len = arguments.length; + if (len === 0) { throw new Error('List of properties cannot be empty.'); } + return this.map(function (x) { + var currentProp = x; + for (var i = 0; i < len; i++) { + var p = currentProp[args[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } else { + return undefined; + } + } + return currentProp; + }); }; /** @@ -4416,36 +4437,41 @@ }(ObservableBase)); - var FilterObserver = (function (__super__) { - inherits(FilterObserver, __super__); + function FilterObserver(observer, predicate, source) { + this.observer = observer; + this.predicate = predicate; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function FilterObserver(observer, predicate, source) { - this.observer = observer; - this.predicate = predicate; - this.source = source; - this.index = 0; - __super__.call(this); + FilterObserver.prototype.onNext = function(x) { + try { + var shouldYield = this.predicate(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } + shouldYield && this.observer.onNext(x); + }; - FilterObserver.prototype.next = function(x) { - try { - var shouldYield = this.predicate(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - shouldYield && this.observer.onNext(x); - }; - - FilterObserver.prototype.error = function (e) { + FilterObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + FilterObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + FilterObserver.prototype.dispose = function() { this.isStopped = true; }; + FilterObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; + return true; + } + + return false; + }; - FilterObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; - return FilterObserver; - }(AbstractObserver)); /** * Filters the elements of an observable sequence based on a predicate by incorporating the element's index. diff --git a/dist/rx.lite.compat.js b/dist/rx.lite.compat.js index 5dd5efe0f..dba775372 100644 --- a/dist/rx.lite.compat.js +++ b/dist/rx.lite.compat.js @@ -2083,6 +2083,10 @@ __super__.call(this, subscribe); } + ObservableBase.prototype.subscribeCore = function(observer) { + throw new Error('Not implemeneted'); + } + return ObservableBase; }(Observable)); @@ -3565,36 +3569,39 @@ }(ObservableBase)); - var MapObserver = (function (__super__) { - inherits(MapObserver, __super__); + function MapObserver(observer, selector, source) { + this.observer = observer; + this.selector = selector; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function MapObserver(observer, selector, source) { - this.observer = observer; - this.selector = selector; - this.source = source; - this.index = 0; - __super__.call(this); + MapObserver.prototype.onNext = function(x) { + if (this.isStopped) { return; } + try { + var result = this.selector(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } - - MapObserver.prototype.next = function(x) { - try { - var result = this.selector(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - this.observer.onNext(result); - }; - - MapObserver.prototype.error = function (e) { + this.observer.onNext(result); + }; + MapObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + MapObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + MapObserver.prototype.dispose = function() { this.isStopped = true; }; + MapObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; - - MapObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; + return true; + } - return MapObserver; - }(AbstractObserver)); + return false; + }; /** * Projects each element of an observable sequence into a new form by incorporating the element's index. @@ -3610,12 +3617,26 @@ }; /** - * Retrieves the value of a specified property from all elements in the Observable sequence. - * @param {String} prop The property to pluck. + * Retrieves the value of a specified nested property from all elements in + * the Observable sequence. + * @param {Arguments} arguments The nested properties to pluck. * @returns {Observable} Returns a new Observable sequence of property values. */ - observableProto.pluck = function (prop) { - return this.map(function (x) { return x[prop]; }); + observableProto.pluck = function () { + var args = arguments, len = arguments.length; + if (len === 0) { throw new Error('List of properties cannot be empty.'); } + return this.map(function (x) { + var currentProp = x; + for (var i = 0; i < len; i++) { + var p = currentProp[args[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } else { + return undefined; + } + } + return currentProp; + }); }; function flatMap(source, selector, thisArg) { @@ -3801,36 +3822,41 @@ }(ObservableBase)); - var FilterObserver = (function (__super__) { - inherits(FilterObserver, __super__); + function FilterObserver(observer, predicate, source) { + this.observer = observer; + this.predicate = predicate; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function FilterObserver(observer, predicate, source) { - this.observer = observer; - this.predicate = predicate; - this.source = source; - this.index = 0; - __super__.call(this); + FilterObserver.prototype.onNext = function(x) { + try { + var shouldYield = this.predicate(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } + shouldYield && this.observer.onNext(x); + }; - FilterObserver.prototype.next = function(x) { - try { - var shouldYield = this.predicate(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - shouldYield && this.observer.onNext(x); - }; - - FilterObserver.prototype.error = function (e) { + FilterObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + FilterObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + FilterObserver.prototype.dispose = function() { this.isStopped = true; }; + FilterObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; + return true; + } + + return false; + }; - FilterObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; - return FilterObserver; - }(AbstractObserver)); /** * Filters the elements of an observable sequence based on a predicate by incorporating the element's index. diff --git a/dist/rx.lite.compat.map b/dist/rx.lite.compat.map index 3cf14dfca..fb69f37e5 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","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","scheduler","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","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","scheduleRecursiveWithAbsoluteAndState","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","getDisposable","Function","that","args","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","fun","thisp","filter","predicate","results","t","isArray","searchElement","n","Infinity","keys","hasDontEnumBug","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","scheduleRecursiveWithAbsolute","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","observableProto","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","observerCreate","AnonymousObserver","AbstractObserver","__super__","isStopped","completed","fail","_onNext","_onError","_onCompleted","Observable","_subscribe","oldOnError","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","mapper","list","FromArrayObservable","sink","FromArraySink","run","loopRecursive","observableFromArray","fromArray","never","ofWithScheduler","pairs","range","observableReturn","throwError","throwException","handlerOrSecond","observableCatch","catchException","combineLatest","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","m","innerSubscription","mergeObservable","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","i2","MapObservable","internalMap","MapObserver","select","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","take","RangeError","takeWhile","FilterObservable","FilterObserver","internalFilter","shouldYield","where","fromCallback","context","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","Ember","publish","addHandler","removeHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","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","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","controlled","transduce","transducer","transformForObserver","init","step","obs","input","xform","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","createRemovableDisposable","so","_trim","windowSize","MAX_VALUE","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAM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,UAAU3wB,OAAS,IAK1B6I,YAAa,WAEX,GADAvJ,EAAcqH,OACVA,KAAKkb,UAAT,CACAlb,KAAKkb,WAAY,CACjB,IAAI/T,GAAMnH,KAAK0B,UAAUyF,KACzBnH,MAAKuqB,MAAMpjB,EACX,KAAK,GAAIhO,GAAI,EAAGgxB,EAAKnxB,EAAWgH,KAAKgqB,WAAY5wB,EAAM+wB,EAAG9wB,OAAYD,EAAJD,EAASA,IAAK,CAC9E,GAAI4I,GAAWooB,EAAGhxB,EAClB4I,GAASG,cACTH,EAASwa,eAEXvc,KAAKgqB,UAAU3wB,OAAS,IAK1BqX,QAAS,WACP1Q,KAAKnH,YAAa,EAClBmH,KAAKgqB,UAAY,QAIdjE,GACPvK,GAKFhR,GAAGkgB,OAAU,SAAUzP,GAGrB,QAASyP,KACPzP,EAAU7e,KAAK4D,MAajB,MAhBAmN,IAASud,EAAQzP,GASjByP,EAAOztB,UAAUgrB,MAAQ,WAAcjoB,KAAKiC,QAAO,IAKnDyoB,EAAOztB,UAAUirB,OAAS,WAAcloB,KAAKiC,QAAO,IAE7CyoB,GACP3Q,IAEmB,kBAAV4Q,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzEhqB,EAAK4J,GAAKA,EAEVmgB,OAAO,WACL,MAAOngB,MAEAR,GAAeG,EAEpBE,GACDF,EAAWF,QAAUO,GAAIA,GAAKA,EAE/BR,EAAYQ,GAAKA,EAInB5J,EAAK4J,GAAKA,CAIZ,IAAIrP,IAAcC,MAElBgB,KAAK4D"} \ No newline at end of file +{"version":3,"file":"rx.lite.compat.min.js","sources":["rx.lite.compat.js"],"names":["undefined","checkDisposed","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","scheduler","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","x","isArrayLike","isIterable","observableFrom","concatAll","MapObserver","isStopped","flatMap","mergeAll","FilterObserver","predicate","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","scheduleRecursiveWithAbsoluteAndState","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","getDisposable","Function","that","args","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","fun","thisp","filter","results","t","isArray","searchElement","n","Infinity","keys","hasDontEnumBug","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","scheduleRecursiveWithAbsolute","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","observableProto","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","observerCreate","AnonymousObserver","AbstractObserver","__super__","completed","fail","_onNext","_onError","_onCompleted","Observable","_subscribe","oldOnError","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","mapper","list","FromArrayObservable","sink","FromArraySink","run","loopRecursive","observableFromArray","fromArray","never","ofWithScheduler","pairs","range","observableReturn","throwError","throwException","handlerOrSecond","observableCatch","catchException","combineLatest","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","m","innerSubscription","mergeObservable","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","i2","MapObservable","internalMap","select","currentProp","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","take","RangeError","takeWhile","FilterObservable","internalFilter","shouldYield","where","fromCallback","context","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","Ember","publish","addHandler","removeHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","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","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","controlled","transduce","transducer","transformForObserver","init","step","obs","input","xform","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","createRemovableDisposable","so","_trim","windowSize","MAX_VALUE","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAMC,I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Q,WAAcloB,KAAKiC,QAAO,IAKnD0oB,EAAO1tB,UAAUkrB,OAAS,WAAcnoB,KAAKiC,QAAO,IAE7C0oB,GACPzQ,IAEmB,kBAAV0Q,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzEjqB,EAAKgK,GAAKA,EAEVggB,OAAO,WACL,MAAOhgB,MAEAR,GAAeG,EAEpBE,GACDF,EAAWF,QAAUO,GAAIA,GAAKA,EAE/BR,EAAYQ,GAAKA,EAInBhK,EAAKgK,GAAKA,CAIZ,IAAIzP,IAAcC,MAElBgB,KAAK4D"} \ No newline at end of file diff --git a/dist/rx.lite.compat.min.js b/dist/rx.lite.compat.min.js index 756a17101..db4812c61 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(a){if(a.isDisposed)throw new Error(hb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(ib&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(mb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+mb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===kb&&d>=lb&&jd>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(ib)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return kb=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!Ob(a))return b;Nb.nonEnumArgs&&a.length&&Pb(a)&&(a=Rb.call(a));var c=Nb.enumPrototypes&&"function"==typeof a,d=Nb.enumErrorProps&&(a===Ib||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Nb.nonEnumShadows&&a!==Jb){var f=a.constructor,g=-1,h=ub;if(a===(f&&f.prototype))var i=a===Kb?Eb:a===Ib?zb:Fb.call(a),j=Mb[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(){this._s=s}function t(){this._s=s,this._l=s.length,this._i=0}function u(a){this._a=a}function v(a){this._a=a,this._l=z(a),this._i=0}function w(a){return"number"==typeof a&&T.isFinite(a)}function x(b){var c,d=b[nb];if(!d&&"string"==typeof b)return c=new r(b),c[nb]();if(!d&&b.length!==a)return c=new u(b),c[nb]();if(!d)throw new TypeError("Object is not iterable");return b[nb]()}function y(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function z(a){var b=+a.length;return isNaN(b)?0:0!==b&&w(b)?(b=y(b)*Math.floor(Math.abs(b)),0>=b?0:b>Gc?Gc:b):b}function A(a,b){return $(a)||(a=ic),new bd(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function B(a,b){return new bd(function(c){var d=new bc,e=new cc;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)}eb(f)&&(f=Wc(f)),d=new bc,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function C(a,b){var c=this;return new bd(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function D(){return!1}function E(){return[]}function F(a,b,c){var d=sb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return eb(e)&&(e=Wc(e)),(qb(e)||pb(e))&&(e=Hc(e)),e}).concatAll()}function G(a,b,c){var d=sb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return eb(e)&&(e=Wc(e)),(qb(e)||pb(e))&&(e=Hc(e)),e}).mergeAll()}function H(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=T.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 I(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),_b(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(H(a))};return a.attachEvent("on"+b,d),_b(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,_b(function(){a["on"+b]=null})}function J(a,b,c){var d=new Yb;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(J(a.item(e),b,c));else a&&d.add(I(a,b,c));return d}function K(a,b){return new bd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function L(a,b,c){return new bd(function(d){var e=a,f=fc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function M(a,b){return new bd(function(c){return b.scheduleWithRelative(fc(a),function(){c.onNext(0),c.onCompleted()})})}function N(a,b,c){return a===b?new bd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Ec(function(){return L(c.now()+a,b,c)})}function O(a,b,c){return new bd(function(d){var e,f=!1,g=new cc,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 bc,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 Yb(e,g)},a)}function P(a,b,c){return Ec(function(){return O(a,b-c.now(),c)})}function Q(a,b){return new bd(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Yb(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}function R(a,b,c){return new bd(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(_))){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 Yb(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)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var S={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},T=S[typeof window]&&window||this,U=S[typeof exports]&&exports&&!exports.nodeType&&exports,V=S[typeof module]&&module&&!module.nodeType&&module,W=V&&V.exports===U&&U,X=S[typeof global]&&global;!X||X.global!==X&&X.window!==X||(T=X);var Y={internals:{},config:{Promise:T.Promise},helpers:{}},Z=Y.helpers.noop=function(){},$=(Y.helpers.notDefined=function(a){return"undefined"==typeof a},Y.helpers.isScheduler=function(a){return a instanceof Y.Scheduler}),_=Y.helpers.identity=function(a){return a},ab=(Y.helpers.pluck=function(a){return function(b){return b[a]}},Y.helpers.just=function(a){return function(){return a}},Y.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),bb=Y.helpers.defaultComparer=function(a,b){return Qb(a,b)},cb=Y.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},db=(Y.helpers.defaultKeySerializer=function(a){return a.toString()},Y.helpers.defaultError=function(a){throw a}),eb=Y.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},fb=(Y.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},Y.helpers.not=function(a){return!a},Y.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Fb.call(a)}),a}()),gb="Argument out of range",hb="Object has been disposed";Y.config.longStackSupport=!1;var ib=!1;try{throw new Error}catch(jb){ib=!!jb.stack}var kb,lb=h(),mb="From previous event:",nb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";T.Set&&"function"==typeof(new T.Set)["@@iterator"]&&(nb="@@iterator");var ob=Y.doneEnumerator={done:!0,value:a},pb=Y.helpers.isIterable=function(b){return b[nb]!==a},qb=Y.helpers.isArrayLike=function(b){return b&&b.length!==a};Y.helpers.iterator=nb;var rb,sb=Y.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},tb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ub=tb.length,vb="[object Arguments]",wb="[object Array]",xb="[object Boolean]",yb="[object Date]",zb="[object Error]",Ab="[object Function]",Bb="[object Number]",Cb="[object Object]",Db="[object RegExp]",Eb="[object String]",Fb=Object.prototype.toString,Gb=Object.prototype.hasOwnProperty,Hb=Fb.call(arguments)==vb,Ib=Error.prototype,Jb=Object.prototype,Kb=String.prototype,Lb=Jb.propertyIsEnumerable;try{rb=!(Fb.call(document)==Cb&&!({toString:0}+""))}catch(jb){rb=!0}var Mb={};Mb[wb]=Mb[yb]=Mb[Bb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Mb[xb]=Mb[Eb]={constructor:!0,toString:!0,valueOf:!0},Mb[zb]=Mb[Ab]=Mb[Db]={constructor:!0,toString:!0},Mb[Cb]={constructor:!0};var Nb={};!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);Nb.enumErrorProps=Lb.call(Ib,"message")||Lb.call(Ib,"name"),Nb.enumPrototypes=Lb.call(a,"prototype"),Nb.nonEnumArgs=0!=c,Nb.nonEnumShadows=!/valueOf/.test(b)}(1);var Ob=Y.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Pb=function(a){return a&&"object"==typeof a?Fb.call(a)==vb:!1};Hb||(Pb=function(a){return a&&"object"==typeof a?Gb.call(a,"callee"):!1});{var Qb=Y.internals.isEqual=function(a,b){return o(a,b,[],[])},Rb=({}.hasOwnProperty,Array.prototype.slice),Sb=this.inherits=Y.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Tb=Y.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}};Y.internals.addRef=function(a,b){return new bd(function(c){return new Yb(b.getDisposable(),a.subscribe(c))})}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Rb.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(Rb.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(Rb.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 Ub=Object("a"),Vb="a"!=Ub[0]||!(0 in Ub);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=Vb&&{}.toString.call(this)==Eb?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=Ab)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=Vb&&{}.toString.call(this)==Eb?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=Ab)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)==wb}),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}),Object.prototype.propertyIsEnumerable||(Object.prototype.propertyIsEnumerable=function(a){for(var b in this)if(b===a)return!0;return!1}),Object.keys||(Object.keys=function(){"use strict";var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString");return function(c){if("object"!=typeof c&&("function"!=typeof c||null===c))throw new TypeError("Object.keys called on non-object");var d,e,f=[];for(d in c)a.call(c,d)&&f.push(d);if(b)for(e=0;ub>e;e++)a.call(c,tb[e])&&f.push(tb[e]);return f}}()),q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Wb=Y.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Xb=Wb.prototype;Xb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Xb.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)}}},Xb.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},Zb=Yb.prototype;Zb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Zb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Zb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},Zb.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var $b=Y.Disposable=function(a){this.isDisposed=!1,this.action=a||Z};$b.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var _b=$b.create=function(a){return new $b(a)},ac=$b.empty={dispose:Z},bc=Y.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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),cc=Y.SerialDisposable=bc,dc=(Y.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?ac:new a(this)},b}(),Y.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||cb,this.disposable=new bc});dc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},dc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},dc.prototype.isCancelled=function(){return this.disposable.isDisposed},dc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var ec=Y.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(),ac}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=ab,a.normalize=function(a){return 0>a&&(a=0),a},a}(),fc=ec.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Yb,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),ac});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Yb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),ac});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")})}}(ec.prototype),function(){ec.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},ec.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof T.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=T.setInterval(function(){d=c(d)},b);return _b(function(){T.clearInterval(e)})}}(ec.prototype);var gc,hc=ec.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+fc(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new ec(ab,a,b,c)}(),ic=ec.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-ec.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()+ec.normalize(c),g=new dc(this,b,d,f);if(e)e.enqueue(g);else{e=new Wb(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 ec(ab,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),jc=(Y.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 bc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Z),kc=function(){var a,b=Z;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!T.setTimeout)throw new Error("No concurrency detected!");a=T.setTimeout,b=T.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),lc=kc.setTimeout,mc=kc.clearTimeout;!function(){function a(){if(!T.postMessage||T.importScripts)return!1;var a=!1,b=T.onmessage;return T.onmessage=function(){a=!0},T.postMessage("","*"),T.onmessage=b,a}var b=RegExp("^"+String(Fb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=X&&W&&X.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=X&&W&&X.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)gc=c,jc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))gc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};T.addEventListener?T.addEventListener("message",h,!1):T.attachEvent("onmessage",h,!1),gc=function(a){var b=g++;f[b]=a,T.postMessage(e+b,"*")}}else if(T.MessageChannel){var i=new T.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},gc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in T&&"onreadystatechange"in T.document.createElement("script")?gc=function(a){var b=T.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},T.document.documentElement.appendChild(b)}:(gc=function(a){return lc(a,0)},jc=mc)}();var nc=ec.timeout=function(){function a(a,b){var c=this,d=new bc,e=gc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Yb(d,_b(function(){jc(e)}))}function b(a,b,c){var d=this,e=ec.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new bc,g=lc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Yb(f,_b(function(){mc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new ec(ab,a,b,c)}(),oc=Y.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 $(a)||(a=hc),new bd(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),pc=oc.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 oc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),qc=oc.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 oc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),rc=oc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new oc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),sc=Y.internals.Enumerator=function(a){this._next=a};sc.prototype.next=function(){return this._next()},sc.prototype[nb]=function(){return this};var tc=Y.internals.Enumerable=function(a){this._iterator=a};tc.prototype[nb]=function(){return this._iterator()},tc.prototype.concat=function(){var a=this;return new bd(function(b){var c,d=a[nb](),e=new cc,f=hc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;eb(h)&&(h=Wc(h));var i=new bc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Yb(e,f,_b(function(){c=!0}))})},tc.prototype.catchError=function(){var a=this;return new bd(function(b){var c,d=a[nb](),e=new cc,f=hc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;eb(i)&&(i=Wc(i));var j=new bc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Yb(e,f,_b(function(){c=!0}))})},tc.prototype.catchErrorWhen=function(a){var b=this;return new bd(function(c){var d,e,f=new ed,g=new ed,h=a(f),i=h.subscribe(g),j=b[nb](),k=new cc,l=hc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;eb(i)&&(i=Wc(i));var l=new bc,m=new bc;k.setDisposable(new Yb(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Yb(i,k,l,_b(function(){d=!0}))})};var uc,vc=tc.repeat=function(a,b){return null==b&&(b=-1),new tc(function(){var c=b;return new sc(function(){return 0===c?ob:(c>0&&c--,{done:!1,value:a})})})},wc=tc.of=function(a,b,c){if(b)var d=sb(b,c,3);return new tc(function(){var c=-1;return new sc(function(){return++c0&&(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}(zc);uc.toArray=function(){var a=this;return new bd(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},Bc.create=Bc.createWithDisposable=function(a,b){return new bd(a,b)};var Ec=Bc.defer=function(a){return new bd(function(b){var c;try{c=a()}catch(d){return Mc(d).subscribe(b)}return eb(c)&&(c=Wc(c)),c.subscribe(b)})},Fc=Bc.empty=function(a){return $(a)||(a=hc),new bd(function(b){return a.schedule(function(){b.onCompleted()})})},Gc=Math.pow(2,53)-1;r.prototype[nb]=function(){return new t(this._s)},t.prototype[nb]=function(){return this},t.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return A(null,a)},Bc.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]); -return A(a,b)},Bc.pairs=function(a,b){return b||(b=Y.Scheduler.currentThread),new bd(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},Bc.range=function(a,b,c){return $(c)||(c=ic),new bd(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},Bc.repeat=function(a,b,c){return $(c)||(c=ic),Lc(a,c).repeat(null==b?-1:b)};var Lc=Bc["return"]=Bc.just=function(a,b){return $(b)||(b=hc),new bd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Bc.returnValue=function(){return Lc.apply(null,arguments)};var Mc=Bc["throw"]=Bc.throwError=function(a,b){return $(b)||(b=hc),new bd(function(c){return b.schedule(function(){c.onError(a)})})};Bc.throwException=function(){return Bc.throwError.apply(null,arguments)},uc["catch"]=uc.catchError=function(a){return"function"==typeof a?B(this,a):Nc([this,a])},uc.catchException=function(a){return this.catchError(a)};var Nc=Bc.catchError=Bc["catch"]=Bc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return wc(a).catchError()};uc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Oc.apply(this,a)};var Oc=Bc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new bd(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every(_))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every(_)&&b.onCompleted()}function e(a){j[a]=!0,j.every(_)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new bc;eb(f)&&(f=Wc(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new Yb(l)},this)};uc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Pc.apply(null,a)};var Pc=Bc.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return wc(a).concat()};uc.concatAll=uc.concatObservable=function(){return this.merge(1)},uc.merge=function(a){if("number"!=typeof a)return Qc(this,a);var b=this;return new bd(function(c){function d(a){var b=new bc;f.add(b),eb(a)&&(a=Wc(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Yb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Qc=Bc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if($(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=hc,b=0;d>b;b++)c.push(arguments[b]);else for(a=hc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),A(a,c).mergeAll()};uc.mergeAll=function(){var a=this;return new bd(function(b){var c=new Yb,d=!1,e=new bc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new bc;c.add(e),eb(a)&&(a=Wc(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},uc.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},uc.skipUntil=function(a){var b=this;return new bd(function(c){var d=!1,e=new Yb(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));eb(a)&&(a=Wc(a));var f=new bc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},uc["switch"]=uc.switchLatest=function(){var a=this;return new bd(function(b){var c=!1,d=new cc,e=!1,f=0,g=a.subscribe(function(a){var g=new bc,h=++f;c=!0,d.setDisposable(g),eb(a)&&(a=Wc(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())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new Yb(g,d)},a)},uc.takeUntil=function(a){var b=this;return new bd(function(c){return eb(a)&&(a=Wc(a)),new Yb(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},Z))},b)},uc.withLatestFrom=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new bd(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new bc;eb(d)&&(d=Wc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(_)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new bc;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new Yb(j)},this)},uc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return C.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new bd(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every(_)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,E),i=p(g,D),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new bc;eb(e)&&(e=Wc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new Yb(j)},d)},Bc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},Bc.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new bd(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(_))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(_)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new bc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Yb(h)})},uc.asObservable=function(){var a=this;return new bd(function(b){return a.subscribe(b)},this)},uc.dematerialize=function(){var a=this;return new bd(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},uc.distinctUntilChanged=function(a,b){var c=this;return b||(b=bb),new bd(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},uc["do"]=uc.tap=uc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?yc(a||Z,b||Z,c||Z):a;return new bd(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},uc.doOnNext=uc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},uc.doOnError=uc.tapOnError=function(a,b){return this.tap(Z,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},uc.doOnCompleted=uc.tapOnCompleted=function(a,b){return this.tap(Z,null,"undefined"!=typeof b?function(){a.call(b)}:a)},uc["finally"]=uc.ensure=function(a){var b=this;return new bd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return _b(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},uc.finallyAction=function(a){return this.ensure(a)},uc.ignoreElements=function(){var a=this;return new bd(function(b){return a.subscribe(Z,function(a){b.onError(a)},function(){b.onCompleted()})},a)},uc.materialize=function(){var a=this;return new bd(function(b){return a.subscribe(function(a){b.onNext(pc(a))},function(a){b.onNext(qc(a)),b.onCompleted()},function(){b.onNext(rc()),b.onCompleted()})},a)},uc.repeat=function(a){return vc(this,a).concat()},uc.retry=function(a){return vc(this,a).catchError()},uc.retryWhen=function(a){return vc(this).catchErrorWhen(a)},uc.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 bd(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},uc.skipLast=function(a){var b=this;return new bd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},uc.startWith=function(){var a,b=0;arguments.length&&$(arguments[0])?(a=arguments[0],b=1):a=hc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return wc([Kc(c,a),this]).concat()},uc.takeLast=function(a){var b=this;return new bd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},uc.selectConcat=uc.concatMap=function(a,b,c){return fb(a)&&fb(b)?this.concatMap(function(c,d){var e=a(c,d);return eb(e)&&(e=Wc(e)),(qb(e)||pb(e))&&(e=Hc(e)),e.map(function(a,e){return b(c,a,d,e)})}):fb(a)?F(this,a,c):F(this,function(){return a})};var Rc=function(a){function b(b,c,d){this.source=b,this.selector=sb(c,d,3),a.call(this)}return Sb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new Sc(a,this.selector,this))},b}(Cc),Sc=function(a){function b(b,c,d){this.observer=b,this.selector=c,this.source=d,this.index=0,a.call(this)}return Sb(b,a),b.prototype.next=function(a){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(zc);uc.map=uc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Rc?this.internalMap(a,b):new Rc(this,c,b)},uc.pluck=function(a){return this.map(function(b){return b[a]})},uc.selectMany=uc.flatMap=function(a,b,c){return fb(a)&&fb(b)?this.flatMap(function(c,d){var e=a(c,d);return eb(e)&&(e=Wc(e)),(qb(e)||pb(e))&&(e=Hc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):fb(a)?G(this,a,c):G(this,function(){return a})},uc.selectSwitch=uc.flatMapLatest=uc.switchMap=function(a,b){return this.select(a,b).switchLatest()},uc.skip=function(a){if(0>a)throw new Error(gb);var b=this;return new bd(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},uc.skipWhile=function(a,b){var c=this,d=sb(a,b,3);return new bd(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},uc.take=function(a,b){if(0>a)throw new RangeError(gb);if(0===a)return Fc(b);var c=this;return new bd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},uc.takeWhile=function(a,b){var c=this,d=sb(a,b,3);return new bd(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Tc=function(a){function b(b,c,d){this.source=b,this.predicate=sb(c,d,3),a.call(this)}return Sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Uc(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Cc),Uc=function(a){function b(b,c,d){this.observer=b,this.predicate=c,this.source=d,this.index=0,a.call(this)}return Sb(b,a),b.prototype.next=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(zc);uc.filter=uc.where=function(a,b){return this instanceof Tc?this.internalFilter(a,b):new Tc(this,a,b)},Bc.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new bd(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Bc.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new bd(function(e){function f(a){if(a)return void e.onError(a);for(var b=[],d=1,f=arguments.length;f>d;d++)b.push(arguments[d]);if(c){try{b=c(b)}catch(g){return e.onError(g)}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()}},Y.config.useNativeEvents=!1,Bc.fromEvent=function(a,b,c){if(a.addListener)return Vc(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!Y.config.useNativeEvents){if("function"==typeof a.on&&"function"==typeof a.off)return Vc(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(T.Ember&&"function"==typeof T.Ember.addListener)return Vc(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c)}return new bd(function(d){return J(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 Vc=Bc.fromEventPattern=function(a,b,c){return new bd(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 _b(function(){b&&b(e,f)})}).publish().refCount()},Wc=Bc.fromPromise=function(a){return Ec(function(){var b=new Y.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};uc.toPromise=function(a){if(a||(a=Y.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.startAsync=function(a){var b;try{b=a()}catch(c){return Mc(c)}return Wc(b)},uc.multicast=function(a,b){var c=this;return"function"==typeof a?new bd(function(d){var e=c.multicast(a());return new Yb(b(e).subscribe(d),e.connect())},c):new Xc(c,a)},uc.publish=function(a){return a&&fb(a)?this.multicast(function(){return new ed},a):this.multicast(new ed)},uc.share=function(){return this.publish().refCount()},uc.publishLast=function(a){return a&&fb(a)?this.multicast(function(){return new fd},a):this.multicast(new fd)},uc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new hd(b)},a):this.multicast(new hd(a))},uc.shareValue=function(a){return this.publishValue(a).refCount()},uc.replay=function(a,b,c,d){return a&&fb(a)?this.multicast(function(){return new id(b,c,d)},a):this.multicast(new id(b,c,d))},uc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var Xc=Y.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Yb(f.subscribe(c),_b(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return Sb(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new bd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Bc),Yc=Bc.interval=function(a,b){return N(a,a,$(b)?b:nc)};Bc.timer=function(b,c,d){var e;return $(d)||(d=nc),c!==a&&"number"==typeof c?e=c:$(c)&&(d=c),b instanceof Date&&e===a?K(b.getTime(),d):b instanceof Date&&e!==a?(e=c,L(b.getTime(),e,d)):e===a?M(b,d):N(b,e,d)}}uc.delay=function(a,b){return $(b)||(b=nc),a instanceof Date?P(this,a.getTime(),b):O(this,a,b)},uc.debounce=uc.throttleWithTimeout=function(a,b){$(b)||(b=nc);var c=this;return new bd(function(d){var e,f=new cc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new bc;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 Yb(i,f)},this)},uc.throttle=function(a,b){return this.debounce(a,b)},uc.timestamp=function(a){return $(a)||(a=nc),this.map(function(b){return{value:b,timestamp:a.now()}})},uc.sample=uc.throttleLatest=function(a,b){return $(b)||(b=nc),"number"==typeof a?Q(this,Yc(a,b)):Q(this,a)},uc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=Mc(new Error(b||"Timeout"))),$(c)||(c=nc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new bd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(eb(b)&&(b=Wc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new bc,j=new cc,k=!1,l=new cc;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 Yb(j,l)},d)},uc.throttleFirst=function(a,b){$(b)||(b=nc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new bd(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var Zc=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=ac,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=ac)});return new Yb(c,d,e)}function c(c,d){this.source=c,this.controller=new ed,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return Sb(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Bc);uc.pausable=function(a){return new Zc(this,a)};var $c=function(b){function c(b){var c,d=[],e=R(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 ed,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return Sb(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Bc);uc.pausableBuffered=function(a){return new $c(this,a)};var _c=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new ad(d),this.source=c.multicast(this.subject).refCount()}return Sb(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Bc),ad=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new ed,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=ac,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=ac}return Sb(c,a),Tb(c.prototype,xc,{onCompleted:function(){this.hasCompleted=!0,(!this.enableQueue||0===this.queue.length)&&this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,(!this.enableQueue||0===this.queue.length)&&this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=ac):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=ac),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?ac:(this.requestedCount=a,this.requestedDisposable=_b(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=ac}}),c}(Bc);uc.controlled=function(a){return null==a&&(a=!0),new _c(this,a)},uc.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 bd(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)})},c)};var bd=Y.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?_b(a):ac}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new cd(a),e=[d,b];return ic.scheduleRequired()?ic.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Sb(d,a),d}(Bc),cd=function(a){function b(b){a.call(this),this.observer=b,this.m=new bc}Sb(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(zc),dd=function(a,b){this.subject=a,this.observer=b};dd.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 ed=Y.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),ac):(a.onCompleted(),ac):(this.observers.push(a),new dd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Sb(e,a),Tb(e.prototype,xc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new gd(a,b)},e}(Bc),fd=Y.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),ac):(this.observers.push(a),new dd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Sb(e,a),Tb(e.prototype,xc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(Bc),gd=Y.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Sb(c,a),Tb(c.prototype,xc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Bc),hd=Y.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),ac):(this.observers.push(a),a.onNext(this.value),new dd(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Sb(e,a),Tb(e.prototype,xc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped){this.value=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),e}(Bc),id=Y.ReplaySubject=function(a){function d(a,b){return _b(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new Dc(this.scheduler,a),e=d(this,c);b(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function f(b,c,d){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=d||ic,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return Sb(f,a),Tb(f.prototype,xc.prototype,{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(this),!this.isStopped){var d=this.scheduler.now();this.q.push({interval:d,value:a}),this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onNext(a),h.ensureActive()}}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var d=this.scheduler.now();this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onError(a),h.ensureActive()}this.observers.length=0}},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onCompleted(),g.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),f}(Bc);Y.Pauser=function(a){function b(){a.call(this)}return Sb(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(ed),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(T.Rx=Y,define(function(){return Y})):U&&V?W?(V.exports=Y).Rx=Y:U.Rx=Y:T.Rx=Y;var jd=h()}).call(this); +(function(a){function b(a){if(a.isDisposed)throw new Error(jb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(kb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(ob)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+ob+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===mb&&d>=nb&&jd>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(kb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return mb=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!Qb(a))return b;Pb.nonEnumArgs&&a.length&&Rb(a)&&(a=Tb.call(a));var c=Pb.enumPrototypes&&"function"==typeof a,d=Pb.enumErrorProps&&(a===Kb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Pb.nonEnumShadows&&a!==Lb){var f=a.constructor,g=-1,h=wb;if(a===(f&&f.prototype))var i=a===Mb?Gb:a===Kb?Bb:Hb.call(a),j=Ob[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(){this._s=s}function t(){this._s=s,this._l=s.length,this._i=0}function u(a){this._a=a}function v(a){this._a=a,this._l=z(a),this._i=0}function w(a){return"number"==typeof a&&V.isFinite(a)}function x(b){var c,d=b[pb];if(!d&&"string"==typeof b)return c=new r(b),c[pb]();if(!d&&b.length!==a)return c=new u(b),c[pb]();if(!d)throw new TypeError("Object is not iterable");return b[pb]()}function y(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function z(a){var b=+a.length;return isNaN(b)?0:0!==b&&w(b)?(b=y(b)*Math.floor(Math.abs(b)),0>=b?0:b>Ic?Ic:b):b}function A(a,b){return ab(a)||(a=kc),new bd(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function B(a,b){return new bd(function(c){var d=new dc,e=new ec;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)}gb(f)&&(f=Wc(f)),d=new dc,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function C(a,b){var c=this;return new bd(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function D(){return!1}function E(){return[]}function F(a,b,c){var d=ub(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return gb(e)&&(e=Wc(e)),(sb(e)||rb(e))&&(e=Jc(e)),e}).concatAll()}function G(a,b,c){this.observer=a,this.selector=b,this.source=c,this.index=0,this.isStopped=!1}function H(a,b,c){var d=ub(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return gb(e)&&(e=Wc(e)),(sb(e)||rb(e))&&(e=Jc(e)),e}).mergeAll()}function I(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.index=0,this.isStopped=!1}function J(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=V.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 K(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),bc(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(J(a))};return a.attachEvent("on"+b,d),bc(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,bc(function(){a["on"+b]=null})}function L(a,b,c){var d=new $b;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(L(a.item(e),b,c));else a&&d.add(K(a,b,c));return d}function M(a,b){return new bd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function N(a,b,c){return new bd(function(d){var e=a,f=hc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function O(a,b){return new bd(function(c){return b.scheduleWithRelative(hc(a),function(){c.onNext(0),c.onCompleted()})})}function P(a,b,c){return a===b?new bd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Gc(function(){return N(c.now()+a,b,c)})}function Q(a,b,c){return new bd(function(d){var e,f=!1,g=new ec,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 dc,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 $b(e,g)},a)}function R(a,b,c){return Gc(function(){return Q(a,b-c.now(),c)})}function S(a,b){return new bd(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new $b(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}function T(a,b,c){return new bd(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(bb))){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 $b(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)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var U={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},V=U[typeof window]&&window||this,W=U[typeof exports]&&exports&&!exports.nodeType&&exports,X=U[typeof module]&&module&&!module.nodeType&&module,Y=X&&X.exports===W&&W,Z=U[typeof global]&&global;!Z||Z.global!==Z&&Z.window!==Z||(V=Z);var $={internals:{},config:{Promise:V.Promise},helpers:{}},_=$.helpers.noop=function(){},ab=($.helpers.notDefined=function(a){return"undefined"==typeof a},$.helpers.isScheduler=function(a){return a instanceof $.Scheduler}),bb=$.helpers.identity=function(a){return a},cb=($.helpers.pluck=function(a){return function(b){return b[a]}},$.helpers.just=function(a){return function(){return a}},$.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),db=$.helpers.defaultComparer=function(a,b){return Sb(a,b)},eb=$.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},fb=($.helpers.defaultKeySerializer=function(a){return a.toString()},$.helpers.defaultError=function(a){throw a}),gb=$.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},hb=($.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},$.helpers.not=function(a){return!a},$.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Hb.call(a)}),a}()),ib="Argument out of range",jb="Object has been disposed";$.config.longStackSupport=!1;var kb=!1;try{throw new Error}catch(lb){kb=!!lb.stack}var mb,nb=h(),ob="From previous event:",pb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";V.Set&&"function"==typeof(new V.Set)["@@iterator"]&&(pb="@@iterator");var qb=$.doneEnumerator={done:!0,value:a},rb=$.helpers.isIterable=function(b){return b[pb]!==a},sb=$.helpers.isArrayLike=function(b){return b&&b.length!==a};$.helpers.iterator=pb;var tb,ub=$.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},vb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],wb=vb.length,xb="[object Arguments]",yb="[object Array]",zb="[object Boolean]",Ab="[object Date]",Bb="[object Error]",Cb="[object Function]",Db="[object Number]",Eb="[object Object]",Fb="[object RegExp]",Gb="[object String]",Hb=Object.prototype.toString,Ib=Object.prototype.hasOwnProperty,Jb=Hb.call(arguments)==xb,Kb=Error.prototype,Lb=Object.prototype,Mb=String.prototype,Nb=Lb.propertyIsEnumerable;try{tb=!(Hb.call(document)==Eb&&!({toString:0}+""))}catch(lb){tb=!0}var Ob={};Ob[yb]=Ob[Ab]=Ob[Db]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Ob[zb]=Ob[Gb]={constructor:!0,toString:!0,valueOf:!0},Ob[Bb]=Ob[Cb]=Ob[Fb]={constructor:!0,toString:!0},Ob[Eb]={constructor:!0};var Pb={};!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);Pb.enumErrorProps=Nb.call(Kb,"message")||Nb.call(Kb,"name"),Pb.enumPrototypes=Nb.call(a,"prototype"),Pb.nonEnumArgs=0!=c,Pb.nonEnumShadows=!/valueOf/.test(b)}(1);var Qb=$.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Rb=function(a){return a&&"object"==typeof a?Hb.call(a)==xb:!1};Jb||(Rb=function(a){return a&&"object"==typeof a?Ib.call(a,"callee"):!1});{var Sb=$.internals.isEqual=function(a,b){return o(a,b,[],[])},Tb=({}.hasOwnProperty,Array.prototype.slice),Ub=this.inherits=$.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Vb=$.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}};$.internals.addRef=function(a,b){return new bd(function(c){return new $b(b.getDisposable(),a.subscribe(c))})}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Tb.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(Tb.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(Tb.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 Wb=Object("a"),Xb="a"!=Wb[0]||!(0 in Wb);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=Xb&&{}.toString.call(this)==Gb?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=Cb)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=Xb&&{}.toString.call(this)==Gb?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=Cb)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)==yb}),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}),Object.prototype.propertyIsEnumerable||(Object.prototype.propertyIsEnumerable=function(a){for(var b in this)if(b===a)return!0;return!1}),Object.keys||(Object.keys=function(){"use strict";var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString");return function(c){if("object"!=typeof c&&("function"!=typeof c||null===c))throw new TypeError("Object.keys called on non-object");var d,e,f=[];for(d in c)a.call(c,d)&&f.push(d);if(b)for(e=0;wb>e;e++)a.call(c,vb[e])&&f.push(vb[e]);return f}}()),q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Yb=$.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},_b=$b.prototype;_b.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},_b.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},_b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},_b.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var ac=$.Disposable=function(a){this.isDisposed=!1,this.action=a||_};ac.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var bc=ac.create=function(a){return new ac(a)},cc=ac.empty={dispose:_},dc=$.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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),ec=$.SerialDisposable=dc,fc=($.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?cc:new a(this)},b}(),$.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||eb,this.disposable=new dc});fc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},fc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},fc.prototype.isCancelled=function(){return this.disposable.isDisposed},fc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var gc=$.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(),cc}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=cb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),hc=gc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new $b,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),cc});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new $b,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),cc});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")})}}(gc.prototype),function(){gc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},gc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof V.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=V.setInterval(function(){d=c(d)},b);return bc(function(){V.clearInterval(e)})}}(gc.prototype);var ic,jc=gc.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+hc(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new gc(cb,a,b,c)}(),kc=gc.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-gc.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()+gc.normalize(c),g=new fc(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 gc(cb,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),lc=($.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 dc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),_),mc=function(){var a,b=_;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!V.setTimeout)throw new Error("No concurrency detected!");a=V.setTimeout,b=V.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),nc=mc.setTimeout,oc=mc.clearTimeout;!function(){function a(){if(!V.postMessage||V.importScripts)return!1;var a=!1,b=V.onmessage;return V.onmessage=function(){a=!0},V.postMessage("","*"),V.onmessage=b,a}var b=RegExp("^"+String(Hb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=Z&&Y&&Z.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=Z&&Y&&Z.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)ic=c,lc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))ic=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};V.addEventListener?V.addEventListener("message",h,!1):V.attachEvent("onmessage",h,!1),ic=function(a){var b=g++;f[b]=a,V.postMessage(e+b,"*")}}else if(V.MessageChannel){var i=new V.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},ic=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in V&&"onreadystatechange"in V.document.createElement("script")?ic=function(a){var b=V.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},V.document.documentElement.appendChild(b)}:(ic=function(a){return nc(a,0)},lc=oc)}();var pc=gc.timeout=function(){function a(a,b){var c=this,d=new dc,e=ic(function(){d.isDisposed||d.setDisposable(b(c,a))});return new $b(d,bc(function(){lc(e)}))}function b(a,b,c){var d=this,e=gc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new dc,g=nc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new $b(f,bc(function(){oc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new gc(cb,a,b,c)}(),qc=$.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 ab(a)||(a=jc),new bd(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),rc=qc.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 qc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),sc=qc.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 qc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),tc=qc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new qc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),uc=$.internals.Enumerator=function(a){this._next=a};uc.prototype.next=function(){return this._next()},uc.prototype[pb]=function(){return this};var vc=$.internals.Enumerable=function(a){this._iterator=a};vc.prototype[pb]=function(){return this._iterator()},vc.prototype.concat=function(){var a=this;return new bd(function(b){var c,d=a[pb](),e=new ec,f=jc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;gb(h)&&(h=Wc(h));var i=new dc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new $b(e,f,bc(function(){c=!0}))})},vc.prototype.catchError=function(){var a=this;return new bd(function(b){var c,d=a[pb](),e=new ec,f=jc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;gb(i)&&(i=Wc(i));var j=new dc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new $b(e,f,bc(function(){c=!0}))})},vc.prototype.catchErrorWhen=function(a){var b=this;return new bd(function(c){var d,e,f=new ed,g=new ed,h=a(f),i=h.subscribe(g),j=b[pb](),k=new ec,l=jc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;gb(i)&&(i=Wc(i));var l=new dc,m=new dc;k.setDisposable(new $b(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new $b(i,k,l,bc(function(){d=!0}))})};var wc,xc=vc.repeat=function(a,b){return null==b&&(b=-1),new vc(function(){var c=b;return new uc(function(){return 0===c?qb:(c>0&&c--,{done:!1,value:a})})})},yc=vc.of=function(a,b,c){if(b)var d=ub(b,c,3);return new vc(function(){var c=-1;return new uc(function(){return++c0&&(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}(Bc);wc.toArray=function(){var a=this;return new bd(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},Dc.create=Dc.createWithDisposable=function(a,b){return new bd(a,b)};var Gc=Dc.defer=function(a){return new bd(function(b){var c;try{c=a()}catch(d){return Oc(d).subscribe(b)}return gb(c)&&(c=Wc(c)),c.subscribe(b)})},Hc=Dc.empty=function(a){return ab(a)||(a=jc),new bd(function(b){return a.schedule(function(){b.onCompleted()})})},Ic=Math.pow(2,53)-1;r.prototype[pb]=function(){return new t(this._s)},t.prototype[pb]=function(){return this},t.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return A(null,a)},Dc.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);return A(a,b)},Dc.pairs=function(a,b){return b||(b=$.Scheduler.currentThread),new bd(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},Dc.range=function(a,b,c){return ab(c)||(c=kc),new bd(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},Dc.repeat=function(a,b,c){return ab(c)||(c=kc),Nc(a,c).repeat(null==b?-1:b)};var Nc=Dc["return"]=Dc.just=function(a,b){return ab(b)||(b=jc),new bd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Dc.returnValue=function(){return Nc.apply(null,arguments)};var Oc=Dc["throw"]=Dc.throwError=function(a,b){return ab(b)||(b=jc),new bd(function(c){return b.schedule(function(){c.onError(a)})})};Dc.throwException=function(){return Dc.throwError.apply(null,arguments)},wc["catch"]=wc.catchError=function(a){return"function"==typeof a?B(this,a):Pc([this,a])},wc.catchException=function(a){return this.catchError(a)};var Pc=Dc.catchError=Dc["catch"]=Dc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return yc(a).catchError()};wc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Qc.apply(this,a)};var Qc=Dc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new bd(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every(bb))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every(bb)&&b.onCompleted()}function e(a){j[a]=!0,j.every(bb)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new dc;gb(f)&&(f=Wc(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new $b(l)},this)};wc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Rc.apply(null,a)};var Rc=Dc.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return yc(a).concat()};wc.concatAll=wc.concatObservable=function(){return this.merge(1)},wc.merge=function(a){if("number"!=typeof a)return Sc(this,a);var b=this;return new bd(function(c){function d(a){var b=new dc;f.add(b),gb(a)&&(a=Wc(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new $b,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Sc=Dc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(ab(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=jc,b=0;d>b;b++)c.push(arguments[b]);else for(a=jc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),A(a,c).mergeAll()};wc.mergeAll=function(){var a=this;return new bd(function(b){var c=new $b,d=!1,e=new dc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new dc;c.add(e),gb(a)&&(a=Wc(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},wc.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},wc.skipUntil=function(a){var b=this;return new bd(function(c){var d=!1,e=new $b(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));gb(a)&&(a=Wc(a));var f=new dc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},wc["switch"]=wc.switchLatest=function(){var a=this;return new bd(function(b){var c=!1,d=new ec,e=!1,f=0,g=a.subscribe(function(a){var g=new dc,h=++f;c=!0,d.setDisposable(g),gb(a)&&(a=Wc(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())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new $b(g,d)},a)},wc.takeUntil=function(a){var b=this;return new bd(function(c){return gb(a)&&(a=Wc(a)),new $b(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},_))},b)},wc.withLatestFrom=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new bd(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new dc;gb(d)&&(d=Wc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(bb)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new dc;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new $b(j)},this)},wc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return C.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new bd(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every(bb)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,E),i=p(g,D),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new dc;gb(e)&&(e=Wc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new $b(j)},d)},Dc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},Dc.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new bd(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(bb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(bb)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new dc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new $b(h)})},wc.asObservable=function(){var a=this;return new bd(function(b){return a.subscribe(b)},this)},wc.dematerialize=function(){var a=this;return new bd(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},wc.distinctUntilChanged=function(a,b){var c=this;return b||(b=db),new bd(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},wc["do"]=wc.tap=wc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?Ac(a||_,b||_,c||_):a;return new bd(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},wc.doOnNext=wc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},wc.doOnError=wc.tapOnError=function(a,b){return this.tap(_,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},wc.doOnCompleted=wc.tapOnCompleted=function(a,b){return this.tap(_,null,"undefined"!=typeof b?function(){a.call(b)}:a)},wc["finally"]=wc.ensure=function(a){var b=this;return new bd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return bc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},wc.finallyAction=function(a){return this.ensure(a)},wc.ignoreElements=function(){var a=this;return new bd(function(b){return a.subscribe(_,function(a){b.onError(a)},function(){b.onCompleted()})},a)},wc.materialize=function(){var a=this;return new bd(function(b){return a.subscribe(function(a){b.onNext(rc(a))},function(a){b.onNext(sc(a)),b.onCompleted()},function(){b.onNext(tc()),b.onCompleted()})},a)},wc.repeat=function(a){return xc(this,a).concat()},wc.retry=function(a){return xc(this,a).catchError()},wc.retryWhen=function(a){return xc(this).catchErrorWhen(a)},wc.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 bd(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},wc.skipLast=function(a){var b=this;return new bd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},wc.startWith=function(){var a,b=0;arguments.length&&ab(arguments[0])?(a=arguments[0],b=1):a=jc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return yc([Mc(c,a),this]).concat()},wc.takeLast=function(a){var b=this;return new bd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},wc.selectConcat=wc.concatMap=function(a,b,c){return hb(a)&&hb(b)?this.concatMap(function(c,d){var e=a(c,d);return gb(e)&&(e=Wc(e)),(sb(e)||rb(e))&&(e=Jc(e)),e.map(function(a,e){return b(c,a,d,e)})}):hb(a)?F(this,a,c):F(this,function(){return a})};var Tc=function(a){function b(b,c,d){this.source=b,this.selector=ub(c,d,3),a.call(this)}return Ub(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new G(a,this.selector,this))},b}(Ec);G.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)}},G.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},G.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},G.prototype.dispose=function(){this.isStopped=!0},G.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},wc.map=wc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Tc?this.internalMap(a,b):new Tc(this,c,b)},wc.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},wc.selectMany=wc.flatMap=function(a,b,c){return hb(a)&&hb(b)?this.flatMap(function(c,d){var e=a(c,d);return gb(e)&&(e=Wc(e)),(sb(e)||rb(e))&&(e=Jc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):hb(a)?H(this,a,c):H(this,function(){return a})},wc.selectSwitch=wc.flatMapLatest=wc.switchMap=function(a,b){return this.select(a,b).switchLatest()},wc.skip=function(a){if(0>a)throw new Error(ib);var b=this;return new bd(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},wc.skipWhile=function(a,b){var c=this,d=ub(a,b,3);return new bd(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},wc.take=function(a,b){if(0>a)throw new RangeError(ib);if(0===a)return Hc(b);var c=this;return new bd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},wc.takeWhile=function(a,b){var c=this,d=ub(a,b,3);return new bd(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Uc=function(a){function b(b,c,d){this.source=b,this.predicate=ub(c,d,3),a.call(this)}return Ub(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new I(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Ec);I.prototype.onNext=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},I.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},I.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},I.prototype.dispose=function(){this.isStopped=!0},I.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},wc.filter=wc.where=function(a,b){return this instanceof Uc?this.internalFilter(a,b):new Uc(this,a,b)},Dc.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new bd(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Dc.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new bd(function(e){function f(a){if(a)return void e.onError(a);for(var b=[],d=1,f=arguments.length;f>d;d++)b.push(arguments[d]);if(c){try{b=c(b)}catch(g){return e.onError(g)}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()}},$.config.useNativeEvents=!1,Dc.fromEvent=function(a,b,c){if(a.addListener)return Vc(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!$.config.useNativeEvents){if("function"==typeof a.on&&"function"==typeof a.off)return Vc(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(V.Ember&&"function"==typeof V.Ember.addListener)return Vc(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c)}return new bd(function(d){return L(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 Vc=Dc.fromEventPattern=function(a,b,c){return new bd(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 bc(function(){b&&b(e,f)})}).publish().refCount()},Wc=Dc.fromPromise=function(a){return Gc(function(){var b=new $.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};wc.toPromise=function(a){if(a||(a=$.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.startAsync=function(a){var b;try{b=a()}catch(c){return Oc(c)}return Wc(b)},wc.multicast=function(a,b){var c=this;return"function"==typeof a?new bd(function(d){var e=c.multicast(a());return new $b(b(e).subscribe(d),e.connect())},c):new Xc(c,a)},wc.publish=function(a){return a&&hb(a)?this.multicast(function(){return new ed},a):this.multicast(new ed)},wc.share=function(){return this.publish().refCount()},wc.publishLast=function(a){return a&&hb(a)?this.multicast(function(){return new fd},a):this.multicast(new fd)},wc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new hd(b)},a):this.multicast(new hd(a))},wc.shareValue=function(a){return this.publishValue(a).refCount()},wc.replay=function(a,b,c,d){return a&&hb(a)?this.multicast(function(){return new id(b,c,d)},a):this.multicast(new id(b,c,d))},wc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var Xc=$.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new $b(f.subscribe(c),bc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return Ub(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new bd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Dc),Yc=Dc.interval=function(a,b){return P(a,a,ab(b)?b:pc)};Dc.timer=function(b,c,d){var e;return ab(d)||(d=pc),c!==a&&"number"==typeof c?e=c:ab(c)&&(d=c),b instanceof Date&&e===a?M(b.getTime(),d):b instanceof Date&&e!==a?(e=c,N(b.getTime(),e,d)):e===a?O(b,d):P(b,e,d)}}wc.delay=function(a,b){return ab(b)||(b=pc),a instanceof Date?R(this,a.getTime(),b):Q(this,a,b)},wc.debounce=wc.throttleWithTimeout=function(a,b){ab(b)||(b=pc);var c=this;return new bd(function(d){var e,f=new ec,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new dc;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 $b(i,f)},this)},wc.throttle=function(a,b){return this.debounce(a,b)},wc.timestamp=function(a){return ab(a)||(a=pc),this.map(function(b){return{value:b,timestamp:a.now()}})},wc.sample=wc.throttleLatest=function(a,b){return ab(b)||(b=pc),"number"==typeof a?S(this,Yc(a,b)):S(this,a)},wc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=Oc(new Error(b||"Timeout"))),ab(c)||(c=pc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new bd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(gb(b)&&(b=Wc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new dc,j=new ec,k=!1,l=new ec;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 $b(j,l)},d)},wc.throttleFirst=function(a,b){ab(b)||(b=pc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new bd(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var Zc=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=cc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=cc)});return new $b(c,d,e)}function c(c,d){this.source=c,this.controller=new ed,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return Ub(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Dc);wc.pausable=function(a){return new Zc(this,a)};var $c=function(b){function c(b){var c,d=[],e=T(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 ed,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return Ub(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Dc);wc.pausableBuffered=function(a){return new $c(this,a)};var _c=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new ad(d),this.source=c.multicast(this.subject).refCount()}return Ub(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Dc),ad=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new ed,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=cc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=cc}return Ub(c,a),Vb(c.prototype,zc,{onCompleted:function(){this.hasCompleted=!0,(!this.enableQueue||0===this.queue.length)&&this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,(!this.enableQueue||0===this.queue.length)&&this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=cc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=cc),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?cc:(this.requestedCount=a,this.requestedDisposable=bc(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=cc}}),c}(Dc);wc.controlled=function(a){return null==a&&(a=!0),new _c(this,a)},wc.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 bd(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)})},c)};var bd=$.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?bc(a):cc}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new cd(a),e=[d,b];return kc.scheduleRequired()?kc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Ub(d,a),d}(Dc),cd=function(a){function b(b){a.call(this),this.observer=b,this.m=new dc}Ub(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Bc),dd=function(a,b){this.subject=a,this.observer=b};dd.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 ed=$.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),cc):(a.onCompleted(),cc):(this.observers.push(a),new dd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Ub(e,a),Vb(e.prototype,zc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new gd(a,b)},e}(Dc),fd=$.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),cc):(this.observers.push(a),new dd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Ub(e,a),Vb(e.prototype,zc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(Dc),gd=$.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Ub(c,a),Vb(c.prototype,zc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Dc),hd=$.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),cc):(this.observers.push(a),a.onNext(this.value),new dd(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Ub(e,a),Vb(e.prototype,zc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped){this.value=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),e}(Dc),id=$.ReplaySubject=function(a){function d(a,b){return bc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new Fc(this.scheduler,a),e=d(this,c);b(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function f(b,c,d){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=d||kc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return Ub(f,a),Vb(f.prototype,zc.prototype,{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(this),!this.isStopped){var d=this.scheduler.now();this.q.push({interval:d,value:a}),this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onNext(a),h.ensureActive()}}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var d=this.scheduler.now();this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onError(a),h.ensureActive()}this.observers.length=0}},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onCompleted(),g.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),f}(Dc);$.Pauser=function(a){function b(){a.call(this)}return Ub(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(ed),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(V.Rx=$,define(function(){return $})):W&&X?Y?(X.exports=$).Rx=$:W.Rx=$:V.Rx=$;var jd=h()}).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 95a43fc98..969df2b6d 100644 --- a/dist/rx.lite.js +++ b/dist/rx.lite.js @@ -1957,6 +1957,10 @@ __super__.call(this, subscribe); } + ObservableBase.prototype.subscribeCore = function(observer) { + throw new Error('Not implemeneted'); + } + return ObservableBase; }(Observable)); @@ -3376,36 +3380,39 @@ }(ObservableBase)); - var MapObserver = (function (__super__) { - inherits(MapObserver, __super__); + function MapObserver(observer, selector, source) { + this.observer = observer; + this.selector = selector; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function MapObserver(observer, selector, source) { - this.observer = observer; - this.selector = selector; - this.source = source; - this.index = 0; - __super__.call(this); + MapObserver.prototype.onNext = function(x) { + if (this.isStopped) { return; } + try { + var result = this.selector(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } - - MapObserver.prototype.next = function(x) { - try { - var result = this.selector(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - this.observer.onNext(result); - }; - - MapObserver.prototype.error = function (e) { + this.observer.onNext(result); + }; + MapObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + MapObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + MapObserver.prototype.dispose = function() { this.isStopped = true; }; + MapObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; - - MapObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; + return true; + } - return MapObserver; - }(AbstractObserver)); + return false; + }; /** * Projects each element of an observable sequence into a new form by incorporating the element's index. @@ -3421,12 +3428,26 @@ }; /** - * Retrieves the value of a specified property from all elements in the Observable sequence. - * @param {String} prop The property to pluck. + * Retrieves the value of a specified nested property from all elements in + * the Observable sequence. + * @param {Arguments} arguments The nested properties to pluck. * @returns {Observable} Returns a new Observable sequence of property values. */ - observableProto.pluck = function (prop) { - return this.map(function (x) { return x[prop]; }); + observableProto.pluck = function () { + var args = arguments, len = arguments.length; + if (len === 0) { throw new Error('List of properties cannot be empty.'); } + return this.map(function (x) { + var currentProp = x; + for (var i = 0; i < len; i++) { + var p = currentProp[args[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } else { + return undefined; + } + } + return currentProp; + }); }; function flatMap(source, selector, thisArg) { @@ -3612,36 +3633,41 @@ }(ObservableBase)); - var FilterObserver = (function (__super__) { - inherits(FilterObserver, __super__); + function FilterObserver(observer, predicate, source) { + this.observer = observer; + this.predicate = predicate; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function FilterObserver(observer, predicate, source) { - this.observer = observer; - this.predicate = predicate; - this.source = source; - this.index = 0; - __super__.call(this); + FilterObserver.prototype.onNext = function(x) { + try { + var shouldYield = this.predicate(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } + shouldYield && this.observer.onNext(x); + }; - FilterObserver.prototype.next = function(x) { - try { - var shouldYield = this.predicate(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - shouldYield && this.observer.onNext(x); - }; - - FilterObserver.prototype.error = function (e) { + FilterObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + FilterObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + FilterObserver.prototype.dispose = function() { this.isStopped = true; }; + FilterObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; + return true; + } + + return false; + }; - FilterObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; - return FilterObserver; - }(AbstractObserver)); /** * Filters the elements of an observable sequence based on a predicate by incorporating the element's index. diff --git a/dist/rx.lite.map b/dist/rx.lite.map index 249e8c6de..f38f33129 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","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","scheduler","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","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","scheduleRecursiveWithAbsoluteAndState","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","isArray","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","scheduleRecursiveWithAbsolute","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","event","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","observableProto","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","observerCreate","AnonymousObserver","AbstractObserver","__super__","isStopped","completed","fail","_onNext","_onError","_onCompleted","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","mapper","list","FromArrayObservable","sink","FromArraySink","run","loopRecursive","observableFromArray","fromArray","never","ofWithScheduler","pairs","keys","range","observableReturn","returnValue","throwError","throwException","handlerOrSecond","observableCatch","catchException","combineLatest","filter","j","n","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","m","innerSubscription","mergeObservable","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","i2","MapObservable","internalMap","MapObserver","select","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","predicate","take","RangeError","takeWhile","FilterObservable","FilterObserver","internalFilter","shouldYield","where","fromCallback","context","results","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","Ember","publish","addHandler","removeHandler","innerHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","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","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","controlled","transduce","transducer","transformForObserver","init","step","obs","input","xform","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","createRemovableDisposable","so","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D"} \ No newline at end of file +{"version":3,"file":"rx.lite.min.js","sources":["rx.lite.js"],"names":["undefined","checkDisposed","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","scheduler","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","x","isArrayLike","isIterable","observableFrom","concatAll","MapObserver","isStopped","flatMap","mergeAll","FilterObserver","predicate","createListener","element","name","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsoluteAndState","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","isArray","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","scheduleRecursiveWithAbsolute","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","event","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","observableProto","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","observerCreate","AnonymousObserver","AbstractObserver","__super__","completed","fail","_onNext","_onError","_onCompleted","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","mapper","list","FromArrayObservable","sink","FromArraySink","run","loopRecursive","observableFromArray","fromArray","never","ofWithScheduler","pairs","keys","range","observableReturn","returnValue","throwError","throwException","handlerOrSecond","observableCatch","catchException","combineLatest","filter","j","n","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","m","innerSubscription","mergeObservable","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","i2","MapObservable","internalMap","select","currentProp","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","take","RangeError","takeWhile","FilterObservable","internalFilter","shouldYield","where","fromCallback","context","results","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","Ember","publish","addHandler","removeHandler","innerHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","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","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","controlled","transduce","transducer","transformForObserver","init","step","obs","input","xform","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","createRemovableDisposable","so","_trim","windowSize","MAX_VALUE","Pauser","define","amd"],"mapp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AAY,QAIdjE,GACP7K,GAKF5P,GAAGof,OAAU,SAAU9P,GAGrB,QAAS8P,KACP9P,EAAUvc,KAAK4D,MAajB,MAhBAgM,IAASyc,EAAQ9P,GASjB8P,EAAOxrB,UAAU+oB,MAAQ,WAAchmB,KAAKiC,QAAO,IAKnDwmB,EAAOxrB,UAAUgpB,OAAS,WAAcjmB,KAAKiC,QAAO,IAE7CwmB,GACPhR,IAEmB,kBAAViR,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzE/nB,EAAKyI,GAAKA,EAEVqf,OAAO,WACL,MAAOrf,MAEAR,GAAeG,EAEpBE,GACDF,EAAWF,QAAUO,GAAIA,GAAKA,EAE/BR,EAAYQ,GAAKA,EAInBzI,EAAKyI,GAAKA,CAIZ,IAAIlO,IAAcC,MAElBgB,KAAK4D"} \ No newline at end of file diff --git a/dist/rx.lite.min.js b/dist/rx.lite.min.js index ae62046fb..2abc86158 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(a){if(a.isDisposed)throw new Error(gb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(hb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(lb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+lb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===jb&&d>=kb&&gd>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(hb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return jb=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!Nb(a))return b;Mb.nonEnumArgs&&a.length&&Ob(a)&&(a=Qb.call(a));var c=Mb.enumPrototypes&&"function"==typeof a,d=Mb.enumErrorProps&&(a===Hb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Mb.nonEnumShadows&&a!==Ib){var f=a.constructor,g=-1,h=tb;if(a===(f&&f.prototype))var i=a===Jb?Db:a===Hb?yb:Eb.call(a),j=Lb[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(){this._s=s}function t(){this._s=s,this._l=s.length,this._i=0}function u(a){this._a=a}function v(a){this._a=a,this._l=z(a),this._i=0}function w(a){return"number"==typeof a&&S.isFinite(a)}function x(b){var c,d=b[mb];if(!d&&"string"==typeof b)return c=new r(b),c[mb]();if(!d&&b.length!==a)return c=new u(b),c[mb]();if(!d)throw new TypeError("Object is not iterable");return b[mb]()}function y(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function z(a){var b=+a.length;return isNaN(b)?0:0!==b&&w(b)?(b=y(b)*Math.floor(Math.abs(b)),0>=b?0:b>Dc?Dc:b):b}function A(a,b){return Z(a)||(a=fc),new $c(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function B(a,b){return new $c(function(c){var d=new $b,e=new _b;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)}db(f)&&(f=Tc(f)),d=new $b,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function C(a,b){var c=this;return new $c(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function D(){return!1}function E(){return[]}function F(a,b,c){var d=rb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return db(e)&&(e=Tc(e)),(pb(e)||ob(e))&&(e=Ec(e)),e}).concatAll()}function G(a,b,c){var d=rb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return db(e)&&(e=Tc(e)),(pb(e)||ob(e))&&(e=Ec(e)),e}).mergeAll()}function H(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Yb(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function I(a,b,c){var d=new Vb;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(I(a.item(e),b,c));else a&&d.add(H(a,b,c));return d}function J(a,b){return new $c(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function K(a,b,c){return new $c(function(d){var e=a,f=cc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function L(a,b){return new $c(function(c){return b.scheduleWithRelative(cc(a),function(){c.onNext(0),c.onCompleted()})})}function M(a,b,c){return a===b?new $c(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Bc(function(){return K(c.now()+a,b,c)})}function N(a,b,c){return new $c(function(d){var e,f=!1,g=new _b,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 $b,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 Vb(e,g)},a)}function O(a,b,c){return Bc(function(){return N(a,b-c.now(),c)})}function P(a,b){return new $c(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Vb(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}function Q(a,b,c){return new $c(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every($))){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 Vb(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)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var R={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},S=R[typeof window]&&window||this,T=R[typeof exports]&&exports&&!exports.nodeType&&exports,U=R[typeof module]&&module&&!module.nodeType&&module,V=U&&U.exports===T&&T,W=R[typeof global]&&global;!W||W.global!==W&&W.window!==W||(S=W);var X={internals:{},config:{Promise:S.Promise},helpers:{}},Y=X.helpers.noop=function(){},Z=(X.helpers.notDefined=function(a){return"undefined"==typeof a},X.helpers.isScheduler=function(a){return a instanceof X.Scheduler}),$=X.helpers.identity=function(a){return a},_=(X.helpers.pluck=function(a){return function(b){return b[a]}},X.helpers.just=function(a){return function(){return a}},X.helpers.defaultNow=Date.now),ab=X.helpers.defaultComparer=function(a,b){return Pb(a,b)},bb=X.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},cb=(X.helpers.defaultKeySerializer=function(a){return a.toString()},X.helpers.defaultError=function(a){throw a}),db=X.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},eb=(X.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},X.helpers.not=function(a){return!a},X.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Eb.call(a)}),a}()),fb="Argument out of range",gb="Object has been disposed";X.config.longStackSupport=!1;var hb=!1;try{throw new Error}catch(ib){hb=!!ib.stack}var jb,kb=h(),lb="From previous event:",mb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";S.Set&&"function"==typeof(new S.Set)["@@iterator"]&&(mb="@@iterator");var nb=X.doneEnumerator={done:!0,value:a},ob=X.helpers.isIterable=function(b){return b[mb]!==a},pb=X.helpers.isArrayLike=function(b){return b&&b.length!==a};X.helpers.iterator=mb;var qb,rb=X.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},sb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],tb=sb.length,ub="[object Arguments]",vb="[object Array]",wb="[object Boolean]",xb="[object Date]",yb="[object Error]",zb="[object Function]",Ab="[object Number]",Bb="[object Object]",Cb="[object RegExp]",Db="[object String]",Eb=Object.prototype.toString,Fb=Object.prototype.hasOwnProperty,Gb=Eb.call(arguments)==ub,Hb=Error.prototype,Ib=Object.prototype,Jb=String.prototype,Kb=Ib.propertyIsEnumerable;try{qb=!(Eb.call(document)==Bb&&!({toString:0}+""))}catch(ib){qb=!0}var Lb={};Lb[vb]=Lb[xb]=Lb[Ab]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Lb[wb]=Lb[Db]={constructor:!0,toString:!0,valueOf:!0},Lb[yb]=Lb[zb]=Lb[Cb]={constructor:!0,toString:!0},Lb[Bb]={constructor:!0};var Mb={};!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);Mb.enumErrorProps=Kb.call(Hb,"message")||Kb.call(Hb,"name"),Mb.enumPrototypes=Kb.call(a,"prototype"),Mb.nonEnumArgs=0!=c,Mb.nonEnumShadows=!/valueOf/.test(b)}(1);var Nb=X.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Ob=function(a){return a&&"object"==typeof a?Eb.call(a)==ub:!1};Gb||(Ob=function(a){return a&&"object"==typeof a?Fb.call(a,"callee"):!1});{var Pb=X.internals.isEqual=function(a,b){return o(a,b,[],[])},Qb=({}.hasOwnProperty,Array.prototype.slice),Rb=this.inherits=X.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Sb=X.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}};X.internals.addRef=function(a,b){return new $c(function(c){return new Vb(b.getDisposable(),a.subscribe(c))})}}q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Tb=X.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Ub=Tb.prototype;Ub.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Ub.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)}}},Ub.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},Wb=Vb.prototype;Wb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Wb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Wb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},Wb.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var Xb=X.Disposable=function(a){this.isDisposed=!1,this.action=a||Y};Xb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Yb=Xb.create=function(a){return new Xb(a)},Zb=Xb.empty={dispose:Y},$b=X.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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),_b=X.SerialDisposable=$b,ac=(X.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?Zb:new a(this)},b}(),X.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||bb,this.disposable=new $b});ac.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},ac.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},ac.prototype.isCancelled=function(){return this.disposable.isDisposed},ac.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var bc=X.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(),Zb}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=_,a.normalize=function(a){return 0>a&&(a=0),a},a}(),cc=bc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Vb,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),Zb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Vb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Zb});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")})}}(bc.prototype),function(){bc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},bc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof S.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=S.setInterval(function(){d=c(d)},b);return Yb(function(){S.clearInterval(e)})}}(bc.prototype);var dc,ec=bc.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+cc(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new bc(_,a,b,c)}(),fc=bc.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-bc.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()+bc.normalize(c),g=new ac(this,b,d,f);if(e)e.enqueue(g);else{e=new Tb(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 bc(_,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),gc=(X.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 $b;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Y),hc=function(){var a,b=Y;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!S.setTimeout)throw new Error("No concurrency detected!");a=S.setTimeout,b=S.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),ic=hc.setTimeout,jc=hc.clearTimeout;!function(){function a(){if(!S.postMessage||S.importScripts)return!1;var a=!1,b=S.onmessage;return S.onmessage=function(){a=!0},S.postMessage("","*"),S.onmessage=b,a}var b=RegExp("^"+String(Eb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=W&&V&&W.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=W&&V&&W.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)dc=c,gc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))dc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};S.addEventListener?S.addEventListener("message",h,!1):S.attachEvent("onmessage",h,!1),dc=function(a){var b=g++;f[b]=a,S.postMessage(e+b,"*")}}else if(S.MessageChannel){var i=new S.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},dc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in S&&"onreadystatechange"in S.document.createElement("script")?dc=function(a){var b=S.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},S.document.documentElement.appendChild(b)}:(dc=function(a){return ic(a,0)},gc=jc)}();var kc=bc.timeout=function(){function a(a,b){var c=this,d=new $b,e=dc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Vb(d,Yb(function(){gc(e)}))}function b(a,b,c){var d=this,e=bc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new $b,g=ic(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Vb(f,Yb(function(){jc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new bc(_,a,b,c)}(),lc=X.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 Z(a)||(a=ec),new $c(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),mc=lc.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 lc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),nc=lc.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 lc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),oc=lc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new lc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),pc=X.internals.Enumerator=function(a){this._next=a};pc.prototype.next=function(){return this._next()},pc.prototype[mb]=function(){return this};var qc=X.internals.Enumerable=function(a){this._iterator=a};qc.prototype[mb]=function(){return this._iterator()},qc.prototype.concat=function(){var a=this;return new $c(function(b){var c,d=a[mb](),e=new _b,f=ec.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;db(h)&&(h=Tc(h));var i=new $b;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Vb(e,f,Yb(function(){c=!0}))})},qc.prototype.catchError=function(){var a=this;return new $c(function(b){var c,d=a[mb](),e=new _b,f=ec.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;db(i)&&(i=Tc(i));var j=new $b;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Vb(e,f,Yb(function(){c=!0}))})},qc.prototype.catchErrorWhen=function(a){var b=this;return new $c(function(c){var d,e,f=new bd,g=new bd,h=a(f),i=h.subscribe(g),j=b[mb](),k=new _b,l=ec.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;db(i)&&(i=Tc(i));var l=new $b,m=new $b;k.setDisposable(new Vb(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Vb(i,k,l,Yb(function(){d=!0}))})};var rc,sc=qc.repeat=function(a,b){return null==b&&(b=-1),new qc(function(){var c=b;return new pc(function(){return 0===c?nb:(c>0&&c--,{done:!1,value:a})})})},tc=qc.of=function(a,b,c){if(b)var d=rb(b,c,3);return new qc(function(){var c=-1;return new pc(function(){return++c0&&(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}(wc),Ac=X.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Yb(a):Zb}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new _c(a),d=[b,this];return fc.scheduleRequired()?fc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Rb(e,a),e}(yc);rc.toArray=function(){var a=this;return new $c(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},yc.create=yc.createWithDisposable=function(a,b){return new $c(a,b)};var Bc=yc.defer=function(a){return new $c(function(b){var c;try{c=a()}catch(d){return Jc(d).subscribe(b)}return db(c)&&(c=Tc(c)),c.subscribe(b)})},Cc=yc.empty=function(a){return Z(a)||(a=ec),new $c(function(b){return a.schedule(function(){b.onCompleted()})})},Dc=Math.pow(2,53)-1;r.prototype[mb]=function(){return new t(this._s)},t.prototype[mb]=function(){return this},t.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return A(null,a)},yc.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);return A(a,b)},yc.pairs=function(a,b){return b||(b=X.Scheduler.currentThread),new $c(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},yc.range=function(a,b,c){return Z(c)||(c=fc),new $c(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},yc.repeat=function(a,b,c){return Z(c)||(c=fc),Ic(a,c).repeat(null==b?-1:b)};var Ic=yc["return"]=yc.just=function(a,b){return Z(b)||(b=ec),new $c(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};yc.returnValue=function(){return Ic.apply(null,arguments)};var Jc=yc["throw"]=yc.throwError=function(a,b){return Z(b)||(b=ec),new $c(function(c){return b.schedule(function(){c.onError(a)})})};yc.throwException=function(){return yc.throwError.apply(null,arguments)},rc["catch"]=rc.catchError=function(a){return"function"==typeof a?B(this,a):Kc([this,a])},rc.catchException=function(a){return this.catchError(a)};var Kc=yc.catchError=yc["catch"]=yc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return tc(a).catchError()};rc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Lc.apply(this,a)};var Lc=yc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new $c(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every($))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every($)&&b.onCompleted()}function e(a){j[a]=!0,j.every($)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new $b;db(f)&&(f=Tc(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new Vb(l)},this)};rc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Mc.apply(null,a)};var Mc=yc.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return tc(a).concat()};rc.concatAll=rc.concatObservable=function(){return this.merge(1)},rc.merge=function(a){if("number"!=typeof a)return Nc(this,a);var b=this;return new $c(function(c){function d(a){var b=new $b;f.add(b),db(a)&&(a=Tc(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Vb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Nc=yc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Z(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=ec,b=0;d>b;b++)c.push(arguments[b]);else for(a=ec,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),A(a,c).mergeAll() -};rc.mergeAll=function(){var a=this;return new $c(function(b){var c=new Vb,d=!1,e=new $b;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new $b;c.add(e),db(a)&&(a=Tc(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},rc.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},rc.skipUntil=function(a){var b=this;return new $c(function(c){var d=!1,e=new Vb(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));db(a)&&(a=Tc(a));var f=new $b;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},rc["switch"]=rc.switchLatest=function(){var a=this;return new $c(function(b){var c=!1,d=new _b,e=!1,f=0,g=a.subscribe(function(a){var g=new $b,h=++f;c=!0,d.setDisposable(g),db(a)&&(a=Tc(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())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new Vb(g,d)},a)},rc.takeUntil=function(a){var b=this;return new $c(function(c){return db(a)&&(a=Tc(a)),new Vb(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},Y))},b)},rc.withLatestFrom=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new $c(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new $b;db(d)&&(d=Tc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every($)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new $b;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new Vb(j)},this)},rc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return C.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new $c(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every($)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,E),i=p(g,D),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new $b;db(e)&&(e=Tc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new Vb(j)},d)},yc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},yc.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new $c(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($))return void b.onCompleted()}function d(a){return g[a]=!0,g.every($)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new $b,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Vb(h)})},rc.asObservable=function(){var a=this;return new $c(function(b){return a.subscribe(b)},this)},rc.dematerialize=function(){var a=this;return new $c(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},rc.distinctUntilChanged=function(a,b){var c=this;return b||(b=ab),new $c(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},rc["do"]=rc.tap=rc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?vc(a||Y,b||Y,c||Y):a;return new $c(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},rc.doOnNext=rc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},rc.doOnError=rc.tapOnError=function(a,b){return this.tap(Y,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},rc.doOnCompleted=rc.tapOnCompleted=function(a,b){return this.tap(Y,null,"undefined"!=typeof b?function(){a.call(b)}:a)},rc["finally"]=rc.ensure=function(a){var b=this;return new $c(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Yb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},rc.finallyAction=function(a){return this.ensure(a)},rc.ignoreElements=function(){var a=this;return new $c(function(b){return a.subscribe(Y,function(a){b.onError(a)},function(){b.onCompleted()})},a)},rc.materialize=function(){var a=this;return new $c(function(b){return a.subscribe(function(a){b.onNext(mc(a))},function(a){b.onNext(nc(a)),b.onCompleted()},function(){b.onNext(oc()),b.onCompleted()})},a)},rc.repeat=function(a){return sc(this,a).concat()},rc.retry=function(a){return sc(this,a).catchError()},rc.retryWhen=function(a){return sc(this).catchErrorWhen(a)},rc.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 $c(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},rc.skipLast=function(a){var b=this;return new $c(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},rc.startWith=function(){var a,b=0;arguments.length&&Z(arguments[0])?(a=arguments[0],b=1):a=ec;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return tc([Hc(c,a),this]).concat()},rc.takeLast=function(a){var b=this;return new $c(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},rc.selectConcat=rc.concatMap=function(a,b,c){return eb(a)&&eb(b)?this.concatMap(function(c,d){var e=a(c,d);return db(e)&&(e=Tc(e)),(pb(e)||ob(e))&&(e=Ec(e)),e.map(function(a,e){return b(c,a,d,e)})}):eb(a)?F(this,a,c):F(this,function(){return a})};var Oc=function(a){function b(b,c,d){this.source=b,this.selector=rb(c,d,3),a.call(this)}return Rb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new Pc(a,this.selector,this))},b}(Ac),Pc=function(a){function b(b,c,d){this.observer=b,this.selector=c,this.source=d,this.index=0,a.call(this)}return Rb(b,a),b.prototype.next=function(a){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(wc);rc.map=rc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Oc?this.internalMap(a,b):new Oc(this,c,b)},rc.pluck=function(a){return this.map(function(b){return b[a]})},rc.selectMany=rc.flatMap=function(a,b,c){return eb(a)&&eb(b)?this.flatMap(function(c,d){var e=a(c,d);return db(e)&&(e=Tc(e)),(pb(e)||ob(e))&&(e=Ec(e)),e.map(function(a,e){return b(c,a,d,e)})},c):eb(a)?G(this,a,c):G(this,function(){return a})},rc.selectSwitch=rc.flatMapLatest=rc.switchMap=function(a,b){return this.select(a,b).switchLatest()},rc.skip=function(a){if(0>a)throw new Error(fb);var b=this;return new $c(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},rc.skipWhile=function(a,b){var c=this,d=rb(a,b,3);return new $c(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},rc.take=function(a,b){if(0>a)throw new RangeError(fb);if(0===a)return Cc(b);var c=this;return new $c(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},rc.takeWhile=function(a,b){var c=this,d=rb(a,b,3);return new $c(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Qc=function(a){function b(b,c,d){this.source=b,this.predicate=rb(c,d,3),a.call(this)}return Rb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Rc(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Ac),Rc=function(a){function b(b,c,d){this.observer=b,this.predicate=c,this.source=d,this.index=0,a.call(this)}return Rb(b,a),b.prototype.next=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(wc);rc.filter=rc.where=function(a,b){return this instanceof Qc?this.internalFilter(a,b):new Qc(this,a,b)},yc.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new $c(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},yc.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new $c(function(e){function f(a){if(a)return void e.onError(a);for(var b=[],d=1,f=arguments.length;f>d;d++)b.push(arguments[d]);if(c){try{b=c(b)}catch(g){return e.onError(g)}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()}},X.config.useNativeEvents=!1,yc.fromEvent=function(a,b,c){if(a.addListener)return Sc(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!X.config.useNativeEvents){if("function"==typeof a.on&&"function"==typeof a.off)return Sc(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(S.Ember&&"function"==typeof S.Ember.addListener)return Sc(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c)}return new $c(function(d){return I(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 Sc=yc.fromEventPattern=function(a,b,c){return new $c(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 Yb(function(){b&&b(e,f)})}).publish().refCount()},Tc=yc.fromPromise=function(a){return Bc(function(){var b=new X.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};rc.toPromise=function(a){if(a||(a=X.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)})})},yc.startAsync=function(a){var b;try{b=a()}catch(c){return Jc(c)}return Tc(b)},rc.multicast=function(a,b){var c=this;return"function"==typeof a?new $c(function(d){var e=c.multicast(a());return new Vb(b(e).subscribe(d),e.connect())},c):new Uc(c,a)},rc.publish=function(a){return a&&eb(a)?this.multicast(function(){return new bd},a):this.multicast(new bd)},rc.share=function(){return this.publish().refCount()},rc.publishLast=function(a){return a&&eb(a)?this.multicast(function(){return new cd},a):this.multicast(new cd)},rc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new ed(b)},a):this.multicast(new ed(a))},rc.shareValue=function(a){return this.publishValue(a).refCount()},rc.replay=function(a,b,c,d){return a&&eb(a)?this.multicast(function(){return new fd(b,c,d)},a):this.multicast(new fd(b,c,d))},rc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var Uc=X.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Vb(f.subscribe(c),Yb(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return Rb(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new $c(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(yc),Vc=yc.interval=function(a,b){return M(a,a,Z(b)?b:kc)};yc.timer=function(b,c,d){var e;return Z(d)||(d=kc),c!==a&&"number"==typeof c?e=c:Z(c)&&(d=c),b instanceof Date&&e===a?J(b.getTime(),d):b instanceof Date&&e!==a?(e=c,K(b.getTime(),e,d)):e===a?L(b,d):M(b,e,d)}}rc.delay=function(a,b){return Z(b)||(b=kc),a instanceof Date?O(this,a.getTime(),b):N(this,a,b)},rc.debounce=rc.throttleWithTimeout=function(a,b){Z(b)||(b=kc);var c=this;return new $c(function(d){var e,f=new _b,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new $b;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 Vb(i,f)},this)},rc.throttle=function(a,b){return this.debounce(a,b)},rc.timestamp=function(a){return Z(a)||(a=kc),this.map(function(b){return{value:b,timestamp:a.now()}})},rc.sample=rc.throttleLatest=function(a,b){return Z(b)||(b=kc),"number"==typeof a?P(this,Vc(a,b)):P(this,a)},rc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=Jc(new Error(b||"Timeout"))),Z(c)||(c=kc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new $c(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(db(b)&&(b=Tc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new $b,j=new _b,k=!1,l=new _b;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 Vb(j,l)},d)},rc.throttleFirst=function(a,b){Z(b)||(b=kc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new $c(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var Wc=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Zb,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Zb)});return new Vb(c,d,e)}function c(c,d){this.source=c,this.controller=new bd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return Rb(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(yc);rc.pausable=function(a){return new Wc(this,a)};var Xc=function(b){function c(b){var c,d=[],e=Q(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 bd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return Rb(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(yc);rc.pausableBuffered=function(a){return new Xc(this,a)};var Yc=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new Zc(d),this.source=c.multicast(this.subject).refCount()}return Rb(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(yc),Zc=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new bd,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=Zb,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=Zb}return Rb(c,a),Sb(c.prototype,uc,{onCompleted:function(){this.hasCompleted=!0,(!this.enableQueue||0===this.queue.length)&&this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,(!this.enableQueue||0===this.queue.length)&&this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=Zb):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=Zb),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?Zb:(this.requestedCount=a,this.requestedDisposable=Yb(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Zb}}),c}(yc);rc.controlled=function(a){return null==a&&(a=!0),new Yc(this,a)},rc.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 $c(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)})},c)};var $c=X.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Yb(a):Zb}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new _c(a),e=[d,b];return fc.scheduleRequired()?fc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Rb(d,a),d}(yc),_c=function(a){function b(b){a.call(this),this.observer=b,this.m=new $b}Rb(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(wc),ad=function(a,b){this.subject=a,this.observer=b};ad.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 bd=X.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),Zb):(a.onCompleted(),Zb):(this.observers.push(a),new ad(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Rb(e,a),Sb(e.prototype,uc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new dd(a,b)},e}(yc),cd=X.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Zb):(this.observers.push(a),new ad(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Rb(e,a),Sb(e.prototype,uc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(yc),dd=X.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Rb(c,a),Sb(c.prototype,uc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(yc),ed=X.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),Zb):(this.observers.push(a),a.onNext(this.value),new ad(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Rb(e,a),Sb(e.prototype,uc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped){this.value=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),e}(yc),fd=X.ReplaySubject=function(a){function d(a,b){return Yb(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new zc(this.scheduler,a),e=d(this,c);b(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function f(b,c,d){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=d||fc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return Rb(f,a),Sb(f.prototype,uc.prototype,{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(this),!this.isStopped){var d=this.scheduler.now();this.q.push({interval:d,value:a}),this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onNext(a),h.ensureActive()}}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var d=this.scheduler.now();this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onError(a),h.ensureActive()}this.observers.length=0}},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onCompleted(),g.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),f}(yc);X.Pauser=function(a){function b(){a.call(this)}return Rb(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(bd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(S.Rx=X,define(function(){return X})):T&&U?V?(U.exports=X).Rx=X:T.Rx=X:S.Rx=X;var gd=h()}).call(this); +(function(a){function b(a){if(a.isDisposed)throw new Error(ib)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(jb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(nb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+nb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===lb&&d>=mb&&gd>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(jb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return lb=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!Pb(a))return b;Ob.nonEnumArgs&&a.length&&Qb(a)&&(a=Sb.call(a));var c=Ob.enumPrototypes&&"function"==typeof a,d=Ob.enumErrorProps&&(a===Jb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Ob.nonEnumShadows&&a!==Kb){var f=a.constructor,g=-1,h=vb;if(a===(f&&f.prototype))var i=a===Lb?Fb:a===Jb?Ab:Gb.call(a),j=Nb[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(){this._s=s}function t(){this._s=s,this._l=s.length,this._i=0}function u(a){this._a=a}function v(a){this._a=a,this._l=z(a),this._i=0}function w(a){return"number"==typeof a&&U.isFinite(a)}function x(b){var c,d=b[ob];if(!d&&"string"==typeof b)return c=new r(b),c[ob]();if(!d&&b.length!==a)return c=new u(b),c[ob]();if(!d)throw new TypeError("Object is not iterable");return b[ob]()}function y(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function z(a){var b=+a.length;return isNaN(b)?0:0!==b&&w(b)?(b=y(b)*Math.floor(Math.abs(b)),0>=b?0:b>Fc?Fc:b):b}function A(a,b){return _(a)||(a=hc),new $c(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function B(a,b){return new $c(function(c){var d=new ac,e=new bc;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)}fb(f)&&(f=Tc(f)),d=new ac,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function C(a,b){var c=this;return new $c(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function D(){return!1}function E(){return[]}function F(a,b,c){var d=tb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return fb(e)&&(e=Tc(e)),(rb(e)||qb(e))&&(e=Gc(e)),e}).concatAll()}function G(a,b,c){this.observer=a,this.selector=b,this.source=c,this.index=0,this.isStopped=!1}function H(a,b,c){var d=tb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return fb(e)&&(e=Tc(e)),(rb(e)||qb(e))&&(e=Gc(e)),e}).mergeAll()}function I(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.index=0,this.isStopped=!1}function J(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),$b(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function K(a,b,c){var d=new Xb;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(K(a.item(e),b,c));else a&&d.add(J(a,b,c));return d}function L(a,b){return new $c(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function M(a,b,c){return new $c(function(d){var e=a,f=ec(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function N(a,b){return new $c(function(c){return b.scheduleWithRelative(ec(a),function(){c.onNext(0),c.onCompleted()})})}function O(a,b,c){return a===b?new $c(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Dc(function(){return M(c.now()+a,b,c)})}function P(a,b,c){return new $c(function(d){var e,f=!1,g=new bc,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 ac,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 Xb(e,g)},a)}function Q(a,b,c){return Dc(function(){return P(a,b-c.now(),c)})}function R(a,b){return new $c(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Xb(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}function S(a,b,c){return new $c(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(ab))){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 Xb(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)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var T={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},U=T[typeof window]&&window||this,V=T[typeof exports]&&exports&&!exports.nodeType&&exports,W=T[typeof module]&&module&&!module.nodeType&&module,X=W&&W.exports===V&&V,Y=T[typeof global]&&global;!Y||Y.global!==Y&&Y.window!==Y||(U=Y);var Z={internals:{},config:{Promise:U.Promise},helpers:{}},$=Z.helpers.noop=function(){},_=(Z.helpers.notDefined=function(a){return"undefined"==typeof a},Z.helpers.isScheduler=function(a){return a instanceof Z.Scheduler}),ab=Z.helpers.identity=function(a){return a},bb=(Z.helpers.pluck=function(a){return function(b){return b[a]}},Z.helpers.just=function(a){return function(){return a}},Z.helpers.defaultNow=Date.now),cb=Z.helpers.defaultComparer=function(a,b){return Rb(a,b)},db=Z.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},eb=(Z.helpers.defaultKeySerializer=function(a){return a.toString()},Z.helpers.defaultError=function(a){throw a}),fb=Z.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},gb=(Z.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},Z.helpers.not=function(a){return!a},Z.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Gb.call(a)}),a}()),hb="Argument out of range",ib="Object has been disposed";Z.config.longStackSupport=!1;var jb=!1;try{throw new Error}catch(kb){jb=!!kb.stack}var lb,mb=h(),nb="From previous event:",ob="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";U.Set&&"function"==typeof(new U.Set)["@@iterator"]&&(ob="@@iterator");var pb=Z.doneEnumerator={done:!0,value:a},qb=Z.helpers.isIterable=function(b){return b[ob]!==a},rb=Z.helpers.isArrayLike=function(b){return b&&b.length!==a};Z.helpers.iterator=ob;var sb,tb=Z.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},ub=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],vb=ub.length,wb="[object Arguments]",xb="[object Array]",yb="[object Boolean]",zb="[object Date]",Ab="[object Error]",Bb="[object Function]",Cb="[object Number]",Db="[object Object]",Eb="[object RegExp]",Fb="[object String]",Gb=Object.prototype.toString,Hb=Object.prototype.hasOwnProperty,Ib=Gb.call(arguments)==wb,Jb=Error.prototype,Kb=Object.prototype,Lb=String.prototype,Mb=Kb.propertyIsEnumerable;try{sb=!(Gb.call(document)==Db&&!({toString:0}+""))}catch(kb){sb=!0}var Nb={};Nb[xb]=Nb[zb]=Nb[Cb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Nb[yb]=Nb[Fb]={constructor:!0,toString:!0,valueOf:!0},Nb[Ab]=Nb[Bb]=Nb[Eb]={constructor:!0,toString:!0},Nb[Db]={constructor:!0};var Ob={};!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);Ob.enumErrorProps=Mb.call(Jb,"message")||Mb.call(Jb,"name"),Ob.enumPrototypes=Mb.call(a,"prototype"),Ob.nonEnumArgs=0!=c,Ob.nonEnumShadows=!/valueOf/.test(b)}(1);var Pb=Z.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Qb=function(a){return a&&"object"==typeof a?Gb.call(a)==wb:!1};Ib||(Qb=function(a){return a&&"object"==typeof a?Hb.call(a,"callee"):!1});{var Rb=Z.internals.isEqual=function(a,b){return o(a,b,[],[])},Sb=({}.hasOwnProperty,Array.prototype.slice),Tb=this.inherits=Z.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Ub=Z.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}};Z.internals.addRef=function(a,b){return new $c(function(c){return new Xb(b.getDisposable(),a.subscribe(c))})}}q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Vb=Z.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Wb=Vb.prototype;Wb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Wb.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)}}},Wb.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},Yb=Xb.prototype;Yb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Yb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Yb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},Yb.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var Zb=Z.Disposable=function(a){this.isDisposed=!1,this.action=a||$};Zb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var $b=Zb.create=function(a){return new Zb(a)},_b=Zb.empty={dispose:$},ac=Z.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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),bc=Z.SerialDisposable=ac,cc=(Z.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?_b:new a(this)},b}(),Z.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||db,this.disposable=new ac});cc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},cc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},cc.prototype.isCancelled=function(){return this.disposable.isDisposed},cc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var dc=Z.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(),_b}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=bb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),ec=dc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Xb,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),_b});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Xb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),_b});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")})}}(dc.prototype),function(){dc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},dc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof U.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=U.setInterval(function(){d=c(d)},b);return $b(function(){U.clearInterval(e)})}}(dc.prototype);var fc,gc=dc.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+ec(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new dc(bb,a,b,c)}(),hc=dc.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-dc.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()+dc.normalize(c),g=new cc(this,b,d,f);if(e)e.enqueue(g);else{e=new Vb(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 dc(bb,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),ic=(Z.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 ac;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),$),jc=function(){var a,b=$;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!U.setTimeout)throw new Error("No concurrency detected!");a=U.setTimeout,b=U.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),kc=jc.setTimeout,lc=jc.clearTimeout;!function(){function a(){if(!U.postMessage||U.importScripts)return!1;var a=!1,b=U.onmessage;return U.onmessage=function(){a=!0},U.postMessage("","*"),U.onmessage=b,a}var b=RegExp("^"+String(Gb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=Y&&X&&Y.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=Y&&X&&Y.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)fc=c,ic=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))fc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};U.addEventListener?U.addEventListener("message",h,!1):U.attachEvent("onmessage",h,!1),fc=function(a){var b=g++;f[b]=a,U.postMessage(e+b,"*")}}else if(U.MessageChannel){var i=new U.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},fc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in U&&"onreadystatechange"in U.document.createElement("script")?fc=function(a){var b=U.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},U.document.documentElement.appendChild(b)}:(fc=function(a){return kc(a,0)},ic=lc)}();var mc=dc.timeout=function(){function a(a,b){var c=this,d=new ac,e=fc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Xb(d,$b(function(){ic(e)}))}function b(a,b,c){var d=this,e=dc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new ac,g=kc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Xb(f,$b(function(){lc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new dc(bb,a,b,c)}(),nc=Z.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 _(a)||(a=gc),new $c(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),oc=nc.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 nc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),pc=nc.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 nc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),qc=nc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new nc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),rc=Z.internals.Enumerator=function(a){this._next=a};rc.prototype.next=function(){return this._next()},rc.prototype[ob]=function(){return this};var sc=Z.internals.Enumerable=function(a){this._iterator=a};sc.prototype[ob]=function(){return this._iterator()},sc.prototype.concat=function(){var a=this;return new $c(function(b){var c,d=a[ob](),e=new bc,f=gc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;fb(h)&&(h=Tc(h));var i=new ac;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Xb(e,f,$b(function(){c=!0}))})},sc.prototype.catchError=function(){var a=this;return new $c(function(b){var c,d=a[ob](),e=new bc,f=gc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;fb(i)&&(i=Tc(i));var j=new ac;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Xb(e,f,$b(function(){c=!0}))})},sc.prototype.catchErrorWhen=function(a){var b=this;return new $c(function(c){var d,e,f=new bd,g=new bd,h=a(f),i=h.subscribe(g),j=b[ob](),k=new bc,l=gc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;fb(i)&&(i=Tc(i));var l=new ac,m=new ac;k.setDisposable(new Xb(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Xb(i,k,l,$b(function(){d=!0}))})};var tc,uc=sc.repeat=function(a,b){return null==b&&(b=-1),new sc(function(){var c=b;return new rc(function(){return 0===c?pb:(c>0&&c--,{done:!1,value:a})})})},vc=sc.of=function(a,b,c){if(b)var d=tb(b,c,3);return new sc(function(){var c=-1;return new rc(function(){return++c0&&(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}(yc),Cc=Z.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?$b(a):_b}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new _c(a),d=[b,this];return hc.scheduleRequired()?hc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Tb(e,a),e.prototype.subscribeCore=function(){throw new Error("Not implemeneted")},e}(Ac);tc.toArray=function(){var a=this;return new $c(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},Ac.create=Ac.createWithDisposable=function(a,b){return new $c(a,b)};var Dc=Ac.defer=function(a){return new $c(function(b){var c;try{c=a()}catch(d){return Lc(d).subscribe(b)}return fb(c)&&(c=Tc(c)),c.subscribe(b)})},Ec=Ac.empty=function(a){return _(a)||(a=gc),new $c(function(b){return a.schedule(function(){b.onCompleted()})})},Fc=Math.pow(2,53)-1;r.prototype[ob]=function(){return new t(this._s)},t.prototype[ob]=function(){return this},t.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return A(null,a)},Ac.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);return A(a,b)},Ac.pairs=function(a,b){return b||(b=Z.Scheduler.currentThread),new $c(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},Ac.range=function(a,b,c){return _(c)||(c=hc),new $c(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},Ac.repeat=function(a,b,c){return _(c)||(c=hc),Kc(a,c).repeat(null==b?-1:b)};var Kc=Ac["return"]=Ac.just=function(a,b){return _(b)||(b=gc),new $c(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Ac.returnValue=function(){return Kc.apply(null,arguments)};var Lc=Ac["throw"]=Ac.throwError=function(a,b){return _(b)||(b=gc),new $c(function(c){return b.schedule(function(){c.onError(a)})})};Ac.throwException=function(){return Ac.throwError.apply(null,arguments)},tc["catch"]=tc.catchError=function(a){return"function"==typeof a?B(this,a):Mc([this,a])},tc.catchException=function(a){return this.catchError(a)};var Mc=Ac.catchError=Ac["catch"]=Ac.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return vc(a).catchError()};tc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Nc.apply(this,a)};var Nc=Ac.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new $c(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every(ab))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every(ab)&&b.onCompleted()}function e(a){j[a]=!0,j.every(ab)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new ac;fb(f)&&(f=Tc(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new Xb(l)},this)};tc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Oc.apply(null,a)};var Oc=Ac.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return vc(a).concat()};tc.concatAll=tc.concatObservable=function(){return this.merge(1)},tc.merge=function(a){if("number"!=typeof a)return Pc(this,a);var b=this;return new $c(function(c){function d(a){var b=new ac;f.add(b),fb(a)&&(a=Tc(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Xb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted() +})),f},b)};var Pc=Ac.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(_(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=gc,b=0;d>b;b++)c.push(arguments[b]);else for(a=gc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),A(a,c).mergeAll()};tc.mergeAll=function(){var a=this;return new $c(function(b){var c=new Xb,d=!1,e=new ac;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new ac;c.add(e),fb(a)&&(a=Tc(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},tc.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},tc.skipUntil=function(a){var b=this;return new $c(function(c){var d=!1,e=new Xb(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));fb(a)&&(a=Tc(a));var f=new ac;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},tc["switch"]=tc.switchLatest=function(){var a=this;return new $c(function(b){var c=!1,d=new bc,e=!1,f=0,g=a.subscribe(function(a){var g=new ac,h=++f;c=!0,d.setDisposable(g),fb(a)&&(a=Tc(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())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new Xb(g,d)},a)},tc.takeUntil=function(a){var b=this;return new $c(function(c){return fb(a)&&(a=Tc(a)),new Xb(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},$))},b)},tc.withLatestFrom=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new $c(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new ac;fb(d)&&(d=Tc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(ab)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new ac;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new Xb(j)},this)},tc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return C.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new $c(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every(ab)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,E),i=p(g,D),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new ac;fb(e)&&(e=Tc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new Xb(j)},d)},Ac.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},Ac.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new $c(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(ab))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(ab)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new ac,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Xb(h)})},tc.asObservable=function(){var a=this;return new $c(function(b){return a.subscribe(b)},this)},tc.dematerialize=function(){var a=this;return new $c(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},tc.distinctUntilChanged=function(a,b){var c=this;return b||(b=cb),new $c(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},tc["do"]=tc.tap=tc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?xc(a||$,b||$,c||$):a;return new $c(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},tc.doOnNext=tc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},tc.doOnError=tc.tapOnError=function(a,b){return this.tap($,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},tc.doOnCompleted=tc.tapOnCompleted=function(a,b){return this.tap($,null,"undefined"!=typeof b?function(){a.call(b)}:a)},tc["finally"]=tc.ensure=function(a){var b=this;return new $c(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return $b(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},tc.finallyAction=function(a){return this.ensure(a)},tc.ignoreElements=function(){var a=this;return new $c(function(b){return a.subscribe($,function(a){b.onError(a)},function(){b.onCompleted()})},a)},tc.materialize=function(){var a=this;return new $c(function(b){return a.subscribe(function(a){b.onNext(oc(a))},function(a){b.onNext(pc(a)),b.onCompleted()},function(){b.onNext(qc()),b.onCompleted()})},a)},tc.repeat=function(a){return uc(this,a).concat()},tc.retry=function(a){return uc(this,a).catchError()},tc.retryWhen=function(a){return uc(this).catchErrorWhen(a)},tc.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 $c(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},tc.skipLast=function(a){var b=this;return new $c(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},tc.startWith=function(){var a,b=0;arguments.length&&_(arguments[0])?(a=arguments[0],b=1):a=gc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return vc([Jc(c,a),this]).concat()},tc.takeLast=function(a){var b=this;return new $c(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},tc.selectConcat=tc.concatMap=function(a,b,c){return gb(a)&&gb(b)?this.concatMap(function(c,d){var e=a(c,d);return fb(e)&&(e=Tc(e)),(rb(e)||qb(e))&&(e=Gc(e)),e.map(function(a,e){return b(c,a,d,e)})}):gb(a)?F(this,a,c):F(this,function(){return a})};var Qc=function(a){function b(b,c,d){this.source=b,this.selector=tb(c,d,3),a.call(this)}return Tb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new G(a,this.selector,this))},b}(Cc);G.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)}},G.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},G.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},G.prototype.dispose=function(){this.isStopped=!0},G.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},tc.map=tc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Qc?this.internalMap(a,b):new Qc(this,c,b)},tc.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},tc.selectMany=tc.flatMap=function(a,b,c){return gb(a)&&gb(b)?this.flatMap(function(c,d){var e=a(c,d);return fb(e)&&(e=Tc(e)),(rb(e)||qb(e))&&(e=Gc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):gb(a)?H(this,a,c):H(this,function(){return a})},tc.selectSwitch=tc.flatMapLatest=tc.switchMap=function(a,b){return this.select(a,b).switchLatest()},tc.skip=function(a){if(0>a)throw new Error(hb);var b=this;return new $c(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},tc.skipWhile=function(a,b){var c=this,d=tb(a,b,3);return new $c(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},tc.take=function(a,b){if(0>a)throw new RangeError(hb);if(0===a)return Ec(b);var c=this;return new $c(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},tc.takeWhile=function(a,b){var c=this,d=tb(a,b,3);return new $c(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Rc=function(a){function b(b,c,d){this.source=b,this.predicate=tb(c,d,3),a.call(this)}return Tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new I(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Cc);I.prototype.onNext=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},I.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},I.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},I.prototype.dispose=function(){this.isStopped=!0},I.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},tc.filter=tc.where=function(a,b){return this instanceof Rc?this.internalFilter(a,b):new Rc(this,a,b)},Ac.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new $c(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Ac.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new $c(function(e){function f(a){if(a)return void e.onError(a);for(var b=[],d=1,f=arguments.length;f>d;d++)b.push(arguments[d]);if(c){try{b=c(b)}catch(g){return e.onError(g)}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()}},Z.config.useNativeEvents=!1,Ac.fromEvent=function(a,b,c){if(a.addListener)return Sc(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!Z.config.useNativeEvents){if("function"==typeof a.on&&"function"==typeof a.off)return Sc(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(U.Ember&&"function"==typeof U.Ember.addListener)return Sc(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c)}return new $c(function(d){return K(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 Sc=Ac.fromEventPattern=function(a,b,c){return new $c(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 $b(function(){b&&b(e,f)})}).publish().refCount()},Tc=Ac.fromPromise=function(a){return Dc(function(){var b=new Z.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};tc.toPromise=function(a){if(a||(a=Z.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)})})},Ac.startAsync=function(a){var b;try{b=a()}catch(c){return Lc(c)}return Tc(b)},tc.multicast=function(a,b){var c=this;return"function"==typeof a?new $c(function(d){var e=c.multicast(a());return new Xb(b(e).subscribe(d),e.connect())},c):new Uc(c,a)},tc.publish=function(a){return a&&gb(a)?this.multicast(function(){return new bd},a):this.multicast(new bd)},tc.share=function(){return this.publish().refCount()},tc.publishLast=function(a){return a&&gb(a)?this.multicast(function(){return new cd},a):this.multicast(new cd)},tc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new ed(b)},a):this.multicast(new ed(a))},tc.shareValue=function(a){return this.publishValue(a).refCount()},tc.replay=function(a,b,c,d){return a&&gb(a)?this.multicast(function(){return new fd(b,c,d)},a):this.multicast(new fd(b,c,d))},tc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var Uc=Z.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Xb(f.subscribe(c),$b(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return Tb(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new $c(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Ac),Vc=Ac.interval=function(a,b){return O(a,a,_(b)?b:mc)};Ac.timer=function(b,c,d){var e;return _(d)||(d=mc),c!==a&&"number"==typeof c?e=c:_(c)&&(d=c),b instanceof Date&&e===a?L(b.getTime(),d):b instanceof Date&&e!==a?(e=c,M(b.getTime(),e,d)):e===a?N(b,d):O(b,e,d)}}tc.delay=function(a,b){return _(b)||(b=mc),a instanceof Date?Q(this,a.getTime(),b):P(this,a,b)},tc.debounce=tc.throttleWithTimeout=function(a,b){_(b)||(b=mc);var c=this;return new $c(function(d){var e,f=new bc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new ac;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 Xb(i,f)},this)},tc.throttle=function(a,b){return this.debounce(a,b)},tc.timestamp=function(a){return _(a)||(a=mc),this.map(function(b){return{value:b,timestamp:a.now()}})},tc.sample=tc.throttleLatest=function(a,b){return _(b)||(b=mc),"number"==typeof a?R(this,Vc(a,b)):R(this,a)},tc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=Lc(new Error(b||"Timeout"))),_(c)||(c=mc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new $c(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(fb(b)&&(b=Tc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new ac,j=new bc,k=!1,l=new bc;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 Xb(j,l)},d)},tc.throttleFirst=function(a,b){_(b)||(b=mc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new $c(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var Wc=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=_b,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=_b)});return new Xb(c,d,e)}function c(c,d){this.source=c,this.controller=new bd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return Tb(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Ac);tc.pausable=function(a){return new Wc(this,a)};var Xc=function(b){function c(b){var c,d=[],e=S(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 bd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return Tb(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Ac);tc.pausableBuffered=function(a){return new Xc(this,a)};var Yc=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new Zc(d),this.source=c.multicast(this.subject).refCount()}return Tb(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Ac),Zc=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new bd,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=_b,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=_b}return Tb(c,a),Ub(c.prototype,wc,{onCompleted:function(){this.hasCompleted=!0,(!this.enableQueue||0===this.queue.length)&&this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,(!this.enableQueue||0===this.queue.length)&&this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=_b):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=_b),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?_b:(this.requestedCount=a,this.requestedDisposable=$b(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=_b}}),c}(Ac);tc.controlled=function(a){return null==a&&(a=!0),new Yc(this,a)},tc.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 $c(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)})},c)};var $c=Z.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?$b(a):_b}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new _c(a),e=[d,b];return hc.scheduleRequired()?hc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Tb(d,a),d}(Ac),_c=function(a){function b(b){a.call(this),this.observer=b,this.m=new ac}Tb(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(yc),ad=function(a,b){this.subject=a,this.observer=b};ad.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 bd=Z.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),_b):(a.onCompleted(),_b):(this.observers.push(a),new ad(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Tb(e,a),Ub(e.prototype,wc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new dd(a,b)},e}(Ac),cd=Z.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),_b):(this.observers.push(a),new ad(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Tb(e,a),Ub(e.prototype,wc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(Ac),dd=Z.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Tb(c,a),Ub(c.prototype,wc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Ac),ed=Z.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),_b):(this.observers.push(a),a.onNext(this.value),new ad(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Tb(e,a),Ub(e.prototype,wc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped){this.value=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),e}(Ac),fd=Z.ReplaySubject=function(a){function d(a,b){return $b(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new Bc(this.scheduler,a),e=d(this,c);b(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function f(b,c,d){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=d||hc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return Tb(f,a),Ub(f.prototype,wc.prototype,{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(this),!this.isStopped){var d=this.scheduler.now();this.q.push({interval:d,value:a}),this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onNext(a),h.ensureActive()}}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var d=this.scheduler.now();this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onError(a),h.ensureActive()}this.observers.length=0}},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onCompleted(),g.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),f}(Ac);Z.Pauser=function(a){function b(){a.call(this)}return Tb(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(bd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(U.Rx=Z,define(function(){return Z})):V&&W?X?(W.exports=Z).Rx=Z:V.Rx=Z:U.Rx=Z;var gd=h()}).call(this); //# sourceMappingURL=rx.lite.map \ No newline at end of file diff --git a/dist/rx.map b/dist/rx.map index d49244dd1..877081436 100644 --- a/dist/rx.map +++ b/dist/rx.map @@ -1 +1 @@ -{"version":3,"file":"rx.min.js","sources":["rx.js"],"names":["undefined","checkDisposed","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","ScheduledDisposable","scheduler","disposable","scheduleItem","s","dispose","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","apply","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","CompositeDisposable","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","isArray","disposables","CompositeDisposablePrototype","add","shouldDispose","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","event","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","isStopped","completed","fail","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","cancel","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","mapper","list","FromArrayObservable","sink","FromArraySink","run","loopRecursive","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","pairs","keys","range","observableReturn","returnValue","throwError","throwException","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","res","hasValueAll","every","values","filter","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","materialize","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","MapObservable","internalMap","MapObserver","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","predicate","running","take","RangeError","takeWhile","FilterObservable","FilterObserver","internalFilter","shouldYield","transduce","transducer","transformForObserver","init","step","obs","input","xform","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAMC,IACtE,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAAQC,EAAI,EAAGC,EAAMH,EAAII,OAAYD,EAAJD,EAASA,IAAOD,EAAEI,KAAKL,EAAIE,GAAO,OAAOD,GAe7G,QAASK,GAAmBC,EAAOC,GAG/B,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ,EAAOK,KAAK,KAAON,GAAuB,KAC/DL,GAAMG,MAAQS,EAAkBF,IAItC,QAASE,GAAkBC,GAGzB,IAAK,GAFDC,GAAQD,EAAYE,MAAM,MAC1BC,KACKrB,EAAI,EAAGC,EAAMkB,EAAMjB,OAAYD,EAAJD,EAASA,IAAK,CAChD,GAAIsB,GAAOH,EAAMnB,EAEZuB,GAAgBD,IAAUE,EAAYF,KAASA,GAClDD,EAAalB,KAAKmB,GAGtB,MAAOD,GAAaL,KAAK,MAG3B,QAASO,GAAgBE,GACvB,GAAIC,GAAwBC,EAAyBF,EACrD,KAAKC,EACH,OAAO,CAET,IAAIE,GAAWF,EAAsB,GAAIG,EAAaH,EAAsB,EAE5E,OAAOE,KAAaE,IAClBD,GAAcE,IACAC,IAAdH,EAGJ,QAASL,GAAYC,GACnB,MAA4C,KAArCA,EAAUhB,QAAQ,gBACY,KAAnC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InB5E,EAAK4E,GAAKA,CAIZ,IAAI1K,IAAcC,MAElBgB,KAAK4D"} \ No newline at end of file +{"version":3,"file":"rx.min.js","sources":["rx.js"],"names":["undefined","checkDisposed","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","this","ScheduledDisposable","scheduler","disposable","scheduleItem","s","dispose","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","array","isScheduler","currentThreadScheduler","AnonymousObservable","observer","scheduleRecursive","onNext","onCompleted","observableCatchHandler","handler","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","bind","exception","d","ex","onError","isPromise","observableFromPromise","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","x","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","MapObserver","isStopped","flatMap","mergeAll","FilterObserver","predicate","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","longStackSupport","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","apply","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","CompositeDisposable","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","isArray","disposables","CompositeDisposablePrototype","add","shouldDispose","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","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","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","event","data","substring","handleId","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","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","completed","fail","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","cancel","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","val","charAt","from","iterable","mapFn","mapper","list","FromArrayObservable","sink","FromArraySink","run","loopRecursive","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","pairs","keys","range","observableReturn","returnValue","throwError","throwException","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","previous","acc","handlerOrSecond","observableCatch","catchException","combineLatest","res","hasValueAll","every","values","filter","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","innerSubscription","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","materialize","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","MapObservable","internalMap","select","currentProp","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","running","take","RangeError","takeWhile","FilterObservable","internalFilter","shouldYield","transduce","transducer","transformForObserver","init","step","obs","input","xform","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAMC,IACtE,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAAQC,EAAI,EAAGC,EAAMH,EAAII,OAAYD,EAAJD,EAASA,IAAOD,EAAEI,KAAKL,EAAIE,GAAO,OAAOD,GAe7G,QAASK,GAAmBC,EAAOC,GAG/B,GAAIC,IACAD,EAAWE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AAKmC,SAASE,OAAOpE,MAIlBunB,GACPtM,IAEmB,mBAAVuM,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzEzkB,EAAKgF,GAAKA,EAEVwf,OAAO,WACL,MAAOxf,MAEAR,GAAeG,EAEpBE,GACDF,EAAWF,QAAUO,GAAIA,GAAKA,EAE/BR,EAAYQ,GAAKA,EAInBhF,EAAKgF,GAAKA,CAIZ,IAAI9K,IAAcC,MAElBgB,KAAK4D"} \ No newline at end of file diff --git a/dist/rx.min.js b/dist/rx.min.js index 9cefbf624..97f7af056 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(a){if(a.isDisposed)throw new Error(ab)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(bb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(fb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+fb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===db&&d>=eb&&Yc>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(bb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return db=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!Hb(a))return b;Gb.nonEnumArgs&&a.length&&Ib(a)&&(a=Kb.call(a));var c=Gb.enumPrototypes&&"function"==typeof a,d=Gb.enumErrorProps&&(a===Bb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Gb.nonEnumShadows&&a!==Cb){var f=a.constructor,g=-1,h=nb;if(a===(f&&f.prototype))var i=a===Db?xb:a===Bb?sb:yb.call(a),j=Fb[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function t(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function u(){this._s=s}function v(){this._s=s,this._l=s.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&M.isFinite(a)}function z(b){var c,d=b[gb];if(!d&&"string"==typeof b)return c=new u(b),c[gb]();if(!d&&b.length!==a)return c=new w(b),c[gb]();if(!d)throw new TypeError("Object is not iterable");return b[gb]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>Cc?Cc:b):b}function C(a,b){return T(a)||(a=bc),new Tc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function D(a,b){return new Tc(function(c){var d=new Vb,e=new Wb;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=zc(f)),d=new Vb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function E(a,b){var c=this;return new Tc(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function F(){return!1}function G(){return[]}function H(a,b,c){var d=lb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Z(e)&&(e=zc(e)),(jb(e)||ib(e))&&(e=Dc(e)),e}).concatAll()}function I(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function J(a){this.comparer=a,this.set=[]}function K(a,b,c){var d=lb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Z(e)&&(e=zc(e)),(jb(e)||ib(e))&&(e=Dc(e)),e}).mergeAll()}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=Date.now),W=R.helpers.defaultComparer=function(a,b){return Jb(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]"==yb.call(a)}),a}()),_="Argument out of range",ab="Object has been disposed";R.config.longStackSupport=!1;var bb=!1;try{throw new Error}catch(cb){bb=!!cb.stack}var db,eb=h(),fb="From previous event:",gb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";M.Set&&"function"==typeof(new M.Set)["@@iterator"]&&(gb="@@iterator");var hb=R.doneEnumerator={done:!0,value:a},ib=R.helpers.isIterable=function(b){return b[gb]!==a},jb=R.helpers.isArrayLike=function(b){return b&&b.length!==a};R.helpers.iterator=gb;var kb,lb=R.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},mb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],nb=mb.length,ob="[object Arguments]",pb="[object Array]",qb="[object Boolean]",rb="[object Date]",sb="[object Error]",tb="[object Function]",ub="[object Number]",vb="[object Object]",wb="[object RegExp]",xb="[object String]",yb=Object.prototype.toString,zb=Object.prototype.hasOwnProperty,Ab=yb.call(arguments)==ob,Bb=Error.prototype,Cb=Object.prototype,Db=String.prototype,Eb=Cb.propertyIsEnumerable;try{kb=!(yb.call(document)==vb&&!({toString:0}+""))}catch(cb){kb=!0}var Fb={};Fb[pb]=Fb[rb]=Fb[ub]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Fb[qb]=Fb[xb]={constructor:!0,toString:!0,valueOf:!0},Fb[sb]=Fb[tb]=Fb[wb]={constructor:!0,toString:!0},Fb[vb]={constructor:!0};var Gb={};!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);Gb.enumErrorProps=Eb.call(Bb,"message")||Eb.call(Bb,"name"),Gb.enumPrototypes=Eb.call(a,"prototype"),Gb.nonEnumArgs=0!=c,Gb.nonEnumShadows=!/valueOf/.test(b)}(1);var Hb=R.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Ib=function(a){return a&&"object"==typeof a?yb.call(a)==ob:!1};Ab||(Ib=function(a){return a&&"object"==typeof a?zb.call(a,"callee"):!1});var Jb=R.internals.isEqual=function(a,b){return o(a,b,[],[])},Kb=({}.hasOwnProperty,Array.prototype.slice),Lb=this.inherits=R.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Mb=R.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},Nb=R.internals.addRef=function(a,b){return new Tc(function(c){return new Qb(b.getDisposable(),a.subscribe(c))})};q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Ob=R.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Pb=Ob.prototype;Pb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Pb.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)}}},Pb.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},Rb=Qb.prototype;Rb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Rb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Rb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},Rb.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var Sb=R.Disposable=function(a){this.isDisposed=!1,this.action=a||S};Sb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Tb=Sb.create=function(a){return new Sb(a)},Ub=Sb.empty={dispose:S},Vb=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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),Wb=R.SerialDisposable=Vb,Xb=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?Ub:new a(this)},b}();r.prototype.dispose=function(){this.scheduler.scheduleWithState(this,t)};var Yb=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 Vb};Yb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Yb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Yb.prototype.isCancelled=function(){return this.disposable.isDisposed},Yb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Zb=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(),Ub}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}(),$b=Zb.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Qb,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),Ub});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Qb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Ub});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")})}}(Zb.prototype),function(){Zb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Zb.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 Tb(function(){M.clearInterval(e)})}}(Zb.prototype),function(a){a.catchError=a["catch"]=function(a){return new gc(this,a)}}(Zb.prototype);var _b,ac=(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 Vb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Zb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+$b(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Zb(V,a,b,c)}()),bc=Zb.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-Zb.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()+Zb.normalize(c),g=new Yb(this,b,d,f);if(e)e.enqueue(g);else{e=new Ob(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 Zb(V,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),cc=S,dc=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}}(),ec=dc.setTimeout,fc=dc.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}var b=RegExp("^"+String(yb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=Q&&P&&Q.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=Q&&P&&Q.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)_b=c,cc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))_b=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};M.addEventListener?M.addEventListener("message",h,!1):M.attachEvent("onmessage",h,!1),_b=function(a){var b=g++;f[b]=a,M.postMessage(e+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]},_b=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in M&&"onreadystatechange"in M.document.createElement("script")?_b=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)}:(_b=function(a){return ec(a,0)},cc=fc)}();var gc=(Zb.timeout=function(){function a(a,b){var c=this,d=new Vb,e=_b(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Qb(d,Tb(function(){cc(e)}))}function b(a,b,c){var d=this,e=Zb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Vb,g=ec(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Qb(f,Tb(function(){fc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Zb(V,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 Lb(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 Ub}}},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 Vb;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}(Zb)),hc=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=ac),new Tc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),ic=hc.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 hc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),jc=hc.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 hc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),kc=hc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new hc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),lc=R.internals.Enumerator=function(a){this._next=a};lc.prototype.next=function(){return this._next()},lc.prototype[gb]=function(){return this};var mc=R.internals.Enumerable=function(a){this._iterator=a};mc.prototype[gb]=function(){return this._iterator()},mc.prototype.concat=function(){var a=this;return new Tc(function(b){var c,d=a[gb](),e=new Wb,f=ac.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;Z(h)&&(h=zc(h));var i=new Vb;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Qb(e,f,Tb(function(){c=!0}))})},mc.prototype.catchError=function(){var a=this;return new Tc(function(b){var c,d=a[gb](),e=new Wb,f=ac.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;Z(i)&&(i=zc(i));var j=new Vb;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Qb(e,f,Tb(function(){c=!0}))})},mc.prototype.catchErrorWhen=function(a){var b=this;return new Tc(function(c){var d,e,f=new Wc,g=new Wc,h=a(f),i=h.subscribe(g),j=b[gb](),k=new Wb,l=ac.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;Z(i)&&(i=zc(i));var l=new Vb,m=new Vb;k.setDisposable(new Qb(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Qb(i,k,l,Tb(function(){d=!0}))})};var nc=mc.repeat=function(a,b){return null==b&&(b=-1),new mc(function(){var c=b;return new lc(function(){return 0===c?hb:(c>0&&c--,{done:!1,value:a})})})},oc=mc.of=function(a,b,c){if(b)var d=lb(b,c,3);return new mc(function(){var c=-1;return new lc(function(){return++c0&&(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}(sc),wc=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Lb(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.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(vc),xc=R.Observable=function(){function a(a){if(R.config.longStackSupport&&bb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){d(a,c),e(a)},a.call(c,b)}}else this._subscribe=a}return rc=a.prototype,rc.subscribe=rc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:qc(a,b,c))},rc.subscribeOnNext=function(a,b){return this._subscribe(qc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},rc.subscribeOnError=function(a,b){return this._subscribe(qc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},rc.subscribeOnCompleted=function(a,b){return this._subscribe(qc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),yc=R.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Tb(a):Ub}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new Uc(a),d=[b,this];return bc.scheduleRequired()?bc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Lb(e,a),e}(xc);rc.observeOn=function(a){var b=this;return new Tc(function(c){return b.subscribe(new wc(a,c))},b)},rc.subscribeOn=function(a){var b=this;return new Tc(function(c){var d=new Vb,e=new Wb;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new r(a,b.subscribe(c)))})),e},b)};var zc=xc.fromPromise=function(a){return Ac(function(){var b=new R.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};rc.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)})})},rc.toArray=function(){var a=this;return new Tc(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},xc.create=xc.createWithDisposable=function(a,b){return new Tc(a,b)};var Ac=xc.defer=function(a){return new Tc(function(b){var c;try{c=a()}catch(d){return Jc(d).subscribe(b)}return Z(c)&&(c=zc(c)),c.subscribe(b)})},Bc=xc.empty=function(a){return T(a)||(a=ac),new Tc(function(b){return a.schedule(function(){b.onCompleted()})})},Cc=Math.pow(2,53)-1;u.prototype[gb]=function(){return new v(this._s)},v.prototype[gb]=function(){return this},v.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return C(null,a)},xc.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);return C(a,b)},xc.pairs=function(a,b){return b||(b=R.Scheduler.currentThread),new Tc(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},xc.range=function(a,b,c){return T(c)||(c=bc),new Tc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},xc.repeat=function(a,b,c){return T(c)||(c=bc),Ic(a,c).repeat(null==b?-1:b)};var Ic=xc["return"]=xc.just=function(a,b){return T(b)||(b=ac),new Tc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};xc.returnValue=function(){return Ic.apply(null,arguments)};var Jc=xc["throw"]=xc.throwError=function(a,b){return T(b)||(b=ac),new Tc(function(c){return b.schedule(function(){c.onError(a)})})};xc.throwException=function(){return xc.throwError.apply(null,arguments)},xc.using=function(a,b){return new Tc(function(c){var d,e,f=Ub;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Qb(Jc(g).subscribe(c),f)}return new Qb(e.subscribe(c),f)})},rc.amb=function(a){var b=this;return new Tc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Vb,j=new Vb;return Z(a)&&(a=zc(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 Qb(i,j)})},xc.amb=function(){function a(a,b){return a.amb(b)}var b=Hc(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},rc["catch"]=rc.catchError=function(a){return"function"==typeof a?D(this,a):Kc([this,a])},rc.catchException=function(a){return this.catchError(a)};var Kc=xc.catchError=xc["catch"]=xc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return oc(a).catchError()};rc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Lc.apply(this,a)};var Lc=xc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Tc(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every(U))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every(U)&&b.onCompleted()}function e(a){j[a]=!0,j.every(U)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new Vb;Z(f)&&(f=zc(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new Qb(l)},this)};rc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Mc.apply(null,a)};var Mc=xc.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return oc(a).concat()};rc.concatAll=rc.concatObservable=function(){return this.merge(1)},rc.merge=function(a){if("number"!=typeof a)return Nc(this,a);var b=this;return new Tc(function(c){function d(a){var b=new Vb;f.add(b),Z(a)&&(a=zc(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Qb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Nc=xc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(T(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=ac,b=0;d>b;b++)c.push(arguments[b]);else for(a=ac,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),C(a,c).mergeAll()};rc.mergeAll=function(){var a=this;return new Tc(function(b){var c=new Qb,d=!1,e=new Vb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Vb;c.add(e),Z(a)&&(a=zc(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},rc.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},rc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return Oc([this,a])};var Oc=xc.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Tc(function(b){var c=0,d=new Wb,e=ac.scheduleRecursive(function(e){var f,g;cb;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new Tc(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new Vb;Z(d)&&(d=zc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(U)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new Vb;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new Qb(j)},this)},rc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return E.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new Tc(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every(U)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,G),i=p(g,F),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new Vb;Z(e)&&(e=zc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new Qb(j)},d)},xc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},xc.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Tc(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=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Vb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Qb(h)})},rc.asObservable=function(){var a=this;return new Tc(function(b){return a.subscribe(b)},this)},rc.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})},rc.dematerialize=function(){var a=this;return new Tc(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},rc.distinctUntilChanged=function(a,b){var c=this;return b||(b=W),new Tc(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},rc["do"]=rc.tap=rc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?qc(a||S,b||S,c||S):a;return new Tc(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},rc.doOnNext=rc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},rc.doOnError=rc.tapOnError=function(a,b){return this.tap(S,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},rc.doOnCompleted=rc.tapOnCompleted=function(a,b){return this.tap(S,null,"undefined"!=typeof b?function(){a.call(b)}:a)},rc["finally"]=rc.ensure=function(a){var b=this;return new Tc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Tb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},rc.finallyAction=function(a){return this.ensure(a)},rc.ignoreElements=function(){var a=this;return new Tc(function(b){return a.subscribe(S,function(a){b.onError(a)},function(){b.onCompleted()})},a)},rc.materialize=function(){var a=this;return new Tc(function(b){return a.subscribe(function(a){b.onNext(ic(a))},function(a){b.onNext(jc(a)),b.onCompleted()},function(){b.onNext(kc()),b.onCompleted()})},a)},rc.repeat=function(a){return nc(this,a).concat()},rc.retry=function(a){return nc(this,a).catchError()},rc.retryWhen=function(a){return nc(this).catchErrorWhen(a)},rc.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 Tc(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},rc.skipLast=function(a){var b=this;return new Tc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},rc.startWith=function(){var a,b=0;arguments.length&&T(arguments[0])?(a=arguments[0],b=1):a=ac;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return oc([Gc(c,a),this]).concat()},rc.takeLast=function(a){var b=this;return new Tc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},rc.takeLastBuffer=function(a){var b=this;return new Tc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},rc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(_);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(_);return new Tc(function(d){function e(){var a=new Wc;i.push(a),d.onNext(Nb(a,g))}var f=new Vb,g=new Xb(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},c)},rc.selectConcat=rc.concatMap=function(a,b,c){return $(a)&&$(b)?this.concatMap(function(c,d){var e=a(c,d);return Z(e)&&(e=zc(e)),(jb(e)||ib(e))&&(e=Dc(e)),e.map(function(a,e){return b(c,a,d,e)})}):$(a)?H(this,a,c):H(this,function(){return a})},rc.concatMapObserver=rc.selectConcatObserver=function(a,b,c,d){var e=this,f=lb(a,d,2),g=lb(b,d,1),h=lb(c,d,0);return new Tc(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}Z(d)&&(d=zc(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}Z(c)&&(c=zc(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}Z(b)&&(b=zc(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},rc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Tc(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},J.prototype.push=function(a){var b=-1===I(this.set,a,this.comparer);return b&&this.set.push(a),b},rc.distinct=function(a,b){var c=this;return b||(b=W),new Tc(function(d){var e=new J(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)},function(a){d.onError(a)},function(){d.onCompleted()})},this)};var Pc=function(a){function b(b,c,d){this.source=b,this.selector=lb(c,d,3),a.call(this)}return Lb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new Qc(a,this.selector,this))},b}(yc),Qc=function(a){function b(b,c,d){this.observer=b,this.selector=c,this.source=d,this.index=0,a.call(this)}return Lb(b,a),b.prototype.next=function(a){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(sc);rc.map=rc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Pc?this.internalMap(a,b):new Pc(this,c,b)},rc.pluck=function(a){return this.map(function(b){return b[a]})},rc.flatMapObserver=rc.selectManyObserver=function(a,b,c,d){var e=this;return new Tc(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)}Z(c)&&(c=zc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}Z(c)&&(c=zc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}Z(a)&&(a=zc(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},rc.selectMany=rc.flatMap=function(a,b,c){return $(a)&&$(b)?this.flatMap(function(c,d){var e=a(c,d);return Z(e)&&(e=zc(e)),(jb(e)||ib(e))&&(e=Dc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):$(a)?K(this,a,c):K(this,function(){return a})},rc.selectSwitch=rc.flatMapLatest=rc.switchMap=function(a,b){return this.select(a,b).switchLatest()},rc.skip=function(a){if(0>a)throw new Error(_);var b=this;return new Tc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},rc.skipWhile=function(a,b){var c=this,d=lb(a,b,3);return new Tc(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},rc.take=function(a,b){if(0>a)throw new RangeError(_);if(0===a)return Bc(b);var c=this;return new Tc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},rc.takeWhile=function(a,b){var c=this,d=lb(a,b,3);return new Tc(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Rc=function(a){function b(b,c,d){this.source=b,this.predicate=lb(c,d,3),a.call(this)}return Lb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Sc(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(yc),Sc=function(a){function b(b,c,d){this.observer=b,this.predicate=c,this.source=d,this.index=0,a.call(this)}return Lb(b,a),b.prototype.next=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},b.prototype.error=function(a){this.observer.onError(a)},b.prototype.completed=function(){this.observer.onCompleted()},b}(sc);rc.filter=rc.where=function(a,b){return this instanceof Rc?this.internalFilter(a,b):new Rc(this,a,b)},rc.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 Tc(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)})},c)};var Tc=R.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Tb(a):Ub}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new Uc(a),e=[d,b];return bc.scheduleRequired()?bc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Lb(d,a),d}(xc),Uc=function(a){function b(b){a.call(this),this.observer=b,this.m=new Vb}Lb(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(sc),Vc=function(a,b){this.subject=a,this.observer=b};Vc.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 Wc=R.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),Ub):(a.onCompleted(),Ub):(this.observers.push(a),new Vc(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Lb(e,a),Mb(e.prototype,pc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new Xc(a,b)},e}(xc),Xc=(R.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Ub):(this.observers.push(a),new Vc(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Lb(e,a),Mb(e.prototype,pc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(xc),R.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Lb(c,a),Mb(c.prototype,pc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(xc));"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;var Yc=h()}).call(this); +(function(a){function b(a){if(a.isDisposed)throw new Error(cb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(db&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(hb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+hb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===fb&&d>=gb&&Yc>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(db)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return fb=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!Jb(a))return b;Ib.nonEnumArgs&&a.length&&Kb(a)&&(a=Mb.call(a));var c=Ib.enumPrototypes&&"function"==typeof a,d=Ib.enumErrorProps&&(a===Db||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Ib.nonEnumShadows&&a!==Eb){var f=a.constructor,g=-1,h=pb;if(a===(f&&f.prototype))var i=a===Fb?zb:a===Db?ub:Ab.call(a),j=Hb[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function t(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function u(){this._s=s}function v(){this._s=s,this._l=s.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&O.isFinite(a)}function z(b){var c,d=b[ib];if(!d&&"string"==typeof b)return c=new u(b),c[ib]();if(!d&&b.length!==a)return c=new w(b),c[ib]();if(!d)throw new TypeError("Object is not iterable");return b[ib]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>Ec?Ec:b):b}function C(a,b){return V(a)||(a=dc),new Tc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function D(a,b){return new Tc(function(c){var d=new Xb,e=new Yb;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)}_(f)&&(f=Bc(f)),d=new Xb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function E(a,b){var c=this;return new Tc(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 d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function F(){return!1}function G(){return[]}function H(a,b,c){var d=nb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return _(e)&&(e=Bc(e)),(lb(e)||kb(e))&&(e=Fc(e)),e}).concatAll()}function I(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function J(a){this.comparer=a,this.set=[]}function K(a,b,c){this.observer=a,this.selector=b,this.source=c,this.index=0,this.isStopped=!1}function L(a,b,c){var d=nb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return _(e)&&(e=Bc(e)),(lb(e)||kb(e))&&(e=Fc(e)),e}).mergeAll()}function M(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.index=0,this.isStopped=!1}var N={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},O=N[typeof window]&&window||this,P=N[typeof exports]&&exports&&!exports.nodeType&&exports,Q=N[typeof module]&&module&&!module.nodeType&&module,R=Q&&Q.exports===P&&P,S=N[typeof global]&&global;!S||S.global!==S&&S.window!==S||(O=S);var T={internals:{},config:{Promise:O.Promise},helpers:{}},U=T.helpers.noop=function(){},V=(T.helpers.notDefined=function(a){return"undefined"==typeof a},T.helpers.isScheduler=function(a){return a instanceof T.Scheduler}),W=T.helpers.identity=function(a){return a},X=(T.helpers.pluck=function(a){return function(b){return b[a]}},T.helpers.just=function(a){return function(){return a}},T.helpers.defaultNow=Date.now),Y=T.helpers.defaultComparer=function(a,b){return Lb(a,b)},Z=T.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},$=(T.helpers.defaultKeySerializer=function(a){return a.toString()},T.helpers.defaultError=function(a){throw a}),_=T.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},ab=(T.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},T.helpers.not=function(a){return!a},T.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Ab.call(a)}),a}()),bb="Argument out of range",cb="Object has been disposed";T.config.longStackSupport=!1;var db=!1;try{throw new Error}catch(eb){db=!!eb.stack}var fb,gb=h(),hb="From previous event:",ib="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";O.Set&&"function"==typeof(new O.Set)["@@iterator"]&&(ib="@@iterator");var jb=T.doneEnumerator={done:!0,value:a},kb=T.helpers.isIterable=function(b){return b[ib]!==a},lb=T.helpers.isArrayLike=function(b){return b&&b.length!==a};T.helpers.iterator=ib;var mb,nb=T.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},ob=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],pb=ob.length,qb="[object Arguments]",rb="[object Array]",sb="[object Boolean]",tb="[object Date]",ub="[object Error]",vb="[object Function]",wb="[object Number]",xb="[object Object]",yb="[object RegExp]",zb="[object String]",Ab=Object.prototype.toString,Bb=Object.prototype.hasOwnProperty,Cb=Ab.call(arguments)==qb,Db=Error.prototype,Eb=Object.prototype,Fb=String.prototype,Gb=Eb.propertyIsEnumerable;try{mb=!(Ab.call(document)==xb&&!({toString:0}+""))}catch(eb){mb=!0}var Hb={};Hb[rb]=Hb[tb]=Hb[wb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Hb[sb]=Hb[zb]={constructor:!0,toString:!0,valueOf:!0},Hb[ub]=Hb[vb]=Hb[yb]={constructor:!0,toString:!0},Hb[xb]={constructor:!0};var Ib={};!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);Ib.enumErrorProps=Gb.call(Db,"message")||Gb.call(Db,"name"),Ib.enumPrototypes=Gb.call(a,"prototype"),Ib.nonEnumArgs=0!=c,Ib.nonEnumShadows=!/valueOf/.test(b)}(1);var Jb=T.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Kb=function(a){return a&&"object"==typeof a?Ab.call(a)==qb:!1};Cb||(Kb=function(a){return a&&"object"==typeof a?Bb.call(a,"callee"):!1});var Lb=T.internals.isEqual=function(a,b){return o(a,b,[],[])},Mb=({}.hasOwnProperty,Array.prototype.slice),Nb=this.inherits=T.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Ob=T.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},Pb=T.internals.addRef=function(a,b){return new Tc(function(c){return new Sb(b.getDisposable(),a.subscribe(c))})};q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Qb=T.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Rb=Qb.prototype;Rb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Rb.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)}}},Rb.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.push(arguments[b]);this.disposables=a,this.isDisposed=!1,this.length=this.disposables.length},Tb=Sb.prototype;Tb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Tb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Tb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=[],b=0,c=this.disposables.length;c>b;b++)a.push(this.disposables[b]);for(this.disposables=[],this.length=0,b=0,c=a.length;c>b;b++)a[b].dispose()}},Tb.toArray=function(){for(var a=[],b=this.disposables.length;b>i;i++)a.push(this.disposables[i]);return a};var Ub=T.Disposable=function(a){this.isDisposed=!1,this.action=a||U};Ub.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Vb=Ub.create=function(a){return new Ub(a)},Wb=Ub.empty={dispose:U},Xb=T.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=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),Yb=T.SerialDisposable=Xb,Zb=T.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?Wb:new a(this)},b}();r.prototype.dispose=function(){this.scheduler.scheduleWithState(this,t)};var $b=T.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||Z,this.disposable=new Xb};$b.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},$b.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},$b.prototype.isCancelled=function(){return this.disposable.isDisposed},$b.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var _b=T.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(),Wb}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=X,a.normalize=function(a){return 0>a&&(a=0),a},a}(),ac=_b.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Sb,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),Wb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Sb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Wb});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")})}}(_b.prototype),function(){_b.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},_b.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof O.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=O.setInterval(function(){d=c(d)},b);return Vb(function(){O.clearInterval(e)})}}(_b.prototype),function(a){a.catchError=a["catch"]=function(a){return new ic(this,a)}}(_b.prototype);var bc,cc=(T.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 Xb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),_b.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=this.now()+ac(b);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new _b(X,a,b,c)}()),dc=_b.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();if(!b.isCancelled()){for(;b.dueTime-_b.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()+_b.normalize(c),g=new $b(this,b,d,f);if(e)e.enqueue(g);else{e=new Qb(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 _b(X,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),ec=U,fc=function(){var a,b=U;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!O.setTimeout)throw new Error("No concurrency detected!");a=O.setTimeout,b=O.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),gc=fc.setTimeout,hc=fc.clearTimeout;!function(){function a(){if(!O.postMessage||O.importScripts)return!1;var a=!1,b=O.onmessage;return O.onmessage=function(){a=!0},O.postMessage("","*"),O.onmessage=b,a}var b=RegExp("^"+String(Ab).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=S&&R&&S.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=S&&R&&S.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)bc=c,ec=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))bc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};O.addEventListener?O.addEventListener("message",h,!1):O.attachEvent("onmessage",h,!1),bc=function(a){var b=g++;f[b]=a,O.postMessage(e+b,"*")}}else if(O.MessageChannel){var i=new O.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},bc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in O&&"onreadystatechange"in O.document.createElement("script")?bc=function(a){var b=O.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},O.document.documentElement.appendChild(b)}:(bc=function(a){return gc(a,0)},ec=hc)}();var ic=(_b.timeout=function(){function a(a,b){var c=this,d=new Xb,e=bc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Sb(d,Vb(function(){ec(e)}))}function b(a,b,c){var d=this,e=_b.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Xb,g=gc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Sb(f,Vb(function(){hc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new _b(X,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 Nb(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 Wb}}},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 Xb;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}(_b)),jc=T.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 V(a)||(a=cc),new Tc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),kc=jc.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 jc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),lc=jc.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 jc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),mc=jc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new jc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),nc=T.internals.Enumerator=function(a){this._next=a};nc.prototype.next=function(){return this._next()},nc.prototype[ib]=function(){return this};var oc=T.internals.Enumerable=function(a){this._iterator=a};oc.prototype[ib]=function(){return this._iterator()},oc.prototype.concat=function(){var a=this;return new Tc(function(b){var c,d=a[ib](),e=new Yb,f=cc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;_(h)&&(h=Bc(h));var i=new Xb;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Sb(e,f,Vb(function(){c=!0}))})},oc.prototype.catchError=function(){var a=this;return new Tc(function(b){var c,d=a[ib](),e=new Yb,f=cc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;_(i)&&(i=Bc(i));var j=new Xb;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Sb(e,f,Vb(function(){c=!0}))})},oc.prototype.catchErrorWhen=function(a){var b=this;return new Tc(function(c){var d,e,f=new Wc,g=new Wc,h=a(f),i=h.subscribe(g),j=b[ib](),k=new Yb,l=cc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;_(i)&&(i=Bc(i));var l=new Xb,m=new Xb;k.setDisposable(new Sb(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Sb(i,k,l,Vb(function(){d=!0}))})};var pc=oc.repeat=function(a,b){return null==b&&(b=-1),new oc(function(){var c=b;return new nc(function(){return 0===c?jb:(c>0&&c--,{done:!1,value:a})})})},qc=oc.of=function(a,b,c){if(b)var d=nb(b,c,3);return new oc(function(){var c=-1;return new nc(function(){return++c0&&(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}(uc),yc=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Nb(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.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(xc),zc=T.Observable=function(){function a(a){if(T.config.longStackSupport&&db){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){d(a,c),e(a)},a.call(c,b)}}else this._subscribe=a}return tc=a.prototype,tc.subscribe=tc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:sc(a,b,c))},tc.subscribeOnNext=function(a,b){return this._subscribe(sc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},tc.subscribeOnError=function(a,b){return this._subscribe(sc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},tc.subscribeOnCompleted=function(a,b){return this._subscribe(sc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Ac=T.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Vb(a):Wb}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new Uc(a),d=[b,this];return dc.scheduleRequired()?dc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Nb(e,a),e.prototype.subscribeCore=function(){throw new Error("Not implemeneted")},e}(zc);tc.observeOn=function(a){var b=this;return new Tc(function(c){return b.subscribe(new yc(a,c))},b)},tc.subscribeOn=function(a){var b=this;return new Tc(function(c){var d=new Xb,e=new Yb;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new r(a,b.subscribe(c)))})),e},b)};var Bc=zc.fromPromise=function(a){return Cc(function(){var b=new T.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};tc.toPromise=function(a){if(a||(a=T.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)})})},tc.toArray=function(){var a=this;return new Tc(function(b){var c=[];return a.subscribe(function(a){c.push(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},zc.create=zc.createWithDisposable=function(a,b){return new Tc(a,b)};var Cc=zc.defer=function(a){return new Tc(function(b){var c;try{c=a()}catch(d){return Lc(d).subscribe(b)}return _(c)&&(c=Bc(c)),c.subscribe(b)})},Dc=zc.empty=function(a){return V(a)||(a=cc),new Tc(function(b){return a.schedule(function(){b.onCompleted()})})},Ec=Math.pow(2,53)-1;u.prototype[ib]=function(){return new v(this._s)},v.prototype[ib]=function(){return this},v.prototype.next=function(){if(this._ib;b++)a.push(arguments[b]);return C(null,a)},zc.ofWithScheduler=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);return C(a,b)},zc.pairs=function(a,b){return b||(b=T.Scheduler.currentThread),new Tc(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})},zc.range=function(a,b,c){return V(c)||(c=dc),new Tc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},zc.repeat=function(a,b,c){return V(c)||(c=dc),Kc(a,c).repeat(null==b?-1:b)};var Kc=zc["return"]=zc.just=function(a,b){return V(b)||(b=cc),new Tc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};zc.returnValue=function(){return Kc.apply(null,arguments)};var Lc=zc["throw"]=zc.throwError=function(a,b){return V(b)||(b=cc),new Tc(function(c){return b.schedule(function(){c.onError(a)})})};zc.throwException=function(){return zc.throwError.apply(null,arguments)},zc.using=function(a,b){return new Tc(function(c){var d,e,f=Wb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Sb(Lc(g).subscribe(c),f)}return new Sb(e.subscribe(c),f)})},tc.amb=function(a){var b=this;return new Tc(function(c){function d(){f||(f=g,j.dispose()) +}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Xb,j=new Xb;return _(a)&&(a=Bc(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 Sb(i,j)})},zc.amb=function(){function a(a,b){return a.amb(b)}var b=Jc(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},tc["catch"]=tc.catchError=function(a){return"function"==typeof a?D(this,a):Mc([this,a])},tc.catchException=function(a){return this.catchError(a)};var Mc=zc.catchError=zc["catch"]=zc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return qc(a).catchError()};tc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Nc.apply(this,a)};var Nc=zc.combineLatest=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Tc(function(b){function c(a){var c;if(h[a]=!0,i||(i=h.every(W))){try{c=d.apply(null,k)}catch(e){return void b.onError(e)}b.onNext(c)}else j.filter(function(b,c){return c!==a}).every(W)&&b.onCompleted()}function e(a){j[a]=!0,j.every(W)&&b.onCompleted()}for(var f=function(){return!1},g=a.length,h=p(g,f),i=!1,j=p(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(d){var f=a[d],g=new Xb;_(f)&&(f=Bc(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(a){b.onError(a)},function(){e(d)})),l[d]=g}(m);return new Sb(l)},this)};tc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Oc.apply(null,a)};var Oc=zc.concat=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return qc(a).concat()};tc.concatAll=tc.concatObservable=function(){return this.merge(1)},tc.merge=function(a){if("number"!=typeof a)return Pc(this,a);var b=this;return new Tc(function(c){function d(a){var b=new Xb;f.add(b),_(a)&&(a=Bc(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Sb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Pc=zc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(V(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=cc,b=0;d>b;b++)c.push(arguments[b]);else for(a=cc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),C(a,c).mergeAll()};tc.mergeAll=function(){var a=this;return new Tc(function(b){var c=new Sb,d=!1,e=new Xb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Xb;c.add(e),_(a)&&(a=Bc(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},tc.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},tc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return Qc([this,a])};var Qc=zc.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Tc(function(b){var c=0,d=new Yb,e=cc.scheduleRecursive(function(e){var f,g;cb;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new Tc(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new Xb;_(d)&&(d=Bc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(W)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new Xb;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new Sb(j)},this)},tc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);if(Array.isArray(a[0]))return E.apply(this,a);var d=this,e=a.pop();return a.unshift(d),new Tc(function(b){function c(a){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void b.onError(g)}b.onNext(c)}else i.filter(function(b,c){return c!==a}).every(W)&&b.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&b.onCompleted()}for(var g=a.length,h=p(g,G),i=p(g,F),j=new Array(g),k=0;g>k;k++)!function(d){var e=a[d],g=new Xb;_(e)&&(e=Bc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(a){b.onError(a)},function(){f(d)})),j[d]=g}(k);return new Sb(j)},d)},zc.zip=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.shift();return d.zip.apply(d,a)},zc.zipArray=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Tc(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(W))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(W)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Xb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Sb(h)})},tc.asObservable=function(){var a=this;return new Tc(function(b){return a.subscribe(b)},this)},tc.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})},tc.dematerialize=function(){var a=this;return new Tc(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},tc.distinctUntilChanged=function(a,b){var c=this;return b||(b=Y),new Tc(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},tc["do"]=tc.tap=tc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?sc(a||U,b||U,c||U):a;return new Tc(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},tc.doOnNext=tc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},tc.doOnError=tc.tapOnError=function(a,b){return this.tap(U,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},tc.doOnCompleted=tc.tapOnCompleted=function(a,b){return this.tap(U,null,"undefined"!=typeof b?function(){a.call(b)}:a)},tc["finally"]=tc.ensure=function(a){var b=this;return new Tc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Vb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},tc.finallyAction=function(a){return this.ensure(a)},tc.ignoreElements=function(){var a=this;return new Tc(function(b){return a.subscribe(U,function(a){b.onError(a)},function(){b.onCompleted()})},a)},tc.materialize=function(){var a=this;return new Tc(function(b){return a.subscribe(function(a){b.onNext(kc(a))},function(a){b.onNext(lc(a)),b.onCompleted()},function(){b.onNext(mc()),b.onCompleted()})},a)},tc.repeat=function(a){return pc(this,a).concat()},tc.retry=function(a){return pc(this,a).catchError()},tc.retryWhen=function(a){return pc(this).catchErrorWhen(a)},tc.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 Tc(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)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},tc.skipLast=function(a){var b=this;return new Tc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},tc.startWith=function(){var a,b=0;arguments.length&&V(arguments[0])?(a=arguments[0],b=1):a=cc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return qc([Ic(c,a),this]).concat()},tc.takeLast=function(a){var b=this;return new Tc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},tc.takeLastBuffer=function(a){var b=this;return new Tc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},tc.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 Tc(function(d){function e(){var a=new Wc;i.push(a),d.onNext(Pb(a,g))}var f=new Xb,g=new Zb(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},c)},tc.selectConcat=tc.concatMap=function(a,b,c){return ab(a)&&ab(b)?this.concatMap(function(c,d){var e=a(c,d);return _(e)&&(e=Bc(e)),(lb(e)||kb(e))&&(e=Fc(e)),e.map(function(a,e){return b(c,a,d,e)})}):ab(a)?H(this,a,c):H(this,function(){return a})},tc.concatMapObserver=tc.selectConcatObserver=function(a,b,c,d){var e=this,f=nb(a,d,2),g=nb(b,d,1),h=nb(c,d,0);return new Tc(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}_(d)&&(d=Bc(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}_(c)&&(c=Bc(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}_(b)&&(b=Bc(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},tc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Tc(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},J.prototype.push=function(a){var b=-1===I(this.set,a,this.comparer);return b&&this.set.push(a),b},tc.distinct=function(a,b){var c=this;return b||(b=Y),new Tc(function(d){var e=new J(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)},function(a){d.onError(a)},function(){d.onCompleted()})},this)};var Rc=function(a){function b(b,c,d){this.source=b,this.selector=nb(c,d,3),a.call(this)}return Nb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new K(a,this.selector,this))},b}(Ac);K.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.selector(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)}},K.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},K.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},K.prototype.dispose=function(){this.isStopped=!0},K.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},tc.map=tc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Rc?this.internalMap(a,b):new Rc(this,c,b)},tc.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},tc.flatMapObserver=tc.selectManyObserver=function(a,b,c,d){var e=this;return new Tc(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)}_(c)&&(c=Bc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}_(c)&&(c=Bc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}_(a)&&(a=Bc(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},tc.selectMany=tc.flatMap=function(a,b,c){return ab(a)&&ab(b)?this.flatMap(function(c,d){var e=a(c,d);return _(e)&&(e=Bc(e)),(lb(e)||kb(e))&&(e=Fc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):ab(a)?L(this,a,c):L(this,function(){return a})},tc.selectSwitch=tc.flatMapLatest=tc.switchMap=function(a,b){return this.select(a,b).switchLatest()},tc.skip=function(a){if(0>a)throw new Error(bb);var b=this;return new Tc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},tc.skipWhile=function(a,b){var c=this,d=nb(a,b,3);return new Tc(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},tc.take=function(a,b){if(0>a)throw new RangeError(bb);if(0===a)return Dc(b);var c=this;return new Tc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},tc.takeWhile=function(a,b){var c=this,d=nb(a,b,3);return new Tc(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Sc=function(a){function b(b,c,d){this.source=b,this.predicate=nb(c,d,3),a.call(this)}return Nb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new M(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Ac);M.prototype.onNext=function(a){try{var b=this.predicate(a,this.index++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)},M.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},M.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},M.prototype.dispose=function(){this.isStopped=!0},M.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},tc.filter=tc.where=function(a,b){return this instanceof Sc?this.internalFilter(a,b):new Sc(this,a,b)},tc.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 Tc(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)})},c)};var Tc=T.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Vb(a):Wb}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new Uc(a),e=[d,b];return dc.scheduleRequired()?dc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Nb(d,a),d}(zc),Uc=function(a){function b(b){a.call(this),this.observer=b,this.m=new Xb}Nb(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.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(uc),Vc=function(a,b){this.subject=a,this.observer=b};Vc.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 Wc=T.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),Wb):(a.onCompleted(),Wb):(this.observers.push(a),new Vc(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Nb(e,a),Ob(e.prototype,rc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new Xc(a,b)},e}(zc),Xc=(T.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Wb):(this.observers.push(a),new Vc(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Nb(e,a),Ob(e.prototype,rc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(zc),T.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Nb(c,a),Ob(c.prototype,rc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(zc));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(O.Rx=T,define(function(){return T})):P&&Q?R?(Q.exports=T).Rx=T:P.Rx=T:O.Rx=T;var Yc=h()}).call(this); //# sourceMappingURL=rx.map \ No newline at end of file diff --git a/doc/api/core/operators/ofarraychanges.md b/doc/api/core/operators/ofarraychanges.md new file mode 100644 index 000000000..c54c95c45 --- /dev/null +++ b/doc/api/core/operators/ofarraychanges.md @@ -0,0 +1,51 @@ +### `Rx.Observable.ofArrayChanges(array)` +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/ofarraychanges.js "View in source") + +Creates an Observable sequence from changes to an array using `Array.observe`. + +#### Arguments +1. `array` *(`Array`)*: The array to observe changes using `Array.observe` + +#### Returns +*(`Observable`)*: An observable sequence containing changes to an array from `Array.observe`. + +#### Example +```js +var arr = [1,2,3]; +var source = Rx.Observable.ofArrayChanges(arr); + +var subscription = source.subscribe( + function (x) { + console.log('Next: %s', x); + }, + function (err) { + console.log('Error: %s', err); + }, + function () { + console.log('Completed'); + }); + +arr.push(4); + +// => Next: {type: "splice", object: Array[4], index: 3, removed: Array[0], addedCount: 1} +``` + +### Location + +File: +- [`/src/core/linq/observable/ofarraychanges.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/ofarraychanges.js) + +Dist: +- [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) + +Prerequisites: +- None + +NPM Packages: +- None + +NuGet Packages: +- [`RxJS-Complete`](http://www.nuget.org/packages/RxJS-Complete) + +Unit Tests: +- [`/tests/observable/ofarraychanges.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/ofarraychanges.js) diff --git a/doc/api/core/operators/ofobjectchanges.md b/doc/api/core/operators/ofobjectchanges.md new file mode 100644 index 000000000..b867c23fd --- /dev/null +++ b/doc/api/core/operators/ofobjectchanges.md @@ -0,0 +1,51 @@ +### `Rx.Observable.ofObjectChanges(obj)` +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/ofobjectchanges.js "View in source") + +Creates an Observable sequence from changes to an object using `Object.observe`. + +#### Arguments +1. `array` *(`Array`)*: The object to observe changes using `Object.observe` + +#### Returns +*(`Observable`)*: An observable sequence containing changes to an object from `Object.observe`. + +#### Example +```js +var obj = {x: 1}; +var source = Rx.Observable.ofObjectChanges(obj); + +var subscription = source.subscribe( + function (x) { + console.log('Next: %s', x); + }, + function (err) { + console.log('Error: %s', err); + }, + function () { + console.log('Completed'); + }); + +obj.x = 42; + +// => Next: {type: "update", object: Object, name: "x", oldValue: 1} +``` + +### Location + +File: +- [`/src/core/linq/observable/ofobjectchanges.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/ofobjectchanges.js) + +Dist: +- [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) + +Prerequisites: +- None + +NPM Packages: +- None + +NuGet Packages: +- [`RxJS-Complete`](http://www.nuget.org/packages/RxJS-Complete) + +Unit Tests: +- [`/tests/observable/ofarraychanges.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/ofobjectchanges.js) diff --git a/doc/libraries/rx.complete.md b/doc/libraries/rx.complete.md index 593896289..3afffe227 100644 --- a/doc/libraries/rx.complete.md +++ b/doc/libraries/rx.complete.md @@ -44,6 +44,8 @@ NuGet Packages: - [`merge`](../api/core/operators/merge.md) - [`never`](../api/core/operators/never.md) - [`of`](../api/core/operators/of.md) +- [`ofArrayChanges`](../api/core/operators/ofarraychanges.md) +- [`ofObjectChanges`](../api/core/operators/ofobjectchanges.md) - [`ofWithScheduler`](../api/core/operators/ofwithscheduler.md) - [`onErrorResumeNext`](../api/core/operators/onerrorresumenext.md) - [`range`](../api/core/operators/range.md) diff --git a/src/core/linq/observable/pluck.js b/src/core/linq/observable/pluck.js index b966ed499..8a85cf589 100644 --- a/src/core/linq/observable/pluck.js +++ b/src/core/linq/observable/pluck.js @@ -1,17 +1,13 @@ /** * Retrieves the value of a specified nested property from all elements in * the Observable sequence. - * @param {String} nestedProps The nested property to pluck. + * @param {Arguments} arguments The nested properties to pluck. * @returns {Observable} Returns a new Observable sequence of property values. */ observableProto.pluck = function () { - var args = [].slice.call(arguments); - var len = args.length; + var args = arguments, len = arguments.length; + if (len === 0) { throw new Error('List of properties cannot be empty.'); } return this.map(function (x) { - if (len === 0) { - return undefined; - } - var currentProp = x; for (var i = 0; i < len; i++) { var p = currentProp[args[i]]; diff --git a/src/core/perf/observablebase.js b/src/core/perf/observablebase.js index 62762543c..0ea80233d 100644 --- a/src/core/perf/observablebase.js +++ b/src/core/perf/observablebase.js @@ -36,6 +36,10 @@ __super__.call(this, subscribe); } + ObservableBase.prototype.subscribeCore = function(observer) { + throw new Error('Not implemeneted'); + } + return ObservableBase; }(Observable)); diff --git a/src/core/perf/operators/combinelatest.js b/src/core/perf/operators/combinelatest.js index 3ef5e4394..168fccbe1 100644 --- a/src/core/perf/operators/combinelatest.js +++ b/src/core/perf/operators/combinelatest.js @@ -31,16 +31,16 @@ return CombineLatestObservable; }(ObservableBase)); - var CombineLatestObserver = (function(__super__) { - inherits(CombineLatestObserver, __super__); + var CombineLatestObserver = (function() { function CombineLatestObserver(observer, i, parent) { this.observer = observer; this.i = i; this.parent = parent; - __super__.call(this); + this.isStopped = false; } - CombineLatestObserver.prototype.next = function(x) { + CombineLatestObserver.prototype.onNext = function(x) { + if (this.isStopped) { return; } var i = this.i; this.parent.values[i] = x; this.parent.hasValue[i] = true; @@ -55,14 +55,29 @@ this.observer.onCompleted(); } }; - CombineLatestObserver.prototype.error = function(e) { this.observer.onError(e); }; - CombineLatestObserver.prototype.completed = function() { - this.parent.isDone[this.i] = true; - this.parent.isDone.every(identity) && this.observer.onCompleted(); + CombineLatestObserver.prototype.onError = function(e) { + if (!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + CombineLatestObserver.prototype.onCompleted = function() { + if (!this.isStopped) { + this.isStopped = true; + this.parent.isDone[this.i] = true; + this.parent.isDone.every(identity) && this.observer.onCompleted(); + } + }; + CombineLatestObserver.prototype.dispose = function() { this.isStopped = true; }; + CombineLatestObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; + this.observer.onError(e); + return true; + } + + return false; }; return CombineLatestObserver; - }(AbstractObserver)); + }()); /** * Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences or Promises produces an element. diff --git a/src/core/perf/operators/filter.js b/src/core/perf/operators/filter.js index e3b4bb4ce..b0052f439 100644 --- a/src/core/perf/operators/filter.js +++ b/src/core/perf/operators/filter.js @@ -20,36 +20,41 @@ }(ObservableBase)); - var FilterObserver = (function (__super__) { - inherits(FilterObserver, __super__); + function FilterObserver(observer, predicate, source) { + this.observer = observer; + this.predicate = predicate; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function FilterObserver(observer, predicate, source) { - this.observer = observer; - this.predicate = predicate; - this.source = source; - this.index = 0; - __super__.call(this); + FilterObserver.prototype.onNext = function(x) { + try { + var shouldYield = this.predicate(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } + shouldYield && this.observer.onNext(x); + }; - FilterObserver.prototype.next = function(x) { - try { - var shouldYield = this.predicate(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - shouldYield && this.observer.onNext(x); - }; - - FilterObserver.prototype.error = function (e) { + FilterObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + FilterObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + FilterObserver.prototype.dispose = function() { this.isStopped = true; }; + FilterObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; + return true; + } + + return false; + }; - FilterObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; - return FilterObserver; - }(AbstractObserver)); /** * Filters the elements of an observable sequence based on a predicate by incorporating the element's index. diff --git a/src/core/perf/operators/map.js b/src/core/perf/operators/map.js index cd5efc91a..d32fc3d02 100644 --- a/src/core/perf/operators/map.js +++ b/src/core/perf/operators/map.js @@ -20,36 +20,39 @@ }(ObservableBase)); - var MapObserver = (function (__super__) { - inherits(MapObserver, __super__); + function MapObserver(observer, selector, source) { + this.observer = observer; + this.selector = selector; + this.source = source; + this.index = 0; + this.isStopped = false; + } - function MapObserver(observer, selector, source) { - this.observer = observer; - this.selector = selector; - this.source = source; - this.index = 0; - __super__.call(this); + MapObserver.prototype.onNext = function(x) { + if (this.isStopped) { return; } + try { + var result = this.selector(x, this.index++, this.source); + } catch(e) { + return this.observer.onError(e); } - - MapObserver.prototype.next = function(x) { - try { - var result = this.selector(x, this.index++, this.source); - } catch(e) { - return this.observer.onError(e); - } - this.observer.onNext(result); - }; - - MapObserver.prototype.error = function (e) { + this.observer.onNext(result); + }; + MapObserver.prototype.onError = function (e) { + if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } + }; + MapObserver.prototype.onCompleted = function () { + if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } + }; + MapObserver.prototype.dispose = function() { this.isStopped = true; }; + MapObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; this.observer.onError(e); - }; - - MapObserver.prototype.completed = function () { - this.observer.onCompleted(); - }; + return true; + } - return MapObserver; - }(AbstractObserver)); + return false; + }; /** * Projects each element of an observable sequence into a new form by incorporating the element's index. diff --git a/tests/observable/ofarraychanges.js b/tests/observable/ofarraychanges.js new file mode 100644 index 000000000..65e6128f4 --- /dev/null +++ b/tests/observable/ofarraychanges.js @@ -0,0 +1,26 @@ +(function () { + if (typeof Array.observe === 'function') { + QUnit.module('ofArrayChanges'); + + var TestScheduler = Rx.TestScheduler, + Observable = Rx.Observable, + onNext = Rx.ReactiveTest.onNext, + onError = Rx.ReactiveTest.onError, + onCompleted = Rx.ReactiveTest.onCompleted, + subscribe = Rx.ReactiveTest.subscribe; + + asyncTest('ofArrayChanges captures update', function() { + var arr = [1,2,3]; + var source = Rx.Observable.ofArrayChanges(arr); + var subscription = source.subscribe(function (x) { + equal(x.type, 'splice'); + equal(x.index, 3); + equal(x.addedCount, 1); + start(); + }); + + arr.push(42); + }); + } + +}()); diff --git a/tests/observable/ofobjectchanges.js b/tests/observable/ofobjectchanges.js new file mode 100644 index 000000000..308b192e8 --- /dev/null +++ b/tests/observable/ofobjectchanges.js @@ -0,0 +1,26 @@ +(function () { + if (typeof Object.observe === 'function') { + QUnit.module('ofObjectChanges'); + + var TestScheduler = Rx.TestScheduler, + Observable = Rx.Observable, + onNext = Rx.ReactiveTest.onNext, + onError = Rx.ReactiveTest.onError, + onCompleted = Rx.ReactiveTest.onCompleted, + subscribe = Rx.ReactiveTest.subscribe; + + asyncTest('ofObjectChanges captures update', function() { + var obj = {x: 1}; + var source = Rx.Observable.ofObjectChanges(obj); + var subscription = source.subscribe(function (x) { + equal(x.type, 'update'); + equal(x.name, 'x'); + equal(x.oldValue, 1); + start(); + }); + + obj.x = 42; + }); + } + +}()); diff --git a/tests/rx.all.html b/tests/rx.all.html index 553456a52..23c44a026 100644 --- a/tests/rx.all.html +++ b/tests/rx.all.html @@ -126,6 +126,8 @@ + +