rxjs-rails 2.4.1 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rxjs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/rx.aggregates.js +15 -19
  4. data/vendor/assets/javascripts/rx.aggregates.map +1 -1
  5. data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
  6. data/vendor/assets/javascripts/rx.all.compat.js +1014 -566
  7. data/vendor/assets/javascripts/rx.all.compat.map +1 -1
  8. data/vendor/assets/javascripts/rx.all.compat.min.js +4 -4
  9. data/vendor/assets/javascripts/rx.all.js +1009 -563
  10. data/vendor/assets/javascripts/rx.all.map +1 -1
  11. data/vendor/assets/javascripts/rx.all.min.js +4 -4
  12. data/vendor/assets/javascripts/rx.async.compat.js +17 -15
  13. data/vendor/assets/javascripts/rx.async.compat.map +1 -1
  14. data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
  15. data/vendor/assets/javascripts/rx.async.js +17 -15
  16. data/vendor/assets/javascripts/rx.async.map +1 -1
  17. data/vendor/assets/javascripts/rx.async.min.js +1 -1
  18. data/vendor/assets/javascripts/rx.backpressure.js +53 -43
  19. data/vendor/assets/javascripts/rx.backpressure.map +1 -1
  20. data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
  21. data/vendor/assets/javascripts/rx.binding.js +31 -12
  22. data/vendor/assets/javascripts/rx.binding.map +1 -1
  23. data/vendor/assets/javascripts/rx.binding.min.js +1 -1
  24. data/vendor/assets/javascripts/rx.coincidence.js +3 -2
  25. data/vendor/assets/javascripts/rx.coincidence.map +1 -1
  26. data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
  27. data/vendor/assets/javascripts/rx.compat.js +821 -444
  28. data/vendor/assets/javascripts/rx.compat.map +1 -1
  29. data/vendor/assets/javascripts/rx.compat.min.js +2 -2
  30. data/vendor/assets/javascripts/rx.experimental.js +2 -9
  31. data/vendor/assets/javascripts/rx.experimental.map +1 -1
  32. data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
  33. data/vendor/assets/javascripts/rx.joinpatterns.js +14 -22
  34. data/vendor/assets/javascripts/rx.joinpatterns.map +1 -1
  35. data/vendor/assets/javascripts/rx.joinpatterns.min.js +1 -1
  36. data/vendor/assets/javascripts/rx.js +817 -442
  37. data/vendor/assets/javascripts/rx.lite.compat.js +897 -443
  38. data/vendor/assets/javascripts/rx.lite.compat.map +1 -1
  39. data/vendor/assets/javascripts/rx.lite.compat.min.js +3 -2
  40. data/vendor/assets/javascripts/rx.lite.extras.compat.js +621 -0
  41. data/vendor/assets/javascripts/rx.lite.extras.compat.map +1 -0
  42. data/vendor/assets/javascripts/rx.lite.extras.compat.min.js +3 -0
  43. data/vendor/assets/javascripts/rx.lite.extras.js +53 -76
  44. data/vendor/assets/javascripts/rx.lite.extras.map +1 -1
  45. data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
  46. data/vendor/assets/javascripts/rx.lite.js +898 -444
  47. data/vendor/assets/javascripts/rx.lite.map +1 -1
  48. data/vendor/assets/javascripts/rx.lite.min.js +3 -2
  49. data/vendor/assets/javascripts/rx.map +1 -1
  50. data/vendor/assets/javascripts/rx.min.js +2 -2
  51. data/vendor/assets/javascripts/rx.testing.js +10 -11
  52. data/vendor/assets/javascripts/rx.testing.map +1 -1
  53. data/vendor/assets/javascripts/rx.testing.min.js +1 -1
  54. data/vendor/assets/javascripts/rx.time.js +80 -40
  55. data/vendor/assets/javascripts/rx.time.map +1 -1
  56. data/vendor/assets/javascripts/rx.time.min.js +1 -1
  57. data/vendor/assets/javascripts/rx.virtualtime.js +6 -13
  58. data/vendor/assets/javascripts/rx.virtualtime.map +1 -1
  59. data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
  60. metadata +6 -3
