{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///delegated ./node_modules/rxjs/node_modules/tslib/tslib.es6.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/innerSubscribe.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/Subscriber.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///external \"vendor_51d43e143a4cc0626b2a\"","webpack:///delegated ./node_modules/react/index.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/scheduler/async.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/Subject.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/operators/map.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./node_modules/rxjs/src/internal/util/root.ts","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/operators/filter.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/OuterSubscriber.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/noop.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/operators/mergeMap.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/Subscription.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/from.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/EmptyError.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/isScheduler.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/index.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/isArray.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/concat.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/Notification.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./node_modules/rxjs/src/internal/operators/audit.ts","webpack:///./node_modules/rxjs/src/internal/operators/auditTime.ts","webpack:///./node_modules/rxjs/src/internal/operators/buffer.ts","webpack:///./node_modules/rxjs/src/internal/operators/bufferCount.ts","webpack:///./node_modules/rxjs/src/internal/operators/bufferTime.ts","webpack:///./node_modules/rxjs/src/internal/operators/bufferToggle.ts","webpack:///./node_modules/rxjs/src/internal/operators/bufferWhen.ts","webpack:///./node_modules/rxjs/src/internal/operators/catchError.ts","webpack:///./node_modules/rxjs/src/internal/operators/combineAll.ts","webpack:///./node_modules/rxjs/src/internal/operators/combineLatest.ts","webpack:///./node_modules/rxjs/src/internal/operators/concat.ts","webpack:///./node_modules/rxjs/src/internal/operators/concatMap.ts","webpack:///./node_modules/rxjs/src/internal/operators/concatMapTo.ts","webpack:///./node_modules/rxjs/src/internal/operators/count.ts","webpack:///./node_modules/rxjs/src/internal/operators/debounce.ts","webpack:///./node_modules/rxjs/src/internal/operators/debounceTime.ts","webpack:///./node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts","webpack:///./node_modules/rxjs/src/internal/util/isDate.ts","webpack:///./node_modules/rxjs/src/internal/operators/delay.ts","webpack:///./node_modules/rxjs/src/internal/operators/delayWhen.ts","webpack:///./node_modules/rxjs/src/internal/operators/dematerialize.ts","webpack:///./node_modules/rxjs/src/internal/operators/distinct.ts","webpack:///./node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts","webpack:///./node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts","webpack:///./node_modules/rxjs/src/internal/operators/throwIfEmpty.ts","webpack:///./node_modules/rxjs/src/internal/operators/take.ts","webpack:///./node_modules/rxjs/src/internal/operators/elementAt.ts","webpack:///./node_modules/rxjs/src/internal/operators/endWith.ts","webpack:///./node_modules/rxjs/src/internal/operators/every.ts","webpack:///./node_modules/rxjs/src/internal/operators/exhaust.ts","webpack:///./node_modules/rxjs/src/internal/operators/exhaustMap.ts","webpack:///./node_modules/rxjs/src/internal/operators/expand.ts","webpack:///./node_modules/rxjs/src/internal/operators/finalize.ts","webpack:///./node_modules/rxjs/src/internal/operators/find.ts","webpack:///./node_modules/rxjs/src/internal/operators/findIndex.ts","webpack:///./node_modules/rxjs/src/internal/operators/first.ts","webpack:///./node_modules/rxjs/src/internal/operators/ignoreElements.ts","webpack:///./node_modules/rxjs/src/internal/operators/isEmpty.ts","webpack:///./node_modules/rxjs/src/internal/operators/takeLast.ts","webpack:///./node_modules/rxjs/src/internal/operators/last.ts","webpack:///./node_modules/rxjs/src/internal/operators/mapTo.ts","webpack:///./node_modules/rxjs/src/internal/operators/materialize.ts","webpack:///./node_modules/rxjs/src/internal/operators/scan.ts","webpack:///./node_modules/rxjs/src/internal/operators/reduce.ts","webpack:///./node_modules/rxjs/src/internal/operators/max.ts","webpack:///./node_modules/rxjs/src/internal/operators/merge.ts","webpack:///./node_modules/rxjs/src/internal/operators/mergeMapTo.ts","webpack:///./node_modules/rxjs/src/internal/operators/mergeScan.ts","webpack:///./node_modules/rxjs/src/internal/operators/min.ts","webpack:///./node_modules/rxjs/src/internal/operators/multicast.ts","webpack:///./node_modules/rxjs/src/internal/operators/onErrorResumeNext.ts","webpack:///./node_modules/rxjs/src/internal/operators/pairwise.ts","webpack:///./node_modules/rxjs/src/internal/operators/partition.ts","webpack:///./node_modules/rxjs/src/internal/operators/pluck.ts","webpack:///./node_modules/rxjs/src/internal/operators/publish.ts","webpack:///./node_modules/rxjs/src/internal/operators/publishBehavior.ts","webpack:///./node_modules/rxjs/src/internal/operators/publishLast.ts","webpack:///./node_modules/rxjs/src/internal/operators/publishReplay.ts","webpack:///./node_modules/rxjs/src/internal/operators/race.ts","webpack:///./node_modules/rxjs/src/internal/operators/repeat.ts","webpack:///./node_modules/rxjs/src/internal/operators/repeatWhen.ts","webpack:///./node_modules/rxjs/src/internal/operators/retry.ts","webpack:///./node_modules/rxjs/src/internal/operators/retryWhen.ts","webpack:///./node_modules/rxjs/src/internal/operators/sample.ts","webpack:///./node_modules/rxjs/src/internal/operators/sampleTime.ts","webpack:///./node_modules/rxjs/src/internal/operators/sequenceEqual.ts","webpack:///./node_modules/rxjs/src/internal/operators/share.ts","webpack:///./node_modules/rxjs/src/internal/operators/shareReplay.ts","webpack:///./node_modules/rxjs/src/internal/operators/single.ts","webpack:///./node_modules/rxjs/src/internal/operators/skip.ts","webpack:///./node_modules/rxjs/src/internal/operators/skipLast.ts","webpack:///./node_modules/rxjs/src/internal/operators/skipUntil.ts","webpack:///./node_modules/rxjs/src/internal/operators/skipWhile.ts","webpack:///./node_modules/rxjs/src/internal/operators/startWith.ts","webpack:///./node_modules/rxjs/src/internal/operators/switchMap.ts","webpack:///./node_modules/rxjs/src/internal/operators/switchAll.ts","webpack:///./node_modules/rxjs/src/internal/operators/switchMapTo.ts","webpack:///./node_modules/rxjs/src/internal/operators/takeUntil.ts","webpack:///./node_modules/rxjs/src/internal/operators/takeWhile.ts","webpack:///./node_modules/rxjs/src/internal/operators/tap.ts","webpack:///./node_modules/rxjs/src/internal/operators/throttle.ts","webpack:///./node_modules/rxjs/src/internal/operators/throttleTime.ts","webpack:///./node_modules/rxjs/src/internal/operators/timeInterval.ts","webpack:///./node_modules/rxjs/src/internal/operators/timeoutWith.ts","webpack:///./node_modules/rxjs/src/internal/operators/timeout.ts","webpack:///./node_modules/rxjs/src/internal/operators/timestamp.ts","webpack:///./node_modules/rxjs/src/internal/operators/toArray.ts","webpack:///./node_modules/rxjs/src/internal/operators/window.ts","webpack:///./node_modules/rxjs/src/internal/operators/windowCount.ts","webpack:///./node_modules/rxjs/src/internal/operators/windowTime.ts","webpack:///./node_modules/rxjs/src/internal/operators/windowToggle.ts","webpack:///./node_modules/rxjs/src/internal/operators/windowWhen.ts","webpack:///./node_modules/rxjs/src/internal/operators/withLatestFrom.ts","webpack:///./node_modules/rxjs/src/internal/operators/zip.ts","webpack:///./node_modules/rxjs/src/internal/operators/zipAll.ts","webpack:///./node_modules/rxjs/src/operators/index.ts","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/empty.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/identity.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/connected-react-router/esm/index.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/redux-observable/lib/esm/index.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./ConstructionAi.WebApp/Client/serverOptions.ts","webpack:///./ConstructionAi.WebApp/Client/utils/oauth.ts","webpack:///./ConstructionAi.WebApp/Client/components/PleaseWait.tsx","webpack:///delegated ./node_modules/react-redux/es/index.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./ConstructionAi.WebApp/Client/utils/fetch.ts","webpack:///./ConstructionAi.WebApp/Client/utils/window.ts","webpack:///delegated ./node_modules/rxjs/_esm5/internal/operators/refCount.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/Observable.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/combineLatest.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/ReplaySubject.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/zip.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./ConstructionAi.WebApp/Client/store/plans.ts","webpack:///delegated ./node_modules/react-helmet/lib/Helmet.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./ConstructionAi.WebApp/Client/utils/state.ts","webpack:///./ConstructionAi.WebApp/Client/components/Layout.tsx","webpack:///./node_modules/qs/lib/formats.js","webpack:///./ConstructionAi.WebApp/Client/store/user.ts","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/pipe.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/isNumeric.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/webpack/buildin/global.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/redux/es/redux.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/operators/concatAll.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/operators/groupBy.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/operators/mergeAll.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/operators/observeOn.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/operators/subscribeOn.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./ConstructionAi.WebApp/Client/routes.tsx","webpack:///delegated ./node_modules/react-router-dom/esm/react-router-dom.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./ConstructionAi.WebApp/Client/store/upload.ts","webpack:///./node_modules/qs/lib/index.js","webpack:///./node_modules/qs/lib/utils.js","webpack:///./ConstructionAi.WebApp/Client/version.ts","webpack:///./ConstructionAi.WebApp/Client/components/NotFound.tsx","webpack:///delegated ./node_modules/@stripe/react-stripe-js/dist/react-stripe.umd.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/timer.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/of.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/merge.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/not.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/BehaviorSubject.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/AsyncSubject.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/race.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/isFunction.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/defer.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/util/TimeoutError.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/rxjs/_esm5/internal/observable/throwError.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./ConstructionAi.WebApp/Client/boot-client.tsx","webpack:///delegated ./node_modules/history/esm/history.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/react-dom/index.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./node_modules/react-hot-loader/index.js","webpack:///./node_modules/react-hot-loader/dist/react-hot-loader.production.min.js","webpack:///./ConstructionAi.WebApp/Client/configureStore.ts","webpack:///./ConstructionAi.WebApp/Client/store/index.ts","webpack:///./ConstructionAi.WebApp/Client/components/Home.tsx","webpack:///delegated ./node_modules/abort-controller/browser.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///delegated ./node_modules/domain-task/index.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./ConstructionAi.WebApp/Client/utils/messageQueue.ts","webpack:///delegated ./node_modules/@aws-sdk/client-sqs/dist-es/index.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./ConstructionAi.WebApp/Client/components/LoginButton.tsx","webpack:///./node_modules/qs/lib/stringify.js","webpack:///./node_modules/qs/lib/parse.js","webpack:///./ConstructionAi.WebApp/Client/utils/userState.ts","webpack:///./ConstructionAi.WebApp/Client/components/GoogleButton.tsx","webpack:///./ConstructionAi.WebApp/Client/components/GoogleLogo.tsx","webpack:///./ConstructionAi.WebApp/Client/components/ThreeDots.tsx","webpack:///./ConstructionAi.WebApp/Client/components/OAuth2Redirect.tsx","webpack:///./ConstructionAi.WebApp/Client/components/ViewPlan.tsx","webpack:///./ConstructionAi.WebApp/Client/components/CheckoutFormContainer.tsx","webpack:///./ConstructionAi.WebApp/Client/components/CheckoutForm.tsx","webpack:///delegated ./node_modules/classnames/index.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./ConstructionAi.WebApp/Client/components/Button.tsx","webpack:///./ConstructionAi.WebApp/Client/components/Checkbox.tsx","webpack:///./ConstructionAi.WebApp/Client/components/Textbox.tsx","webpack:///./ConstructionAi.WebApp/Client/components/TrimbleProjectList.tsx","webpack:///./ConstructionAi.WebApp/Client/components/Picklist.tsx","webpack:///delegated ./node_modules/@stripe/stripe-js/dist/stripe.esm.js from dll-reference vendor_51d43e143a4cc0626b2a","webpack:///./ConstructionAi.WebApp/Client/components/LayeredDetailList.tsx","webpack:///./ConstructionAi.WebApp/Client/components/PlanDetailList.tsx","webpack:///./node_modules/rxjs/src/internal/observable/dom/AjaxObservable.ts","webpack:///./node_modules/rxjs/src/ajax/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","vendor_51d43e143a4cc0626b2a","global","__webpack_exports__","_root","__window","window","__self","self","WorkerGlobalScope","audit","durationSelector","source","lift","AuditOperator","this","subscriber","subscribe","audit_AuditSubscriber","_super","AuditSubscriber","destination","_this","tslib_es6from_dll_reference_vendor_51d43e143a4cc0626b2a","_next","hasValue","throttled","duration","err","error","innerSubscription","innerSubscribefrom_dll_reference_vendor_51d43e143a4cc0626b2a","closed","clearThrottle","add","remove","undefined","unsubscribe","next","notifyNext","notifyComplete","auditTime","scheduler","asyncfrom_dll_reference_vendor_51d43e143a4cc0626b2a","buffer_buffer","closingNotifier","BufferOperator","buffer_BufferSubscriber","BufferSubscriber","buffer","push","bufferCount","bufferSize","startBufferEvery","BufferCountOperator","subscriberClass","bufferCount_BufferSkipCountSubscriber","bufferCount_BufferCountSubscriber","BufferCountSubscriber","length","_complete","BufferSkipCountSubscriber","buffers","count","splice","shift","bufferTime","bufferTimeSpan","arguments","isSchedulerfrom_dll_reference_vendor_51d43e143a4cc0626b2a","bufferCreationInterval","maxBufferSize","Number","POSITIVE_INFINITY","BufferTimeOperator","bufferTime_BufferTimeSubscriber","Context","BufferTimeSubscriber","contexts","context","openContext","timespanOnly","timeSpanOnlyState","closeAction","schedule","dispatchBufferTimeSpanOnly","closeState","creationState","dispatchBufferClose","dispatchBufferCreation","filledBufferContext","len","context_1","onBufferFull","_error","context_2","_unsubscribe","closeContext","indexOf","Subscriberfrom_dll_reference_vendor_51d43e143a4cc0626b2a","state","prevContext","arg","bufferToggle","openings","closingSelector","BufferToggleOperator","bufferToggle_BufferToggleSubscriber","BufferToggleSubscriber","subscription","outerValue","innerValue","closeBuffer","openBuffer","innerSub","trySubscribe","Subscriptionfrom_dll_reference_vendor_51d43e143a4cc0626b2a","subscribeToResultfrom_dll_reference_vendor_51d43e143a4cc0626b2a","bufferWhen","BufferWhenOperator","bufferWhen_BufferWhenSubscriber","BufferWhenSubscriber","subscribing","complete","closingSubscription","catchError","selector","operator","CatchOperator","caught","catchError_CatchSubscriber","CatchSubscriber","isStopped","result","err2","_unsubscribeAndRecycle","innerSubscriber","combineAll","project","combineLatestfrom_dll_reference_vendor_51d43e143a4cc0626b2a","combineLatest","_i","observables","pop","isArrayfrom_dll_reference_vendor_51d43e143a4cc0626b2a","slice","fromfrom_dll_reference_vendor_51d43e143a4cc0626b2a","concat","concatfrom_dll_reference_vendor_51d43e143a4cc0626b2a","apply","concatMap","resultSelector","mergeMapfrom_dll_reference_vendor_51d43e143a4cc0626b2a","concatMapTo","innerObservable","count_count","predicate","CountOperator","count_CountSubscriber","CountSubscriber","_tryPredicate","index","debounce","DebounceOperator","debounce_DebounceSubscriber","DebounceSubscriber","_tryNext","emitValue","durationSubscription","debounceTime","dueTime","DebounceTimeOperator","debounceTime_DebounceTimeSubscriber","DebounceTimeSubscriber","lastValue","clearDebounce","debouncedSubscription","dispatchNext","debouncedNext","defaultIfEmpty","defaultValue","DefaultIfEmptyOperator","defaultIfEmpty_DefaultIfEmptySubscriber","DefaultIfEmptySubscriber","isEmpty","isDate","Date","isNaN","delay_delay","delay","delayFor","now","Math","abs","DelayOperator","delay_DelaySubscriber","DelaySubscriber","active","errored","dispatch","queue","time","notification","observe","delay_1","max","_schedule","scheduleNotification","message","DelayMessage","Notificationfrom_dll_reference_vendor_51d43e143a4cc0626b2a","createNext","createComplete","delayWhen","delayDurationSelector","subscriptionDelay","delayWhen_SubscriptionDelayObservable","DelayWhenOperator","delayWhen_DelayWhenSubscriber","DelayWhenSubscriber","completed","delayNotifierSubscriptions","_innerValue","_outerIndex","_innerIndex","removeSubscription","tryComplete","notifyError","delayNotifier","tryDelay","subscriptionIdx","notifierSubscription","OuterSubscriberfrom_dll_reference_vendor_51d43e143a4cc0626b2a","SubscriptionDelayObservable","_subscribe","delayWhen_SubscriptionDelaySubscriber","Observablefrom_dll_reference_vendor_51d43e143a4cc0626b2a","SubscriptionDelaySubscriber","parent","unused","subscribeToSource","sourceSubscribed","dematerialize","DeMaterializeOperator","dematerialize_DeMaterializeSubscriber","DeMaterializeSubscriber","distinct","keySelector","flushes","DistinctOperator","distinct_DistinctSubscriber","DistinctSubscriber","values","Set","clear","_useKeySelector","_finalizeNext","has","distinctUntilChanged","compare","DistinctUntilChangedOperator","distinctUntilChanged_DistinctUntilChangedSubscriber","DistinctUntilChangedSubscriber","hasKey","x","y","distinctUntilKeyChanged","throwIfEmpty","errorFactory","defaultErrorFactory","ThrowIfEmptyOperator","throwIfEmpty_ThrowIfEmptySubscriber","ThrowIfEmptySubscriber","e","take","emptyfrom_dll_reference_vendor_51d43e143a4cc0626b2a","take_TakeOperator","TakeOperator","total","ArgumentOutOfRangeErrorfrom_dll_reference_vendor_51d43e143a4cc0626b2a","take_TakeSubscriber","TakeSubscriber","elementAt","hasDefaultValue","pipe","filterfrom_dll_reference_vendor_51d43e143a4cc0626b2a","v","endWith","offrom_dll_reference_vendor_51d43e143a4cc0626b2a","array","every","thisArg","EveryOperator","observer","every_EverySubscriber","EverySubscriber","everyValueMatch","exhaust","SwitchFirstOperator","exhaust_SwitchFirstSubscriber","SwitchFirstSubscriber","hasCompleted","hasSubscription","exhaustMap","a","mapfrom_dll_reference_vendor_51d43e143a4cc0626b2a","b","ii","ExhaustMapOperator","exhaustMap_ExhaustMapSubscriber","ExhaustMapSubscriber","tryNext","_innerSub","expand","concurrent","ExpandOperator","expand_ExpandSubscriber","ExpandSubscriber","subscribeToProjection","finalize","callback","FinallyOperator","finalize_FinallySubscriber","FinallySubscriber","find","TypeError","FindValueOperator","yieldIndex","find_FindValueSubscriber","FindValueSubscriber","findIndex","first","identityfrom_dll_reference_vendor_51d43e143a4cc0626b2a","EmptyErrorfrom_dll_reference_vendor_51d43e143a4cc0626b2a","ignoreElements","IgnoreElementsOperator","ignoreElements_IgnoreElementsSubscriber","IgnoreElementsSubscriber","IsEmptyOperator","isEmpty_IsEmptySubscriber","IsEmptySubscriber","takeLast","takeLast_TakeLastOperator","TakeLastOperator","takeLast_TakeLastSubscriber","TakeLastSubscriber","ring","Array","idx","last","mapTo","MapToOperator","mapTo_MapToSubscriber","MapToSubscriber","materialize","MaterializeOperator","materialize_MaterializeSubscriber","MaterializeSubscriber","createError","scan","accumulator","seed","hasSeed","ScanOperator","scan_ScanSubscriber","ScanSubscriber","_seed","set","configurable","reduce","pipefrom_dll_reference_vendor_51d43e143a4cc0626b2a","acc","max_max","comparer","merge","mergefrom_dll_reference_vendor_51d43e143a4cc0626b2a","mergeMapTo","mergeScan","MergeScanOperator","mergeScan_MergeScanSubscriber","MergeScanSubscriber","ish","min_min","multicast","subjectOrSubjectFactory","subjectFactory","MulticastOperator","connectable","ConnectableObservablefrom_dll_reference_vendor_51d43e143a4cc0626b2a","subject","onErrorResumeNext","nextSources","OnErrorResumeNextOperator","onErrorResumeNext_OnErrorResumeNextSubscriber","OnErrorResumeNextSubscriber","subscribeToNextSource","pairwise","PairwiseOperator","pairwise_PairwiseSubscriber","PairwiseSubscriber","pair","hasPrev","prev","partition","notfrom_dll_reference_vendor_51d43e143a4cc0626b2a","pluck","properties","Error","props","currentProp","plucker","publish","Subjectfrom_dll_reference_vendor_51d43e143a4cc0626b2a","publishBehavior","BehaviorSubjectfrom_dll_reference_vendor_51d43e143a4cc0626b2a","publishLast","AsyncSubjectfrom_dll_reference_vendor_51d43e143a4cc0626b2a","publishReplay","windowTime","selectorOrScheduler","ReplaySubjectfrom_dll_reference_vendor_51d43e143a4cc0626b2a","race","racefrom_dll_reference_vendor_51d43e143a4cc0626b2a","repeat","RepeatOperator","repeat_RepeatSubscriber","RepeatSubscriber","repeatWhen","notifier","RepeatWhenOperator","repeatWhen_RepeatWhenSubscriber","RepeatWhenSubscriber","sourceIsBeingSubscribedTo","retries","subscribeToRetries","retriesSubscription","notifications","retry","RetryOperator","retry_RetrySubscriber","RetrySubscriber","retryWhen","RetryWhenOperator","retryWhen_RetryWhenSubscriber","RetryWhenSubscriber","errors","sample","sample_SampleOperator","SampleOperator","sampleSubscriber","sample_SampleSubscriber","SampleSubscriber","sampleTime","period","SampleTimeOperator","sampleTime_SampleTimeSubscriber","SampleTimeSubscriber","dispatchNotification","sequenceEqual","compareTo","comparator","SequenceEqualOperator","sequenceEqual_SequenceEqualSubscriber","SequenceEqualSubscriber","_a","_b","_oneComplete","emit","checkValues","areEqual","nextB","completeB","sequenceEqual_SequenceEqualCompareToSubscriber","SequenceEqualCompareToSubscriber","shareSubjectFactory","share","refCountfrom_dll_reference_vendor_51d43e143a4cc0626b2a","shareReplay","configOrBufferSize","config","refCount","_c","useRefCount","hasError","isComplete","single","SingleOperator","single_SingleSubscriber","SingleSubscriber","seenValue","applySingleValue","singleValue","skip","SkipOperator","skip_SkipSubscriber","SkipSubscriber","skipLast","skipLast_SkipLastOperator","SkipLastOperator","_skipCount","skipLast_SkipLastSubscriber","SkipLastSubscriber","_count","skipCount","_ring","currentIndex","oldValue","skipUntil","SkipUntilOperator","skipUntil_SkipUntilSubscriber","SkipUntilSubscriber","skipWhile","SkipWhileOperator","skipWhile_SkipWhileSubscriber","SkipWhileSubscriber","skipping","tryCallPredicate","Boolean","startWith","switchMap","SwitchMapOperator","switchMap_SwitchMapSubscriber","SwitchMapSubscriber","switchAll","switchMapTo","takeUntil","takeUntil_TakeUntilOperator","TakeUntilOperator","takeUntilSubscriber","takeUntil_TakeUntilSubscriber","TakeUntilSubscriber","takeWhile","inclusive","TakeWhileOperator","takeWhile_TakeWhileSubscriber","TakeWhileSubscriber","nextOrComplete","predicateResult","tap","nextOrObserver","DoOperator","tap_TapSubscriber","TapSubscriber","observerOrNext","_tapNext","noopfrom_dll_reference_vendor_51d43e143a4cc0626b2a","_tapError","_tapComplete","isFunctionfrom_dll_reference_vendor_51d43e143a4cc0626b2a","_context","defaultThrottleConfig","leading","trailing","throttle","ThrottleOperator","throttle_ThrottleSubscriber","ThrottleSubscriber","_leading","_trailing","_hasValue","_throttled","send","_sendValue","tryDurationSelector","throttlingDone","throttleTime","ThrottleTimeOperator","throttleTime_ThrottleTimeSubscriber","ThrottleTimeSubscriber","_hasTrailingValue","_trailingValue","throttleTime_dispatchNext","timeInterval","deferfrom_dll_reference_vendor_51d43e143a4cc0626b2a","current","TimeInterval","interval","timeoutWith","due","withObservable","absoluteTimeout","waitFor","TimeoutWithOperator","timeoutWith_TimeoutWithSubscriber","TimeoutWithSubscriber","scheduleTimeout","dispatchTimeout","action","timeout","timestamp","Timestamp","toArrayReducer","arr","item","toArray","window_window","windowBoundaries","window_WindowOperator","WindowOperator","windowSubscriber","window_WindowSubscriber","sourceSubscription","WindowSubscriber","openWindow","prevWindow","newWindow","windowCount","windowSize","startWindowEvery","WindowCountOperator","windowCount_WindowCountSubscriber","WindowCountSubscriber","windows","window_1","windowTime_windowTime","windowTimeSpan","windowCreationInterval","maxWindowSize","isNumericfrom_dll_reference_vendor_51d43e143a4cc0626b2a","WindowTimeOperator","windowTime_WindowTimeSubscriber","windowTime_CountedSubject","CountedSubject","_numberOfNextedValues","WindowTimeSubscriber","dispatchWindowClose","dispatchWindowCreation","dispatchWindowTimeSpanOnly","numberOfNextedValues","closeWindow","window_2","timeSpanState","windowToggle","WindowToggleOperator","windowToggle_WindowToggleSubscriber","WindowToggleSubscriber","context_3","outerIndex","innerIndex","context_4","inner","openSubscription","windowWhen","windowWhen_WindowOperator","windowWhen_WindowSubscriber","_outerValue","unsubscribeClosingNotification","closingNotification","withLatestFrom","args","WithLatestFromOperator","withLatestFrom_WithLatestFromSubscriber","WithLatestFromSubscriber","toRespond","observable","found","_tryProject","zip","zipfrom_dll_reference_vendor_51d43e143a4cc0626b2a","zipAll","concatAllfrom_dll_reference_vendor_51d43e143a4cc0626b2a","groupByfrom_dll_reference_vendor_51d43e143a4cc0626b2a","mergeAllfrom_dll_reference_vendor_51d43e143a4cc0626b2a","observeOnfrom_dll_reference_vendor_51d43e143a4cc0626b2a","subscribeOnfrom_dll_reference_vendor_51d43e143a4cc0626b2a","oauth_1","serverOptions","currencyCode","deploymentType","freeMode","oAuthConfigs","OAuth2Provider","TrimbleConnect","authorizeUri","clientId","provider","redirectUri","publishedDataHost","stripePublicApiKey","uri","setServerOptions","newServerOptions","getServerOptions","qs_1","Rx","operators_1","createAuthorizationUri","scope","Google","tenantDomain","prompt","queryParams","client_id","redirect_uri","response_type","join","access_type","serializedParams","stringify","loginWithOAuth2","options","Observable","cleanup","receivePopupMessage","event","obj","origin","location","data","success","authorizationCode","authorizationUri","popup","open","addEventListener","pollTimer","setInterval","errorMessage","removeEventListener","clearInterval","close","map","__assign","sendResultMessage","params","parse","search","ignoreQueryPrefix","error_description","code","opener","postMessage","React","ThreeDots_1","PleaseWait","createElement","className","children","ThreeDots","color","height","width","abort_controller_1","domain_task_1","rxjs_1","createFetchStream","url","init","controller","windowIfDefined","AbortController","fetchTask","fetch","signal","then","response","ok","json","planData","text","errorString","catch","addTask","abort","PlanActionType","PlanActions","connected_react_router_1","redux_observable_1","routes_1","fetch_1","state_1","initialState","plans","isLoading","isPaying","clearError","actionCreator","CLEAR_ERROR","empty","loadPlan","LOAD_PLAN","withPayload","payForPlan","PAY_FOR_PLAN","paymentError","PAYMENT_ERROR","receivePlan","RECEIVE_PLAN_DATA","setCurrentPlan","SET_CURRENT_PLAN","useCachedPlan","USE_CACHED_PLAN_DATA","viewPlanMatcher","createMatchSelector","viewPlanPath","planEpic","combineEpics","action$","ofType","payload","guid","flatMap","method","headers","Content-Type","body","stripeToken","stripeEmail","email","selectedFolderId","selectedProject","rootFolderId","of","LOCATION_CHANGE","viewPlanMatch","router","store","reducer","incomingAction","type","errorText","currentPlanGuid","withPayloadAndMeta","meta","LoginButton_1","version_1","Layout","href","src","alt","skipUser","__spreadArrays","ConnectedLoginButton","buildVersion","replace","String","percentTwenties","Format","default","formatters","RFC1738","RFC3986","UserActionType","UserActions","userState_1","serverOptions_1","profile","isLoggingIn","loginEnabled","enableLogins","ENABLE_LOGINS","loadUser","LOAD_USER_STATE","loginResult","LOGIN_RESULT","loginStart","LOGIN_START","logout","LOGOUT","logoutActual","LOGOUT_ACTUAL","loadUserStateEpic","savedState","loadUserState","clientToken","loginEpic","selectedLoginOptions","saveUserState","username","console","log","logoutEpic","userEpic","loginError","removeUserState","react_router_dom_1","Home_1","NotFound_1","OAuth2Redirect_1","ViewPlan_1","routes","Switch","Route","exact","path","component","ConnectedHome","OAuth2Redirect","ConnectedViewPlan","NotFound","UploadActionType","UploadActions","messageQueue_1","plans_1","isUploading","cancelUpload","CANCEL","uploadError","UPLOAD_ERROR","uploadFinished","UPLOAD_FINISHED","uploadPlan","UPLOAD_PLAN","uploadStatus","UPLOAD_STATUS","uploadEpic","FormData","append","file","filename","uploadResult","createQueueStream","messageQueue","filter","status","uploadMessage","formats","isArray","hexTable","toString","toUpperCase","arrayToObject","plainObjects","assign","target","keys","combine","compact","prop","refs","j","val","compacted","compactQueue","decode","str","decoder","charset","strWithoutPlus","unescape","decodeURIComponent","encode","defaultEncoder","kind","format","string","escape","$0","parseInt","out","charCodeAt","charAt","isBuffer","constructor","isRegExp","maybeMap","fn","mapped","allowPrototypes","mergeTarget","forEach","targetItem","react_helmet_1","Layout_1","history_1","ReactDOM","react_hot_loader_1","react_redux_1","ajax_1","configureStore_1","RoutesModule","user_1","baseUrl","document","getElementsByTagName","getAttribute","history","createBrowserHistory","basename","initialReduxState","configureStore","hydrate","AppContainer","Provider","ConnectedRouter","getElementById","ajax","responseType","reload","warnAboutHMRDisabled","Children","only","hot","shouldWrapWithAppContainer","areComponentsEqual","setConfig","cold","configureComponent","redux_1","StoreModule","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","epicMiddleware","createEpicMiddleware","createStore","createRootReducer","rootInitialState","applyMiddleware","routerMiddleware","epic$","BehaviorSubject","rootEpic","run","store$","epic","Plans","Upload","User","upload","user","combineReducers","connectRouter","upload_1","PleaseWait_1","connect","buttonHandler","useCallback","filenameElement","click","hiddenFileHandler","files","onClick","renderUploadingProgress","renderError","encType","accept","id","onChange","autoComplete","renderUploadForm","client_sqs_1","queueUrl","receiveCommand","ReceiveMessageCommand","QueueUrl","MaxNumberOfMessages","WaitTimeSeconds","sqs","SQSClient","credentials","accessKeyId","secretAccessKey","region","command","makeReceiveRequest","Messages","from","ReceiptHandle","makeDeleteRequest","DeleteMessageCommand","Body","JSON","GoogleButton_1","loginStartGoogle","loginStartProcore","Procore","loginStartTrimble","loginOptions","Fragment","GoogleButton","size","utils","arrayPrefixGenerators","brackets","prefix","comma","indices","pushToArray","valueOrArray","toISO","toISOString","defaultFormat","defaults","addQueryPrefix","allowDots","charsetSentinel","delimiter","encoder","encodeValuesOnly","formatter","serializeDate","date","skipNulls","strictNullHandling","generateArrayPrefix","sort","objKeys","keyPrefix","opts","normalizeStringifyOptions","arrayFormat","joined","arrayLimit","depth","interpretNumericEntities","parameterLimit","parseArrays","numberStr","fromCharCode","parseArrayValue","split","parseKeys","givenKey","valuesParsed","child","segment","exec","chain","leaf","root","cleanRoot","0","parseObject","normalizeParseOptions","tempObj","cleanStr","limit","Infinity","parts","skipIndex","part","bracketEqualsPos","pos","encodedVal","parseValues","newObj","userStateKey","localStorage","removeItem","userStateJson","getItem","parsedData","setItem","GoogleLogo_1","pixelSize","spanStyle","marginLeft","marginRight","fontFamily","fontSize","lineHeight","marginBottom","style","padding","background","display","GoogleLogo","margin","viewBox","version","xmlns","transform","fill","fillRule","stroke","strokeWidth","cx","cy","attributeName","to","begin","dur","calcMode","repeatCount","useEffect","CheckoutFormContainer_1","LayeredDetailList_1","PlanDetailList_1","countSpots","confidentOnly","spotPages","sum","page","spotsConfident","spotsFound","NoResultsFooter","NavLink","ResultsFooter","available","stripeSubmitCallback","nothing","nameWithoutExtension","LayeredDetailList","renderNothing","renderNothingLoginRequired","tableData","tableCount","PlanDetailList","renderFreeMode","renderFreeModeLoginRequired","free","renderFree","paid","renderPaid","CheckoutFormContainer","costDisplay","isTrimbleEmail","onSubmit","renderUnpaid","react_stripe_js_1","CheckoutForm_1","useState","stripeInstance","setStripeInstance","loadStripe","stripe","Elements","CheckoutForm","classnames","Button_1","Checkbox_1","Textbox_1","TrimbleProjectList_1","useTrimble","setUseTrimble","typedEmail","setTypedEmail","setSelectedProject","_d","waitingForStripe","setWaitingForStripe","_e","internalErrorText","setInternalErrorText","clearErrorCallback","useStripe","stripeElements","useElements","submitCallback","cardElement","getElement","CardElement","createToken","token","createCallback","classes","button","Button","Textbox","label","Checkbox","checked","TrimbleProjectList","onSelection","checkboxHandler","htmlFor","textboxHandler","Picklist_1","projects","setProjects","loadedProjects","_err","Picklist","items","selectedItem","picklistHandler","outputAvailable","layeredPages","pageNumber","dxfOutputFile","pdfOutputFile","needToPay","showDetails","featureCount","featurePages","featureTypes","featuresByPage","featurePage","featuresIdentified","feature","toLocaleLowerCase","tablesFound","crossSectionData","crossSectionsFound","crossSectionCount","spotsByPage","_f","spotPage","spotsUncertain","spotsUnmatched","layers","layerCount","vectors","vectorCount","excelOutputFile","ajaxGet","AjaxObservable_AjaxObservable","ajaxPost","ajaxDelete","ajaxPut","ajaxPatch","ajaxGetJSON","mapResponse","AjaxObservable","urlOrRequest","async","createXHR","crossDomain","XMLHttpRequest","XDomainRequest","getCORSRequest","progId","progIds","ActiveXObject","getXMLHttpRequest","withCredentials","request","AjaxObservable_AjaxSubscriber","post","delete","put","patch","getJSON","AjaxSubscriber","done","getHeader","serializeBody","xhr","AjaxResponse","password","setupEvents","setHeaders","contentType","splitIndex","substring","encodeURIComponent","setRequestHeader","headerName","toLowerCase","progressSubscriber","xhrTimeout","AjaxTimeoutError","ontimeout","xhrProgress_1","xhrError_1","onprogress","AjaxError","onerror","xhrReadyStateChange","xhrLoad","readyState","status_1","responseText","onreadystatechange","onload","originalEvent","parseXhrResponse","AjaxErrorImpl","parseJson","responseXML"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE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B,oBAClBW,EAAO9nC,EAAYgmC,EAAAX,GAS1B,OARE94B,MAAKnb,KAAM2C,MACXA,KAAKiM,QAAUA,EACfjM,KAAKvC,KAAM,YACXuC,KAAKiyC,MACLjyC,KAAKsxC,QAAQA,EACbtxC,KAAAm4B,OAAY8Z,EAAA9Z,OACbn4B,KAAA48B,aAAAqV,EAAArV,cAAA0U,EAAA1U,aACD58B,KAAAouB,SAAc0lB,EAAmB9zC,KAAO48B,aAAgBqV,GACjDjyC,KAKT,OAFA+zC,EAAaj1C,UAAgDlB,OAAAY,OAAAga,MAAA1Z,WAEpDi1C,EAfkB,cA6BZnX,EAAeqV,UACxBrV,OACE,OACF,gBAXHqV,sBAAMA,EACEA,EAAIrV,aAAoBqV,EAAA7jB,SAAgBmT,KAAQjV,MAAA2lB,EAAA7jB,UAAA6jB,EAAAyB,cAAA,QAIlDnS,KAAAjV,MAAiB2lB,EAAAyB,cAAyC,QAMlDM,CAAC/B,GACZ,UAGI,OAAQA,EAACgC,YAChB,WACF,QASQ,mBAAmDhC,EAAEA,EAAoB7jB,SAAA6jB,EAAAyB,6BAGpEzB,EAAAX,UACb8B,EAAA/1C,KAAA2C,KAAA,eAAAiyC,EAAAX,GAODtxC,KAAOvC,KAAM,yDCriBbX,EAAAU,EAAA4B,EAAA,yBAAAu9B,IAAA7/B,EAAAU,EAAA4B,EAAA,iCAAA8yC,IAAAp1C,EAAAU,EAAA4B,EAAA,8BAAAg0C,IAAAt2C,EAAAU,EAAA4B,EAAA,qCAAA2zC","file":"main-client.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 74);\n","module.exports = (__webpack_require__(3))(2);","module.exports = (__webpack_require__(3))(56);","module.exports = (__webpack_require__(3))(9);","module.exports = vendor_51d43e143a4cc0626b2a;","module.exports = (__webpack_require__(3))(6);","module.exports = (__webpack_require__(3))(53);","module.exports = (__webpack_require__(3))(17);","module.exports = (__webpack_require__(3))(26);","declare let global: any;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\ndeclare var WorkerGlobalScope: any;\n// CommonJS / Node have global context exposed as \"global\" variable.\n// We don't want to include the whole node.d.ts this this compilation unit so we'll just fake\n// the global \"global\" var for now.\n\nconst __window = typeof window !== 'undefined' && window;\nconst __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nconst __global = typeof global !== 'undefined' && global;\nconst _root: any = __window || __global || __self;\n\n// Workaround Closure Compiler restriction: The body of a goog.module cannot use throw.\n// This is needed when used with angular/tsickle which inserts a goog.module statement.\n// Wrap in IIFE\n(function () {\n if (!_root) {\n throw new Error('RxJS could not find any global context (window, self, global)');\n }\n})();\n\nexport { _root as root };","module.exports = (__webpack_require__(3))(148);","module.exports = (__webpack_require__(3))(152);","module.exports = (__webpack_require__(3))(149);","module.exports = (__webpack_require__(3))(276);","module.exports = (__webpack_require__(3))(132);","module.exports = (__webpack_require__(3))(176);","module.exports = (__webpack_require__(3))(10);","module.exports = (__webpack_require__(3))(25);","module.exports = (__webpack_require__(3))(277);","module.exports = (__webpack_require__(3))(21);","module.exports = (__webpack_require__(3))(84);","module.exports = (__webpack_require__(3))(14);","module.exports = (__webpack_require__(3))(282);","module.exports = (__webpack_require__(3))(60);","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { MonoTypeOperatorFunction, SubscribableOrPromise, TeardownLogic } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\n/**\n * Ignores source values for a duration determined by another Observable, then\n * emits the most recent value from the source Observable, then repeats this\n * process.\n *\n * It's like {@link auditTime}, but the silencing\n * duration is determined by a second Observable.\n *\n * ![](audit.png)\n *\n * `audit` is similar to `throttle`, but emits the last value from the silenced\n * time window, instead of the first value. `audit` emits the most recent value\n * from the source Observable on the output Observable as soon as its internal\n * timer becomes disabled, and ignores source values while the timer is enabled.\n * Initially, the timer is disabled. As soon as the first source value arrives,\n * the timer is enabled by calling the `durationSelector` function with the\n * source value, which returns the \"duration\" Observable. When the duration\n * Observable emits a value or completes, the timer is disabled, then the most\n * recent source value is emitted on the output Observable, and this process\n * repeats for the next source value.\n *\n * ## Example\n *\n * Emit clicks at a rate of at most one click per second\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { audit } from 'rxjs/operators'\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(audit(ev => interval(1000)));\n * result.subscribe(x => console.log(x));\n * ```\n * @see {@link auditTime}\n * @see {@link debounce}\n * @see {@link delayWhen}\n * @see {@link sample}\n * @see {@link throttle}\n *\n * @param {function(value: T): SubscribableOrPromise} durationSelector A function\n * that receives a value from the source Observable, for computing the silencing\n * duration, returned as an Observable or a Promise.\n * @return {Observable} An Observable that performs rate-limiting of\n * emissions from the source Observable.\n * @method audit\n * @owner Observable\n */\nexport function audit(durationSelector: (value: T) => SubscribableOrPromise): MonoTypeOperatorFunction {\n return function auditOperatorFunction(source: Observable) {\n return source.lift(new AuditOperator(durationSelector));\n };\n}\n\nclass AuditOperator implements Operator {\n constructor(private durationSelector: (value: T) => SubscribableOrPromise) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass AuditSubscriber extends SimpleOuterSubscriber {\n\n private value?: T;\n private hasValue: boolean = false;\n private throttled?: Subscription;\n\n constructor(destination: Subscriber,\n private durationSelector: (value: T) => SubscribableOrPromise) {\n super(destination);\n }\n\n protected _next(value: T): void {\n this.value = value;\n this.hasValue = true;\n if (!this.throttled) {\n let duration;\n try {\n const { durationSelector } = this;\n duration = durationSelector(value);\n } catch (err) {\n return this.destination.error!(err);\n }\n const innerSubscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));\n if (!innerSubscription || innerSubscription.closed) {\n this.clearThrottle();\n } else {\n this.add(this.throttled = innerSubscription);\n }\n }\n }\n\n clearThrottle() {\n const { value, hasValue, throttled } = this;\n if (throttled) {\n this.remove(throttled);\n this.throttled = undefined;\n throttled.unsubscribe();\n }\n if (hasValue) {\n this.value = undefined;\n this.hasValue = false;\n this.destination.next!(value);\n }\n }\n\n notifyNext(): void {\n this.clearThrottle();\n }\n\n notifyComplete(): void {\n this.clearThrottle();\n }\n}\n","import { async } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nimport { MonoTypeOperatorFunction, SchedulerLike } from '../types';\n\n/**\n * Ignores source values for `duration` milliseconds, then emits the most recent\n * value from the source Observable, then repeats this process.\n *\n * When it sees a source value, it ignores that plus\n * the next ones for `duration` milliseconds, and then it emits the most recent\n * value from the source.\n *\n * ![](auditTime.png)\n *\n * `auditTime` is similar to `throttleTime`, but emits the last value from the\n * silenced time window, instead of the first value. `auditTime` emits the most\n * recent value from the source Observable on the output Observable as soon as\n * its internal timer becomes disabled, and ignores source values while the\n * timer is enabled. Initially, the timer is disabled. As soon as the first\n * source value arrives, the timer is enabled. After `duration` milliseconds (or\n * the time unit determined internally by the optional `scheduler`) has passed,\n * the timer is disabled, then the most recent source value is emitted on the\n * output Observable, and this process repeats for the next source value.\n * Optionally takes a {@link SchedulerLike} for managing timers.\n *\n * ## Example\n *\n * Emit clicks at a rate of at most one click per second\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { auditTime } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(auditTime(1000));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link audit}\n * @see {@link debounceTime}\n * @see {@link delay}\n * @see {@link sampleTime}\n * @see {@link throttleTime}\n *\n * @param {number} duration Time to wait before emitting the most recent source\n * value, measured in milliseconds or the time unit determined internally\n * by the optional `scheduler`.\n * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for\n * managing the timers that handle the rate-limiting behavior.\n * @return {Observable} An Observable that performs rate-limiting of\n * emissions from the source Observable.\n * @method auditTime\n * @owner Observable\n */\nexport function auditTime(duration: number, scheduler: SchedulerLike = async): MonoTypeOperatorFunction {\n return audit(() => timer(duration, scheduler));\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { OperatorFunction } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\n/**\n * Buffers the source Observable values until `closingNotifier` emits.\n *\n * Collects values from the past as an array, and emits\n * that array only when another Observable emits.\n *\n * ![](buffer.png)\n *\n * Buffers the incoming Observable values until the given `closingNotifier`\n * Observable emits a value, at which point it emits the buffer on the output\n * Observable and starts a new buffer internally, awaiting the next time\n * `closingNotifier` emits.\n *\n * ## Example\n *\n * On every click, emit array of most recent interval events\n *\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { buffer } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const intervalEvents = interval(1000);\n * const buffered = intervalEvents.pipe(buffer(clicks));\n * buffered.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link bufferCount}\n * @see {@link bufferTime}\n * @see {@link bufferToggle}\n * @see {@link bufferWhen}\n * @see {@link window}\n *\n * @param {Observable} closingNotifier An Observable that signals the\n * buffer to be emitted on the output Observable.\n * @return {Observable} An Observable of buffers, which are arrays of\n * values.\n * @method buffer\n * @owner Observable\n */\nexport function buffer(closingNotifier: Observable): OperatorFunction {\n return function bufferOperatorFunction(source: Observable) {\n return source.lift(new BufferOperator(closingNotifier));\n };\n}\n\nclass BufferOperator implements Operator {\n\n constructor(private closingNotifier: Observable) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass BufferSubscriber extends SimpleOuterSubscriber {\n private buffer: T[] = [];\n\n constructor(destination: Subscriber, closingNotifier: Observable) {\n super(destination);\n this.add(innerSubscribe(closingNotifier, new SimpleInnerSubscriber(this)));\n }\n\n protected _next(value: T) {\n this.buffer.push(value);\n }\n\n notifyNext(): void {\n const buffer = this.buffer;\n this.buffer = [];\n this.destination.next!(buffer);\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { OperatorFunction, TeardownLogic } from '../types';\n\n/**\n * Buffers the source Observable values until the size hits the maximum\n * `bufferSize` given.\n *\n * Collects values from the past as an array, and emits\n * that array only when its size reaches `bufferSize`.\n *\n * ![](bufferCount.png)\n *\n * Buffers a number of values from the source Observable by `bufferSize` then\n * emits the buffer and clears it, and starts a new buffer each\n * `startBufferEvery` values. If `startBufferEvery` is not provided or is\n * `null`, then new buffers are started immediately at the start of the source\n * and when each buffer closes and is emitted.\n *\n * ## Examples\n *\n * Emit the last two click events as an array\n *\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { bufferCount } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const buffered = clicks.pipe(bufferCount(2));\n * buffered.subscribe(x => console.log(x));\n * ```\n *\n * On every click, emit the last two click events as an array\n *\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { bufferCount } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const buffered = clicks.pipe(bufferCount(2, 1));\n * buffered.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link buffer}\n * @see {@link bufferTime}\n * @see {@link bufferToggle}\n * @see {@link bufferWhen}\n * @see {@link pairwise}\n * @see {@link windowCount}\n *\n * @param {number} bufferSize The maximum size of the buffer emitted.\n * @param {number} [startBufferEvery] Interval at which to start a new buffer.\n * For example if `startBufferEvery` is `2`, then a new buffer will be started\n * on every other value from the source. A new buffer is started at the\n * beginning of the source by default.\n * @return {Observable} An Observable of arrays of buffered values.\n * @method bufferCount\n * @owner Observable\n */\nexport function bufferCount(bufferSize: number, startBufferEvery: number = null): OperatorFunction {\n return function bufferCountOperatorFunction(source: Observable) {\n return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));\n };\n}\n\nclass BufferCountOperator implements Operator {\n private subscriberClass: any;\n\n constructor(private bufferSize: number, private startBufferEvery: number) {\n if (!startBufferEvery || bufferSize === startBufferEvery) {\n this.subscriberClass = BufferCountSubscriber;\n } else {\n this.subscriberClass = BufferSkipCountSubscriber;\n }\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass BufferCountSubscriber extends Subscriber {\n private buffer: T[] = [];\n\n constructor(destination: Subscriber, private bufferSize: number) {\n super(destination);\n }\n\n protected _next(value: T): void {\n const buffer = this.buffer;\n\n buffer.push(value);\n\n if (buffer.length == this.bufferSize) {\n this.destination.next(buffer);\n this.buffer = [];\n }\n }\n\n protected _complete(): void {\n const buffer = this.buffer;\n if (buffer.length > 0) {\n this.destination.next(buffer);\n }\n super._complete();\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass BufferSkipCountSubscriber extends Subscriber {\n private buffers: Array = [];\n private count: number = 0;\n\n constructor(destination: Subscriber, private bufferSize: number, private startBufferEvery: number) {\n super(destination);\n }\n\n protected _next(value: T): void {\n const { bufferSize, startBufferEvery, buffers, count } = this;\n\n this.count++;\n if (count % startBufferEvery === 0) {\n buffers.push([]);\n }\n\n for (let i = buffers.length; i--; ) {\n const buffer = buffers[i];\n buffer.push(value);\n if (buffer.length === bufferSize) {\n buffers.splice(i, 1);\n this.destination.next(buffer);\n }\n }\n }\n\n protected _complete(): void {\n const { buffers, destination } = this;\n\n while (buffers.length > 0) {\n let buffer = buffers.shift();\n if (buffer.length > 0) {\n destination.next(buffer);\n }\n }\n super._complete();\n }\n\n}\n","import { Operator } from '../Operator';\nimport { async } from '../scheduler/async';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { isScheduler } from '../util/isScheduler';\nimport { OperatorFunction, SchedulerAction, SchedulerLike } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function bufferTime(bufferTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction;\nexport function bufferTime(bufferTimeSpan: number, bufferCreationInterval: number | null | undefined, scheduler?: SchedulerLike): OperatorFunction;\nexport function bufferTime(bufferTimeSpan: number, bufferCreationInterval: number | null | undefined, maxBufferSize: number, scheduler?: SchedulerLike): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Buffers the source Observable values for a specific time period.\n *\n * Collects values from the past as an array, and emits\n * those arrays periodically in time.\n *\n * ![](bufferTime.png)\n *\n * Buffers values from the source for a specific time duration `bufferTimeSpan`.\n * Unless the optional argument `bufferCreationInterval` is given, it emits and\n * resets the buffer every `bufferTimeSpan` milliseconds. If\n * `bufferCreationInterval` is given, this operator opens the buffer every\n * `bufferCreationInterval` milliseconds and closes (emits and resets) the\n * buffer every `bufferTimeSpan` milliseconds. When the optional argument\n * `maxBufferSize` is specified, the buffer will be closed either after\n * `bufferTimeSpan` milliseconds or when it contains `maxBufferSize` elements.\n *\n * ## Examples\n *\n * Every second, emit an array of the recent click events\n *\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { bufferTime } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const buffered = clicks.pipe(bufferTime(1000));\n * buffered.subscribe(x => console.log(x));\n * ```\n *\n * Every 5 seconds, emit the click events from the next 2 seconds\n *\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { bufferTime } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const buffered = clicks.pipe(bufferTime(2000, 5000));\n * buffered.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link buffer}\n * @see {@link bufferCount}\n * @see {@link bufferToggle}\n * @see {@link bufferWhen}\n * @see {@link windowTime}\n *\n * @param {number} bufferTimeSpan The amount of time to fill each buffer array.\n * @param {number} [bufferCreationInterval] The interval at which to start new\n * buffers.\n * @param {number} [maxBufferSize] The maximum buffer size.\n * @param {SchedulerLike} [scheduler=async] The scheduler on which to schedule the\n * intervals that determine buffer boundaries.\n * @return {Observable} An observable of arrays of buffered values.\n * @method bufferTime\n * @owner Observable\n */\nexport function bufferTime(bufferTimeSpan: number): OperatorFunction {\n let length: number = arguments.length;\n\n let scheduler: SchedulerLike = async;\n if (isScheduler(arguments[arguments.length - 1])) {\n scheduler = arguments[arguments.length - 1];\n length--;\n }\n\n let bufferCreationInterval: number = null;\n if (length >= 2) {\n bufferCreationInterval = arguments[1];\n }\n\n let maxBufferSize: number = Number.POSITIVE_INFINITY;\n if (length >= 3) {\n maxBufferSize = arguments[2];\n }\n\n return function bufferTimeOperatorFunction(source: Observable) {\n return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));\n };\n}\n\nclass BufferTimeOperator implements Operator {\n constructor(private bufferTimeSpan: number,\n private bufferCreationInterval: number,\n private maxBufferSize: number,\n private scheduler: SchedulerLike) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new BufferTimeSubscriber(\n subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler\n ));\n }\n}\n\nclass Context {\n buffer: T[] = [];\n closeAction: Subscription;\n}\n\ninterface DispatchCreateArg {\n bufferTimeSpan: number;\n bufferCreationInterval: number;\n subscriber: BufferTimeSubscriber;\n scheduler: SchedulerLike;\n}\n\ninterface DispatchCloseArg {\n subscriber: BufferTimeSubscriber;\n context: Context;\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass BufferTimeSubscriber extends Subscriber {\n private contexts: Array> = [];\n private timespanOnly: boolean;\n\n constructor(destination: Subscriber,\n private bufferTimeSpan: number,\n private bufferCreationInterval: number,\n private maxBufferSize: number,\n private scheduler: SchedulerLike) {\n super(destination);\n const context = this.openContext();\n this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;\n if (this.timespanOnly) {\n const timeSpanOnlyState = { subscriber: this, context, bufferTimeSpan };\n this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));\n } else {\n const closeState = { subscriber: this, context };\n const creationState: DispatchCreateArg = { bufferTimeSpan, bufferCreationInterval, subscriber: this, scheduler };\n this.add(context.closeAction = scheduler.schedule>(dispatchBufferClose, bufferTimeSpan, closeState));\n this.add(scheduler.schedule>(dispatchBufferCreation, bufferCreationInterval, creationState));\n }\n }\n\n protected _next(value: T) {\n const contexts = this.contexts;\n const len = contexts.length;\n let filledBufferContext: Context;\n for (let i = 0; i < len; i++) {\n const context = contexts[i];\n const buffer = context.buffer;\n buffer.push(value);\n if (buffer.length == this.maxBufferSize) {\n filledBufferContext = context;\n }\n }\n\n if (filledBufferContext) {\n this.onBufferFull(filledBufferContext);\n }\n }\n\n protected _error(err: any) {\n this.contexts.length = 0;\n super._error(err);\n }\n\n protected _complete() {\n const { contexts, destination } = this;\n while (contexts.length > 0) {\n const context = contexts.shift();\n destination.next(context.buffer);\n }\n super._complete();\n }\n\n /** @deprecated This is an internal implementation detail, do not use. */\n _unsubscribe() {\n this.contexts = null;\n }\n\n protected onBufferFull(context: Context) {\n this.closeContext(context);\n const closeAction = context.closeAction;\n closeAction.unsubscribe();\n this.remove(closeAction);\n\n if (!this.closed && this.timespanOnly) {\n context = this.openContext();\n const bufferTimeSpan = this.bufferTimeSpan;\n const timeSpanOnlyState = { subscriber: this, context, bufferTimeSpan };\n this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));\n }\n }\n\n openContext(): Context {\n const context: Context = new Context();\n this.contexts.push(context);\n return context;\n }\n\n closeContext(context: Context) {\n this.destination.next(context.buffer);\n const contexts = this.contexts;\n\n const spliceIndex = contexts ? contexts.indexOf(context) : -1;\n if (spliceIndex >= 0) {\n contexts.splice(contexts.indexOf(context), 1);\n }\n }\n}\n\nfunction dispatchBufferTimeSpanOnly(this: SchedulerAction, state: any) {\n const subscriber: BufferTimeSubscriber = state.subscriber;\n\n const prevContext = state.context;\n if (prevContext) {\n subscriber.closeContext(prevContext);\n }\n\n if (!subscriber.closed) {\n state.context = subscriber.openContext();\n state.context.closeAction = this.schedule(state, state.bufferTimeSpan);\n }\n}\n\nfunction dispatchBufferCreation(this: SchedulerAction>, state: DispatchCreateArg) {\n const { bufferCreationInterval, bufferTimeSpan, subscriber, scheduler } = state;\n const context = subscriber.openContext();\n const action = >>this;\n if (!subscriber.closed) {\n subscriber.add(context.closeAction = scheduler.schedule>(dispatchBufferClose, bufferTimeSpan, { subscriber, context }));\n action.schedule(state, bufferCreationInterval);\n }\n}\n\nfunction dispatchBufferClose(arg: DispatchCloseArg) {\n const { subscriber, context } = arg;\n subscriber.closeContext(context);\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { OperatorFunction, SubscribableOrPromise } from '../types';\n\n/**\n * Buffers the source Observable values starting from an emission from\n * `openings` and ending when the output of `closingSelector` emits.\n *\n * Collects values from the past as an array. Starts\n * collecting only when `opening` emits, and calls the `closingSelector`\n * function to get an Observable that tells when to close the buffer.\n *\n * ![](bufferToggle.png)\n *\n * Buffers values from the source by opening the buffer via signals from an\n * Observable provided to `openings`, and closing and sending the buffers when\n * a Subscribable or Promise returned by the `closingSelector` function emits.\n *\n * ## Example\n *\n * Every other second, emit the click events from the next 500ms\n *\n * ```ts\n * import { fromEvent, interval, EMPTY } from 'rxjs';\n * import { bufferToggle } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const openings = interval(1000);\n * const buffered = clicks.pipe(bufferToggle(openings, i =>\n * i % 2 ? interval(500) : EMPTY\n * ));\n * buffered.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link buffer}\n * @see {@link bufferCount}\n * @see {@link bufferTime}\n * @see {@link bufferWhen}\n * @see {@link windowToggle}\n *\n * @param {SubscribableOrPromise} openings A Subscribable or Promise of notifications to start new\n * buffers.\n * @param {function(value: O): SubscribableOrPromise} closingSelector A function that takes\n * the value emitted by the `openings` observable and returns a Subscribable or Promise,\n * which, when it emits, signals that the associated buffer should be emitted\n * and cleared.\n * @return {Observable} An observable of arrays of buffered values.\n * @method bufferToggle\n * @owner Observable\n */\nexport function bufferToggle(\n openings: SubscribableOrPromise,\n closingSelector: (value: O) => SubscribableOrPromise\n): OperatorFunction {\n return function bufferToggleOperatorFunction(source: Observable) {\n return source.lift(new BufferToggleOperator(openings, closingSelector));\n };\n}\n\nclass BufferToggleOperator implements Operator {\n\n constructor(private openings: SubscribableOrPromise,\n private closingSelector: (value: O) => SubscribableOrPromise) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));\n }\n}\n\ninterface BufferContext {\n buffer: T[];\n subscription: Subscription;\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass BufferToggleSubscriber extends OuterSubscriber {\n private contexts: Array> = [];\n\n constructor(destination: Subscriber,\n openings: SubscribableOrPromise,\n private closingSelector: (value: O) => SubscribableOrPromise | void) {\n super(destination);\n this.add(subscribeToResult(this, openings));\n }\n\n protected _next(value: T): void {\n const contexts = this.contexts;\n const len = contexts.length;\n for (let i = 0; i < len; i++) {\n contexts[i].buffer.push(value);\n }\n }\n\n protected _error(err: any): void {\n const contexts = this.contexts;\n while (contexts.length > 0) {\n const context = contexts.shift()!;\n context.subscription.unsubscribe();\n context.buffer = null!;\n context.subscription = null!;\n }\n this.contexts = null!;\n super._error(err);\n }\n\n protected _complete(): void {\n const contexts = this.contexts;\n while (contexts.length > 0) {\n const context = contexts.shift()!;\n this.destination.next!(context.buffer);\n context.subscription.unsubscribe();\n context.buffer = null!;\n context.subscription = null!;\n }\n this.contexts = null!;\n super._complete();\n }\n\n notifyNext(outerValue: any, innerValue: O): void {\n outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);\n }\n\n notifyComplete(innerSub: InnerSubscriber): void {\n this.closeBuffer(( innerSub).context);\n }\n\n private openBuffer(value: O): void {\n try {\n const closingSelector = this.closingSelector;\n const closingNotifier = closingSelector.call(this, value);\n if (closingNotifier) {\n this.trySubscribe(closingNotifier);\n }\n } catch (err) {\n this._error(err);\n }\n }\n\n private closeBuffer(context: BufferContext): void {\n const contexts = this.contexts;\n\n if (contexts && context) {\n const { buffer, subscription } = context;\n this.destination.next!(buffer);\n contexts.splice(contexts.indexOf(context), 1);\n this.remove(subscription);\n subscription.unsubscribe();\n }\n }\n\n private trySubscribe(closingNotifier: any): void {\n const contexts = this.contexts;\n\n const buffer: Array = [];\n const subscription = new Subscription();\n const context = { buffer, subscription };\n contexts.push(context);\n\n const innerSubscription = subscribeToResult(this, closingNotifier, context as any);\n\n if (!innerSubscription || innerSubscription.closed) {\n this.closeBuffer(context);\n } else {\n (innerSubscription as any).context = context;\n\n this.add(innerSubscription);\n subscription.add(innerSubscription);\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { OperatorFunction } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\n/**\n * Buffers the source Observable values, using a factory function of closing\n * Observables to determine when to close, emit, and reset the buffer.\n *\n * Collects values from the past as an array. When it\n * starts collecting values, it calls a function that returns an Observable that\n * tells when to close the buffer and restart collecting.\n *\n * ![](bufferWhen.png)\n *\n * Opens a buffer immediately, then closes the buffer when the observable\n * returned by calling `closingSelector` function emits a value. When it closes\n * the buffer, it immediately opens a new buffer and repeats the process.\n *\n * ## Example\n *\n * Emit an array of the last clicks every [1-5] random seconds\n *\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { bufferWhen } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const buffered = clicks.pipe(bufferWhen(() =>\n * interval(1000 + Math.random() * 4000)\n * ));\n * buffered.subscribe(x => console.log(x));\n * ```\n *\n *\n * @see {@link buffer}\n * @see {@link bufferCount}\n * @see {@link bufferTime}\n * @see {@link bufferToggle}\n * @see {@link windowWhen}\n *\n * @param {function(): Observable} closingSelector A function that takes no\n * arguments and returns an Observable that signals buffer closure.\n * @return {Observable} An observable of arrays of buffered values.\n * @method bufferWhen\n * @owner Observable\n */\nexport function bufferWhen(closingSelector: () => Observable): OperatorFunction {\n return function (source: Observable) {\n return source.lift(new BufferWhenOperator(closingSelector));\n };\n}\n\nclass BufferWhenOperator implements Operator {\n\n constructor(private closingSelector: () => Observable) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass BufferWhenSubscriber extends SimpleOuterSubscriber {\n private buffer?: T[];\n private subscribing: boolean = false;\n private closingSubscription?: Subscription;\n\n constructor(destination: Subscriber, private closingSelector: () => Observable) {\n super(destination);\n this.openBuffer();\n }\n\n protected _next(value: T) {\n this.buffer!.push(value);\n }\n\n protected _complete() {\n const buffer = this.buffer;\n if (buffer) {\n this.destination.next!(buffer);\n }\n super._complete();\n }\n\n /** @deprecated This is an internal implementation detail, do not use. */\n _unsubscribe() {\n this.buffer = undefined;\n this.subscribing = false;\n }\n\n notifyNext(): void {\n this.openBuffer();\n }\n\n notifyComplete(): void {\n if (this.subscribing) {\n this.complete();\n } else {\n this.openBuffer();\n }\n }\n\n openBuffer() {\n let { closingSubscription } = this;\n\n if (closingSubscription) {\n this.remove(closingSubscription);\n closingSubscription.unsubscribe();\n }\n\n const buffer = this.buffer;\n if (this.buffer) {\n this.destination.next!(buffer);\n }\n\n this.buffer = [];\n\n let closingNotifier;\n try {\n const { closingSelector } = this;\n closingNotifier = closingSelector();\n } catch (err) {\n return this.error(err);\n }\n closingSubscription = new Subscription();\n this.closingSubscription = closingSubscription;\n this.add(closingSubscription);\n this.subscribing = true;\n closingSubscription.add(innerSubscribe(closingNotifier, new SimpleInnerSubscriber(this)));\n this.subscribing = false;\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\n\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\n\n/* tslint:disable:max-line-length */\nexport function catchError>(selector: (err: any, caught: Observable) => O): OperatorFunction>;\n/* tslint:enable:max-line-length */\n\n/**\n * Catches errors on the observable to be handled by returning a new observable or throwing an error.\n *\n * ![](catch.png)\n *\n * ## Examples\n * Continues with a different Observable when there's an error\n *\n * ```ts\n * import { of } from 'rxjs';\n * import { map, catchError } from 'rxjs/operators';\n *\n * of(1, 2, 3, 4, 5).pipe(\n * map(n => {\n * \t if (n === 4) {\n * \t throw 'four!';\n * }\n *\t return n;\n * }),\n * catchError(err => of('I', 'II', 'III', 'IV', 'V')),\n * )\n * .subscribe(x => console.log(x));\n * // 1, 2, 3, I, II, III, IV, V\n * ```\n *\n * Retries the caught source Observable again in case of error, similar to retry() operator\n *\n * ```ts\n * import { of } from 'rxjs';\n * import { map, catchError, take } from 'rxjs/operators';\n *\n * of(1, 2, 3, 4, 5).pipe(\n * map(n => {\n * \t if (n === 4) {\n * \t throw 'four!';\n * }\n * \t return n;\n * }),\n * catchError((err, caught) => caught),\n * take(30),\n * )\n * .subscribe(x => console.log(x));\n * // 1, 2, 3, 1, 2, 3, ...\n * ```\n *\n * Throws a new error when the source Observable throws an error\n *\n * ```ts\n * import { of } from 'rxjs';\n * import { map, catchError } from 'rxjs/operators';\n *\n * of(1, 2, 3, 4, 5).pipe(\n * map(n => {\n * if (n === 4) {\n * throw 'four!';\n * }\n * return n;\n * }),\n * catchError(err => {\n * throw 'error in source. Details: ' + err;\n * }),\n * )\n * .subscribe(\n * x => console.log(x),\n * err => console.log(err)\n * );\n * // 1, 2, 3, error in source. Details: four!\n * ```\n *\n * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which\n * is the source observable, in case you'd like to \"retry\" that observable by returning it again. Whatever observable\n * is returned by the `selector` will be used to continue the observable chain.\n * @return {Observable} An observable that originates from either the source or the observable returned by the\n * catch `selector` function.\n * @name catchError\n */\nexport function catchError>(\n selector: (err: any, caught: Observable) => O\n): OperatorFunction> {\n return function catchErrorOperatorFunction(source: Observable): Observable> {\n const operator = new CatchOperator(selector);\n const caught = source.lift(operator);\n return (operator.caught = caught as Observable);\n };\n}\n\nclass CatchOperator implements Operator {\n caught: Observable;\n\n constructor(private selector: (err: any, caught: Observable) => ObservableInput) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass CatchSubscriber extends SimpleOuterSubscriber {\n constructor(destination: Subscriber,\n private selector: (err: any, caught: Observable) => ObservableInput,\n private caught: Observable) {\n super(destination);\n }\n\n // NOTE: overriding `error` instead of `_error` because we don't want\n // to have this flag this subscriber as `isStopped`. We can mimic the\n // behavior of the RetrySubscriber (from the `retry` operator), where\n // we unsubscribe from our source chain, reset our Subscriber flags,\n // then subscribe to the selector result.\n error(err: any) {\n if (!this.isStopped) {\n let result: any;\n try {\n result = this.selector(err, this.caught);\n } catch (err2) {\n super.error(err2);\n return;\n }\n this._unsubscribeAndRecycle();\n const innerSubscriber = new SimpleInnerSubscriber(this);\n this.add(innerSubscriber);\n const innerSubscription = innerSubscribe(result, innerSubscriber);\n // The returned subscription will usually be the subscriber that was\n // passed. However, interop subscribers will be wrapped and for\n // unsubscriptions to chain correctly, the wrapper needs to be added, too.\n if (innerSubscription !== innerSubscriber) {\n this.add(innerSubscription);\n }\n }\n }\n}\n","import { CombineLatestOperator } from '../observable/combineLatest';\nimport { Observable } from '../Observable';\nimport { OperatorFunction, ObservableInput } from '../types';\n\nexport function combineAll(): OperatorFunction, T[]>;\nexport function combineAll(): OperatorFunction;\nexport function combineAll(project: (...values: T[]) => R): OperatorFunction, R>;\nexport function combineAll(project: (...values: Array) => R): OperatorFunction;\n/**\n * Flattens an Observable-of-Observables by applying {@link combineLatest} when the Observable-of-Observables completes.\n *\n * ![](combineAll.png)\n *\n * `combineAll` takes an Observable of Observables, and collects all Observables from it. Once the outer Observable completes,\n * it subscribes to all collected Observables and combines their values using the {@link combineLatest} strategy, such that:\n *\n * * Every time an inner Observable emits, the output Observable emits\n * * When the returned observable emits, it emits all of the latest values by:\n * * If a `project` function is provided, it is called with each recent value from each inner Observable in whatever order they\n * arrived, and the result of the `project` function is what is emitted by the output Observable.\n * * If there is no `project` function, an array of all the most recent values is emitted by the output Observable.\n *\n * ---\n *\n * ## Examples\n *\n * ### Map two click events to a finite interval Observable, then apply `combineAll`\n *\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { map, combineAll, take } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const higherOrder = clicks.pipe(\n * map(ev =>\n * interval(Math.random() * 2000).pipe(take(3))\n * ),\n * take(2)\n * );\n * const result = higherOrder.pipe(\n * combineAll()\n * );\n *\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link combineLatest}\n * @see {@link mergeAll}\n *\n * @param {function(...values: Array)} An optional function to map the most recent values from each inner Observable into a new result.\n * Takes each of the most recent values from each collected inner Observable as arguments, in order.\n * @return {Observable}\n * @name combineAll\n */\nexport function combineAll(project?: (...values: Array) => R): OperatorFunction {\n return (source: Observable) => source.lift(new CombineLatestOperator(project));\n}\n","\nimport { isArray } from '../util/isArray';\nimport { CombineLatestOperator } from '../observable/combineLatest';\nimport { from } from '../observable/from';\nimport { Observable } from '../Observable';\nimport { ObservableInput, OperatorFunction } from '../types';\n\nconst none = {};\n\n/* tslint:disable:max-line-length */\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(project: (v1: T) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, project: (v1: T, v2: T2) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, project: (v1: T, v2: T2, v3: T3) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => R): OperatorFunction ;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput): OperatorFunction ;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(...observables: Array | ((...values: Array) => R)>): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(array: ObservableInput[]): OperatorFunction>;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(array: ObservableInput[], project: (v1: T, ...values: Array) => R): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * @deprecated Deprecated in favor of static {@link combineLatest}.\n */\nexport function combineLatest(...observables: Array |\n Array> |\n ((...values: Array) => R)>): OperatorFunction {\n let project: (...values: Array) => R = null;\n if (typeof observables[observables.length - 1] === 'function') {\n project = <(...values: Array) => R>observables.pop();\n }\n\n // if the first and only other argument besides the resultSelector is an array\n // assume it's been called with `combineLatest([obs1, obs2, obs3], project)`\n if (observables.length === 1 && isArray(observables[0])) {\n observables = (observables[0]).slice();\n }\n\n return (source: Observable) => source.lift.call(from([source, ...observables]), new CombineLatestOperator(project));\n}\n","import { concat as concatStatic } from '../observable/concat';\nimport { Observable } from '../Observable';\nimport { ObservableInput, OperatorFunction, MonoTypeOperatorFunction, SchedulerLike } from '../types';\n\n/* tslint:disable:max-line-length */\n/** @deprecated Deprecated in favor of static concat. */\nexport function concat(scheduler?: SchedulerLike): MonoTypeOperatorFunction;\n/** @deprecated Deprecated in favor of static concat. */\nexport function concat(v2: ObservableInput, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static concat. */\nexport function concat(v2: ObservableInput, v3: ObservableInput, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static concat. */\nexport function concat(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static concat. */\nexport function concat(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static concat. */\nexport function concat(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static concat. */\nexport function concat(...observables: Array | SchedulerLike>): MonoTypeOperatorFunction;\n/** @deprecated Deprecated in favor of static concat. */\nexport function concat(...observables: Array | SchedulerLike>): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * @deprecated Deprecated in favor of static {@link concat}.\n */\nexport function concat(...observables: Array | SchedulerLike>): OperatorFunction {\n return (source: Observable) => source.lift.call(concatStatic(source, ...observables));\n}\n","import { mergeMap } from './mergeMap';\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function concatMap>(project: (value: T, index: number) => O): OperatorFunction>;\n/** @deprecated resultSelector no longer supported, use inner map instead */\nexport function concatMap>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction>;\n/** @deprecated resultSelector no longer supported, use inner map instead */\nexport function concatMap>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable, in a serialized fashion waiting for each one to complete before\n * merging the next.\n *\n * Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link concatAll}.\n *\n * ![](concatMap.png)\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an (so-called \"inner\") Observable. Each new inner Observable is\n * concatenated with the previous inner Observable.\n *\n * __Warning:__ if source values arrive endlessly and faster than their\n * corresponding inner Observables can complete, it will result in memory issues\n * as inner Observables amass in an unbounded buffer waiting for their turn to\n * be subscribed to.\n *\n * Note: `concatMap` is equivalent to `mergeMap` with concurrency parameter set\n * to `1`.\n *\n * ## Example\n * For each click event, tick every second from 0 to 3, with no concurrency\n *\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { concatMap, take } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n * concatMap(ev => interval(1000).pipe(take(4)))\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // (results are not concurrent)\n * // For every click on the \"document\" it will emit values 0 to 3 spaced\n * // on a 1000ms interval\n * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3\n * ```\n *\n * @see {@link concat}\n * @see {@link concatAll}\n * @see {@link concatMapTo}\n * @see {@link exhaustMap}\n * @see {@link mergeMap}\n * @see {@link switchMap}\n *\n * @param {function(value: T, ?index: number): ObservableInput} project A function\n * that, when applied to an item emitted by the source Observable, returns an\n * Observable.\n * @return {Observable} An Observable that emits the result of applying the\n * projection function (and the optional deprecated `resultSelector`) to each item emitted\n * by the source Observable and taking values from each projected inner\n * Observable sequentially.\n * @method concatMap\n * @owner Observable\n */\nexport function concatMap>(\n project: (value: T, index: number) => O,\n resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R\n): OperatorFunction|R> {\n return mergeMap(project, resultSelector, 1);\n}\n","import { concatMap } from './concatMap';\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function concatMapTo>(observable: O): OperatorFunction>;\n/** @deprecated */\nexport function concatMapTo>(observable: O, resultSelector: undefined): OperatorFunction>;\n/** @deprecated */\nexport function concatMapTo>(observable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Projects each source value to the same Observable which is merged multiple\n * times in a serialized fashion on the output Observable.\n *\n * It's like {@link concatMap}, but maps each value\n * always to the same inner Observable.\n *\n * ![](concatMapTo.png)\n *\n * Maps each source value to the given Observable `innerObservable` regardless\n * of the source value, and then flattens those resulting Observables into one\n * single Observable, which is the output Observable. Each new `innerObservable`\n * instance emitted on the output Observable is concatenated with the previous\n * `innerObservable` instance.\n *\n * __Warning:__ if source values arrive endlessly and faster than their\n * corresponding inner Observables can complete, it will result in memory issues\n * as inner Observables amass in an unbounded buffer waiting for their turn to\n * be subscribed to.\n *\n * Note: `concatMapTo` is equivalent to `mergeMapTo` with concurrency parameter\n * set to `1`.\n *\n * ## Example\n * For each click event, tick every second from 0 to 3, with no concurrency\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { concatMapTo, take } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n * concatMapTo(interval(1000).pipe(take(4))),\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // (results are not concurrent)\n * // For every click on the \"document\" it will emit values 0 to 3 spaced\n * // on a 1000ms interval\n * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3\n * ```\n *\n * @see {@link concat}\n * @see {@link concatAll}\n * @see {@link concatMap}\n * @see {@link mergeMapTo}\n * @see {@link switchMapTo}\n *\n * @param {ObservableInput} innerObservable An Observable to replace each value from\n * the source Observable.\n * @return {Observable} An observable of values merged together by joining the\n * passed observable with itself, one after the other, for each value emitted\n * from the source.\n * @method concatMapTo\n * @owner Observable\n */\nexport function concatMapTo>(\n innerObservable: O,\n resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R\n): OperatorFunction|R> {\n return concatMap(() => innerObservable, resultSelector);\n}\n","import { Observable } from '../Observable';\nimport { Operator } from '../Operator';\nimport { Observer, OperatorFunction } from '../types';\nimport { Subscriber } from '../Subscriber';\n/**\n * Counts the number of emissions on the source and emits that number when the\n * source completes.\n *\n * Tells how many values were emitted, when the source\n * completes.\n *\n * ![](count.png)\n *\n * `count` transforms an Observable that emits values into an Observable that\n * emits a single value that represents the number of values emitted by the\n * source Observable. If the source Observable terminates with an error, `count`\n * will pass this error notification along without emitting a value first. If\n * the source Observable does not terminate at all, `count` will neither emit\n * a value nor terminate. This operator takes an optional `predicate` function\n * as argument, in which case the output emission will represent the number of\n * source values that matched `true` with the `predicate`.\n *\n * ## Examples\n *\n * Counts how many seconds have passed before the first click happened\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { count, takeUntil } from 'rxjs/operators';\n *\n * const seconds = interval(1000);\n * const clicks = fromEvent(document, 'click');\n * const secondsBeforeClick = seconds.pipe(takeUntil(clicks));\n * const result = secondsBeforeClick.pipe(count());\n * result.subscribe(x => console.log(x));\n * ```\n *\n * Counts how many odd numbers are there between 1 and 7\n * ```ts\n * import { range } from 'rxjs';\n * import { count } from 'rxjs/operators';\n *\n * const numbers = range(1, 7);\n * const result = numbers.pipe(count(i => i % 2 === 1));\n * result.subscribe(x => console.log(x));\n * // Results in:\n * // 4\n * ```\n *\n * @see {@link max}\n * @see {@link min}\n * @see {@link reduce}\n *\n * @param {function(value: T, i: number, source: Observable): boolean} [predicate] A\n * boolean function to select what values are to be counted. It is provided with\n * arguments of:\n * - `value`: the value from the source Observable.\n * - `index`: the (zero-based) \"index\" of the value from the source Observable.\n * - `source`: the source Observable instance itself.\n * @return {Observable} An Observable of one number that represents the count as\n * described above.\n * @method count\n * @owner Observable\n */\n\nexport function count(predicate?: (value: T, index: number, source: Observable) => boolean): OperatorFunction {\n return (source: Observable) => source.lift(new CountOperator(predicate, source));\n}\n\nclass CountOperator implements Operator {\n constructor(private predicate?: (value: T, index: number, source: Observable) => boolean,\n private source?: Observable) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass CountSubscriber extends Subscriber {\n private count: number = 0;\n private index: number = 0;\n\n constructor(destination: Observer,\n private predicate?: (value: T, index: number, source: Observable) => boolean,\n private source?: Observable) {\n super(destination);\n }\n\n protected _next(value: T): void {\n if (this.predicate) {\n this._tryPredicate(value);\n } else {\n this.count++;\n }\n }\n\n private _tryPredicate(value: T) {\n let result: any;\n\n try {\n result = this.predicate(value, this.index++, this.source);\n } catch (err) {\n this.destination.error(err);\n return;\n }\n\n if (result) {\n this.count++;\n }\n }\n\n protected _complete(): void {\n this.destination.next(this.count);\n this.destination.complete();\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { MonoTypeOperatorFunction, SubscribableOrPromise, TeardownLogic } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\n/**\n * Emits a value from the source Observable only after a particular time span\n * determined by another Observable has passed without another source emission.\n *\n * It's like {@link debounceTime}, but the time span of\n * emission silence is determined by a second Observable.\n *\n * ![](debounce.png)\n *\n * `debounce` delays values emitted by the source Observable, but drops previous\n * pending delayed emissions if a new value arrives on the source Observable.\n * This operator keeps track of the most recent value from the source\n * Observable, and spawns a duration Observable by calling the\n * `durationSelector` function. The value is emitted only when the duration\n * Observable emits a value or completes, and if no other value was emitted on\n * the source Observable since the duration Observable was spawned. If a new\n * value appears before the duration Observable emits, the previous value will\n * be dropped and will not be emitted on the output Observable.\n *\n * Like {@link debounceTime}, this is a rate-limiting operator, and also a\n * delay-like operator since output emissions do not necessarily occur at the\n * same time as they did on the source Observable.\n *\n * ## Example\n * Emit the most recent click after a burst of clicks\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { debounce } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(debounce(() => interval(1000)));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link audit}\n * @see {@link debounceTime}\n * @see {@link delayWhen}\n * @see {@link throttle}\n *\n * @param {function(value: T): SubscribableOrPromise} durationSelector A function\n * that receives a value from the source Observable, for computing the timeout\n * duration for each source value, returned as an Observable or a Promise.\n * @return {Observable} An Observable that delays the emissions of the source\n * Observable by the specified duration Observable returned by\n * `durationSelector`, and may drop some values if they occur too frequently.\n * @method debounce\n * @owner Observable\n */\nexport function debounce(durationSelector: (value: T) => SubscribableOrPromise): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new DebounceOperator(durationSelector));\n}\n\nclass DebounceOperator implements Operator {\n constructor(private durationSelector: (value: T) => SubscribableOrPromise) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass DebounceSubscriber extends SimpleOuterSubscriber {\n private value?: T;\n private hasValue = false;\n private durationSubscription?: Subscription;\n\n constructor(destination: Subscriber,\n private durationSelector: (value: T) => SubscribableOrPromise) {\n super(destination);\n }\n\n protected _next(value: T): void {\n try {\n const result = this.durationSelector.call(this, value);\n\n if (result) {\n this._tryNext(value, result);\n }\n } catch (err) {\n this.destination.error!(err);\n }\n }\n\n protected _complete(): void {\n this.emitValue();\n this.destination.complete!();\n }\n\n private _tryNext(value: T, duration: SubscribableOrPromise): void {\n let subscription = this.durationSubscription;\n this.value = value;\n this.hasValue = true;\n if (subscription) {\n subscription.unsubscribe();\n this.remove(subscription);\n }\n\n subscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));\n if (subscription && !subscription.closed) {\n this.add(this.durationSubscription = subscription);\n }\n }\n\n notifyNext(): void {\n this.emitValue();\n }\n\n notifyComplete(): void {\n this.emitValue();\n }\n\n emitValue(): void {\n if (this.hasValue) {\n const value = this.value;\n const subscription = this.durationSubscription;\n if (subscription) {\n this.durationSubscription = undefined;\n subscription.unsubscribe();\n this.remove(subscription);\n }\n // This must be done *before* passing the value\n // along to the destination because it's possible for\n // the value to synchronously re-enter this operator\n // recursively if the duration selector Observable\n // emits synchronously\n this.value = undefined;\n this.hasValue = false;\n super._next(value!);\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { async } from '../scheduler/async';\nimport { MonoTypeOperatorFunction, SchedulerLike, TeardownLogic } from '../types';\n\n/**\n * Emits a value from the source Observable only after a particular time span\n * has passed without another source emission.\n *\n * It's like {@link delay}, but passes only the most\n * recent value from each burst of emissions.\n *\n * ![](debounceTime.png)\n *\n * `debounceTime` delays values emitted by the source Observable, but drops\n * previous pending delayed emissions if a new value arrives on the source\n * Observable. This operator keeps track of the most recent value from the\n * source Observable, and emits that only when `dueTime` enough time has passed\n * without any other value appearing on the source Observable. If a new value\n * appears before `dueTime` silence occurs, the previous value will be dropped\n * and will not be emitted on the output Observable.\n *\n * This is a rate-limiting operator, because it is impossible for more than one\n * value to be emitted in any time window of duration `dueTime`, but it is also\n * a delay-like operator since output emissions do not occur at the same time as\n * they did on the source Observable. Optionally takes a {@link SchedulerLike} for\n * managing timers.\n *\n * ## Example\n * Emit the most recent click after a burst of clicks\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { debounceTime } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(debounceTime(1000));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link auditTime}\n * @see {@link debounce}\n * @see {@link delay}\n * @see {@link sampleTime}\n * @see {@link throttleTime}\n *\n * @param {number} dueTime The timeout duration in milliseconds (or the time\n * unit determined internally by the optional `scheduler`) for the window of\n * time required to wait for emission silence before emitting the most recent\n * source value.\n * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for\n * managing the timers that handle the timeout for each value.\n * @return {Observable} An Observable that delays the emissions of the source\n * Observable by the specified `dueTime`, and may drop some values if they occur\n * too frequently.\n * @method debounceTime\n * @owner Observable\n */\nexport function debounceTime(dueTime: number, scheduler: SchedulerLike = async): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new DebounceTimeOperator(dueTime, scheduler));\n}\n\nclass DebounceTimeOperator implements Operator {\n constructor(private dueTime: number, private scheduler: SchedulerLike) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass DebounceTimeSubscriber extends Subscriber {\n private debouncedSubscription: Subscription = null;\n private lastValue: T = null;\n private hasValue: boolean = false;\n\n constructor(destination: Subscriber,\n private dueTime: number,\n private scheduler: SchedulerLike) {\n super(destination);\n }\n\n protected _next(value: T) {\n this.clearDebounce();\n this.lastValue = value;\n this.hasValue = true;\n this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));\n }\n\n protected _complete() {\n this.debouncedNext();\n this.destination.complete();\n }\n\n debouncedNext(): void {\n this.clearDebounce();\n\n if (this.hasValue) {\n const { lastValue } = this;\n // This must be done *before* passing the value\n // along to the destination because it's possible for\n // the value to synchronously re-enter this operator\n // recursively when scheduled with things like\n // VirtualScheduler/TestScheduler.\n this.lastValue = null;\n this.hasValue = false;\n this.destination.next(lastValue);\n }\n }\n\n private clearDebounce(): void {\n const debouncedSubscription = this.debouncedSubscription;\n\n if (debouncedSubscription !== null) {\n this.remove(debouncedSubscription);\n debouncedSubscription.unsubscribe();\n this.debouncedSubscription = null;\n }\n }\n}\n\nfunction dispatchNext(subscriber: DebounceTimeSubscriber) {\n subscriber.debouncedNext();\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction, MonoTypeOperatorFunction } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function defaultIfEmpty(defaultValue?: T): MonoTypeOperatorFunction;\nexport function defaultIfEmpty(defaultValue?: R): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Emits a given value if the source Observable completes without emitting any\n * `next` value, otherwise mirrors the source Observable.\n *\n * If the source Observable turns out to be empty, then\n * this operator will emit a default value.\n *\n * ![](defaultIfEmpty.png)\n *\n * `defaultIfEmpty` emits the values emitted by the source Observable or a\n * specified default value if the source Observable is empty (completes without\n * having emitted any `next` value).\n *\n * ## Example\n * If no clicks happen in 5 seconds, then emit \"no clicks\"\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { defaultIfEmpty, takeUntil } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const clicksBeforeFive = clicks.pipe(takeUntil(interval(5000)));\n * const result = clicksBeforeFive.pipe(defaultIfEmpty('no clicks'));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link empty}\n * @see {@link last}\n *\n * @param {any} [defaultValue=null] The default value used if the source\n * Observable is empty.\n * @return {Observable} An Observable that emits either the specified\n * `defaultValue` if the source Observable emits no items, or the values emitted\n * by the source Observable.\n * @method defaultIfEmpty\n * @owner Observable\n */\nexport function defaultIfEmpty(defaultValue: R = null): OperatorFunction {\n return (source: Observable) => source.lift(new DefaultIfEmptyOperator(defaultValue)) as Observable;\n}\n\nclass DefaultIfEmptyOperator implements Operator {\n\n constructor(private defaultValue: R) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass DefaultIfEmptySubscriber extends Subscriber {\n private isEmpty: boolean = true;\n\n constructor(destination: Subscriber, private defaultValue: R) {\n super(destination);\n }\n\n protected _next(value: T): void {\n this.isEmpty = false;\n this.destination.next(value);\n }\n\n protected _complete(): void {\n if (this.isEmpty) {\n this.destination.next(this.defaultValue);\n }\n this.destination.complete();\n }\n}\n","export function isDate(value: any): value is Date {\n return value instanceof Date && !isNaN(+value);\n}\n","import { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { Notification } from '../Notification';\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, PartialObserver, SchedulerAction, SchedulerLike, TeardownLogic } from '../types';\n\n/**\n * Delays the emission of items from the source Observable by a given timeout or\n * until a given Date.\n *\n * Time shifts each item by some specified amount of\n * milliseconds.\n *\n * ![](delay.png)\n *\n * If the delay argument is a Number, this operator time shifts the source\n * Observable by that amount of time expressed in milliseconds. The relative\n * time intervals between the values are preserved.\n *\n * If the delay argument is a Date, this operator time shifts the start of the\n * Observable execution until the given date occurs.\n *\n * ## Examples\n * Delay each click by one second\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { delay } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const delayedClicks = clicks.pipe(delay(1000)); // each click emitted after 1 second\n * delayedClicks.subscribe(x => console.log(x));\n * ```\n *\n * Delay all clicks until a future date happens\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { delay } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const date = new Date('March 15, 2050 12:00:00'); // in the future\n * const delayedClicks = clicks.pipe(delay(date)); // click emitted only after that date\n * delayedClicks.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link debounceTime}\n * @see {@link delayWhen}\n *\n * @param {number|Date} delay The delay duration in milliseconds (a `number`) or\n * a `Date` until which the emission of the source items is delayed.\n * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for\n * managing the timers that handle the time-shift for each item.\n * @return {Observable} An Observable that delays the emissions of the source\n * Observable by the specified timeout or Date.\n * @method delay\n * @owner Observable\n */\nexport function delay(delay: number|Date,\n scheduler: SchedulerLike = async): MonoTypeOperatorFunction {\n const absoluteDelay = isDate(delay);\n const delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);\n return (source: Observable) => source.lift(new DelayOperator(delayFor, scheduler));\n}\n\nclass DelayOperator implements Operator {\n constructor(private delay: number,\n private scheduler: SchedulerLike) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n }\n}\n\ninterface DelayState {\n source: DelaySubscriber;\n destination: PartialObserver;\n scheduler: SchedulerLike;\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass DelaySubscriber extends Subscriber {\n private queue: Array> = [];\n private active: boolean = false;\n private errored: boolean = false;\n\n private static dispatch(this: SchedulerAction>, state: DelayState): void {\n const source = state.source;\n const queue = source.queue;\n const scheduler = state.scheduler;\n const destination = state.destination;\n\n while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {\n queue.shift().notification.observe(destination);\n }\n\n if (queue.length > 0) {\n const delay = Math.max(0, queue[0].time - scheduler.now());\n this.schedule(state, delay);\n } else {\n this.unsubscribe();\n source.active = false;\n }\n }\n\n constructor(destination: Subscriber,\n private delay: number,\n private scheduler: SchedulerLike) {\n super(destination);\n }\n\n private _schedule(scheduler: SchedulerLike): void {\n this.active = true;\n const destination = this.destination as Subscription;\n destination.add(scheduler.schedule>(DelaySubscriber.dispatch, this.delay, {\n source: this, destination: this.destination, scheduler: scheduler\n }));\n }\n\n private scheduleNotification(notification: Notification): void {\n if (this.errored === true) {\n return;\n }\n\n const scheduler = this.scheduler;\n const message = new DelayMessage(scheduler.now() + this.delay, notification);\n this.queue.push(message);\n\n if (this.active === false) {\n this._schedule(scheduler);\n }\n }\n\n protected _next(value: T) {\n this.scheduleNotification(Notification.createNext(value));\n }\n\n protected _error(err: any) {\n this.errored = true;\n this.queue = [];\n this.destination.error(err);\n this.unsubscribe();\n }\n\n protected _complete() {\n this.scheduleNotification(Notification.createComplete());\n this.unsubscribe();\n }\n}\n\nclass DelayMessage {\n constructor(public readonly time: number,\n public readonly notification: Notification) {\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\n/* tslint:disable:max-line-length */\n/** @deprecated In future versions, empty notifiers will no longer re-emit the source value on the output observable. */\nexport function delayWhen(delayDurationSelector: (value: T, index: number) => Observable, subscriptionDelay?: Observable): MonoTypeOperatorFunction;\nexport function delayWhen(delayDurationSelector: (value: T, index: number) => Observable, subscriptionDelay?: Observable): MonoTypeOperatorFunction;\n/* tslint:disable:max-line-length */\n\n/**\n * Delays the emission of items from the source Observable by a given time span\n * determined by the emissions of another Observable.\n *\n * It's like {@link delay}, but the time span of the\n * delay duration is determined by a second Observable.\n *\n * ![](delayWhen.png)\n *\n * `delayWhen` time shifts each emitted value from the source Observable by a\n * time span determined by another Observable. When the source emits a value,\n * the `delayDurationSelector` function is called with the source value as\n * argument, and should return an Observable, called the \"duration\" Observable.\n * The source value is emitted on the output Observable only when the duration\n * Observable emits a value or completes.\n * The completion of the notifier triggering the emission of the source value\n * is deprecated behavior and will be removed in future versions.\n *\n * Optionally, `delayWhen` takes a second argument, `subscriptionDelay`, which\n * is an Observable. When `subscriptionDelay` emits its first value or\n * completes, the source Observable is subscribed to and starts behaving like\n * described in the previous paragraph. If `subscriptionDelay` is not provided,\n * `delayWhen` will subscribe to the source Observable as soon as the output\n * Observable is subscribed.\n *\n * ## Example\n * Delay each click by a random amount of time, between 0 and 5 seconds\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { delayWhen } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const delayedClicks = clicks.pipe(\n * delayWhen(event => interval(Math.random() * 5000)),\n * );\n * delayedClicks.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link delay}\n * @see {@link throttle}\n * @see {@link throttleTime}\n * @see {@link debounce}\n * @see {@link debounceTime}\n * @see {@link sample}\n * @see {@link sampleTime}\n * @see {@link audit}\n * @see {@link auditTime}\n *\n * @param {function(value: T, index: number): Observable} delayDurationSelector A function that\n * returns an Observable for each value emitted by the source Observable, which\n * is then used to delay the emission of that item on the output Observable\n * until the Observable returned from this function emits a value.\n * @param {Observable} subscriptionDelay An Observable that triggers the\n * subscription to the source Observable once it emits any value.\n * @return {Observable} An Observable that delays the emissions of the source\n * Observable by an amount of time specified by the Observable returned by\n * `delayDurationSelector`.\n * @method delayWhen\n * @owner Observable\n */\nexport function delayWhen(delayDurationSelector: (value: T, index: number) => Observable,\n subscriptionDelay?: Observable): MonoTypeOperatorFunction {\n if (subscriptionDelay) {\n return (source: Observable) =>\n new SubscriptionDelayObservable(source, subscriptionDelay)\n .lift(new DelayWhenOperator(delayDurationSelector));\n }\n return (source: Observable) => source.lift(new DelayWhenOperator(delayDurationSelector));\n}\n\nclass DelayWhenOperator implements Operator {\n constructor(private delayDurationSelector: (value: T, index: number) => Observable) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass DelayWhenSubscriber extends OuterSubscriber {\n private completed: boolean = false;\n private delayNotifierSubscriptions: Array = [];\n private index: number = 0;\n\n constructor(destination: Subscriber,\n private delayDurationSelector: (value: T, index: number) => Observable) {\n super(destination);\n }\n\n notifyNext(outerValue: T, _innerValue: any,\n _outerIndex: number, _innerIndex: number,\n innerSub: InnerSubscriber): void {\n this.destination.next!(outerValue);\n this.removeSubscription(innerSub);\n this.tryComplete();\n }\n\n notifyError(error: any, innerSub: InnerSubscriber): void {\n this._error(error);\n }\n\n notifyComplete(innerSub: InnerSubscriber): void {\n const value = this.removeSubscription(innerSub);\n if (value) {\n this.destination.next!(value);\n }\n this.tryComplete();\n }\n\n protected _next(value: T): void {\n const index = this.index++;\n try {\n const delayNotifier = this.delayDurationSelector(value, index);\n if (delayNotifier) {\n this.tryDelay(delayNotifier, value);\n }\n } catch (err) {\n this.destination.error!(err);\n }\n }\n\n protected _complete(): void {\n this.completed = true;\n this.tryComplete();\n this.unsubscribe();\n }\n\n private removeSubscription(subscription: InnerSubscriber): T {\n subscription.unsubscribe();\n\n const subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);\n if (subscriptionIdx !== -1) {\n this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);\n }\n\n return subscription.outerValue;\n }\n\n private tryDelay(delayNotifier: Observable, value: T): void {\n const notifierSubscription = subscribeToResult(this, delayNotifier, value);\n\n if (notifierSubscription && !notifierSubscription.closed) {\n const destination = this.destination as Subscription;\n destination.add(notifierSubscription);\n this.delayNotifierSubscriptions.push(notifierSubscription);\n }\n }\n\n private tryComplete(): void {\n if (this.completed && this.delayNotifierSubscriptions.length === 0) {\n this.destination.complete!();\n }\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SubscriptionDelayObservable extends Observable {\n constructor(public source: Observable, private subscriptionDelay: Observable) {\n super();\n }\n\n /** @deprecated This is an internal implementation detail, do not use. */\n _subscribe(subscriber: Subscriber) {\n this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SubscriptionDelaySubscriber extends Subscriber {\n private sourceSubscribed: boolean = false;\n\n constructor(private parent: Subscriber, private source: Observable) {\n super();\n }\n\n protected _next(unused: any) {\n this.subscribeToSource();\n }\n\n protected _error(err: any) {\n this.unsubscribe();\n this.parent.error(err);\n }\n\n protected _complete() {\n this.unsubscribe();\n this.subscribeToSource();\n }\n\n private subscribeToSource(): void {\n if (!this.sourceSubscribed) {\n this.sourceSubscribed = true;\n this.unsubscribe();\n this.source.subscribe(this.parent);\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nimport { OperatorFunction } from '../types';\n\n/**\n * Converts an Observable of {@link Notification} objects into the emissions\n * that they represent.\n *\n * Unwraps {@link Notification} objects as actual `next`,\n * `error` and `complete` emissions. The opposite of {@link materialize}.\n *\n * ![](dematerialize.png)\n *\n * `dematerialize` is assumed to operate an Observable that only emits\n * {@link Notification} objects as `next` emissions, and does not emit any\n * `error`. Such Observable is the output of a `materialize` operation. Those\n * notifications are then unwrapped using the metadata they contain, and emitted\n * as `next`, `error`, and `complete` on the output Observable.\n *\n * Use this operator in conjunction with {@link materialize}.\n *\n * ## Example\n * Convert an Observable of Notifications to an actual Observable\n * ```ts\n * import { of, Notification } from 'rxjs';\n * import { dematerialize } from 'rxjs/operators';\n *\n * const notifA = new Notification('N', 'A');\n * const notifB = new Notification('N', 'B');\n * const notifE = new Notification('E', undefined,\n * new TypeError('x.toUpperCase is not a function')\n * );\n * const materialized = of(notifA, notifB, notifE);\n * const upperCase = materialized.pipe(dematerialize());\n * upperCase.subscribe(x => console.log(x), e => console.error(e));\n *\n * // Results in:\n * // A\n * // B\n * // TypeError: x.toUpperCase is not a function\n * ```\n *\n * @see {@link Notification}\n * @see {@link materialize}\n *\n * @return {Observable} An Observable that emits items and notifications\n * embedded in Notification objects emitted by the source Observable.\n * @method dematerialize\n * @owner Observable\n */\nexport function dematerialize(): OperatorFunction, T> {\n return function dematerializeOperatorFunction(source: Observable>) {\n return source.lift(new DeMaterializeOperator());\n };\n}\n\nclass DeMaterializeOperator, R> implements Operator {\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new DeMaterializeSubscriber(subscriber));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass DeMaterializeSubscriber> extends Subscriber {\n constructor(destination: Subscriber) {\n super(destination);\n }\n\n protected _next(value: T) {\n value.observe(this.destination);\n }\n}\n","import { Observable } from '../Observable';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\n/**\n * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items.\n *\n * If a keySelector function is provided, then it will project each value from the source observable into a new value that it will\n * check for equality with previously projected values. If a keySelector function is not provided, it will use each value from the\n * source observable directly with an equality check against previous values.\n *\n * In JavaScript runtimes that support `Set`, this operator will use a `Set` to improve performance of the distinct value checking.\n *\n * In other runtimes, this operator will use a minimal implementation of `Set` that relies on an `Array` and `indexOf` under the\n * hood, so performance will degrade as more values are checked for distinction. Even in newer browsers, a long-running `distinct`\n * use might result in memory leaks. To help alleviate this in some scenarios, an optional `flushes` parameter is also provided so\n * that the internal `Set` can be \"flushed\", basically clearing it of values.\n *\n * ## Examples\n * A simple example with numbers\n * ```ts\n * import { of } from 'rxjs';\n * import { distinct } from 'rxjs/operators';\n *\n * of(1, 1, 2, 2, 2, 1, 2, 3, 4, 3, 2, 1).pipe(\n * distinct(),\n * )\n * .subscribe(x => console.log(x)); // 1, 2, 3, 4\n * ```\n *\n * An example using a keySelector function\n * ```typescript\n * import { of } from 'rxjs';\n * import { distinct } from 'rxjs/operators';\n *\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * of(\n * { age: 4, name: 'Foo'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo'},\n * ).pipe(\n * distinct((p: Person) => p.name),\n * )\n * .subscribe(x => console.log(x));\n *\n * // displays:\n * // { age: 4, name: 'Foo' }\n * // { age: 7, name: 'Bar' }\n * ```\n * @see {@link distinctUntilChanged}\n * @see {@link distinctUntilKeyChanged}\n *\n * @param {function} [keySelector] Optional function to select which value you want to check as distinct.\n * @param {Observable} [flushes] Optional Observable for flushing the internal HashSet of the operator.\n * @return {Observable} An Observable that emits items from the source Observable with distinct values.\n * @method distinct\n * @owner Observable\n */\nexport function distinct(keySelector?: (value: T) => K,\n flushes?: Observable): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new DistinctOperator(keySelector, flushes));\n}\n\nclass DistinctOperator implements Operator {\n constructor(private keySelector?: (value: T) => K, private flushes?: Observable) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nexport class DistinctSubscriber extends SimpleOuterSubscriber {\n private values = new Set();\n\n constructor(destination: Subscriber, private keySelector?: (value: T) => K, flushes?: Observable) {\n super(destination);\n\n if (flushes) {\n this.add(innerSubscribe(flushes, new SimpleInnerSubscriber(this)));\n }\n }\n\n notifyNext(): void {\n this.values.clear();\n }\n\n notifyError(error: any): void {\n this._error(error);\n }\n\n protected _next(value: T): void {\n if (this.keySelector) {\n this._useKeySelector(value);\n } else {\n this._finalizeNext(value, value);\n }\n }\n\n private _useKeySelector(value: T): void {\n let key: K;\n const { destination } = this;\n try {\n key = this.keySelector!(value);\n } catch (err) {\n destination.error!(err);\n return;\n }\n this._finalizeNext(key, value);\n }\n\n private _finalizeNext(key: K|T, value: T) {\n const { values } = this;\n if (!values.has(key)) {\n values.add(key);\n this.destination.next!(value);\n }\n }\n\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function distinctUntilChanged(compare?: (x: T, y: T) => boolean): MonoTypeOperatorFunction;\nexport function distinctUntilChanged(compare: (x: K, y: K) => boolean, keySelector: (x: T) => K): MonoTypeOperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item.\n *\n * If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.\n *\n * If a comparator function is not provided, an equality check is used by default.\n *\n * ## Example\n * A simple example with numbers\n * ```ts\n * import { of } from 'rxjs';\n * import { distinctUntilChanged } from 'rxjs/operators';\n *\n * of(1, 1, 2, 2, 2, 1, 1, 2, 3, 3, 4).pipe(\n * distinctUntilChanged(),\n * )\n * .subscribe(x => console.log(x)); // 1, 2, 1, 2, 3, 4\n * ```\n *\n * An example using a compare function\n * ```typescript\n * import { of } from 'rxjs';\n * import { distinctUntilChanged } from 'rxjs/operators';\n *\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * of(\n * { age: 4, name: 'Foo'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo'},\n * { age: 6, name: 'Foo'},\n * ).pipe(\n * distinctUntilChanged((p: Person, q: Person) => p.name === q.name),\n * )\n * .subscribe(x => console.log(x));\n *\n * // displays:\n * // { age: 4, name: 'Foo' }\n * // { age: 7, name: 'Bar' }\n * // { age: 5, name: 'Foo' }\n * ```\n *\n * @see {@link distinct}\n * @see {@link distinctUntilKeyChanged}\n *\n * @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source.\n * @return {Observable} An Observable that emits items from the source Observable with distinct values.\n * @method distinctUntilChanged\n * @owner Observable\n */\nexport function distinctUntilChanged(compare?: (x: K, y: K) => boolean, keySelector?: (x: T) => K): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new DistinctUntilChangedOperator(compare, keySelector));\n}\n\nclass DistinctUntilChangedOperator implements Operator {\n constructor(private compare: (x: K, y: K) => boolean,\n private keySelector: (x: T) => K) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass DistinctUntilChangedSubscriber extends Subscriber {\n private key: K;\n private hasKey: boolean = false;\n\n constructor(destination: Subscriber,\n compare: (x: K, y: K) => boolean,\n private keySelector: (x: T) => K) {\n super(destination);\n if (typeof compare === 'function') {\n this.compare = compare;\n }\n }\n\n private compare(x: any, y: any): boolean {\n return x === y;\n }\n\n protected _next(value: T): void {\n let key: any;\n try {\n const { keySelector } = this;\n key = keySelector ? keySelector(value) : value;\n } catch (err) {\n return this.destination.error(err);\n }\n let result = false;\n if (this.hasKey) {\n try {\n const { compare } = this;\n result = compare(this.key, key);\n } catch (err) {\n return this.destination.error(err);\n }\n } else {\n this.hasKey = true;\n }\n if (!result) {\n this.key = key;\n this.destination.next(value);\n }\n }\n}\n","import { distinctUntilChanged } from './distinctUntilChanged';\nimport { MonoTypeOperatorFunction } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function distinctUntilKeyChanged(key: keyof T): MonoTypeOperatorFunction;\nexport function distinctUntilKeyChanged(key: K, compare: (x: T[K], y: T[K]) => boolean): MonoTypeOperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item,\n * using a property accessed by using the key provided to check if the two items are distinct.\n *\n * If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.\n *\n * If a comparator function is not provided, an equality check is used by default.\n *\n * ## Examples\n * An example comparing the name of persons\n * ```typescript\n * import { of } from 'rxjs';\n * import { distinctUntilKeyChanged } from 'rxjs/operators';\n *\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * of(\n * { age: 4, name: 'Foo'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo'},\n * { age: 6, name: 'Foo'},\n * ).pipe(\n * distinctUntilKeyChanged('name'),\n * )\n * .subscribe(x => console.log(x));\n *\n * // displays:\n * // { age: 4, name: 'Foo' }\n * // { age: 7, name: 'Bar' }\n * // { age: 5, name: 'Foo' }\n * ```\n *\n * An example comparing the first letters of the name\n * ```typescript\n * import { of } from 'rxjs';\n * import { distinctUntilKeyChanged } from 'rxjs/operators';\n *\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * of(\n * { age: 4, name: 'Foo1'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo2'},\n * { age: 6, name: 'Foo3'},\n * ).pipe(\n * distinctUntilKeyChanged('name', (x: string, y: string) => x.substring(0, 3) === y.substring(0, 3)),\n * )\n * .subscribe(x => console.log(x));\n *\n * // displays:\n * // { age: 4, name: 'Foo1' }\n * // { age: 7, name: 'Bar' }\n * // { age: 5, name: 'Foo2' }\n * ```\n *\n * @see {@link distinct}\n * @see {@link distinctUntilChanged}\n *\n * @param {string} key String key for object property lookup on each item.\n * @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source.\n * @return {Observable} An Observable that emits items from the source Observable with distinct values based on the key specified.\n * @method distinctUntilKeyChanged\n * @owner Observable\n */\nexport function distinctUntilKeyChanged(key: K, compare?: (x: T[K], y: T[K]) => boolean): MonoTypeOperatorFunction {\n return distinctUntilChanged((x: T, y: T) => compare ? compare(x[key], y[key]) : x[key] === y[key]);\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { Observable } from '../Observable';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { TeardownLogic, MonoTypeOperatorFunction } from '../types';\n\n/**\n * If the source observable completes without emitting a value, it will emit\n * an error. The error will be created at that time by the optional\n * `errorFactory` argument, otherwise, the error will be {@link EmptyError}.\n *\n * ![](throwIfEmpty.png)\n *\n * ## Example\n * ```ts\n * import { fromEvent, timer } from 'rxjs';\n * import { throwIfEmpty, takeUntil } from 'rxjs/operators';\n *\n * const click$ = fromEvent(document, 'click');\n *\n * click$.pipe(\n * takeUntil(timer(1000)),\n * throwIfEmpty(\n * () => new Error('the document was not clicked within 1 second')\n * ),\n * )\n * .subscribe({\n * next() { console.log('The button was clicked'); },\n * error(err) { console.error(err); }\n * });\n * ```\n *\n * @param errorFactory A factory function called to produce the\n * error to be thrown when the source observable completes without emitting a\n * value.\n */\nexport function throwIfEmpty (errorFactory: (() => any) = defaultErrorFactory): MonoTypeOperatorFunction {\n return (source: Observable) => {\n return source.lift(new ThrowIfEmptyOperator(errorFactory));\n };\n}\n\nclass ThrowIfEmptyOperator implements Operator {\n constructor(private errorFactory: () => any) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));\n }\n}\n\nclass ThrowIfEmptySubscriber extends Subscriber {\n private hasValue: boolean = false;\n\n constructor(destination: Subscriber, private errorFactory: () => any) {\n super(destination);\n }\n\n protected _next(value: T): void {\n this.hasValue = true;\n this.destination.next(value);\n }\n\n protected _complete() {\n if (!this.hasValue) {\n let err: any;\n try {\n err = this.errorFactory();\n } catch (e) {\n err = e;\n }\n this.destination.error(err);\n } else {\n return this.destination.complete();\n }\n }\n}\n\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\n/**\n * Emits only the first `count` values emitted by the source Observable.\n *\n * Takes the first `count` values from the source, then\n * completes.\n *\n * ![](take.png)\n *\n * `take` returns an Observable that emits only the first `count` values emitted\n * by the source Observable. If the source emits fewer than `count` values then\n * all of its values are emitted. After that, it completes, regardless if the\n * source completes.\n *\n * ## Example\n * Take the first 5 seconds of an infinite 1-second interval Observable\n * ```ts\n * import { interval } from 'rxjs';\n * import { take } from 'rxjs/operators';\n *\n * const intervalCount = interval(1000);\n * const takeFive = intervalCount.pipe(take(5));\n * takeFive.subscribe(x => console.log(x));\n *\n * // Logs:\n * // 0\n * // 1\n * // 2\n * // 3\n * // 4\n * ```\n *\n * @see {@link takeLast}\n * @see {@link takeUntil}\n * @see {@link takeWhile}\n * @see {@link skip}\n *\n * @throws {ArgumentOutOfRangeError} When using `take(i)`, it delivers an\n * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0`.\n *\n * @param {number} count The maximum number of `next` values to emit.\n * @return {Observable} An Observable that emits only the first `count`\n * values emitted by the source Observable, or all of the values from the source\n * if the source emits fewer than `count` values.\n * @method take\n * @owner Observable\n */\nexport function take(count: number): MonoTypeOperatorFunction {\n return (source: Observable) => {\n if (count === 0) {\n return empty();\n } else {\n return source.lift(new TakeOperator(count));\n }\n };\n}\n\nclass TakeOperator implements Operator {\n constructor(private total: number) {\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new TakeSubscriber(subscriber, this.total));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass TakeSubscriber extends Subscriber {\n private count: number = 0;\n\n constructor(destination: Subscriber, private total: number) {\n super(destination);\n }\n\n protected _next(value: T): void {\n const total = this.total;\n const count = ++this.count;\n if (count <= total) {\n this.destination.next(value);\n if (count === total) {\n this.destination.complete();\n this.unsubscribe();\n }\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\nimport { filter } from './filter';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { take } from './take';\n\n/**\n * Emits the single value at the specified `index` in a sequence of emissions\n * from the source Observable.\n *\n * Emits only the i-th value, then completes.\n *\n * ![](elementAt.png)\n *\n * `elementAt` returns an Observable that emits the item at the specified\n * `index` in the source Observable, or a default value if that `index` is out\n * of range and the `default` argument is provided. If the `default` argument is\n * not given and the `index` is out of range, the output Observable will emit an\n * `ArgumentOutOfRangeError` error.\n *\n * ## Example\n * Emit only the third click event\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { elementAt } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(elementAt(2));\n * result.subscribe(x => console.log(x));\n *\n * // Results in:\n * // click 1 = nothing\n * // click 2 = nothing\n * // click 3 = MouseEvent object logged to console\n * ```\n *\n * @see {@link first}\n * @see {@link last}\n * @see {@link skip}\n * @see {@link single}\n * @see {@link take}\n *\n * @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an\n * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0` or the\n * Observable has completed before emitting the i-th `next` notification.\n *\n * @param {number} index Is the number `i` for the i-th source emission that has\n * happened since the subscription, starting from the number `0`.\n * @param {T} [defaultValue] The default value returned for missing indices.\n * @return {Observable} An Observable that emits a single item, if it is found.\n * Otherwise, will emit the default value if given. If not, then emits an error.\n * @method elementAt\n * @owner Observable\n */\nexport function elementAt(index: number, defaultValue?: T): MonoTypeOperatorFunction {\n if (index < 0) { throw new ArgumentOutOfRangeError(); }\n const hasDefaultValue = arguments.length >= 2;\n return (source: Observable) => source.pipe(\n filter((v, i) => i === index),\n take(1),\n hasDefaultValue\n ? defaultIfEmpty(defaultValue)\n : throwIfEmpty(() => new ArgumentOutOfRangeError()),\n );\n}\n","import { Observable } from '../Observable';\nimport { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nimport { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction } from '../types';\n\n/* tslint:disable:max-line-length */\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */\nexport function endWith(scheduler: SchedulerLike): MonoTypeOperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */\nexport function endWith(v1: A, scheduler: SchedulerLike): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */\nexport function endWith(v1: A, v2: B, scheduler: SchedulerLike): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */\nexport function endWith(v1: A, v2: B, v3: C, scheduler: SchedulerLike): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */\nexport function endWith(v1: A, v2: B, v3: C, v4: D, scheduler: SchedulerLike): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */\nexport function endWith(v1: A, v2: B, v3: C, v4: D, v5: E, scheduler: SchedulerLike): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */\nexport function endWith(v1: A, v2: B, v3: C, v4: D, v5: E, v6: F, scheduler: SchedulerLike): OperatorFunction;\n\nexport function endWith(v1: A): OperatorFunction;\nexport function endWith(v1: A, v2: B): OperatorFunction;\nexport function endWith(v1: A, v2: B, v3: C): OperatorFunction;\nexport function endWith(v1: A, v2: B, v3: C, v4: D): OperatorFunction;\nexport function endWith(v1: A, v2: B, v3: C, v4: D, v5: E): OperatorFunction;\nexport function endWith(v1: A, v2: B, v3: C, v4: D, v5: E, v6: F): OperatorFunction;\nexport function endWith(...array: Z[]): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */\nexport function endWith(...array: Array): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns an Observable that emits the items you specify as arguments after it finishes emitting\n * items emitted by the source Observable.\n *\n * ![](endWith.png)\n *\n * ## Example\n * ### After the source observable completes, appends an emission and then completes too.\n *\n * ```ts\n * import { of } from 'rxjs';\n * import { endWith } from 'rxjs/operators';\n *\n * of('hi', 'how are you?', 'sorry, I have to go now').pipe(\n * endWith('goodbye!'),\n * )\n * .subscribe(word => console.log(word));\n * // result:\n * // 'hi'\n * // 'how are you?'\n * // 'sorry, I have to go now'\n * // 'goodbye!'\n * ```\n *\n * @param {...T} values - Items you want the modified Observable to emit last.\n * @param {SchedulerLike} [scheduler] - A {@link SchedulerLike} to use for scheduling\n * the emissions of the `next` notifications.\n * @return {Observable} An Observable that emits the items emitted by the source Observable\n * and then emits the items in the specified Iterable.\n * @method endWith\n * @owner Observable\n */\nexport function endWith(...array: Array): MonoTypeOperatorFunction {\n return (source: Observable) => concat(source, of(...array)) as Observable;\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Observer, OperatorFunction } from '../types';\n\n/**\n * Returns an Observable that emits whether or not every item of the source satisfies the condition specified.\n *\n * ## Example\n * A simple example emitting true if all elements are less than 5, false otherwise\n * ```ts\n * import { of } from 'rxjs';\n * import { every } from 'rxjs/operators';\n *\n * of(1, 2, 3, 4, 5, 6).pipe(\n * every(x => x < 5),\n * )\n * .subscribe(x => console.log(x)); // -> false\n * ```\n *\n * @param {function} predicate A function for determining if an item meets a specified condition.\n * @param {any} [thisArg] Optional object to use for `this` in the callback.\n * @return {Observable} An Observable of booleans that determines if all items of the source Observable meet the condition specified.\n * @method every\n * @owner Observable\n */\nexport function every(predicate: (value: T, index: number, source: Observable) => boolean,\n thisArg?: any): OperatorFunction {\n return (source: Observable) => source.lift(new EveryOperator(predicate, thisArg, source));\n}\n\nclass EveryOperator implements Operator {\n constructor(private predicate: (value: T, index: number, source: Observable) => boolean,\n private thisArg?: any,\n private source?: Observable) {\n }\n\n call(observer: Subscriber, source: any): any {\n return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass EverySubscriber extends Subscriber {\n private index: number = 0;\n\n constructor(destination: Observer,\n private predicate: (value: T, index: number, source: Observable) => boolean,\n private thisArg: any,\n private source?: Observable) {\n super(destination);\n this.thisArg = thisArg || this;\n }\n\n private notifyComplete(everyValueMatch: boolean): void {\n this.destination.next(everyValueMatch);\n this.destination.complete();\n }\n\n protected _next(value: T): void {\n let result = false;\n try {\n result = this.predicate.call(this.thisArg, value, this.index++, this.source);\n } catch (err) {\n this.destination.error(err);\n return;\n }\n\n if (!result) {\n this.notifyComplete(false);\n }\n }\n\n protected _complete(): void {\n this.notifyComplete(true);\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { ObservableInput, OperatorFunction, TeardownLogic } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\nexport function exhaust(): OperatorFunction, T>;\nexport function exhaust(): OperatorFunction;\n\n/**\n * Converts a higher-order Observable into a first-order Observable by dropping\n * inner Observables while the previous inner Observable has not yet completed.\n *\n * Flattens an Observable-of-Observables by dropping the\n * next inner Observables while the current inner is still executing.\n *\n * ![](exhaust.png)\n *\n * `exhaust` subscribes to an Observable that emits Observables, also known as a\n * higher-order Observable. Each time it observes one of these emitted inner\n * Observables, the output Observable begins emitting the items emitted by that\n * inner Observable. So far, it behaves like {@link mergeAll}. However,\n * `exhaust` ignores every new inner Observable if the previous Observable has\n * not yet completed. Once that one completes, it will accept and flatten the\n * next inner Observable and repeat this process.\n *\n * ## Example\n * Run a finite timer for each click, only if there is no currently active timer\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { exhaust, map, take } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const higherOrder = clicks.pipe(\n * map((ev) => interval(1000).pipe(take(5))),\n * );\n * const result = higherOrder.pipe(exhaust());\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link combineAll}\n * @see {@link concatAll}\n * @see {@link switchAll}\n * @see {@link switchMap}\n * @see {@link mergeAll}\n * @see {@link exhaustMap}\n * @see {@link zipAll}\n *\n * @return {Observable} An Observable that takes a source of Observables and propagates the first observable\n * exclusively until it completes before subscribing to the next.\n * @method exhaust\n * @owner Observable\n */\nexport function exhaust(): OperatorFunction {\n return (source: Observable) => source.lift(new SwitchFirstOperator());\n}\n\nclass SwitchFirstOperator implements Operator {\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new SwitchFirstSubscriber(subscriber));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SwitchFirstSubscriber extends SimpleOuterSubscriber {\n private hasCompleted: boolean = false;\n private hasSubscription: boolean = false;\n\n constructor(destination: Subscriber) {\n super(destination);\n }\n\n protected _next(value: T): void {\n if (!this.hasSubscription) {\n this.hasSubscription = true;\n this.add(innerSubscribe(value, new SimpleInnerSubscriber(this)));\n }\n }\n\n protected _complete(): void {\n this.hasCompleted = true;\n if (!this.hasSubscription) {\n this.destination.complete!();\n }\n }\n\n notifyComplete(): void {\n this.hasSubscription = false;\n if (this.hasCompleted) {\n this.destination.complete!();\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\nimport { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\n\n/* tslint:disable:max-line-length */\nexport function exhaustMap>(project: (value: T, index: number) => O): OperatorFunction>;\n/** @deprecated resultSelector is no longer supported. Use inner map instead. */\nexport function exhaustMap>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction>;\n/** @deprecated resultSelector is no longer supported. Use inner map instead. */\nexport function exhaustMap(project: (value: T, index: number) => ObservableInput, resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable only if the previous projected Observable has completed.\n *\n * Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link exhaust}.\n *\n * ![](exhaustMap.png)\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an (so-called \"inner\") Observable. When it projects a source value to\n * an Observable, the output Observable begins emitting the items emitted by\n * that projected Observable. However, `exhaustMap` ignores every new projected\n * Observable if the previous projected Observable has not yet completed. Once\n * that one completes, it will accept and flatten the next projected Observable\n * and repeat this process.\n *\n * ## Example\n * Run a finite timer for each click, only if there is no currently active timer\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { exhaustMap, take } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n * exhaustMap(ev => interval(1000).pipe(take(5)))\n * );\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link concatMap}\n * @see {@link exhaust}\n * @see {@link mergeMap}\n * @see {@link switchMap}\n *\n * @param {function(value: T, ?index: number): ObservableInput} project A function\n * that, when applied to an item emitted by the source Observable, returns an\n * Observable.\n * @return {Observable} An Observable containing projected Observables\n * of each item of the source, ignoring projected Observables that start before\n * their preceding Observable has completed.\n * @method exhaustMap\n * @owner Observable\n */\nexport function exhaustMap>(\n project: (value: T, index: number) => O,\n resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R,\n): OperatorFunction|R> {\n if (resultSelector) {\n // DEPRECATED PATH\n return (source: Observable) => source.pipe(\n exhaustMap((a, i) => from(project(a, i)).pipe(\n map((b: any, ii: any) => resultSelector(a, b, i, ii)),\n )),\n );\n }\n return (source: Observable) =>\n source.lift(new ExhaustMapOperator(project));\n}\n\nclass ExhaustMapOperator implements Operator {\n constructor(private project: (value: T, index: number) => ObservableInput) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass ExhaustMapSubscriber extends SimpleOuterSubscriber {\n private hasSubscription = false;\n private hasCompleted = false;\n private index = 0;\n\n constructor(destination: Subscriber,\n private project: (value: T, index: number) => ObservableInput) {\n super(destination);\n }\n\n protected _next(value: T): void {\n if (!this.hasSubscription) {\n this.tryNext(value);\n }\n }\n\n private tryNext(value: T): void {\n let result: ObservableInput;\n const index = this.index++;\n try {\n result = this.project(value, index);\n } catch (err) {\n this.destination.error!(err);\n return;\n }\n this.hasSubscription = true;\n this._innerSub(result);\n }\n\n private _innerSub(result: ObservableInput): void {\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination as Subscription;\n destination.add(innerSubscriber);\n const innerSubscription = innerSubscribe(result, innerSubscriber);\n // The returned subscription will usually be the subscriber that was\n // passed. However, interop subscribers will be wrapped and for\n // unsubscriptions to chain correctly, the wrapper needs to be added, too.\n if (innerSubscription !== innerSubscriber) {\n destination.add(innerSubscription);\n }\n }\n\n protected _complete(): void {\n this.hasCompleted = true;\n if (!this.hasSubscription) {\n this.destination.complete!();\n }\n this.unsubscribe();\n }\n\n notifyNext(innerValue: R): void {\n this.destination.next!(innerValue);\n }\n\n notifyError(err: any): void {\n this.destination.error!(err);\n }\n\n notifyComplete(): void {\n this.hasSubscription = false;\n if (this.hasCompleted) {\n this.destination.complete!();\n }\n }\n}\n","import { Observable } from '../Observable';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { MonoTypeOperatorFunction, OperatorFunction, ObservableInput, SchedulerLike } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\n/* tslint:disable:max-line-length */\nexport function expand(project: (value: T, index: number) => ObservableInput, concurrent?: number, scheduler?: SchedulerLike): OperatorFunction;\nexport function expand(project: (value: T, index: number) => ObservableInput, concurrent?: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Recursively projects each source value to an Observable which is merged in\n * the output Observable.\n *\n * It's similar to {@link mergeMap}, but applies the\n * projection function to every source value as well as every output value.\n * It's recursive.\n *\n * ![](expand.png)\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an Observable, and then merging those resulting Observables and\n * emitting the results of this merger. *Expand* will re-emit on the output\n * Observable every source value. Then, each output value is given to the\n * `project` function which returns an inner Observable to be merged on the\n * output Observable. Those output values resulting from the projection are also\n * given to the `project` function to produce new output values. This is how\n * *expand* behaves recursively.\n *\n * ## Example\n * Start emitting the powers of two on every click, at most 10 of them\n * ```ts\n * import { fromEvent, of } from 'rxjs';\n * import { expand, mapTo, delay, take } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const powersOfTwo = clicks.pipe(\n * mapTo(1),\n * expand(x => of(2 * x).pipe(delay(1000))),\n * take(10),\n * );\n * powersOfTwo.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link mergeMap}\n * @see {@link mergeScan}\n *\n * @param {function(value: T, index: number) => Observable} project A function\n * that, when applied to an item emitted by the source or the output Observable,\n * returns an Observable.\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input\n * Observables being subscribed to concurrently.\n * @param {SchedulerLike} [scheduler=null] The {@link SchedulerLike} to use for subscribing to\n * each projected inner Observable.\n * @return {Observable} An Observable that emits the source values and also\n * result of applying the projection function to each value emitted on the\n * output Observable and and merging the results of the Observables obtained\n * from this transformation.\n * @method expand\n * @owner Observable\n */\nexport function expand(project: (value: T, index: number) => ObservableInput,\n concurrent: number = Number.POSITIVE_INFINITY,\n scheduler?: SchedulerLike): OperatorFunction {\n concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;\n\n return (source: Observable) => source.lift(new ExpandOperator(project, concurrent, scheduler));\n}\n\nexport class ExpandOperator implements Operator {\n constructor(private project: (value: T, index: number) => ObservableInput,\n private concurrent: number,\n private scheduler?: SchedulerLike) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));\n }\n}\n\ninterface DispatchArg {\n subscriber: ExpandSubscriber;\n result: ObservableInput;\n value: any;\n index: number;\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nexport class ExpandSubscriber extends SimpleOuterSubscriber {\n private index: number = 0;\n private active: number = 0;\n private hasCompleted: boolean = false;\n private buffer?: any[];\n\n constructor(destination: Subscriber,\n private project: (value: T, index: number) => ObservableInput,\n private concurrent: number,\n private scheduler?: SchedulerLike) {\n super(destination);\n if (concurrent < Number.POSITIVE_INFINITY) {\n this.buffer = [];\n }\n }\n\n private static dispatch(arg: DispatchArg): void {\n const {subscriber, result, value, index} = arg;\n subscriber.subscribeToProjection(result, value, index);\n }\n\n protected _next(value: any): void {\n const destination = this.destination;\n\n if (destination.closed) {\n this._complete();\n return;\n }\n\n const index = this.index++;\n if (this.active < this.concurrent) {\n destination.next!(value);\n try {\n const { project } = this;\n const result = project(value, index);\n if (!this.scheduler) {\n this.subscribeToProjection(result, value, index);\n } else {\n const state: DispatchArg = { subscriber: this, result, value, index };\n const destination = this.destination as Subscription;\n destination.add(this.scheduler.schedule>(ExpandSubscriber.dispatch as any, 0, state));\n }\n } catch (e) {\n destination.error!(e);\n }\n } else {\n this.buffer!.push(value);\n }\n }\n\n private subscribeToProjection(result: any, value: T, index: number): void {\n this.active++;\n const destination = this.destination as Subscription;\n destination.add(innerSubscribe(result, new SimpleInnerSubscriber(this)));\n }\n\n protected _complete(): void {\n this.hasCompleted = true;\n if (this.hasCompleted && this.active === 0) {\n this.destination.complete!();\n }\n this.unsubscribe();\n }\n\n notifyNext(innerValue: R): void {\n this._next(innerValue);\n }\n\n notifyComplete(): void {\n const buffer = this.buffer;\n this.active--;\n if (buffer && buffer.length > 0) {\n this._next(buffer.shift());\n }\n if (this.hasCompleted && this.active === 0) {\n this.destination.complete!();\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\n/**\n * Returns an Observable that mirrors the source Observable, but will call a specified function when\n * the source terminates on complete or error.\n * @param {function} callback Function to be called when source terminates.\n * @return {Observable} An Observable that mirrors the source, but will call the specified function on termination.\n * @method finally\n * @owner Observable\n */\nexport function finalize(callback: () => void): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new FinallyOperator(callback));\n}\n\nclass FinallyOperator implements Operator {\n constructor(private callback: () => void) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass FinallySubscriber extends Subscriber {\n constructor(destination: Subscriber, callback: () => void) {\n super(destination);\n this.add(new Subscription(callback));\n }\n}\n","import {Observable} from '../Observable';\nimport {Operator} from '../Operator';\nimport {Subscriber} from '../Subscriber';\nimport {OperatorFunction} from '../types';\n\nexport function find(predicate: (value: T, index: number, source: Observable) => value is S,\n thisArg?: any): OperatorFunction;\nexport function find(predicate: (value: T, index: number, source: Observable) => boolean,\n thisArg?: any): OperatorFunction;\n/**\n * Emits only the first value emitted by the source Observable that meets some\n * condition.\n *\n * Finds the first value that passes some test and emits\n * that.\n *\n * ![](find.png)\n *\n * `find` searches for the first item in the source Observable that matches the\n * specified condition embodied by the `predicate`, and returns the first\n * occurrence in the source. Unlike {@link first}, the `predicate` is required\n * in `find`, and does not emit an error if a valid value is not found.\n *\n * ## Example\n * Find and emit the first click that happens on a DIV element\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { find } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(find(ev => ev.target.tagName === 'DIV'));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link filter}\n * @see {@link first}\n * @see {@link findIndex}\n * @see {@link take}\n *\n * @param {function(value: T, index: number, source: Observable): boolean} predicate\n * A function called with each item to test for condition matching.\n * @param {any} [thisArg] An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return {Observable} An Observable of the first item that matches the\n * condition.\n * @method find\n * @owner Observable\n */\nexport function find(predicate: (value: T, index: number, source: Observable) => boolean,\n thisArg?: any): OperatorFunction {\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate is not a function');\n }\n return (source: Observable) => source.lift(new FindValueOperator(predicate, source, false, thisArg)) as Observable;\n}\n\nexport class FindValueOperator implements Operator {\n constructor(private predicate: (value: T, index: number, source: Observable) => boolean,\n private source: Observable,\n private yieldIndex: boolean,\n private thisArg?: any) {\n }\n\n call(observer: Subscriber, source: any): any {\n return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nexport class FindValueSubscriber extends Subscriber {\n private index: number = 0;\n\n constructor(destination: Subscriber,\n private predicate: (value: T, index: number, source: Observable) => boolean,\n private source: Observable,\n private yieldIndex: boolean,\n private thisArg?: any) {\n super(destination);\n }\n\n private notifyComplete(value: any): void {\n const destination = this.destination;\n\n destination.next(value);\n destination.complete();\n this.unsubscribe();\n }\n\n protected _next(value: T): void {\n const {predicate, thisArg} = this;\n const index = this.index++;\n try {\n const result = predicate.call(thisArg || this, value, index, this.source);\n if (result) {\n this.notifyComplete(this.yieldIndex ? index : value);\n }\n } catch (err) {\n this.destination.error(err);\n }\n }\n\n protected _complete(): void {\n this.notifyComplete(this.yieldIndex ? -1 : undefined);\n }\n}\n","import { Observable } from '../Observable';\nimport { FindValueOperator } from '../operators/find';\nimport { OperatorFunction } from '../types';\n/**\n * Emits only the index of the first value emitted by the source Observable that\n * meets some condition.\n *\n * It's like {@link find}, but emits the index of the\n * found value, not the value itself.\n *\n * ![](findIndex.png)\n *\n * `findIndex` searches for the first item in the source Observable that matches\n * the specified condition embodied by the `predicate`, and returns the\n * (zero-based) index of the first occurrence in the source. Unlike\n * {@link first}, the `predicate` is required in `findIndex`, and does not emit\n * an error if a valid value is not found.\n *\n * ## Example\n * Emit the index of first click that happens on a DIV element\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { findIndex } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(findIndex(ev => ev.target.tagName === 'DIV'));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link filter}\n * @see {@link find}\n * @see {@link first}\n * @see {@link take}\n *\n * @param {function(value: T, index: number, source: Observable): boolean} predicate\n * A function called with each item to test for condition matching.\n * @param {any} [thisArg] An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return {Observable} An Observable of the index of the first item that\n * matches the condition.\n * @method find\n * @owner Observable\n */\nexport function findIndex(predicate: (value: T, index: number, source: Observable) => boolean,\n thisArg?: any): OperatorFunction {\n return (source: Observable) => source.lift(new FindValueOperator(predicate, source, true, thisArg)) as Observable;\n}\n","import { Observable } from '../Observable';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { EmptyError } from '../util/EmptyError';\nimport { OperatorFunction } from '../../internal/types';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\n\n/* tslint:disable:max-line-length */\nexport function first(\n predicate?: null,\n defaultValue?: D\n): OperatorFunction;\nexport function first(\n predicate: (value: T, index: number, source: Observable) => value is S,\n defaultValue?: S\n): OperatorFunction;\nexport function first(\n predicate: (value: T, index: number, source: Observable) => boolean,\n defaultValue?: D\n): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Emits only the first value (or the first value that meets some condition)\n * emitted by the source Observable.\n *\n * Emits only the first value. Or emits only the first\n * value that passes some test.\n *\n * ![](first.png)\n *\n * If called with no arguments, `first` emits the first value of the source\n * Observable, then completes. If called with a `predicate` function, `first`\n * emits the first value of the source that matches the specified condition. It\n * may also take a deprecated `resultSelector` function to produce the output\n * value from the input value, and a `defaultValue` to emit in case the source\n * completes before it is able to emit a valid value. Throws an error if\n * `defaultValue` was not provided and a matching element is not found.\n *\n * ## Examples\n * Emit only the first click that happens on the DOM\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { first } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(first());\n * result.subscribe(x => console.log(x));\n * ```\n *\n * Emits the first click that happens on a DIV\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { first } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(first(ev => ev.target.tagName === 'DIV'));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link filter}\n * @see {@link find}\n * @see {@link take}\n *\n * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`\n * callback if the Observable completes before any `next` notification was sent.\n *\n * @param {function(value: T, index: number, source: Observable): boolean} [predicate]\n * An optional function called with each item to test for condition matching.\n * @param {R} [defaultValue] The default value emitted in case no valid value\n * was found on the source.\n * @return {Observable} An Observable of the first item that matches the\n * condition.\n * @method first\n * @owner Observable\n */\nexport function first(\n predicate?: ((value: T, index: number, source: Observable) => boolean) | null,\n defaultValue?: D\n): OperatorFunction {\n const hasDefaultValue = arguments.length >= 2;\n return (source: Observable) => source.pipe(\n predicate ? filter((v, i) => predicate(v, i, source)) : identity,\n take(1),\n hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()),\n );\n}\n","import { Observable } from '../Observable';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction } from '../types';\n\n/**\n * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`.\n *\n * ![](ignoreElements.png)\n *\n * ## Examples\n * ### Ignores emitted values, reacts to observable's completion.\n * ```ts\n * import { of } from 'rxjs';\n * import { ignoreElements } from 'rxjs/operators';\n *\n * of('you', 'talking', 'to', 'me').pipe(\n * ignoreElements(),\n * )\n * .subscribe(\n * word => console.log(word),\n * err => console.log('error:', err),\n * () => console.log('the end'),\n * );\n * // result:\n * // 'the end'\n * ```\n * @return {Observable} An empty Observable that only calls `complete`\n * or `error`, based on which one is called by the source Observable.\n * @method ignoreElements\n * @owner Observable\n */\nexport function ignoreElements(): OperatorFunction {\n return function ignoreElementsOperatorFunction(source: Observable) {\n return source.lift(new IgnoreElementsOperator());\n };\n}\n\nclass IgnoreElementsOperator implements Operator {\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new IgnoreElementsSubscriber(subscriber));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass IgnoreElementsSubscriber extends Subscriber {\n protected _next(unused: T): void {\n // Do nothing\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { OperatorFunction } from '../types';\n\n/**\n * Emits false if the input observable emits any values, or emits true if the\n * input observable completes without emitting any values.\n *\n * Tells whether any values are emitted by an observable\n *\n * ![](isEmpty.png)\n *\n * `isEmpty` transforms an Observable that emits values into an Observable that\n * emits a single boolean value representing whether or not any values were\n * emitted by the source Observable. As soon as the source Observable emits a\n * value, `isEmpty` will emit a `false` and complete. If the source Observable\n * completes having not emitted anything, `isEmpty` will emit a `true` and\n * complete.\n *\n * A similar effect could be achieved with {@link count}, but `isEmpty` can emit\n * a `false` value sooner.\n *\n * ## Examples\n *\n * Emit `false` for a non-empty Observable\n * ```javascript\n * import { Subject } from 'rxjs';\n * import { isEmpty } from 'rxjs/operators';\n *\n * const source = new Subject();\n * const result = source.pipe(isEmpty());\n * source.subscribe(x => console.log(x));\n * result.subscribe(x => console.log(x));\n * source.next('a');\n * source.next('b');\n * source.next('c');\n * source.complete();\n *\n * // Results in:\n * // a\n * // false\n * // b\n * // c\n * ```\n *\n * Emit `true` for an empty Observable\n * ```javascript\n * import { EMPTY } from 'rxjs';\n * import { isEmpty } from 'rxjs/operators';\n *\n * const result = EMPTY.pipe(isEmpty());\n * result.subscribe(x => console.log(x));\n * // Results in:\n * // true\n * ```\n *\n * @see {@link count}\n * @see {@link EMPTY}\n *\n * @return {OperatorFunction} An Observable of a boolean value indicating whether observable was empty or not\n * @method isEmpty\n * @owner Observable\n */\n\nexport function isEmpty(): OperatorFunction {\n return (source: Observable) => source.lift(new IsEmptyOperator());\n}\n\nclass IsEmptyOperator implements Operator {\n call (observer: Subscriber, source: any): any {\n return source.subscribe(new IsEmptySubscriber(observer));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass IsEmptySubscriber extends Subscriber {\n constructor(destination: Subscriber) {\n super(destination);\n }\n\n private notifyComplete(isEmpty: boolean): void {\n const destination = this.destination;\n\n destination.next(isEmpty);\n destination.complete();\n }\n\n protected _next(value: boolean) {\n this.notifyComplete(false);\n }\n\n protected _complete() {\n this.notifyComplete(true);\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\n/**\n * Emits only the last `count` values emitted by the source Observable.\n *\n * Remembers the latest `count` values, then emits those\n * only when the source completes.\n *\n * ![](takeLast.png)\n *\n * `takeLast` returns an Observable that emits at most the last `count` values\n * emitted by the source Observable. If the source emits fewer than `count`\n * values then all of its values are emitted. This operator must wait until the\n * `complete` notification emission from the source in order to emit the `next`\n * values on the output Observable, because otherwise it is impossible to know\n * whether or not more values will be emitted on the source. For this reason,\n * all values are emitted synchronously, followed by the complete notification.\n *\n * ## Example\n * Take the last 3 values of an Observable with many values\n * ```ts\n * import { range } from 'rxjs';\n * import { takeLast } from 'rxjs/operators';\n *\n * const many = range(1, 100);\n * const lastThree = many.pipe(takeLast(3));\n * lastThree.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link take}\n * @see {@link takeUntil}\n * @see {@link takeWhile}\n * @see {@link skip}\n *\n * @throws {ArgumentOutOfRangeError} When using `takeLast(i)`, it delivers an\n * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0`.\n *\n * @param {number} count The maximum number of values to emit from the end of\n * the sequence of values emitted by the source Observable.\n * @return {Observable} An Observable that emits at most the last count\n * values emitted by the source Observable.\n * @method takeLast\n * @owner Observable\n */\nexport function takeLast(count: number): MonoTypeOperatorFunction {\n return function takeLastOperatorFunction(source: Observable): Observable {\n if (count === 0) {\n return empty();\n } else {\n return source.lift(new TakeLastOperator(count));\n }\n };\n}\n\nclass TakeLastOperator implements Operator {\n constructor(private total: number) {\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass TakeLastSubscriber extends Subscriber {\n private ring: Array = new Array();\n private count: number = 0;\n\n constructor(destination: Subscriber, private total: number) {\n super(destination);\n }\n\n protected _next(value: T): void {\n const ring = this.ring;\n const total = this.total;\n const count = this.count++;\n\n if (ring.length < total) {\n ring.push(value);\n } else {\n const index = count % total;\n ring[index] = value;\n }\n }\n\n protected _complete(): void {\n const destination = this.destination;\n let count = this.count;\n\n if (count > 0) {\n const total = this.count >= this.total ? this.total : this.count;\n const ring = this.ring;\n\n for (let i = 0; i < total; i++) {\n const idx = (count++) % total;\n destination.next(ring[idx]);\n }\n }\n\n destination.complete();\n }\n}\n","import { Observable } from '../Observable';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { EmptyError } from '../util/EmptyError';\nimport { OperatorFunction } from '../../internal/types';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\n\n/* tslint:disable:max-line-length */\nexport function last(\n predicate?: null,\n defaultValue?: D\n): OperatorFunction;\nexport function last(\n predicate: (value: T, index: number, source: Observable) => value is S,\n defaultValue?: S\n): OperatorFunction;\nexport function last(\n predicate: (value: T, index: number, source: Observable) => boolean,\n defaultValue?: D\n): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns an Observable that emits only the last item emitted by the source Observable.\n * It optionally takes a predicate function as a parameter, in which case, rather than emitting\n * the last item from the source Observable, the resulting Observable will emit the last item\n * from the source Observable that satisfies the predicate.\n *\n * ![](last.png)\n *\n * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`\n * callback if the Observable completes before any `next` notification was sent.\n * @param {function} [predicate] - The condition any source emitted item has to satisfy.\n * @param {any} [defaultValue] - An optional default value to provide if last\n * predicate isn't met or no values were emitted.\n * @return {Observable} An Observable that emits only the last item satisfying the given condition\n * from the source, or an NoSuchElementException if no such items are emitted.\n * @throws - Throws if no items that match the predicate are emitted by the source Observable.\n */\nexport function last(\n predicate?: ((value: T, index: number, source: Observable) => boolean) | null,\n defaultValue?: D\n): OperatorFunction {\n const hasDefaultValue = arguments.length >= 2;\n return (source: Observable) => source.pipe(\n predicate ? filter((v, i) => predicate(v, i, source)) : identity,\n takeLast(1),\n hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()),\n );\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { OperatorFunction } from '../types';\n\n/**\n * Emits the given constant value on the output Observable every time the source\n * Observable emits a value.\n *\n * Like {@link map}, but it maps every source value to\n * the same output value every time.\n *\n * ![](mapTo.png)\n *\n * Takes a constant `value` as argument, and emits that whenever the source\n * Observable emits a value. In other words, ignores the actual source value,\n * and simply uses the emission moment to know when to emit the given `value`.\n *\n * ## Example\n * Map every click to the string 'Hi'\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { mapTo } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const greetings = clicks.pipe(mapTo('Hi'));\n * greetings.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link map}\n *\n * @param {any} value The value to map each source value to.\n * @return {Observable} An Observable that emits the given `value` every time\n * the source Observable emits something.\n * @method mapTo\n * @owner Observable\n */\nexport function mapTo(value: R): OperatorFunction {\n return (source: Observable) => source.lift(new MapToOperator(value));\n}\n\nclass MapToOperator implements Operator {\n\n value: R;\n\n constructor(value: R) {\n this.value = value;\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new MapToSubscriber(subscriber, this.value));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass MapToSubscriber extends Subscriber {\n\n value: R;\n\n constructor(destination: Subscriber, value: R) {\n super(destination);\n this.value = value;\n }\n\n protected _next(x: T) {\n this.destination.next(this.value);\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nimport { OperatorFunction } from '../types';\n\n/**\n * Represents all of the notifications from the source Observable as `next`\n * emissions marked with their original types within {@link Notification}\n * objects.\n *\n * Wraps `next`, `error` and `complete` emissions in\n * {@link Notification} objects, emitted as `next` on the output Observable.\n * \n *\n * ![](materialize.png)\n *\n * `materialize` returns an Observable that emits a `next` notification for each\n * `next`, `error`, or `complete` emission of the source Observable. When the\n * source Observable emits `complete`, the output Observable will emit `next` as\n * a Notification of type \"complete\", and then it will emit `complete` as well.\n * When the source Observable emits `error`, the output will emit `next` as a\n * Notification of type \"error\", and then `complete`.\n *\n * This operator is useful for producing metadata of the source Observable, to\n * be consumed as `next` emissions. Use it in conjunction with\n * {@link dematerialize}.\n *\n * ## Example\n * Convert a faulty Observable to an Observable of Notifications\n * ```ts\n * import { of } from 'rxjs';\n * import { materialize, map } from 'rxjs/operators';\n *\n * const letters = of('a', 'b', 13, 'd');\n * const upperCase = letters.pipe(map(x => x.toUpperCase()));\n * const materialized = upperCase.pipe(materialize());\n * materialized.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // - Notification {kind: \"N\", value: \"A\", error: undefined, hasValue: true}\n * // - Notification {kind: \"N\", value: \"B\", error: undefined, hasValue: true}\n * // - Notification {kind: \"E\", value: undefined, error: TypeError:\n * // x.toUpperCase is not a function at MapSubscriber.letters.map.x\n * // [as project] (http://1…, hasValue: false}\n * ```\n *\n * @see {@link Notification}\n * @see {@link dematerialize}\n *\n * @return {Observable>} An Observable that emits\n * {@link Notification} objects that wrap the original emissions from the source\n * Observable with metadata.\n * @method materialize\n * @owner Observable\n */\nexport function materialize(): OperatorFunction> {\n return function materializeOperatorFunction(source: Observable) {\n return source.lift(new MaterializeOperator());\n };\n}\n\nclass MaterializeOperator implements Operator> {\n call(subscriber: Subscriber>, source: any): any {\n return source.subscribe(new MaterializeSubscriber(subscriber));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass MaterializeSubscriber extends Subscriber {\n constructor(destination: Subscriber>) {\n super(destination);\n }\n\n protected _next(value: T) {\n this.destination.next(Notification.createNext(value));\n }\n\n protected _error(err: any) {\n const destination = this.destination;\n destination.next(Notification.createError(err));\n destination.complete();\n }\n\n protected _complete() {\n const destination = this.destination;\n destination.next(Notification.createComplete());\n destination.complete();\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction, MonoTypeOperatorFunction } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function scan(accumulator: (acc: R, value: T, index: number) => R, seed: R): OperatorFunction;\nexport function scan(accumulator: (acc: T, value: T, index: number) => T, seed?: T): MonoTypeOperatorFunction;\nexport function scan(accumulator: (acc: R, value: T, index: number) => R): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Applies an accumulator function over the source Observable, and returns each\n * intermediate result, with an optional seed value.\n *\n * It's like {@link reduce}, but emits the current\n * accumulation whenever the source emits a value.\n *\n * ![](scan.png)\n *\n * Combines together all values emitted on the source, using an accumulator\n * function that knows how to join a new source value into the accumulation from\n * the past. Is similar to {@link reduce}, but emits the intermediate\n * accumulations.\n *\n * Returns an Observable that applies a specified `accumulator` function to each\n * item emitted by the source Observable. If a `seed` value is specified, then\n * that value will be used as the initial value for the accumulator. If no seed\n * value is specified, the first item of the source is used as the seed.\n *\n * ## Example\n * Count the number of click events\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { scan, mapTo } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const ones = clicks.pipe(mapTo(1));\n * const seed = 0;\n * const count = ones.pipe(scan((acc, one) => acc + one, seed));\n * count.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link expand}\n * @see {@link mergeScan}\n * @see {@link reduce}\n *\n * @param {function(acc: R, value: T, index: number): R} accumulator\n * The accumulator function called on each source value.\n * @param {T|R} [seed] The initial accumulation value.\n * @return {Observable} An observable of the accumulated values.\n * @method scan\n * @owner Observable\n */\nexport function scan(accumulator: (acc: R, value: T, index: number) => R, seed?: T | R): OperatorFunction {\n let hasSeed = false;\n // providing a seed of `undefined` *should* be valid and trigger\n // hasSeed! so don't use `seed !== undefined` checks!\n // For this reason, we have to check it here at the original call site\n // otherwise inside Operator/Subscriber we won't know if `undefined`\n // means they didn't provide anything or if they literally provided `undefined`\n if (arguments.length >= 2) {\n hasSeed = true;\n }\n\n return function scanOperatorFunction(source: Observable): Observable {\n return source.lift(new ScanOperator(accumulator, seed, hasSeed));\n };\n}\n\nclass ScanOperator implements Operator {\n constructor(private accumulator: (acc: R, value: T, index: number) => R, private seed?: T | R, private hasSeed: boolean = false) {}\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass ScanSubscriber extends Subscriber {\n private index: number = 0;\n\n get seed(): T | R {\n return this._seed;\n }\n\n set seed(value: T | R) {\n this.hasSeed = true;\n this._seed = value;\n }\n\n constructor(destination: Subscriber, private accumulator: (acc: R, value: T, index: number) => R, private _seed: T | R,\n private hasSeed: boolean) {\n super(destination);\n }\n\n protected _next(value: T): void {\n if (!this.hasSeed) {\n this.seed = value;\n this.destination.next(value);\n } else {\n return this._tryNext(value);\n }\n }\n\n private _tryNext(value: T): void {\n const index = this.index++;\n let result: any;\n try {\n result = this.accumulator(this.seed, value, index);\n } catch (err) {\n this.destination.error(err);\n }\n this.seed = result;\n this.destination.next(result);\n }\n}\n","import { Observable } from '../Observable';\nimport { scan } from './scan';\nimport { takeLast } from './takeLast';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { OperatorFunction, MonoTypeOperatorFunction } from '../types';\nimport { pipe } from '../util/pipe';\n\n/* tslint:disable:max-line-length */\nexport function reduce(accumulator: (acc: R, value: T, index: number) => R, seed: R): OperatorFunction;\nexport function reduce(accumulator: (acc: T, value: T, index: number) => T, seed?: T): MonoTypeOperatorFunction;\nexport function reduce(accumulator: (acc: R, value: T, index: number) => R): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Applies an accumulator function over the source Observable, and returns the\n * accumulated result when the source completes, given an optional seed value.\n *\n * Combines together all values emitted on the source,\n * using an accumulator function that knows how to join a new source value into\n * the accumulation from the past.\n *\n * ![](reduce.png)\n *\n * Like\n * [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce),\n * `reduce` applies an `accumulator` function against an accumulation and each\n * value of the source Observable (from the past) to reduce it to a single\n * value, emitted on the output Observable. Note that `reduce` will only emit\n * one value, only when the source Observable completes. It is equivalent to\n * applying operator {@link scan} followed by operator {@link last}.\n *\n * Returns an Observable that applies a specified `accumulator` function to each\n * item emitted by the source Observable. If a `seed` value is specified, then\n * that value will be used as the initial value for the accumulator. If no seed\n * value is specified, the first item of the source is used as the seed.\n *\n * ## Example\n * Count the number of click events that happened in 5 seconds\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { reduce, takeUntil, mapTo } from 'rxjs/operators';\n *\n * const clicksInFiveSeconds = fromEvent(document, 'click').pipe(\n * takeUntil(interval(5000)),\n * );\n * const ones = clicksInFiveSeconds.pipe(mapTo(1));\n * const seed = 0;\n * const count = ones.pipe(reduce((acc, one) => acc + one, seed));\n * count.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link count}\n * @see {@link expand}\n * @see {@link mergeScan}\n * @see {@link scan}\n *\n * @param {function(acc: R, value: T, index: number): R} accumulator The accumulator function\n * called on each source value.\n * @param {R} [seed] The initial accumulation value.\n * @return {Observable} An Observable that emits a single value that is the\n * result of accumulating the values emitted by the source Observable.\n * @method reduce\n * @owner Observable\n */\nexport function reduce(accumulator: (acc: T | R, value: T, index?: number) => T | R, seed?: T | R): OperatorFunction {\n // providing a seed of `undefined` *should* be valid and trigger\n // hasSeed! so don't use `seed !== undefined` checks!\n // For this reason, we have to check it here at the original call site\n // otherwise inside Operator/Subscriber we won't know if `undefined`\n // means they didn't provide anything or if they literally provided `undefined`\n if (arguments.length >= 2) {\n return function reduceOperatorFunctionWithSeed(source: Observable): Observable {\n return pipe(scan(accumulator, seed), takeLast(1), defaultIfEmpty(seed))(source);\n };\n }\n return function reduceOperatorFunction(source: Observable): Observable {\n return pipe(\n scan((acc, value, index) => accumulator(acc, value, index + 1)),\n takeLast(1),\n )(source);\n };\n}\n","import { reduce } from './reduce';\nimport { MonoTypeOperatorFunction } from '../types';\n\n/**\n * The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function),\n * and when source Observable completes it emits a single item: the item with the largest value.\n *\n * ![](max.png)\n *\n * ## Examples\n * Get the maximal value of a series of numbers\n * ```ts\n * import { of } from 'rxjs';\n * import { max } from 'rxjs/operators';\n *\n * of(5, 4, 7, 2, 8).pipe(\n * max(),\n * )\n * .subscribe(x => console.log(x)); // -> 8\n * ```\n *\n * Use a comparer function to get the maximal item\n * ```typescript\n * import { of } from 'rxjs';\n * import { max } from 'rxjs/operators';\n *\n * interface Person {\n * age: number,\n * name: string\n * }\n * of(\n * {age: 7, name: 'Foo'},\n * {age: 5, name: 'Bar'},\n * {age: 9, name: 'Beer'},\n * ).pipe(\n * max((a: Person, b: Person) => a.age < b.age ? -1 : 1),\n * )\n * .subscribe((x: Person) => console.log(x.name)); // -> 'Beer'\n * ```\n *\n * @see {@link min}\n *\n * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the\n * value of two items.\n * @return {Observable} An Observable that emits item with the largest value.\n * @method max\n * @owner Observable\n */\nexport function max(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction {\n const max: (x: T, y: T) => T = (typeof comparer === 'function')\n ? (x, y) => comparer(x, y) > 0 ? x : y\n : (x, y) => x > y ? x : y;\n\n return reduce(max);\n}\n","import { merge as mergeStatic } from '../observable/merge';\nimport { Observable } from '../Observable';\nimport { ObservableInput, OperatorFunction, MonoTypeOperatorFunction, SchedulerLike } from '../types';\n\n/* tslint:disable:max-line-length */\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(scheduler?: SchedulerLike): MonoTypeOperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(concurrent?: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(v2: ObservableInput, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(v2: ObservableInput, concurrent?: number, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(v2: ObservableInput, v3: ObservableInput, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(v2: ObservableInput, v3: ObservableInput, concurrent?: number, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, concurrent?: number, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, concurrent?: number, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput, concurrent?: number, scheduler?: SchedulerLike): OperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(...observables: Array | SchedulerLike | number>): MonoTypeOperatorFunction;\n/** @deprecated Deprecated in favor of static merge. */\nexport function merge(...observables: Array | SchedulerLike | number>): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * @deprecated Deprecated in favor of static {@link merge}.\n */\nexport function merge(...observables: Array | SchedulerLike | number>): OperatorFunction {\n return (source: Observable) => source.lift.call(mergeStatic(source, ...observables));\n}\n","import { Observable } from '../Observable';\nimport { OperatorFunction, ObservedValueOf } from '../../internal/types';\nimport { mergeMap } from './mergeMap';\nimport { ObservableInput } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function mergeMapTo>(innerObservable: O, concurrent?: number): OperatorFunction>;\n/** @deprecated */\nexport function mergeMapTo>(innerObservable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R, concurrent?: number): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Projects each source value to the same Observable which is merged multiple\n * times in the output Observable.\n *\n * It's like {@link mergeMap}, but maps each value always\n * to the same inner Observable.\n *\n * ![](mergeMapTo.png)\n *\n * Maps each source value to the given Observable `innerObservable` regardless\n * of the source value, and then merges those resulting Observables into one\n * single Observable, which is the output Observable.\n *\n * ## Example\n * For each click event, start an interval Observable ticking every 1 second\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { mergeMapTo } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(mergeMapTo(interval(1000)));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link concatMapTo}\n * @see {@link merge}\n * @see {@link mergeAll}\n * @see {@link mergeMap}\n * @see {@link mergeScan}\n * @see {@link switchMapTo}\n *\n * @param {ObservableInput} innerObservable An Observable to replace each value from\n * the source Observable.\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input\n * Observables being subscribed to concurrently.\n * @return {Observable} An Observable that emits items from the given\n * `innerObservable`\n * @method mergeMapTo\n * @owner Observable\n */\nexport function mergeMapTo>(\n innerObservable: O,\n resultSelector?: ((outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R) | number,\n concurrent: number = Number.POSITIVE_INFINITY\n): OperatorFunction|R> {\n if (typeof resultSelector === 'function') {\n return mergeMap(() => innerObservable, resultSelector, concurrent);\n }\n if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return mergeMap(() => innerObservable, concurrent);\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { ObservableInput, OperatorFunction } from '../types';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\n\n/**\n * Applies an accumulator function over the source Observable where the\n * accumulator function itself returns an Observable, then each intermediate\n * Observable returned is merged into the output Observable.\n *\n * It's like {@link scan}, but the Observables returned\n * by the accumulator are merged into the outer Observable.\n *\n * ## Example\n * Count the number of click events\n * ```ts\n * import { fromEvent, of } from 'rxjs';\n * import { mapTo, mergeScan } from 'rxjs/operators';\n *\n * const click$ = fromEvent(document, 'click');\n * const one$ = click$.pipe(mapTo(1));\n * const seed = 0;\n * const count$ = one$.pipe(\n * mergeScan((acc, one) => of(acc + one), seed),\n * );\n * count$.subscribe(x => console.log(x));\n *\n * // Results:\n * // 1\n * // 2\n * // 3\n * // 4\n * // ...and so on for each click\n * ```\n *\n * @param {function(acc: R, value: T): Observable} accumulator\n * The accumulator function called on each source value.\n * @param seed The initial accumulation value.\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of\n * input Observables being subscribed to concurrently.\n * @return {Observable} An observable of the accumulated values.\n * @method mergeScan\n * @owner Observable\n */\nexport function mergeScan(accumulator: (acc: R, value: T, index: number) => ObservableInput,\n seed: R,\n concurrent: number = Number.POSITIVE_INFINITY): OperatorFunction {\n return (source: Observable) => source.lift(new MergeScanOperator(accumulator, seed, concurrent));\n}\n\nexport class MergeScanOperator implements Operator {\n constructor(private accumulator: (acc: R, value: T, index: number) => ObservableInput,\n private seed: R,\n private concurrent: number) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new MergeScanSubscriber(\n subscriber, this.accumulator, this.seed, this.concurrent\n ));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nexport class MergeScanSubscriber extends SimpleOuterSubscriber {\n private hasValue: boolean = false;\n private hasCompleted: boolean = false;\n private buffer: Observable[] = [];\n private active: number = 0;\n protected index: number = 0;\n\n constructor(destination: Subscriber,\n private accumulator: (acc: R, value: T, index: number) => ObservableInput,\n private acc: R,\n private concurrent: number) {\n super(destination);\n }\n\n protected _next(value: any): void {\n if (this.active < this.concurrent) {\n const index = this.index++;\n const destination = this.destination;\n let ish;\n try {\n const { accumulator } = this;\n ish = accumulator(this.acc, value, index);\n } catch (e) {\n return destination.error!(e);\n }\n this.active++;\n this._innerSub(ish);\n } else {\n this.buffer.push(value);\n }\n }\n\n private _innerSub(ish: any): void {\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination as Subscription;\n destination.add(innerSubscriber);\n const innerSubscription = innerSubscribe(ish, innerSubscriber);\n // The returned subscription will usually be the subscriber that was\n // passed. However, interop subscribers will be wrapped and for\n // unsubscriptions to chain correctly, the wrapper needs to be added, too.\n if (innerSubscription !== innerSubscriber) {\n destination.add(innerSubscription);\n }\n }\n\n protected _complete(): void {\n this.hasCompleted = true;\n if (this.active === 0 && this.buffer.length === 0) {\n if (this.hasValue === false) {\n this.destination.next!(this.acc);\n }\n this.destination.complete!();\n }\n this.unsubscribe();\n }\n\n notifyNext(innerValue: R): void {\n const { destination } = this;\n this.acc = innerValue;\n this.hasValue = true;\n destination.next!(innerValue);\n }\n\n notifyComplete(): void {\n const buffer = this.buffer;\n this.active--;\n if (buffer.length > 0) {\n this._next(buffer.shift());\n } else if (this.active === 0 && this.hasCompleted) {\n if (this.hasValue === false) {\n this.destination.next!(this.acc);\n }\n this.destination.complete!();\n }\n }\n}\n","import { reduce } from './reduce';\nimport { MonoTypeOperatorFunction } from '../types';\n\n/**\n * The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function),\n * and when source Observable completes it emits a single item: the item with the smallest value.\n *\n * ![](min.png)\n *\n * ## Examples\n * Get the minimal value of a series of numbers\n * ```ts\n * import { of } from 'rxjs';\n * import { min } from 'rxjs/operators';\n *\n * of(5, 4, 7, 2, 8).pipe(\n * min(),\n * )\n * .subscribe(x => console.log(x)); // -> 2\n * ```\n *\n * Use a comparer function to get the minimal item\n * ```typescript\n * import { of } from 'rxjs';\n * import { min } from 'rxjs/operators';\n *\n * interface Person {\n * age: number,\n * name: string\n * }\n * of(\n * {age: 7, name: 'Foo'},\n * {age: 5, name: 'Bar'},\n * {age: 9, name: 'Beer'},\n * ).pipe(\n * min( (a: Person, b: Person) => a.age < b.age ? -1 : 1),\n * )\n * .subscribe((x: Person) => console.log(x.name)); // -> 'Bar'\n * ```\n * @see {@link max}\n *\n * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the\n * value of two items.\n * @return {Observable} An Observable that emits item with the smallest value.\n * @method min\n * @owner Observable\n */\nexport function min(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction {\n const min: (x: T, y: T) => T = (typeof comparer === 'function')\n ? (x, y) => comparer(x, y) < 0 ? x : y\n : (x, y) => x < y ? x : y;\n return reduce(min);\n}\n","import { Subject } from '../Subject';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { ConnectableObservable, connectableObservableDescriptor } from '../observable/ConnectableObservable';\nimport { MonoTypeOperatorFunction, OperatorFunction, UnaryFunction, ObservedValueOf, ObservableInput } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function multicast(subject: Subject): UnaryFunction, ConnectableObservable>;\nexport function multicast>(subject: Subject, selector: (shared: Observable) => O): UnaryFunction, ConnectableObservable>>;\nexport function multicast(subjectFactory: (this: Observable) => Subject): UnaryFunction, ConnectableObservable>;\nexport function multicast>(SubjectFactory: (this: Observable) => Subject, selector: (shared: Observable) => O): OperatorFunction>;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns an Observable that emits the results of invoking a specified selector on items\n * emitted by a ConnectableObservable that shares a single subscription to the underlying stream.\n *\n * ![](multicast.png)\n *\n * @param {Function|Subject} subjectOrSubjectFactory - Factory function to create an intermediate subject through\n * which the source sequence's elements will be multicast to the selector function\n * or Subject to push source elements into.\n * @param {Function} [selector] - Optional selector function that can use the multicasted source stream\n * as many times as needed, without causing multiple subscriptions to the source stream.\n * Subscribers to the given source will receive all notifications of the source from the\n * time of the subscription forward.\n * @return {Observable} An Observable that emits the results of invoking the selector\n * on the items emitted by a `ConnectableObservable` that shares a single subscription to\n * the underlying stream.\n * @method multicast\n * @owner Observable\n */\nexport function multicast(subjectOrSubjectFactory: Subject | (() => Subject),\n selector?: (source: Observable) => Observable): OperatorFunction {\n return function multicastOperatorFunction(source: Observable): Observable {\n let subjectFactory: () => Subject;\n if (typeof subjectOrSubjectFactory === 'function') {\n subjectFactory = <() => Subject>subjectOrSubjectFactory;\n } else {\n subjectFactory = function subjectFactory() {\n return >subjectOrSubjectFactory;\n };\n }\n\n if (typeof selector === 'function') {\n return source.lift(new MulticastOperator(subjectFactory, selector));\n }\n\n const connectable: any = Object.create(source, connectableObservableDescriptor);\n connectable.source = source;\n connectable.subjectFactory = subjectFactory;\n\n return > connectable;\n };\n}\n\nexport class MulticastOperator implements Operator {\n constructor(private subjectFactory: () => Subject,\n private selector: (source: Observable) => Observable) {\n }\n call(subscriber: Subscriber, source: any): any {\n const { selector } = this;\n const subject = this.subjectFactory();\n const subscription = selector(subject).subscribe(subscriber);\n subscription.add(source.subscribe(subject));\n return subscription;\n }\n}\n","import { Observable } from '../Observable';\nimport { from } from '../observable/from';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { isArray } from '../util/isArray';\nimport { ObservableInput, OperatorFunction } from '../types';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\n\n/* tslint:disable:max-line-length */\nexport function onErrorResumeNext(): OperatorFunction;\nexport function onErrorResumeNext(v: ObservableInput): OperatorFunction;\nexport function onErrorResumeNext(v: ObservableInput, v2: ObservableInput): OperatorFunction;\nexport function onErrorResumeNext(v: ObservableInput, v2: ObservableInput, v3: ObservableInput): OperatorFunction;\nexport function onErrorResumeNext(v: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput): OperatorFunction;\nexport function onErrorResumeNext(v: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput): OperatorFunction;\nexport function onErrorResumeNext(v: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput): OperatorFunction;\nexport function onErrorResumeNext(...observables: Array>): OperatorFunction;\nexport function onErrorResumeNext(array: ObservableInput[]): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * When any of the provided Observable emits an complete or error notification, it immediately subscribes to the next one\n * that was passed.\n *\n * Execute series of Observables no matter what, even if it means swallowing errors.\n *\n * ![](onErrorResumeNext.png)\n *\n * `onErrorResumeNext` is an operator that accepts a series of Observables, provided either directly as\n * arguments or as an array. If no single Observable is provided, returned Observable will simply behave the same\n * as the source.\n *\n * `onErrorResumeNext` returns an Observable that starts by subscribing and re-emitting values from the source Observable.\n * When its stream of values ends - no matter if Observable completed or emitted an error - `onErrorResumeNext`\n * will subscribe to the first Observable that was passed as an argument to the method. It will start re-emitting\n * its values as well and - again - when that stream ends, `onErrorResumeNext` will proceed to subscribing yet another\n * Observable in provided series, no matter if previous Observable completed or ended with an error. This will\n * be happening until there is no more Observables left in the series, at which point returned Observable will\n * complete - even if the last subscribed stream ended with an error.\n *\n * `onErrorResumeNext` can be therefore thought of as version of {@link concat} operator, which is more permissive\n * when it comes to the errors emitted by its input Observables. While `concat` subscribes to the next Observable\n * in series only if previous one successfully completed, `onErrorResumeNext` subscribes even if it ended with\n * an error.\n *\n * Note that you do not get any access to errors emitted by the Observables. In particular do not\n * expect these errors to appear in error callback passed to {@link Observable#subscribe}. If you want to take\n * specific actions based on what error was emitted by an Observable, you should try out {@link catchError} instead.\n *\n *\n * ## Example\n * Subscribe to the next Observable after map fails\n * ```ts\n * import { of } from 'rxjs';\n * import { onErrorResumeNext, map } from 'rxjs/operators';\n *\n * of(1, 2, 3, 0).pipe(\n * map(x => {\n * if (x === 0) { throw Error(); }\n * return 10 / x;\n * }),\n * onErrorResumeNext(of(1, 2, 3)),\n * )\n * .subscribe(\n * val => console.log(val),\n * err => console.log(err), // Will never be called.\n * () => console.log('that\\'s it!')\n * );\n *\n * // Logs:\n * // 10\n * // 5\n * // 3.3333333333333335\n * // 1\n * // 2\n * // 3\n * // \"that's it!\"\n * ```\n *\n * @see {@link concat}\n * @see {@link catchError}\n *\n * @param {...ObservableInput} observables Observables passed either directly or as an array.\n * @return {Observable} An Observable that emits values from source Observable, but - if it errors - subscribes\n * to the next passed Observable and so on, until it completes or runs out of Observables.\n * @method onErrorResumeNext\n * @owner Observable\n */\n\nexport function onErrorResumeNext(...nextSources: Array |\n Array>>): OperatorFunction {\n if (nextSources.length === 1 && isArray(nextSources[0])) {\n nextSources = >>nextSources[0];\n }\n\n return (source: Observable) => source.lift(new OnErrorResumeNextOperator(nextSources));\n}\n\n/* tslint:disable:max-line-length */\nexport function onErrorResumeNextStatic(v: ObservableInput): Observable;\nexport function onErrorResumeNextStatic(v2: ObservableInput, v3: ObservableInput): Observable;\nexport function onErrorResumeNextStatic(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput): Observable;\nexport function onErrorResumeNextStatic(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput): Observable;\nexport function onErrorResumeNextStatic(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput): Observable;\n\nexport function onErrorResumeNextStatic(...observables: Array | ((...values: Array) => R)>): Observable;\nexport function onErrorResumeNextStatic(array: ObservableInput[]): Observable;\n/* tslint:enable:max-line-length */\n\nexport function onErrorResumeNextStatic(...nextSources: Array |\n Array> |\n ((...values: Array) => R)>): Observable {\n let source: ObservableInput|undefined = undefined;\n\n if (nextSources.length === 1 && isArray(nextSources[0])) {\n nextSources = nextSources[0] as ObservableInput[];\n }\n // TODO: resolve issue with passing no arguments.\n source = nextSources.shift()!;\n\n return from(source).lift(new OnErrorResumeNextOperator(nextSources));\n}\n\nclass OnErrorResumeNextOperator implements Operator {\n constructor(private nextSources: Array>) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));\n }\n}\n\nclass OnErrorResumeNextSubscriber extends SimpleOuterSubscriber {\n constructor(protected destination: Subscriber,\n private nextSources: Array>) {\n super(destination);\n }\n\n notifyError(): void {\n this.subscribeToNextSource();\n }\n\n notifyComplete(): void {\n this.subscribeToNextSource();\n }\n\n protected _error(err: any): void {\n this.subscribeToNextSource();\n this.unsubscribe();\n }\n\n protected _complete(): void {\n this.subscribeToNextSource();\n this.unsubscribe();\n }\n\n private subscribeToNextSource(): void {\n const next = this.nextSources.shift();\n if (!!next) {\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination as Subscription;\n destination.add(innerSubscriber);\n const innerSubscription = innerSubscribe(next, innerSubscriber);\n // The returned subscription will usually be the subscriber that was\n // passed. However, interop subscribers will be wrapped and for\n // unsubscriptions to chain correctly, the wrapper needs to be added, too.\n if (innerSubscription !== innerSubscriber) {\n destination.add(innerSubscription);\n }\n } else {\n this.destination.complete();\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction } from '../types';\n\n/**\n * Groups pairs of consecutive emissions together and emits them as an array of\n * two values.\n *\n * Puts the current value and previous value together as\n * an array, and emits that.\n *\n * ![](pairwise.png)\n *\n * The Nth emission from the source Observable will cause the output Observable\n * to emit an array [(N-1)th, Nth] of the previous and the current value, as a\n * pair. For this reason, `pairwise` emits on the second and subsequent\n * emissions from the source Observable, but not on the first emission, because\n * there is no previous value in that case.\n *\n * ## Example\n * On every click (starting from the second), emit the relative distance to the previous click\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { pairwise, map } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const pairs = clicks.pipe(pairwise());\n * const distance = pairs.pipe(\n * map(pair => {\n * const x0 = pair[0].clientX;\n * const y0 = pair[0].clientY;\n * const x1 = pair[1].clientX;\n * const y1 = pair[1].clientY;\n * return Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2));\n * }),\n * );\n * distance.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link buffer}\n * @see {@link bufferCount}\n *\n * @return {Observable>} An Observable of pairs (as arrays) of\n * consecutive values from the source Observable.\n * @method pairwise\n * @owner Observable\n */\nexport function pairwise(): OperatorFunction {\n return (source: Observable) => source.lift(new PairwiseOperator());\n}\n\nclass PairwiseOperator implements Operator {\n call(subscriber: Subscriber<[T, T]>, source: any): any {\n return source.subscribe(new PairwiseSubscriber(subscriber));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass PairwiseSubscriber extends Subscriber {\n private prev: T;\n private hasPrev: boolean = false;\n\n constructor(destination: Subscriber<[T, T]>) {\n super(destination);\n }\n\n _next(value: T): void {\n let pair: [T, T] | undefined;\n\n if (this.hasPrev) {\n pair = [this.prev, value];\n } else {\n this.hasPrev = true;\n }\n\n this.prev = value;\n\n if (pair) {\n this.destination.next(pair);\n }\n }\n}\n","import { not } from '../util/not';\nimport { filter } from './filter';\nimport { Observable } from '../Observable';\nimport { UnaryFunction } from '../types';\n\n/**\n * Splits the source Observable into two, one with values that satisfy a\n * predicate, and another with values that don't satisfy the predicate.\n *\n * It's like {@link filter}, but returns two Observables:\n * one like the output of {@link filter}, and the other with values that did not\n * pass the condition.\n *\n * ![](partition.png)\n *\n * `partition` outputs an array with two Observables that partition the values\n * from the source Observable through the given `predicate` function. The first\n * Observable in that array emits source values for which the predicate argument\n * returns true. The second Observable emits source values for which the\n * predicate returns false. The first behaves like {@link filter} and the second\n * behaves like {@link filter} with the predicate negated.\n *\n * ## Example\n * Partition click events into those on DIV elements and those elsewhere\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { partition } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const parts = clicks.pipe(partition(ev => ev.target.tagName === 'DIV'));\n * const clicksOnDivs = parts[0];\n * const clicksElsewhere = parts[1];\n * clicksOnDivs.subscribe(x => console.log('DIV clicked: ', x));\n * clicksElsewhere.subscribe(x => console.log('Other clicked: ', x));\n * ```\n *\n * @see {@link filter}\n *\n * @param {function(value: T, index: number): boolean} predicate A function that\n * evaluates each value emitted by the source Observable. If it returns `true`,\n * the value is emitted on the first Observable in the returned array, if\n * `false` the value is emitted on the second Observable in the array. The\n * `index` parameter is the number `i` for the i-th source emission that has\n * happened since the subscription, starting from the number `0`.\n * @param {any} [thisArg] An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return {[Observable, Observable]} An array with two Observables: one\n * with values that passed the predicate, and another with values that did not\n * pass the predicate.\n * @method partition\n * @owner Observable\n * @deprecated use `partition` static creation function instead\n */\nexport function partition(predicate: (value: T, index: number) => boolean,\n thisArg?: any): UnaryFunction, [Observable, Observable]> {\n return (source: Observable) => [\n filter(predicate, thisArg)(source),\n filter(not(predicate, thisArg) as any)(source)\n ] as [Observable, Observable];\n}\n","import { Observable } from '../Observable';\nimport { map } from './map';\nimport { OperatorFunction } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function pluck(k1: K1): OperatorFunction;\nexport function pluck(k1: K1, k2: K2): OperatorFunction;\nexport function pluck(k1: K1, k2: K2, k3: K3): OperatorFunction;\nexport function pluck(k1: K1, k2: K2, k3: K3, k4: K4): OperatorFunction;\nexport function pluck(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5): OperatorFunction;\nexport function pluck(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5, k6: K6): OperatorFunction;\nexport function pluck(...properties: string[]): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Maps each source value (an object) to its specified nested property.\n *\n * Like {@link map}, but meant only for picking one of\n * the nested properties of every emitted object.\n *\n * ![](pluck.png)\n *\n * Given a list of strings describing a path to an object property, retrieves\n * the value of a specified nested property from all values in the source\n * Observable. If a property can't be resolved, it will return `undefined` for\n * that value.\n *\n * ## Example\n * Map every click to the tagName of the clicked target element\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { pluck } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const tagNames = clicks.pipe(pluck('target', 'tagName'));\n * tagNames.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link map}\n *\n * @param {...string} properties The nested properties to pluck from each source\n * value (an object).\n * @return {Observable} A new Observable of property values from the source values.\n * @method pluck\n * @owner Observable\n */\nexport function pluck(...properties: string[]): OperatorFunction {\n const length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return (source: Observable) => map(plucker(properties, length))(source as any);\n}\n\nfunction plucker(props: string[], length: number): (x: string) => any {\n const mapper = (x: string) => {\n let currentProp = x;\n for (let i = 0; i < length; i++) {\n const p = currentProp != null ? currentProp[props[i]] : undefined;\n if (p !== void 0) {\n currentProp = p;\n } else {\n return undefined;\n }\n }\n return currentProp;\n };\n\n return mapper;\n}\n","import { Observable } from '../Observable';\nimport { Subject } from '../Subject';\nimport { multicast } from './multicast';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { MonoTypeOperatorFunction, OperatorFunction, UnaryFunction, ObservableInput, ObservedValueOf } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function publish(): UnaryFunction, ConnectableObservable>;\nexport function publish>(selector: (shared: Observable) => O): OperatorFunction>;\nexport function publish(selector: MonoTypeOperatorFunction): MonoTypeOperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called\n * before it begins emitting items to those Observers that have subscribed to it.\n *\n * Makes a cold Observable hot\n *\n * ![](publish.png)\n *\n * ## Examples\n * Make source$ hot by applying publish operator, then merge each inner observable into a single one\n * and subscribe.\n * ```ts\n * import { of, zip, interval, merge } from \"rxjs\";\n * import { map, publish, tap } from \"rxjs/operators\";\n *\n * const source$ = zip(interval(2000), of(1, 2, 3, 4, 5, 6, 7, 8, 9)).pipe(\n * map(values => values[1])\n * );\n *\n * source$\n * .pipe(\n * publish(multicasted$ =>\n * merge(\n * multicasted$.pipe(tap(x => console.log('Stream 1:', x))),\n * multicasted$.pipe(tap(x => console.log('Stream 2:', x))),\n * multicasted$.pipe(tap(x => console.log('Stream 3:', x))),\n * )\n * )\n * )\n * .subscribe();\n *\n * // Results every two seconds\n * // Stream 1: 1\n * // Stream 2: 1\n * // Stream 3: 1\n * // ...\n * // Stream 1: 9\n * // Stream 2: 9\n * // Stream 3: 9\n * ```\n *\n * @param {Function} [selector] - Optional selector function which can use the multicasted source sequence as many times\n * as needed, without causing multiple subscriptions to the source sequence.\n * Subscribers to the given source will receive all notifications of the source from the time of the subscription on.\n * @return A ConnectableObservable that upon connection causes the source Observable to emit items to its Observers.\n * @method publish\n * @owner Observable\n *\n *\n */\nexport function publish(selector?: OperatorFunction): MonoTypeOperatorFunction | OperatorFunction {\n return selector ?\n multicast(() => new Subject(), selector) :\n multicast(new Subject());\n}\n","import { Observable } from '../Observable';\nimport { BehaviorSubject } from '../BehaviorSubject';\nimport { multicast } from './multicast';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { UnaryFunction } from '../types';\n\n/**\n * @param value\n * @return {ConnectableObservable}\n * @method publishBehavior\n * @owner Observable\n */\nexport function publishBehavior(value: T): UnaryFunction, ConnectableObservable> {\n return (source: Observable) => multicast(new BehaviorSubject(value))(source) as ConnectableObservable;\n}\n","import { Observable } from '../Observable';\nimport { AsyncSubject } from '../AsyncSubject';\nimport { multicast } from './multicast';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { UnaryFunction } from '../types';\n\n/**\n * Returns a connectable observable sequence that shares a single subscription to the\n * underlying sequence containing only the last notification.\n *\n * ![](publishLast.png)\n *\n * Similar to {@link publish}, but it waits until the source observable completes and stores\n * the last emitted value.\n * Similarly to {@link publishReplay} and {@link publishBehavior}, this keeps storing the last\n * value even if it has no more subscribers. If subsequent subscriptions happen, they will\n * immediately get that last stored value and complete.\n *\n * ## Example\n *\n * ```ts\n * import { interval } from 'rxjs';\n * import { publishLast, tap, take } from 'rxjs/operators';\n *\n * const connectable =\n * interval(1000)\n * .pipe(\n * tap(x => console.log(\"side effect\", x)),\n * take(3),\n * publishLast());\n *\n * connectable.subscribe(\n * x => console.log( \"Sub. A\", x),\n * err => console.log(\"Sub. A Error\", err),\n * () => console.log( \"Sub. A Complete\"));\n *\n * connectable.subscribe(\n * x => console.log( \"Sub. B\", x),\n * err => console.log(\"Sub. B Error\", err),\n * () => console.log( \"Sub. B Complete\"));\n *\n * connectable.connect();\n *\n * // Results:\n * // \"side effect 0\"\n * // \"side effect 1\"\n * // \"side effect 2\"\n * // \"Sub. A 2\"\n * // \"Sub. B 2\"\n * // \"Sub. A Complete\"\n * // \"Sub. B Complete\"\n * ```\n *\n * @see {@link ConnectableObservable}\n * @see {@link publish}\n * @see {@link publishReplay}\n * @see {@link publishBehavior}\n *\n * @return {ConnectableObservable} An observable sequence that contains the elements of a\n * sequence produced by multicasting the source sequence.\n * @method publishLast\n * @owner Observable\n */\n\nexport function publishLast(): UnaryFunction, ConnectableObservable> {\n return (source: Observable) => multicast(new AsyncSubject())(source);\n}\n","import { Observable } from '../Observable';\nimport { ReplaySubject } from '../ReplaySubject';\nimport { multicast } from './multicast';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { UnaryFunction, MonoTypeOperatorFunction, OperatorFunction, SchedulerLike, ObservableInput, ObservedValueOf } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function publishReplay(bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction;\nexport function publishReplay>(bufferSize?: number, windowTime?: number, selector?: (shared: Observable) => O, scheduler?: SchedulerLike): OperatorFunction>;\n/* tslint:enable:max-line-length */\n\nexport function publishReplay(bufferSize?: number,\n windowTime?: number,\n selectorOrScheduler?: SchedulerLike | OperatorFunction,\n scheduler?: SchedulerLike): UnaryFunction, ConnectableObservable> {\n\n if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {\n scheduler = selectorOrScheduler;\n }\n\n const selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;\n const subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n\n return (source: Observable) => multicast(() => subject, selector)(source) as ConnectableObservable;\n}\n","import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { MonoTypeOperatorFunction, OperatorFunction } from '../types';\nimport { race as raceStatic } from '../observable/race';\n\n/* tslint:disable:max-line-length */\n/** @deprecated Deprecated in favor of static race. */\nexport function race(observables: Array>): MonoTypeOperatorFunction;\n/** @deprecated Deprecated in favor of static race. */\nexport function race(observables: Array>): OperatorFunction;\n/** @deprecated Deprecated in favor of static race. */\nexport function race(...observables: Array | Array>>): MonoTypeOperatorFunction;\n/** @deprecated Deprecated in favor of static race. */\nexport function race(...observables: Array | Array>>): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns an Observable that mirrors the first source Observable to emit a next,\n * error or complete notification from the combination of this Observable and supplied Observables.\n * @param {...Observables} ...observables Sources used to race for which Observable emits first.\n * @return {Observable} An Observable that mirrors the output of the first Observable to emit an item.\n * @method race\n * @owner Observable\n * @deprecated Deprecated in favor of static {@link race}.\n */\nexport function race(...observables: (Observable | Observable[])[]): MonoTypeOperatorFunction {\n return function raceOperatorFunction(source: Observable) {\n // if the only argument is an array, it was most likely called with\n // `pair([obs1, obs2, ...])`\n if (observables.length === 1 && isArray(observables[0])) {\n observables = observables[0] as Observable[];\n }\n\n return source.lift.call(raceStatic(source, ...(observables as Observable[])));\n };\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { empty } from '../observable/empty';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\n/**\n * Returns an Observable that will resubscribe to the source stream when the source stream completes, at most count times.\n *\n * Repeats all values emitted on the source. It's like {@link retry}, but for non error cases.\n *\n * ![](repeat.png)\n *\n * Similar to {@link retry}, this operator repeats the stream of items emitted by the source for non error cases.\n * Repeat can be useful for creating observables that are meant to have some repeated pattern or rhythm.\n *\n * Note: `repeat(0)` returns an empty observable and `repeat()` will repeat forever\n *\n * ## Example\n * Repeat a message stream\n * ```ts\n * import { of } from 'rxjs';\n * import { repeat, delay } from 'rxjs/operators';\n *\n * const source = of('Repeat message');\n * const example = source.pipe(repeat(3));\n * example.subscribe(x => console.log(x));\n *\n * // Results\n * // Repeat message\n * // Repeat message\n * // Repeat message\n * ```\n *\n * Repeat 3 values, 2 times\n * ```ts\n * import { interval } from 'rxjs';\n * import { repeat, take } from 'rxjs/operators';\n *\n * const source = interval(1000);\n * const example = source.pipe(take(3), repeat(2));\n * example.subscribe(x => console.log(x));\n *\n * // Results every second\n * // 0\n * // 1\n * // 2\n * // 0\n * // 1\n * // 2\n * ```\n *\n * @see {@link repeatWhen}\n * @see {@link retry}\n *\n * @param {number} [count] The number of times the source Observable items are repeated, a count of 0 will yield\n * an empty Observable.\n * @return {Observable} An Observable that will resubscribe to the source stream when the source stream completes\n * , at most count times.\n * @method repeat\n * @owner Observable\n */\nexport function repeat(count: number = -1): MonoTypeOperatorFunction {\n return (source: Observable) => {\n if (count === 0) {\n return empty();\n } else if (count < 0) {\n return source.lift(new RepeatOperator(-1, source));\n } else {\n return source.lift(new RepeatOperator(count - 1, source));\n }\n };\n}\n\nclass RepeatOperator implements Operator {\n constructor(private count: number,\n private source: Observable) {\n }\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass RepeatSubscriber extends Subscriber {\n constructor(destination: Subscriber,\n private count: number,\n private source: Observable) {\n super(destination);\n }\n complete() {\n if (!this.isStopped) {\n const { source, count } = this;\n if (count === 0) {\n return super.complete();\n } else if (count > -1) {\n this.count = count - 1;\n }\n source.subscribe(this._unsubscribeAndRecycle());\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\n\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\n/**\n * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source\n * Observable calls `complete`, this method will emit to the Observable returned from `notifier`. If that Observable\n * calls `complete` or `error`, then this method will call `complete` or `error` on the child subscription. Otherwise\n * this method will resubscribe to the source Observable.\n *\n * ![](repeatWhen.png)\n *\n * ## Example\n * Repeat a message stream on click\n * ```ts\n * import { of, fromEvent } from 'rxjs';\n * import { repeatWhen } from 'rxjs/operators';\n *\n * const source = of('Repeat message');\n * const documentClick$ = fromEvent(document, 'click');\n *\n * source.pipe(repeatWhen(() => documentClick$)\n * ).subscribe(data => console.log(data))\n * ```\n * @see {@link repeat}\n * @see {@link retry}\n * @see {@link retryWhen}\n *\n * @param {function(notifications: Observable): Observable} notifier - Receives an Observable of notifications with\n * which a user can `complete` or `error`, aborting the repetition.\n * @return {Observable} The source Observable modified with repeat logic.\n * @method repeatWhen\n * @owner Observable\n */\nexport function repeatWhen(notifier: (notifications: Observable) => Observable): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new RepeatWhenOperator(notifier));\n}\n\nclass RepeatWhenOperator implements Operator {\n constructor(protected notifier: (notifications: Observable) => Observable) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass RepeatWhenSubscriber extends SimpleOuterSubscriber {\n\n private notifications?: Subject;\n private retries?: Observable;\n private retriesSubscription?: Subscription;\n private sourceIsBeingSubscribedTo: boolean = true;\n\n constructor(destination: Subscriber,\n private notifier: (notifications: Observable) => Observable,\n private source: Observable) {\n super(destination);\n }\n\n notifyNext(): void {\n this.sourceIsBeingSubscribedTo = true;\n this.source.subscribe(this);\n }\n\n notifyComplete(): void {\n if (this.sourceIsBeingSubscribedTo === false) {\n return super.complete();\n }\n }\n\n complete() {\n this.sourceIsBeingSubscribedTo = false;\n\n if (!this.isStopped) {\n if (!this.retries) {\n this.subscribeToRetries();\n }\n if (!this.retriesSubscription || this.retriesSubscription.closed) {\n return super.complete();\n }\n\n this._unsubscribeAndRecycle();\n this.notifications!.next(undefined);\n }\n }\n\n /** @deprecated This is an internal implementation detail, do not use. */\n _unsubscribe() {\n const { notifications, retriesSubscription } = this;\n if (notifications) {\n notifications.unsubscribe();\n this.notifications = undefined;\n }\n if (retriesSubscription) {\n retriesSubscription.unsubscribe();\n this.retriesSubscription = undefined;\n }\n this.retries = undefined;\n }\n\n /** @deprecated This is an internal implementation detail, do not use. */\n _unsubscribeAndRecycle(): Subscriber {\n const { _unsubscribe } = this;\n\n this._unsubscribe = null!;\n super._unsubscribeAndRecycle();\n this._unsubscribe = _unsubscribe;\n\n return this;\n }\n\n private subscribeToRetries() {\n this.notifications = new Subject();\n let retries;\n try {\n const { notifier } = this;\n retries = notifier(this.notifications);\n } catch (e) {\n return super.complete();\n }\n this.retries = retries;\n this.retriesSubscription = innerSubscribe(retries, new SimpleInnerSubscriber(this));\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\n\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\n/**\n * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable\n * calls `error`, this method will resubscribe to the source Observable for a maximum of `count` resubscriptions (given\n * as a number parameter) rather than propagating the `error` call.\n *\n * ![](retry.png)\n *\n * Any and all items emitted by the source Observable will be emitted by the resulting Observable, even those emitted\n * during failed subscriptions. For example, if an Observable fails at first but emits [1, 2] then succeeds the second\n * time and emits: [1, 2, 3, 4, 5] then the complete stream of emissions and notifications\n * would be: [1, 2, 1, 2, 3, 4, 5, `complete`].\n *\n * ## Example\n * ```ts\n * import { interval, of, throwError } from 'rxjs';\n * import { mergeMap, retry } from 'rxjs/operators';\n *\n * const source = interval(1000);\n * const example = source.pipe(\n * mergeMap(val => {\n * if(val > 5){\n * return throwError('Error!');\n * }\n * return of(val);\n * }),\n * //retry 2 times on error\n * retry(2)\n * );\n *\n * const subscribe = example.subscribe({\n * next: val => console.log(val),\n * error: val => console.log(`${val}: Retried 2 times then quit!`)\n * });\n *\n * // Output:\n * // 0..1..2..3..4..5..\n * // 0..1..2..3..4..5..\n * // 0..1..2..3..4..5..\n * // \"Error!: Retried 2 times then quit!\"\n * ```\n *\n * @param {number} count - Number of retry attempts before failing.\n * @return {Observable} The source Observable modified with the retry logic.\n * @method retry\n * @owner Observable\n */\nexport function retry(count: number = -1): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new RetryOperator(count, source));\n}\n\nclass RetryOperator implements Operator {\n constructor(private count: number,\n private source: Observable) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass RetrySubscriber extends Subscriber {\n constructor(destination: Subscriber,\n private count: number,\n private source: Observable) {\n super(destination);\n }\n error(err: any) {\n if (!this.isStopped) {\n const { source, count } = this;\n if (count === 0) {\n return super.error(err);\n } else if (count > -1) {\n this.count = count - 1;\n }\n source.subscribe(this._unsubscribeAndRecycle());\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\n\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\n/**\n * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable\n * calls `error`, this method will emit the Throwable that caused the error to the Observable returned from `notifier`.\n * If that Observable calls `complete` or `error` then this method will call `complete` or `error` on the child\n * subscription. Otherwise this method will resubscribe to the source Observable.\n *\n * ![](retryWhen.png)\n *\n * @param {function(errors: Observable): Observable} notifier - Receives an Observable of notifications with which a\n * user can `complete` or `error`, aborting the retry.\n * @return {Observable} The source Observable modified with retry logic.\n * @method retryWhen\n * @owner Observable\n */\nexport function retryWhen(notifier: (errors: Observable) => Observable): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new RetryWhenOperator(notifier, source));\n}\n\nclass RetryWhenOperator implements Operator {\n constructor(protected notifier: (errors: Observable) => Observable,\n protected source: Observable) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass RetryWhenSubscriber extends SimpleOuterSubscriber {\n\n private errors?: Subject;\n private retries?: Observable;\n private retriesSubscription?: Subscription;\n\n constructor(destination: Subscriber,\n private notifier: (errors: Observable) => Observable,\n private source: Observable) {\n super(destination);\n }\n\n error(err: any) {\n if (!this.isStopped) {\n\n let errors = this.errors;\n let retries: any = this.retries;\n let retriesSubscription = this.retriesSubscription;\n\n if (!retries) {\n errors = new Subject();\n try {\n const { notifier } = this;\n retries = notifier(errors);\n } catch (e) {\n return super.error(e);\n }\n retriesSubscription = innerSubscribe(retries, new SimpleInnerSubscriber(this));\n } else {\n this.errors = undefined;\n this.retriesSubscription = undefined;\n }\n\n this._unsubscribeAndRecycle();\n\n this.errors = errors;\n this.retries = retries;\n this.retriesSubscription = retriesSubscription;\n\n errors!.next(err);\n }\n }\n\n /** @deprecated This is an internal implementation detail, do not use. */\n _unsubscribe() {\n const { errors, retriesSubscription } = this;\n if (errors) {\n errors.unsubscribe();\n this.errors = undefined;\n }\n if (retriesSubscription) {\n retriesSubscription.unsubscribe();\n this.retriesSubscription = undefined;\n }\n this.retries = undefined;\n }\n\n notifyNext(): void {\n const { _unsubscribe } = this;\n\n this._unsubscribe = null!;\n this._unsubscribeAndRecycle();\n this._unsubscribe = _unsubscribe;\n\n this.source.subscribe(this);\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\n\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\n/**\n * Emits the most recently emitted value from the source Observable whenever\n * another Observable, the `notifier`, emits.\n *\n * It's like {@link sampleTime}, but samples whenever\n * the `notifier` Observable emits something.\n *\n * ![](sample.png)\n *\n * Whenever the `notifier` Observable emits a value or completes, `sample`\n * looks at the source Observable and emits whichever value it has most recently\n * emitted since the previous sampling, unless the source has not emitted\n * anything since the previous sampling. The `notifier` is subscribed to as soon\n * as the output Observable is subscribed.\n *\n * ## Example\n * On every click, sample the most recent \"seconds\" timer\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { sample } from 'rxjs/operators';\n *\n * const seconds = interval(1000);\n * const clicks = fromEvent(document, 'click');\n * const result = seconds.pipe(sample(clicks));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link audit}\n * @see {@link debounce}\n * @see {@link sampleTime}\n * @see {@link throttle}\n *\n * @param {Observable} notifier The Observable to use for sampling the\n * source Observable.\n * @return {Observable} An Observable that emits the results of sampling the\n * values emitted by the source Observable whenever the notifier Observable\n * emits value or completes.\n * @method sample\n * @owner Observable\n */\nexport function sample(notifier: Observable): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new SampleOperator(notifier));\n}\n\nclass SampleOperator implements Operator {\n constructor(private notifier: Observable) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n const sampleSubscriber = new SampleSubscriber(subscriber);\n const subscription = source.subscribe(sampleSubscriber);\n subscription.add(innerSubscribe(this.notifier, new SimpleInnerSubscriber(sampleSubscriber)));\n return subscription;\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SampleSubscriber extends SimpleOuterSubscriber {\n private value?: T;\n private hasValue: boolean = false;\n\n protected _next(value: T) {\n this.value = value;\n this.hasValue = true;\n }\n\n notifyNext(): void {\n this.emitValue();\n }\n\n notifyComplete(): void {\n this.emitValue();\n }\n\n emitValue() {\n if (this.hasValue) {\n this.hasValue = false;\n this.destination.next!(this.value!);\n }\n }\n}\n","import { Observable } from '../Observable';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nimport { MonoTypeOperatorFunction, SchedulerAction, SchedulerLike, TeardownLogic } from '../types';\n\n/**\n * Emits the most recently emitted value from the source Observable within\n * periodic time intervals.\n *\n * Samples the source Observable at periodic time\n * intervals, emitting what it samples.\n *\n * ![](sampleTime.png)\n *\n * `sampleTime` periodically looks at the source Observable and emits whichever\n * value it has most recently emitted since the previous sampling, unless the\n * source has not emitted anything since the previous sampling. The sampling\n * happens periodically in time every `period` milliseconds (or the time unit\n * defined by the optional `scheduler` argument). The sampling starts as soon as\n * the output Observable is subscribed.\n *\n * ## Example\n * Every second, emit the most recent click at most once\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { sampleTime } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(sampleTime(1000));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link auditTime}\n * @see {@link debounceTime}\n * @see {@link delay}\n * @see {@link sample}\n * @see {@link throttleTime}\n *\n * @param {number} period The sampling period expressed in milliseconds or the\n * time unit determined internally by the optional `scheduler`.\n * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for\n * managing the timers that handle the sampling.\n * @return {Observable} An Observable that emits the results of sampling the\n * values emitted by the source Observable at the specified time interval.\n * @method sampleTime\n * @owner Observable\n */\nexport function sampleTime(period: number, scheduler: SchedulerLike = async): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new SampleTimeOperator(period, scheduler));\n}\n\nclass SampleTimeOperator implements Operator {\n constructor(private period: number,\n private scheduler: SchedulerLike) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SampleTimeSubscriber extends Subscriber {\n lastValue: T;\n hasValue: boolean = false;\n\n constructor(destination: Subscriber,\n private period: number,\n private scheduler: SchedulerLike) {\n super(destination);\n this.add(scheduler.schedule(dispatchNotification, period, { subscriber: this, period }));\n }\n\n protected _next(value: T) {\n this.lastValue = value;\n this.hasValue = true;\n }\n\n notifyNext() {\n if (this.hasValue) {\n this.hasValue = false;\n this.destination.next(this.lastValue);\n }\n }\n}\n\nfunction dispatchNotification(this: SchedulerAction, state: any) {\n let { subscriber, period } = state;\n subscriber.notifyNext();\n this.schedule(state, period);\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\n\nimport { Observer, OperatorFunction } from '../types';\n\n/**\n * Compares all values of two observables in sequence using an optional comparator function\n * and returns an observable of a single boolean value representing whether or not the two sequences\n * are equal.\n *\n * Checks to see of all values emitted by both observables are equal, in order.\n *\n * ![](sequenceEqual.png)\n *\n * `sequenceEqual` subscribes to two observables and buffers incoming values from each observable. Whenever either\n * observable emits a value, the value is buffered and the buffers are shifted and compared from the bottom\n * up; If any value pair doesn't match, the returned observable will emit `false` and complete. If one of the\n * observables completes, the operator will wait for the other observable to complete; If the other\n * observable emits before completing, the returned observable will emit `false` and complete. If one observable never\n * completes or emits after the other complets, the returned observable will never complete.\n *\n * ## Example\n * figure out if the Konami code matches\n * ```ts\n * import { from, fromEvent } from 'rxjs';\n * import { sequenceEqual, bufferCount, mergeMap, map } from 'rxjs/operators';\n *\n * const codes = from([\n * 'ArrowUp',\n * 'ArrowUp',\n * 'ArrowDown',\n * 'ArrowDown',\n * 'ArrowLeft',\n * 'ArrowRight',\n * 'ArrowLeft',\n * 'ArrowRight',\n * 'KeyB',\n * 'KeyA',\n * 'Enter', // no start key, clearly.\n * ]);\n *\n * const keys = fromEvent(document, 'keyup').pipe(map(e => e.code));\n * const matches = keys.pipe(\n * bufferCount(11, 1),\n * mergeMap(\n * last11 => from(last11).pipe(sequenceEqual(codes)),\n * ),\n * );\n * matches.subscribe(matched => console.log('Successful cheat at Contra? ', matched));\n * ```\n *\n * @see {@link combineLatest}\n * @see {@link zip}\n * @see {@link withLatestFrom}\n *\n * @param {Observable} compareTo The observable sequence to compare the source sequence to.\n * @param {function} [comparator] An optional function to compare each value pair\n * @return {Observable} An Observable of a single boolean value representing whether or not\n * the values emitted by both observables were equal in sequence.\n * @method sequenceEqual\n * @owner Observable\n */\nexport function sequenceEqual(compareTo: Observable,\n comparator?: (a: T, b: T) => boolean): OperatorFunction {\n return (source: Observable) => source.lift(new SequenceEqualOperator(compareTo, comparator));\n}\n\nexport class SequenceEqualOperator implements Operator {\n constructor(private compareTo: Observable,\n private comparator: (a: T, b: T) => boolean) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nexport class SequenceEqualSubscriber extends Subscriber {\n private _a: T[] = [];\n private _b: T[] = [];\n private _oneComplete = false;\n\n constructor(destination: Observer,\n private compareTo: Observable,\n private comparator: (a: T, b: T) => boolean) {\n super(destination);\n (this.destination as Subscription).add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, this)));\n }\n\n protected _next(value: T): void {\n if (this._oneComplete && this._b.length === 0) {\n this.emit(false);\n } else {\n this._a.push(value);\n this.checkValues();\n }\n }\n\n public _complete(): void {\n if (this._oneComplete) {\n this.emit(this._a.length === 0 && this._b.length === 0);\n } else {\n this._oneComplete = true;\n }\n this.unsubscribe();\n }\n\n checkValues() {\n const { _a, _b, comparator } = this;\n while (_a.length > 0 && _b.length > 0) {\n let a = _a.shift();\n let b = _b.shift();\n let areEqual = false;\n try {\n areEqual = comparator ? comparator(a, b) : a === b;\n } catch (e) {\n this.destination.error(e);\n }\n if (!areEqual) {\n this.emit(false);\n }\n }\n }\n\n emit(value: boolean) {\n const { destination } = this;\n destination.next(value);\n destination.complete();\n }\n\n nextB(value: T) {\n if (this._oneComplete && this._a.length === 0) {\n this.emit(false);\n } else {\n this._b.push(value);\n this.checkValues();\n }\n }\n\n completeB() {\n if (this._oneComplete) {\n this.emit(this._a.length === 0 && this._b.length === 0);\n } else {\n this._oneComplete = true;\n }\n }\n}\n\nclass SequenceEqualCompareToSubscriber extends Subscriber {\n constructor(destination: Observer, private parent: SequenceEqualSubscriber) {\n super(destination);\n }\n\n protected _next(value: T): void {\n this.parent.nextB(value);\n }\n\n protected _error(err: any): void {\n this.parent.error(err);\n this.unsubscribe();\n }\n\n protected _complete(): void {\n this.parent.completeB();\n this.unsubscribe();\n }\n}\n","import { Observable } from '../Observable';\nimport { multicast } from './multicast';\nimport { refCount } from './refCount';\nimport { Subject } from '../Subject';\n\nimport { MonoTypeOperatorFunction } from '../types';\n\nfunction shareSubjectFactory() {\n return new Subject();\n}\n\n/**\n * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one\n * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will\n * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.\n * This is an alias for `multicast(() => new Subject()), refCount()`.\n *\n * ![](share.png)\n *\n * @return {Observable} An Observable that upon connection causes the source Observable to emit items to its Observers.\n * @method share\n * @owner Observable\n */\nexport function share(): MonoTypeOperatorFunction {\n return (source: Observable) => refCount()(multicast(shareSubjectFactory)(source)) as Observable;\n}\n","import { Observable } from '../Observable';\nimport { ReplaySubject } from '../ReplaySubject';\nimport { Subscription } from '../Subscription';\nimport { MonoTypeOperatorFunction, SchedulerLike } from '../types';\nimport { Subscriber } from '../Subscriber';\n\nexport interface ShareReplayConfig {\n bufferSize?: number;\n windowTime?: number;\n refCount: boolean;\n scheduler?: SchedulerLike;\n}\n\n/**\n * Share source and replay specified number of emissions on subscription.\n *\n * This operator is a specialization of `replay` that connects to a source observable\n * and multicasts through a `ReplaySubject` constructed with the specified arguments.\n * A successfully completed source will stay cached in the `shareReplayed observable` forever,\n * but an errored source can be retried.\n *\n * ## Why use shareReplay?\n * You generally want to use `shareReplay` when you have side-effects or taxing computations\n * that you do not wish to be executed amongst multiple subscribers.\n * It may also be valuable in situations where you know you will have late subscribers to\n * a stream that need access to previously emitted values.\n * This ability to replay values on subscription is what differentiates {@link share} and `shareReplay`.\n *\n * ![](shareReplay.png)\n *\n * ## Example\n * ```ts\n * import { interval } from 'rxjs';\n * import { shareReplay, take } from 'rxjs/operators';\n *\n * const obs$ = interval(1000);\n * const shared$ = obs$.pipe(\n * take(4),\n * shareReplay(3)\n * );\n * shared$.subscribe(x => console.log('source A: ', x));\n * shared$.subscribe(y => console.log('source B: ', y));\n *\n * ```\n *\n * @see {@link publish}\n * @see {@link share}\n * @see {@link publishReplay}\n *\n * @param {Number} [bufferSize=Number.POSITIVE_INFINITY] Maximum element count of the replay buffer.\n * @param {Number} [windowTime=Number.POSITIVE_INFINITY] Maximum time length of the replay buffer in milliseconds.\n * @param {Scheduler} [scheduler] Scheduler where connected observers within the selector function\n * will be invoked on.\n * @return {Observable} An observable sequence that contains the elements of a sequence produced\n * by multicasting the source sequence within a selector function.\n * @method shareReplay\n * @owner Observable\n */\nexport function shareReplay(config: ShareReplayConfig): MonoTypeOperatorFunction;\nexport function shareReplay(bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction;\nexport function shareReplay(\n configOrBufferSize?: ShareReplayConfig | number,\n windowTime?: number,\n scheduler?: SchedulerLike\n): MonoTypeOperatorFunction {\n let config: ShareReplayConfig;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n config = configOrBufferSize as ShareReplayConfig;\n } else {\n config = {\n bufferSize: configOrBufferSize as number | undefined,\n windowTime,\n refCount: false,\n scheduler\n };\n }\n return (source: Observable) => source.lift(shareReplayOperator(config));\n}\n\nfunction shareReplayOperator({\n bufferSize = Number.POSITIVE_INFINITY,\n windowTime = Number.POSITIVE_INFINITY,\n refCount: useRefCount,\n scheduler\n}: ShareReplayConfig) {\n let subject: ReplaySubject | undefined;\n let refCount = 0;\n let subscription: Subscription | undefined;\n let hasError = false;\n let isComplete = false;\n\n return function shareReplayOperation(this: Subscriber, source: Observable) {\n refCount++;\n let innerSub: Subscription;\n if (!subject || hasError) {\n hasError = false;\n subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n innerSub = subject.subscribe(this);\n subscription = source.subscribe({\n next(value) { subject.next(value); },\n error(err) {\n hasError = true;\n subject.error(err);\n },\n complete() {\n isComplete = true;\n subscription = undefined;\n subject.complete();\n },\n });\n } else {\n innerSub = subject.subscribe(this);\n }\n\n this.add(() => {\n refCount--;\n innerSub.unsubscribe();\n if (subscription && !isComplete && useRefCount && refCount === 0) {\n subscription.unsubscribe();\n subscription = undefined;\n subject = undefined;\n }\n });\n };\n}\n","import { Observable } from '../Observable';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { EmptyError } from '../util/EmptyError';\n\nimport { Observer, MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\n/**\n * Returns an Observable that emits the single item emitted by the source Observable that matches a specified\n * predicate, if that Observable emits one such item. If the source Observable emits more than one such item or no\n * items, notify of an IllegalArgumentException or NoSuchElementException respectively. If the source Observable\n * emits items but none match the specified predicate then `undefined` is emitted.\n *\n * Like {@link first}, but emit with error notification if there is more than one value.\n * ![](single.png)\n *\n * ## Example\n * emits 'error'\n * ```ts\n * import { range } from 'rxjs';\n * import { single } from 'rxjs/operators';\n *\n * const numbers = range(1,5).pipe(single());\n * numbers.subscribe(x => console.log('never get called'), e => console.log('error'));\n * // result\n * // 'error'\n * ```\n *\n * emits 'undefined'\n * ```ts\n * import { range } from 'rxjs';\n * import { single } from 'rxjs/operators';\n *\n * const numbers = range(1,5).pipe(single(x => x === 10));\n * numbers.subscribe(x => console.log(x));\n * // result\n * // 'undefined'\n * ```\n *\n * @see {@link first}\n * @see {@link find}\n * @see {@link findIndex}\n * @see {@link elementAt}\n *\n * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`\n * callback if the Observable completes before any `next` notification was sent.\n * @param {Function} predicate - A predicate function to evaluate items emitted by the source Observable.\n * @return {Observable} An Observable that emits the single item emitted by the source Observable that matches\n * the predicate or `undefined` when no items match.\n *\n * @method single\n * @owner Observable\n */\nexport function single(predicate?: (value: T, index: number, source: Observable) => boolean): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new SingleOperator(predicate, source));\n}\n\nclass SingleOperator implements Operator {\n constructor(private predicate?: (value: T, index: number, source: Observable) => boolean,\n private source?: Observable) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SingleSubscriber extends Subscriber {\n private seenValue: boolean = false;\n private singleValue: T;\n private index: number = 0;\n\n constructor(destination: Observer,\n private predicate?: (value: T, index: number, source: Observable) => boolean,\n private source?: Observable) {\n super(destination);\n }\n\n private applySingleValue(value: T): void {\n if (this.seenValue) {\n this.destination.error('Sequence contains more than one element');\n } else {\n this.seenValue = true;\n this.singleValue = value;\n }\n }\n\n protected _next(value: T): void {\n const index = this.index++;\n\n if (this.predicate) {\n this.tryNext(value, index);\n } else {\n this.applySingleValue(value);\n }\n }\n\n private tryNext(value: T, index: number): void {\n try {\n if (this.predicate(value, index, this.source)) {\n this.applySingleValue(value);\n }\n } catch (err) {\n this.destination.error(err);\n }\n }\n\n protected _complete(): void {\n const destination = this.destination;\n\n if (this.index > 0) {\n destination.next(this.seenValue ? this.singleValue : undefined);\n destination.complete();\n } else {\n destination.error(new EmptyError);\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\n/**\n * Returns an Observable that skips the first `count` items emitted by the source Observable.\n *\n * ![](skip.png)\n *\n * @param {Number} count - The number of times, items emitted by source Observable should be skipped.\n * @return {Observable} An Observable that skips values emitted by the source Observable.\n *\n * @method skip\n * @owner Observable\n */\nexport function skip(count: number): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new SkipOperator(count));\n}\n\nclass SkipOperator implements Operator {\n constructor(private total: number) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new SkipSubscriber(subscriber, this.total));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SkipSubscriber extends Subscriber {\n count: number = 0;\n\n constructor(destination: Subscriber, private total: number) {\n super(destination);\n }\n\n protected _next(x: T) {\n if (++this.count > this.total) {\n this.destination.next(x);\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\n/**\n * Skip the last `count` values emitted by the source Observable.\n *\n * ![](skipLast.png)\n *\n * `skipLast` returns an Observable that accumulates a queue with a length\n * enough to store the first `count` values. As more values are received,\n * values are taken from the front of the queue and produced on the result\n * sequence. This causes values to be delayed.\n *\n * ## Example\n * Skip the last 2 values of an Observable with many values\n * ```ts\n * import { range } from 'rxjs';\n * import { skipLast } from 'rxjs/operators';\n *\n * const many = range(1, 5);\n * const skipLastTwo = many.pipe(skipLast(2));\n * skipLastTwo.subscribe(x => console.log(x));\n *\n * // Results in:\n * // 1 2 3\n * ```\n *\n * @see {@link skip}\n * @see {@link skipUntil}\n * @see {@link skipWhile}\n * @see {@link take}\n *\n * @throws {ArgumentOutOfRangeError} When using `skipLast(i)`, it throws\n * ArgumentOutOrRangeError if `i < 0`.\n *\n * @param {number} count Number of elements to skip from the end of the source Observable.\n * @returns {Observable} An Observable that skips the last count values\n * emitted by the source Observable.\n * @method skipLast\n * @owner Observable\n */\nexport function skipLast(count: number): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new SkipLastOperator(count));\n}\n\nclass SkipLastOperator implements Operator {\n constructor(private _skipCount: number) {\n if (this._skipCount < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n if (this._skipCount === 0) {\n // If we don't want to skip any values then just subscribe\n // to Subscriber without any further logic.\n return source.subscribe(new Subscriber(subscriber));\n } else {\n return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));\n }\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SkipLastSubscriber extends Subscriber {\n private _ring: T[];\n private _count: number = 0;\n\n constructor(destination: Subscriber, private _skipCount: number) {\n super(destination);\n this._ring = new Array(_skipCount);\n }\n\n protected _next(value: T): void {\n const skipCount = this._skipCount;\n const count = this._count++;\n\n if (count < skipCount) {\n this._ring[count] = value;\n } else {\n const currentIndex = count % skipCount;\n const ring = this._ring;\n const oldValue = ring[currentIndex];\n\n ring[currentIndex] = value;\n this.destination.next(oldValue);\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, TeardownLogic, ObservableInput } from '../types';\nimport { Subscription } from '../Subscription';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\n\n/**\n * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item.\n *\n * The `skipUntil` operator causes the observable stream to skip the emission of values ​​until the passed in observable emits the first value.\n * This can be particularly useful in combination with user interactions, responses of http requests or waiting for specific times to pass by.\n *\n * ![](skipUntil.png)\n *\n * Internally the `skipUntil` operator subscribes to the passed in observable (in the following called *notifier*) in order to recognize the emission\n * of its first value. When this happens, the operator unsubscribes from the *notifier* and starts emitting the values of the *source*\n * observable. It will never let the *source* observable emit any values if the *notifier* completes or throws an error without emitting\n * a value before.\n *\n * ## Example\n *\n * In the following example, all emitted values ​​of the interval observable are skipped until the user clicks anywhere within the page.\n *\n * ```ts\n * import { interval, fromEvent } from 'rxjs';\n * import { skipUntil } from 'rxjs/operators';\n *\n * const intervalObservable = interval(1000);\n * const click = fromEvent(document, 'click');\n *\n * const emitAfterClick = intervalObservable.pipe(\n * skipUntil(click)\n * );\n * // clicked at 4.6s. output: 5...6...7...8........ or\n * // clicked at 7.3s. output: 8...9...10..11.......\n * const subscribe = emitAfterClick.subscribe(value => console.log(value));\n * ```\n *\n * @param {Observable} notifier - The second Observable that has to emit an item before the source Observable's elements begin to\n * be mirrored by the resulting Observable.\n * @return {Observable} An Observable that skips items from the source Observable until the second Observable emits\n * an item, then emits the remaining items.\n * @method skipUntil\n * @owner Observable\n */\nexport function skipUntil(notifier: Observable): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new SkipUntilOperator(notifier));\n}\n\nclass SkipUntilOperator implements Operator {\n constructor(private notifier: Observable) {\n }\n\n call(destination: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SkipUntilSubscriber extends SimpleOuterSubscriber {\n\n private hasValue: boolean = false;\n private innerSubscription?: Subscription;\n\n constructor(destination: Subscriber, notifier: ObservableInput) {\n super(destination);\n const innerSubscriber = new SimpleInnerSubscriber(this);\n this.add(innerSubscriber);\n this.innerSubscription = innerSubscriber;\n const innerSubscription = innerSubscribe(notifier, innerSubscriber);\n // The returned subscription will usually be the subscriber that was\n // passed. However, interop subscribers will be wrapped and for\n // unsubscriptions to chain correctly, the wrapper needs to be added, too.\n if (innerSubscription !== innerSubscriber) {\n this.add(innerSubscription);\n this.innerSubscription = innerSubscription;\n }\n }\n\n protected _next(value: T) {\n if (this.hasValue) {\n super._next(value);\n }\n }\n\n notifyNext(): void {\n this.hasValue = true;\n if (this.innerSubscription) {\n this.innerSubscription.unsubscribe();\n }\n }\n\n notifyComplete() {\n /* do nothing */\n }\n}\n","import { Observable } from '../Observable';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\n/**\n * Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds\n * true, but emits all further source items as soon as the condition becomes false.\n *\n * ![](skipWhile.png)\n *\n * @param {Function} predicate - A function to test each item emitted from the source Observable.\n * @return {Observable} An Observable that begins emitting items emitted by the source Observable when the\n * specified predicate becomes false.\n * @method skipWhile\n * @owner Observable\n */\nexport function skipWhile(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new SkipWhileOperator(predicate));\n}\n\nclass SkipWhileOperator implements Operator {\n constructor(private predicate: (value: T, index: number) => boolean) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SkipWhileSubscriber extends Subscriber {\n private skipping: boolean = true;\n private index: number = 0;\n\n constructor(destination: Subscriber,\n private predicate: (value: T, index: number) => boolean) {\n super(destination);\n }\n\n protected _next(value: T): void {\n const destination = this.destination;\n if (this.skipping) {\n this.tryCallPredicate(value);\n }\n\n if (!this.skipping) {\n destination.next(value);\n }\n }\n\n private tryCallPredicate(value: T): void {\n try {\n const result = this.predicate(value, this.index++);\n this.skipping = Boolean(result);\n } catch (err) {\n this.destination.error(err);\n }\n }\n}\n","import { Observable } from '../Observable';\nimport { concat } from '../observable/concat';\nimport { isScheduler } from '../util/isScheduler';\nimport { MonoTypeOperatorFunction, OperatorFunction, SchedulerLike } from '../types';\n\n/* tslint:disable:max-line-length */\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */\nexport function startWith(scheduler: SchedulerLike): MonoTypeOperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */\nexport function startWith(v1: D, scheduler: SchedulerLike): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */\nexport function startWith(v1: D, v2: E, scheduler: SchedulerLike): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */\nexport function startWith(v1: D, v2: E, v3: F, scheduler: SchedulerLike): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */\nexport function startWith(v1: D, v2: E, v3: F, v4: G, scheduler: SchedulerLike): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */\nexport function startWith(v1: D, v2: E, v3: F, v4: G, v5: H, scheduler: SchedulerLike): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */\nexport function startWith(v1: D, v2: E, v3: F, v4: G, v5: H, v6: I, scheduler: SchedulerLike): OperatorFunction;\n\nexport function startWith(v1: D): OperatorFunction;\nexport function startWith(v1: D, v2: E): OperatorFunction;\nexport function startWith(v1: D, v2: E, v3: F): OperatorFunction;\nexport function startWith(v1: D, v2: E, v3: F, v4: G): OperatorFunction;\nexport function startWith(v1: D, v2: E, v3: F, v4: G, v5: H): OperatorFunction;\nexport function startWith(v1: D, v2: E, v3: F, v4: G, v5: H, v6: I): OperatorFunction;\nexport function startWith(...array: D[]): OperatorFunction;\n/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */\nexport function startWith(...array: Array): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns an Observable that emits the items you specify as arguments before it begins to emit\n * items emitted by the source Observable.\n *\n * First emits its arguments in order, and then any\n * emissions from the source.\n *\n * ![](startWith.png)\n *\n * ## Examples\n *\n * Start the chain of emissions with `\"first\"`, `\"second\"`\n *\n * ```ts\n * import { of } from 'rxjs';\n * import { startWith } from 'rxjs/operators';\n *\n * of(\"from source\")\n * .pipe(startWith(\"first\", \"second\"))\n * .subscribe(x => console.log(x));\n *\n * // results:\n * // \"first\"\n * // \"second\"\n * // \"from source\"\n * ```\n *\n * @param {...T} values - Items you want the modified Observable to emit first.\n * @param {SchedulerLike} [scheduler] - A {@link SchedulerLike} to use for scheduling\n * the emissions of the `next` notifications.\n * @return {Observable} An Observable that emits the items in the specified Iterable and then emits the items\n * emitted by the source Observable.\n * @method startWith\n * @owner Observable\n */\nexport function startWith(...array: Array): OperatorFunction {\n const scheduler = array[array.length - 1] as SchedulerLike;\n if (isScheduler(scheduler)) {\n // deprecated path\n array.pop();\n return (source: Observable) => concat(array as T[], source, scheduler);\n } else {\n return (source: Observable) => concat(array as T[], source);\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\nimport { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\n\n/* tslint:disable:max-line-length */\nexport function switchMap>(project: (value: T, index: number) => O): OperatorFunction>;\n/** @deprecated resultSelector is no longer supported, use inner map instead */\nexport function switchMap>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction>;\n/** @deprecated resultSelector is no longer supported, use inner map instead */\nexport function switchMap>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable, emitting values only from the most recently projected Observable.\n *\n * Maps each value to an Observable, then flattens all of\n * these inner Observables.\n *\n * ![](switchMap.png)\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an (so-called \"inner\") Observable. Each time it observes one of these\n * inner Observables, the output Observable begins emitting the items emitted by\n * that inner Observable. When a new inner Observable is emitted, `switchMap`\n * stops emitting items from the earlier-emitted inner Observable and begins\n * emitting items from the new one. It continues to behave like this for\n * subsequent inner Observables.\n *\n * ## Example\n * Generate new Observable according to source Observable values\n * ```typescript\n * import { of } from 'rxjs';\n * import { switchMap } from 'rxjs/operators';\n *\n * const switched = of(1, 2, 3).pipe(switchMap((x: number) => of(x, x ** 2, x ** 3)));\n * switched.subscribe(x => console.log(x));\n * // outputs\n * // 1\n * // 1\n * // 1\n * // 2\n * // 4\n * // 8\n * // ... and so on\n * ```\n *\n * Rerun an interval Observable on every click event\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { switchMap } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(switchMap((ev) => interval(1000)));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link concatMap}\n * @see {@link exhaustMap}\n * @see {@link mergeMap}\n * @see {@link switchAll}\n * @see {@link switchMapTo}\n *\n * @param {function(value: T, ?index: number): ObservableInput} project A function\n * that, when applied to an item emitted by the source Observable, returns an\n * Observable.\n * @return {Observable} An Observable that emits the result of applying the\n * projection function (and the optional deprecated `resultSelector`) to each item\n * emitted by the source Observable and taking only the values from the most recently\n * projected inner Observable.\n * @method switchMap\n * @owner Observable\n */\nexport function switchMap>(\n project: (value: T, index: number) => O,\n resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R,\n): OperatorFunction|R> {\n if (typeof resultSelector === 'function') {\n return (source: Observable) => source.pipe(\n switchMap((a, i) => from(project(a, i)).pipe(\n map((b, ii) => resultSelector(a, b, i, ii))\n ))\n );\n }\n return (source: Observable) => source.lift(new SwitchMapOperator(project));\n}\n\nclass SwitchMapOperator implements Operator {\n constructor(private project: (value: T, index: number) => ObservableInput) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SwitchMapSubscriber extends SimpleOuterSubscriber {\n private index = 0;\n private innerSubscription?: Subscription;\n\n constructor(destination: Subscriber,\n private project: (value: T, index: number) => ObservableInput) {\n super(destination);\n }\n\n protected _next(value: T) {\n let result: ObservableInput;\n const index = this.index++;\n try {\n result = this.project(value, index);\n } catch (error) {\n this.destination.error!(error);\n return;\n }\n this._innerSub(result);\n }\n\n private _innerSub(result: ObservableInput) {\n const innerSubscription = this.innerSubscription;\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination as Subscription;\n destination.add(innerSubscriber);\n this.innerSubscription = innerSubscribe(result, innerSubscriber);\n // The returned subscription will usually be the subscriber that was\n // passed. However, interop subscribers will be wrapped and for\n // unsubscriptions to chain correctly, the wrapper needs to be added, too.\n if (this.innerSubscription !== innerSubscriber) {\n destination.add(this.innerSubscription);\n }\n }\n\n protected _complete(): void {\n const {innerSubscription} = this;\n if (!innerSubscription || innerSubscription.closed) {\n super._complete();\n }\n this.unsubscribe();\n }\n\n protected _unsubscribe() {\n this.innerSubscription = undefined;\n }\n\n notifyComplete(): void {\n this.innerSubscription = undefined;\n if (this.isStopped) {\n super._complete();\n }\n }\n\n notifyNext(innerValue: R): void {\n this.destination.next!(innerValue);\n }\n}\n","import {OperatorFunction, ObservableInput} from '../types';\nimport { switchMap } from './switchMap';\nimport { identity } from '../util/identity';\n\nexport function switchAll(): OperatorFunction, T>;\nexport function switchAll(): OperatorFunction;\n\n/**\n * Converts a higher-order Observable into a first-order Observable\n * producing values only from the most recent observable sequence\n *\n * Flattens an Observable-of-Observables.\n *\n * ![](switchAll.png)\n *\n * `switchAll` subscribes to a source that is an observable of observables, also known as a\n * \"higher-order observable\" (or `Observable>`). It subscribes to the most recently\n * provided \"inner observable\" emitted by the source, unsubscribing from any previously subscribed\n * to inner observable, such that only the most recent inner observable may be subscribed to at\n * any point in time. The resulting observable returned by `switchAll` will only complete if the\n * source observable completes, *and* any currently subscribed to inner observable also has completed,\n * if there are any.\n *\n * ## Examples\n * Spawn a new interval observable for each click event, but for every new\n * click, cancel the previous interval and subscribe to the new one.\n *\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { switchAll, map, tap } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click').pipe(tap(() => console.log('click')));\n * const source = clicks.pipe(map((ev) => interval(1000)));\n *\n * source.pipe(\n * switchAll()\n * ).subscribe(x => console.log(x));\n *\n * // Output\n * // click\n * // 1\n * // 2\n * // 3\n * // 4\n * // ...\n * // click\n * // 1\n * // 2\n * // 3\n * // ...\n * // click\n * // ...\n * ```\n *\n * @see {@link combineAll}\n * @see {@link concatAll}\n * @see {@link exhaust}\n * @see {@link switchMap}\n * @see {@link switchMapTo}\n * @see {@link mergeAll}\n */\n\nexport function switchAll(): OperatorFunction, T> {\n return switchMap(identity);\n}\n","import { ObservableInput, OperatorFunction } from '../types';\nimport { switchMap } from './switchMap';\n\n/* tslint:disable:max-line-length */\nexport function switchMapTo(observable: ObservableInput): OperatorFunction;\n/** @deprecated resultSelector is no longer supported. Switch to using switchMap with an inner map */\nexport function switchMapTo(observable: ObservableInput, resultSelector: undefined): OperatorFunction;\n/** @deprecated resultSelector is no longer supported. Switch to using switchMap with an inner map */\nexport function switchMapTo(observable: ObservableInput, resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Projects each source value to the same Observable which is flattened multiple\n * times with {@link switchMap} in the output Observable.\n *\n * It's like {@link switchMap}, but maps each value\n * always to the same inner Observable.\n *\n * ![](switchMapTo.png)\n *\n * Maps each source value to the given Observable `innerObservable` regardless\n * of the source value, and then flattens those resulting Observables into one\n * single Observable, which is the output Observable. The output Observables\n * emits values only from the most recently emitted instance of\n * `innerObservable`.\n *\n * ## Example\n * Rerun an interval Observable on every click event\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { switchMapTo } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(switchMapTo(interval(1000)));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link concatMapTo}\n * @see {@link switchAll}\n * @see {@link switchMap}\n * @see {@link mergeMapTo}\n *\n * @param {ObservableInput} innerObservable An Observable to replace each value from\n * the source Observable.\n * @return {Observable} An Observable that emits items from the given\n * `innerObservable` (and optionally transformed through the deprecated `resultSelector`)\n * every time a value is emitted on the source Observable, and taking only the values\n * from the most recently projected inner Observable.\n * @method switchMapTo\n * @owner Observable\n */\nexport function switchMapTo(\n innerObservable: ObservableInput,\n resultSelector?: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R\n): OperatorFunction {\n return resultSelector ? switchMap(() => innerObservable, resultSelector) : switchMap(() => innerObservable);\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\n\nimport { MonoTypeOperatorFunction, TeardownLogic } from '../types';\nimport { innerSubscribe, SimpleInnerSubscriber, SimpleOuterSubscriber } from '../innerSubscribe';\n\n/**\n * Emits the values emitted by the source Observable until a `notifier`\n * Observable emits a value.\n *\n * Lets values pass until a second Observable,\n * `notifier`, emits a value. Then, it completes.\n *\n * ![](takeUntil.png)\n *\n * `takeUntil` subscribes and begins mirroring the source Observable. It also\n * monitors a second Observable, `notifier` that you provide. If the `notifier`\n * emits a value, the output Observable stops mirroring the source Observable\n * and completes. If the `notifier` doesn't emit any value and completes\n * then `takeUntil` will pass all values.\n *\n * ## Example\n * Tick every second until the first click happens\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { takeUntil } from 'rxjs/operators';\n *\n * const source = interval(1000);\n * const clicks = fromEvent(document, 'click');\n * const result = source.pipe(takeUntil(clicks));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link take}\n * @see {@link takeLast}\n * @see {@link takeWhile}\n * @see {@link skip}\n *\n * @param {Observable} notifier The Observable whose first emitted value will\n * cause the output Observable of `takeUntil` to stop emitting values from the\n * source Observable.\n * @return {Observable} An Observable that emits the values from the source\n * Observable until such time as `notifier` emits its first value.\n * @method takeUntil\n * @owner Observable\n */\nexport function takeUntil(notifier: Observable): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new TakeUntilOperator(notifier));\n}\n\nclass TakeUntilOperator implements Operator {\n constructor(private notifier: Observable) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n const takeUntilSubscriber = new TakeUntilSubscriber(subscriber);\n const notifierSubscription = innerSubscribe(this.notifier, new SimpleInnerSubscriber(takeUntilSubscriber));\n if (notifierSubscription && !takeUntilSubscriber.seenValue) {\n takeUntilSubscriber.add(notifierSubscription);\n return source.subscribe(takeUntilSubscriber);\n }\n return takeUntilSubscriber;\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass TakeUntilSubscriber extends SimpleOuterSubscriber {\n seenValue = false;\n\n constructor(destination: Subscriber, ) {\n super(destination);\n }\n\n notifyNext(): void {\n this.seenValue = true;\n this.complete();\n }\n\n notifyComplete(): void {\n // noop\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction, MonoTypeOperatorFunction, TeardownLogic } from '../types';\n\nexport function takeWhile(predicate: (value: T, index: number) => value is S): OperatorFunction;\nexport function takeWhile(predicate: (value: T, index: number) => value is S, inclusive: false): OperatorFunction;\nexport function takeWhile(predicate: (value: T, index: number) => boolean, inclusive?: boolean): MonoTypeOperatorFunction;\n\n/**\n * Emits values emitted by the source Observable so long as each value satisfies\n * the given `predicate`, and then completes as soon as this `predicate` is not\n * satisfied.\n *\n * Takes values from the source only while they pass the\n * condition given. When the first value does not satisfy, it completes.\n *\n * ![](takeWhile.png)\n *\n * `takeWhile` subscribes and begins mirroring the source Observable. Each value\n * emitted on the source is given to the `predicate` function which returns a\n * boolean, representing a condition to be satisfied by the source values. The\n * output Observable emits the source values until such time as the `predicate`\n * returns false, at which point `takeWhile` stops mirroring the source\n * Observable and completes the output Observable.\n *\n * ## Example\n * Emit click events only while the clientX property is greater than 200\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { takeWhile } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(takeWhile(ev => ev.clientX > 200));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link take}\n * @see {@link takeLast}\n * @see {@link takeUntil}\n * @see {@link skip}\n *\n * @param {function(value: T, index: number): boolean} predicate A function that\n * evaluates a value emitted by the source Observable and returns a boolean.\n * Also takes the (zero-based) index as the second argument.\n * @param {boolean} inclusive When set to `true` the value that caused\n * `predicate` to return `false` will also be emitted.\n * @return {Observable} An Observable that emits the values from the source\n * Observable so long as each value satisfies the condition defined by the\n * `predicate`, then completes.\n * @method takeWhile\n * @owner Observable\n */\nexport function takeWhile(\n predicate: (value: T, index: number) => boolean,\n inclusive = false): MonoTypeOperatorFunction {\n return (source: Observable) =>\n source.lift(new TakeWhileOperator(predicate, inclusive));\n}\n\nclass TakeWhileOperator implements Operator {\n constructor(\n private predicate: (value: T, index: number) => boolean,\n private inclusive: boolean) {}\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(\n new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass TakeWhileSubscriber extends Subscriber {\n private index: number = 0;\n\n constructor(\n destination: Subscriber,\n private predicate: (value: T, index: number) => boolean,\n private inclusive: boolean) {\n super(destination);\n }\n\n protected _next(value: T): void {\n const destination = this.destination;\n let result: boolean;\n try {\n result = this.predicate(value, this.index++);\n } catch (err) {\n destination.error(err);\n return;\n }\n this.nextOrComplete(value, result);\n }\n\n private nextOrComplete(value: T, predicateResult: boolean): void {\n const destination = this.destination;\n if (Boolean(predicateResult)) {\n destination.next(value);\n } else {\n if (this.inclusive) {\n destination.next(value);\n }\n destination.complete();\n }\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, PartialObserver, TeardownLogic } from '../types';\nimport { noop } from '../util/noop';\nimport { isFunction } from '../util/isFunction';\n\n/* tslint:disable:max-line-length */\n/** @deprecated Use an observer instead of a complete callback */\nexport function tap(next: null | undefined, error: null | undefined, complete: () => void): MonoTypeOperatorFunction;\n/** @deprecated Use an observer instead of an error callback */\nexport function tap(next: null | undefined, error: (error: any) => void, complete?: () => void): MonoTypeOperatorFunction;\n/** @deprecated Use an observer instead of a complete callback */\nexport function tap(next: (value: T) => void, error: null | undefined, complete: () => void): MonoTypeOperatorFunction;\nexport function tap(next?: (x: T) => void, error?: (e: any) => void, complete?: () => void): MonoTypeOperatorFunction;\nexport function tap(observer: PartialObserver): MonoTypeOperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Perform a side effect for every emission on the source Observable, but return\n * an Observable that is identical to the source.\n *\n * Intercepts each emission on the source and runs a\n * function, but returns an output which is identical to the source as long as errors don't occur.\n *\n * ![](do.png)\n *\n * Returns a mirrored Observable of the source Observable, but modified so that\n * the provided Observer is called to perform a side effect for every value,\n * error, and completion emitted by the source. Any errors that are thrown in\n * the aforementioned Observer or handlers are safely sent down the error path\n * of the output Observable.\n *\n * This operator is useful for debugging your Observables for the correct values\n * or performing other side effects.\n *\n * Note: this is different to a `subscribe` on the Observable. If the Observable\n * returned by `tap` is not subscribed, the side effects specified by the\n * Observer will never happen. `tap` therefore simply spies on existing\n * execution, it does not trigger an execution to happen like `subscribe` does.\n *\n * ## Example\n * Map every click to the clientX position of that click, while also logging the click event\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { tap, map } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const positions = clicks.pipe(\n * tap(ev => console.log(ev)),\n * map(ev => ev.clientX),\n * );\n * positions.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link map}\n * @see {@link Observable#subscribe}\n *\n * @param {Observer|function} [nextOrObserver] A normal Observer object or a\n * callback for `next`.\n * @param {function} [error] Callback for errors in the source.\n * @param {function} [complete] Callback for the completion of the source.\n * @return {Observable} An Observable identical to the source, but runs the\n * specified Observer or callback(s) for each item.\n * @name tap\n */\nexport function tap(nextOrObserver?: PartialObserver | ((x: T) => void),\n error?: (e: any) => void,\n complete?: () => void): MonoTypeOperatorFunction {\n return function tapOperatorFunction(source: Observable): Observable {\n return source.lift(new DoOperator(nextOrObserver, error, complete));\n };\n}\n\nclass DoOperator implements Operator {\n constructor(private nextOrObserver?: PartialObserver | ((x: T) => void),\n private error?: (e: any) => void,\n private complete?: () => void) {\n }\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\n\nclass TapSubscriber extends Subscriber {\n private _context: any;\n\n private _tapNext: ((value: T) => void) = noop;\n\n private _tapError: ((err: any) => void) = noop;\n\n private _tapComplete: (() => void) = noop;\n\n constructor(destination: Subscriber,\n observerOrNext?: PartialObserver | ((value: T) => void),\n error?: (e?: any) => void,\n complete?: () => void) {\n super(destination);\n this._tapError = error || noop;\n this._tapComplete = complete || noop;\n if (isFunction(observerOrNext)) {\n this._context = this;\n this._tapNext = observerOrNext;\n } else if (observerOrNext) {\n this._context = observerOrNext;\n this._tapNext = observerOrNext.next || noop;\n this._tapError = observerOrNext.error || noop;\n this._tapComplete = observerOrNext.complete || noop;\n }\n }\n\n _next(value: T) {\n try {\n this._tapNext.call(this._context, value);\n } catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(value);\n }\n\n _error(err: any) {\n try {\n this._tapError.call(this._context, err);\n } catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.error(err);\n }\n\n _complete() {\n try {\n this._tapComplete.call(this._context, );\n } catch (err) {\n this.destination.error(err);\n return;\n }\n return this.destination.complete();\n }\n}\n","import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\n\nimport { MonoTypeOperatorFunction, SubscribableOrPromise, TeardownLogic } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\nexport interface ThrottleConfig {\n leading?: boolean;\n trailing?: boolean;\n}\n\nexport const defaultThrottleConfig: ThrottleConfig = {\n leading: true,\n trailing: false\n};\n\n/**\n * Emits a value from the source Observable, then ignores subsequent source\n * values for a duration determined by another Observable, then repeats this\n * process.\n *\n * It's like {@link throttleTime}, but the silencing\n * duration is determined by a second Observable.\n *\n * ![](throttle.png)\n *\n * `throttle` emits the source Observable values on the output Observable\n * when its internal timer is disabled, and ignores source values when the timer\n * is enabled. Initially, the timer is disabled. As soon as the first source\n * value arrives, it is forwarded to the output Observable, and then the timer\n * is enabled by calling the `durationSelector` function with the source value,\n * which returns the \"duration\" Observable. When the duration Observable emits a\n * value or completes, the timer is disabled, and this process repeats for the\n * next source value.\n *\n * ## Example\n * Emit clicks at a rate of at most one click per second\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { throttle } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(throttle(ev => interval(1000)));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link audit}\n * @see {@link debounce}\n * @see {@link delayWhen}\n * @see {@link sample}\n * @see {@link throttleTime}\n *\n * @param {function(value: T): SubscribableOrPromise} durationSelector A function\n * that receives a value from the source Observable, for computing the silencing\n * duration for each source value, returned as an Observable or a Promise.\n * @param {Object} config a configuration object to define `leading` and `trailing` behavior. Defaults\n * to `{ leading: true, trailing: false }`.\n * @return {Observable} An Observable that performs the throttle operation to\n * limit the rate of emissions from the source.\n * @method throttle\n * @owner Observable\n */\nexport function throttle(durationSelector: (value: T) => SubscribableOrPromise,\n config: ThrottleConfig = defaultThrottleConfig): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new ThrottleOperator(durationSelector, !!config.leading, !!config.trailing));\n}\n\nclass ThrottleOperator implements Operator {\n constructor(private durationSelector: (value: T) => SubscribableOrPromise,\n private leading: boolean,\n private trailing: boolean) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(\n new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing)\n );\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc\n * @ignore\n * @extends {Ignored}\n */\nclass ThrottleSubscriber extends SimpleOuterSubscriber {\n private _throttled?: Subscription;\n private _sendValue?: T;\n private _hasValue = false;\n\n constructor(protected destination: Subscriber,\n private durationSelector: (value: T) => SubscribableOrPromise,\n private _leading: boolean,\n private _trailing: boolean) {\n super(destination);\n }\n\n protected _next(value: T): void {\n this._hasValue = true;\n this._sendValue = value;\n\n if (!this._throttled) {\n if (this._leading) {\n this.send();\n } else {\n this.throttle(value);\n }\n }\n }\n\n private send() {\n const { _hasValue, _sendValue } = this;\n if (_hasValue) {\n this.destination.next(_sendValue);\n this.throttle(_sendValue!);\n }\n this._hasValue = false;\n this._sendValue = undefined;\n }\n\n private throttle(value: T): void {\n const duration = this.tryDurationSelector(value);\n if (!!duration) {\n this.add(this._throttled = innerSubscribe(duration, new SimpleInnerSubscriber(this)));\n }\n }\n\n private tryDurationSelector(value: T): SubscribableOrPromise | null {\n try {\n return this.durationSelector(value);\n } catch (err) {\n this.destination.error(err);\n return null;\n }\n }\n\n private throttlingDone() {\n const { _throttled, _trailing } = this;\n if (_throttled) {\n _throttled.unsubscribe();\n }\n this._throttled = undefined;\n\n if (_trailing) {\n this.send();\n }\n }\n\n notifyNext(): void {\n this.throttlingDone();\n }\n\n notifyComplete(): void {\n this.throttlingDone();\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { async } from '../scheduler/async';\nimport { Observable } from '../Observable';\nimport { ThrottleConfig, defaultThrottleConfig } from './throttle';\nimport { MonoTypeOperatorFunction, SchedulerLike, TeardownLogic } from '../types';\n\n/**\n * Emits a value from the source Observable, then ignores subsequent source\n * values for `duration` milliseconds, then repeats this process.\n *\n * Lets a value pass, then ignores source values for the\n * next `duration` milliseconds.\n *\n * ![](throttleTime.png)\n *\n * `throttleTime` emits the source Observable values on the output Observable\n * when its internal timer is disabled, and ignores source values when the timer\n * is enabled. Initially, the timer is disabled. As soon as the first source\n * value arrives, it is forwarded to the output Observable, and then the timer\n * is enabled. After `duration` milliseconds (or the time unit determined\n * internally by the optional `scheduler`) has passed, the timer is disabled,\n * and this process repeats for the next source value. Optionally takes a\n * {@link SchedulerLike} for managing timers.\n *\n * ## Examples\n *\n * #### Limit click rate\n *\n * Emit clicks at a rate of at most one click per second\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { throttleTime } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(throttleTime(1000));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * #### Double Click\n *\n * The following example only emits clicks which happen within a subsequent\n * delay of 400ms of the previous click. This for example can emulate a double\n * click. It makes use of the `trailing` parameter of the throttle configuration.\n *\n * ```ts\n * import { fromEvent, asyncScheduler } from 'rxjs';\n * import { throttleTime, withLatestFrom } from 'rxjs/operators';\n *\n * // defaultThottleConfig = { leading: true, trailing: false }\n * const throttleConfig = {\n * leading: false,\n * trailing: true\n * }\n *\n * const click = fromEvent(document, 'click');\n * const doubleClick = click.pipe(\n * throttleTime(400, asyncScheduler, throttleConfig)\n * );\n *\n * doubleClick.subscribe((throttleValue: Event) => {\n * console.log(`Double-clicked! Timestamp: ${throttleValue.timeStamp}`);\n * });\n * ```\n *\n * If you enable the `leading` parameter in this example, the output would be the primary click and\n * the double click, but restricts additional clicks within 400ms.\n *\n * @see {@link auditTime}\n * @see {@link debounceTime}\n * @see {@link delay}\n * @see {@link sampleTime}\n * @see {@link throttle}\n *\n * @param {number} duration Time to wait before emitting another value after\n * emitting the last value, measured in milliseconds or the time unit determined\n * internally by the optional `scheduler`.\n * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for\n * managing the timers that handle the throttling.\n * @param {Object} config a configuration object to define `leading` and\n * `trailing` behavior. Defaults to `{ leading: true, trailing: false }`.\n * @return {Observable} An Observable that performs the throttle operation to\n * limit the rate of emissions from the source.\n * @method throttleTime\n * @owner Observable\n */\nexport function throttleTime(duration: number,\n scheduler: SchedulerLike = async,\n config: ThrottleConfig = defaultThrottleConfig): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing));\n}\n\nclass ThrottleTimeOperator implements Operator {\n constructor(private duration: number,\n private scheduler: SchedulerLike,\n private leading: boolean,\n private trailing: boolean) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(\n new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing)\n );\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass ThrottleTimeSubscriber extends Subscriber {\n private throttled: Subscription;\n private _hasTrailingValue: boolean = false;\n private _trailingValue: T = null;\n\n constructor(destination: Subscriber,\n private duration: number,\n private scheduler: SchedulerLike,\n private leading: boolean,\n private trailing: boolean) {\n super(destination);\n }\n\n protected _next(value: T) {\n if (this.throttled) {\n if (this.trailing) {\n this._trailingValue = value;\n this._hasTrailingValue = true;\n }\n } else {\n this.add(this.throttled = this.scheduler.schedule>(dispatchNext, this.duration, { subscriber: this }));\n if (this.leading) {\n this.destination.next(value);\n } else if (this.trailing) {\n this._trailingValue = value;\n this._hasTrailingValue = true;\n }\n }\n }\n\n protected _complete() {\n if (this._hasTrailingValue) {\n this.destination.next(this._trailingValue);\n this.destination.complete();\n } else {\n this.destination.complete();\n }\n }\n\n clearThrottle() {\n const throttled = this.throttled;\n if (throttled) {\n if (this.trailing && this._hasTrailingValue) {\n this.destination.next(this._trailingValue);\n this._trailingValue = null;\n this._hasTrailingValue = false;\n }\n throttled.unsubscribe();\n this.remove(throttled);\n this.throttled = null;\n }\n }\n}\n\ninterface DispatchArg {\n subscriber: ThrottleTimeSubscriber;\n}\n\nfunction dispatchNext(arg: DispatchArg) {\n const { subscriber } = arg;\n subscriber.clearThrottle();\n}\n","\nimport { Observable } from '../Observable';\nimport { async } from '../scheduler/async';\nimport { SchedulerLike, OperatorFunction } from '../types';\nimport { scan } from './scan';\nimport { defer } from '../observable/defer';\nimport { map } from './map';\n\n/**\n *\n * Emits an object containing the current value, and the time that has\n * passed between emitting the current value and the previous value, which is\n * calculated by using the provided `scheduler`'s `now()` method to retrieve\n * the current time at each emission, then calculating the difference. The `scheduler`\n * defaults to {@link asyncScheduler}, so by default, the `interval` will be in\n * milliseconds.\n *\n * Convert an Observable that emits items into one that\n * emits indications of the amount of time elapsed between those emissions.\n *\n * ![](timeinterval.png)\n *\n * ## Examples\n * Emit inteval between current value with the last value\n *\n * ```ts\n * const seconds = interval(1000);\n *\n * seconds.pipe(timeInterval())\n * .subscribe(\n * value => console.log(value),\n * err => console.log(err),\n * );\n *\n * seconds.pipe(timeout(900))\n * .subscribe(\n * value => console.log(value),\n * err => console.log(err),\n * );\n *\n * // NOTE: The values will never be this precise,\n * // intervals created with `interval` or `setInterval`\n * // are non-deterministic.\n *\n * // {value: 0, interval: 1000}\n * // {value: 1, interval: 1000}\n * // {value: 2, interval: 1000}\n * ```\n *\n * @param {SchedulerLike} [scheduler] Scheduler used to get the current time.\n * @return {Observable<{ interval: number, value: T }>} Observable that emit infomation about value and interval\n * @method timeInterval\n */\nexport function timeInterval(scheduler: SchedulerLike = async): OperatorFunction> {\n return (source: Observable) => defer(() => {\n return source.pipe(\n // TODO(benlesh): correct these typings.\n scan(\n ({ current }, value) => ({ value, current: scheduler.now(), last: current }),\n { current: scheduler.now(), value: undefined, last: undefined }\n ) as any,\n map>(({ current, last, value }) => new TimeInterval(value, current - last)),\n );\n });\n}\n\n// TODO(benlesh): make this an interface, export the interface, but not the implemented class,\n// there's no reason users should be manually creating this type.\n\n/**\n * @deprecated exposed API, use as interface only.\n */\nexport class TimeInterval {\n constructor(public value: T, public interval: number) {}\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nimport { Observable } from '../Observable';\nimport { isDate } from '../util/isDate';\nimport { ObservableInput, OperatorFunction, SchedulerAction, SchedulerLike, TeardownLogic } from '../types';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\n/* tslint:disable:max-line-length */\nexport function timeoutWith(due: number | Date, withObservable: ObservableInput, scheduler?: SchedulerLike): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n *\n * Errors if Observable does not emit a value in given time span, in case of which\n * subscribes to the second Observable.\n *\n * It's a version of `timeout` operator that let's you specify fallback Observable.\n *\n * ![](timeoutWith.png)\n *\n * `timeoutWith` is a variation of `timeout` operator. It behaves exactly the same,\n * still accepting as a first argument either a number or a Date, which control - respectively -\n * when values of source Observable should be emitted or when it should complete.\n *\n * The only difference is that it accepts a second, required parameter. This parameter\n * should be an Observable which will be subscribed when source Observable fails any timeout check.\n * So whenever regular `timeout` would emit an error, `timeoutWith` will instead start re-emitting\n * values from second Observable. Note that this fallback Observable is not checked for timeouts\n * itself, so it can emit values and complete at arbitrary points in time. From the moment of a second\n * subscription, Observable returned from `timeoutWith` simply mirrors fallback stream. When that\n * stream completes, it completes as well.\n *\n * Scheduler, which in case of `timeout` is provided as as second argument, can be still provided\n * here - as a third, optional parameter. It still is used to schedule timeout checks and -\n * as a consequence - when second Observable will be subscribed, since subscription happens\n * immediately after failing check.\n *\n * ## Example\n * Add fallback observable\n * ```ts\n * import { interval } from 'rxjs';\n * import { timeoutWith } from 'rxjs/operators';\n *\n * const seconds = interval(1000);\n * const minutes = interval(60 * 1000);\n *\n * seconds.pipe(timeoutWith(900, minutes))\n * .subscribe(\n * value => console.log(value), // After 900ms, will start emitting `minutes`,\n * // since first value of `seconds` will not arrive fast enough.\n * err => console.log(err), // Would be called after 900ms in case of `timeout`,\n * // but here will never be called.\n * );\n * ```\n *\n * @param {number|Date} due Number specifying period within which Observable must emit values\n * or Date specifying before when Observable should complete\n * @param {Observable} withObservable Observable which will be subscribed if source fails timeout check.\n * @param {SchedulerLike} [scheduler] Scheduler controlling when timeout checks occur.\n * @return {Observable} Observable that mirrors behaviour of source or, when timeout check fails, of an Observable\n * passed as a second parameter.\n * @method timeoutWith\n * @owner Observable\n */\nexport function timeoutWith(due: number | Date,\n withObservable: ObservableInput,\n scheduler: SchedulerLike = async): OperatorFunction {\n return (source: Observable) => {\n let absoluteTimeout = isDate(due);\n let waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);\n return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));\n };\n}\n\nclass TimeoutWithOperator implements Operator {\n constructor(private waitFor: number,\n private absoluteTimeout: boolean,\n private withObservable: ObservableInput,\n private scheduler: SchedulerLike) {\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n return source.subscribe(new TimeoutWithSubscriber(\n subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler\n ));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass TimeoutWithSubscriber extends SimpleOuterSubscriber {\n\n private action?: SchedulerAction>;\n\n constructor(destination: Subscriber,\n private absoluteTimeout: boolean,\n private waitFor: number,\n private withObservable: ObservableInput,\n private scheduler: SchedulerLike) {\n super(destination);\n this.scheduleTimeout();\n }\n\n private static dispatchTimeout(subscriber: TimeoutWithSubscriber): void {\n const { withObservable } = subscriber;\n subscriber._unsubscribeAndRecycle();\n subscriber.add(innerSubscribe(withObservable, new SimpleInnerSubscriber(subscriber)));\n }\n\n private scheduleTimeout(): void {\n const { action } = this;\n if (action) {\n // Recycle the action if we've already scheduled one. All the production\n // Scheduler Actions mutate their state/delay time and return themeselves.\n // VirtualActions are immutable, so they create and return a clone. In this\n // case, we need to set the action reference to the most recent VirtualAction,\n // to ensure that's the one we clone from next time.\n this.action = (>> action.schedule(this, this.waitFor));\n } else {\n this.add(this.action = (>> this.scheduler.schedule>(\n TimeoutWithSubscriber.dispatchTimeout as any, this.waitFor, this\n )));\n }\n }\n\n protected _next(value: T): void {\n if (!this.absoluteTimeout) {\n this.scheduleTimeout();\n }\n super._next(value);\n }\n\n /** @deprecated This is an internal implementation detail, do not use. */\n _unsubscribe() {\n this.action = undefined;\n this.scheduler = null!;\n this.withObservable = null!;\n }\n}\n","import { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { TimeoutError } from '../util/TimeoutError';\nimport { MonoTypeOperatorFunction, SchedulerAction, SchedulerLike, TeardownLogic } from '../types';\nimport { timeoutWith } from './timeoutWith';\nimport { throwError } from '../observable/throwError';\n\n/**\n *\n * Errors if Observable does not emit a value in given time span.\n *\n * Timeouts on Observable that doesn't emit values fast enough.\n *\n * ![](timeout.png)\n *\n * `timeout` operator accepts as an argument either a number or a Date.\n *\n * If number was provided, it returns an Observable that behaves like a source\n * Observable, unless there is a period of time where there is no value emitted.\n * So if you provide `100` as argument and first value comes after 50ms from\n * the moment of subscription, this value will be simply re-emitted by the resulting\n * Observable. If however after that 100ms passes without a second value being emitted,\n * stream will end with an error and source Observable will be unsubscribed.\n * These checks are performed throughout whole lifecycle of Observable - from the moment\n * it was subscribed to, until it completes or errors itself. Thus every value must be\n * emitted within specified period since previous value.\n *\n * If provided argument was Date, returned Observable behaves differently. It throws\n * if Observable did not complete before provided Date. This means that periods between\n * emission of particular values do not matter in this case. If Observable did not complete\n * before provided Date, source Observable will be unsubscribed. Other than that, resulting\n * stream behaves just as source Observable.\n *\n * `timeout` accepts also a Scheduler as a second parameter. It is used to schedule moment (or moments)\n * when returned Observable will check if source stream emitted value or completed.\n *\n * ## Examples\n * Check if ticks are emitted within certain timespan\n * ```ts\n * import { interval } from 'rxjs';\n * import { timeout } from 'rxjs/operators';\n *\n * const seconds = interval(1000);\n *\n * seconds.pipe(timeout(1100)) // Let's use bigger timespan to be safe,\n * // since `interval` might fire a bit later then scheduled.\n * .subscribe(\n * value => console.log(value), // Will emit numbers just as regular `interval` would.\n * err => console.log(err), // Will never be called.\n * );\n *\n * seconds.pipe(timeout(900))\n * .subscribe(\n * value => console.log(value), // Will never be called.\n * err => console.log(err), // Will emit error before even first value is emitted,\n * // since it did not arrive within 900ms period.\n * );\n * ```\n *\n * Use Date to check if Observable completed\n * ```ts\n * import { interval } from 'rxjs';\n * import { timeout } from 'rxjs/operators';\n *\n * const seconds = interval(1000);\n *\n * seconds.pipe(\n * timeout(new Date(\"December 17, 2020 03:24:00\")),\n * )\n * .subscribe(\n * value => console.log(value), // Will emit values as regular `interval` would\n * // until December 17, 2020 at 03:24:00.\n * err => console.log(err) // On December 17, 2020 at 03:24:00 it will emit an error,\n * // since Observable did not complete by then.\n * );\n * ```\n * @see {@link timeoutWith}\n *\n * @param {number|Date} due Number specifying period within which Observable must emit values\n * or Date specifying before when Observable should complete\n * @param {SchedulerLike} [scheduler] Scheduler controlling when timeout checks occur.\n * @return {Observable} Observable that mirrors behaviour of source, unless timeout checks fail.\n * @method timeout\n * @owner Observable\n */\nexport function timeout(due: number | Date,\n scheduler: SchedulerLike = async): MonoTypeOperatorFunction {\n return timeoutWith(due, throwError(new TimeoutError()), scheduler);\n}\n","\nimport { async } from '../scheduler/async';\nimport { OperatorFunction, SchedulerLike, Timestamp as TimestampInterface } from '../types';\nimport { map } from './map';\n\n/**\n * Attaches a timestamp to each item emitted by an observable indicating when it was emitted\n *\n * The `timestamp` operator maps the *source* observable stream to an object of type\n * `{value: T, timestamp: R}`. The properties are generically typed. The `value` property contains the value\n * and type of the *source* observable. The `timestamp` is generated by the schedulers `now` function. By\n * default it uses the *async* scheduler which simply returns `Date.now()` (milliseconds since 1970/01/01\n * 00:00:00:000) and therefore is of type `number`.\n *\n * ![](timestamp.png)\n *\n * ## Example\n *\n * In this example there is a timestamp attached to the documents click event.\n *\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { timestamp } from 'rxjs/operators';\n *\n * const clickWithTimestamp = fromEvent(document, 'click').pipe(\n * timestamp()\n * );\n *\n * // Emits data of type {value: MouseEvent, timestamp: number}\n * clickWithTimestamp.subscribe(data => {\n * console.log(data);\n * });\n * ```\n *\n * @param scheduler\n * @return {Observable>|WebSocketSubject|Observable}\n * @method timestamp\n * @owner Observable\n */\nexport function timestamp(scheduler: SchedulerLike = async): OperatorFunction> {\n return map((value: T) => new Timestamp(value, scheduler.now()));\n // return (source: Observable) => source.lift(new TimestampOperator(scheduler));\n}\n\nexport class Timestamp implements TimestampInterface {\n constructor(public value: T, public timestamp: number) {\n }\n}\n","import { reduce } from './reduce';\nimport { OperatorFunction } from '../types';\n\nfunction toArrayReducer(arr: T[], item: T, index: number) {\n if (index === 0) {\n return [item];\n }\n arr.push(item);\n return arr;\n}\n\n/**\n * Collects all source emissions and emits them as an array when the source completes.\n *\n * Get all values inside an array when the source completes\n *\n * ![](toArray.png)\n *\n * `toArray` will wait until the source Observable completes before emitting\n * the array containing all emissions. When the source Observable errors no\n * array will be emitted.\n *\n * ## Example\n * ```ts\n * import { interval } from 'rxjs';\n * import { toArray, take } from 'rxjs/operators';\n *\n * const source = interval(1000);\n * const example = source.pipe(\n * take(10),\n * toArray()\n * );\n *\n * const subscribe = example.subscribe(val => console.log(val));\n *\n * // output: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n *\n * ```\n* @return An array from an observable sequence.\n* @method toArray\n* @owner Observable\n*/\nexport function toArray(): OperatorFunction {\n return reduce(toArrayReducer, [] as T[]);\n}\n","import { Observable } from '../Observable';\nimport { OperatorFunction } from '../types';\nimport { Subject } from '../Subject';\nimport { Subscriber } from '../Subscriber';\nimport { Operator } from '../Operator';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\n\n/**\n * Branch out the source Observable values as a nested Observable whenever\n * `windowBoundaries` emits.\n *\n * It's like {@link buffer}, but emits a nested Observable\n * instead of an array.\n *\n * ![](window.png)\n *\n * Returns an Observable that emits windows of items it collects from the source\n * Observable. The output Observable emits connected, non-overlapping\n * windows. It emits the current window and opens a new one whenever the\n * Observable `windowBoundaries` emits an item. Because each window is an\n * Observable, the output is a higher-order Observable.\n *\n * ## Example\n * In every window of 1 second each, emit at most 2 click events\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { window, mergeAll, map, take } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const sec = interval(1000);\n * const result = clicks.pipe(\n * window(sec),\n * map(win => win.pipe(take(2))), // each window has at most 2 emissions\n * mergeAll(), // flatten the Observable-of-Observables\n * );\n * result.subscribe(x => console.log(x));\n * ```\n * @see {@link windowCount}\n * @see {@link windowTime}\n * @see {@link windowToggle}\n * @see {@link windowWhen}\n * @see {@link buffer}\n *\n * @param {Observable} windowBoundaries An Observable that completes the\n * previous window and starts a new window.\n * @return {Observable>} An Observable of windows, which are\n * Observables emitting values of the source Observable.\n * @method window\n * @owner Observable\n */\nexport function window(windowBoundaries: Observable): OperatorFunction> {\n return function windowOperatorFunction(source: Observable) {\n return source.lift(new WindowOperator(windowBoundaries));\n };\n}\n\nclass WindowOperator implements Operator> {\n\n constructor(private windowBoundaries: Observable) {\n }\n\n call(subscriber: Subscriber>, source: any): any {\n const windowSubscriber = new WindowSubscriber(subscriber);\n const sourceSubscription = source.subscribe(windowSubscriber);\n if (!sourceSubscription.closed) {\n windowSubscriber.add(innerSubscribe(this.windowBoundaries, new SimpleInnerSubscriber(windowSubscriber)));\n }\n return sourceSubscription;\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass WindowSubscriber extends SimpleOuterSubscriber {\n\n private window: Subject = new Subject();\n\n constructor(destination: Subscriber>) {\n super(destination);\n destination.next(this.window);\n }\n\n notifyNext(): void {\n this.openWindow();\n }\n\n notifyError(error: any): void {\n this._error(error);\n }\n\n notifyComplete(): void {\n this._complete();\n }\n\n protected _next(value: T): void {\n this.window.next(value);\n }\n\n protected _error(err: any): void {\n this.window.error(err);\n this.destination.error!(err);\n }\n\n protected _complete(): void {\n this.window.complete();\n this.destination.complete!();\n }\n\n /** @deprecated This is an internal implementation detail, do not use. */\n _unsubscribe() {\n this.window = null!;\n }\n\n private openWindow(): void {\n const prevWindow = this.window;\n if (prevWindow) {\n prevWindow.complete();\n }\n const destination = this.destination;\n const newWindow = this.window = new Subject();\n destination.next!(newWindow);\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { Subject } from '../Subject';\nimport { OperatorFunction } from '../types';\n\n/**\n * Branch out the source Observable values as a nested Observable with each\n * nested Observable emitting at most `windowSize` values.\n *\n * It's like {@link bufferCount}, but emits a nested\n * Observable instead of an array.\n *\n * ![](windowCount.png)\n *\n * Returns an Observable that emits windows of items it collects from the source\n * Observable. The output Observable emits windows every `startWindowEvery`\n * items, each containing no more than `windowSize` items. When the source\n * Observable completes or encounters an error, the output Observable emits\n * the current window and propagates the notification from the source\n * Observable. If `startWindowEvery` is not provided, then new windows are\n * started immediately at the start of the source and when each window completes\n * with size `windowSize`.\n *\n * ## Examples\n * Ignore every 3rd click event, starting from the first one\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { windowCount, map, mergeAll, skip } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n * windowCount(3),\n * map(win => win.pipe(skip(1))), // skip first of every 3 clicks\n * mergeAll() // flatten the Observable-of-Observables\n * );\n * result.subscribe(x => console.log(x));\n * ```\n *\n * Ignore every 3rd click event, starting from the third one\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { windowCount, mergeAll } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n * windowCount(2, 3),\n * mergeAll(), // flatten the Observable-of-Observables\n * );\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link window}\n * @see {@link windowTime}\n * @see {@link windowToggle}\n * @see {@link windowWhen}\n * @see {@link bufferCount}\n *\n * @param {number} windowSize The maximum number of values emitted by each\n * window.\n * @param {number} [startWindowEvery] Interval at which to start a new window.\n * For example if `startWindowEvery` is `2`, then a new window will be started\n * on every other value from the source. A new window is started at the\n * beginning of the source by default.\n * @return {Observable>} An Observable of windows, which in turn\n * are Observable of values.\n * @method windowCount\n * @owner Observable\n */\nexport function windowCount(windowSize: number,\n startWindowEvery: number = 0): OperatorFunction> {\n return function windowCountOperatorFunction(source: Observable) {\n return source.lift(new WindowCountOperator(windowSize, startWindowEvery));\n };\n}\n\nclass WindowCountOperator implements Operator> {\n\n constructor(private windowSize: number,\n private startWindowEvery: number) {\n }\n\n call(subscriber: Subscriber>, source: any): any {\n return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass WindowCountSubscriber extends Subscriber {\n private windows: Subject[] = [ new Subject() ];\n private count: number = 0;\n\n constructor(protected destination: Subscriber>,\n private windowSize: number,\n private startWindowEvery: number) {\n super(destination);\n destination.next(this.windows[0]);\n }\n\n protected _next(value: T) {\n const startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;\n const destination = this.destination;\n const windowSize = this.windowSize;\n const windows = this.windows;\n const len = windows.length;\n\n for (let i = 0; i < len && !this.closed; i++) {\n windows[i].next(value);\n }\n const c = this.count - windowSize + 1;\n if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {\n windows.shift().complete();\n }\n if (++this.count % startWindowEvery === 0 && !this.closed) {\n const window = new Subject();\n windows.push(window);\n destination.next(window);\n }\n }\n\n protected _error(err: any) {\n const windows = this.windows;\n if (windows) {\n while (windows.length > 0 && !this.closed) {\n windows.shift().error(err);\n }\n }\n this.destination.error(err);\n }\n\n protected _complete() {\n const windows = this.windows;\n if (windows) {\n while (windows.length > 0 && !this.closed) {\n windows.shift().complete();\n }\n }\n this.destination.complete();\n }\n\n protected _unsubscribe() {\n this.count = 0;\n this.windows = null;\n }\n}\n","import { Subject } from '../Subject';\nimport { Operator } from '../Operator';\nimport { async } from '../scheduler/async';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { isNumeric } from '../util/isNumeric';\nimport { isScheduler } from '../util/isScheduler';\nimport { OperatorFunction, SchedulerLike, SchedulerAction } from '../types';\n\n/**\n * Branch out the source Observable values as a nested Observable periodically\n * in time.\n *\n * It's like {@link bufferTime}, but emits a nested\n * Observable instead of an array.\n *\n * ![](windowTime.png)\n *\n * Returns an Observable that emits windows of items it collects from the source\n * Observable. The output Observable starts a new window periodically, as\n * determined by the `windowCreationInterval` argument. It emits each window\n * after a fixed timespan, specified by the `windowTimeSpan` argument. When the\n * source Observable completes or encounters an error, the output Observable\n * emits the current window and propagates the notification from the source\n * Observable. If `windowCreationInterval` is not provided, the output\n * Observable starts a new window when the previous window of duration\n * `windowTimeSpan` completes. If `maxWindowCount` is provided, each window\n * will emit at most fixed number of values. Window will complete immediately\n * after emitting last value and next one still will open as specified by\n * `windowTimeSpan` and `windowCreationInterval` arguments.\n *\n * ## Examples\n * In every window of 1 second each, emit at most 2 click events\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { windowTime, map, mergeAll, take } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n * windowTime(1000),\n * map(win => win.pipe(take(2))), // each window has at most 2 emissions\n * mergeAll(), // flatten the Observable-of-Observables\n * );\n * result.subscribe(x => console.log(x));\n * ```\n *\n * Every 5 seconds start a window 1 second long, and emit at most 2 click events per window\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { windowTime, map, mergeAll, take } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n * windowTime(1000, 5000),\n * map(win => win.pipe(take(2))), // each window has at most 2 emissions\n * mergeAll(), // flatten the Observable-of-Observables\n * );\n * result.subscribe(x => console.log(x));\n * ```\n *\n * Same as example above but with maxWindowCount instead of take\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { windowTime, mergeAll } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n * windowTime(1000, 5000, 2), // each window has still at most 2 emissions\n * mergeAll(), // flatten the Observable-of-Observables\n * );\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link window}\n * @see {@link windowCount}\n * @see {@link windowToggle}\n * @see {@link windowWhen}\n * @see {@link bufferTime}\n *\n * @param {number} windowTimeSpan The amount of time to fill each window.\n * @param {number} [windowCreationInterval] The interval at which to start new\n * windows.\n * @param {number} [maxWindowSize=Number.POSITIVE_INFINITY] Max number of\n * values each window can emit before completion.\n * @param {SchedulerLike} [scheduler=async] The scheduler on which to schedule the\n * intervals that determine window boundaries.\n * @return {Observable>} An observable of windows, which in turn\n * are Observables.\n * @method windowTime\n * @owner Observable\n */\nexport function windowTime(windowTimeSpan: number,\n scheduler?: SchedulerLike): OperatorFunction>;\nexport function windowTime(windowTimeSpan: number,\n windowCreationInterval: number,\n scheduler?: SchedulerLike): OperatorFunction>;\nexport function windowTime(windowTimeSpan: number,\n windowCreationInterval: number,\n maxWindowSize: number,\n scheduler?: SchedulerLike): OperatorFunction>;\n\nexport function windowTime(windowTimeSpan: number): OperatorFunction> {\n let scheduler: SchedulerLike = async;\n let windowCreationInterval: number = null;\n let maxWindowSize: number = Number.POSITIVE_INFINITY;\n\n if (isScheduler(arguments[3])) {\n scheduler = arguments[3];\n }\n\n if (isScheduler(arguments[2])) {\n scheduler = arguments[2];\n } else if (isNumeric(arguments[2])) {\n maxWindowSize = Number(arguments[2]);\n }\n\n if (isScheduler(arguments[1])) {\n scheduler = arguments[1];\n } else if (isNumeric(arguments[1])) {\n windowCreationInterval = Number(arguments[1]);\n }\n\n return function windowTimeOperatorFunction(source: Observable) {\n return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));\n };\n}\n\nclass WindowTimeOperator implements Operator> {\n\n constructor(private windowTimeSpan: number,\n private windowCreationInterval: number | null,\n private maxWindowSize: number,\n private scheduler: SchedulerLike) {\n }\n\n call(subscriber: Subscriber>, source: any): any {\n return source.subscribe(new WindowTimeSubscriber(\n subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler\n ));\n }\n}\n\ninterface CreationState {\n windowTimeSpan: number;\n windowCreationInterval: number;\n subscriber: WindowTimeSubscriber;\n scheduler: SchedulerLike;\n}\n\ninterface TimeSpanOnlyState {\n window: CountedSubject;\n windowTimeSpan: number;\n subscriber: WindowTimeSubscriber;\n }\n\ninterface CloseWindowContext {\n action: SchedulerAction>;\n subscription: Subscription;\n}\n\ninterface CloseState {\n subscriber: WindowTimeSubscriber;\n window: CountedSubject;\n context: CloseWindowContext;\n}\n\nclass CountedSubject extends Subject {\n private _numberOfNextedValues: number = 0;\n\n next(value?: T): void {\n this._numberOfNextedValues++;\n super.next(value);\n }\n\n get numberOfNextedValues(): number {\n return this._numberOfNextedValues;\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass WindowTimeSubscriber extends Subscriber {\n private windows: CountedSubject[] = [];\n\n constructor(protected destination: Subscriber>,\n private windowTimeSpan: number,\n private windowCreationInterval: number | null,\n private maxWindowSize: number,\n private scheduler: SchedulerLike) {\n super(destination);\n\n const window = this.openWindow();\n if (windowCreationInterval !== null && windowCreationInterval >= 0) {\n const closeState: CloseState = { subscriber: this, window, context: null };\n const creationState: CreationState = { windowTimeSpan, windowCreationInterval, subscriber: this, scheduler };\n this.add(scheduler.schedule>(dispatchWindowClose, windowTimeSpan, closeState));\n this.add(scheduler.schedule>(dispatchWindowCreation, windowCreationInterval, creationState));\n } else {\n const timeSpanOnlyState: TimeSpanOnlyState = { subscriber: this, window, windowTimeSpan };\n this.add(scheduler.schedule>(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));\n }\n }\n\n protected _next(value: T): void {\n const windows = this.windows;\n const len = windows.length;\n for (let i = 0; i < len; i++) {\n const window = windows[i];\n if (!window.closed) {\n window.next(value);\n if (window.numberOfNextedValues >= this.maxWindowSize) {\n this.closeWindow(window);\n }\n }\n }\n }\n\n protected _error(err: any): void {\n const windows = this.windows;\n while (windows.length > 0) {\n windows.shift().error(err);\n }\n this.destination.error(err);\n }\n\n protected _complete(): void {\n const windows = this.windows;\n while (windows.length > 0) {\n const window = windows.shift();\n if (!window.closed) {\n window.complete();\n }\n }\n this.destination.complete();\n }\n\n public openWindow(): CountedSubject {\n const window = new CountedSubject();\n this.windows.push(window);\n const destination = this.destination;\n destination.next(window);\n return window;\n }\n\n public closeWindow(window: CountedSubject): void {\n window.complete();\n const windows = this.windows;\n windows.splice(windows.indexOf(window), 1);\n }\n}\n\nfunction dispatchWindowTimeSpanOnly(this: SchedulerAction>, state: TimeSpanOnlyState): void {\n const { subscriber, windowTimeSpan, window } = state;\n if (window) {\n subscriber.closeWindow(window);\n }\n state.window = subscriber.openWindow();\n this.schedule(state, windowTimeSpan);\n}\n\nfunction dispatchWindowCreation(this: SchedulerAction>, state: CreationState): void {\n const { windowTimeSpan, subscriber, scheduler, windowCreationInterval } = state;\n const window = subscriber.openWindow();\n const action = this;\n let context: CloseWindowContext = { action, subscription: null };\n const timeSpanState: CloseState = { subscriber, window, context };\n context.subscription = scheduler.schedule>(dispatchWindowClose, windowTimeSpan, timeSpanState);\n action.add(context.subscription);\n action.schedule(state, windowCreationInterval);\n}\n\nfunction dispatchWindowClose(state: CloseState): void {\n const { subscriber, window, context } = state;\n if (context && context.action && context.subscription) {\n context.action.remove(context.subscription);\n }\n subscriber.closeWindow(window);\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OperatorFunction } from '../types';\n\n/**\n * Branch out the source Observable values as a nested Observable starting from\n * an emission from `openings` and ending when the output of `closingSelector`\n * emits.\n *\n * It's like {@link bufferToggle}, but emits a nested\n * Observable instead of an array.\n *\n * ![](windowToggle.png)\n *\n * Returns an Observable that emits windows of items it collects from the source\n * Observable. The output Observable emits windows that contain those items\n * emitted by the source Observable between the time when the `openings`\n * Observable emits an item and when the Observable returned by\n * `closingSelector` emits an item.\n *\n * ## Example\n * Every other second, emit the click events from the next 500ms\n * ```ts\n * import { fromEvent, interval, EMPTY } from 'rxjs';\n * import { windowToggle, mergeAll } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const openings = interval(1000);\n * const result = clicks.pipe(\n * windowToggle(openings, i => i % 2 ? interval(500) : EMPTY),\n * mergeAll()\n * );\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link window}\n * @see {@link windowCount}\n * @see {@link windowTime}\n * @see {@link windowWhen}\n * @see {@link bufferToggle}\n *\n * @param {Observable} openings An observable of notifications to start new\n * windows.\n * @param {function(value: O): Observable} closingSelector A function that takes\n * the value emitted by the `openings` observable and returns an Observable,\n * which, when it emits (either `next` or `complete`), signals that the\n * associated window should complete.\n * @return {Observable>} An observable of windows, which in turn\n * are Observables.\n * @method windowToggle\n * @owner Observable\n */\nexport function windowToggle(openings: Observable,\n closingSelector: (openValue: O) => Observable): OperatorFunction> {\n return (source: Observable) => source.lift(new WindowToggleOperator(openings, closingSelector));\n}\n\nclass WindowToggleOperator implements Operator> {\n\n constructor(private openings: Observable,\n private closingSelector: (openValue: O) => Observable) {\n }\n\n call(subscriber: Subscriber>, source: any): any {\n return source.subscribe(new WindowToggleSubscriber(\n subscriber, this.openings, this.closingSelector\n ));\n }\n}\n\ninterface WindowContext {\n window: Subject;\n subscription: Subscription;\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass WindowToggleSubscriber extends OuterSubscriber {\n private contexts: WindowContext[] = [];\n private openSubscription: Subscription;\n\n constructor(destination: Subscriber>,\n private openings: Observable,\n private closingSelector: (openValue: O) => Observable) {\n super(destination);\n this.add(this.openSubscription = subscribeToResult(this, openings, openings as any));\n }\n\n protected _next(value: T) {\n const { contexts } = this;\n if (contexts) {\n const len = contexts.length;\n for (let i = 0; i < len; i++) {\n contexts[i].window.next(value);\n }\n }\n }\n\n protected _error(err: any) {\n\n const { contexts } = this;\n this.contexts = null;\n\n if (contexts) {\n const len = contexts.length;\n let index = -1;\n\n while (++index < len) {\n const context = contexts[index];\n context.window.error(err);\n context.subscription.unsubscribe();\n }\n }\n\n super._error(err);\n }\n\n protected _complete() {\n const { contexts } = this;\n this.contexts = null;\n if (contexts) {\n const len = contexts.length;\n let index = -1;\n while (++index < len) {\n const context = contexts[index];\n context.window.complete();\n context.subscription.unsubscribe();\n }\n }\n super._complete();\n }\n\n /** @deprecated This is an internal implementation detail, do not use. */\n _unsubscribe() {\n const { contexts } = this;\n this.contexts = null;\n if (contexts) {\n const len = contexts.length;\n let index = -1;\n while (++index < len) {\n const context = contexts[index];\n context.window.unsubscribe();\n context.subscription.unsubscribe();\n }\n }\n }\n\n notifyNext(outerValue: any, innerValue: any,\n outerIndex: number, innerIndex: number,\n innerSub: InnerSubscriber): void {\n\n if (outerValue === this.openings) {\n let closingNotifier;\n try {\n const { closingSelector } = this;\n closingNotifier = closingSelector(innerValue);\n } catch (e) {\n return this.error(e);\n }\n\n const window = new Subject();\n const subscription = new Subscription();\n const context = { window, subscription };\n this.contexts.push(context);\n const innerSubscription = subscribeToResult(this, closingNotifier, context as any);\n\n if (innerSubscription.closed) {\n this.closeWindow(this.contexts.length - 1);\n } else {\n (innerSubscription).context = context;\n subscription.add(innerSubscription);\n }\n\n this.destination.next(window);\n } else {\n this.closeWindow(this.contexts.indexOf(outerValue));\n }\n }\n\n notifyError(err: any): void {\n this.error(err);\n }\n\n notifyComplete(inner: Subscription): void {\n if (inner !== this.openSubscription) {\n this.closeWindow(this.contexts.indexOf(( inner).context));\n }\n }\n\n private closeWindow(index: number): void {\n if (index === -1) {\n return;\n }\n\n const { contexts } = this;\n const context = contexts[index];\n const { window, subscription } = context;\n contexts.splice(index, 1);\n window.complete();\n subscription.unsubscribe();\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OperatorFunction } from '../types';\n\n/**\n * Branch out the source Observable values as a nested Observable using a\n * factory function of closing Observables to determine when to start a new\n * window.\n *\n * It's like {@link bufferWhen}, but emits a nested\n * Observable instead of an array.\n *\n * ![](windowWhen.png)\n *\n * Returns an Observable that emits windows of items it collects from the source\n * Observable. The output Observable emits connected, non-overlapping windows.\n * It emits the current window and opens a new one whenever the Observable\n * produced by the specified `closingSelector` function emits an item. The first\n * window is opened immediately when subscribing to the output Observable.\n *\n * ## Example\n * Emit only the first two clicks events in every window of [1-5] random seconds\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { windowWhen, map, mergeAll, take } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n * windowWhen(() => interval(1000 + Math.random() * 4000)),\n * map(win => win.pipe(take(2))), // each window has at most 2 emissions\n * mergeAll() // flatten the Observable-of-Observables\n * );\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link window}\n * @see {@link windowCount}\n * @see {@link windowTime}\n * @see {@link windowToggle}\n * @see {@link bufferWhen}\n *\n * @param {function(): Observable} closingSelector A function that takes no\n * arguments and returns an Observable that signals (on either `next` or\n * `complete`) when to close the previous window and start a new one.\n * @return {Observable>} An observable of windows, which in turn\n * are Observables.\n * @method windowWhen\n * @owner Observable\n */\nexport function windowWhen(closingSelector: () => Observable): OperatorFunction> {\n return function windowWhenOperatorFunction(source: Observable) {\n return source.lift(new WindowOperator(closingSelector));\n };\n}\n\nclass WindowOperator implements Operator> {\n constructor(private closingSelector: () => Observable) {\n }\n\n call(subscriber: Subscriber>, source: any): any {\n return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass WindowSubscriber extends OuterSubscriber {\n private window?: Subject;\n private closingNotification?: Subscription;\n\n constructor(protected destination: Subscriber>,\n private closingSelector: () => Observable) {\n super(destination);\n this.openWindow();\n }\n\n notifyNext(_outerValue: T, _innerValue: any,\n _outerIndex: number, _innerIndex: number,\n innerSub: InnerSubscriber): void {\n this.openWindow(innerSub);\n }\n\n notifyError(error: any): void {\n this._error(error);\n }\n\n notifyComplete(innerSub: InnerSubscriber): void {\n this.openWindow(innerSub);\n }\n\n protected _next(value: T): void {\n this.window!.next(value);\n }\n\n protected _error(err: any): void {\n this.window!.error(err);\n this.destination.error(err);\n this.unsubscribeClosingNotification();\n }\n\n protected _complete(): void {\n this.window!.complete();\n this.destination.complete();\n this.unsubscribeClosingNotification();\n }\n\n private unsubscribeClosingNotification(): void {\n if (this.closingNotification) {\n this.closingNotification.unsubscribe();\n }\n }\n\n private openWindow(innerSub: InnerSubscriber | null = null): void {\n if (innerSub) {\n this.remove(innerSub);\n innerSub.unsubscribe();\n }\n\n const prevWindow = this.window;\n if (prevWindow) {\n prevWindow.complete();\n }\n\n const window = this.window = new Subject();\n this.destination.next(window);\n\n let closingNotifier;\n try {\n const { closingSelector } = this;\n closingNotifier = closingSelector();\n } catch (e) {\n this.destination.error(e);\n this.window.error(e);\n return;\n }\n this.add(this.closingNotification = subscribeToResult(this, closingNotifier));\n }\n}\n","import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function withLatestFrom(project: (v1: T) => R): OperatorFunction;\nexport function withLatestFrom, R>(source2: O2, project: (v1: T, v2: ObservedValueOf) => R): OperatorFunction;\nexport function withLatestFrom, O3 extends ObservableInput, R>(v2: O2, v3: O3, project: (v1: T, v2: ObservedValueOf, v3: ObservedValueOf) => R): OperatorFunction;\nexport function withLatestFrom, O3 extends ObservableInput, O4 extends ObservableInput, R>(v2: O2, v3: O3, v4: O4, project: (v1: T, v2: ObservedValueOf, v3: ObservedValueOf, v4: ObservedValueOf) => R): OperatorFunction;\nexport function withLatestFrom, O3 extends ObservableInput, O4 extends ObservableInput, O5 extends ObservableInput, R>(v2: O2, v3: O3, v4: O4, v5: O5, project: (v1: T, v2: ObservedValueOf, v3: ObservedValueOf, v4: ObservedValueOf, v5: ObservedValueOf) => R): OperatorFunction;\nexport function withLatestFrom, O3 extends ObservableInput, O4 extends ObservableInput, O5 extends ObservableInput, O6 extends ObservableInput, R>(v2: O2, v3: O3, v4: O4, v5: O5, v6: O6, project: (v1: T, v2: ObservedValueOf, v3: ObservedValueOf, v4: ObservedValueOf, v5: ObservedValueOf, v6: ObservedValueOf) => R): OperatorFunction;\nexport function withLatestFrom>(source2: O2): OperatorFunction]>;\nexport function withLatestFrom, O3 extends ObservableInput>(v2: O2, v3: O3): OperatorFunction, ObservedValueOf]>;\nexport function withLatestFrom, O3 extends ObservableInput, O4 extends ObservableInput>(v2: O2, v3: O3, v4: O4): OperatorFunction, ObservedValueOf, ObservedValueOf]>;\nexport function withLatestFrom, O3 extends ObservableInput, O4 extends ObservableInput, O5 extends ObservableInput>(v2: O2, v3: O3, v4: O4, v5: O5): OperatorFunction, ObservedValueOf, ObservedValueOf, ObservedValueOf]>;\nexport function withLatestFrom, O3 extends ObservableInput, O4 extends ObservableInput, O5 extends ObservableInput, O6 extends ObservableInput>(v2: O2, v3: O3, v4: O4, v5: O5, v6: O6): OperatorFunction, ObservedValueOf, ObservedValueOf, ObservedValueOf, ObservedValueOf]>;\nexport function withLatestFrom(...observables: Array | ((...values: Array) => R)>): OperatorFunction;\nexport function withLatestFrom(array: ObservableInput[]): OperatorFunction;\nexport function withLatestFrom(array: ObservableInput[], project: (...values: Array) => R): OperatorFunction;\n\n/* tslint:enable:max-line-length */\n\n/**\n * Combines the source Observable with other Observables to create an Observable\n * whose values are calculated from the latest values of each, only when the\n * source emits.\n *\n * Whenever the source Observable emits a value, it\n * computes a formula using that value plus the latest values from other input\n * Observables, then emits the output of that formula.\n *\n * ![](withLatestFrom.png)\n *\n * `withLatestFrom` combines each value from the source Observable (the\n * instance) with the latest values from the other input Observables only when\n * the source emits a value, optionally using a `project` function to determine\n * the value to be emitted on the output Observable. All input Observables must\n * emit at least one value before the output Observable will emit a value.\n *\n * ## Example\n * On every click event, emit an array with the latest timer event plus the click event\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { withLatestFrom } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const timer = interval(1000);\n * const result = clicks.pipe(withLatestFrom(timer));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link combineLatest}\n *\n * @param {ObservableInput} other An input Observable to combine with the source\n * Observable. More than one input Observables may be given as argument.\n * @param {Function} [project] Projection function for combining values\n * together. Receives all values in order of the Observables passed, where the\n * first parameter is a value from the source Observable. (e.g.\n * `a.pipe(withLatestFrom(b, c), map(([a1, b1, c1]) => a1 + b1 + c1))`). If this is not\n * passed, arrays will be emitted on the output Observable.\n * @return {Observable} An Observable of projected values from the most recent\n * values from each input Observable, or an array of the most recent values from\n * each input Observable.\n * @method withLatestFrom\n * @owner Observable\n */\nexport function withLatestFrom(...args: Array | ((...values: Array) => R)>): OperatorFunction {\n return (source: Observable) => {\n let project: any;\n if (typeof args[args.length - 1] === 'function') {\n project = args.pop();\n }\n const observables = []>args;\n return source.lift(new WithLatestFromOperator(observables, project));\n };\n}\n\nclass WithLatestFromOperator implements Operator {\n constructor(private observables: Observable[],\n private project?: (...values: any[]) => Observable) {\n }\n\n call(subscriber: Subscriber, source: any): any {\n return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass WithLatestFromSubscriber extends OuterSubscriber {\n private values: any[];\n private toRespond: number[] = [];\n\n constructor(destination: Subscriber,\n private observables: Observable[],\n private project?: (...values: any[]) => Observable) {\n super(destination);\n const len = observables.length;\n this.values = new Array(len);\n\n for (let i = 0; i < len; i++) {\n this.toRespond.push(i);\n }\n\n for (let i = 0; i < len; i++) {\n let observable = observables[i];\n this.add(subscribeToResult(this, observable, undefined, i));\n }\n }\n\n notifyNext(_outerValue: T, innerValue: R,\n outerIndex: number): void {\n this.values[outerIndex] = innerValue;\n const toRespond = this.toRespond;\n if (toRespond.length > 0) {\n const found = toRespond.indexOf(outerIndex);\n if (found !== -1) {\n toRespond.splice(found, 1);\n }\n }\n }\n\n notifyComplete() {\n // noop\n }\n\n protected _next(value: T) {\n if (this.toRespond.length === 0) {\n const args = [value, ...this.values];\n if (this.project) {\n this._tryProject(args);\n } else {\n this.destination.next!(args);\n }\n }\n }\n\n private _tryProject(args: any[]) {\n let result: any;\n try {\n result = this.project!.apply(this, args);\n } catch (err) {\n this.destination.error!(err);\n return;\n }\n this.destination.next!(result);\n }\n}\n","import { zip as zipStatic } from '../observable/zip';\nimport { Observable } from '../Observable';\nimport { ObservableInput, OperatorFunction } from '../types';\n\n/* tslint:disable:max-line-length */\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(project: (v1: T) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(v2: ObservableInput, project: (v1: T, v2: T2) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(v2: ObservableInput, v3: ObservableInput, project: (v1: T, v2: T2, v3: T3) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => R): OperatorFunction ;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(v2: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(v2: ObservableInput, v3: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput): OperatorFunction ;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(...observables: Array | ((...values: Array) => R)>): OperatorFunction;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(array: Array>): OperatorFunction;\n/** @deprecated Deprecated in favor of static zip. */\nexport function zip(array: Array>, project: (v1: T, ...values: Array) => R): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * @deprecated Deprecated in favor of static {@link zip}.\n */\nexport function zip(...observables: Array | ((...values: Array) => R)>): OperatorFunction {\n return function zipOperatorFunction(source: Observable) {\n return source.lift.call(zipStatic(source, ...observables));\n };\n}","import { ZipOperator } from '../observable/zip';\nimport { Observable } from '../Observable';\nimport { OperatorFunction, ObservableInput } from '../types';\n\nexport function zipAll(): OperatorFunction, T[]>;\nexport function zipAll(): OperatorFunction;\nexport function zipAll(project: (...values: T[]) => R): OperatorFunction, R>;\nexport function zipAll(project: (...values: Array) => R): OperatorFunction;\n\nexport function zipAll(project?: (...values: Array) => R): OperatorFunction {\n return (source: Observable) => source.lift(new ZipOperator(project));\n}\n","\n/* Operator exports */\nexport { audit } from '../internal/operators/audit';\nexport { auditTime } from '../internal/operators/auditTime';\nexport { buffer } from '../internal/operators/buffer';\nexport { bufferCount } from '../internal/operators/bufferCount';\nexport { bufferTime } from '../internal/operators/bufferTime';\nexport { bufferToggle } from '../internal/operators/bufferToggle';\nexport { bufferWhen } from '../internal/operators/bufferWhen';\nexport { catchError } from '../internal/operators/catchError';\nexport { combineAll } from '../internal/operators/combineAll';\nexport { combineLatest } from '../internal/operators/combineLatest';\nexport { concat } from '../internal/operators/concat';\nexport { concatAll } from '../internal/operators/concatAll';\nexport { concatMap } from '../internal/operators/concatMap';\nexport { concatMapTo } from '../internal/operators/concatMapTo';\nexport { count } from '../internal/operators/count';\nexport { debounce } from '../internal/operators/debounce';\nexport { debounceTime } from '../internal/operators/debounceTime';\nexport { defaultIfEmpty } from '../internal/operators/defaultIfEmpty';\nexport { delay } from '../internal/operators/delay';\nexport { delayWhen } from '../internal/operators/delayWhen';\nexport { dematerialize } from '../internal/operators/dematerialize';\nexport { distinct } from '../internal/operators/distinct';\nexport { distinctUntilChanged } from '../internal/operators/distinctUntilChanged';\nexport { distinctUntilKeyChanged } from '../internal/operators/distinctUntilKeyChanged';\nexport { elementAt } from '../internal/operators/elementAt';\nexport { endWith } from '../internal/operators/endWith';\nexport { every } from '../internal/operators/every';\nexport { exhaust } from '../internal/operators/exhaust';\nexport { exhaustMap } from '../internal/operators/exhaustMap';\nexport { expand } from '../internal/operators/expand';\nexport { filter } from '../internal/operators/filter';\nexport { finalize } from '../internal/operators/finalize';\nexport { find } from '../internal/operators/find';\nexport { findIndex } from '../internal/operators/findIndex';\nexport { first } from '../internal/operators/first';\nexport { groupBy } from '../internal/operators/groupBy';\nexport { ignoreElements } from '../internal/operators/ignoreElements';\nexport { isEmpty } from '../internal/operators/isEmpty';\nexport { last } from '../internal/operators/last';\nexport { map } from '../internal/operators/map';\nexport { mapTo } from '../internal/operators/mapTo';\nexport { materialize } from '../internal/operators/materialize';\nexport { max } from '../internal/operators/max';\nexport { merge } from '../internal/operators/merge';\nexport { mergeAll } from '../internal/operators/mergeAll';\nexport { mergeMap, flatMap } from '../internal/operators/mergeMap';\nexport { mergeMapTo } from '../internal/operators/mergeMapTo';\nexport { mergeScan } from '../internal/operators/mergeScan';\nexport { min } from '../internal/operators/min';\nexport { multicast } from '../internal/operators/multicast';\nexport { observeOn } from '../internal/operators/observeOn';\nexport { onErrorResumeNext } from '../internal/operators/onErrorResumeNext';\nexport { pairwise } from '../internal/operators/pairwise';\nexport { partition } from '../internal/operators/partition';\nexport { pluck } from '../internal/operators/pluck';\nexport { publish } from '../internal/operators/publish';\nexport { publishBehavior } from '../internal/operators/publishBehavior';\nexport { publishLast } from '../internal/operators/publishLast';\nexport { publishReplay } from '../internal/operators/publishReplay';\nexport { race } from '../internal/operators/race';\nexport { reduce } from '../internal/operators/reduce';\nexport { repeat } from '../internal/operators/repeat';\nexport { repeatWhen } from '../internal/operators/repeatWhen';\nexport { retry } from '../internal/operators/retry';\nexport { retryWhen } from '../internal/operators/retryWhen';\nexport { refCount } from '../internal/operators/refCount';\nexport { sample } from '../internal/operators/sample';\nexport { sampleTime } from '../internal/operators/sampleTime';\nexport { scan } from '../internal/operators/scan';\nexport { sequenceEqual } from '../internal/operators/sequenceEqual';\nexport { share } from '../internal/operators/share';\nexport { shareReplay } from '../internal/operators/shareReplay';\nexport { single } from '../internal/operators/single';\nexport { skip } from '../internal/operators/skip';\nexport { skipLast } from '../internal/operators/skipLast';\nexport { skipUntil } from '../internal/operators/skipUntil';\nexport { skipWhile } from '../internal/operators/skipWhile';\nexport { startWith } from '../internal/operators/startWith';\nexport { subscribeOn } from '../internal/operators/subscribeOn';\nexport { switchAll } from '../internal/operators/switchAll';\nexport { switchMap } from '../internal/operators/switchMap';\nexport { switchMapTo } from '../internal/operators/switchMapTo';\nexport { take } from '../internal/operators/take';\nexport { takeLast } from '../internal/operators/takeLast';\nexport { takeUntil } from '../internal/operators/takeUntil';\nexport { takeWhile } from '../internal/operators/takeWhile';\nexport { tap } from '../internal/operators/tap';\nexport { throttle } from '../internal/operators/throttle';\nexport { throttleTime } from '../internal/operators/throttleTime';\nexport { throwIfEmpty } from '../internal/operators/throwIfEmpty';\nexport { timeInterval } from '../internal/operators/timeInterval';\nexport { timeout } from '../internal/operators/timeout';\nexport { timeoutWith } from '../internal/operators/timeoutWith';\nexport { timestamp } from '../internal/operators/timestamp';\nexport { toArray } from '../internal/operators/toArray';\nexport { window } from '../internal/operators/window';\nexport { windowCount } from '../internal/operators/windowCount';\nexport { windowTime } from '../internal/operators/windowTime';\nexport { windowToggle } from '../internal/operators/windowToggle';\nexport { windowWhen } from '../internal/operators/windowWhen';\nexport { withLatestFrom } from '../internal/operators/withLatestFrom';\nexport { zip } from '../internal/operators/zip';\nexport { zipAll } from '../internal/operators/zipAll';\n","module.exports = (__webpack_require__(3))(20);","module.exports = (__webpack_require__(3))(44);","module.exports = (__webpack_require__(3))(402);","module.exports = (__webpack_require__(3))(451);","import { OAuth2Provider } from \"./utils/oauth\";\n\n\nexport type DeploymentType = \"Development\" | \"Staging\" | \"Production\";\n\n\nexport interface ServerOptions {\n currencyCode: string;\n freeMode: boolean;\n deploymentType: DeploymentType;\n oAuthConfigs: {\n [P in OAuth2Provider]?: {\n authorizeUri: string;\n clientId: string;\n provider: OAuth2Provider;\n redirectUri: string;\n };\n };\n publishedDataHost: string;\n stripePublicApiKey: string;\n uri: string;\n}\n\n\nconst defaultOptions: ServerOptions = {\n currencyCode: \"cad\",\n deploymentType: \"Staging\",\n freeMode: false,\n oAuthConfigs: {\n [OAuth2Provider.TrimbleConnect]: {\n authorizeUri: \"https://identity-stg.trimble.com/i/oauth2/authorize\",\n clientId: \"ZthTWnWfrkRR6kfn6rT9hhk0_qMa\",\n provider: OAuth2Provider.TrimbleConnect,\n redirectUri: \"http://localhost:3000/loginredirect\"\n }\n },\n publishedDataHost: \"static.construction.ai\",\n stripePublicApiKey: \"pk_test_TYooMQauvdEDq54NiTphI7jx\",\n uri: \"https://app.construction.ai/\"\n};\n\n\nlet serverOptions = defaultOptions;\n\n\nexport function setServerOptions(newServerOptions: ServerOptions): void {\n serverOptions = newServerOptions;\n}\n\n\nexport function getServerOptions(): ServerOptions {\n return serverOptions;\n}\n","import { parse, stringify } from \"qs\";\nimport * as Rx from \"rxjs\";\nimport { map } from \"rxjs/operators\";\n\n\n/**\n * The set of all possible OAuth2 providers.\n */\nexport enum OAuth2Provider {\n TrimbleConnect = \"TrimbleConnect\",\n Google = \"Google\",\n Procore = \"Procore\"\n}\n\n\nexport interface OAuth2LoginResultBase {\n success: boolean;\n}\n\nexport interface OAuth2LoginResultSuccess {\n success: true;\n authorizationCode: string;\n}\n\nexport interface OAuth2LoginResultFailure {\n success: false;\n error: string;\n errorMessage?: string;\n}\n\nexport type OAuth2LoginResult = OAuth2LoginResultFailure | OAuth2LoginResultSuccess;\n\nexport type OAuth2LoginResultWithProvider = OAuth2LoginResult & {\n provider: OAuth2Provider;\n};\n\n\nfunction isOAuth2LoginResult(obj: any): obj is OAuth2LoginResult {\n return obj && typeof obj.success === \"boolean\"\n && (typeof obj.authorizationCode === \"string\" || typeof obj.error === \"string\");\n}\n\n\n/** Construct and return an OAuth2 authorization URI. */\nexport function createAuthorizationUri(authorizeUri: string, clientId: string, redirectUri: string, provider: OAuth2Provider): string {\n const state = \"bacon\";\n const scope = provider === OAuth2Provider.TrimbleConnect ? [ \"openid\", \"Construction_AI\" ]\n : provider === OAuth2Provider.Google ? [\"email\", \"profile\"]\n : undefined;\n const tenantDomain = provider === OAuth2Provider.TrimbleConnect\n ? \"trimble.com\"\n : undefined;\n const prompt = provider === OAuth2Provider.Google\n ? \"consent\"\n : undefined;\n const queryParams = {\n client_id: clientId,\n redirect_uri: redirectUri,\n response_type: \"code\",\n state: state,\n scope: scope ? scope.join(\" \") : undefined,\n access_type: \"offline\",\n prompt,\n tenantDomain\n };\n\n const serializedParams = stringify(queryParams);\n\n return `${authorizeUri}${authorizeUri.indexOf(\"?\") < 0 ? \"?\" : \"&\"}${serializedParams}`;\n}\n\n\ninterface LoginWithAUth2Options {\n authorizeUri: string;\n clientId: string;\n provider: OAuth2Provider;\n redirectUri: string;\n}\n\n\n/**\n * Attempt to log in using OAuth2 by opening a popup window with the authorization URL.\n *\n * The redirect URL should forward the result to the main window by calling\n * \"sendResultMessage\".\n */\nexport function loginWithOAuth2(options: LoginWithAUth2Options): Rx.Observable {\n return new Rx.Observable(subscriber => {\n let cleanup = () => { return; };\n\n function receivePopupMessage(event: MessageEvent): void {\n if (event.origin === window.location.origin) {\n cleanup();\n if (isOAuth2LoginResult(event.data)) {\n subscriber.next(event.data);\n } else {\n subscriber.next({\n success: false,\n error: \"Got invalid message.\"\n });\n }\n subscriber.complete();\n }\n }\n\n const authorizationUri = createAuthorizationUri(options.authorizeUri, options.clientId, options.redirectUri, options.provider);\n const popup = window.open(authorizationUri, \"_blank\", \"width=600,height=600\");\n window.addEventListener(\"message\", receivePopupMessage, false);\n const pollTimer = window.setInterval(() => {\n if (!popup || popup.closed !== false) {\n cleanup();\n subscriber.next({\n success: false,\n error: \"Closed popup\",\n errorMessage: \"Login dialog was closed.\"\n });\n subscriber.complete();\n }\n }, 200);\n\n cleanup = () => {\n window.removeEventListener(\"message\", receivePopupMessage, false);\n window.clearInterval(pollTimer);\n if (popup && !popup.closed) {\n popup.close();\n }\n };\n\n return () => {\n cleanup();\n };\n }).pipe(map(result => ({\n ...result,\n provider: options.provider\n })));\n}\n\n\n/**\n * Attempts to send the result of an OAuth2 login to the parent window.\n */\nexport function sendResultMessage(location: Location): void {\n // TODO possibility: oauthErrorCode, oauthErrorMsg\n\n const params = parse(location.search, { ignoreQueryPrefix: true });\n const result: OAuth2LoginResult = params.error\n ? {\n success: false,\n error: params.error,\n errorMessage: params.error_description\n }\n : params.code\n ? {\n success: true,\n authorizationCode: params.code\n }\n : {\n success: false,\n error: `Could not find code or error in URL ${location}`,\n params\n } as any;\n\n if (window.opener) {\n window.opener.postMessage(result, window.location.origin);\n }\n}\n","import * as React from \"react\";\n\nimport { ThreeDots } from \"./ThreeDots\";\n\n\nexport interface PleaseWaitProps {\n children: string | (string | undefined)[];\n}\n\n\nexport function PleaseWait(props: PleaseWaitProps): JSX.Element {\n return

{props.children}   

;\n}\n","module.exports = (__webpack_require__(3))(140);","import { AbortController } from \"abort-controller\";\nimport { addTask, fetch } from \"domain-task\";\nimport { Observable } from \"rxjs\";\n\nimport { windowIfDefined } from \"./window\";\n\n\ndeclare global {\n interface Window {\n AbortController?: any;\n }\n}\n\n\nfunction getAbortController(): AbortController {\n if (windowIfDefined && windowIfDefined.AbortController) {\n return new windowIfDefined.AbortController();\n } else {\n return new AbortController();\n }\n}\n\n\nexport function createFetchStream(url: string | Request, init?: RequestInit): Observable {\n return new Observable(subscriber => {\n const controller = getAbortController();\n const fetchTask = fetch(\n url, {\n ...init,\n signal: controller.signal\n })\n .then(response => {\n if (response.ok) {\n return (response.json() as Promise)\n .then(planData => {\n subscriber.next(planData);\n subscriber.complete();\n });\n }\n\n return (response.text() as Promise)\n .then(errorString => {\n throw new Error(errorString);\n });\n })\n .catch(error => subscriber.error(error));\n\n addTask(fetchTask);\n\n return () => {\n controller.abort();\n };\n });\n}\n\n","declare var global: Window | undefined;\n\n\nexport const windowIfDefined = global as Window || null;\n","module.exports = (__webpack_require__(3))(358);","module.exports = (__webpack_require__(3))(3);","module.exports = (__webpack_require__(3))(281);","module.exports = (__webpack_require__(3))(274);","module.exports = (__webpack_require__(3))(296);","import { createMatchSelector, LocationChangeAction, LOCATION_CHANGE, RouterRootState } from \"connected-react-router\";\nimport { Action, Reducer } from \"redux\";\nimport { combineEpics, StateObservable } from \"redux-observable\";\nimport * as Rx from \"rxjs\";\nimport { catchError, flatMap, map, switchMap } from \"rxjs/operators\";\n\nimport { viewPlanPath } from \"../routes\";\nimport { createFetchStream } from \"../utils/fetch\";\nimport { actionCreator, ofType, ActionsUnion, ActionTypes } from \"../utils/state\";\n\nimport { stringify } from \"qs\";\nimport { TrimbleProject } from \"../components/TrimbleProjectList\";\nimport { ApplicationState } from \"./index\";\n\n\n// -----------------\n// State\n\nexport interface PlansState {\n errorText?: string;\n isLoading: boolean;\n isPaying: boolean;\n currentPlanGuid?: string;\n plans: {\n [guid: string]: PlanData\n };\n}\n\nexport interface PlanData {\n available: boolean;\n costDisplay: string;\n costInCents: number;\n crossSectionData: CrossSectionPlanData;\n featurePages: FeaturePageData[];\n free: boolean;\n guid: string;\n layeredPages: LayeredPageData[];\n nameWithoutExtension: string;\n nothing: boolean;\n paid: boolean;\n spotPages: SpotPageData[];\n tableData: TablePlanData;\n}\n\nexport interface FeaturePageData {\n featureCount: number;\n featuresIdentified: FeatureInformation[];\n pageNumber: number;\n pdfOutputFile: string;\n}\n\nexport interface LayeredPageData {\n dxfOutputFile: string;\n pageNumber: number;\n pdfOutputFile: string;\n}\n\nexport interface SpotPageData {\n dxfOutputFile: string;\n layerCount: number;\n pageNumber: number;\n pdfOutputFile: string;\n spotsConfident: number;\n spotsFound: number;\n spotsUncertain: number;\n spotsUnmatched: number;\n timeSaved: string;\n timeSavedInSeconds: number;\n vectorCount: number;\n}\n\nexport interface TablePlanData {\n excelOutputFile: string;\n pdfOutputFile: string;\n tableCount: number;\n}\n\nexport interface CrossSectionPlanData {\n dxfOutputFile: string;\n crossSectionCount: number;\n}\n\nexport interface FeatureInformation {\n name: string;\n count: number;\n}\n\nexport const initialState: PlansState = {\n plans: {},\n isLoading: false,\n isPaying: false\n};\n\n\n// -----------------\n// Actions\n\nexport enum PlanActionType {\n CLEAR_ERROR = \"@@plans/CLEAR_ERROR\",\n LOAD_PLAN = \"@@plans/LOAD_PLAN\",\n PAY_FOR_PLAN = \"@@plans/PAY_FOR_PLAN\",\n PAYMENT_ERROR = \"@@plans/PAYMENT_ERROR\",\n RECEIVE_PLAN_DATA = \"@@plans/RECEIVE_PLAN_DATA\",\n SET_CURRENT_PLAN = \"@@plans/SET_CURRENT_PLAN\",\n USE_CACHED_PLAN_DATA = \"@@plans/USE_CACHED_PLAN_DATA\"\n}\n\nexport namespace PlanActions {\n export interface LoadPlan {\n guid: string;\n }\n export interface PayForPlan {\n email: string;\n guid: string;\n selectedProject?: TrimbleProject;\n stripeToken: string;\n }\n export interface PaymentError {\n error: string;\n }\n export interface ReceivePlan {\n planData: PlanData;\n }\n export interface SetCurrentPlan {\n guid: string;\n }\n\n export const clearError = actionCreator(PlanActionType.CLEAR_ERROR).empty();\n export const loadPlan = actionCreator(PlanActionType.LOAD_PLAN).withPayload();\n export const payForPlan = actionCreator(PlanActionType.PAY_FOR_PLAN).withPayload();\n export const paymentError = actionCreator(PlanActionType.PAYMENT_ERROR).withPayload();\n export const receivePlan = actionCreator(PlanActionType.RECEIVE_PLAN_DATA).withPayload();\n export const setCurrentPlan = actionCreator(PlanActionType.SET_CURRENT_PLAN).withPayload();\n export const useCachedPlan = actionCreator(PlanActionType.USE_CACHED_PLAN_DATA).empty();\n}\n\nexport type AnyPlanAction = ActionsUnion;\nexport type PlanActions = ActionTypes;\n\n\n// -----------------\n// Epic\n\ntype PlanEpic = (action$: Rx.Observable, store: StateObservable) => Rx.Observable;\n\nconst loadPlanEpic: PlanEpic = action$ => action$.pipe(\n ofType(PlanActionType.LOAD_PLAN),\n switchMap(action => createFetchStream(`api/plans/get/${action.payload.guid}`)\n .pipe(\n map(planData => PlanActions.receivePlan({ planData }))\n )));\n\nconst paymentEpic: PlanEpic = action$ => action$.pipe(\n ofType(PlanActionType.PAY_FOR_PLAN),\n flatMap(action => createFetchStream(`/api/plans/pay/${action.payload.guid}`, {\n method: \"POST\",\n headers: {\"Content-Type\": \"application/x-www-form-urlencoded\"},\n body: stringify({\n stripeToken: action.payload.stripeToken,\n stripeEmail: action.payload.email,\n selectedFolderId: action.payload.selectedProject && action.payload.selectedProject.rootFolderId\n })\n })\n .pipe(\n map(planData => {\n return PlanActions.receivePlan({ planData });\n }),\n catchError(error => {\n return Rx.of(PlanActions.paymentError({ error: error.message }));\n })\n )));\n\nconst viewPlanMatcher = createMatchSelector(viewPlanPath);\nconst selectGuidEpic: PlanEpic = action$ => action$.pipe(\n ofType(LOCATION_CHANGE),\n flatMap(action => {\n const viewPlanMatch = viewPlanMatcher({ router: action.payload });\n\n return viewPlanMatch\n ? Rx.of(PlanActions.setCurrentPlan({ guid: viewPlanMatch.params.guid }))\n : Rx.empty();\n }));\n\nconst switchPlanEpic: PlanEpic = (action$, store) => action$.pipe(\n ofType(PlanActionType.SET_CURRENT_PLAN),\n switchMap(action => store.value.plans.plans[action.payload.guid]\n ? Rx.empty()\n : Rx.of(PlanActions.loadPlan(action.payload))));\n\nexport const planEpic = combineEpics(loadPlanEpic, paymentEpic, selectGuidEpic, switchPlanEpic);\n\n\n// ----------------\n// Reducer\n\n\nexport const reducer: Reducer = (state: PlansState = initialState, incomingAction: Action) => {\n const action = incomingAction as AnyPlanAction | LocationChangeAction;\n switch (action.type) {\n case PlanActionType.CLEAR_ERROR:\n return {\n ...state,\n errorText: undefined,\n isPaying: false\n };\n case PlanActionType.PAY_FOR_PLAN:\n return {\n ...state,\n isPaying: true\n };\n case PlanActionType.PAYMENT_ERROR:\n return {\n ...state,\n errorText: action.payload.error\n };\n case PlanActionType.RECEIVE_PLAN_DATA:\n return {\n ...state,\n plans: {\n ...state.plans,\n [action.payload.planData.guid]: action.payload.planData\n },\n isLoading: false,\n isPaying: false\n };\n case PlanActionType.SET_CURRENT_PLAN:\n return state.currentPlanGuid === action.payload.guid\n ? state\n : {\n ...state,\n currentPlanGuid: action.payload.guid,\n isLoading: !state.plans[action.payload.guid],\n isPaying: false\n };\n }\n\n return state;\n};\n","module.exports = (__webpack_require__(3))(444);","import { Action, ActionCreatorsMapObject } from \"redux\";\nimport { ofType as originalOfType } from \"redux-observable\";\nimport { Observable } from \"rxjs\";\n\n\n/**\n * Action with a discriminated type and a payload.\n */\nexport interface PayloadAction extends Action {\n payload: P;\n}\n\n/**\n * Action with a discriminated type, payload, and metadata.\n */\nexport interface PayloadMetaAction extends PayloadAction {\n meta: M;\n}\n\n/**\n * Generates a type union from an object containing action creators.\n */\nexport type ActionsUnion = ReturnType;\n\n/**\n * Generates a type mapping of individual action names to their concrete types.\n */\nexport type ActionTypes = { [K in keyof A]: ReturnType };\n\nexport interface EmptyActionCreator> {\n /**\n * Creates an empty action.\n */\n (): R;\n}\n\nexport interface PayloadActionCreator> {\n /**\n * Creates an action with the given payload.\n *\n * @param payload\n * Data to deliver with the action.\n */\n (payload: P): R;\n}\n\nexport interface PayloadMetaActionCreator> {\n /**\n * Creates an action with the given payload and metadata.\n *\n * @param payload\n * Data to deliver with the action.\n * @param meta\n * Metadata needed for processing the action.\n */\n (payload: P, meta: M): R;\n}\n\n/**\n * For a given action type, allows generating various action creator functions.\n */\nexport interface ActionCreatorFactory {\n /**\n * Action creator with just a discriminated type and no payload.\n */\n empty(): EmptyActionCreator;\n\n /**\n * Action creator with a discriminated type and payload.\n */\n withPayload

(): PayloadActionCreator;\n\n /**\n * Action creator with a discriminated type, payload, and metadata.\n */\n withPayloadAndMeta(): PayloadMetaActionCreator;\n}\n\n/**\n * Returns an action creator factory for the given discriminated type.\n */\nexport function actionCreator(type: T): ActionCreatorFactory {\n if (typeof type !== \"string\") {\n throw new Error(`actionCreator: expected \"type\" to be a string, instead got \"${typeof type}\".`);\n }\n\n function empty(): () => Action {\n return () => ({ type });\n }\n\n function withPayload

(): (payload: P) => PayloadAction {\n return payload => ({ type, payload });\n }\n\n function withPayloadAndMeta(): (payload: P, meta: M) => PayloadMetaAction {\n return (payload, meta) => ({ type, payload, meta });\n }\n\n return {\n empty,\n withPayload,\n withPayloadAndMeta\n };\n}\n\n/**\n * Helper type to automatically narrow the actions in the returned observable from `ofType`.\n */\nexport type FilteredOfType = (\n ...key: K[]\n) => (source: Observable) => Observable>;\n\n/**\n * Re-exported `ofType` from \"redux-observable\", but with type narrowing based on the provided type keys.\n */\nexport const ofType: FilteredOfType = originalOfType;\n","import * as React from \"react\";\nimport { ConnectedLoginButton } from \"./LoginButton\";\n\nimport { buildVersion } from \"../version\";\n\n\ninterface LayoutProps {\n skipUser?: boolean;\n children: React.ReactNode[];\n}\n\n\nexport function Layout(props: LayoutProps): JSX.Element {\n return

\n
\n \"Construction\n
\n
\n {props.skipUser\n ? props.children\n : [\n ,\n ...props.children\n ] }\n
\n \n
;\n}\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\nmodule.exports = {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return String(value);\n }\n },\n RFC1738: Format.RFC1738,\n RFC3986: Format.RFC3986\n};\n","import { Action, Reducer } from \"redux\";\nimport { combineEpics, StateObservable } from \"redux-observable\";\nimport * as Rx from \"rxjs\";\nimport { catchError, flatMap, ignoreElements, map, switchMap, take, tap } from \"rxjs/operators\";\n\nimport { createFetchStream } from \"../utils/fetch\";\nimport { loginWithOAuth2, OAuth2Provider } from \"../utils/oauth\";\nimport { actionCreator, ofType, ActionsUnion, ActionTypes } from \"../utils/state\";\nimport { loadUserState, removeUserState, saveUserState } from \"../utils/userState\";\n\nimport { getServerOptions } from \"../serverOptions\";\nimport { ApplicationState } from \"./index\";\n\n\n// -----------------\n// State\n\nexport interface UserProfile {\n clientToken: string;\n email: string;\n provider: OAuth2Provider;\n username: string;\n}\n\nexport interface UserState {\n profile: UserProfile | null;\n isLoggingIn: boolean;\n loginEnabled: boolean;\n loginError?: string;\n}\n\nexport const initialState: UserState = {\n profile: null,\n isLoggingIn: false,\n loginEnabled: false\n};\n\n\n// -----------------\n// Actions\n\nexport interface LoginResultBase {\n success: boolean;\n}\n\nexport interface LoginResultSuccess {\n success: true;\n clientToken: string;\n email: string;\n provider: OAuth2Provider;\n username: string;\n}\n\nexport interface LoginResultFailure {\n success: false;\n error: string;\n}\n\nexport type LoginResult = LoginResultFailure | LoginResultSuccess;\n\nexport enum UserActionType {\n ENABLE_LOGINS = \"@@user/ENABLE_LOGINS\",\n LOAD_USER_STATE = \"@@user/LOAD_USER_STATE\",\n LOGIN_RESULT = \"@@user/LOGIN_RESULT\",\n LOGIN_START = \"@@user/LOGIN_START\",\n LOGOUT = \"@@user/LOGOUT\",\n LOGOUT_ACTUAL = \"@@user/LOGOUT_ACTUAL\"\n}\n\nexport namespace UserActions {\n export const enableLogins = actionCreator(UserActionType.ENABLE_LOGINS).empty();\n export const loadUser = actionCreator(UserActionType.LOAD_USER_STATE).empty();\n export const loginResult = actionCreator(UserActionType.LOGIN_RESULT).withPayload();\n export const loginStart = actionCreator(UserActionType.LOGIN_START).withPayload();\n export const logout = actionCreator(UserActionType.LOGOUT).empty();\n export const logoutActual = actionCreator(UserActionType.LOGOUT_ACTUAL).empty();\n}\n\nexport type AnyUserAction = ActionsUnion;\nexport type UserActions = ActionTypes;\n\n\n// -----------------\n// Epic\n\ntype UserEpic = (action$: Rx.Observable, store: StateObservable) => Rx.Observable;\n\nexport const loadUserStateEpic: UserEpic = action$ => action$.pipe(\n ofType(UserActionType.LOAD_USER_STATE),\n switchMap(() => {\n const savedState = loadUserState();\n\n if (!savedState) {\n return Rx.empty();\n }\n\n return createFetchStream(`api/auth/verify/${savedState.clientToken}`, { method: \"POST\" })\n .pipe(\n map(result => result && result.success\n ? UserActions.loginResult(result)\n : UserActions.logoutActual()),\n catchError(() => Rx.empty()));\n }));\n\nexport const loginEpic: UserEpic = action$ => action$.pipe(\n ofType(UserActionType.LOGIN_START),\n switchMap(action => {\n const serverOptions = getServerOptions();\n const selectedLoginOptions = serverOptions.oAuthConfigs[action.payload];\n if (!selectedLoginOptions) {\n return Rx.of(UserActions.loginResult({ success: false, error: \"Attempting to login with invalid provider\" }));\n }\n return loginWithOAuth2(selectedLoginOptions)\n .pipe(\n take(1),\n flatMap(result => {\n return result.success\n ? createFetchStream(`api/auth/login/${result.provider}/${result.authorizationCode}`, { method: \"POST\" })\n .pipe(\n take(1)\n )\n : Rx.of({\n success: false,\n error: result.errorMessage || result.error\n });\n }),\n tap(result => {\n if (result.success) {\n saveUserState({\n username: result.username,\n email: result.email,\n clientToken: result.clientToken\n });\n }\n }),\n map(result => UserActions.loginResult(result)),\n catchError(err => {\n console.log(\"Got unknown error:\", err);\n return Rx.of(UserActions.loginResult({ success: false, error: \"Unknown error occurred\" }));\n })\n );\n }));\n\nexport const logoutEpic: UserEpic = action$ => action$.pipe(\n ofType(UserActionType.LOGOUT),\n switchMap(() => Rx.concat(\n createFetchStream(`api/auth/logout`, { method: \"POST\" })\n .pipe(\n ignoreElements(),\n catchError(() => Rx.empty())),\n Rx.of(UserActions.logoutActual()))));\n\nexport const userEpic = combineEpics(loadUserStateEpic, logoutEpic, loginEpic);\n\n\n// ----------------\n// Reducer\n\nexport const reducer: Reducer = (state: UserState = initialState, incomingAction: Action) => {\n const action = incomingAction as AnyUserAction;\n switch (action.type) {\n case UserActionType.ENABLE_LOGINS:\n return state.loginEnabled\n ? state\n : {\n ...state,\n loginEnabled: true\n };\n case UserActionType.LOGIN_RESULT:\n return {\n profile: action.payload.success ? {\n clientToken: action.payload.clientToken,\n email: action.payload.email,\n provider: action.payload.provider,\n username: action.payload.username\n } : null,\n isLoggingIn: false,\n loginEnabled: state.loginEnabled,\n loginError: action.payload.success ? undefined : action.payload.error\n };\n case UserActionType.LOGIN_START:\n return {\n profile: state.profile,\n isLoggingIn: true,\n loginEnabled: state.loginEnabled\n };\n case UserActionType.LOGOUT_ACTUAL:\n removeUserState();\n return {\n profile: null,\n isLoggingIn: false,\n loginEnabled: state.loginEnabled\n };\n }\n\n return state;\n};\n","module.exports = (__webpack_require__(3))(126);","module.exports = (__webpack_require__(3))(66);","module.exports = (__webpack_require__(3))(19);","module.exports = (__webpack_require__(3))(162);","module.exports = (__webpack_require__(3))(362);","module.exports = (__webpack_require__(3))(272);","module.exports = (__webpack_require__(3))(147);","module.exports = (__webpack_require__(3))(92);","module.exports = (__webpack_require__(3))(453);","import * as React from \"react\";\nimport { Route, Switch } from \"react-router-dom\";\n\nimport { ConnectedHome } from \"./components/Home\";\nimport { NotFound } from \"./components/NotFound\";\nimport { OAuth2Redirect } from \"./components/OAuth2Redirect\";\nimport { ConnectedViewPlan } from \"./components/ViewPlan\";\n\n\nexport const viewPlanPath = \"/view/:guid\";\n\nexport const routes = \n \n \n \n \n ;\n","module.exports = (__webpack_require__(3))(450);","import { push } from \"connected-react-router\";\nimport { Action, Reducer } from \"redux\";\nimport { StateObservable } from \"redux-observable\";\nimport * as Rx from \"rxjs\";\nimport { catchError, filter, flatMap, switchMap, take, takeUntil } from \"rxjs/operators\";\n\nimport { actionCreator, ofType, ActionsUnion, ActionTypes } from \"../utils/state\";\n\nimport { createFetchStream } from \"../utils/fetch\";\nimport { createQueueStream } from \"../utils/messageQueue\";\nimport { AnyAction, ApplicationState } from \"./index\";\nimport { PlanActions, PlanData } from \"./plans\";\n\n\n// -----------------\n// State\n\nexport interface UploadState {\n errorText?: string;\n uploadMessage?: string;\n isUploading: boolean;\n}\n\nexport const initialState: UploadState = { isUploading: false };\n\n\n// -----------------\n// Actions\n\nexport enum UploadActionType {\n CANCEL = \"@@upload/CANCEL\",\n CLEAR_ERROR = \"@@upload/CLEAR_ERROR\",\n UPLOAD_ERROR = \"@@upload/UPLOAD_ERROR\",\n UPLOAD_FINISHED = \"@@upload/UPLOAD_FINISHED\",\n UPLOAD_PLAN = \"@@upload/UPLOAD_PLAN\",\n UPLOAD_STATUS = \"@@upload/UPLOAD_STATUS\"\n}\n\nexport namespace UploadActions {\n export interface UploadError {\n error: string;\n }\n export interface UploadStatus {\n status: string;\n }\n export interface UploadFinished {\n planData: PlanData;\n }\n export interface UploadPlan {\n file: File;\n filename: string;\n }\n\n export const cancelUpload = actionCreator(UploadActionType.CANCEL).empty();\n export const clearError = actionCreator(UploadActionType.CLEAR_ERROR).empty();\n export const uploadError = actionCreator(UploadActionType.UPLOAD_ERROR).withPayload();\n export const uploadFinished = actionCreator(UploadActionType.UPLOAD_FINISHED).withPayload();\n export const uploadPlan = actionCreator(UploadActionType.UPLOAD_PLAN).withPayload();\n export const uploadStatus = actionCreator(UploadActionType.UPLOAD_STATUS).withPayload();\n}\n\nexport type AnyUploadAction = ActionsUnion;\nexport type UploadActions = ActionTypes;\n\n\n// -----------------\n// Epic\n\ntype UploadEpic = (action$: Rx.Observable, store: StateObservable) => Rx.Observable;\n\ninterface UploadResult {\n guid: string;\n messageQueue: string;\n}\n\ninterface UploadMessageComplete {\n complete: true;\n message: string;\n planData: PlanData;\n}\n\ninterface UploadMessageStatus {\n complete: false;\n error?: boolean;\n message: string;\n planData: PlanData;\n}\n\ntype UploadMessage = UploadMessageComplete | UploadMessageStatus;\n\nexport const uploadEpic: UploadEpic = action$ => action$.pipe(\n ofType(UploadActionType.UPLOAD_PLAN),\n switchMap(action => {\n const data = new FormData();\n data.append(\"file\", action.payload.file, action.payload.filename);\n\n return createFetchStream(\"/api/plans/uploadPlan\",\n {\n method: \"POST\",\n body: data\n })\n .pipe(\n take(1),\n switchMap(uploadResult =>\n createQueueStream(uploadResult.messageQueue)),\n takeUntil(action$.pipe(filter(a => a.type === UploadActionType.CANCEL || a.type === UploadActionType.UPLOAD_ERROR || a.type === UploadActionType.UPLOAD_FINISHED))),\n flatMap(message => message.complete\n ? [\n UploadActions.uploadFinished({ planData: message.planData }),\n PlanActions.receivePlan({ planData: message.planData }),\n push(`/view/${message.planData.guid}`)\n ]\n : message.error\n ? [ UploadActions.uploadError({ error: message.message }) ]\n : [ UploadActions.uploadStatus({ status: message.message }) ]),\n catchError(error =>\n Rx.of(UploadActions.uploadError({ error: error.message })))\n );\n }));\n\n\n// ----------------\n// Reducer\n\nexport const reducer: Reducer = (state: UploadState = initialState, incomingAction: Action) => {\n const action = incomingAction as AnyUploadAction;\n switch (action.type) {\n case UploadActionType.CANCEL:\n case UploadActionType.CLEAR_ERROR:\n case UploadActionType.UPLOAD_FINISHED:\n return {\n isUploading: false\n };\n case UploadActionType.UPLOAD_ERROR:\n return {\n errorText: action.payload.error,\n isUploading: false\n };\n case UploadActionType.UPLOAD_STATUS:\n return {\n uploadMessage: action.payload.status,\n isUploading: true\n };\n case UploadActionType.UPLOAD_PLAN:\n return {\n uploadMessage: `Uploading ${action.payload.filename}`,\n isUploading: true\n };\n }\n\n // TODO handle the fact that this breaks the switch above...\n return state;\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","'use strict';\n\nvar formats = require('./formats');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str, decoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\n\nvar encode = function encode(str, defaultEncoder, charset, kind, format) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n var out = '';\n for (var i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n out += string.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n out = out + hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n out += hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compactQueue(queue);\n\n return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};\n","export const buildVersion = \"v33\";\n","import * as React from \"react\";\nimport Helmet from \"react-helmet\";\n\nimport { Layout } from \"./Layout\";\n\n\nexport function NotFound(): JSX.Element {\n return \n \n 404 File Not Found\n \n

404 - File not found

\n

The file you selected could not be found; please try again.

\n
;\n}\n","module.exports = (__webpack_require__(3))(397);","module.exports = (__webpack_require__(3))(294);","module.exports = (__webpack_require__(3))(61);","module.exports = (__webpack_require__(3))(163);","module.exports = (__webpack_require__(3))(271);","module.exports = (__webpack_require__(3))(363);","module.exports = (__webpack_require__(3))(273);","module.exports = (__webpack_require__(3))(54);","module.exports = (__webpack_require__(3))(292);","module.exports = (__webpack_require__(3))(45);","module.exports = (__webpack_require__(3))(133);","module.exports = (__webpack_require__(3))(278);","module.exports = (__webpack_require__(3))(127);","import { ConnectedRouter } from \"connected-react-router\";\nimport { createBrowserHistory } from \"history\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { AppContainer } from \"react-hot-loader\";\nimport { Provider } from \"react-redux\";\nimport { ajax } from \"rxjs/ajax\";\n\nimport { configureStore } from \"./configureStore\";\nimport * as RoutesModule from \"./routes\";\nimport { getServerOptions, setServerOptions } from \"./serverOptions\";\nimport { ApplicationState } from \"./store\";\nimport { UserActions } from \"./store/user\";\nimport { buildVersion } from \"./version\";\n\n\nlet routes = RoutesModule.routes;\n\n// Create browser history to use in the Redux store\nconst baseUrl = document.getElementsByTagName(\"base\")[0].getAttribute(\"href\")!;\nconst history = createBrowserHistory({ basename: baseUrl });\n\n// Get the application-wide store instance, prepopulating with state from the server where available.\nsetServerOptions((window as any).serverOptions);\nconst initialState = (window as any).initialReduxState as ApplicationState;\nconst store = configureStore(history, initialState);\n\nfunction renderApp(): void {\n // This code starts up the React app when it runs in a browser. It sets up the routing configuration\n // and injects the app into a DOM element.\n ReactDOM.hydrate(\n \n \n \n \n ,\n document.getElementById(\"react-app\")\n );\n\n if (getServerOptions().oAuthConfigs.Google || getServerOptions().oAuthConfigs.TrimbleConnect) {\n store.dispatch(UserActions.enableLogins());\n store.dispatch(UserActions.loadUser());\n }\n\n ajax({\n url: \"api/version\",\n responseType: \"text\"\n }).subscribe(\n response => {\n if (buildVersion !== response.response) {\n location.reload(true);\n }\n }\n );\n}\n\nrenderApp();\n\n// Allow Hot Module Replacement\nif (module.hot) {\n module.hot.accept(\"./routes\", () => {\n // Justification: this is needed for hot reloading\n // tslint:disable-next-line:no-require-imports\n routes = require(\"./routes\").routes;\n renderApp();\n });\n}\n","module.exports = (__webpack_require__(3))(34);","module.exports = (__webpack_require__(3))(440);","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./dist/react-hot-loader.production.min.js');\n} else if (process.env.NODE_ENV === 'test') {\n module.exports = require('./dist/react-hot-loader.production.min.js');\n} else if (typeof window === 'undefined') {\n // this is just server environment\n module.exports = require('./dist/react-hot-loader.production.min.js');\n} else if (!module.hot) {\n module.exports = require('./dist/react-hot-loader.production.min.js');\n module.exports.AppContainer.warnAboutHMRDisabled = true;\n module.exports.hot.shouldWrapWithAppContainer = true;\n} else {\n var evalAllowed = false;\n try {\n eval('evalAllowed = true');\n } catch (e) {\n // eval not allowed due to CSP\n }\n\n // RHL needs setPrototypeOf to operate Component inheritance, and eval to patch methods\n var jsFeaturesPresent = !!Object.setPrototypeOf;\n\n if (!jsFeaturesPresent || !evalAllowed) {\n // we are not in prod mode, but RHL could not be activated\n console.warn('React-Hot-Loader is not supported in this environment.');\n module.exports = require('./dist/react-hot-loader.production.min.js');\n } else {\n module.exports = window.reactHotLoaderGlobal = require('./dist/react-hot-loader.development.js');\n }\n}\n","\"use strict\";function _interopDefault(e){return e&&\"object\"==typeof e&&\"default\"in e?e.default:e}Object.defineProperty(exports,\"__esModule\",{value:!0});var React=_interopDefault(require(\"react\"));function AppContainer(e){return AppContainer.warnAboutHMRDisabled&&(AppContainer.warnAboutHMRDisabled=!0,console.error(\"React-Hot-Loader: misconfiguration detected, using production version in not production environment.\"),console.error(\"React-Hot-Loader: Hot Module Replacement is not enabled.\")),React.Children.only(e.children)}AppContainer.warnAboutHMRDisabled=!1;var hot=function e(){return e.shouldWrapWithAppContainer?function(e){return function(n){return React.createElement(AppContainer,null,React.createElement(e,n))}}:function(e){return e}};hot.shouldWrapWithAppContainer=!1;var areComponentsEqual=function(e,n){return e===n},setConfig=function(){},cold=function(e){return e},configureComponent=function(){};exports.AppContainer=AppContainer,exports.hot=hot,exports.areComponentsEqual=areComponentsEqual,exports.setConfig=setConfig,exports.cold=cold,exports.configureComponent=configureComponent;\n","import { routerMiddleware } from \"connected-react-router\";\nimport { History } from \"history\";\nimport { applyMiddleware, compose, createStore, Store } from \"redux\";\nimport { createEpicMiddleware } from \"redux-observable\";\nimport { BehaviorSubject } from \"rxjs\";\nimport { switchMap } from \"rxjs/operators\";\n\nimport * as StoreModule from \"./store\";\nimport { windowIfDefined } from \"./utils/window\";\n\n\ndeclare global {\n interface Window {\n __REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: (...funcs: Function[]) => (...args: any[]) => R;\n }\n}\n\n\nexport function configureStore(history: History, initialState?: StoreModule.ApplicationState): Store {\n // if devTools is installed, connect to it\n const composeEnhancers = (windowIfDefined && windowIfDefined.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose;\n\n const epicMiddleware = createEpicMiddleware();\n const store = createStore(\n StoreModule.createRootReducer(history),\n (initialState || StoreModule.rootInitialState),\n composeEnhancers(\n applyMiddleware(\n epicMiddleware,\n routerMiddleware(history))\n )\n );\n\n const epic$ = new BehaviorSubject(StoreModule.rootEpic);\n // Every time a new epic is given to epic$ it\n // will unsubscribe from the previous one then\n // call and subscribe to the new one because of\n // how switchMap works\n const hotReloadingEpic: StoreModule.RootEpic = (action$, store$) =>\n epic$.pipe(\n switchMap(epic => epic(action$, store$, undefined))\n );\n\n epicMiddleware.run(hotReloadingEpic);\n\n // Enable Webpack hot module replacement for reducers\n if (module.hot) {\n module.hot.accept(\"./store\", () => {\n // Justification: this is needed for hot reloading\n // tslint:disable-next-line:no-require-imports\n const nextStoreModule = require(\"./store\");\n store.replaceReducer(nextStoreModule.createRootReducer(history));\n epic$.next(nextStoreModule.rootEpic);\n });\n }\n\n return store;\n}\n","import { connectRouter, RouterAction, RouterState } from \"connected-react-router\";\nimport { History } from \"history\";\nimport { combineReducers } from \"redux\";\nimport { combineEpics, Epic } from \"redux-observable\";\n\nimport * as Plans from \"./plans\";\nimport * as Upload from \"./upload\";\nimport * as User from \"./user\";\n\n\n// -----------------\n// State\n\nexport interface ApplicationState {\n plans: Plans.PlansState;\n router?: RouterState;\n upload: Upload.UploadState;\n user: User.UserState;\n}\n\nexport const rootInitialState: ApplicationState = {\n plans: Plans.initialState,\n upload: Upload.initialState,\n user: User.initialState\n};\n\n\n// -----------------\n// Actions\n\nexport type AnyAction = Plans.AnyPlanAction\n | Upload.AnyUploadAction\n | User.AnyUserAction\n | RouterAction;\n\n\n// -----------------\n// Epic\n\nexport type RootEpic = Epic;\n\nexport const rootEpic: RootEpic = combineEpics(\n Plans.planEpic,\n Upload.uploadEpic,\n User.userEpic\n);\n\n\n// ----------------\n// Reducer\n\nexport const createRootReducer = (history: History) => combineReducers({\n plans: Plans.reducer,\n router: connectRouter(history),\n upload: Upload.reducer,\n user: User.reducer\n});\n","import * as React from \"react\";\nimport Helmet from \"react-helmet\";\nimport { connect, DispatchProp } from \"react-redux\";\nimport { RouteComponentProps } from \"react-router-dom\";\n\nimport { AnyAction, ApplicationState } from \"../store\";\nimport { UploadActions, UploadState } from \"../store/upload\";\n\nimport { Layout } from \"./Layout\";\nimport { PleaseWait } from \"./PleaseWait\";\n\n\ntype HomeProps =\n UploadState\n & RouteComponentProps\n & DispatchProp;\n\n\nfunction Home(props: HomeProps): JSX.Element {\n const buttonHandler = React.useCallback(() => {\n const filenameElement = document.getElementById(\"filename\") as HTMLInputElement;\n if (filenameElement) {\n filenameElement.click();\n }\n return false;\n }, []);\n const hiddenFileHandler = React.useCallback(() => {\n const filenameElement = document.getElementById(\"filename\") as HTMLInputElement;\n\n const files = filenameElement && filenameElement.files;\n if (files) {\n props.dispatch(UploadActions.uploadPlan({\n file: files[0],\n filename: files[0].name\n }));\n }\n\n return false;\n }, [props.dispatch]);\n const cancelUpload = React.useCallback(\n () => props.dispatch(UploadActions.cancelUpload()),\n [props.dispatch]);\n const clearError = React.useCallback(\n () => props.dispatch(UploadActions.clearError()),\n [props.dispatch]);\n\n\n return \n \n PDF to Point Cloud Survey Conversion\n \n

PDF to Point Cloud Survey Conversion

\n

Upload a PDF of a vectorized survey and get a 3D Point Cloud in DXF instantly.

\n {props.isUploading ? renderUploadingProgress(props.uploadMessage, cancelUpload)\n : props.errorText ? renderError(props.errorText, clearError)\n : renderUploadForm(buttonHandler, hiddenFileHandler)\n }\n
;\n}\n\n\nfunction renderUploadingProgress(uploadMessage: string | undefined, cancelUpload: () => void): JSX.Element {\n return
\n {uploadMessage || \"\"}\n

Cancel

\n
;\n}\n\n\nfunction renderError(errorText: string, clearError: () => void): JSX.Element {\n return

Error encountered on upload: \"{errorText}\" Try again?

;\n}\n\n\nfunction renderUploadForm(buttonHandler: () => boolean, hiddenFileHandler: () => boolean): JSX.Element {\n return
\n \n \n
;\n}\n\n\nexport const ConnectedHome = connect(\n (state: ApplicationState) => state.upload\n)(Home);\n","module.exports = (__webpack_require__(3))(400);","module.exports = (__webpack_require__(3))(415);","import { SQSClient, ReceiveMessageResult, ReceiveMessageCommand, DeleteMessageCommand } from \"@aws-sdk/client-sqs\";\nimport { empty, from, of, Observable } from \"rxjs\";\nimport { delay, flatMap, repeatWhen, tap } from \"rxjs/operators\";\n\n\nfunction makeReceiveRequest(sqs: SQSClient, command: ReceiveMessageCommand): Observable {\n return new Observable(subscriber => {\n sqs.send(command, (err, data) => {\n if (err) {\n subscriber.error(err);\n } else {\n subscriber.next(data);\n subscriber.complete();\n }\n });\n });\n}\n\n\nfunction makeDeleteRequest(sqs: SQSClient, command: DeleteMessageCommand): void {\n sqs.send(command, () => {\n // don't care\n });\n}\n\n\nexport function createQueueStream(queueUrl: string): Observable {\n const receiveCommand = new ReceiveMessageCommand({\n QueueUrl: queueUrl,\n MaxNumberOfMessages: 1,\n WaitTimeSeconds: 20\n });\n\n const sqs = new SQSClient({\n credentials: {\n accessKeyId: \"AKIASKVBAY6HWMKXVAJX\",\n secretAccessKey: \"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\"\n },\n region: \"ca-central-1\"\n });\n\n return makeReceiveRequest(sqs, receiveCommand)\n .pipe(\n flatMap(result => result.Messages\n ? from(result.Messages)\n : empty()\n ),\n tap(message => {\n if (message.ReceiptHandle) {\n makeDeleteRequest(sqs, new DeleteMessageCommand({\n QueueUrl: queueUrl,\n ReceiptHandle: message.ReceiptHandle\n }));\n }\n }),\n flatMap(message => message.Body\n ? of(JSON.parse(message.Body) as T)\n : empty()\n ),\n repeatWhen(completed => completed.pipe(delay(100)))\n );\n}\n","module.exports = (__webpack_require__(3))(367);","import * as React from \"react\";\nimport { connect, DispatchProp } from \"react-redux\";\n\nimport { getServerOptions } from \"../serverOptions\";\nimport { AnyAction, ApplicationState } from \"../store\";\nimport { UserActions, UserState } from \"../store/user\";\nimport { OAuth2Provider } from \"../utils/oauth\";\nimport { GoogleButton } from \"./GoogleButton\";\nimport { PleaseWait } from \"./PleaseWait\";\n\n\ntype LoginButtonProps =\n UserState\n & DispatchProp;\n\n\nfunction LoginButton(props: LoginButtonProps): JSX.Element {\n const serverOptions = getServerOptions();\n const logout = React.useCallback(\n () => props.dispatch(UserActions.logout()),\n [props.dispatch]);\n const loginStartGoogle = React.useCallback(\n () => props.dispatch(UserActions.loginStart(OAuth2Provider.Google)),\n [props.dispatch]);\n const loginStartProcore = React.useCallback(\n () => props.dispatch(UserActions.loginStart(OAuth2Provider.Procore)),\n [props.dispatch]);\n const loginStartTrimble = React.useCallback(\n () => props.dispatch(UserActions.loginStart(OAuth2Provider.TrimbleConnect)),\n [props.dispatch]);\n\n const loginOptions = <>\n {serverOptions.oAuthConfigs.Google && }\n {serverOptions.oAuthConfigs.TrimbleConnect && serverOptions.oAuthConfigs.Google && \" or \"}\n {serverOptions.oAuthConfigs.TrimbleConnect && Trimble Connect}\n {serverOptions.oAuthConfigs.Procore && (serverOptions.oAuthConfigs.Google || serverOptions.oAuthConfigs.TrimbleConnect) && \" or \"}\n {serverOptions.oAuthConfigs.Procore && Procore}\n ;\n\n return props.loginEnabled\n ? props.profile\n ?

Hello {props.profile.username} ({props.profile.provider}) Logout

\n : props.isLoggingIn\n ? Login in progress\n : props.loginError\n ?

Error: {props.loginError} Try again with {loginOptions}?

\n :

Login with {loginOptions}

\n :
;\n}\n\n\nexport const ConnectedLoginButton = connect(\n (state: ApplicationState) => state.user\n)(LoginButton);\n","'use strict';\n\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n charset: 'utf-8',\n charsetSentinel: false,\n delimiter: '&',\n encode: true,\n encoder: utils.encode,\n encodeValuesOnly: false,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string'\n || typeof v === 'number'\n || typeof v === 'boolean'\n || typeof v === 'symbol'\n || typeof v === 'bigint';\n};\n\nvar stringify = function stringify(\n object,\n prefix,\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset\n) {\n var obj = object;\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n });\n }\n\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;\n }\n\n obj = '';\n }\n\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : undefined }];\n } else if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n var value = typeof key === 'object' && key.value !== undefined ? key.value : obj[key];\n\n if (skipNulls && value === null) {\n continue;\n }\n\n var keyPrefix = isArray(obj)\n ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix\n : prefix + (allowDots ? '.' + key : '[' + key + ']');\n\n pushToArray(values, stringify(\n value,\n keyPrefix,\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset\n ));\n }\n\n return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (opts && opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if (opts && 'indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (options.skipNulls && obj[key] === null) {\n continue;\n }\n pushToArray(keys, stringify(\n obj[key],\n key,\n generateArrayPrefix,\n options.strictNullHandling,\n options.skipNulls,\n options.encode ? options.encoder : null,\n options.filter,\n options.sort,\n options.allowDots,\n options.serializeDate,\n options.format,\n options.formatter,\n options.encodeValuesOnly,\n options.charset\n ));\n }\n\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictNullHandling: false\n};\n\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\n\nvar parseArrayValue = function (val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = {};\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(\n parseArrayValue(part.slice(pos + 1), options),\n function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n }\n );\n }\n\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(val);\n }\n\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n\n if (has.call(obj, key)) {\n obj[key] = utils.combine(obj[key], val);\n } else {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]' && options.parseArrays) {\n obj = [].concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (!options.parseArrays && cleanRoot === '') {\n obj = { 0: leaf };\n } else if (\n !isNaN(index)\n && root !== cleanRoot\n && String(index) === cleanRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else {\n obj[cleanRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n return {\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n\n return utils.compact(obj);\n};\n","import { windowIfDefined } from \"./window\";\n\n\nexport interface SavedUserState {\n username: string;\n email: string;\n clientToken: string;\n}\n\nconst userStateKey = \"userState\";\n\nexport function loadUserState(): SavedUserState | undefined {\n const userStateJson = windowIfDefined && window.localStorage.getItem(userStateKey);\n if (userStateJson) {\n try {\n const parsedData = JSON.parse(userStateJson) as Partial;\n return parsedData.username && parsedData.email && parsedData.clientToken\n ? {\n username: parsedData.username,\n email: parsedData.email,\n clientToken: parsedData.clientToken\n }\n : undefined;\n }\n catch {\n // if it is not parsable, remove it\n removeUserState();\n }\n }\n\n return undefined;\n}\n\nexport function removeUserState(): void {\n if (windowIfDefined) {\n windowIfDefined.localStorage.removeItem(userStateKey);\n }\n}\n\nexport function saveUserState(state: SavedUserState): void {\n if (windowIfDefined) {\n windowIfDefined.localStorage.setItem(userStateKey, JSON.stringify(state));\n }\n}\n","import * as React from \"react\";\nimport { GoogleLogo } from \"./GoogleLogo\";\n\n\nexport interface GoogleButtonProps {\n onClick: () => void;\n size: number;\n}\n\n\nexport function GoogleButton(props: GoogleButtonProps): JSX.Element {\n const pixelSize = props.size / 32.0;\n const buttonStyle: React.CSSProperties = {\n lineHeight: 0,\n padding: 0,\n background: \"#FFFFFF\",\n display: \"inline-flex\"\n };\n const spanStyle: React.CSSProperties = {\n marginLeft: `${pixelSize*16}px`,\n marginRight: `${pixelSize*8}px`,\n fontFamily: \"Roboto\",\n fontSize: `${pixelSize*14}px`,\n color: \"#8A8A8A\",\n // verticalAlign: \"bottom\",\n lineHeight: `${pixelSize*36}px`,\n marginBottom: `-${pixelSize*8}px`\n }\n return ;\n}\n","import * as React from \"react\";\n\n\nexport interface GoogleLogoProps {\n size: number;\n margin?: string;\n}\n\n\nexport function GoogleLogo(props: GoogleLogoProps): JSX.Element {\n return \n \n \n \n \n \n \n ;\n}\n","import * as React from \"react\";\n\n\nexport interface ThreeDotsProps {\n color: string;\n height: number;\n width: number;\n}\n\n\nexport function ThreeDots(props: ThreeDotsProps): JSX.Element {\n return \n \n \n \n \n \n \n \n \n \n \n \n \n ;\n}\n","import * as React from \"react\";\n\nimport { sendResultMessage } from \"../utils/oauth\";\nimport { windowIfDefined } from \"../utils/window\";\n\n\nexport function OAuth2Redirect(): JSX.Element {\n React.useEffect(() => {\n if (windowIfDefined && windowIfDefined.location) {\n sendResultMessage(windowIfDefined.location);\n }\n });\n\n return

\n Completing login...\n

;\n}\n","import * as React from \"react\";\nimport Helmet from \"react-helmet\";\nimport { connect, DispatchProp } from \"react-redux\";\nimport { NavLink } from \"react-router-dom\";\n\nimport { getServerOptions, ServerOptions } from \"../serverOptions\";\nimport { AnyAction, ApplicationState } from \"../store\";\nimport { PlansState, PlanActions, PlanData } from \"../store/plans\";\nimport { UserProfile, UserState } from \"../store/user\";\nimport { OAuth2Provider } from \"../utils/oauth\";\n\nimport { StripeSubmitCallback } from \"./CheckoutForm\";\nimport { CheckoutFormContainer } from \"./CheckoutFormContainer\";\nimport { LayeredDetailList } from \"./LayeredDetailList\";\nimport { Layout } from \"./Layout\";\nimport { NotFound } from \"./NotFound\";\nimport { PlanDetailList } from \"./PlanDetailList\";\nimport { PleaseWait } from \"./PleaseWait\";\nimport { TrimbleProject } from \"./TrimbleProjectList\";\n\n\ntype ViewPlanProps = PlansState\n & UserState\n & DispatchProp;\n\n\nfunction ViewPlan(props: ViewPlanProps): JSX.Element {\n const serverOptions = getServerOptions();\n const planData = props.plans[props.currentPlanGuid || \"\"];\n React.useEffect(() => {\n if (serverOptions.freeMode && props.currentPlanGuid && props.profile && planData && !planData.available) {\n props.dispatch(PlanActions.loadPlan({ guid: props.currentPlanGuid }));\n }\n }, [props.currentPlanGuid, props.profile]);\n\n const stripeSubmitCallback = React.useCallback((stripeToken: string, email: string, selectedProject?: TrimbleProject): void => {\n props.dispatch(PlanActions.payForPlan({\n email,\n guid: props.currentPlanGuid || \"\",\n selectedProject,\n stripeToken\n }));\n\n }, [props.dispatch, props.currentPlanGuid]);\n\n if (props.isLoading) {\n return renderLoading();\n }\n\n if (planData) {\n if (planData.nothing) {\n if (planData.available) {\n return renderNothing(planData, serverOptions, props.profile);\n } else {\n return renderNothingLoginRequired(planData);\n }\n } else if (serverOptions.freeMode) {\n if (planData.available) {\n return renderFreeMode(planData, serverOptions, props.profile);\n } else {\n return renderFreeModeLoginRequired(planData, serverOptions);\n }\n } else if (planData.free) {\n return renderFree(planData, serverOptions);\n } else if (planData.paid) {\n return renderPaid(planData, serverOptions);\n } else {\n return renderUnpaid(props, planData, serverOptions, stripeSubmitCallback);\n }\n } else {\n return ;\n }\n}\n\n\nfunction countSpots(planData: PlanData, confidentOnly: boolean = false): number {\n return planData.spotPages.reduce((sum, page) => sum + (confidentOnly ? page.spotsConfident : page.spotsFound), 0);\n}\n\n\nfunction renderFree(planData: PlanData, serverOptions: ServerOptions): JSX.Element {\n return \n \n Results for {planData.nameWithoutExtension}.pdf\n \n

Point Cloud Conversion Summary

\n

\n We found only {countSpots(planData, true)} spot elevations and {planData.tableData.tableCount} legends, so this one is on us!\n

\n

\n Here's a quick summary:\n

\n \n \n
;\n}\n\n\nfunction renderFreeMode(planData: PlanData, serverOptions: ServerOptions, profile: UserProfile | null): JSX.Element {\n return \n \n Results for {planData.nameWithoutExtension}.pdf\n \n

Point Cloud Conversion Summary

\n

\n Congratulations{(profile ? ` ${profile.username}` : \"\")}, Construction AI fully converted {countSpots(planData, true)} spot elevations and {planData.tableData.tableCount} legends from \"{planData.nameWithoutExtension}.pdf\".\n

\n

\n Here's a quick summary:\n

\n \n \n
;\n}\n\n\nfunction renderFreeModeLoginRequired(planData: PlanData, serverOptions: ServerOptions): JSX.Element {\n return \n \n Preview for {planData.nameWithoutExtension}.pdf\n \n

Point Cloud Conversion Summary

\n

\n Congratulations, Construction AI fully converted {countSpots(planData, true)} spot elevations and {planData.tableData.tableCount} legends from \"{planData.nameWithoutExtension}.pdf\".\n All you have to do to see the results is log in!\n

\n

\n Here's a quick summary:\n

\n \n \n
;\n}\n\n\nfunction renderLoading(): JSX.Element {\n return \n \n Loading...\n \n

Loading...

\n Please wait while the results load\n
;\n}\n\n\nfunction renderNothing(planData: PlanData, serverOptions: ServerOptions, profile: UserProfile | null): JSX.Element {\n return \n \n Results for {planData.nameWithoutExtension}.pdf\n \n

Let’s Try Again!

\n

\n Hi{(profile ? ` ${profile.username}` : \"\")},\n

\n

\n It looks like we may have had trouble converting \"{planData.nameWithoutExtension}.pdf\" into a point cloud. There are a few reasons why this may have been:\n

\n
    \n
  1. If the spot elevations aren’t vectors (polylines) we’re unable to process them.
  2. \n
  3. If the file is raster (like a scanned document) we’re also unable to do a conversion.
  4. \n
  5. It could also just be one of those things, and we’d love to help get you the data you need. Please email us and we’ll see what we can do to help you.
  6. \n
\n

\n In the meantime, feel free to download these output files:\n

\n \n \n
;\n}\n\n\nfunction renderNothingLoginRequired(planData: PlanData): JSX.Element {\n return \n \n Results for {planData.nameWithoutExtension}.pdf\n \n

Let’s Try Again!

\n

\n Hi,\n

\n

\n It looks like we may have had trouble converting \"{planData.nameWithoutExtension}.pdf\" into a point cloud. There are a few reasons why this may have been:\n

\n
    \n
  1. If the spot elevations aren’t vectors (polylines) we’re unable to process them.
  2. \n
  3. If the file is raster (like a scanned document) we’re also unable to do a conversion.
  4. \n
  5. It could also just be one of those things, and we’d love to help get you the data you need. Please email us and we’ll see what we can do to help you.
  6. \n
\n

\n In the meantime, if you log in you can download a layered output file.\n

\n \n
;\n}\n\n\nfunction renderPaid(planData: PlanData, serverOptions: ServerOptions): JSX.Element {\n return \n \n Results for {planData.nameWithoutExtension}.pdf\n \n

Point Cloud Conversion Summary

\n

\n Congratulations, Construction AI fully converted {countSpots(planData, true)} spot elevations and {planData.tableData.tableCount} legends from \"{planData.nameWithoutExtension}.pdf\".\n

\n

\n Here's a quick summary:\n

\n \n \n
;\n}\n\n\nfunction renderUnpaid(props: ViewPlanProps, planData: PlanData, serverOptions: ServerOptions, stripeSubmitCallback: StripeSubmitCallback): JSX.Element {\n return \n \n Preview for {planData.nameWithoutExtension}.pdf\n \n

Point Cloud Conversion Summary

\n

\n Congratulations, Construction AI fully converted {countSpots(planData, true)} spot elevations and {planData.tableData.tableCount} legends from \"{planData.nameWithoutExtension}.pdf\".\n

\n

\n Here's a quick summary:\n

\n \n props.dispatch(PlanActions.clearError())} />\n \n
;\n}\n\nfunction NoResultsFooter(): JSX.Element {\n return

\n Or, do you have another survey to try? Go ahead: upload another plan!\n

;\n}\n\nfunction ResultsFooter(): JSX.Element {\n return

\n Got even more work to do? Go ahead: upload another plan!\n

\n Not what you expected? We’d like to hear about it! Contact us here.\n

;\n}\n\n\nexport const ConnectedViewPlan = connect(\n (state: ApplicationState) => ({\n ...state.plans,\n ...state.user\n })\n)(ViewPlan);\n","import { Elements } from \"@stripe/react-stripe-js\";\nimport { Stripe } from \"@stripe/stripe-js\";\nimport * as React from \"react\";\n\nimport { getServerOptions } from \"../serverOptions\";\n\nimport { CheckoutForm, CheckoutFormProps } from \"./CheckoutForm\";\n\n\ntype CheckoutFormContainerProps = CheckoutFormProps;\n\n\nexport function CheckoutFormContainer(props: CheckoutFormContainerProps): JSX.Element {\n const serverOptions = getServerOptions();\n const [stripeInstance, setStripeInstance] = React.useState(null);\n React.useEffect(() => {\n if (!stripeInstance) {\n // tslint:disable-next-line: no-require-imports\n require(\"@stripe/stripe-js\")\n .loadStripe(serverOptions.stripePublicApiKey)\n .then((stripe: Stripe) => {\n setStripeInstance(stripe);\n });\n }\n }, [serverOptions, stripeInstance]);\n\n return \n \n ;\n}\n","import { useElements, useStripe, CardElement } from \"@stripe/react-stripe-js\";\nimport { Stripe, StripeElements } from \"@stripe/stripe-js\";\nimport * as classnames from \"classnames\";\nimport * as React from \"react\";\n\nimport { Button } from \"./Button\";\nimport { Checkbox } from \"./Checkbox\";\nimport { PleaseWait } from \"./PleaseWait\";\nimport { Textbox } from \"./Textbox\";\nimport { TrimbleProject, TrimbleProjectList } from \"./TrimbleProjectList\";\n\n\nexport type StripeSubmitCallback = (stripeToken: string, email: string, selectedProject?: TrimbleProject) => void;\n\nexport interface CheckoutFormProps {\n clearError: () => void;\n costDisplay: string;\n currencyCode: string;\n email: string | null;\n errorText?: string;\n isPaying: boolean;\n isTrimbleEmail: boolean;\n onSubmit: StripeSubmitCallback;\n}\n\n\nexport function CheckoutForm(props: CheckoutFormProps): JSX.Element {\n const [useTrimble, setUseTrimble] = React.useState(false);\n const [typedEmail, setTypedEmail] = React.useState();\n const [selectedProject, setSelectedProject] = React.useState();\n const [waitingForStripe, setWaitingForStripe] = React.useState(false);\n const [internalErrorText, setInternalErrorText] = React.useState();\n const clearErrorCallback = React.useCallback(() => {\n if (internalErrorText) {\n setInternalErrorText(undefined);\n } else {\n props.clearError();\n }\n }, [internalErrorText, props.clearError]);\n\n const stripe = useStripe();\n const stripeElements = useElements();\n\n const submitCallback = React.useCallback(\n createCallback(\n props.email || typedEmail,\n useTrimble,\n selectedProject,\n stripe,\n stripeElements,\n props.onSubmit,\n setWaitingForStripe,\n setInternalErrorText),\n [props.email, typedEmail, useTrimble, selectedProject, stripe, stripeElements, setWaitingForStripe, setInternalErrorText]);\n\n const classes = classnames([\n \"checkout\",\n props.isPaying || props.errorText || waitingForStripe ? \"checkout--disabled\" : undefined\n ]);\n\n const errorText = internalErrorText || props.errorText;\n const button = errorText || props.isPaying || waitingForStripe\n ? undefined\n : ;\n const status = errorText\n ?

Error encountered on payment: \"{errorText}\" Try again?

\n : props.isPaying || waitingForStripe\n ? Processing payment of {props.costDisplay} {props.currencyCode}\n : undefined;\n\n return
\n
\n

To purchase, please provide the following information:

\n \n {!props.email && }\n {props.email && props.isTrimbleEmail && Save to Trimble Connect}\n {props.email && useTrimble && }\n {button}\n
\n {status}\n
;\n}\n\n\ntype SetState = React.Dispatch>;\n\n\nfunction createCallback(\n email: string | undefined,\n useTrimble: boolean,\n selectedProject: TrimbleProject | undefined,\n stripe: Stripe | null,\n stripeElements: StripeElements | null,\n onSubmit: StripeSubmitCallback,\n setWaitingForStripe: SetState,\n setInternalErrorText: SetState): () => void {\n return () => {\n if (!stripe || !stripeElements) {\n // this shouldn't happen\n console.error(\"Got null stripe object.\");\n return;\n }\n\n const cardElement = stripeElements.getElement(CardElement);\n\n if (!cardElement) {\n // this shouldn't happen\n console.error(\"Got null stripe CardElement object.\");\n return;\n }\n\n if (!email) {\n setInternalErrorText(\"Email must be specified.\");\n return;\n }\n\n if (useTrimble && !selectedProject) {\n setInternalErrorText(\"Please select a project.\");\n return;\n }\n\n setWaitingForStripe(true);\n\n stripe\n .createToken(cardElement)\n .then(result => {\n if (result.token) {\n onSubmit(result.token.id, email, selectedProject);\n setWaitingForStripe(false);\n } else {\n setWaitingForStripe(false);\n if (result.error) {\n setInternalErrorText(result.error.message);\n } else {\n setInternalErrorText(\"Failed to get token from Stripe\");\n }\n }\n })\n .catch(error => {\n console.error(\"Got unexpected error: \", error);\n setWaitingForStripe(false);\n setInternalErrorText(`Failed to get token from Stripe: ${error}`);\n });\n };\n}\n","module.exports = (__webpack_require__(3))(401);","import * as React from \"react\";\n\n\nexport interface ButtonProps {\n id?: string;\n onClick: () => void;\n children: string | string[];\n}\n\n\nexport function Button(props: ButtonProps): JSX.Element {\n return {props.children};\n}\n","import * as React from \"react\";\n\n\nexport interface CheckboxProps {\n checked: boolean;\n id: string;\n onChange: (checked: boolean) => void;\n children: string | string[];\n}\n\n\nexport function Checkbox(props: CheckboxProps): JSX.Element {\n const checkboxHandler = React.useCallback((event: React.ChangeEvent) => {\n props.onChange(event.target.checked);\n }, [props.onChange]);\n\n return ;\n}\n","import * as React from \"react\";\n\n\nexport interface TextboxProps {\n id: string;\n label: string;\n onChange: (newValue?: string) => void;\n type: string;\n value?: string;\n}\n\n\nexport function Textbox(props: TextboxProps): JSX.Element {\n const textboxHandler = React.useCallback((event: React.ChangeEvent) => {\n props.onChange(event.target.value);\n }, [props.onChange]);\n\n return

{props.label}:

;\n}\n","import * as React from \"react\";\n\nimport { createFetchStream } from \"../utils/fetch\";\n\nimport { Picklist } from \"./Picklist\";\nimport { PleaseWait } from \"./PleaseWait\";\n\n\nexport interface TrimbleProject {\n id: string;\n name: string;\n rootFolderId: string;\n}\n\n\nexport interface TrimbleProjectListProps {\n id?: string;\n onSelection: (selectedProject?: TrimbleProject) => void;\n selectedProject?: TrimbleProject;\n}\n\n\nexport function TrimbleProjectList(props: TrimbleProjectListProps): JSX.Element {\n const [projects, setProjects] = React.useState();\n React.useEffect(() => {\n createFetchStream(`api/trimble/get/projects`)\n .subscribe(\n loadedProjects => {\n if (loadedProjects && loadedProjects.length) {\n props.onSelection(loadedProjects[0]);\n }\n setProjects(loadedProjects || []);\n },\n _err => {\n // TODO do something!\n }\n );\n }, []);\n\n return projects\n ? \n : Loading project list;\n}\n","import * as React from \"react\";\n\n\nexport interface PicklistItem {\n id: string;\n name: string;\n}\n\n\nexport interface PicklistProps {\n id?: string;\n items: TItem[];\n onSelection: (selectedItem?: TItem) => void;\n selectedItem?: TItem;\n}\n\n\n\nexport function Picklist(props: PicklistProps): JSX.Element {\n const picklistHandler = React.useCallback((event: React.ChangeEvent) => {\n props.onSelection(props.items.find(i => i.id === event.target.value));\n }, [props.onSelection]);\n\n return ;\n}\n","module.exports = (__webpack_require__(3))(399);","import * as React from \"react\";\n\nimport { ServerOptions } from \"../serverOptions\";\nimport { PlanData } from \"../store/plans\";\n\n\ninterface LayeredDetailListProps {\n planData: PlanData;\n serverOptions: ServerOptions;\n}\n\n\nexport function LayeredDetailList({ planData, serverOptions }: LayeredDetailListProps): JSX.Element {\n const outputAvailable = planData.available;\n\n return ;\n}\n","import * as React from \"react\";\n\nimport { ServerOptions } from \"../serverOptions\";\nimport { FeaturePageData, PlanData, SpotPageData } from \"../store/plans\";\n\n\ninterface PlanDetailListProps {\n planData: PlanData;\n serverOptions: ServerOptions;\n}\n\n\nexport function PlanDetailList({ planData, serverOptions }: PlanDetailListProps): JSX.Element {\n const outputAvailable = planData.available;\n const needToPay = !outputAvailable && !serverOptions.freeMode;\n const showDetails = !planData.paid;\n const featureCount = planData.featurePages.reduce((sum, page) => sum + page.featureCount, 0);\n const featureTypes: { [featureType: string]: boolean } = {};\n const featuresByPage: { [pageNumber: number]: FeaturePageData } = {};\n for (const featurePage of planData.featurePages) {\n for (const feature of featurePage.featuresIdentified) {\n if (feature.count > 0) {\n featureTypes[feature.name.toLocaleLowerCase()] = true;\n }\n }\n if (featurePage.featureCount > 0) {\n featuresByPage[featurePage.pageNumber] = featurePage;\n }\n }\n const tableData = planData.tableData;\n const tablesFound = tableData && tableData.tableCount > 0;\n const crossSectionData = planData.crossSectionData;\n const crossSectionsFound = crossSectionData && crossSectionData.crossSectionCount > 0;\n const spotsByPage: { [pageNumber: number]: SpotPageData } = {};\n for (const spotPage of planData.spotPages) {\n if (spotPage.spotsFound > 0) {\n spotsByPage[spotPage.pageNumber] = spotPage;\n }\n }\n const spotsFound = planData.spotPages.reduce((sum, page) => sum + page.spotsFound, 0) > 0;\n const spotsConfident = planData.spotPages.reduce((sum, page) => sum + page.spotsConfident, 0);\n const spotsUncertain = planData.spotPages.reduce((sum, page) => sum + page.spotsUncertain, 0);\n const spotsUnmatched = planData.spotPages.reduce((sum, page) => sum + page.spotsUnmatched, 0);\n const layers = planData.spotPages.reduce((sum, page) => sum + page.layerCount, 0);\n const vectors = planData.spotPages.reduce((sum, page) => sum + page.vectorCount, 0);\n\n return
    \n
  • the original input PDF used is {planData.nameWithoutExtension}.pdf
  • \n\n {showDetails && spotsFound &&
  • {spotsConfident} spot elevations with fully x,y,z coordinates converted to DXF 3D.
  • }\n {showDetails && spotsFound &&
  • {spotsUncertain} possible spot elevations with x,y,z coordinates converted to DXF in 3D.
  • }\n {showDetails && spotsFound &&
  • {spotsUnmatched} coordinates found with x,y values converted to DXF.
  • }\n\n {showDetails &&
  • {layers} new layers created and converted to DXF.
  • }\n {showDetails && featureCount > 0 &&
  • {featureCount} objects of interest found and printed to summary PDF.
  • }\n {showDetails &&
  • {vectors} vectors (polylines) extracted.
  • }\n\n {showDetails && tablesFound &&
  • {tableData.tableCount} legends found.
  • }\n\n {showDetails && crossSectionsFound &&
  • {crossSectionData.crossSectionCount} cross section plots found.
  • }\n\n {needToPay &&
  • {planData.costDisplay} {serverOptions.currencyCode} to purchase DXF (and summary PDF).
  • }\n\n {outputAvailable && (spotsFound || featureCount > 0) && planData.spotPages\n .map(page => {\n return
  • Results for page {page.pageNumber}:\n
      \n
    • {page.spotsConfident} spot elevations found.
    • \n
    • DXF output file: Download
    • \n
    • PDF output file: Download
    • \n
    \n
  • \n })}\n\n {outputAvailable && tablesFound &&
  • Tables Excel output file: Download
  • }\n {outputAvailable && tablesFound &&
  • Tables PDF output file: Download
  • }\n\n {outputAvailable && crossSectionsFound &&
  • Cross sections DXF output file: Download
  • }\n
;\n}\n","import { root } from '../../util/root';\nimport { Observable } from '../../Observable';\nimport { Subscriber } from '../../Subscriber';\nimport { TeardownLogic } from '../../types';\nimport { map } from '../../operators/map';\n\nexport interface AjaxRequest {\n url?: string;\n body?: any;\n user?: string;\n async?: boolean;\n method?: string;\n headers?: Object;\n timeout?: number;\n password?: string;\n hasContent?: boolean;\n crossDomain?: boolean;\n withCredentials?: boolean;\n createXHR?: () => XMLHttpRequest;\n progressSubscriber?: Subscriber;\n responseType?: string;\n}\n\nfunction getCORSRequest(): XMLHttpRequest {\n if (root.XMLHttpRequest) {\n return new root.XMLHttpRequest();\n } else if (!!root.XDomainRequest) {\n return new root.XDomainRequest();\n } else {\n throw new Error('CORS is not supported by your browser');\n }\n}\n\nfunction getXMLHttpRequest(): XMLHttpRequest {\n if (root.XMLHttpRequest) {\n return new root.XMLHttpRequest();\n } else {\n let progId: string;\n try {\n const progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];\n for (let i = 0; i < 3; i++) {\n try {\n progId = progIds[i];\n if (new root.ActiveXObject(progId)) {\n break;\n }\n } catch (e) {\n //suppress exceptions\n }\n }\n return new root.ActiveXObject(progId);\n } catch (e) {\n throw new Error('XMLHttpRequest is not supported by your browser');\n }\n }\n}\n\nexport interface AjaxCreationMethod {\n (urlOrRequest: string | AjaxRequest): Observable;\n get(url: string, headers?: Object): Observable;\n post(url: string, body?: any, headers?: Object): Observable;\n put(url: string, body?: any, headers?: Object): Observable;\n patch(url: string, body?: any, headers?: Object): Observable;\n delete(url: string, headers?: Object): Observable;\n getJSON(url: string, headers?: Object): Observable;\n}\n\nexport function ajaxGet(url: string, headers: Object = null) {\n return new AjaxObservable({ method: 'GET', url, headers });\n}\n\nexport function ajaxPost(url: string, body?: any, headers?: Object): Observable {\n return new AjaxObservable({ method: 'POST', url, body, headers });\n}\n\nexport function ajaxDelete(url: string, headers?: Object): Observable {\n return new AjaxObservable({ method: 'DELETE', url, headers });\n}\n\nexport function ajaxPut(url: string, body?: any, headers?: Object): Observable {\n return new AjaxObservable({ method: 'PUT', url, body, headers });\n}\n\nexport function ajaxPatch(url: string, body?: any, headers?: Object): Observable {\n return new AjaxObservable({ method: 'PATCH', url, body, headers });\n}\n\nconst mapResponse = map((x: AjaxResponse, index: number) => x.response);\n\nexport function ajaxGetJSON(url: string, headers?: Object): Observable {\n return mapResponse(\n new AjaxObservable({\n method: 'GET',\n url,\n responseType: 'json',\n headers\n })\n );\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nexport class AjaxObservable extends Observable {\n /**\n * Creates an observable for an Ajax request with either a request object with\n * url, headers, etc or a string for a URL.\n *\n * ## Example\n * ```ts\n * import { ajax } from 'rxjs/ajax';\n *\n * const source1 = ajax('/products');\n * const source2 = ajax({ url: 'products', method: 'GET' });\n * ```\n *\n * @param {string|Object} request Can be one of the following:\n * A string of the URL to make the Ajax call.\n * An object with the following properties\n * - url: URL of the request\n * - body: The body of the request\n * - method: Method of the request, such as GET, POST, PUT, PATCH, DELETE\n * - async: Whether the request is async\n * - headers: Optional headers\n * - crossDomain: true if a cross domain request, else false\n * - createXHR: a function to override if you need to use an alternate\n * XMLHttpRequest implementation.\n * - resultSelector: a function to use to alter the output value type of\n * the Observable. Gets {@link AjaxResponse} as an argument.\n * @return {Observable} An observable sequence containing the XMLHttpRequest.\n * @static true\n * @name ajax\n * @owner Observable\n * @nocollapse\n */\n static create: AjaxCreationMethod = (() => {\n const create: any = (urlOrRequest: string | AjaxRequest) => {\n return new AjaxObservable(urlOrRequest);\n };\n\n create.get = ajaxGet;\n create.post = ajaxPost;\n create.delete = ajaxDelete;\n create.put = ajaxPut;\n create.patch = ajaxPatch;\n create.getJSON = ajaxGetJSON;\n\n return create;\n })();\n\n private request: AjaxRequest;\n\n constructor(urlOrRequest: string | AjaxRequest) {\n super();\n\n const request: AjaxRequest = {\n async: true,\n createXHR: function(this: AjaxRequest) {\n return this.crossDomain ? getCORSRequest() : getXMLHttpRequest();\n },\n crossDomain: true,\n withCredentials: false,\n headers: {},\n method: 'GET',\n responseType: 'json',\n timeout: 0\n };\n\n if (typeof urlOrRequest === 'string') {\n request.url = urlOrRequest;\n } else {\n for (const prop in urlOrRequest) {\n if (urlOrRequest.hasOwnProperty(prop)) {\n request[prop] = urlOrRequest[prop];\n }\n }\n }\n\n this.request = request;\n }\n\n /** @deprecated This is an internal implementation detail, do not use. */\n _subscribe(subscriber: Subscriber): TeardownLogic {\n return new AjaxSubscriber(subscriber, this.request);\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nexport class AjaxSubscriber extends Subscriber {\n private xhr: XMLHttpRequest;\n private done: boolean = false;\n\n constructor(destination: Subscriber, public request: AjaxRequest) {\n super(destination);\n\n const headers = request.headers = request.headers || {};\n\n // force CORS if requested\n if (!request.crossDomain && !this.getHeader(headers, 'X-Requested-With')) {\n headers['X-Requested-With'] = 'XMLHttpRequest';\n }\n\n // ensure content type is set\n let contentTypeHeader = this.getHeader(headers, 'Content-Type');\n if (!contentTypeHeader && !(root.FormData && request.body instanceof root.FormData) && typeof request.body !== 'undefined') {\n headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\n }\n\n // properly serialize body\n request.body = this.serializeBody(request.body, this.getHeader(request.headers, 'Content-Type'));\n\n this.send();\n }\n\n next(e: Event): void {\n this.done = true;\n const { xhr, request, destination } = this;\n let result;\n try {\n result = new AjaxResponse(e, xhr, request);\n } catch (err) {\n return destination.error(err);\n }\n destination.next(result);\n }\n\n private send(): void {\n const {\n request,\n request: { user, method, url, async, password, headers, body }\n } = this;\n try {\n const xhr = this.xhr = request.createXHR();\n\n // set up the events before open XHR\n // https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest\n // You need to add the event listeners before calling open() on the request.\n // Otherwise the progress events will not fire.\n this.setupEvents(xhr, request);\n // open XHR\n if (user) {\n xhr.open(method, url, async, user, password);\n } else {\n xhr.open(method, url, async);\n }\n\n // timeout, responseType and withCredentials can be set once the XHR is open\n if (async) {\n xhr.timeout = request.timeout;\n xhr.responseType = request.responseType as any;\n }\n\n if ('withCredentials' in xhr) {\n xhr.withCredentials = !!request.withCredentials;\n }\n\n // set headers\n this.setHeaders(xhr, headers);\n\n // finally send the request\n if (body) {\n xhr.send(body);\n } else {\n xhr.send();\n }\n } catch (err) {\n this.error(err);\n }\n }\n\n private serializeBody(body: any, contentType?: string) {\n if (!body || typeof body === 'string') {\n return body;\n } else if (root.FormData && body instanceof root.FormData) {\n return body;\n }\n\n if (contentType) {\n const splitIndex = contentType.indexOf(';');\n if (splitIndex !== -1) {\n contentType = contentType.substring(0, splitIndex);\n }\n }\n\n switch (contentType) {\n case 'application/x-www-form-urlencoded':\n return Object.keys(body).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(body[key])}`).join('&');\n case 'application/json':\n return JSON.stringify(body);\n default:\n return body;\n }\n }\n\n private setHeaders(xhr: XMLHttpRequest, headers: Object) {\n for (let key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n }\n\n private getHeader(headers: {}, headerName: string): any {\n for (let key in headers) {\n if (key.toLowerCase() === headerName.toLowerCase()) {\n return headers[key];\n }\n }\n\n return undefined;\n }\n\n private setupEvents(xhr: XMLHttpRequest, request: AjaxRequest) {\n const progressSubscriber = request.progressSubscriber;\n\n function xhrTimeout(this: XMLHttpRequest, e: ProgressEvent): void {\n const {subscriber, progressSubscriber, request } = (xhrTimeout);\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n let error;\n try {\n error = new AjaxTimeoutError(this, request); // TODO: Make betterer.\n } catch (err) {\n error = err;\n }\n subscriber.error(error);\n }\n xhr.ontimeout = xhrTimeout;\n (xhrTimeout).request = request;\n (xhrTimeout).subscriber = this;\n (xhrTimeout).progressSubscriber = progressSubscriber;\n if (xhr.upload && 'withCredentials' in xhr) {\n if (progressSubscriber) {\n let xhrProgress: (e: ProgressEvent) => void;\n xhrProgress = function(e: ProgressEvent) {\n const { progressSubscriber } = (xhrProgress);\n progressSubscriber.next(e);\n };\n if (root.XDomainRequest) {\n xhr.onprogress = xhrProgress;\n } else {\n xhr.upload.onprogress = xhrProgress;\n }\n (xhrProgress).progressSubscriber = progressSubscriber;\n }\n let xhrError: (e: any) => void;\n xhrError = function(this: XMLHttpRequest, e: ErrorEvent) {\n const { progressSubscriber, subscriber, request } = (xhrError);\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n let error;\n try {\n error = new AjaxError('ajax error', this, request);\n } catch (err) {\n error = err;\n }\n subscriber.error(error);\n };\n xhr.onerror = xhrError;\n (xhrError).request = request;\n (xhrError).subscriber = this;\n (xhrError).progressSubscriber = progressSubscriber;\n }\n\n function xhrReadyStateChange(this: XMLHttpRequest, e: Event) {\n return;\n }\n xhr.onreadystatechange = xhrReadyStateChange;\n (xhrReadyStateChange).subscriber = this;\n (xhrReadyStateChange).progressSubscriber = progressSubscriber;\n (xhrReadyStateChange).request = request;\n\n function xhrLoad(this: XMLHttpRequest, e: Event) {\n const { subscriber, progressSubscriber, request } = (xhrLoad);\n if (this.readyState === 4) {\n // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n let status: number = this.status === 1223 ? 204 : this.status;\n let response: any = (this.responseType === 'text' ? (\n this.response || this.responseText) : this.response);\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : 0;\n }\n\n // 4xx and 5xx should error (https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html)\n if (status < 400) {\n if (progressSubscriber) {\n progressSubscriber.complete();\n }\n subscriber.next(e);\n subscriber.complete();\n } else {\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n let error;\n try {\n error = new AjaxError('ajax error ' + status, this, request);\n } catch (err) {\n error = err;\n }\n subscriber.error(error);\n }\n }\n }\n xhr.onload = xhrLoad;\n (xhrLoad).subscriber = this;\n (xhrLoad).progressSubscriber = progressSubscriber;\n (xhrLoad).request = request;\n }\n\n unsubscribe() {\n const { done, xhr } = this;\n if (!done && xhr && xhr.readyState !== 4 && typeof xhr.abort === 'function') {\n xhr.abort();\n }\n super.unsubscribe();\n }\n}\n\n/**\n * A normalized AJAX response.\n *\n * @see {@link ajax}\n *\n * @class AjaxResponse\n */\nexport class AjaxResponse {\n /** @type {number} The HTTP status code */\n status: number;\n\n /** @type {string|ArrayBuffer|Document|object|any} The response data */\n response: any;\n\n /** @type {string} The raw responseText */\n responseText: string;\n\n /** @type {string} The responseType (e.g. 'json', 'arraybuffer', or 'xml') */\n responseType: string;\n\n constructor(public originalEvent: Event, public xhr: XMLHttpRequest, public request: AjaxRequest) {\n this.status = xhr.status;\n this.responseType = xhr.responseType || request.responseType;\n this.response = parseXhrResponse(this.responseType, xhr);\n }\n}\n\nexport type AjaxErrorNames = 'AjaxError' | 'AjaxTimeoutError';\n\n/**\n * A normalized AJAX error.\n *\n * @see {@link ajax}\n *\n * @class AjaxError\n */\nexport interface AjaxError extends Error {\n /** @type {XMLHttpRequest} The XHR instance associated with the error */\n xhr: XMLHttpRequest;\n\n /** @type {AjaxRequest} The AjaxRequest associated with the error */\n request: AjaxRequest;\n\n /** @type {number} The HTTP status code */\n status: number;\n\n /** @type {string} The responseType (e.g. 'json', 'arraybuffer', or 'xml') */\n responseType: string;\n\n /** @type {string|ArrayBuffer|Document|object|any} The response data */\n response: any;\n}\n\nexport interface AjaxErrorCtor {\n new(message: string, xhr: XMLHttpRequest, request: AjaxRequest): AjaxError;\n}\n\nconst AjaxErrorImpl = (() => {\n function AjaxErrorImpl(this: any, message: string, xhr: XMLHttpRequest, request: AjaxRequest): AjaxError {\n Error.call(this);\n this.message = message;\n this.name = 'AjaxError';\n this.xhr = xhr;\n this.request = request;\n this.status = xhr.status;\n this.responseType = xhr.responseType || request.responseType;\n this.response = parseXhrResponse(this.responseType, xhr);\n return this;\n }\n AjaxErrorImpl.prototype = Object.create(Error.prototype);\n return AjaxErrorImpl;\n})();\n\nexport const AjaxError: AjaxErrorCtor = AjaxErrorImpl as any;\n\nfunction parseJson(xhr: XMLHttpRequest) {\n // HACK(benlesh): TypeScript shennanigans\n // tslint:disable-next-line:no-any XMLHttpRequest is defined to always have 'response' inferring xhr as never for the else clause.\n if ('response' in (xhr as any)) {\n //IE does not support json as responseType, parse it internally\n return xhr.responseType ? xhr.response : JSON.parse(xhr.response || xhr.responseText || 'null');\n } else {\n return JSON.parse((xhr as any).responseText || 'null');\n }\n}\n\nfunction parseXhrResponse(responseType: string, xhr: XMLHttpRequest) {\n switch (responseType) {\n case 'json':\n return parseJson(xhr);\n case 'xml':\n return xhr.responseXML;\n case 'text':\n default:\n // HACK(benlesh): TypeScript shennanigans\n // tslint:disable-next-line:no-any XMLHttpRequest is defined to always have 'response' inferring xhr as never for the else sub-expression.\n return ('response' in (xhr as any)) ? xhr.response : xhr.responseText;\n }\n}\n\nexport interface AjaxTimeoutError extends AjaxError {\n}\n\nexport interface AjaxTimeoutErrorCtor {\n new(xhr: XMLHttpRequest, request: AjaxRequest): AjaxTimeoutError;\n}\n\nfunction AjaxTimeoutErrorImpl(this: any, xhr: XMLHttpRequest, request: AjaxRequest) {\n AjaxError.call(this, 'ajax timeout', xhr, request);\n this.name = 'AjaxTimeoutError';\n return this;\n}\n\n/**\n * @see {@link ajax}\n *\n * @class AjaxTimeoutError\n */\nexport const AjaxTimeoutError: AjaxTimeoutErrorCtor = AjaxTimeoutErrorImpl as any;\n","export { ajax } from '../internal/observable/dom/ajax';\nexport { AjaxRequest, AjaxResponse, AjaxError, AjaxTimeoutError } from '../internal/observable/dom/AjaxObservable';\n"],"sourceRoot":""}