rxjs-rails 2.5.2 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rxjs/rails/version.rb +1 -1
- data/vendor/assets/javascripts/rx.aggregates.js +367 -284
- data/vendor/assets/javascripts/rx.aggregates.map +1 -1
- data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
- data/vendor/assets/javascripts/rx.all.compat.js +2405 -2438
- data/vendor/assets/javascripts/rx.all.compat.map +1 -1
- data/vendor/assets/javascripts/rx.all.compat.min.js +4 -4
- data/vendor/assets/javascripts/rx.all.js +2380 -2395
- data/vendor/assets/javascripts/rx.all.map +1 -1
- data/vendor/assets/javascripts/rx.all.min.js +4 -4
- data/vendor/assets/javascripts/rx.async.compat.js +311 -333
- data/vendor/assets/javascripts/rx.async.compat.map +1 -1
- data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
- data/vendor/assets/javascripts/rx.async.js +280 -327
- data/vendor/assets/javascripts/rx.async.map +1 -1
- data/vendor/assets/javascripts/rx.async.min.js +1 -1
- data/vendor/assets/javascripts/rx.backpressure.js +208 -176
- data/vendor/assets/javascripts/rx.backpressure.map +1 -1
- data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
- data/vendor/assets/javascripts/rx.binding.js +44 -27
- data/vendor/assets/javascripts/rx.binding.map +1 -1
- data/vendor/assets/javascripts/rx.binding.min.js +1 -1
- data/vendor/assets/javascripts/rx.coincidence.js +220 -453
- data/vendor/assets/javascripts/rx.coincidence.map +1 -1
- data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
- data/vendor/assets/javascripts/rx.compat.js +1366 -1173
- data/vendor/assets/javascripts/rx.compat.map +1 -1
- data/vendor/assets/javascripts/rx.compat.min.js +3 -2
- data/vendor/assets/javascripts/rx.core.binding.js +823 -0
- data/vendor/assets/javascripts/rx.core.binding.map +1 -0
- data/vendor/assets/javascripts/rx.core.binding.min.js +3 -0
- data/vendor/assets/javascripts/rx.core.js +1281 -0
- data/vendor/assets/javascripts/rx.core.map +1 -0
- data/vendor/assets/javascripts/rx.core.min.js +3 -0
- data/vendor/assets/javascripts/rx.core.testing.js +1242 -0
- data/vendor/assets/javascripts/rx.core.testing.map +1 -0
- data/vendor/assets/javascripts/rx.core.testing.min.js +3 -0
- data/vendor/assets/javascripts/rx.experimental.js +85 -123
- data/vendor/assets/javascripts/rx.experimental.map +1 -1
- data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
- data/vendor/assets/javascripts/rx.joinpatterns.js +48 -37
- data/vendor/assets/javascripts/rx.joinpatterns.map +1 -1
- data/vendor/assets/javascripts/rx.joinpatterns.min.js +1 -1
- data/vendor/assets/javascripts/rx.js +1367 -1174
- data/vendor/assets/javascripts/rx.lite.compat.js +1621 -1403
- data/vendor/assets/javascripts/rx.lite.compat.map +1 -1
- data/vendor/assets/javascripts/rx.lite.compat.min.js +3 -3
- data/vendor/assets/javascripts/rx.lite.extras.compat.js +119 -89
- data/vendor/assets/javascripts/rx.lite.extras.compat.map +1 -1
- data/vendor/assets/javascripts/rx.lite.extras.compat.min.js +1 -1
- data/vendor/assets/javascripts/rx.lite.extras.js +119 -89
- data/vendor/assets/javascripts/rx.lite.extras.map +1 -1
- data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
- data/vendor/assets/javascripts/rx.lite.js +1583 -1390
- data/vendor/assets/javascripts/rx.lite.map +1 -1
- data/vendor/assets/javascripts/rx.lite.min.js +3 -3
- data/vendor/assets/javascripts/rx.map +1 -1
- data/vendor/assets/javascripts/rx.min.js +3 -2
- data/vendor/assets/javascripts/rx.sorting.js +23 -27
- data/vendor/assets/javascripts/rx.sorting.map +1 -1
- data/vendor/assets/javascripts/rx.sorting.min.js +1 -1
- data/vendor/assets/javascripts/rx.testing.js +11 -15
- data/vendor/assets/javascripts/rx.testing.map +1 -1
- data/vendor/assets/javascripts/rx.testing.min.js +1 -1
- data/vendor/assets/javascripts/rx.time.js +117 -133
- data/vendor/assets/javascripts/rx.time.map +1 -1
- data/vendor/assets/javascripts/rx.time.min.js +1 -1
- data/vendor/assets/javascripts/rx.virtualtime.js +120 -39
- data/vendor/assets/javascripts/rx.virtualtime.map +1 -1
- data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
- metadata +12 -3
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rx.lite.compat.min.js","sources":["rx.lite.compat.js"],"names":["undefined","cloneArray","arr","len","length","a","Array","i","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","push","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","Error","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","tryCatcher","tryCatchTarget","apply","this","arguments","errorObj","tryCatch","fn","TypeError","thrower","arrayInitialize","count","factory","IndexedItem","id","ToArrayObserver","observer","isStopped","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","sign","number","isNaN","Math","floor","abs","maxSafeInteger","FromArraySink","parent","observableOf","scheduler","array","isScheduler","currentThreadScheduler","FromArrayObservable","PairsSink","RepeatSink","observableCatchHandler","handler","AnonymousObservable","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","x","onNext","ex","onError","isPromise","observableFromPromise","d","onCompleted","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","isArrayLike","isIterable","observableFrom","concatAll","MapObserver","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","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","exception","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","bind","combineLatestSource","subject","next","values","res","hasValueAll","every","identity","err","isDone","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","notDefined","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","asArray","not","isFn","longStackSupport","EmptyError","message","ObjectDisposedError","ArgumentOutOfRangeError","NotSupportedError","NotImplementedError","notImplemented","notSupported","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","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","isDisposable","isDisposed","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","Disposable","action","create","disposableEmpty","empty","checkDisposed","disposable","current","old","ScheduledItem","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","Scheduler","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","recursiveAction","state1","state2","isAdded","scheduler1","state3","group","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","schedulePeriodic","setInterval","clearInterval","scheduleMethod","clearMethod","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","queue","si","currentScheduler","scheduleRequired","localTimer","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localSetTimeout","localClearTimeout","setTimeout","clearTimeout","WScript","time","Sleep","runTask","handle","currentlyRunning","task","tasksByHandle","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","data","substring","MSG_PREFIX","nextHandle","reNative","RegExp","replace","setImmediate","process","nextTick","random","currentId","MessageChannel","channel","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","acceptObservable","_accept","_acceptObservable","observerOrOnNext","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","sub","subscribeCore","AutoDetachObserver","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","ToArrayObservable","toArray","createWithDisposable","defer","observableFactory","observableThrow","EmptyObservable","EmptySink","scheduleItem","sink","run","observableEmpty","FromObservable","iterable","mapper","FromSink","loopRecursive","list","pow","charAt","from","mapFn","observableFromArray","fromArray","NeverObservable","never","ofWithScheduler","PairsObservable","pairs","RangeObservable","RangeSink","range","RepeatObservable","JustObservable","JustSink","ThrowObservable","ThrowSink","throwError","throwException","catchException","handlerOrSecond","observableCatch","combineLatest","j","subscriptions","sad","observableConcat","concatObservable","merge","MergeObservable","maxConcurrent","g","MergeObserver","activeCount","InnerObserver","handleSubscribe","innerSource","maxConcurrentOrOther","observableMerge","MergeAllObservable","m","MergeAllObserver","mergeObservable","CompositeError","errors","innerErrors","mergeDelayError","setCompletion","innerSubscription","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","takeWhile","FilterObservable","internalFilter","shouldYield","where","fromCallback","context","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","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","windowSize","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","RangeError","lastOnNext","PausableObservable","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","hasRequested","disposeCurrentRequest","_processRequest","controlled","pipe","dest","onDrain","write","emit","_isStdio","end","transduce","transducer","transformForObserver","@@transducer/init","@@transducer/step","obs","input","@@transducer/result","xform","AutoDetachObserverPrototype","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","getValue","createRemovableDisposable","so","_trim","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GA2DR,QAASC,GAAWC,GAElB,IAAI,GADAC,GAAMD,EAAIE,OAAQC,EAAI,GAAIC,OAAMH,GAC5BI,EAAI,EAAOJ,EAAJI,EAASA,IAAOF,EAAEE,GAAKL,EAAIK,EAC1C,OAAOF,GAgBX,QAASG,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,EAAkB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VqiB,OAAO,WACL,MAAOriB,OAEAR,GAAeG,GAEpBE,IACDF,GAAWF,QAAUO,IAAIA,GAAKA,GAE/BR,EAAYQ,GAAKA,GAInBjK,EAAKiK,GAAKA,EAIZ,IAAItQ,IAAcC,MAElBiB,KAAKyD"}
|
1
|
+
{"version":3,"file":"rx.lite.compat.min.js","sources":["rx.lite.compat.js"],"names":["undefined","cloneArray","arr","len","length","a","Array","i","tryCatcher","tryCatchTarget","apply","this","arguments","e","errorObj","tryCatch","fn","isFunction","TypeError","thrower","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","push","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","Error","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","size","pop","arrayInitialize","count","factory","StringIterable","s","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","sign","number","isNaN","Math","floor","abs","maxSafeInteger","FromArraySink","observer","parent","observableOf","scheduler","array","isScheduler","currentThreadScheduler","FromArrayObservable","PairsSink","RepeatSink","observableCatchHandler","handler","AnonymousObservable","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","CatchObserver","falseFactory","argumentsToArray","args","emptyArrayFactory","asObservable","InnerObserver","accumulator","hasSeed","seed","hasAccumulation","accumulation","hasValue","isStopped","plucker","x","currentProp","p","createCbObservable","ctx","selector","AsyncSubject","createCbHandler","results","onError","onNext","onCompleted","createNodeObservable","createNodeHandler","err","isNodeList","el","window","StaticNodeList","NodeList","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","relatedTarget","fromElement","toElement","c","charCode","keyChar","fromCharCode","ListenDisposable","n","_e","_n","_fn","addEventListener","isDisposed","AttachEventDisposable","attachEvent","LevelOneDisposable","createListener","eventName","createEventListener","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","d","normalizeTime","scheduleRecursiveWithAbsoluteAndState","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","exception","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","sourceSubscription","newValue","dispose","combineLatestSource","subject","resultSelector","next","values","hasValueAll","every","identity","res","isDone","objectTypes","function","freeExports","exports","nodeType","freeSelf","freeWindow","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","defaultNow","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","isPromise","then","isFn","longStackSupport","EmptyError","message","name","ObjectDisposedError","ArgumentOutOfRangeError","NotSupportedError","NotImplementedError","notImplemented","notSupported","Symbol","iterator","Set","doneEnumerator","done","isIterable","isArrayLike","supportNodeClass","bindCallback","func","thisArg","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","getDisposable","Function","bind","that","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","fun","thisp","map","filter","predicate","t","isArray","searchElement","Infinity","keys","hasDontEnumBug","isDisposable","CompositeDisposablePrototype","remove","shouldDispose","splice","currentDisposables","Disposable","action","disposableCreate","create","disposableEmpty","empty","checkDisposed","disposable","current","old","ScheduledItem","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","compareTo","other","isCancelled","Scheduler","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","innerAction","state2","scheduleWork","_","state3","isAdded","group","invokeRecDate","method","dueTime1","invokeRecDateRelative","invokeRecDateAbsolute","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","schedulePeriodic","setInterval","id","clearInterval","scheduleMethod","clearMethod","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","queue","si","currentScheduler","scheduleRequired","localTimer","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_action","_cancel","_scheduler","start","localSetTimeout","localClearTimeout","setTimeout","clearTimeout","WScript","time","Sleep","runTask","handle","currentlyRunning","task","tasksByHandle","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","data","substring","MSG_PREFIX","nextHandle","reNative","RegExp","replace","setImmediate","process","nextTick","random","currentId","MessageChannel","channel","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","observableProto","timeoutScheduler","timeout","Notification","acceptObservable","_accept","_acceptObservable","observerOrOnNext","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Observer","observerCreate","AnonymousObserver","AbstractObserver","__super__","completed","fail","_onNext","_onError","_onCompleted","Observable","makeSubscribe","oldOnError","_subscribe","isObservable","oOrOnNext","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","sub","subscribeCore","AutoDetachObserver","FlatMapObservable","_wrapResult","i2","fromPromise","from","Enumerable","ConcatEnumerableObservable","currentItem","currentValue","observableFromPromise","CatchErrorObservable","lastException","catchError","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","ex","RepeatEnumerable","v","RepeatEnumerator","l","enumerableRepeat","repeat","repeatCount","OfEnumerable","OfEnumerator","enumerableOf","of","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","ToArrayObservable","toArray","defer","observableFactory","observableThrow","EmptyObservable","EmptySink","scheduleItem","sink","run","EMPTY_OBSERVABLE","observableEmpty","FromObservable","iterable","mapper","FromSink","loopRecursive","list","pow","charAt","observableFrom","mapFn","observableFromArray","fromArray","NeverObservable","NEVER_OBSERVABLE","never","ofWithScheduler","PairsObservable","pairs","RangeObservable","rangeCount","RangeSink","range","RepeatObservable","JustObservable","JustSink","ThrowObservable","just","ThrowSink","_o","handlerOrSecond","observableCatch","items","combineLatest","j","subscriptions","sad","observableConcat","ConcatObservable","ConcatSink","concatAll","merge","MergeObservable","maxConcurrent","g","MergeObserver","activeCount","handleSubscribe","innerSource","maxConcurrentOrOther","observableMerge","mergeAll","MergeAllObservable","MergeAllObserver","m","CompositeError","errors","innerErrors","mergeDelayError","setCompletion","innerSubscription","skipUntil","isOpen","left","rightSubscription","SwitchObservable","SwitchObserver","stopped","latest","hasLatest","switchLatest","TakeUntilObservable","takeUntil","withLatestFrom","allValues","zip","queues","queuedValues","first","zipIterable","dematerialize","DistinctUntilChangedObservable","keyFn","DistinctUntilChangedObserver","hasCurrentKey","currentKey","comparerEquals","distinctUntilChanged","TapObservable","_oN","_oE","_oC","tap","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","IgnoreElementsObservable","ignoreElements","retry","retryCount","retryWhen","ScanObservable","scan","skipLast","startWith","takeLast","flatMapConcat","concatMap","MapObservable","innerMap","internalMap","select","selectorFn","pluck","flatMap","selectMany","flatMapLatest","SkipObservable","skipCount","skip","skipWhile","take","remaining","takeWhile","FilterObservable","innerPredicate","internalFilter","shouldYield","where","fromCallback","fromNodeCallback","removeEventListener","detachEvent","useNativeEvents","fromEvent","element","addListener","fromEventPattern","h","removeListener","on","off","publish","refCount","addHandler","removeHandler","innerHandler","FromPromiseObservable","promise","toPromise","promiseCtor","resolve","reject","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","share","publishLast","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","windowSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","debounce","hasvalue","throttle","sample","throttleLatest","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","throttleFirst","windowDuration","duration","RangeError","lastOnNext","PausableObservable","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","drainQueue","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","disposeCurrentRequest","_processRequest","controlled","pipe","dest","onDrain","write","emit","_isStdio","end","transduce","transducer","transformForObserver","@@transducer/init","@@transducer/step","obs","input","@@transducer/result","xform","__subscribe","innerSubscribe","AutoDetachObserverPrototype","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","getValue","createRemovableDisposable","so","_trim","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAkDR,QAASC,GAAWC,GAElB,IAAI,GADAC,GAAMD,EAAIE,OAAQC,EAAI,GAAIC,OAAMH,GAC5BI,EAAI,EAAOJ,EAAJI,EAASA,IAAOF,EAAEE,GAAKL,EAAIK,EAC1C,OAAOF,GAKX,QAASG,KACP,IACE,MAAOC,IAAeC,MAAMC,KAAMC,W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KAAmBD,OAAOC,KACzE7tB,GAAKsK,GAAKA,GAEVsjB,OAAO,WACL,MAAOtjB,OAEAV,IAAeK,GAEpBE,IACDF,GAAWJ,QAAUS,IAAIA,GAAKA,GAE/BV,GAAYU,GAAKA,GAInBtK,GAAKsK,GAAKA,EAIZ,IAAI1P,IAAcC,MAElBgB,KAAKvD"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
|
2
|
-
(function(a){function b(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function c(a,b){if(mb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(qb)){for(var c=[],e=b;e;e=e.source)e.stack&&c.unshift(e.stack);c.unshift(a.stack);var f=c.join("\n"+qb+"\n");a.stack=d(f)}}function d(a){for(var b=a.split("\n"),c=[],d=0,g=b.length;g>d;d++){var h=b[d];e(h)||f(h)||!h||c.push(h)}return c.join("\n")}function e(a){var b=h(a);if(!b)return!1;var c=b[0],d=b[1];return c===ob&&d>=pb&&Ld>=d}function f(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function g(){if(mb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=h(c);if(!d)return;return ob=d[0],d[1]}}function h(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 i(a){var b=[];if(!Zb(a))return b;Yb.nonEnumArgs&&a.length&&$b(a)&&(a=cc.call(a));var c=Yb.enumPrototypes&&"function"==typeof a,d=Yb.enumErrorProps&&(a===Tb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Yb.nonEnumShadows&&a!==Ub){var f=a.constructor,g=-1,h=Fb;if(a===(f&&f.prototype))var i=a===Vb?Pb:a===Tb?Kb:Qb.call(a),j=Xb[i];for(;++g<h;)e=Eb[g],j&&j[e]||!Rb.call(a,e)||b.push(e)}return b}function j(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function k(a,b){return j(a,b,i)}function l(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function m(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=Qb.call(a),h=Qb.call(b);if(g==Gb&&(g=Nb),h==Gb&&(h=Nb),g!=h)return!1;switch(g){case Ib:case Jb:return+a==+b;case Mb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Ob:case Pb:return a==String(b)}var i=g==Hb;if(!i){if(g!=Nb||!Yb.nodeClass&&(l(a)||l(b)))return!1;var j=!Yb.argsObject&&$b(a)?Object:a.constructor,n=!Yb.argsObject&&$b(b)?Object:b.constructor;if(!(j==n||Rb.call(a,"constructor")&&Rb.call(b,"constructor")||lb(j)&&j instanceof j&&lb(n)&&n instanceof n||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var o=c.length;o--;)if(c[o]==a)return d[o]==b;var p=0,q=!0;if(c.push(a),d.push(b),i){if(o=a.length,p=b.length,q=p==o)for(;p--;){var r=b[p];if(!(q=m(a[p],r,c,d)))break}}else k(b,function(b,e,f){return Rb.call(f,e)?(p++,q=Rb.call(a,e)&&m(a[e],b,c,d)):void 0}),q&&k(a,function(a,b,c){return Rb.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function n(){try{return _b.apply(this,arguments)}catch(a){return bc.e=a,bc}}function o(a){if(!lb(a))throw new TypeError("fn must be a function");return _b=a,n}function p(a){throw a}function q(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function r(a,b){this.id=a,this.value=b}function t(a){this.observer=a,this.a=[],this.isStopped=!1}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&&$.isFinite(a)}function z(b){var c,d=b[yb];if(!d&&"string"==typeof b)return c=new u(b),c[yb]();if(!d&&b.length!==a)return c=new w(b),c[yb]();if(!d)throw new TypeError("Object is not iterable");return b[yb]()}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>$c?$c:b):b}function C(a,b){this.observer=a,this.parent=b}function D(a,b){return vc(a)||(a=zc),new ad(b,a)}function E(a,b){this.observer=a,this.parent=b}function F(a,b){this.observer=a,this.parent=b}function G(a,b){return new Dd(function(c){var d=new qc,e=new rc;return e.setDisposable(d),d.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){try{var d=b(a)}catch(f){return c.onError(f)}kb(d)&&(d=wd(d));var g=new qc;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function H(a,b){var c=this;return new Dd(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function I(){return!1}function J(){return[]}function K(a,b,c){var d=Db(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return kb(e)&&(e=wd(e)),(Bb(e)||Ab(e))&&(e=_c(e)),e}).concatAll()}function L(a,b,c){this.observer=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}function M(a,b,c){var d=Db(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return kb(e)&&(e=wd(e)),(Bb(e)||Ab(e))&&(e=_c(e)),e}).mergeAll()}function N(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}function O(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=$.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 P(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),mc(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(O(a))};return a.attachEvent("on"+b,d),mc(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,mc(function(){a["on"+b]=null})}function Q(a,b,c){var d=new jc;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(Q(a.item(e),b,c));else a&&d.add(P(a,b,c));return d}function R(a,b){return new Dd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function S(a,b,c){return new Dd(function(d){var e=a,f=uc(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 T(a,b){return new Dd(function(c){return b.scheduleWithRelative(uc(a),function(){c.onNext(0),c.onCompleted()})})}function U(a,b,c){return a===b?new Dd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Vc(function(){return S(c.now()+a,b,c)})}function V(a,b,c){return new Dd(function(d){var e,f=!1,g=new rc,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new qc,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new jc(e,g)},a)}function W(a,b,c){return Vc(function(){return V(a,b-c.now(),c)})}function X(a,b){return new Dd(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new jc(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 Y(a,b,c){return new Dd(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(fb))){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 jc(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 Z={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},$=Z[typeof window]&&window||this,_=Z[typeof exports]&&exports&&!exports.nodeType&&exports,ab=Z[typeof module]&&module&&!module.nodeType&&module,bb=ab&&ab.exports===_&&_,cb=Z[typeof global]&&global;!cb||cb.global!==cb&&cb.window!==cb||($=cb);var db={internals:{},config:{Promise:$.Promise},helpers:{}},eb=db.helpers.noop=function(){},fb=(db.helpers.notDefined=function(a){return"undefined"==typeof a},db.helpers.identity=function(a){return a}),gb=(db.helpers.pluck=function(a){return function(b){return b[a]}},db.helpers.just=function(a){return function(){return a}},db.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),hb=db.helpers.defaultComparer=function(a,b){return ac(a,b)},ib=db.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},jb=(db.helpers.defaultKeySerializer=function(a){return a.toString()},db.helpers.defaultError=function(a){throw a}),kb=db.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},lb=(db.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},db.helpers.not=function(a){return!a},db.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Qb.call(a)}),a}());db.config.longStackSupport=!1;var mb=!1;try{throw new Error}catch(nb){mb=!!nb.stack}var ob,pb=g(),qb="From previous event:",rb=db.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};rb.prototype=Error.prototype;var sb=db.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};sb.prototype=Error.prototype;var tb=db.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};tb.prototype=Error.prototype;var ub=db.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};ub.prototype=Error.prototype;var vb=db.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};vb.prototype=Error.prototype;var wb=db.helpers.notImplemented=function(){throw new vb},xb=db.helpers.notSupported=function(){throw new ub},yb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";$.Set&&"function"==typeof(new $.Set)["@@iterator"]&&(yb="@@iterator");var zb=db.doneEnumerator={done:!0,value:a},Ab=db.helpers.isIterable=function(b){return b[yb]!==a},Bb=db.helpers.isArrayLike=function(b){return b&&b.length!==a};db.helpers.iterator=yb;var Cb,Db=db.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)}},Eb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Fb=Eb.length,Gb="[object Arguments]",Hb="[object Array]",Ib="[object Boolean]",Jb="[object Date]",Kb="[object Error]",Lb="[object Function]",Mb="[object Number]",Nb="[object Object]",Ob="[object RegExp]",Pb="[object String]",Qb=Object.prototype.toString,Rb=Object.prototype.hasOwnProperty,Sb=Qb.call(arguments)==Gb,Tb=Error.prototype,Ub=Object.prototype,Vb=String.prototype,Wb=Ub.propertyIsEnumerable;try{Cb=!(Qb.call(document)==Nb&&!({toString:0}+""))}catch(nb){Cb=!0}var Xb={};Xb[Hb]=Xb[Jb]=Xb[Mb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Xb[Ib]=Xb[Pb]={constructor:!0,toString:!0,valueOf:!0},Xb[Kb]=Xb[Lb]=Xb[Ob]={constructor:!0,toString:!0},Xb[Nb]={constructor:!0};var Yb={};!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);Yb.enumErrorProps=Wb.call(Tb,"message")||Wb.call(Tb,"name"),Yb.enumPrototypes=Wb.call(a,"prototype"),Yb.nonEnumArgs=0!=c,Yb.nonEnumShadows=!/valueOf/.test(b)}(1);var Zb=db.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},$b=function(a){return a&&"object"==typeof a?Qb.call(a)==Gb:!1};Sb||($b=function(a){return a&&"object"==typeof a?Rb.call(a,"callee"):!1});{var _b,ac=db.internals.isEqual=function(a,b){return m(a,b,[],[])},bc={e:{}},cc=({}.hasOwnProperty,Array.prototype.slice),dc=this.inherits=db.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},ec=db.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]}};db.internals.addRef=function(a,b){return new Dd(function(c){return new jc(b.getDisposable(),a.subscribe(c))})}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=cc.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(cc.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(cc.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 fc=Object("a"),gc="a"!=fc[0]||!(0 in fc);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=gc&&{}.toString.call(this)==Pb?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=Lb)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=gc&&{}.toString.call(this)==Pb?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=Lb)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)==Hb}),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;Fb>e;e++)a.call(c,Eb[e])&&f.push(Eb[e]);return f}}()),r.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var hc=db.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},ic=hc.prototype;ic.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},ic.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)}}},ic.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},ic.peek=function(){return this.items[0].value},ic.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},ic.dequeue=function(){var a=this.peek();return this.removeAt(0),a},ic.enqueue=function(a){var b=this.length++;this.items[b]=new r(hc.count++,a),this.percolate(b)},ic.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},hc.count=0;var jc=db.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!oc(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},kc=jc.prototype;kc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},kc.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},kc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var lc=db.Disposable=function(a){this.isDisposed=!1,this.action=a||eb};lc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var mc=lc.create=function(a){return new lc(a)},nc=lc.empty={dispose:eb},oc=lc.isDisposable=function(a){return a&&lb(a.dispose)},pc=lc.checkDisposed=function(a){if(a.isDisposed)throw new sb},qc=db.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};qc.prototype.getDisposable=function(){return this.current},qc.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},qc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var rc=db.SerialDisposable=function(){this.isDisposed=!1,this.current=null};rc.prototype.getDisposable=function(){return this.current},rc.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},rc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var sc=(db.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?nc:new a(this)},b}(),db.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||ib,this.disposable=new qc});sc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},sc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},sc.prototype.isCancelled=function(){return this.disposable.isDisposed},sc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var tc=db.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(),nc}a.isScheduler=function(b){return b instanceof a};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=gb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),uc=tc.normalize,vc=tc.isScheduler;!function(a){function b(a,b){function c(b){e(b,function(b){var d=!1,e=!1,g=a.scheduleWithState(b,function(a,b){return d?f.remove(g):e=!0,c(b),nc});e||(f.add(g),d=!0)})}var d=b[0],e=b[1],f=new jc;return c(d),f}function c(a,b,c){function d(b){f(b,function(b,e){var f=!1,h=!1,i=a[c](b,e,function(a,b){return f?g.remove(i):h=!0,d(b),nc});h||(g.add(i),f=!0)})}var e=b[0],f=b[1],g=new jc;return d(e),g}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([a,c],b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative([a,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([a,d],b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(tc.prototype),function(){tc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},tc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof $.setInterval)throw new ub;b=uc(b);var d=a,e=$.setInterval(function(){d=c(d)},b);return mc(function(){$.clearInterval(e)})}}(tc.prototype);var wc,xc,yc=tc.immediate=function(){function a(a,b){return b(this,a)}return new tc(gb,a,xb,xb)}(),zc=tc.currentThread=function(){function a(){for(;c.length>0;){var a=c.dequeue();!a.isCancelled()&&a.invoke()}}function b(b,d){var e=new sc(this,b,d,this.now());if(c)c.enqueue(e);else{c=new hc(4),c.enqueue(e);var f=o(a)();if(c=null,f===bc)return p(f.e)}return e.disposable}var c,d=new tc(gb,b,xb,xb);return d.scheduleRequired=function(){return!c},d}(),Ac=(db.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new qc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),function(){var a,b=eb;if($.setTimeout)a=$.setTimeout,b=$.clearTimeout;else{if(!$.WScript)throw new ub;a=function(a,b){$.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}()),Bc=Ac.setTimeout,Cc=Ac.clearTimeout;!function(){function a(b){if(f)Bc(function(){a(b)},0);else{var c=e[b];if(c){f=!0;var d=o(c)();if(xc(b),f=!1,d===bc)return p(d.e)}}}function b(){if(!$.postMessage||$.importScripts)return!1;var a=!1,b=$.onmessage;return $.onmessage=function(){a=!0},$.postMessage("","*"),$.onmessage=b,a}function c(b){"string"==typeof b.data&&b.data.substring(0,i.length)===i&&a(b.data.substring(i.length))}var d=1,e={},f=!1;xc=function(a){delete e[a]};var g=RegExp("^"+String(Qb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=cb&&bb&&cb.setImmediate)&&!g.test(h)&&h;if(lb(h))wc=function(b){var c=d++;return e[c]=b,h(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))wc=function(b){var c=d++;return e[c]=b,process.nextTick(function(){a(c)}),c};else if(b()){var i="ms.rx.schedule"+Math.random();$.addEventListener?$.addEventListener("message",c,!1):$.attachEvent?$.attachEvent("onmessage",c):$.onmessage=c,wc=function(a){var b=d++;return e[b]=a,$.postMessage(i+currentId,"*"),b}}else if($.MessageChannel){var j=new $.MessageChannel;j.port1.onmessage=function(b){a(b.data)},wc=function(a){var b=d++;return e[b]=a,j.port2.postMessage(b),b}}else wc="document"in $&&"onreadystatechange"in $.document.createElement("script")?function(b){var c=$.document.createElement("script"),f=d++;return e[f]=b,c.onreadystatechange=function(){a(f),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},$.document.documentElement.appendChild(c),f}:function(b){var c=d++;return e[c]=b,Bc(function(){a(c)},0),c}}();var Dc=tc.timeout=tc["default"]=function(){function a(a,b){var c=this,d=new qc,e=wc(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new jc(d,mc(function(){xc(e)}))}function b(a,b,c){var d=this,e=tc.normalize(b),f=new qc;if(0===e)return d.scheduleWithState(a,c);var g=Bc(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new jc(f,mc(function(){Cc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new tc(gb,a,b,c)}(),Ec=db.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}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 vc(a)||(a=yc),new Dd(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Fc=Ec.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){return new Ec("N",d,null,a,b,c)}}(),Gc=Ec.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){return new Ec("E",null,d,a,b,c)}}(),Hc=Ec.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new Ec("C",null,null,a,b,c)}}(),Ic=db.internals.Enumerator=function(a){this._next=a};Ic.prototype.next=function(){return this._next()},Ic.prototype[yb]=function(){return this};var Jc=db.internals.Enumerable=function(a){this._iterator=a};Jc.prototype[yb]=function(){return this._iterator()},Jc.prototype.concat=function(){var a=this;return new Dd(function(b){var c,d=a[yb](),e=new rc,f=yc.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;kb(h)&&(h=wd(h));var i=new qc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new jc(e,f,mc(function(){c=!0}))})},Jc.prototype.catchError=function(){var a=this;return new Dd(function(b){var c,d=a[yb](),e=new rc,f=yc.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;kb(i)&&(i=wd(i));var j=new qc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new jc(e,f,mc(function(){c=!0}))})},Jc.prototype.catchErrorWhen=function(a){var b=this;return new Dd(function(c){var d,e,f=new Gd,g=new Gd,h=a(f),i=h.subscribe(g),j=b[yb](),k=new rc,l=yc.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;kb(i)&&(i=wd(i));var l=new qc,m=new qc;k.setDisposable(new jc(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 jc(i,k,l,mc(function(){d=!0}))})};var Kc,Lc=Jc.repeat=function(a,b){return null==b&&(b=-1),new Jc(function(){var c=b;return new Ic(function(){return 0===c?zb:(c>0&&c--,{done:!1,value:a})})})},Mc=Jc.of=function(a,b,c){if(b)var d=Db(b,c,3);return new Jc(function(){var c=-1;return new Ic(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:zb})})},Nc=db.Observer=function(){},Oc=Nc.create=function(a,b,c){return a||(a=eb),b||(b=jb),c||(c=eb),new Qc(a,b,c)},Pc=db.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return dc(b,a),b.prototype.next=wb,b.prototype.error=wb,b.prototype.completed=wb,b.prototype.onNext=function(a){this.isStopped||this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(Nc),Qc=db.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return dc(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(Pc),Rc=db.Observable=function(){function a(a){if(db.config.longStackSupport&&mb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var d=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){c(a,d),e(a)},a.call(d,b)}}else this._subscribe=a}return Kc=a.prototype,Kc.subscribe=Kc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Oc(a,b,c))},Kc.subscribeOnNext=function(a,b){return this._subscribe(Oc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Kc.subscribeOnError=function(a,b){return this._subscribe(Oc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Kc.subscribeOnCompleted=function(a,b){return this._subscribe(Oc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Sc=db.ObservableBase=function(a){function b(a){return a&&lb(a.dispose)?a:lb(a)?mc(a):nc}function c(a,c){var d=c[0],e=c[1],f=o(e.subscribeCore).call(e,d);return f!==bc||d.fail(bc.e)?void d.setDisposable(b(f)):p(bc.e)}function d(a){var b=new Ed(a),d=[b,this];return zc.scheduleRequired()?zc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return dc(e,a),e.prototype.subscribeCore=wb,e}(Rc),Tc=db.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new rc}return dc(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Pc),Uc=function(a){function b(b){this.source=b,a.call(this)}return dc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new t(a))},b}(Sc);t.prototype.onNext=function(a){this.isStopped||this.a.push(a)},t.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},t.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onNext(this.a),this.observer.onCompleted())},t.prototype.dispose=function(){this.isStopped=!0},t.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Kc.toArray=function(){return new Uc(this)},Rc.create=Rc.createWithDisposable=function(a,b){return new Dd(a,b)};var Vc=Rc.defer=function(a){return new Dd(function(b){var c;try{c=a()}catch(d){return jd(d).subscribe(b)
|
3
|
-
}return kb(c)&&(c=wd(c)),c.subscribe(b)})},Wc=function(a){function b(b){this.scheduler=b,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){b.onCompleted()}return dc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState(this.observer,d)},b}(Sc),Xc=Rc.empty=function(a){return vc(a)||(a=yc),new Wc(a)},Yc=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return dc(b,a),b.prototype.subscribeCore=function(a){var b=new Zc(a,this);return b.run()},b}(Sc),Zc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,b){try{var f=c.next()}catch(g){return d.onError(g)}if(f.done)return d.onCompleted();var h=f.value;if(e)try{h=e(h,a)}catch(g){return d.onError(g)}d.onNext(h),b(a+1)}var b=Object(this.parent.iterable),c=z(b),d=this.observer,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),$c=Math.pow(2,53)-1;u.prototype[yb]=function(){return new v(this._s)},v.prototype[yb]=function(){return this},v.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:zb},w.prototype[yb]=function(){return new x(this._a)},x.prototype[yb]=function(){return this},x.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:zb};var _c=Rc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!lb(b))throw new Error("mapFn when provided must be a function");if(b)var e=Db(b,c,2);return vc(d)||(d=zc),new Yc(a,e,d)},ad=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)}return dc(b,a),b.prototype.subscribeCore=function(a){var b=new C(a,this);return b.run()},b}(Sc);C.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};{var bd=Rc.fromArray=function(a,b){return vc(b)||(b=zc),new ad(a,b)},cd=function(a){function b(){a.call(this)}return dc(b,a),b.prototype.subscribeCore=function(){return nc},b}(Sc);Rc.never=function(){return new cd}}Rc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new ad(b,zc)},Rc.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new ad(c,a)};var dd=function(a){function b(b,c){this.obj=b,this.keys=Object.keys(b),this.scheduler=c,a.call(this)}return dc(b,a),b.prototype.subscribeCore=function(a){var b=new E(a,this);return b.run()},b}(Sc);E.prototype.run=function(){function a(a,f){if(e>a){var g=d[a];b.onNext([g,c[g]]),f(a+1)}else b.onCompleted()}var b=this.observer,c=this.parent.obj,d=this.parent.keys,e=d.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},Rc.pairs=function(a,b){return b||(b=zc),new dd(a,b)};var ed=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return dc(b,a),b.prototype.subscribeCore=function(a){var b=new fd(a,this);return b.run()},b}(Sc),fd=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.count,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();Rc.range=function(a,b,c){return vc(c)||(c=zc),new ed(a,b,c)};var gd=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return dc(b,a),b.prototype.subscribeCore=function(a){var b=new F(a,this);return b.run()},b}(Sc);F.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursiveWithState(this.parent.repeatCount,a)},Rc.repeat=function(a,b,c){return vc(c)||(c=zc),new gd(a,b,c)};var hd=function(a){function b(b,c){this.value=b,this.scheduler=c,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){var c=b[0],d=b[1];d.onNext(c),d.onCompleted()}return dc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState([this.parent.value,this.observer],d)},b}(Sc),id=(Rc["return"]=Rc.just=Rc.returnValue=function(a,b){return vc(b)||(b=yc),new hd(a,b)},function(a){function b(b,c){this.error=b,this.scheduler=c,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){var c=b[0],d=b[1];d.onError(c)}return dc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState([this.parent.error,this.observer],d)},b}(Sc)),jd=Rc["throw"]=Rc.throwError=Rc.throwException=function(a,b){return vc(b)||(b=yc),new id(a,b)};Kc["catch"]=Kc.catchError=Kc.catchException=function(a){return"function"==typeof a?G(this,a):kd([this,a])};var kd=Rc.catchError=Rc["catch"]=Rc.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 Mc(a).catchError()};Kc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),ld.apply(this,b)};var ld=Rc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop();return Array.isArray(b[0])&&(b=b[0]),new Dd(function(a){function c(b){if(h[b]=!0,i||(i=h.every(fb))){try{var c=d.apply(null,k)}catch(e){return a.onError(e)}a.onNext(c)}else j.filter(function(a,c){return c!==b}).every(fb)&&a.onCompleted()}function e(b){j[b]=!0,j.every(fb)&&a.onCompleted()}for(var f=b.length,g=function(){return!1},h=q(f,g),i=!1,j=q(f,g),k=new Array(f),l=new Array(f),m=0;f>m;m++)!function(d){var f=b[d],g=new qc;kb(f)&&(f=wd(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(b){a.onError(b)},function(){e(d)})),l[d]=g}(m);return new jc(l)},this)};Kc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),md.apply(null,a)};var md=Rc.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return Mc(a).concat()};Kc.concatAll=Kc.concatObservable=function(){return this.merge(1)};var nd=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return dc(b,a),b.prototype.subscribeCore=function(a){var b=new jc;return b.add(this.source.subscribe(new od(a,this.maxConcurrent,b))),b},b}(Sc),od=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new qc;this.g.add(c),kb(a)&&(a=wd(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype.onNext=function(a){this.isStopped||(this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a))},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,0===this.activeCount&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=this.parent;a.g.remove(this.sad),a.q.length>0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Kc.merge=function(a){return"number"!=typeof a?pd(this,a):new nd(this,a)};var pd=Rc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(vc(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=yc,b=0;d>b;b++)c.push(arguments[b]);else for(a=yc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),D(a,c).mergeAll()},qd=function(a){function b(b){this.source=b,a.call(this)}return dc(b,a),b.prototype.subscribeCore=function(a){var b=new jc,c=new qc;return b.add(c),c.setDisposable(this.source.subscribe(new rd(a,b))),b},b}(Sc),rd=function(){function a(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function b(a,b,c){this.parent=a,this.g=b,this.sad=c,this.isStopped=!1}return a.prototype.onNext=function(a){if(!this.isStopped){var c=new qc;this.g.add(c),kb(a)&&(a=wd(a)),c.setDisposable(a.subscribe(new b(this,this.g,c)))}},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){var a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Kc.mergeAll=Kc.mergeObservable=function(){return new qd(this)};var sd=db.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};sd.prototype=Error.prototype,Rc.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=D(null,a);return new Dd(function(a){function b(){0===g.length?a.onCompleted():a.onError(1===g.length?g[0]:new sd(g))}var c=new jc,e=new qc,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new qc;c.add(e),kb(d)&&(d=wd(d)),e.setDisposable(d.subscribe(function(b){a.onNext(b)},function(a){g.push(a),c.remove(e),f&&1===c.length&&b()},function(){c.remove(e),f&&1===c.length&&b()}))},function(a){g.push(a),f=!0,1===c.length&&b()},function(){f=!0,1===c.length&&b()})),c})},Kc.skipUntil=function(a){var b=this;return new Dd(function(c){var d=!1,e=new jc(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));kb(a)&&(a=wd(a));var f=new qc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},Kc["switch"]=Kc.switchLatest=function(){var a=this;return new Dd(function(b){var c=!1,d=new rc,e=!1,f=0,g=a.subscribe(function(a){var g=new qc,h=++f;c=!0,d.setDisposable(g),kb(a)&&(a=wd(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 jc(g,d)},a)},Kc.takeUntil=function(a){var b=this;return new Dd(function(c){return kb(a)&&(a=wd(a)),new jc(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},eb))},b)},Kc.withLatestFrom=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.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(b[0])&&(b=b[0]),new Dd(function(a){for(var c=function(){return!1},f=b.length,g=q(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=b[c],e=new qc;kb(d)&&(d=wd(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(fb)},a.onError.bind(a),function(){})),j[c]=e}(k);var l=new qc;return l.setDisposable(e.subscribe(function(b){var c,e=[b].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void a.onError(f)}a.onNext(c)}},a.onError.bind(a),function(){a.onCompleted()})),j[f]=l,new jc(j)},this)},Kc.zip=function(){if(Array.isArray(arguments[0]))return H.apply(this,arguments);for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=this,e=b.pop();return b.unshift(d),new Dd(function(a){function c(b){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 a.onError(g)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every(fb)&&a.onCompleted()}function f(b){i[b]=!0,i.every(function(a){return a})&&a.onCompleted()}for(var g=b.length,h=q(g,J),i=q(g,I),j=new Array(g),k=0;g>k;k++)!function(d){var e=b[d],g=new qc;kb(e)&&(e=wd(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(b){a.onError(b)},function(){f(d)})),j[d]=g}(k);return new jc(j)},d)},Rc.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.shift();return d.zip.apply(d,b)},Rc.zipArray=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new Dd(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(fb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(fb)?void b.onCompleted():void 0}for(var e=a.length,f=q(e,function(){return[]}),g=q(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new qc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new jc(h)})},Kc.asObservable=function(){var a=this;return new Dd(function(b){return a.subscribe(b)},this)},Kc.dematerialize=function(){var a=this;return new Dd(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},Kc.distinctUntilChanged=function(a,b){var c=this;return b||(b=hb),new Dd(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)},Kc["do"]=Kc.tap=Kc.doAction=function(a,b,c){var d=this;return new Dd(function(e){var f=!a||lb(a)?Oc(a||eb,b||eb,c||eb):a;return d.subscribe(function(a){try{f.onNext(a)}catch(b){e.onError(b)}e.onNext(a)},function(a){try{f.onError(a)}catch(b){e.onError(b)}e.onError(a)},function(){try{f.onCompleted()}catch(a){e.onError(a)}e.onCompleted()})},this)},Kc.doOnNext=Kc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Kc.doOnError=Kc.tapOnError=function(a,b){return this.tap(eb,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Kc.doOnCompleted=Kc.tapOnCompleted=function(a,b){return this.tap(eb,null,"undefined"!=typeof b?function(){a.call(b)}:a)},Kc["finally"]=Kc.ensure=function(a){var b=this;return new Dd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return mc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},Kc.finallyAction=function(a){return this.ensure(a)},Kc.ignoreElements=function(){var a=this;return new Dd(function(b){return a.subscribe(eb,function(a){b.onError(a)},function(){b.onCompleted()})},a)},Kc.materialize=function(){var a=this;return new Dd(function(b){return a.subscribe(function(a){b.onNext(Fc(a))},function(a){b.onNext(Gc(a)),b.onCompleted()},function(){b.onNext(Hc()),b.onCompleted()})},a)},Kc.repeat=function(a){return Lc(this,a).concat()},Kc.retry=function(a){return Lc(this,a).catchError()},Kc.retryWhen=function(a){return Lc(this).catchErrorWhen(a)},Kc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new Dd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},Kc.skipLast=function(a){if(0>a)throw new tb;var b=this;return new Dd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Kc.startWith=function(){var a,b=0;arguments.length&&vc(arguments[0])?(a=arguments[0],b=1):a=yc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Mc([bd(c,a),this]).concat()},Kc.takeLast=function(a){if(0>a)throw new tb;var b=this;return new Dd(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)},Kc.selectConcat=Kc.concatMap=function(a,b,c){return lb(a)&&lb(b)?this.concatMap(function(c,d){var e=a(c,d);return kb(e)&&(e=wd(e)),(Bb(e)||Ab(e))&&(e=_c(e)),e.map(function(a,e){return b(c,a,d,e)})}):lb(a)?K(this,a,c):K(this,function(){return a})};var td=function(a){function b(b,c,d){this.source=b,this.selector=Db(c,d,3),a.call(this)}return dc(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a.call(this,d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new L(a,this.selector,this))},b}(Sc);L.prototype.onNext=function(a){if(!this.isStopped){var b=o(this.selector).call(this,a,this.i++,this.source);return b===bc?this.observer.onError(b.e):void this.observer.onNext(b)}},L.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},L.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},L.prototype.dispose=function(){this.isStopped=!0},L.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Kc.map=Kc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof td?this.internalMap(c,b):new td(this,c,b)},Kc.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})},Kc.selectMany=Kc.flatMap=function(a,b,c){return lb(a)&&lb(b)?this.flatMap(function(c,d){var e=a(c,d);return kb(e)&&(e=wd(e)),(Bb(e)||Ab(e))&&(e=_c(e)),e.map(function(a,e){return b(c,a,d,e)})},c):lb(a)?M(this,a,c):M(this,function(){return a})},Kc.selectSwitch=Kc.flatMapLatest=Kc.switchMap=function(a,b){return this.select(a,b).switchLatest()},Kc.skip=function(a){if(0>a)throw new tb;var b=this;return new Dd(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)},Kc.skipWhile=function(a,b){var c=this,d=Db(a,b,3);return new Dd(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)},Kc.take=function(a,b){if(0>a)throw new tb;if(0===a)return Xc(b);var c=this;return new Dd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},Kc.takeWhile=function(a,b){var c=this,d=Db(a,b,3);return new Dd(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 ud=function(a){function b(b,c,d){this.source=b,this.predicate=Db(c,d,3),a.call(this)}return dc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new N(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.call(this,b,c,e)},c)},b}(Sc);N.prototype.onNext=function(a){if(!this.isStopped){var b=o(this.predicate).call(this,a,this.i++,this.source);return b===bc?this.observer.onError(b.e):void(b&&this.observer.onNext(a))}},N.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},N.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},N.prototype.dispose=function(){this.isStopped=!0},N.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Kc.filter=Kc.where=function(a,b){return this instanceof ud?this.internalFilter(a,b):new ud(this,a,b)},Rc.fromCallback=function(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return new Dd(function(d){function f(){for(var a=arguments.length,e=new Array(a),f=0;a>f;f++)e[f]=arguments[f];if(c){try{e=c.apply(b,e)}catch(g){return d.onError(g)}d.onNext(e)}else e.length<=1?d.onNext.apply(d,e):d.onNext(e);d.onCompleted()}e.push(f),a.apply(b,e)}).publishLast().refCount()}},Rc.fromNodeCallback=function(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return new Dd(function(d){function f(a){if(a)return void d.onError(a);for(var e=arguments.length,f=[],g=1;e>g;g++)f[g-1]=arguments[g];if(c){try{f=c.apply(b,f)}catch(h){return d.onError(h)}d.onNext(f)}else f.length<=1?d.onNext.apply(d,f):d.onNext(f);d.onCompleted()}e.push(f),a.apply(b,e)}).publishLast().refCount()}},db.config.useNativeEvents=!1,Rc.fromEvent=function(a,b,c){return a.addListener?vd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):db.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new Dd(function(d){return Q(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e)}d.onNext(b)})}).publish().refCount():vd(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var vd=Rc.fromEventPattern=function(a,b,c){return new Dd(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e)}d.onNext(b)}var f=a(e);return mc(function(){b&&b(e,f)})}).publish().refCount()},wd=Rc.fromPromise=function(a){return Vc(function(){var b=new db.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};Kc.toPromise=function(a){if(a||(a=db.config.Promise),!a)throw new ub("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.startAsync=function(a){var b;try{b=a()}catch(c){return jd(c)}return wd(b)},Kc.multicast=function(a,b){var c=this;return"function"==typeof a?new Dd(function(d){var e=c.multicast(a());return new jc(b(e).subscribe(d),e.connect())},c):new xd(c,a)},Kc.publish=function(a){return a&&lb(a)?this.multicast(function(){return new Gd},a):this.multicast(new Gd)},Kc.share=function(){return this.publish().refCount()},Kc.publishLast=function(a){return a&&lb(a)?this.multicast(function(){return new Hd},a):this.multicast(new Hd)},Kc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Jd(b)},a):this.multicast(new Jd(a))},Kc.shareValue=function(a){return this.publishValue(a).refCount()},Kc.replay=function(a,b,c,d){return a&&lb(a)?this.multicast(function(){return new Kd(b,c,d)},a):this.multicast(new Kd(b,c,d))},Kc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var xd=db.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new jc(f.subscribe(c),mc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return dc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Dd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Rc),yd=Rc.interval=function(a,b){return U(a,a,vc(b)?b:Dc)};Rc.timer=function(b,c,d){var e;return vc(d)||(d=Dc),c!==a&&"number"==typeof c?e=c:vc(c)&&(d=c),b instanceof Date&&e===a?R(b.getTime(),d):b instanceof Date&&e!==a?(e=c,S(b.getTime(),e,d)):e===a?T(b,d):U(b,e,d)}}Kc.delay=function(a,b){return vc(b)||(b=Dc),a instanceof Date?W(this,a.getTime(),b):V(this,a,b)},Kc.debounce=Kc.throttleWithTimeout=function(a,b){vc(b)||(b=Dc);var c=this;return new Dd(function(d){var e,f=new rc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new qc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new jc(i,f)},this)},Kc.throttle=function(a,b){return this.debounce(a,b)},Kc.timestamp=function(a){return vc(a)||(a=Dc),this.map(function(b){return{value:b,timestamp:a.now()}})},Kc.sample=Kc.throttleLatest=function(a,b){return vc(b)||(b=Dc),"number"==typeof a?X(this,yd(a,b)):X(this,a)},Kc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=jd(new Error(b||"Timeout"))),vc(c)||(c=Dc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Dd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(kb(b)&&(b=wd(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new qc,j=new rc,k=!1,l=new rc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new jc(j,l)},d)},Kc.throttleFirst=function(a,b){vc(b)||(b=Dc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Dd(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var zd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=nc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=nc)});return new jc(c,d,e)}function c(c,d){this.source=c,this.controller=new Gd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return dc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Rc);Kc.pausable=function(a){return new zd(this,a)};var Ad=function(b){function c(b){var c,d=[],e=Y(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new Gd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return dc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Rc);Kc.pausableBuffered=function(a){return new Ad(this,a)};var Bd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d,e){a.call(this,b,c),this.subject=new Cd(d,e),this.source=c.multicast(this.subject).refCount()}return dc(c,a),c.prototype.request=function(a){return this.subject.request(null==a?-1:a)},c}(Rc),Cd=function(a){function b(a){return this.subject.subscribe(a)}function c(c,d){null==c&&(c=!0),a.call(this,b),this.subject=new Gd,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=nc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=d||zc}return dc(c,a),ec(c.prototype,Nc,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(Ec.createOnCompleted()):this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(Ec.createOnError(a)):this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(Ec.createOnNext(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.queue.length>0&&"N"!==this.queue[0].kind;){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return{numberOfItems:a,returnValue:0!==this.queue.length}}return{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.scheduleWithState(a,function(a,c){var d=b._processRequest(c),e=d.numberOfItems;d.returnValue||(b.requestedCount=e,b.requestedDisposable=mc(function(){b.requestedCount=0}))}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=nc}}),c}(Rc);Kc.controlled=function(a,b){return a&&vc(a)&&(b=a,a=!0),null==a&&(a=!0),new Bd(this,a,b)},Kc.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a},Kc.transduce=function(a){function b(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var c=this;return new Dd(function(d){var e=a(b(d));return c.subscribe(function(a){try{e["@@transducer/step"](d,a)}catch(b){d.onError(b)}},function(a){d.onError(a)},function(){e["@@transducer/result"](d)})},c)};var Dd=db.AnonymousObservable=function(a){function b(a){return a&&lb(a.dispose)?a:lb(a)?mc(a):nc}function c(a,c){var d=c[0],e=c[1],f=o(e)(d);return f!==bc||d.fail(bc.e)?void d.setDisposable(b(f)):p(bc.e)}function d(b,d){function e(a){var d=new Ed(a),e=[d,b];return zc.scheduleRequired()?zc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return dc(d,a),d}(Rc),Ed=function(a){function b(b){a.call(this),this.observer=b,this.m=new qc}dc(b,a);var c=b.prototype;return c.next=function(a){var b=o(this.observer.onNext).call(this.observer,a);b===bc&&(this.dispose(),p(b.e))},c.error=function(a){var b=o(this.observer.onError).call(this.observer,a);this.dispose(),b===bc&&p(b.e)},c.completed=function(){var a=o(this.observer.onCompleted).call(this.observer);this.dispose(),a===bc&&p(a.e)},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}(Pc),Fd=function(a,b){this.subject=a,this.observer=b};Fd.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 Gd=db.Subject=function(a){function c(a){return pc(this),this.isStopped?this.hasError?(a.onError(this.error),nc):(a.onCompleted(),nc):(this.observers.push(a),new Fd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return dc(d,a),ec(d.prototype,Nc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(pc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(pc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;
|
4
|
-
for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(pc(this),!this.isStopped)for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Id(a,b)},d}(Rc),Hd=db.AsyncSubject=function(a){function c(a){return pc(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),nc):(this.observers.push(a),new Fd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return dc(d,a),ec(d.prototype,Nc,{hasObservers:function(){return pc(this),this.observers.length>0},onCompleted:function(){var a,c;if(pc(this),!this.isStopped){this.isStopped=!0;var d=b(this.observers),c=d.length;if(this.hasValue)for(a=0;c>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;c>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(pc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){pc(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Rc),Id=db.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 dc(c,a),ec(c.prototype,Nc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Rc),Jd=db.BehaviorSubject=function(a){function c(a){return pc(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),nc):(this.observers.push(a),a.onNext(this.value),new Fd(this,a))}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return dc(d,a),ec(d.prototype,Nc,{getValue:function(){if(pc(this),this.hasError)throw this.error;return this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(pc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(pc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(pc(this),!this.isStopped){this.value=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Rc),Kd=db.ReplaySubject=function(a){function c(a,b){return mc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var b=new Tc(this.scheduler,a),d=c(this,b);pc(this),this._trim(this.scheduler.now()),this.observers.push(b);for(var e=0,f=this.q.length;f>e;e++)b.onNext(this.q[e].value);return this.hasError?b.onError(this.error):this.isStopped&&b.onCompleted(),b.ensureActive(),d}function e(b,c,e){this.bufferSize=null==b?f:b,this.windowSize=null==c?f:c,this.scheduler=e||zc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}var f=Math.pow(2,53)-1;return dc(e,a),ec(e.prototype,Nc.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(pc(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(pc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(pc(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=0,d=b(this.observers),e=d.length;e>c;c++){var f=d[c];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Rc);db.Pauser=function(a){function b(){a.call(this)}return dc(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(Gd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?($.Rx=db,define(function(){return db})):_&&ab?bb?(ab.exports=db).Rx=db:_.Rx=db:$.Rx=db;var Ld=g()}).call(this);
|
2
|
+
(function(a){function b(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function c(){try{return bb.apply(this,arguments)}catch(a){return tb.e=a,tb}}function d(a){if(!sb(a))throw new TypeError("fn must be a function");return bb=a,c}function e(a){throw a}function f(a,b){if(ub&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(yb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var e=c.join("\n"+yb+"\n");a.stack=g(e)}}function g(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var f=b[d];h(f)||i(f)||!f||c.push(f)}return c.join("\n")}function h(a){var b=k(a);if(!b)return!1;var c=b[0],d=b[1];return c===wb&&d>=xb&&ee>=d}function i(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function j(){if(ub)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=k(c);if(!d)return;return wb=d[0],d[1]}}function k(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 l(a){var b=[];if(!gc(a))return b;fc.nonEnumArgs&&a.length&&hc(a)&&(a=jc.call(a));var c=fc.enumPrototypes&&"function"==typeof a,d=fc.enumErrorProps&&(a===_b||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(fc.nonEnumShadows&&a!==ac){var f=a.constructor,g=-1,h=Nb;if(a===(f&&f.prototype))var i=a===bc?Xb:a===_b?Sb:Yb.call(a),j=ec[i];for(;++g<h;)e=Mb[g],j&&j[e]||!Zb.call(a,e)||b.push(e)}return b}function m(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function n(a,b){return m(a,b,l)}function o(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function p(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=Yb.call(a),h=Yb.call(b);if(g==Ob&&(g=Vb),h==Ob&&(h=Vb),g!=h)return!1;switch(g){case Qb:case Rb:return+a==+b;case Ub:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Wb:case Xb:return a==String(b)}var i=g==Pb;if(!i){if(g!=Vb||!fc.nodeClass&&(o(a)||o(b)))return!1;var j=!fc.argsObject&&hc(a)?Object:a.constructor,k=!fc.argsObject&&hc(b)?Object:b.constructor;if(!(j==k||Zb.call(a,"constructor")&&Zb.call(b,"constructor")||sb(j)&&j instanceof j&&sb(k)&&k instanceof k||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var l=c.length;l--;)if(c[l]==a)return d[l]==b;var m=0,q=!0;if(c.push(a),d.push(b),i){if(l=a.length,m=b.length,q=m==l)for(;m--;){var r=b[m];if(!(q=p(a[m],r,c,d)))break}}else n(b,function(b,e,f){return Zb.call(f,e)?(m++,q=Zb.call(a,e)&&p(a[e],b,c,d)):void 0}),q&&n(a,function(a,b,c){return Zb.call(c,b)?q=--m>-1:void 0});return c.pop(),d.pop(),q}function q(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function r(a){this._s=a}function s(a){this._s=a,this._l=a.length,this._i=0}function t(a){this._a=a}function u(a){this._a=a,this._l=y(a),this._i=0}function v(a){return"number"==typeof a&&jb.isFinite(a)}function w(b){var c,d=b[Gb];if(!d&&"string"==typeof b)return c=new r(b),c[Gb]();if(!d&&b.length!==a)return c=new t(b),c[Gb]();if(!d)throw new TypeError("Object is not iterable");return b[Gb]()}function x(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function y(a){var b=+a.length;return isNaN(b)?0:0!==b&&v(b)?(b=x(b)*Math.floor(Math.abs(b)),0>=b?0:b>id?id:b):b}function z(a,b){this.observer=a,this.parent=b}function A(a,b){return Ac(a)||(a=Ec),new kd(b,a)}function B(a,b){this.observer=a,this.parent=b}function C(a,b){this.observer=a,this.parent=b}function D(a,b){return new Yd(function(c){var d=new vc,e=new wc;return e.setDisposable(d),d.setDisposable(a.subscribe(new vd(c,e,b))),e},a)}function E(){return!1}function F(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function E(){return!1}function E(){return!1}function G(){return[]}function F(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function E(){return!1}function G(){return[]}function F(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function H(a){return function(b){return a.subscribe(b)}}function I(a,b){this.o=a,this.accumulator=b.accumulator,this.hasSeed=b.hasSeed,this.seed=b.seed,this.hasAccumulation=!1,this.accumulation=null,this.hasValue=!1,this.isStopped=!1}function J(b,c){return 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}}function K(a,b,c,d){var e=new ae;return d.push(L(e,b,c)),a.apply(b,d),e.asObservable()}function L(a,b,c){return function(){for(var e=arguments.length,f=new Array(e),g=0;e>g;g++)f[g]=arguments[g];if(sb(c)){if(f=d(c).apply(b,f),f===tb)return a.onError(f.e);a.onNext(f)}else a.onNext(f.length<=1?f[0]:f);a.onCompleted()}}function M(a,b,c,d){var e=new ae;return d.push(N(e,b,c)),a.apply(b,d),e.asObservable()}function N(a,b,c){return function(){var e=arguments[0];if(e)return a.onError(e);for(var f=arguments.length,g=[],h=1;f>h;h++)g[h-1]=arguments[h];if(sb(c)){var g=d(c).apply(b,g);if(g===tb)return a.onError(g.e);a.onNext(g)}else a.onNext(g.length<=1?g[0]:g);a.onCompleted()}}function O(a){return window.StaticNodeList?a instanceof window.StaticNodeList||a instanceof window.NodeList:"[object NodeList]"==Object.prototype.toString.call(a)}function P(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=jb.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 Q(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function R(a,b,c){this._e=a,this._n="on"+b,this._fn=function(a){c(P(a))},this._e.attachEvent(this._n,this._fn),this.isDisposed=!1}function S(a,b,c){this._e=a,this._n="on"+b,this._e[this._n]=c,this.isDisposed=!1}function T(a,b,c){return a.addEventListener?new Q(a,b,c):a.attachEvent?new R(a,b,c):S(a,b,c)}function U(a,b,c){var d=new oc;if(O(a)||"[object HTMLCollection]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(U(a.item(e),b,c));else a&&d.add(T(a,b,c));return d}function V(a,b){return new Yd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function W(a,b,c){return new Yd(function(d){var e=a,f=zc(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 X(a,b){return new Yd(function(c){return b.scheduleWithRelative(zc(a),function(){c.onNext(0),c.onCompleted()})})}function Y(a,b,c){return a===b?new Yd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):cd(function(){return W(c.now()+a,b,c)})}function Z(a,b,c){return new Yd(function(d){var e,f=!1,g=new wc,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 vc,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 oc(e,g)},a)}function $(a,b,c){return cd(function(){return Z(a,b-c.now(),c)})}function _(a,b){return new Yd(function(c){function d(){g&&(g=!1,c.onNext(e)),f&&c.onCompleted()}var e,f=!1,g=!1,h=new vc;return h.setDisposable(a.subscribe(function(a){g=!0,e=a},function(a){c.onError(a)},function(){f=!0,h.dispose()})),new oc(h,b.subscribe(d,function(a){c.onError(a)},d))},a)}function ab(a,b,c){return new Yd(function(e){function f(a,b){if(k[b]=a,h[b]=!0,i||(i=h.every(mb))){if(g)return e.onError(g);var f=d(c).apply(null,k);if(f===tb)return e.onError(f.e);e.onNext(f)}j&&k[1]&&e.onCompleted()}var g,h=[!1,!1],i=!1,j=!1,k=new Array(2);return new oc(a.subscribe(function(a){f(a,0)},function(a){k[1]?e.onError(a):g=a},function(){j=!0,k[1]&&e.onCompleted()}),b.subscribe(function(a){f(a,1)},function(a){e.onError(a)},function(){j=!0,f(!0,1)}))},a)}var bb,cb={"function":!0,object:!0},db=cb[typeof exports]&&exports&&!exports.nodeType&&exports,eb=cb[typeof self]&&self.Object&&self,fb=cb[typeof window]&&window&&window.Object&&window,gb=cb[typeof module]&&module&&!module.nodeType&&module,hb=gb&&gb.exports===db&&db,ib=db&&gb&&"object"==typeof global&&global&&global.Object&&global,jb=jb=ib||fb!==(this&&this.window)&&fb||eb||this,kb={internals:{},config:{Promise:jb.Promise},helpers:{}},lb=kb.helpers.noop=function(){},mb=kb.helpers.identity=function(a){return a},nb=kb.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}(),ob=kb.helpers.defaultComparer=function(a,b){return ic(a,b)},pb=kb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},qb=(kb.helpers.defaultKeySerializer=function(a){return a.toString()},kb.helpers.defaultError=function(a){throw a}),rb=kb.helpers.isPromise=function(a){return!!a&&"function"!=typeof a.subscribe&&"function"==typeof a.then},sb=kb.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}(),tb={e:{}};kb.config.longStackSupport=!1;var ub=!1,vb=d(function(){throw new Error})();ub=!!vb.e&&!!vb.e.stack;var wb,xb=j(),yb="From previous event:",zb=kb.EmptyError=function(){this.message="Sequence contains no elements.",this.name="EmptyError",Error.call(this)};zb.prototype=Error.prototype;var Ab=kb.ObjectDisposedError=function(){this.message="Object has been disposed",this.name="ObjectDisposedError",Error.call(this)};Ab.prototype=Error.prototype;var Bb=kb.ArgumentOutOfRangeError=function(){this.message="Argument out of range",this.name="ArgumentOutOfRangeError",Error.call(this)};Bb.prototype=Error.prototype;var Cb=kb.NotSupportedError=function(a){this.message=a||"This operation is not supported",this.name="NotSupportedError",Error.call(this)};Cb.prototype=Error.prototype;var Db=kb.NotImplementedError=function(a){this.message=a||"This operation is not implemented",this.name="NotImplementedError",Error.call(this)};Db.prototype=Error.prototype;var Eb=kb.helpers.notImplemented=function(){throw new Db},Fb=kb.helpers.notSupported=function(){throw new Cb},Gb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";jb.Set&&"function"==typeof(new jb.Set)["@@iterator"]&&(Gb="@@iterator");var Hb=kb.doneEnumerator={done:!0,value:a},Ib=kb.helpers.isIterable=function(b){return b[Gb]!==a},Jb=kb.helpers.isArrayLike=function(b){return b&&b.length!==a};kb.helpers.iterator=Gb;var Kb,Lb=kb.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,$b=Yb.call(arguments)==Ob,_b=Error.prototype,ac=Object.prototype,bc=String.prototype,cc=ac.propertyIsEnumerable;try{Kb=!(Yb.call(document)==Vb&&!({toString:0}+""))}catch(dc){Kb=!0}var ec={};ec[Pb]=ec[Rb]=ec[Ub]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},ec[Qb]=ec[Xb]={constructor:!0,toString:!0,valueOf:!0},ec[Sb]=ec[Tb]=ec[Wb]={constructor:!0,toString:!0},ec[Vb]={constructor:!0};var fc={};!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);fc.enumErrorProps=cc.call(_b,"message")||cc.call(_b,"name"),fc.enumPrototypes=cc.call(a,"prototype"),fc.nonEnumArgs=0!=c,fc.nonEnumShadows=!/valueOf/.test(b)}(1);var gc=kb.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},hc=function(a){return a&&"object"==typeof a?Yb.call(a)==Ob:!1};$b||(hc=function(a){return a&&"object"==typeof a?Zb.call(a,"callee"):!1});{var ic=kb.internals.isEqual=function(a,b){return p(a,b,[],[])},jc=({}.hasOwnProperty,Array.prototype.slice),kc=kb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},lc=kb.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]}};kb.internals.addRef=function(a,b){return new Yd(function(c){return new oc(b.getDisposable(),a.subscribe(c))})}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=jc.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(jc.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(jc.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 mc=Object("a"),nc="a"!=mc[0]||!(0 in mc);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=nc&&{}.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=nc&&{}.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}}());var oc=kb.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!tc(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},pc=oc.prototype;pc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},pc.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},pc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var qc=kb.Disposable=function(a){this.isDisposed=!1,this.action=a||lb};qc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var rc=qc.create=function(a){return new qc(a)},sc=qc.empty={dispose:lb},tc=qc.isDisposable=function(a){return a&&sb(a.dispose)},uc=qc.checkDisposed=function(a){if(a.isDisposed)throw new Ab},vc=kb.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};vc.prototype.getDisposable=function(){return this.current},vc.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},vc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var wc=kb.SerialDisposable=function(){this.isDisposed=!1,this.current=null};wc.prototype.getDisposable=function(){return this.current},wc.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},wc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var xc=(kb.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?sc:new a(this)},b}(),kb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||pb,this.disposable=new vc});xc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},xc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},xc.prototype.isCancelled=function(){return this.disposable.isDisposed},xc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var yc=kb.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(),sc}a.isScheduler=function(b){return b instanceof a};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=nb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),zc=yc.normalize,Ac=yc.isScheduler;!function(a){function b(a,b){function c(b){function d(a,b){return g?f.remove(i):h=!0,e(b,c),sc}var g=!1,h=!1,i=a.scheduleWithState(b,d);h||(f.add(i),g=!0)}var d=b[0],e=b[1],f=new oc;return e(d,c),f}function c(a,b,c){function d(b,e){function h(a,b){return i?g.remove(k):j=!0,f(b,d),sc}var i=!1,j=!1,k=a[c](b,e,h);j||(g.add(k),i=!0)}var e=b[0],f=b[1],g=new oc;return f(e,d),g}function d(a,b){return c(a,b,"scheduleWithRelativeAndState")}function e(a,b){return c(a,b,"scheduleWithAbsoluteAndState")}function f(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,f)},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState([a,c],b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,f)},a.scheduleRecursiveWithRelativeAndState=function(a,b,c){return this._scheduleRelative([a,c],b,d)},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,f)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute([a,c],b,e)}}(yc.prototype),function(){yc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},yc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof jb.setInterval)throw new Cb;b=zc(b);var d=a,e=jb.setInterval(function(){d=c(d)},b);return rc(function(){jb.clearInterval(e)})}}(yc.prototype);var Bc,Cc,Dc=yc.immediate=function(){function a(a,b){return b(this,a)}return new yc(nb,a,Fb,Fb)}(),Ec=yc.currentThread=function(){function a(){for(;c.length>0;){var a=c.shift();!a.isCancelled()&&a.invoke()}}function b(b,f){var g=new xc(this,b,f,this.now());if(c)c.push(g);else{c=[g];var h=d(a)();if(c=null,h===tb)return e(h.e)}return g.disposable}var c,f=new yc(nb,b,Fb,Fb);return f.scheduleRequired=function(){return!c},f}(),Fc=(kb.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 vc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),function(){var a,b=lb;if(jb.setTimeout)a=jb.setTimeout,b=jb.clearTimeout;else{if(!jb.WScript)throw new Cb;a=function(a,b){jb.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}()),Gc=Fc.setTimeout,Hc=Fc.clearTimeout;!function(){function a(b){if(h)Gc(function(){a(b)},0);else{var c=g[b];if(c){h=!0;var f=d(c)();if(Cc(b),h=!1,f===tb)return e(f.e)}}}function b(){if(!jb.postMessage||jb.importScripts)return!1;var a=!1,b=jb.onmessage;return jb.onmessage=function(){a=!0},jb.postMessage("","*"),jb.onmessage=b,a}function c(b){"string"==typeof b.data&&b.data.substring(0,k.length)===k&&a(b.data.substring(k.length))}var f=1,g={},h=!1;Cc=function(a){delete g[a]};var i=RegExp("^"+String(Yb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),j="function"==typeof(j=ib&&hb&&ib.setImmediate)&&!i.test(j)&&j;if(sb(j))Bc=function(b){var c=f++;return g[c]=b,j(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Bc=function(b){var c=f++;return g[c]=b,process.nextTick(function(){a(c)}),c};else if(b()){var k="ms.rx.schedule"+Math.random();jb.addEventListener?jb.addEventListener("message",c,!1):jb.attachEvent?jb.attachEvent("onmessage",c):jb.onmessage=c,Bc=function(a){var b=f++;return g[b]=a,jb.postMessage(k+currentId,"*"),b}}else if(jb.MessageChannel){var l=new jb.MessageChannel;l.port1.onmessage=function(b){a(b.data)},Bc=function(a){var b=f++;return g[b]=a,l.port2.postMessage(b),b}}else Bc="document"in jb&&"onreadystatechange"in jb.document.createElement("script")?function(b){var c=jb.document.createElement("script"),d=f++;return g[d]=b,c.onreadystatechange=function(){a(d),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},jb.document.documentElement.appendChild(c),d}:function(b){var c=f++;return g[c]=b,Gc(function(){a(c)},0),c}}();var Ic,Jc=yc.timeout=yc["default"]=function(){function a(a,b){var c=this,d=new vc,e=Bc(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new oc(d,rc(function(){Cc(e)}))}function b(a,b,c){var d=this,e=yc.normalize(b),f=new vc;if(0===e)return d.scheduleWithState(a,c);var g=Gc(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new oc(f,rc(function(){Hc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new yc(nb,a,b,c)}(),Kc=kb.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}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 Ac(a)||(a=Dc),new Yd(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Lc=Kc.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){return new Kc("N",d,null,a,b,c)}}(),Mc=Kc.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){return new Kc("E",null,d,a,b,c)}}(),Nc=Kc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new Kc("C",null,null,a,b,c)}}(),Oc=kb.Observer=function(){},Pc=Oc.create=function(a,b,c){return a||(a=lb),b||(b=qb),c||(c=lb),new Rc(a,b,c)},Qc=kb.internals.AbstractObserver=function(a){function b(){this.isStopped=!1}return kc(b,a),b.prototype.next=Eb,b.prototype.error=Eb,b.prototype.completed=Eb,b.prototype.onNext=function(a){!this.isStopped&&this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(Oc),Rc=kb.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return kc(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(Qc),Sc=kb.Observable=function(){function a(a,b){return function(c){var d=c.onError;return c.onError=function(b){f(b,a),d.call(c,b)},b.call(a,c)}}function b(b){if(kb.config.longStackSupport&&ub){var c=d(e)(new Error).e;this.stack=c.stack.substring(c.stack.indexOf("\n")+1),this._subscribe=a(this,b)}else this._subscribe=b}return Ic=b.prototype,b.isObservable=function(a){return a&&sb(a.subscribe)},Ic.subscribe=Ic.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Pc(a,b,c))},Ic.subscribeOnNext=function(a,b){return this._subscribe(Pc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Ic.subscribeOnError=function(a,b){return this._subscribe(Pc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Ic.subscribeOnCompleted=function(a,b){return this._subscribe(Pc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},b}(),Tc=kb.ObservableBase=function(a){function b(a){return a&&sb(a.dispose)?a:sb(a)?rc(a):sc}function c(a,c){var f=c[0],g=c[1],h=d(g.subscribeCore).call(g,f);return h!==tb||f.fail(tb.e)?void f.setDisposable(b(h)):e(tb.e)}function f(a){var b=new Zd(a),d=[b,this];return Ec.scheduleRequired()?Ec.scheduleWithState(d,c):c(null,d),b}function g(){a.call(this,f)}return kc(g,a),g.prototype.subscribeCore=Eb,g}(Sc),Uc=function(a){function b(b,c,d,e){this.resultSelector=kb.helpers.isFunction(d)?d:null,this.selector=kb.internals.bindCallback(kb.helpers.isFunction(c)?c:function(){return c},e,3),this.source=b,a.call(this)}function c(a,b,c,d){this.i=0,this.selector=b,this.resultSelector=c,this.source=d,this.isStopped=!1,this.o=a}return kc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.selector,this.resultSelector,this))},c.prototype._wrapResult=function(a,b,c){return this.resultSelector?a.map(function(a,d){return this.resultSelector(b,a,c,d)},this):a},c.prototype.onNext=function(a){if(!this.isStopped){var b=this.i++,c=d(this.selector)(a,b,this.source);if(c===tb)return this.o.onError(c.e);kb.helpers.isPromise(c)&&(c=kb.Observable.fromPromise(c)),(kb.helpers.isArrayLike(c)||kb.helpers.isIterable(c))&&(c=kb.Observable.from(c)),this.o.onNext(this._wrapResult(c,a,b))}},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},b}(Tc),Vc=kb.internals.Enumerable=function(){},Wc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b,c){this.o=a,this.s=b,this.e=c,this.isStopped=!1}return kc(b,a),b.prototype.subscribeCore=function(a){var b,e=new wc,f=Dc.scheduleRecursiveWithState(this.sources[Gb](),function(f,g){if(!b){var h=d(f.next).call(f);if(h===tb)return a.onError(h.e);if(h.done)return a.onCompleted();var i=h.value;rb(i)&&(i=Rd(i));var j=new vc;e.setDisposable(j),j.setDisposable(i.subscribe(new c(a,g,f)))}});return new oc(e,f,rc(function(){b=!0}))},c.prototype.onNext=function(a){this.isStopped||this.o.onNext(a)},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.s(this.e))},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Tc);Vc.prototype.concat=function(){return new Wc(this)};var Xc=function(a){function b(b){this.sources=b,a.call(this)}return kc(b,a),b.prototype.subscribeCore=function(a){var b,c=this.sources[Gb](),e=new wc,f=Dc.scheduleRecursiveWithState(null,function(f,g){if(!b){var h=d(c.next).call(c);if(h===tb)return a.onError(h.e);if(h.done)return null!==f?a.onError(f):a.onCompleted();var i=h.value;rb(i)&&(i=Rd(i));var j=new vc;e.setDisposable(j),j.setDisposable(i.subscribe(function(b){a.onNext(b)},g,function(){a.onCompleted()}))}});return new oc(e,f,rc(function(){b=!0}))},b}(Tc);Vc.prototype.catchError=function(){return new Xc(this)},Vc.prototype.catchErrorWhen=function(a){var b=this;return new Yd(function(c){var e,f,g=new _d,h=new _d,i=a(g),j=i.subscribe(h),k=b[Gb](),l=new wc,m=Dc.scheduleRecursive(function(a){if(!e){var b=d(k.next).call(k);if(b===tb)return c.onError(b.e);if(b.done)return void(f?c.onError(f):c.onCompleted());var i=b.value;rb(i)&&(i=Rd(i));var j=new vc,m=new vc;l.setDisposable(new oc(m,j)),j.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(h.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),g.onNext(b)},function(){c.onCompleted()}))}});return new oc(j,l,m,rc(function(){e=!0}))})};var Yc=function(a){function b(a,b){this.v=a,this.c=null==b?-1:b}function c(a){this.v=a.v,this.l=a.c}return kc(b,a),b.prototype[Gb]=function(){return new c(this)},c.prototype.next=function(){return 0===this.l?Hb:(this.l>0&&this.l--,{done:!1,value:this.v})},b}(Vc),Zc=Vc.repeat=function(a,b){return new Yc(a,b)},$c=function(a){function b(a,b,c){this.s=a,this.fn=b?Lb(b,c,3):null}function c(a){this.i=-1,this.s=a.s,this.l=this.s.length,this.fn=a.fn}return kc(b,a),b.prototype[Gb]=function(){return new c(this)},c.prototype.next=function(){return++this.i<this.l?{done:!1,value:this.fn?this.fn(this.s[this.i],this.i,this.s):this.s[this.i]}:Hb},b}(Vc),_c=Vc.of=function(a,b,c){return new $c(a,b,c)},ad=kb.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new wc}return kc(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;
|
3
|
+
this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursiveWithState(this,function(a,b){var c;if(!(a.queue.length>0))return void(a.isAcquired=!1);c=a.queue.shift();var f=d(c)();return f===tb?(a.queue=[],a.hasFaulted=!0,e(f.e)):void b(a)}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Qc),bd=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.a=[],this.isStopped=!1}return kc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype.onNext=function(a){this.isStopped||this.a.push(a)},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onNext(this.a),this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Tc);Ic.toArray=function(){return new bd(this)},Sc.create=function(a,b){return new Yd(a,b)};var cd=Sc.defer=function(a){return new Yd(function(b){var c;try{c=a()}catch(d){return ud(d).subscribe(b)}return rb(c)&&(c=Rd(c)),c.subscribe(b)})},dd=function(a){function b(b){this.scheduler=b,a.call(this)}function c(a,b){this.observer=a,this.scheduler=b}function d(a,b){return b.onCompleted(),sc}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this.scheduler);return b.run()},c.prototype.run=function(){return this.scheduler.scheduleWithState(this.observer,d)},b}(Tc),ed=new dd(Dc),fd=Sc.empty=function(a){return Ac(a)||(a=Dc),a===Dc?ed:new dd(a)},gd=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new hd(a,this);return b.run()},b}(Tc),hd=function(){function a(a,b){this.o=a,this.parent=b}return a.prototype.run=function(){function a(a,b){var g=d(c.next).call(c);if(g===tb)return e.onError(g.e);if(g.done)return e.onCompleted();var h=g.value;return sb(f)&&(h=d(f)(h,a),h===tb)?e.onError(h.e):(e.onNext(h),void b(a+1))}var b=Object(this.parent.iterable),c=w(b),e=this.o,f=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),id=Math.pow(2,53)-1;r.prototype[Gb]=function(){return new s(this._s)},s.prototype[Gb]=function(){return this},s.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:Hb},t.prototype[Gb]=function(){return new u(this._a)},u.prototype[Gb]=function(){return this},u.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:Hb};var jd=Sc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!sb(b))throw new Error("mapFn when provided must be a function");if(b)var e=Lb(b,c,2);return Ac(d)||(d=Ec),new gd(a,e,d)},kd=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new z(a,this);return b.run()},b}(Tc);z.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};{var ld=Sc.fromArray=function(a,b){return Ac(b)||(b=Ec),new kd(a,b)},md=function(a){function b(){a.call(this)}return kc(b,a),b.prototype.subscribeCore=function(){return sc},b}(Tc),nd=new md;Sc.never=function(){return nd}}Sc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new kd(b,Ec)},Sc.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new kd(c,a)};var od=function(a){function b(b,c){this.obj=b,this.keys=Object.keys(b),this.scheduler=c,a.call(this)}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new B(a,this);return b.run()},b}(Tc);B.prototype.run=function(){function a(a,f){if(e>a){var g=d[a];b.onNext([g,c[g]]),f(a+1)}else b.onCompleted()}var b=this.observer,c=this.parent.obj,d=this.parent.keys,e=d.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},Sc.pairs=function(a,b){return b||(b=Ec),new od(a,b)};var pd=function(a){function b(b,c,d){this.start=b,this.rangeCount=c,this.scheduler=d,a.call(this)}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new qd(a,this);return b.run()},b}(Tc),qd=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.rangeCount,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();Sc.range=function(a,b,c){return Ac(c)||(c=Ec),new pd(a,b,c)};var rd=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new C(a,this);return b.run()},b}(Tc);C.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursiveWithState(this.parent.repeatCount,a)},Sc.repeat=function(a,b,c){return Ac(c)||(c=Ec),new rd(a,b,c)};var sd=function(a){function b(b,c){this.value=b,this.scheduler=c,a.call(this)}function c(a,b,c){this.observer=a,this.value=b,this.scheduler=c}function d(a,b){var c=b[0],d=b[1];return d.onNext(c),d.onCompleted(),sc}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this.value,this.scheduler);return b.run()},c.prototype.run=function(){var a=[this.value,this.observer];return this.scheduler===Dc?d(null,a):this.scheduler.scheduleWithState(a,d)},b}(Tc),td=(Sc["return"]=Sc.just=function(a,b){return Ac(b)||(b=Dc),new sd(a,b)},function(a){function b(b,c){this.error=b,this.scheduler=c,a.call(this)}function c(a,b){this.o=a,this.p=b}function d(a,b){var c=b[0],d=b[1];d.onError(c)}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.p.scheduler.scheduleWithState([this.p.error,this.o],d)},b}(Tc)),ud=Sc["throw"]=function(a,b){return Ac(b)||(b=Dc),new td(a,b)},vd=function(a){function b(b,c,d){this._o=b,this._s=c,this._fn=d,a.call(this)}return kc(b,a),b.prototype.next=function(a){this._o.onNext(a)},b.prototype.completed=function(){return this._o.onCompleted()},b.prototype.error=function(a){var b=d(this._fn)(a);if(b===tb)return this._o.onError(b.e);rb(b)&&(b=Rd(b));var c=new vc;this._s.setDisposable(c),c.setDisposable(b.subscribe(this._o))},b}(Qc);Ic["catch"]=function(a){return sb(a)?D(this,a):wd([this,a])};var wd=Sc["catch"]=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return _c(a).catchError()};Ic.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),xd.apply(this,b)};var xd=Sc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=sb(b[a-1])?b.pop():F;return Array.isArray(b[0])&&(b=b[0]),new Yd(function(a){function c(b){if(g[b]=!0,h||(h=g.every(mb))){try{var c=d.apply(null,j)}catch(e){return a.onError(e)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every(mb)&&a.onCompleted()}function e(b){i[b]=!0,i.every(mb)&&a.onCompleted()}for(var f=b.length,g=q(f,E),h=!1,i=q(f,E),j=new Array(f),k=new Array(f),l=0;f>l;l++)!function(d){var f=b[d],g=new vc;rb(f)&&(f=Rd(f)),g.setDisposable(f.subscribe(function(a){j[d]=a,c(d)},function(b){a.onError(b)},function(){e(d)})),k[d]=g}(l);return new oc(k)},this)};Ic.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),zd.apply(null,a)};var yd=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){this.sources=a,this.o=b}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new c(this.sources,a);return b.run()},c.prototype.run=function(){var a,b=new wc,c=this.sources,d=c.length,e=this.o,f=Dc.scheduleRecursiveWithState(0,function(f,g){if(!a){if(f===d)return e.onCompleted();var h=c[f];rb(h)&&(h=Rd(h));var i=new vc;b.setDisposable(i),i.setDisposable(h.subscribe(function(a){e.onNext(a)},function(a){e.onError(a)},function(){g(f+1)}))}});return new oc(b,f,rc(function(){a=!0}))},b}(Tc),zd=Sc.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return new yd(a)};Ic.concatAll=function(){return this.merge(1)};var Ad=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new oc;return b.add(this.source.subscribe(new Bd(a,this.maxConcurrent,b))),b},b}(Tc),Bd=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new vc;this.g.add(c),rb(a)&&(a=Rd(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype.onNext=function(a){this.isStopped||(this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a))},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,0===this.activeCount&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=this.parent;a.g.remove(this.sad),a.q.length>0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Ic.merge=function(a){return"number"!=typeof a?Cd(this,a):new Ad(this,a)};var Cd=Sc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Ac(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Dc,b=0;d>b;b++)c.push(arguments[b]);else for(a=Dc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),A(a,c).mergeAll()},Dd=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function d(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new oc,d=new vc;return b.add(d),d.setDisposable(this.source.subscribe(new c(a,b))),b},c.prototype.onNext=function(a){if(!this.isStopped){var b=new vc;this.g.add(b),rb(a)&&(a=Rd(a)),b.setDisposable(a.subscribe(new d(this,b)))}},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},d.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},d.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},d.prototype.onCompleted=function(){if(!this.isStopped){var a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},d.prototype.dispose=function(){this.isStopped=!0},d.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},b}(Tc);Ic.mergeAll=function(){return new Dd(this)};var Ed=kb.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};Ed.prototype=Error.prototype,Sc.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=A(null,a);return new Yd(function(a){function b(){0===g.length?a.onCompleted():a.onError(1===g.length?g[0]:new Ed(g))}var c=new oc,e=new vc,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new vc;c.add(e),rb(d)&&(d=Rd(d)),e.setDisposable(d.subscribe(function(b){a.onNext(b)},function(a){g.push(a),c.remove(e),f&&1===c.length&&b()},function(){c.remove(e),f&&1===c.length&&b()}))},function(a){g.push(a),f=!0,1===c.length&&b()},function(){f=!0,1===c.length&&b()})),c})},Ic.skipUntil=function(a){var b=this;return new Yd(function(c){var d=!1,e=new oc(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));rb(a)&&(a=Rd(a));var f=new vc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)};var Fd=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.inner=b,this.stopped=!1,this.latest=0,this.hasLatest=!1,this.isStopped=!1}function d(a,b){this.parent=a,this.id=b,this.isStopped=!1}return kc(b,a),b.prototype.subscribeCore=function(a){var b=new wc,d=this.source.subscribe(new c(a,b));return new oc(d,b)},c.prototype.onNext=function(a){if(!this.isStopped){var b=new vc,c=++this.latest;this.hasLatest=!0,this.inner.setDisposable(b),rb(a)&&(a=Rd(a)),b.setDisposable(a.subscribe(new d(this,c)))}},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.stopped=!0,!this.hasLatest&&this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},d.prototype.onNext=function(a){this.isStopped||this.parent.latest===this.id&&this.parent.o.onNext(a)},d.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.latest===this.id&&this.parent.o.onError(a))},d.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.parent.latest===this.id&&(this.parent.hasLatest=!1,this.parent.isStopped&&this.parent.o.onCompleted()))},d.prototype.dispose=function(){this.isStopped=!0},d.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},b}(Tc);Ic["switch"]=Ic.switchLatest=function(){return new Fd(this)};var Gd=function(a){function b(b,c){this.source=b,this.other=rb(c)?Rd(c):c,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return kc(b,a),b.prototype.subscribeCore=function(a){return new oc(this.source.subscribe(a),this.other.subscribe(new c(a)))},c.prototype.onNext=function(){this.isStopped||this.o.onCompleted()},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){!this.isStopped&&(this.isStopped=!0)},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Tc);Ic.takeUntil=function(a){return new Gd(this,a)},Ic.withLatestFrom=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var e=b.pop(),f=this;return Array.isArray(b[0])&&(b=b[0]),new Yd(function(a){for(var c=b.length,g=q(c,E),h=!1,i=new Array(c),j=new Array(c+1),k=0;c>k;k++)!function(c){var d=b[c],e=new vc;rb(d)&&(d=Rd(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(mb)},function(b){a.onError(b)},lb)),j[c]=e}(k);var l=new vc;return l.setDisposable(f.subscribe(function(b){var c=[b].concat(i);if(h){var f=d(e).apply(null,c);return f===tb?a.onError(f.e):void a.onNext(f)}},function(b){a.onError(b)},function(){a.onCompleted()})),j[c]=l,new oc(j)},this)},Ic.zip=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var e=sb(b[a-1])?b.pop():F;Array.isArray(b[0])&&(b=b[0]);var f=this;return b.unshift(f),new Yd(function(a){for(var c=b.length,g=q(c,G),h=q(c,E),i=new Array(c),j=0;c>j;j++)!function(c){var j=b[c],k=new vc;rb(j)&&(j=Rd(j)),k.setDisposable(j.subscribe(function(b){if(g[c].push(b),g.every(function(a){return a.length>0})){var i=g.map(function(a){return a.shift()}),j=d(e).apply(f,i);if(j===tb)return a.onError(j.e);a.onNext(j)}else h.filter(function(a,b){return b!==c}).every(mb)&&a.onCompleted()},function(b){a.onError(b)},function(){h[c]=!0,h.every(mb)&&a.onCompleted()})),i[c]=k}(j);return new oc(i)},f)},Sc.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.shift();return d.zip.apply(d,b)},Ic.zipIterable=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var e=sb(b[a-1])?b.pop():F,f=this;return b.unshift(f),new Yd(function(a){for(var c=b.length,g=q(c,G),h=q(c,E),i=new Array(c),j=0;c>j;j++)!function(c){var j=b[c],k=new vc;(Jb(j)||Ib(j))&&(j=jd(j)),k.setDisposable(j.subscribe(function(b){if(g[c].push(b),g.every(function(a){return a.length>0})){var i=g.map(function(a){return a.shift()}),j=d(e).apply(f,i);if(j===tb)return a.onError(j.e);a.onNext(j)}else h.filter(function(a,b){return b!==c}).every(mb)&&a.onCompleted()},function(b){a.onError(b)},function(){h[c]=!0,h.every(mb)&&a.onCompleted()})),i[c]=k}(j);return new oc(i)},f)},Ic.asObservable=function(){return new Yd(H(this),this)},Ic.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)};var Hd=function(a){function b(b,c,d){this.source=b,this.keyFn=c,this.comparer=d,a.call(this)}return kc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Id(a,this.keyFn,this.comparer))},b}(Tc),Id=function(a){function b(b,c,d){this.o=b,this.keyFn=c,this.comparer=d,this.hasCurrentKey=!1,this.currentKey=null,a.call(this)}return kc(b,a),b.prototype.next=function(a){var b,c=a;return sb(this.keyFn)&&(c=d(this.keyFn)(a),c===tb)?this.o.onError(c.e):this.hasCurrentKey&&(b=d(this.comparer)(this.currentKey,c),b===tb)?this.o.onError(b.e):void(this.hasCurrentKey&&b||(this.hasCurrentKey=!0,this.currentKey=c,this.o.onNext(a)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.o.onCompleted()},b}(Qc);Ic.distinctUntilChanged=function(a,b){return b||(b=ob),new Hd(this,a,b)};var Jd=function(a){function b(b,c,d,e){this.source=b,this._oN=c,this._oE=d,this._oC=e,a.call(this)}function c(a,b){this.o=a,this.t=!b._oN||sb(b._oN)?Pc(b._oN||lb,b._oE||lb,b._oC||lb):b._oN,this.isStopped=!1}return kc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},c.prototype.onNext=function(a){if(!this.isStopped){var b=d(this.t.onNext).call(this.t,a);b===tb&&this.o.onError(b.e),this.o.onNext(a)}},c.prototype.onError=function(a){if(!this.isStopped){this.isStopped=!0;var b=d(this.t.onError).call(this.t,a);if(b===tb)return this.o.onError(b.e);this.o.onError(a)}},c.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=d(this.t.onCompleted).call(this.t);if(a===tb)return this.o.onError(a.e);this.o.onCompleted()}},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Tc);Ic["do"]=Ic.tap=Ic.doAction=function(a,b,c){return new Jd(this,a,b,c)},Ic.doOnNext=Ic.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Ic.doOnError=Ic.tapOnError=function(a,b){return this.tap(lb,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Ic.doOnCompleted=Ic.tapOnCompleted=function(a,b){return this.tap(lb,null,"undefined"!=typeof b?function(){a.call(b)}:a)},Ic["finally"]=function(a){var b=this;return new Yd(function(c){var f=d(b.subscribe).call(b,c);return f===tb?(a(),e(f.e)):rc(function(){var b=d(f.dispose).call(f);a(),b===tb&&e(b.e)})},this)};var Kd=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return kc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype.onNext=lb,c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},b}(Tc);Ic.ignoreElements=function(){return new Kd(this)},Ic.materialize=function(){var a=this;return new Yd(function(b){return a.subscribe(function(a){b.onNext(Lc(a))},function(a){b.onNext(Mc(a)),b.onCompleted()},function(){b.onNext(Nc()),b.onCompleted()})},a)},Ic.repeat=function(a){return Zc(this,a).concat()},Ic.retry=function(a){return Zc(this,a).catchError()},Ic.retryWhen=function(a){return Zc(this).catchErrorWhen(a)};var Ld=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return kc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new I(a,this))},b}(Tc);I.prototype={onNext:function(a){return this.isStopped?void 0:(!this.hasValue&&(this.hasValue=!0),this.hasAccumulation?this.accumulation=d(this.accumulator)(this.accumulation,a):(this.accumulation=this.hasSeed?d(this.accumulator)(this.seed,a):a,this.hasAccumulation=!0),this.accumulation===tb?this.o.onError(this.accumulation.e):void this.o.onNext(this.accumulation))},onError:function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},onCompleted:function(){this.isStopped||(this.isStopped=!0,!this.hasValue&&this.hasSeed&&this.o.onNext(this.seed),this.o.onCompleted())},dispose:function(){this.isStopped=!0},fail:function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)}},Ic.scan=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new Ld(this,c,b,a)},Ic.skipLast=function(a){if(0>a)throw new Bb;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)},Ic.startWith=function(){var a,b=0;arguments.length&&Ac(arguments[0])?(a=arguments[0],b=1):a=Dc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return _c([ld(c,a),this]).concat()},Ic.takeLast=function(a){if(0>a)throw new Bb;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)},Ic.flatMapConcat=Ic.concatMap=function(a,b,c){return new Uc(this,a,b,c).merge(1)};var Md=function(a){function b(b,c,d){this.source=b,this.selector=Lb(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return a.call(this,b.selector(c,d,e),d,e)}}function e(a,b,c){this.o=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}return kc(b,a),b.prototype.internalMap=function(a,d){return new b(this.source,c(a,this),d)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new e(a,this.selector,this))},e.prototype.onNext=function(a){if(!this.isStopped){var b=d(this.selector)(a,this.i++,this.source);return b===tb?this.o.onError(b.e):void this.o.onNext(b)}},e.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Tc);Ic.map=Ic.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Md?this.internalMap(c,b):new Md(this,c,b)},Ic.pluck=function(){var a=arguments.length,b=new Array(a);if(0===a)throw new Error("List of properties cannot be empty.");for(var c=0;a>c;c++)b[c]=arguments[c];return this.map(J(b,a))},Ic.flatMap=Ic.selectMany=function(a,b,c){return new Uc(this,a,b,c).mergeAll()},kb.Observable.prototype.flatMapLatest=function(a,b,c){return new Uc(this,a,b,c).switchLatest()};var Nd=function(a){function b(b,c){this.source=b,this.skipCount=c,a.call(this)}function c(a,b){this.c=b,this.r=b,this.o=a,this.isStopped=!1}return kc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.skipCount))},c.prototype.onNext=function(a){this.isStopped||(this.r<=0?this.o.onNext(a):this.r--)},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Tc);Ic.skip=function(a){if(0>a)throw new Bb;return new Nd(this,a)},Ic.skipWhile=function(a,b){var c=this,d=Lb(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)},Ic.take=function(a,b){if(0>a)throw new Bb;if(0===a)return fd(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)},Ic.takeWhile=function(a,b){var c=this,d=Lb(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 Od=function(a){function b(b,c,d){this.source=b,this.predicate=Lb(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return b.predicate(c,d,e)&&a.call(this,c,d,e)}}function e(a,b,c){this.o=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}return kc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new e(a,this.predicate,this))},b.prototype.internalFilter=function(a,d){return new b(this.source,c(a,this),d)},e.prototype.onNext=function(a){if(!this.isStopped){var b=d(this.predicate)(a,this.i++,this.source);return b===tb?this.o.onError(b.e):void(b&&this.o.onNext(a))}},e.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Tc);Ic.filter=Ic.where=function(a,b){return this instanceof Od?this.internalFilter(a,b):new Od(this,a,b)},Sc.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return K(a,b,c,e)}},Sc.fromNodeCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return M(a,b,c,e)}},Q.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},R.prototype.dispose=function(){this.isDisposed||(this._e.detachEvent(this._n,this._fn),this.isDisposed=!0)},S.prototype.dispose=function(){this.isDisposed||(this._e[this._n]=null,this.isDisposed=!0)},kb.config.useNativeEvents=!1,Sc.fromEvent=function(a,b,c){return a.addListener?Pd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):kb.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new Yd(function(e){return U(a,b,function(){var a=arguments[0];return sb(c)&&(a=d(c).apply(null,arguments),a===tb)?e.onError(a.e):void e.onNext(a)})}).publish().refCount():Pd(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var Pd=Sc.fromEventPattern=function(a,b,c,e){return Ac(e)||(e=Dc),new Yd(function(e){function f(){var a=arguments[0];return sb(c)&&(a=d(c).apply(null,arguments),a===tb)?e.onError(a.e):void e.onNext(a)}var g=a(f);return rc(function(){sb(b)&&b(f,g)})}).publish().refCount()},Qd=function(a){function b(b){this.p=b,a.call(this)}return kc(b,a),b.prototype.subscribeCore=function(a){return this.p.then(function(b){a.onNext(b),a.onCompleted()},function(b){a.onError(b)}),sc},b}(Tc),Rd=Sc.fromPromise=function(a){return new Qd(a)};Ic.toPromise=function(a){if(a||(a=kb.config.Promise),!a)throw new Cb("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)})})},Sc.startAsync=function(a){var b;try{b=a()}catch(c){return ud(c)}return Rd(b)},Ic.multicast=function(a,b){var c=this;return"function"==typeof a?new Yd(function(d){var e=c.multicast(a());return new oc(b(e).subscribe(d),e.connect())},c):new Sd(c,a)},Ic.publish=function(a){return a&&sb(a)?this.multicast(function(){return new _d},a):this.multicast(new _d)},Ic.share=function(){return this.publish().refCount()},Ic.publishLast=function(a){return a&&sb(a)?this.multicast(function(){return new ae},a):this.multicast(new ae)},Ic.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new ce(b)},a):this.multicast(new ce(a))},Ic.shareValue=function(a){return this.publishValue(a).refCount()},Ic.replay=function(a,b,c,d){return a&&sb(a)?this.multicast(function(){return new de(b,c,d)},a):this.multicast(new de(b,c,d))},Ic.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var Sd=kb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new oc(f.subscribe(c),rc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return kc(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}(Sc),Td=Sc.interval=function(a,b){return Y(a,a,Ac(b)?b:Jc)};Sc.timer=function(b,c,d){var e;return Ac(d)||(d=Jc),null!=c&&"number"==typeof c?e=c:Ac(c)&&(d=c),b instanceof Date&&e===a?V(b.getTime(),d):b instanceof Date&&e!==a?W(b.getTime(),c,d):e===a?X(b,d):Y(b,e,d)}}Ic.delay=function(a,b){return Ac(b)||(b=Jc),a instanceof Date?$(this,a.getTime(),b):Z(this,a,b)},Ic.debounce=function(a,b){Ac(b)||(b=Jc);var c=this;return new Yd(function(d){var e,f=new wc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new vc;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 oc(i,f)},this)},Ic.throttle=function(a,b){return this.debounce(a,b)},Ic.timestamp=function(a){return Ac(a)||(a=Jc),this.map(function(b){return{value:b,timestamp:a.now()}})},Ic.sample=Ic.throttleLatest=function(a,b){return Ac(b)||(b=Jc),"number"==typeof a?_(this,Td(a,b)):_(this,a)},Ic.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=ud(new Error(b||"Timeout"))),Ac(c)||(c=Jc);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&&(rb(b)&&(b=Rd(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new vc,j=new wc,k=!1,l=new wc;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 oc(j,l)},d)},Ic.throttleFirst=function(a,b){Ac(b)||(b=Jc);
|
4
|
+
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)};var Ud=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=sc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=sc)});return new oc(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 kc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Sc);Ic.pausable=function(a){return new Ud(this,a)};var Vd=function(b){function c(b){function c(){for(;e.length>0;)b.onNext(e.shift())}var d,e=[],f=ab(this.source,this.pauser.startWith(!1).distinctUntilChanged(),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(f){d!==a&&f.shouldFire!=d?(d=f.shouldFire,f.shouldFire&&c()):(d=f.shouldFire,f.shouldFire?b.onNext(f.data):e.push(f.data))},function(a){c(),b.onError(a)},function(){c(),b.onCompleted()});return f}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 kc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Sc);Ic.pausableBuffered=function(a){return new Vd(this,a)};var Wd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d,e){a.call(this,b,c),this.subject=new Xd(d,e),this.source=c.multicast(this.subject).refCount()}return kc(c,a),c.prototype.request=function(a){return this.subject.request(null==a?-1:a)},c}(Sc),Xd=function(a){function b(a){return this.subject.subscribe(a)}function c(c,d){null==c&&(c=!0),a.call(this,b),this.subject=new _d,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=null,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=d||Ec}return kc(c,a),lc(c.prototype,Oc,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(Kc.createOnCompleted()):(this.subject.onCompleted(),this.disposeCurrentRequest())},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(Kc.createOnError(a)):(this.subject.onError(a),this.disposeCurrentRequest())},onNext:function(a){this.requestedCount<=0?this.enableQueue&&this.queue.push(Kc.createOnNext(a)):(0===this.requestedCount--&&this.disposeCurrentRequest(),this.subject.onNext(a))},_processRequest:function(a){if(this.enableQueue)for(;this.queue.length>0&&(a>0||"N"!==this.queue[0].kind);){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return a},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.scheduleWithState(a,function(a,c){var d=b._processRequest(c),e=b.hasCompleted||b.hasFailed;return!e&&d>0?(b.requestedCount=d,rc(function(){b.requestedCount=0})):void 0}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable&&(this.requestedDisposable.dispose(),this.requestedDisposable=null)}}),c}(Sc);Ic.controlled=function(a,b){return a&&Ac(a)&&(b=a,a=!0),null==a&&(a=!0),new Wd(this,a,b)},Ic.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a},Ic.transduce=function(a){function b(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var c=this;return new Yd(function(e){var f=a(b(e));return c.subscribe(function(a){var b=d(f["@@transducer/step"]).call(f,e,a);b===tb&&e.onError(b.e)},function(a){e.onError(a)},function(){f["@@transducer/result"](e)})},c)};var Yd=kb.AnonymousObservable=function(a){function b(a){return a&&sb(a.dispose)?a:sb(a)?rc(a):sc}function c(a,c){var f=c[0],g=c[1],h=d(g.__subscribe).call(g,f);return h!==tb||f.fail(tb.e)?void f.setDisposable(b(h)):e(tb.e)}function f(a){var b=new Zd(a),d=[b,this];return Ec.scheduleRequired()?Ec.scheduleWithState(d,c):c(null,d),b}function g(b,c){this.source=c,this.__subscribe=b,a.call(this,f)}return kc(g,a),g}(Sc),Zd=function(a){function b(b){a.call(this),this.observer=b,this.m=new vc}kc(b,a);var c=b.prototype;return c.next=function(a){var b=d(this.observer.onNext).call(this.observer,a);b===tb&&(this.dispose(),e(b.e))},c.error=function(a){var b=d(this.observer.onError).call(this.observer,a);this.dispose(),b===tb&&e(b.e)},c.completed=function(){var a=d(this.observer.onCompleted).call(this.observer);this.dispose(),a===tb&&e(a.e)},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}(Qc),$d=function(a,b){this.subject=a,this.observer=b};$d.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 _d=kb.Subject=function(a){function c(a){return uc(this),this.isStopped?this.hasError?(a.onError(this.error),sc):(a.onCompleted(),sc):(this.observers.push(a),new $d(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return kc(d,a),lc(d.prototype,Oc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(uc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(uc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(uc(this),!this.isStopped)for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new be(a,b)},d}(Sc),ae=kb.AsyncSubject=function(a){function c(a){return uc(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),sc):(this.observers.push(a),new $d(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return kc(d,a),lc(d.prototype,Oc,{hasObservers:function(){return uc(this),this.observers.length>0},onCompleted:function(){var a,c;if(uc(this),!this.isStopped){this.isStopped=!0;var d=b(this.observers),c=d.length;if(this.hasValue)for(a=0;c>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;c>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(uc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){uc(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Sc),be=kb.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 kc(c,a),lc(c.prototype,Oc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Sc),ce=kb.BehaviorSubject=function(a){function c(a){return uc(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),sc):(this.observers.push(a),a.onNext(this.value),new $d(this,a))}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return kc(d,a),lc(d.prototype,Oc,{getValue:function(){if(uc(this),this.hasError)throw this.error;return this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(uc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(uc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(uc(this),!this.isStopped){this.value=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Sc),de=kb.ReplaySubject=function(a){function c(a,b){return rc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var b=new ad(this.scheduler,a),d=c(this,b);uc(this),this._trim(this.scheduler.now()),this.observers.push(b);for(var e=0,f=this.q.length;f>e;e++)b.onNext(this.q[e].value);return this.hasError?b.onError(this.error):this.isStopped&&b.onCompleted(),b.ensureActive(),d}function e(b,c,e){this.bufferSize=null==b?f:b,this.windowSize=null==c?f:c,this.scheduler=e||Ec,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}var f=Math.pow(2,53)-1;return kc(e,a),lc(e.prototype,Oc.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(uc(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(uc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(uc(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=0,d=b(this.observers),e=d.length;e>c;c++){var f=d[c];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Sc);kb.Pauser=function(a){function b(){a.call(this)}return kc(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?(jb.Rx=kb,define(function(){return kb})):db&&gb?hb?(gb.exports=kb).Rx=kb:db.Rx=kb:jb.Rx=kb;var ee=j()}).call(this);
|
5
5
|
//# sourceMappingURL=rx.lite.compat.map
|
@@ -1,48 +1,45 @@
|
|
1
1
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
|
2
2
|
|
3
3
|
;(function (factory) {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
'number': false,
|
9
|
-
'string': false,
|
10
|
-
'undefined': false
|
11
|
-
};
|
4
|
+
var objectTypes = {
|
5
|
+
'function': true,
|
6
|
+
'object': true
|
7
|
+
};
|
12
8
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
var
|
10
|
+
freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
|
11
|
+
freeSelf = objectTypes[typeof self] && self.Object && self,
|
12
|
+
freeWindow = objectTypes[typeof window] && window && window.Object && window,
|
13
|
+
freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
|
14
|
+
moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
|
15
|
+
freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
|
18
16
|
|
19
|
-
|
20
|
-
root = freeGlobal;
|
21
|
-
}
|
17
|
+
var root = root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
|
22
18
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
19
|
+
// Because of build optimizers
|
20
|
+
if (typeof define === 'function' && define.amd) {
|
21
|
+
define(['./rx.lite.compat'], function (Rx, exports) {
|
22
|
+
return factory(root, exports, Rx);
|
23
|
+
});
|
24
|
+
} else if (typeof module === 'object' && module && module.exports === freeExports) {
|
25
|
+
module.exports = factory(root, module.exports, require('rx-lite-compat'));
|
26
|
+
} else {
|
27
|
+
root.Rx = factory(root, {}, root.Rx);
|
28
|
+
}
|
33
29
|
}.call(this, function (root, exp, Rx, undefined) {
|
34
30
|
|
35
31
|
// References
|
36
32
|
var Observable = Rx.Observable,
|
37
33
|
observableProto = Observable.prototype,
|
38
34
|
observableNever = Observable.never,
|
39
|
-
observableThrow = Observable
|
35
|
+
observableThrow = Observable['throw'],
|
40
36
|
AnonymousObservable = Rx.AnonymousObservable,
|
41
37
|
AnonymousObserver = Rx.AnonymousObserver,
|
42
38
|
notificationCreateOnNext = Rx.Notification.createOnNext,
|
43
39
|
notificationCreateOnError = Rx.Notification.createOnError,
|
44
40
|
notificationCreateOnCompleted = Rx.Notification.createOnCompleted,
|
45
41
|
Observer = Rx.Observer,
|
42
|
+
observerCreate = Observer.create,
|
46
43
|
Subject = Rx.Subject,
|
47
44
|
internals = Rx.internals,
|
48
45
|
helpers = Rx.helpers,
|
@@ -57,6 +54,7 @@
|
|
57
54
|
addRef = Rx.internals.addRef,
|
58
55
|
identity = helpers.identity,
|
59
56
|
isPromise = helpers.isPromise,
|
57
|
+
isFunction = helpers.isFunction,
|
60
58
|
inherits = internals.inherits,
|
61
59
|
bindCallback = internals.bindCallback,
|
62
60
|
noop = helpers.noop,
|
@@ -64,6 +62,25 @@
|
|
64
62
|
observableFromPromise = Observable.fromPromise,
|
65
63
|
ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError;
|
66
64
|
|
65
|
+
var errorObj = {e: {}};
|
66
|
+
var tryCatchTarget;
|
67
|
+
function tryCatcher() {
|
68
|
+
try {
|
69
|
+
return tryCatchTarget.apply(this, arguments);
|
70
|
+
} catch (e) {
|
71
|
+
errorObj.e = e;
|
72
|
+
return errorObj;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
function tryCatch(fn) {
|
76
|
+
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
|
77
|
+
tryCatchTarget = fn;
|
78
|
+
return tryCatcher;
|
79
|
+
}
|
80
|
+
function thrower(e) {
|
81
|
+
throw e;
|
82
|
+
}
|
83
|
+
|
67
84
|
function ScheduledDisposable(scheduler, disposable) {
|
68
85
|
this.scheduler = scheduler;
|
69
86
|
this.disposable = disposable;
|
@@ -294,16 +311,18 @@
|
|
294
311
|
* @returns {Observable} An observable sequence whose lifetime controls the lifetime of the dependent resource object.
|
295
312
|
*/
|
296
313
|
Observable.using = function (resourceFactory, observableFactory) {
|
297
|
-
return new AnonymousObservable(function (
|
298
|
-
var disposable = disposableEmpty
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
source = observableFactory(resource);
|
303
|
-
} catch (exception) {
|
304
|
-
return new CompositeDisposable(observableThrow(exception).subscribe(observer), disposable);
|
314
|
+
return new AnonymousObservable(function (o) {
|
315
|
+
var disposable = disposableEmpty;
|
316
|
+
var resource = tryCatch(resourceFactory)();
|
317
|
+
if (resource === errorObj) {
|
318
|
+
return new CompositeDisposable(observableThrow(resource.e).subscribe(o), disposable);
|
305
319
|
}
|
306
|
-
|
320
|
+
resource && (disposable = resource);
|
321
|
+
var source = tryCatch(observableFactory)(resource);
|
322
|
+
if (source === errorObj) {
|
323
|
+
return new CompositeDisposable(observableThrow(source.e).subscribe(o), disposable);
|
324
|
+
}
|
325
|
+
return new CompositeDisposable(source.subscribe(o), disposable);
|
307
326
|
});
|
308
327
|
};
|
309
328
|
|
@@ -336,64 +355,59 @@
|
|
336
355
|
}
|
337
356
|
}
|
338
357
|
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
observer.onNext(left);
|
343
|
-
}
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
358
|
+
var leftSubscribe = observerCreate(
|
359
|
+
function (left) {
|
360
|
+
choiceL();
|
361
|
+
choice === leftChoice && observer.onNext(left);
|
362
|
+
},
|
363
|
+
function (e) {
|
364
|
+
choiceL();
|
365
|
+
choice === leftChoice && observer.onError(e);
|
366
|
+
},
|
367
|
+
function () {
|
368
|
+
choiceL();
|
369
|
+
choice === leftChoice && observer.onCompleted();
|
348
370
|
}
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
371
|
+
);
|
372
|
+
var rightSubscribe = observerCreate(
|
373
|
+
function (right) {
|
374
|
+
choiceR();
|
375
|
+
choice === rightChoice && observer.onNext(right);
|
376
|
+
},
|
377
|
+
function (e) {
|
378
|
+
choiceR();
|
379
|
+
choice === rightChoice && observer.onError(e);
|
380
|
+
},
|
381
|
+
function () {
|
382
|
+
choiceR();
|
383
|
+
choice === rightChoice && observer.onCompleted();
|
353
384
|
}
|
354
|
-
|
385
|
+
);
|
355
386
|
|
356
|
-
|
357
|
-
|
358
|
-
if (choice === rightChoice) {
|
359
|
-
observer.onNext(right);
|
360
|
-
}
|
361
|
-
}, function (err) {
|
362
|
-
choiceR();
|
363
|
-
if (choice === rightChoice) {
|
364
|
-
observer.onError(err);
|
365
|
-
}
|
366
|
-
}, function () {
|
367
|
-
choiceR();
|
368
|
-
if (choice === rightChoice) {
|
369
|
-
observer.onCompleted();
|
370
|
-
}
|
371
|
-
}));
|
387
|
+
leftSubscription.setDisposable(leftSource.subscribe(leftSubscribe));
|
388
|
+
rightSubscription.setDisposable(rightSource.subscribe(rightSubscribe));
|
372
389
|
|
373
390
|
return new CompositeDisposable(leftSubscription, rightSubscription);
|
374
391
|
});
|
375
392
|
};
|
376
393
|
|
394
|
+
function amb(p, c) { return p.amb(c); }
|
395
|
+
|
377
396
|
/**
|
378
397
|
* Propagates the observable sequence or Promise that reacts first.
|
379
|
-
*
|
380
|
-
* @example
|
381
|
-
* var = Rx.Observable.amb(xs, ys, zs);
|
382
398
|
* @returns {Observable} An observable sequence that surfaces any of the given sequences, whichever reacted first.
|
383
399
|
*/
|
384
400
|
Observable.amb = function () {
|
385
|
-
var acc = observableNever(), items
|
401
|
+
var acc = observableNever(), items;
|
386
402
|
if (Array.isArray(arguments[0])) {
|
387
403
|
items = arguments[0];
|
388
404
|
} else {
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
function func(previous, current) {
|
393
|
-
return previous.amb(current);
|
405
|
+
var len = arguments.length;
|
406
|
+
items = new Array(items);
|
407
|
+
for(var i = 0; i < len; i++) { items[i] = arguments[i]; }
|
394
408
|
}
|
395
409
|
for (var i = 0, len = items.length; i < len; i++) {
|
396
|
-
acc =
|
410
|
+
acc = amb(acc, items[i]);
|
397
411
|
}
|
398
412
|
return acc;
|
399
413
|
};
|
@@ -441,25 +455,20 @@
|
|
441
455
|
});
|
442
456
|
};
|
443
457
|
|
458
|
+
function toArray(x) { return x.toArray(); }
|
459
|
+
function notEmpty(x) { return x.length > 0; }
|
460
|
+
|
444
461
|
/**
|
445
462
|
* Projects each element of an observable sequence into zero or more buffers which are produced based on element count information.
|
446
|
-
*
|
447
|
-
* @example
|
448
|
-
* var res = xs.bufferWithCount(10);
|
449
|
-
* var res = xs.bufferWithCount(10, 1);
|
450
463
|
* @param {Number} count Length of each buffer.
|
451
464
|
* @param {Number} [skip] Number of elements to skip between creation of consecutive buffers. If not provided, defaults to the count.
|
452
465
|
* @returns {Observable} An observable sequence of buffers.
|
453
466
|
*/
|
454
467
|
observableProto.bufferWithCount = function (count, skip) {
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
return x.toArray();
|
460
|
-
}).where(function (x) {
|
461
|
-
return x.length > 0;
|
462
|
-
});
|
468
|
+
typeof skip !== 'number' && (skip = count);
|
469
|
+
return this.windowWithCount(count, skip)
|
470
|
+
.flatMap(toArray)
|
471
|
+
.filter(notEmpty);
|
463
472
|
};
|
464
473
|
|
465
474
|
/**
|
@@ -617,5 +626,26 @@
|
|
617
626
|
}, this);
|
618
627
|
};
|
619
628
|
|
620
|
-
|
629
|
+
/**
|
630
|
+
* Returns an observable sequence that shares a single subscription to the underlying sequence. This observable sequence
|
631
|
+
* can be resubscribed to, even if all prior subscriptions have ended. (unlike `.publish().refCount()`)
|
632
|
+
* @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source.
|
633
|
+
*/
|
634
|
+
observableProto.singleInstance = function() {
|
635
|
+
var source = this, hasObservable = false, observable;
|
636
|
+
|
637
|
+
function getObservable() {
|
638
|
+
if (!hasObservable) {
|
639
|
+
hasObservable = true;
|
640
|
+
observable = source.finally(function() { hasObservable = false; }).publish().refCount();
|
641
|
+
}
|
642
|
+
return observable;
|
643
|
+
};
|
644
|
+
|
645
|
+
return new AnonymousObservable(function(o) {
|
646
|
+
return getObservable().subscribe(o);
|
647
|
+
});
|
648
|
+
};
|
649
|
+
|
650
|
+
return Rx;
|
621
651
|
}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rx.lite.extras.compat.min.js","sources":["rx.lite.extras.compat.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","ScheduledDisposable","scheduler","disposable","isDisposed","scheduleItem","s","self","dispose","arrayIndexOfComparer","array","item","comparer","i","len","length","HashSet","set","Observable","observableProto","prototype","observableNever","never","observableThrow","throwException","AnonymousObservable","AnonymousObserver","notificationCreateOnNext","Notification","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Observer","Subject","internals","helpers","ScheduledObserver","SerialDisposable","SingleAssignmentDisposable","CompositeDisposable","RefCountDisposable","disposableEmpty","Disposable","empty","immediateScheduler","Scheduler","immediate","addRef","defaultKeySerializer","isPromise","identity","inherits","bindCallback","isScheduler","noop","observableFromPromise","fromPromise","ArgumentOutOfRangeError","scheduleWithState","CheckedObserver","__super__","observer","_observer","_state","CheckedObserverPrototype","onNext","value","checkAccess","res","tryCatch","errorObj","thrower","e","onError","err","onCompleted","Error","ObserveOnObserver","cancel","_cancel","next","ensureActive","error","completed","checked","notifyOn","fromNotifier","handler","thisArg","handlerFunc","x","toNotifier","n","accept","asObserver","source","observeOn","subscribe","subscribeOn","m","d","setDisposable","schedule","generate","initialState","condition","iterate","resultSelector","currentThreadScheduler","o","first","scheduleRecursiveWithState","state","hasResult","result","using","resourceFactory","observableFactory","resource","exception","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","left","right","func","previous","current","acc","items","Array","isArray","arguments","push","onErrorResumeNext","second","sources","pos","subscription","cancelable","scheduleRecursive","bind","bufferWithCount","count","skip","windowWithCount","selectMany","toArray","where","Infinity","Math","abs","createWindow","q","refCountDisposable","c","shift","takeLastBuffer","defaultIfEmpty","defaultValue","found","retValue","distinct","keySelector","defaultComparer","hashSet","key"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,kBAAmB,SAAUE,EAAIR,GACrC,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,mBAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,EAAIb,GAkCpC,QAASiB,GAAoBC,EAAWC,GACtChB,KAAKe,UAAYA,EACjBf,KAAKgB,WAAaA,EAClBhB,KAAKiB,YAAa,EAGpB,QAASC,GAAaC,EAAGC,GAClBA,EAAKH,aACRG,EAAKH,YAAa,EAClBG,EAAKJ,WAAWK,WA6epB,QAASC,GAAqBC,EAAOC,EAAMC,GACzC,IAAK,GAAIC,GAAI,EAAGC,EAAMJ,EAAMK,OAAYD,EAAJD,EAASA,IAC3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IU"}
|
1
|
+
{"version":3,"file":"rx.lite.extras.compat.min.js","sources":["rx.lite.extras.compat.js"],"names":["factory","objectTypes","function","object","freeExports","exports","nodeType","freeSelf","self","Object","freeWindow","window","freeModule","module","freeGlobal","global","root","this","define","amd","Rx","require","call","exp","undefined","tryCatcher","tryCatchTarget","apply","arguments","e","errorObj","tryCatch","fn","isFunction","TypeError","thrower","ScheduledDisposable","scheduler","disposable","isDisposed","scheduleItem","s","dispose","amb","p","c","toArray","x","notEmpty","length","arrayIndexOfComparer","array","item","comparer","i","len","HashSet","set","Observable","observableProto","prototype","observableNever","never","observableThrow","AnonymousObservable","AnonymousObserver","notificationCreateOnNext","Notification","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Observer","observerCreate","create","Subject","internals","helpers","ScheduledObserver","SerialDisposable","SingleAssignmentDisposable","CompositeDisposable","RefCountDisposable","disposableEmpty","Disposable","empty","immediateScheduler","Scheduler","immediate","addRef","defaultKeySerializer","isPromise","identity","inherits","bindCallback","isScheduler","noop","observableFromPromise","fromPromise","ArgumentOutOfRangeError","scheduleWithState","CheckedObserver","__super__","observer","_observer","_state","CheckedObserverPrototype","onNext","value","checkAccess","res","onError","err","onCompleted","Error","ObserveOnObserver","cancel","_cancel","next","ensureActive","error","completed","checked","notifyOn","fromNotifier","handler","thisArg","handlerFunc","toNotifier","n","accept","asObserver","source","observeOn","subscribe","subscribeOn","m","d","setDisposable","schedule","generate","initialState","condition","iterate","resultSelector","currentThreadScheduler","o","first","scheduleRecursiveWithState","state","hasResult","result","using","resourceFactory","observableFactory","resource","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","leftSubscribe","left","rightSubscribe","right","items","acc","Array","isArray","onErrorResumeNext","second","sources","push","pos","subscription","cancelable","scheduleRecursive","current","bind","bufferWithCount","count","skip","windowWithCount","flatMap","filter","Infinity","Math","abs","createWindow","q","refCountDisposable","shift","takeLastBuffer","defaultIfEmpty","defaultValue","found","retValue","distinct","keySelector","defaultComparer","hashSet","key","singleInstance","getObservable","hasObservable","observable","finally","publish","refCount"],"mappings":";CAEE,SAAUA,GACV,GAAIC,IACFC,YAAY,EACZC,QAAU,GAIVC,EAAcH,QAAmBI,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAWN,QAAmBO,QAASA,KAAKC,QAAUD,KACtDE,EAAaT,QAAmBU,UAAWA,QAAUA,OAAOF,QAAUE,OACtEC,EAAaX,QAAmBY,UAAWA,SAAWA,OAAOP,UAAYO,OAEzEC,GADgBF,GAAcA,EAAWP,UAAYD,GAAeA,EACvDA,GAAeQ,GAA+B,gBAAVG,SAAsBA,QAAUA,OAAON,QAAUM,QAEhGC,EAAOA,EAAOF,GAAgBJ,KAAgBO,MAAQA,KAAKN,SAAYD,GAAeH,GAAYU,IAGhF,mBAAXC,SAAyBA,OAAOC,IACzCD,QAAQ,oBAAqB,SAAUE,EAAIf,GACzC,MAAOL,GAAQgB,EAAMX,EAASe,KAEL,gBAAXP,SAAuBA,QAAUA,OAAOR,UAAYD,EACpES,OAAOR,QAAUL,EAAQgB,EAAMH,OAAOR,QAASgB,QAAQ,mBAEvDL,EAAKI,GAAKpB,EAAQgB,KAAUA,EAAKI,MAEnCE,KAAKL,KAAM,SAAUD,EAAMO,EAAKH,EAAII,GAsCpC,QAASC,KACP,IACE,MAAOC,GAAeC,MAAMV,KAAMW,WAClC,MAAOC,GAEP,MADAC,GAASD,EAAIA,EACNC,GAGX,QAASC,GAASC,GAChB,IAAKC,EAAWD,GAAO,KAAM,IAAIE,WAAU,wBAE3C,OADAR,GAAiBM,EACVP,EAET,QAASU,GAAQN,GACf,KAAMA,GAGR,QAASO,GAAoBC,EAAWC,GACtCrB,KAAKoB,UAAYA,EACjBpB,KAAKqB,WAAaA,EAClBrB,KAAKsB,YAAa,EAGpB,QAASC,GAAaC,EAAGjC,GAClBA,EAAK+B,aACR/B,EAAK+B,YAAa,EAClB/B,EAAK8B,WAAWI,WA6Sp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IAAIwH,KAAKpE,GACnB4F,GAeT9I,EAAgB+I,SAAW,SAAUC,EAAatJ,GAChD,GAAIgF,GAASpH,IAEb,OADAoC,KAAaA,EAAWuJ,iBACjB,GAAI5I,GAAoB,SAAUmF,GACvC,GAAI0D,GAAU,GAAIrJ,GAAQH,EAC1B,OAAOgF,GAAOE,UAAU,SAAUxF,GAChC,GAAI+J,GAAM/J,CAEV,IAAI4J,EACF,IACEG,EAAMH,EAAY5J,GAClB,MAAOlB,GAEP,WADAsH,GAAEnC,QAAQnF,GAIdgL,EAAQ5B,KAAK6B,IAAQ3D,EAAEvC,OAAO7D,IAEhC,SAAUlB,GAAKsH,EAAEnC,QAAQnF,IAAO,WAAcsH,EAAEjC,iBAC/CjG,OAQL0C,EAAgBoJ,eAAiB,WAG/B,QAASC,KAKP,MAJKC,KACHA,GAAgB,EAChBC,EAAa7E,EAAO8E,QAAQ,WAAaF,GAAgB,IAAUG,UAAUC,YAExEH,EAPT,GAA0CA,GAAtC7E,EAASpH,KAAMgM,GAAgB,CAUnC,OAAO,IAAIjJ,GAAoB,SAASmF,GACtC,MAAO6D,KAAgBzE,UAAUY,MAI9B/H"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
|
2
|
-
(function(a){var b={"
|
2
|
+
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.lite.compat"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("rx-lite-compat")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(){try{return o.apply(this,arguments)}catch(a){return S.e=a,S}}function f(a){if(!M(a))throw new TypeError("fn must be a function");return o=a,e}function g(a){throw a}function h(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function i(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function j(a,b){return a.amb(b)}function k(a){return a.toArray()}function l(a){return a.length>0}function m(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function n(a){this.comparer=a,this.set=[]}var o,p=c.Observable,q=p.prototype,r=p.never,s=p["throw"],t=c.AnonymousObservable,u=c.AnonymousObserver,v=c.Notification.createOnNext,w=c.Notification.createOnError,x=c.Notification.createOnCompleted,y=c.Observer,z=y.create,A=c.Subject,B=c.internals,C=c.helpers,D=B.ScheduledObserver,E=c.SerialDisposable,F=c.SingleAssignmentDisposable,G=c.CompositeDisposable,H=c.RefCountDisposable,I=c.Disposable.empty,J=c.Scheduler.immediate,K=(C.defaultKeySerializer,c.internals.addRef),L=(C.identity,C.isPromise),M=C.isFunction,N=B.inherits,O=B.bindCallback,P=(C.noop,c.Scheduler.isScheduler),Q=p.fromPromise,R=c.ArgumentOutOfRangeError,S={e:{}};h.prototype.dispose=function(){this.scheduler.scheduleWithState(this,i)};var T=function(a){function b(b){a.call(this),this._observer=b,this._state=0}N(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=f(this._observer.onNext).call(this._observer,a);this._state=0,b===S&&g(b.e)},c.onError=function(a){this.checkAccess();var b=f(this._observer.onError).call(this._observer,a);this._state=2,b===S&&g(b.e)},c.onCompleted=function(){this.checkAccess();var a=f(this._observer.onCompleted).call(this._observer);this._state=2,a===S&&g(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(y),U=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return N(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}(D);y.prototype.checked=function(){return new T(this)},y.notifyOn=function(a){return new U(a,this)},y.fromNotifier=function(a,b){var c=O(a,b,1);return new u(function(a){return c(v(a))},function(a){return c(w(a))},function(){return c(x())})},y.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},y.prototype.asObserver=function(){var a=this;return new u(function(b){a.onNext(b)},function(b){a.onError(b)},function(){a.onCompleted()})},q.observeOn=function(a){var b=this;return new t(function(c){return b.subscribe(new U(a,c))},b)},q.subscribeOn=function(a){var b=this;return new t(function(c){var d=new F,e=new E;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new h(a,b.subscribe(c)))})),e},b)},p.generate=function(a,b,c,d,e){return P(e)||(e=currentThreadScheduler),new t(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})},p.using=function(a,b){return new t(function(c){var d=I,e=f(a)();if(e===S)return new G(s(e.e).subscribe(c),d);e&&(d=e);var g=f(b)(e);return g===S?new G(s(g.e).subscribe(c),d):new G(g.subscribe(c),d)})},q.amb=function(a){var b=this;return new t(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new F,j=new F;L(a)&&(a=Q(a));var k=z(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()}),l=z(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()});return i.setDisposable(b.subscribe(k)),j.setDisposable(a.subscribe(l)),new G(i,j)})},p.amb=function(){var a,b=r();if(Array.isArray(arguments[0]))a=arguments[0];else{var c=arguments.length;a=new Array(a);for(var d=0;c>d;d++)a[d]=arguments[d]}for(var d=0,c=a.length;c>d;d++)b=j(b,a[d]);return b},q.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return V([this,a])};var V=p.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 t(function(b){var c=0,d=new E,e=J.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],L(f)&&(f=Q(f)),g=new F,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new G(d,e)})};return q.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).flatMap(k).filter(l)},q.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new R;if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new R;return new t(function(d){function e(){var a=new A;i.push(a),d.onNext(K(a,g))}var f=new F,g=new H(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)},q.takeLastBuffer=function(a){var b=this;return new t(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)},q.defaultIfEmpty=function(a){var b=this;return a===d&&(a=null),new t(function(c){var d=!1;return b.subscribe(function(a){d=!0,c.onNext(a)},function(a){c.onError(a)},function(){!d&&c.onNext(a),c.onCompleted()})},b)},n.prototype.push=function(a){var b=-1===m(this.set,a,this.comparer);return b&&this.set.push(a),b},q.distinct=function(a,b){var c=this;return b||(b=defaultComparer),new t(function(d){var e=new n(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)},q.singleInstance=function(){function a(){return d||(d=!0,b=c.finally(function(){d=!1}).publish().refCount()),b}var b,c=this,d=!1;return new t(function(b){return a().subscribe(b)})},c});
|
3
3
|
//# sourceMappingURL=rx.lite.extras.compat.map
|
@@ -1,48 +1,45 @@
|
|
1
1
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
|
2
2
|
|
3
3
|
;(function (factory) {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
'number': false,
|
9
|
-
'string': false,
|
10
|
-
'undefined': false
|
11
|
-
};
|
4
|
+
var objectTypes = {
|
5
|
+
'function': true,
|
6
|
+
'object': true
|
7
|
+
};
|
12
8
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
var
|
10
|
+
freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
|
11
|
+
freeSelf = objectTypes[typeof self] && self.Object && self,
|
12
|
+
freeWindow = objectTypes[typeof window] && window && window.Object && window,
|
13
|
+
freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
|
14
|
+
moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
|
15
|
+
freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
|
18
16
|
|
19
|
-
|
20
|
-
root = freeGlobal;
|
21
|
-
}
|
17
|
+
var root = root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
|
22
18
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
19
|
+
// Because of build optimizers
|
20
|
+
if (typeof define === 'function' && define.amd) {
|
21
|
+
define(['./rx.lite'], function (Rx, exports) {
|
22
|
+
return factory(root, exports, Rx);
|
23
|
+
});
|
24
|
+
} else if (typeof module === 'object' && module && module.exports === freeExports) {
|
25
|
+
module.exports = factory(root, module.exports, require('rx-lite'));
|
26
|
+
} else {
|
27
|
+
root.Rx = factory(root, {}, root.Rx);
|
28
|
+
}
|
33
29
|
}.call(this, function (root, exp, Rx, undefined) {
|
34
30
|
|
35
31
|
// References
|
36
32
|
var Observable = Rx.Observable,
|
37
33
|
observableProto = Observable.prototype,
|
38
34
|
observableNever = Observable.never,
|
39
|
-
observableThrow = Observable
|
35
|
+
observableThrow = Observable['throw'],
|
40
36
|
AnonymousObservable = Rx.AnonymousObservable,
|
41
37
|
AnonymousObserver = Rx.AnonymousObserver,
|
42
38
|
notificationCreateOnNext = Rx.Notification.createOnNext,
|
43
39
|
notificationCreateOnError = Rx.Notification.createOnError,
|
44
40
|
notificationCreateOnCompleted = Rx.Notification.createOnCompleted,
|
45
41
|
Observer = Rx.Observer,
|
42
|
+
observerCreate = Observer.create,
|
46
43
|
Subject = Rx.Subject,
|
47
44
|
internals = Rx.internals,
|
48
45
|
helpers = Rx.helpers,
|
@@ -57,6 +54,7 @@
|
|
57
54
|
addRef = Rx.internals.addRef,
|
58
55
|
identity = helpers.identity,
|
59
56
|
isPromise = helpers.isPromise,
|
57
|
+
isFunction = helpers.isFunction,
|
60
58
|
inherits = internals.inherits,
|
61
59
|
bindCallback = internals.bindCallback,
|
62
60
|
noop = helpers.noop,
|
@@ -64,6 +62,25 @@
|
|
64
62
|
observableFromPromise = Observable.fromPromise,
|
65
63
|
ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError;
|
66
64
|
|
65
|
+
var errorObj = {e: {}};
|
66
|
+
var tryCatchTarget;
|
67
|
+
function tryCatcher() {
|
68
|
+
try {
|
69
|
+
return tryCatchTarget.apply(this, arguments);
|
70
|
+
} catch (e) {
|
71
|
+
errorObj.e = e;
|
72
|
+
return errorObj;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
function tryCatch(fn) {
|
76
|
+
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
|
77
|
+
tryCatchTarget = fn;
|
78
|
+
return tryCatcher;
|
79
|
+
}
|
80
|
+
function thrower(e) {
|
81
|
+
throw e;
|
82
|
+
}
|
83
|
+
|
67
84
|
function ScheduledDisposable(scheduler, disposable) {
|
68
85
|
this.scheduler = scheduler;
|
69
86
|
this.disposable = disposable;
|
@@ -294,16 +311,18 @@
|
|
294
311
|
* @returns {Observable} An observable sequence whose lifetime controls the lifetime of the dependent resource object.
|
295
312
|
*/
|
296
313
|
Observable.using = function (resourceFactory, observableFactory) {
|
297
|
-
return new AnonymousObservable(function (
|
298
|
-
var disposable = disposableEmpty
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
source = observableFactory(resource);
|
303
|
-
} catch (exception) {
|
304
|
-
return new CompositeDisposable(observableThrow(exception).subscribe(observer), disposable);
|
314
|
+
return new AnonymousObservable(function (o) {
|
315
|
+
var disposable = disposableEmpty;
|
316
|
+
var resource = tryCatch(resourceFactory)();
|
317
|
+
if (resource === errorObj) {
|
318
|
+
return new CompositeDisposable(observableThrow(resource.e).subscribe(o), disposable);
|
305
319
|
}
|
306
|
-
|
320
|
+
resource && (disposable = resource);
|
321
|
+
var source = tryCatch(observableFactory)(resource);
|
322
|
+
if (source === errorObj) {
|
323
|
+
return new CompositeDisposable(observableThrow(source.e).subscribe(o), disposable);
|
324
|
+
}
|
325
|
+
return new CompositeDisposable(source.subscribe(o), disposable);
|
307
326
|
});
|
308
327
|
};
|
309
328
|
|
@@ -336,64 +355,59 @@
|
|
336
355
|
}
|
337
356
|
}
|
338
357
|
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
observer.onNext(left);
|
343
|
-
}
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
358
|
+
var leftSubscribe = observerCreate(
|
359
|
+
function (left) {
|
360
|
+
choiceL();
|
361
|
+
choice === leftChoice && observer.onNext(left);
|
362
|
+
},
|
363
|
+
function (e) {
|
364
|
+
choiceL();
|
365
|
+
choice === leftChoice && observer.onError(e);
|
366
|
+
},
|
367
|
+
function () {
|
368
|
+
choiceL();
|
369
|
+
choice === leftChoice && observer.onCompleted();
|
348
370
|
}
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
371
|
+
);
|
372
|
+
var rightSubscribe = observerCreate(
|
373
|
+
function (right) {
|
374
|
+
choiceR();
|
375
|
+
choice === rightChoice && observer.onNext(right);
|
376
|
+
},
|
377
|
+
function (e) {
|
378
|
+
choiceR();
|
379
|
+
choice === rightChoice && observer.onError(e);
|
380
|
+
},
|
381
|
+
function () {
|
382
|
+
choiceR();
|
383
|
+
choice === rightChoice && observer.onCompleted();
|
353
384
|
}
|
354
|
-
|
385
|
+
);
|
355
386
|
|
356
|
-
|
357
|
-
|
358
|
-
if (choice === rightChoice) {
|
359
|
-
observer.onNext(right);
|
360
|
-
}
|
361
|
-
}, function (err) {
|
362
|
-
choiceR();
|
363
|
-
if (choice === rightChoice) {
|
364
|
-
observer.onError(err);
|
365
|
-
}
|
366
|
-
}, function () {
|
367
|
-
choiceR();
|
368
|
-
if (choice === rightChoice) {
|
369
|
-
observer.onCompleted();
|
370
|
-
}
|
371
|
-
}));
|
387
|
+
leftSubscription.setDisposable(leftSource.subscribe(leftSubscribe));
|
388
|
+
rightSubscription.setDisposable(rightSource.subscribe(rightSubscribe));
|
372
389
|
|
373
390
|
return new CompositeDisposable(leftSubscription, rightSubscription);
|
374
391
|
});
|
375
392
|
};
|
376
393
|
|
394
|
+
function amb(p, c) { return p.amb(c); }
|
395
|
+
|
377
396
|
/**
|
378
397
|
* Propagates the observable sequence or Promise that reacts first.
|
379
|
-
*
|
380
|
-
* @example
|
381
|
-
* var = Rx.Observable.amb(xs, ys, zs);
|
382
398
|
* @returns {Observable} An observable sequence that surfaces any of the given sequences, whichever reacted first.
|
383
399
|
*/
|
384
400
|
Observable.amb = function () {
|
385
|
-
var acc = observableNever(), items
|
401
|
+
var acc = observableNever(), items;
|
386
402
|
if (Array.isArray(arguments[0])) {
|
387
403
|
items = arguments[0];
|
388
404
|
} else {
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
function func(previous, current) {
|
393
|
-
return previous.amb(current);
|
405
|
+
var len = arguments.length;
|
406
|
+
items = new Array(items);
|
407
|
+
for(var i = 0; i < len; i++) { items[i] = arguments[i]; }
|
394
408
|
}
|
395
409
|
for (var i = 0, len = items.length; i < len; i++) {
|
396
|
-
acc =
|
410
|
+
acc = amb(acc, items[i]);
|
397
411
|
}
|
398
412
|
return acc;
|
399
413
|
};
|
@@ -441,25 +455,20 @@
|
|
441
455
|
});
|
442
456
|
};
|
443
457
|
|
458
|
+
function toArray(x) { return x.toArray(); }
|
459
|
+
function notEmpty(x) { return x.length > 0; }
|
460
|
+
|
444
461
|
/**
|
445
462
|
* Projects each element of an observable sequence into zero or more buffers which are produced based on element count information.
|
446
|
-
*
|
447
|
-
* @example
|
448
|
-
* var res = xs.bufferWithCount(10);
|
449
|
-
* var res = xs.bufferWithCount(10, 1);
|
450
463
|
* @param {Number} count Length of each buffer.
|
451
464
|
* @param {Number} [skip] Number of elements to skip between creation of consecutive buffers. If not provided, defaults to the count.
|
452
465
|
* @returns {Observable} An observable sequence of buffers.
|
453
466
|
*/
|
454
467
|
observableProto.bufferWithCount = function (count, skip) {
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
return x.toArray();
|
460
|
-
}).where(function (x) {
|
461
|
-
return x.length > 0;
|
462
|
-
});
|
468
|
+
typeof skip !== 'number' && (skip = count);
|
469
|
+
return this.windowWithCount(count, skip)
|
470
|
+
.flatMap(toArray)
|
471
|
+
.filter(notEmpty);
|
463
472
|
};
|
464
473
|
|
465
474
|
/**
|
@@ -617,5 +626,26 @@
|
|
617
626
|
}, this);
|
618
627
|
};
|
619
628
|
|
620
|
-
|
629
|
+
/**
|
630
|
+
* Returns an observable sequence that shares a single subscription to the underlying sequence. This observable sequence
|
631
|
+
* can be resubscribed to, even if all prior subscriptions have ended. (unlike `.publish().refCount()`)
|
632
|
+
* @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source.
|
633
|
+
*/
|
634
|
+
observableProto.singleInstance = function() {
|
635
|
+
var source = this, hasObservable = false, observable;
|
636
|
+
|
637
|
+
function getObservable() {
|
638
|
+
if (!hasObservable) {
|
639
|
+
hasObservable = true;
|
640
|
+
observable = source.finally(function() { hasObservable = false; }).publish().refCount();
|
641
|
+
}
|
642
|
+
return observable;
|
643
|
+
};
|
644
|
+
|
645
|
+
return new AnonymousObservable(function(o) {
|
646
|
+
return getObservable().subscribe(o);
|
647
|
+
});
|
648
|
+
};
|
649
|
+
|
650
|
+
return Rx;
|
621
651
|
}));
|