@@ -1 +1 @@
1
- {"version":3,"file":"rx.lite.compat.min.js","sources":["rx.lite.compat.js"],"names":["undefined","checkDisposed","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","thrower","arrayInitialize","count","factory","Array","IndexedItem","id","this","ToArrayObserver","observer","isStopped","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","FromArraySink","parent","observableOf","scheduler","array","FromArrayObservable","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","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","apply","isDone","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","isScheduler","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","asArray","arguments","not","isFn","argumentOutOfRange","longStackSupport","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","getDisposable","Function","that","args","bound","F","concat","forEach","T","k","O","kValue","boxedString","splitString","fun","thisp","filter","results","t","isArray","searchElement","n","Infinity","keys","hasDontEnumBug","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","ScheduledItem","RefCountDisposable","InnerDisposable","disposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","schedulePeriodic","setInterval","clearInterval","scheduleMethod","immediateScheduler","immediate","scheduleNow","notSupported","currentThreadScheduler","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","data","substring","handleId","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","_next","Enumerable","_iterator","currentItem","currentValue","catchError","lastException","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","observableProto","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","observerCreate","AnonymousObserver","AbstractObserver","__super__","notImplemented","completed","fail","_onNext","_onError","_onCompleted","Observable","_subscribe","oldOnError","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","ToArrayObservable","toArray","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","FromObservable","iterable","mapper","sink","FromSink","run","loopRecursive","list","pow","charAt","from","mapFn","observableFromArray","fromArray","never","ofWithScheduler","pairs","RangeObservable","RangeSink","range","observableReturn","throwError","throwException","catchException","handlerOrSecond","observableCatch","combineLatest","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeObservable","m","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","RangeError","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","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","sample","throttleLatest","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","throttleFirst","windowDuration","duration","lastOnNext","PausableObservable","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","controlled","transduce","transducer","transformForObserver","init","step","obs","input","xform","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","createRemovableDisposable","so","_trim","windowSize","MAX_VALUE","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAMC,IACtE,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAAQC,EAAI,EAAGC,EAAMH,EAAII,OAAYD,EAAJD,EAASA,IAAOD,EAAEI,KAAKL,EAAIE,GAAO,OAAOD,GAe7G,QAASK,GAAmBC,EAAOC,GAG/B,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ,EAAOK,KAAK,KAAON,GAAuB,KAC/DL,GAAMG,MAAQS,EAAkBF,IAItC,QAASE,GAAkBC,GAGzB,IAAK,GAFDC,GAAQD,EAAYE,MAAM,MAC1BC,KACKrB,EAAI,EAAGC,EAAMkB,EAAMjB,OAAYD,EAAJD,EAASA,IAAK,CAChD,GAAIsB,GAAOH,EAAMnB,EAEZuB,GAAgBD,IAAUE,EAAYF,KAASA,GAClDD,EAAalB,KAAKmB,GAGtB,MAAOD,GAAaL,KAAK,MAG3B,QAASO,GAAgBE,GACvB,GAAIC,GAAwBC,EAAyBF,EACrD,KAAKC,EACH,OAAO,CAET,IAAIE,GAAWF,EAAsB,GAAIG,EAAaH,EAAsB,EAE5E,OAAOE,KAAaE,IAClBD,GAAcE,IACAC,IAAdH,EAGJ,QAASL,GAAYC,GACnB,MAA4C,KAArCA,EAAUhB,QAAQ,gBACY,KAAnCgB,EAAUhB,QAAQ,aAGtB,QAASwB,KACP,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AGtxB,OAAYD,EAAJD,EAASA,IAAK,CAC9E,GAAIgH,GAAWwqB,EAAGxxB,EAClBgH,GAASgD,cACThD,EAAS2c,eAEX7c,KAAKuqB,UAAUnxB,OAAS,IAK1B0X,QAAS,WACP9Q,KAAKpH,YAAa,EAClBoH,KAAKuqB,UAAY,QAIdjE,GACPxK,GAKFjR,IAAGogB,OAAU,SAAU1P,GAGrB,QAAS0P,KACP1P,EAAUpf,KAAK6D,MAajB,MAhBAyN,IAASwd,EAAQ1P,GASjB0P,EAAOjuB,UAAUwrB,MAAQ,WAAcxoB,KAAK4C,QAAO,IAKnDqoB,EAAOjuB,UAAUyrB,OAAS,WAAczoB,KAAK4C,QAAO,IAE7CqoB,GACP5Q,IAEmB,kBAAV6Q,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzEpqB,EAAK8J,GAAKA,GAEVqgB,OAAO,WACL,MAAOrgB,OAEAR,GAAeG,EAEpBE,GACDF,EAAWF,QAAUO,IAAIA,GAAKA,GAE/BR,EAAYQ,GAAKA,GAInB9J,EAAK8J,GAAKA,EAIZ,IAAI3P,IAAcC,MAElBgB,KAAK6D"}
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","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,EAAMs0B,EAAGr0B,OAAYD,EAAJI,EAASA,IAAK,CAC9E,GAAIsH,GAAW4sB,EAAGl0B,EAClBsH,GAASmD,cACTnD,EAASkd,eAEX/d,KAAKstB,UAAUl0B,OAAS,IAK1B8Y,QAAS,WACPlS,KAAKgS,YAAa,EAClBhS,KAAKstB,UAAY,QAIdxE,GACP/L,GAKFpR,IAAGoiB,OAAU,SAAUtR,GAGrB,QAASsR,KACPtR,EAAUlgB,KAAKyD,MAajB,MAhBA2O,IAASof,EAAQtR,GASjBsR,EAAO3wB,UAAU6tB,MAAQ,WAAcjrB,KAAK0D,QAAO,IAKnDqqB,EAAO3wB,UAAU8tB,OAAS,WAAclrB,KAAK0D,QAAO,IAE7CqqB,GACPxS,IAEmB,kBAAVyS,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzEvsB,EAAKiK,GAAKA,GAEVqiB,OAAO,WACL,MAAOriB,OAEAR,GAAeG,GAEpBE,IACDF,GAAWF,QAAUO,IAAIA,GAAKA,GAE/BR,EAAYQ,GAAKA,GAInBjK,EAAKiK,GAAKA,EAIZ,IAAItQ,IAAcC,MAElBiB,KAAKyD"}
@@ -1,4 +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){if(a.isDisposed)throw new Error(lb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(mb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(qb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+qb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=i(a);if(!b)return!1;var c=b[0],d=b[1];return c===ob&&d>=pb&&pd>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(mb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=i(c);if(!d)return;return ob=d[0],d[1]}}function i(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 j(a){var b=[];if(!Sb(a))return b;Rb.nonEnumArgs&&a.length&&Tb(a)&&(a=Vb.call(a));var c=Rb.enumPrototypes&&"function"==typeof a,d=Rb.enumErrorProps&&(a===Mb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Rb.nonEnumShadows&&a!==Nb){var f=a.constructor,g=-1,h=yb;if(a===(f&&f.prototype))var i=a===Ob?Ib:a===Mb?Db:Jb.call(a),j=Qb[i];for(;++g<h;)e=xb[g],j&&j[e]||!Kb.call(a,e)||b.push(e)}return b}function k(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 l(a,b){return k(a,b,j)}function m(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function n(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=Jb.call(a),h=Jb.call(b);if(g==zb&&(g=Gb),h==zb&&(h=Gb),g!=h)return!1;switch(g){case Bb:case Cb:return+a==+b;case Fb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Hb:case Ib:return a==String(b)}var i=g==Ab;if(!i){if(g!=Gb||!Rb.nodeClass&&(m(a)||m(b)))return!1;var j=!Rb.argsObject&&Tb(a)?Object:a.constructor,k=!Rb.argsObject&&Tb(b)?Object:b.constructor;if(!(j==k||Kb.call(a,"constructor")&&Kb.call(b,"constructor")||jb(j)&&j instanceof j&&jb(k)&&k instanceof k||!("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=n(a[p],r,c,d)))break}}else l(b,function(b,e,f){return Kb.call(f,e)?(p++,q=Kb.call(a,e)&&n(a[e],b,c,d)):void 0}),q&&l(a,function(a,b,c){return Kb.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function o(a){throw a}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(a){this.observer=a,this.a=[],this.isStopped=!1}function t(){this._s=s}function u(){this._s=s,this._l=s.length,this._i=0}function v(a){this._a=a}function w(a){this._a=a,this._l=A(a),this._i=0}function x(a){return"number"==typeof a&&X.isFinite(a)}function y(b){var c,d=b[rb];if(!d&&"string"==typeof b)return c=new t(b),c[rb]();if(!d&&b.length!==a)return c=new v(b),c[rb]();if(!d)throw new TypeError("Object is not iterable");return b[rb]()}function z(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function A(a){var b=+a.length;return isNaN(b)?0:0!==b&&x(b)?(b=z(b)*Math.floor(Math.abs(b)),0>=b?0:b>Nc?Nc:b):b}function B(a,b){this.observer=a,this.parent=b}function C(a,b){return new Pc(b,a)}function D(a,b){return new hd(function(c){var d=new fc,e=new gc;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)}ib(d)&&(d=ad(d));var g=new fc;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function E(a,b){var c=this;return new hd(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function F(){return!1}function G(){return[]}function H(a,b,c){var d=wb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return ib(e)&&(e=ad(e)),(ub(e)||tb(e))&&(e=Oc(e)),e}).concatAll()}function I(a,b,c){this.observer=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}function J(a,b,c){var d=wb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return ib(e)&&(e=ad(e)),(ub(e)||tb(e))&&(e=Oc(e)),e}).mergeAll()}function K(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}function L(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=X.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 M(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),dc(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(L(a))};return a.attachEvent("on"+b,d),dc(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,dc(function(){a["on"+b]=null})}function N(a,b,c){var d=new ac;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(N(a.item(e),b,c));else a&&d.add(M(a,b,c));return d}function O(a,b){return new hd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function P(a,b,c){return new hd(function(d){var e=a,f=jc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function Q(a,b){return new hd(function(c){return b.scheduleWithRelative(jc(a),function(){c.onNext(0),c.onCompleted()})})}function R(a,b,c){return a===b?new hd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Jc(function(){return P(c.now()+a,b,c)})}function S(a,b,c){return new hd(function(d){var e,f=!1,g=new gc,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new fc,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new ac(e,g)},a)}function T(a,b,c){return Jc(function(){return S(a,b-c.now(),c)})}function U(a,b){return new hd(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new ac(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}function V(a,b,c){return new hd(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(db))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new ac(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var W={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},X=W[typeof window]&&window||this,Y=W[typeof exports]&&exports&&!exports.nodeType&&exports,Z=W[typeof module]&&module&&!module.nodeType&&module,$=Z&&Z.exports===Y&&Y,_=W[typeof global]&&global;!_||_.global!==_&&_.window!==_||(X=_);var ab={internals:{},config:{Promise:X.Promise},helpers:{}},bb=ab.helpers.noop=function(){},cb=(ab.helpers.notDefined=function(a){return"undefined"==typeof a},ab.helpers.isScheduler=function(a){return a instanceof ab.Scheduler}),db=ab.helpers.identity=function(a){return a},eb=(ab.helpers.pluck=function(a){return function(b){return b[a]}},ab.helpers.just=function(a){return function(){return a}},ab.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),fb=ab.helpers.defaultComparer=function(a,b){return Ub(a,b)},gb=ab.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},hb=(ab.helpers.defaultKeySerializer=function(a){return a.toString()},ab.helpers.defaultError=function(a){throw a}),ib=ab.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},jb=(ab.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},ab.helpers.not=function(a){return!a},ab.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Jb.call(a)}),a}()),kb="Argument out of range",lb="Object has been disposed";ab.config.longStackSupport=!1;var mb=!1;try{throw new Error}catch(nb){mb=!!nb.stack}var ob,pb=h(),qb="From previous event:",rb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";X.Set&&"function"==typeof(new X.Set)["@@iterator"]&&(rb="@@iterator");var sb=ab.doneEnumerator={done:!0,value:a},tb=ab.helpers.isIterable=function(b){return b[rb]!==a},ub=ab.helpers.isArrayLike=function(b){return b&&b.length!==a};ab.helpers.iterator=rb;var vb,wb=ab.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},xb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],yb=xb.length,zb="[object Arguments]",Ab="[object Array]",Bb="[object Boolean]",Cb="[object Date]",Db="[object Error]",Eb="[object Function]",Fb="[object Number]",Gb="[object Object]",Hb="[object RegExp]",Ib="[object String]",Jb=Object.prototype.toString,Kb=Object.prototype.hasOwnProperty,Lb=Jb.call(arguments)==zb,Mb=Error.prototype,Nb=Object.prototype,Ob=String.prototype,Pb=Nb.propertyIsEnumerable;try{vb=!(Jb.call(document)==Gb&&!({toString:0}+""))}catch(nb){vb=!0}var Qb={};Qb[Ab]=Qb[Cb]=Qb[Fb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Qb[Bb]=Qb[Ib]={constructor:!0,toString:!0,valueOf:!0},Qb[Db]=Qb[Eb]=Qb[Hb]={constructor:!0,toString:!0},Qb[Gb]={constructor:!0};var Rb={};!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);Rb.enumErrorProps=Pb.call(Mb,"message")||Pb.call(Mb,"name"),Rb.enumPrototypes=Pb.call(a,"prototype"),Rb.nonEnumArgs=0!=c,Rb.nonEnumShadows=!/valueOf/.test(b)}(1);var Sb=ab.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Tb=function(a){return a&&"object"==typeof a?Jb.call(a)==zb:!1};Lb||(Tb=function(a){return a&&"object"==typeof a?Kb.call(a,"callee"):!1});{var Ub=ab.internals.isEqual=function(a,b){return n(a,b,[],[])},Vb=({}.hasOwnProperty,Array.prototype.slice),Wb=this.inherits=ab.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Xb=ab.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]}};ab.internals.addRef=function(a,b){return new hd(function(c){return new ac(b.getDisposable(),a.subscribe(c))})}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Vb.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(Vb.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(Vb.call(arguments)))};return d}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}});var Yb=Object("a"),Zb="a"!=Yb[0]||!(0 in Yb);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=Zb&&{}.toString.call(this)==Ib?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=Eb)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=Zb&&{}.toString.call(this)==Ib?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=Eb)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return{}.toString.call(a)==Ab}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),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;yb>e;e++)a.call(c,xb[e])&&f.push(xb[e]);return f}}()),q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var $b=ab.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},_b=$b.prototype;_b.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},_b.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)}}},_b.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)}}},_b.peek=function(){return this.items[0].value},_b.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},_b.dequeue=function(){var a=this.peek();return this.removeAt(0),a},_b.enqueue=function(a){var b=this.length++;this.items[b]=new q($b.count++,a),this.percolate(b)},_b.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},$b.count=0;var ac=ab.CompositeDisposable=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]}this.disposables=a,this.isDisposed=!1,this.length=a.length},bc=ac.prototype;bc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},bc.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},bc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=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 cc=ab.Disposable=function(a){this.isDisposed=!1,this.action=a||bb};cc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var dc=cc.create=function(a){return new cc(a)},ec=cc.empty={dispose:bb},fc=ab.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),gc=ab.SerialDisposable=fc,hc=(ab.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?ec:new a(this)},b}(),ab.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||gb,this.disposable=new fc});hc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},hc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},hc.prototype.isCancelled=function(){return this.disposable.isDisposed},hc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var ic=ab.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),ec}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=eb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),jc=ic.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new ac,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),ec});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new ac,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),ec});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(ic.prototype),function(){ic.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},ic.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof X.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=X.setInterval(function(){d=c(d)},b);return dc(function(){X.clearInterval(e)})}}(ic.prototype);var kc,lc=ic.immediate=function(){function a(a,b){return b(this,a)}function b(){throw new Error("Not supported")}return new ic(eb,a,b,b)}(),mc=ic.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();b.isCancelled()||!b.isCancelled()&&b.invoke()}}function b(b,c){var e=new hc(this,b,c,this.now());if(d)d.enqueue(e);else{d=new $b(4),d.enqueue(e);try{a(d)}catch(f){throw f}finally{d=null}}return e.disposable}function c(){throw new Error("Not supported")}var d,e=new ic(eb,b,c,c);return e.scheduleRequired=function(){return!d},e.ensureTrampoline=function(a){d?a():this.schedule(a)},e}(),nc=(ab.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new fc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),bb),oc=function(){var a,b=bb;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!X.setTimeout)throw new Error("No concurrency detected!");a=X.setTimeout,b=X.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),pc=oc.setTimeout,qc=oc.clearTimeout;!function(){function a(){if(!X.postMessage||X.importScripts)return!1;var a=!1,b=X.onmessage;return X.onmessage=function(){a=!0},X.postMessage("","*"),X.onmessage=b,a}var b=RegExp("^"+String(Jb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=_&&$&&_.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=_&&$&&_.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)kc=c,nc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))kc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};X.addEventListener?X.addEventListener("message",h,!1):X.attachEvent("onmessage",h,!1),kc=function(a){var b=g++;f[b]=a,X.postMessage(e+b,"*")}}else if(X.MessageChannel){var i=new X.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},kc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in X&&"onreadystatechange"in X.document.createElement("script")?kc=function(a){var b=X.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},X.document.documentElement.appendChild(b)}:(kc=function(a){return pc(a,0)},nc=qc)}();var rc=ic.timeout=function(){function a(a,b){var c=this,d=new fc,e=kc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new ac(d,dc(function(){nc(e)}))}function b(a,b,c){var d=this,e=ic.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new fc,g=pc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new ac(f,dc(function(){qc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new ic(eb,a,b,c)}(),sc=ab.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return cb(a)||(a=lc),new hd(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),tc=sc.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new sc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),uc=sc.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new sc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),vc=sc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new sc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),wc=ab.internals.Enumerator=function(a){this._next=a};wc.prototype.next=function(){return this._next()},wc.prototype[rb]=function(){return this};var xc=ab.internals.Enumerable=function(a){this._iterator=a};xc.prototype[rb]=function(){return this._iterator()},xc.prototype.concat=function(){var a=this;return new hd(function(b){var c,d=a[rb](),e=new gc,f=lc.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;ib(h)&&(h=ad(h));var i=new fc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new ac(e,f,dc(function(){c=!0}))})},xc.prototype.catchError=function(){var a=this;return new hd(function(b){var c,d=a[rb](),e=new gc,f=lc.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;ib(i)&&(i=ad(i));var j=new fc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new ac(e,f,dc(function(){c=!0}))})},xc.prototype.catchErrorWhen=function(a){var b=this;return new hd(function(c){var d,e,f=new kd,g=new kd,h=a(f),i=h.subscribe(g),j=b[rb](),k=new gc,l=lc.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;ib(i)&&(i=ad(i));var l=new fc,m=new fc;k.setDisposable(new ac(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new ac(i,k,l,dc(function(){d=!0}))})};var yc,zc=xc.repeat=function(a,b){return null==b&&(b=-1),new xc(function(){var c=b;return new wc(function(){return 0===c?sb:(c>0&&c--,{done:!1,value:a})})})},Ac=xc.of=function(a,b,c){if(b)var d=wb(b,c,3);return new xc(function(){var c=-1;return new wc(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:sb})})},Bc=ab.Observer=function(){},Cc=Bc.create=function(a,b,c){return a||(a=bb),b||(b=hb),c||(c=bb),new Ec(a,b,c)},Dc=ab.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}function c(){throw new Error("Method not implemented")}return Wb(b,a),b.prototype.next=c,b.prototype.error=c,b.prototype.completed=c,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}(Bc),Ec=ab.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Wb(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}(Dc),Fc=ab.Observable=function(){function a(a){if(ab.config.longStackSupport&&mb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){d(a,c),e(a)},a.call(c,b)}}else this._subscribe=a}return yc=a.prototype,yc.subscribe=yc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Cc(a,b,c))},yc.subscribeOnNext=function(a,b){return this._subscribe(Cc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},yc.subscribeOnError=function(a,b){return this._subscribe(Cc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},yc.subscribeOnCompleted=function(a,b){return this._subscribe(Cc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Gc=ab.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?dc(a):ec}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new id(a),d=[b,this];return mc.scheduleRequired()?mc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Wb(e,a),e.prototype.subscribeCore=function(){throw new Error("Not implemeneted")},e}(Fc),Hc=ab.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 gc}return Wb(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}(Dc),Ic=function(a){function b(b){this.source=b,a.call(this)}return Wb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new r(a))},b}(Gc);r.prototype.onNext=function(a){this.isStopped||this.a.push(a)},r.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},r.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onNext(this.a),this.observer.onCompleted())},r.prototype.dispose=function(){this.isStopped=!0},r.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},yc.toArray=function(){return new Ic(this)},Fc.create=Fc.createWithDisposable=function(a,b){return new hd(a,b)};var Jc=Fc.defer=function(a){return new hd(function(b){var c;try{c=a()}catch(d){return Uc(d).subscribe(b)}return ib(c)&&(c=ad(c)),c.subscribe(b)})},Kc=Fc.empty=function(a){return cb(a)||(a=lc),new hd(function(b){return a.schedule(function(){b.onCompleted()})})},Lc=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return Wb(b,a),b.prototype.subscribeCore=function(a){var b=new Mc(a,this);return b.run()},b}(Gc),Mc=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=y(b),d=this.observer,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),Nc=Math.pow(2,53)-1;t.prototype[rb]=function(){return new u(this._s)},u.prototype[rb]=function(){return this},u.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:sb},v.prototype[rb]=function(){return new w(this._a)},w.prototype[rb]=function(){return this},w.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:sb};var Oc=Fc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!jb(b))throw new Error("mapFn when provided must be a function");if(b)var e=wb(b,c,2);
3
- return cb(d)||(d=mc),new Lc(a,e,d)},Pc=function(a){function b(b,c){this.args=b,this.scheduler=c||mc,a.call(this)}return Wb(b,a),b.prototype.subscribeCore=function(a){var b=new B(a,this);return b.run()},b}(Gc);B.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 Qc=Fc.fromArray=function(a,b){return new Pc(a,b)};Fc.never=function(){return new hd(function(){return ec})}}Fc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Pc(b)},Fc.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 Pc(c,a)},Fc.pairs=function(a,b){return b||(b=ab.Scheduler.currentThread),new hd(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})};var Rc=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return Wb(b,a),b.prototype.subscribeCore=function(a){var b=new Sc(a,this);return b.run()},b}(Gc),Sc=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}();Fc.range=function(a,b,c){return cb(c)||(c=mc),new Rc(a,b,c)},Fc.repeat=function(a,b,c){return cb(c)||(c=mc),Tc(a,c).repeat(null==b?-1:b)};var Tc=Fc["return"]=Fc.just=function(a,b){return cb(b)||(b=lc),new hd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Fc.returnValue=function(){return Tc.apply(null,arguments)};var Uc=Fc["throw"]=Fc.throwError=function(a,b){return cb(b)||(b=lc),new hd(function(c){return b.schedule(function(){c.onError(a)})})};Fc.throwException=function(){return Fc.throwError.apply(null,arguments)},yc["catch"]=yc.catchError=yc.catchException=function(a){return"function"==typeof a?D(this,a):Vc([this,a])};var Vc=Fc.catchError=Fc["catch"]=Fc.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 Ac(a).catchError()};yc.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),Wc.apply(this,b)};var Wc=Fc.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 a--,Array.isArray(b[0])&&(b=b[0]),new hd(function(c){function e(a){if(h[a]=!0,i||(i=h.every(db))){try{var b=d.apply(null,k)}catch(e){return void c.onError(e)}c.onNext(b)}else j.filter(function(b,c){return c!==a}).every(db)&&c.onCompleted()}function f(a){j[a]=!0,j.every(db)&&c.onCompleted()}for(var g=function(){return!1},h=p(a,g),i=!1,j=p(a,g),k=new Array(a),l=new Array(a),m=0;a>m;m++)!function(a){var d=b[a],g=new fc;ib(d)&&(d=ad(d)),g.setDisposable(d.subscribe(function(b){k[a]=b,e(a)},function(a){c.onError(a)},function(){f(a)})),l[a]=g}(m);return new ac(l)},this)};yc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Xc.apply(null,a)};var Xc=Fc.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 Ac(a).concat()};yc.concatAll=yc.concatObservable=function(){return this.merge(1)},yc.merge=function(a){if("number"!=typeof a)return Yc(this,a);var b=this;return new hd(function(c){function d(a){var b=new fc;f.add(b),ib(a)&&(a=ad(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new ac,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Yc=Fc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(cb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=lc,b=0;d>b;b++)c.push(arguments[b]);else for(a=lc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),C(a,c).mergeAll()};yc.mergeAll=yc.mergeObservable=function(){var a=this;return new hd(function(b){var c=new ac,d=!1,e=new fc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new fc;c.add(e),ib(a)&&(a=ad(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},yc.skipUntil=function(a){var b=this;return new hd(function(c){var d=!1,e=new ac(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));ib(a)&&(a=ad(a));var f=new fc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},yc["switch"]=yc.switchLatest=function(){var a=this;return new hd(function(b){var c=!1,d=new gc,e=!1,f=0,g=a.subscribe(function(a){var g=new fc,h=++f;c=!0,d.setDisposable(g),ib(a)&&(a=ad(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 ac(g,d)},a)},yc.takeUntil=function(a){var b=this;return new hd(function(c){return ib(a)&&(a=ad(a)),new ac(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},bb))},b)},yc.withLatestFrom=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new hd(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new fc;ib(d)&&(d=ad(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(db)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new fc;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new ac(j)},this)},yc.zip=function(){if(Array.isArray(arguments[0]))return E.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 hd(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(db)&&a.onCompleted()}function f(b){i[b]=!0,i.every(function(a){return a})&&a.onCompleted()}for(var g=b.length,h=p(g,G),i=p(g,F),j=new Array(g),k=0;g>k;k++)!function(d){var e=b[d],g=new fc;ib(e)&&(e=ad(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 ac(j)},d)},Fc.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)},Fc.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 hd(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(db))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(db)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new fc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new ac(h)})},yc.asObservable=function(){var a=this;return new hd(function(b){return a.subscribe(b)},this)},yc.dematerialize=function(){var a=this;return new hd(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},yc.distinctUntilChanged=function(a,b){var c=this;return b||(b=fb),new hd(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)},yc["do"]=yc.tap=yc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?Cc(a||bb,b||bb,c||bb):a;return new hd(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},yc.doOnNext=yc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},yc.doOnError=yc.tapOnError=function(a,b){return this.tap(bb,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},yc.doOnCompleted=yc.tapOnCompleted=function(a,b){return this.tap(bb,null,"undefined"!=typeof b?function(){a.call(b)}:a)},yc["finally"]=yc.ensure=function(a){var b=this;return new hd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return dc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},yc.finallyAction=function(a){return this.ensure(a)},yc.ignoreElements=function(){var a=this;return new hd(function(b){return a.subscribe(bb,function(a){b.onError(a)},function(){b.onCompleted()})},a)},yc.materialize=function(){var a=this;return new hd(function(b){return a.subscribe(function(a){b.onNext(tc(a))},function(a){b.onNext(uc(a)),b.onCompleted()},function(){b.onNext(vc()),b.onCompleted()})},a)},yc.repeat=function(a){return zc(this,a).concat()},yc.retry=function(a){return zc(this,a).catchError()},yc.retryWhen=function(a){return zc(this).catchErrorWhen(a)},yc.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 hd(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)},yc.skipLast=function(a){var b=this;return new hd(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)},yc.startWith=function(){var a,b=0;arguments.length&&cb(arguments[0])?(a=arguments[0],b=1):a=lc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Ac([Qc(c,a),this]).concat()},yc.takeLast=function(a){var b=this;return new hd(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)},yc.selectConcat=yc.concatMap=function(a,b,c){return jb(a)&&jb(b)?this.concatMap(function(c,d){var e=a(c,d);return ib(e)&&(e=ad(e)),(ub(e)||tb(e))&&(e=Oc(e)),e.map(function(a,e){return b(c,a,d,e)})}):jb(a)?H(this,a,c):H(this,function(){return a})};var Zc=function(a){function b(b,c,d){this.source=b,this.selector=wb(c,d,3),a.call(this)}return Wb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new I(a,this.selector,this))},b}(Gc);I.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.selector(a,this.i++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)}},I.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},I.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},I.prototype.dispose=function(){this.isStopped=!0},I.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},yc.map=yc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Zc?this.internalMap(c,b):new Zc(this,c,b)},yc.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})},yc.selectMany=yc.flatMap=function(a,b,c){return jb(a)&&jb(b)?this.flatMap(function(c,d){var e=a(c,d);return ib(e)&&(e=ad(e)),(ub(e)||tb(e))&&(e=Oc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):jb(a)?J(this,a,c):J(this,function(){return a})},yc.selectSwitch=yc.flatMapLatest=yc.switchMap=function(a,b){return this.select(a,b).switchLatest()},yc.skip=function(a){if(0>a)throw new Error(kb);var b=this;return new hd(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)},yc.skipWhile=function(a,b){var c=this,d=wb(a,b,3);return new hd(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)},yc.take=function(a,b){if(0>a)throw new RangeError(kb);if(0===a)return Kc(b);var c=this;return new hd(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)},yc.takeWhile=function(a,b){var c=this,d=wb(a,b,3);return new hd(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 $c=function(a){function b(b,c,d){this.source=b,this.predicate=wb(c,d,3),a.call(this)}return Wb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new K(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Gc);K.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.predicate(a,this.i++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)}},K.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},K.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},K.prototype.dispose=function(){this.isStopped=!0},K.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},yc.filter=yc.where=function(a,b){return this instanceof $c?this.internalFilter(a,b):new $c(this,a,b)},Fc.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new hd(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Fc.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new hd(function(e){function f(a){if(a)return void e.onError(a);for(var b=[],d=1,f=arguments.length;f>d;d++)b.push(arguments[d]);if(c){try{b=c(b)}catch(g){return e.onError(g)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},ab.config.useNativeEvents=!1,Fc.fromEvent=function(a,b,c){return a.addListener?_c(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):ab.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new hd(function(d){return N(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount():_c(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var _c=Fc.fromEventPattern=function(a,b,c){return new hd(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return dc(function(){b&&b(e,f)})}).publish().refCount()},ad=Fc.fromPromise=function(a){return Jc(function(){var b=new ab.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};yc.toPromise=function(a){if(a||(a=ab.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Fc.startAsync=function(a){var b;try{b=a()}catch(c){return Uc(c)}return ad(b)},yc.multicast=function(a,b){var c=this;return"function"==typeof a?new hd(function(d){var e=c.multicast(a());return new ac(b(e).subscribe(d),e.connect())},c):new bd(c,a)},yc.publish=function(a){return a&&jb(a)?this.multicast(function(){return new kd},a):this.multicast(new kd)},yc.share=function(){return this.publish().refCount()},yc.publishLast=function(a){return a&&jb(a)?this.multicast(function(){return new ld},a):this.multicast(new ld)},yc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new nd(b)},a):this.multicast(new nd(a))},yc.shareValue=function(a){return this.publishValue(a).refCount()},yc.replay=function(a,b,c,d){return a&&jb(a)?this.multicast(function(){return new od(b,c,d)},a):this.multicast(new od(b,c,d))},yc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var bd=ab.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new ac(f.subscribe(c),dc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return Wb(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new hd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Fc),cd=Fc.interval=function(a,b){return R(a,a,cb(b)?b:rc)};Fc.timer=function(b,c,d){var e;return cb(d)||(d=rc),c!==a&&"number"==typeof c?e=c:cb(c)&&(d=c),b instanceof Date&&e===a?O(b.getTime(),d):b instanceof Date&&e!==a?(e=c,P(b.getTime(),e,d)):e===a?Q(b,d):R(b,e,d)}}yc.delay=function(a,b){return cb(b)||(b=rc),a instanceof Date?T(this,a.getTime(),b):S(this,a,b)},yc.debounce=yc.throttleWithTimeout=function(a,b){cb(b)||(b=rc);var c=this;return new hd(function(d){var e,f=new gc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new fc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new ac(i,f)},this)},yc.throttle=function(a,b){return this.debounce(a,b)},yc.timestamp=function(a){return cb(a)||(a=rc),this.map(function(b){return{value:b,timestamp:a.now()}})},yc.sample=yc.throttleLatest=function(a,b){return cb(b)||(b=rc),"number"==typeof a?U(this,cd(a,b)):U(this,a)},yc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=Uc(new Error(b||"Timeout"))),cb(c)||(c=rc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new hd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(ib(b)&&(b=ad(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new fc,j=new gc,k=!1,l=new gc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new ac(j,l)},d)},yc.throttleFirst=function(a,b){cb(b)||(b=rc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new hd(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 dd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=ec,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=ec)});return new ac(c,d,e)}function c(c,d){this.source=c,this.controller=new kd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return Wb(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Fc);yc.pausable=function(a){return new dd(this,a)};var ed=function(b){function c(b){var c,d=[],e=V(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new kd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return Wb(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Fc);yc.pausableBuffered=function(a){return new ed(this,a)};var fd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new gd(d),this.source=c.multicast(this.subject).refCount()}return Wb(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Fc),gd=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new kd,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=ec,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=ec}return Wb(c,a),Xb(c.prototype,Bc,{onCompleted:function(){this.hasCompleted=!0,(!this.enableQueue||0===this.queue.length)&&this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,(!this.enableQueue||0===this.queue.length)&&this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=ec):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=ec),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?ec:(this.requestedCount=a,this.requestedDisposable=dc(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=ec}}),c}(Fc);yc.controlled=function(a){return null==a&&(a=!0),new fd(this,a)},yc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new hd(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})},c)};var hd=ab.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?dc(a):ec}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new id(a),e=[d,b];return mc.scheduleRequired()?mc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Wb(d,a),d}(Fc),id=function(a){function b(b){a.call(this),this.observer=b,this.m=new fc}Wb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){return o(c)}finally{!b&&this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){return o(b)}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){return o(a)}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Dc),jd=function(a,b){this.subject=a,this.observer=b};jd.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 kd=ab.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),ec):(a.onCompleted(),ec):(this.observers.push(a),new jd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Wb(e,a),Xb(e.prototype,Bc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new md(a,b)},e}(Fc),ld=ab.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),ec):(this.observers.push(a),new jd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Wb(e,a),Xb(e.prototype,Bc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(Fc),md=ab.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 Wb(c,a),Xb(c.prototype,Bc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Fc),nd=ab.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),ec):(this.observers.push(a),a.onNext(this.value),new jd(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Wb(e,a),Xb(e.prototype,Bc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped){this.value=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),e}(Fc),od=ab.ReplaySubject=function(a){function d(a,b){return dc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new Hc(this.scheduler,a),e=d(this,c);b(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function f(b,c,d){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=d||mc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return Wb(f,a),Xb(f.prototype,Bc.prototype,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b(this),!this.isStopped){var d=this.scheduler.now();this.q.push({interval:d,value:a}),this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onNext(a),h.ensureActive()}}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var d=this.scheduler.now();this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onError(a),h.ensureActive()}this.observers.length=0}},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onCompleted(),g.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),f}(Fc);ab.Pauser=function(a){function b(){a.call(this)}return Wb(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(kd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(X.Rx=ab,define(function(){return ab})):Y&&Z?$?(Z.exports=ab).Rx=ab:Y.Rx=ab:X.Rx=ab;var pd=h()}).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(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);
4
5
  //# sourceMappingURL=rx.lite.compat.map
@@ -0,0 +1,621 @@
1
+ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
+
3
+ ;(function (factory) {
4
+ var objectTypes = {
5
+ 'boolean': false,
6
+ 'function': true,
7
+ 'object': true,
8
+ 'number': false,
9
+ 'string': false,
10
+ 'undefined': false
11
+ };
12
+
13
+ var root = (objectTypes[typeof window] && window) || this,
14
+ freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
15
+ freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
16
+ moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
17
+ freeGlobal = objectTypes[typeof global] && global;
18
+
19
+ if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
20
+ root = freeGlobal;
21
+ }
22
+
23
+ // Because of build optimizers
24
+ if (typeof define === 'function' && define.amd) {
25
+ define(['rx-lite-compat'], function (Rx, exports) {
26
+ return factory(root, exports, Rx);
27
+ });
28
+ } else if (typeof module === 'object' && module && module.exports === freeExports) {
29
+ module.exports = factory(root, module.exports, require('rx-lite-compat'));
30
+ } else {
31
+ root.Rx = factory(root, {}, root.Rx);
32
+ }
33
+ }.call(this, function (root, exp, Rx, undefined) {
34
+
35
+ // References
36
+ var Observable = Rx.Observable,
37
+ observableProto = Observable.prototype,
38
+ observableNever = Observable.never,
39
+ observableThrow = Observable.throwException,
40
+ AnonymousObservable = Rx.AnonymousObservable,
41
+ AnonymousObserver = Rx.AnonymousObserver,
42
+ notificationCreateOnNext = Rx.Notification.createOnNext,
43
+ notificationCreateOnError = Rx.Notification.createOnError,
44
+ notificationCreateOnCompleted = Rx.Notification.createOnCompleted,
45
+ Observer = Rx.Observer,
46
+ Subject = Rx.Subject,
47
+ internals = Rx.internals,
48
+ helpers = Rx.helpers,
49
+ ScheduledObserver = internals.ScheduledObserver,
50
+ SerialDisposable = Rx.SerialDisposable,
51
+ SingleAssignmentDisposable = Rx.SingleAssignmentDisposable,
52
+ CompositeDisposable = Rx.CompositeDisposable,
53
+ RefCountDisposable = Rx.RefCountDisposable,
54
+ disposableEmpty = Rx.Disposable.empty,
55
+ immediateScheduler = Rx.Scheduler.immediate,
56
+ defaultKeySerializer = helpers.defaultKeySerializer,
57
+ addRef = Rx.internals.addRef,
58
+ identity = helpers.identity,
59
+ isPromise = helpers.isPromise,
60
+ inherits = internals.inherits,
61
+ bindCallback = internals.bindCallback,
62
+ noop = helpers.noop,
63
+ isScheduler = Rx.Scheduler.isScheduler,
64
+ observableFromPromise = Observable.fromPromise,
65
+ ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError;
66
+
67
+ function ScheduledDisposable(scheduler, disposable) {
68
+ this.scheduler = scheduler;
69
+ this.disposable = disposable;
70
+ this.isDisposed = false;
71
+ }
72
+
73
+ function scheduleItem(s, self) {
74
+ if (!self.isDisposed) {
75
+ self.isDisposed = true;
76
+ self.disposable.dispose();
77
+ }
78
+ }
79
+
80
+ ScheduledDisposable.prototype.dispose = function () {
81
+ this.scheduler.scheduleWithState(this, scheduleItem);
82
+ };
83
+
84
+ var CheckedObserver = (function (__super__) {
85
+ inherits(CheckedObserver, __super__);
86
+
87
+ function CheckedObserver(observer) {
88
+ __super__.call(this);
89
+ this._observer = observer;
90
+ this._state = 0; // 0 - idle, 1 - busy, 2 - done
91
+ }
92
+
93
+ var CheckedObserverPrototype = CheckedObserver.prototype;
94
+
95
+ CheckedObserverPrototype.onNext = function (value) {
96
+ this.checkAccess();
97
+ var res = tryCatch(this._observer.onNext).call(this._observer, value);
98
+ this._state = 0;
99
+ res === errorObj && thrower(res.e);
100
+ };
101
+
102
+ CheckedObserverPrototype.onError = function (err) {
103
+ this.checkAccess();
104
+ var res = tryCatch(this._observer.onError).call(this._observer, err);
105
+ this._state = 2;
106
+ res === errorObj && thrower(res.e);
107
+ };
108
+
109
+ CheckedObserverPrototype.onCompleted = function () {
110
+ this.checkAccess();
111
+ var res = tryCatch(this._observer.onCompleted).call(this._observer);
112
+ this._state = 2;
113
+ res === errorObj && thrower(res.e);
114
+ };
115
+
116
+ CheckedObserverPrototype.checkAccess = function () {
117
+ if (this._state === 1) { throw new Error('Re-entrancy detected'); }
118
+ if (this._state === 2) { throw new Error('Observer completed'); }
119
+ if (this._state === 0) { this._state = 1; }
120
+ };
121
+
122
+ return CheckedObserver;
123
+ }(Observer));
124
+
125
+ var ObserveOnObserver = (function (__super__) {
126
+ inherits(ObserveOnObserver, __super__);
127
+
128
+ function ObserveOnObserver(scheduler, observer, cancel) {
129
+ __super__.call(this, scheduler, observer);
130
+ this._cancel = cancel;
131
+ }
132
+
133
+ ObserveOnObserver.prototype.next = function (value) {
134
+ __super__.prototype.next.call(this, value);
135
+ this.ensureActive();
136
+ };
137
+
138
+ ObserveOnObserver.prototype.error = function (e) {
139
+ __super__.prototype.error.call(this, e);
140
+ this.ensureActive();
141
+ };
142
+
143
+ ObserveOnObserver.prototype.completed = function () {
144
+ __super__.prototype.completed.call(this);
145
+ this.ensureActive();
146
+ };
147
+
148
+ ObserveOnObserver.prototype.dispose = function () {
149
+ __super__.prototype.dispose.call(this);
150
+ this._cancel && this._cancel.dispose();
151
+ this._cancel = null;
152
+ };
153
+
154
+ return ObserveOnObserver;
155
+ })(ScheduledObserver);
156
+
157
+ /**
158
+ * Checks access to the observer for grammar violations. This includes checking for multiple OnError or OnCompleted calls, as well as reentrancy in any of the observer methods.
159
+ * If a violation is detected, an Error is thrown from the offending observer method call.
160
+ *
161
+ * @returns An observer that checks callbacks invocations against the observer grammar and, if the checks pass, forwards those to the specified observer.
162
+ */
163
+ Observer.prototype.checked = function () { return new CheckedObserver(this); };
164
+
165
+ /**
166
+ * Schedules the invocation of observer methods on the given scheduler.
167
+ * @param {Scheduler} scheduler Scheduler to schedule observer messages on.
168
+ * @returns {Observer} Observer whose messages are scheduled on the given scheduler.
169
+ */
170
+ Observer.notifyOn = function (scheduler) {
171
+ return new ObserveOnObserver(scheduler, this);
172
+ };
173
+
174
+ /**
175
+ * Creates an observer from a notification callback.
176
+ * @param {Function} handler Action that handles a notification.
177
+ * @returns The observer object that invokes the specified handler using a notification corresponding to each message it receives.
178
+ */
179
+ Observer.fromNotifier = function (handler, thisArg) {
180
+ var handlerFunc = bindCallback(handler, thisArg, 1);
181
+ return new AnonymousObserver(function (x) {
182
+ return handlerFunc(notificationCreateOnNext(x));
183
+ }, function (e) {
184
+ return handlerFunc(notificationCreateOnError(e));
185
+ }, function () {
186
+ return handlerFunc(notificationCreateOnCompleted());
187
+ });
188
+ };
189
+
190
+ /**
191
+ * Creates a notification callback from an observer.
192
+ * @returns The action that forwards its input notification to the underlying observer.
193
+ */
194
+ Observer.prototype.toNotifier = function () {
195
+ var observer = this;
196
+ return function (n) { return n.accept(observer); };
197
+ };
198
+
199
+ /**
200
+ * Hides the identity of an observer.
201
+ * @returns An observer that hides the identity of the specified observer.
202
+ */
203
+ Observer.prototype.asObserver = function () {
204
+ var source = this;
205
+ return new AnonymousObserver(
206
+ function (x) { source.onNext(x); },
207
+ function (e) { source.onError(e); },
208
+ function () { source.onCompleted(); }
209
+ );
210
+ };
211
+
212
+ /**
213
+ * Wraps the source sequence in order to run its observer callbacks on the specified scheduler.
214
+ *
215
+ * This only invokes observer callbacks on a scheduler. In case the subscription and/or unsubscription actions have side-effects
216
+ * that require to be run on a scheduler, use subscribeOn.
217
+ *
218
+ * @param {Scheduler} scheduler Scheduler to notify observers on.
219
+ * @returns {Observable} The source sequence whose observations happen on the specified scheduler.
220
+ */
221
+ observableProto.observeOn = function (scheduler) {
222
+ var source = this;
223
+ return new AnonymousObservable(function (observer) {
224
+ return source.subscribe(new ObserveOnObserver(scheduler, observer));
225
+ }, source);
226
+ };
227
+
228
+ /**
229
+ * Wraps the source sequence in order to run its subscription and unsubscription logic on the specified scheduler. This operation is not commonly used;
230
+ * see the remarks section for more information on the distinction between subscribeOn and observeOn.
231
+
232
+ * This only performs the side-effects of subscription and unsubscription on the specified scheduler. In order to invoke observer
233
+ * callbacks on a scheduler, use observeOn.
234
+
235
+ * @param {Scheduler} scheduler Scheduler to perform subscription and unsubscription actions on.
236
+ * @returns {Observable} The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler.
237
+ */
238
+ observableProto.subscribeOn = function (scheduler) {
239
+ var source = this;
240
+ return new AnonymousObservable(function (observer) {
241
+ var m = new SingleAssignmentDisposable(), d = new SerialDisposable();
242
+ d.setDisposable(m);
243
+ m.setDisposable(scheduler.schedule(function () {
244
+ d.setDisposable(new ScheduledDisposable(scheduler, source.subscribe(observer)));
245
+ }));
246
+ return d;
247
+ }, source);
248
+ };
249
+
250
+ /**
251
+ * Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages.
252
+ *
253
+ * @example
254
+ * var res = Rx.Observable.generate(0, function (x) { return x < 10; }, function (x) { return x + 1; }, function (x) { return x; });
255
+ * var res = Rx.Observable.generate(0, function (x) { return x < 10; }, function (x) { return x + 1; }, function (x) { return x; }, Rx.Scheduler.timeout);
256
+ * @param {Mixed} initialState Initial state.
257
+ * @param {Function} condition Condition to terminate generation (upon returning false).
258
+ * @param {Function} iterate Iteration step function.
259
+ * @param {Function} resultSelector Selector function for results produced in the sequence.
260
+ * @param {Scheduler} [scheduler] Scheduler on which to run the generator loop. If not provided, defaults to Scheduler.currentThread.
261
+ * @returns {Observable} The generated sequence.
262
+ */
263
+ Observable.generate = function (initialState, condition, iterate, resultSelector, scheduler) {
264
+ isScheduler(scheduler) || (scheduler = currentThreadScheduler);
265
+ return new AnonymousObservable(function (o) {
266
+ var first = true;
267
+ return scheduler.scheduleRecursiveWithState(initialState, function (state, self) {
268
+ var hasResult, result;
269
+ try {
270
+ if (first) {
271
+ first = false;
272
+ } else {
273
+ state = iterate(state);
274
+ }
275
+ hasResult = condition(state);
276
+ hasResult && (result = resultSelector(state));
277
+ } catch (e) {
278
+ return o.onError(e);
279
+ }
280
+ if (hasResult) {
281
+ o.onNext(result);
282
+ self(state);
283
+ } else {
284
+ o.onCompleted();
285
+ }
286
+ });
287
+ });
288
+ };
289
+
290
+ /**
291
+ * Constructs an observable sequence that depends on a resource object, whose lifetime is tied to the resulting observable sequence's lifetime.
292
+ * @param {Function} resourceFactory Factory function to obtain a resource object.
293
+ * @param {Function} observableFactory Factory function to obtain an observable sequence that depends on the obtained resource.
294
+ * @returns {Observable} An observable sequence whose lifetime controls the lifetime of the dependent resource object.
295
+ */
296
+ Observable.using = function (resourceFactory, observableFactory) {
297
+ return new AnonymousObservable(function (observer) {
298
+ var disposable = disposableEmpty, resource, source;
299
+ try {
300
+ resource = resourceFactory();
301
+ resource && (disposable = resource);
302
+ source = observableFactory(resource);
303
+ } catch (exception) {
304
+ return new CompositeDisposable(observableThrow(exception).subscribe(observer), disposable);
305
+ }
306
+ return new CompositeDisposable(source.subscribe(observer), disposable);
307
+ });
308
+ };
309
+
310
+ /**
311
+ * Propagates the observable sequence or Promise that reacts first.
312
+ * @param {Observable} rightSource Second observable sequence or Promise.
313
+ * @returns {Observable} {Observable} An observable sequence that surfaces either of the given sequences, whichever reacted first.
314
+ */
315
+ observableProto.amb = function (rightSource) {
316
+ var leftSource = this;
317
+ return new AnonymousObservable(function (observer) {
318
+ var choice,
319
+ leftChoice = 'L', rightChoice = 'R',
320
+ leftSubscription = new SingleAssignmentDisposable(),
321
+ rightSubscription = new SingleAssignmentDisposable();
322
+
323
+ isPromise(rightSource) && (rightSource = observableFromPromise(rightSource));
324
+
325
+ function choiceL() {
326
+ if (!choice) {
327
+ choice = leftChoice;
328
+ rightSubscription.dispose();
329
+ }
330
+ }
331
+
332
+ function choiceR() {
333
+ if (!choice) {
334
+ choice = rightChoice;
335
+ leftSubscription.dispose();
336
+ }
337
+ }
338
+
339
+ leftSubscription.setDisposable(leftSource.subscribe(function (left) {
340
+ choiceL();
341
+ if (choice === leftChoice) {
342
+ observer.onNext(left);
343
+ }
344
+ }, function (err) {
345
+ choiceL();
346
+ if (choice === leftChoice) {
347
+ observer.onError(err);
348
+ }
349
+ }, function () {
350
+ choiceL();
351
+ if (choice === leftChoice) {
352
+ observer.onCompleted();
353
+ }
354
+ }));
355
+
356
+ rightSubscription.setDisposable(rightSource.subscribe(function (right) {
357
+ choiceR();
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
+ }));
372
+
373
+ return new CompositeDisposable(leftSubscription, rightSubscription);
374
+ });
375
+ };
376
+
377
+ /**
378
+ * Propagates the observable sequence or Promise that reacts first.
379
+ *
380
+ * @example
381
+ * var = Rx.Observable.amb(xs, ys, zs);
382
+ * @returns {Observable} An observable sequence that surfaces any of the given sequences, whichever reacted first.
383
+ */
384
+ Observable.amb = function () {
385
+ var acc = observableNever(), items = [];
386
+ if (Array.isArray(arguments[0])) {
387
+ items = arguments[0];
388
+ } else {
389
+ for(var i = 0, len = arguments.length; i < len; i++) { items.push(arguments[i]); }
390
+ }
391
+
392
+ function func(previous, current) {
393
+ return previous.amb(current);
394
+ }
395
+ for (var i = 0, len = items.length; i < len; i++) {
396
+ acc = func(acc, items[i]);
397
+ }
398
+ return acc;
399
+ };
400
+
401
+ /**
402
+ * Continues an observable sequence that is terminated normally or by an exception with the next observable sequence.
403
+ * @param {Observable} second Second observable sequence used to produce results after the first sequence terminates.
404
+ * @returns {Observable} An observable sequence that concatenates the first and second sequence, even if the first sequence terminates exceptionally.
405
+ */
406
+ observableProto.onErrorResumeNext = function (second) {
407
+ if (!second) { throw new Error('Second observable is required'); }
408
+ return onErrorResumeNext([this, second]);
409
+ };
410
+
411
+ /**
412
+ * Continues an observable sequence that is terminated normally or by an exception with the next observable sequence.
413
+ *
414
+ * @example
415
+ * 1 - res = Rx.Observable.onErrorResumeNext(xs, ys, zs);
416
+ * 1 - res = Rx.Observable.onErrorResumeNext([xs, ys, zs]);
417
+ * @returns {Observable} An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally.
418
+ */
419
+ var onErrorResumeNext = Observable.onErrorResumeNext = function () {
420
+ var sources = [];
421
+ if (Array.isArray(arguments[0])) {
422
+ sources = arguments[0];
423
+ } else {
424
+ for(var i = 0, len = arguments.length; i < len; i++) { sources.push(arguments[i]); }
425
+ }
426
+ return new AnonymousObservable(function (observer) {
427
+ var pos = 0, subscription = new SerialDisposable(),
428
+ cancelable = immediateScheduler.scheduleRecursive(function (self) {
429
+ var current, d;
430
+ if (pos < sources.length) {
431
+ current = sources[pos++];
432
+ isPromise(current) && (current = observableFromPromise(current));
433
+ d = new SingleAssignmentDisposable();
434
+ subscription.setDisposable(d);
435
+ d.setDisposable(current.subscribe(observer.onNext.bind(observer), self, self));
436
+ } else {
437
+ observer.onCompleted();
438
+ }
439
+ });
440
+ return new CompositeDisposable(subscription, cancelable);
441
+ });
442
+ };
443
+
444
+ /**
445
+ * 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
+ * @param {Number} count Length of each buffer.
451
+ * @param {Number} [skip] Number of elements to skip between creation of consecutive buffers. If not provided, defaults to the count.
452
+ * @returns {Observable} An observable sequence of buffers.
453
+ */
454
+ observableProto.bufferWithCount = function (count, skip) {
455
+ if (typeof skip !== 'number') {
456
+ skip = count;
457
+ }
458
+ return this.windowWithCount(count, skip).selectMany(function (x) {
459
+ return x.toArray();
460
+ }).where(function (x) {
461
+ return x.length > 0;
462
+ });
463
+ };
464
+
465
+ /**
466
+ * Projects each element of an observable sequence into zero or more windows which are produced based on element count information.
467
+ *
468
+ * var res = xs.windowWithCount(10);
469
+ * var res = xs.windowWithCount(10, 1);
470
+ * @param {Number} count Length of each window.
471
+ * @param {Number} [skip] Number of elements to skip between creation of consecutive windows. If not specified, defaults to the count.
472
+ * @returns {Observable} An observable sequence of windows.
473
+ */
474
+ observableProto.windowWithCount = function (count, skip) {
475
+ var source = this;
476
+ +count || (count = 0);
477
+ Math.abs(count) === Infinity && (count = 0);
478
+ if (count <= 0) { throw new ArgumentOutOfRangeError(); }
479
+ skip == null && (skip = count);
480
+ +skip || (skip = 0);
481
+ Math.abs(skip) === Infinity && (skip = 0);
482
+
483
+ if (skip <= 0) { throw new ArgumentOutOfRangeError(); }
484
+ return new AnonymousObservable(function (observer) {
485
+ var m = new SingleAssignmentDisposable(),
486
+ refCountDisposable = new RefCountDisposable(m),
487
+ n = 0,
488
+ q = [];
489
+
490
+ function createWindow () {
491
+ var s = new Subject();
492
+ q.push(s);
493
+ observer.onNext(addRef(s, refCountDisposable));
494
+ }
495
+
496
+ createWindow();
497
+
498
+ m.setDisposable(source.subscribe(
499
+ function (x) {
500
+ for (var i = 0, len = q.length; i < len; i++) { q[i].onNext(x); }
501
+ var c = n - count + 1;
502
+ c >= 0 && c % skip === 0 && q.shift().onCompleted();
503
+ ++n % skip === 0 && createWindow();
504
+ },
505
+ function (e) {
506
+ while (q.length > 0) { q.shift().onError(e); }
507
+ observer.onError(e);
508
+ },
509
+ function () {
510
+ while (q.length > 0) { q.shift().onCompleted(); }
511
+ observer.onCompleted();
512
+ }
513
+ ));
514
+ return refCountDisposable;
515
+ }, source);
516
+ };
517
+
518
+ /**
519
+ * Returns an array with the specified number of contiguous elements from the end of an observable sequence.
520
+ *
521
+ * @description
522
+ * This operator accumulates a buffer with a length enough to store count elements. Upon completion of the
523
+ * source sequence, this buffer is produced on the result sequence.
524
+ * @param {Number} count Number of elements to take from the end of the source sequence.
525
+ * @returns {Observable} An observable sequence containing a single array with the specified number of elements from the end of the source sequence.
526
+ */
527
+ observableProto.takeLastBuffer = function (count) {
528
+ var source = this;
529
+ return new AnonymousObservable(function (o) {
530
+ var q = [];
531
+ return source.subscribe(function (x) {
532
+ q.push(x);
533
+ q.length > count && q.shift();
534
+ }, function (e) { o.onError(e); }, function () {
535
+ o.onNext(q);
536
+ o.onCompleted();
537
+ });
538
+ }, source);
539
+ };
540
+
541
+ /**
542
+ * Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty.
543
+ *
544
+ * var res = obs = xs.defaultIfEmpty();
545
+ * 2 - obs = xs.defaultIfEmpty(false);
546
+ *
547
+ * @memberOf Observable#
548
+ * @param defaultValue The value to return if the sequence is empty. If not provided, this defaults to null.
549
+ * @returns {Observable} An observable sequence that contains the specified default value if the source is empty; otherwise, the elements of the source itself.
550
+ */
551
+ observableProto.defaultIfEmpty = function (defaultValue) {
552
+ var source = this;
553
+ defaultValue === undefined && (defaultValue = null);
554
+ return new AnonymousObservable(function (observer) {
555
+ var found = false;
556
+ return source.subscribe(function (x) {
557
+ found = true;
558
+ observer.onNext(x);
559
+ },
560
+ function (e) { observer.onError(e); },
561
+ function () {
562
+ !found && observer.onNext(defaultValue);
563
+ observer.onCompleted();
564
+ });
565
+ }, source);
566
+ };
567
+
568
+ // Swap out for Array.findIndex
569
+ function arrayIndexOfComparer(array, item, comparer) {
570
+ for (var i = 0, len = array.length; i < len; i++) {
571
+ if (comparer(array[i], item)) { return i; }
572
+ }
573
+ return -1;
574
+ }
575
+
576
+ function HashSet(comparer) {
577
+ this.comparer = comparer;
578
+ this.set = [];
579
+ }
580
+ HashSet.prototype.push = function(value) {
581
+ var retValue = arrayIndexOfComparer(this.set, value, this.comparer) === -1;
582
+ retValue && this.set.push(value);
583
+ return retValue;
584
+ };
585
+
586
+ /**
587
+ * Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer.
588
+ * Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
589
+ *
590
+ * @example
591
+ * var res = obs = xs.distinct();
592
+ * 2 - obs = xs.distinct(function (x) { return x.id; });
593
+ * 2 - obs = xs.distinct(function (x) { return x.id; }, function (a,b) { return a === b; });
594
+ * @param {Function} [keySelector] A function to compute the comparison key for each element.
595
+ * @param {Function} [comparer] Used to compare items in the collection.
596
+ * @returns {Observable} An observable sequence only containing the distinct elements, based on a computed key value, from the source sequence.
597
+ */
598
+ observableProto.distinct = function (keySelector, comparer) {
599
+ var source = this;
600
+ comparer || (comparer = defaultComparer);
601
+ return new AnonymousObservable(function (o) {
602
+ var hashSet = new HashSet(comparer);
603
+ return source.subscribe(function (x) {
604
+ var key = x;
605
+
606
+ if (keySelector) {
607
+ try {
608
+ key = keySelector(x);
609
+ } catch (e) {
610
+ o.onError(e);
611
+ return;
612
+ }
613
+ }
614
+ hashSet.push(key) && o.onNext(x);
615
+ },
616
+ function (e) { o.onError(e); }, function () { o.onCompleted(); });
617
+ }, this);
618
+ };
619
+
620
+ return Rx;
621
+ }));